FAXLIB: FAXLIB (Fax Library) Bundle

  • Main Page
  • Files
  • Related Pages

FAXLIB (Fax Library) Bundle

Release 1.0.0.2

Page Contents

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

Description

The FAX Library (FAXLIB) provides components that allow a development team to reduce time-to-market by providing the major building blocks of a fax-relay processing system. G3 Fax relay processing is comprised of two modules: Fax Modem (FM), and Facsimile Interface Unit (FIU). FM implements the modulation/demodulation functions for V.21, V.27ter, V.29, V.17 and V.33, and HDLC framing/de-framing. FIU implements T.30 protocol processing, packet network facsimile processing, and compensations for network impairments: delay, jitter, and packet loss. It receives messages including demodulated data from FM and performs protocol conversion to a digital facsimile protocol (i.e. T.38) for transmission over the packet network. Likewise, in the receive direction, data packets are converted to T.30 protocol and passed to FM for HDLC framing if necessary and modulation for transmission over the analog connection.

Figure 1. G3 Fax Relay Software Architecture

Getting Started

Unless otherwise specified, the FAXLIB package installs to the C:\Program Files\Texas Instruments directory. The package directory will follow the naming convention faxlib_<target>_<version> where <target> will be either C55 or C64P and the version string will be a four number string with underscore delimiters (e.g., 1_0_0_0).

Directory Structure

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

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

RTSC Packaging

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

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

Documentation

The FAXLIB delivery comes with the following documentation:

  • faxlib_<target>_<version>_release_notes.html
  • docs\FAXLIB_Users_Manual.chm
  • docs\FAXLIB_Users_Manual.html
  • docs\FAXLIB_Software_Manifest.html
  • Software_License_Agreement.pdf

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

Component Repository

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

Component Directories

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

Eclipse Directory

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

Component Test Examples

Each component is delivered with a compiled code example ready to load in CCS. Though the code examples exhibit subtle differences in structure, each generally offers the ability to:

  1. Step through and understand the component lifecycle
  2. Tailor specific component configurations
  3. Gather profiling information
  4. View performance under various scenarios

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

  • FIU Simulation Users Manual
  • FM Simulation Users Manual
  • HDLC Simulation Users Manual

System Requirements

FAXLIB provides components/modules that allow a development team to produce a high quality fax relay solution with minimal effort and resources.

FAXLIB Components

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

List

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

FAXLIB Component Cross Reference
Component | C55x Library | C64x Library | C64x+ Library
Fax Interface Unit (FIU) | X | X | X
Fax Modem (FM) | X | X | X
High-level Data Link Control (HDLC) | X | X | X

Packaging

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

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

Where:

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

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

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

Where:

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

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

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

Component Modules

As stated above, FAXLIB is a collection of individual components that each perform different fax processing task. In this context, a component in general is a collection of modules that do specific task. In many cases a component contains a single module that performs a specific task. For example, the Fax Interface Unit (FIU) component contains a single FIU module to accomplish its purpose.

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

For example, the root directory for the Fax Modem (FM) is:

          /ti/mas/fm/

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

          /ti/mas/fm/fm.h

Component Modules

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

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

Notes:
  1. <COMP> represents the component name in lowercase (e.g., fiu)
  2. <TARG> represents the target processor for which the code was compiled as specified in Target Processor Library/Directory Reference
  3. Only two libraries are required to link: The C library and the assembly library. The C\-model library is available for debugging and development purposes only.
  4. A component may have no need for assembly routines and, as such, will provide a single C library.

Integration

Integration, for FAXLIB components, is accomplished in four stages:

  1. Compile the FAXLIB components (optional)
  2. System Integration
  3. Compile the system code
  4. Link with FAXLIB libraries

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

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

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

Step #2:
Fax Relay Implementation Guide

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

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

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

This may be handled on a per component basis.

Individual Component Documentation

Fax Interface Unit

Documentation: FIU Component Users Manual
FIU Simulation Users Manual

Fax Modem

Documentation: FM Component Users Manual
FM Simulation Users Manual

High-level Data Link Control

Documentation: HDLC Component Users Manual
HDLC Simulation Users Manual
Copyright 2010, Texas Instruments Incorporated


FAXLIB: Target Processor String Reference

FAXLIB (Fax Library) Bundle

Target Processor String Reference

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


FAXLIB: Package Version String Reference

FAXLIB (Fax Library) Bundle

Package Version String Reference

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

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


FAXLIB: Target Processor Library/Directory Reference

FAXLIB (Fax Library) Bundle

Target Processor Library/Directory Reference

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


FAXLIB: Fax Relay Implementation Guide

FAXLIB (Fax Library) Bundle

Fax Relay Implementation Guide

The following subsections describe the process of integrating the FM and FIU modules into a system for implementing G3 fax relay:
1. Global context initialization
2. G3 fax relay switch-in
3. G3 fax relay processing
4. Call statistics
5. Real-Time Debug Tracing
6. G3 Fax Relay Switch-Out

For details on the APIs and data structures of a particular module, please see the corresponding API document. Also, the example code is provided for the reference.


FAXLIB: Global context initialization

FAXLIB (Fax Library) Bundle » Fax Relay Implementation Guide

Global context initialization

FM and FIU modules have their global context structures that contain non-channel-specific configuration information which is used by all active instances. The global context structures must be declared globally by system code and initialized prior to any calls to the APIs. The following are sample configurations for the global context structures:
        fmContext_t fmContext = {
            sysDebugInfo,
            sysGetSystemTime,
            NULL
        };
        fiuContext_t fiuContext = {
            sysAllocBuffer,
            sysFreeBuffer,
            22,
            sysGetSystemTime,
            sysDebugInfo,
            sysCriticalSectionBegin,
            sysCriticalSectionEnd
        };

The system integrator needs to implement the following APIs:

  • sysAllocBuffer() – a callout routine for allocating a data buffer from a global memory pool for use by the FIU.
  • sysFreeBuffer() – a callout routine for releasing a data buffer no longer in use by FIU.
  • sysGetSystemTime() – a callout routine for obtaining the current 32-bit system time in ms.
  • sysDebugInfo() – a callout routine for sending out the debug traces.
  • sysCriticalSectionBegin() – a callout routine that suspends the preemption of FIU processing (i.e. interrupts disabling).
  • sysCriticalSectionEnd() – a callout routine that re-enables the preemption of FIU processing (interrupts re-enabling).

Note that the supported external buffer size should be at least 22 words if an external global memory buffer pool is supported. If the global memory buffer pool is not supported, the function pointers for allocating and freeing the buffers should
be set to NULL and the buffer size should be set to 0.

The fmContext_t and fiuContext_t structures are defined in fm.h and fiu.h respectively.


FAXLIB: G3 fax relay switch-in

FAXLIB (Fax Library) Bundle » Fax Relay Implementation Guide

G3 fax relay switch-in

Request for Memory Requirements

The memory requirements for an instance of FM and FIU are obtained by calling the fmGetSizes() and fiuGetSizes() APIs respectively. The routines will return the number of required buffers and a memBuffer_t structure specifying the memory requirements of each buffer (i.e. size, alignment, memory type) for the modules. The memBuffer_t structure is defined in memmgm.h. The return value of the routines will indicate if there is any error.

Memory Allocation and Instance Creation

After obtaining the memory requirements, the system needs to allocate memory for the modules as specified in the memBuffer_t structure. Once the memory has been allocated statically or dynamically based on the requirements, the base address of each buffer in the memBuffer_t structure has to be initialized and the memory should not be used for any other purposes for the duration of the fax relay processing. An instance of FM and FIU is created by calling the fmNew() and fiuNew() APIs respectively with the proper memory buffer information and configuration. The return value of the routines will indicate if there is any error.

Instance Initializations

Before initiating fax relay processing, the instance of FM and FIU needs to be initialized by calling the fmOpen() and fiuOpen() APIs respectively with the proper configurations.

The following is a sample fmOpenConfig_t configuration:

        fmOpenConfig.debugLvl = fm_DBG_LVL_0;
        fmOpenConfig.tx_level = -10;
        fmOpenConfig.rx_cd_thr_set = 0;
        fmOpenConfig.fBufferData = FALSE;
        fmOpenConfig.maxBytesToBuffer = 0;
        fmOpenConfig.FMfeatureBitMap = 0;
        fmOpenConfig.ToneDetCtrl.ToneDetCtrl = sysToneDetCtrl;
        fmOpenConfig.ToneDetCtrl.TargetInst = sysInstPtr;
        fmOpenConfig.SendOutSpec.fmSendOut = fiuSendIn;
        fmOpenConfig.SendOutSpec.TargetInst = fiuInstPtr;
        fmOpenConfig.RxOutSpec.fmReceiveOut = sysRxPCMInterface;
        fmOpenConfig.RxOutSpec.TargetInst = sysInstPtr;
        fmOpenConfig.tablePtr = (fmTablePtrs_t  *)fmTablePtrs;

The system integrator needs to implement the following APIs:

  • sysToneDetCtrl() – a callout routine for enabling and disabling tone detection. Note that the tone detection utility is external to FM/FIU.
    The tones that need to be supported for detection are CNG (1100Hz) and CED (2100Hz).
  • sysRxPCMInterface() – a callout routine for passing samples of modulated signals towards the PCM interface.

fmOpenConfig.tablePtr is used to pass location of the tables to FM. fmTablesPtr should be initialized to point to the tables as shown as below:

        void * fmTablePtrs[] = {
            (void *) fm_TABLE1_START,
            (void *) fm_TABLE2_START,
            (void *) fm_TABLE3_START,
            (void *) fm_TABLE4_START,
            (void *) fm_TABLE5_START
        };

The following is a sample fiuOpenConfig_t configuration for T.38 UDP:

        fiuOpenConfig.frameSize = 10;
        fiuOpenConfig.MaxFaxRate = iffax_RATE_14400;
        fiuOpenConfig.dbgMode = fiu_DBG_OFF;
        fiuOpenConfig.RtpPayloadType = 0;
        fiuOpenConfig.RtpSyncSource = 0;
        fiuOpenConfig.HSPktPayloadSize = 20;
        fiuOpenConfig.LSPktPayloadSize = 1;
        fiuOpenConfig.LsDataRedundancy = 5;
        fiuOpenConfig.HsDataRedundancy = 1;
        fiuOpenConfig.TCFHandlingMethod = 2;
        fiuOpenConfig.T38Version = 0;
        fiuOpenConfig.faxNomDelay = 200;
        fiuOpenConfig.faxPacketSize = 0;
        fiuOpenConfig.NoActivityTimerVal = 20000;
        fiuOpenConfig.AAL2cid = 0;
        fiuOpenConfig.SendOutSpec.fiuSendOut = sysTxNetInterface;
        fiuOpenConfig.SendOutSpec.targetInst = sysInstPtr;
        fiuOpenConfig.ReceiveOutSpec.fiuReceiveOut = fmReceiveIn;
        fiuOpenConfig.ReceiveOutSpec.targetInst = fmInstPtr;
        fiuOpenConfig.EventHandlerSpec.fiuEventHandler = sysFaxEventHandler;
        fiuOpenConfig.EventHandlerSpec.targetInst = sysInstPtr;
        fiuOpenConfig.StartupTimer = 50000;
        fiuOpenConfig.faxNetCallTblPtr = faxNetCallTblPtr;
        fiuOpenConfig.NetProtocol = fiu_PT_T38_UDP;
        fiuOpenConfig.LocalTxNetTimeOutVal = 150000;
        fiuOpenConfig.EflagStartTimer = 2600;
        fiuOpenConfig.EflagStopTimer = 2300;
        fiuOpenConfig.T30FeatureSelector = fiu_T30FEATURE_ECM_DISABLE;
        fiuOpenConfig.FIUFeatureSelector = fiu_FEATURE_SLF_ENABLE |
                                           fiu_FEATURE_MDM_TRN_FAIL_COMP;
        fiuOpenConfig.NSFCountryCode = 0;
        fiuOpenConfig.NSFVendorCodeMSB = 0;
        fiuOpenConfig.NSFVendorCodeLSB = 0;

The system integrator needs to implement the following APIs:

  • sysTxNetInterface() – a callout routine for sending out the packets towards the network interface.
  • sysFaxEventHandler() – a callout routine for notifying the system about an event that requires actions. During G3 fax relay processing, there are two possible events: fiu_EVENT_CLEARDOWN and fiu_EVENT_G3_TO_V34 (if V.34 fax relay is supported). If the eventCode is fiu_EVENT_CLEARDOWN, the system is expected to switch out of the fax relay processing. If the eventCode is fiu_EVENT_G3_TO_V34, the system is expected to switch over to V.34 fax relay processing.

fiuOpenConfig.faxNetCallTblPtr is used to specify the pointer to the fax network module call tables. For example, if both T.38 and AAL2 protocols are supported, faxNetCallTblPtr should be initialized as shown below:

   fiuNetCallTbl_t *faxNetCallTblPtr[] = {
            &faxNetProtocolT38,
            &faxNetProtocolAal2,
            NULL
        };

Note that the table pointer must be a NULL-terminated list.

Initiation of G3 Fax Relay Processing

After opening the FM and FIU instances, only FM is active. FM is ready to process the PCM samples received via fmSendIn() and digital data received via fmReceiveIn(). However, FIU remains inactive. Any calls to fiuSendIn(), fiuReceiveIn() and fiuTask() will be returned without any processing. To initiate G3 fax relay processing, the system needs to call the fiuControl() API with fiu_ACTIVATE as the control code.


FAXLIB: G3 fax relay processing

FAXLIB (Fax Library) Bundle » Fax Relay Implementation Guide

G3 fax relay processing

Figure 2. G3 Fax Relay Data Processing Model

Since FM operates with 10ms frames, the fiuTask() API should be called followed by fmSendIn() on a 10ms task. On the PCM interface, the PCM linear samples received from the telephony are passed to FM for demodulation via fmSendIn(). The fmReceiveOut() callout routine is invoked for transmission of the modulated PCM samples towards the telephony interface whenever fmSendIn() is called. On the network interface, when packets are received from the network, they should be passed to FIU for processing via fiuReceiveIn(). The fiuSendOut() callout routine is invoked whenever there are packets to be transmitted towards the network interface.


FAXLIB: Call statistics

FAXLIB (Fax Library) Bundle » Fax Relay Implementation Guide

Call statistics

The call statistics regarding FM and FIU can be obtained by calling the fmStats() and fiuGetStats() APIs respectively.


FAXLIB: Real-Time Debug Tracing

FAXLIB (Fax Library) Bundle » Fax Relay Implementation Guide

Real-Time Debug Tracing

The debug traces from FM and FIU are sent out via the sysDebugInfo() callout routine. Depending on the debug level that is configured when opening the instances, different levels of debug information can be obtained. For debug level 0, only fatal errors are reported. For debug level 1, high-level protocol information and detected network anomalies in addition to fatal errors are reported. Debug level 2 is used for internal debugging purposes.


FAXLIB: G3 Fax Relay Switch-Out

FAXLIB (Fax Library) Bundle » Fax Relay Implementation Guide

G3 Fax Relay Switch-Out

To terminate fax relay processing and free up the memory, the FM and FIU instances are deleted by calling fmClose() and fiuClose() followed by fmDelete() and fiuDelete() respectively.


FAXLIB: File Index

FAXLIB File List

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


FAXLIB: doxygen.h File Reference

doxygen.h File Reference

Go to the source code of this file.


FAXLIB: Page Index

FAXLIB Related Pages

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


FAXLIB:

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.


FAXLIB: 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


FAXLIB: 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.


FIU: 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_fiu_Version__top__
#define | __extern extern
#define | ti_mas_fiu_Version___VERS 150
#define | ti_mas_fiu_Version_MAJOR (3)
#define | ti_mas_fiu_Version_MINOR (0)
#define | ti_mas_fiu_Version_XVERTICAL (0)
#define | ti_mas_fiu_Version_PATCH (1)
#define | ti_mas_fiu_Version_BUILD (2)
#define | ti_mas_fiu_Version_QUALITY (3)
#define | ti_mas_fiu_Version_BTYPE (0)
#define | ti_mas_fiu_Version_WIDTH (0)
#define | Version_MAJOR ti_mas_fiu_Version_MAJOR
#define | Version_MINOR ti_mas_fiu_Version_MINOR
#define | Version_XVERTICAL ti_mas_fiu_Version_XVERTICAL
#define | Version_PATCH ti_mas_fiu_Version_PATCH
#define | Version_BUILD ti_mas_fiu_Version_BUILD
#define | Version_QUALITY ti_mas_fiu_Version_QUALITY
#define | Version_BTYPE ti_mas_fiu_Version_BTYPE
#define | Version_WIDTH ti_mas_fiu_Version_WIDTH

Define Documentation

#define ti_mas_fiu_Version__top__

Definition at line 27 of file Version.h.

#define __extern extern

Definition at line 33 of file Version.h.

#define ti_mas_fiu_Version___VERS 150

Definition at line 36 of file Version.h.

#define ti_mas_fiu_Version_MAJOR (3)

Definition at line 50 of file Version.h.

#define ti_mas_fiu_Version_MINOR (0)

Definition at line 53 of file Version.h.

#define ti_mas_fiu_Version_XVERTICAL (0)

Definition at line 56 of file Version.h.

#define ti_mas_fiu_Version_PATCH (1)

Definition at line 59 of file Version.h.

#define ti_mas_fiu_Version_BUILD (2)

Definition at line 62 of file Version.h.

#define ti_mas_fiu_Version_QUALITY (3)

Definition at line 65 of file Version.h.

#define ti_mas_fiu_Version_BTYPE (0)

Definition at line 68 of file Version.h.

#define ti_mas_fiu_Version_WIDTH (0)

Definition at line 71 of file Version.h.

#define Version_MAJOR ti_mas_fiu_Version_MAJOR

Definition at line 90 of file Version.h.

#define Version_MINOR ti_mas_fiu_Version_MINOR

Definition at line 91 of file Version.h.

#define Version_XVERTICAL ti_mas_fiu_Version_XVERTICAL

Definition at line 92 of file Version.h.

#define Version_PATCH ti_mas_fiu_Version_PATCH

Definition at line 93 of file Version.h.

#define Version_BUILD ti_mas_fiu_Version_BUILD

Definition at line 94 of file Version.h.

#define Version_QUALITY ti_mas_fiu_Version_QUALITY

Definition at line 95 of file Version.h.

#define Version_BTYPE ti_mas_fiu_Version_BTYPE

Definition at line 96 of file Version.h.

#define Version_WIDTH ti_mas_fiu_Version_WIDTH

Definition at line 97 of file Version.h.


FIU: 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_fiu_Version__include
00023 #define ti_mas_fiu_Version__include
00024
00025 #ifndef __nested__
00026 #define __nested__
00027 #define ti_mas_fiu_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_fiu_Version___VERS 150
00037
00038
00039 /*
00040  * ======== INCLUDES ========
00041  */
00042
00043
00044
00045 /*
00046  * ======== AUXILIARY DEFINITIONS ========
00047  */
00048
00049 /* MAJOR */
00050 #define ti_mas_fiu_Version_MAJOR (3)
00051
00052 /* MINOR */
00053 #define ti_mas_fiu_Version_MINOR (0)
00054
00055 /* XVERTICAL */
00056 #define ti_mas_fiu_Version_XVERTICAL (0)
00057
00058 /* PATCH */
00059 #define ti_mas_fiu_Version_PATCH (1)
00060
00061 /* BUILD */
00062 #define ti_mas_fiu_Version_BUILD (2)
00063
00064 /* QUALITY */
00065 #define ti_mas_fiu_Version_QUALITY (3)
00066
00067 /* BTYPE */
00068 #define ti_mas_fiu_Version_BTYPE (0)
00069
00070 /* WIDTH */
00071 #define ti_mas_fiu_Version_WIDTH (0)
00072
00073 /*
00074  * ======== EPILOGUE ========
00075  */
00076
00077 #ifdef ti_mas_fiu_Version__top__
00078 #undef __nested__
00079 #endif
00080
00081 #endif /* ti_mas_fiu_Version__include */
00082
00083 /*
00084  * ======== PREFIX ALIASES ========
00085  */
00086
00087 #if !defined(__nested__) && !defined(ti_mas_fiu_Version__nolocalnames)
00088
00089 /* module prefix */
00090 #define Version_MAJOR      ti_mas_fiu_Version_MAJOR
00091 #define Version_MINOR      ti_mas_fiu_Version_MINOR
00092 #define Version_XVERTICAL  ti_mas_fiu_Version_XVERTICAL
00093 #define Version_PATCH      ti_mas_fiu_Version_PATCH
00094 #define Version_BUILD      ti_mas_fiu_Version_BUILD
00095 #define Version_QUALITY    ti_mas_fiu_Version_QUALITY
00096 #define Version_BTYPE      ti_mas_fiu_Version_BTYPE
00097 #define Version_WIDTH      ti_mas_fiu_Version_WIDTH
00098 #endif


FIU: Data Structures

  • Data Structures
  • Data Fields

FIU Data Structures

Here are the data structures with brief descriptions:
faxBuffer_t |
faxBufferAllocation_u |
faxBufferLinkedList_t |
faxBufferMgmt_t |
faxHSBuffer_t |
fiuContext_t | The FIU software module has a global context structure that contains non channel specific configuration information which is used by all active FIU instances. FIU Context is a structure that must be declared globally by system code, and initialized prior to any calls to the FIU API
fiuControlConfig_t | Control Configuration structure
fiuEventHandlerSpec_t | Specification of fiuEventHandlerSpec Object This structure contains the address of function and associated data structure for reporting events to the system for processing
fiuInst_s |
fiuNetCallTbl_t | FIU Protocol Call Table
fiuNewConfig_t | New Configuration structure
fiuNSFInfo_t | NSF Information data structure
fiuOpenConfig_t | Open Configuration structure
fiuReceiveOutSpec_t | Specification of fiuReceiveOutSpec Object
fiuRelocInstance_t | FIU Relocation structure
fiuSendOutSpec_t | Specification of fiuSendOutSpec Object This structure contains the address of function and associated data structure for sending FAX packets to the network
fiuSizeCfg_t | FIU Size Configuration structure
fiuStats_t | FIU Statistics Structure
FND_FRP_DATA_BUFFER_S |
FND_FRP_DATA_BYTE_S |
FND_FRP_FRAME_COMP_S |
FND_FRP_TONE_ON_LS_S |
FND_FRP_V34_PRI_RATE_S |
FND_FRP_V8_MSG_S |
FndFrpMsg_t |
FndFrpMsgBody_u |
FRP_FND_DATA_BUFFER_S |
FRP_FND_DATA_BYTE_S |
FRP_FND_FRAME_COMP_S |
FRP_FND_HS_RATE_S |
FRP_FND_HS_TRNG_DETECT_S |
FRP_FND_SLP_INFO_S |
FRP_FND_TONE_DETECT_S |
FRP_FND_V34_PRI_RATE_S |
FRP_FND_V8_MSG_S |
FrpFndHSTrngInfo_t |
FrpFndMsg_t |
FrpFndMsgBody_u |


FIU: C55x Data Sheet

C55x Data Sheet

Copyright 2010, Texas Instruments Incorporated


FIU: C64x+ Data Sheet

C64x+ Data Sheet

Copyright 2010, Texas Instruments Incorporated


FIU:

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.


FIU: doxygen.h File Reference

doxygen.h File Reference

Go to the source code of this file.


FIU: doxygen.h Source File

doxygen.h

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


FIU: faxport.h File Reference

faxport.h File Reference

#include <ti/mas/util/utl.h>

Include dependency graph for faxport.h:

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

Go to the source code of this file.

Data Structures

struct | faxHSBuffer_t
struct | faxBufferLinkedList_t
struct | faxBuffer_t
union | faxBufferAllocation_u

Defines

#define | _FAXPORT_C54 0
#define | _FAXPORT_C54_FAR 0
#define | _FAXPORT_C55 0
#define | _FAXPORT_C55L 0
#define | _FAXPORT_C64 0
#define | _FAXPORT_C64_BIG_ENDIAN 0
#define | _FAXPORT_C64P 0
#define | _FAXPORT_C64P_BIG_ENDIAN 0
#define | FAX_HS_BUFFER_SIZE_BYTES 40
#define | FAX_HS_BUFFER_SIZE_WORDS utlNbytes2NtwordsCeil(FAX_HS_BUFFER_SIZE_BYTES)
#define | FAX_BUFFER_LINK_LEN_WORDS (FAX_HS_BUFFER_SIZE_WORDS - sizeof(tword*))
#define | FAX_BUFFER_LINK_LEN_BYTES utlNtwords2Nbytes(FAX_BUFFER_LINK_LEN_WORDS)
#define | FAX_BUFFER_LEN_WORDS (FAX_HS_BUFFER_SIZE_WORDS - sizeof(tint))
#define | FAX_BUFFER_LEN_BYTES utlNtwords2Nbytes(FAX_BUFFER_LEN_WORDS)

Define Documentation

#define _FAXPORT_C54 0

Definition at line 18 of file faxport.h.

#define _FAXPORT_C54_FAR 0

Definition at line 24 of file faxport.h.

#define _FAXPORT_C55 0

Definition at line 30 of file faxport.h.

#define _FAXPORT_C55L 0

Definition at line 36 of file faxport.h.

#define _FAXPORT_C64 0

Definition at line 42 of file faxport.h.

#define _FAXPORT_C64_BIG_ENDIAN 0

Definition at line 48 of file faxport.h.

#define _FAXPORT_C64P 0

Definition at line 54 of file faxport.h.

#define _FAXPORT_C64P_BIG_ENDIAN 0

Definition at line 60 of file faxport.h.

#define FAX_HS_BUFFER_SIZE_BYTES 40

Definition at line 95 of file faxport.h.

#define FAX_HS_BUFFER_SIZE_WORDS utlNbytes2NtwordsCeil(FAX_HS_BUFFER_SIZE_BYTES)

Definition at line 96 of file faxport.h.

Referenced by fiuOpen().

#define FAX_BUFFER_LINK_LEN_WORDS (FAX_HS_BUFFER_SIZE_WORDS - sizeof(tword*))

Definition at line 108 of file faxport.h.

#define FAX_BUFFER_LINK_LEN_BYTES utlNtwords2Nbytes(FAX_BUFFER_LINK_LEN_WORDS)

Definition at line 109 of file faxport.h.

#define FAX_BUFFER_LEN_WORDS (FAX_HS_BUFFER_SIZE_WORDS - sizeof(tint))

Definition at line 118 of file faxport.h.

#define FAX_BUFFER_LEN_BYTES utlNtwords2Nbytes(FAX_BUFFER_LEN_WORDS)

Definition at line 119 of file faxport.h.


FIU: faxport.h Source File

faxport.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: To include the header file specific to platforms for FIU.
00003  ******************************************************************************
00004  * FILE NAME:   faxport.h
00005  *
00006  * DESCRIPTION: Based on compiler switch, include platform specific header file.
00007  *
00008  * (C) Copyright 2006, Texas Instruments, Inc.
00009  *****************************************************************************/
00010 #include <ti/mas/util/utl.h>
00011
00012 #ifndef _FAXPORT_H
00013 #define _FAXPORT_H
00014
00015 #ifdef ti_targets_C54
00016 #define _FAXPORT_C54 1
00017 #else
00018 #define _FAXPORT_C54 0
00019 #endif
00020
00021 #ifdef ti_targets_C54_far
00022 #define _FAXPORT_C54_FAR 1
00023 #else
00024 #define _FAXPORT_C54_FAR 0
00025 #endif
00026
00027 #ifdef ti_targets_C55
00028 #define _FAXPORT_C55 1
00029 #else
00030 #define _FAXPORT_C55 0
00031 #endif
00032
00033 #ifdef ti_targets_C55_large
00034 #define _FAXPORT_C55L 1
00035 #else
00036 #define _FAXPORT_C55L 0
00037 #endif
00038
00039 #ifdef ti_targets_C64
00040 #define _FAXPORT_C64 1
00041 #else
00042 #define _FAXPORT_C64 0
00043 #endif
00044
00045 #ifdef ti_targets_C64_big_endian
00046 #define _FAXPORT_C64_BIG_ENDIAN 1
00047 #else
00048 #define _FAXPORT_C64_BIG_ENDIAN 0
00049 #endif
00050
00051 #ifdef ti_targets_C64P
00052 #define _FAXPORT_C64P 1
00053 #else
00054 #define _FAXPORT_C64P 0
00055 #endif
00056
00057 #ifdef ti_targets_C64P_big_endian
00058 #define _FAXPORT_C64P_BIG_ENDIAN 1
00059 #else
00060 #define _FAXPORT_C64P_BIG_ENDIAN 0
00061 #endif
00062
00063 #if _FAXPORT_C54
00064 #include <ti/mas/fiu/src/c54/faxport.h>
00065 #elif _FAXPORT_C54_FAR
00066 #include <ti/mas/fiu/src/c54/faxport.h>
00067 #elif _FAXPORT_C55
00068 #include <ti/mas/fiu/src/c55/faxport.h>
00069 #elif _FAXPORT_C55L
00070 #include <ti/mas/fiu/src/c55/faxport.h>
00071 #elif _FAXPORT_C64
00072 #include <ti/mas/fiu/src/c64/faxport.h>
00073 #elif _FAXPORT_C64_BIG_ENDIAN
00074 #include <ti/mas/fiu/src/c64/faxport.h>
00075 #elif _FAXPORT_C64P
00076 #include <ti/mas/fiu/src/c64/faxport.h>
00077 #elif _FAXPORT_C64P_BIG_ENDIAN
00078 #include <ti/mas/fiu/src/c64/faxport.h>
00079 #else
00080 #error invalid target
00081 #endif
00082
00083 /******************************************************************************
00084  * DATA DEFINITION:  High-speed buffer memory management data structure
00085  ******************************************************************************
00086  * DESCRIPTION:  Defines the data structure for high-speed buffer management.
00087  *               The fax software implements a memory pool of fixed sized
00088  *               buffers which used as a means for transporting various data
00089  *               through the fax processing (network packets, image data, ...).
00090  *
00091  * NOTE:
00092  *****************************************************************************/
00093
00094 /* The fundamental size (in bytes) of the high-speed buffer memory segments is 40 bytes */
00095 #define FAX_HS_BUFFER_SIZE_BYTES      40
00096 #define FAX_HS_BUFFER_SIZE_WORDS      utlNbytes2NtwordsCeil(FAX_HS_BUFFER_SIZE_BYTES)
00097
00098 /* Structure definition of a unformatted memory segment */
00099 typedef struct {
00100   tword DataElement[FAX_HS_BUFFER_SIZE_WORDS];
00101 } faxHSBuffer_t;
00102
00103
00104 /* Structure definition of a memory buffer segment when used in a linked list.
00105    A link list of buffers is typically used when the data to store exceeds the
00106    size of a single buffer.  The format includes a payload and pointer to the
00107    next buffer */
00108 #define FAX_BUFFER_LINK_LEN_WORDS  (FAX_HS_BUFFER_SIZE_WORDS - sizeof(tword*))
00109 #define FAX_BUFFER_LINK_LEN_BYTES  utlNtwords2Nbytes(FAX_BUFFER_LINK_LEN_WORDS)
00110
00111 typedef struct {
00112   tword payload[FAX_BUFFER_LINK_LEN_WORDS];
00113   tword *next;
00114 } faxBufferLinkedList_t;
00115
00116 /* Structure definition of a memory buffer segment when used to store a single
00117    data payload.  This format includes a paylaod and a size. */
00118 #define FAX_BUFFER_LEN_WORDS  (FAX_HS_BUFFER_SIZE_WORDS - sizeof(tint))
00119 #define FAX_BUFFER_LEN_BYTES  utlNtwords2Nbytes(FAX_BUFFER_LEN_WORDS)
00120
00121 typedef struct {
00122   tword sizeBytes;
00123   tword payload[FAX_BUFFER_LEN_WORDS];
00124 } faxBuffer_t;
00125
00126 /* The memory buffer element is defined as a union of the defined structures */
00127 typedef union {
00128   faxHSBuffer_t         faxHSBuffer;
00129   faxBufferLinkedList_t faxBufferLinkedList;
00130   faxBuffer_t           faxBuffer;
00131 } faxBufferAllocation_u;
00132 #endif /* _FAXPORT_H */
00133
00134 /* nothing past this point */


FIU: faxprag.h File Reference

faxprag.h File Reference

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

Go to the source code of this file.

Defines

#define | _FAXPRAG_C54 0
#define | _FAXPRAG_C54_FAR 0
#define | _FAXPRAG_C55 0
#define | _FAXPRAG_C55L 0
#define | _FAXPRAG_C64 0
#define | _FAXPRAG_C64_BIG_ENDIAN 0
#define | _FAXPRAG_C64P 0
#define | _FAXPRAG_C64P_BIG_ENDIAN 0

Define Documentation

#define _FAXPRAG_C54 0

Definition at line 17 of file faxprag.h.

#define _FAXPRAG_C54_FAR 0

Definition at line 23 of file faxprag.h.

#define _FAXPRAG_C55 0

Definition at line 29 of file faxprag.h.

#define _FAXPRAG_C55L 0

Definition at line 35 of file faxprag.h.

#define _FAXPRAG_C64 0

Definition at line 41 of file faxprag.h.

#define _FAXPRAG_C64_BIG_ENDIAN 0

Definition at line 47 of file faxprag.h.

#define _FAXPRAG_C64P 0

Definition at line 53 of file faxprag.h.

#define _FAXPRAG_C64P_BIG_ENDIAN 0

Definition at line 59 of file faxprag.h.


FIU: faxprag.h Source File

faxprag.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: To include the header file specific to platforms for FIU.
00003  ******************************************************************************
00004  * FILE NAME:   faxprag.h
00005  *
00006  * DESCRIPTION: Based on compiler switch, include platform specific header file.
00007  *
00008  * (C) Copyright 2006, Texas Instruments, Inc.
00009  *****************************************************************************/
00010
00011 #ifndef _FAXPRAG_H
00012 #define _FAXPRAG_H
00013
00014 #ifdef ti_targets_C54
00015 #define _FAXPRAG_C54 1
00016 #else
00017 #define _FAXPRAG_C54 0
00018 #endif
00019
00020 #ifdef ti_targets_C54_far
00021 #define _FAXPRAG_C54_FAR 1
00022 #else
00023 #define _FAXPRAG_C54_FAR 0
00024 #endif
00025
00026 #ifdef ti_targets_C55
00027 #define _FAXPRAG_C55 1
00028 #else
00029 #define _FAXPRAG_C55 0
00030 #endif
00031
00032 #ifdef ti_targets_C55_large
00033 #define _FAXPRAG_C55L 1
00034 #else
00035 #define _FAXPRAG_C55L 0
00036 #endif
00037
00038 #ifdef ti_targets_C64
00039 #define _FAXPRAG_C64 1
00040 #else
00041 #define _FAXPRAG_C64 0
00042 #endif
00043
00044 #ifdef ti_targets_C64_big_endian
00045 #define _FAXPRAG_C64_BIG_ENDIAN 1
00046 #else
00047 #define _FAXPRAG_C64_BIG_ENDIAN 0
00048 #endif
00049
00050 #ifdef ti_targets_C64P
00051 #define _FAXPRAG_C64P 1
00052 #else
00053 #define _FAXPRAG_C64P 0
00054 #endif
00055
00056 #ifdef ti_targets_C64P_big_endian
00057 #define _FAXPRAG_C64P_BIG_ENDIAN 1
00058 #else
00059 #define _FAXPRAG_C64P_BIG_ENDIAN 0
00060 #endif
00061
00062 #if (_FAXPRAG_C54_FAR || _FAXPRAG_C54)
00063 #include <ti/mas/fiu/src/c54/faxprag.h>
00064 #elif (_FAXPRAG_C55 || _FAXPRAG_C55L)
00065 #include <ti/mas/fiu/src/c55/faxprag.h>
00066 #elif (_FAXPRAG_C64 || _FAXPRAG_C64_BIG_ENDIAN || _FAXPRAG_C64P || _FAXPRAG_C64P_BIG_ENDIAN)
00067 #include <ti/mas/fiu/src/c64/faxprag.h>
00068 #else
00069 #error invalid target
00070 #endif
00071
00072 #endif /* _FAXPRAG_H */
00073
00074 /* nothing past this point */


FIU: faxutil.c File Reference

faxutil.c File Reference

#include <string.h>
#include <ti/mas/types/types.h>
#include "faxutil.h"
#include "fiuloc.h"
#include <ti/mas/fiu/src/faxprag.h>
#include <ti/mas/fiu/fiu.h>

Include dependency graph for faxutil.c:

Go to the source code of this file.

Functions

tword | faxBitReverse (tword byte)
tint | fax_timestamp16_compare (tuint a, tuint b)
tint | fax_timestamp32_compare (tulong a, tulong b)
void | faxBufferMgmtInit (faxBufferMgmt_t *BufferMgmt)
void | faxBufferAdd (void *fiuInst, tword *memBlock, tuint memBlockSizeWords)
void | faxOverlayBufInit (void *fiuInst)
tbool | faxBufferAlloc (void *fiuInst, tword **pbuffer)
void | faxBufferFree (void *fiuInst, tword *pbuffer)
tulong | faxSystemTime (void)
void | faxResetStats (void *fiuInst)
void | faxException (void *fiuInst, fiuExceptionCodes_e code)
void | faxDebugTrace (void *pmodule, tuint infoLevel, tuint msgID, tuint msgData)
void | faxCriticalSectionBegin (void)
void | faxCriticalSectionEnd (void)

Variables

fiuContext_t fiuContext

Function Documentation

tword faxBitReverse ( tword byte )

Definition at line 53 of file faxutil.c.

tint fax_timestamp16_compare | ( | tuint | a,
 |  | tuint | b
 | ) |  |

Definition at line 91 of file faxutil.c.

tint fax_timestamp32_compare | ( | tulong | a,
 |  | tulong | b
 | ) |  |

Definition at line 177 of file faxutil.c.

void faxBufferMgmtInit ( faxBufferMgmt_t * BufferMgmt )

Definition at line 253 of file faxutil.c.

References faxBufferMgmt_t::currentUsage, faxBufferAllocation_u::faxBufferLinkedList, faxBufferMgmt_t::HSNotAvailCtr, faxBufferMgmt_t::maxUsage, faxBufferLinkedList_t::next, faxBufferMgmt_t::nextFree, faxBufferMgmt_t::poolSizeWords, and faxBufferMgmt_t::pPool.

Referenced by fiuOpen().

void faxBufferAdd | ( | void * | fiuInst,
 |  | tword * | memBlock,
 |  | tuint | memBlockSizeWords
 | ) |  |

Definition at line 286 of file faxutil.c.

References fiuInst_s::BufferMgmt, faxBufferAllocation_u::faxBufferLinkedList, faxCriticalSectionBegin(), faxCriticalSectionEnd(), faxBufferLinkedList_t::next, and faxBufferMgmt_t::nextFree.

Referenced by faxOverlayBufInit().

Here is the call graph for this function:

void faxOverlayBufInit ( void * fiuInst )

Definition at line 317 of file faxutil.c.

References faxBufferAdd(), faxDebugTrace(), fiuInst_s::fOverlayBufInit, fiuInst_s::overlayBuf, TRC_DBG_LVL_2, and TRC_FRP_BUF_POOL_OVERLAY_INIT.

Here is the call graph for this function:

tbool faxBufferAlloc | ( | void * | fiuInst,
 |  | tword ** | pbuffer
 | ) |  |

Definition at line 354 of file faxutil.c.

References fiuContext_t::allocBuffer, fiuInst_s::BufferMgmt, faxBufferMgmt_t::currentUsage, fiuContext, faxBufferMgmt_t::HSNotAvailCtr, fiuInst_s::ID, faxBufferMgmt_t::maxUsage, faxBufferLinkedList_t::next, faxBufferMgmt_t::nextFree, and fiuContext_t::SupportedExternalBuffSize.

void faxBufferFree | ( | void * | fiuInst,
 |  | tword * | pbuffer
 | ) |  |

Definition at line 418 of file faxutil.c.

References fiuInst_s::BufferMgmt, faxBufferMgmt_t::currentUsage, fiu_exc_assert, fiuContext, fiuContext_t::freeBuffer, fiuInst_s::ID, faxBufferLinkedList_t::next, faxBufferMgmt_t::nextFree, fiuInst_s::overlayBuf, fiuInst_s::overlayBufSizeWords, faxBufferMgmt_t::poolSizeWords, faxBufferMgmt_t::pPool, fiuContext_t::SupportedExternalBuffSize, and TRC_FIU_BUFF_FREE_ERROR.

tulong faxSystemTime ( void )

Definition at line 465 of file faxutil.c.

References fiuContext_t::faxSystemTime, and fiuContext.

void faxResetStats ( void * fiuInst )

Definition at line 480 of file faxutil.c.

References fiuStats_t::Direction, fiuStats_t::ECMused, fiuInst_s::faxStats, fiu_DIR_UNKNOWN, fiu_NSF_CC_UNKNOWN, fiu_NSF_MC_UNKNOWN, fiuStats_t::HSmodulation, fiuNSFInfo_t::NSFCountryCode, fiuStats_t::NSFInfo, and fiuNSFInfo_t::NSFManufacturer.

Referenced by fiuGetStats(), and fiuOpen().

void faxException | ( | void * | fiuInst,
 |  | fiuExceptionCodes_e | code
 | ) |  |

Definition at line 502 of file faxutil.c.

References fiuContext_t::faxDebugTrace, fiu_DBG_FATAL_ERROR, fiuContext, and fiuInst_s::ID.

void faxDebugTrace | ( | void * | pmodule,
 |  | tuint | infoLevel,
 |  | tuint | msgID,
 |  | tuint | msgData
 | ) |  |

Definition at line 526 of file faxutil.c.

References fiuContext_t::faxDebugTrace, fiuContext_t::faxSystemTime, fiu_DBG_INFORMATIONAL, fiuContext, and fiuInst_s::ID.

Referenced by faxOverlayBufInit(), fiuClose(), fiuFaxEventHandler(), and fiuOpen().

void faxCriticalSectionBegin ( void )

Definition at line 564 of file faxutil.c.

References fiuContext_t::faxCriticalSectionBegin, and fiuContext.

Referenced by faxBufferAdd().

void faxCriticalSectionEnd ( void )

Definition at line 581 of file faxutil.c.

References fiuContext_t::faxCriticalSectionEnd, and fiuContext.

Referenced by faxBufferAdd().

Variable Documentation

fiuContext_t fiuContext


FIU: faxutil.c Source File

faxutil.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: Common utilities shared by FAX modules
00003  ******************************************************************************
00004  * FILE NAME: faxutil.c
00005  *
00006  * DESCRIPTION:
00007  *
00008  * FUNCTION               DESCRIPTION
00009  * ========               ===========
00010  * faxBitRevTable[]       Bit reversal Table.
00011  *
00012  * TABS: NONE
00013  *
00014  * $Id: faxutil.c 1.2 1999/03/12 10:18:04 ffruth Exp $
00015  *
00016  * REVISION HISTORY:
00017  *
00018  * $Log: faxutil.c $
00019  * Revision 1.2  1999/03/12 10:18:04  ffruth
00020  * - Merged in changes from version 1.1.1.1.
00021  * Revision 1.1.1.1  1998/12/09 14:12:04  ffruth
00022  * - Begin 5.1 optimaizations and clean-up.
00023  * Revision 1.1  1998/08/04 15:03:03  ffruth
00024  * Initial revision
00025  *
00026  * DATE         Programmer      Description
00027  * ====         ==========      ===========
00028  * 03-Aug-98    F. Fruth        Created.
00029  * 09-Dec-98    F. Fruth        Modified type to word.
00030  * 11-Jul-00    J. Wright       Added generic 16 and 32 bit compare functions
00031  *
00032  * (C) Copyright 1998, 1999, 2000 TELOGY Networks, Inc.
00033  *****************************************************************************/
00034 #include <string.h>
00035
00036 /* System level header files */
00037 #include <ti/mas/types/types.h>
00038 #include "faxutil.h"
00039 #include "fiuloc.h"
00040
00041 /* FIU include files */
00042 #include <ti/mas/fiu/src/faxprag.h>
00043 #include <ti/mas/fiu/fiu.h>
00044
00045 extern fiuContext_t fiuContext;
00046
00047 /****************************************************************************
00048  * FUNCTION PURPOSE:   Bit reverse one byte of data
00049  ****************************************************************************
00050  * DESCRIPTION:   This function bit reverses a single byte of data
00051  *
00052  ***************************************************************************/
00053 tword faxBitReverse (tword byte)
00054 {
00055   tuint i, j;
00056   tword temp_data;
00057
00058   for (i = temp_data = 0, j = 7; i < 8; i++,j--)
00059   {
00060     temp_data |= ((byte >> i) & 1) << j;
00061   }
00062
00063   return (temp_data);
00064 }
00065
00066 /******************************************************************************
00067  * FUNCTION PURPOSE: Compare two 16-bit timestamps
00068  ******************************************************************************
00069  * DESCRIPTION: Returns a value indicating the relationship between two
00070  *              timestamps "a" and "b".
00071  *
00072  * tint fax_timestamp16_compare (a, b)
00073  *
00074  * Return values:
00075  *
00076  *  -1 if a is earlier in time than b (eg. a = 3:00 p.m., b = 5:00 p.m.)
00077  *  0  if a = b
00078  *  1  if a is later in time than b (eg. a = 9:00 p.m., b = 8:00 p.m.)
00079  *
00080  * HOW IT WORKS:
00081  *
00082  * The timestamp is a 16-bit unsigned value which rolls over at 0xffff.
00083  * We basically assume that no two times will ever be greater than 0x7fff
00084  * apart.  We start by subtracting the the larger of the two from the smaller
00085  * of the two.  Let's assume, for example, that the unsigned integer value
00086  * of a is > that of b.  If (a - b) > 0x7fff then we assume that b is later
00087  * in time than a (the timestamp counter rolled over between a and b). If
00088  * (a - b) <= 0x7fff then we assume that a is later in time than b.
00089  *
00090  ******************************************************************************/
00091 tint fax_timestamp16_compare (tuint a, tuint b)
00092 {
00093   if  (a == b)
00094   {
00095     /* Timestamps are equal */
00096     return (0);
00097   }
00098
00099   if  (a > b)
00100   {
00101     if  ((a - b) > 0x7fff)
00102     {
00103       /**********************************
00104       *
00105       * B is later than A (A is earlier than B)
00106       * (B's timestamp has wrapped around)
00107       *
00108       **********************************/
00109
00110       return (-1);
00111     }
00112     else
00113     {
00114       /**********************************
00115       *
00116       * A is later than B
00117       * (neither timestamp has wrapped around)
00118       *
00119       **********************************/
00120
00121       return (1);
00122     }
00123   }
00124   else
00125   {
00126     if  ((b - a) > 0x7fff)
00127     {
00128       /**********************************
00129       *
00130       * A is later than B
00131       * (A's timestamp has wrapped around)
00132       *
00133       **********************************/
00134
00135       return (1);
00136     }
00137     else
00138     {
00139       /**********************************
00140       *
00141       * B is later than A (A is earlier than B)
00142       * (neither timestamp has wrapped around)
00143       *
00144       **********************************/
00145
00146       return (-1);
00147     }
00148   }
00149
00150 }  /* fax_timestamp16_compare() */
00151
00152 /******************************************************************************
00153  * FUNCTION PURPOSE: Compare two 32-bit timestamps
00154  ******************************************************************************
00155  * DESCRIPTION: Returns a value indicating the relationship between two
00156  *              timestamps "a" and "b".
00157  *
00158  * tint fax_timestamp32_compare (a, b)
00159  *
00160  * Return values:
00161  *
00162  *  -1 if a is earlier in time than b (eg. a = 3:00 p.m., b = 5:00 p.m.)
00163  *  0  if a = b
00164  *  1  if a is later in time than b (eg. a = 9:00 p.m., b = 8:00 p.m.)
00165  *
00166  * HOW IT WORKS:
00167  *
00168  * The timestamp is a 32-bit unsigned value which rolls over at 0xffffffff.
00169  * We basically assume that no two times will ever be greater than 0x7fffffff
00170  * apart.  We start by subtracting the the larger of the two from the smaller
00171  * of the two.  Let's assume, for example, that the unsigned integer value
00172  * of a is > that of b.  If (a - b) > 0x7fffffff then we assume that b is later
00173  * in time than a (the timestamp counter rolled over between a and b). If
00174  * (a - b) <= 0x7fffffff then we assume that a is later in time than b.
00175  *
00176  ******************************************************************************/
00177 tint fax_timestamp32_compare (tulong a, tulong b)
00178 {
00179   if  (a == b)
00180   {
00181     /* Timestamps are equal */
00182     return (0);
00183   }
00184
00185   if  (a > b)
00186   {
00187     if  ((a - b) > (0x7fffffffL))
00188     {
00189       /**********************************
00190       *
00191       * B is later than A (A is earlier than B)
00192       * (B's timestamp has wrapped around)
00193       *
00194       **********************************/
00195
00196       return (-1);
00197     }
00198     else
00199     {
00200       /**********************************
00201       *
00202       * A is later than B
00203       * (neither timestamp has wrapped around)
00204       *
00205       **********************************/
00206
00207       return (1);
00208     }
00209   }
00210   else
00211   {
00212     if  ((b - a) > (0x7fffffffL))
00213     {
00214       /**********************************
00215       *
00216       * A is later than B
00217       * (A's timestamp has wrapped around)
00218       *
00219       **********************************/
00220
00221       return (1);
00222     }
00223     else
00224     {
00225       /**********************************
00226       *
00227       * B is later than A (A is earlier than B)
00228       * (neither timestamp has wrapped around)
00229       *
00230       **********************************/
00231
00232       return (-1);
00233     }
00234   }
00235
00236 }  /* fax_timestamp32_compare() */
00237
00238 /******************************************************************************
00239  * FUNCTION PURPOSE: Initialize high-speed buffer memory management
00240  ******************************************************************************
00241  * DESCRIPTION: Initialize high-speed buffer memory manager.  The high-speed
00242  *              buffers are maintained as a linked list.  Each non-allocated
00243  *              buffer has a pointer to the next free buffer. The instance
00244  *              variable fiuInst->BufferMgmt.nextFree points to the next free
00245  *              buffer. The final element in the free linked list points to
00246  *              NULL.
00247  *
00248  * PROTOTYPE:
00249  *    void faxBufferMgmtInit (
00250  *       faxBufferMgmt_t *BufferMgmt) - a pointer to buffer management structure
00251  *
00252  *****************************************************************************/
00253 void faxBufferMgmtInit (faxBufferMgmt_t *BufferMgmt)
00254 {
00255    faxBufferAllocation_u *p_pool_curr, *p_pool_next;
00256    tword * end_ptr;
00257
00258    p_pool_curr = (faxBufferAllocation_u *) BufferMgmt->pPool;
00259    p_pool_next = p_pool_curr;
00260    p_pool_next ++;
00261
00262    end_ptr = ADD_MEMORY_OFFSET(BufferMgmt->pPool,
00263                               (BufferMgmt->poolSizeWords - sizeof(faxBufferAllocation_u)));
00264
00265    /*  The next free pointer is initialized to the first buffer */
00266    BufferMgmt->nextFree = (tword *) p_pool_curr;
00267
00268    /* A linked list of high-speed buffers is created */
00269    while (MEMORY_COMPARE((tword *) p_pool_next, end_ptr))
00270    {
00271       (p_pool_curr++)->faxBufferLinkedList.next = (tword *) (p_pool_next)++;
00272    }
00273
00274    /* The last buffer is given a NULL pointer to indicate the end of the
00275       linked list */
00276    p_pool_curr->faxBufferLinkedList.next = NULL;
00277
00278    /* Initialize statistics */
00279    BufferMgmt->currentUsage  = 0;
00280    BufferMgmt->maxUsage      = 0;
00281    BufferMgmt->HSNotAvailCtr = 0;
00282
00283 } /* faxBufferMgmtInit () */
00284
00285 #ifndef NO_TONESUPP
00286 void faxBufferAdd (void *fiuInst, tword *memBlock, tuint memBlockSizeWords)
00287 {
00288    fiuInst_t *inst = (fiuInst_t *)fiuInst;
00289    faxBufferAllocation_u *p_pool_curr, *p_pool_next;
00290    tword *end_ptr;
00291
00292    p_pool_curr = (faxBufferAllocation_u *) memBlock;
00293    p_pool_next = p_pool_curr;
00294    p_pool_next++;
00295
00296    end_ptr = ADD_MEMORY_OFFSET(memBlock, (memBlockSizeWords - sizeof(faxBufferAllocation_u)));
00297
00298    /* A linked list of buffers is created */
00299    while (MEMORY_COMPARE((tword *) p_pool_next, end_ptr))
00300    {
00301       (p_pool_curr++)->faxBufferLinkedList.next = (tword *) (p_pool_next)++;
00302    }
00303
00304    faxCriticalSectionBegin();
00305
00306    /* The last buffer of this memory block is tied to the beginning of the
00307       existing linked list */
00308    p_pool_curr->faxBufferLinkedList.next = inst->BufferMgmt.nextFree;
00309
00310    /*  The next free pointer is set to the beginning of this memory block */
00311    inst->BufferMgmt.nextFree = memBlock;
00312
00313    faxCriticalSectionEnd();
00314
00315 } /* faxBufferAdd () */
00316
00317 void faxOverlayBufInit (void *fiuInst)
00318 {
00319    fiuInst_t *inst = (fiuInst_t *)fiuInst;
00320
00321    if (inst->fOverlayBufInit)
00322    {
00323       faxBufferAdd (inst, inst->overlayBuf, inst->overlayBufSizeWords);
00324
00325       faxDebugTrace (inst, TRC_DBG_LVL_2, TRC_FRP_BUF_POOL_OVERLAY_INIT,
00326                      inst->overlayBufSizeWords);
00327
00328       inst->fOverlayBufInit = FALSE;
00329    }
00330
00331 } /* faxOverlayBufInit () */
00332 #endif /* NO_TONESUPP */
00333
00334 /******************************************************************************
00335  * FUNCTION PURPOSE: Allocate a fax buffer from the resource pool (linked list)
00336  ******************************************************************************
00337  * DESCRIPTION: Allocates a high-speed buffer.  The buffer address contained in
00338  *              nextFree is allocated to the calling routine.  nextFree is
00339  *              updated to the next free high-speed buffer in the link list.
00340  *              If nextFree contains NULL, then no more buffers are available.
00341  *
00342  *              Critical Sections must be used by the caller.
00343  *
00344  * PROTOTYPE:
00345  *    tbool faxBufferAlloc (
00346  *       void *fiuInst,   - pointer to FIU instance structure
00347  *       tword **pbuffer) - address of location to store allocated buffer address
00348  *
00349  * RETURN VALUES:
00350  *            TRUE  - Buffer allocated
00351  *            FALSE - No high-speed buffers available
00352  *
00353  *****************************************************************************/
00354 tbool faxBufferAlloc (void *fiuInst, tword **pbuffer)
00355 {
00356    faxBufferLinkedList_t *temp;
00357    fiuInst_t *inst  = (fiuInst_t *) fiuInst;
00358    tword *tmp_buffer = NULL;
00359    tbool allocFlag  = FALSE;
00360
00361    if (inst->BufferMgmt.nextFree == NULL)
00362    /* No more FIU-owned buffers, so try allocating from GMP */
00363    {
00364       /* Check for GMP support */
00365       if(fiuContext.SupportedExternalBuffSize)
00366       {
00367         /* Try to get a buffer from GMP; if successful, use it */
00368         tmp_buffer = fiuContext.allocBuffer (inst->ID);
00369         if (tmp_buffer != NULL)
00370         {
00371           *pbuffer  = tmp_buffer;
00372           allocFlag = TRUE;
00373         }
00374       }
00375    }
00376
00377    else
00378    /* Allocate from internal FIU buffer pool */
00379    {
00380       temp = (faxBufferLinkedList_t *) inst->BufferMgmt.nextFree;
00381       *pbuffer = (tword *) temp;
00382       inst->BufferMgmt.nextFree = temp->next;
00383       allocFlag = TRUE;
00384    }
00385
00386    if (allocFlag)
00387    {
00388      /* Successfully allocated */
00389      if (++inst->BufferMgmt.currentUsage > inst->BufferMgmt.maxUsage)
00390         inst->BufferMgmt.maxUsage = inst->BufferMgmt.currentUsage;
00391    }
00392    else
00393    {
00394       inst->BufferMgmt.HSNotAvailCtr++;
00395    }
00396
00397    return allocFlag;
00398
00399 } /* faxBufferAlloc () */
00400
00401 /******************************************************************************
00402  * FUNCTION PURPOSE: Free a fax buffer and reinsert it into the linked list
00403  ******************************************************************************
00404  * DESCRIPTION: The caller provides the address of the buffer to be freed.
00405  *              The buffer is added to the linked list.  The algorithm simply
00406  *              involves placing the current value of nextFree in the freed
00407  *              buffer, and setting the value of nextFree to point to the
00408  *              freed buffer.
00409  *
00410  *              Critical sections must be used by the caller in order to prevent
00411  *              pre-emption.
00412  *
00413  * void faxBufferFree (
00414  *    faxBufferMgmt_t   *fiuInst,     - pointer to FIU instance structure
00415  *    tword             *pbuffer)     - pointer to the buffer to be freed
00416  *
00417  *****************************************************************************/
00418 void faxBufferFree (void *fiuInst, tword *pbuffer)
00419 {
00420    fiuInst_t *inst = (fiuInst_t *) fiuInst;
00421    tbool deallocFlag = FALSE;
00422    faxBufferLinkedList_t *temp = (faxBufferLinkedList_t *) pbuffer;
00423
00424    /* Check if the buffer being freed is FIU's or not */
00425    if (((pbuffer >= inst->BufferMgmt.pPool) &&
00426         (pbuffer <= ((inst->BufferMgmt.pPool + inst->BufferMgmt.poolSizeWords)
00427          - sizeof(faxBufferAllocation_u)))) ||
00428        ((inst->overlayBufSizeWords != 0) && (pbuffer >= inst->overlayBuf) &&
00429         (pbuffer <= ((inst->overlayBuf + inst->overlayBufSizeWords)
00430          - sizeof(faxBufferAllocation_u)))))
00431    {
00432       /* Free the FIU buffer */
00433       temp->next = inst->BufferMgmt.nextFree;
00434       inst->BufferMgmt.nextFree = pbuffer;
00435       deallocFlag = TRUE;
00436    }
00437
00438    else
00439    /* Attempt to free the buffer from GMP */
00440    {
00441       if(fiuContext.SupportedExternalBuffSize)
00442       {
00443         deallocFlag = fiuContext.freeBuffer (inst->ID, pbuffer);
00444       }
00445    }
00446
00447    fiu_exc_assert (deallocFlag == TRUE, inst, TRC_FIU_BUFF_FREE_ERROR);
00448
00449    if (deallocFlag)
00450       inst->BufferMgmt.currentUsage--;
00451
00452 } /* faxBufferFree () */
00453
00454 /******************************************************************************
00455  * FUNCTION PURPOSE: Returns the 32-bit system time
00456  ******************************************************************************
00457  * DESCRIPTION:
00458  *
00459  * tulong faxSystemTime (void)
00460  *
00461  * RETURN VALUE:
00462  *    tulong - 32 bit system time
00463  *
00464  *****************************************************************************/
00465 tulong faxSystemTime (void)
00466 {
00467   return ( (fiuContext.faxSystemTime)() );
00468
00469 } /* faxSystemTime */
00470
00471 /******************************************************************************
00472  * FUNCTION PURPOSE: Reset Fax Statistics
00473  ******************************************************************************
00474  * DESCRIPTION: Obtain Fax Statistics - both network and call related.
00475  *
00476  * void faxResetStats (
00477  *    void           *fiuInst)   -  a pointer to instance structure
00478  *
00479  *****************************************************************************/
00480 void faxResetStats (void* fiuInst)
00481 {
00482    fiuInst_t* inst = (fiuInst_t*) fiuInst;
00483
00484    memset ((void *) &inst->faxStats, 0, sizeof(fiuStats_t));
00485
00486   /* Set some fax stats to dummy value */
00487   inst->faxStats.NSFInfo.NSFCountryCode  = fiu_NSF_CC_UNKNOWN;
00488   inst->faxStats.NSFInfo.NSFManufacturer = fiu_NSF_MC_UNKNOWN;
00489   inst->faxStats.Direction       = fiu_DIR_UNKNOWN;
00490   inst->faxStats.HSmodulation    = 0xFFFF;
00491   inst->faxStats.ECMused         = 0xFF;
00492
00493 } /* faxResetStats() */
00494
00495 /******************************************************************************
00496  * FUNCTION PURPOSE: Exception reporting mechanism
00497  ******************************************************************************
00498  * DESCRIPTION:
00499  *
00500  *
00501  *****************************************************************************/
00502 void faxException (void *fiuInst, fiuExceptionCodes_e code)
00503 {
00504    fiuInst_t *inst = (fiuInst_t *) fiuInst;
00505
00506    (*fiuContext.faxDebugTrace) ((void *)inst->ID, fiu_DBG_FATAL_ERROR, code,
00507                                 0, NULL);
00508 } /* faxException */
00509
00510 /******************************************************************************
00511  * FUNCTION PURPOSE: Provides capability to assert debug exceptions and
00512  *                   informational messages to integrating software system
00513  ******************************************************************************
00514  * DESCRIPTION:
00515  *
00516  * void faxDebugTrace (
00517  *    void*  pmodule,    - pointer to FIU channel instance
00518  *    tuint  infoLevel,  - fiu_DBG_OFF, fiu_DBG_LVL_1, or fiu_DBG_LVL_2
00519  *    tuint  MsgID,      - message ID (see frtrace.h for ID numbers)
00520  *    tuint  MsgData)    - supporting debug data
00521  *
00522  * RETURN VALUE:
00523  *    None
00524  *
00525  *****************************************************************************/
00526 void faxDebugTrace (void * pmodule, tuint infoLevel, tuint msgID, tuint msgData)
00527 {
00528    fiuInst_t *inst = (fiuInst_t *) pmodule;
00529    tuint dbgData[2], dbgDataSize;
00530
00531    #ifdef FAX_CC_DBG
00532      fiuCCDbgTrace (inst->ID, msgID, msgData,
00533                     (tuint) ((*fiuContext.faxSystemTime)() ));
00534    #endif
00535
00536    /*  Filter out debug messages with higher level than current debug mode */
00537    if (infoLevel <= inst->dbgMode)
00538    {
00539       dbgData[0]  = msgData;
00540       dbgDataSize = 1;
00541
00542       /* lower 16 bits of timestamp information is added to debug trace information */
00543       dbgData[1] = (*fiuContext.faxSystemTime)() & 0xFFFF;
00544       dbgDataSize++;
00545
00546       /* Send debug trace */
00547       (*fiuContext.faxDebugTrace) ((void *)inst->ID, fiu_DBG_INFORMATIONAL, msgID,
00548                                    dbgDataSize, &dbgData[0]);
00549    }
00550
00551 } /* faxDebugTrace */
00552
00553 /******************************************************************************
00554  * FUNCTION PURPOSE:
00555  ******************************************************************************
00556  * DESCRIPTION:
00557  *
00558  * void  (
00559  *
00560  * RETURN VALUE:
00561  *    None
00562  *
00563  *****************************************************************************/
00564 void faxCriticalSectionBegin (void)
00565 {
00566    (fiuContext.faxCriticalSectionBegin)();
00567
00568 } /* faxCriticalSectionBegin */
00569
00570 /******************************************************************************
00571  * FUNCTION PURPOSE:
00572  ******************************************************************************
00573  * DESCRIPTION:
00574  *
00575  * void  (
00576  *
00577  * RETURN VALUE:
00578  *    None
00579  *
00580  *****************************************************************************/
00581 void faxCriticalSectionEnd (void)
00582 {
00583    (fiuContext.faxCriticalSectionEnd)();
00584
00585 } /* faxCriticalSectionEnd */
00586
00587 /* Nothing past this point */


FIU: faxutil.h File Reference

faxutil.h File Reference

#include <ti/mas/types/types.h>
#include <ti/mas/fiu/src/faxport.h>
#include <ti/mas/fiu/src/frtrace.h>

Include dependency graph for faxutil.h:

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

Go to the source code of this file.

Data Structures

struct | faxBufferMgmt_t

Defines

#define | FAX_NUMBER_HS_BUFFERS 100

Functions

tword | faxBitReverse (tword byte)
tint | fax_timestamp16_compare (tuint a, tuint b)
tint | fax_timestamp32_compare (tulong a, tulong b)
void | faxBufferMgmtInit (faxBufferMgmt_t *BufferMgmt)
void | faxBufferAdd (void *fiuInst, tword *memBlock, tuint memBlockSizeWords)
void | faxOverlayBufInit (void *fiuInst)
tbool | faxBufferAlloc (void *fiuInst, tword **pbuffer)
void | faxBufferFree (void *fiuInst, tword *pbuffer)
tulong | faxSystemTime (void)
void | faxDebugTrace (void *pmodule, tuint infoLevel, tuint msgID, tuint msgData)
void | faxException (void *fiuInst, fiuExceptionCodes_e code)
void | faxResetStats (void *fiuInst)
void | faxCriticalSectionBegin (void)
void | faxCriticalSectionEnd (void)

Define Documentation

#define FAX_NUMBER_HS_BUFFERS 100

Definition at line 42 of file faxutil.h.

Function Documentation

tword faxBitReverse ( tword byte )

Definition at line 53 of file faxutil.c.

tint fax_timestamp16_compare | ( | tuint | a,
 |  | tuint | b
 | ) |  |

Definition at line 91 of file faxutil.c.

tint fax_timestamp32_compare | ( | tulong | a,
 |  | tulong | b
 | ) |  |

Definition at line 177 of file faxutil.c.

void faxBufferMgmtInit ( faxBufferMgmt_t * BufferMgmt )

Definition at line 253 of file faxutil.c.

References faxBufferMgmt_t::currentUsage, faxBufferAllocation_u::faxBufferLinkedList, faxBufferMgmt_t::HSNotAvailCtr, faxBufferMgmt_t::maxUsage, faxBufferLinkedList_t::next, faxBufferMgmt_t::nextFree, faxBufferMgmt_t::poolSizeWords, and faxBufferMgmt_t::pPool.

Referenced by fiuOpen().

void faxBufferAdd | ( | void * | fiuInst,
 |  | tword * | memBlock,
 |  | tuint | memBlockSizeWords
 | ) |  |

Definition at line 286 of file faxutil.c.

References fiuInst_s::BufferMgmt, faxBufferAllocation_u::faxBufferLinkedList, faxCriticalSectionBegin(), faxCriticalSectionEnd(), faxBufferLinkedList_t::next, and faxBufferMgmt_t::nextFree.

Referenced by faxOverlayBufInit().

Here is the call graph for this function:

void faxOverlayBufInit ( void * fiuInst )

Definition at line 317 of file faxutil.c.

References faxBufferAdd(), faxDebugTrace(), fiuInst_s::fOverlayBufInit, fiuInst_s::overlayBuf, TRC_DBG_LVL_2, and TRC_FRP_BUF_POOL_OVERLAY_INIT.

Here is the call graph for this function:

tbool faxBufferAlloc | ( | void * | fiuInst,
 |  | tword ** | pbuffer
 | ) |  |

Definition at line 354 of file faxutil.c.

References fiuContext_t::allocBuffer, fiuInst_s::BufferMgmt, faxBufferMgmt_t::currentUsage, fiuContext, faxBufferMgmt_t::HSNotAvailCtr, fiuInst_s::ID, faxBufferMgmt_t::maxUsage, faxBufferLinkedList_t::next, faxBufferMgmt_t::nextFree, and fiuContext_t::SupportedExternalBuffSize.

void faxBufferFree | ( | void * | fiuInst,
 |  | tword * | pbuffer
 | ) |  |

Definition at line 418 of file faxutil.c.

References fiuInst_s::BufferMgmt, faxBufferMgmt_t::currentUsage, fiu_exc_assert, fiuContext, fiuContext_t::freeBuffer, fiuInst_s::ID, faxBufferLinkedList_t::next, faxBufferMgmt_t::nextFree, fiuInst_s::overlayBuf, fiuInst_s::overlayBufSizeWords, faxBufferMgmt_t::poolSizeWords, faxBufferMgmt_t::pPool, fiuContext_t::SupportedExternalBuffSize, and TRC_FIU_BUFF_FREE_ERROR.

tulong faxSystemTime ( void )

Definition at line 465 of file faxutil.c.

References fiuContext_t::faxSystemTime, and fiuContext.

void faxDebugTrace | ( | void * | pmodule,
 |  | tuint | infoLevel,
 |  | tuint | msgID,
 |  | tuint | msgData
 | ) |  |

Definition at line 526 of file faxutil.c.

References fiuContext_t::faxDebugTrace, fiuContext_t::faxSystemTime, fiu_DBG_INFORMATIONAL, fiuContext, and fiuInst_s::ID.

Referenced by faxOverlayBufInit(), fiuClose(), fiuFaxEventHandler(), and fiuOpen().

void faxException | ( | void * | fiuInst,
 |  | fiuExceptionCodes_e | code
 | ) |  |

Definition at line 502 of file faxutil.c.

References fiuContext_t::faxDebugTrace, fiu_DBG_FATAL_ERROR, fiuContext, and fiuInst_s::ID.

void faxResetStats ( void * fiuInst )

Definition at line 480 of file faxutil.c.

References fiuStats_t::Direction, fiuStats_t::ECMused, fiuInst_s::faxStats, fiu_DIR_UNKNOWN, fiu_NSF_CC_UNKNOWN, fiu_NSF_MC_UNKNOWN, fiuStats_t::HSmodulation, fiuNSFInfo_t::NSFCountryCode, fiuStats_t::NSFInfo, and fiuNSFInfo_t::NSFManufacturer.

Referenced by fiuGetStats(), and fiuOpen().

void faxCriticalSectionBegin ( void )

Definition at line 564 of file faxutil.c.

References fiuContext_t::faxCriticalSectionBegin, and fiuContext.

Referenced by faxBufferAdd().

void faxCriticalSectionEnd ( void )

Definition at line 581 of file faxutil.c.

References fiuContext_t::faxCriticalSectionEnd, and fiuContext.

Referenced by faxBufferAdd().


FIU: faxutil.h Source File

faxutil.h

Go to the documentation of this file.
00001 #ifndef _FAXUTIL_H
00002 #define _FAXUTIL_H
00003 /******************************************************************************
00004  * FILE PURPOSE: Common utilities shared by FAX modules
00005  ******************************************************************************
00006  * FILE NAME: faxutil.h
00007  *
00008  * DESCRIPTION: Contains a set of common utility functions and macros shared by
00009  *              FAX modules.
00010  *
00011  * MACRO                 DECRIPTION
00012  * =====                 ==========
00013  * faxBitReverse()       Performs bit reversal on a byte of data.
00014  *
00015  * TABS: NONE
00016  *
00017  * $Id: faxutil.h 1.1 1998/08/04 15:03:03 ffruth Exp $
00018  *
00019  * REVISION HISTORY:
00020  *
00021  * $Log: faxutil.h $
00022  * Revision 1.1  1998/08/04 15:03:03  ffruth
00023  * Initial revision
00024  *
00025  * DATE         Programmer      Description
00026  * ====         ==========      ===========
00027  * 04-Aug-98    F. Fruth        Created.
00028  * 11-Jul-00    J. Wright       Added prototypes for generic timestamp comparison
00029  *                              utilities.
00030  *
00031  * (C) Copyright 1998, 1999, 2000 TELOGY Networks, Inc.
00032  *****************************************************************************/
00033 #include <ti/mas/types/types.h>
00034 #include <ti/mas/fiu/src/faxport.h>
00035 #include <ti/mas/fiu/src/frtrace.h>
00036
00037 /******************************************************************************
00038  * DATA DEFINITION:  High-speed buffer memory management data structure
00039  ******************************************************************************
00040  * DESCRIPTION:  Defines the data structure for high-speed buffer management.
00041  *****************************************************************************/
00042 #define FAX_NUMBER_HS_BUFFERS     100  /* Number of high-speed buffers */
00043
00044 typedef struct {
00045   tword *nextFree;        /* Pointer to next free high-speed buffer */
00046   tint currentUsage;      /* Count of high-speed buffers currently allocated */
00047   tint maxUsage;          /* Count of the maximum HS buffer usage */
00048   tint HSNotAvailCtr;     /* Number of times an allocation request has been
00049                              rejected */
00050   tuint dummy;            /* Gets around alignment bug in compiler */
00051
00052                           /* Array of High-speed buffers */
00053   tword *pPool;
00054   tuint poolSizeWords;
00055
00056 } faxBufferMgmt_t;
00057
00058 /******************************************************************************
00059  * MACRO DEFINITION:  Bit reversal
00060  ******************************************************************************
00061  * DESCRIPTION:  Performs bit reversal on a byte of data.
00062  *****************************************************************************/
00063 tword  faxBitReverse           (tword byte);
00064 tint   fax_timestamp16_compare (tuint a, tuint b);
00065 tint   fax_timestamp32_compare (tulong a, tulong b);
00066 void   faxBufferMgmtInit       (faxBufferMgmt_t *BufferMgmt);
00067 void   faxBufferAdd            (void *fiuInst, tword *memBlock, tuint memBlockSizeWords);
00068 void   faxOverlayBufInit       (void *fiuInst);
00069 tbool  faxBufferAlloc          (void *fiuInst, tword **pbuffer);
00070 void   faxBufferFree           (void *fiuInst, tword *pbuffer);
00071 tulong faxSystemTime           (void);
00072 void   faxDebugTrace           (void * pmodule, tuint infoLevel,
00073                                 tuint msgID, tuint msgData);
00074 void   faxException            (void *fiuInst, fiuExceptionCodes_e code);
00075 void   faxResetStats           (void* fiuInst);
00076 void   faxCriticalSectionBegin (void);
00077 void   faxCriticalSectionEnd   (void);
00078 #endif /* _FAXUTIL_H */


FIU: File Index

FIU File List

Here is a list of all files with brief descriptions:
doxygen.h [code] |
faxport.h [code] |
faxprag.h [code] |
faxutil.c [code] |
faxutil.h [code] |
fiu.c [code] |
fiu.h [code] | Fax Interface Unit API and Data Definitions
fiudbg.c [code] |
fiuloc.h [code] |
frpfndif.h [code] |
frtrace.h [code] |
Version.h [code] |


FIU: fiu.c File Reference

fiu.c File Reference

#include <stdlib.h>
#include <ti/mas/types/types.h>
#include <ti/mas/fiu/src/faxprag.h>
#include <ti/mas/fiu/fiu.h>
#include "fiuloc.h"
#include <ti/mas/util/ecomem.h>
#include <ti/mas/fiu/src/frtrace.h>
#include <ti/mas/fiu/src/frp/frp.h>
#include <ti/mas/fiu/src/frp/frpmem.h>
#include <ti/mas/fiu/src/fnd/fnd.h>
#include <ti/mas/fiu/src/fnd/fndmem.h>
#include <ti/mas/fiu/src/fnd/fndt38.h>

Include dependency graph for fiu.c:

Go to the source code of this file.

Defines

#define | FIU_NBUF 5
#define | FIU_INSTANCE_BUFN 0
#define | FIU_FRP_INSTANCE_BUFN 1
#define | FIU_FND_INSTANCE_BUFN 2
#define | FIU_BUFFER_POOL_BUFN 3
#define | FIU_BUFFER_POOL_OVERLAY_BUFN 4

Functions

tint | fiuGetSizes (tint *nbufs, const ecomemBuffer_t **bufs, fiuSizeCfg_t *SizeCfg)
This function obtains memory requirements for an instance of FIU.
tint | fiuNew (void **fiuInst, tint nbufs, ecomemBuffer_t *bufs, fiuNewConfig_t *cfg)
This function creates an instance of FIU and initializes the memory buffer pointers in the instance.
Remarks:
Function fiuNew() must be called before fiuOpen()is called.

void | fiuDelete (void **fiuInst)
This function deletes the FIU instance identified by fiuInst.
Remarks:
FIU must be closed prior to being deleted.

void | fiuControl (void *fiuInst, fiuControlCode_e ctrlCode, fiuControlConfig_t *ctrlConfig)
This function controls the operations of an instance of FIU.
tint | fiuOpen (void *fiuInst, fiuOpenConfig_t *cfg)
This function initializes and configures an FIU instance.
void | fiuClose (void *fiuInst)
This function closes the FIU instance identified by fiuInst. It sets the state of FIU to CLOSED.
tint | fiuReceiveIn (void *fiuInst, xferpktInfo_t *pktInfo)
This function processes packets received from the network.
void | fiuTask (void *fiuInst)
Routine which performs fax protocol processing and network encoder/decoder operations.
void | fiuSendIn (void *fiuInst, void *message)
This function passes a message from a fax modem module (FM) to FIU for processing.
void | fiuFaxEventHandler (void *fiuInst, tuint eventCode, tuint eventInfo)
void | fiuGetStats (void *fiuInst, tbool freset, fiuStats_t *stats)
Routine which obtains FIU statistics (both network- and call-specific) The stats can be requested from either an active call, or the last call if the current call session has been terminated.
tbool | fiuValidatePkt (fiuNetProtocol_e netProtocolType, tword *pkt, tuint pktSize)
Validates T.38 UDP packet This routine checks if the packet is a valid fax relay packet. Currently, only T.38 UDPTL is supported.

Variables

fiuInst_t * fiu_dbg_inst
ecomemBuffer_t | fiuBufs [FIU_NBUF]

Define Documentation

#define FIU_NBUF 5

Definition at line 162 of file fiu.c.

Referenced by fiuGetSizes(), and fiuNew().

#define FIU_INSTANCE_BUFN 0

Definition at line 163 of file fiu.c.

#define FIU_FRP_INSTANCE_BUFN 1

Definition at line 164 of file fiu.c.

#define FIU_FND_INSTANCE_BUFN 2

Definition at line 165 of file fiu.c.

#define FIU_BUFFER_POOL_BUFN 3

Definition at line 166 of file fiu.c.

Referenced by fiuGetSizes().

#define FIU_BUFFER_POOL_OVERLAY_BUFN 4

Definition at line 167 of file fiu.c.

Referenced by fiuGetSizes(), and fiuNew().

Function Documentation

void fiuFaxEventHandler | ( | void * | fiuInst,
 |  | tuint | eventCode,
 |  | tuint | eventInfo
 | ) |  |

Definition at line 650 of file fiu.c.

References fiuInst_s::EventHandlerSpec, faxDebugTrace(), fiu_EVENT_CLEARDOWN, fiu_EVENT_G3_TO_V34, fiu_EVENT_V34_TO_G3, fiu_FEATURE_V34_FAX, fiuEventHandlerSpec_t::fiuEventHandler, fiuInst_s::frpInst, fiuEventHandlerSpec_t::targetInst, TRC_DBG_LVL_1, TRC_FIU_CLEARDOWN_IND, TRC_FIU_G3_TO_V34, and TRC_FIU_V34_TO_G3.

Referenced by fiuOpen().

Here is the call graph for this function:

Variable Documentation

fiuInst_t* fiu_dbg_inst

Definition at line 159 of file fiu.c.

ecomemBuffer_t fiuBufs[FIU_NBUF]

Initial value:

 {

  ecomem_CLASS_EXTERNAL, fiu_LOG2ALIGN, sizeof(fiuInst_t), FALSE, NULL,
  ecomem_CLASS_EXTERNAL, fiu_LOG2ALIGN, FRP_INSTANCE_SIZE, FALSE, NULL,
  ecomem_CLASS_EXTERNAL, fiu_LOG2ALIGN, FND_INSTANCE_SIZE, FALSE, NULL,
  ecomem_CLASS_EXTERNAL, fiu_LOG2ALIGN, 0                , FALSE, NULL,
  ecomem_CLASS_EXTERNAL, fiu_LOG2ALIGN, 0                , FALSE, NULL
}

Definition at line 172 of file fiu.c.

Referenced by fiuGetSizes(), and fiuNew().


FIU: fiu.c Source File

fiu.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: Main routines for Fax Interface Unit (FIU)
00003  ******************************************************************************
00004  * FILE NAME: fiu.c
00005  *
00006  * DESCRIPTION: The FIU is the software which integrates the three FAX
00007  *              software units: FAX modem driver (FM), FAX Relay Protocol (FRP)
00008  *              and FAX Network Driver (FND).  Integrated these units provide
00009  *              a single module which provides FAX Relay over Packet networks.
00010  *              Various network protocols are supported and are run-time
00011  *              configurable.
00012  *
00013  *              Included in FIU is Telogy Real-time debugging for system
00014  *              integration support.
00015  *
00016  * FUNCTION               DESCRIPTION
00017  * ========               ===========
00018  * fiuGetSizes()          Obtains memory requirements for an instance of FIU
00019  * fiuNew()               Creates an instance of FIU
00020  * fiuDelete()            Terminates an instance of FIU
00021  * fiuOpen()              Starts operation of an FIU instance
00022  * fiuClose()             Closes an instance of FIU
00023  * fiuReceiveIn()         Processes network packets.
00024  * fiuGetNetStats()       Obtain network driver statistics
00025  * fiuGetFaxStats()       Obtain Fax Protocol Statistics
00026  * fiuFaxEventHandler()   Routine for reporting event to system for processing.
00027  *
00028  * High-speed Buffer Memory Management:
00029  * ===================================
00030  * fiuBufferMgmtInit()    Initialize high-speed buffer management.
00031  * fiuAllocBuffer()       Allocates a high-speed buffer.
00032  * fiuFreeBuffer()        Free a high-speed Buffer.
00033  *
00034  * TABS: NONE
00035  *
00036  * $Id: fiu.c 1.20 2000/05/31 11:24:28 sakhtar Exp $
00037  *
00038  * REVISION HISTORY:
00039  *
00040  * $Log: fiu.c $
00041  * Revision 1.20  2000/05/31 11:24:28  sakhtar
00042  * Added a compile time option to save debug traces in a temporary buffer
00043  * for use with code composer
00044  * Revision 1.19  2000/04/28 12:40:13  sakhtar
00045  * Added parameter to configure  LS payload size for T.38 protocol
00046  * Revision 1.18  2000/03/22 13:42:12  ffruth
00047  * - Initial changes for CED/CNG tone generation capability in T.38.
00048  * Revision 1.17  2000/02/23 23:05:51  ffruth
00049  * - Incorporated feature to allow user to specify NSF country code
00050  *   and vendor code override values for NSF frames sent to the
00051  *   local FTE (not packet network).  By default, if feature not
00052  *   enabled, Telogy NSF values are used.  This is a short-term fix
00053  *   due to interoperability problems with SANYO FTEs which
00054  *   incorrectly interpret Telogy NSF vendor code as SANYO.
00055  *   SANYO ignores country code -- Those idiots.
00056  * Revision 1.16  2000/01/20 20:09:46  ffruth
00057  * Added FIUFeatureSelector to FND config for TFOP 3x FC
00058  * feature.  Also added disabling of SLF feature when not compiled in,
00059  * Revision 1.15  1999/11/19 22:47:34  ffruth
00060  * - SLP FRP changes to extract slp page mode for network decoder.
00061  * Revision 1.14  1999/10/22 16:27:28  ffruth
00062  * - First phase of scan line fix-up completed.
00063  * Revision 1.13  1999/09/29 15:27:43  sakhtar
00064  * Modified to add the following features
00065  * - Added Tx State Network Timer to disconnect a call if we
00066  *   have not received any data packets during Tx States for the
00067  *   duration of the Network Time passed to FIU during fiuOpen
00068  * - The Eflag Start and Stop timers are programmable when
00069  *   the channel is opened.
00070  * - Added T30FeatureSelector to fiuCfg structure which is intended
00071  *   to disable certain T30 features when a channel is opened like
00072  *   ECM and MR. Not implemented yet.
00073  *   some T30 features.
00074  * Revision 1.12  1999/09/28 10:27:28  sakhtar
00075  * Fixed a possible rtpb problem which is not likely to occur but the
00076  * change would make the code clean
00077  * Revision 1.11  1999/08/13 11:52:19  sakhtar
00078  * Modified to support AAL2 support
00079  * Revision 1.10  1999/07/09 13:07:07  sakhtar
00080  * Added Network Protocol Call Table to conditionally compile the
00081  * Network Modules.
00082  * Revision 1.9  1999/03/12 14:43:26  ffruth
00083  * - Merged changes from 1.8.1.1.
00084  * - Implemented new FRP/FND message communications.
00085  * Revision 1.8  1998/12/04 11:46:22  sakhtar
00086  * same as version 1.7.1.1
00087  * Revision 1.7.1.1  1998/11/13 12:53:56  ffruth
00088  * Revision 1.7  1998/10/28 17:18:13  sakhtar
00089  * 1. Modified to add new variables for T.38 in the config structure
00090  * Revision 1.6  1998/09/14 15:32:48  ffruth
00091  * Revision 1.5  1998/08/26 15:01:10  sakhtar
00092  * Added a function "fiuVerion()"
00093  * Revision 1.4  1998/08/03 18:04:45  ffruth
00094  * - Integration changes and fixes.
00095  * Revision 1.3  1998/07/29 13:05:01  ffruth
00096  * - Clean up LINT results.
00097  * Revision 1.2  1998/07/28 13:50:22  ffruth
00098  * - Modified fiuSendIn() prototype.
00099  * Revision 1.1  1998/07/24 17:52:36  ffruth
00100  * Initial revision
00101  *
00102  * DATE         Programmer      Description
00103  * ====         ==========      ===========
00104  * 21-Jul-98    F. Fruth        Created.
00105  * 03-Aug-98    F. Fruth        Integration changes and fixes.  Includes adding
00106  *                              a debug trace for cleardown indication.  Also,
00107  *                              Debug trace messages were removed from high-speed
00108  *                              alloc routine.  Current fiuWriteDebugTrace()
00109  *                              disables and enables interrupts.  Thus can not be
00110  *                              called from an ISR.  Since high-speed buffer alloc
00111  *                              routine is need in ISR, wwe can not sent trace
00112  *                              messages in it.  We'll look at this further in
00113  *                              the future.
00114  * 26-Aug-98    S. Akhtar       Added a function fiuVersion() which reports
00115  *                              build and capability information of the FIU
00116  * 14-Sep-98    F Fruth         Incorporated new debugInfo() API for FAXMON.
00117  * 21-Oct-99    F Fruth         Modified fiuGetFaxStats() to include new stats.
00118  * 15-Nov-99    F Fruth         Added FIUFeatureSelector to FRP config.
00119  * 20-Jan-00    F Fruth         Added FIUFeatureSelector to FND config and
00120  *                              Disable SLF when not compiled in.
00121  * 23-Feb-00  ffruth          Incorporated the ability for the user to specify
00122  *                            the NSF override data for country code and vendor
00123  *                            code when sending NSF frame to the local FTE.
00124  *                            Over the network, we still override with telogy
00125  *                            NSF.
00126  * 22-Mar-00  ffruth          Incorporated support for CED/CNG tone network
00127  *                            indications.  Added configuration of tone
00128  *                            generation utility functions in fiuOpen().
00129  *
00130  * (C) Copyright 1998-2000 TELOGY Networks, Inc.
00131  *****************************************************************************/
00132
00133 /* System level header files */
00134 #include <stdlib.h>
00135 #include <ti/mas/types/types.h>
00136
00137 /* Relocatable symbols for FIU */
00138 #include <ti/mas/fiu/src/faxprag.h>
00139
00140 /* FIU header files */
00141 #include <ti/mas/fiu/fiu.h>
00142 #include "fiuloc.h"
00143
00144 /* System Utilities' API's */
00145 #include <ti/mas/util/ecomem.h>
00146 #include <ti/mas/fiu/src/frtrace.h>
00147
00148 /* Internal FIU module header files */
00149 #include <ti/mas/fiu/src/frp/frp.h>
00150 #include <ti/mas/fiu/src/frp/frpmem.h>
00151 #include <ti/mas/fiu/src/fnd/fnd.h>
00152 #include <ti/mas/fiu/src/fnd/fndmem.h>
00153 #include <ti/mas/fiu/src/fnd/fndt38.h>
00154
00155 /******************************************************************************
00156  * GLOBAL VARIABLE DECLARATIONS
00157  *****************************************************************************/
00158 /* Code Composer bug workaround */
00159 fiuInst_t* fiu_dbg_inst;
00160
00161 /* FIU dynamic memory buffers */
00162 #define FIU_NBUF                     5
00163 #define FIU_INSTANCE_BUFN            0 /* FIU instance structure     */
00164 #define FIU_FRP_INSTANCE_BUFN        1 /* FRP instance structure     */
00165 #define FIU_FND_INSTANCE_BUFN        2 /* FND instance structure     */
00166 #define FIU_BUFFER_POOL_BUFN         3 /* FIU buffer pool structure  */
00167 #define FIU_BUFFER_POOL_OVERLAY_BUFN 4 /* FIU buffer pool structure for overlay */
00168
00169 /* Default memory buffer descriptions. F**_INSTANCE_SIZE numbers are gotten
00170    dynamically from f**mem.h files via macro definitions. FIU Buffer pool
00171    size is assigned during startup */
00172 ecomemBuffer_t fiuBufs[FIU_NBUF] = {
00173   /* class, log2align, size, volat, base */
00174   ecomem_CLASS_EXTERNAL, fiu_LOG2ALIGN, sizeof(fiuInst_t), FALSE, NULL,    /*  FIU instance */
00175   ecomem_CLASS_EXTERNAL, fiu_LOG2ALIGN, FRP_INSTANCE_SIZE, FALSE, NULL,    /*  FRP instance */
00176   ecomem_CLASS_EXTERNAL, fiu_LOG2ALIGN, FND_INSTANCE_SIZE, FALSE, NULL,    /*  FND instance */
00177   ecomem_CLASS_EXTERNAL, fiu_LOG2ALIGN, 0                , FALSE, NULL,    /*  FIU buffer pool */
00178   ecomem_CLASS_EXTERNAL, fiu_LOG2ALIGN, 0                , FALSE, NULL     /*  FIU buffer pool for overlay */
00179 };
00180
00181 /* A check that FIU is up-to-date on the number of buffers required by each
00182    module */
00183 #if ((FND_NBUFS > 1) || (FRP_NBUFS > 1))
00184 #error FIU buffer requirements need updating......
00185 #endif
00186
00187 /******************************************************************************
00188  * FUNCTION PURPOSE:  Obtains memory requirements for an instance of FIU
00189  ******************************************************************************
00190  * DESCRIPTION: Obtains memory requirements for an FIU instance (class, alignment,
00191  * size, etc..). Memory buffer description as defined in ecomem.h is used for
00192  * buffer description.  Vector of memory buffer descriptions that is returned in
00193  * bufs must not be changed by external software.
00194  *
00195  * tint fiuGetSizes (
00196  *   tint                 *nbufs,   - a pointer to a memory address where the
00197  *                                    number of buffers used is stored
00198  *   const ecomemBuffer_t    **bufs)   - a pointer to memory buffer description
00199  *
00200  * RETURN VALUES:
00201  *      fiu_NOERR  --  No errors
00202  *      fiu_ERROR  --  Error
00203  *
00204  *****************************************************************************/
00205 tint fiuGetSizes (tint *nbufs, const ecomemBuffer_t **bufs, fiuSizeCfg_t * SizeCfg)
00206 {
00207   *nbufs = FIU_NBUF;     /* Number of buffers used */
00208
00209 #ifndef NO_TONESUPP
00210   if (SizeCfg->NumInternalFIUBufs < SizeCfg->NumInternalFIUOverlayBufs)
00211 #endif
00212      SizeCfg->NumInternalFIUOverlayBufs = 0;
00213
00214   fiuBufs[FIU_BUFFER_POOL_BUFN].size = (SizeCfg->NumInternalFIUBufs - SizeCfg->NumInternalFIUOverlayBufs) *
00215                                        sizeof (faxBufferAllocation_u);
00216
00217   fiuBufs[FIU_BUFFER_POOL_OVERLAY_BUFN].size = SizeCfg->NumInternalFIUOverlayBufs *
00218                                                sizeof (faxBufferAllocation_u);
00219
00220   *bufs = &fiuBufs[0];   /* Return pointer to requested memory information */
00221
00222   /* If the system cannot allocate memory buffers lagre enough for FIU to use,
00223      may as well not use them at all */
00224   if (fiuContext.SupportedExternalBuffSize < sizeof (faxBufferAllocation_u))
00225   {
00226       fiuContext.SupportedExternalBuffSize = 0;
00227   }
00228
00229   return(fiu_NOERR);
00230
00231  } /* fiuGetSizes */
00232
00233 /******************************************************************************
00234  * FUNCTION PURPOSE: Create an instance of FIU
00235  ******************************************************************************
00236  * DESCRIPTION: Create an an instance of FIU and initialize its memory buffers.
00237  *
00238  * tint fiuNew (
00239  *   void            **fiuInst,    - an address of memory location that will
00240  *                                   receive a pointer to instance structure
00241  *   tint            nbufs,        - number of buffers used
00242  *   ecomemBuffer_t     *bufs,        - a vector of buffer descriptors
00243  *   fiuNewConfig_t  *cfg)         - a pointer to configuration structure
00244  *
00245  * Return values:  fiu_NOMEMORY    - some buffers have base address NULL
00246  *                 fiu_NOERR       - success
00247  *                 fiu_ERROR       - invalid input parameters
00248  *
00249  *****************************************************************************/
00250 tint fiuNew (void **fiuInst, tint nbufs, ecomemBuffer_t *bufs, fiuNewConfig_t *cfg)
00251 {
00252   tint i;
00253   fiuInst_t *inst;
00254   ecomemBuffer_t *bufp, *fiubufp;
00255   tint ret_value = fiu_NOERR;
00256
00257   /* Test instance pointer (Must be NULL)  */
00258   if (*fiuInst != NULL || nbufs != FIU_NBUF)
00259     return(fiu_ERROR);
00260
00261   /* Allocate all dynamic buffers (base address != NULL ?)   */
00262   for (i = 0, bufp = &bufs[0], fiubufp = &fiuBufs[0]; i < nbufs; i++, bufp++, fiubufp++)
00263   {
00264     if ((bufp->base == NULL) || (bufp->size < fiubufp->size))
00265     {
00266       /* Check for case in which the overlay buffers may chose not to be used
00267          in the build. In such a case, bufp->base will be NULL as it will not
00268          be allocated by the system due to its zero size. */
00269       if(!(i==FIU_BUFFER_POOL_OVERLAY_BUFN && fiubufp->size==0))
00270       {
00271         ret_value = fiu_NOMEMORY;
00272       }
00273     }
00274   }
00275
00276   /* check and return an error condition */
00277   if (ret_value == fiu_NOMEMORY)
00278     return (ret_value);
00279
00280   /*  Identify FIU instance structure  */
00281   bufp = &bufs[FIU_INSTANCE_BUFN];
00282   inst = (fiuInst_t *) bufp->base;
00283
00284   /* Identify FRP instance structure  */
00285   inst->frpInst = (void *) (++bufp)->base;
00286
00287   /* Identify FND instance structure  */
00288   inst->fndInst = (void *) (++bufp)->base;
00289
00290   /* Identify FIU buffer pool */
00291   inst->BufferMgmt.pPool = (void *) (++bufp)->base;
00292   inst->BufferMgmt.poolSizeWords = bufp->size;
00293
00294   inst->overlayBuf = (void *) (++bufp)->base;
00295   inst->overlayBufSizeWords = bufp->size;
00296   inst->fOverlayBufInit = (inst->overlayBufSizeWords != 0) ? TRUE : FALSE;
00297
00298   /* Save configuration data  */
00299   inst->ID                 = cfg->ID;
00300   inst->state              = FIU_CLOSED;         /* set FIU state to CLOSED  */
00301
00302   *fiuInst = (void *)inst;   /* return instance pointer  */
00303   return(fiu_NOERR);
00304 } /*  fiuNew  */
00305
00306 /******************************************************************************
00307  * FUNCTION PURPOSE: Delete an instance of FIU.
00308  ******************************************************************************
00309  * DESCRIPTION: Deletes an instance of FIU.
00310  *
00311  * void fiuDelete (
00312  *    void          **fiuInst)  - an address of memory location that contains
00313  *                                a pointer to instance structure
00314  *
00315  *****************************************************************************/
00316 void fiuDelete (void **fiuInst)
00317 {
00318    fiuInst_t *inst = (fiuInst_t *) *fiuInst;
00319
00320    fiu_exc_assert (inst->state == FIU_CLOSED, *fiuInst, TRC_FIU_DELETE_ERR);
00321
00322    *fiuInst = NULL;   /* Mark the instance as free */
00323 } /* fiuDelete  */
00324
00325 /******************************************************************************
00326  * FUNCTION PURPOSE: Controls an instance of FIU.
00327  ******************************************************************************
00328  * DESCRIPTION: Controls an instance of FIU.
00329  *
00330  * void fiuControl (
00331  *    void            *fiuInst,       - a pointer to instance structure
00332  *    fiuControlCode_e ctrlCode,      - control code
00333  *    fiuControlConfig_t *ctrlConfig) - a pointer to control configuration
00334  *                                      structure
00335  *
00336  *****************************************************************************/
00337 void fiuControl (void *fiuInst, fiuControlCode_e ctrlCode, fiuControlConfig_t *ctrlConfig)
00338 {
00339    fiuInst_t *inst = (fiuInst_t *) fiuInst;
00340
00341    if (inst->state == FIU_CLOSED)
00342      return;
00343
00344    switch (ctrlCode)
00345    {
00346      case fiu_CTRL_ACTIVATE:
00347        if (inst->state == FIU_OPEN)
00348        {
00349          frpActivate (inst->frpInst);
00350          inst->state = FIU_ACTIVATED;
00351        }
00352        break;
00353
00354      case fiu_CTRL_CONFIG:
00355        ((frpInst_t *)(inst->frpInst))->ReceiveOutSpec.frpReceiveOut = ctrlConfig->ReceiveOutSpec.fiuReceiveOut;
00356        ((frpInst_t *)(inst->frpInst))->ReceiveOutSpec.targetInst    = ctrlConfig->ReceiveOutSpec.targetInst;
00357        ((frpInst_t *)(inst->frpInst))->FRPTaskRate                  = ctrlConfig->frameSize;
00358        ((fndInst_t *)(inst->fndInst))->FNDTaskRate                  = ctrlConfig->frameSize;
00359        break;
00360
00361      default: /* ignore invalid control codes */
00362        WriteDebugTrace ((fndInst_t*) inst->fndInst, TRC_DBG_LVL_1, TRC_FIU_INVD_CONTROL,
00363                         ctrlCode);
00364        break;
00365     }
00366
00367 } /* fiuControl  */
00368
00369 /******************************************************************************
00370  * FUNCTION PURPOSE: Opens an instance of FIU.
00371  ******************************************************************************
00372  * DESCRIPTION: Starts FAX protocol operation.
00373  *
00374  * tint fiuOpen (
00375  *    void            *fiuInst,  -  a pointer to instance structure
00376  *    fiuOpenConfig_t *cfg)      -  pointer to channel configuration info
00377  *
00378  * Return values:  fiu_NOMEMORY    - some buffers have base address NULL
00379  *                 fiu_NOERR       - success
00380  *                 fiu_ERROR       - invalid input parameters
00381  *****************************************************************************/
00382 tint fiuOpen (void *fiuInst, fiuOpenConfig_t *cfg)
00383 {
00384   frpConfig_t frpCfg;
00385   fndConfig_t fndCfg;
00386   tint status;
00387   fiuInst_t *inst = (fiuInst_t *) fiuInst;
00388
00389   /* FIU closed?  If not, assert an exception */
00390   fiu_exc_assert (inst->state == FIU_CLOSED, fiuInst, TRC_FIU_OPEN_ERR);
00391
00392   /* Initialize FIU instance variables */
00393   inst->dbgMode       = cfg->dbgMode;
00394   inst->EventHandlerSpec = cfg->EventHandlerSpec;
00395
00396   /* Initialize High-speed buffer management */
00397   faxBufferMgmtInit (&inst->BufferMgmt);
00398
00399   /* Initialize all fax statistics to zero */
00400   faxResetStats (inst);
00401
00402   /* Force SLF bit off if build contains no SLF */
00403 #ifdef NO_SLF
00404   cfg->FIUFeatureSelector &= ~(fiu_FEATURE_SLF_ENABLE);
00405 #endif
00406
00407   /* Force T.38 interop workaround bit off if build does not contain it */
00408 #ifdef NO_T38_VOCALTEC_INTEROP
00409   cfg->FIUFeatureSelector &= ~(fiu_FEATURE_T38_VOCALTEC_INTEROP);
00410 #endif
00411
00412   /* Open FRP */
00413   frpCfg.ID                   = inst->ID;
00414   frpCfg.pmodule              = (void *) inst;
00415   frpCfg.FRPTaskRate          = cfg->frameSize;
00416   frpCfg.HSBufferSize         = FAX_HS_BUFFER_SIZE_WORDS;
00417   frpCfg.NetProtocol          = cfg->NetProtocol;
00418   frpCfg.MaxFaxRate           = cfg->MaxFaxRate;
00419   frpCfg.TCFMethod            = cfg->TCFHandlingMethod;
00420   frpCfg.NoActivityTimerVal   = cfg->NoActivityTimerVal;
00421
00422   frpCfg.ReceiveOutSpec.frpReceiveOut  = cfg->ReceiveOutSpec.fiuReceiveOut;
00423   frpCfg.ReceiveOutSpec.targetInst     = cfg->ReceiveOutSpec.targetInst;
00424   frpCfg.SendOutSpec.frpSendOut        = fndSendIn;
00425   frpCfg.SendOutSpec.targetInst        = inst->fndInst;
00426
00427   frpCfg.ReadPlayoutQSpec.frpReadPlayoutQ = fndReadPlayoutQ;
00428   frpCfg.ReadPlayoutQSpec.targetInst      = inst->fndInst;
00429   frpCfg.LocalTxNetTimeOutVal             = cfg->LocalTxNetTimeOutVal;
00430   frpCfg.EflagStartTimer                  = cfg->EflagStartTimer;
00431   frpCfg.EflagStopTimer                   = cfg->EflagStopTimer;
00432 #if ((!defined(NO_TONESUPP)) || defined(V34_FAX_RELAY))
00433   frpCfg.StartupTimer                     = cfg->StartupTimer;
00434 #endif
00435   frpCfg.CleardownTimer                   = cfg->CleardownTimer;
00436   frpCfg.T30FeatureSelector               = cfg->T30FeatureSelector;
00437   frpCfg.FIUFeatureSelector               = cfg->FIUFeatureSelector;
00438
00439   frpCfg.NSFCountryCode                   = cfg->NSFCountryCode;
00440   frpCfg.NSFVendorCodeMSB                 = cfg->NSFVendorCodeMSB;
00441   frpCfg.NSFVendorCodeLSB                 = cfg->NSFVendorCodeLSB;
00442   frpCfg.faxStats                         = &inst->faxStats;
00443
00444   frpCfg.EventHandlerSpec.frpEventHandler = fiuFaxEventHandler;
00445   frpCfg.EventHandlerSpec.targetInst      = (void *) inst;
00446
00447 #ifdef V34_FAX_RELAY
00448   if (cfg->T38Version < 3)
00449      frpCfg.T30FeatureSelector |= fiu_T30FEATURE_V34_DISABLE;
00450 #endif
00451
00452   status = frpOpen (inst->frpInst, FRP_INSTANCE_SIZE, &frpCfg);
00453   if (status != FRP_NOERR)
00454      return (fiu_ERROR);
00455
00456   /* Open FND */
00457   fndCfg.ID                        = inst->ID;
00458   fndCfg.pmodule                   = (void *) inst;
00459   fndCfg.FNDTaskRate               = cfg->frameSize;
00460   fndCfg.faxNominalDelay           = cfg->faxNomDelay;
00461   fndCfg.NetProtocol               = cfg->NetProtocol;
00462   fndCfg.RtpPayloadType            = cfg->RtpPayloadType;
00463   fndCfg.RtpSyncSource             = cfg->RtpSyncSource;
00464   fndCfg.HSBufferSize              = FAX_HS_BUFFER_SIZE_WORDS;
00465   fndCfg.FaxPacketSize             = cfg->faxPacketSize;
00466   fndCfg.SendOutSpec.fndSendOut    = cfg->SendOutSpec.fiuSendOut;
00467   fndCfg.SendOutSpec.targetInst    = cfg->SendOutSpec.targetInst;
00468   fndCfg.LsDataRedundancy          = cfg->LsDataRedundancy;
00469   fndCfg.HsDataRedundancy          = cfg->HsDataRedundancy;
00470   fndCfg.HSPktPayloadSize          = cfg->HSPktPayloadSize;
00471   fndCfg.LSPktPayloadSize          = cfg->LSPktPayloadSize;
00472   fndCfg.T38Version                = cfg->T38Version;
00473   fndCfg.ProtoTable                = cfg->faxNetCallTblPtr;
00474   fndCfg.AAL2cid                   = cfg->AAL2cid;
00475   fndCfg.FIUFeatureSelector        = cfg->FIUFeatureSelector;
00476   fndCfg.faxStats                  = &inst->faxStats;
00477
00478   status = fndOpen (inst->fndInst, FND_INSTANCE_SIZE, &fndCfg);
00479   if (status != FND_NOERR)
00480      return (fiu_ERROR);
00481
00482   inst->state = FIU_OPEN;          /* Change FIU state to OPEN */
00483
00484
00485   /* Trace FIU OPEN */
00486   faxDebugTrace ((void *) inst, TRC_DBG_LVL_1, TRC_FIU_OPEN, cfg->frameSize);
00487   return(fiu_NOERR);
00488
00489 } /* fiuOpen() */
00490
00491 /******************************************************************************
00492  * FUNCTION PURPOSE: Close an instance of FIU.
00493  ******************************************************************************
00494  * DESCRIPTION: Terminates FAX protocol processing.
00495  *
00496  * void fiuClose (
00497  *    void          *fiuInst)  -  a pointer to instance structure
00498  *
00499  *****************************************************************************/
00500 void fiuClose (void *fiuInst)
00501 {
00502    fiuInst_t *inst = (fiuInst_t *) fiuInst;
00503
00504    if (inst->state == FIU_CLOSED)
00505       return;
00506
00507    inst->state = FIU_CLOSED;  /* Terminate FAX protocol processing */
00508
00509    frpClose (inst->frpInst);
00510    fndClose (inst->fndInst);
00511
00512     /* Verify that all dynamic memory has been released, and that no memory
00513     * was double-freed.
00514     *
00515     * If currentUsage < 0, then it is likely that there was a double-free
00516     *                      operation during the last call.
00517     * If currentUsage > 0, then something was not freed (memory leak)
00518     */
00519    fiu_exc_assert (inst->BufferMgmt.currentUsage == 0, fiuInst,
00520                    TRC_FIU_EXC_MEMORY);
00521
00522    /* Trace FIU CLOSE */
00523    faxDebugTrace ((void *) inst, TRC_DBG_LVL_1, TRC_FIU_CLOSED, 0x00);
00524
00525 } /* fiuClose */
00526
00527 /* Uncomment out the following line if it is desired to perform the bad packet
00528    test.  This test trashes every packet that comes in to FIU in order to test
00529    the ability of the network protocol to handle bad packets */
00530 //#define FIU_BAD_PKT_TEST 0
00531 /******************************************************************************
00532  * FUNCTION PURPOSE: Processing of network packets.
00533  ******************************************************************************
00534  * DESCRIPTION: Processes packets received from the network.
00535  *
00536  * void fiuReceiveIn (
00537  *    void       *fiuInst,   -  a pointer to instance structure
00538  *    tint       npkts,      -  Number of network packets
00539  *    tint       pkt_size[], -  An array of packet sizes
00540  *    void       *packets[]) -  An array of packet pointers
00541  *
00542  * RETURN VALUE: tint        - always return 0
00543  *                             (added in support of changed NDI API)
00544  *
00545  *****************************************************************************/
00546 tint fiuReceiveIn (void *fiuInst, xferpktInfo_t *pktInfo)
00547 {
00548    fiuInst_t *inst = (fiuInst_t *) fiuInst;
00549
00550 #ifdef FIU_BAD_PKT_TEST
00551    extern tulong siu_isr_clock;        /* PCM ISR Clock */
00552    tuint i, *temp;
00553    temp = pktInfo;                     /* Assumes one pkt is processed
00554                                           at a time */
00555 #endif
00556
00557    /* Don't process packets unless FIU in OPEN state */
00558    if (inst->state != FIU_ACTIVATED)
00559      return (0);
00560
00561 #ifdef FIU_BAD_PKT_TEST
00562    for (i = 0; i < pkt_size[0]; i ++)
00563    {
00564        *(temp) = siu_isr_clock;        /* Trash the packet */
00565    }
00566 #endif
00567
00568
00569    /* send packets to FND */
00570    fndReceiveIn (inst->fndInst, pktInfo);
00571
00572    return (0);
00573
00574 } /* fiuReceiveIn() */
00575
00576 /******************************************************************************
00577  * FUNCTION PURPOSE: fiuTask routine
00578  ******************************************************************************
00579  * DESCRIPTION: The fiuTask is called every frame. The fiuTask perform FAX
00580  *              protocol processing.  Specifically, the Fax Protocol
00581  *              Task is executed -- performing FAX protocol processing on both
00582  *              fax modem messages and network data/protocol messages. Next,
00583  *              the network driver task is executed to perform any required
00584  *              network encoder and/or decoder operations.
00585  *
00586  *              The order of the function calls is important.  First, the
00587  *              FND task is executed, then the FRP task is executed. The
00588  *              reasoning for this execution order is to allow data to be
00589  *              provided to the modem from the network, preventing modem
00590  *              underruns.
00591  *
00592  * void fiuTask (
00593  *    void       *fiuInst)     -  a pointer to instance structure
00594  *
00595  *****************************************************************************/
00596 void fiuTask (void *fiuInst)
00597 {
00598    fiuInst_t *inst = (fiuInst_t *) fiuInst;
00599
00600    /* Don't process packets unless FIU in OPEN state */
00601    if (inst->state != FIU_ACTIVATED)
00602      return;
00603
00604    fndTask (inst->fndInst);
00605
00606    frpTask (inst->frpInst);
00607
00608 } /* fiuTask() */
00609
00610 /******************************************************************************
00611  * FUNCTION PURPOSE: fiuSendIn routine
00612  ******************************************************************************
00613  * DESCRIPTION: The fiuSendIn is called to pass the messages from the fax
00614  *              modem (FM) to the FIU for processing. The message received
00615  *              from the FM is passed to the FRP module for processing.
00616  *              data is processed by the FRP. The FM to FP message structure
00617  *              is defined in the iffax/iffax.h
00618  *
00619  * void fiuSendIn (
00620  *    void       *fiuInst)     -  a pointer to instance structure
00621  *    void       *message)     -  a pointer to the FM to FP message structure
00622  *
00623  *****************************************************************************/
00624
00625 void fiuSendIn (void *fiuInst, void *message)
00626 {
00627    fiuInst_t *inst = (fiuInst_t *) fiuInst;
00628
00629    /* Don't process packets unless FIU in OPEN state */
00630    if (inst->state != FIU_ACTIVATED)
00631      return;
00632
00633    /* pass the message onto FRP */
00634    frpSendIn (inst->frpInst, message);
00635
00636 } /* fiuTask() */
00637
00638
00639 /******************************************************************************
00640  * FUNCTION PURPOSE: fiuFaxEventHandler routine
00641  ******************************************************************************
00642  * DESCRIPTION: Function called to report event to the system to be acted upon.
00643  *
00644  * void fiuFaxEventHandler (
00645  *    void  *fiuInst,  - a pointer to instance structure
00646  *    tuint eventCode, - event code
00647  *    tuint eventInfo) - associated event information
00648  *
00649  *****************************************************************************/
00650 void fiuFaxEventHandler (void *fiuInst, tuint eventCode, tuint eventInfo)
00651 {
00652    fiuInst_t *inst = (fiuInst_t *) fiuInst;
00653
00654    switch (eventCode)
00655    {
00656       case fiu_EVENT_CLEARDOWN:
00657          faxDebugTrace ((void *) inst, TRC_DBG_LVL_1, TRC_FIU_CLEARDOWN_IND, eventInfo);
00658          break;
00659
00660       case fiu_EVENT_G3_TO_V34:
00661          faxDebugTrace ((void *) inst, TRC_DBG_LVL_1, TRC_FIU_G3_TO_V34, eventInfo);
00662          break;
00663
00664       case fiu_EVENT_V34_TO_G3:
00665          faxDebugTrace ((void *) inst, TRC_DBG_LVL_1, TRC_FIU_V34_TO_G3, eventInfo);
00666          break;
00667    }
00668
00669    (*inst->EventHandlerSpec.fiuEventHandler) (inst->EventHandlerSpec.targetInst,
00670                                               eventCode,
00671                                               eventInfo);
00672
00673    if (eventCode == fiu_EVENT_G3_TO_V34)
00674    {
00675       ((frpInst_t *)(inst->frpInst))->FIUFeatureSelector |= fiu_FEATURE_V34_FAX;
00676    }
00677    else if (eventCode == fiu_EVENT_V34_TO_G3)
00678    {
00679       ((frpInst_t *)(inst->frpInst))->FIUFeatureSelector &= (~fiu_FEATURE_V34_FAX);
00680    }
00681
00682 } /* fiuFaxEventHandler() */
00683
00684 /******************************************************************************
00685  * FUNCTION PURPOSE: Obtain Fax Statistics
00686  ******************************************************************************
00687  * DESCRIPTION: Obtain Fax Statistics - both network and call related.
00688  *
00689  * void fiuGetStats (
00690  *    void           *fiuInst,   -  a pointer to instance structure
00691  *    tbool          freset,     -  flag indicating whether to reset statistics
00692  *    fiuStats_t     *stats)     -  pointer to statistics report structure
00693  *
00694  *****************************************************************************/
00695 void fiuGetStats (void* fiuInst, tbool freset, fiuStats_t *stats)
00696 {
00697    fiuInst_t* inst = (fiuInst_t*) fiuInst;
00698
00699    /* Populate the stats */
00700    *stats = inst->faxStats;
00701
00702    /* Take care of a couple loose ends - ECMUsed and Destination */
00703    stats->MaxHSbufferUsage = (tuint) inst->BufferMgmt.maxUsage;
00704
00705    if (((frpInst_t *) (inst->frpInst))->fDISReceivedFromFTE)
00706    {
00707       stats->Direction = fiu_DIR_DEST;
00708    }
00709    else
00710    {
00711       stats->Direction = fiu_DIR_ORG;
00712    }
00713
00714    /* Reset fax stats if required */
00715    if (freset)
00716      faxResetStats (fiuInst);
00717 }
00718
00719 /******************************************************************************
00720  * FUNCTION PURPOSE: Relocate instantiated FIU instance to another area of
00721  *                   memory
00722  ******************************************************************************
00723  * DESCRIPTION: This function takes an existing (possibly active) instance of
00724  *              FIU and relocates it to another part of the DSP's memory.
00725  *
00726  * ASSUMPTIONS: It is assumed that all memory management is handled external
00727  *              to the fiuReloc function. In particular, it is assumed that
00728  *              the calling code has allocated adequate memory for the new FIU
00729  *              instance and its associated runtime (synamic) buffers; that
00730  *              the newly allocated memory space is contiguous; and that the
00731  *              new memory has been overwritten with the contents of the old
00732  *              FIU instance structure using the memcopy() library function
00733  *              (in string.h).
00734  *
00735  * void fiuReloc (
00736  *         void **newFiuInst,     - Address of a location in which a ptr to
00737  *                                     the new FIU instance will be written
00738  *         void *oldFiuInst,        - Pointer to the old FIU instance
00739  *         ecomemBuffer_t *newFiuBufs)  - Ptr to memory block where new FIU
00740  *                                     buffers will be located
00741  *
00742  *****************************************************************************/
00743 #ifdef FIU_RELOC
00744 void fiuReloc (void **newFiuInst, void *oldFiuInst, ecomemBuffer_t *newFiuBufs)
00745 {
00746   tuint offset; /* Used to calculate ptr offsets from memory buffer bases */
00747   tint count = 0; /* Used to count # free HS buffers that are reloc'd */
00748   fiuInst_t *oldFiu, *newFiu;  /* Local instance pointers */
00749   ecomemBuffer_t *bufp;  /* Addr of memory buffer descriptor */
00750
00751   /* Ptrs to structs that contain addresses of old and new FIU buffers */
00752   fiuRelocInstance_t oldFiuRelocStruct, newFiuRelocStruct;
00753
00754   /* Locals used to traverse FIU hi-speed buffer linked list */
00755   faxBufferLinkedList_t *oldFiuBufferLinkedListPtr, *newFiuBufferLinkedListPtr;
00756
00757   /* Indicate to debug trace utility that fiuReloc() has been called */
00758   faxDebugTrace (oldFiuInst, TRC_DBG_LVL_1, TRC_FIU_RELOC, 0);
00759
00760   /*  Cast old FIU instance structure */
00761   oldFiu = (fiuInst_t *) oldFiuInst;
00762
00763   /* Set old reloc struct pointers to old FIU buffers - FIU, FRP & FND */
00764   oldFiuRelocStruct.fiuInst = (void *) oldFiu;
00765   oldFiuRelocStruct.frpInst = (void *) oldFiu->frpInst;
00766   oldFiuRelocStruct.fndInst = (void *) oldFiu->fndInst;
00767
00768   /*  Identify new FIU instance structure */
00769   bufp = &newFiuBufs[FIU_INSTANCE_BUFN];
00770   newFiu = (fiuInst_t *) bufp->base;
00771
00772   /* Identify new FRP instance structure */
00773   newFiu->frpInst = (void *) (++bufp)->base;
00774
00775   /* Identify new FND instance structure */
00776   newFiu->fndInst = (void *) (++bufp)->base;
00777
00778   /* Set new reloc struct pointers to new FIU buffers - FIU, FRP & FND */
00779   newFiuRelocStruct.fiuInst = (void *) newFiu;
00780   newFiuRelocStruct.frpInst = (void *) newFiu->frpInst;
00781   newFiuRelocStruct.fndInst = (void *) newFiu->fndInst;
00782
00783   /* Relocate HS Buffer free buffer linked list */
00784   if (oldFiu->BufferMgmt.nextFree != NULL)
00785   {
00786      /* HS Buffer Management relocation part 1 - update nextFree ptr */
00787      offset = COMPUTE_MEMORY_OFFSET (oldFiu, oldFiu->BufferMgmt.nextFree);
00788      newFiu->BufferMgmt.nextFree = ADD_MEMORY_OFFSET (offset, newFiu);
00789      count = 1;  /* increment reloc'd HS buffer count by one */
00790
00791      /* HS Buffer Management relocation part 2 - update linked list of unallocated HS buffers */
00792      oldFiuBufferLinkedListPtr = (faxBufferLinkedList_t *) oldFiu->BufferMgmt.nextFree;
00793      newFiuBufferLinkedListPtr = (faxBufferLinkedList_t *) newFiu->BufferMgmt.nextFree;
00794      while (oldFiuBufferLinkedListPtr->next != NULL)
00795      {
00796         offset = COMPUTE_MEMORY_OFFSET (oldFiu, oldFiuBufferLinkedListPtr->next);
00797         newFiuBufferLinkedListPtr->next = ADD_MEMORY_OFFSET (offset, newFiu);
00798         oldFiuBufferLinkedListPtr = (faxBufferLinkedList_t *) oldFiuBufferLinkedListPtr->next;
00799         newFiuBufferLinkedListPtr = (faxBufferLinkedList_t *) newFiuBufferLinkedListPtr->next;
00800         count ++; /* increment reloc'd HS buffer count by one */
00801      }
00802   }
00803
00804   /* Call individual relocation functions , one for each FIU module */
00805   fndReloc ((void *) &newFiuRelocStruct, (void *) &oldFiuRelocStruct);
00806   frpReloc ((void *) &newFiuRelocStruct, (void *) &oldFiuRelocStruct);
00807
00808   /* Return new FIU instance pointer */
00809   *newFiuInst = (void *) newFiu;
00810
00811 } /* fiuReloc() */
00812 #endif /* FIU_RELOC */
00813
00814 /******************************************************************************
00815  * FUNCTION PURPOSE: Utility function for validating a fax relay packet
00816  ******************************************************************************
00817  * DESCRIPTION: This routine checks if the packet is a valid fax relay packet.
00818  *              Currently, only T.38 UDPTL is supported.
00819  *
00820  * void fiuValidatePkt (
00821  *    faxNetProtocol_e netProtocolType, - network protocol type
00822  *    word             *pkt,            - pointer to the packet to be validated
00823  *    tuint            pktSize)         - size of the packet
00824  *
00825  * RETURN VALUE: TRUE  - packet is valid
00826  *               FALSE - packet is invalid or network protocol is not supported
00827  *
00828  *****************************************************************************/
00829 tbool fiuValidatePkt (fiuNetProtocol_e netProtocolType, tword *pkt, tuint pktSize)
00830 {
00831   if (netProtocolType == fiu_PT_T38_UDPTL)
00832   {
00833      return (fndt38udpValidatePkt(pkt, pktSize));
00834   }
00835   else
00836   {
00837      return FALSE;
00838   }
00839
00840 } /* fiuValidatePkt() */
00841
00842 /* nothing past this point */
00843


FIU: fiu.h File Reference

fiu.h File Reference

Detailed Description

Fax Interface Unit API and Data Definitions.

path /dsps_gtmas/ti/mas/fiu/fiu.h

============================================================================ Copyright (c) Texas Instruments Incorporated 2002-2007

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

Definition in file fiu.h.

#include <ti/mas/types/types.h>
#include <ti/mas/iface/ifpkt/xferpkt.h>
#include <ti/mas/iface/iffax/iffax.h>
#include <ti/mas/util/debug.h>
#include <ti/mas/util/ecomem.h>

Include dependency graph for fiu.h:

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

Go to the source code of this file.

Data Structures

struct | fiuContext_t
The FIU software module has a global context structure that contains non channel specific configuration information which is used by all active FIU instances. FIU Context is a structure that must be declared globally by system code, and initialized prior to any calls to the FIU API. More...
struct | fiuEventHandlerSpec_t
Specification of fiuEventHandlerSpec Object This structure contains the address of function and associated data structure for reporting events to the system for processing. More...
struct | fiuSendOutSpec_t
Specification of fiuSendOutSpec Object This structure contains the address of function and associated data structure for sending FAX packets to the network. More...
struct | fiuReceiveOutSpec_t
Specification of fiuReceiveOutSpec Object. More...
struct | fiuSizeCfg_t
FIU Size Configuration structure. More...
struct | fiuNewConfig_t
New Configuration structure. More...
struct | fiuNetCallTbl_t
FIU Protocol Call Table. More...
struct | fiuOpenConfig_t
Open Configuration structure. More...
struct | fiuControlConfig_t
Control Configuration structure. More...
struct | fiuNSFInfo_t
NSF Information data structure. More...
struct | fiuStats_t
FIU Statistics Structure. More...
struct | fiuRelocInstance_t
FIU Relocation structure. More...

Defines

#define | fiu_NOMEMORY (-1)
#define | fiu_NOERR 0
#define | fiu_ERROR 1
#define | fiu_DBG_OFF 0
#define | fiu_DBG_LVL_1 1
#define | fiu_DBG_LVL_2 2
#define | fiu_DBG_INFORMATIONAL 0
#define | fiu_DBG_FATAL_ERROR 2
#define | fiu_EVENT_CLEARDOWN 0
#define | fiu_EVENT_G3_TO_V34 1
#define | fiu_EVENT_V34_TO_G3 2
#define | fiu_SWITCHOVER_V8_CM_RCVD_LOCAL 0
#define | fiu_SWITCHOVER_V8_CM_RCVD_REMOTE 1
#define | fiu_SWITCHOVER_V8_CI_RCVD_LOCAL 2
#define | fiu_SWITCHOVER_V8_CI_RCVD_REMOTE 3
#define | fiu_SWITCHOVER_V8_ANSAM_RCVD_REMOTE 4
#define | fiu_SWITCHOVER_PREAMBLE_RCVD_REMOTE 5
#define | fiu_SWITCHOVER_V34_NOT_SUPPORTED 6
#define | fiu_T30FEATURE_ECM_DISABLE 0x0001
#define | fiu_T30FEATURE_MR_DISABLE 0x0002
#define | fiu_T30FEATURE_V34_DISABLE 0x0004
#define | fiu_FEATURE_SLF_ENABLE 0x0001
#define | fiu_FEATURE_DIS_EFLAG_DISABLE 0x0002
#define | fiu_FEATURE_TFOP_FC_REPEAT 0x0004
#define | fiu_FEATURE_NSF_OVERRIDE 0x0008
#define | fiu_FEATURE_RTP_TS_PROC_DISABLE 0x0010
#define | fiu_FEATURE_AAL2_CID_CHK_DISABLE 0x0020
#define | fiu_FEATURE_MDM_TRN_FAIL_COMP 0x0040
#define | fiu_FEATURE_V34_FAX 0x0080
#define | fiu_FEATURE_T38_VOCALTEC_INTEROP 0x0100
#define | fiu_CALL_SUCCESS_BITFIELD_CLEAR 0x0000
#define | fiu_CALL_SUCCESS_BITFIELD_EOP 0x8000
#define | fiu_CALL_SUCCESS_BITFIELD_MCF 0x4000
#define | fiu_CALL_SUCCESS_BITFIELD_EOM 0x2000
#define | fiu_CALL_SUCCESS_BITFIELD_DCN_LOCAL 0x1000
#define | fiu_CALL_SUCCESS_BITFIELD_DCN_REMOTE 0x0800
#define | fiu_CALL_SUCCESS_BITFIELD_DIS_AFTER_EOM 0x0400
#define | fiu_NSF_CC_UNKNOWN 0xFFFF
NSF field definitions:.
#define | fiu_NSF_MC_UNKNOWN 0xFFFF

Enumerations

enum | fiuControlCode_e { fiu_CTRL_ACTIVATE = 1, fiu_CTRL_CONFIG }
enum fiuNetProtocol_e {
fiu_PT_T2, fiu_PT_T3, fiu_PT_FRF11, fiu_PT_RTP,
fiu_PT_T38_UDPTL, fiu_PT_T38_UDPTL_RTP, fiu_PT_AAL2, fiu_PT_RTPB,
fiu_PT_T38_RTP
}
enum | fiuDirection_e { fiu_DIR_ORG, fiu_DIR_DEST, fiu_DIR_UNKNOWN = 0x00FF }
Direction definitions. More...

Functions

ECO (Telogy Embedded Communication Object) APIs
tint | fiuGetSizes (tint *nbufs, const ecomemBuffer_t **bufs, fiuSizeCfg_t *SizeCfg)
This function obtains memory requirements for an instance of FIU.
tint | fiuNew (void **fiuInst, tint nbufs, ecomemBuffer_t *bufs, fiuNewConfig_t *cfg)
This function creates an instance of FIU and initializes the memory buffer pointers in the instance.
Remarks:
Function fiuNew() must be called before fiuOpen()is called.

void | fiuDelete (void **fiuInst)
This function deletes the FIU instance identified by fiuInst.
Remarks:
FIU must be closed prior to being deleted.

void | fiuControl (void *fiuInst, fiuControlCode_e ctrlCode, fiuControlConfig_t *ctrlConfig)
This function controls the operations of an instance of FIU.
tint | fiuOpen (void *fiuInst, fiuOpenConfig_t *cfg)
This function initializes and configures an FIU instance.
void | fiuClose (void *fiuInst)
This function closes the FIU instance identified by fiuInst. It sets the state of FIU to CLOSED.
tint | fiuReceiveIn (void *fiuInst, xferpktInfo_t *pktInfo)
This function processes packets received from the network.
void | fiuSendIn (void *fiuInst, void *message)
This function passes a message from a fax modem module (FM) to FIU for processing.
void | fiuTask (void *fiuInst)
Routine which performs fax protocol processing and network encoder/decoder operations.
void | fiuReloc (void **newFiuInst, void *oldFiuInst, ecomemBuffer_t *newFiuBufs)
Relocates an instantiated FIU instance to another area of memory.
void | fiuGetStats (void *fiuInst, tbool freset, fiuStats_t *stats)
Routine which obtains FIU statistics (both network- and call-specific) The stats can be requested from either an active call, or the last call if the current call session has been terminated.
tbool | fiuValidatePkt (fiuNetProtocol_e netProtocolType, tword *pkt, tuint pktSize)
Validates T.38 UDP packet This routine checks if the packet is a valid fax relay packet. Currently, only T.38 UDPTL is supported.

Variables

fiuContext_t fiuContext
reference of FIU Context Structure


FIU: fiu.h Source File

fiu.h

Go to the documentation of this file.
00001 #ifndef _FIU_H
00002 #define _FIU_H
00003
00004 /* ========================================================================== */
00023 /* @{ */
00024
00025 /* System level header files */
00026 #include <ti/mas/types/types.h>
00027 #include <ti/mas/iface/ifpkt/xferpkt.h>
00028 #include <ti/mas/iface/iffax/iffax.h>
00029 #include <ti/mas/util/debug.h>
00030
00031 /* Memory management definitions */
00032 #include <ti/mas/util/ecomem.h>
00033
00042 typedef struct {
00049    void *      (*allocBuffer) (tuint);
00050
00056    tbool       (*freeBuffer) (tuint, void *);
00057
00066    tuint       SupportedExternalBuffSize;
00067
00073    tulong (*faxSystemTime) (void);
00074
00079    dbgInfo_t faxDebugTrace;
00084    void (*faxCriticalSectionBegin) (void);
00089    void (*faxCriticalSectionEnd)   (void);
00090 } fiuContext_t;
00091
00096 extern fiuContext_t fiuContext;
00097
00098
00103 /* @{ */
00108 #define fiu_NOMEMORY    (-1)
00109
00113 #define fiu_NOERR        0
00114
00118 #define fiu_ERROR        1
00119 /* @} */ /* ingroup */
00120
00125 /* @{ */
00130 #define fiu_DBG_OFF   0
00131
00140 #define fiu_DBG_LVL_1 1
00141
00145 #define fiu_DBG_LVL_2 2
00146
00147 /* @} */ /* ingroup */
00148
00153 /* @{ */
00154 typedef enum {
00155   fiu_CTRL_ACTIVATE = 1,
00156   fiu_CTRL_CONFIG
00157 } fiuControlCode_e;
00158 /* @} */ /* ingroup */
00159
00160
00161
00166 /* @{ */
00171 #define fiu_DBG_INFORMATIONAL   0
00172
00176 #define fiu_DBG_FATAL_ERROR     2
00177 /* @} */ /* ingroup */
00178
00179
00184 /* @{ */
00190 #define fiu_EVENT_CLEARDOWN 0
00191
00196 #define fiu_EVENT_G3_TO_V34 1
00197
00202 #define fiu_EVENT_V34_TO_G3 2
00203
00204 /* @} */ /* ingroup */
00205
00206
00211 /* @{ */
00216 #define fiu_SWITCHOVER_V8_CM_RCVD_LOCAL     0
00217
00221 #define fiu_SWITCHOVER_V8_CM_RCVD_REMOTE    1
00222
00226 #define fiu_SWITCHOVER_V8_CI_RCVD_LOCAL     2
00227
00231 #define fiu_SWITCHOVER_V8_CI_RCVD_REMOTE    3
00232
00236 #define fiu_SWITCHOVER_V8_ANSAM_RCVD_REMOTE 4
00237
00241 #define fiu_SWITCHOVER_PREAMBLE_RCVD_REMOTE 5
00242
00246 #define fiu_SWITCHOVER_V34_NOT_SUPPORTED    6
00247 /* @} */ /* ingroup */
00248
00249
00256 /* @{ */
00257 typedef enum {
00258   fiu_PT_T2,
00259   fiu_PT_T3,
00260   fiu_PT_FRF11,
00261   fiu_PT_RTP,
00262   fiu_PT_T38_UDPTL,
00263   fiu_PT_T38_UDPTL_RTP,
00264   fiu_PT_AAL2,
00265   fiu_PT_RTPB,
00266   fiu_PT_T38_RTP
00267 } fiuNetProtocol_e;
00268 /* @} */ /* ingroup */
00269
00270
00279 /* @{ */
00284 #define fiu_T30FEATURE_ECM_DISABLE 0x0001
00285
00289 #define fiu_T30FEATURE_MR_DISABLE  0x0002
00290
00294 #define fiu_T30FEATURE_V34_DISABLE 0x0004
00295 /* @} */ /* ingroup */
00296
00297
00305 /* @{ */
00310 #define fiu_FEATURE_SLF_ENABLE           0x0001
00311
00316 #define fiu_FEATURE_DIS_EFLAG_DISABLE    0x0002
00317
00322 #define fiu_FEATURE_TFOP_FC_REPEAT       0x0004
00323
00328 #define fiu_FEATURE_NSF_OVERRIDE         0x0008
00329
00334 #define fiu_FEATURE_RTP_TS_PROC_DISABLE  0x0010
00335
00339 #define fiu_FEATURE_AAL2_CID_CHK_DISABLE 0x0020
00340
00346 #define fiu_FEATURE_MDM_TRN_FAIL_COMP    0x0040
00347
00353 #define fiu_FEATURE_V34_FAX              0x0080
00354
00359 #define fiu_FEATURE_T38_VOCALTEC_INTEROP 0x0100
00360 /* @} */ /* ingroup */
00361
00362
00368 typedef struct  {
00373    void (*fiuEventHandler) (void *targetInst, tuint eventCode, tuint eventInfo);
00374    void *targetInst;
00375 } fiuEventHandlerSpec_t;
00376
00382 typedef struct  {
00393    tint (*fiuSendOut)(void *targetInst, xferpktInfo_t *pktInfo);
00394    void *targetInst;
00395 } fiuSendOutSpec_t;
00396
00410 typedef struct {
00415   tint (*fiuReceiveOut) (void *targetInst, void *message);
00416   void *targetInst;
00417 } fiuReceiveOutSpec_t;
00418
00425 typedef struct {
00426   tint NumInternalFIUBufs;
00429   tint NumInternalFIUOverlayBufs;
00431 } fiuSizeCfg_t;
00432
00439 typedef struct {
00440   tuint        ID;
00441   fiuSizeCfg_t SizeConfig;
00442 } fiuNewConfig_t;
00443
00450 typedef struct {
00451   fiuNetProtocol_e           NetProtocol;
00452   tint  (*faxNetInit)        (void *fndInst, void *cfg);
00453   void  (*faxNetDecoder)     (void *fndInst, xferpktInfo_t *pktInfo);
00454   void  (*faxNetDecoderTask) (void *fndInst);
00455   void  (*faxNetEncoder)     (void *fndInst,void *msg);
00456   void  (*faxNetEncoderTask) (void *fndInst);
00457   void  (*faxNetClose)       (void *fndInst);
00458   void  (*faxNetReloc)       (void *newRelocInstStruct,
00459                               void *oldRelocInstStruct);
00460 } fiuNetCallTbl_t;
00461
00468 typedef struct {
00469   tuint                frameSize;
00470   iffaxRate_e          MaxFaxRate;
00471   tuint                dbgMode;
00472   tuint                RtpPayloadType;
00474   tulong               RtpSyncSource;
00476   tint                 HSPktPayloadSize;
00478   tint                 LSPktPayloadSize;
00480   tint                 LsDataRedundancy;
00482   tint                 HsDataRedundancy;
00484   tuint                TCFHandlingMethod;
00486   tint                 T38Version;
00492   tuint                faxNomDelay;
00493   tint                 faxPacketSize;
00494   tulong               NoActivityTimerVal;
00495   tuint                AAL2cid;
00496   fiuSendOutSpec_t     SendOutSpec;
00499   fiuReceiveOutSpec_t  ReceiveOutSpec;
00502   fiuEventHandlerSpec_t EventHandlerSpec;
00504   tulong               StartupTimer;
00508   tuint                CleardownTimer;
00512   fiuNetCallTbl_t      **faxNetCallTblPtr;
00513   fiuNetProtocol_e     NetProtocol;
00514   tulong               LocalTxNetTimeOutVal;
00516   tulong               EflagStartTimer;
00519   tulong               EflagStopTimer;
00522   tuint                T30FeatureSelector;
00525   tuint                FIUFeatureSelector;
00532   /* @{ */
00533   tword                NSFCountryCode;
00534   tword                NSFVendorCodeMSB;
00535   tword                NSFVendorCodeLSB;
00536   /* @} */
00537
00538 } fiuOpenConfig_t;
00539
00546 typedef struct {
00547   fiuReceiveOutSpec_t  ReceiveOutSpec;
00550   tuint                frameSize;
00551 } fiuControlConfig_t;
00552
00561 /* @{ */
00562 #define fiu_CALL_SUCCESS_BITFIELD_CLEAR         0x0000
00563 #define fiu_CALL_SUCCESS_BITFIELD_EOP           0x8000
00564 #define fiu_CALL_SUCCESS_BITFIELD_MCF           0x4000
00565 #define fiu_CALL_SUCCESS_BITFIELD_EOM           0x2000
00566 #define fiu_CALL_SUCCESS_BITFIELD_DCN_LOCAL     0x1000
00567 #define fiu_CALL_SUCCESS_BITFIELD_DCN_REMOTE    0x0800
00568 #define fiu_CALL_SUCCESS_BITFIELD_DIS_AFTER_EOM 0x0400
00569 /* @} */ /* ingroup */
00570
00574 typedef enum {
00575   fiu_DIR_ORG,
00576   fiu_DIR_DEST,
00577   fiu_DIR_UNKNOWN = 0x00FF
00578 } fiuDirection_e;
00579
00590 typedef struct {
00591   tuint NSFCountryCode;
00592   tuint NSFManufacturer;
00593 } fiuNSFInfo_t;
00594
00598 #define fiu_NSF_CC_UNKNOWN  0xFFFF
00599 #define fiu_NSF_MC_UNKNOWN  0xFFFF
00607  typedef struct {
00608   tuint    MaxJitterBufDepth;
00609   tuint    MaxNetRxQDepth;
00610   tuint    JitterBufOverFlow;
00611   tuint    NetRxQOverFlow;
00612   tuint    RxInvalidPackets;
00613   tulong   RxOutOfSeqPacket;
00614   tulong   TxPackets;
00615   tulong   TxPacketsDropped;
00617   tulong   RxPackets;
00618   tulong   RxLostPackets;
00620   tuint    HSmodulation;
00621   tuint    NumberOfPages;
00622   tbool    ECMused;
00623   tuint    sendInQMaxDepth;
00624   tuint    RxOutQMaxDepth;
00625   tuint    MaxHSbufferUsage;
00626   tuint    sendInQOverflows;
00627   tuint    RxOutQOverflows;
00628   fiuDirection_e  Direction;
00629   fiuNSFInfo_t    NSFInfo;
00630   tulong          Bytes_From_Net ;
00631   tulong          Bytes_To_Net;
00632   tuint           Call_Success_Bitfield;
00633  } fiuStats_t;
00634
00642 typedef struct {
00643   void    *fiuInst;
00644   void    *frpInst;
00645   void    *fndInst;
00646 } fiuRelocInstance_t;
00647
00652
00664 tint  fiuGetSizes     (tint *nbufs, const ecomemBuffer_t **bufs,
00665                        fiuSizeCfg_t * SizeCfg);
00666
00684 tint  fiuNew          (void **fiuInst, tint nbufs, ecomemBuffer_t *bufs,
00685                        fiuNewConfig_t *cfg);
00686
00687
00696 void  fiuDelete       (void **fiuInst);
00697
00698
00709 void  fiuControl      (void *fiuInst, fiuControlCode_e ctrlCode, fiuControlConfig_t *ctrlConfig);
00710
00722 tint  fiuOpen         (void *fiuInst, fiuOpenConfig_t *cfg);
00723
00730 void  fiuClose        (void *fiuInst);
00731
00732
00733
00741 tint  fiuReceiveIn    (void *fiuInst, xferpktInfo_t *pktInfo);
00742
00743
00754 void  fiuSendIn       (void *fiuInst, void *message);
00755
00771 void  fiuTask         (void *fiuInst);
00772
00792 void  fiuReloc        (void **newFiuInst, void *oldFiuInst,
00793                        ecomemBuffer_t *newFiuBufs);
00794
00803 void  fiuGetStats     (void* fiuInst, tbool freset, fiuStats_t *stats);
00804
00815 tbool fiuValidatePkt   (fiuNetProtocol_e netProtocolType, tword *pkt, tuint pktSize);
00816  /* @name ECO APIs */
00818
00819 /* @} */ /* ingroup */
00820
00821 #endif /* _FIU_H */
00822
00823 /* nothing past this point */


FIU: fiudbg.c File Reference

fiudbg.c File Reference

#include <ti/mas/types/types.h>
#include <ti/mas/fiu/fiu.h>
#include "fiuloc.h"
#include <ti/mas/fiu/src/frtrace.h>

Include dependency graph for fiudbg.c:

Go to the source code of this file.


FIU: fiudbg.c Source File

fiudbg.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: FIU Debug Trace Routines
00003  ******************************************************************************
00004  * FILE NAME: fiudbg.c
00005  *
00006  * DESCRIPTION: Contains all routines for real-time debug tracing.  Present
00007  *              Telogy real-time trace involves the sending of trace data
00008  *              to a remote terminal through the XF pin on the C54x.  Optionally
00009  *              trace data can be stored internally in the DSP memory.
00010  *              Debug tracing involves two stages: (1) the Task sends a debug
00011  *              trace message which is converted to a character format and
00012  *              stored in a trace buffer. (2) Every PCM interrupt the
00013  *              fiuFaxmon() routine is executed which serially transmits a single
00014  *              character to remoted hardware through the XF pin.
00015  *              The trace character format is:
00016  *
00017  *                          1 character   -->  Channel number
00018  *                          2 characters  -->  Trace Message ID
00019  *                          4 characters  -->  Supporting Data
00020  *                          4 characters  -->  Timestamp
00021  *                          1 character   -->  carriage return
00022  *                          1 character   -->  \n
00023  *
00024  *               Currently, the debug trace is not channel specific.
00025  *               channel data is sent through the same buffer.  There is the
00026  *               capability to turn-off the trace utility to enable other uses
00027  *               of XF pin by setting the dbgMode in the open channel
00028  *               configuration to fiu_DBG_OFF.
00029  *
00030  *
00031  * FUNCTION               DESCRIPTION
00032  * ========               ===========
00033  * fiuFaxmonInit()        Initializes Debug trace utility.
00034  * fiuFaxmon()            PCM ISR routine for serially transmitting a character
00035  *                        via the XF pin.
00036  * fiuWriteDebugTrace()   Function called by Tasks to send a Debug trace message
00037  *
00038  * TABS: NONE
00039  *
00040  * $Id: fiudbg.c 1.6 2000/05/31 11:24:29 sakhtar Exp $
00041  *
00042  * REVISION HISTORY:
00043  *
00044  * $Log: fiudbg.c $
00045  * Revision 1.6  2000/05/31 11:24:29  sakhtar
00046  * Added a compile time option to save debug traces in a temporary buffer
00047  * for use with code composer
00048  * Revision 1.5  1998/11/17 15:47:05  ffruth
00049  * Revision 1.4  1998/09/14 15:41:43  ffruth
00050  * Revision 1.2.1.1  1998/08/03 18:13:27  ffruth
00051  * - Tuned for C542.
00052  * Revision 1.2  1998/07/29 13:06:07  ffruth
00053  * Clean up LINT results.
00054  * Revision 1.1  1998/07/24 17:52:37  ffruth
00055  * Initial revision
00056  *
00057  * DATE         Programmer      Description
00058  * ====         ==========      ===========
00059  * 21-Jul-98    F. Fruth        Created
00060  * 14-Sep-98    F. Fruth        Implemented compile options for XF-FAXMON.
00061  *                              This implementation is for C542.
00062  * 16-Nov-98    F. Fruth        Modified for C548-75MHz support.
00063  *
00064  * (C) Copyright 1998, TELOGY Networks, Inc.
00065  *****************************************************************************/
00066 /* System level header files */
00067 #include <ti/mas/types/types.h>
00068
00069 /* FIU header files */
00070 #include <ti/mas/fiu/fiu.h>
00071 #include "fiuloc.h"
00072 #include <ti/mas/fiu/src/frtrace.h>
00073
00074 /*******************************************************************************
00075 * DATA DEFINITION: Buffer for code composer debugging utility. Any changes
00076 *                  made to the data would require updating the code composer
00077 *                  gel files
00078 *
00079 *******************************************************************************/
00080 #ifdef FAX_CC_DBG
00081
00082 /* Define the size of the debug FIFO in words */
00083 #define DBG_CC_FIFO_SIZE 500
00084
00085 /* Define the structure used for debugging */
00086 typedef struct
00087 {
00088   tuint ID;
00089   tuint msg_id;
00090   tuint msg_data;
00091   tuint timestamp;
00092 } fiuCCDbgBuffer_t;
00093
00094 fiuCCDbgBuffer_t fiuCCDbgBuffer[DBG_CC_FIFO_SIZE];
00095 tuint fiuCCDbgCnt = 0;
00096 tuint fFiuCCDDebugBufCircular = FALSE;
00097
00098 void fiuCCDbgTrace (tuint ID, tuint msg_id, tuint supp_data, tuint timestamp)
00099 {
00100   if ((fFiuCCDDebugBufCircular == TRUE) && (fiuCCDbgCnt >= DBG_CC_FIFO_SIZE))
00101      fiuCCDbgCnt = 0;
00102
00103   if (fiuCCDbgCnt < DBG_CC_FIFO_SIZE)
00104   {
00105     fiuCCDbgBuffer[fiuCCDbgCnt].ID          = ID;
00106     fiuCCDbgBuffer[fiuCCDbgCnt].msg_id      = msg_id;
00107     fiuCCDbgBuffer[fiuCCDbgCnt].msg_data    = supp_data;
00108     fiuCCDbgBuffer[fiuCCDbgCnt++].timestamp = timestamp;
00109   }
00110 }
00111 #endif
00112
00113 /* nothing past this point */
00114


FIU: fiuloc.h File Reference

fiuloc.h File Reference

#include <ti/mas/types/types.h>
#include <ti/mas/fiu/src/faxutil.h>
#include <ti/mas/fiu/fiu.h>
#include <ti/mas/fiu/src/frp/frp.h>

Include dependency graph for fiuloc.h:

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

Go to the source code of this file.

Data Structures

struct | fiuInst_s

Defines

#define | FIU_CLOSED 0
#define | FIU_OPEN 1
#define | FIU_ACTIVATED 2
#define | fiu_exc_assert(expr, inst, code)

Typedefs

typedef fiuInst_s | fiuInst_t

Functions

void | fiuFaxEventHandler (void *fiuInst, tuint eventCode, tuint eventInfo)

Define Documentation

#define FIU_CLOSED 0

Definition at line 61 of file fiuloc.h.

Referenced by fiuClose(), fiuControl(), fiuDelete(), and fiuOpen().

#define FIU_OPEN 1

Definition at line 62 of file fiuloc.h.

Referenced by fiuControl(), and fiuOpen().

#define FIU_ACTIVATED 2

Definition at line 63 of file fiuloc.h.

Referenced by fiuControl(), fiuReceiveIn(), fiuSendIn(), and fiuTask().

#define fiu_exc_assert | ( | expr,
 |  | inst,
 |  | code | )

Value:

{                     \
  ((expr) ? ((void)0)  :                                \
             faxException((inst), code));     \
}

Definition at line 96 of file fiuloc.h.

Referenced by faxBufferFree(), fiuClose(), fiuDelete(), and fiuOpen().

Typedef Documentation

typedef struct fiuInst_s fiuInst_t

Function Documentation

void fiuFaxEventHandler | ( | void * | fiuInst,
 |  | tuint | eventCode,
 |  | tuint | eventInfo
 | ) |  |

Definition at line 650 of file fiu.c.

References fiuInst_s::EventHandlerSpec, faxDebugTrace(), fiu_EVENT_CLEARDOWN, fiu_EVENT_G3_TO_V34, fiu_EVENT_V34_TO_G3, fiu_FEATURE_V34_FAX, fiuEventHandlerSpec_t::fiuEventHandler, fiuInst_s::frpInst, fiuEventHandlerSpec_t::targetInst, TRC_DBG_LVL_1, TRC_FIU_CLEARDOWN_IND, TRC_FIU_G3_TO_V34, and TRC_FIU_V34_TO_G3.

Referenced by fiuOpen().

Here is the call graph for this function:


FIU: fiuloc.h Source File

fiuloc.h

Go to the documentation of this file.
00001 #ifndef _FIULOC_H
00002 #define _FIULOC_H
00003 /******************************************************************************
00004  * FILE PURPOSE: Define private Fax Interface Unit (FIU) definitions
00005  ******************************************************************************
00006  * FILE NAME: fiuloc.h
00007  *
00008  * DESCRIPTION: Define private data and function prototypes for the Fax
00009  *              Interface Unit (FIU).
00010  *
00011  *
00012  * TABS: NONE
00013  *
00014  * $Id: fiuloc.h 1.7 2000/05/31 11:24:29 sakhtar Exp $
00015  *
00016  * REVISION HISTORY:
00017  *
00018  * $Log: fiuloc.h $
00019  * Revision 1.7  2000/05/31 11:24:29  sakhtar
00020  * Added a compile time option to save debug traces in a temporary buffer
00021  * for use with code composer
00022  * Revision 1.6  2000/04/10 14:44:07  sakhtar
00023  * Modified to move the definition of data buffer structure to fax common
00024  * files (C54x\faxport.h)
00025  * Revision 1.5  1999/10/22 16:27:29  ffruth
00026  * - First phase of scan line fix-up completed.
00027  * Revision 1.4  1998/12/04 11:44:29  sakhtar
00028  * same as version 1.3.1.1
00029  * Revision 1.3.1.1  1998/11/13 12:55:39  ffruth
00030  * Revision 1.3  1998/09/14 15:35:22  ffruth
00031  * Revision 1.2  1998/07/29 13:06:44  ffruth
00032  * - Clean up LINT results.
00033  * Revision 1.1  1998/07/24 17:52:38  ffruth
00034  * Initial revision
00035  *
00036  * DATE         Programmer      Description
00037  * ====         ==========      ===========
00038  * 21-Jul-98    F. Fruth        Created
00039  * 14-Sep-98    F. Fruth        Implemented changes for debugInfo() API
00040  *                              enhancing FAXMON capabilities.
00041  * 12-Nov-98    F. Fruth        Increased number of high-speed buffers to 100
00042  *                              from 85.
00043  *
00044  * (C) Copyright 1998, TELOGY Networks, Inc.
00045  *****************************************************************************/
00046
00047 /* System level header files */
00048 #include <ti/mas/types/types.h>
00049
00050 /* Fax-wide generic resources */
00051 #include <ti/mas/fiu/src/faxutil.h>
00052
00053 /* FIU header files */
00054 #include <ti/mas/fiu/fiu.h>
00055
00056 #include <ti/mas/fiu/src/frp/frp.h>
00057
00058 /******************************************************************************
00059  * Definition of FIU states
00060  *****************************************************************************/
00061 #define FIU_CLOSED    0
00062 #define FIU_OPEN      1
00063 #define FIU_ACTIVATED 2
00064
00065 /******************************************************************************
00066  * DATA DEFINITION:  FIU instance structure definition
00067  ******************************************************************************
00068  * DESCRIPTION:  Defines the Instance structure for FIU.
00069  *****************************************************************************/
00070 typedef struct fiuInst_s {
00071    tuint               ID;             /* User-specified module ID */
00072    tuint               state;          /* Current state of FIU-OPEN or CLOSED */
00073    tuint               dbgMode;        /* Current debug mode:
00074                                           fiu_DBG_OFF   - no information
00075                                           fiu_DBG_LVL_1 - FRP stat info
00076                                           fiu_DBG_LVL_2 - complete info */
00077    void                *fndInst;       /* Pointer to FND instance */
00078    void                *frpInst;       /* Pointer to FRP instance */
00079    fiuEventHandlerSpec_t EventHandlerSpec;  /* Specifies call-out for
00080                                                reporting event */
00081    faxBufferMgmt_t     BufferMgmt;     /* High-speed buffer management */
00082
00083    tword               *overlayBuf;
00084    tuint               overlayBufSizeWords;
00085    tuint               fOverlayBufInit;
00086
00087    fiuStats_t          faxStats;       /* Fax network and call statistics */
00088 } fiuInst_t;
00089
00090 /******************************************************************************
00091  * EXCEPTION MACRO
00092  *****************************************************************************/
00093 /*  Assert macro for the exception. Processor directive FIU_INC_EXCEPTION */
00094 /*  determines whether exception call is included or not.                  */
00095 #if 1
00096 #define fiu_exc_assert(expr,inst,code) {                     \
00097   ((expr) ? ((void)0)  :                                \
00098              faxException((inst), code));     \
00099 }
00100 #else
00101 #define fiu_exc_assert(expr,inst, code)
00102 #endif
00103
00104 /******************************************************************************
00105  * Internal FIU functions:
00106  *****************************************************************************/
00107
00108 /* (fiu.c) */
00109 void fiuFaxEventHandler (void *fiuInst, tuint eventCode, tuint eventInfo);
00110
00111 #ifdef FAX_CC_DBG
00112   void fiuCCDbgTrace (tuint ID, tuint msg_id, tuint supp_data,tuint timestamp);
00113 #endif
00114
00115 #endif /* _FIULOC_H */
00116 /* nothing past this point */


FIU: frpfndif.h File Reference

frpfndif.h File Reference

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

Include dependency graph for frpfndif.h:

Go to the source code of this file.

Data Structures

struct | FrpFndHSTrngInfo_t
struct | FRP_FND_DATA_BYTE_S
struct | FRP_FND_DATA_BUFFER_S
struct | FRP_FND_FRAME_COMP_S
struct | FRP_FND_HS_TRNG_DETECT_S
struct | FRP_FND_HS_RATE_S
struct | FRP_FND_SLP_INFO_S
struct | FRP_FND_TONE_DETECT_S
struct | FRP_FND_V8_MSG_S
struct | FRP_FND_V34_PRI_RATE_S
union | FrpFndMsgBody_u
struct | FrpFndMsg_t
struct | FND_FRP_DATA_BYTE_S
struct | FND_FRP_DATA_BUFFER_S
struct | FND_FRP_FRAME_COMP_S
struct | FND_FRP_TONE_ON_LS_S
struct | FND_FRP_V8_MSG_S
struct | FND_FRP_V34_PRI_RATE_S
union | FndFrpMsgBody_u
struct | FndFrpMsg_t

Enumerations

enum fiuSLPMode_e {
fiu_SLP_MODE_UNKNOWN, fiu_SLP_MODE_TRANS, fiu_SLP_MODE_TCF, fiu_SLP_MODE_MR_1728,
fiu_SLP_MODE_MR_2048, fiu_SLP_MODE_MR_2432, fiu_SLP_MODE_MR_3456, fiu_SLP_MODE_MR_4096,
fiu_SLP_MODE_MR_4864, fiu_SLP_MODE_MH_1728, fiu_SLP_MODE_MH_2048, fiu_SLP_MODE_MH_2432,
fiu_SLP_MODE_MH_3456, fiu_SLP_MODE_MH_4096, fiu_SLP_MODE_MH_4864
}
enum FrpFndMsgId_e {
FRP_FND_SIGNAL_END, FRP_FND_TEP_DETECT, FRP_FND_HS_TRNG_DETECT, FRP_FND_PREAMBLE_DETECT,
FRP_FND_DATA_BYTE, FRP_FND_DATA_BUFFER, FRP_FND_FRAME_COMP, FRP_FND_HS_RATE,
FRP_FND_SLP_INFO, FRP_FND_TONE_DETECT, FRP_FND_V8_CI, FRP_FND_V8_CM,
FRP_FND_V8_JM, FRP_FND_V34_PRI_RATE, FRP_FND_V34_CTRL_DATA, FRP_FND_V34_PRI_DATA,
FRP_FND_V34_PRI_BEGIN, FRP_FND_V34_CTRL_BEGIN, FRP_FND_V34_CC_RETRAIN, FRP_FND_V8_SIG,
FRP_FND_V34_SIGNAL_END, FRP_FND_COUNT
}
enum FndFrpMsgId_e {
FND_FRP_SIGNAL_END, FND_FRP_TONE_ON_LS, FND_FRP_HS_TRAINING, FND_FRP_PREAMBLE,
FND_FRP_DATA_BYTE, FND_FRP_DATA_BUFFER, FND_FRP_FRAME_COMP, FND_FRP_PREAMBLE_NOTIF,
FND_FRP_HS_TRAIN_NOTIF, FND_FRP_V8_CI, FND_FRP_V8_CM, FND_FRP_V8_JM,
FND_FRP_V34_PRI_RATE, FND_FRP_V34_PRI_BEGIN, FND_FRP_V34_CTRL_BEGIN, FND_FRP_V34_CC_RETRAIN,
FND_FRP_V8_SIG, FND_FRP_COUNT
}

Enumeration Type Documentation

enum fiuSLPMode_e

Enumerator:
fiu_SLP_MODE_UNKNOWN
fiu_SLP_MODE_TRANS
fiu_SLP_MODE_TCF
fiu_SLP_MODE_MR_1728
fiu_SLP_MODE_MR_2048
fiu_SLP_MODE_MR_2432
fiu_SLP_MODE_MR_3456
fiu_SLP_MODE_MR_4096
fiu_SLP_MODE_MR_4864
fiu_SLP_MODE_MH_1728
fiu_SLP_MODE_MH_2048
fiu_SLP_MODE_MH_2432
fiu_SLP_MODE_MH_3456
fiu_SLP_MODE_MH_4096
fiu_SLP_MODE_MH_4864

Definition at line 89 of file frpfndif.h.

enum FrpFndMsgId_e

Enumerator:
FRP_FND_SIGNAL_END
FRP_FND_TEP_DETECT
FRP_FND_HS_TRNG_DETECT
FRP_FND_PREAMBLE_DETECT
FRP_FND_DATA_BYTE
FRP_FND_DATA_BUFFER
FRP_FND_FRAME_COMP
FRP_FND_HS_RATE
FRP_FND_SLP_INFO
FRP_FND_TONE_DETECT
FRP_FND_V8_CI
FRP_FND_V8_CM
FRP_FND_V8_JM
FRP_FND_V34_PRI_RATE
FRP_FND_V34_CTRL_DATA
FRP_FND_V34_PRI_DATA
FRP_FND_V34_PRI_BEGIN
FRP_FND_V34_CTRL_BEGIN
FRP_FND_V34_CC_RETRAIN
FRP_FND_V8_SIG
FRP_FND_V34_SIGNAL_END
FRP_FND_COUNT

Definition at line 118 of file frpfndif.h.

enum FndFrpMsgId_e

Enumerator:
FND_FRP_SIGNAL_END
FND_FRP_TONE_ON_LS
FND_FRP_HS_TRAINING
FND_FRP_PREAMBLE
FND_FRP_DATA_BYTE
FND_FRP_DATA_BUFFER
FND_FRP_FRAME_COMP
FND_FRP_PREAMBLE_NOTIF
FND_FRP_HS_TRAIN_NOTIF
FND_FRP_V8_CI
FND_FRP_V8_CM
FND_FRP_V8_JM
FND_FRP_V34_PRI_RATE
FND_FRP_V34_PRI_BEGIN
FND_FRP_V34_CTRL_BEGIN
FND_FRP_V34_CC_RETRAIN
FND_FRP_V8_SIG
FND_FRP_COUNT

Definition at line 280 of file frpfndif.h.


FIU: frpfndif.h Source File

frpfndif.h

Go to the documentation of this file.
00001 #ifndef _FRPFNDIF_H
00002 #define _FRPFNDIF_H
00003 /******************************************************************************
00004  * FILE PURPOSE:  Define the interface between Fax Network Driver (FND) and
00005  *                Fax Relay Protocol (FRP)
00006  ******************************************************************************
00007  * FILE NAME: frpfndif.h
00008  *
00009  * DESCRIPTION: Defines the interface between Fax Network Driver (FND) and
00010  *              the Fax Relay Protocol Unit (FRP).
00011  *
00012  *              The Fax protocol unit passes data to the FAX network
00013  *              driver using a call-out of the type:
00014  *
00015  *                  void fndSendIn (void *fndInst, FrpFndMsg_t *msg)
00016  *
00017  *              This call-out is used for the packetization of data to the
00018  *              network.  However, it may all be used to relay status information
00019  *              to the FND, as well.
00020  *
00021  *              Packets received from the network are processed by FND and
00022  *              stored in its playout queue buffer.  The FRP reads the data
00023  *              from FND's playout queue as required for playout.  The reading
00024  *              of data from the playout queue is accomplished using the
00025  *              following function provided by FND:
00026  *
00027  *                 tbool fndReadPlayoutQ (void *fndInst, FndFrpMsg_t *msg)
00028  *
00029  *              This function pops the next data element from the playout buffer
00030  *              (if any).  The function returns FALSE if the playout buffer is
00031  *              empty.
00032  *
00033  *              This file describes in detail the communications between
00034  *              FND and FRP.
00035  *
00036  * TABS: NONE
00037  *
00038  * $Id: frpfndif.h 1.8 2000/05/02 15:52:03 sakhtar Exp $
00039  *
00040  * REVISION HISTORY:
00041  *
00042  * $Log: frpfndif.h $
00043  * Revision 1.8  2000/05/02 15:52:03  sakhtar
00044  * Modified to support Tone detection (CED and CNG). Need to
00045  * modify FRP and FND
00046  * Revision 1.7  2000/04/17 17:52:08  ffruth
00047  * - Incorporated changes for separately reporting TEP and HST for
00048  *   AAL2 protocol.
00049  * Revision 1.6  2000/03/22 13:42:13  ffruth
00050  * - Initial changes for CED/CNG tone generation capability in T.38.
00051  * Revision 1.5  1999/11/19 22:47:34  ffruth
00052  * - SLP FRP changes to extract slp page mode for network decoder.
00053  * Revision 1.4  1999/03/12 14:44:00  ffruth
00054  * - Merged changes from 1.3.1.1.
00055  * - Implemented new FRP/FND message structure for portability.
00056  * Revision 1.3  1998/12/04 11:43:12  sakhtar
00057  * same as version 1.2.1.1
00058  * Revision 1.2.1.1  1998/10/23 17:42:22  sakhtar
00059  * Modified to include a bit that indicates if we are using ECM mode
00060  * Revision 1.2  1998/09/02 09:55:17  ffruth
00061  * Revision 1.1  1998/07/24 17:52:38  ffruth
00062  * Initial revision
00063  *
00064  * DATE               Programmer          Description
00065  * ====           ==========      ===========
00066  * 01-Jul-98    F. Fruth        Created
00067  * 02-Sep-98    F. Fruth        Added the following FND to FRP messages:
00068  *                                  FND_FRP_RX_PREAMBLE_NOTIF
00069  *                                  FND_FRP_RX_HS_TRAIN_NOTIF
00070  *                              Implemented to eliminate FTE timeouts due to
00071  *                              local jitter buffering delays.
00072  * 28-Dec-98    F. Fruth        Modified FND/FRP communications to address
00073  *                              portability across platforms.
00074  * 15-Nov-99    F. Fruth        Added FRP to FND message for scan line
00075  *                              processing support
00076  * 22-Mar-00  ffruth          Incorporated support for CED/CNG tone network
00077  *                            indications.  Added FND_FRP_TONE_ON_LS message.
00078  * 17-Apr-00  ffruth          Added FRP_FND_TEP_DETECT for AAL2 support.
00079  *
00080  * (C) Copyright 1998-2000, TELOGY Networks, Inc.
00081  *****************************************************************************/
00082
00083 #include <ti/mas/types/types.h>
00084 #include <ti/mas/fiu/fiu.h>
00085
00086 /*****************************************************************************
00087  * Definition of Scan Line Fixup modes
00088  *****************************************************************************/
00089 typedef enum {
00090   fiu_SLP_MODE_UNKNOWN,
00091   fiu_SLP_MODE_TRANS,
00092   fiu_SLP_MODE_TCF,
00093   fiu_SLP_MODE_MR_1728,
00094   fiu_SLP_MODE_MR_2048,
00095   fiu_SLP_MODE_MR_2432,
00096   fiu_SLP_MODE_MR_3456,
00097   fiu_SLP_MODE_MR_4096,
00098   fiu_SLP_MODE_MR_4864,
00099   fiu_SLP_MODE_MH_1728,
00100   fiu_SLP_MODE_MH_2048,
00101   fiu_SLP_MODE_MH_2432,
00102   fiu_SLP_MODE_MH_3456,
00103   fiu_SLP_MODE_MH_4096,
00104   fiu_SLP_MODE_MH_4864
00105 } fiuSLPMode_e;
00106
00107 /******************************************************************************
00108  * FRP to FND Communications:
00109  *****************************************************************************/
00110
00111 /******************************************************************************
00112  * DATA DEFINITION:  Define FRP to FND Message Identifiers
00113  ******************************************************************************
00114  * DESCRIPTION:  Define the message identifiers for all FRP-to-FND messages.
00115  *               The prefix FRP_FND indicates a message sent from FRP to FND.
00116  *
00117  *****************************************************************************/
00118 typedef enum {
00119   FRP_FND_SIGNAL_END,      /* Indicates end of current signal transmission */
00120   FRP_FND_TEP_DETECT,      /* Reserved */
00121   FRP_FND_HS_TRNG_DETECT,  /* Indicates local detection of high-speed training */
00122   FRP_FND_PREAMBLE_DETECT, /* Indicates local detection of low-speed preamble */
00123   FRP_FND_DATA_BYTE,       /* Provides one demodulated data byte */
00124   FRP_FND_DATA_BUFFER,     /* Provides a buffer of demodulated data bytes */
00125   FRP_FND_FRAME_COMP,      /* Indicates end of current HDLC frame */
00126   FRP_FND_HS_RATE,         /* Reports information to FND on the current
00127                               high-speed modulation rate */
00128   FRP_FND_SLP_INFO,        /* Reports Scan Line Processor (SLP) mode to be used
00129                               for page data */
00130   FRP_FND_TONE_DETECT,     /* Tone detected */
00131   FRP_FND_V8_CI,           /* Reports call function of V.8 CI sequence received */
00132   FRP_FND_V8_CM,           /* Reports call function/modulation mode of V.8 CM sequence received */
00133   FRP_FND_V8_JM,           /* Reports call function/modulation mode of V.8 JM sequence received */
00134   FRP_FND_V34_PRI_RATE,    /* Reports local V.34 primary channel data rate */
00135   FRP_FND_V34_CTRL_DATA,   /* Provides V.34 control channel data */
00136   FRP_FND_V34_PRI_DATA,    /* Provides V.34 primary channel data */
00137   FRP_FND_V34_PRI_BEGIN,   /* Indicates switching into V.34 primary channel */
00138   FRP_FND_V34_CTRL_BEGIN,  /* Indicates switching into V.34 control channel */
00139   FRP_FND_V34_CC_RETRAIN,  /* Indicates control channel retrain initiated */
00140   FRP_FND_V8_SIG,          /* Indicates beginning of V.8 procedures */
00141   FRP_FND_V34_SIGNAL_END,  /* Indicates end of current V.34 signal transmission */
00142   FRP_FND_COUNT
00143 } FrpFndMsgId_e;
00144
00145 /******************************************************************************
00146  * DATA DEFINITION:  Definition of FRP-to-FND High-speed training Info
00147  ******************************************************************************
00148  * DESCRIPTION:  Defines the message body data for the high-speed training
00149  *               detect message.  Presently, the data consists of 9-bits:
00150  *
00151  *               bits 0 - 7:  Defines modulation type (iffaxModulationTypes_e).
00152  *               bit  8:      HDLC indication.  Indicates whether data will
00153  *                            be de-framed HDLC data blocks.
00154  *
00155  *****************************************************************************/
00156 typedef struct {
00157 #ifdef GG_REF_PAGE /* Reflection Page doesn't support Bitfields */
00158   tuint bitfield;            /* bits 0-7: mod type; bit 8 = HDLC indication */
00159 #else
00160   tuint ModulationType  :8;  /* Modulation type */
00161   tuint HDLCModeFlag    :1;  /* HDLC mode flag  */
00162 #endif
00163 } FrpFndHSTrngInfo_t;
00164
00165 /******************************************************************************
00166  * DATA DEFINITION:  Definition of FRP-to-FND message body structures
00167  ******************************************************************************
00168  * DESCRIPTION:  Defines the message body structure associated with each
00169  *               message identifier (if one).  The prefix FRP_FND indicates that
00170  *               the message is sent by FRP to FND.  The suffix _S indicates
00171  *               it is a structure.  Some message may have no message body.
00172  *
00173  *****************************************************************************/
00174
00175 /* Message body associated with data byte message */
00176 struct FRP_FND_DATA_BYTE_S
00177 {
00178   tword DataByte;
00179 };
00180
00181 /* Message body associated with data buffer message */
00182 struct FRP_FND_DATA_BUFFER_S
00183 {
00184   tword *DataAddr;
00185 };
00186
00187 /* Message body associated with frame complete message */
00188 struct FRP_FND_FRAME_COMP_S
00189 {
00190   iffaxHDLCFCSInd_e FrameFcs;
00191 };
00192
00193 /* Message body associated with high-speed training detect message */
00194 struct FRP_FND_HS_TRNG_DETECT_S
00195 {
00196   FrpFndHSTrngInfo_t  HSTrainingInfo;
00197 };
00198
00199 /* Message body associated with high-speed rate info message */
00200 struct FRP_FND_HS_RATE_S
00201 {
00202   iffaxModulationTypes_e  HSModulationRate;
00203 };
00204
00205 /* Message body associated with high-speed rate info message */
00206 struct FRP_FND_SLP_INFO_S
00207 {
00208   fiuSLPMode_e  slpPageMode;
00209 };
00210
00211 /* Message body associated with tone detection message */
00212 struct FRP_FND_TONE_DETECT_S
00213 {
00214   iffaxToneID_e Tone;
00215 };
00216
00217 /* Message body associated with V.8 data message */
00218 struct FRP_FND_V8_MSG_S
00219 {
00220   tuint data;
00221 };
00222
00223 /* Message body associated with V.34 primary rate info message */
00224 struct FRP_FND_V34_PRI_RATE_S
00225 {
00226   tuint v34Rate;
00227 };
00228
00229 /******************************************************************************
00230  * DATA DEFINITION:  FRP to FRP Message Body
00231  ******************************************************************************
00232  * DESCRIPTION:  Defines the message body data structure for FRP to FND
00233  *               communications.
00234  *
00235  *****************************************************************************/
00236 typedef union
00237 {
00238   struct FRP_FND_DATA_BYTE_S       DataByte;
00239   struct FRP_FND_DATA_BUFFER_S     DataBuffer;
00240   struct FRP_FND_FRAME_COMP_S      FrameComp;
00241   struct FRP_FND_HS_TRNG_DETECT_S  HSTrngDetect;
00242   struct FRP_FND_HS_RATE_S         HSRate;
00243   struct FRP_FND_SLP_INFO_S        slpInfo;
00244   struct FRP_FND_TONE_DETECT_S     ToneDetect;
00245   struct FRP_FND_V8_MSG_S          cmMsg;
00246   struct FRP_FND_V8_MSG_S          jmMsg;
00247   struct FRP_FND_V8_MSG_S          ciMsg;
00248   struct FRP_FND_V34_PRI_RATE_S    v34PriRate;
00249 } FrpFndMsgBody_u;
00250
00251 /******************************************************************************
00252  * DATA DEFINITION:  Definition of FRP-to-FND message
00253  ******************************************************************************
00254  * DESCRIPTION:  This data structure defines the format of message sent to
00255  *               FND by FRP.  The data structure consists of three elements:
00256  *
00257  *               MsgId     -- The message identifier
00258  *               Timestamp -- Timestamp associated with the message event
00259  *               MsgBody   -- Message body
00260  *
00261  *****************************************************************************/
00262 typedef struct {
00263   FrpFndMsgId_e    MsgId;      /* FRP to FND message identifier */
00264   tuint            Timestamp;  /* 16-bit timestamp */
00265   FrpFndMsgBody_u  MsgBody;    /* Message body */
00266 } FrpFndMsg_t;
00267
00268
00269 /******************************************************************************
00270  * FND to FRP Communications:
00271  *****************************************************************************/
00272
00273 /******************************************************************************
00274  * DATA DEFINITION:  Define FND to FRP Message Identifiers
00275  ******************************************************************************
00276  * DESCRIPTION:  Define the message identifiers for all FND-to-FRP messages.
00277  *               The prefix FND_FRP indicates a message sent from FND to FRP.
00278  *
00279  *****************************************************************************/
00280 typedef enum {
00281   FND_FRP_SIGNAL_END,      /* Indicates end of current signal transmssion */
00282   FND_FRP_TONE_ON_LS,      /* Tone detected at remote */
00283   FND_FRP_HS_TRAINING,     /* Inidcates beginning of high-speed training */
00284   FND_FRP_PREAMBLE,        /* Inicates beginning of preamble */
00285   FND_FRP_DATA_BYTE,       /* Provides one demodulated data byte */
00286   FND_FRP_DATA_BUFFER,     /* Provides a buffer of demodulated data bytes */
00287   FND_FRP_FRAME_COMP,      /* Close in-progress HDLC frame */
00288   FND_FRP_PREAMBLE_NOTIF,  /* Notification that a premable line state has been
00289                               received from the network and that a preamble
00290                               message is awaiting processing in the playout
00291                               queue */
00292   FND_FRP_HS_TRAIN_NOTIF,  /* Notification that a high-speed training line
00293                               state has been received from the network and that
00294                               a high-speed training message is awaiting
00295                               processing in the playout queue */
00296   FND_FRP_V8_CI,           /* Reports call function of V.8 CI sequence received */
00297   FND_FRP_V8_CM,           /* Reports call function/modulation mode of V.8 CM sequence received */
00298   FND_FRP_V8_JM,           /* Reports call function/modulation mode of V.8 JM sequence received */
00299   FND_FRP_V34_PRI_RATE,    /* Reports remote V.34 primary channel data rate */
00300   FND_FRP_V34_PRI_BEGIN,   /* Indicates beginning of V.34 primary channel */
00301   FND_FRP_V34_CTRL_BEGIN,  /* Indicates beginning of V.34 control channel */
00302   FND_FRP_V34_CC_RETRAIN,  /* Indicates control channel retrain initiated */
00303   FND_FRP_V8_SIG,          /* Indicates beginning of V.8 procedures */
00304   FND_FRP_COUNT
00305 } FndFrpMsgId_e;
00306
00307 /******************************************************************************
00308  * DATA DEFINITION:  Definition of FND-to-FRP message body structures
00309  ******************************************************************************
00310  * DESCRIPTION:  Defines the message body structure associated with each
00311  *               message identifier (if one).  The prefix FND_FRP indicates that
00312  *               the message is sent by FND to FRP.  The suffix _S indicates
00313  *               it is a structure.  Some message may have no message body.
00314  *
00315  *****************************************************************************/
00316
00317 /* Message body associated with data byte message */
00318 struct FND_FRP_DATA_BYTE_S
00319 {
00320   tword DataByte;
00321 };
00322
00323 /* Message body associated with data buffer message */
00324 struct FND_FRP_DATA_BUFFER_S
00325 {
00326   tword *DataAddr;
00327 };
00328
00329 /* Message body associated with frame complete message */
00330 struct FND_FRP_FRAME_COMP_S
00331 {
00332   iffaxHDLCFCSInd_e FrameFcs;
00333 };
00334
00335 /* Message body associated with tone-on message */
00336 struct FND_FRP_TONE_ON_LS_S
00337 {
00338   iffaxToneID_e Tone;
00339 };
00340
00341 /* Message body associated with V.8 data message */
00342 struct FND_FRP_V8_MSG_S
00343 {
00344   tuint data;
00345 };
00346
00347 /* Message body associated with V.34 primary rate info message */
00348 struct FND_FRP_V34_PRI_RATE_S
00349 {
00350   tuint v34Rate;
00351 };
00352
00353 /******************************************************************************
00354  * DATA DEFINITION:  FND to FRP Message Body
00355  ******************************************************************************
00356  * DESCRIPTION:  Defines the message body data structure for FND to FRP
00357  *               communications.
00358  *
00359  *****************************************************************************/
00360 typedef union
00361 {
00362   struct FND_FRP_DATA_BYTE_S       DataByte;
00363   struct FND_FRP_DATA_BUFFER_S     DataBuffer;
00364   struct FND_FRP_FRAME_COMP_S      FrameComp;
00365   struct FND_FRP_TONE_ON_LS_S      ToneLs;
00366   struct FND_FRP_V8_MSG_S          cmMsg;
00367   struct FND_FRP_V8_MSG_S          jmMsg;
00368   struct FND_FRP_V8_MSG_S          ciMsg;
00369   struct FND_FRP_V34_PRI_RATE_S    v34PriRate;
00370 } FndFrpMsgBody_u;
00371
00372 /******************************************************************************
00373  * DATA DEFINITION:  Definition of FND-to-FRP message
00374  ******************************************************************************
00375  * DESCRIPTION:  This data structure defines the format of message sent to
00376  *               FRP by FND.  The data structure consists of three elements:
00377  *
00378  *               MsgId     -- The message identifier
00379  *               Timestamp -- Playout timestamp associated with the message event
00380  *               MsgBody   -- Message body
00381  *
00382  *****************************************************************************/
00383 typedef struct {
00384   FndFrpMsgId_e    MsgId;      /* FND to FRP message identifier */
00385   tuint            Timestamp;  /* 16-bit playout timestamp */
00386   FndFrpMsgBody_u  MsgBody;    /* Message body */
00387 } FndFrpMsg_t;
00388
00389 #endif /* _FRPFNDIF_H */
00390 /* nothing past this point */


FIU: frtrace.h File Reference

frtrace.h File Reference

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

Include dependency graph for frtrace.h:

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

Go to the source code of this file.

Defines

#define | WriteDebugTrace(inst, dbgLevel, msgID, suppData)

Enumerations

enum | { TRC_DBG_LVL_0 = 0, TRC_DBG_LVL_1 = 1, TRC_DBG_LVL_2 = 2 }
enum {
TRC_FIU_OPEN = 0x01, TRC_FIU_CLOSED = 0x02, TRC_FIU_NO_HS_BUFFER_AVAIL = 0x03, TRC_FIUDBG_LOST_TRACE = 0x04,
TRC_FIU_CLEARDOWN_IND = 0x05, TRC_FIU_RELOC = 0x07, TRC_FIU_TONE_DET_CTRL = 0x08, TRC_FIU_TONE_DETECTED = 0x09,
TRC_FIU_NBUFFER_POOL_SIZE = 0x0A, TRC_FIU_INVD_CONTROL = 0x0B, TRC_FIU_G3_TO_V34 = 0x0C, TRC_FIU_V34_TO_G3 = 0x0D,
TRC_FND_STARTUP = 0x40, TRC_FND_INVALID_PKT = 0x41, TRC_FND_OUT_OF_SEQ_PKT = 0x42, TRC_FND_NETRXQ_OVERFLOW = 0x43,
TRC_FND_JITBUF_OVERFLOW = 0x44, TRC_FND_PACKET_LOSS = 0x45, TRC_FND_T2P_RX_LC_UNDEF = 0x46, TRC_FND_T2P_RX_LC_DET = 0x47,
TRC_FND_T2P_STATE_CHANGE = 0x48, TRC_FND_T2P_TX_PKT = 0x49, TRC_FND_TX_PKT_DROPPED = 0x4A, TRC_FND_T2P_TX_FIRST_DATA = 0x4B,
TRC_FND_HS_BUFFER_UNAVAIL = 0x4c, TRC_FND_T2P_RX_FRAME_COMP = 0x4d, TRC_FND_EXCEPTION = 0x4e, TRC_FND_FRF11_RX = 0x4f,
TRC_FND_FRF11_STATE_CHANGE = 0x50, TRC_FND_FRF11_TX_PKT = 0x51, TRC_FND_FRF11_INVALID_PKT = 0x52, TRC_FND_AAL2_RX = 0x57,
TRC_FND_AAL2_STATE_CHANGE = 0x58, TRC_FND_AAL2_TX_PKT = 0x59, TRC_FND_AAL2_INVALID_PKT = 0x5A, TRC_FND_T38U_STATE_CHANGE = 0x60,
TRC_FND_T38U_INVD_FDT = 0x61, TRC_FND_T38U_RX_PT_DET = 0x62, TRC_FND_T38U_TX_PKT = 0x63, TRC_FRP_FND_MESSAGE = 0x64,
TRC_FND_FRP_MESSAGE = 0x65, TRC_FND_T38U_EXCEPTION = 0x66, TRC_FRP_FND_MSG_DROPPED = 0x67, TRC_FND_T38U_ENC_IFP_BUF_FULL = 0x68,
TRC_FND_T38U_ENC_IFP_BUF_EMPTY = 0x69, TRC_FND_T38U_ENC_IFP_DELETE_ERROR = 0x70, TRC_FND_T38U_NO_DF_AVAIL = 0x71, TRC_FND_T38U_ENC_DF_DELETE_ERROR = 0x72,
TRC_FND_T38U_VERSION_NUM = 0x73, TRC_FND_SLP_SLQ_OVERFLOW = 0x74, TRC_FRP_STARTUP = 0x80, TRC_FRP_RXOUTQ_OVERFLOW = 0x81,
TRC_FRP_SENDINQ_OVERFLOW = 0x82, TRC_FRP_STATE_CHANGE = 0x83, TRC_FRP_NETEVT_IGNORE = 0x84, TRC_FRP_MDEVT_IGNORE = 0x85,
TRC_FRP_TMREVT_IGNORE = 0x86, TRC_FRP_TIMER_EXPIRE = 0x89, TRC_FRP_FIRST_HS_DATA = 0x8A, TRC_FRP_FIRST_LS_BYTE = 0x8B,
TRC_FRP_FCF_ID = 0x8C, TRC_FRP_EXCEPTION = 0x8D, TRC_FRP_SLP_PAGE_MODE = 0x8E, TRC_FRP_LOCAL_TONE_GEN = 0x8F,
TRC_FRP_LOCAL_TONE_DET = 0x90, TRC_FRP_REMOTE_TONE_DET = 0x91, TRC_FRP_FINAL_FRAME_DET = 0x92, TRC_FRP_FM_DATA_SIZE_EXCEEDED = 0x93,
TRC_FRP_FM_MESSAGE_ERROR = 0x94, TRC_FRP_ACTIVATE = 0x95, TRC_FRP_DDG_NO_BUFF_AVAIL = 0x96, TRC_FRP_V34_LOCAL_PRI_RATE = 0x98,
TRC_FRP_PP_NUM_FRAMES = 0x99, TRC_FRP_FCF2_ID = 0x9A, TRC_FRP_BUF_POOL_OVERLAY_INIT = 0x9B
}
enum fiuExceptionCodes_e {
TRC_FIU_DELETE_ERR, TRC_FIU_OPEN_ERR, TRC_FIU_BUFF_FREE_ERROR, TRC_FIU_EXC_CONTROL,
TRC_FIU_EXC_MEMORY, FRP_INVALID_EVT_TYPE, FRP_INVALID_NEW_STATE, FRP_STATE_ERROR,
FRP_EXC_LTCF, FRP_EXC_RTCF, FRP_EXC_INVALID_HS_RATE, FND_BUFFER_SIZE_ERROR,
FND_EXC_RELOC, FND_EXC_CLOSE, FND_AAL2_RX_INVALID_STATE, FND_AAL2_BUF_SIZE_ERROR,
FND_AAL2_TX_INVALID_STATE, FND_AAL2_LSTX_ERROR, FND_EXC_FRF11_ENCODER, FND_EXC_SLP,
FND_TFOP_PROTOCOL_ERROR, FND_T2P_RX_INVALID_STATE, FND_EXC_T38DECODER_UDP, FND_EXC_T38DECODER_TASK,
FND_EXC_T38ENCODER_UDP, FND_NQ_LINK_LIST_ERROR
}

Define Documentation

#define WriteDebugTrace | ( | inst,
 |  | dbgLevel,
 |  | msgID,
 |  | suppData | )

Value:

{              \
           faxDebugTrace((inst)->pmodule, dbgLevel, msgID, suppData); \
}

Definition at line 509 of file frtrace.h.

Referenced by fiuControl().

Enumeration Type Documentation

anonymous enum

Enumerator:
TRC_DBG_LVL_0
TRC_DBG_LVL_1
TRC_DBG_LVL_2

Definition at line 87 of file frtrace.h.

anonymous enum

Enumerator:
TRC_FIU_OPEN
TRC_FIU_CLOSED
TRC_FIU_NO_HS_BUFFER_AVAIL
TRC_FIUDBG_LOST_TRACE
TRC_FIU_CLEARDOWN_IND
TRC_FIU_RELOC
TRC_FIU_TONE_DET_CTRL
TRC_FIU_TONE_DETECTED
TRC_FIU_NBUFFER_POOL_SIZE
TRC_FIU_INVD_CONTROL
TRC_FIU_G3_TO_V34
TRC_FIU_V34_TO_G3
TRC_FND_STARTUP
TRC_FND_INVALID_PKT
TRC_FND_OUT_OF_SEQ_PKT
TRC_FND_NETRXQ_OVERFLOW
TRC_FND_JITBUF_OVERFLOW
TRC_FND_PACKET_LOSS
TRC_FND_T2P_RX_LC_UNDEF
TRC_FND_T2P_RX_LC_DET
TRC_FND_T2P_STATE_CHANGE
TRC_FND_T2P_TX_PKT
TRC_FND_TX_PKT_DROPPED
TRC_FND_T2P_TX_FIRST_DATA
TRC_FND_HS_BUFFER_UNAVAIL
TRC_FND_T2P_RX_FRAME_COMP
TRC_FND_EXCEPTION
TRC_FND_FRF11_RX
TRC_FND_FRF11_STATE_CHANGE
TRC_FND_FRF11_TX_PKT
TRC_FND_FRF11_INVALID_PKT
TRC_FND_AAL2_RX
TRC_FND_AAL2_STATE_CHANGE
TRC_FND_AAL2_TX_PKT
TRC_FND_AAL2_INVALID_PKT
TRC_FND_T38U_STATE_CHANGE
TRC_FND_T38U_INVD_FDT
TRC_FND_T38U_RX_PT_DET
TRC_FND_T38U_TX_PKT
TRC_FRP_FND_MESSAGE
TRC_FND_FRP_MESSAGE
TRC_FND_T38U_EXCEPTION
TRC_FRP_FND_MSG_DROPPED
TRC_FND_T38U_ENC_IFP_BUF_FULL
TRC_FND_T38U_ENC_IFP_BUF_EMPTY
TRC_FND_T38U_ENC_IFP_DELETE_ERROR
TRC_FND_T38U_NO_DF_AVAIL
TRC_FND_T38U_ENC_DF_DELETE_ERROR
TRC_FND_T38U_VERSION_NUM
TRC_FND_SLP_SLQ_OVERFLOW
TRC_FRP_STARTUP
TRC_FRP_RXOUTQ_OVERFLOW
TRC_FRP_SENDINQ_OVERFLOW
TRC_FRP_STATE_CHANGE
TRC_FRP_NETEVT_IGNORE
TRC_FRP_MDEVT_IGNORE
TRC_FRP_TMREVT_IGNORE
TRC_FRP_TIMER_EXPIRE
TRC_FRP_FIRST_HS_DATA
TRC_FRP_FIRST_LS_BYTE
TRC_FRP_FCF_ID
TRC_FRP_EXCEPTION
TRC_FRP_SLP_PAGE_MODE
TRC_FRP_LOCAL_TONE_GEN
TRC_FRP_LOCAL_TONE_DET
TRC_FRP_REMOTE_TONE_DET
TRC_FRP_FINAL_FRAME_DET
TRC_FRP_FM_DATA_SIZE_EXCEEDED
TRC_FRP_FM_MESSAGE_ERROR
TRC_FRP_ACTIVATE
TRC_FRP_DDG_NO_BUFF_AVAIL
TRC_FRP_V34_LOCAL_PRI_RATE
TRC_FRP_PP_NUM_FRAMES
TRC_FRP_FCF2_ID
TRC_FRP_BUF_POOL_OVERLAY_INIT

Definition at line 96 of file frtrace.h.

enum fiuExceptionCodes_e

Enumerator:
TRC_FIU_DELETE_ERR
TRC_FIU_OPEN_ERR
TRC_FIU_BUFF_FREE_ERROR
TRC_FIU_EXC_CONTROL
TRC_FIU_EXC_MEMORY
FRP_INVALID_EVT_TYPE
FRP_INVALID_NEW_STATE
FRP_STATE_ERROR
FRP_EXC_LTCF
FRP_EXC_RTCF
FRP_EXC_INVALID_HS_RATE
FND_BUFFER_SIZE_ERROR
FND_EXC_RELOC
FND_EXC_CLOSE
FND_AAL2_RX_INVALID_STATE
FND_AAL2_BUF_SIZE_ERROR
FND_AAL2_TX_INVALID_STATE
FND_AAL2_LSTX_ERROR
FND_EXC_FRF11_ENCODER
FND_EXC_SLP
FND_TFOP_PROTOCOL_ERROR
FND_T2P_RX_INVALID_STATE
FND_EXC_T38DECODER_UDP
FND_EXC_T38DECODER_TASK
FND_EXC_T38ENCODER_UDP
FND_NQ_LINK_LIST_ERROR

Definition at line 473 of file frtrace.h.


FIU: frtrace.h Source File

frtrace.h

Go to the documentation of this file.
00001 #ifndef _FRTRACE_H
00002 #define _FRTRACE_H
00003 /******************************************************************************
00004  * FILE PURPOSE: Defines the debug traces for FIU FaxRelay module
00005  ******************************************************************************
00006  * FILE NAME: frtrace.h
00007  *
00008  * DESCRIPTION: Defines all debug trace messages for the FIU FaxRelay module.
00009  *
00010  *
00011  * TABS: NONE
00012  *
00013  * $Id: frtrace.h 1.17 2000/06/16 15:24:33 jwright Exp $
00014  *
00015  * REVISION HISTORY:
00016  *
00017  * $Log: frtrace.h $
00018  * Revision 1.17  2000/06/16 15:24:33  jwright
00019  * - Added comments for AAL2 trace messages
00020  * Revision 1.16  2000/06/16 14:12:39  jwright
00021  * - Added support for AAL2-specific trace messages
00022  * Revision 1.15  2000/05/31 11:25:25  sakhtar
00023  * Added new debug traces. Clean up, etc.
00024  * Revision 1.14  2000/05/22 12:51:58  sakhtar
00025  * - Cleanup
00026  * - Need to add more info for traces
00027  * Revision 1.13  2000/03/22 19:19:29  ffruth
00028  * - Improved low-speed data processing to filter out potential garbage
00029  *   data at the end of the low-speed transmission.
00030  * Revision 1.12  2000/03/22 13:42:13  ffruth
00031  * - Initial changes for CED/CNG tone generation capability in T.38.
00032  * Revision 1.11  2000/03/20 22:58:55  ffruth
00033  * - Fix all 3.50 compiler warnings.
00034  * Revision 1.10  1999/11/19 22:47:35  ffruth
00035  * - SLP FRP changes to extract slp page mode for network decoder.
00036  * Revision 1.9  1999/09/19 12:17:18  sakhtar
00037  * Added new trace for invalid packet
00038  * Revision 1.8  1998/12/04 11:41:39  sakhtar
00039  * same as version 1.7.1.2
00040  * Revision 1.7.1.2  1998/10/27 11:24:38  sakhtar
00041  * 1. Modified for FND T38 Encoder
00042  * Revision 1.7.1.1  1998/10/16 18:48:25  ffruth
00043  * - Begin T.38 UDP integration..
00044  * Revision 1.7  1998/09/14 15:39:55  sakhtar
00045  * 1. Added new trace messages for FRF.11
00046  * 2. Modified for the new debug and exception API
00047  *
00048  * Revision 1.6  1998/09/10 12:14:17  ffruth
00049  * Revision 1.5  1998/08/04 12:21:41  sakhtar
00050  * Modified to add details of supporting data associated with
00051  * FXM module messages and renamed some messages
00052  * Revision 1.4  1998/08/03 18:05:52  ffruth
00053  * - Integration changes.
00054  * Revision 1.3  1998/08/03 14:36:53  sakhtar
00055  * Revision 1.2  1998/08/03 12:07:21  ffruth
00056  * Revision 1.1  1998/07/24 17:52:39  ffruth
00057  * Initial revision
00058  *
00059  * DATE               Programmer          Description
00060  * ====           ==========      ===========
00061  * 01-Jul-98    F. Fruth        Created.
00062  * 03-Aug-98    F. Fruth        Modification of debug traces during integration.
00063  * 04-Aug-98    S. Akhtar       Modified to add details of supporting data
00064  *                              for messages passed by FXM module. Also
00065  *                              changed the name of a some trace messages
00066  * 09-Sep-98    F. Fruth        Added FIU Debug trace level definitions and
00067  *                              Exception messages for FIU and FRP.
00068  * 16-Oct-98    F. Fruth        Added T.38 Decoder trace messages:
00069  *                              TRC_FND_T38U_STATE_CHANGE, TRC_FND_T38U_INVD_FDT
00070  *                              and TRC_FND_T38U_RX_PT_DET.
00071  * 19-Nov-99    F. Fruth        Added TRC_FRP_SLP_PAGE_MODE.
00072  * 22-Mar-00    ffruth          Incorporated support for CED/CNG tone network
00073  *                              indications.  Added TRC_FRP_LOCAL_TONE_GEN.
00074  * 22-Mar-00    ffruth          Improved low-speed processing to ensure garbage
00075  *                              data at the end of a transmission gets filtered.
00076  *                              Added tracing of final frame detection.
00077  * 15-Jun-00    J. Wright       Added AAL2-specific trace messages.
00078  * 12-Jul-00    J. Wright       Added FIU Debug Trace macro
00079  *
00080  * (C) Copyright 1998-2000 TELOGY Networks, Inc.
00081  *****************************************************************************/
00082
00083 #include <ti/mas/fiu/fiu.h>  /* necessary for definition of debug msgs */
00084 /*****************************************************************************
00085  * FIU Debug Trace Levels (used for filtering messages per debug mode)
00086  *****************************************************************************/
00087 enum {
00088   TRC_DBG_LVL_0 = 0,
00089   TRC_DBG_LVL_1 = 1,
00090   TRC_DBG_LVL_2 = 2
00091 };
00092
00093 /*****************************************************************************
00094  * FIU Debug Trace Codes: (0x01 - 0x3F)
00095  *****************************************************************************/
00096 enum {
00097   TRC_FIU_OPEN = 0x01,              /* Indicates FIU has received and executed
00098                                        the OPEN command.
00099                                        Supporting data: frame size (in msec) */
00100   TRC_FIU_CLOSED = 0x02,            /* Indicates FIU has received and executed
00101                                        CLOSE command
00102                                        Supporting data: None */
00103   TRC_FIU_NO_HS_BUFFER_AVAIL = 0x03,/* Indicates an memory alloc failure.
00104                                        Supporting data: UnavilCtr */
00105   TRC_FIUDBG_LOST_TRACE = 0x04,     /* Indicates a trace messages have been
00106                                        lost.
00107                                        Supporting data: Number of lost traces */
00108   TRC_FIU_CLEARDOWN_IND = 0x05,     /* Indicates reporting of FAX cleardown.
00109                                        Supporting data: Termination Code:
00110                                        0 - DCN received locally
00111                                        1 - DCN received remote
00112                                        2 - NSS received locally
00113                                        3 - NSS received remote
00114                                        4 - No activity timer timeout
00115                                        5 - TX network timer timeout */
00116   TRC_FIU_RELOC = 0x07,             /* Indicates that the fiuReloc function has
00117                                        been called. Supporting data: none */
00118   TRC_FIU_TONE_DET_CTRL = 0x08,     /* Tone detector control has been called.
00119                                        Supporting data:
00120                                        0 = DISABLE,
00121                                        1 = ENABLE */
00122   TRC_FIU_TONE_DETECTED = 0x09,     /* Tone detected from external TDU.
00123                                        Supporting data - ToneID:
00124                                        0 = iffax_TONE_CED,
00125                                        1 = iffax_TONE_CNG */
00126   TRC_FIU_NBUFFER_POOL_SIZE = 0x0A, /* Size of buffer pool */
00127   TRC_FIU_INVD_CONTROL = 0x0B,      /* fiuControl called with invalid code.
00128                                        Supporting Data: fiuControlCode_e */
00129   TRC_FIU_G3_TO_V34 = 0x0C,         /* Indicate switchover from G3 to V.34 */
00130   TRC_FIU_V34_TO_G3 = 0x0D,         /* Indicate switchover from V.34 to G3 */
00131
00132 /*****************************************************************************
00133  * FND Debug Trace Codes: (0x40 - 0x7F)
00134  *****************************************************************************/
00135   TRC_FND_STARTUP = 0x40,           /* FND Successful Start-up */
00136                                     /* Supporting data: Network Protocol:
00137                                        fiu_PT_T2,
00138                                        fiu_PT_T3,
00139                                        fiu_PT_FRF11,
00140                                        fiu_PT_RTP,
00141                                        fiu_PT_T38_UDP,
00142                                        fiu_PT_T38_UDP_RTP,
00143                                        fiu_PT_AAL2 */
00144   TRC_FND_INVALID_PKT = 0x41,       /* Invalid packet received from network */
00145                                     /* Supporting data:
00146                                        00 - Header error
00147                                        01 - Invalid state */
00148   TRC_FND_OUT_OF_SEQ_PKT = 0x42,    /* Out-of-sequence - packet dropped */
00149                                     /* Supporting data: None */
00150   TRC_FND_NETRXQ_OVERFLOW = 0x43,   /* Network Rx Queue overflow indication.
00151                                        Supporting data: None */
00152   TRC_FND_JITBUF_OVERFLOW = 0x44,   /* Network Jitter buffer overflow.
00153                                        Supporting data: None */
00154   TRC_FND_PACKET_LOSS = 0x45,       /* Indicates packets loss with loss of data.
00155                                        Supporting data:
00156                                        Number of lost packets */
00157   TRC_FND_T2P_RX_LC_UNDEF = 0x46,   /* Undefined line state.
00158                                        Supporting data: line state value
00159                                        0x0 - Idle
00160                                        0x1 - LS Preamble
00161                                        0x2 - LS Data
00162                                        0x3 - HS Training
00163                                        0x4 - HS Data */
00164   TRC_FND_T2P_RX_LC_DET = 0x47,     /* Valid line state detected from network
00165                                        Supporting data: line state value
00166                                        0x0 - Idle
00167                                        0x1 - LS Preamble
00168                                        0x2 - LS Data
00169                                        0x3 - HS Training
00170                                        0x4 - HS Data */
00171   TRC_FND_T2P_STATE_CHANGE = 0x48,  /* Indicates a decoder state change.
00172                                        Supporting data: new state
00173                                        0 - Transparent state
00174                                        1 - Low-speed data state
00175                                        2 - High-speed data state
00176                                        3 - Idle re-synchronization state*/
00177   TRC_FND_T2P_TX_PKT = 0x49,        /* Indicates transmission of packet to the
00178                                        network.  Supporting data:  Msg ID of
00179                                        current net message being processed */
00180   TRC_FND_TX_PKT_DROPPED = 0x4A,    /* Indicates that packets cannot be
00181                                        transmitted to the network */
00182   TRC_FND_T2P_TX_FIRST_DATA = 0x4B, /* Indicates transmission of first data
00183                                        packet to the network */
00184   TRC_FND_HS_BUFFER_UNAVAIL = 0x4c, /* Indicates a memory allocation failure
00185                                        Supporting data: number of failures. */
00186   TRC_FND_T2P_RX_FRAME_COMP = 0x4d, /* Indicates that a frame complete was
00187                                        received from the network.
00188                                        Supporting data: Good/Bad CRC */
00189   TRC_FND_EXCEPTION = 0x4e,         /* Indicates an FND Exception. */
00190   TRC_FND_FRF11_RX = 0x4f,          /* Received FRF.11 packet */
00191                                     /* Supporting Data:
00192                                        FRF11_PKT_TYPE_MOD_OFF,
00193                                        FRF11_PKT_TYPE_MOD_ON,
00194                                        FRF11_PKT_TYPE_T30_DATA,
00195                                        FRF11_PKT_TYPE_T30_EOF_GOOD,
00196                                        FRF11_PKT_TYPE_T30_EOF_ABORT,
00197                                        FRF11_PKT_TYPE_T4_DATA */
00198   TRC_FND_FRF11_STATE_CHANGE = 0x50,/* FRF.11 decoder state change */
00199                                     /* Supporting Data:
00200                                        FRF11_RX_TRANSP,
00201                                        FRF11_RX_LSD,
00202                                        FRF11_RX_HSD,
00203                                        FRF11_IDLE_SYNC */
00204   TRC_FND_FRF11_TX_PKT = 0x51,      /* Packet Transmitted to network */
00205                                     /* Supporting Data:
00206                                        FRP_FND_SIGNAL_END,
00207                                        FRP_FND_TEP_DETECT,
00208                                        FRP_FND_HS_TRNG_DETECT,
00209                                        FRP_FND_PREAMBLE_DETECT,
00210                                        FRP_FND_DATA_BYTE,
00211                                        FRP_FND_DATA_BUFFER,
00212                                        FRP_FND_FRAME_COMP,
00213                                        FRP_FND_HS_RATE,
00214                                        FRP_FND_SLP_INFO,
00215                                        FRP_FND_TONE_DETECT */
00216   TRC_FND_FRF11_INVALID_PKT = 0x52, /* packet received has invalid field */
00217                                     /* This message usused at the moment. */
00218   TRC_FND_AAL2_RX = 0x57,           /* Received AAL2 packet type: */
00219                                     /* Supporting Data:
00220                                        0x0020 - FND_AAL2_PKT_TYPE_PREAMBLE
00221                                        0x0021 - FND_AAL2_PKT_TYPE_EPT
00222                                        0x0022 - FND_AAL2_PKT_TYPE_TRAINING
00223                                        0x0023 - FND_AAL2_PKT_TYPE_IDLE
00224                                        0x0024 - FND_AAL2_PKT_TYPE_T30_DATA
00225                                        0x0025 - FND_AAL2_PKT_TYPE_T4_DATA */
00226   TRC_FND_AAL2_STATE_CHANGE = 0x58, /* AAL2 decoder state change */
00227                                     /* Supporting Data: new state
00228                                        0 - FND_AAL2_RX_STARTUP
00229                                        1 - FND_AAL2_RX_TRANSP
00230                                        2 - FND_AAL2_RX_LSD
00231                                        3 - FND_AAL2_RX_HSD
00232                                        4 - FND_AAL2_RX_IDLE_SYNC */
00233   TRC_FND_AAL2_TX_PKT = 0x59,       /* AAL2 Packet transmitted to network */
00234                                     /* This message usused at the moment. */
00235   TRC_FND_AAL2_INVALID_PKT = 0x5A,  /* Received AAL2 packet is of invalid type */
00236                                     /* Supporting Data:
00237                                        0x0020 - FND_AAL2_PKT_TYPE_PREAMBLE
00238                                        0x0021 - FND_AAL2_PKT_TYPE_EPT
00239                                        0x0022 - FND_AAL2_PKT_TYPE_TRAINING
00240                                        0x0023 - FND_AAL2_PKT_TYPE_IDLE
00241                                        0x0024 - FND_AAL2_PKT_TYPE_T30_DATA
00242                                        0x0025 - FND_AAL2_PKT_TYPE_T4_DATA */
00243   TRC_FND_T38U_STATE_CHANGE = 0x60, /* Indicates a decoder state change */
00244                                     /* Suppporting data: new state.
00245                                        0 - Transparent
00246                                        1 - Low-speed data
00247                                        2 - High-speed data
00248                                        3 - Resync
00249                                        4 - Start-up */
00250   TRC_FND_T38U_INVD_FDT = 0x61,     /* Invalid field-data-type type.
00251                                        Supporting data: payload
00252                                        field-data-type (see T38 spec) */
00253   TRC_FND_T38U_RX_PT_DET = 0x62,    /* New Payload type detected from
00254                                        network.
00255                                        Supporting data: Payload type
00256                                        FND_T38U_T30_INDICATOR_PT       0x0000
00257                                        FND_T38U_DATA_PT                0x4000
00258                                        FND_T38U_SPECIAL_PT             0x6000 */
00259   TRC_FND_T38U_TX_PKT = 0x63,       /* First byte of IFP header */
00260   TRC_FRP_FND_MESSAGE = 0x64,       /* Type of message rcvd from FRP
00261                                        0 - signal end
00262                                        1 - tep detect
00263                                        2 - hs training detect
00264                                        3 - preamble detect
00265                                        4 - data byte
00266                                        5 - data buffer
00267                                        6 - frame comp
00268                                        7 - high speed rate
00269                                        8 - slp info
00270                                        9 - tone detect */
00271   TRC_FND_FRP_MESSAGE = 0x65,       /* Type of message sent to FRP
00272                                        0 - signal end
00273                                        1 - tone on
00274                                        2 - hs training
00275                                        3 - preamble
00276                                        4 - data byte
00277                                        5 - data buffer
00278                                        6 - frame comp
00279                                        7 - preamble notif
00280                                        8 - training notif  */
00281   TRC_FND_T38U_EXCEPTION = 0x66,    /* Reports a problem with T.38 packet */
00282                                     /* encoder. Supporting data:
00283                                        1 - FND_T38U_EXC_ENC_IFP_INVALID
00284                                        2 - FND_T38U_EXC_ENC_DF_NULL
00285                                        3 - FND_T38U_EXC_ENC_TASK_IFP_INVALID
00286                                        4 - FND_T38U_EXC_ENC_TASK_DF_NULL */
00287   TRC_FRP_FND_MSG_DROPPED = 0x67,   /* Type of message sent to FRP
00288                                        0 - signal end
00289                                        1 - tone on
00290                                        2 - hs training
00291                                        3 - preamble
00292                                        4 - data byte
00293                                        5 - data buffer
00294                                        6 - frame comp
00295                                        7 - preamble notif
00296                                        8 - training notif */
00297   TRC_FND_T38U_ENC_IFP_BUF_FULL = 0x68,     /* IFP buffer full indication */
00298   TRC_FND_T38U_ENC_IFP_BUF_EMPTY = 0x69,    /* IFP buffer empty indication */
00299   TRC_FND_T38U_ENC_IFP_DELETE_ERROR = 0x70, /* Attempting to delete an IFP */
00300                                             /* that has not been sent to the */
00301                                             /* network */
00302   TRC_FND_T38U_NO_DF_AVAIL = 0x71,          /* No Data buffer available for */
00303                                             /* IFP data - msg will be dropped */
00304   TRC_FND_T38U_ENC_DF_DELETE_ERROR = 0x72,  /* Attempting to delete a data */
00305                                             /* field that is NULL */
00306   TRC_FND_T38U_VERSION_NUM = 0x73,  /* T.38 Version # that FND is being
00307                                        configured for:
00308                                        0 - ASN.1 coding according to T.38 06-1998
00309                                        1 - No change from version 0
00310                                        2 - ASN.1 coding according to T.38 03-2002
00311                                        3 - Draft Amendment 1 05-2003 */
00312   TRC_FND_SLP_SLQ_OVERFLOW = 0x74,  /* Indicate the number of fill data bytes expected to
00313                                        generate exceeds the SLQ capacity */
00314
00315 /*****************************************************************************
00316  * FRP Debug Trace Codes:  (0x80 - 0xBF)
00317  *****************************************************************************/
00318   TRC_FRP_STARTUP = 0x80,           /* FRP Successful Start-up */
00319                                     /* Supporting data: Network Protocol:
00320                                        fiu_PT_T2,
00321                                        fiu_PT_T3,
00322                                        fiu_PT_FRF11,
00323                                        fiu_PT_RTP,
00324                                        fiu_PT_T38_UDP,
00325                                        fiu_PT_T38_UDP_RTP,
00326                                        fiu_PT_AAL2 */
00327   TRC_FRP_RXOUTQ_OVERFLOW = 0x81,   /* Indicates an overflow condition in
00328                                        ReceiveOut Queue (data was lost)
00329                                        Supporting data: none */
00330   TRC_FRP_SENDINQ_OVERFLOW = 0x82,  /* Indicates an overflow condition in
00331                                        SendIn queue (data was lost)
00332                                        Supporting data: none */
00333   TRC_FRP_STATE_CHANGE = 0x83,      /* Indicates Fax protocol state change.
00334                                        Supporting data: New state
00335                                        FRP states:
00336                                        0  - Switched out
00337                                        1  - Idle
00338                                        2  - EFLAG state
00339                                        3  - Local Low-speed receive
00340                                        4  - Local high-speed receive
00341                                        5  - Local TCF receive
00342                                        6  - Remote low-speed receive
00343                                        7  - Remote high-speed receive
00344                                        8  - Remote TCF receive
00345                                        9  - Switch-out pending
00346                                        10 - Startup */
00347   TRC_FRP_NETEVT_IGNORE = 0x84,     /* Indicates reception of an ignored
00348                                        network event in the current state
00349                                        FND_FRP_SIGNAL_END,
00350                                        FND_FRP_TONE_ON_LS,
00351                                        FND_FRP_HS_TRAINING,
00352                                        FND_FRP_PREAMBLE,
00353                                        FND_FRP_DATA_BYTE,
00354                                        FND_FRP_DATA_BUFFER,
00355                                        FND_FRP_FRAME_COMP,
00356                                        FND_FRP_PREAMBLE_NOTIF,
00357                                        FND_FRP_HS_TRAIN_NOTIF,
00358                                        FND_FRP_V8_CI,
00359                                        FND_FRP_V8_CM,
00360                                        FND_FRP_V8_JM,
00361                                        FND_FRP_V34_PRI_RATE,
00362                                        FND_FRP_V34_PRI_BEGIN,
00363                                        FND_FRP_V34_CTRL_BEGIN,
00364                                        FND_FRP_V34_CC_RETRAIN,
00365                                        FND_FRP_V8_SIG */
00366   TRC_FRP_MDEVT_IGNORE = 0x85,      /* Indicates reception of an ignored
00367                                        modem event in the current state
00368                                        Supporting data:
00369                                        iffax_FM_FP_PREAMBLE_DETECT,
00370                                        iffax_FM_FP_CARRIER_DETECT,
00371                                        iffax_FM_FP_CARRIER_LOSS,
00372                                        iffax_FM_FP_TEP_DETECT,
00373                                        iffax_FM_FP_HS_TRAIN_DETECT,
00374                                        iffax_FM_FP_FRAME_COMP,
00375                                        iffax_FM_FP_SYNC_ACK,
00376                                        iffax_FM_FP_DATA,
00377                                        iffax_FM_FP_TONE_DETECT,
00378                                        iffax_FM_FP_SIGNAL_DETECT,
00379                                        iffax_FM_FP_SIGNAL_LOSS,
00380                                        iffax_FM_FP_V8_CI_RECEIVED,
00381                                        iffax_FM_FP_V8_CM_RECEIVED,
00382                                        iffax_FM_FP_V8_JM_RECEIVED,
00383                                        iffax_FM_FP_V34_E_DETECTED,
00384                                        iffax_FM_FP_V34_PRI_RATE_KNOWN,
00385                                        iffax_FM_FP_V34_CC_RETRAIN,
00386                                        iffax_FM_FP_V34_PRI_CH_TURN_OFF,
00387                                        iffax_FM_FP_40_ONES_DETECTED,
00388                                        iffax_FM_FP_SILENCE_DETECTED */
00389   TRC_FRP_TMREVT_IGNORE = 0x86,     /* Indicates reception of an ignored
00390                                        timer event in the current state
00391                                        Supporting data: ID of timer event
00392                                        ignored. Timer ID's:
00393                                        0 - No activity timer
00394                                        1 - Cleardown timer
00395                                        2 - EFLAG start timer
00396                                        3 - EFLAG stop timer
00397                                        4 - carrier detect timer */
00398   TRC_FRP_TIMER_EXPIRE = 0x89,      /* Indicates expiration of protocol timer
00399                                        Supporting data: Timer ID's:
00400                                        0 - No activity timer
00401                                        1 - Cleardown timer
00402                                        2 - EFLAG start timer
00403                                        3 - EFLAG stop timer
00404                                        4 - Carrier detect timer
00405                                        5 - XT2 timer
00406                                        6 - Network timeout timer
00407                                        7 - TCF detect timer
00408                                        8 - Startup state timer
00409                                        9 - LS Pream/Data detect timer */
00410   TRC_FRP_FIRST_HS_DATA = 0x8A,     /* Indicates reception of first high-speed
00411                                        data bytes by FRP from either the
00412                                        modem or network.
00413                                        Supporting data: none */
00414   TRC_FRP_FIRST_LS_BYTE = 0x8B,     /* Indicates reception of the first byte
00415                                        in a low-speed data frame.
00416                                        Supporting data: first byte */
00417   TRC_FRP_FCF_ID = 0x8C,            /* Traces FCF of current frame
00418                                        Supporting data: FCF ID (See T.30 sections
00419                                        5.3.6.1 and A.4.1) */
00420   TRC_FRP_EXCEPTION = 0x8D,         /* Software exception in FRP occurred */
00421   TRC_FRP_SLP_PAGE_MODE = 0x8E,     /* Reports SLP page mode:
00422                                        fiu_SLP_MODE_UNKNOWN,
00423                                        fiu_SLP_MODE_TRANS,
00424                                        fiu_SLP_MODE_TCF,
00425                                        fiu_SLP_MODE_MR_1728,
00426                                        fiu_SLP_MODE_MR_2048,
00427                                        fiu_SLP_MODE_MR_2432,
00428                                        fiu_SLP_MODE_MR_3456,
00429                                        fiu_SLP_MODE_MR_4096,
00430                                        fiu_SLP_MODE_MR_4864,
00431                                        fiu_SLP_MODE_MH_1728,
00432                                        fiu_SLP_MODE_MH_2048,
00433                                        fiu_SLP_MODE_MH_2432,
00434                                        fiu_SLP_MODE_MH_3456,
00435                                        fiu_SLP_MODE_MH_4096,
00436                                        fiu_SLP_MODE_MH_4864 */
00437   TRC_FRP_LOCAL_TONE_GEN = 0x8F,    /* Reports start of local tone generation
00438                                        Supporting data is tone id:
00439                                        0 = iffax_TONE_CED
00440                                        1 = iffax_TONE_CNG */
00441   TRC_FRP_LOCAL_TONE_DET = 0x90,    /* Reports detection of local tone.
00442                                        Supporting data is tone id:
00443                                        0 = iffax_TONE_CED
00444                                        1 = iffax_TONE_CNG */
00445   TRC_FRP_REMOTE_TONE_DET = 0x91,   /* Reports detection of tone at remote.
00446                                        Supporting data is tone id:
00447                                        0 = iffax_TONE_CED
00448                                        1 = iffax_TONE_CNG */
00449   TRC_FRP_FINAL_FRAME_DET = 0x92,   /* Traces receipt of final frame of a
00450                                        low-speed transmission.
00451                                        Supporting data: none */
00452   TRC_FRP_FM_DATA_SIZE_EXCEEDED = 0x93, /* Indicates the receipt of a DATA
00453                                        message from FM with invalid size */
00454   TRC_FRP_FM_MESSAGE_ERROR = 0x94,  /* Indicates that a message from FRP to
00455                                        FM was reported as ERROR by FM */
00456   TRC_FRP_ACTIVATE = 0x95,          /* FRP has been activated.  Supp data:
00457                                        frpInst->currentState (see 0x83) */
00458   TRC_FRP_DDG_NO_BUFF_AVAIL = 0x96, /* No data buffer available for
00459                                        DDG mode.
00460                                        Supporting data: none */
00461   TRC_FRP_V34_LOCAL_PRI_RATE = 0x98,/* Reports V.34 local primary channel data rate */
00462   TRC_FRP_PP_NUM_FRAMES = 0x99,     /* Reports number of data frames in partial page */
00463   TRC_FRP_FCF2_ID = 0x9A,           /* Traces FCF2 of current HDLC frame
00464                                        Supporting data: FCF2 ID (See T.30
00465                                        sections 5.3.6.1 and A.4.1) */
00466   TRC_FRP_BUF_POOL_OVERLAY_INIT = 0x9B /* Reports initialization of the buffer
00467                                           memory pool for overlay */
00468 };
00469
00470 /*****************************************************************************
00471  * FIU Exception Codes:
00472  *****************************************************************************/
00473 typedef enum {
00474    TRC_FIU_DELETE_ERR,
00475    TRC_FIU_OPEN_ERR,
00476    TRC_FIU_BUFF_FREE_ERROR,
00477    TRC_FIU_EXC_CONTROL,
00478    TRC_FIU_EXC_MEMORY,
00479    FRP_INVALID_EVT_TYPE,
00480    FRP_INVALID_NEW_STATE,
00481    FRP_STATE_ERROR,
00482    FRP_EXC_LTCF,
00483    FRP_EXC_RTCF,
00484    FRP_EXC_INVALID_HS_RATE,
00485    FND_BUFFER_SIZE_ERROR,
00486    FND_EXC_RELOC,
00487    FND_EXC_CLOSE,
00488    FND_AAL2_RX_INVALID_STATE,
00489    FND_AAL2_BUF_SIZE_ERROR,
00490    FND_AAL2_TX_INVALID_STATE,
00491    FND_AAL2_LSTX_ERROR,
00492    FND_EXC_FRF11_ENCODER,
00493    FND_EXC_SLP,
00494    FND_TFOP_PROTOCOL_ERROR,
00495    FND_T2P_RX_INVALID_STATE,
00496    FND_EXC_T38DECODER_UDP,
00497    FND_EXC_T38DECODER_TASK,
00498    FND_EXC_T38ENCODER_UDP,
00499    FND_NQ_LINK_LIST_ERROR
00500 } fiuExceptionCodes_e;
00501
00502 /******************************************************************************
00503  * FIU Debug Trace macro
00504  *****************************************************************************/
00505
00506 /* Define macro for informational debug traces */
00507
00508 #ifndef GG_REF_PAGE  /* This causes namespace collision in reflection page */
00509 #define WriteDebugTrace(inst, dbgLevel, msgID, suppData) {              \
00510            faxDebugTrace((inst)->pmodule, dbgLevel, msgID, suppData); \
00511 }
00512 #endif /* GG_REF_PAGE */
00513
00514 #endif /* _FRTRACE_H */
00515 /* nothing past this point */


FIU: Data Fields

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

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

- a -

  • AAL2cid : fiuOpenConfig_t
  • allocBuffer : fiuContext_t

- b -

  • BufferMgmt : fiuInst_s
  • Bytes_From_Net : fiuStats_t
  • Bytes_To_Net : fiuStats_t

- c -

  • Call_Success_Bitfield : fiuStats_t
  • ciMsg : FrpFndMsgBody_u , FndFrpMsgBody_u
  • CleardownTimer : fiuOpenConfig_t
  • cmMsg : FrpFndMsgBody_u , FndFrpMsgBody_u
  • currentUsage : faxBufferMgmt_t

- d -

  • data : FRP_FND_V8_MSG_S , FND_FRP_V8_MSG_S
  • DataAddr : FRP_FND_DATA_BUFFER_S , FND_FRP_DATA_BUFFER_S
  • DataBuffer : FrpFndMsgBody_u , FndFrpMsgBody_u
  • DataByte : FrpFndMsgBody_u , FND_FRP_DATA_BYTE_S , FndFrpMsgBody_u , FRP_FND_DATA_BYTE_S
  • DataElement : faxHSBuffer_t
  • dbgMode : fiuInst_s , fiuOpenConfig_t
  • Direction : fiuStats_t
  • dummy : faxBufferMgmt_t

- e -

  • ECMused : fiuStats_t
  • EflagStartTimer : fiuOpenConfig_t
  • EflagStopTimer : fiuOpenConfig_t
  • EventHandlerSpec : fiuOpenConfig_t , fiuInst_s

- f -

  • faxBuffer : faxBufferAllocation_u
  • faxBufferLinkedList : faxBufferAllocation_u
  • faxCriticalSectionBegin : fiuContext_t
  • faxCriticalSectionEnd : fiuContext_t
  • faxDebugTrace : fiuContext_t
  • faxHSBuffer : faxBufferAllocation_u
  • faxNetCallTblPtr : fiuOpenConfig_t
  • faxNetClose : fiuNetCallTbl_t
  • faxNetDecoder : fiuNetCallTbl_t
  • faxNetDecoderTask : fiuNetCallTbl_t
  • faxNetEncoder : fiuNetCallTbl_t
  • faxNetEncoderTask : fiuNetCallTbl_t
  • faxNetInit : fiuNetCallTbl_t
  • faxNetReloc : fiuNetCallTbl_t
  • faxNomDelay : fiuOpenConfig_t
  • faxPacketSize : fiuOpenConfig_t
  • faxStats : fiuInst_s
  • faxSystemTime : fiuContext_t
  • fiuEventHandler : fiuEventHandlerSpec_t
  • FIUFeatureSelector : fiuOpenConfig_t
  • fiuInst : fiuRelocInstance_t
  • fiuReceiveOut : fiuReceiveOutSpec_t
  • fiuSendOut : fiuSendOutSpec_t
  • fndInst : fiuRelocInstance_t , fiuInst_s
  • fOverlayBufInit : fiuInst_s
  • FrameComp : FrpFndMsgBody_u , FndFrpMsgBody_u
  • FrameFcs : FND_FRP_FRAME_COMP_S , FRP_FND_FRAME_COMP_S
  • frameSize : fiuControlConfig_t , fiuOpenConfig_t
  • freeBuffer : fiuContext_t
  • frpInst : fiuRelocInstance_t , fiuInst_s

- h -

  • HDLCModeFlag : FrpFndHSTrngInfo_t
  • HsDataRedundancy : fiuOpenConfig_t
  • HSmodulation : fiuStats_t
  • HSModulationRate : FRP_FND_HS_RATE_S
  • HSNotAvailCtr : faxBufferMgmt_t
  • HSPktPayloadSize : fiuOpenConfig_t
  • HSRate : FrpFndMsgBody_u
  • HSTrainingInfo : FRP_FND_HS_TRNG_DETECT_S
  • HSTrngDetect : FrpFndMsgBody_u

- i -

  • ID : fiuNewConfig_t , fiuInst_s

- j -

  • JitterBufOverFlow : fiuStats_t
  • jmMsg : FndFrpMsgBody_u , FrpFndMsgBody_u

- l -

  • LocalTxNetTimeOutVal : fiuOpenConfig_t
  • LsDataRedundancy : fiuOpenConfig_t
  • LSPktPayloadSize : fiuOpenConfig_t

- m -

  • MaxFaxRate : fiuOpenConfig_t
  • MaxHSbufferUsage : fiuStats_t
  • MaxJitterBufDepth : fiuStats_t
  • MaxNetRxQDepth : fiuStats_t
  • maxUsage : faxBufferMgmt_t
  • ModulationType : FrpFndHSTrngInfo_t
  • MsgBody : FndFrpMsg_t , FrpFndMsg_t
  • MsgId : FrpFndMsg_t , FndFrpMsg_t

- n -

  • NetProtocol : fiuNetCallTbl_t , fiuOpenConfig_t
  • NetRxQOverFlow : fiuStats_t
  • next : faxBufferLinkedList_t
  • nextFree : faxBufferMgmt_t
  • NoActivityTimerVal : fiuOpenConfig_t
  • NSFCountryCode : fiuNSFInfo_t , fiuOpenConfig_t
  • NSFInfo : fiuStats_t
  • NSFManufacturer : fiuNSFInfo_t
  • NSFVendorCodeLSB : fiuOpenConfig_t
  • NSFVendorCodeMSB : fiuOpenConfig_t
  • NumberOfPages : fiuStats_t
  • NumInternalFIUBufs : fiuSizeCfg_t
  • NumInternalFIUOverlayBufs : fiuSizeCfg_t

- o -

  • overlayBuf : fiuInst_s
  • overlayBufSizeWords : fiuInst_s

- p -

  • payload : faxBufferLinkedList_t , faxBuffer_t
  • poolSizeWords : faxBufferMgmt_t
  • pPool : faxBufferMgmt_t

- r -

  • ReceiveOutSpec : fiuOpenConfig_t , fiuControlConfig_t
  • RtpPayloadType : fiuOpenConfig_t
  • RtpSyncSource : fiuOpenConfig_t
  • RxInvalidPackets : fiuStats_t
  • RxLostPackets : fiuStats_t
  • RxOutOfSeqPacket : fiuStats_t
  • RxOutQMaxDepth : fiuStats_t
  • RxOutQOverflows : fiuStats_t
  • RxPackets : fiuStats_t

- s -

  • sendInQMaxDepth : fiuStats_t
  • sendInQOverflows : fiuStats_t
  • SendOutSpec : fiuOpenConfig_t
  • sizeBytes : faxBuffer_t
  • SizeConfig : fiuNewConfig_t
  • slpInfo : FrpFndMsgBody_u
  • slpPageMode : FRP_FND_SLP_INFO_S
  • StartupTimer : fiuOpenConfig_t
  • state : fiuInst_s
  • SupportedExternalBuffSize : fiuContext_t

- t -

  • T30FeatureSelector : fiuOpenConfig_t
  • T38Version : fiuOpenConfig_t
  • targetInst : fiuEventHandlerSpec_t , fiuSendOutSpec_t , fiuReceiveOutSpec_t
  • TCFHandlingMethod : fiuOpenConfig_t
  • Timestamp : FrpFndMsg_t , FndFrpMsg_t
  • Tone : FRP_FND_TONE_DETECT_S , FND_FRP_TONE_ON_LS_S
  • ToneDetect : FrpFndMsgBody_u
  • ToneLs : FndFrpMsgBody_u
  • TxPackets : fiuStats_t
  • TxPacketsDropped : fiuStats_t

- v -

  • v34PriRate : FrpFndMsgBody_u , FndFrpMsgBody_u
  • v34Rate : FND_FRP_V34_PRI_RATE_S , FRP_FND_V34_PRI_RATE_S


FIU: Data Fields - Variables

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

- a -

  • AAL2cid : fiuOpenConfig_t
  • allocBuffer : fiuContext_t

- b -

  • BufferMgmt : fiuInst_s
  • Bytes_From_Net : fiuStats_t
  • Bytes_To_Net : fiuStats_t

- c -

  • Call_Success_Bitfield : fiuStats_t
  • ciMsg : FrpFndMsgBody_u , FndFrpMsgBody_u
  • CleardownTimer : fiuOpenConfig_t
  • cmMsg : FrpFndMsgBody_u , FndFrpMsgBody_u
  • currentUsage : faxBufferMgmt_t

- d -

  • data : FRP_FND_V8_MSG_S , FND_FRP_V8_MSG_S
  • DataAddr : FRP_FND_DATA_BUFFER_S , FND_FRP_DATA_BUFFER_S
  • DataBuffer : FrpFndMsgBody_u , FndFrpMsgBody_u
  • DataByte : FrpFndMsgBody_u , FND_FRP_DATA_BYTE_S , FndFrpMsgBody_u , FRP_FND_DATA_BYTE_S
  • DataElement : faxHSBuffer_t
  • dbgMode : fiuInst_s , fiuOpenConfig_t
  • Direction : fiuStats_t
  • dummy : faxBufferMgmt_t

- e -

  • ECMused : fiuStats_t
  • EflagStartTimer : fiuOpenConfig_t
  • EflagStopTimer : fiuOpenConfig_t
  • EventHandlerSpec : fiuOpenConfig_t , fiuInst_s

- f -

  • faxBuffer : faxBufferAllocation_u
  • faxBufferLinkedList : faxBufferAllocation_u
  • faxCriticalSectionBegin : fiuContext_t
  • faxCriticalSectionEnd : fiuContext_t
  • faxDebugTrace : fiuContext_t
  • faxHSBuffer : faxBufferAllocation_u
  • faxNetCallTblPtr : fiuOpenConfig_t
  • faxNetClose : fiuNetCallTbl_t
  • faxNetDecoder : fiuNetCallTbl_t
  • faxNetDecoderTask : fiuNetCallTbl_t
  • faxNetEncoder : fiuNetCallTbl_t
  • faxNetEncoderTask : fiuNetCallTbl_t
  • faxNetInit : fiuNetCallTbl_t
  • faxNetReloc : fiuNetCallTbl_t
  • faxNomDelay : fiuOpenConfig_t
  • faxPacketSize : fiuOpenConfig_t
  • faxStats : fiuInst_s
  • faxSystemTime : fiuContext_t
  • fiuEventHandler : fiuEventHandlerSpec_t
  • FIUFeatureSelector : fiuOpenConfig_t
  • fiuInst : fiuRelocInstance_t
  • fiuReceiveOut : fiuReceiveOutSpec_t
  • fiuSendOut : fiuSendOutSpec_t
  • fndInst : fiuRelocInstance_t , fiuInst_s
  • fOverlayBufInit : fiuInst_s
  • FrameComp : FrpFndMsgBody_u , FndFrpMsgBody_u
  • FrameFcs : FND_FRP_FRAME_COMP_S , FRP_FND_FRAME_COMP_S
  • frameSize : fiuControlConfig_t , fiuOpenConfig_t
  • freeBuffer : fiuContext_t
  • frpInst : fiuRelocInstance_t , fiuInst_s

- h -

  • HDLCModeFlag : FrpFndHSTrngInfo_t
  • HsDataRedundancy : fiuOpenConfig_t
  • HSmodulation : fiuStats_t
  • HSModulationRate : FRP_FND_HS_RATE_S
  • HSNotAvailCtr : faxBufferMgmt_t
  • HSPktPayloadSize : fiuOpenConfig_t
  • HSRate : FrpFndMsgBody_u
  • HSTrainingInfo : FRP_FND_HS_TRNG_DETECT_S
  • HSTrngDetect : FrpFndMsgBody_u

- i -

  • ID : fiuNewConfig_t , fiuInst_s

- j -

  • JitterBufOverFlow : fiuStats_t
  • jmMsg : FndFrpMsgBody_u , FrpFndMsgBody_u

- l -

  • LocalTxNetTimeOutVal : fiuOpenConfig_t
  • LsDataRedundancy : fiuOpenConfig_t
  • LSPktPayloadSize : fiuOpenConfig_t

- m -

  • MaxFaxRate : fiuOpenConfig_t
  • MaxHSbufferUsage : fiuStats_t
  • MaxJitterBufDepth : fiuStats_t
  • MaxNetRxQDepth : fiuStats_t
  • maxUsage : faxBufferMgmt_t
  • ModulationType : FrpFndHSTrngInfo_t
  • MsgBody : FndFrpMsg_t , FrpFndMsg_t
  • MsgId : FrpFndMsg_t , FndFrpMsg_t

- n -

  • NetProtocol : fiuNetCallTbl_t , fiuOpenConfig_t
  • NetRxQOverFlow : fiuStats_t
  • next : faxBufferLinkedList_t
  • nextFree : faxBufferMgmt_t
  • NoActivityTimerVal : fiuOpenConfig_t
  • NSFCountryCode : fiuNSFInfo_t , fiuOpenConfig_t
  • NSFInfo : fiuStats_t
  • NSFManufacturer : fiuNSFInfo_t
  • NSFVendorCodeLSB : fiuOpenConfig_t
  • NSFVendorCodeMSB : fiuOpenConfig_t
  • NumberOfPages : fiuStats_t
  • NumInternalFIUBufs : fiuSizeCfg_t
  • NumInternalFIUOverlayBufs : fiuSizeCfg_t

- o -

  • overlayBuf : fiuInst_s
  • overlayBufSizeWords : fiuInst_s

- p -

  • payload : faxBufferLinkedList_t , faxBuffer_t
  • poolSizeWords : faxBufferMgmt_t
  • pPool : faxBufferMgmt_t

- r -

  • ReceiveOutSpec : fiuOpenConfig_t , fiuControlConfig_t
  • RtpPayloadType : fiuOpenConfig_t
  • RtpSyncSource : fiuOpenConfig_t
  • RxInvalidPackets : fiuStats_t
  • RxLostPackets : fiuStats_t
  • RxOutOfSeqPacket : fiuStats_t
  • RxOutQMaxDepth : fiuStats_t
  • RxOutQOverflows : fiuStats_t
  • RxPackets : fiuStats_t

- s -

  • sendInQMaxDepth : fiuStats_t
  • sendInQOverflows : fiuStats_t
  • SendOutSpec : fiuOpenConfig_t
  • sizeBytes : faxBuffer_t
  • SizeConfig : fiuNewConfig_t
  • slpInfo : FrpFndMsgBody_u
  • slpPageMode : FRP_FND_SLP_INFO_S
  • StartupTimer : fiuOpenConfig_t
  • state : fiuInst_s
  • SupportedExternalBuffSize : fiuContext_t

- t -

  • T30FeatureSelector : fiuOpenConfig_t
  • T38Version : fiuOpenConfig_t
  • targetInst : fiuEventHandlerSpec_t , fiuSendOutSpec_t , fiuReceiveOutSpec_t
  • TCFHandlingMethod : fiuOpenConfig_t
  • Timestamp : FrpFndMsg_t , FndFrpMsg_t
  • Tone : FRP_FND_TONE_DETECT_S , FND_FRP_TONE_ON_LS_S
  • ToneDetect : FrpFndMsgBody_u
  • ToneLs : FndFrpMsgBody_u
  • TxPackets : fiuStats_t
  • TxPacketsDropped : fiuStats_t

- v -

  • v34PriRate : FrpFndMsgBody_u , FndFrpMsgBody_u
  • v34Rate : FND_FRP_V34_PRI_RATE_S , FRP_FND_V34_PRI_RATE_S


FIU: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • f
  • t
  • v
  • w

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

- _ -

  • __extern : Version.h
  • _FAXPORT_C54 : faxport.h
  • _FAXPORT_C54_FAR : faxport.h
  • _FAXPORT_C55 : faxport.h
  • _FAXPORT_C55L : faxport.h
  • _FAXPORT_C64 : faxport.h
  • _FAXPORT_C64_BIG_ENDIAN : faxport.h
  • _FAXPORT_C64P : faxport.h
  • _FAXPORT_C64P_BIG_ENDIAN : faxport.h
  • _FAXPRAG_C54 : faxprag.h
  • _FAXPRAG_C54_FAR : faxprag.h
  • _FAXPRAG_C55 : faxprag.h
  • _FAXPRAG_C55L : faxprag.h
  • _FAXPRAG_C64 : faxprag.h
  • _FAXPRAG_C64_BIG_ENDIAN : faxprag.h
  • _FAXPRAG_C64P : faxprag.h
  • _FAXPRAG_C64P_BIG_ENDIAN : faxprag.h


FIU: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • f
  • t
  • v
  • w

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

- f -

  • FAX_BUFFER_LEN_BYTES : faxport.h
  • FAX_BUFFER_LEN_WORDS : faxport.h
  • FAX_BUFFER_LINK_LEN_BYTES : faxport.h
  • FAX_BUFFER_LINK_LEN_WORDS : faxport.h
  • FAX_HS_BUFFER_SIZE_BYTES : faxport.h
  • FAX_HS_BUFFER_SIZE_WORDS : faxport.h
  • FAX_NUMBER_HS_BUFFERS : faxutil.h
  • fax_timestamp16_compare() : faxutil.c , faxutil.h
  • fax_timestamp32_compare() : faxutil.c , faxutil.h
  • faxBitReverse() : faxutil.c , faxutil.h
  • faxBufferAdd() : faxutil.c , faxutil.h
  • faxBufferAlloc() : faxutil.c , faxutil.h
  • faxBufferFree() : faxutil.c , faxutil.h
  • faxBufferMgmtInit() : faxutil.c , faxutil.h
  • faxCriticalSectionBegin() : faxutil.c , faxutil.h
  • faxCriticalSectionEnd() : faxutil.c , faxutil.h
  • faxDebugTrace() : faxutil.c , faxutil.h
  • faxException() : faxutil.c , faxutil.h
  • faxOverlayBufInit() : faxutil.c , faxutil.h
  • faxResetStats() : faxutil.c , faxutil.h
  • faxSystemTime() : faxutil.c , faxutil.h
  • FIU_ACTIVATED : fiuloc.h
  • FIU_BUFFER_POOL_BUFN : fiu.c
  • FIU_BUFFER_POOL_OVERLAY_BUFN : fiu.c
  • fiu_CALL_SUCCESS_BITFIELD_CLEAR : fiu.h
  • fiu_CALL_SUCCESS_BITFIELD_DCN_LOCAL : fiu.h
  • fiu_CALL_SUCCESS_BITFIELD_DCN_REMOTE : fiu.h
  • fiu_CALL_SUCCESS_BITFIELD_DIS_AFTER_EOM : fiu.h
  • fiu_CALL_SUCCESS_BITFIELD_EOM : fiu.h
  • fiu_CALL_SUCCESS_BITFIELD_EOP : fiu.h
  • fiu_CALL_SUCCESS_BITFIELD_MCF : fiu.h
  • FIU_CLOSED : fiuloc.h
  • fiu_CTRL_ACTIVATE : fiu.h
  • fiu_CTRL_CONFIG : fiu.h
  • fiu_DBG_FATAL_ERROR : fiu.h
  • fiu_DBG_INFORMATIONAL : fiu.h
  • fiu_dbg_inst : fiu.c
  • fiu_DBG_LVL_1 : fiu.h
  • fiu_DBG_LVL_2 : fiu.h
  • fiu_DBG_OFF : fiu.h
  • fiu_DIR_DEST : fiu.h
  • fiu_DIR_ORG : fiu.h
  • fiu_DIR_UNKNOWN : fiu.h
  • fiu_ERROR : fiu.h
  • fiu_EVENT_CLEARDOWN : fiu.h
  • fiu_EVENT_G3_TO_V34 : fiu.h
  • fiu_EVENT_V34_TO_G3 : fiu.h
  • fiu_exc_assert : fiuloc.h
  • fiu_FEATURE_AAL2_CID_CHK_DISABLE : fiu.h
  • fiu_FEATURE_DIS_EFLAG_DISABLE : fiu.h
  • fiu_FEATURE_MDM_TRN_FAIL_COMP : fiu.h
  • fiu_FEATURE_NSF_OVERRIDE : fiu.h
  • fiu_FEATURE_RTP_TS_PROC_DISABLE : fiu.h
  • fiu_FEATURE_SLF_ENABLE : fiu.h
  • fiu_FEATURE_T38_VOCALTEC_INTEROP : fiu.h
  • fiu_FEATURE_TFOP_FC_REPEAT : fiu.h
  • fiu_FEATURE_V34_FAX : fiu.h
  • FIU_FND_INSTANCE_BUFN : fiu.c
  • FIU_FRP_INSTANCE_BUFN : fiu.c
  • FIU_INSTANCE_BUFN : fiu.c
  • FIU_NBUF : fiu.c
  • fiu_NOERR : fiu.h
  • fiu_NOMEMORY : fiu.h
  • fiu_NSF_CC_UNKNOWN : fiu.h
  • fiu_NSF_MC_UNKNOWN : fiu.h
  • FIU_OPEN : fiuloc.h
  • fiu_PT_AAL2 : fiu.h
  • fiu_PT_FRF11 : fiu.h
  • fiu_PT_RTP : fiu.h
  • fiu_PT_RTPB : fiu.h
  • fiu_PT_T2 : fiu.h
  • fiu_PT_T3 : fiu.h
  • fiu_PT_T38_RTP : fiu.h
  • fiu_PT_T38_UDPTL : fiu.h
  • fiu_PT_T38_UDPTL_RTP : fiu.h
  • fiu_SLP_MODE_MH_1728 : frpfndif.h
  • fiu_SLP_MODE_MH_2048 : frpfndif.h
  • fiu_SLP_MODE_MH_2432 : frpfndif.h
  • fiu_SLP_MODE_MH_3456 : frpfndif.h
  • fiu_SLP_MODE_MH_4096 : frpfndif.h
  • fiu_SLP_MODE_MH_4864 : frpfndif.h
  • fiu_SLP_MODE_MR_1728 : frpfndif.h
  • fiu_SLP_MODE_MR_2048 : frpfndif.h
  • fiu_SLP_MODE_MR_2432 : frpfndif.h
  • fiu_SLP_MODE_MR_3456 : frpfndif.h
  • fiu_SLP_MODE_MR_4096 : frpfndif.h
  • fiu_SLP_MODE_MR_4864 : frpfndif.h
  • fiu_SLP_MODE_TCF : frpfndif.h
  • fiu_SLP_MODE_TRANS : frpfndif.h
  • fiu_SLP_MODE_UNKNOWN : frpfndif.h
  • fiu_SWITCHOVER_PREAMBLE_RCVD_REMOTE : fiu.h
  • fiu_SWITCHOVER_V34_NOT_SUPPORTED : fiu.h
  • fiu_SWITCHOVER_V8_ANSAM_RCVD_REMOTE : fiu.h
  • fiu_SWITCHOVER_V8_CI_RCVD_LOCAL : fiu.h
  • fiu_SWITCHOVER_V8_CI_RCVD_REMOTE : fiu.h
  • fiu_SWITCHOVER_V8_CM_RCVD_LOCAL : fiu.h
  • fiu_SWITCHOVER_V8_CM_RCVD_REMOTE : fiu.h
  • fiu_T30FEATURE_ECM_DISABLE : fiu.h
  • fiu_T30FEATURE_MR_DISABLE : fiu.h
  • fiu_T30FEATURE_V34_DISABLE : fiu.h
  • fiuBufs : fiu.c
  • fiuClose() : fiu.h , fiu.c
  • fiuContext : fiu.h , faxutil.c
  • fiuControl() : fiu.h , fiu.c
  • fiuControlCode_e : fiu.h
  • fiuDelete() : fiu.h , fiu.c
  • fiuDirection_e : fiu.h
  • fiuExceptionCodes_e : frtrace.h
  • fiuFaxEventHandler() : fiu.c , fiuloc.h
  • fiuGetSizes() : fiu.h , fiu.c
  • fiuGetStats() : fiu.h , fiu.c
  • fiuInst_t : fiuloc.h
  • fiuNetProtocol_e : fiu.h
  • fiuNew() : fiu.c , fiu.h
  • fiuOpen() : fiu.c , fiu.h
  • fiuReceiveIn() : fiu.h , fiu.c
  • fiuReloc() : fiu.h
  • fiuSendIn() : fiu.h , fiu.c
  • fiuSLPMode_e : frpfndif.h
  • fiuTask() : fiu.c , fiu.h
  • fiuValidatePkt() : fiu.h , fiu.c
  • FND_AAL2_BUF_SIZE_ERROR : frtrace.h
  • FND_AAL2_LSTX_ERROR : frtrace.h
  • FND_AAL2_RX_INVALID_STATE : frtrace.h
  • FND_AAL2_TX_INVALID_STATE : frtrace.h
  • FND_BUFFER_SIZE_ERROR : frtrace.h
  • FND_EXC_CLOSE : frtrace.h
  • FND_EXC_FRF11_ENCODER : frtrace.h
  • FND_EXC_RELOC : frtrace.h
  • FND_EXC_SLP : frtrace.h
  • FND_EXC_T38DECODER_TASK : frtrace.h
  • FND_EXC_T38DECODER_UDP : frtrace.h
  • FND_EXC_T38ENCODER_UDP : frtrace.h
  • FND_FRP_COUNT : frpfndif.h
  • FND_FRP_DATA_BUFFER : frpfndif.h
  • FND_FRP_DATA_BYTE : frpfndif.h
  • FND_FRP_FRAME_COMP : frpfndif.h
  • FND_FRP_HS_TRAIN_NOTIF : frpfndif.h
  • FND_FRP_HS_TRAINING : frpfndif.h
  • FND_FRP_PREAMBLE : frpfndif.h
  • FND_FRP_PREAMBLE_NOTIF : frpfndif.h
  • FND_FRP_SIGNAL_END : frpfndif.h
  • FND_FRP_TONE_ON_LS : frpfndif.h
  • FND_FRP_V34_CC_RETRAIN : frpfndif.h
  • FND_FRP_V34_CTRL_BEGIN : frpfndif.h
  • FND_FRP_V34_PRI_BEGIN : frpfndif.h
  • FND_FRP_V34_PRI_RATE : frpfndif.h
  • FND_FRP_V8_CI : frpfndif.h
  • FND_FRP_V8_CM : frpfndif.h
  • FND_FRP_V8_JM : frpfndif.h
  • FND_FRP_V8_SIG : frpfndif.h
  • FND_NQ_LINK_LIST_ERROR : frtrace.h
  • FND_T2P_RX_INVALID_STATE : frtrace.h
  • FND_TFOP_PROTOCOL_ERROR : frtrace.h
  • FndFrpMsgId_e : frpfndif.h
  • FRP_EXC_INVALID_HS_RATE : frtrace.h
  • FRP_EXC_LTCF : frtrace.h
  • FRP_EXC_RTCF : frtrace.h
  • FRP_FND_COUNT : frpfndif.h
  • FRP_FND_DATA_BUFFER : frpfndif.h
  • FRP_FND_DATA_BYTE : frpfndif.h
  • FRP_FND_FRAME_COMP : frpfndif.h
  • FRP_FND_HS_RATE : frpfndif.h
  • FRP_FND_HS_TRNG_DETECT : frpfndif.h
  • FRP_FND_PREAMBLE_DETECT : frpfndif.h
  • FRP_FND_SIGNAL_END : frpfndif.h
  • FRP_FND_SLP_INFO : frpfndif.h
  • FRP_FND_TEP_DETECT : frpfndif.h
  • FRP_FND_TONE_DETECT : frpfndif.h
  • FRP_FND_V34_CC_RETRAIN : frpfndif.h
  • FRP_FND_V34_CTRL_BEGIN : frpfndif.h
  • FRP_FND_V34_CTRL_DATA : frpfndif.h
  • FRP_FND_V34_PRI_BEGIN : frpfndif.h
  • FRP_FND_V34_PRI_DATA : frpfndif.h
  • FRP_FND_V34_PRI_RATE : frpfndif.h
  • FRP_FND_V34_SIGNAL_END : frpfndif.h
  • FRP_FND_V8_CI : frpfndif.h
  • FRP_FND_V8_CM : frpfndif.h
  • FRP_FND_V8_JM : frpfndif.h
  • FRP_FND_V8_SIG : frpfndif.h
  • FRP_INVALID_EVT_TYPE : frtrace.h
  • FRP_INVALID_NEW_STATE : frtrace.h
  • FRP_STATE_ERROR : frtrace.h
  • FrpFndMsgId_e : frpfndif.h


FIU: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • f
  • t
  • v
  • w

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

- t -

  • ti_mas_fiu_Version___VERS : Version.h
  • ti_mas_fiu_Version__top__ : Version.h
  • ti_mas_fiu_Version_BTYPE : Version.h
  • ti_mas_fiu_Version_BUILD : Version.h
  • ti_mas_fiu_Version_MAJOR : Version.h
  • ti_mas_fiu_Version_MINOR : Version.h
  • ti_mas_fiu_Version_PATCH : Version.h
  • ti_mas_fiu_Version_QUALITY : Version.h
  • ti_mas_fiu_Version_WIDTH : Version.h
  • ti_mas_fiu_Version_XVERTICAL : Version.h
  • TRC_DBG_LVL_0 : frtrace.h
  • TRC_DBG_LVL_1 : frtrace.h
  • TRC_DBG_LVL_2 : frtrace.h
  • TRC_FIU_BUFF_FREE_ERROR : frtrace.h
  • TRC_FIU_CLEARDOWN_IND : frtrace.h
  • TRC_FIU_CLOSED : frtrace.h
  • TRC_FIU_DELETE_ERR : frtrace.h
  • TRC_FIU_EXC_CONTROL : frtrace.h
  • TRC_FIU_EXC_MEMORY : frtrace.h
  • TRC_FIU_G3_TO_V34 : frtrace.h
  • TRC_FIU_INVD_CONTROL : frtrace.h
  • TRC_FIU_NBUFFER_POOL_SIZE : frtrace.h
  • TRC_FIU_NO_HS_BUFFER_AVAIL : frtrace.h
  • TRC_FIU_OPEN : frtrace.h
  • TRC_FIU_OPEN_ERR : frtrace.h
  • TRC_FIU_RELOC : frtrace.h
  • TRC_FIU_TONE_DET_CTRL : frtrace.h
  • TRC_FIU_TONE_DETECTED : frtrace.h
  • TRC_FIU_V34_TO_G3 : frtrace.h
  • TRC_FIUDBG_LOST_TRACE : frtrace.h
  • TRC_FND_AAL2_INVALID_PKT : frtrace.h
  • TRC_FND_AAL2_RX : frtrace.h
  • TRC_FND_AAL2_STATE_CHANGE : frtrace.h
  • TRC_FND_AAL2_TX_PKT : frtrace.h
  • TRC_FND_EXCEPTION : frtrace.h
  • TRC_FND_FRF11_INVALID_PKT : frtrace.h
  • TRC_FND_FRF11_RX : frtrace.h
  • TRC_FND_FRF11_STATE_CHANGE : frtrace.h
  • TRC_FND_FRF11_TX_PKT : frtrace.h
  • TRC_FND_FRP_MESSAGE : frtrace.h
  • TRC_FND_HS_BUFFER_UNAVAIL : frtrace.h
  • TRC_FND_INVALID_PKT : frtrace.h
  • TRC_FND_JITBUF_OVERFLOW : frtrace.h
  • TRC_FND_NETRXQ_OVERFLOW : frtrace.h
  • TRC_FND_OUT_OF_SEQ_PKT : frtrace.h
  • TRC_FND_PACKET_LOSS : frtrace.h
  • TRC_FND_SLP_SLQ_OVERFLOW : frtrace.h
  • TRC_FND_STARTUP : frtrace.h
  • TRC_FND_T2P_RX_FRAME_COMP : frtrace.h
  • TRC_FND_T2P_RX_LC_DET : frtrace.h
  • TRC_FND_T2P_RX_LC_UNDEF : frtrace.h
  • TRC_FND_T2P_STATE_CHANGE : frtrace.h
  • TRC_FND_T2P_TX_FIRST_DATA : frtrace.h
  • TRC_FND_T2P_TX_PKT : frtrace.h
  • TRC_FND_T38U_ENC_DF_DELETE_ERROR : frtrace.h
  • TRC_FND_T38U_ENC_IFP_BUF_EMPTY : frtrace.h
  • TRC_FND_T38U_ENC_IFP_BUF_FULL : frtrace.h
  • TRC_FND_T38U_ENC_IFP_DELETE_ERROR : frtrace.h
  • TRC_FND_T38U_EXCEPTION : frtrace.h
  • TRC_FND_T38U_INVD_FDT : frtrace.h
  • TRC_FND_T38U_NO_DF_AVAIL : frtrace.h
  • TRC_FND_T38U_RX_PT_DET : frtrace.h
  • TRC_FND_T38U_STATE_CHANGE : frtrace.h
  • TRC_FND_T38U_TX_PKT : frtrace.h
  • TRC_FND_T38U_VERSION_NUM : frtrace.h
  • TRC_FND_TX_PKT_DROPPED : frtrace.h
  • TRC_FRP_ACTIVATE : frtrace.h
  • TRC_FRP_BUF_POOL_OVERLAY_INIT : frtrace.h
  • TRC_FRP_DDG_NO_BUFF_AVAIL : frtrace.h
  • TRC_FRP_EXCEPTION : frtrace.h
  • TRC_FRP_FCF2_ID : frtrace.h
  • TRC_FRP_FCF_ID : frtrace.h
  • TRC_FRP_FINAL_FRAME_DET : frtrace.h
  • TRC_FRP_FIRST_HS_DATA : frtrace.h
  • TRC_FRP_FIRST_LS_BYTE : frtrace.h
  • TRC_FRP_FM_DATA_SIZE_EXCEEDED : frtrace.h
  • TRC_FRP_FM_MESSAGE_ERROR : frtrace.h
  • TRC_FRP_FND_MESSAGE : frtrace.h
  • TRC_FRP_FND_MSG_DROPPED : frtrace.h
  • TRC_FRP_LOCAL_TONE_DET : frtrace.h
  • TRC_FRP_LOCAL_TONE_GEN : frtrace.h
  • TRC_FRP_MDEVT_IGNORE : frtrace.h
  • TRC_FRP_NETEVT_IGNORE : frtrace.h
  • TRC_FRP_PP_NUM_FRAMES : frtrace.h
  • TRC_FRP_REMOTE_TONE_DET : frtrace.h
  • TRC_FRP_RXOUTQ_OVERFLOW : frtrace.h
  • TRC_FRP_SENDINQ_OVERFLOW : frtrace.h
  • TRC_FRP_SLP_PAGE_MODE : frtrace.h
  • TRC_FRP_STARTUP : frtrace.h
  • TRC_FRP_STATE_CHANGE : frtrace.h
  • TRC_FRP_TIMER_EXPIRE : frtrace.h
  • TRC_FRP_TMREVT_IGNORE : frtrace.h
  • TRC_FRP_V34_LOCAL_PRI_RATE : frtrace.h


FIU: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • f
  • t
  • v
  • w

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


FIU: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • f
  • t
  • v
  • w

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

- w -

  • WriteDebugTrace : frtrace.h


FIU: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • f
  • t
  • v
  • w

- _ -

  • __extern : Version.h
  • _FAXPORT_C54 : faxport.h
  • _FAXPORT_C54_FAR : faxport.h
  • _FAXPORT_C55 : faxport.h
  • _FAXPORT_C55L : faxport.h
  • _FAXPORT_C64 : faxport.h
  • _FAXPORT_C64_BIG_ENDIAN : faxport.h
  • _FAXPORT_C64P : faxport.h
  • _FAXPORT_C64P_BIG_ENDIAN : faxport.h
  • _FAXPRAG_C54 : faxprag.h
  • _FAXPRAG_C54_FAR : faxprag.h
  • _FAXPRAG_C55 : faxprag.h
  • _FAXPRAG_C55L : faxprag.h
  • _FAXPRAG_C64 : faxprag.h
  • _FAXPRAG_C64_BIG_ENDIAN : faxprag.h
  • _FAXPRAG_C64P : faxprag.h
  • _FAXPRAG_C64P_BIG_ENDIAN : faxprag.h

- f -

  • FAX_BUFFER_LEN_BYTES : faxport.h
  • FAX_BUFFER_LEN_WORDS : faxport.h
  • FAX_BUFFER_LINK_LEN_BYTES : faxport.h
  • FAX_BUFFER_LINK_LEN_WORDS : faxport.h
  • FAX_HS_BUFFER_SIZE_BYTES : faxport.h
  • FAX_HS_BUFFER_SIZE_WORDS : faxport.h
  • FAX_NUMBER_HS_BUFFERS : faxutil.h
  • FIU_ACTIVATED : fiuloc.h
  • FIU_BUFFER_POOL_BUFN : fiu.c
  • FIU_BUFFER_POOL_OVERLAY_BUFN : fiu.c
  • fiu_CALL_SUCCESS_BITFIELD_CLEAR : fiu.h
  • fiu_CALL_SUCCESS_BITFIELD_DCN_LOCAL : fiu.h
  • fiu_CALL_SUCCESS_BITFIELD_DCN_REMOTE : fiu.h
  • fiu_CALL_SUCCESS_BITFIELD_DIS_AFTER_EOM : fiu.h
  • fiu_CALL_SUCCESS_BITFIELD_EOM : fiu.h
  • fiu_CALL_SUCCESS_BITFIELD_EOP : fiu.h
  • fiu_CALL_SUCCESS_BITFIELD_MCF : fiu.h
  • FIU_CLOSED : fiuloc.h
  • fiu_DBG_FATAL_ERROR : fiu.h
  • fiu_DBG_INFORMATIONAL : fiu.h
  • fiu_DBG_LVL_1 : fiu.h
  • fiu_DBG_LVL_2 : fiu.h
  • fiu_DBG_OFF : fiu.h
  • fiu_ERROR : fiu.h
  • fiu_EVENT_CLEARDOWN : fiu.h
  • fiu_EVENT_G3_TO_V34 : fiu.h
  • fiu_EVENT_V34_TO_G3 : fiu.h
  • fiu_exc_assert : fiuloc.h
  • fiu_FEATURE_AAL2_CID_CHK_DISABLE : fiu.h
  • fiu_FEATURE_DIS_EFLAG_DISABLE : fiu.h
  • fiu_FEATURE_MDM_TRN_FAIL_COMP : fiu.h
  • fiu_FEATURE_NSF_OVERRIDE : fiu.h
  • fiu_FEATURE_RTP_TS_PROC_DISABLE : fiu.h
  • fiu_FEATURE_SLF_ENABLE : fiu.h
  • fiu_FEATURE_T38_VOCALTEC_INTEROP : fiu.h
  • fiu_FEATURE_TFOP_FC_REPEAT : fiu.h
  • fiu_FEATURE_V34_FAX : fiu.h
  • FIU_FND_INSTANCE_BUFN : fiu.c
  • FIU_FRP_INSTANCE_BUFN : fiu.c
  • FIU_INSTANCE_BUFN : fiu.c
  • FIU_NBUF : fiu.c
  • fiu_NOERR : fiu.h
  • fiu_NOMEMORY : fiu.h
  • fiu_NSF_CC_UNKNOWN : fiu.h
  • fiu_NSF_MC_UNKNOWN : fiu.h
  • FIU_OPEN : fiuloc.h
  • fiu_SWITCHOVER_PREAMBLE_RCVD_REMOTE : fiu.h
  • fiu_SWITCHOVER_V34_NOT_SUPPORTED : fiu.h
  • fiu_SWITCHOVER_V8_ANSAM_RCVD_REMOTE : fiu.h
  • fiu_SWITCHOVER_V8_CI_RCVD_LOCAL : fiu.h
  • fiu_SWITCHOVER_V8_CI_RCVD_REMOTE : fiu.h
  • fiu_SWITCHOVER_V8_CM_RCVD_LOCAL : fiu.h
  • fiu_SWITCHOVER_V8_CM_RCVD_REMOTE : fiu.h
  • fiu_T30FEATURE_ECM_DISABLE : fiu.h
  • fiu_T30FEATURE_MR_DISABLE : fiu.h
  • fiu_T30FEATURE_V34_DISABLE : fiu.h

- t -

  • ti_mas_fiu_Version___VERS : Version.h
  • ti_mas_fiu_Version__top__ : Version.h
  • ti_mas_fiu_Version_BTYPE : Version.h
  • ti_mas_fiu_Version_BUILD : Version.h
  • ti_mas_fiu_Version_MAJOR : Version.h
  • ti_mas_fiu_Version_MINOR : Version.h
  • ti_mas_fiu_Version_PATCH : Version.h
  • ti_mas_fiu_Version_QUALITY : Version.h
  • ti_mas_fiu_Version_WIDTH : Version.h
  • ti_mas_fiu_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

- w -

  • WriteDebugTrace : frtrace.h


FIU: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines

  • fiuControlCode_e : fiu.h
  • fiuDirection_e : fiu.h
  • fiuExceptionCodes_e : frtrace.h
  • fiuNetProtocol_e : fiu.h
  • fiuSLPMode_e : frpfndif.h
  • FndFrpMsgId_e : frpfndif.h
  • FrpFndMsgId_e : frpfndif.h


FIU: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • f
  • t

- f -

  • fiu_CTRL_ACTIVATE : fiu.h
  • fiu_CTRL_CONFIG : fiu.h
  • fiu_DIR_DEST : fiu.h
  • fiu_DIR_ORG : fiu.h
  • fiu_DIR_UNKNOWN : fiu.h
  • fiu_PT_AAL2 : fiu.h
  • fiu_PT_FRF11 : fiu.h
  • fiu_PT_RTP : fiu.h
  • fiu_PT_RTPB : fiu.h
  • fiu_PT_T2 : fiu.h
  • fiu_PT_T3 : fiu.h
  • fiu_PT_T38_RTP : fiu.h
  • fiu_PT_T38_UDPTL : fiu.h
  • fiu_PT_T38_UDPTL_RTP : fiu.h
  • fiu_SLP_MODE_MH_1728 : frpfndif.h
  • fiu_SLP_MODE_MH_2048 : frpfndif.h
  • fiu_SLP_MODE_MH_2432 : frpfndif.h
  • fiu_SLP_MODE_MH_3456 : frpfndif.h
  • fiu_SLP_MODE_MH_4096 : frpfndif.h
  • fiu_SLP_MODE_MH_4864 : frpfndif.h
  • fiu_SLP_MODE_MR_1728 : frpfndif.h
  • fiu_SLP_MODE_MR_2048 : frpfndif.h
  • fiu_SLP_MODE_MR_2432 : frpfndif.h
  • fiu_SLP_MODE_MR_3456 : frpfndif.h
  • fiu_SLP_MODE_MR_4096 : frpfndif.h
  • fiu_SLP_MODE_MR_4864 : frpfndif.h
  • fiu_SLP_MODE_TCF : frpfndif.h
  • fiu_SLP_MODE_TRANS : frpfndif.h
  • fiu_SLP_MODE_UNKNOWN : frpfndif.h
  • FND_AAL2_BUF_SIZE_ERROR : frtrace.h
  • FND_AAL2_LSTX_ERROR : frtrace.h
  • FND_AAL2_RX_INVALID_STATE : frtrace.h
  • FND_AAL2_TX_INVALID_STATE : frtrace.h
  • FND_BUFFER_SIZE_ERROR : frtrace.h
  • FND_EXC_CLOSE : frtrace.h
  • FND_EXC_FRF11_ENCODER : frtrace.h
  • FND_EXC_RELOC : frtrace.h
  • FND_EXC_SLP : frtrace.h
  • FND_EXC_T38DECODER_TASK : frtrace.h
  • FND_EXC_T38DECODER_UDP : frtrace.h
  • FND_EXC_T38ENCODER_UDP : frtrace.h
  • FND_FRP_COUNT : frpfndif.h
  • FND_FRP_DATA_BUFFER : frpfndif.h
  • FND_FRP_DATA_BYTE : frpfndif.h
  • FND_FRP_FRAME_COMP : frpfndif.h
  • FND_FRP_HS_TRAIN_NOTIF : frpfndif.h
  • FND_FRP_HS_TRAINING : frpfndif.h
  • FND_FRP_PREAMBLE : frpfndif.h
  • FND_FRP_PREAMBLE_NOTIF : frpfndif.h
  • FND_FRP_SIGNAL_END : frpfndif.h
  • FND_FRP_TONE_ON_LS : frpfndif.h
  • FND_FRP_V34_CC_RETRAIN : frpfndif.h
  • FND_FRP_V34_CTRL_BEGIN : frpfndif.h
  • FND_FRP_V34_PRI_BEGIN : frpfndif.h
  • FND_FRP_V34_PRI_RATE : frpfndif.h
  • FND_FRP_V8_CI : frpfndif.h
  • FND_FRP_V8_CM : frpfndif.h
  • FND_FRP_V8_JM : frpfndif.h
  • FND_FRP_V8_SIG : frpfndif.h
  • FND_NQ_LINK_LIST_ERROR : frtrace.h
  • FND_T2P_RX_INVALID_STATE : frtrace.h
  • FND_TFOP_PROTOCOL_ERROR : frtrace.h
  • FRP_EXC_INVALID_HS_RATE : frtrace.h
  • FRP_EXC_LTCF : frtrace.h
  • FRP_EXC_RTCF : frtrace.h
  • FRP_FND_COUNT : frpfndif.h
  • FRP_FND_DATA_BUFFER : frpfndif.h
  • FRP_FND_DATA_BYTE : frpfndif.h
  • FRP_FND_FRAME_COMP : frpfndif.h
  • FRP_FND_HS_RATE : frpfndif.h
  • FRP_FND_HS_TRNG_DETECT : frpfndif.h
  • FRP_FND_PREAMBLE_DETECT : frpfndif.h
  • FRP_FND_SIGNAL_END : frpfndif.h
  • FRP_FND_SLP_INFO : frpfndif.h
  • FRP_FND_TEP_DETECT : frpfndif.h
  • FRP_FND_TONE_DETECT : frpfndif.h
  • FRP_FND_V34_CC_RETRAIN : frpfndif.h
  • FRP_FND_V34_CTRL_BEGIN : frpfndif.h
  • FRP_FND_V34_CTRL_DATA : frpfndif.h
  • FRP_FND_V34_PRI_BEGIN : frpfndif.h
  • FRP_FND_V34_PRI_DATA : frpfndif.h
  • FRP_FND_V34_PRI_RATE : frpfndif.h
  • FRP_FND_V34_SIGNAL_END : frpfndif.h
  • FRP_FND_V8_CI : frpfndif.h
  • FRP_FND_V8_CM : frpfndif.h
  • FRP_FND_V8_JM : frpfndif.h
  • FRP_FND_V8_SIG : frpfndif.h
  • FRP_INVALID_EVT_TYPE : frtrace.h
  • FRP_INVALID_NEW_STATE : frtrace.h
  • FRP_STATE_ERROR : frtrace.h

- t -

  • TRC_DBG_LVL_0 : frtrace.h
  • TRC_DBG_LVL_1 : frtrace.h
  • TRC_DBG_LVL_2 : frtrace.h
  • TRC_FIU_BUFF_FREE_ERROR : frtrace.h
  • TRC_FIU_CLEARDOWN_IND : frtrace.h
  • TRC_FIU_CLOSED : frtrace.h
  • TRC_FIU_DELETE_ERR : frtrace.h
  • TRC_FIU_EXC_CONTROL : frtrace.h
  • TRC_FIU_EXC_MEMORY : frtrace.h
  • TRC_FIU_G3_TO_V34 : frtrace.h
  • TRC_FIU_INVD_CONTROL : frtrace.h
  • TRC_FIU_NBUFFER_POOL_SIZE : frtrace.h
  • TRC_FIU_NO_HS_BUFFER_AVAIL : frtrace.h
  • TRC_FIU_OPEN : frtrace.h
  • TRC_FIU_OPEN_ERR : frtrace.h
  • TRC_FIU_RELOC : frtrace.h
  • TRC_FIU_TONE_DET_CTRL : frtrace.h
  • TRC_FIU_TONE_DETECTED : frtrace.h
  • TRC_FIU_V34_TO_G3 : frtrace.h
  • TRC_FIUDBG_LOST_TRACE : frtrace.h
  • TRC_FND_AAL2_INVALID_PKT : frtrace.h
  • TRC_FND_AAL2_RX : frtrace.h
  • TRC_FND_AAL2_STATE_CHANGE : frtrace.h
  • TRC_FND_AAL2_TX_PKT : frtrace.h
  • TRC_FND_EXCEPTION : frtrace.h
  • TRC_FND_FRF11_INVALID_PKT : frtrace.h
  • TRC_FND_FRF11_RX : frtrace.h
  • TRC_FND_FRF11_STATE_CHANGE : frtrace.h
  • TRC_FND_FRF11_TX_PKT : frtrace.h
  • TRC_FND_FRP_MESSAGE : frtrace.h
  • TRC_FND_HS_BUFFER_UNAVAIL : frtrace.h
  • TRC_FND_INVALID_PKT : frtrace.h
  • TRC_FND_JITBUF_OVERFLOW : frtrace.h
  • TRC_FND_NETRXQ_OVERFLOW : frtrace.h
  • TRC_FND_OUT_OF_SEQ_PKT : frtrace.h
  • TRC_FND_PACKET_LOSS : frtrace.h
  • TRC_FND_SLP_SLQ_OVERFLOW : frtrace.h
  • TRC_FND_STARTUP : frtrace.h
  • TRC_FND_T2P_RX_FRAME_COMP : frtrace.h
  • TRC_FND_T2P_RX_LC_DET : frtrace.h
  • TRC_FND_T2P_RX_LC_UNDEF : frtrace.h
  • TRC_FND_T2P_STATE_CHANGE : frtrace.h
  • TRC_FND_T2P_TX_FIRST_DATA : frtrace.h
  • TRC_FND_T2P_TX_PKT : frtrace.h
  • TRC_FND_T38U_ENC_DF_DELETE_ERROR : frtrace.h
  • TRC_FND_T38U_ENC_IFP_BUF_EMPTY : frtrace.h
  • TRC_FND_T38U_ENC_IFP_BUF_FULL : frtrace.h
  • TRC_FND_T38U_ENC_IFP_DELETE_ERROR : frtrace.h
  • TRC_FND_T38U_EXCEPTION : frtrace.h
  • TRC_FND_T38U_INVD_FDT : frtrace.h
  • TRC_FND_T38U_NO_DF_AVAIL : frtrace.h
  • TRC_FND_T38U_RX_PT_DET : frtrace.h
  • TRC_FND_T38U_STATE_CHANGE : frtrace.h
  • TRC_FND_T38U_TX_PKT : frtrace.h
  • TRC_FND_T38U_VERSION_NUM : frtrace.h
  • TRC_FND_TX_PKT_DROPPED : frtrace.h
  • TRC_FRP_ACTIVATE : frtrace.h
  • TRC_FRP_BUF_POOL_OVERLAY_INIT : frtrace.h
  • TRC_FRP_DDG_NO_BUFF_AVAIL : frtrace.h
  • TRC_FRP_EXCEPTION : frtrace.h
  • TRC_FRP_FCF2_ID : frtrace.h
  • TRC_FRP_FCF_ID : frtrace.h
  • TRC_FRP_FINAL_FRAME_DET : frtrace.h
  • TRC_FRP_FIRST_HS_DATA : frtrace.h
  • TRC_FRP_FIRST_LS_BYTE : frtrace.h
  • TRC_FRP_FM_DATA_SIZE_EXCEEDED : frtrace.h
  • TRC_FRP_FM_MESSAGE_ERROR : frtrace.h
  • TRC_FRP_FND_MESSAGE : frtrace.h
  • TRC_FRP_FND_MSG_DROPPED : frtrace.h
  • TRC_FRP_LOCAL_TONE_DET : frtrace.h
  • TRC_FRP_LOCAL_TONE_GEN : frtrace.h
  • TRC_FRP_MDEVT_IGNORE : frtrace.h
  • TRC_FRP_NETEVT_IGNORE : frtrace.h
  • TRC_FRP_PP_NUM_FRAMES : frtrace.h
  • TRC_FRP_REMOTE_TONE_DET : frtrace.h
  • TRC_FRP_RXOUTQ_OVERFLOW : frtrace.h
  • TRC_FRP_SENDINQ_OVERFLOW : frtrace.h
  • TRC_FRP_SLP_PAGE_MODE : frtrace.h
  • TRC_FRP_STARTUP : frtrace.h
  • TRC_FRP_STATE_CHANGE : frtrace.h
  • TRC_FRP_TIMER_EXPIRE : frtrace.h
  • TRC_FRP_TMREVT_IGNORE : frtrace.h
  • TRC_FRP_V34_LOCAL_PRI_RATE : frtrace.h


FIU: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • f

- f -

  • fax_timestamp16_compare() : faxutil.c , faxutil.h
  • fax_timestamp32_compare() : faxutil.c , faxutil.h
  • faxBitReverse() : faxutil.h , faxutil.c
  • faxBufferAdd() : faxutil.c , faxutil.h
  • faxBufferAlloc() : faxutil.c , faxutil.h
  • faxBufferFree() : faxutil.h , faxutil.c
  • faxBufferMgmtInit() : faxutil.c , faxutil.h
  • faxCriticalSectionBegin() : faxutil.h , faxutil.c
  • faxCriticalSectionEnd() : faxutil.h , faxutil.c
  • faxDebugTrace() : faxutil.h , faxutil.c
  • faxException() : faxutil.h , faxutil.c
  • faxOverlayBufInit() : faxutil.h , faxutil.c
  • faxResetStats() : faxutil.h , faxutil.c
  • faxSystemTime() : faxutil.h , faxutil.c
  • fiuClose() : fiu.c , fiu.h
  • fiuControl() : fiu.c , fiu.h
  • fiuDelete() : fiu.h , fiu.c
  • fiuFaxEventHandler() : fiuloc.h , fiu.c
  • fiuGetSizes() : fiu.c , fiu.h
  • fiuGetStats() : fiu.c , fiu.h
  • fiuNew() : fiu.h , fiu.c
  • fiuOpen() : fiu.h , fiu.c
  • fiuReceiveIn() : fiu.h , fiu.c
  • fiuReloc() : fiu.h
  • fiuSendIn() : fiu.h , fiu.c
  • fiuTask() : fiu.c , fiu.h
  • fiuValidatePkt() : fiu.h , fiu.c


FIU: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines

  • fiuInst_t : fiuloc.h


FIU: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines

  • fiu_dbg_inst : fiu.c
  • fiuBufs : fiu.c
  • fiuContext : fiu.h , faxutil.c


FIU: 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.


FIU: T.30 Protocol Call Success Bitfield

T.30 Protocol Call Success Bitfield
[FIU External API]

Collaboration diagram for T.30 Protocol Call Success Bitfield:

Detailed Description

A one-word (16-bit) success indicator that reflects the current status of important protocol events in the fax call. Bits 0-9 are unused.

Defines

#define | fiu_CALL_SUCCESS_BITFIELD_CLEAR 0x0000
#define | fiu_CALL_SUCCESS_BITFIELD_EOP 0x8000
#define | fiu_CALL_SUCCESS_BITFIELD_MCF 0x4000
#define | fiu_CALL_SUCCESS_BITFIELD_EOM 0x2000
#define | fiu_CALL_SUCCESS_BITFIELD_DCN_LOCAL 0x1000
#define | fiu_CALL_SUCCESS_BITFIELD_DCN_REMOTE 0x0800
#define | fiu_CALL_SUCCESS_BITFIELD_DIS_AFTER_EOM 0x0400

Define Documentation

#define fiu_CALL_SUCCESS_BITFIELD_CLEAR 0x0000

All bits

Definition at line 562 of file fiu.h.

#define fiu_CALL_SUCCESS_BITFIELD_EOP 0x8000

Bit 15 End of Procedure (EOP) indicator rec'd (either tele or net)

Definition at line 563 of file fiu.h.

#define fiu_CALL_SUCCESS_BITFIELD_MCF 0x4000

Bit 14 Message Confirmed (MCF) indicator rec'd (either tele or net)

Definition at line 564 of file fiu.h.

#define fiu_CALL_SUCCESS_BITFIELD_EOM 0x2000

Bit 13 - End of Message (EOM) indicator rec'd (either tele or net)

Definition at line 565 of file fiu.h.

#define fiu_CALL_SUCCESS_BITFIELD_DCN_LOCAL 0x1000

Bit 12 - Disconnect (DCN) indicator received from tele

Definition at line 566 of file fiu.h.

#define fiu_CALL_SUCCESS_BITFIELD_DCN_REMOTE 0x0800

Bit 11 - Disconnect (DCN) indicator received from net

Definition at line 567 of file fiu.h.

#define fiu_CALL_SUCCESS_BITFIELD_DIS_AFTER_EOM 0x0400

Bit 10 - DIS received after EOM negotiated

Definition at line 568 of file fiu.h.


FIU: Fax Debug Mode

Fax Debug Mode
[FIU External API]

Collaboration diagram for Fax Debug Mode:

Defines

#define | fiu_DBG_OFF 0
#define | fiu_DBG_LVL_1 1
#define | fiu_DBG_LVL_2 2

Define Documentation

#define fiu_DBG_OFF 0

FIU Debug Mode -- Only fatal errors are reported

Definition at line 130 of file fiu.h.

#define fiu_DBG_LVL_1 1

FIU Debug Mode -- Reports high-level protocol state information and fatal errors.Types of protocol information reported includes: Protocol state transitions (OPEN,IDLE, Local Low-speed Receive, Local High-speed Receive, Local TCF Receive,Local Low-speed Transmit, Local High-speed Transmit, Local TCF Transmit, Switch-out Pending) and detected low-speed frames (e.g., DIS, DCS, etc.). Detected network anomalies are also reported (e.g., packet loss).

Definition at line 140 of file fiu.h.

#define fiu_DBG_LVL_2 2

FIU Debug Mode -- Telogy internal debug mode

Definition at line 145 of file fiu.h.


FIU: Return Error Codes

Return Error Codes
[FIU External API]

Collaboration diagram for Return Error Codes:

Defines

#define | fiu_NOMEMORY (-1)
#define | fiu_NOERR 0
#define | fiu_ERROR 1

Define Documentation

#define fiu_NOMEMORY (-1)

FIU return code -- Insufficient memory allocated

Definition at line 108 of file fiu.h.

Referenced by fiuNew().

#define fiu_NOERR 0

FIU return code -- Initiaization of FIU was successful

Definition at line 113 of file fiu.h.

Referenced by fiuGetSizes(), fiuNew(), and fiuOpen().

#define fiu_ERROR 1

FIU return code -- Invalid configuration

Definition at line 118 of file fiu.h.

Referenced by fiuNew(), and fiuOpen().


FIU: FIU External API

FIU External API

Collaboration diagram for FIU External API:

Detailed Description

Modules

Return Error Codes
Fax Debug Mode
Fax Control Code
FIU Debug message types for debugInfo()
FIU Event Codes
Fax Switchover Reason Codes
Network Protocol Types
T30 Feature Selector Definitions
FIU Feature Selector Definitions
T.30 Protocol Call Success Bitfield

Data Structures

struct | fiuContext_t
The FIU software module has a global context structure that contains non channel specific configuration information which is used by all active FIU instances. FIU Context is a structure that must be declared globally by system code, and initialized prior to any calls to the FIU API. More...
struct | fiuContext_t
The FIU software module has a global context structure that contains non channel specific configuration information which is used by all active FIU instances. FIU Context is a structure that must be declared globally by system code, and initialized prior to any calls to the FIU API. More...
struct | fiuEventHandlerSpec_t
Specification of fiuEventHandlerSpec Object This structure contains the address of function and associated data structure for reporting events to the system for processing. More...
struct | fiuSendOutSpec_t
Specification of fiuSendOutSpec Object This structure contains the address of function and associated data structure for sending FAX packets to the network. More...
struct | fiuReceiveOutSpec_t
Specification of fiuReceiveOutSpec Object. More...
struct | fiuSizeCfg_t
FIU Size Configuration structure. More...
struct | fiuNewConfig_t
New Configuration structure. More...
struct | fiuNetCallTbl_t
FIU Protocol Call Table. More...
struct | fiuOpenConfig_t
Open Configuration structure. More...
struct | fiuControlConfig_t
Control Configuration structure. More...
struct | fiuNSFInfo_t
NSF Information data structure. More...
struct | fiuStats_t
FIU Statistics Structure. More...
struct | fiuRelocInstance_t
FIU Relocation structure. More...

ECO (Telogy Embedded Communication Object) APIs

tint | fiuGetSizes (tint *nbufs, const ecomemBuffer_t **bufs, fiuSizeCfg_t *SizeCfg)
This function obtains memory requirements for an instance of FIU.
tint | fiuNew (void **fiuInst, tint nbufs, ecomemBuffer_t *bufs, fiuNewConfig_t *cfg)
This function creates an instance of FIU and initializes the memory buffer pointers in the instance.
Remarks:
Function fiuNew() must be called before fiuOpen()is called.

void | fiuDelete (void **fiuInst)
This function deletes the FIU instance identified by fiuInst.
Remarks:
FIU must be closed prior to being deleted.

void | fiuControl (void *fiuInst, fiuControlCode_e ctrlCode, fiuControlConfig_t *ctrlConfig)
This function controls the operations of an instance of FIU.
tint | fiuOpen (void *fiuInst, fiuOpenConfig_t *cfg)
This function initializes and configures an FIU instance.
void | fiuClose (void *fiuInst)
This function closes the FIU instance identified by fiuInst. It sets the state of FIU to CLOSED.
tint | fiuReceiveIn (void *fiuInst, xferpktInfo_t *pktInfo)
This function processes packets received from the network.
void | fiuSendIn (void *fiuInst, void *message)
This function passes a message from a fax modem module (FM) to FIU for processing.
void | fiuTask (void *fiuInst)
Routine which performs fax protocol processing and network encoder/decoder operations.
void | fiuReloc (void **newFiuInst, void *oldFiuInst, ecomemBuffer_t *newFiuBufs)
Relocates an instantiated FIU instance to another area of memory.
void | fiuGetStats (void *fiuInst, tbool freset, fiuStats_t *stats)
Routine which obtains FIU statistics (both network- and call-specific) The stats can be requested from either an active call, or the last call if the current call session has been terminated.
tbool | fiuValidatePkt (fiuNetProtocol_e netProtocolType, tword *pkt, tuint pktSize)
Validates T.38 UDP packet This routine checks if the packet is a valid fax relay packet. Currently, only T.38 UDPTL is supported.

Defines

#define | fiu_NSF_CC_UNKNOWN 0xFFFF
NSF field definitions:.
#define | fiu_NSF_MC_UNKNOWN 0xFFFF

Enumerations

enum | fiuDirection_e { fiu_DIR_ORG, fiu_DIR_DEST, fiu_DIR_UNKNOWN = 0x00FF }
Direction definitions. More...

Variables

fiuContext_t fiuContext
reference of FIU Context Structure

Define Documentation

#define fiu_NSF_CC_UNKNOWN 0xFFFF

NSF field definitions:.

Country code unavailable

Definition at line 598 of file fiu.h.

Referenced by faxResetStats().

#define fiu_NSF_MC_UNKNOWN 0xFFFF

Manufacturer's code unavailable

Definition at line 599 of file fiu.h.

Referenced by faxResetStats().

Enumeration Type Documentation

enum fiuDirection_e

Direction definitions.

Enumerator:
fiu_DIR_ORG | local FTE is Originating
fiu_DIR_DEST | local FTE is Destination
fiu_DIR_UNKNOWN | local FTE is Direction is unknown

Definition at line 574 of file fiu.h.

Function Documentation

tint fiuGetSizes | ( | tint * | nbufs,
 |  | const ecomemBuffer_t ** | bufs,
 |  | fiuSizeCfg_t * | SizeCfg
 | ) |  |

This function obtains memory requirements for an instance of FIU.

Parameters:
[in] | SizeCfg | 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:
Value Return Error Codes
Precondition:
Global data structure fiuContext must be defined and initialized properly.
See also:
fiuSizeCfg_t

Definition at line 205 of file fiu.c.

References FIU_BUFFER_POOL_BUFN, FIU_BUFFER_POOL_OVERLAY_BUFN, FIU_NBUF, fiu_NOERR, fiuBufs, fiuContext, fiuSizeCfg_t::NumInternalFIUBufs, fiuSizeCfg_t::NumInternalFIUOverlayBufs, and fiuContext_t::SupportedExternalBuffSize.

tint fiuNew | ( | void ** | fiuInst,
 |  | tint | nbufs,
 |  | ecomemBuffer_t * | bufs,
 |  | fiuNewConfig_t * | cfg
 | ) |  |

This function creates an instance of FIU and initializes the memory buffer pointers in the instance.

Remarks:
Function fiuNew() must be called before fiuOpen()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] | fiuInst | Pointer to FIU instance
Return values:
Value Return Error Codes
Precondition:
Pointer fiuInst must be set to NULL before this function is called.
Postcondition:
Pointer fiuInst will be set to point to the instance buffer described by bufs.
See also:
fiuNewConfig_t

Definition at line 250 of file fiu.c.

References FIU_BUFFER_POOL_OVERLAY_BUFN, fiu_ERROR, FIU_NBUF, fiu_NOERR, fiu_NOMEMORY, and fiuBufs.

void fiuDelete ( void ** fiuInst )

This function deletes the FIU instance identified by fiuInst.

Remarks:
FIU must be closed prior to being deleted.

Parameters:
[in,out] fiuInst Pointer to FIU instance.
Postcondition:
Pointer fiuInst will be set to NULL after this function is called.

Definition at line 316 of file fiu.c.

References FIU_CLOSED, fiu_exc_assert, fiuInst_s::state, and TRC_FIU_DELETE_ERR.

void fiuControl | ( | void * | fiuInst,
 |  | fiuControlCode_e | ctrlCode,
 |  | fiuControlConfig_t * | ctrlConfig
 | ) |  |

This function controls the operations of an instance of FIU.

Parameters:
[in] | ctrlConfig | Pointer to FIU control config structure.
[in] | ctrlCode | FIU control code.
[in,out] | fiuInst | Pointer to FIU instance.
See also:
fiuControlCode_e

fiuControlConfig_t

Definition at line 337 of file fiu.c.

References FIU_ACTIVATED, FIU_CLOSED, fiu_CTRL_ACTIVATE, fiu_CTRL_CONFIG, FIU_OPEN, fiuReceiveOutSpec_t::fiuReceiveOut, fiuInst_s::fndInst, fiuControlConfig_t::frameSize, fiuInst_s::frpInst, fiuControlConfig_t::ReceiveOutSpec, fiuInst_s::state, fiuReceiveOutSpec_t::targetInst, TRC_DBG_LVL_1, TRC_FIU_INVD_CONTROL, and WriteDebugTrace.

tint fiuOpen | ( | void * | fiuInst,
 |  | fiuOpenConfig_t * | cfg
 | ) |  |

This function initializes and configures an FIU instance.

Parameters:
[in] | cfg | Pointer to FIU Open Configuration Structure.
[in,out] | fiuInst | Pointer to FIU instance.
Return values:
Value Return Error Codes
Postcondition:
The instance's state will be set to OPEN.
See also:
fiuOpenConfig_t

Definition at line 382 of file fiu.c.

References fiuOpenConfig_t::AAL2cid, fiuInst_s::BufferMgmt, fiuOpenConfig_t::CleardownTimer, fiuInst_s::dbgMode, fiuOpenConfig_t::dbgMode, fiuOpenConfig_t::EflagStartTimer, fiuOpenConfig_t::EflagStopTimer, fiuInst_s::EventHandlerSpec, fiuOpenConfig_t::EventHandlerSpec, FAX_HS_BUFFER_SIZE_WORDS, faxBufferMgmtInit(), faxDebugTrace(), fiuOpenConfig_t::faxNetCallTblPtr, fiuOpenConfig_t::faxNomDelay, fiuOpenConfig_t::faxPacketSize, faxResetStats(), fiuInst_s::faxStats, FIU_CLOSED, fiu_ERROR, fiu_exc_assert, fiu_FEATURE_SLF_ENABLE, fiu_FEATURE_T38_VOCALTEC_INTEROP, fiu_NOERR, FIU_OPEN, fiu_T30FEATURE_V34_DISABLE, fiuFaxEventHandler(), fiuOpenConfig_t::FIUFeatureSelector, fiuReceiveOutSpec_t::fiuReceiveOut, fiuSendOutSpec_t::fiuSendOut, fiuInst_s::fndInst, fiuOpenConfig_t::frameSize, fiuInst_s::frpInst, fiuOpenConfig_t::HsDataRedundancy, fiuOpenConfig_t::HSPktPayloadSize, fiuInst_s::ID, fiuOpenConfig_t::LocalTxNetTimeOutVal, fiuOpenConfig_t::LsDataRedundancy, fiuOpenConfig_t::LSPktPayloadSize, fiuOpenConfig_t::MaxFaxRate, fiuOpenConfig_t::NetProtocol, fiuOpenConfig_t::NoActivityTimerVal, fiuOpenConfig_t::NSFCountryCode, fiuOpenConfig_t::NSFVendorCodeLSB, fiuOpenConfig_t::NSFVendorCodeMSB, fiuOpenConfig_t::ReceiveOutSpec, fiuOpenConfig_t::RtpPayloadType, fiuOpenConfig_t::RtpSyncSource, fiuOpenConfig_t::SendOutSpec, fiuOpenConfig_t::StartupTimer, fiuInst_s::state, fiuOpenConfig_t::T30FeatureSelector, fiuOpenConfig_t::T38Version, fiuReceiveOutSpec_t::targetInst, fiuSendOutSpec_t::targetInst, fiuOpenConfig_t::TCFHandlingMethod, TRC_DBG_LVL_1, TRC_FIU_OPEN, and TRC_FIU_OPEN_ERR.

Here is the call graph for this function:

void fiuClose ( void * fiuInst )

This function closes the FIU instance identified by fiuInst. It sets the state of FIU to CLOSED.

Parameters:
[in,out] fiuInst

Definition at line 500 of file fiu.c.

References fiuInst_s::BufferMgmt, faxBufferMgmt_t::currentUsage, faxDebugTrace(), FIU_CLOSED, fiu_exc_assert, fiuInst_s::fndInst, fiuInst_s::frpInst, fiuInst_s::state, TRC_DBG_LVL_1, TRC_FIU_CLOSED, and TRC_FIU_EXC_MEMORY.

Here is the call graph for this function:

tint fiuReceiveIn | ( | void * | fiuInst,
 |  | xferpktInfo_t * | pktInfo
 | ) |  |

This function processes packets received from the network.

Parameters:
[in] | pktInfo | Pointer to the packet info structure.
[in,out] | fiuInst | Pointer to FIU instance.

Definition at line 546 of file fiu.c.

References FIU_ACTIVATED, fiuInst_s::fndInst, and fiuInst_s::state.

void fiuSendIn | ( | void * | fiuInst,
 |  | void * | message
 | ) |  |

This function passes a message from a fax modem module (FM) to FIU for processing.

The message received from the FM is passed to the FRP module for processing. data is processed by the FRP. The FM to FP message structure is defined in the IFFAX.chm

Parameters:
[in] | message | a pointer to the FM to FP message structure.
[in,out] | fiuInst | Pointer to FIU instance.

Definition at line 625 of file fiu.c.

References FIU_ACTIVATED, fiuInst_s::frpInst, and fiuInst_s::state.

void fiuTask ( void * fiuInst )

Routine which performs fax protocol processing and network encoder/decoder operations.

The fiuTask function is called every frame. The fiuTask perform FAX protocol processing. Specifically, the Fax Protocol Task is executed -- performing FAX protocol processing on both fax modem messages and network data/protocol messages. Next, the network driver task is executed to perform any required network encoder and/or decoder operations.

Remarks:
The order of the function calls is important. First, the FND task is executed, then the FRP task is executed. The reasoning for this execution order is to allow data to be provided to the modem from the network, preventing modem underruns.
Parameters:
[in,out] fiuInst Pointer to FIU instance.

Definition at line 596 of file fiu.c.

References FIU_ACTIVATED, fiuInst_s::fndInst, fiuInst_s::frpInst, and fiuInst_s::state.

void fiuReloc | ( | void ** | newFiuInst,
 |  | void * | oldFiuInst,
 |  | ecomemBuffer_t * | newFiuBufs
 | ) |  |

Relocates an instantiated FIU instance to another area of memory.

This function takes an existing (possibly active) instance of FIU and relocates it to another part of the DSP's memory. It is assumed that all memory management is handled external to the fiuReloc function. In particular, it is assumed that the calling code has allocated adequate memory for the new FIU instance and its associated runtime (dynamic) buffers; that the newly allocated memory space is contiguous; and that the new memory has been overwritten with the contents of the old FIU instance structure using the memcopy() C library function.

Remarks:
This function should not be interrupted during its execution
Parameters:
[in,out] | newFiuInst | Address of a location in which a ptr to the new FIU instance will be written
[in] | oldFiuInst | Pointer to the old FIU instance
[in] | newFiuBufs | Pointer to memory block where new FIU buffers will be located

void fiuGetStats | ( | void * | fiuInst,
 |  | tbool | freset,
 |  | fiuStats_t * | stats
 | ) |  |

Routine which obtains FIU statistics (both network- and call-specific) The stats can be requested from either an active call, or the last call if the current call session has been terminated.

Parameters:
[in,out] | fiuInst | Pointer to FIU instance
[in] | freset | Flag indicating whether to reset statistics
[in] | stats | pointer to statistics report structure

Definition at line 695 of file fiu.c.

References fiuInst_s::BufferMgmt, fiuStats_t::Direction, faxResetStats(), fiuInst_s::faxStats, fiu_DIR_DEST, fiu_DIR_ORG, fiuInst_s::frpInst, fiuStats_t::MaxHSbufferUsage, and faxBufferMgmt_t::maxUsage.

Here is the call graph for this function:

tbool fiuValidatePkt | ( | fiuNetProtocol_e | netProtocolType,
 |  | tword * | pkt,
 |  | tuint | pktSize
 | ) |  |

Validates T.38 UDP packet This routine checks if the packet is a valid fax relay packet. Currently, only T.38 UDPTL is supported.

Parameters:
[in,out] | netProtocolType | Network Protocol Types
[in,out] | pkt | Pointer to the packet to be validated
[in,out] | pktSize | Size of the packet
Return values:
TRUE | - packet is valid
FALSE | - packet is invalid or network protocol is not supported

Definition at line 829 of file fiu.c.

References fiu_PT_T38_UDPTL.

Variable Documentation

fiuContext_t fiuContext

reference of FIU Context Structure

Referenced by faxBufferAlloc(), faxBufferFree(), faxCriticalSectionBegin(), faxCriticalSectionEnd(), faxDebugTrace(), faxException(), faxSystemTime(), and fiuGetSizes().


FIU: FIU Feature Selector Definitions

FIU Feature Selector Definitions
[FIU External API]

Collaboration diagram for FIU Feature Selector Definitions:

Detailed Description

The following is a bitmap definition of the FIUFeatureSelector field. It allows selective enabling/disabling of specific FIU capabilities.

Defines

#define | fiu_FEATURE_SLF_ENABLE 0x0001
#define | fiu_FEATURE_DIS_EFLAG_DISABLE 0x0002
#define | fiu_FEATURE_TFOP_FC_REPEAT 0x0004
#define | fiu_FEATURE_NSF_OVERRIDE 0x0008
#define | fiu_FEATURE_RTP_TS_PROC_DISABLE 0x0010
#define | fiu_FEATURE_AAL2_CID_CHK_DISABLE 0x0020
#define | fiu_FEATURE_MDM_TRN_FAIL_COMP 0x0040
#define | fiu_FEATURE_V34_FAX 0x0080
#define | fiu_FEATURE_T38_VOCALTEC_INTEROP 0x0100

Define Documentation

#define fiu_FEATURE_SLF_ENABLE 0x0001

FIU FEATURE -- Enable scan line fix-up feature

Definition at line 310 of file fiu.h.

Referenced by fiuOpen().

#define fiu_FEATURE_DIS_EFLAG_DISABLE 0x0002

FIU FEATURE -- Disable Eflags for first DIS

Definition at line 316 of file fiu.h.

#define fiu_FEATURE_TFOP_FC_REPEAT 0x0004

FIU FEATURE -- Enable repeating of Frame Complete packet over the packet network for improved performance

Definition at line 322 of file fiu.h.

#define fiu_FEATURE_NSF_OVERRIDE 0x0008

FIU FEATURE -- Allow user to specify their own NSF fields

Definition at line 328 of file fiu.h.

#define fiu_FEATURE_RTP_TS_PROC_DISABLE 0x0010

FIU FEATURE -- Disable the use of T.38 RTP timestamps for playout

Definition at line 334 of file fiu.h.

#define fiu_FEATURE_AAL2_CID_CHK_DISABLE 0x0020

FIU FEATURE -- Enable or disables checking of CID in AAL2 Rx

Definition at line 339 of file fiu.h.

#define fiu_FEATURE_MDM_TRN_FAIL_COMP 0x0040

FIU FEATURE -- Enable feature to compensate for modem training failures in HS

Definition at line 346 of file fiu.h.

#define fiu_FEATURE_V34_FAX 0x0080

FIU FEATURE -- Enable V.34 fax relay protocol

Definition at line 353 of file fiu.h.

Referenced by fiuFaxEventHandler().

#define fiu_FEATURE_T38_VOCALTEC_INTEROP 0x0100

FIU FEATURE -- Workaround for interop with VocalTec T.38 gateways that cannot properly process reception of HS packets with t4-non-ecm-sig-end indications appended to them

Definition at line 359 of file fiu.h.

Referenced by fiuOpen().


FIU: Fax Control Code

Fax Control Code
[FIU External API]

Collaboration diagram for Fax Control Code:

Enumerations

enum fiuControlCode_e { fiu_CTRL_ACTIVATE = 1, fiu_CTRL_CONFIG }

Enumeration Type Documentation

enum fiuControlCode_e

Enumerator:
fiu_CTRL_ACTIVATE | Activate the fax relay processing and timers
fiu_CTRL_CONFIG | Change the FIU configuration on the fly

Definition at line 154 of file fiu.h.


FIU: FIU Debug message types for debugInfo()

FIU Debug message types for debugInfo()
[FIU External API]

Collaboration diagram for FIU Debug message types for debugInfo():

Defines

#define | fiu_DBG_INFORMATIONAL 0
#define | fiu_DBG_FATAL_ERROR 2

Define Documentation

#define fiu_DBG_INFORMATIONAL 0

FIU Debug Message Type -- Fax general debug information message

Definition at line 171 of file fiu.h.

Referenced by faxDebugTrace().

#define fiu_DBG_FATAL_ERROR 2

FIU Debug Message Type -- Fax critical debug information message

Definition at line 176 of file fiu.h.

Referenced by faxException().


FIU: FIU Event Codes

FIU Event Codes
[FIU External API]

Collaboration diagram for FIU Event Codes:

Defines

#define | fiu_EVENT_CLEARDOWN 0
#define | fiu_EVENT_G3_TO_V34 1
#define | fiu_EVENT_V34_TO_G3 2

Define Documentation

#define fiu_EVENT_CLEARDOWN 0

FIU Event Codes -- Notifies call processing software that the local fax processing has been terminated.

Definition at line 190 of file fiu.h.

Referenced by fiuFaxEventHandler().

#define fiu_EVENT_G3_TO_V34 1

FIU Event Codes -- Notifies call processing software to switch over from G3 fax relay to V.34 fax relay.

Definition at line 196 of file fiu.h.

Referenced by fiuFaxEventHandler().

#define fiu_EVENT_V34_TO_G3 2

FIU Event Codes -- Notifies call processing software to switch over from V.34 fax relay to G3 fax relay.

Definition at line 202 of file fiu.h.

Referenced by fiuFaxEventHandler().


FIU: Fax Switchover Reason Codes

Fax Switchover Reason Codes
[FIU External API]

Collaboration diagram for Fax Switchover Reason Codes:

Defines

#define | fiu_SWITCHOVER_V8_CM_RCVD_LOCAL 0
#define | fiu_SWITCHOVER_V8_CM_RCVD_REMOTE 1
#define | fiu_SWITCHOVER_V8_CI_RCVD_LOCAL 2
#define | fiu_SWITCHOVER_V8_CI_RCVD_REMOTE 3
#define | fiu_SWITCHOVER_V8_ANSAM_RCVD_REMOTE 4
#define | fiu_SWITCHOVER_PREAMBLE_RCVD_REMOTE 5
#define | fiu_SWITCHOVER_V34_NOT_SUPPORTED 6

Define Documentation

#define fiu_SWITCHOVER_V8_CM_RCVD_LOCAL 0

Fax Switchover Reason Codes -- V.8 CM received from local FTE

Definition at line 216 of file fiu.h.

#define fiu_SWITCHOVER_V8_CM_RCVD_REMOTE 1

Fax Switchover Reason Codes -- V.8 CM received from remote FTE

Definition at line 221 of file fiu.h.

#define fiu_SWITCHOVER_V8_CI_RCVD_LOCAL 2

Fax Switchover Reason Codes -- V.8 CI received from local FTE

Definition at line 226 of file fiu.h.

#define fiu_SWITCHOVER_V8_CI_RCVD_REMOTE 3

Fax Switchover Reason Codes -- V.8 CI received from remote FTE

Definition at line 231 of file fiu.h.

#define fiu_SWITCHOVER_V8_ANSAM_RCVD_REMOTE 4

Fax Switchover Reason Codes -- ANSam received from remote FTE

Definition at line 236 of file fiu.h.

#define fiu_SWITCHOVER_PREAMBLE_RCVD_REMOTE 5

Fax Switchover Reason Codes -- V.21 preamble received from remote FTE

Definition at line 241 of file fiu.h.

#define fiu_SWITCHOVER_V34_NOT_SUPPORTED 6

Fax Switchover Reason Codes -- V.34 HDX is not supported

Definition at line 246 of file fiu.h.


FIU: Network Protocol Types

Network Protocol Types
[FIU External API]

Collaboration diagram for Network Protocol Types:

Detailed Description

Definition of Network Protocol Types

Enumerations

enum fiuNetProtocol_e {
fiu_PT_T2, fiu_PT_T3, fiu_PT_FRF11, fiu_PT_RTP,
fiu_PT_T38_UDPTL, fiu_PT_T38_UDPTL_RTP, fiu_PT_AAL2, fiu_PT_RTPB,
fiu_PT_T38_RTP
}

Enumeration Type Documentation

enum fiuNetProtocol_e

Enumerator:
fiu_PT_T2 | Telogy-2 Protocol
fiu_PT_T3 | Telogy-3 Protocol
fiu_PT_FRF11 | FRF.11 Fax Relay Protocol
fiu_PT_RTP | RTP protocol
fiu_PT_T38_UDPTL | T.38 UDPTL protocol
fiu_PT_T38_UDPTL_RTP | T.38 UDPTL RTP proprietary protocol
fiu_PT_AAL2 | AAL2 Protocol
fiu_PT_RTPB | RTP version B protocol
fiu_PT_T38_RTP | T.38 RTP protocol

Definition at line 257 of file fiu.h.


FIU: T30 Feature Selector Definitions

T30 Feature Selector Definitions
[FIU External API]

Collaboration diagram for T30 Feature Selector Definitions:

Detailed Description

The following definitions are used by FIU to define which features of the fax call are to be enabled or disabled. A non-zero value is used to disable a feature.

Defines

#define | fiu_T30FEATURE_ECM_DISABLE 0x0001
#define | fiu_T30FEATURE_MR_DISABLE 0x0002
#define | fiu_T30FEATURE_V34_DISABLE 0x0004

Define Documentation

#define fiu_T30FEATURE_ECM_DISABLE 0x0001

T30 FEATURE -- Disable Error Correction Mode

Definition at line 284 of file fiu.h.

#define fiu_T30FEATURE_MR_DISABLE 0x0002

T30 FEATURE -- Disable Modify Record Page Compression

Definition at line 289 of file fiu.h.

#define fiu_T30FEATURE_V34_DISABLE 0x0004

T30 FEATURE -- Disable V.34 Fax

Definition at line 294 of file fiu.h.

Referenced by fiuOpen().


FIU: FIU (Fax Interface Unit) Package

FIU (Fax Interface Unit) Package

Release 3.0.1.2

Page Contents

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

Description

The Facsimile Interface Unit (FIU) is a software module that process messages (including data) from the Facsimile Modem Unit (FM) for transmission over a packet network and vice versa. Likewise, it process digital data received from the network and passes them to FM for transmission over the analog connection. In doing so, the FIU performs protocol conversion between Group 3 facsimile protocols and the digital facsimile protocol employed over the packet network. The FIU performs the following functions:
  • T.30 protocol processing
  • Examination and alteration of binary signaling messages to ensure compatibility of the facsimile transfer
  • Packet network facsimile protocol processing
  • Compensation for network impairments: packet loss, jitter and delay
  • FAXMONTM real-time debug tracing

The FIU, as a modular software unit, is accessible via its standardized API, which provides defined function calls as detailed in the following sections.

Integration

The FIU component can be integrated into a system and provide reliable HDLC processing 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 FIU 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: | FIU External API
 | FIU Integration

Default Configuration

None

Performance

For MIPS and memory information proceed to the links provided below

Additional links: FIU Performance

Limitations

None

Standards Compliance

. ITU-T Recommendation T.38, “Procedures for Real Time Group 3 Facsimile Communication Over IP Networks.”

Dependent Packages

The FIU package depends on the following packages for build and/or integration. The specific versions and compatibility keys are provided in the FIU release notes.
  1. ti.mas.types (Common data type defintions)
  2. ti.mas.util (Common utilities)
  3. ti.mas.fract (Common fractional arithmetic macros)
  4. ti.mas.iffax (External fax interface for configuration)
  5. ti.mas.ifpkt (Common Interface Package)
  6. ti.mas.swtools (Internally used s/w tools)


FIU: FIU Integration

FIU (Fax Interface Unit) Package

FIU Integration

Page Contents

  • XDC Build Process
  • Make Build Process
  • Linking FIU with System

XDC Build Process

Required Tools

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

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

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

Windows Configuration

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

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

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

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

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

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

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

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

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

    rem # End of file

Linux Configuration

TBD

Compilation

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

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

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

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

The XDC environment provides several build options.

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

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

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

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

Make Build Process

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

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

Procedure

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

Required Tools:

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

Procedure:

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

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

Linking FIU with System

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

  <WORK>/ti/mas/asm
               /swtools
               /types
               /util
               /fiu
               /iface

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

Include Requirements

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

  1. #include <ti/mas/types/types.h>
  2. #include <ti/mas/fiu/fiu.h>
  3. #include <ti/mas/iface/ifpkt/ifpkt.h>

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

  1. -i <WORK>

Where WORK is the path to the working directory.

Compile Defines

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

  1. -Dti_targets_<xtarg>

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

Linking

The following libraries must be included in the final link:

  1. ti\mas\util\c<rtarg>\util_a.a<rtarg>
  2. ti\mas\util\c<rtarg>\util_c.a<rtarg>
  3. *ti\mas\hdlc\c<rtarg>\fiu_c.a<rtarg>
  4. **ti\mas\hdlc\c<rtarg>\fiu_g3_c.a<rtarg>
** required for G3 and SG3 fax relay ** required for G3 fax relay

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


FIU: Module Index

FIU Modules

Here is a list of all modules:
  • FIU External API
    • Return Error Codes
    • Fax Debug Mode
    • Fax Control Code
    • FIU Debug message types for debugInfo()
    • FIU Event Codes
    • Fax Switchover Reason Codes
    • Network Protocol Types
    • T30 Feature Selector Definitions
    • FIU Feature Selector Definitions
    • T.30 Protocol Call Success Bitfield


FIU: Page Index

FIU Related Pages

Here is a list of all related documentation pages:
  • C55x Data Sheet
  • C64x+ Data Sheet
  • History
  • Disclaimer


FIU: FIU Performance

FIU (Fax Interface Unit) Package

FIU Performance

  • C64x+ Data Sheet
  • C55x Data Sheet


FIU: History

History

Revision History

Version | Comments
1.0.0.0 | Initial Version


FIU: FND_FRP_DATA_BUFFER_S Struct Reference

  • Data Structures
  • Data Fields

FND_FRP_DATA_BUFFER_S Struct Reference

#include <frpfndif.h>

Detailed Description

Definition at line 324 of file frpfndif.h.

Data Fields

tword * DataAddr

Field Documentation

tword* FND_FRP_DATA_BUFFER_S::DataAddr

Definition at line 326 of file frpfndif.h.

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


FIU: FND_FRP_DATA_BYTE_S Struct Reference

  • Data Structures
  • Data Fields

FND_FRP_DATA_BYTE_S Struct Reference

#include <frpfndif.h>

Detailed Description

Definition at line 318 of file frpfndif.h.

Data Fields

tword DataByte

Field Documentation

tword FND_FRP_DATA_BYTE_S::DataByte

Definition at line 320 of file frpfndif.h.

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


FIU: FND_FRP_FRAME_COMP_S Struct Reference

  • Data Structures
  • Data Fields

FND_FRP_FRAME_COMP_S Struct Reference

#include <frpfndif.h>

Detailed Description

Definition at line 330 of file frpfndif.h.

Data Fields

iffaxHDLCFCSInd_e FrameFcs

Field Documentation

iffaxHDLCFCSInd_e FND_FRP_FRAME_COMP_S::FrameFcs

Definition at line 332 of file frpfndif.h.

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


FIU: FND_FRP_TONE_ON_LS_S Struct Reference

  • Data Structures
  • Data Fields

FND_FRP_TONE_ON_LS_S Struct Reference

#include <frpfndif.h>

Detailed Description

Definition at line 336 of file frpfndif.h.

Data Fields

iffaxToneID_e Tone

Field Documentation

iffaxToneID_e FND_FRP_TONE_ON_LS_S::Tone

Definition at line 338 of file frpfndif.h.

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


FIU: FND_FRP_V8_MSG_S Struct Reference

  • Data Structures
  • Data Fields

FND_FRP_V8_MSG_S Struct Reference

#include <frpfndif.h>

Detailed Description

Definition at line 342 of file frpfndif.h.

Data Fields

tuint data

Field Documentation

tuint FND_FRP_V8_MSG_S::data

Definition at line 344 of file frpfndif.h.

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


FIU: FND_FRP_V34_PRI_RATE_S Struct Reference

  • Data Structures
  • Data Fields

FND_FRP_V34_PRI_RATE_S Struct Reference

#include <frpfndif.h>

Detailed Description

Definition at line 348 of file frpfndif.h.

Data Fields

tuint v34Rate

Field Documentation

tuint FND_FRP_V34_PRI_RATE_S::v34Rate

Definition at line 350 of file frpfndif.h.

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


FIU: FRP_FND_DATA_BUFFER_S Struct Reference

  • Data Structures
  • Data Fields

FRP_FND_DATA_BUFFER_S Struct Reference

#include <frpfndif.h>

Detailed Description

Definition at line 182 of file frpfndif.h.

Data Fields

tword * DataAddr

Field Documentation

tword* FRP_FND_DATA_BUFFER_S::DataAddr

Definition at line 184 of file frpfndif.h.

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


FIU: FRP_FND_DATA_BYTE_S Struct Reference

  • Data Structures
  • Data Fields

FRP_FND_DATA_BYTE_S Struct Reference

#include <frpfndif.h>

Detailed Description

Definition at line 176 of file frpfndif.h.

Data Fields

tword DataByte

Field Documentation

tword FRP_FND_DATA_BYTE_S::DataByte

Definition at line 178 of file frpfndif.h.

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


FIU: FRP_FND_FRAME_COMP_S Struct Reference

  • Data Structures
  • Data Fields

FRP_FND_FRAME_COMP_S Struct Reference

#include <frpfndif.h>

Detailed Description

Definition at line 188 of file frpfndif.h.

Data Fields

iffaxHDLCFCSInd_e FrameFcs

Field Documentation

iffaxHDLCFCSInd_e FRP_FND_FRAME_COMP_S::FrameFcs

Definition at line 190 of file frpfndif.h.

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


FIU: FRP_FND_HS_RATE_S Struct Reference

  • Data Structures
  • Data Fields

FRP_FND_HS_RATE_S Struct Reference

#include <frpfndif.h>

Detailed Description

Definition at line 200 of file frpfndif.h.

Data Fields

iffaxModulationTypes_e HSModulationRate

Field Documentation

iffaxModulationTypes_e FRP_FND_HS_RATE_S::HSModulationRate

Definition at line 202 of file frpfndif.h.

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


FIU: FRP_FND_HS_TRNG_DETECT_S Struct Reference

  • Data Structures
  • Data Fields

FRP_FND_HS_TRNG_DETECT_S Struct Reference

#include <frpfndif.h>

Collaboration diagram for FRP_FND_HS_TRNG_DETECT_S:

[legend]

Detailed Description

Definition at line 194 of file frpfndif.h.

Data Fields

FrpFndHSTrngInfo_t HSTrainingInfo

Field Documentation

FrpFndHSTrngInfo_t FRP_FND_HS_TRNG_DETECT_S::HSTrainingInfo

Definition at line 196 of file frpfndif.h.

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


FIU: FRP_FND_SLP_INFO_S Struct Reference

  • Data Structures
  • Data Fields

FRP_FND_SLP_INFO_S Struct Reference

#include <frpfndif.h>

Detailed Description

Definition at line 206 of file frpfndif.h.

Data Fields

fiuSLPMode_e slpPageMode

Field Documentation

fiuSLPMode_e FRP_FND_SLP_INFO_S::slpPageMode

Definition at line 208 of file frpfndif.h.

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


FIU: FRP_FND_TONE_DETECT_S Struct Reference

  • Data Structures
  • Data Fields

FRP_FND_TONE_DETECT_S Struct Reference

#include <frpfndif.h>

Detailed Description

Definition at line 212 of file frpfndif.h.

Data Fields

iffaxToneID_e Tone

Field Documentation

iffaxToneID_e FRP_FND_TONE_DETECT_S::Tone

Definition at line 214 of file frpfndif.h.

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


FIU: FRP_FND_V8_MSG_S Struct Reference

  • Data Structures
  • Data Fields

FRP_FND_V8_MSG_S Struct Reference

#include <frpfndif.h>

Detailed Description

Definition at line 218 of file frpfndif.h.

Data Fields

tuint data

Field Documentation

tuint FRP_FND_V8_MSG_S::data

Definition at line 220 of file frpfndif.h.

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


FIU: FRP_FND_V34_PRI_RATE_S Struct Reference

  • Data Structures
  • Data Fields

FRP_FND_V34_PRI_RATE_S Struct Reference

#include <frpfndif.h>

Detailed Description

Definition at line 224 of file frpfndif.h.

Data Fields

tuint v34Rate

Field Documentation

tuint FRP_FND_V34_PRI_RATE_S::v34Rate

Definition at line 226 of file frpfndif.h.

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


FIU: FndFrpMsg_t Struct Reference

  • Data Structures
  • Data Fields

FndFrpMsg_t Struct Reference

#include <frpfndif.h>

Collaboration diagram for FndFrpMsg_t:

[legend]

Detailed Description

Definition at line 383 of file frpfndif.h.

Data Fields

FndFrpMsgId_e MsgId
tuint Timestamp
FndFrpMsgBody_u MsgBody

Field Documentation

FndFrpMsgId_e FndFrpMsg_t::MsgId

Definition at line 384 of file frpfndif.h.

tuint FndFrpMsg_t::Timestamp

Definition at line 385 of file frpfndif.h.

FndFrpMsgBody_u FndFrpMsg_t::MsgBody

Definition at line 386 of file frpfndif.h.

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


FIU: FrpFndHSTrngInfo_t Struct Reference

  • Data Structures
  • Data Fields

FrpFndHSTrngInfo_t Struct Reference

#include <frpfndif.h>

Detailed Description

Definition at line 156 of file frpfndif.h.

Data Fields

tuint | ModulationType:8
tuint | HDLCModeFlag:1

Field Documentation

tuint FrpFndHSTrngInfo_t::ModulationType

Definition at line 160 of file frpfndif.h.

tuint FrpFndHSTrngInfo_t::HDLCModeFlag

Definition at line 161 of file frpfndif.h.

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


FIU: FrpFndMsg_t Struct Reference

  • Data Structures
  • Data Fields

FrpFndMsg_t Struct Reference

#include <frpfndif.h>

Collaboration diagram for FrpFndMsg_t:

[legend]

Detailed Description

Definition at line 262 of file frpfndif.h.

Data Fields

FrpFndMsgId_e MsgId
tuint Timestamp
FrpFndMsgBody_u MsgBody

Field Documentation

FrpFndMsgId_e FrpFndMsg_t::MsgId

Definition at line 263 of file frpfndif.h.

tuint FrpFndMsg_t::Timestamp

Definition at line 264 of file frpfndif.h.

FrpFndMsgBody_u FrpFndMsg_t::MsgBody

Definition at line 265 of file frpfndif.h.

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


FIU: faxBuffer_t Struct Reference

  • Data Structures
  • Data Fields

faxBuffer_t Struct Reference

#include <faxport.h>

Detailed Description

Definition at line 121 of file faxport.h.

Data Fields

tword | sizeBytes
tword | payload [FAX_BUFFER_LEN_WORDS]

Field Documentation

tword faxBuffer_t::sizeBytes

Definition at line 122 of file faxport.h.

tword faxBuffer_t::payload[FAX_BUFFER_LEN_WORDS]

Definition at line 123 of file faxport.h.

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


FIU: faxBufferLinkedList_t Struct Reference

  • Data Structures
  • Data Fields

faxBufferLinkedList_t Struct Reference

#include <faxport.h>

Detailed Description

Definition at line 111 of file faxport.h.

Data Fields

tword | payload [FAX_BUFFER_LINK_LEN_WORDS]
tword * | next

Field Documentation

tword faxBufferLinkedList_t::payload[FAX_BUFFER_LINK_LEN_WORDS]

Definition at line 112 of file faxport.h.

tword* faxBufferLinkedList_t::next

Definition at line 113 of file faxport.h.

Referenced by faxBufferAdd(), faxBufferAlloc(), faxBufferFree(), and faxBufferMgmtInit().

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


FIU: faxBufferMgmt_t Struct Reference

  • Data Structures
  • Data Fields

faxBufferMgmt_t Struct Reference

#include <faxutil.h>

Detailed Description

Definition at line 44 of file faxutil.h.

Data Fields

tword * | nextFree
tint | currentUsage
tint | maxUsage
tint | HSNotAvailCtr
tuint | dummy
tword * | pPool
tuint | poolSizeWords

Field Documentation

tword* faxBufferMgmt_t::nextFree

Definition at line 45 of file faxutil.h.

Referenced by faxBufferAdd(), faxBufferAlloc(), faxBufferFree(), and faxBufferMgmtInit().

tint faxBufferMgmt_t::currentUsage

Definition at line 46 of file faxutil.h.

Referenced by faxBufferAlloc(), faxBufferFree(), faxBufferMgmtInit(), and fiuClose().

tint faxBufferMgmt_t::maxUsage

Definition at line 47 of file faxutil.h.

Referenced by faxBufferAlloc(), faxBufferMgmtInit(), and fiuGetStats().

tint faxBufferMgmt_t::HSNotAvailCtr

Definition at line 48 of file faxutil.h.

Referenced by faxBufferAlloc(), and faxBufferMgmtInit().

tuint faxBufferMgmt_t::dummy

Definition at line 50 of file faxutil.h.

tword* faxBufferMgmt_t::pPool

Definition at line 53 of file faxutil.h.

Referenced by faxBufferFree(), and faxBufferMgmtInit().

tuint faxBufferMgmt_t::poolSizeWords

Definition at line 54 of file faxutil.h.

Referenced by faxBufferFree(), and faxBufferMgmtInit().

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


FIU: faxHSBuffer_t Struct Reference

  • Data Structures
  • Data Fields

faxHSBuffer_t Struct Reference

#include <faxport.h>

Detailed Description

Definition at line 99 of file faxport.h.

Data Fields

tword DataElement [FAX_HS_BUFFER_SIZE_WORDS]

Field Documentation

tword faxHSBuffer_t::DataElement[FAX_HS_BUFFER_SIZE_WORDS]

Definition at line 100 of file faxport.h.

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


FIU: fiuContext_t Struct Reference

  • Data Structures
  • Data Fields

fiuContext_t Struct Reference
[FIU External API, FIU External API]

#include <fiu.h>

Detailed Description

The FIU software module has a global context structure that contains non channel specific configuration information which is used by all active FIU instances. FIU Context is a structure that must be declared globally by system code, and initialized prior to any calls to the FIU API.

See also:
fiuContext_t

Definition at line 42 of file fiu.h.

Data Fields

void *(* | allocBuffer )(tuint)
This is a function pointer to an externally supported routine that allocates a data buffer from a global memory pool for use by the FIU. If an external pool is unsupported, set this to NULL.
tbool(* | freeBuffer )(tuint, void *)
This is a function pointer to an externally supported routine that frees a data buffer no longer in use by FIU. The data buffer is returned to the external memory pool. If an external pool is unsupported, set this to NULL.
tuint | SupportedExternalBuffSize
This parameter determines the amount of external buffering available for use by the FIU module. DO NOT LEAVE THIS PARAMETER UNINITIALIZED. If no external buffer capability is supported, make sure to set the value to 0.
tulong(* | faxSystemTime )(void)
A callout to an externally supported system time function that returns the system time in milliseconds. This is a function pointer and must point to a valid function location who meets the API requirements.
dbgInfo_t | faxDebugTrace
A callout to the system code's debug and exception tracing function. This is a function pointer and must point to a valid function location who meets the API requirements. refer UTIL.chm.
void(* | faxCriticalSectionBegin )(void)
Callout to externally supplied system function that suspends preemption of FIU processing. This is a function pointer and must point to a valid function location who meets the API requirements.
void(* | faxCriticalSectionEnd )(void)
Callout to externally supplied system function that suspends preemption of FIU processing. This is a function pointer and must point to a valid function location who meets the API requirements.

Field Documentation

void*(* fiuContext_t::allocBuffer)(tuint)

This is a function pointer to an externally supported routine that allocates a data buffer from a global memory pool for use by the FIU. If an external pool is unsupported, set this to NULL.

Referenced by faxBufferAlloc().

tbool(* fiuContext_t::freeBuffer)(tuint, void *)

This is a function pointer to an externally supported routine that frees a data buffer no longer in use by FIU. The data buffer is returned to the external memory pool. If an external pool is unsupported, set this to NULL.

Referenced by faxBufferFree().

tuint fiuContext_t::SupportedExternalBuffSize

This parameter determines the amount of external buffering available for use by the FIU module. DO NOT LEAVE THIS PARAMETER UNINITIALIZED. If no external buffer capability is supported, make sure to set the value to 0.

Definition at line 66 of file fiu.h.

Referenced by faxBufferAlloc(), faxBufferFree(), and fiuGetSizes().

tulong(* fiuContext_t::faxSystemTime)(void)

A callout to an externally supported system time function that returns the system time in milliseconds. This is a function pointer and must point to a valid function location who meets the API requirements.

Referenced by faxDebugTrace(), and faxSystemTime().

dbgInfo_t fiuContext_t::faxDebugTrace

A callout to the system code's debug and exception tracing function. This is a function pointer and must point to a valid function location who meets the API requirements. refer UTIL.chm.

Definition at line 79 of file fiu.h.

Referenced by faxDebugTrace(), and faxException().

void(* fiuContext_t::faxCriticalSectionBegin)(void)

Callout to externally supplied system function that suspends preemption of FIU processing. This is a function pointer and must point to a valid function location who meets the API requirements.

Referenced by faxCriticalSectionBegin().

void(* fiuContext_t::faxCriticalSectionEnd)(void)

Callout to externally supplied system function that suspends preemption of FIU processing. This is a function pointer and must point to a valid function location who meets the API requirements.

Referenced by faxCriticalSectionEnd().

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


FIU: fiuControlConfig_t Struct Reference

  • Data Structures
  • Data Fields

fiuControlConfig_t Struct Reference
[FIU External API]

#include <fiu.h>

Collaboration diagram for fiuControlConfig_t:

[legend]

Detailed Description

Control Configuration structure.

Data structure providing configuration information in fiuControl()

Definition at line 546 of file fiu.h.

Data Fields

fiuReceiveOutSpec_t ReceiveOutSpec
tuint frameSize

Field Documentation

fiuReceiveOutSpec_t fiuControlConfig_t::ReceiveOutSpec

Address of function and associated data structure for sending data to PCM interface

Definition at line 547 of file fiu.h.

Referenced by fiuControl().

tuint fiuControlConfig_t::frameSize

Specifies PCM frame size (in msec)

Definition at line 550 of file fiu.h.

Referenced by fiuControl().

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


FIU: fiuEventHandlerSpec_t Struct Reference

  • Data Structures
  • Data Fields

fiuEventHandlerSpec_t Struct Reference
[FIU External API]

#include <fiu.h>

Detailed Description

Specification of fiuEventHandlerSpec Object This structure contains the address of function and associated data structure for reporting events to the system for processing.

Definition at line 368 of file fiu.h.

Data Fields

void(* | fiuEventHandler )(void *targetInst, tuint eventCode, tuint eventInfo)
Notifies call-processing software an event that requires action. Valid event codes and the associated event information are described by FIU Event Codes.
void * | targetInst

Field Documentation

void(* fiuEventHandlerSpec_t::fiuEventHandler)(void *targetInst, tuint eventCode, tuint eventInfo)

Notifies call-processing software an event that requires action. Valid event codes and the associated event information are described by FIU Event Codes.

Referenced by fiuFaxEventHandler().

void* fiuEventHandlerSpec_t::targetInst

Pointer to Target Instance

Definition at line 374 of file fiu.h.

Referenced by fiuFaxEventHandler().

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


FIU: fiuInst_s Struct Reference

  • Data Structures
  • Data Fields

fiuInst_s Struct Reference

#include <fiuloc.h>

Collaboration diagram for fiuInst_s:

[legend]

Detailed Description

Definition at line 70 of file fiuloc.h.

Data Fields

tuint | ID
tuint | state
tuint | dbgMode
void * | fndInst
void * | frpInst
fiuEventHandlerSpec_t EventHandlerSpec
faxBufferMgmt_t BufferMgmt
tword * | overlayBuf
tuint | overlayBufSizeWords
tuint | fOverlayBufInit
fiuStats_t faxStats

Field Documentation

tuint fiuInst_s::ID

Definition at line 71 of file fiuloc.h.

Referenced by faxBufferAlloc(), faxBufferFree(), faxDebugTrace(), faxException(), and fiuOpen().

tuint fiuInst_s::state

Definition at line 72 of file fiuloc.h.

Referenced by fiuClose(), fiuControl(), fiuDelete(), fiuOpen(), fiuReceiveIn(), fiuSendIn(), and fiuTask().

tuint fiuInst_s::dbgMode

Definition at line 73 of file fiuloc.h.

Referenced by fiuOpen().

void* fiuInst_s::fndInst

Definition at line 77 of file fiuloc.h.

Referenced by fiuClose(), fiuControl(), fiuOpen(), fiuReceiveIn(), and fiuTask().

void* fiuInst_s::frpInst

Definition at line 78 of file fiuloc.h.

Referenced by fiuClose(), fiuControl(), fiuFaxEventHandler(), fiuGetStats(), fiuOpen(), fiuSendIn(), and fiuTask().

fiuEventHandlerSpec_t fiuInst_s::EventHandlerSpec

Definition at line 79 of file fiuloc.h.

Referenced by fiuFaxEventHandler(), and fiuOpen().

faxBufferMgmt_t fiuInst_s::BufferMgmt

Definition at line 81 of file fiuloc.h.

Referenced by faxBufferAdd(), faxBufferAlloc(), faxBufferFree(), fiuClose(), fiuGetStats(), and fiuOpen().

tword* fiuInst_s::overlayBuf

Definition at line 83 of file fiuloc.h.

Referenced by faxBufferFree(), and faxOverlayBufInit().

tuint fiuInst_s::overlayBufSizeWords

Definition at line 84 of file fiuloc.h.

Referenced by faxBufferFree().

tuint fiuInst_s::fOverlayBufInit

Definition at line 85 of file fiuloc.h.

Referenced by faxOverlayBufInit().

fiuStats_t fiuInst_s::faxStats

Definition at line 87 of file fiuloc.h.

Referenced by faxResetStats(), fiuGetStats(), and fiuOpen().

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


FIU: fiuNSFInfo_t Struct Reference

  • Data Structures
  • Data Fields

fiuNSFInfo_t Struct Reference
[FIU External API]

#include <fiu.h>

Detailed Description

NSF Information data structure.

This structure is used to record NSF informations received from the network or local FTE.

Remarks:
Information is initialized to UNKNOWN and recorded only when a valid NSF data frame is received.

Definition at line 590 of file fiu.h.

Data Fields

tuint | NSFCountryCode
tuint | NSFManufacturer

Field Documentation

tuint fiuNSFInfo_t::NSFCountryCode

Country code octet - 0xFFFF indicates info unavail

Definition at line 591 of file fiu.h.

Referenced by faxResetStats().

tuint fiuNSFInfo_t::NSFManufacturer

Manufacturer code - 0xFFFF indicates info unavail

Definition at line 592 of file fiu.h.

Referenced by faxResetStats().

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


FIU: fiuNetCallTbl_t Struct Reference

  • Data Structures
  • Data Fields

fiuNetCallTbl_t Struct Reference
[FIU External API]

#include <fiu.h>

Detailed Description

FIU Protocol Call Table.

This table contains the protocol-specific call table for each supported protocol.

Definition at line 450 of file fiu.h.

Data Fields

fiuNetProtocol_e NetProtocol
tint(* | faxNetInit )(void *fndInst, void *cfg)
void(* | faxNetDecoder )(void *fndInst, xferpktInfo_t *pktInfo)
void(* | faxNetDecoderTask )(void *fndInst)
void(* | faxNetEncoder )(void *fndInst, void *msg)
void(* | faxNetEncoderTask )(void *fndInst)
void(* | faxNetClose )(void *fndInst)
void(* | faxNetReloc )(void *newRelocInstStruct, void *oldRelocInstStruct)

Field Documentation

fiuNetProtocol_e fiuNetCallTbl_t::NetProtocol

Definition at line 451 of file fiu.h.

tint(* fiuNetCallTbl_t::faxNetInit)(void *fndInst, void *cfg)

void(* fiuNetCallTbl_t::faxNetDecoder)(void *fndInst, xferpktInfo_t *pktInfo)

void(* fiuNetCallTbl_t::faxNetDecoderTask)(void *fndInst)

void(* fiuNetCallTbl_t::faxNetEncoder)(void *fndInst, void *msg)

void(* fiuNetCallTbl_t::faxNetEncoderTask)(void *fndInst)

void(* fiuNetCallTbl_t::faxNetClose)(void *fndInst)

void(* fiuNetCallTbl_t::faxNetReloc)(void *newRelocInstStruct, void *oldRelocInstStruct)

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


FIU: fiuNewConfig_t Struct Reference

  • Data Structures
  • Data Fields

fiuNewConfig_t Struct Reference
[FIU External API]

#include <fiu.h>

Collaboration diagram for fiuNewConfig_t:

[legend]

Detailed Description

New Configuration structure.

Data structure providing configuration information in fiuNew()

Definition at line 439 of file fiu.h.

Data Fields

tuint ID
fiuSizeCfg_t SizeConfig

Field Documentation

tuint fiuNewConfig_t::ID

User specified module ID

Definition at line 440 of file fiu.h.

fiuSizeCfg_t fiuNewConfig_t::SizeConfig

FIU memory allocation structure

Definition at line 441 of file fiu.h.

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


FIU: fiuOpenConfig_t Struct Reference

  • Data Structures
  • Data Fields

fiuOpenConfig_t Struct Reference
[FIU External API]

#include <fiu.h>

Collaboration diagram for fiuOpenConfig_t:

[legend]

Detailed Description

Open Configuration structure.

Data structure providing configuration information in fiuOpen()

Definition at line 468 of file fiu.h.

Data Fields

tuint | frameSize
iffaxRate_e | MaxFaxRate
tuint | dbgMode
tuint | RtpPayloadType
tulong | RtpSyncSource
tint | HSPktPayloadSize
tint | LSPktPayloadSize
tint | LsDataRedundancy
tint | HsDataRedundancy
tuint | TCFHandlingMethod
tint | T38Version
tuint | faxNomDelay
tint | faxPacketSize
tulong | NoActivityTimerVal
tuint | AAL2cid
fiuSendOutSpec_t SendOutSpec
fiuReceiveOutSpec_t ReceiveOutSpec
fiuEventHandlerSpec_t EventHandlerSpec
tulong | StartupTimer
tuint | CleardownTimer
fiuNetCallTbl_t ** faxNetCallTblPtr
fiuNetProtocol_e NetProtocol
tulong | LocalTxNetTimeOutVal
tulong | EflagStartTimer
tulong | EflagStopTimer
tuint | T30FeatureSelector
tuint | FIUFeatureSelector
tword | NSFCountryCode
tword | NSFVendorCodeMSB
tword | NSFVendorCodeLSB

Field Documentation

tuint fiuOpenConfig_t::frameSize

Specifies PCM frame size (in msec)

Definition at line 469 of file fiu.h.

Referenced by fiuOpen().

iffaxRate_e fiuOpenConfig_t::MaxFaxRate

Specifies Maximum FAX data rate

Definition at line 470 of file fiu.h.

Referenced by fiuOpen().

tuint fiuOpenConfig_t::dbgMode

Specifies debug mode level

Definition at line 471 of file fiu.h.

Referenced by fiuOpen().

tuint fiuOpenConfig_t::RtpPayloadType

Specifies RTP payload type (applicable to RTP only)

Definition at line 472 of file fiu.h.

Referenced by fiuOpen().

tulong fiuOpenConfig_t::RtpSyncSource

Specifies RTP synchrnization source.(applicable to RTP only)

Definition at line 474 of file fiu.h.

Referenced by fiuOpen().

tint fiuOpenConfig_t::HSPktPayloadSize

Specifies Fax packet Primary high-speed payload size in ms

Definition at line 476 of file fiu.h.

Referenced by fiuOpen().

tint fiuOpenConfig_t::LSPktPayloadSize

Specifies Fax packet Primary low-speed payload size in bytes

Definition at line 478 of file fiu.h.

Referenced by fiuOpen().

tint fiuOpenConfig_t::LsDataRedundancy

Number of data redundancy for low speed data (T.38 UDP)

Definition at line 480 of file fiu.h.

Referenced by fiuOpen().

tint fiuOpenConfig_t::HsDataRedundancy

Number of data redundancy for high speed data (T.38 UDP)

Definition at line 482 of file fiu.h.

Referenced by fiuOpen().

tuint fiuOpenConfig_t::TCFHandlingMethod

Specifies the TCF handling method for T.38 UDP only

Definition at line 484 of file fiu.h.

Referenced by fiuOpen().

tint fiuOpenConfig_t::T38Version

Version number for T.38's ASN.1 encode/decode functionality:
0 = Version 0 (06/1998)
1 = Version 1 (No change from version 0)
2 = Version 2 (03/2002)
3 = Version 3 (05/2002)

Definition at line 486 of file fiu.h.

Referenced by fiuOpen().

tuint fiuOpenConfig_t::faxNomDelay

Specifies jitter buffer delay

Definition at line 492 of file fiu.h.

Referenced by fiuOpen().

tint fiuOpenConfig_t::faxPacketSize

Specifies FAX packet size

Definition at line 493 of file fiu.h.

Referenced by fiuOpen().

tulong fiuOpenConfig_t::NoActivityTimerVal

No activity timeout detection

Definition at line 494 of file fiu.h.

Referenced by fiuOpen().

tuint fiuOpenConfig_t::AAL2cid

channel identifier for AAL2

Definition at line 495 of file fiu.h.

Referenced by fiuOpen().

fiuSendOutSpec_t fiuOpenConfig_t::SendOutSpec

Address of function and associated data structure for sending data to network

Definition at line 496 of file fiu.h.

Referenced by fiuOpen().

fiuReceiveOutSpec_t fiuOpenConfig_t::ReceiveOutSpec

Address of function and associated data structure for sending data to PCM interface

Definition at line 499 of file fiu.h.

Referenced by fiuOpen().

fiuEventHandlerSpec_t fiuOpenConfig_t::EventHandlerSpec

Address of function and associated data structure for reporting events

Definition at line 502 of file fiu.h.

Referenced by fiuOpen().

tulong fiuOpenConfig_t::StartupTimer

Specifies the amount of time that FRP will remain in STARTUP state with no activity present before clearing down the call

Definition at line 504 of file fiu.h.

Referenced by fiuOpen().

tuint fiuOpenConfig_t::CleardownTimer

Specifies the time in ms to wait after a DCN is received from the local FTE before reporting the protocol termination to the local call processing software

Definition at line 508 of file fiu.h.

Referenced by fiuOpen().

fiuNetCallTbl_t** fiuOpenConfig_t::faxNetCallTblPtr

Fax network protocol call table

Definition at line 512 of file fiu.h.

Referenced by fiuOpen().

fiuNetProtocol_e fiuOpenConfig_t::NetProtocol

Specifies network protocol

Definition at line 513 of file fiu.h.

Referenced by fiuOpen().

tulong fiuOpenConfig_t::LocalTxNetTimeOutVal

Fax Network timeout value in ms for local transmit states

Definition at line 514 of file fiu.h.

Referenced by fiuOpen().

tulong fiuOpenConfig_t::EflagStartTimer

Specifies the time in ms after which the eflags are generated recommended value is 2600 ms

Definition at line 516 of file fiu.h.

Referenced by fiuOpen().

tulong fiuOpenConfig_t::EflagStopTimer

Specifies the time in ms after which the eflags are stopped recommended value is 2300 ms

Definition at line 519 of file fiu.h.

Referenced by fiuOpen().

tuint fiuOpenConfig_t::T30FeatureSelector

a bitmap is used to enable or disable certain features of the fax call

Definition at line 522 of file fiu.h.

Referenced by fiuOpen().

tuint fiuOpenConfig_t::FIUFeatureSelector

Bitmap used to selectively enable specific FIU features

Definition at line 525 of file fiu.h.

Referenced by fiuOpen().

tword fiuOpenConfig_t::NSFCountryCode

The following 3 words specify the NSF values to be used when the fiu_FEATURE_NSF_OVERRIDE is enabled. If the feature is disabled, Telogy assigned NSF values are used. Country Code

Definition at line 533 of file fiu.h.

Referenced by fiuOpen().

tword fiuOpenConfig_t::NSFVendorCodeMSB

MSB of Vendor Code

Definition at line 534 of file fiu.h.

Referenced by fiuOpen().

tword fiuOpenConfig_t::NSFVendorCodeLSB

LSB of Vendor Code

Definition at line 535 of file fiu.h.

Referenced by fiuOpen().

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


FIU: fiuReceiveOutSpec_t Struct Reference

  • Data Structures
  • Data Fields

fiuReceiveOutSpec_t Struct Reference
[FIU External API]

#include <fiu.h>

Detailed Description

Specification of fiuReceiveOutSpec Object.

This structure contains the address of function and associated data structure for sending pcm data to the PCM interface.

RETURN VALUE:

  • iffax_FM_CMD_ACCEPTED (0) if the message is copied into message FIFO
  • iffax_FM_CMD_NOT_ACCEPTED (1) if the message is not copied into the message FIFO because the FIFO is full
  • iffax_FM_CMD_ERROR (-1) if message is not copied because FM is closed or invalid message ID

Definition at line 410 of file fiu.h.

Data Fields

tint(* | fiuReceiveOut )(void *targetInst, void *message)
Routine called by FIU to send a message to FM for processing. The structure of the FP-to-FM messages is defined in iffax.h (refer IFFAX.chm).
void * | targetInst

Field Documentation

tint(* fiuReceiveOutSpec_t::fiuReceiveOut)(void *targetInst, void *message)

Routine called by FIU to send a message to FM for processing. The structure of the FP-to-FM messages is defined in iffax.h (refer IFFAX.chm).

Referenced by fiuControl(), and fiuOpen().

void* fiuReceiveOutSpec_t::targetInst

Pointer to FIU Target Instance

Definition at line 416 of file fiu.h.

Referenced by fiuControl(), and fiuOpen().

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


FIU: fiuRelocInstance_t Struct Reference

  • Data Structures
  • Data Fields

fiuRelocInstance_t Struct Reference
[FIU External API]

#include <fiu.h>

Detailed Description

FIU Relocation structure.

This structure isu sed by the FIU relocation function fiuReloc to pass pointers to the internal functions fiuReloc, frpReloc and fndReloc.

Definition at line 642 of file fiu.h.

Data Fields

void * | fiuInst
void * | frpInst
void * | fndInst

Field Documentation

void* fiuRelocInstance_t::fiuInst

Pointer to FIU instance

Definition at line 643 of file fiu.h.

void* fiuRelocInstance_t::frpInst

Pointer to FRP instance

Definition at line 644 of file fiu.h.

void* fiuRelocInstance_t::fndInst

Pointer to FND instance

Definition at line 645 of file fiu.h.

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


FIU: fiuSendOutSpec_t Struct Reference

  • Data Structures
  • Data Fields

fiuSendOutSpec_t Struct Reference
[FIU External API]

#include <fiu.h>

Detailed Description

Specification of fiuSendOutSpec Object This structure contains the address of function and associated data structure for sending FAX packets to the network.

Definition at line 382 of file fiu.h.

Data Fields

tint(* | fiuSendOut )(void *targetInst, xferpktInfo_t *pktInfo)
Routine called by FIU to send packet(s) toward the network. The return values are defined as:
  • 0 => Packet(s) processed by network;
  • 1 => Network busy, packet(s) not processed.
    .

void * | targetInst

Field Documentation

tint(* fiuSendOutSpec_t::fiuSendOut)(void *targetInst, xferpktInfo_t *pktInfo)

Routine called by FIU to send packet(s) toward the network. The return values are defined as:

  • 0 => Packet(s) processed by network;
  • 1 => Network busy, packet(s) not processed.
    .

The parameter 'targetInst' is a pointer to the module instance that processes packets formatted and transmitted by the FIU module. The parameter 'pktInfo' is of structure type xferpktInfo_t, defined in file ifpkt.h(refer IFPKT.chm)

Referenced by fiuOpen().

void* fiuSendOutSpec_t::targetInst

Pointer to FIU Target Instance

Definition at line 394 of file fiu.h.

Referenced by fiuOpen().

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


FIU: fiuSizeCfg_t Struct Reference

  • Data Structures
  • Data Fields

fiuSizeCfg_t Struct Reference
[FIU External API]

#include <fiu.h>

Detailed Description

FIU Size Configuration structure.

DESCRIPTION: Data structure that describes memory requirements for FIU

Definition at line 425 of file fiu.h.

Data Fields

tint | NumInternalFIUBufs
tint | NumInternalFIUOverlayBufs

Field Documentation

tint fiuSizeCfg_t::NumInternalFIUBufs

Number of internal FIU buffers for use during fax processing - to complement the GMP buffers used externally

Definition at line 426 of file fiu.h.

Referenced by fiuGetSizes().

tint fiuSizeCfg_t::NumInternalFIUOverlayBufs

Number of internal FIU buffers to be allocated from the overlayable memory pool

Definition at line 429 of file fiu.h.

Referenced by fiuGetSizes().

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


FIU: fiuStats_t Struct Reference

  • Data Structures
  • Data Fields

fiuStats_t Struct Reference
[FIU External API]

#include <fiu.h>

Collaboration diagram for fiuStats_t:

[legend]

Detailed Description

FIU Statistics Structure.

This structure contains the statistics provided upon request with fiuGetStats().

Definition at line 607 of file fiu.h.

Data Fields

tuint | MaxJitterBufDepth
tuint | MaxNetRxQDepth
tuint | JitterBufOverFlow
tuint | NetRxQOverFlow
tuint | RxInvalidPackets
tulong | RxOutOfSeqPacket
tulong | TxPackets
tulong | TxPacketsDropped
tulong | RxPackets
tulong | RxLostPackets
tuint | HSmodulation
tuint | NumberOfPages
tbool | ECMused
tuint | sendInQMaxDepth
tuint | RxOutQMaxDepth
tuint | MaxHSbufferUsage
tuint | sendInQOverflows
tuint | RxOutQOverflows
fiuDirection_e Direction
fiuNSFInfo_t NSFInfo
tulong | Bytes_From_Net
tulong | Bytes_To_Net
tuint | Call_Success_Bitfield

Field Documentation

tuint fiuStats_t::MaxJitterBufDepth

Maximum depth of the jitter buffer

Definition at line 608 of file fiu.h.

tuint fiuStats_t::MaxNetRxQDepth

Maximum depth of the network Rx queue

Definition at line 609 of file fiu.h.

tuint fiuStats_t::JitterBufOverFlow

Number of jitter buffer overflows (lost data)

Definition at line 610 of file fiu.h.

tuint fiuStats_t::NetRxQOverFlow

Number of NetRxQ overflows

Definition at line 611 of file fiu.h.

tuint fiuStats_t::RxInvalidPackets

Number of invalid packets received

Definition at line 612 of file fiu.h.

tulong fiuStats_t::RxOutOfSeqPacket

Number of packets dropped due to out-of-sequence

Definition at line 613 of file fiu.h.

tulong fiuStats_t::TxPackets

Total number of packets sent to the network

Definition at line 614 of file fiu.h.

tulong fiuStats_t::TxPacketsDropped

Number of FAX packets dropped due to busy network interface

Definition at line 615 of file fiu.h.

tulong fiuStats_t::RxPackets

Total number of packets received from the network

Definition at line 617 of file fiu.h.

tulong fiuStats_t::RxLostPackets

Number of lost packets

Definition at line 618 of file fiu.h.

tuint fiuStats_t::HSmodulation

specifies the most recent high-speed modulation

Definition at line 620 of file fiu.h.

Referenced by faxResetStats().

tuint fiuStats_t::NumberOfPages

Identifies the number of complete pages transfered

Definition at line 621 of file fiu.h.

tbool fiuStats_t::ECMused

Indicates if ECM was used

Definition at line 622 of file fiu.h.

Referenced by faxResetStats().

tuint fiuStats_t::sendInQMaxDepth

Records maximum depth of sendIn queue

Definition at line 623 of file fiu.h.

tuint fiuStats_t::RxOutQMaxDepth

Records maximum depth of receiveIn queue

Definition at line 624 of file fiu.h.

tuint fiuStats_t::MaxHSbufferUsage

Record maximum usage of high-speed buffers

Definition at line 625 of file fiu.h.

Referenced by fiuGetStats().

tuint fiuStats_t::sendInQOverflows

Counts number of sendIn queue overflows

Definition at line 626 of file fiu.h.

tuint fiuStats_t::RxOutQOverflows

Counts number of receiveOut queue overflows

Definition at line 627 of file fiu.h.

fiuDirection_e fiuStats_t::Direction

Identifies whether local FTE is ORG or DEST

Definition at line 628 of file fiu.h.

Referenced by faxResetStats(), and fiuGetStats().

fiuNSFInfo_t fiuStats_t::NSFInfo

Record received NSF data

Definition at line 629 of file fiu.h.

Referenced by faxResetStats().

tulong fiuStats_t::Bytes_From_Net

Packet bytes received from the network

Definition at line 630 of file fiu.h.

tulong fiuStats_t::Bytes_To_Net

Packet bytes sent toward the network

Definition at line 631 of file fiu.h.

tuint fiuStats_t::Call_Success_Bitfield

Call compltetion information

Definition at line 632 of file fiu.h.

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


FIU: FndFrpMsgBody_u Union Reference

  • Data Structures
  • Data Fields

FndFrpMsgBody_u Union Reference

#include <frpfndif.h>

Collaboration diagram for FndFrpMsgBody_u:

[legend]

Detailed Description

Definition at line 360 of file frpfndif.h.

Data Fields

FND_FRP_DATA_BYTE_S DataByte
FND_FRP_DATA_BUFFER_S DataBuffer
FND_FRP_FRAME_COMP_S FrameComp
FND_FRP_TONE_ON_LS_S ToneLs
FND_FRP_V8_MSG_S cmMsg
FND_FRP_V8_MSG_S jmMsg
FND_FRP_V8_MSG_S ciMsg
FND_FRP_V34_PRI_RATE_S v34PriRate

Field Documentation

struct FND_FRP_DATA_BYTE_S FndFrpMsgBody_u::DataByte

Definition at line 362 of file frpfndif.h.

struct FND_FRP_DATA_BUFFER_S FndFrpMsgBody_u::DataBuffer

Definition at line 363 of file frpfndif.h.

struct FND_FRP_FRAME_COMP_S FndFrpMsgBody_u::FrameComp

Definition at line 364 of file frpfndif.h.

struct FND_FRP_TONE_ON_LS_S FndFrpMsgBody_u::ToneLs

Definition at line 365 of file frpfndif.h.

struct FND_FRP_V8_MSG_S FndFrpMsgBody_u::cmMsg

Definition at line 366 of file frpfndif.h.

struct FND_FRP_V8_MSG_S FndFrpMsgBody_u::jmMsg

Definition at line 367 of file frpfndif.h.

struct FND_FRP_V8_MSG_S FndFrpMsgBody_u::ciMsg

Definition at line 368 of file frpfndif.h.

struct FND_FRP_V34_PRI_RATE_S FndFrpMsgBody_u::v34PriRate

Definition at line 369 of file frpfndif.h.

The documentation for this union was generated from the following file:
  • frpfndif.h


FIU: FrpFndMsgBody_u Union Reference

  • Data Structures
  • Data Fields

FrpFndMsgBody_u Union Reference

#include <frpfndif.h>

Collaboration diagram for FrpFndMsgBody_u:

[legend]

Detailed Description

Definition at line 236 of file frpfndif.h.

Data Fields

FRP_FND_DATA_BYTE_S DataByte
FRP_FND_DATA_BUFFER_S DataBuffer
FRP_FND_FRAME_COMP_S FrameComp
FRP_FND_HS_TRNG_DETECT_S HSTrngDetect
FRP_FND_HS_RATE_S HSRate
FRP_FND_SLP_INFO_S slpInfo
FRP_FND_TONE_DETECT_S ToneDetect
FRP_FND_V8_MSG_S cmMsg
FRP_FND_V8_MSG_S jmMsg
FRP_FND_V8_MSG_S ciMsg
FRP_FND_V34_PRI_RATE_S v34PriRate

Field Documentation

struct FRP_FND_DATA_BYTE_S FrpFndMsgBody_u::DataByte

Definition at line 238 of file frpfndif.h.

struct FRP_FND_DATA_BUFFER_S FrpFndMsgBody_u::DataBuffer

Definition at line 239 of file frpfndif.h.

struct FRP_FND_FRAME_COMP_S FrpFndMsgBody_u::FrameComp

Definition at line 240 of file frpfndif.h.

struct FRP_FND_HS_TRNG_DETECT_S FrpFndMsgBody_u::HSTrngDetect

Definition at line 241 of file frpfndif.h.

struct FRP_FND_HS_RATE_S FrpFndMsgBody_u::HSRate

Definition at line 242 of file frpfndif.h.

struct FRP_FND_SLP_INFO_S FrpFndMsgBody_u::slpInfo

Definition at line 243 of file frpfndif.h.

struct FRP_FND_TONE_DETECT_S FrpFndMsgBody_u::ToneDetect

Definition at line 244 of file frpfndif.h.

struct FRP_FND_V8_MSG_S FrpFndMsgBody_u::cmMsg

Definition at line 245 of file frpfndif.h.

struct FRP_FND_V8_MSG_S FrpFndMsgBody_u::jmMsg

Definition at line 246 of file frpfndif.h.

struct FRP_FND_V8_MSG_S FrpFndMsgBody_u::ciMsg

Definition at line 247 of file frpfndif.h.

struct FRP_FND_V34_PRI_RATE_S FrpFndMsgBody_u::v34PriRate

Definition at line 248 of file frpfndif.h.

The documentation for this union was generated from the following file:
  • frpfndif.h


FIU: faxBufferAllocation_u Union Reference

  • Data Structures
  • Data Fields

faxBufferAllocation_u Union Reference

#include <faxport.h>

Collaboration diagram for faxBufferAllocation_u:

[legend]

Detailed Description

Definition at line 127 of file faxport.h.

Data Fields

faxHSBuffer_t faxHSBuffer
faxBufferLinkedList_t faxBufferLinkedList
faxBuffer_t faxBuffer

Field Documentation

faxHSBuffer_t faxBufferAllocation_u::faxHSBuffer

Definition at line 128 of file faxport.h.

faxBufferLinkedList_t faxBufferAllocation_u::faxBufferLinkedList

Definition at line 129 of file faxport.h.

Referenced by faxBufferAdd(), and faxBufferMgmtInit().

faxBuffer_t faxBufferAllocation_u::faxBuffer

Definition at line 130 of file faxport.h.

The documentation for this union was generated from the following file:
  • faxport.h


FIU Test: Data Structures

  • Data Structures
  • Data Fields

FIU Test Data Structures

Here are the data structures with brief descriptions:
siuInst_s


FIU Test: Dependent Packages

FIU Test Package

Dependent Packages

dependencies

  • ti.mas.types (Common data type defintions)
  • ti.mas.util (Common utilities)
  • ti.mas.fiu (FIU API)
  • ti.mas.swtools (to build software)


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


FIU Test: doxygen.h File Reference

doxygen.h File Reference

Go to the source code of this file.


FIU Test: doxygen.h Source File

doxygen.h

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


FIU Test: File Index

FIU Test File List

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


FIU Test: fiuDebugTraceParser.c File Reference

fiuDebugTraceParser.c File Reference

#include <string.h>
#include <stdio.h>
#include <ti/mas/types/types.h>
#include <ti/mas/fiu/src/frtrace.h>
#include <ti/mas/fiu/src/frp/frp.h>
#include <ti/mas/fiu/src/frp/frploc.h>
#include <ti/mas/fiu/src/frp/frpt30.h>
#include <ti/mas/fiu/src/fnd/fndt38.h>
#include <ti/mas/fiu/src/fnd/fndfrf11.h>
#include <ti/mas/fiu/src/fnd/fndaal2.h>
#include <ti/mas/fiu/src/fnd/fndt2.h>

Include dependency graph for fiuDebugTraceParser.c:

Go to the source code of this file.

Functions

void | fiuDebugGetNetProtocol (int msgData, char *string)
void | fiuDebugGetFRPState (int msgData, char *string)
void | fiuDebugGetFCF (int msgData, char *string)
void | fiuDebugGetFCF2 (int msgData, char *string)
void | fiuDebugGetIFPHeader (int msgData, char *string)
void | fiuDebugGetPT (int msgData, char *string)
void | fiuDebugGetFRF11PacketType (int msgData, char *string)
void | fiuDebugGetFRF11DecoderState (int msgData, char *string)
void | fiuDebugGetAAL2PacketType (int msgData, char *string)
void | fiuDebugGetAAL2DecoderState (int msgData, char *string)
void | fiuDebugGetT38UDecoderState (int msgData, char *string)
void | fiuDebugGetT38UException (int msgData, char *string)
void | fiuDebugGetSLPPageMode (int msgData, char *string)
void | fiuDebugGetToneId (int msgData, char *string)
void | fiuDebugGetMDEvent (int msgData, char *string)
void | fiuDebugGetNetEvent (int msgData, char *string)
void | fiuDebugGetFRP2FNDMsg (int msgData, char *string)
void | fiuDebugGetTimerEvent (int msgData, char *string)
void | fiuDebugGetT2PLineState (int msgData, char *string)
void | fiuDebugGetT2PDecoderState (int msgData, char *string)
void | fiuDebugGetSwitchoverReason (int msgData, char *string)
void | fiuDebugGetCleardownReason (int msgData, char *string)
int | fiuDebugTraceParser (int msgId, int msgData, char *dstPtr)

Variables

char | fiuMsgString [40]

Function Documentation

void fiuDebugGetNetProtocol | ( | int | msgData,
 |  | char * | string
 | ) |  |

Definition at line 25 of file fiuDebugTraceParser.c.

Referenced by fiuDebugTraceParser().

void fiuDebugGetFRPState | ( | int | msgData,
 |  | char * | string
 | ) |  |

Definition at line 67 of file fiuDebugTraceParser.c.

Referenced by fiuDebugTraceParser().

void fiuDebugGetFCF | ( | int | msgData,
 |  | char * | string
 | ) |  |

Definition at line 137 of file fiuDebugTraceParser.c.

Referenced by fiuDebugTraceParser().

void fiuDebugGetFCF2 | ( | int | msgData,
 |  | char * | string
 | ) |  |

Definition at line 248 of file fiuDebugTraceParser.c.

Referenced by fiuDebugTraceParser().

void fiuDebugGetIFPHeader | ( | int | msgData,
 |  | char * | string
 | ) |  |

Definition at line 286 of file fiuDebugTraceParser.c.

Referenced by fiuDebugTraceParser().

void fiuDebugGetPT | ( | int | msgData,
 |  | char * | string
 | ) |  |

Definition at line 446 of file fiuDebugTraceParser.c.

Referenced by fiuDebugTraceParser().

void fiuDebugGetFRF11PacketType | ( | int | msgData,
 |  | char * | string
 | ) |  |

Definition at line 608 of file fiuDebugTraceParser.c.

Referenced by fiuDebugTraceParser().

void fiuDebugGetFRF11DecoderState | ( | int | msgData,
 |  | char * | string
 | ) |  |

Definition at line 642 of file fiuDebugTraceParser.c.

Referenced by fiuDebugTraceParser().

void fiuDebugGetAAL2PacketType | ( | int | msgData,
 |  | char * | string
 | ) |  |

Definition at line 664 of file fiuDebugTraceParser.c.

Referenced by fiuDebugTraceParser().

void fiuDebugGetAAL2DecoderState | ( | int | msgData,
 |  | char * | string
 | ) |  |

Definition at line 702 of file fiuDebugTraceParser.c.

Referenced by fiuDebugTraceParser().

void fiuDebugGetT38UDecoderState | ( | int | msgData,
 |  | char * | string
 | ) |  |

Definition at line 728 of file fiuDebugTraceParser.c.

Referenced by fiuDebugTraceParser().

void fiuDebugGetT38UException | ( | int | msgData,
 |  | char * | string
 | ) |  |

Definition at line 766 of file fiuDebugTraceParser.c.

Referenced by fiuDebugTraceParser().

void fiuDebugGetSLPPageMode | ( | int | msgData,
 |  | char * | string
 | ) |  |

Definition at line 792 of file fiuDebugTraceParser.c.

Referenced by fiuDebugTraceParser().

void fiuDebugGetToneId | ( | int | msgData,
 |  | char * | string
 | ) |  |

Definition at line 858 of file fiuDebugTraceParser.c.

Referenced by fiuDebugTraceParser().

void fiuDebugGetMDEvent | ( | int | msgData,
 |  | char * | string
 | ) |  |

Definition at line 880 of file fiuDebugTraceParser.c.

Referenced by fiuDebugTraceParser().

void fiuDebugGetNetEvent | ( | int | msgData,
 |  | char * | string
 | ) |  |

Definition at line 970 of file fiuDebugTraceParser.c.

Referenced by fiuDebugTraceParser().

void fiuDebugGetFRP2FNDMsg | ( | int | msgData,
 |  | char * | string
 | ) |  |

Definition at line 1048 of file fiuDebugTraceParser.c.

Referenced by fiuDebugTraceParser().

void fiuDebugGetTimerEvent | ( | int | msgData,
 |  | char * | string
 | ) |  |

Definition at line 1142 of file fiuDebugTraceParser.c.

Referenced by fiuDebugTraceParser().

void fiuDebugGetT2PLineState | ( | int | msgData,
 |  | char * | string
 | ) |  |

Definition at line 1188 of file fiuDebugTraceParser.c.

Referenced by fiuDebugTraceParser().

void fiuDebugGetT2PDecoderState | ( | int | msgData,
 |  | char * | string
 | ) |  |

Definition at line 1218 of file fiuDebugTraceParser.c.

Referenced by fiuDebugTraceParser().

void fiuDebugGetSwitchoverReason | ( | int | msgData,
 |  | char * | string
 | ) |  |

Definition at line 1240 of file fiuDebugTraceParser.c.

Referenced by fiuDebugTraceParser().

void fiuDebugGetCleardownReason | ( | int | msgData,
 |  | char * | string
 | ) |  |

Definition at line 1274 of file fiuDebugTraceParser.c.

Referenced by fiuDebugTraceParser().

int fiuDebugTraceParser | ( | int | msgId,
 |  | int | msgData,
 |  | char * | dstPtr
 | ) |  |

Definition at line 1308 of file fiuDebugTraceParser.c.

References fiuDebugGetAAL2DecoderState(), fiuDebugGetAAL2PacketType(), fiuDebugGetCleardownReason(), fiuDebugGetFCF(), fiuDebugGetFCF2(), fiuDebugGetFRF11DecoderState(), fiuDebugGetFRF11PacketType(), fiuDebugGetFRP2FNDMsg(), fiuDebugGetFRPState(), fiuDebugGetIFPHeader(), fiuDebugGetMDEvent(), fiuDebugGetNetEvent(), fiuDebugGetNetProtocol(), fiuDebugGetPT(), fiuDebugGetSLPPageMode(), fiuDebugGetSwitchoverReason(), fiuDebugGetT2PDecoderState(), fiuDebugGetT2PLineState(), fiuDebugGetT38UDecoderState(), fiuDebugGetT38UException(), fiuDebugGetTimerEvent(), fiuDebugGetToneId(), and fiuMsgString.

Referenced by siuDebugInfo().

Here is the call graph for this function:

Variable Documentation

char fiuMsgString[40]

Definition at line 23 of file fiuDebugTraceParser.c.

Referenced by fiuDebugTraceParser().


FIU Test: fiuDebugTraceParser.c Source File

fiuDebugTraceParser.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: Parser for FIU debug traces
00003  ******************************************************************************
00004  * FILE NAME: fiuDebugTraceParser.c
00005  *
00006  * DESCRIPTION:
00007  *
00008  * (C) Copyright 2003 TELOGY Networks, Inc.
00009  *****************************************************************************/
00010
00011 #include <string.h>
00012 #include <stdio.h>
00013 #include <ti/mas/types/types.h>
00014 #include <ti/mas/fiu/src/frtrace.h>
00015 #include <ti/mas/fiu/src/frp/frp.h>
00016 #include <ti/mas/fiu/src/frp/frploc.h>
00017 #include <ti/mas/fiu/src/frp/frpt30.h>
00018 #include <ti/mas/fiu/src/fnd/fndt38.h>
00019 #include <ti/mas/fiu/src/fnd/fndfrf11.h>
00020 #include <ti/mas/fiu/src/fnd/fndaal2.h>
00021 #include <ti/mas/fiu/src/fnd/fndt2.h>
00022
00023 char fiuMsgString[40];
00024
00025 void fiuDebugGetNetProtocol (int msgData, char *string)
00026 {
00027    switch (msgData)
00028    {
00029       case fiu_PT_T2:
00030          sprintf (string, "Telogy-2");
00031          break;
00032
00033       case fiu_PT_T3:
00034          sprintf (string, "Telogy-3");
00035          break;
00036
00037       case fiu_PT_FRF11:
00038          sprintf (string, "FRF.11");
00039          break;
00040
00041       case fiu_PT_RTP:
00042          sprintf (string, "RTP");
00043          break;
00044
00045       case fiu_PT_T38_UDPTL:
00046          sprintf (string, "T.38 UDPTL");
00047          break;
00048
00049       case fiu_PT_T38_UDPTL_RTP:
00050          sprintf (string, "T.38 UDPTL RTP");
00051          break;
00052
00053       case fiu_PT_T38_RTP:
00054          sprintf (string, "T.38 RTP");
00055          break;
00056
00057       case fiu_PT_AAL2:
00058          sprintf (string, "AAL2");
00059          break;
00060
00061       case fiu_PT_RTPB:
00062          sprintf (string, "RTP version B");
00063          break;
00064    }
00065 } /* fiuDebugGetNetProtocol() */
00066
00067 void fiuDebugGetFRPState (int msgData, char *string)
00068 {
00069    switch (msgData)
00070    {
00071       case FRP_SWITCH_OUT:
00072          sprintf (string, "switch out");
00073          break;
00074
00075       case FRP_IDLE:
00076          sprintf (string, "idle");
00077          break;
00078
00079       case FRP_EFLAG_GEN:
00080          sprintf (string, "eflag");
00081          break;
00082
00083       case FRP_LOCAL_LS_RX:
00084          sprintf (string, "local low-speed receive");
00085          break;
00086
00087       case FRP_LOCAL_HS_RX:
00088          sprintf (string, "local high-speed receive");
00089          break;
00090
00091       case FRP_LOCAL_TCF_RX:
00092          sprintf (string, "local TCF receive");
00093          break;
00094
00095       case FRP_REMOTE_LS_RX:
00096          sprintf (string, "remote low-speed receive");
00097          break;
00098
00099       case FRP_REMOTE_HS_RX:
00100          sprintf (string, "remote high-speed receive");
00101          break;
00102
00103       case FRP_REMOTE_TCF_RX:
00104          sprintf (string, "remote TCF receive");
00105          break;
00106
00107       case FRP_SWITCH_OUT_PENDING:
00108          sprintf (string, "switch out pending");
00109          break;
00110
00111       case FRP_STARTUP:
00112          sprintf (string, "startup");
00113          break;
00114
00115       case FRP_V34_CTRL_IDLE:
00116          sprintf (string, "V.34 control idle");
00117          break;
00118
00119       case FRP_V34_CTRL_TX_DATA:
00120          sprintf (string, "V.34 control tx data");
00121          break;
00122
00123       case FRP_V34_CTRL_RX_DATA:
00124          sprintf (string, "V.34 control rx data");
00125          break;
00126
00127       case FRP_V34_PRI_TX:
00128          sprintf (string, "V.34 primary tx");
00129          break;
00130
00131       case FRP_V34_PRI_RX:
00132          sprintf (string, "V.34 primary rx");
00133          break;
00134    }
00135 } /* fiuDebugGetFRPState() */
00136
00137 void fiuDebugGetFCF (int msgData, char *string)
00138 {
00139    switch (msgData & 0x7F)
00140    {
00141       case FRP_FCF_DIS:
00142          if ((msgData & 0x80) == 0)
00143             sprintf (string, "DIS (0x%X)", msgData);
00144          else
00145             sprintf (string, "DTC (0x%X)", msgData);
00146          break;
00147
00148       case FRP_FCF_CSI:
00149          if ((msgData & 0x80) == 0)
00150             sprintf (string, "CSI (0x%X)", msgData);
00151          else
00152             sprintf (string, "CIG (0x%X)", msgData);
00153          break;
00154
00155       case FRP_FCF_NSF:
00156          if ((msgData & 0x80) == 0)
00157             sprintf (string, "NSF (0x%X)", msgData);
00158          else
00159             sprintf (string, "NSC (0x%X)", msgData);
00160          break;
00161
00162       case FRP_FCF_DCS:
00163          sprintf (string, "DCS (0x%X)", msgData);
00164          break;
00165
00166       case FRP_FCF_TSI:
00167          sprintf (string, "TSI (0x%X)", msgData);
00168          break;
00169
00170       case FRP_FCF_NSS:
00171          sprintf (string, "NSS (0x%X)", msgData);
00172          break;
00173
00174       case FRP_FCF_CTC:
00175          sprintf (string, "CTC (0x%X)", msgData);
00176          break;
00177
00178       case FRP_FCF_EOM:
00179          sprintf (string, "EOM (0x%X)", msgData);
00180          break;
00181
00182       case FRP_FCF_MPS:
00183          sprintf (string, "MPS (0x%X)", msgData);
00184          break;
00185
00186       case FRP_FCF_EOP:
00187          sprintf (string, "EOP (0x%X)", msgData);
00188          break;
00189
00190       case FRP_FCF_PPS:
00191          sprintf (string, "PPS (0x%X)", msgData);
00192          break;
00193
00194       case FRP_FCF_EOR:
00195          sprintf (string, "EOR (0x%X)", msgData);
00196          break;
00197
00198       case FRP_FCF_RR:
00199          sprintf (string, "RR (0x%X)", msgData);
00200          break;
00201
00202       case FRP_FCF_RNR:
00203          sprintf (string, "RNR (0x%X)", msgData);
00204          break;
00205
00206       case FRP_FCF_ERR:
00207          sprintf (string, "ERR (0x%X)", msgData);
00208          break;
00209
00210       case FRP_FCF_DCN:
00211          sprintf (string, "DCN (0x%X)", msgData);
00212          break;
00213
00214       case FRP_FCF_FTT:
00215          sprintf (string, "FTT (0x%X)", msgData);
00216          break;
00217
00218       case FRP_FCF_CRP:
00219          sprintf (string, "CRP (0x%X)", msgData);
00220          break;
00221
00222       case FRP_FCF_MCF:
00223          sprintf (string, "MCF (0x%X)", msgData);
00224          break;
00225
00226       case FRP_FCF_RTN:
00227          sprintf (string, "RTN (0x%X)", msgData);
00228          break;
00229
00230       case FRP_FCF_RTP:
00231          sprintf (string, "RTP (0x%X)", msgData);
00232          break;
00233
00234       case FRP_FCF_PPR:
00235          sprintf (string, "PPR (0x%X)", msgData);
00236          break;
00237
00238       case FRP_FCF_CFR:
00239          sprintf (string, "CFR (0x%X)", msgData);
00240          break;
00241
00242       default:
00243          sprintf (string, "unknown (0x%X)", msgData);
00244          break;
00245    }
00246 } /* fiuDebugGetFCF() */
00247
00248 void fiuDebugGetFCF2 (int msgData, char *string)
00249 {
00250    switch (msgData)
00251    {
00252       case FRP_FCF2_NULL:
00253          sprintf (string, "NULL - no supplementary data (0x%X)", msgData);
00254          break;
00255
00256       case FRP_FCF2_EOM:
00257          sprintf (string, "EOM - another doc next (0x%X)", msgData);
00258          break;
00259
00260       case FRP_FCF2_MPS:
00261          sprintf (string, "MPS - another page of same doc next (0x%X)", msgData);
00262          break;
00263
00264       case FRP_FCF2_EOP:
00265          sprintf (string, "EOP - no more pages/docs (0x%X)", msgData);
00266          break;
00267
00268       case FRP_FCF2_PRI_EOM:
00269          sprintf (string, "PRI EOM - another doc next, procedure int (0x%X)", msgData);
00270          break;
00271
00272       case FRP_FCF2_PRI_MPS:
00273          sprintf (string, "PRI MPS - another page of same doc next, procedure int (0x%X)", msgData);
00274          break;
00275
00276       case FRP_FCF2_PRI_EOP:
00277          sprintf (string, "PRI EOP - no more pages/docs, procedure int (0x%X)", msgData);
00278          break;
00279
00280       default:
00281          sprintf (string, "unknown (0x%X)", msgData);
00282          break;
00283    }
00284 } /* fiuDebugGetFCF2() */
00285
00286 void fiuDebugGetIFPHeader (int msgData, char *string)
00287 {
00288    if (((msgData << 8) & FND_T38U_DATA_MESSAGE_IND) == 0)
00289    {
00290       /* indicator message */
00291       switch (msgData)
00292       {
00293          case FND_T38U_T30MSG_NO_SIGNAL_MOD:
00294             sprintf (string, "no signal ind");
00295             break;
00296
00297          case FND_T38U_T30MSG_CNG_MOD:
00298             sprintf (string, "CNG ind");
00299             break;
00300
00301          case FND_T38U_T30MSG_CED_MOD:
00302             sprintf (string, "CED ind");
00303             break;
00304
00305          case FND_T38U_T30MSG_V21_PREAMBLE_MOD:
00306             sprintf (string, "V.21 preamble ind");
00307             break;
00308
00309          case FND_T38U_T30MSG_V27_2400_MOD:
00310             sprintf (string, "V.27 2400bps ind");
00311             break;
00312
00313          case FND_T38U_T30MSG_V27_4800_MOD:
00314             sprintf (string, "V.27 4800bps ind");
00315             break;
00316
00317          case FND_T38U_T30MSG_V29_7200_MOD:
00318             sprintf (string, "V.29 7200bps ind");
00319             break;
00320
00321          case FND_T38U_T30MSG_V29_9600_MOD:
00322             sprintf (string, "V.29 9600bps ind");
00323             break;
00324
00325          case FND_T38U_T30MSG_V17_7200_S_MOD:
00326             sprintf (string, "V.17 7200bps - short training ind");
00327             break;
00328
00329          case FND_T38U_T30MSG_V17_7200_L_MOD:
00330             sprintf (string, "V.17 7200bps - long training ind");
00331             break;
00332
00333          case FND_T38U_T30MSG_V17_9600_S_MOD:
00334             sprintf (string, "V.17 9600bps - short training ind");
00335             break;
00336
00337          case FND_T38U_T30MSG_V17_9600_L_MOD:
00338             sprintf (string, "V.17 9600bps - long training ind");
00339             break;
00340
00341          case FND_T38U_T30MSG_V17_12000_S_MOD:
00342             sprintf (string, "V.17 12000bps - short training ind");
00343             break;
00344
00345          case FND_T38U_T30MSG_V17_12000_L_MOD:
00346             sprintf (string, "V.17 12000bps - long training ind");
00347             break;
00348
00349          case FND_T38U_T30MSG_V17_14400_S_MOD:
00350             sprintf (string, "V.17 14400bps - short training ind");
00351             break;
00352
00353          case FND_T38U_T30MSG_V17_14400_L_MOD:
00354             sprintf (string, "V.17 14400bps - long training ind");
00355             break;
00356
00357          case FND_T38U_T30MSG_EXT_V8_ANSAM_SIG_MOD:
00358             sprintf (string, "V.8 ANSam ind");
00359             break;
00360
00361          case FND_T38U_T30MSG_EXT_V8_SIGNAL_MOD:
00362             sprintf (string, "V.8 signal ind");
00363             break;
00364
00365          case FND_T38U_T30MSG_EXT_V34_CTRL_CH_1200_MOD:
00366             sprintf (string, "V.34 control channel 1200bps ind");
00367             break;
00368
00369          case FND_T38U_T30MSG_EXT_V34_PRI_CH_MOD:
00370             sprintf (string, "V.34 primary channel ind");
00371             break;
00372
00373          case FND_T38U_T30MSG_EXT_V34_CC_RETRAIN_MOD:
00374             sprintf (string, "V.34 control channel retrain ind");
00375             break;
00376
00377          default:
00378             sprintf (string, "unknown (0x%X)", msgData);
00379             break;
00380       }
00381    }
00382    else
00383    {
00384       /* data message */
00385       switch (msgData & 0x3F)
00386       {
00387          case FND_T38U_DATA_V21_DT:
00388             sprintf (string, "V.21 data");
00389             break;
00390
00391          case FND_T38U_DATA_V27_2400_DT:
00392             sprintf (string, "V.27 2400bps data");
00393             break;
00394
00395          case FND_T38U_DATA_V27_4800_DT:
00396             sprintf (string, "V.27 4800bps data");
00397             break;
00398
00399          case FND_T38U_DATA_V29_7200_DT:
00400             sprintf (string, "V.29 7200bps data");
00401             break;
00402
00403          case FND_T38U_DATA_V29_9600_DT:
00404             sprintf (string, "V.29 9600bps data");
00405             break;
00406
00407          case FND_T38U_DATA_V17_7200_DT:
00408             sprintf (string, "V.17 7200bps data");
00409             break;
00410
00411          case FND_T38U_DATA_V17_9600_DT:
00412             sprintf (string, "V.17 9600bps data");
00413             break;
00414
00415          case FND_T38U_DATA_V17_12000_DT:
00416             sprintf (string, "V.17 12000bps data");
00417             break;
00418
00419          case FND_T38U_DATA_V17_14400_DT:
00420             sprintf (string, "V.17 14400bps data");
00421             break;
00422
00423          case FND_T38U_DATA_EXT_V8_DT:
00424             sprintf (string, "V.8 data");
00425             break;
00426
00427          case FND_T38U_DATA_EXT_V34_PRI_RATE_DT:
00428             sprintf (string, "V.34 primary rate data");
00429             break;
00430
00431          case FND_T38U_DATA_EXT_V34_CC_1200_DT:
00432             sprintf (string, "V.34 control channel 1200bps data");
00433             break;
00434
00435          case FND_T38U_DATA_EXT_V34_PRI_CH_DT:
00436             sprintf (string, "V.34 primary channel data");
00437             break;
00438
00439          default:
00440             sprintf (string, "unknown (0x%X)", msgData);
00441             break;
00442       }
00443    }
00444 } /* fiuDebugGetIFPHeader() */
00445
00446 void fiuDebugGetPT (int msgData, char *string)
00447 {
00448    switch (msgData)
00449    {
00450       case FND_T38U_T30IND_NO_SIGNAL_PT:
00451          sprintf (string, "no signal ind");
00452          break;
00453
00454       case FND_T38U_T30IND_PREAMBLE_PT:
00455          sprintf (string, "preamble ind");
00456          break;
00457
00458       case FND_T38U_T30IND_CED_PT:
00459          sprintf (string, "CED ind");
00460          break;
00461
00462       case FND_T38U_T30IND_CNG_PT:
00463          sprintf (string, "CNG ind");
00464          break;
00465
00466       case FND_T38U_T30IND_V17_7200_STRAIN_PT:
00467          sprintf (string, "V.17 7200bps - short training ind");
00468          break;
00469
00470       case FND_T38U_T30IND_V17_7200_LTRAIN_PT:
00471          sprintf (string, "V.17 7200bps - long training ind");
00472          break;
00473
00474       case FND_T38U_T30IND_V17_9600_STRAIN_PT:
00475          sprintf (string, "V.17 9600bps - short training ind");
00476          break;
00477
00478       case FND_T38U_T30IND_V17_9600_LTRAIN_PT:
00479          sprintf (string, "V.17 9600bps - long training ind");
00480          break;
00481
00482       case FND_T38U_T30IND_V17_12000_STRAIN_PT:
00483          sprintf (string, "V.17 12000bps - short training ind");
00484          break;
00485
00486       case FND_T38U_T30IND_V17_12000_LTRAIN_PT:
00487          sprintf (string, "V.17 12000bps - long training ind");
00488          break;
00489
00490       case FND_T38U_T30IND_V17_14400_STRAIN_PT:
00491          sprintf (string, "V.17 14400bps - short training ind");
00492          break;
00493
00494       case FND_T38U_T30IND_V17_14400_LTRAIN_PT:
00495          sprintf (string, "V.17 14400bps - long training ind");
00496          break;
00497
00498       case FND_T38U_T30IND_V29_9600_TRAIN_PT:
00499          sprintf (string, "V.29 9600bps ind");
00500          break;
00501
00502       case FND_T38U_T30IND_V29_7200_TRAIN_PT:
00503          sprintf (string, "V.29 7200bps ind");
00504          break;
00505
00506       case FND_T38U_T30IND_V27_4800_TRAIN_PT:
00507          sprintf (string, "V.27 4800bps ind");
00508          break;
00509
00510       case FND_T38U_T30IND_V27_2400_TRAIN_PT:
00511          sprintf (string, "V.27 2400bps ind");
00512          break;
00513
00514       case FND_T38U_T30IND_V8_ANSAM_PT:
00515          sprintf (string, "V.8 ANSam ind");
00516          break;
00517
00518       case FND_T38U_T30IND_V8_SIGNAL_PT:
00519          sprintf (string, "V.8 signal ind");
00520          break;
00521
00522       case FND_T38U_T30IND_V34_CC_1200_PT:
00523          sprintf (string, "V.34 control channel 1200bps ind");
00524          break;
00525
00526       case FND_T38U_T30IND_V34_PRI_CH_PT:
00527          sprintf (string, "V.34 primary channel ind");
00528          break;
00529
00530       case FND_T38U_T30IND_V34_CC_RETRAIN_PT:
00531          sprintf (string, "V.34 control channel retrain ind");
00532          break;
00533
00534       case FND_T38U_DATA_V21_PT:
00535          sprintf (string, "V.21 data");
00536          break;
00537
00538       case FND_T38U_DATA_V17_7200_PT:
00539          sprintf (string, "V.17 7200bps data");
00540          break;
00541
00542       case FND_T38U_DATA_V17_9600_PT:
00543          sprintf (string, "V.17 9600bps data");
00544          break;
00545
00546       case FND_T38U_DATA_V17_12000_PT:
00547          sprintf (string, "V.17 12000bps data");
00548          break;
00549
00550       case FND_T38U_DATA_V17_14400_PT:
00551          sprintf (string, "V.17 14400bps data");
00552          break;
00553
00554       case FND_T38U_DATA_V29_7200_PT:
00555          sprintf (string, "V.29 7200bps data");
00556          break;
00557
00558       case FND_T38U_DATA_V29_9600_PT:
00559          sprintf (string, "V.29 9600bps data");
00560          break;
00561
00562       case FND_T38U_DATA_V27_2400_PT:
00563          sprintf (string, "V.27 2400bps data");
00564          break;
00565
00566       case FND_T38U_DATA_V27_4800_PT:
00567          sprintf (string, "V.27 4800bps data");
00568          break;
00569
00570       case FND_T38U_DATA_V8_PT:
00571          sprintf (string, "V.8 data");
00572          break;
00573
00574       case FND_T38U_DATA_V34_PRI_RATE_PT:
00575          sprintf (string, "V.34 primary rate data");
00576          break;
00577
00578       case FND_T38U_DATA_V34_CC_1200_PT:
00579          sprintf (string, "V.34 control channel 1200bps data");
00580          break;
00581
00582       case FND_T38U_DATA_V34_PRI_CH_PT:
00583          sprintf (string, "V.34 primary channel data");
00584          break;
00585
00586       case FND_T38U_RX_INVALID_PKT_PT:
00587          sprintf (string, "Rx invalid packet");
00588          break;
00589
00590       case FND_T38U_RX_PKT_ERROR_PT:
00591          sprintf (string, "Rx packet error");
00592          break;
00593
00594       case FND_T38U_RX_QE_EMPTY:
00595          sprintf (string, "Rx queue empty");
00596          break;
00597
00598       case FND_T38U_RX_QE_BUSY:
00599          sprintf (string, "Rx queue busy");
00600          break;
00601
00602       default:
00603          sprintf (string, "unknown (0x%X)", msgData);
00604          break;
00605    }
00606 } /* fiuDebugGetPT() */
00607
00608 void fiuDebugGetFRF11PacketType (int msgData, char *string)
00609 {
00610    switch (msgData)
00611    {
00612       case FRF11_PKT_TYPE_MOD_OFF:
00613          sprintf (string, "modulation off", msgData);
00614          break;
00615
00616       case FRF11_PKT_TYPE_MOD_ON:
00617          sprintf (string, "modulation on", msgData);
00618          break;
00619
00620       case FRF11_PKT_TYPE_T30_DATA:
00621          sprintf (string, "T.30 data", msgData);
00622          break;
00623
00624       case FRF11_PKT_TYPE_T30_EOF_GOOD:
00625          sprintf (string, "T.30 EOF - good", msgData);
00626          break;
00627
00628       case FRF11_PKT_TYPE_T30_EOF_ABORT:
00629          sprintf (string, "T.30 EOF - abort", msgData);
00630          break;
00631
00632       case FRF11_PKT_TYPE_T4_DATA:
00633          sprintf (string, "T.4 data", msgData);
00634          break;
00635
00636       default:
00637          sprintf (string, "unknown (0x%X)", msgData);
00638          break;
00639    }
00640 } /* fiuDebugGetFRF11PacketType() */
00641
00642 void fiuDebugGetFRF11DecoderState (int msgData, char *string)
00643 {
00644    switch (msgData)
00645    {
00646       case FRF11_RX_TRANSP:
00647          sprintf (string, "transparent");
00648          break;
00649
00650       case FRF11_RX_LSD:
00651          sprintf (string, "low-speed data");
00652          break;
00653
00654       case FRF11_RX_HSD:
00655          sprintf (string, "high-speed data");
00656          break;
00657
00658       case FRF11_IDLE_SYNC:
00659          sprintf (string, "idle resynchronization");
00660          break;
00661    }
00662 } /* fiuDebugGetFRF11DecoderState() */
00663
00664 void fiuDebugGetAAL2PacketType (int msgData, char *string)
00665 {
00666    switch (msgData)
00667    {
00668       case FND_AAL2_PKT_TYPE_IDLE:
00669          sprintf (string, "idle", msgData);
00670          break;
00671
00672       case FND_AAL2_PKT_TYPE_PREAMBLE:
00673          sprintf (string, "preamble", msgData);
00674          break;
00675
00676       case FND_AAL2_PKT_TYPE_EPT:
00677          sprintf (string, "EPT", msgData);
00678          break;
00679
00680       case FND_AAL2_PKT_TYPE_T30_DATA:
00681          sprintf (string, "T.30 data", msgData);
00682          break;
00683
00684       case FND_AAL2_PKT_TYPE_TRAINING:
00685          sprintf (string, "training", msgData);
00686          break;
00687
00688       case FND_AAL2_PKT_TYPE_T4_DATA:
00689          sprintf (string, "T.4 data", msgData);
00690          break;
00691
00692       case FND_AAL2_PKT_TYPE_INVALID:
00693          sprintf (string, "invalid", msgData);
00694          break;
00695
00696       default:
00697          sprintf (string, "unknown (0x%X)", msgData);
00698          break;
00699    }
00700 } /* fiuDebugGetAAL2PacketType() */
00701
00702 void fiuDebugGetAAL2DecoderState (int msgData, char *string)
00703 {
00704    switch (msgData)
00705    {
00706       case FND_AAL2_RX_STARTUP:
00707          sprintf (string, "startup");
00708          break;
00709
00710       case FND_AAL2_RX_TRANSP:
00711          sprintf (string, "transparent");
00712          break;
00713
00714       case FND_AAL2_RX_LSD:
00715          sprintf (string, "low-speed data");
00716          break;
00717
00718       case FND_AAL2_RX_HSD:
00719          sprintf (string, "high-speed data");
00720          break;
00721
00722       case FND_AAL2_IDLE_SYNC:
00723          sprintf (string, "idle resynchronization");
00724          break;
00725    }
00726 } /* fiuDebugGetAAL2DecoderState() */
00727
00728 void fiuDebugGetT38UDecoderState (int msgData, char *string)
00729 {
00730    switch (msgData)
00731    {
00732       case FND_T38U_DECODER_ST_TRANSP:
00733          sprintf (string, "transparent");
00734          break;
00735
00736       case FND_T38U_DECODER_ST_LSD:
00737          sprintf (string, "low-speed data");
00738          break;
00739
00740       case FND_T38U_DECODER_ST_HSD:
00741          sprintf (string, "high-speed data");
00742          break;
00743
00744       case FND_T38U_DECODER_ST_RESYNC:
00745          sprintf (string, "resynchronization");
00746          break;
00747
00748       case FND_T38U_DECODER_ST_STARTUP:
00749          sprintf (string, "startup");
00750          break;
00751
00752       case FND_T38U_DECODER_ST_V34_CTRL_IDLE:
00753          sprintf (string, "V.34 control idle");
00754          break;
00755
00756       case FND_T38U_DECODER_ST_V34_CTRL_DATA:
00757          sprintf (string, "V.34 control data");
00758          break;
00759
00760       case FND_T38U_DECODER_ST_V34_PRI_RX:
00761          sprintf (string, "V.34 primary receive");
00762          break;
00763    }
00764 } /* fiuDebugGetT38UDecoderState() */
00765
00766 void fiuDebugGetT38UException (int msgData, char *string)
00767 {
00768    switch (msgData)
00769    {
00770       case FND_T38U_EXC_INIT:
00771          sprintf (string, "init");
00772          break;
00773
00774       case FND_T38U_EXC_ENC_IFP_INVALID:
00775          sprintf (string, "encoder IFP invalid");
00776          break;
00777
00778       case FND_T38U_EXC_ENC_DF_NULL:
00779          sprintf (string, "encoder DF null");
00780          break;
00781
00782       case FND_T38U_EXC_ENC_TASK_IFP_INVALID:
00783          sprintf (string, "encoder task IFP invalid");
00784          break;
00785
00786       case FND_T38U_EXC_ENC_TASK_DF_NULL:
00787          sprintf (string, "encoder task DF null");
00788          break;
00789    }
00790 } /* fiuDebugGetT38UException() */
00791
00792 void fiuDebugGetSLPPageMode (int msgData, char *string)
00793 {
00794    switch (msgData)
00795    {
00796       case fiu_SLP_MODE_UNKNOWN:
00797          sprintf (string, "unknown");
00798          break;
00799
00800       case fiu_SLP_MODE_TRANS:
00801          sprintf (string, "transparent");
00802          break;
00803
00804       case fiu_SLP_MODE_TCF:
00805          sprintf (string, "TCF");
00806          break;
00807
00808       case fiu_SLP_MODE_MR_1728:
00809          sprintf (string, "MR 1728");
00810          break;
00811
00812       case fiu_SLP_MODE_MR_2048:
00813          sprintf (string, "MR 2048");
00814          break;
00815
00816       case fiu_SLP_MODE_MR_2432:
00817          sprintf (string, "MR 2432");
00818          break;
00819
00820       case fiu_SLP_MODE_MR_3456:
00821          sprintf (string, "MR 3456");
00822          break;
00823
00824       case fiu_SLP_MODE_MR_4096:
00825          sprintf (string, "MR 4096");
00826          break;
00827
00828       case fiu_SLP_MODE_MR_4864:
00829          sprintf (string, "MR 4864");
00830          break;
00831
00832       case fiu_SLP_MODE_MH_1728:
00833          sprintf (string, "MH 1728");
00834          break;
00835
00836       case fiu_SLP_MODE_MH_2048:
00837          sprintf (string, "MH 2048");
00838          break;
00839
00840       case fiu_SLP_MODE_MH_2432:
00841          sprintf (string, "MH 2432");
00842          break;
00843
00844       case fiu_SLP_MODE_MH_3456:
00845          sprintf (string, "MH 3456");
00846          break;
00847
00848       case fiu_SLP_MODE_MH_4096:
00849          sprintf (string, "MH 4096");
00850          break;
00851
00852       case fiu_SLP_MODE_MH_4864:
00853          sprintf (string, "MH 4864");
00854          break;
00855    }
00856 } /* fiuDebugGetSLPPageMode() */
00857
00858 void fiuDebugGetToneId (int msgData, char *string)
00859 {
00860    switch (msgData)
00861    {
00862       case iffax_TONE_CED:
00863          sprintf (string, "CED");
00864          break;
00865
00866       case iffax_TONE_CNG:
00867          sprintf (string, "CNG");
00868          break;
00869
00870       case iffax_TONE_ANSAM:
00871          sprintf (string, "ANSam");
00872          break;
00873
00874       default:
00875          sprintf (string, "unknown (0x%X)", msgData);
00876          break;
00877    }
00878 } /* fiuDebugGetToneId() */
00879
00880 void fiuDebugGetMDEvent (int msgData, char *string)
00881 {
00882    switch (msgData)
00883    {
00884       case iffax_FM_FP_PREAMBLE_DETECT:
00885          sprintf (string, "FM_FP_PREAMBLE_DETECT");
00886          break;
00887
00888       case iffax_FM_FP_CARRIER_DETECT:
00889          sprintf (string, "FM_FP_CARRIER_DETECT");
00890          break;
00891
00892       case iffax_FM_FP_CARRIER_LOSS:
00893          sprintf (string, "FM_FP_CARRIER_LOSS");
00894          break;
00895
00896       case iffax_FM_FP_TEP_DETECT:
00897          sprintf (string, "FM_FP_TEP_DETECT");
00898          break;
00899
00900       case iffax_FM_FP_HS_TRAIN_DETECT:
00901          sprintf (string, "FM_FP_HS_TRAIN_DETECT");
00902          break;
00903
00904       case iffax_FM_FP_FRAME_COMP:
00905          sprintf (string, "FM_FP_FRAME_COMP");
00906          break;
00907
00908       case iffax_FM_FP_SYNC_ACK:
00909          sprintf (string, "FM_FP_SYNC_ACK");
00910          break;
00911
00912       case iffax_FM_FP_DATA:
00913          sprintf (string, "FM_FP_DATA");
00914          break;
00915
00916       case iffax_FM_FP_TONE_DETECT:
00917          sprintf (string, "FM_FP_TONE_DETECT");
00918          break;
00919
00920       case iffax_FM_FP_SIGNAL_DETECT:
00921          sprintf (string, "FM_FP_SIGNAL_DETECT");
00922          break;
00923
00924       case iffax_FM_FP_SIGNAL_LOSS:
00925          sprintf (string, "FM_FP_SIGNAL_LOSS");
00926          break;
00927
00928       case iffax_FM_FP_V8_CI_RECEIVED:
00929          sprintf (string, "FM_FP_V8_CI_RECEIVED");
00930          break;
00931
00932       case iffax_FM_FP_V8_CM_RECEIVED:
00933          sprintf (string, "FM_FP_V8_CM_RECEIVED");
00934          break;
00935
00936       case iffax_FM_FP_V8_JM_RECEIVED:
00937          sprintf (string, "FM_FP_V8_JM_RECEIVED");
00938          break;
00939
00940       case iffax_FM_FP_V34_E_DETECTED:
00941          sprintf (string, "FM_FP_V34_E_DETECTED");
00942          break;
00943
00944       case iffax_FM_FP_V34_PRI_RATE_KNOWN:
00945          sprintf (string, "FM_FP_V34_PRI_RATE_KNOWN");
00946          break;
00947
00948       case iffax_FM_FP_V34_CC_RETRAIN:
00949          sprintf (string, "FM_FP_V34_CC_RETRAIN");
00950          break;
00951
00952       case iffax_FM_FP_V34_PRI_CH_TURN_OFF:
00953          sprintf (string, "FM_FP_V34_PRI_CH_TURN_OFF");
00954          break;
00955
00956       case iffax_FM_FP_40_ONES_DETECTED:
00957          sprintf (string, "FM_FP_40_ONES_DETECTED");
00958          break;
00959
00960       case iffax_FM_FP_SILENCE_DETECTED:
00961          sprintf (string, "FM_FP_SILENCE_DETECTED");
00962          break;
00963
00964       default:
00965          sprintf (string, "unknown event (0x%X)", msgData);
00966          break;
00967    }
00968 } /* fiuDebugGetMDEvent() */
00969
00970 void fiuDebugGetNetEvent (int msgData, char *string)
00971 {
00972    switch (msgData)
00973    {
00974       case FND_FRP_SIGNAL_END:
00975          sprintf (string, "FND_FRP_SIGNAL_END");
00976          break;
00977
00978       case FND_FRP_TONE_ON_LS:
00979          sprintf (string, "FND_FRP_TONE_ON_LS");
00980          break;
00981
00982       case FND_FRP_HS_TRAINING:
00983          sprintf (string, "FND_FRP_HS_TRAINING");
00984          break;
00985
00986       case FND_FRP_PREAMBLE:
00987          sprintf (string, "FND_FRP_PREAMBLE");
00988          break;
00989
00990       case FND_FRP_DATA_BYTE:
00991          sprintf (string, "FND_FRP_DATA_BYTE");
00992          break;
00993
00994       case FND_FRP_DATA_BUFFER:
00995          sprintf (string, "FND_FRP_DATA_BUFFER");
00996          break;
00997
00998       case FND_FRP_FRAME_COMP:
00999          sprintf (string, "FND_FRP_FRAME_COMP");
01000          break;
01001
01002       case FND_FRP_PREAMBLE_NOTIF:
01003          sprintf (string, "FND_FRP_PREAMBLE_NOTIF");
01004          break;
01005
01006       case FND_FRP_HS_TRAIN_NOTIF:
01007          sprintf (string, "FND_FRP_HS_TRAIN_NOTIF");
01008          break;
01009
01010       case FND_FRP_V8_CI:
01011          sprintf (string, "FND_FRP_V8_CI");
01012          break;
01013
01014       case FND_FRP_V8_CM:
01015          sprintf (string, "FND_FRP_V8_CM");
01016          break;
01017
01018       case FND_FRP_V8_JM:
01019          sprintf (string, "FND_FRP_V8_JM");
01020          break;
01021
01022       case FND_FRP_V34_PRI_RATE:
01023          sprintf (string, "FND_FRP_V34_PRI_RATE");
01024          break;
01025
01026       case FND_FRP_V34_PRI_BEGIN:
01027          sprintf (string, "FND_FRP_V34_PRI_BEGIN");
01028          break;
01029
01030       case FND_FRP_V34_CTRL_BEGIN:
01031          sprintf (string, "FND_FRP_V34_CTRL_BEGIN");
01032          break;
01033
01034       case FND_FRP_V34_CC_RETRAIN:
01035          sprintf (string, "FND_FRP_V34_CC_RETRAIN");
01036          break;
01037
01038       case FND_FRP_V8_SIG:
01039          sprintf (string, "FND_FRP_V8_SIG");
01040          break;
01041
01042       default:
01043          sprintf (string, "unknown event (0x%X)", msgData);
01044          break;
01045    }
01046 } /* fiuDebugGetNetEvent() */
01047
01048 void fiuDebugGetFRP2FNDMsg (int msgData, char *string)
01049 {
01050    switch (msgData)
01051    {
01052       case FRP_FND_SIGNAL_END:
01053          sprintf (string, "FRP_FND_SIGNAL_END");
01054          break;
01055
01056       case FRP_FND_TEP_DETECT:
01057          sprintf (string, "FRP_FND_TEP_DETECT");
01058          break;
01059
01060       case FRP_FND_HS_TRNG_DETECT:
01061          sprintf (string, "FRP_FND_HS_TRNG_DETECT");
01062          break;
01063
01064       case FRP_FND_PREAMBLE_DETECT:
01065          sprintf (string, "FRP_FND_PREAMBLE_DETECT");
01066          break;
01067
01068       case FRP_FND_DATA_BYTE:
01069          sprintf (string, "FRP_FND_DATA_BYTE");
01070          break;
01071
01072       case FRP_FND_DATA_BUFFER:
01073          sprintf (string, "FRP_FND_DATA_BUFFER");
01074          break;
01075
01076       case FRP_FND_FRAME_COMP:
01077          sprintf (string, "FRP_FND_FRAME_COMP");
01078          break;
01079
01080       case FRP_FND_HS_RATE:
01081          sprintf (string, "FRP_FND_HS_RATE");
01082          break;
01083
01084       case FRP_FND_SLP_INFO:
01085          sprintf (string, "FRP_FND_SLP_INFO");
01086          break;
01087
01088       case FRP_FND_TONE_DETECT:
01089          sprintf (string, "FRP_FND_TONE_DETECT");
01090          break;
01091
01092       case FRP_FND_V8_CI:
01093          sprintf (string, "FRP_FND_V8_CI");
01094          break;
01095
01096       case FRP_FND_V8_CM:
01097          sprintf (string, "FRP_FND_V8_CM");
01098          break;
01099
01100       case FRP_FND_V8_JM:
01101          sprintf (string, "FRP_FND_V8_JM");
01102          break;
01103
01104       case FRP_FND_V34_PRI_RATE:
01105          sprintf (string, "FRP_FND_V34_PRI_RATE");
01106          break;
01107
01108       case FRP_FND_V34_CTRL_DATA:
01109          sprintf (string, "FRP_FND_V34_CTRL_DATA");
01110          break;
01111
01112       case FRP_FND_V34_PRI_DATA:
01113          sprintf (string, "FRP_FND_V34_PRI_DATA");
01114          break;
01115
01116       case FRP_FND_V34_PRI_BEGIN:
01117          sprintf (string, "FRP_FND_V34_PRI_BEGIN");
01118          break;
01119
01120       case FRP_FND_V34_CTRL_BEGIN:
01121          sprintf (string, "FRP_FND_V34_CTRL_BEGIN");
01122          break;
01123
01124       case FRP_FND_V34_CC_RETRAIN:
01125          sprintf (string, "FRP_FND_V34_CC_RETRAIN");
01126          break;
01127
01128       case FRP_FND_V8_SIG:
01129          sprintf (string, "FRP_FND_V8_SIG");
01130          break;
01131
01132       case FRP_FND_V34_SIGNAL_END:
01133          sprintf (string, "FRP_FND_V34_SIGNAL_END");
01134          break;
01135
01136       default:
01137          sprintf (string, "unknown (0x%X)", msgData);
01138          break;
01139    }
01140 } /* fiuDebugGetFRP2FNDMsg() */
01141
01142 void fiuDebugGetTimerEvent (int msgData, char *string)
01143 {
01144    switch (msgData)
01145    {
01146       case FRP_NOACTIVITY_TIMER_EXP:
01147          sprintf (string, "no activity timer");
01148          break;
01149
01150       case FRP_CLEARDOWN_TIMER_EXP:
01151          sprintf (string, "cleardown timer");
01152          break;
01153
01154       case FRP_EFLAG_START_TIMER_EXP:
01155          sprintf (string, "eflag start timer");
01156          break;
01157
01158       case FRP_EFLAG_STOP_TIMER_EXP:
01159          sprintf (string, "eflag stop timer");
01160          break;
01161
01162       case FRP_CARRIER_DETECT_TIMER_EXP:
01163          sprintf (string, "carrier detect timer");
01164          break;
01165
01166       case FRP_XT2_TIMER_EXP:
01167          sprintf (string, "XT2 timer");
01168          break;
01169
01170       case FRP_NETWORK_TIMEOUT_EXP:
01171          sprintf (string, "network timer");
01172          break;
01173
01174       case FRP_TCF_DETECT_TIMER_EXP:
01175          sprintf (string, "TCF detect timer");
01176          break;
01177
01178       case FRP_STARTUP_TIMER_EXP:
01179          sprintf (string, "startup timer");
01180          break;
01181
01182       default:
01183          sprintf (string, "unknown event (0x%X)", msgData);
01184          break;
01185    }
01186 } /* fiuDebugGetTimerEvent() */
01187
01188 void fiuDebugGetT2PLineState (int msgData, char *string)
01189 {
01190    switch (msgData)
01191    {
01192       case FND_T2P_LS_IDLE:
01193          sprintf (string, "idle");
01194          break;
01195
01196       case FND_T2P_LS_PREAMBLE:
01197          sprintf (string, "preamble");
01198          break;
01199
01200       case FND_T2P_LS_LOW_SPEED_DATA:
01201          sprintf (string, "low-speed data");
01202          break;
01203
01204       case FND_T2P_HIGH_SPEED_TRAINING:
01205          sprintf (string, "high-speed training");
01206          break;
01207
01208       case FND_T2P_HIGH_SPEED_DATA:
01209          sprintf (string, "high-speed data");
01210          break;
01211
01212       default:
01213          sprintf (string, "unknown (0x%X)", msgData);
01214          break;
01215    }
01216 } /* fiuDebugGetT2PLineState() */
01217
01218 void fiuDebugGetT2PDecoderState (int msgData, char *string)
01219 {
01220    switch (msgData)
01221    {
01222       case FND_DECODER_T2P_TRANSP:
01223          sprintf (string, "transparent");
01224          break;
01225
01226       case FND_DECODER_T2P_LSD:
01227          sprintf (string, "low-speed data");
01228          break;
01229
01230       case FND_DECODER_T2P_HSD:
01231          sprintf (string, "high-speed data");
01232          break;
01233
01234       case FND_DECODER_T2P_IDLE_SYNC:
01235          sprintf (string, "idle resynchronization");
01236          break;
01237    }
01238 } /* fiuDebugGetT2PDecoderState() */
01239
01240 void fiuDebugGetSwitchoverReason (int msgData, char *string)
01241 {
01242    switch (msgData)
01243    {
01244       case fiu_SWITCHOVER_V8_CM_RCVD_LOCAL:
01245          sprintf (string, "V.8 CM received from local");
01246          break;
01247
01248       case fiu_SWITCHOVER_V8_CM_RCVD_REMOTE:
01249          sprintf (string, "V.8 CM received from remote");
01250          break;
01251
01252       case fiu_SWITCHOVER_V8_CI_RCVD_LOCAL:
01253          sprintf (string, "V.8 CI received from local");
01254          break;
01255
01256       case fiu_SWITCHOVER_V8_CI_RCVD_REMOTE:
01257          sprintf (string, "V.8 CI received from remote");
01258          break;
01259
01260       case fiu_SWITCHOVER_V8_ANSAM_RCVD_REMOTE:
01261          sprintf (string, "V.8 ANSam received from remote");
01262          break;
01263
01264       case fiu_SWITCHOVER_PREAMBLE_RCVD_REMOTE:
01265          sprintf (string, "V.21 preamble received from remote");
01266          break;
01267
01268       case fiu_SWITCHOVER_V34_NOT_SUPPORTED:
01269          sprintf (string, "V.34 fax not supported");
01270          break;
01271    }
01272 } /* fiuDebugGetSwitchoverReason() */
01273
01274 void fiuDebugGetCleardownReason (int msgData, char *string)
01275 {
01276    switch (msgData)
01277    {
01278       case FRP_CLEARDOWN_DCN_RCVD_LOCAL:
01279          sprintf (string, "DCN message received from local");
01280          break;
01281
01282       case FRP_CLEARDOWN_DCN_RCVD_REMOTE:
01283          sprintf (string, "DCN message received from remote");
01284          break;
01285
01286       case FRP_CLEARDOWN_NSS_RCVD_LOCAL:
01287          sprintf (string, "NSS message received from local");
01288          break;
01289
01290       case FRP_CLEARDOWN_NSS_RCVD_REMOTE:
01291          sprintf (string, "NSS message received from remote");
01292          break;
01293
01294       case FRP_CLEARDOWN_NO_ACTIVITY_TIMEOUT:
01295          sprintf (string, "no-activity timeout");
01296          break;
01297
01298       case FRP_CLEARDOWN_TX_NETWORK_TIMEOUT:
01299          sprintf (string, "network timeout waiting for data");
01300          break;
01301
01302       case FRP_CLEARDOWN_STARTUP_TIMEOUT:
01303          sprintf (string, "startup timer expired");
01304          break;
01305    }
01306 } /* fiuDebugGetCleardownReason() */
01307
01308 int fiuDebugTraceParser (int msgId, int msgData, char *dstPtr)
01309 {
01310    int returnVal = TRUE;
01311
01312    switch (msgId)
01313    {
01314       case TRC_FIU_OPEN:
01315          sprintf (dstPtr, "FIU is opened: frame size = %d ms", msgData);
01316          break;
01317
01318       case TRC_FIU_CLOSED:
01319          sprintf (dstPtr, "FIU is closed");
01320          break;
01321
01322       case TRC_FIU_CLEARDOWN_IND:
01323          fiuDebugGetCleardownReason (msgData, fiuMsgString);
01324          sprintf (dstPtr, "Fax cleardown: %s", fiuMsgString);
01325          break;
01326
01327       case TRC_FIU_RELOC:
01328          sprintf (dstPtr, "FIU relocation requested");
01329          break;
01330
01331       case TRC_FIU_INVD_CONTROL:
01332          sprintf (dstPtr, "fiuControl called with invalid code: %d", msgData);
01333          break;
01334
01335       case TRC_FIU_G3_TO_V34:
01336          fiuDebugGetSwitchoverReason (msgData, fiuMsgString);
01337          sprintf (dstPtr, "Switchover from G3 to V.34 processing: %s", fiuMsgString);
01338          break;
01339
01340       case TRC_FIU_V34_TO_G3:
01341          fiuDebugGetSwitchoverReason (msgData, fiuMsgString);
01342          sprintf (dstPtr, "Switchover from V.34 to G3 processing: %s", fiuMsgString);
01343          break;
01344
01345       case TRC_FND_INVALID_PKT:
01346          sprintf (dstPtr, "Invalid packet received from network: %s",
01347                   ((msgData == 0) ? "header error":"invalid state"));
01348          break;
01349
01350       case TRC_FND_PACKET_LOSS:
01351          sprintf (dstPtr, "Loss of data: number of lost packets = %d", msgData);
01352          break;
01353
01354       case TRC_FND_T2P_RX_LC_UNDEF:
01355          sprintf (dstPtr, "Undefined line state detected from network: %d", msgData);
01356          break;
01357
01358       case TRC_FND_TX_PKT_DROPPED:
01359          sprintf (dstPtr, "Packets cannot be transmitted to the network");
01360          break;
01361
01362       case TRC_FND_EXCEPTION:
01363          sprintf (dstPtr, "FND exception: code = %d", msgData);
01364          break;
01365
01366       case TRC_FND_T38U_INVD_FDT:
01367          sprintf (dstPtr, "Received T.38 packet with invalid field data type: 0x%X", msgData);
01368          break;
01369
01370       case TRC_FND_T38U_EXCEPTION:
01371          fiuDebugGetT38UException (msgData, fiuMsgString);
01372          sprintf (dstPtr, "FND exception problem with T.38 packet: %s", fiuMsgString);
01373          break;
01374
01375       case TRC_FRP_FND_MSG_DROPPED:
01376          fiuDebugGetFRP2FNDMsg (msgData, fiuMsgString);
01377          sprintf (dstPtr, "FRP-to-FND message dropped: %s", fiuMsgString);
01378          break;
01379
01380       case TRC_FND_T38U_ENC_IFP_BUF_FULL:
01381          sprintf (dstPtr, "IFP buffer full");
01382          break;
01383
01384       case TRC_FND_T38U_ENC_IFP_BUF_EMPTY:
01385          sprintf (dstPtr, "IFP buffer empty");
01386          break;
01387
01388       case TRC_FND_T38U_ENC_IFP_DELETE_ERROR:
01389          sprintf (dstPtr, "Attempting to delete an IFP that has not been sent to the network");
01390          break;
01391
01392       case TRC_FND_T38U_NO_DF_AVAIL:
01393          sprintf (dstPtr, "No data buffer available for IFP data - msg will be dropped");
01394          break;
01395
01396       case TRC_FND_T38U_ENC_DF_DELETE_ERROR:
01397          sprintf (dstPtr, "Attempting to delete a data field that is NULL");
01398          break;
01399
01400       case TRC_FND_T38U_VERSION_NUM:
01401          sprintf (dstPtr, "T.38 version %d", msgData);
01402          break;
01403
01404       case TRC_FRP_STATE_CHANGE:
01405          fiuDebugGetFRPState (msgData, fiuMsgString);
01406          sprintf (dstPtr, "FRP state change: %s", fiuMsgString);
01407          break;
01408
01409       case TRC_FRP_FCF_ID:
01410          fiuDebugGetFCF (msgData, fiuMsgString);
01411          sprintf (dstPtr, "FCF of current frame: %s", fiuMsgString);
01412          break;
01413
01414       case TRC_FRP_FM_DATA_SIZE_EXCEEDED:
01415          sprintf (dstPtr, "Received a data message from FM with invalid size");
01416          break;
01417
01418       case TRC_FRP_FM_MESSAGE_ERROR:
01419          sprintf (dstPtr, "A message from FRP to FM was reported as ERROR by FM");
01420          break;
01421
01422       case TRC_FRP_FCF2_ID:
01423          fiuDebugGetFCF2 (msgData, fiuMsgString);
01424          sprintf (dstPtr, "FCF2 of current frame: %s", fiuMsgString);
01425          break;
01426
01427 #ifndef FAX_DBG_LEVEL_1_ONLY_PARSER
01428       case TRC_FIU_NO_HS_BUFFER_AVAIL:
01429          sprintf (dstPtr, "Memory allocation failure: no high speed buffer available");
01430          break;
01431
01432       case TRC_FIUDBG_LOST_TRACE:
01433          sprintf (dstPtr, "%d Trace message(s) have been lost", msgData);
01434          break;
01435
01436       case TRC_FIU_TONE_DET_CTRL:
01437          sprintf (dstPtr, "Tone detector control called: %s",
01438                   ((msgData == 0) ? "disabled":"enabled"));
01439          break;
01440
01441       case TRC_FIU_TONE_DETECTED:
01442          sprintf (dstPtr, "Tone detected: %s",
01443                   ((msgData == 0) ? "CED":"CNG"));
01444          break;
01445
01446       case TRC_FIU_NBUFFER_POOL_SIZE:
01447          sprintf (dstPtr, "FIU buffer pool size: %d", msgData);
01448          break;
01449
01450       case TRC_FND_STARTUP:
01451          fiuDebugGetNetProtocol (msgData, fiuMsgString);
01452          sprintf (dstPtr, "FND successful startup: %s network protocol", fiuMsgString);
01453          break;
01454
01455       case TRC_FND_OUT_OF_SEQ_PKT:
01456          sprintf (dstPtr, "Out-of-sequence packet dropped");
01457          break;
01458
01459       case TRC_FND_NETRXQ_OVERFLOW:
01460          sprintf (dstPtr, "Network rx queue overflow");
01461          break;
01462
01463       case TRC_FND_JITBUF_OVERFLOW:
01464          sprintf (dstPtr, "Network jitter buffer overflow");
01465          break;
01466
01467       case TRC_FND_T2P_RX_LC_DET:
01468          fiuDebugGetT2PLineState (msgData, fiuMsgString);
01469          sprintf (dstPtr, "New line state detected from network: %s", fiuMsgString);
01470          break;
01471
01472       case TRC_FND_T2P_STATE_CHANGE:
01473          fiuDebugGetT2PDecoderState (msgData, fiuMsgString);
01474          sprintf (dstPtr, "FND T2 decoder state change: %s", fiuMsgString);
01475          break;
01476
01477       case TRC_FND_T2P_TX_PKT:
01478          fiuDebugGetFRP2FNDMsg (msgData, fiuMsgString);
01479          sprintf (dstPtr, "T2P packet transmitted to the network: %s", fiuMsgString);
01480          break;
01481
01482       case TRC_FND_T2P_TX_FIRST_DATA:
01483          sprintf (dstPtr, "Transmission of first data packet to the network");
01484          break;
01485
01486       case TRC_FND_HS_BUFFER_UNAVAIL:
01487          sprintf (dstPtr, "Memory allocation failure: number of failures = %d", msgData);
01488          break;
01489
01490       case TRC_FND_T2P_RX_FRAME_COMP:
01491          sprintf (dstPtr, "Frame complete was received from the network: %s CRC",
01492                   ((msgData == 0)? "good":"bad"));
01493          break;
01494
01495       case TRC_FND_FRF11_RX:
01496          fiuDebugGetFRF11PacketType (msgData, fiuMsgString);
01497          sprintf (dstPtr, "Received FRF.11 packet from network: %s", fiuMsgString);
01498          break;
01499
01500       case TRC_FND_FRF11_STATE_CHANGE:
01501          fiuDebugGetFRF11DecoderState (msgData, fiuMsgString);
01502          sprintf (dstPtr, "FND FRF.11 decoder state change: %s", fiuMsgString);
01503          break;
01504
01505       case TRC_FND_FRF11_TX_PKT:
01506          fiuDebugGetFRP2FNDMsg (msgData, fiuMsgString);
01507          sprintf (dstPtr, "Sent FRF.11 packet to network: msg ID = %s", fiuMsgString);
01508          break;
01509
01510       case TRC_FND_FRF11_INVALID_PKT:
01511          sprintf (dstPtr, "Received FRF.11 packet with invalid field");
01512          break;
01513
01514       case TRC_FND_AAL2_RX:
01515          fiuDebugGetAAL2PacketType (msgData, fiuMsgString);
01516          sprintf (dstPtr, "Received AAL2 packet from network: %s", fiuMsgString);
01517          break;
01518
01519       case TRC_FND_AAL2_STATE_CHANGE:
01520          fiuDebugGetAAL2DecoderState (msgData, fiuMsgString);
01521          sprintf (dstPtr, "FND AAL2 decoder state change: %s", fiuMsgString);
01522          break;
01523
01524       case TRC_FND_AAL2_TX_PKT:
01525          sprintf (dstPtr, "Sent AAL2 packet to network");
01526          break;
01527
01528       case TRC_FND_AAL2_INVALID_PKT:
01529          fiuDebugGetAAL2PacketType (msgData, fiuMsgString);
01530          sprintf (dstPtr, "Received invalid AAL2 packet from network: %s", fiuMsgString);
01531          break;
01532
01533       case TRC_FND_T38U_STATE_CHANGE:
01534          fiuDebugGetT38UDecoderState (msgData, fiuMsgString);
01535          sprintf (dstPtr, "FND T.38 decoder state change: %s", fiuMsgString);
01536          break;
01537
01538       case TRC_FND_T38U_RX_PT_DET:
01539          fiuDebugGetPT (msgData, fiuMsgString);
01540          sprintf (dstPtr, "Received T.38 packet with new payload type from network: %s", fiuMsgString);
01541          break;
01542
01543       case TRC_FND_T38U_TX_PKT:
01544          fiuDebugGetIFPHeader (msgData, fiuMsgString);
01545          sprintf (dstPtr, "Sent T.38 packet to network: %s", fiuMsgString);
01546          break;
01547
01548       case TRC_FRP_FND_MESSAGE:
01549          fiuDebugGetFRP2FNDMsg (msgData, fiuMsgString);
01550          sprintf (dstPtr, "FRP-to-FND message sent: %s", fiuMsgString);
01551          break;
01552
01553       case TRC_FND_FRP_MESSAGE:
01554          sprintf (dstPtr, "FND-to-FRP message sent: %d", msgData);
01555          break;
01556
01557       case TRC_FRP_STARTUP:
01558          sprintf (dstPtr, "FRP successful startup");
01559          break;
01560
01561       case TRC_FRP_RXOUTQ_OVERFLOW:
01562          sprintf (dstPtr, "An overflow condition in ReceiveOut queue (data was lost)");
01563          break;
01564
01565       case TRC_FRP_SENDINQ_OVERFLOW:
01566          sprintf (dstPtr, "An overflow condition in SendIn queue (data was lost)");
01567          break;
01568
01569       case TRC_FRP_NETEVT_IGNORE:
01570          fiuDebugGetNetEvent (msgData, fiuMsgString);
01571          sprintf (dstPtr, "Received ignored network event in current FRP state: %s", fiuMsgString);
01572          break;
01573
01574       case TRC_FRP_MDEVT_IGNORE:
01575          fiuDebugGetMDEvent (msgData, fiuMsgString);
01576          sprintf (dstPtr, "Received ignored modem event in current FRP state: %s", fiuMsgString);
01577          break;
01578
01579       case TRC_FRP_TMREVT_IGNORE:
01580          fiuDebugGetTimerEvent (msgData, fiuMsgString);
01581          sprintf (dstPtr, "Received ignored timer event in current FRP state: %s", fiuMsgString);
01582          break;
01583
01584       case TRC_FRP_TIMER_EXPIRE:
01585          fiuDebugGetTimerEvent (msgData, fiuMsgString);
01586          sprintf (dstPtr, "Expiration of protocol timer: %s", fiuMsgString);
01587          break;
01588
01589       case TRC_FRP_FIRST_HS_DATA:
01590          sprintf (dstPtr, "Received first high-speed data bytes by FRP from either modem or network");
01591          break;
01592
01593       case TRC_FRP_FIRST_LS_BYTE:
01594          sprintf (dstPtr, "Received first byte of a low-speed data frame: 0x%X", msgData);
01595          break;
01596
01597       case TRC_FRP_EXCEPTION:
01598          sprintf (dstPtr, "Software exception in FRP occured");
01599          break;
01600
01601       case TRC_FRP_SLP_PAGE_MODE:
01602          fiuDebugGetSLPPageMode (msgData, fiuMsgString);
01603          sprintf (dstPtr, "SLP page mode: %s", fiuMsgString);
01604          break;
01605
01606       case TRC_FRP_LOCAL_TONE_GEN:
01607          fiuDebugGetToneId (msgData, fiuMsgString);
01608          sprintf (dstPtr, "Start of local tone generation: %s", fiuMsgString);
01609          break;
01610
01611       case TRC_FRP_LOCAL_TONE_DET:
01612          fiuDebugGetToneId (msgData, fiuMsgString);
01613          sprintf (dstPtr, "Detected local tone: %s", fiuMsgString);
01614          break;
01615
01616       case TRC_FRP_REMOTE_TONE_DET:
01617          fiuDebugGetToneId (msgData, fiuMsgString);
01618          sprintf (dstPtr, "Detected tone from remote: %s", fiuMsgString);
01619          break;
01620
01621       case TRC_FRP_FINAL_FRAME_DET:
01622          sprintf (dstPtr, "Received the final frame of a low-speed transmission");
01623          break;
01624
01625       case TRC_FRP_ACTIVATE:
01626          fiuDebugGetFRPState (msgData, fiuMsgString);
01627          sprintf (dstPtr, "FRP has been activated in state: %s", fiuMsgString);
01628          break;
01629
01630       case TRC_FRP_V34_LOCAL_PRI_RATE:
01631          sprintf (dstPtr, "V.34 local primary channel data rate: %dbps", msgData);
01632          break;
01633
01634       case TRC_FRP_PP_NUM_FRAMES:
01635          sprintf (dstPtr, "Number of data frames in the partial page: %d", msgData);
01636          break;
01637 #endif /* FAX_DBG_LEVEL_1_ONLY_PARSER */
01638
01639       default:
01640          returnVal = FALSE;
01641          break;
01642    }
01643
01644    return (returnVal);
01645
01646 } /* fiuDebugTraceParser() */
01647
01648 /* nothing past this point */


FIU Test: fiusim.c File Reference

fiusim.c File Reference

#include <stdio.h>
#include <ti/mas/fiu/test/src/fiusim.h>
#include <ti/mas/util/ecomem.h>

Include dependency graph for fiusim.c:

Go to the source code of this file.

Defines

#define | DATA_SEGMENT_SIZE_BYTES 1
#define | FM_FP_LS_DIS_MSG_SIZE_BYTES 9
#define | FM_FP_LS_DIS_MSG_SIZE_WORDS ((FM_FP_LS_DIS_MSG_SIZE_BYTES + 1) >> 1)
#define | FM_FP_LS_DIS_NONECM_MSG_SIZE_BYTES 12
#define | FM_FP_LS_DIS_NONECM_MSG_SIZE_WORDS ((FM_FP_LS_DIS_NONECM_MSG_SIZE_BYTES + 1) >> 1)
#define | FM_FP_LS_DCS_MSG_SIZE_BYTES 9
#define | FM_FP_LS_DCS_MSG_SIZE_WORDS ((FM_FP_LS_DCS_MSG_SIZE_BYTES + 1) >> 1)
#define | FM_FP_LS_DCS_NONECM_MSG_SIZE_BYTES 12
#define | FM_FP_LS_DCS_NONECM_MSG_SIZE_WORDS ((FM_FP_LS_DCS_NONECM_MSG_SIZE_BYTES + 1) >> 1)
#define | FM_FP_LS_CFR_MSG_SIZE_BYTES 3
#define | FM_FP_LS_CFR_MSG_SIZE_WORDS ((FM_FP_LS_CFR_MSG_SIZE_BYTES + 1) >> 1)
#define | FM_FP_LS_PPS_EOP_MSG_SIZE_BYTES 7
#define | FM_FP_LS_PPS_EOP_MSG_SIZE_WORDS ((FM_FP_LS_PPS_EOP_MSG_SIZE_BYTES + 1) >> 1)
#define | FM_FP_LS_EOP_MSG_SIZE_BYTES 3
#define | FM_FP_LS_EOP_MSG_SIZE_WORDS ((FM_FP_LS_EOP_MSG_SIZE_BYTES + 1) >> 1)
#define | FM_FP_LS_MCF_MSG_SIZE_BYTES 3
#define | FM_FP_LS_MCF_MSG_SIZE_WORDS ((FM_FP_LS_MCF_MSG_SIZE_BYTES + 1) >> 1)
#define | FM_FP_LS_DCN_MSG_SIZE_BYTES 4
#define | FM_FP_LS_DCN_MSG_SIZE_WORDS ((FM_FP_LS_DCN_MSG_SIZE_BYTES + 1) >> 1)
#define | FM_FP_HS_DATA_MSG_SIZE_BYTES 8
#define | FM_FP_HS_DATA_MSG_SIZE_WORDS ((FM_FP_HS_DATA_MSG_SIZE_BYTES + 1) >> 1)
#define | RTP_SEQNUM_OFFSET 1

Functions

int | fiuDebugTraceParser (int msgId, int msgData, char *dstPtr)
tulong | siuGetTime (void)
tint | siuNetInterface (void *targetInst, xferpktInfo_t *pktInfo)
void | fiuSimCreateFmFpDataMsgs (iffaxFmFpMsg_t *fmMsg, tuint *inIndex, tword *dataAddress, tuint dataSize)
tint | siuG3FmInterface (void *targetInst, void *message)
void | siuFaxEventHandler (void *targetInst, tuint eventCode, tuint eventInfo)
void | siuDebugInfo (void *mId, tuint msgType, tuint msgCode, tuint msgLength, tuint *supportingData)
void | siuFatalError (tuint id, char *str)
void | siuCriticalSectionBegin (void)
void | siuCriticalSectionEnd (void)
void | siu_init (tint chnum)
void | siu_new_fiu (tint chnum)
void | siu_open_fiu (tint chnum)
void | siu_close_fiu (tint chnum)
void | siu_delete_fiu (tint chnum)
void | main (void)

Variables

fiuNetProtocol_e | faxNetProtocol = fiu_PT_T38_UDPTL
iffaxFmFpMsg_t | gw1FmMsg [SIU_FM_MESSAGE_ARRAY_SIZE]
iffaxFmFpMsg_t | gw2FmMsg [SIU_FM_MESSAGE_ARRAY_SIZE]
tuint | gw1FmFpMsgInIndex = 0
tuint | gw1FmFpMsgOutIndex = 0
tuint | gw2FmFpMsgInIndex = 0
tuint | gw2FmFpMsgOutIndex = 0
tuint | gw1DataIndex = 0
tuint | gw2DataIndex = 0
tuint | gw1ChNum = 1
tuint | gw2ChNum = 2
tuint | msgTimestamp = 0
tword | gw1RxData [100]
tint | gw1RxDataIndex = 0
tword | gw2RxData [100]
tint | gw2RxDataIndex = 0
tbool | fDISSent = FALSE
tbool | fG3FaxECM = FALSE
tword | FmFpLsDISMsg [FM_FP_LS_DIS_MSG_SIZE_BYTES] = {0xFF, 0xC8, 0x01, 0x00, 0x72, 0x5F, 0x21, 0x01, 0xD8}
tword | FmFpLsDISNonECMMsg [FM_FP_LS_DIS_NONECM_MSG_SIZE_BYTES] = {0xFF, 0xC8, 0x01, 0x00, 0x77, 0x41, 0x23, 0x01, 0xF9, 0x01, 0x01, 0x00}
tword | FmFpLsDCSMsg [FM_FP_LS_DCS_MSG_SIZE_BYTES] = {0xFF, 0xC8, 0xC1, 0x00, 0x70, 0x1F, 0x21, 0x01, 0x10}
tword | FmFpLsDCSNonECMMsg [FM_FP_LS_DCS_NONECM_MSG_SIZE_BYTES] = {0xFF, 0xC8, 0xC1, 0x00, 0x44, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00}
tword | FmFpLsCFRMsg [FM_FP_LS_CFR_MSG_SIZE_BYTES] = {0xFF, 0xC8, 0x21}
tword | FmFpLsPPS_EOPMsg [FM_FP_LS_PPS_EOP_MSG_SIZE_BYTES] = {0xFF, 0xC8, 0xFD, 0xF4, 0x00, 0x00, 0x64}
tword | FmFpLsEOPMsg [FM_FP_LS_PPS_EOP_MSG_SIZE_BYTES] = {0xFF, 0xC8, 0xF4}
tword | FmFpLsMCFMsg [FM_FP_LS_MCF_MSG_SIZE_BYTES] = {0xFF, 0xC8, 0x31}
tword | FmFpLsDCNMsg [FM_FP_LS_DCN_MSG_SIZE_BYTES] = {0xFF, 0xC8, 0x5F, 0x20}
tword | FmFpHsData [FM_FP_HS_DATA_MSG_SIZE_BYTES] = {0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF}
siuInst_t | siuInst [SIU_NUMBER_OF_CHANNELS]
tulong | systemTime = 0
tuint | prevTime = 0
tbool | fLoop = TRUE
tuint | gFrameSize = 10
tuint | numCleardownMsg = 0
fiuNetCallTbl_t * | faxNetCallTblPtr []
char | siuFatalString = 0
fiuStats_t | gw1FaxStats
fiuStats_t | gw2FaxStats
fiuContext_t | fiuContext
tuint | gw1RtpSeqNum = 0
tuint | gw2RtpSeqNum = 0

Define Documentation

#define DATA_SEGMENT_SIZE_BYTES 1

Definition at line 47 of file fiusim.c.

Referenced by fiuSimCreateFmFpDataMsgs(), and main().

#define FM_FP_LS_DIS_MSG_SIZE_BYTES 9

Definition at line 55 of file fiusim.c.

Referenced by siuG3FmInterface().

#define FM_FP_LS_DIS_MSG_SIZE_WORDS ((FM_FP_LS_DIS_MSG_SIZE_BYTES + 1) >> 1)

Definition at line 56 of file fiusim.c.

#define FM_FP_LS_DIS_NONECM_MSG_SIZE_BYTES 12

Definition at line 59 of file fiusim.c.

Referenced by siuG3FmInterface().

#define FM_FP_LS_DIS_NONECM_MSG_SIZE_WORDS ((FM_FP_LS_DIS_NONECM_MSG_SIZE_BYTES + 1) >> 1)

Definition at line 60 of file fiusim.c.

#define FM_FP_LS_DCS_MSG_SIZE_BYTES 9

Definition at line 63 of file fiusim.c.

Referenced by siuG3FmInterface().

#define FM_FP_LS_DCS_MSG_SIZE_WORDS ((FM_FP_LS_DCS_MSG_SIZE_BYTES + 1) >> 1)

Definition at line 64 of file fiusim.c.

#define FM_FP_LS_DCS_NONECM_MSG_SIZE_BYTES 12

Definition at line 67 of file fiusim.c.

Referenced by siuG3FmInterface().

#define FM_FP_LS_DCS_NONECM_MSG_SIZE_WORDS ((FM_FP_LS_DCS_NONECM_MSG_SIZE_BYTES + 1) >> 1)

Definition at line 68 of file fiusim.c.

#define FM_FP_LS_CFR_MSG_SIZE_BYTES 3

Definition at line 71 of file fiusim.c.

Referenced by siuG3FmInterface().

#define FM_FP_LS_CFR_MSG_SIZE_WORDS ((FM_FP_LS_CFR_MSG_SIZE_BYTES + 1) >> 1)

Definition at line 72 of file fiusim.c.

#define FM_FP_LS_PPS_EOP_MSG_SIZE_BYTES 7

Definition at line 75 of file fiusim.c.

Referenced by siuG3FmInterface().

#define FM_FP_LS_PPS_EOP_MSG_SIZE_WORDS ((FM_FP_LS_PPS_EOP_MSG_SIZE_BYTES + 1) >> 1)

Definition at line 76 of file fiusim.c.

#define FM_FP_LS_EOP_MSG_SIZE_BYTES 3

Definition at line 79 of file fiusim.c.

Referenced by siuG3FmInterface().

#define FM_FP_LS_EOP_MSG_SIZE_WORDS ((FM_FP_LS_EOP_MSG_SIZE_BYTES + 1) >> 1)

Definition at line 80 of file fiusim.c.

#define FM_FP_LS_MCF_MSG_SIZE_BYTES 3

Definition at line 83 of file fiusim.c.

Referenced by siuG3FmInterface().

#define FM_FP_LS_MCF_MSG_SIZE_WORDS ((FM_FP_LS_MCF_MSG_SIZE_BYTES + 1) >> 1)

Definition at line 84 of file fiusim.c.

#define FM_FP_LS_DCN_MSG_SIZE_BYTES 4

Definition at line 87 of file fiusim.c.

Referenced by siuG3FmInterface().

#define FM_FP_LS_DCN_MSG_SIZE_WORDS ((FM_FP_LS_DCN_MSG_SIZE_BYTES + 1) >> 1)

Definition at line 88 of file fiusim.c.

#define FM_FP_HS_DATA_MSG_SIZE_BYTES 8

Definition at line 91 of file fiusim.c.

Referenced by siuG3FmInterface().

#define FM_FP_HS_DATA_MSG_SIZE_WORDS ((FM_FP_HS_DATA_MSG_SIZE_BYTES + 1) >> 1)

Definition at line 92 of file fiusim.c.

#define RTP_SEQNUM_OFFSET 1

Definition at line 160 of file fiusim.c.

Referenced by siuNetInterface().

Function Documentation

int fiuDebugTraceParser | ( | int | msgId,
 |  | int | msgData,
 |  | char * | dstPtr
 | ) |  |

Definition at line 1308 of file fiuDebugTraceParser.c.

References fiuDebugGetAAL2DecoderState(), fiuDebugGetAAL2PacketType(), fiuDebugGetCleardownReason(), fiuDebugGetFCF(), fiuDebugGetFCF2(), fiuDebugGetFRF11DecoderState(), fiuDebugGetFRF11PacketType(), fiuDebugGetFRP2FNDMsg(), fiuDebugGetFRPState(), fiuDebugGetIFPHeader(), fiuDebugGetMDEvent(), fiuDebugGetNetEvent(), fiuDebugGetNetProtocol(), fiuDebugGetPT(), fiuDebugGetSLPPageMode(), fiuDebugGetSwitchoverReason(), fiuDebugGetT2PDecoderState(), fiuDebugGetT2PLineState(), fiuDebugGetT38UDecoderState(), fiuDebugGetT38UException(), fiuDebugGetTimerEvent(), fiuDebugGetToneId(), and fiuMsgString.

Referenced by siuDebugInfo().

Here is the call graph for this function:

tulong siuGetTime ( void )

Definition at line 180 of file fiusim.c.

References systemTime.

tint siuNetInterface | ( | void * | targetInst,
 |  | xferpktInfo_t * | pktInfo
 | ) |  |

Definition at line 210 of file fiusim.c.

References faxNetProtocol, gw1ChNum, gw1RtpSeqNum, gw2ChNum, gw2RtpSeqNum, RTP_SEQNUM_OFFSET, SIU_WORD_TO_MAU, and siuInst.

Referenced by siu_open_fiu().

void fiuSimCreateFmFpDataMsgs | ( | iffaxFmFpMsg_t * | fmMsg,
 |  | tuint * | inIndex,
 |  | tword * | dataAddress,
 |  | tuint | dataSize
 | ) |  |

Definition at line 494 of file fiusim.c.

References DATA_SEGMENT_SIZE_BYTES, and msgTimestamp.

Referenced by siuG3FmInterface().

tint siuG3FmInterface | ( | void * | targetInst,
 |  | void * | message
 | ) |  |

Definition at line 534 of file fiusim.c.

References fDISSent, fG3FaxECM, fiuSimCreateFmFpDataMsgs(), FM_FP_HS_DATA_MSG_SIZE_BYTES, FM_FP_LS_CFR_MSG_SIZE_BYTES, FM_FP_LS_DCN_MSG_SIZE_BYTES, FM_FP_LS_DCS_MSG_SIZE_BYTES, FM_FP_LS_DCS_NONECM_MSG_SIZE_BYTES, FM_FP_LS_DIS_MSG_SIZE_BYTES, FM_FP_LS_DIS_NONECM_MSG_SIZE_BYTES, FM_FP_LS_EOP_MSG_SIZE_BYTES, FM_FP_LS_MCF_MSG_SIZE_BYTES, FM_FP_LS_PPS_EOP_MSG_SIZE_BYTES, FmFpHsData, FmFpLsCFRMsg, FmFpLsDCNMsg, FmFpLsDCSMsg, FmFpLsDCSNonECMMsg, FmFpLsDISMsg, FmFpLsDISNonECMMsg, FmFpLsEOPMsg, FmFpLsMCFMsg, FmFpLsPPS_EOPMsg, gw1ChNum, gw1DataIndex, gw1FmFpMsgInIndex, gw1FmMsg, gw1RxData, gw1RxDataIndex, gw2DataIndex, gw2FmFpMsgInIndex, gw2FmMsg, gw2RxData, gw2RxDataIndex, msgTimestamp, siuInst, and systemTime.

Referenced by siu_open_fiu().

Here is the call graph for this function:

void siuFaxEventHandler | ( | void * | targetInst,
 |  | tuint | eventCode,
 |  | tuint | eventInfo
 | ) |  |

Definition at line 835 of file fiusim.c.

References fLoop, and numCleardownMsg.

Referenced by siu_open_fiu().

void siuDebugInfo | ( | void * | mId,
 |  | tuint | msgType,
 |  | tuint | msgCode,
 |  | tuint | msgLength,
 |  | tuint * | supportingData
 | ) |  |

Definition at line 866 of file fiusim.c.

References fiuDebugTraceParser(), prevTime, SIU_EXCEPTION_FIU_DBG_DEFAULT, SIU_EXCEPTION_FIU_DBG_FATAL_ERROR, and siuFatalError().

Here is the call graph for this function:

void siuFatalError | ( | tuint | id,
 |  | char * | str
 | ) |  |

Definition at line 940 of file fiusim.c.

References siuFatalString.

Referenced by siu_new_fiu(), siu_open_fiu(), and siuDebugInfo().

void siuCriticalSectionBegin ( void )

Definition at line 963 of file fiusim.c.

void siuCriticalSectionEnd ( void )

Definition at line 980 of file fiusim.c.

void siu_init ( tint chnum )

Definition at line 1000 of file fiusim.c.

References siuInst_s::aux_heap_size, siuInst_s::fiu_heap_size, siuInst_s::fiuBufs, siuInst_s::fiuInst, siuInst_s::fiuNbufs, and siuInst.

Referenced by main().

void siu_new_fiu ( tint chnum )

Definition at line 1025 of file fiusim.c.

References siuInst_s::aux_heap_size, siuInst_s::fiu_heap_size, siuInst_s::fiuBufs, siuInst_s::fiuInst, siuInst_s::fiuNbufs, SIU_EXCEPTION_FIU_NEW_ERR, SIU_EXCEPTION_FIU_SIZES_ERR, SIU_FIU_ID, siuFatalError(), and siuInst.

Referenced by main().

Here is the call graph for this function:

void siu_open_fiu ( tint chnum )

Definition at line 1097 of file fiusim.c.

References faxNetCallTblPtr, faxNetProtocol, siuInst_s::fiuInst, gFrameSize, SIU_EXCEPTION_FIU_OPEN_ERR, SIU_FIU_ID, siuFatalError(), siuFaxEventHandler(), siuG3FmInterface(), siuInst, and siuNetInterface().

Referenced by main().

Here is the call graph for this function:

void siu_close_fiu ( tint chnum )

Definition at line 1173 of file fiusim.c.

References siuInst_s::fiuInst, and siuInst.

Referenced by main().

void siu_delete_fiu ( tint chnum )

Definition at line 1193 of file fiusim.c.

References siuInst_s::aux_heap_size, siuInst_s::fiu_heap_size, siuInst_s::fiuBufs, siuInst_s::fiuInst, siuInst_s::fiuNbufs, and siuInst.

Referenced by main().

void main ( void )

Definition at line 1230 of file fiusim.c.

References DATA_SEGMENT_SIZE_BYTES, fLoop, gFrameSize, gw1ChNum, gw1FaxStats, gw1FmFpMsgInIndex, gw1FmFpMsgOutIndex, gw1FmMsg, gw1RxData, gw2ChNum, gw2FaxStats, gw2FmFpMsgInIndex, gw2FmFpMsgOutIndex, gw2FmMsg, gw2RxData, siu_close_fiu(), siu_delete_fiu(), siu_init(), siu_new_fiu(), siu_open_fiu(), siuInst, and systemTime.

Here is the call graph for this function:

Variable Documentation

fiuNetProtocol_e faxNetProtocol = fiu_PT_T38_UDPTL

Definition at line 18 of file fiusim.c.

Referenced by siu_open_fiu(), and siuNetInterface().

iffaxFmFpMsg_t gw1FmMsg[SIU_FM_MESSAGE_ARRAY_SIZE]

Definition at line 29 of file fiusim.c.

Referenced by main(), and siuG3FmInterface().

iffaxFmFpMsg_t gw2FmMsg[SIU_FM_MESSAGE_ARRAY_SIZE]

Definition at line 30 of file fiusim.c.

Referenced by main(), and siuG3FmInterface().

tuint gw1FmFpMsgInIndex = 0

Definition at line 31 of file fiusim.c.

Referenced by main(), and siuG3FmInterface().

tuint gw1FmFpMsgOutIndex = 0

Definition at line 32 of file fiusim.c.

Referenced by main().

tuint gw2FmFpMsgInIndex = 0

Definition at line 33 of file fiusim.c.

Referenced by main(), and siuG3FmInterface().

tuint gw2FmFpMsgOutIndex = 0

Definition at line 34 of file fiusim.c.

Referenced by main().

tuint gw1DataIndex = 0

Definition at line 35 of file fiusim.c.

Referenced by siuG3FmInterface().

tuint gw2DataIndex = 0

Definition at line 36 of file fiusim.c.

Referenced by siuG3FmInterface().

tuint gw1ChNum = 1

Definition at line 37 of file fiusim.c.

Referenced by main(), siuG3FmInterface(), and siuNetInterface().

tuint gw2ChNum = 2

Definition at line 38 of file fiusim.c.

Referenced by main(), and siuNetInterface().

tuint msgTimestamp = 0

Definition at line 39 of file fiusim.c.

Referenced by fiuSimCreateFmFpDataMsgs(), and siuG3FmInterface().

tword gw1RxData[100]

Definition at line 41 of file fiusim.c.

Referenced by main(), and siuG3FmInterface().

tint gw1RxDataIndex = 0

Definition at line 42 of file fiusim.c.

Referenced by siuG3FmInterface().

tword gw2RxData[100]

Definition at line 43 of file fiusim.c.

Referenced by main(), and siuG3FmInterface().

tint gw2RxDataIndex = 0

Definition at line 44 of file fiusim.c.

Referenced by siuG3FmInterface().

tbool fDISSent = FALSE

Definition at line 46 of file fiusim.c.

Referenced by siuG3FmInterface().

tbool fG3FaxECM = FALSE

Definition at line 51 of file fiusim.c.

Referenced by siuG3FmInterface().

tword FmFpLsDISMsg[FM_FP_LS_DIS_MSG_SIZE_BYTES] = {0xFF, 0xC8, 0x01, 0x00, 0x72, 0x5F, 0x21, 0x01, 0xD8}

Definition at line 57 of file fiusim.c.

Referenced by siuG3FmInterface().

tword FmFpLsDISNonECMMsg[FM_FP_LS_DIS_NONECM_MSG_SIZE_BYTES] = {0xFF, 0xC8, 0x01, 0x00, 0x77, 0x41, 0x23, 0x01, 0xF9, 0x01, 0x01, 0x00}

Definition at line 61 of file fiusim.c.

Referenced by siuG3FmInterface().

tword FmFpLsDCSMsg[FM_FP_LS_DCS_MSG_SIZE_BYTES] = {0xFF, 0xC8, 0xC1, 0x00, 0x70, 0x1F, 0x21, 0x01, 0x10}

Definition at line 65 of file fiusim.c.

Referenced by siuG3FmInterface().

tword FmFpLsDCSNonECMMsg[FM_FP_LS_DCS_NONECM_MSG_SIZE_BYTES] = {0xFF, 0xC8, 0xC1, 0x00, 0x44, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00}

Definition at line 69 of file fiusim.c.

Referenced by siuG3FmInterface().

tword FmFpLsCFRMsg[FM_FP_LS_CFR_MSG_SIZE_BYTES] = {0xFF, 0xC8, 0x21}

Definition at line 73 of file fiusim.c.

Referenced by siuG3FmInterface().

tword FmFpLsPPS_EOPMsg[FM_FP_LS_PPS_EOP_MSG_SIZE_BYTES] = {0xFF, 0xC8, 0xFD, 0xF4, 0x00, 0x00, 0x64}

Definition at line 77 of file fiusim.c.

Referenced by siuG3FmInterface().

tword FmFpLsEOPMsg[FM_FP_LS_PPS_EOP_MSG_SIZE_BYTES] = {0xFF, 0xC8, 0xF4}

Definition at line 81 of file fiusim.c.

Referenced by siuG3FmInterface().

tword FmFpLsMCFMsg[FM_FP_LS_MCF_MSG_SIZE_BYTES] = {0xFF, 0xC8, 0x31}

Definition at line 85 of file fiusim.c.

Referenced by siuG3FmInterface().

tword FmFpLsDCNMsg[FM_FP_LS_DCN_MSG_SIZE_BYTES] = {0xFF, 0xC8, 0x5F, 0x20}

Definition at line 89 of file fiusim.c.

Referenced by siuG3FmInterface().

tword FmFpHsData[FM_FP_HS_DATA_MSG_SIZE_BYTES] = {0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF}

Definition at line 93 of file fiusim.c.

Referenced by siuG3FmInterface().

siuInst_t siuInst[SIU_NUMBER_OF_CHANNELS]

Definition at line 100 of file fiusim.c.

Referenced by main(), siu_close_fiu(), siu_delete_fiu(), siu_init(), siu_new_fiu(), siu_open_fiu(), siuG3FmInterface(), and siuNetInterface().

tulong systemTime = 0

Definition at line 103 of file fiusim.c.

Referenced by main(), siuG3FmInterface(), and siuGetTime().

tuint prevTime = 0

Definition at line 104 of file fiusim.c.

Referenced by siuDebugInfo().

tbool fLoop = TRUE

Definition at line 113 of file fiusim.c.

Referenced by main(), and siuFaxEventHandler().

tuint gFrameSize = 10

Definition at line 119 of file fiusim.c.

Referenced by main(), and siu_open_fiu().

tuint numCleardownMsg = 0

Definition at line 123 of file fiusim.c.

Referenced by siuFaxEventHandler().

fiuNetCallTbl_t* faxNetCallTblPtr[]

Initial value:

{
   &faxNetProtocolT38,
   &faxNetProtocolAal2,
   &faxNetProtocolT3,

}

Definition at line 130 of file fiusim.c.

Referenced by siu_open_fiu().

char siuFatalString = 0

Definition at line 141 of file fiusim.c.

Referenced by siuFatalError().

fiuStats_t gw1FaxStats

Definition at line 144 of file fiusim.c.

Referenced by main().

fiuStats_t gw2FaxStats

Definition at line 145 of file fiusim.c.

Referenced by main().

fiuContext_t fiuContext

Initial value:

 {
   NULL,
   NULL,
   0,
   siuGetTime,
   siuDebugInfo,
   siuCriticalSectionBegin,
   siuCriticalSectionEnd
}

Definition at line 147 of file fiusim.c.

tuint gw1RtpSeqNum = 0

Definition at line 158 of file fiusim.c.

Referenced by siuNetInterface().

tuint gw2RtpSeqNum = 0

Definition at line 159 of file fiusim.c.

Referenced by siuNetInterface().


FIU Test: fiusim.c Source File

fiusim.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: Main routine for simulating fax relay processing
00003  ******************************************************************************
00004  * FILE NAME: fiusim.c
00005  *
00006  * DESCRIPTION: This source file contains functions, variables, and processing code
00007  *              designed to provide a simulation of the fax relay software (FIU).
00008  *
00009  * (C) Copyright 2003 TELOGY Networks, Inc.
00010  *****************************************************************************/
00011 #include <stdio.h>
00012 #include <ti/mas/fiu/test/src/fiusim.h>
00013 #include <ti/mas/util/ecomem.h>
00014
00015 //#define V34_FAX_SIMULATION
00016
00017 /* Network protocol */
00018 fiuNetProtocol_e faxNetProtocol = fiu_PT_T38_UDPTL;     /* T.38 UDPTL protocol */
00019 //fiuNetProtocol_e faxNetProtocol = fiu_PT_T38_RTP;       /* T.38 RTP protocol */
00020 //fiuNetProtocol_e faxNetProtocol = fiu_PT_T38_UDPTL_RTP; /* T.38 UDPTL RTP protocol */
00021 //fiuNetProtocol_e faxNetProtocol = fiu_PT_AAL2;          /* AAL2 protocol */
00022 //fiuNetProtocol_e faxNetProtocol = fiu_PT_T2;            /* Telogy-2 protocol */
00023 //fiuNetProtocol_e faxNetProtocol = fiu_PT_T3;            /* Telogy-3 protocol */
00024 //fiuNetProtocol_e faxNetProtocol = fiu_PT_RTP;           /* RTP protocol */
00025 //fiuNetProtocol_e faxNetProtocol = fiu_PT_RTPB;          /* RTP version B protocol */
00026 //fiuNetProtocol_e faxNetProtocol = fiu_PT_FRF11;         /* FRF.11 fax relay protocol */
00027
00028 /* Global FM_FP message array */
00029 iffaxFmFpMsg_t gw1FmMsg[SIU_FM_MESSAGE_ARRAY_SIZE];
00030 iffaxFmFpMsg_t gw2FmMsg[SIU_FM_MESSAGE_ARRAY_SIZE];
00031 tuint     gw1FmFpMsgInIndex = 0;
00032 tuint     gw1FmFpMsgOutIndex = 0;
00033 tuint     gw2FmFpMsgInIndex = 0;
00034 tuint     gw2FmFpMsgOutIndex = 0;
00035 tuint     gw1DataIndex = 0;
00036 tuint     gw2DataIndex = 0;
00037 tuint     gw1ChNum = 1;
00038 tuint     gw2ChNum = 2;
00039 tuint     msgTimestamp = 0;
00040
00041 tword gw1RxData[100];
00042 tint gw1RxDataIndex = 0;
00043 tword gw2RxData[100];
00044 tint gw2RxDataIndex = 0;
00045
00046 tbool fDISSent = FALSE;
00047 #define DATA_SEGMENT_SIZE_BYTES 1
00048
00049 /* Flag for enabling ECM */
00050 /* Note: This simulation does not support ECM mode in AAL2 */
00051 tbool fG3FaxECM = FALSE;
00052
00053 /* Global FM_FP data messages with associated variables
00054    for both control channel and primary channel data */
00055 #define FM_FP_LS_DIS_MSG_SIZE_BYTES 9
00056 #define FM_FP_LS_DIS_MSG_SIZE_WORDS ((FM_FP_LS_DIS_MSG_SIZE_BYTES + 1) >> 1)
00057 tword   FmFpLsDISMsg[FM_FP_LS_DIS_MSG_SIZE_BYTES] = {0xFF, 0xC8, 0x01, 0x00, 0x72, 0x5F, 0x21, 0x01, 0xD8};
00058
00059 #define FM_FP_LS_DIS_NONECM_MSG_SIZE_BYTES 12
00060 #define FM_FP_LS_DIS_NONECM_MSG_SIZE_WORDS ((FM_FP_LS_DIS_NONECM_MSG_SIZE_BYTES + 1) >> 1)
00061 tword   FmFpLsDISNonECMMsg[FM_FP_LS_DIS_NONECM_MSG_SIZE_BYTES] = {0xFF, 0xC8, 0x01, 0x00, 0x77, 0x41, 0x23, 0x01, 0xF9, 0x01, 0x01, 0x00};
00062
00063 #define FM_FP_LS_DCS_MSG_SIZE_BYTES 9
00064 #define FM_FP_LS_DCS_MSG_SIZE_WORDS ((FM_FP_LS_DCS_MSG_SIZE_BYTES + 1) >> 1)
00065 tword   FmFpLsDCSMsg[FM_FP_LS_DCS_MSG_SIZE_BYTES] = {0xFF, 0xC8, 0xC1, 0x00, 0x70, 0x1F, 0x21, 0x01, 0x10};
00066
00067 #define FM_FP_LS_DCS_NONECM_MSG_SIZE_BYTES 12
00068 #define FM_FP_LS_DCS_NONECM_MSG_SIZE_WORDS ((FM_FP_LS_DCS_NONECM_MSG_SIZE_BYTES + 1) >> 1)
00069 tword   FmFpLsDCSNonECMMsg[FM_FP_LS_DCS_NONECM_MSG_SIZE_BYTES] = {0xFF, 0xC8, 0xC1, 0x00, 0x44, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00};
00070
00071 #define FM_FP_LS_CFR_MSG_SIZE_BYTES 3
00072 #define FM_FP_LS_CFR_MSG_SIZE_WORDS ((FM_FP_LS_CFR_MSG_SIZE_BYTES + 1) >> 1)
00073 tword   FmFpLsCFRMsg[FM_FP_LS_CFR_MSG_SIZE_BYTES] = {0xFF, 0xC8, 0x21};
00074
00075 #define FM_FP_LS_PPS_EOP_MSG_SIZE_BYTES 7
00076 #define FM_FP_LS_PPS_EOP_MSG_SIZE_WORDS ((FM_FP_LS_PPS_EOP_MSG_SIZE_BYTES + 1) >> 1)
00077 tword   FmFpLsPPS_EOPMsg[FM_FP_LS_PPS_EOP_MSG_SIZE_BYTES] = {0xFF, 0xC8, 0xFD, 0xF4, 0x00, 0x00, 0x64};
00078
00079 #define FM_FP_LS_EOP_MSG_SIZE_BYTES 3
00080 #define FM_FP_LS_EOP_MSG_SIZE_WORDS ((FM_FP_LS_EOP_MSG_SIZE_BYTES + 1) >> 1)
00081 tword   FmFpLsEOPMsg[FM_FP_LS_PPS_EOP_MSG_SIZE_BYTES] = {0xFF, 0xC8, 0xF4};
00082
00083 #define FM_FP_LS_MCF_MSG_SIZE_BYTES 3
00084 #define FM_FP_LS_MCF_MSG_SIZE_WORDS ((FM_FP_LS_MCF_MSG_SIZE_BYTES + 1) >> 1)
00085 tword   FmFpLsMCFMsg[FM_FP_LS_MCF_MSG_SIZE_BYTES] = {0xFF, 0xC8, 0x31};
00086
00087 #define FM_FP_LS_DCN_MSG_SIZE_BYTES 4
00088 #define FM_FP_LS_DCN_MSG_SIZE_WORDS ((FM_FP_LS_DCN_MSG_SIZE_BYTES + 1) >> 1)
00089 tword   FmFpLsDCNMsg[FM_FP_LS_DCN_MSG_SIZE_BYTES] = {0xFF, 0xC8, 0x5F, 0x20};
00090
00091 #define FM_FP_HS_DATA_MSG_SIZE_BYTES 8
00092 #define FM_FP_HS_DATA_MSG_SIZE_WORDS ((FM_FP_HS_DATA_MSG_SIZE_BYTES + 1) >> 1)
00093 tword   FmFpHsData[FM_FP_HS_DATA_MSG_SIZE_BYTES] = {0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF};
00094
00095 /******************************************************************************
00096  * GLOBAL VARIABLE DEFINITIONS
00097  *****************************************************************************/
00098
00099 /* Global SIU channel instance */
00100 siuInst_t siuInst[SIU_NUMBER_OF_CHANNELS];
00101
00102 /* Global system timer variable in ms */
00103 tulong systemTime = 0;
00104 tuint prevTime = 0;
00105
00106 #ifdef SIM_MEM_HEAP
00107 #define SIU_MEM_HEAP_SIZE 0x2000
00108 tuint siuMemHeap[SIU_MEM_HEAP_SIZE];
00109 void *siuMemHeapHandle;
00110 #endif
00111
00112 /* Global boolean used to break out of main() processing loop */
00113 tbool fLoop = TRUE;
00114
00115 /* Global frame size variable in ms */
00116 #ifdef V34_FAX_SIMULATION
00117 tuint gFrameSize = 6;
00118 #else
00119 tuint gFrameSize = 10;
00120 #endif
00121
00122 /* Global counter of cleardown messages */
00123 tuint numCleardownMsg = 0;
00124
00125 /* Global fax network protocol call table - only one protocol at a time
00126    is supported.  Un-comment out the protocol of your choice.  All calls
00127    to the fiuNetCallTbl_t functions (faxNetInit, faxNetDecoder,
00128    faxNetDecoderTask, faxNetEncoder & faxNetEncoderTask) are directed
00129    to NULL (i.e. not processed). */
00130 fiuNetCallTbl_t *faxNetCallTblPtr[] =
00131 {
00132    &faxNetProtocolT38,
00133    &faxNetProtocolAal2,
00134    &faxNetProtocolT3,
00135 #ifdef FRF11
00136    &faxNetProtocolFrf11
00137 #endif
00138 };
00139
00140 /* Global char signifying entity calling siuFatalError() function */
00141 char siuFatalString = 0;
00142
00143 /* Global network and fax call statistics structures */
00144 fiuStats_t gw1FaxStats;
00145 fiuStats_t gw2FaxStats;
00146
00147 fiuContext_t fiuContext = {
00148    NULL,                    /* Global allocBuffer function - external buffering not implemented */
00149    NULL,                    /* Global freeBuffer function  - external buffering not implemented */
00150    0,                       /* SupportedExternalBuffSize - external buffering not implemented */
00151    siuGetTime,              /* Timer function pointer */
00152    siuDebugInfo,            /* Debug function pointer */
00153    siuCriticalSectionBegin, /* Critical section Begin macro */
00154    siuCriticalSectionEnd    /* Critical section End macro */
00155 };
00156
00157 /* RTP sequence number */
00158 tuint gw1RtpSeqNum = 0;
00159 tuint gw2RtpSeqNum = 0;
00160 #define RTP_SEQNUM_OFFSET 1
00161
00162 extern int fiuDebugTraceParser (int msgId, int msgData, char *dstPtr);
00163
00164 /******************************************************************************
00165  * GLOBAL FUNCTION DEFINITIONS
00166  *****************************************************************************/
00167
00168 /******************************************************************************
00169  * FUNCTION PURPOSE: Gets SIU system time in milliseconds.
00170  ******************************************************************************
00171  * DESCRIPTION: Returns current value of system time (in milliseconds).
00172  *
00173  * CALLING FORMAT:
00174  *   siuGetTime ()
00175  *
00176  * RETURN VALUES:
00177  *   systemTime        - 32-bit indication of system time (in ms)
00178  *
00179  *****************************************************************************/
00180 tulong siuGetTime (void)
00181 {
00182    return (systemTime);
00183
00184 } /* siuGetTime() */
00185
00186 /******************************************************************************
00187  * FUNCTION PURPOSE: Implements fiuSendOut() API function, which sends network
00188  *                   packets to the network interface.
00189  ******************************************************************************
00190  * DESCRIPTION: Routine called by FIU to send packet(s) toward the network.
00191  *              FIU sends packets out (in the SendOut direction) to whatever
00192  *              packet processing module is tied to fiuSendOut - in this case
00193  *              siuNetInterface, which accepts packets but does no processing.
00194  *              Return value signifies that there was not an error.
00195  *
00196  * CALLING FORMAT:
00197  *   siuNetInterface (void          *targetInst, - ptr to packet processing module
00198  *                    xferpktInfo_t *pktInfo)    - packet descriptor structure
00199
00200
00201
00202
00203  *
00204  * RETURN VALUES:
00205  *                    0                    - Pkt(s) successfully processed
00206  *                                           by network
00207  *                    1                    - network busy; pkt not processed
00208  *
00209  *****************************************************************************/
00210 tint siuNetInterface (void *targetInst, xferpktInfo_t *pktInfo)
00211 {
00212    siuInst_t *inst = (siuInst_t *)targetInst;
00213
00214    if (faxNetProtocol == fiu_PT_AAL2)
00215    {
00216       tuint cid;
00217       tuint uui;
00218       tuint li;
00219       ifpktSendPktHeader_t *txAcuHdr = (ifpktSendPktHeader_t *)pktInfo->pktIn[0];
00220       ifpktReceivePktHeader_t *rxAcuHdr = (ifpktReceivePktHeader_t *)pktInfo->pktIn[0];
00221
00222       cid = txAcuHdr->proto.aal2.cid;
00223       uui = txAcuHdr->proto.aal2.uui;
00224       li  = txAcuHdr->proto.aal2.li;
00225
00226       rxAcuHdr->common.rxLastTime = 0;
00227       rxAcuHdr->proto.aal2.cid = cid;
00228       rxAcuHdr->proto.aal2.uui = uui;
00229       rxAcuHdr->proto.aal2.li  = li;
00230    }
00231
00232    if (inst == &siuInst[gw1ChNum - 1])
00233    {
00234       if (faxNetProtocol == fiu_PT_T38_RTP)
00235       {
00236          tword *rtpPkt = pktInfo->pktIn[1];
00237
00238          /* Fill in the sequence number of the RTP header */
00239          pktWrite16bits(&rtpPkt[SIU_WORD_TO_MAU(RTP_SEQNUM_OFFSET)], 0, gw1RtpSeqNum);
00240
00241          /* Update the RTP sequence number */
00242          gw1RtpSeqNum++;
00243       }
00244
00245       fiuReceiveIn (siuInst[gw2ChNum - 1].fiuInst, pktInfo);
00246    }
00247    else
00248    {
00249       if (faxNetProtocol == fiu_PT_T38_RTP)
00250       {
00251          tword *rtpPkt = pktInfo->pktIn[1];
00252
00253          /* Fill in the sequence number of the RTP header */
00254          pktWrite16bits(&rtpPkt[SIU_WORD_TO_MAU(RTP_SEQNUM_OFFSET)], 0, gw2RtpSeqNum);
00255
00256          /* Update the RTP sequence number */
00257          gw2RtpSeqNum++;
00258       }
00259
00260       fiuReceiveIn (siuInst[gw1ChNum - 1].fiuInst, pktInfo);
00261    }
00262
00263    return (0);
00264
00265 } /* siuNetInterface() */
00266
00267 /******************************************************************************
00268  * FUNCTION PURPOSE: Implements fiuReceiveOut() API function which sends a
00269  *                   messsage to FM.
00270  ******************************************************************************
00271  * DESCRIPTION: Routine called by FIU to send a message of type iffaxFpFmMsg_t to
00272  *              FM. No actual message processing is done.  The function always
00273  *              successfully.
00274  *
00275  * CALLING FORMAT:
00276  *   siuV34FmInterface (void *targetInst,  - ptr to FM processing module
00277  *                      void *message)     - ptr to message for FM
00278  *
00279  * RETURN: tint
00280  *              iffax_FM_CMD_ACCEPTED (0)     if the message is copied into message FIFO
00281  *              iffax_FM_CMD_NOT_ACCEPTED (1) if the message is not copied into the
00282  *                                            message FIFO because the FIFO is full
00283  *              iffax_FM_CMD_ERROR (-1)       if message is not copied because FM
00284  *                                            is closed or invalid message ID
00285  ***************************************************************************/
00286 #ifdef V34_FAX_SIMULATION
00287 tint siuV34FmInterface (void *targetInst, void *message)
00288 {
00289    siuInst_t *inst = (siuInst_t *) targetInst;
00290    iffaxFpFmMsg_t *fiuMsg = (iffaxFpFmMsg_t *)message;
00291    tint i, numBytes;
00292    tword *src;
00293
00294    if (inst == &siuInst[gw1ChNum - 1])
00295    {
00296       switch (fiuMsg->MsgId)
00297       {
00298          case iffax_FP_FM_V34_ESTABLISH_LINK:
00299             break;
00300
00301          case iffax_FP_FM_SEND_ANSAM:
00302             gw1FmMsg[gw1FmFpMsgInIndex].MsgId = iffax_FM_FP_V8_CM_RECEIVED;
00303             gw1FmMsg[gw1FmFpMsgInIndex].MsgBody.V8Data.callFunction = 4;
00304             gw1FmMsg[gw1FmFpMsgInIndex].MsgBody.V8Data.modMode = 0x0004;
00305             gw1FmFpMsgInIndex++;
00306             break;
00307
00308          case iffax_FP_FM_SEND_JM:
00309             gw1FmMsg[gw1FmFpMsgInIndex].MsgId = iffax_FM_FP_V34_PRI_RATE_KNOWN;
00310             gw1FmMsg[gw1FmFpMsgInIndex].MsgBody.V34Info.priRate = 33600;
00311             gw1FmFpMsgInIndex++;
00312
00313             gw1FmMsg[gw1FmFpMsgInIndex].MsgId = iffax_FM_FP_V34_E_DETECTED;
00314             gw1FmFpMsgInIndex++;
00315             break;
00316
00317          case iffax_FP_FM_V34_DATA:
00318             numBytes = fiuMsg->MsgBody.V34Data.numBytes;
00319             src = fiuMsg->MsgBody.V34Data.DataAddr;
00320
00321             for (i = 0; i < (utlNbytes2NtwordsCeil(numBytes)); i++)
00322                gw1RxData[gw1RxDataIndex++] = src[i];
00323
00324             switch (gw1DataIndex)
00325             {
00326                case 0:
00327                   gw1FmMsg[gw1FmFpMsgInIndex].MsgId = iffax_FM_FP_DATA;
00328                   gw1FmMsg[gw1FmFpMsgInIndex].MsgBody.DataPayload.numBytes = FM_FP_LS_DCS_MSG_SIZE_BYTES;
00329                   gw1FmMsg[gw1FmFpMsgInIndex].MsgBody.DataPayload.DataAddress = &FmFpLsDCSMsg[0];
00330                   gw1FmFpMsgInIndex++;
00331
00332                   gw1FmMsg[gw1FmFpMsgInIndex].MsgId = iffax_FM_FP_FRAME_COMP;
00333                   gw1FmMsg[gw1FmFpMsgInIndex].MsgBody.FrameComp.FrameFcs = iffax_FCS_GOOD;
00334                   gw1FmFpMsgInIndex++;
00335
00336                   gw1DataIndex++;
00337                   break;
00338
00339                case 1:
00340                   gw1FmMsg[gw1FmFpMsgInIndex].MsgId = iffax_FM_FP_40_ONES_DETECTED;
00341                   gw1FmFpMsgInIndex++;
00342
00343                   gw1DataIndex++;
00344                   break;
00345
00346                case 2:
00347                   gw1FmMsg[gw1FmFpMsgInIndex].MsgId = iffax_FM_FP_DATA;
00348                   gw1FmMsg[gw1FmFpMsgInIndex].MsgBody.DataPayload.numBytes = FM_FP_LS_DCN_MSG_SIZE_BYTES;
00349                   gw1FmMsg[gw1FmFpMsgInIndex].MsgBody.DataPayload.DataAddress = &FmFpLsDCNMsg[0];
00350                   gw1FmFpMsgInIndex++;
00351
00352                   gw1FmMsg[gw1FmFpMsgInIndex].MsgId = iffax_FM_FP_FRAME_COMP;
00353                   gw1FmMsg[gw1FmFpMsgInIndex].MsgBody.FrameComp.FrameFcs = iffax_FCS_GOOD;
00354                   gw1FmFpMsgInIndex++;
00355
00356                   gw1FmMsg[gw1FmFpMsgInIndex].MsgId = iffax_FM_FP_40_ONES_DETECTED;
00357                   gw1FmFpMsgInIndex++;
00358
00359                   gw1DataIndex++;
00360                   break;
00361             }
00362             break;
00363
00364          case iffax_FP_FM_SWITCH_TO_PRI_CH:
00365             gw1FmMsg[gw1FmFpMsgInIndex].MsgId = iffax_FM_FP_DATA;
00366             gw1FmMsg[gw1FmFpMsgInIndex].MsgBody.DataPayload.numBytes = FM_FP_HS_DATA_MSG_SIZE_BYTES;
00367             gw1FmMsg[gw1FmFpMsgInIndex].MsgBody.DataPayload.DataAddress = &FmFpHsData[0];
00368             gw1FmFpMsgInIndex++;
00369
00370             gw1FmMsg[gw1FmFpMsgInIndex].MsgId = iffax_FM_FP_FRAME_COMP;
00371             gw1FmMsg[gw1FmFpMsgInIndex].MsgBody.FrameComp.FrameFcs = iffax_FCS_GOOD;
00372             gw1FmFpMsgInIndex++;
00373
00374             gw1FmMsg[gw1FmFpMsgInIndex].MsgId = iffax_FM_FP_V34_PRI_CH_TURN_OFF;
00375             gw1FmFpMsgInIndex++;
00376
00377             gw1FmMsg[gw1FmFpMsgInIndex].MsgId = iffax_FM_FP_DATA;
00378             gw1FmMsg[gw1FmFpMsgInIndex].MsgBody.DataPayload.numBytes = FM_FP_LS_PPS_EOP_MSG_SIZE_BYTES;
00379             gw1FmMsg[gw1FmFpMsgInIndex].MsgBody.DataPayload.DataAddress = &FmFpLsPPS_EOPMsg[0];
00380             gw1FmFpMsgInIndex++;
00381
00382             gw1FmMsg[gw1FmFpMsgInIndex].MsgId = iffax_FM_FP_FRAME_COMP;
00383             gw1FmMsg[gw1FmFpMsgInIndex].MsgBody.FrameComp.FrameFcs = iffax_FCS_GOOD;
00384             gw1FmFpMsgInIndex++;
00385             break;
00386
00387          default:
00388             break;
00389       }
00390    }
00391    else /* gateway 2 */
00392    {
00393       switch (fiuMsg->MsgId)
00394       {
00395          case iffax_FP_FM_V34_ESTABLISH_LINK:
00396             gw2FmMsg[gw2FmFpMsgInIndex].MsgId = iffax_FM_FP_TONE_DETECT;
00397             gw2FmMsg[gw2FmFpMsgInIndex].MsgBody.ToneDetect.ToneId = iffax_TONE_ANSAM;
00398             gw2FmFpMsgInIndex++;
00399             break;
00400
00401          case iffax_FP_FM_SEND_CM:
00402             gw2FmMsg[gw2FmFpMsgInIndex].MsgId = iffax_FM_FP_V8_JM_RECEIVED;
00403             gw2FmMsg[gw2FmFpMsgInIndex].MsgBody.V8Data.callFunction = 4;
00404             gw2FmMsg[gw2FmFpMsgInIndex].MsgBody.V8Data.modMode = 0x0004;
00405             gw2FmFpMsgInIndex++;
00406
00407             gw2FmMsg[gw2FmFpMsgInIndex].MsgId = iffax_FM_FP_V34_PRI_RATE_KNOWN;
00408             gw2FmMsg[gw2FmFpMsgInIndex].MsgBody.V34Info.priRate = 33600;
00409             gw2FmFpMsgInIndex++;
00410
00411             gw2FmMsg[gw2FmFpMsgInIndex].MsgId = iffax_FM_FP_V34_E_DETECTED;
00412             gw2FmFpMsgInIndex++;
00413
00414             gw2FmMsg[gw2FmFpMsgInIndex].MsgId = iffax_FM_FP_DATA;
00415             gw2FmMsg[gw2FmFpMsgInIndex].MsgBody.DataPayload.numBytes = FM_FP_LS_DIS_MSG_SIZE_BYTES;
00416             gw2FmMsg[gw2FmFpMsgInIndex].MsgBody.DataPayload.DataAddress = &FmFpLsDISMsg[0];
00417             gw2FmFpMsgInIndex++;
00418
00419             gw2FmMsg[gw2FmFpMsgInIndex].MsgId = iffax_FM_FP_FRAME_COMP;
00420             gw2FmMsg[gw2FmFpMsgInIndex].MsgBody.FrameComp.FrameFcs = iffax_FCS_GOOD;
00421             gw2FmFpMsgInIndex++;
00422             break;
00423
00424          case iffax_FP_FM_SEND_ONES:
00425             gw2FmMsg[gw2FmFpMsgInIndex].MsgId = iffax_FM_FP_SILENCE_DETECTED;
00426             gw2FmFpMsgInIndex++;
00427             break;
00428
00429          case iffax_FP_FM_SWITCH_TO_PRI_CH:
00430             break;
00431
00432          case iffax_FP_FM_V34_DATA:
00433             numBytes = fiuMsg->MsgBody.V34Data.numBytes;
00434             src = fiuMsg->MsgBody.V34Data.DataAddr;
00435
00436             for (i = 0; i < (utlNbytes2NtwordsCeil(numBytes)); i++)
00437                gw2RxData[gw2RxDataIndex++] = src[i];
00438
00439             switch (gw2DataIndex)
00440             {
00441                case 0:
00442                   gw2FmMsg[gw2FmFpMsgInIndex].MsgId = iffax_FM_FP_DATA;
00443                   gw2FmMsg[gw2FmFpMsgInIndex].MsgBody.DataPayload.numBytes = FM_FP_LS_CFR_MSG_SIZE_BYTES;
00444                   gw2FmMsg[gw2FmFpMsgInIndex].MsgBody.DataPayload.DataAddress = &FmFpLsCFRMsg[0];
00445                   gw2FmFpMsgInIndex++;
00446
00447                   gw2FmMsg[gw2FmFpMsgInIndex].MsgId = iffax_FM_FP_FRAME_COMP;
00448                   gw2FmMsg[gw2FmFpMsgInIndex].MsgBody.FrameComp.FrameFcs = iffax_FCS_GOOD;
00449                   gw2FmFpMsgInIndex++;
00450
00451                   gw2DataIndex++;
00452                   break;
00453
00454                case 1:
00455                   /* image data */
00456                   gw2DataIndex++;
00457                   break;
00458
00459                case 2:
00460                   gw2FmMsg[gw2FmFpMsgInIndex].MsgId = iffax_FM_FP_DATA;
00461                   gw2FmMsg[gw2FmFpMsgInIndex].MsgBody.DataPayload.numBytes = FM_FP_LS_MCF_MSG_SIZE_BYTES;
00462                   gw2FmMsg[gw2FmFpMsgInIndex].MsgBody.DataPayload.DataAddress = &FmFpLsMCFMsg[0];
00463                   gw2FmFpMsgInIndex++;
00464
00465                   gw2FmMsg[gw2FmFpMsgInIndex].MsgId = iffax_FM_FP_FRAME_COMP;
00466                   gw2FmMsg[gw2FmFpMsgInIndex].MsgBody.FrameComp.FrameFcs = iffax_FCS_GOOD;
00467                   gw2FmFpMsgInIndex++;
00468
00469                   gw2DataIndex++;
00470                   break;
00471             }
00472             break;
00473
00474          case iffax_FP_FM_SYNC:
00475             gw2FmMsg[gw2FmFpMsgInIndex].MsgId = iffax_FM_FP_SYNC_ACK;
00476             gw2FmFpMsgInIndex++;
00477             break;
00478
00479          case iffax_FP_FM_SWITCH_TO_CTRL_CH:
00480             gw2FmMsg[gw2FmFpMsgInIndex].MsgId = iffax_FM_FP_V34_PRI_CH_TURN_OFF;
00481             gw2FmFpMsgInIndex++;
00482             break;
00483
00484          default:
00485             break;
00486       }
00487    }
00488
00489    return (iffax_FM_CMD_ACCEPTED);
00490
00491 } /* siuV34FmInterface() */
00492 #endif /* V34_FAX_SIMULATION */
00493
00494 void fiuSimCreateFmFpDataMsgs(iffaxFmFpMsg_t *fmMsg, tuint *inIndex, tword *dataAddress, tuint dataSize)
00495 {
00496    tuint i;
00497    tuint numBytes;
00498
00499    for (i = 0; i < dataSize; i += DATA_SEGMENT_SIZE_BYTES)
00500    {
00501       if ((i + DATA_SEGMENT_SIZE_BYTES) < dataSize)
00502          numBytes = DATA_SEGMENT_SIZE_BYTES;
00503       else
00504          numBytes = dataSize - i;
00505
00506       fmMsg[*inIndex].MsgId = iffax_FM_FP_DATA;
00507       fmMsg[*inIndex].MsgBody.DataPayload.numBytes = numBytes;
00508       fmMsg[*inIndex].MsgBody.DataPayload.DataAddress = &dataAddress[i];
00509       fmMsg[*inIndex].Timestamp = msgTimestamp;
00510       msgTimestamp += 30 * DATA_SEGMENT_SIZE_BYTES;
00511       *inIndex += 1;
00512    }
00513 }
00514
00515 /******************************************************************************
00516  * FUNCTION PURPOSE: Implements fiuReceiveOut() API function which sends a
00517  *                   messsage to FM.
00518  ******************************************************************************
00519  * DESCRIPTION: Routine called by FIU to send a message of type iffaxFpFmMsg_t to
00520  *              FM. No actual message processing is done.  The function always
00521  *              successfully.
00522  *
00523  * CALLING FORMAT:
00524  *   siuG3FmInterface (void *targetInst, - ptr to FM processing module
00525  *                     void *message)    - ptr to message for FM
00526  *
00527  * RETURN: tint
00528  *              iffax_FM_CMD_ACCEPTED (0)     if the message is copied into message FIFO
00529  *              iffax_FM_CMD_NOT_ACCEPTED (1) if the message is not copied into the
00530  *                                            message FIFO because the FIFO is full
00531  *              iffax_FM_CMD_ERROR (-1)       if message is not copied because FM
00532  *                                            is closed or invalid message ID
00533  ***************************************************************************/
00534 tint siuG3FmInterface (void *targetInst, void *message)
00535 {
00536    siuInst_t *inst = (siuInst_t *) targetInst;
00537    iffaxFpFmMsg_t *fiuMsg = (iffaxFpFmMsg_t *)message;
00538    tint i, numBytes;
00539    tword *src;
00540
00541    if (inst == &siuInst[gw1ChNum - 1])
00542    {
00543       switch (fiuMsg->MsgId)
00544       {
00545          case iffax_FP_FM_DATA:
00546             numBytes = fiuMsg->MsgBody.DataPayload.numBytes;
00547             src = fiuMsg->MsgBody.DataPayload.DataAddr;
00548
00549             for (i = 0; i < (utlNbytes2NtwordsCeil(numBytes)); i++)
00550                gw1RxData[gw1RxDataIndex++] = src[i];
00551             break;
00552
00553          case iffax_FP_FM_FRAME_COMP:
00554             switch (gw1DataIndex)
00555             {
00556                case 0:
00557                   /* Introduce turnaround time */
00558                   msgTimestamp = systemTime + 100;
00559
00560                   gw1FmMsg[gw1FmFpMsgInIndex].MsgId = iffax_FM_FP_PREAMBLE_DETECT;
00561                   gw1FmMsg[gw1FmFpMsgInIndex].Timestamp = msgTimestamp;
00562                   msgTimestamp += 300;
00563                   gw1FmFpMsgInIndex++;
00564
00565                   if (fG3FaxECM)
00566                      fiuSimCreateFmFpDataMsgs(gw1FmMsg, &gw1FmFpMsgInIndex, FmFpLsDCSMsg, FM_FP_LS_DCS_MSG_SIZE_BYTES);
00567                   else
00568                      fiuSimCreateFmFpDataMsgs(gw1FmMsg, &gw1FmFpMsgInIndex, FmFpLsDCSNonECMMsg, FM_FP_LS_DCS_NONECM_MSG_SIZE_BYTES);
00569
00570                   gw1FmMsg[gw1FmFpMsgInIndex].MsgId = iffax_FM_FP_FRAME_COMP;
00571                   gw1FmMsg[gw1FmFpMsgInIndex].MsgBody.FrameComp.FrameFcs = iffax_FCS_GOOD;
00572                   gw1FmMsg[gw1FmFpMsgInIndex].Timestamp = msgTimestamp;
00573                   msgTimestamp += 30;
00574                   gw1FmFpMsgInIndex++;
00575
00576                   gw1FmMsg[gw1FmFpMsgInIndex].MsgId = iffax_FM_FP_CARRIER_LOSS;
00577                   gw1FmMsg[gw1FmFpMsgInIndex].Timestamp = msgTimestamp;
00578                   msgTimestamp += 70;
00579                   gw1FmFpMsgInIndex++;
00580
00581                   gw1FmMsg[gw1FmFpMsgInIndex].MsgId = iffax_FM_FP_HS_TRAIN_DETECT;
00582                   gw1FmMsg[gw1FmFpMsgInIndex].Timestamp = msgTimestamp;
00583                   msgTimestamp += 1500;
00584                   gw1FmFpMsgInIndex++;
00585
00586                   gw1FmMsg[gw1FmFpMsgInIndex].MsgId = iffax_FM_FP_CARRIER_LOSS;
00587                   gw1FmMsg[gw1FmFpMsgInIndex].Timestamp = msgTimestamp;
00588                   msgTimestamp += 30;
00589                   gw1FmFpMsgInIndex++;
00590
00591                   gw1DataIndex++;
00592                   break;
00593
00594                case 1:
00595                   /* Introduce turnaround time */
00596                   msgTimestamp = systemTime + 100;
00597
00598                   gw1FmMsg[gw1FmFpMsgInIndex].MsgId = iffax_FM_FP_TEP_DETECT;
00599                   gw1FmMsg[gw1FmFpMsgInIndex].Timestamp = msgTimestamp;
00600                   msgTimestamp += 100;
00601                   gw1FmFpMsgInIndex++;
00602
00603                   gw1FmMsg[gw1FmFpMsgInIndex].MsgId = iffax_FM_FP_HS_TRAIN_DETECT;
00604                   gw1FmMsg[gw1FmFpMsgInIndex].Timestamp = msgTimestamp;
00605                   msgTimestamp += 500;
00606                   gw1FmFpMsgInIndex++;
00607
00608                   gw1FmMsg[gw1FmFpMsgInIndex].MsgId = iffax_FM_FP_CARRIER_DETECT;
00609                   gw1FmMsg[gw1FmFpMsgInIndex].Timestamp = msgTimestamp;
00610                   msgTimestamp += 30;
00611                   gw1FmFpMsgInIndex++;
00612
00613                   fiuSimCreateFmFpDataMsgs(gw1FmMsg, &gw1FmFpMsgInIndex, FmFpHsData, FM_FP_HS_DATA_MSG_SIZE_BYTES);
00614
00615                   if (fG3FaxECM)
00616                   {
00617                      gw1FmMsg[gw1FmFpMsgInIndex].MsgId = iffax_FM_FP_FRAME_COMP;
00618                      gw1FmMsg[gw1FmFpMsgInIndex].MsgBody.FrameComp.FrameFcs = iffax_FCS_GOOD;
00619                      gw1FmMsg[gw1FmFpMsgInIndex].Timestamp = msgTimestamp;
00620                      msgTimestamp += 30;
00621                      gw1FmFpMsgInIndex++;
00622                   }
00623
00624                   gw1FmMsg[gw1FmFpMsgInIndex].MsgId = iffax_FM_FP_CARRIER_LOSS;
00625                   gw1FmMsg[gw1FmFpMsgInIndex].Timestamp = msgTimestamp;
00626                   msgTimestamp += 70;
00627                   gw1FmFpMsgInIndex++;
00628
00629                   gw1FmMsg[gw1FmFpMsgInIndex].MsgId = iffax_FM_FP_PREAMBLE_DETECT;
00630                   gw1FmMsg[gw1FmFpMsgInIndex].Timestamp = msgTimestamp;
00631                   msgTimestamp += 300;
00632                   gw1FmFpMsgInIndex++;
00633
00634                   if (fG3FaxECM)
00635                      fiuSimCreateFmFpDataMsgs(gw1FmMsg, &gw1FmFpMsgInIndex, FmFpLsPPS_EOPMsg, FM_FP_LS_PPS_EOP_MSG_SIZE_BYTES);
00636                   else
00637                      fiuSimCreateFmFpDataMsgs(gw1FmMsg, &gw1FmFpMsgInIndex, FmFpLsEOPMsg, FM_FP_LS_EOP_MSG_SIZE_BYTES);
00638
00639                   gw1FmMsg[gw1FmFpMsgInIndex].MsgId = iffax_FM_FP_FRAME_COMP;
00640                   gw1FmMsg[gw1FmFpMsgInIndex].MsgBody.FrameComp.FrameFcs = iffax_FCS_GOOD;
00641                   gw1FmMsg[gw1FmFpMsgInIndex].Timestamp = msgTimestamp;
00642                   msgTimestamp += 30;
00643                   gw1FmFpMsgInIndex++;
00644
00645                   gw1FmMsg[gw1FmFpMsgInIndex].MsgId = iffax_FM_FP_CARRIER_LOSS;
00646                   gw1FmMsg[gw1FmFpMsgInIndex].Timestamp = msgTimestamp;
00647                   msgTimestamp += 30;
00648                   gw1FmFpMsgInIndex++;
00649
00650                   gw1DataIndex++;
00651                   break;
00652
00653                case 2:
00654                   /* Introduce turnaround time */
00655                   msgTimestamp = systemTime + 100;
00656
00657                   gw1FmMsg[gw1FmFpMsgInIndex].MsgId = iffax_FM_FP_PREAMBLE_DETECT;
00658                   gw1FmMsg[gw1FmFpMsgInIndex].Timestamp = msgTimestamp;
00659                   msgTimestamp += 300;
00660                   gw1FmFpMsgInIndex++;
00661
00662                   fiuSimCreateFmFpDataMsgs(gw1FmMsg, &gw1FmFpMsgInIndex, FmFpLsDCNMsg, FM_FP_LS_DCN_MSG_SIZE_BYTES);
00663
00664                   gw1FmMsg[gw1FmFpMsgInIndex].MsgId = iffax_FM_FP_FRAME_COMP;
00665                   gw1FmMsg[gw1FmFpMsgInIndex].MsgBody.FrameComp.FrameFcs = iffax_FCS_GOOD;
00666                   gw1FmMsg[gw1FmFpMsgInIndex].Timestamp = msgTimestamp;
00667                   msgTimestamp += 30;
00668                   gw1FmFpMsgInIndex++;
00669
00670                   gw1FmMsg[gw1FmFpMsgInIndex].MsgId = iffax_FM_FP_CARRIER_LOSS;
00671                   gw1FmMsg[gw1FmFpMsgInIndex].Timestamp = msgTimestamp;
00672                   msgTimestamp += 30;
00673                   gw1FmFpMsgInIndex++;
00674
00675                   gw1DataIndex++;
00676                   break;
00677             }
00678             break;
00679
00680          case iffax_FP_FM_SYNC:
00681             gw1FmMsg[gw1FmFpMsgInIndex].MsgId = iffax_FM_FP_SYNC_ACK;
00682             gw1FmMsg[gw1FmFpMsgInIndex].Timestamp = systemTime;
00683             gw1FmFpMsgInIndex++;
00684             break;
00685
00686          default:
00687             break;
00688       }
00689    }
00690    else /* gateway 2 */
00691    {
00692       switch (fiuMsg->MsgId)
00693       {
00694          case iffax_FP_FM_MODE:
00695             switch (fiuMsg->MsgBody.Mode.Modulation)
00696             {
00697                case iffax_MODEM_MODE_V21:
00698                   if (fDISSent == FALSE)
00699                   {
00700                      msgTimestamp = systemTime;
00701
00702                      gw2FmMsg[gw2FmFpMsgInIndex].MsgId = iffax_FM_FP_PREAMBLE_DETECT;
00703                      gw2FmMsg[gw2FmFpMsgInIndex].Timestamp = msgTimestamp;
00704                      msgTimestamp += 300;
00705                      gw2FmFpMsgInIndex++;
00706
00707                      if (fG3FaxECM)
00708                         fiuSimCreateFmFpDataMsgs(gw2FmMsg, &gw2FmFpMsgInIndex, FmFpLsDISMsg, FM_FP_LS_DIS_MSG_SIZE_BYTES);
00709                      else
00710                         fiuSimCreateFmFpDataMsgs(gw2FmMsg, &gw2FmFpMsgInIndex, FmFpLsDISNonECMMsg, FM_FP_LS_DIS_NONECM_MSG_SIZE_BYTES);
00711
00712                      gw2FmMsg[gw2FmFpMsgInIndex].MsgId = iffax_FM_FP_FRAME_COMP;
00713                      gw2FmMsg[gw2FmFpMsgInIndex].MsgBody.FrameComp.FrameFcs = iffax_FCS_GOOD;
00714                      gw2FmMsg[gw2FmFpMsgInIndex].Timestamp = msgTimestamp;
00715                      msgTimestamp += 30;
00716                      gw2FmFpMsgInIndex++;
00717
00718                      gw2FmMsg[gw2FmFpMsgInIndex].MsgId = iffax_FM_FP_CARRIER_LOSS;
00719                      gw2FmMsg[gw2FmFpMsgInIndex].Timestamp = msgTimestamp;
00720                      msgTimestamp += 30;
00721                      gw2FmFpMsgInIndex++;
00722
00723                      fDISSent = TRUE;
00724                   }
00725                   break;
00726
00727                default:
00728                   break;
00729             }
00730             break;
00731
00732          case iffax_FP_FM_DATA:
00733             numBytes = fiuMsg->MsgBody.DataPayload.numBytes;
00734             src = (tword *)fiuMsg->MsgBody.DataPayload.DataAddr;
00735
00736             for (i = 0; i < (utlNbytes2NtwordsCeil(numBytes)); i++)
00737                gw2RxData[gw2RxDataIndex++] = src[i];
00738             break;
00739
00740          case iffax_FP_FM_FRAME_COMP:
00741             switch (gw2DataIndex)
00742             {
00743                case 0:
00744                   /* Introduce turnaround time */
00745                   msgTimestamp = systemTime + 2000;
00746
00747                   gw2FmMsg[gw2FmFpMsgInIndex].MsgId = iffax_FM_FP_PREAMBLE_DETECT;
00748                   gw2FmMsg[gw2FmFpMsgInIndex].Timestamp = msgTimestamp;
00749                   msgTimestamp += 300;
00750                   gw2FmFpMsgInIndex++;
00751
00752                   fiuSimCreateFmFpDataMsgs(gw2FmMsg, &gw2FmFpMsgInIndex, FmFpLsCFRMsg, FM_FP_LS_CFR_MSG_SIZE_BYTES);
00753
00754                   gw2FmMsg[gw2FmFpMsgInIndex].MsgId = iffax_FM_FP_FRAME_COMP;
00755                   gw2FmMsg[gw2FmFpMsgInIndex].MsgBody.FrameComp.FrameFcs = iffax_FCS_GOOD;
00756                   gw2FmMsg[gw2FmFpMsgInIndex].Timestamp = msgTimestamp;
00757                   msgTimestamp += 30;
00758                   gw2FmFpMsgInIndex++;
00759
00760                   gw2FmMsg[gw2FmFpMsgInIndex].MsgId = iffax_FM_FP_CARRIER_LOSS;
00761                   gw2FmMsg[gw2FmFpMsgInIndex].Timestamp = msgTimestamp;
00762                   msgTimestamp += 30;
00763                   gw2FmFpMsgInIndex++;
00764
00765                   if (fG3FaxECM)
00766                      gw2DataIndex++;
00767                   else
00768                      gw2DataIndex += 2;
00769
00770                   break;
00771
00772                case 1:
00773                   /* image data */
00774                   gw2DataIndex++;
00775                   break;
00776
00777                case 2:
00778                   /* Introduce turnaround time */
00779                   msgTimestamp = systemTime + 100;
00780
00781                   gw2FmMsg[gw2FmFpMsgInIndex].MsgId = iffax_FM_FP_PREAMBLE_DETECT;
00782                   gw2FmMsg[gw2FmFpMsgInIndex].Timestamp = msgTimestamp;
00783                   msgTimestamp += 300;
00784                   gw2FmFpMsgInIndex++;
00785
00786                   fiuSimCreateFmFpDataMsgs(gw2FmMsg, &gw2FmFpMsgInIndex, FmFpLsMCFMsg, FM_FP_LS_MCF_MSG_SIZE_BYTES);
00787
00788                   gw2FmMsg[gw2FmFpMsgInIndex].MsgId = iffax_FM_FP_FRAME_COMP;
00789                   gw2FmMsg[gw2FmFpMsgInIndex].MsgBody.FrameComp.FrameFcs = iffax_FCS_GOOD;
00790                   gw2FmMsg[gw2FmFpMsgInIndex].Timestamp = msgTimestamp;
00791                   msgTimestamp += 30;
00792                   gw2FmFpMsgInIndex++;
00793
00794                   gw2FmMsg[gw2FmFpMsgInIndex].MsgId = iffax_FM_FP_CARRIER_LOSS;
00795                   gw2FmMsg[gw2FmFpMsgInIndex].Timestamp = msgTimestamp;
00796                   msgTimestamp += 30;
00797                   gw2FmFpMsgInIndex++;
00798
00799                   gw2DataIndex++;
00800                   break;
00801             }
00802             break;
00803
00804          case iffax_FP_FM_SYNC:
00805             gw2FmMsg[gw2FmFpMsgInIndex].MsgId = iffax_FM_FP_SYNC_ACK;
00806             gw2FmMsg[gw2FmFpMsgInIndex].Timestamp = systemTime;
00807             gw2FmFpMsgInIndex++;
00808             break;
00809
00810          default:
00811             break;
00812       }
00813    }
00814
00815    return (iffax_FM_CMD_ACCEPTED);
00816
00817 } /* siuG3FmInterface() */
00818
00819
00820
00821 /******************************************************************************
00822  * FUNCTION PURPOSE: Implements fiuEventHandler() API call.
00823  ******************************************************************************
00824  * DESCRIPTION: Notifies call-processing software of an event.
00825  *
00826  * CALLING FORMAT:
00827  *   siuFaxEventHandler (void  *targetInst, - pointer to SIU module
00828  *                       tuint eventCode,   - event code
00829  *                       tuint eventInfo)   - associated event information
00830  *
00831  * RETURN VALUES:
00832  *   None
00833  *
00834  *****************************************************************************/
00835 void siuFaxEventHandler (void *targetInst, tuint eventCode, tuint eventInfo)
00836 {
00837    if (eventCode == fiu_EVENT_CLEARDOWN)
00838    {
00839       numCleardownMsg++;
00840
00841       if (numCleardownMsg >= 2)
00842          fLoop = FALSE;
00843    }
00844
00845 } /* siuFaxEventHandler() */
00846
00847 /******************************************************************************
00848  * FUNCTION PURPOSE: Implements FIU's debugInfo() API call.
00849  ******************************************************************************
00850  * DESCRIPTION: Handles FIU API calls to debugInfo(). All INFORMATIONAL msgs
00851  *              are ignored; if the msgType is FATAL_ERROR or undefined,
00852  *              a call to siuFatalError() is made.
00853  *
00854  * CALLING FORMAT:
00855  *   siuDebugInfo (void* moduleID,        - ID and channel of FIU
00856  *                 tuint msgType,         - FATAL_ERROR (2) or
00857  *                                          INFORMATIONAL (0)
00858  *                 tuint msgCode,         - message code
00859  *                 tuint msgLength,       - message length
00860  *                 tuint *supportingData) - supporting data
00861  *
00862  * RETURN VALUES:
00863  *   None
00864  *
00865  *****************************************************************************/
00866 void siuDebugInfo (void* mId, tuint msgType, tuint msgCode,
00867                    tuint msgLength, tuint *supportingData)
00868 {
00869    tint fiuRetVal = FALSE;
00870    char buffer[256];
00871    char *string = NULL;
00872    tuint time = 0;
00873    tuint deltaTime = 0;
00874    tuint moduleID= *(tuint*)mId;
00875
00876    switch (msgType)
00877    {
00878       case fiu_DBG_INFORMATIONAL:
00879          fiuRetVal = fiuDebugTraceParser (msgCode, *supportingData, buffer);
00880
00881          if (msgLength == 2)
00882          {
00883            time = supportingData[1];
00884
00885            if (time >= prevTime)
00886                deltaTime = time - prevTime;
00887             else
00888                deltaTime = (0xFFFF - prevTime + 1) + time;
00889
00890            prevTime = time;
00891          }
00892
00893          if ((moduleID & 0x00FF) == 1)
00894             printf ("%.4X(+%.4dms)GW1: ", time, deltaTime);
00895          else
00896             printf ("%.4X(+%.4dms)GW2: ", time, deltaTime);
00897
00898          if (fiuRetVal == TRUE)
00899          {
00900             printf ("%s\n", buffer);
00901          }
00902          else
00903          {
00904             printf ("Invalid trace: msgId = 0x%X, msgData = 0x%X\n", msgCode, *supportingData);
00905          }
00906          break;
00907
00908       case fiu_DBG_FATAL_ERROR:
00909          *string = SIU_EXCEPTION_FIU_DBG_FATAL_ERROR;
00910          siuFatalError (moduleID, string);
00911          break;
00912
00913       default:
00914          *string = SIU_EXCEPTION_FIU_DBG_DEFAULT;
00915          siuFatalError (moduleID, string);
00916          break;
00917    }
00918 } /* siuDebugInfo() */
00919
00920 /******************************************************************************
00921  * FUNCTION PURPOSE: Generic function for handling FIU and DPU exception calls.
00922  ******************************************************************************
00923  * DESCRIPTION: Handles exception and debug calls. Goes into and infinite loop,
00924  *              allowing for an eventual break and examintaaion of reason for
00925  *              calling a fata error. The global variable siuFatalString
00926  *              contains the reason for entry, as enumerated in the global
00927  *              enumeration siuFatalErrorChar_e of file main.h.
00928  *
00929  * CALLING FORMAT:
00930  *   siuFatalError   (tuint ID,       -  ID and channel of calling entity
00931  *                                         (either FIU or DPU)
00932  *                    char* str)      -  Global ptr to char that holds the
00933  *                                         value of reason for entering
00934  *                                         this function
00935  *
00936  * RETURN VALUES:
00937  *   None
00938  *
00939  *****************************************************************************/
00940 void siuFatalError (tuint id, char *str)
00941 {
00942    siuFatalString = *str;
00943
00944    while (1)
00945    {
00946       /* Endless loop entered */
00947    }
00948
00949 } /* siuFatalError() */
00950
00951 /******************************************************************************
00952  * FUNCTION PURPOSE: Critical section handling routine.
00953  ******************************************************************************
00954  * DESCRIPTION:
00955  *
00956  * CALLING FORMAT:
00957  *   siuCriticalSectionBegin ()
00958  *
00959  * RETURN VALUES:
00960  *   None
00961  *
00962  *****************************************************************************/
00963 void siuCriticalSectionBegin (void)
00964 {
00965    return;
00966 } /* siuCriticalSectionBegin() */
00967
00968 /******************************************************************************
00969  * FUNCTION PURPOSE: Critical section handling routine.
00970  ******************************************************************************
00971  * DESCRIPTION:
00972  *
00973  * CALLING FORMAT:
00974  *   siuCriticalSectionEnd ()
00975  *
00976  * RETURN VALUES:
00977  *   None
00978  *
00979  *****************************************************************************/
00980 void siuCriticalSectionEnd (void)
00981 {
00982    return;
00983 } /* siuCriticalSectionEnd() */
00984
00985
00986
00987 /******************************************************************************
00988  * FUNCTION PURPOSE: Initializes/resets SIU instance parameters.
00989  ******************************************************************************
00990  * DESCRIPTION: Initializes siu instance parameters and structures to nominal
00991  *              values
00992  *
00993  * CALLING FORMAT:
00994  *   siu_init        (tint chnum)  -  channel number
00995  *
00996  * RETURN VALUES:
00997  *   None
00998  *
00999  *****************************************************************************/
01000 void siu_init (tint chnum)
01001 {
01002    siuInst_t *inst = &siuInst[chnum - 1];
01003
01004    inst->fiuInst = NULL;
01005
01006    inst->fiuBufs       = NULL;
01007    inst->fiuNbufs      = 0;
01008    inst->fiu_heap_size = 0;
01009    inst->aux_heap_size = 0;
01010
01011 } /* siu_init() */
01012
01013 /******************************************************************************
01014  * FUNCTION PURPOSE: Create FIU module.
01015  ******************************************************************************
01016  * DESCRIPTION: Creates an instance of FIU.
01017  *
01018  * CALLING FORMAT:
01019  *   siu_new_fiu     (tint chnum)  -  channel number
01020  *
01021  * RETURN VALUES:
01022  *   None
01023  *
01024  *****************************************************************************/
01025 void siu_new_fiu (tint chnum)
01026 {
01027    tint                i, stat, fiuNbufs;
01028    char                *str = NULL;
01029    const ecomemBuffer_t   *bufs;
01030    ecomemBuffer_t         *fiuLocalBufs;
01031    fiuSizeCfg_t        fiuSizeCfg;
01032    fiuNewConfig_t      fiuCfgNew;
01033    siuInst_t           *inst = &siuInst[chnum - 1];
01034
01035    /* FIU get sizes */
01036    fiuSizeCfg.NumInternalFIUBufs = 100; /* 100 is default allocation size */
01037    fiuSizeCfg.NumInternalFIUOverlayBufs = 0;
01038    stat = fiuGetSizes (&fiuNbufs, &bufs, &fiuSizeCfg);
01039    if (!(stat == fiu_NOERR))
01040    {
01041       *str = SIU_EXCEPTION_FIU_SIZES_ERR;
01042       siuFatalError (SIU_FIU_ID, str);
01043    }
01044
01045    /* Allocate FIU memory buffer descriptors & increment auxiliary heap size */
01046
01047    fiuLocalBufs = (ecomemBuffer_t*) malloc (fiuNbufs * sizeof(ecomemBuffer_t));
01048
01049    inst->aux_heap_size += fiuNbufs * sizeof(ecomemBuffer_t);
01050
01051    /* Allocate FIU memory buffers & increment fiu heap size. Data from the (global)
01052       variable fiuBufs is copied into the (local) variable fiuLocalBufs in order to
01053       correctly set fiuLocalBufs' size parameter */
01054    for (i = 0; i < fiuNbufs; i++)
01055    {
01056       fiuLocalBufs[i]            = bufs[i];
01057       fiuLocalBufs[i].mclass     = ecomem_CLASS_EXTERNAL;
01058       fiuLocalBufs[i].log2align  = 0;
01059       fiuLocalBufs[i].volat      = FALSE;
01060
01061       fiuLocalBufs[i].base       = malloc (bufs[i].size);
01062       inst->fiu_heap_size        += bufs[i].size;
01063    }
01064
01065    /* Need these as a handle to delete this channel's FIU someday */
01066    inst->fiuNbufs = fiuNbufs;
01067    inst->fiuBufs  = &fiuLocalBufs[0];
01068
01069    /* FIU New */
01070    fiuCfgNew.ID = (SIU_FIU_ID << 8) | chnum;
01071
01072    fiuCfgNew.SizeConfig.NumInternalFIUBufs = fiuSizeCfg.NumInternalFIUBufs;
01073    fiuCfgNew.SizeConfig.NumInternalFIUOverlayBufs = 0;
01074    stat = fiuNew (&inst->fiuInst, fiuNbufs, fiuLocalBufs, &fiuCfgNew);
01075
01076    if (!(stat == fiu_NOERR))
01077    {
01078       *str = SIU_EXCEPTION_FIU_NEW_ERR;
01079       siuFatalError (SIU_FIU_ID, str);
01080    }
01081
01082 } /* siu_new_fiu() */
01083
01084
01085 /******************************************************************************
01086  * FUNCTION PURPOSE: Open FIU module
01087  ******************************************************************************
01088  * DESCRIPTION: Opens one instance of a FIU module
01089  *
01090  * CALLING FORMAT:
01091  *   siu_open_fiu    (tint chnum)     - channel number
01092  *
01093  * RETURN VALUES:
01094  *   None
01095  *
01096  *****************************************************************************/
01097 void siu_open_fiu (tint chnum)
01098 {
01099    tint            stat;
01100    char            *str = NULL;
01101    fiuOpenConfig_t fiuCfg;
01102    siuInst_t       *inst = &siuInst[chnum - 1];
01103
01104    fiuCfg.frameSize                     = gFrameSize;      /* in ms */
01105    fiuCfg.MaxFaxRate                    = iffax_RATE_14400;
01106    fiuCfg.dbgMode                       = fiu_DBG_LVL_2;
01107    fiuCfg.RtpPayloadType                = 0;               /* not needed for this sim */
01108    fiuCfg.RtpSyncSource                 = 0;               /* not needed for this sim */
01109    fiuCfg.faxNomDelay                   = 300;             /* in ms */
01110    fiuCfg.faxPacketSize                 = 20;              /* in ms */
01111    fiuCfg.NoActivityTimerVal            = 20000;           /* in ms */
01112    fiuCfg.AAL2cid                       = 0;               /* not used for T.38 */
01113    fiuCfg.SendOutSpec.fiuSendOut        = siuNetInterface;
01114    fiuCfg.SendOutSpec.targetInst        = (void *) inst;
01115 #ifdef V34_FAX_SIMULATION
01116    fiuCfg.ReceiveOutSpec.fiuReceiveOut  = siuV34FmInterface;
01117 #else
01118    fiuCfg.ReceiveOutSpec.fiuReceiveOut  = siuG3FmInterface;
01119 #endif
01120    fiuCfg.ReceiveOutSpec.targetInst     = (void *) inst;
01121    fiuCfg.EventHandlerSpec.fiuEventHandler = siuFaxEventHandler;
01122    fiuCfg.EventHandlerSpec.targetInst      = (void *) inst;
01123
01124 #ifndef NO_TONESUPP
01125    fiuCfg.StartupTimer                  = 10000;
01126 #endif /* NO_TONESUPP */
01127    fiuCfg.CleardownTimer                = 2000;
01128    fiuCfg.faxNetCallTblPtr              = faxNetCallTblPtr;
01129    fiuCfg.NetProtocol                   = faxNetProtocol;
01130    fiuCfg.LocalTxNetTimeOutVal          = 120000;               /* in ms */
01131    fiuCfg.EflagStartTimer               = 2600;                 /* in ms */
01132    fiuCfg.EflagStopTimer                = 2300;                 /* in ms */
01133
01134    fiuCfg.T30FeatureSelector            = 0x0000;
01135    fiuCfg.FIUFeatureSelector            = fiu_FEATURE_TFOP_FC_REPEAT;
01136 #ifdef V34_FAX_SIMULATION
01137    fiuCfg.FIUFeatureSelector           |= fiu_FEATURE_V34_FAX;
01138 #endif
01139    fiuCfg.NSFCountryCode                = 0;
01140    fiuCfg.NSFVendorCodeMSB              = 0;
01141    fiuCfg.NSFVendorCodeLSB              = 0;
01142
01143    /* T.38 UDP related parameters */
01144    fiuCfg.HSPktPayloadSize              = 40; /* in ms */
01145    fiuCfg.LSPktPayloadSize              = 1;  /* in number of bytes */
01146    fiuCfg.HsDataRedundancy              = 2;  /* in number of packets */
01147    fiuCfg.LsDataRedundancy              = 5;  /* in number of packets */
01148    fiuCfg.TCFHandlingMethod             = 2;  /* TCF Method 2 */
01149    fiuCfg.T38Version                    = 0;
01150
01151    stat = fiuOpen (inst->fiuInst, &fiuCfg);
01152
01153    if (!(stat == fiu_NOERR))
01154    {
01155       *str = SIU_EXCEPTION_FIU_OPEN_ERR;
01156       siuFatalError (SIU_FIU_ID, str);
01157    }
01158
01159 } /* siu_open_fiu() */
01160
01161 /******************************************************************************
01162  * FUNCTION PURPOSE: Close FIU module
01163  ******************************************************************************
01164  * DESCRIPTION: Closes one instance of a FIU module
01165  *
01166  * CALLING FORMAT:
01167  *   siu_close_fiu   (tint chnum)      - channel number
01168  *
01169  * RETURN VALUES:
01170  *   None
01171  *
01172  *****************************************************************************/
01173 void siu_close_fiu (tint chnum)
01174 {
01175    siuInst_t *inst = &siuInst[chnum - 1];
01176    fiuClose (inst->fiuInst);
01177
01178 } /* siu_close_fiu() */
01179
01180
01181 /******************************************************************************
01182  * FUNCTION PURPOSE: Delete FIU module
01183  ******************************************************************************
01184  * DESCRIPTION: Deletes one instance of a FIU module
01185  *
01186  * CALLING FORMAT:
01187  *   siu_delete_fiu  (tint chnum)      - channel number
01188  *
01189  * RETURN VALUES:
01190  *   None
01191  *
01192  *****************************************************************************/
01193 void siu_delete_fiu (tint chnum)
01194 {
01195    tint i;
01196    siuInst_t *inst = &siuInst[chnum - 1];
01197
01198    fiuDelete (&(inst->fiuInst));
01199
01200    /* Free memory allocated for FIU buffers & adjust fiu_heap_size */
01201    for (i = 0; i < inst->fiuNbufs; i++)
01202    {
01203
01204       free (inst->fiuBufs[i].base);
01205       inst->fiu_heap_size -= inst->fiuBufs[i].size;
01206    }
01207
01208    /* Free memory for FIU buffer descriptors & adjust aux_heap_size */
01209    free (inst->fiuBufs);
01210    inst->fiuBufs = NULL;
01211    inst->aux_heap_size -= inst->fiuNbufs * sizeof(ecomemBuffer_t);
01212    inst->fiuNbufs = 0;
01213
01214 } /* siu_delete_fiu() */
01215
01216
01217 /******************************************************************************
01218  * FUNCTION PURPOSE: Main SIU (system integration unit) processing routine
01219  ******************************************************************************
01220  * DESCRIPTION: This routine exercises the APIs for both the FIU and DPU
01221  *              modules.
01222  *
01223  * CALLING FORMAT:
01224  *   void main (void)
01225  * RETURN VALUES:
01226  *   None
01227  *
01228  *****************************************************************************/
01229
01230 void main (void)
01231 {
01232    memset (gw1RxData, 0, sizeof(gw1RxData));
01233    memset (gw2RxData, 0, sizeof(gw2RxData));
01234
01235    siu_init (gw1ChNum);
01236    siu_init (gw2ChNum);
01237
01238    /* Create new FIU instances */
01239    siu_new_fiu (gw1ChNum);
01240    siu_new_fiu (gw2ChNum);
01241
01242    /* Open FIU instances */
01243    siu_open_fiu (gw1ChNum);
01244    siu_open_fiu (gw2ChNum);
01245
01246    fiuControl (siuInst[gw1ChNum - 1].fiuInst, fiu_CTRL_ACTIVATE, NULL);
01247    fiuControl (siuInst[gw2ChNum - 1].fiuInst, fiu_CTRL_ACTIVATE, NULL);
01248
01249    fLoop = TRUE;
01250
01251    while (fLoop == TRUE)
01252    {
01253       fiuTask (siuInst[gw1ChNum - 1].fiuInst);
01254       fiuTask (siuInst[gw2ChNum - 1].fiuInst);
01255
01256       if (gw1FmFpMsgInIndex > gw1FmFpMsgOutIndex)
01257       {
01258          if (gw1FmMsg[gw1FmFpMsgOutIndex].Timestamp < systemTime)
01259          {
01260             tword data[DATA_SEGMENT_SIZE_BYTES];
01261
01262             if (gw1FmMsg[gw1FmFpMsgOutIndex].MsgId == iffax_FM_FP_DATA)
01263             {
01264                /* Pack data */
01265                pktPackBytesIntoWords(gw1FmMsg[gw1FmFpMsgOutIndex].MsgBody.DataPayload.DataAddress,
01266                                      data,
01267                                      gw1FmMsg[gw1FmFpMsgOutIndex].MsgBody.DataPayload.numBytes,
01268                                      0);
01269                gw1FmMsg[gw1FmFpMsgOutIndex].MsgBody.DataPayload.DataAddress = &data[0];
01270             }
01271
01272             fiuSendIn (siuInst[gw1ChNum - 1].fiuInst, &(gw1FmMsg[gw1FmFpMsgOutIndex++]));
01273          }
01274       }
01275
01276       if (gw2FmFpMsgInIndex > gw2FmFpMsgOutIndex)
01277       {
01278          if (gw2FmMsg[gw2FmFpMsgOutIndex].Timestamp < systemTime)
01279          {
01280             tword data[DATA_SEGMENT_SIZE_BYTES];
01281
01282             if (gw2FmMsg[gw2FmFpMsgOutIndex].MsgId == iffax_FM_FP_DATA)
01283             {
01284                /* Pack data */
01285                pktPackBytesIntoWords(gw2FmMsg[gw2FmFpMsgOutIndex].MsgBody.DataPayload.DataAddress,
01286                                      data,
01287                                      gw2FmMsg[gw2FmFpMsgOutIndex].MsgBody.DataPayload.numBytes,
01288                                      0);
01289                gw2FmMsg[gw2FmFpMsgOutIndex].MsgBody.DataPayload.DataAddress = &data[0];
01290             }
01291
01292             fiuSendIn (siuInst[gw2ChNum - 1].fiuInst, &(gw2FmMsg[gw2FmFpMsgOutIndex++]));
01293          }
01294       }
01295
01296       /* Increment "system time" by gFrameSize */
01297       systemTime += gFrameSize;
01298
01299    } /* while (fLoop) */
01300
01301    /* Get updated net and fax stats */
01302    fiuGetStats (siuInst[gw1ChNum - 1].fiuInst, 0, &gw1FaxStats);
01303    fiuGetStats (siuInst[gw2ChNum - 1].fiuInst, 0, &gw2FaxStats);
01304
01305    /* Close FIU instances */
01306    siu_close_fiu (gw1ChNum);
01307    siu_close_fiu (gw2ChNum);
01308
01309    /* Delete FIU instances */
01310    siu_delete_fiu (gw1ChNum);
01311    siu_delete_fiu (gw2ChNum);
01312
01313    exit (0);
01314
01315 } /* main() */
01316
01317 /* nothing past this point */


FIU Test: fiusim.h File Reference

fiusim.h File Reference

#include <string.h>
#include <stdlib.h>
#include <ti/mas/types/types.h>
#include <ti/mas/iface/ifpkt/ifpkt.h>
#include <ti/mas/util/utl.h>
#include <ti/mas/util/pkt.h>
#include <ti/mas/fiu/fiu.h>
#include <ti/mas/util/ecomem.h>

Include dependency graph for fiusim.h:

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

Go to the source code of this file.

Data Structures

struct | siuInst_s

Defines

#define | SIU_NUMBER_OF_CHANNELS 2
#define | SIU_FM_MESSAGE_ARRAY_SIZE 30
#define | SIU_FIU_ID 0x02
#define | SIU_WORD_TO_MAU(fnd_word_cnt) ((fnd_word_cnt) * (16/TYP_TWORD_SIZE))

Typedefs

typedef siuInst_s | siuInst_t

Enumerations

enum siuFatalErrorChar_e {
SIU_EXCEPTION_FIU_DBG_FATAL_ERROR, SIU_EXCEPTION_FIU_DBG_DEFAULT, SIU_EXCEPTION_FIU_SIZES_ERR, SIU_EXCEPTION_FIU_BUFS_ERR,
SIU_EXCEPTION_FIU_NEW_ERR, SIU_EXCEPTION_FIU_OPEN_ERR
}

Functions

tulong | siuGetTime (void)
tint | siuNetInterface (void *targetInst, xferpktInfo_t *pktInfo)
tint | siuFmInterface (void *targetInst, void *message)
void | siuCleardownFax (void *targetInst, tuint TermCode)
void | siuDebugInfo (void *moduleID, tuint msgType, tuint msgCode, tuint msgLength, tuint *supportingData)
void | siuFatalError (tuint id, char *str)
void | siu_init (tint chnum)
void | siu_new_fiu (tint chnum)
void | siu_open_fiu (tint chnum)
void | siu_close_fiu (tint chnum)
void | siu_delete_fiu (tint chnum)
void | siuCriticalSectionBegin (void)
void | siuCriticalSectionEnd (void)

Variables

fiuNetCallTbl_t | faxNetProtocolT38
fiuNetCallTbl_t | faxNetProtocolT3
fiuNetCallTbl_t | faxNetProtocolAal2
fiuNetCallTbl_t | faxNetProtocolFrf11

Define Documentation

#define SIU_NUMBER_OF_CHANNELS 2

Definition at line 22 of file fiusim.h.

#define SIU_FM_MESSAGE_ARRAY_SIZE 30

Definition at line 23 of file fiusim.h.

#define SIU_FIU_ID 0x02

Definition at line 24 of file fiusim.h.

Referenced by siu_new_fiu(), and siu_open_fiu().

#define SIU_WORD_TO_MAU ( fnd_word_cnt ) ((fnd_word_cnt) * (16/TYP_TWORD_SIZE))

Definition at line 26 of file fiusim.h.

Referenced by siuNetInterface().

Typedef Documentation

typedef struct siuInst_s siuInst_t

Enumeration Type Documentation

enum siuFatalErrorChar_e

Enumerator:
SIU_EXCEPTION_FIU_DBG_FATAL_ERROR
SIU_EXCEPTION_FIU_DBG_DEFAULT
SIU_EXCEPTION_FIU_SIZES_ERR
SIU_EXCEPTION_FIU_BUFS_ERR
SIU_EXCEPTION_FIU_NEW_ERR
SIU_EXCEPTION_FIU_OPEN_ERR

Definition at line 50 of file fiusim.h.

Function Documentation

tulong siuGetTime ( void )

Definition at line 180 of file fiusim.c.

References systemTime.

tint siuNetInterface | ( | void * | targetInst,
 |  | xferpktInfo_t * | pktInfo
 | ) |  |

Definition at line 210 of file fiusim.c.

References faxNetProtocol, gw1ChNum, gw1RtpSeqNum, gw2ChNum, gw2RtpSeqNum, RTP_SEQNUM_OFFSET, SIU_WORD_TO_MAU, and siuInst.

Referenced by siu_open_fiu().

tint siuFmInterface | ( | void * | targetInst,
 |  | void * | message
 | ) |  |

void siuCleardownFax | ( | void * | targetInst,
 |  | tuint | TermCode
 | ) |  |

void siuDebugInfo | ( | void * | moduleID,
 |  | tuint | msgType,
 |  | tuint | msgCode,
 |  | tuint | msgLength,
 |  | tuint * | supportingData
 | ) |  |

Definition at line 866 of file fiusim.c.

References fiuDebugTraceParser(), prevTime, SIU_EXCEPTION_FIU_DBG_DEFAULT, SIU_EXCEPTION_FIU_DBG_FATAL_ERROR, and siuFatalError().

Here is the call graph for this function:

void siuFatalError | ( | tuint | id,
 |  | char * | str
 | ) |  |

Definition at line 940 of file fiusim.c.

References siuFatalString.

Referenced by siu_new_fiu(), siu_open_fiu(), and siuDebugInfo().

void siu_init ( tint chnum )

Definition at line 1000 of file fiusim.c.

References siuInst_s::aux_heap_size, siuInst_s::fiu_heap_size, siuInst_s::fiuBufs, siuInst_s::fiuInst, siuInst_s::fiuNbufs, and siuInst.

Referenced by main().

void siu_new_fiu ( tint chnum )

Definition at line 1025 of file fiusim.c.

References siuInst_s::aux_heap_size, siuInst_s::fiu_heap_size, siuInst_s::fiuBufs, siuInst_s::fiuInst, siuInst_s::fiuNbufs, SIU_EXCEPTION_FIU_NEW_ERR, SIU_EXCEPTION_FIU_SIZES_ERR, SIU_FIU_ID, siuFatalError(), and siuInst.

Referenced by main().

Here is the call graph for this function:

void siu_open_fiu ( tint chnum )

Definition at line 1097 of file fiusim.c.

References faxNetCallTblPtr, faxNetProtocol, siuInst_s::fiuInst, gFrameSize, SIU_EXCEPTION_FIU_OPEN_ERR, SIU_FIU_ID, siuFatalError(), siuFaxEventHandler(), siuG3FmInterface(), siuInst, and siuNetInterface().

Referenced by main().

Here is the call graph for this function:

void siu_close_fiu ( tint chnum )

Definition at line 1173 of file fiusim.c.

References siuInst_s::fiuInst, and siuInst.

Referenced by main().

void siu_delete_fiu ( tint chnum )

Definition at line 1193 of file fiusim.c.

References siuInst_s::aux_heap_size, siuInst_s::fiu_heap_size, siuInst_s::fiuBufs, siuInst_s::fiuInst, siuInst_s::fiuNbufs, and siuInst.

Referenced by main().

void siuCriticalSectionBegin ( void )

Definition at line 963 of file fiusim.c.

void siuCriticalSectionEnd ( void )

Definition at line 980 of file fiusim.c.

Variable Documentation

fiuNetCallTbl_t faxNetProtocolT38

fiuNetCallTbl_t faxNetProtocolT3

fiuNetCallTbl_t faxNetProtocolAal2

fiuNetCallTbl_t faxNetProtocolFrf11


FIU Test: fiusim.h Source File

fiusim.h

Go to the documentation of this file.
00001 #ifndef _FIUSIM_H
00002 #define _FIUSIM_H
00003 /******************************************************************************
00004  * FILE PURPOSE: Common system-specific definitions
00005  ******************************************************************************
00006  * FILE NAME: fiusim.h
00007  *
00008  * DESCRIPTION: This header file contains common system-specific data definitions,
00009  *              and global definitions.
00010  *
00011  * (C) Copyright 2003 TELOGY Networks, Inc.
00012  *****************************************************************************/
00013 #include <string.h>
00014 #include <stdlib.h>
00015 #include <ti/mas/types/types.h>
00016 #include <ti/mas/iface/ifpkt/ifpkt.h>
00017 #include <ti/mas/util/utl.h>
00018 #include <ti/mas/util/pkt.h>
00019 #include <ti/mas/fiu/fiu.h>
00020 #include <ti/mas/util/ecomem.h>
00021
00022 #define SIU_NUMBER_OF_CHANNELS    2
00023 #define SIU_FM_MESSAGE_ARRAY_SIZE 30
00024 #define SIU_FIU_ID                0x02
00025
00026 #define SIU_WORD_TO_MAU(fnd_word_cnt) ((fnd_word_cnt) * (16/TYP_TWORD_SIZE))
00027
00028 /******************************************************************************
00029  * GLOBAL STRUCTURE AND ENUMERATION DEFINITIONS
00030  *****************************************************************************/
00031
00032 /* Global SIU instance structure */
00033 typedef struct siuInst_s {
00034    /* FIU elements */
00035    void        *fiuInst;       /* FIU instance pointer */
00036    ecomemBuffer_t *fiuBufs;       /* Pointer to base of FIU buffer space */
00037    tint         fiuNbufs;      /* Number of allocated FIU buffers */
00038    tint         fiu_heap_size; /* Heap allocation for FIU */
00039    /* Other elements */
00040    tint         aux_heap_size; /* Auxiliary heap allocation */
00041 } siuInst_t;
00042
00043 /* Global fax call table declarations */
00044 extern fiuNetCallTbl_t faxNetProtocolT38;
00045 extern fiuNetCallTbl_t faxNetProtocolT3;
00046 extern fiuNetCallTbl_t faxNetProtocolAal2;
00047 extern fiuNetCallTbl_t faxNetProtocolFrf11;
00048
00049 /* Global exception char enumeration */
00050 typedef enum {
00051    SIU_EXCEPTION_FIU_DBG_FATAL_ERROR,
00052    SIU_EXCEPTION_FIU_DBG_DEFAULT,
00053    SIU_EXCEPTION_FIU_SIZES_ERR,
00054    SIU_EXCEPTION_FIU_BUFS_ERR,
00055    SIU_EXCEPTION_FIU_NEW_ERR,
00056    SIU_EXCEPTION_FIU_OPEN_ERR
00057 } siuFatalErrorChar_e;
00058
00059 /******************************************************************************
00060  * GLOBAL FUNCTION DECLARATIONS
00061  *****************************************************************************/
00062
00063 tulong siuGetTime              (void);
00064 tint   siuNetInterface         (void *targetInst, xferpktInfo_t *pktInfo);
00065 tint   siuFmInterface          (void *targetInst, void *message);
00066 void   siuCleardownFax         (void *targetInst, tuint TermCode);
00067 void   siuDebugInfo            (void *moduleID, tuint msgType, tuint msgCode,
00068
00069
00070                                 tuint msgLength,  tuint *supportingData);
00071 void   siuFatalError           (tuint id, char *str);
00072 void   siu_init                (tint chnum);
00073 void   siu_new_fiu             (tint chnum);
00074 void   siu_open_fiu            (tint chnum);
00075 void   siu_close_fiu           (tint chnum);
00076 void   siu_delete_fiu          (tint chnum);
00077
00078
00079
00080 void   siuCriticalSectionBegin (void);
00081 void   siuCriticalSectionEnd   (void);
00082
00083 #endif /* _FIUSIM_H */
00084
00085 /* nothing past this point */
00086
00087


FIU 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:

  • aux_heap_size : siuInst_s
  • fiu_heap_size : siuInst_s
  • fiuBufs : siuInst_s
  • fiuInst : siuInst_s
  • fiuNbufs : siuInst_s


FIU Test: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables

  • aux_heap_size : siuInst_s
  • fiu_heap_size : siuInst_s
  • fiuBufs : siuInst_s
  • fiuInst : siuInst_s
  • fiuNbufs : siuInst_s


FIU Test: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • d
  • f
  • g
  • m
  • n
  • p
  • r
  • s

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

- d -

  • DATA_SEGMENT_SIZE_BYTES : fiusim.c

- f -

  • faxNetCallTblPtr : fiusim.c
  • faxNetProtocol : fiusim.c
  • faxNetProtocolAal2 : fiusim.h
  • faxNetProtocolFrf11 : fiusim.h
  • faxNetProtocolT3 : fiusim.h
  • faxNetProtocolT38 : fiusim.h
  • fDISSent : fiusim.c
  • fG3FaxECM : fiusim.c
  • fiuContext : fiusim.c
  • fiuDebugGetAAL2DecoderState() : fiuDebugTraceParser.c
  • fiuDebugGetAAL2PacketType() : fiuDebugTraceParser.c
  • fiuDebugGetCleardownReason() : fiuDebugTraceParser.c
  • fiuDebugGetFCF() : fiuDebugTraceParser.c
  • fiuDebugGetFCF2() : fiuDebugTraceParser.c
  • fiuDebugGetFRF11DecoderState() : fiuDebugTraceParser.c
  • fiuDebugGetFRF11PacketType() : fiuDebugTraceParser.c
  • fiuDebugGetFRP2FNDMsg() : fiuDebugTraceParser.c
  • fiuDebugGetFRPState() : fiuDebugTraceParser.c
  • fiuDebugGetIFPHeader() : fiuDebugTraceParser.c
  • fiuDebugGetMDEvent() : fiuDebugTraceParser.c
  • fiuDebugGetNetEvent() : fiuDebugTraceParser.c
  • fiuDebugGetNetProtocol() : fiuDebugTraceParser.c
  • fiuDebugGetPT() : fiuDebugTraceParser.c
  • fiuDebugGetSLPPageMode() : fiuDebugTraceParser.c
  • fiuDebugGetSwitchoverReason() : fiuDebugTraceParser.c
  • fiuDebugGetT2PDecoderState() : fiuDebugTraceParser.c
  • fiuDebugGetT2PLineState() : fiuDebugTraceParser.c
  • fiuDebugGetT38UDecoderState() : fiuDebugTraceParser.c
  • fiuDebugGetT38UException() : fiuDebugTraceParser.c
  • fiuDebugGetTimerEvent() : fiuDebugTraceParser.c
  • fiuDebugGetToneId() : fiuDebugTraceParser.c
  • fiuDebugTraceParser() : fiuDebugTraceParser.c , fiusim.c
  • fiuMsgString : fiuDebugTraceParser.c
  • fiuSimCreateFmFpDataMsgs() : fiusim.c
  • fLoop : fiusim.c
  • FM_FP_HS_DATA_MSG_SIZE_BYTES : fiusim.c
  • FM_FP_HS_DATA_MSG_SIZE_WORDS : fiusim.c
  • FM_FP_LS_CFR_MSG_SIZE_BYTES : fiusim.c
  • FM_FP_LS_CFR_MSG_SIZE_WORDS : fiusim.c
  • FM_FP_LS_DCN_MSG_SIZE_BYTES : fiusim.c
  • FM_FP_LS_DCN_MSG_SIZE_WORDS : fiusim.c
  • FM_FP_LS_DCS_MSG_SIZE_BYTES : fiusim.c
  • FM_FP_LS_DCS_MSG_SIZE_WORDS : fiusim.c
  • FM_FP_LS_DCS_NONECM_MSG_SIZE_BYTES : fiusim.c
  • FM_FP_LS_DCS_NONECM_MSG_SIZE_WORDS : fiusim.c
  • FM_FP_LS_DIS_MSG_SIZE_BYTES : fiusim.c
  • FM_FP_LS_DIS_MSG_SIZE_WORDS : fiusim.c
  • FM_FP_LS_DIS_NONECM_MSG_SIZE_BYTES : fiusim.c
  • FM_FP_LS_DIS_NONECM_MSG_SIZE_WORDS : fiusim.c
  • FM_FP_LS_EOP_MSG_SIZE_BYTES : fiusim.c
  • FM_FP_LS_EOP_MSG_SIZE_WORDS : fiusim.c
  • FM_FP_LS_MCF_MSG_SIZE_BYTES : fiusim.c
  • FM_FP_LS_MCF_MSG_SIZE_WORDS : fiusim.c
  • FM_FP_LS_PPS_EOP_MSG_SIZE_BYTES : fiusim.c
  • FM_FP_LS_PPS_EOP_MSG_SIZE_WORDS : fiusim.c
  • FmFpHsData : fiusim.c
  • FmFpLsCFRMsg : fiusim.c
  • FmFpLsDCNMsg : fiusim.c
  • FmFpLsDCSMsg : fiusim.c
  • FmFpLsDCSNonECMMsg : fiusim.c
  • FmFpLsDISMsg : fiusim.c
  • FmFpLsDISNonECMMsg : fiusim.c
  • FmFpLsEOPMsg : fiusim.c
  • FmFpLsMCFMsg : fiusim.c
  • FmFpLsPPS_EOPMsg : fiusim.c

- g -

  • gFrameSize : fiusim.c
  • gw1ChNum : fiusim.c
  • gw1DataIndex : fiusim.c
  • gw1FaxStats : fiusim.c
  • gw1FmFpMsgInIndex : fiusim.c
  • gw1FmFpMsgOutIndex : fiusim.c
  • gw1FmMsg : fiusim.c
  • gw1RtpSeqNum : fiusim.c
  • gw1RxData : fiusim.c
  • gw1RxDataIndex : fiusim.c
  • gw2ChNum : fiusim.c
  • gw2DataIndex : fiusim.c
  • gw2FaxStats : fiusim.c
  • gw2FmFpMsgInIndex : fiusim.c
  • gw2FmFpMsgOutIndex : fiusim.c
  • gw2FmMsg : fiusim.c
  • gw2RtpSeqNum : fiusim.c
  • gw2RxData : fiusim.c
  • gw2RxDataIndex : fiusim.c

- m -

  • main() : fiusim.c
  • msgTimestamp : fiusim.c

- n -

  • numCleardownMsg : fiusim.c

- p -

  • prevTime : fiusim.c

- r -

  • RTP_SEQNUM_OFFSET : fiusim.c

- s -

  • siu_close_fiu() : fiusim.c , fiusim.h
  • siu_delete_fiu() : fiusim.h , fiusim.c
  • SIU_EXCEPTION_FIU_BUFS_ERR : fiusim.h
  • SIU_EXCEPTION_FIU_DBG_DEFAULT : fiusim.h
  • SIU_EXCEPTION_FIU_DBG_FATAL_ERROR : fiusim.h
  • SIU_EXCEPTION_FIU_NEW_ERR : fiusim.h
  • SIU_EXCEPTION_FIU_OPEN_ERR : fiusim.h
  • SIU_EXCEPTION_FIU_SIZES_ERR : fiusim.h
  • SIU_FIU_ID : fiusim.h
  • SIU_FM_MESSAGE_ARRAY_SIZE : fiusim.h
  • siu_init() : fiusim.h , fiusim.c
  • siu_new_fiu() : fiusim.h , fiusim.c
  • SIU_NUMBER_OF_CHANNELS : fiusim.h
  • siu_open_fiu() : fiusim.h , fiusim.c
  • SIU_WORD_TO_MAU : fiusim.h
  • siuCleardownFax() : fiusim.h
  • siuCriticalSectionBegin() : fiusim.h , fiusim.c
  • siuCriticalSectionEnd() : fiusim.c , fiusim.h
  • siuDebugInfo() : fiusim.h , fiusim.c
  • siuFatalError() : fiusim.c , fiusim.h
  • siuFatalErrorChar_e : fiusim.h
  • siuFatalString : fiusim.c
  • siuFaxEventHandler() : fiusim.c
  • siuFmInterface() : fiusim.h
  • siuG3FmInterface() : fiusim.c
  • siuGetTime() : fiusim.h , fiusim.c
  • siuInst : fiusim.c
  • siuInst_t : fiusim.h
  • siuNetInterface() : fiusim.c , fiusim.h
  • systemTime : fiusim.c


FIU Test: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines

  • DATA_SEGMENT_SIZE_BYTES : fiusim.c
  • FM_FP_HS_DATA_MSG_SIZE_BYTES : fiusim.c
  • FM_FP_HS_DATA_MSG_SIZE_WORDS : fiusim.c
  • FM_FP_LS_CFR_MSG_SIZE_BYTES : fiusim.c
  • FM_FP_LS_CFR_MSG_SIZE_WORDS : fiusim.c
  • FM_FP_LS_DCN_MSG_SIZE_BYTES : fiusim.c
  • FM_FP_LS_DCN_MSG_SIZE_WORDS : fiusim.c
  • FM_FP_LS_DCS_MSG_SIZE_BYTES : fiusim.c
  • FM_FP_LS_DCS_MSG_SIZE_WORDS : fiusim.c
  • FM_FP_LS_DCS_NONECM_MSG_SIZE_BYTES : fiusim.c
  • FM_FP_LS_DCS_NONECM_MSG_SIZE_WORDS : fiusim.c
  • FM_FP_LS_DIS_MSG_SIZE_BYTES : fiusim.c
  • FM_FP_LS_DIS_MSG_SIZE_WORDS : fiusim.c
  • FM_FP_LS_DIS_NONECM_MSG_SIZE_BYTES : fiusim.c
  • FM_FP_LS_DIS_NONECM_MSG_SIZE_WORDS : fiusim.c
  • FM_FP_LS_EOP_MSG_SIZE_BYTES : fiusim.c
  • FM_FP_LS_EOP_MSG_SIZE_WORDS : fiusim.c
  • FM_FP_LS_MCF_MSG_SIZE_BYTES : fiusim.c
  • FM_FP_LS_MCF_MSG_SIZE_WORDS : fiusim.c
  • FM_FP_LS_PPS_EOP_MSG_SIZE_BYTES : fiusim.c
  • FM_FP_LS_PPS_EOP_MSG_SIZE_WORDS : fiusim.c
  • RTP_SEQNUM_OFFSET : fiusim.c
  • SIU_FIU_ID : fiusim.h
  • SIU_FM_MESSAGE_ARRAY_SIZE : fiusim.h
  • SIU_NUMBER_OF_CHANNELS : fiusim.h
  • SIU_WORD_TO_MAU : fiusim.h


FIU Test: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines

  • siuFatalErrorChar_e : fiusim.h


FIU Test: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines

  • SIU_EXCEPTION_FIU_BUFS_ERR : fiusim.h
  • SIU_EXCEPTION_FIU_DBG_DEFAULT : fiusim.h
  • SIU_EXCEPTION_FIU_DBG_FATAL_ERROR : fiusim.h
  • SIU_EXCEPTION_FIU_NEW_ERR : fiusim.h
  • SIU_EXCEPTION_FIU_OPEN_ERR : fiusim.h
  • SIU_EXCEPTION_FIU_SIZES_ERR : fiusim.h


FIU Test: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • f
  • m
  • s

- f -

  • fiuDebugGetAAL2DecoderState() : fiuDebugTraceParser.c
  • fiuDebugGetAAL2PacketType() : fiuDebugTraceParser.c
  • fiuDebugGetCleardownReason() : fiuDebugTraceParser.c
  • fiuDebugGetFCF() : fiuDebugTraceParser.c
  • fiuDebugGetFCF2() : fiuDebugTraceParser.c
  • fiuDebugGetFRF11DecoderState() : fiuDebugTraceParser.c
  • fiuDebugGetFRF11PacketType() : fiuDebugTraceParser.c
  • fiuDebugGetFRP2FNDMsg() : fiuDebugTraceParser.c
  • fiuDebugGetFRPState() : fiuDebugTraceParser.c
  • fiuDebugGetIFPHeader() : fiuDebugTraceParser.c
  • fiuDebugGetMDEvent() : fiuDebugTraceParser.c
  • fiuDebugGetNetEvent() : fiuDebugTraceParser.c
  • fiuDebugGetNetProtocol() : fiuDebugTraceParser.c
  • fiuDebugGetPT() : fiuDebugTraceParser.c
  • fiuDebugGetSLPPageMode() : fiuDebugTraceParser.c
  • fiuDebugGetSwitchoverReason() : fiuDebugTraceParser.c
  • fiuDebugGetT2PDecoderState() : fiuDebugTraceParser.c
  • fiuDebugGetT2PLineState() : fiuDebugTraceParser.c
  • fiuDebugGetT38UDecoderState() : fiuDebugTraceParser.c
  • fiuDebugGetT38UException() : fiuDebugTraceParser.c
  • fiuDebugGetTimerEvent() : fiuDebugTraceParser.c
  • fiuDebugGetToneId() : fiuDebugTraceParser.c
  • fiuDebugTraceParser() : fiusim.c , fiuDebugTraceParser.c
  • fiuSimCreateFmFpDataMsgs() : fiusim.c

- m -

  • main() : fiusim.c

- s -

  • siu_close_fiu() : fiusim.c , fiusim.h
  • siu_delete_fiu() : fiusim.c , fiusim.h
  • siu_init() : fiusim.h , fiusim.c
  • siu_new_fiu() : fiusim.h , fiusim.c
  • siu_open_fiu() : fiusim.c , fiusim.h
  • siuCleardownFax() : fiusim.h
  • siuCriticalSectionBegin() : fiusim.c , fiusim.h
  • siuCriticalSectionEnd() : fiusim.c , fiusim.h
  • siuDebugInfo() : fiusim.h , fiusim.c
  • siuFatalError() : fiusim.h , fiusim.c
  • siuFaxEventHandler() : fiusim.c
  • siuFmInterface() : fiusim.h
  • siuG3FmInterface() : fiusim.c
  • siuGetTime() : fiusim.h , fiusim.c
  • siuNetInterface() : fiusim.h , fiusim.c


FIU Test: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines

  • siuInst_t : fiusim.h


FIU Test: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • f
  • g
  • m
  • n
  • p
  • s

- f -

  • faxNetCallTblPtr : fiusim.c
  • faxNetProtocol : fiusim.c
  • faxNetProtocolAal2 : fiusim.h
  • faxNetProtocolFrf11 : fiusim.h
  • faxNetProtocolT3 : fiusim.h
  • faxNetProtocolT38 : fiusim.h
  • fDISSent : fiusim.c
  • fG3FaxECM : fiusim.c
  • fiuContext : fiusim.c
  • fiuMsgString : fiuDebugTraceParser.c
  • fLoop : fiusim.c
  • FmFpHsData : fiusim.c
  • FmFpLsCFRMsg : fiusim.c
  • FmFpLsDCNMsg : fiusim.c
  • FmFpLsDCSMsg : fiusim.c
  • FmFpLsDCSNonECMMsg : fiusim.c
  • FmFpLsDISMsg : fiusim.c
  • FmFpLsDISNonECMMsg : fiusim.c
  • FmFpLsEOPMsg : fiusim.c
  • FmFpLsMCFMsg : fiusim.c
  • FmFpLsPPS_EOPMsg : fiusim.c

- g -

  • gFrameSize : fiusim.c
  • gw1ChNum : fiusim.c
  • gw1DataIndex : fiusim.c
  • gw1FaxStats : fiusim.c
  • gw1FmFpMsgInIndex : fiusim.c
  • gw1FmFpMsgOutIndex : fiusim.c
  • gw1FmMsg : fiusim.c
  • gw1RtpSeqNum : fiusim.c
  • gw1RxData : fiusim.c
  • gw1RxDataIndex : fiusim.c
  • gw2ChNum : fiusim.c
  • gw2DataIndex : fiusim.c
  • gw2FaxStats : fiusim.c
  • gw2FmFpMsgInIndex : fiusim.c
  • gw2FmFpMsgOutIndex : fiusim.c
  • gw2FmMsg : fiusim.c
  • gw2RtpSeqNum : fiusim.c
  • gw2RxData : fiusim.c
  • gw2RxDataIndex : fiusim.c

- m -

  • msgTimestamp : fiusim.c

- n -

  • numCleardownMsg : fiusim.c

- p -

  • prevTime : fiusim.c

- s -

  • siuFatalString : fiusim.c
  • siuInst : fiusim.c
  • systemTime : fiusim.c


FIU Test: FIU Test Package

FIU Test Package

Page Contents

  • Introduction
  • Unit Test Build Procedure
  • Unit Test Preparation
  • Test Procedure
  • Profiling Output
  • Further Information

Introduction

This package contains a basic test for FIU (Fax Interface Module) module. This is not a regression test, its purpose is to show how FIU may be used in a system and to be able to play with the configuration, so that learning is easier.

Unit Test Build Procedure

  1. Follow the build procedure in the main FIU doumentation.
  2. Change directory to fiu/test
  3. Build test using the XDC commands provided in the main FIU documentation

Note:
This procedure applies to source deliveries only.

Unit Test Preparation

  1. Follow the build procedure outlined above in Unit Test Build Procedure.
  2. Configure CCS for appropriate target simulator/emulator.
  3. Open CCS and locate the exectuable image for the target of interest. The image files are located in the ti\mas\fiu\test\lnkr\c<rtarg> directories (see Table 1 below).
  4. Load executable *.x<rtarg> and go to main().
  5. Follow Test Procedure.

In the and <rtarg> represents the target platform using the RTSC naming convention (see Table 2 below).

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

Test Procedure

  1. Allow the target to run to completion.
  2. You should see all the T.30 Msg exchanged between two gateways.

Profiling Output

Note:
See the MIPS and Memory section in the main FIU documentation for current profiling results.

Further Information

  • Revision History
  • Dependent Packages


FIU Test: Page Index

FIU Test Related Pages

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


FIU Test: Revision History

FIU Test Package

Revision History

Revision History

Version | Comments
1.0.0.0 | Initial Version


FIU Test: siuInst_s Struct Reference

  • Data Structures
  • Data Fields

siuInst_s Struct Reference

#include <fiusim.h>

Detailed Description

Definition at line 33 of file fiusim.h.

Data Fields

void * | fiuInst
ecomemBuffer_t * | fiuBufs
tint | fiuNbufs
tint | fiu_heap_size
tint | aux_heap_size

Field Documentation

void* siuInst_s::fiuInst

Definition at line 35 of file fiusim.h.

Referenced by siu_close_fiu(), siu_delete_fiu(), siu_init(), siu_new_fiu(), and siu_open_fiu().

ecomemBuffer_t* siuInst_s::fiuBufs

Definition at line 36 of file fiusim.h.

Referenced by siu_delete_fiu(), siu_init(), and siu_new_fiu().

tint siuInst_s::fiuNbufs

Definition at line 37 of file fiusim.h.

Referenced by siu_delete_fiu(), siu_init(), and siu_new_fiu().

tint siuInst_s::fiu_heap_size

Definition at line 38 of file fiusim.h.

Referenced by siu_delete_fiu(), siu_init(), and siu_new_fiu().

tint siuInst_s::aux_heap_size

Definition at line 40 of file fiusim.h.

Referenced by siu_delete_fiu(), siu_init(), and siu_new_fiu().

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


FM: Version.h File Reference

Version.h File Reference

Go to the source code of this file.

Defines

#define | ti_mas_fm_Version__top__
#define | __extern extern
#define | ti_mas_fm_Version___VERS 150
#define | ti_mas_fm_Version_MAJOR (3)
#define | ti_mas_fm_Version_MINOR (0)
#define | ti_mas_fm_Version_XVERTICAL (0)
#define | ti_mas_fm_Version_PATCH (1)
#define | ti_mas_fm_Version_BUILD (2)
#define | ti_mas_fm_Version_QUALITY (3)
#define | ti_mas_fm_Version_BTYPE (0)
#define | ti_mas_fm_Version_WIDTH (0)
#define | Version_MAJOR ti_mas_fm_Version_MAJOR
#define | Version_MINOR ti_mas_fm_Version_MINOR
#define | Version_XVERTICAL ti_mas_fm_Version_XVERTICAL
#define | Version_PATCH ti_mas_fm_Version_PATCH
#define | Version_BUILD ti_mas_fm_Version_BUILD
#define | Version_QUALITY ti_mas_fm_Version_QUALITY
#define | Version_BTYPE ti_mas_fm_Version_BTYPE
#define | Version_WIDTH ti_mas_fm_Version_WIDTH

Define Documentation

#define ti_mas_fm_Version__top__

Definition at line 27 of file Version.h.

#define __extern extern

Definition at line 33 of file Version.h.

#define ti_mas_fm_Version___VERS 150

Definition at line 36 of file Version.h.

#define ti_mas_fm_Version_MAJOR (3)

Definition at line 50 of file Version.h.

#define ti_mas_fm_Version_MINOR (0)

Definition at line 53 of file Version.h.

#define ti_mas_fm_Version_XVERTICAL (0)

Definition at line 56 of file Version.h.

#define ti_mas_fm_Version_PATCH (1)

Definition at line 59 of file Version.h.

#define ti_mas_fm_Version_BUILD (2)

Definition at line 62 of file Version.h.

#define ti_mas_fm_Version_QUALITY (3)

Definition at line 65 of file Version.h.

#define ti_mas_fm_Version_BTYPE (0)

Definition at line 68 of file Version.h.

#define ti_mas_fm_Version_WIDTH (0)

Definition at line 71 of file Version.h.

#define Version_MAJOR ti_mas_fm_Version_MAJOR

Definition at line 90 of file Version.h.

#define Version_MINOR ti_mas_fm_Version_MINOR

Definition at line 91 of file Version.h.

#define Version_XVERTICAL ti_mas_fm_Version_XVERTICAL

Definition at line 92 of file Version.h.

#define Version_PATCH ti_mas_fm_Version_PATCH

Definition at line 93 of file Version.h.

#define Version_BUILD ti_mas_fm_Version_BUILD

Definition at line 94 of file Version.h.

#define Version_QUALITY ti_mas_fm_Version_QUALITY

Definition at line 95 of file Version.h.

#define Version_BTYPE ti_mas_fm_Version_BTYPE

Definition at line 96 of file Version.h.

#define Version_WIDTH ti_mas_fm_Version_WIDTH

Definition at line 97 of file Version.h.


FM: Version.h Source File

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_fm_Version__include
00023 #define ti_mas_fm_Version__include
00024
00025 #ifndef __nested__
00026 #define __nested__
00027 #define ti_mas_fm_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_fm_Version___VERS 150
00037
00038
00039 /*
00040  * ======== INCLUDES ========
00041  */
00042
00043
00044
00045 /*
00046  * ======== AUXILIARY DEFINITIONS ========
00047  */
00048
00049 /* MAJOR */
00050 #define ti_mas_fm_Version_MAJOR (3)
00051
00052 /* MINOR */
00053 #define ti_mas_fm_Version_MINOR (0)
00054
00055 /* XVERTICAL */
00056 #define ti_mas_fm_Version_XVERTICAL (0)
00057
00058 /* PATCH */
00059 #define ti_mas_fm_Version_PATCH (1)
00060
00061 /* BUILD */
00062 #define ti_mas_fm_Version_BUILD (2)
00063
00064 /* QUALITY */
00065 #define ti_mas_fm_Version_QUALITY (3)
00066
00067 /* BTYPE */
00068 #define ti_mas_fm_Version_BTYPE (0)
00069
00070 /* WIDTH */
00071 #define ti_mas_fm_Version_WIDTH (0)
00072
00073 /*
00074  * ======== EPILOGUE ========
00075  */
00076
00077 #ifdef ti_mas_fm_Version__top__
00078 #undef __nested__
00079 #endif
00080
00081 #endif /* ti_mas_fm_Version__include */
00082
00083 /*
00084  * ======== PREFIX ALIASES ========
00085  */
00086
00087 #if !defined(__nested__) && !defined(ti_mas_fm_Version__nolocalnames)
00088
00089 /* module prefix */
00090 #define Version_MAJOR      ti_mas_fm_Version_MAJOR
00091 #define Version_MINOR      ti_mas_fm_Version_MINOR
00092 #define Version_XVERTICAL  ti_mas_fm_Version_XVERTICAL
00093 #define Version_PATCH      ti_mas_fm_Version_PATCH
00094 #define Version_BUILD      ti_mas_fm_Version_BUILD
00095 #define Version_QUALITY    ti_mas_fm_Version_QUALITY
00096 #define Version_BTYPE      ti_mas_fm_Version_BTYPE
00097 #define Version_WIDTH      ti_mas_fm_Version_WIDTH
00098 #endif


FM: ade_init.c File Reference

ade_init.c File Reference

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

Include dependency graph for ade_init.c:

Go to the source code of this file.

Functions

void dpu_adeq_init (dpu_adeq_t *inst, int beta, int length)

Function Documentation

void dpu_adeq_init | ( | dpu_adeq_t * | inst,
 |  | int | beta,
 |  | int | length
 | ) |  |

Definition at line 37 of file ade_init.c.

References dpu_adeq_t::beta, dpu_adeq_t::cf_im_long, dpu_adeq_t::cf_re_long, dpu_adeq_t::delay_im, dpu_adeq_t::delay_re, DPU_ADEQ_COEF_LEN, DPU_ADEQ_DL_LEN, dpu_adeq_t::inpPostAdeqX, dpu_adeq_t::inpPostAdeqY, dpu_adeq_t::length, dpu_adeq_t::postAdeqGain, dpu_adeq_t::postAdeqStepSiz, dpu_adeq_t::postAdeqUpdateFlag, Q12_SCALE, Q14_SCALE, and dpu_adeq_t::updateAdeqFlag.

Referenced by HSrxCommonSt1Init(), v27RxSt34Init(), and v29RxSt34Init().


FM: ade_init.c Source File

ade_init.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE:
00003  ******************************************************************************
00004  * FILE NAME:
00005  *
00006  * DESCRIPTION:
00007  *
00008  * TABS: NONE
00009  *
00010  * $Id: ade_init.c 1.3 2000/03/21 22:51:02 jwright Exp $
00011  *
00012  * REVISION HISTORY:
00013  *
00014  * $Log: ade_init.c $
00015  * Revision 1.3  2000/03/21 22:51:02  jwright
00016  * Clear up 3.50 compile warning.
00017  * Revision 1.2  1998/01/30 14:13:35  PPATEL
00018  *   Single-tap equalizer added after the main equalizer for compensating
00019  * gain changes for short training in V.17. Has been verified to compensate
00020  * for +/- 3 dB gain changes from long training to short training.
00021  * Revision 1.1  1997/11/21 14:48:12  PPATEL
00022  * Initial revision
00023  *
00024  * (C) Copyright 1997, TELOGY Networks, Inc.
00025  *****************************************************************************/
00026
00027 #include <ti/mas/types/types.h>
00028 #include "dpu_adeq.h"
00029
00030 /******************************************************************************
00031  * FUNCTION PURPOSE:  adaptive equalizer initialize
00032  ******************************************************************************
00033  * DESCRIPTION: adaptive equalizer initialize
00034  *
00035  *****************************************************************************/
00036
00037 void dpu_adeq_init (dpu_adeq_t *inst, int beta, int length)
00038 {
00039   int i;
00040
00041   if (beta >0)
00042   {
00043     inst->beta = (Fract) beta;
00044   }
00045   inst->length = length;
00046
00047   if (beta < 0)
00048   {
00049     for (i=0; i<DPU_ADEQ_DL_LEN; i++)
00050     {
00051       inst->delay_re[i]=0;
00052       inst->delay_im[i]=0;
00053     }
00054     for (i=0; i<DPU_ADEQ_COEF_LEN; i++)  /* -1 */
00055     {
00056       inst->cf_re_long[i]  = 0;
00057       inst->cf_im_long[i]  = 0;
00058     }
00059   }
00060   /* equalizer update flag */
00061   inst->updateAdeqFlag = 1; /* default is to update */
00062
00063   /* post equalizer tap parameters initialization */
00064   inst->postAdeqGain       = (Fract)(1*Q12_SCALE); /* unity default gain */
00065   inst->postAdeqStepSiz    = (Fract)(0.5*Q14_SCALE);
00066   inst->postAdeqUpdateFlag = 0;   /* no update by default */
00067   inst->inpPostAdeqX           = 0;
00068   inst->inpPostAdeqY           = 0;
00069
00070 }


FM: ade_init.h File Reference

ade_init.h File Reference

#include "dpu_adeq.h"

Include dependency graph for ade_init.h:

Go to the source code of this file.

Functions

void dpu_adeq_init (dpu_adeq_t *inst, int beta, int length)

Function Documentation

void dpu_adeq_init | ( | dpu_adeq_t * | inst,
 |  | int | beta,
 |  | int | length
 | ) |  |

Definition at line 37 of file ade_init.c.


FM: ade_init.h Source File

ade_init.h

Go to the documentation of this file.
00001 #ifndef ADE_INIT_H
00002 #define ADE_INIT_H
00003 /******************************************************************************
00004  * FILE PURPOSE:
00005  ******************************************************************************
00006  * FILE NAME:
00007  *
00008  * DESCRIPTION:
00009  *
00010  * TABS: NONE
00011  *
00012  * $Id: ade_init.h 1.1 1997/11/21 14:48:13 PPATEL Exp $
00013  *
00014  * REVISION HISTORY:
00015  *
00016  * $Log: ade_init.h $
00017  * Revision 1.1  1997/11/21 14:48:13  PPATEL
00018  * Initial revision
00019  *
00020  * (C) Copyright 1997, TELOGY Networks, Inc.
00021  *****************************************************************************/
00022
00023 #include "dpu_adeq.h"
00024
00025 void dpu_adeq_init(dpu_adeq_t *inst, int beta, int length);
00026
00027 #endif
00028 /* nothing past this point */


FM: agcrx.c File Reference

agcrx.c File Reference

#include <ti/mas/types/types.h>
#include <ti/mas/fract/fract.h>
#include "dpu_agc.h"
#include "agcrx.h"
#include "fmprag.h"

Include dependency graph for agcrx.c:

Go to the source code of this file.

Functions

void dpu_agc (dpu_agc_t *inst, Fract *in, int samp, int n)

Function Documentation

void dpu_agc | ( | dpu_agc_t * | inst,
 |  | Fract * | in,
 |  | int | samp,
 |  | int | n
 | ) |  |

Definition at line 33 of file agcrx.c.

References dpu_agc_t::gain, and Q9_ROUND.

Referenced by HSrxCommonSt1Init(), and v21RxCommonInit().


FM: agcrx.c Source File

agcrx.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE:
00003  ******************************************************************************
00004  * FILE NAME:
00005  *
00006  * DESCRIPTION:
00007  *
00008  * TABS: NONE
00009  *
00010  * $Id: agcrx.c 1.1 1997/11/21 14:48:13 PPATEL Exp $
00011  *
00012  * REVISION HISTORY:
00013  *
00014  * $Log: agcrx.c $
00015  * Revision 1.1  1997/11/21 14:48:13  PPATEL
00016  * Initial revision
00017  *
00018  * (C) Copyright 1997, TELOGY Networks, Inc.
00019  *****************************************************************************/
00020 #include <ti/mas/types/types.h>
00021 #include <ti/mas/fract/fract.h>
00022 #include "dpu_agc.h"
00023 #include "agcrx.h"
00024 #include "fmprag.h"
00025
00026 /******************************************************************************
00027  * FUNCTION PURPOSE: AGC
00028  ******************************************************************************
00029  * DESCRIPTION: Auto gain controler
00030  *
00031  *****************************************************************************/
00032
00033 void  dpu_agc(dpu_agc_t *inst, Fract *in, int samp, int n)
00034 {
00035   int j, n1=n*samp;
00036
00037   for (j=0; j<samp; j++)
00038     in[n1+j] = frctLF2F(frctMul(in[n1+j],13, inst->gain, 9, 22)+Q9_ROUND, 22, 13);  /* +Q14_ROUND */
00039 }
00040


FM: agcrx.h File Reference

agcrx.h File Reference

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

Include dependency graph for agcrx.h:

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

Go to the source code of this file.

Functions

void dpu_agc (dpu_agc_t *inst, Fract *in, int samp, int n)

Function Documentation

void dpu_agc | ( | dpu_agc_t * | inst,
 |  | Fract * | in,
 |  | int | samp,
 |  | int | n
 | ) |  |

Definition at line 33 of file agcrx.c.

References dpu_agc_t::gain, and Q9_ROUND.

Referenced by HSrxCommonSt1Init(), and v21RxCommonInit().


FM: agcrx.h Source File

agcrx.h

Go to the documentation of this file.
00001 #ifndef AGCRX_H
00002 #define AGCRX_H
00003 /******************************************************************************
00004  * FILE PURPOSE:
00005  ******************************************************************************
00006  * FILE NAME:
00007  *
00008  * DESCRIPTION:
00009  *
00010  * TABS: NONE
00011  *
00012  * $Id: agcrx.h 1.1 1997/11/21 14:48:13 PPATEL Exp $
00013  *
00014  * REVISION HISTORY:
00015  *
00016  * $Log: agcrx.h $
00017  * Revision 1.1  1997/11/21 14:48:13  PPATEL
00018  * Initial revision
00019  *
00020  * (C) Copyright 1997, TELOGY Networks, Inc.
00021  *****************************************************************************/
00022 #include <ti/mas/types/types.h>
00023 #include "dpu_agc.h"
00024
00025 void dpu_agc(dpu_agc_t *inst, Fract *in, int samp, int n);
00026
00027 #endif
00028 /* nothing past this point */


FM: Data Structures

  • Data Structures
  • Data Fields

FM Data Structures

Here are the data structures with brief descriptions:
cd_thr_t |
cmplx_t |
commonTable1_sPtrs_t | Common Cluster-1 definitions
dpu_adeq_t |
dpu_agc_t |
dpu_bphilb_t |
dpu_cddet_t |
dpu_cdec_t |
dpu_cenc_t |
dpu_crec_t |
dpu_ddec_t |
dpu_denc_t |
dpu_descr_t |
dpu_dotdet_t |
dpu_fsk_gen_t |
dpu_inman_t |
dpu_interp_t |
dpu_mod_t |
dpu_outman_t |
dpu_phase_t |
dpu_scr_t |
dpu_shaping_bank_t |
dpu_shaping_t |
dpu_slic_t |
dpu_smap_t |
dpu_trec_bank_t |
dpu_trec_t |
dpu_v21_dec_t |
dpuCfg_t |
dpuIf_t |
dpuInst_s |
dpuNewCfg_t |
dpuRecvOut_t |
dpuRxInst_t |
dpuSendOut_t |
dpuSizeCfg_t |
dpuTxInst_t |
fm_ctrl_str |
fmContext_t | FM context Structure
fmInst_s |
fmNewConfig_t | FM New data structure
fmOpenConfig_t | Open Configuration structure
fmProtoStats_t | Statistics of protocol
fmReceiveOutSpec_t | Specification of fmReceiveOutSpec Object
fmSendOutSpec_t | Specification of fmSendOutSpec Object
fmSigQStats_t | Statistics of signal quality
fmStatsReport_t | FM Statistics Data Structure
fmTablePtrs_t | FM table Pointer structure
fmToneDetCtrlSpec_t | Specification of fmToneDetSpec Object
interp_params_t |
path_struct |
scaleFactors_t |
v17Table_sPtrs_t | V.17 Cluster definitions
v27Table_sPtrs_t | V.27 Cluster definitions
v29Table_sPtrs_t | V.29 Cluster definitions


FM: C55x Data Sheet

C55x Data Sheet

Copyright 2010, Texas Instruments Incorporated


FM: C64x+ Data Sheet

C64x+ Data Sheet

Copyright 2010, Texas Instruments Incorporated


FM: cdc_init.c File Reference

cdc_init.c File Reference

Go to the source code of this file.


FM: cdc_init.c Source File

cdc_init.c

Go to the documentation of this file.
00001 #ifdef V17
00002 /******************************************************************************
00003  * FILE PURPOSE:
00004  ******************************************************************************
00005  * FILE NAME:
00006  *
00007  * DESCRIPTION:
00008  *
00009  * TABS: NONE
00010  *
00011  * $Id: cdc_init.c 1.2 2000/03/21 22:44:28 jwright Exp $
00012  *
00013  * REVISION HISTORY:
00014  *
00015  * $Log: cdc_init.c $
00016  * Revision 1.2  2000/03/21 22:44:28  jwright
00017  * Clear up 3.50 compile warning.
00018  * Revision 1.1  1997/11/21 14:48:14  PPATEL
00019  * Initial revision
00020  *
00021  * (C) Copyright 1997, TELOGY Networks, Inc.
00022  *****************************************************************************/
00023
00024 #include <ti/mas/types/types.h>
00025 #include "dpu_cdec.h"
00026 #include "cdc_init.h"
00027 #include "v17.h"
00028 #include "v17rx.h"
00029
00030 void dpu_cdec_init (dpu_cdec_t *cdec_ptr, tuint shift_cnst, Fract alpha,
00031                     Fract division, dpu_smap_t *smap_ptr)
00032 {
00033   int i,j;
00034   path_t *path_store;
00035
00036   cdec_ptr->shift_cnst     = shift_cnst;
00037   cdec_ptr->alpha          = alpha;
00038   cdec_ptr->division       = division;
00039     cdec_ptr->smap_ptr       = smap_ptr;
00040
00041   cdec_ptr->accum_dist[0] = 0;
00042   for(i = 0; i < DPU_CDEC_DELAY_STATES; i++)
00043   {
00044     cdec_ptr->accum_dist[i] = (Fract)(MY_Q10_SCALE);
00045   }
00046
00047   /* create circular linked list */
00048   path_store = cdec_ptr->path_store;
00049   cdec_ptr->path_store_cur_ptr = path_store;
00050   for(i = 0; i < DPU_CDEC_VIT_DELAY; i++)
00051   {
00052         for(j = 0; j < DPU_CDEC_DELAY_STATES; j++)
00053         {
00054       path_store[i].path_and_delay[j] = 0;
00055         }
00056
00057     if (i == DPU_CDEC_VIT_DELAY -1)
00058     {
00059         path_store[i].prev_path_pt = &path_store[0];
00060     }
00061     else
00062     {
00063         path_store[i].prev_path_pt = &path_store[i+1];
00064     }
00065     path_store[i].const_point.re  =   0;
00066     path_store[i].const_point.im  =   0;
00067   }
00068
00069    switch (shift_cnst)
00070    {
00071      case 16 : cdec_ptr->slice0167_fcn_ptr = V17_slice0167_144;
00072              cdec_ptr->slice2345_fcn_ptr = V17_slice2345_144;
00073              break;
00074    case  8 : cdec_ptr->slice0167_fcn_ptr = V17_slice0167_120;
00075              cdec_ptr->slice2345_fcn_ptr = V17_slice2345_120;
00076              break;
00077      case  4 : cdec_ptr->slice0167_fcn_ptr = V17_slice0167_96;
00078              cdec_ptr->slice2345_fcn_ptr = V17_slice2345_96;
00079              break;
00080      case  2 : cdec_ptr->slice0167_fcn_ptr = V17_slice0167_72;
00081              cdec_ptr->slice2345_fcn_ptr = V17_slice2345_72;
00082              break;
00083    }
00084
00085 }
00086 #endif
00087 /* Nothing past this point */


FM: cdc_init.h File Reference

cdc_init.h File Reference

#include <ti/mas/types/types.h>
#include "dpu_cdec.h"
#include "dpu_smap.h"

Include dependency graph for cdc_init.h:

Go to the source code of this file.

Functions

void dpu_cdec_init (dpu_cdec_t *cdec_ptr, tuint shift_cnst, Fract alpha, Fract division, dpu_smap_t *smap_ptr)

Function Documentation

void dpu_cdec_init | ( | dpu_cdec_t * | cdec_ptr,
 |  | tuint | shift_cnst,
 |  | Fract | alpha,
 |  | Fract | division,
 |  | dpu_smap_t * | smap_ptr
 | ) |  |


FM: cdc_init.h Source File

cdc_init.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE:
00003  ******************************************************************************
00004  * FILE NAME:
00005  *
00006  * DESCRIPTION:
00007  *
00008  * TABS: NONE
00009  *
00010  * $Id: cdc_init.h 1.1 1997/11/21 14:48:14 PPATEL Exp $
00011  *
00012  * REVISION HISTORY:
00013  *
00014  * $Log: cdc_init.h $
00015  * Revision 1.1  1997/11/21 14:48:14  PPATEL
00016  * Initial revision
00017  *
00018  * (C) Copyright 1997, TELOGY Networks, Inc.
00019  *****************************************************************************/
00020 #include <ti/mas/types/types.h>
00021 #include "dpu_cdec.h"
00022 #include "dpu_smap.h"
00023
00024 void dpu_cdec_init (dpu_cdec_t *cdec_ptr, tuint shift_cnst, Fract alpha, Fract division,
00025                 dpu_smap_t *smap_ptr);
00026
00027 /* nothing after this point */


FM: cdrx.c File Reference

cdrx.c File Reference

#include <ti/mas/types/types.h>
#include <ti/mas/fract/fract.h>
#include "dpu_cd.h"
#include "dpumath.h"
#include "fmport.h"
#include "fmprag.h"

Include dependency graph for cdrx.c:

Go to the source code of this file.

Defines

#define | SHIFTVAL 1

Functions

void | averagePow (LFract *pow, LFract *new_pow, Fract alpha, Fract division)
LFract | dpu_cd_det_util (dpu_cddet_t *inst, Fract *in, int n, int samp)
int | dpu_cd_det_hs_pwrlatch (dpu_cddet_t *inst, Fract *in, int samp, int n, Fract *gain, tint *rx_level)
int | dpu_cd_det_hs (dpu_cddet_t *inst, Fract *in, int samp, int n, Fract *gain, tint *rx_level)

Define Documentation

#define SHIFTVAL 1

Definition at line 90 of file cdrx.c.

Referenced by dpu_cd_det_hs().

Function Documentation

void averagePow | ( | LFract * | pow,
 |  | LFract * | new_pow,
 |  | Fract | alpha,
 |  | Fract | division
 | ) |  |

Definition at line 42 of file cdrx.c.

References frctMulDBL().

Referenced by dpu_cd_det_util(), and dpu_cd_det_v21().

Here is the call graph for this function:

LFract dpu_cd_det_util | ( | dpu_cddet_t * | inst,
 |  | Fract * | in,
 |  | int | n,
 |  | int | samp
 | ) |  |

Definition at line 54 of file cdrx.c.

References dpu_cddet_t::alpha, averagePow(), dpu_cddet_t::division, dot_square_asm(), and dpu_cddet_t::sig_pow.

Referenced by dpu_cd_det_hs(), and dpu_cd_det_hs_pwrlatch().

Here is the call graph for this function:

int dpu_cd_det_hs_pwrlatch | ( | dpu_cddet_t * | inst,
 |  | Fract * | in,
 |  | int | samp,
 |  | int | n,
 |  | Fract * | gain,
 |  | tint * | rx_level
 | ) |  |

Definition at line 74 of file cdrx.c.

References dpu_cd_det_util(), DPU_CD_FALSE, and dpu_cddet_t::power_sat.

Referenced by dpuHSrxSetCdParms(), and fmHSrxSetCdParms().

Here is the call graph for this function:

int dpu_cd_det_hs | ( | dpu_cddet_t * | inst,
 |  | Fract * | in,
 |  | int | samp,
 |  | int | n,
 |  | Fract * | gain,
 |  | tint * | rx_level
 | ) |  |

Definition at line 92 of file cdrx.c.

References dpu_cddet_t::carrLossPendingFlag, dpu_cddet_t::count, dpu_cddet_t::count_false_req, dpu_cd_det_util(), DPU_CD_FALSE, DPU_CD_TRUE, dpu_cddet_t::power_sat, SHIFTVAL, dpu_cddet_t::sig_pow, dpu_cddet_t::status, and dpu_cddet_t::v21_count.

Referenced by dpuHSrxSetCdParms(), and fmHSrxSetCdParms().

Here is the call graph for this function:


FM: cdrx.c Source File

cdrx.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE:
00003  ******************************************************************************
00004  * FILE NAME:
00005  *
00006  * DESCRIPTION:
00007  *
00008  * TABS: NONE
00009  *
00010  * $Id: cdrx.c 1.3 2000/03/21 22:40:02 jwright Exp $
00011  *
00012  * REVISION HISTORY:
00013  *
00014  * $Log: cdrx.c $
00015  * Revision 1.3  2000/03/21 22:40:02  jwright
00016  * Clear up 3.50 compile warnings.
00017  * Revision 1.2  1998/04/30 17:14:43  ppatel
00018  *  Changes for reporting modem status (timing offset, carrier freq offset,
00019  * snr, etc.)
00020  * Revision 1.1  1997/11/21 14:48:15  PPATEL
00021  * Initial revision
00022  *
00023  * (C) Copyright 1997, TELOGY Networks, Inc.
00024  *****************************************************************************/
00025 #include <ti/mas/types/types.h>
00026 #include <ti/mas/fract/fract.h>
00027
00028 /* DPU RX CD header file */
00029 #include "dpu_cd.h"
00030 #include "dpumath.h"
00031 #include "fmport.h"
00032 #include "fmprag.h"
00033
00034 /******************************************************************************
00035  * FUNCTION PURPOSE:
00036  ******************************************************************************
00037  * DESCRIPTION:
00038  *
00039  *****************************************************************************/
00040 /* averagePow computes the exponential average */
00041 /* inputs *new_pow in Q23, alpha and division in Q15 and output *pow in Q31 */
00042 void averagePow(LFract *pow, LFract *new_pow, Fract alpha, Fract division)
00043 {
00044  LFract tmp, tmp1;
00045
00046  tmp  = frctF2LF(division,15,31);
00047  tmp  = frctMulDBL(new_pow, &tmp);
00048  tmp  = frctAdjustQ(tmp,23,31);   /* now tmp can be converted to  a fraction */
00049  tmp1 = frctF2LF(alpha,15,31);
00050  tmp1 = frctMulDBL(pow,&tmp1);
00051  *pow = tmp + tmp1; /* sig_pow in Q31 */
00052 }
00053
00054 LFract dpu_cd_det_util(dpu_cddet_t *inst, Fract *in, int n, int samp)
00055 {
00056     LFract sig_pow[1];
00057     int n1=n*samp;
00058     *sig_pow = dot_square_asm(in+n1, samp-1);
00059
00060     /* Average the signal power */
00061     averagePow(&inst->sig_pow, sig_pow, inst->alpha, inst->division);
00062     return(inst->sig_pow);
00063 }
00064
00065
00066
00067 /******************************************************************************
00068  * FUNCTION PURPOSE: DPU carrier loss detector power sat estimator
00069  ******************************************************************************
00070  * DESCRIPTION: DPU carrier loss detector power saturation estimator
00071  *
00072  *****************************************************************************/
00073
00074 int dpu_cd_det_hs_pwrlatch(dpu_cddet_t *inst, Fract *in, int samp, int n,
00075                   Fract *gain, tint *rx_level)
00076 {
00077   inst->power_sat = dpu_cd_det_util(inst, in, n, samp);
00078
00079  /* We report Carrier True only during Data Mode, since it is training report */
00080  /* False */
00081   return(DPU_CD_FALSE);
00082 }
00083
00084 /******************************************************************************
00085  * FUNCTION PURPOSE: DPU carrier loss detector
00086  ******************************************************************************
00087  * DESCRIPTION: DPU carrier loss detector
00088  *
00089  *****************************************************************************/
00090 #define SHIFTVAL    1
00091
00092 int dpu_cd_det_hs(dpu_cddet_t *inst, Fract *in, int samp, int n,
00093                   Fract *gain, tint *rx_level)
00094 {
00095  dpu_cd_det_util(inst, in, n, samp);
00096
00097  /* Check if CD is 6dB below the power level latched during training */
00098  if (inst->sig_pow < (inst->power_sat >> (SHIFTVAL+1)))
00099  {
00100    inst->count += samp;
00101    if (inst->count > inst->count_false_req)
00102    {
00103      inst->status = DPU_CD_FALSE;
00104      /* reset counter for detecting CD detection */
00105      inst->count = 0;
00106    inst->v21_count = 0;
00107      return(DPU_CD_FALSE);
00108    }
00109    return(DPU_CD_TRUE);
00110  }
00111  else
00112  {
00113
00114       /* if signal power (saturated) falls 3 dB below saturation value, flag
00115          pending carrier loss
00116          NOTE: multiplication by shift is non portable across floating point
00117          ====  platforms  */
00118       if (inst->sig_pow < (inst->power_sat >> SHIFTVAL)) {
00119         inst->carrLossPendingFlag = TRUE;
00120       }
00121       else {
00122         inst->carrLossPendingFlag = FALSE;
00123       }
00124
00125    inst->count = 0;
00126    return(DPU_CD_TRUE);
00127  }
00128 }
00129
00130 /* nothing past this point */
00131


FM: cdrx.h File Reference

cdrx.h File Reference

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

Include dependency graph for cdrx.h:

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

Go to the source code of this file.

Functions

LFract | dpu_cd_det_util (dpu_cddet_t *inst, Fract *in, int n, int samp)
void | averagePow (LFract *pow, LFract *new_pow, Fract alpha, Fract division)
int | dpu_cd_det_hs (dpu_cddet_t *inst, Fract *in, int samp, int n, Fract *gain, tint *rx_level)
int | dpu_cd_det_hs_pwrlatch (dpu_cddet_t *inst, Fract *in, int samp, int n, Fract *gain, tint *rx_level)

Function Documentation

LFract dpu_cd_det_util | ( | dpu_cddet_t * | inst,
 |  | Fract * | in,
 |  | int | n,
 |  | int | samp
 | ) |  |

Definition at line 54 of file cdrx.c.

References dpu_cddet_t::alpha, averagePow(), dpu_cddet_t::division, dot_square_asm(), and dpu_cddet_t::sig_pow.

Referenced by dpu_cd_det_hs(), and dpu_cd_det_hs_pwrlatch().

Here is the call graph for this function:

void averagePow | ( | LFract * | pow,
 |  | LFract * | new_pow,
 |  | Fract | alpha,
 |  | Fract | division
 | ) |  |

Definition at line 42 of file cdrx.c.

References frctMulDBL().

Referenced by dpu_cd_det_util(), and dpu_cd_det_v21().

Here is the call graph for this function:

int dpu_cd_det_hs | ( | dpu_cddet_t * | inst,
 |  | Fract * | in,
 |  | int | samp,
 |  | int | n,
 |  | Fract * | gain,
 |  | tint * | rx_level
 | ) |  |

Definition at line 92 of file cdrx.c.

References dpu_cddet_t::carrLossPendingFlag, dpu_cddet_t::count, dpu_cddet_t::count_false_req, dpu_cd_det_util(), DPU_CD_FALSE, DPU_CD_TRUE, dpu_cddet_t::power_sat, SHIFTVAL, dpu_cddet_t::sig_pow, dpu_cddet_t::status, and dpu_cddet_t::v21_count.

Referenced by dpuHSrxSetCdParms(), and fmHSrxSetCdParms().

Here is the call graph for this function:

int dpu_cd_det_hs_pwrlatch | ( | dpu_cddet_t * | inst,
 |  | Fract * | in,
 |  | int | samp,
 |  | int | n,
 |  | Fract * | gain,
 |  | tint * | rx_level
 | ) |  |

Definition at line 74 of file cdrx.c.

References dpu_cd_det_util(), DPU_CD_FALSE, and dpu_cddet_t::power_sat.

Referenced by dpuHSrxSetCdParms(), and fmHSrxSetCdParms().

Here is the call graph for this function:


FM: cdrx.h Source File

cdrx.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE:
00003  ******************************************************************************
00004  * FILE NAME:
00005  *
00006  * DESCRIPTION:
00007  *
00008  * TABS: NONE
00009  *
00010  * $Id: cdrx.h 1.1 1997/11/21 14:48:15 PPATEL Exp $
00011  *
00012  * REVISION HISTORY:
00013  *
00014  * $Log: cdrx.h $
00015  * Revision 1.1  1997/11/21 14:48:15  PPATEL
00016  * Initial revision
00017  *
00018  * (C) Copyright 1997, TELOGY Networks, Inc.
00019  *****************************************************************************/
00020 #include <ti/mas/types/types.h>
00021 #include "dpu_cd.h"
00022
00023 LFract dpu_cd_det_util(dpu_cddet_t *inst, Fract *in, int n, int samp);
00024 void averagePow(LFract *pow, LFract *new_pow, Fract alpha, Fract division);
00025 int dpu_cd_det_hs (dpu_cddet_t *inst, Fract *in, int samp,
00026                    int n, Fract *gain, tint *rx_level);
00027 int dpu_cd_det_hs_pwrlatch (dpu_cddet_t *inst, Fract *in, int samp,
00028                    int n, Fract *gain, tint *rx_level);
00029
00030 /* nothing past this point */


FM: crecrx.c File Reference

crecrx.c File Reference

#include <ti/mas/types/types.h>
#include <ti/mas/fract/fract.h>
#include "dpu_crec.h"
#include "crecrx.h"
#include "dpumath.h"
#include "fmprag.h"

Include dependency graph for crecrx.c:

Go to the source code of this file.

Defines

#define | DPU_CAR_PHASE_TEST 0

Functions

void | dpu_crec (dpu_crec_t *inst, Fract *phase, Fract *cf_offset)
void | dpu_rx_demod (dpu_crec_t *inst, Fract *x_re, Fract *y_im)

Define Documentation

#define DPU_CAR_PHASE_TEST 0

Definition at line 40 of file crecrx.c.

Function Documentation

void dpu_crec | ( | dpu_crec_t * | inst,
 |  | Fract * | phase,
 |  | Fract * | cf_offset
 | ) |  |

Definition at line 53 of file crecrx.c.

References dpu_crec_t::freq, dpu_crec_t::k1, dpu_crec_t::k2, dpu_crec_t::max_error, dpu_crec_t::phase, dpu_crec_t::pre_p1, and Q13_ROUND.

Referenced by v27RxSt34Init(), and v29RxSt34Init().

void dpu_rx_demod | ( | dpu_crec_t * | inst,
 |  | Fract * | x_re,
 |  | Fract * | y_im
 | ) |  |

Definition at line 98 of file crecrx.c.

References dpu_crec_t::cosfn, dpu_crec_t::phase, and dpu_crec_t::sinfn.

Referenced by v27RxSt3Init(), and v29RxSt3Init().


FM: crecrx.c Source File

crecrx.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE:
00003  ******************************************************************************
00004  * FILE NAME:
00005  *
00006  * DESCRIPTION:
00007  *
00008  * TABS: NONE
00009  *
00010  * $Id: crecrx.c 1.7 2000/03/21 22:45:39 jwright Exp $
00011  *
00012  * REVISION HISTORY:
00013  *
00014  * $Log: crecrx.c $
00015  * Revision 1.7  2000/03/21 22:45:39  jwright
00016  * Clear up 3.50 compile warnings.
00017  * Revision 1.6  1998/02/01 21:16:13  PPATEL
00018  *  max_error used instead of hard-coded value
00019  * Revision 1.4  1998/01/30 14:16:41  PPATEL
00020  *  Clipping added in carrier recovery to improve performance at high
00021  * noise levels in V.17. In V.17, the slicer output is not reliable at high
00022  * noise levels.
00023  * Revision 1.3  1997/12/10 00:24:58  PPATEL
00024  *  utlSin used for sine computation
00025  * Revision 1.2  1997/11/28 22:02:06  PPATEL
00026  *  Using sine and cosine through polynomial implementation
00027  * Revision 1.1  1997/11/21 14:48:15  PPATEL
00028  * Initial revision
00029  *
00030  * (C) Copyright 1997, TELOGY Networks, Inc.
00031  *****************************************************************************/
00032
00033 #include <ti/mas/types/types.h>
00034 #include <ti/mas/fract/fract.h>
00035 #include "dpu_crec.h"
00036 #include "crecrx.h"
00037 #include "dpumath.h"
00038 #include "fmprag.h"
00039
00040 #define DPU_CAR_PHASE_TEST 0
00041 #if DPU_CAR_PHASE_TEST
00042 #define DPU_CAR_PHASE_SIZE 1024
00043 Fract DPU_CAR_PHASE_BUF[DPU_CAR_PHASE_SIZE];
00044 int DPU_CAR_PHASE_INDX=0;
00045 #endif
00046
00047 /******************************************************************************
00048  * FUNCTION PURPOSE:
00049  ******************************************************************************
00050  * DESCRIPTION:
00051  *
00052  *****************************************************************************/
00053  void dpu_crec( dpu_crec_t *inst, Fract *phase, Fract *cf_offset)
00054  {
00055     Fract tmp1, tmp2;
00056
00057 #if DPU_CAR_PHASE_TEST
00058 DPU_CAR_PHASE_INDX &= DPU_CAR_PHASE_SIZE -1;
00059 DPU_CAR_PHASE_BUF[DPU_CAR_PHASE_INDX++] = *phase;
00060 #endif
00061
00062     /* Limit the phase error */
00063     if (abs(*phase) > inst->max_error)
00064     {
00065       if(*phase > 0)
00066         *phase = inst->max_error;
00067       else
00068         *phase = -inst->max_error;
00069     }
00070
00071     /* Calculate the second order term */
00072     tmp1 = frctLF2F(frctMul(inst->k2,14, *phase, 14, 28)+Q13_ROUND, 28, 15);
00073
00074     /* Update the frequency offset */
00075     tmp1 += (inst->pre_p1);
00076     inst->pre_p1 = tmp1;
00077
00078     /* Fix the frequency offset reporting, constants mult. by 16 */ /* Q11 */
00080
00081     /* Calc. the first order term */
00082     tmp2 = frctLF2F(frctMul(inst->k1,14, *phase, 14, 28)+Q13_ROUND, 28, 15);   /* 12 */
00083
00084     /* Current PLL output */
00085     /*tmp2 += tmp1;*/ /* Add first and second order output */
00086     tmp1 = tmp1 + tmp2 + inst->freq ;
00087
00088     /* Add delayed PLL output to the current phase */
00089     inst->phase +=  tmp1;
00090  }
00091
00092 /******************************************************************************
00093  * FUNCTION PURPOSE: dpu carrier recovery
00094  ******************************************************************************
00095  * DESCRIPTION: dpu carrier recovery
00096  *
00097  *****************************************************************************/
00098  void dpu_rx_demod( dpu_crec_t *inst, Fract *x_re, Fract *y_im)
00099  {
00100     Fract t1=*x_re, t2=*y_im;
00101     LFract t5, t6;
00102
00103 #if 1
00104     inst->cosfn = utlSin((Fract)((Fract)16384-inst->phase));
00105     inst->sinfn = utlSin(inst->phase);
00106
00107 #else
00108     inst->cosfn = cos(2*3.14159*inst->phase);      /* 1 */
00109     inst->sinfn = sin(2*3.14159*inst->phase);      /* 1 */
00110 #endif
00111
00112
00113     t5 = frctMul(t1, 14, inst->cosfn, 14, 28);
00114     t6 = frctMul(t2, 14, inst->sinfn, 14, 28);
00115     *x_re=frctLF2F(t5+t6, 28, 14);
00116     t5 = frctMul(t2, 14, inst->cosfn, 14, 28);
00117     t6 = frctMul(t1, 14, inst->sinfn, 14, 28);
00118     *y_im=frctLF2F(t5-t6, 28, 14);
00119  }
00120


FM: crecrx.h File Reference

crecrx.h File Reference

#include "dpu_crec.h"

Include dependency graph for crecrx.h:

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

Go to the source code of this file.

Functions

void | dpu_crec (dpu_crec_t *inst, Fract *pha, Fract *cf_offset)
void | dpu_rx_demod (dpu_crec_t *inst, Fract *x_re, Fract *y_im)

Function Documentation

void dpu_crec | ( | dpu_crec_t * | inst,
 |  | Fract * | pha,
 |  | Fract * | cf_offset
 | ) |  |

Definition at line 53 of file crecrx.c.

References dpu_crec_t::freq, dpu_crec_t::k1, dpu_crec_t::k2, dpu_crec_t::max_error, dpu_crec_t::phase, dpu_crec_t::pre_p1, and Q13_ROUND.

Referenced by v27RxSt34Init(), and v29RxSt34Init().

void dpu_rx_demod | ( | dpu_crec_t * | inst,
 |  | Fract * | x_re,
 |  | Fract * | y_im
 | ) |  |

Definition at line 98 of file crecrx.c.

References dpu_crec_t::cosfn, dpu_crec_t::phase, and dpu_crec_t::sinfn.

Referenced by v27RxSt3Init(), and v29RxSt3Init().


FM: crecrx.h Source File

crecrx.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE:
00003  ******************************************************************************
00004  * FILE NAME:
00005  *
00006  * DESCRIPTION:
00007  *
00008  * TABS: NONE
00009  *
00010  * $Id: crecrx.h 1.1 1997/11/21 14:48:16 PPATEL Exp $
00011  *
00012  * REVISION HISTORY:
00013  *
00014  * $Log: crecrx.h $
00015  * Revision 1.1  1997/11/21 14:48:16  PPATEL
00016  * Initial revision
00017  *
00018  * (C) Copyright 1997, TELOGY Networks, Inc.
00019  *****************************************************************************/
00020
00021 #include "dpu_crec.h"
00022
00023 void dpu_crec( dpu_crec_t *inst, Fract *pha, Fract *cf_offset);
00024 void dpu_rx_demod( dpu_crec_t *inst, Fract *x_re, Fract *y_im);
00025
00026 /* nothing past this point */
00027


FM: descr.c File Reference

descr.c File Reference

#include <stdlib.h>
#include <ti/mas/types/types.h>
#include "fmprag.h"
#include "dpu_scr.h"

Include dependency graph for descr.c:

Go to the source code of this file.

Defines

#define | V27_DESCR_DEBUG 0

Functions

void | dpu_descr_v27 (dpu_descr_t *descr_ptr, Fract *bits)
void | dpu_descr_init (dpu_descr_t *descr_ptr, int num_of_bits, tulong init_pattern, Fract shift1, Fract shift2)

Define Documentation

#define V27_DESCR_DEBUG 0

Definition at line 66 of file descr.c.

Function Documentation

void dpu_descr_v27 | ( | dpu_descr_t * | descr_ptr,
 |  | Fract * | bits
 | ) |  |

Definition at line 87 of file descr.c.

References dpu_descr_t::counter, dpu_descr_t::descr_delay, dpu_descr_t::next_bit, dpu_descr_t::num_of_bits, V27_TAP1, and V27_TAP2.

Referenced by v27RxSt4Init().

void dpu_descr_init | ( | dpu_descr_t * | descr_ptr,
 |  | int | num_of_bits,
 |  | tulong | init_pattern,
 |  | Fract | shift1,
 |  | Fract | shift2
 | ) |  |

Definition at line 198 of file descr.c.

References dpu_descr_t::counter, dpu_descr_t::descr_delay, dpu_descr_t::mask, dpu_descr_t::next_bit, dpu_descr_t::num_of_bits, dpu_descr_t::shift1, and dpu_descr_t::shift2.

Referenced by v27RxSt4Init(), and v29RxSt7Init().


FM: descr.c Source File

descr.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: DPU descrambler routines
00003  ******************************************************************************
00004  * FILE NAME:   dpu_descr.c
00005  *
00006  * DESCRIPTION: DPU descrambler routines in C
00007  *
00008  * REQUIRES:    types.h (generic data types)
00009  *              dpu.h (all the data structures required by DPU)
00010  *
00011  * TABS: NONE
00012  *
00013  * $Id: DESCR.C 1.4 2000/03/23 13:19:38 sakhtar Exp $
00014  *
00015  * REVISION HISTORY:
00016  *
00017  * $Log: DESCR.C $
00018  * Revision 1.4  2000/03/23 13:19:38  sakhtar
00019  * Modified version with option to save data I/O for descrambler
00020  * as a compile option
00021  * Revision 1.2  1997/11/21 14:56:00  PPATEL
00022  *  Descrambler routine moved to another file for multi-channel
00023  * Revision 1.1  1997/02/05 21:30:25  unknown
00024  * Initial revision
00025  *
00026  * (C) Copyright 1996, TELOGY Networks, Inc.
00027  *****************************************************************************/
00028
00029
00030 #include <stdlib.h>
00031
00032 #include <ti/mas/types/types.h>
00033 #include "fmprag.h"
00034
00035 #include "dpu_scr.h"
00036
00037 /******************************************************************************
00038  * Subroutine:  V.27 descrambler with the protection against repeating patterns
00039  *              of size 1,2,3,4,6,8,9 and 12
00040  ******************************************************************************
00041  * SUBROUTINE NAME: dpu_descr_v27
00042  *
00043  * DESCRIPTION: Descrambler with polynomial: 1 + x**-6 + x**-7.
00044  *              The descrambler shift register -  descr_delay has data
00045  *              positioned as LSBs with the LSB being last in time.
00046  *              The descrambling is done on a bit per bit basis, to be
00047  *              able to do pattern protection
00048  *
00049  * API:    *descr_ptr - points to the descrambler definition structure
00050  *              ulong descr_delay - delay line of the descrambler
00051  *              uint  num_of_bits - number of bits to be descrambled
00052  *              uint  mask - output bit mask
00053  *              int   shift1 - s1 for the scrambling polynomial
00054  *              int   shift2 - s2 for the scrambling polynomial
00055  *              int   counter - counter used for detect. V.27 rep. pattern
00056  *              int   next_bit - flag used for detect. V.27 repeat. pattern
00057  *
00058  *         *bits - pointer to location where input bits are stored as
00059  *                 num_of_bits LSBs. The descrambler will put the output
00060  *                 at the same place.
00061  *
00062  * TABS: NONE
00063  *
00064  * (C) Copyright 1996, TELOGY Networks, Inc.
00065  *****************************************************************************/
00066 #define V27_DESCR_DEBUG 0
00067
00068 #if V27_DESCR_DEBUG
00069  #define V27_DESCR_DEBUG_BUF_SIZE  400
00070  #define V27_DESCR_INSTANCE_BUF    2400
00071  #define V27_DESCR_TRAINING_WORDS  195
00072  tuint v27_descr_in_bit_ctr;
00073  tuint v27_descr_in_word_ctr;
00074  tuint v27_descr_out_bit_ctr;
00075  tuint v27_descr_out_word_ctr;
00076  tuint v27_descr_in_buf[V27_DESCR_DEBUG_BUF_SIZE];
00077  tuint v27_descr_out_buf[V27_DESCR_DEBUG_BUF_SIZE];
00078
00079  dpu_descr_t v27_descram[V27_DESCR_INSTANCE_BUF];
00080  tuint v27_descram_cnt;
00081  dpu_descr_t *v27_curr_descram;
00082
00083 #endif
00084
00085
00086
00087 void dpu_descr_v27(dpu_descr_t *descr_ptr, Fract *bits)
00088 {
00089   int j,new_bit,temp1,temp2,temp3,output;
00090   int descr_delay;
00091
00092   descr_delay = (int) descr_ptr->descr_delay;
00093   output = 0; /* Initialize output */
00094
00095   /* Do descrambling one bit at a time */
00096   for (j=descr_ptr->num_of_bits ; j>0 ; j-- )
00097   {
00098     /* Extract new bit */
00099     new_bit = ((*bits)>>(j-1))&0x1;
00100
00101 #if V27_DESCR_DEBUG
00102  /* save the descrambler instance for debugging */
00103  if (v27_descr_in_word_ctr > V27_DESCR_TRAINING_WORDS)
00104  {
00105    if (v27_descram_cnt < V27_DESCR_INSTANCE_BUF)
00106    {
00107      v27_curr_descram = &v27_descram[v27_descram_cnt];
00108    v27_descram_cnt ++;
00109    *v27_curr_descram = *descr_ptr;
00110    }
00111  }
00112
00113  /* Debug code to record input to descrambler */
00114  if (v27_descr_in_word_ctr < V27_DESCR_DEBUG_BUF_SIZE)
00115  {
00116    v27_descr_in_buf[v27_descr_in_word_ctr] = (v27_descr_in_buf[v27_descr_in_word_ctr] << 1) | new_bit;
00117    v27_descr_in_bit_ctr++;
00118    if (v27_descr_in_bit_ctr == 16)
00119    {
00120       v27_descr_in_word_ctr++;
00121       v27_descr_in_bit_ctr = 0;
00122       v27_descr_in_buf[v27_descr_in_word_ctr] = 0;
00123    }
00124  }
00125 #endif
00126
00127     /* Shift delay line and XOR with input bits */
00128     temp1 = (int) (descr_delay >> V27_TAP1-1);
00129     temp2 = (int) (descr_delay >> V27_TAP2-1);
00130     output = (output<<1) + ((temp1^temp2^new_bit)&0x1);
00131
00132     /* Shift delay line and add new bit */
00133     descr_delay = (descr_delay << 1)+new_bit;
00134
00135     /* Protection against repeating patterns */
00136     descr_ptr->counter++; /* Increment repeating counter */
00137     if (descr_ptr->next_bit==0) /* Reset counter if any of the repeat.bits is 0*/
00138        descr_ptr->counter=0;
00139     if (descr_ptr->counter==33) /* if counter equals 33, flip the LSB of the SR */
00140     {
00141        descr_ptr->counter= -1;
00142        output = (output ^ 0x1); /* Flip the LSB */
00143     }
00144
00145 #if V27_DESCR_DEBUG
00146  /* Debug code to record input to descrambler */
00147  if (v27_descr_out_word_ctr < V27_DESCR_DEBUG_BUF_SIZE)
00148  {
00149    v27_descr_out_buf[v27_descr_out_word_ctr] = (v27_descr_out_buf[v27_descr_out_word_ctr] << 1) | (output & 0x01);
00150    v27_descr_out_bit_ctr++;
00151    if (v27_descr_out_bit_ctr == 16)
00152    {
00153       v27_descr_out_word_ctr++;
00154       v27_descr_out_bit_ctr = 0;
00155       v27_descr_out_buf[v27_descr_out_word_ctr] = 0;
00156    }
00157  }
00158 #endif
00159
00160     temp1 = (descr_delay >>12)^descr_delay;
00161     temp2 = (descr_delay >>9)^descr_delay;
00162     temp3 = (descr_delay >>8)^descr_delay;
00163     descr_ptr->next_bit=(temp1&temp2&temp3&0x1)^0x1;
00164   }
00165   /* Prepare the output directly from the scrambler shift register */
00166   *bits = output;
00167   descr_ptr->descr_delay = descr_delay;
00168
00169   return;
00170 }
00171
00172  /******************************************************************************
00173  * Subroutine:  1 + x**-s1 + x**-s2 descrambler routine initialization
00174  ******************************************************************************
00175  * SUBROUTINE NAME: dpu_descr_init
00176  *
00177  * DESCRIPTION: Descrambler Initialization
00178  *
00179  * API:    *descr_ptr - points to the descrambler definition structure
00180  *              ulong descr_delay - delay line of the descrambler
00181  *              uint  num_of_bits - number of bits to be descrambled
00182  *              uint  mask - output bit mask
00183  *              int   shift1 - s1 for the scrambling polynomial
00184  *              int   shift2 - s2 for the scrambling polynomial
00185  *              int   counter - counter used for detect. V.27 rep. pattern
00186  *              int   next_bit - flag used for detect. V.27 repeat. pattern
00187  *
00188  *         num_of_bits - number of bits per symbol.
00189  *         init_pattern - initialization for the shift register
00190  *         shift1 - s1 for the scrambling polynomial
00191  *         shift2 - s2 for the scrambling polynomial
00192  *
00193  * TABS: NONE
00194  *
00195  * (C) Copyright 1996, TELOGY Networks, Inc.
00196  *****************************************************************************/
00197
00198 void dpu_descr_init(dpu_descr_t *descr_ptr,
00199                   int   num_of_bits,
00200                   tulong init_pattern,
00201                   Fract shift1,
00202                   Fract shift2)
00203 {
00204   int j,power;
00205
00206   power = 1;
00207   /* Calculate power = 2**num_of_bits */
00208   for (j=0 ;j<num_of_bits ;j++ )
00209   {
00210     power = power*2;
00211   }
00212   /* Initialize structure */
00213   descr_ptr->mask = (power - 1);
00214   descr_ptr->num_of_bits = num_of_bits;
00215   descr_ptr->descr_delay = init_pattern;
00216   descr_ptr->shift1 = shift1 - num_of_bits;
00217   descr_ptr->shift2 = shift2 - num_of_bits;
00218   descr_ptr->counter = 0;
00219   descr_ptr->next_bit = 0;
00220
00221 #if V27_DESCR_DEBUG
00222  for (j = 0; j < V27_DESCR_DEBUG_BUF_SIZE; j++)
00223  {
00224    v27_descr_in_buf[j] = v27_descr_out_buf[j] = 0;
00225  }
00226
00227  v27_descr_in_word_ctr = v27_descr_in_bit_ctr = 0;
00228  v27_descr_out_word_ctr = v27_descr_out_bit_ctr = 0;
00229  v27_descram_cnt = 0;
00230 #endif
00231
00232   return;
00233 }


FM: descrrx.c File Reference

descrrx.c File Reference

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

Include dependency graph for descrrx.c:

Go to the source code of this file.

Functions

void dpu_descr (dpu_descr_t *descr_ptr, Fract *bits)

Function Documentation

void dpu_descr | ( | dpu_descr_t * | descr_ptr,
 |  | Fract * | bits
 | ) |  |

Definition at line 52 of file descrrx.c.

References dpu_descr_t::descr_delay, dpu_descr_t::mask, dpu_descr_t::num_of_bits, dpu_descr_t::shift1, and dpu_descr_t::shift2.

Referenced by v29RxSt7Init().


FM: descrrx.c Source File

descrrx.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE:
00003  ******************************************************************************
00004  * FILE NAME:
00005  *
00006  * DESCRIPTION:
00007  *
00008  * TABS: NONE
00009  *
00010  * $Id: descrrx.c 1.1 1997/11/21 14:48:16 PPATEL Exp $
00011  *
00012  * REVISION HISTORY:
00013  *
00014  * $Log: descrrx.c $
00015  * Revision 1.1  1997/11/21 14:48:16  PPATEL
00016  * Initial revision
00017  *
00018  * (C) Copyright 1997, TELOGY Networks, Inc.
00019  *****************************************************************************/
00020
00021 #include "dpu_scr.h"
00022
00023 /******************************************************************************
00024  * Subroutine:  1 + x**-s1 + x**-s2 descrambler routine
00025  ******************************************************************************
00026  * SUBROUTINE NAME: dpu_descr
00027  *
00028  * DESCRIPTION: Descrambler with polynomial: 1 + x**-s1 + x**-s2.
00029  *              The descrambler shift register -  descr-delay has the last
00030  *              23 bits as LSBs with the LSB being last in time.
00031  *
00032  * API:    *descr_ptr - points to the descrambler definition structure
00033  *              ulong descr_delay - delay line of the scrambler
00034  *              uint  num_of_bits - number of bits to be scrambled
00035  *              uint  mask - output bit mask
00036  *              int   shift1 - s1 for the scrambling polynomial
00037  *              int   shift2 - s2 for the scrambling polynomial
00038  *              int   counter - counter used for detect. V.27 rep. pattern
00039  *              int   next_bit - flag used for detect. V.27 repeat. pattern
00040  *
00041  *         *bits - pointer to location where input bits are stored as
00042  *                 num_of_bits LSBs. The descrambler will put the output
00043  *                 at the same place.
00044  *
00045  * TABS: NONE
00046  *
00047  * (C) Copyright 1996, TELOGY Networks, Inc.
00048  *****************************************************************************/
00049
00050 #include <ti/mas/types/types.h>
00051
00052 void dpu_descr(dpu_descr_t *descr_ptr, Fract *bits)
00053 {
00054   int temp1,temp2;
00055
00056   /* Shift delay line and XOR with input bits */
00057   temp1 = (int) (descr_ptr->descr_delay >> descr_ptr->shift1);
00058   temp2 = (int) (descr_ptr->descr_delay >> descr_ptr->shift2);
00059
00060   /* Shift delay line and add new bits */
00061   descr_ptr->descr_delay = (descr_ptr->descr_delay << descr_ptr->num_of_bits)
00062                            +((*bits)
00063                            &descr_ptr->mask);
00064
00065   /* Do descrambler output */
00066   (*bits) = (temp1^temp2^(*bits))&descr_ptr->mask;
00067
00068   return;
00069 }
00070


FM: descrrx.h File Reference

descrrx.h File Reference

#include "dpu_scr.h"

Include dependency graph for descrrx.h:

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

Go to the source code of this file.

Functions

void dpu_descr (dpu_descr_t *descr_ptr, Fract *bits)

Function Documentation

void dpu_descr | ( | dpu_descr_t * | descr_ptr,
 |  | Fract * | bits
 | ) |  |

Definition at line 52 of file descrrx.c.

References dpu_descr_t::descr_delay, dpu_descr_t::mask, dpu_descr_t::num_of_bits, dpu_descr_t::shift1, and dpu_descr_t::shift2.

Referenced by v29RxSt7Init().


FM: descrrx.h Source File

descrrx.h

Go to the documentation of this file.
00001 #ifndef DESCRRX_H
00002 #define DESCRRX_H
00003 /******************************************************************************
00004  * FILE PURPOSE:
00005  ******************************************************************************
00006  * FILE NAME:
00007  *
00008  * DESCRIPTION:
00009  *
00010  * TABS: NONE
00011  *
00012  * $Id: descrrx.h 1.1 1997/11/21 14:48:16 PPATEL Exp $
00013  *
00014  * REVISION HISTORY:
00015  *
00016  * $Log: descrrx.h $
00017  * Revision 1.1  1997/11/21 14:48:16  PPATEL
00018  * Initial revision
00019  *
00020  * (C) Copyright 1997, TELOGY Networks, Inc.
00021  *****************************************************************************/
00022 #include "dpu_scr.h"
00023
00024 void dpu_descr (dpu_descr_t *descr_ptr, Fract *bits);
00025
00026 #endif
00027 /* nothing past this point */


FM: dif_dec.c File Reference

dif_dec.c File Reference

#include <stdlib.h>
#include <ti/mas/types/types.h>
#include "dpu_denc.h"
#include "fmport.h"
#include "fmprag.h"

Include dependency graph for dif_dec.c:

Go to the source code of this file.

Functions

void | dpu_ddec_v29 (dpu_ddec_t *ddec_ptr, Fract *bits)
void | dpu_ddec_init (dpu_ddec_t *ddec_ptr, int num_of_bits, const Fract *ddec_table, Fract abs_phase)

Function Documentation

void dpu_ddec_v29 | ( | dpu_ddec_t * | ddec_ptr,
 |  | Fract * | bits
 | ) |  |

Definition at line 59 of file dif_dec.c.

References dpu_ddec_t::ddec_table, dpu_ddec_t::last_phase, dpu_ddec_t::mask, and dpu_ddec_t::mask_comp.

Referenced by v27RxSt7Init(), and v29RxSt7Init().

void dpu_ddec_init | ( | dpu_ddec_t * | ddec_ptr,
 |  | int | num_of_bits,
 |  | const Fract * | ddec_table,
 |  | Fract | abs_phase
 | ) |  |

Definition at line 96 of file dif_dec.c.

References dpu_ddec_t::ddec_table, dpu_ddec_t::last_phase, dpu_ddec_t::mask, and dpu_ddec_t::mask_comp.

Referenced by v27RxSt7Init(), and v29RxSt7Init().


FM: dif_dec.c Source File

dif_dec.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: DPU differential decoder routines
00003  ******************************************************************************
00004  * FILE NAME:   dpu_ddec.c
00005  *
00006  * DESCRIPTION: DPU diff. decoder routines in C
00007  *
00008  * REQUIRES:    types.h (generic data types)
00009  *              dpu.h (all the data structures required by DPU)
00010  *
00011  * TABS: NONE
00012  *
00013  * $Id: DIF_DEC.C 1.3 1997/10/28 18:19:50 PPATEL Exp $
00014  *
00015  * REVISION HISTORY:
00016  *
00017  * $Log: DIF_DEC.C $
00018  * Revision 1.3  1997/10/28 18:19:50  PPATEL
00019  *  initialization routine changed for initialization of last phase from outside
00020  * Revision 1.2  1997/05/18 11:58:02  Zoran
00021  *   tables use const declarations
00022  * Revision 1.1  1997/02/05 21:31:52  unknown
00023  * Initial revision
00024  *
00025  * (C) Copyright 1996, TELOGY Networks, Inc.
00026  *****************************************************************************/
00027
00028
00029 #include <stdlib.h>
00030
00031 #include <ti/mas/types/types.h>
00032
00033 #include "dpu_denc.h"
00034 #include "fmport.h"
00035 #include "fmprag.h"
00036
00037 /******************************************************************************
00038  * Subroutine:  V.27ter, V.29 (7200 and 9600) differential decoder
00039  ******************************************************************************
00040  * SUBROUTINE NAME: dpu_ddec_v29
00041  *
00042  * DESCRIPTION: Differential decoder acc. to Recc.V.29
00043  *
00044  * API:    *ddec_ptr - points to the dif.encoder definition structure
00045  *              int   last_phase - last phase
00046  *              int   *ddec_table - table used for differential encoder
00047  *              int   mask - mask for the diff. encoded bits
00048  *              int   mask_comp - 1st complement of the mask
00049  *
00050  *         *bits - pointer to location where input bits are stored as
00051  *                 num_of_bits LSBs. The differential encoder will put there
00052  *                 either output bits, or the index to the mapping table.
00053  *
00054  * TABS: NONE
00055  *
00056  * (C) Copyright 1996, TELOGY Networks, Inc.
00057  *****************************************************************************/
00058
00059 void dpu_ddec_v29(dpu_ddec_t *ddec_ptr, Fract *bits)
00060 {
00061   int temp1,temp2;
00062
00063   /* Take the absolute phase and add new bits */
00064   temp1 = (*bits)&ddec_ptr->mask;
00065   temp2 = (temp1 - ddec_ptr->last_phase)&(ddec_ptr->mask);
00066
00067   /* Read the new absolute phase from the table */
00068   ddec_ptr->last_phase = temp1;
00069
00070   /* Prepare output bits */
00071   (*bits) = ((*bits)&ddec_ptr->mask_comp)+ddec_ptr->ddec_table [temp2];
00072
00073   return;
00074 }
00075 /******************************************************************************
00076  * Subroutine:  Differential Decoder Initialization
00077  ******************************************************************************
00078  * SUBROUTINE NAME: dpu_ddec_init
00079  *
00080  * DESCRIPTION: Differential Decoder Intialization
00081  *
00082  * API:    *ddec_ptr - points to the dif.decoder definition structure
00083  *              int   abs_phase - absolute phase
00084  *              int   *ddec_table - table used for differential decoder
00085  *              int   mask - mask for the diff. encoded bits
00086  *              int   mask_comp - 1st complement of the mask
00087  *
00088  *         num_of_bits - number of bits per symbol that are diff. encoded.
00089  *
00090  *
00091  * TABS: NONE
00092  *
00093  * (C) Copyright 1996, TELOGY Networks, Inc.
00094  *****************************************************************************/
00095
00096 void dpu_ddec_init(dpu_ddec_t *ddec_ptr,
00097                   int   num_of_bits,
00098                   const Fract *ddec_table, Fract abs_phase)
00099 {
00100   int j,power;
00101
00102   power = 1;
00103   /* Calculate power = 2**num_of_bits */
00104   for (j=0 ;j<num_of_bits ;j++ )
00105   {
00106     power = power*2;
00107   }
00108   /* Initialize structure */
00109   ddec_ptr->mask = (power - 1);
00110   ddec_ptr->mask_comp = (ddec_ptr->mask^0x00ff);
00111   ddec_ptr->last_phase = abs_phase;
00112   ddec_ptr->ddec_table = ddec_table;
00113
00114   return;
00115 }


FM: dif_enc.c File Reference

dif_enc.c File Reference

#include <stdlib.h>
#include <ti/mas/types/types.h>
#include "dpu_denc.h"
#include "fmport.h"
#include "fmprag.h"

Include dependency graph for dif_enc.c:

Go to the source code of this file.

Functions

void | dpu_denc_v29 (dpu_denc_t *denc_ptr, Fract *bits)
void | dpu_denc_init (dpu_denc_t *denc_ptr, int num_of_bits, const Fract *denc_table, Fract abs_phase)

Function Documentation

void dpu_denc_v29 | ( | dpu_denc_t * | denc_ptr,
 |  | Fract * | bits
 | ) |  |

Definition at line 60 of file dif_enc.c.

References dpu_denc_t::abs_phase, dpu_denc_t::denc_table, dpu_denc_t::mask, and dpu_denc_t::mask_comp.

Referenced by v27TxSt4Init(), and v29TxSt3Init().

void dpu_denc_init | ( | dpu_denc_t * | denc_ptr,
 |  | int | num_of_bits,
 |  | const Fract * | denc_table,
 |  | Fract | abs_phase
 | ) |  |

Definition at line 94 of file dif_enc.c.

References dpu_denc_t::abs_phase, dpu_denc_t::denc_table, dpu_denc_t::mask, and dpu_denc_t::mask_comp.

Referenced by v27TxSt4Init(), and v29TxSt3Init().


FM: dif_enc.c Source File

dif_enc.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: DPU differential encoder routines
00003  ******************************************************************************
00004  * FILE NAME:   dpu_denc.c
00005  *
00006  * DESCRIPTION: DPU diff. encoder routines in C
00007  *
00008  * REQUIRES:    types.h (generic data types)
00009  *              dpu.h (all the data structures required by DPU)
00010  *
00011  * TABS: NONE
00012  *
00013  * $Id: DIF_ENC.C 1.3 1997/09/13 19:19:16 PPATEL Exp $
00014  *
00015  * REVISION HISTORY:
00016  *
00017  * $Log: DIF_ENC.C $
00018  * Revision 1.3  1997/09/13 19:19:16  PPATEL
00019  *  Changed api to incorporate abs phase initialization
00020  * Revision 1.2  1997/05/18 11:58:19  Zoran
00021  * Tables use const declarations
00022  * Revision 1.1  1997/02/05 21:33:12  unknown
00023  * Initial revision
00024  *
00025  * (C) Copyright 1996, TELOGY Networks, Inc.
00026  *****************************************************************************/
00027
00028
00029 #include <stdlib.h>
00030
00031 #include <ti/mas/types/types.h>
00032
00033 #include "dpu_denc.h"
00034 #include "dpu_denc.h"
00035 #include "fmport.h"
00036 #include "fmprag.h"
00037
00038 /******************************************************************************
00039  * Subroutine:  V.27ter, V.29 (7200 and 9600) differential encoder
00040  ******************************************************************************
00041  * SUBROUTINE NAME: dpu_denc_v29
00042  *
00043  * DESCRIPTION: Differential encoder acc. to Recc.V.29
00044  *
00045  * API:    *denc_ptr - points to the dif.encoder definition structure
00046  *              int   abs_phase - absolute phase
00047  *              int   *denc_table - table used for differential encoder
00048  *              int   mask - mask for the diff. encoded bits
00049  *              int   mask_comp - 1st complement of the mask
00050  *
00051  *         *bits - pointer to location where input bits are stored as
00052  *                 num_of_bits LSBs. The differential encoder will put there
00053  *                 either output bits, or the index to the mapping table.
00054  *
00055  * TABS: NONE
00056  *
00057  * (C) Copyright 1996, TELOGY Networks, Inc.
00058  *****************************************************************************/
00059
00060 void dpu_denc_v29(dpu_denc_t *denc_ptr, Fract *bits)
00061 {
00062
00063   /* Take the  phase change from the table, add abs. phase */
00064   denc_ptr->abs_phase =
00065           (denc_ptr->abs_phase + denc_ptr->denc_table [(*bits)&denc_ptr->mask])
00066           &(denc_ptr->mask);
00067
00068   /* Prepare output bits */
00069   (*bits) = ((*bits)&denc_ptr->mask_comp)+denc_ptr->abs_phase;
00070
00071   return;
00072 }
00073 /******************************************************************************
00074  * Subroutine:  Differential Encoder Initialization
00075  ******************************************************************************
00076  * SUBROUTINE NAME: dpu_denc_init
00077  *
00078  * DESCRIPTION: Differential Encoder Intialization
00079  *
00080  * API:    *denc_ptr - points to the dif.encoder definition structure
00081  *              int   abs_phase - absolute phase
00082  *              int   *denc_table - table used for differential encoder
00083  *              int   mask - mask for the diff. encoded bits
00084  *              int   mask_comp - 1st complement of the mask
00085  *
00086  *         num_of_bits - number of bits per symbol that are diff. encoded.
00087  *
00088  *
00089  * TABS: NONE
00090  *
00091  * (C) Copyright 1996, TELOGY Networks, Inc.
00092  *****************************************************************************/
00093
00094 void dpu_denc_init(dpu_denc_t *denc_ptr,
00095                   int   num_of_bits,
00096                   const Fract *denc_table,Fract abs_phase)
00097 {
00098   int j,power;
00099
00100   power = 1;
00101   /* Calculate power = 2**num_of_bits */
00102   for (j=0 ;j<num_of_bits ;j++ )
00103   {
00104     power = power*2;
00105   }
00106   /* Initialize structure */
00107   denc_ptr->mask = (power - 1);
00108   denc_ptr->mask_comp = (denc_ptr->mask^0x00ff);
00109   denc_ptr->abs_phase = abs_phase;
00110   denc_ptr->denc_table = denc_table;
00111
00112   return;
00113 }
00114


FM:

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.


FM: doxygen.h File Reference

doxygen.h File Reference

Go to the source code of this file.


FM: doxygen.h Source File

doxygen.h

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


FM: dpu.c File Reference

dpu.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/ecomem.h>
#include "fmprag.h"
#include "fmtrace.h"
#include "fm.h"
#include "dpu.h"
#include "fmloc.h"
#include "dpuloc.h"
#include "vxxInit.h"
#include "vxxproc.h"
#include "vxxsm.h"
#include "dpu_fsk.h"
#include "cdrx.h"
#include <ti/mas/util/utl.h>
#include "v17.h"
#include "dpu_tgt.h"
#include "dpu_trec.h"
#include "int_init.h"

Include dependency graph for dpu.c:

Go to the source code of this file.

Defines

#define | TREC_FACTOR
#define | TX_LVL_TEST 0

Functions

static void | dpuconfigRX (dpuInst_t *inst)
void | dpuOpen (void *dpuInst, dpuCfg_t *cfg)
void | dpuClose (void *dpuInst)
void | dpuConfig (void *dpuInst, dpuCfg_t *cfg)
void | dpuControl (void *dpuInst, tuint *ctrl)
int | dpuNew (void **dpuInst, int nbufs, ecomemBuffer_t *bufs, dpuNewCfg_t *cfg)
void | dpuTx (void *dpuInst, tword *data_in, Fract *num_byts, linSample *samp_out, Fract *num_samps)
void | dpuStatus (void *dpuInst, fmSigQStats_t *sts)

Variables

const Fract | dpu_v21_freq_h_table []

Define Documentation

#define TREC_FACTOR

Value:

((DPU_TREC_INDEX_INC * DPU_TREC_K2 * 1000000.0) /  \
                     (Q15_SCALE * DPU_TREC_THR * DPU_TREC_NUMBER))

Definition at line 154 of file dpu.c.

Referenced by dpuStatus().

#define TX_LVL_TEST 0

Definition at line 165 of file dpu.c.

Referenced by dpuTx().

Function Documentation

static void dpuconfigRX ( dpuInst_t * inst ) [static]

Definition at line 290 of file dpu.c.

References commonTable1_sPtrs_t::cd_thresholds_pt, dpuRxInst_t::cddet_inst, dpuInst_s::cfg, fmTablePtrs_t::commonTable1Ptrs, dpuRxInst_t::dotdet_inst, DPU_MOD_NULL, DPU_MOD_V17, DPU_MOD_V21, DPU_MOD_V27T, DPU_MOD_V29, DPU_MOD_V33, dpu_rx_v17_init(), dpu_rx_v21_init(), dpu_rx_v27_init(), dpu_rx_v29_init(), dpu_SET_FSL_DETECTED, dpu_SET_FSL_ENABLE, DPU_SI_SS_ERRMUL, DPU_SI_SS_ERRMUL_V17, dpuCfg_t::frame, dpuRxInst_t::freeze_count, dpuRxInst_t::fsl_bitfield, dpu_dotdet_t::high_power_req, dpu_cddet_t::high_power_req, cd_thr_t::high_thr, dpu_cddet_t::low_power_req, cd_thr_t::low_thr, dpuCfg_t::mode, dpuRxInst_t::phase_err_mul, dpu_cddet_t::power_sat, dpuCfg_t::rate, dpuCfg_t::rx_cd_thr_set, dpuInst_s::RxInst, and dpuInst_s::TablePtr.

Referenced by dpuConfig().

Here is the call graph for this function:

void dpuOpen | ( | void * | dpuInst,
 |  | dpuCfg_t * | cfg
 | ) |  |

Definition at line 204 of file dpu.c.

References dpuInst_s::cfg, DPU_RATE_NULL, dpuCfg_t::DPUfeatureBitMap, FM_EXC_DPU_OPEN, fmException(), dpuCfg_t::frame, dpuInst_s::ID, dpuCfg_t::protocol, dpuCfg_t::rx_cd_thr_set, dpuRxInst_t::rx_rate, dpuInst_s::RxInst, dpuInst_s::sts, dpuCfg_t::TablePtr, dpuInst_s::TablePtr, dpuCfg_t::tx_level, fmSigQStats_t::tx_level, dpuTxInst_t::tx_rate, and dpuInst_s::TxInst.

Referenced by fmOpen().

Here is the call graph for this function:

void dpuClose ( void * dpuInst )

Definition at line 240 of file dpu.c.

References DPU_RATE_NULL, dpuRxInst_t::rx_rate, dpuInst_s::RxInst, dpuTxInst_t::tx_rate, and dpuInst_s::TxInst.

Referenced by fmClose().

void dpuConfig | ( | void * | dpuInst,
 |  | dpuCfg_t * | cfg
 | ) |  |

Definition at line 258 of file dpu.c.

References dpuInst_s::cfg, dpuInst_s::ctrl, dpuCfg_t::direction, DPU_DIR_TX, DPU_RATE_NULL, dpuconfigRX(), dpuRxInst_t::rx_rate, dpuInst_s::RxInst, dpuTxInst_t::tx_rate, dpuInst_s::TxInst, and vxx_tx_init().

Referenced by FAX_MODEM().

Here is the call graph for this function:

void dpuControl | ( | void * | dpuInst,
 |  | tuint * | ctrl
 | ) |  |

Definition at line 346 of file dpu.c.

References dpuInst_s::ctrl, DPU_RATE_NULL, dpuRxInst_t::rx_rate, dpuInst_s::RxInst, dpuTxInst_t::tx_rate, and dpuInst_s::TxInst.

int dpuNew | ( | void ** | dpuInst,
 |  | int | nbufs,
 |  | ecomemBuffer_t * | bufs,
 |  | dpuNewCfg_t * | cfg
 | ) |  |

Definition at line 375 of file dpu.c.

References dpu_cdec_t::accum_dist, dpuRxInst_t::adeq_inst, dpuRxInst_t::bphilb_inst, dpuRxInst_t::cdec_inst, dpu_adeq_t::cf_im_long, dpu_adeq_t::cf_re_long, dpuTxInst_t::data_in_buf, dpuRxInst_t::data_out_buf, dpu_bphilb_t::delay, dpu_trec_t::delay, dpu_adeq_t::delay_im, dpu_adeq_t::delay_re, DPU_ADEQ_CF_IM_LONG, DPU_ADEQ_CF_RE_LONG, DPU_ADEQ_DELAY_IM, DPU_ADEQ_DELAY_RE, DPU_CDEC_ACCUM_DIST, DPU_CDEC_PATH_DIST, DPU_CDEC_PATH_STORE, DPU_DATAIN_BUFN, DPU_DATAOUT_BUFN, DPU_ERROR, DPU_HILB_DELAY, DPU_INMAN_BEGIN, DPU_INMAN_END, DPU_INSTANCE_BUFN, DPU_NBUFS, DPU_NOERR, DPU_NOMEMORY, DPU_RATE_NULL, DPU_RX_INTP_OLDIN, DPU_SHAP_OLDIN_IM, DPU_SHAP_OLDIN_RE, DPU_TREC_DELAY, DPU_TREC_OUTPUT, DPU_TX_INTP_OLDIN, dpuInst_s::ID, dpuNewCfg_t::ID, dpuTxInst_t::inman_inst, dpuRxInst_t::interp_inst, dpuTxInst_t::interp_inst, dpu_interp_t::oldin, dpu_shaping_t::oldin_im, dpu_shaping_t::oldin_re, dpu_trec_t::output, dpu_cdec_t::path_dist_ptr, dpu_cdec_t::path_store, dpuRxInst_t::rx_rate, dpuInst_s::RxInst, dpuTxInst_t::shap_inst, SHAP_MAX_M, dpuInst_s::sizeCfg, dpuNewCfg_t::sizeCfg, dpuRxInst_t::trec_inst, dpuTxInst_t::tx_rate, and dpuInst_s::TxInst.

void dpuTx | ( | void * | dpuInst,
 |  | tword * | data_in,
 |  | Fract * | num_byts,
 |  | linSample * | samp_out,
 |  | Fract * | num_samps
 | ) |  |

Definition at line 541 of file dpu.c.

References dpuTxInst_t::baud_per_seg, dpuTxInst_t::bts_per_baud, dpu_inman_t::bytes_cnt, dpuTxInst_t::copy_fcn, dpuInst_s::ctrl, dpuTxInst_t::data_in_buf, DPU_CTRL_CTS, DPU_MAX_BAUDS_PER_SEG, DPU_MAX_SAMPS_PER_SEG, DPU_MAX_WORD, DPU_RATE_NULL, dpuTxInst_t::gain, dpuTxInst_t::inman_inst, dpuTxInst_t::interp_inst, dpuTxInst_t::intrp_fcn, dpuTxInst_t::procfn, dpuTxInst_t::samp_per_baud, dpuTxInst_t::samp_per_seg, dpuTxInst_t::shap_fcn, dpuTxInst_t::shap_inst, dpuTxInst_t::smfn, TX_LVL_TEST, dpuTxInst_t::tx_rate, and dpuInst_s::TxInst.

Referenced by FAX_MODEM().

void dpuStatus | ( | void * | dpuInst,
 |  | fmSigQStats_t * | sts
 | ) |  |

Definition at line 618 of file dpu.c.

References dpu_slic_t::avgNoisePow, dpu_slic_t::avgSignalPow, fmSigQStats_t::carr_offset, dpu_cddet_t::carrLossPendingFlag, dpuRxInst_t::cddet_inst, DPU_RATE_NULL, DPU_V17_RX_ST8, DPU_V27_RX_ST8, DPU_V29_RX_ST8, fmSigQStats_t::dpustatus, FREQ_SCALE_Q, dpuRxInst_t::mod_inst, dpu_trec_t::p1, fmSigQStats_t::percentBaudOffset, dpu_crec_t::pre_p1, Q14_SCALE, dpuRxInst_t::rx_count, fmSigQStats_t::rx_level, dpuRxInst_t::rx_rate, fmSigQStats_t::rx_rate, dpuRxInst_t::rx_state, dpuInst_s::RxInst, dpuRxInst_t::samp_per_baud, dpuRxInst_t::slic_inst, fmSigQStats_t::snr, dpuInst_s::sts, TREC_FACTOR, dpuRxInst_t::trec_inst, fmSigQStats_t::tx_level, dpuTxInst_t::tx_rate, fmSigQStats_t::tx_rate, and dpuInst_s::TxInst.

Referenced by fmStats().

Variable Documentation

const Fract dpu_v21_freq_h_table[]

Definition at line 73 of file dpu_fsk.c.

Referenced by vxx_tx_init().


FM: dpu.c Source File

dpu.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: Data Pump Unit (VCU) main source file.
00003  ******************************************************************************
00004  * FILE NAME: dpu.c
00005  *
00006  * DESCRIPTION: A DPU is a DSP software ECO which executes half or full-duplex
00007  *              data modulation/demodulation algorithms. The DPU can be config-
00008  *              ured for fax or data operation. The current scope of the DPU
00009  *              is to support modem protocols required for processing fax
00010  *              operation lie V.21, V.29, V.27ter and V.17. The modulation
00011  *              mode and parameters could be reconfigured at the run time.
00012  *
00013  * GLOBAL FUNCTIONS:
00014  *
00015  *    dpuClose()        : close an instance of DPU
00016  *    dpuConfig()       : control or configure DPU instance
00017  *    dpuControl()      : reflect DPU instance time critical control message
00018  *    dpuNew()          : create an instance of DPU
00019  *    dpuOpen()         : open and configure an instance of DPU
00020  *    dpuReceiveIn()    : tell a DPU instance to perform modulation
00021  *    dpuSendIn()       : tell a DPU instance to perform demodulation
00022  *    dpuStatus()       : reflect DPU instance non time critical status
00023  *
00024  * TABS: NONE
00025  *
00026  * $Id: DPU.C 2002/07/9 14:37:30  Aravind B R Exp $
00027  *
00028  * REVISION HISTORY:
00029  *
00030  * $Log: dpu.c $
00031  * Revision 1.40  2002/07//9 14:37:30  Aravind B R
00032  * Added frame slip logic decision varaiable initialization
00033  * Revision 1.39  1999/11/23 15:14:30  sakhtar
00034  * Modified to remove the errors reported by the TI 3.50 compiler.
00035  * No change in code at all.
00036  * Revision 1.38  1999/03/24 17:11:22  sakhtar
00037  * Removed DATA_BUFOUT usage. Modified since inman_inst
00038  * was changed.
00039  * Revision 1.37  1999/03/24 14:37:59  sakhtar
00040  * Modified to remove dpuConfigTx and move the initialization
00041  * function to vxxinit.c
00042  * Revision 1.36  1999/03/20 17:14:34  sakhtar
00043  * Modified to use vHSTx for V.21 Tx. We removed v21Tx function
00044  * Revision 1.35  1999/03/20 15:56:17  sakhtar
00045  * Modified to optimize the dpuTx function. We read the number
00046  * of bytes used by the modem directly from inman_inst.
00047  * Revision 1.34  1999/03/18 09:43:11  sakhtar
00048  * Revert to 1.31 and change API of functions in vxxinit.c
00049  * Revision 1.31  1999/03/11 17:10:40  sakhtar
00050  * Modified to initialize V17 Tx in here instead of in V17.c
00051  * for optimization.
00052  * Revision 1.30  1999/03/11 11:39:08  sakhtar
00053  * Modified to move initialization functions from vxxinit.c to dpu.c
00054  * Revision 1.29  1999/03/10 14:43:05  sakhtar
00055  * Revert back to version 1.22 and modified for new FAX_MODEM.C
00056  * The FAX_MODEM.C initializes the dpuInst directly and passes
00057  * a dummy config structure which is not used.
00058  * Revision 1.22  1998/08/19 01:19:21  ppatel
00059  *  Correction in alignments for dpu buffers (for integration with herb because
00060  * they use the alignment, volatility etc information)
00061  * Revision 1.21  1998/04/30 17:14:40  ppatel
00062  *  Changes for reporting modem status (timing offset, carrier freq offset,
00063  * snr, etc.)
00064  * Revision 1.20  1998/01/30 14:32:11  PPATEL
00065  *  Fix for the BRAF problem
00066  * Revision 1.19  1997/12/17 00:12:11  PPATEL
00067  *  overlaying adaptive equalizer coefficients with transmit data may be
00068  * fatal for short training of v.17. The overlay pattern is changed. Note
00069  * the conditions in comments for overlaying
00070  * Revision 1.18  1997/12/12 16:25:51  PPATEL
00071  *   Changes for V.33 included (tested to work for v.29 but not V.17 or
00072  * V.33)
00073  * Revision 1.17  1997/12/10 00:19:29  PPATEL
00074  *  code for overlaying tx and rx data for half-duplex operation (as in fax)
00075  * , saves about 480 words per channel.
00076  * Revision 1.16  1997/12/01 15:19:24  PPATEL
00077  *  Changes made for v.17 adjustment for tx level
00078  * Revision 1.15  1997/11/28 15:37:52  PPATEL
00079  *  Changes made for mult-channel voice/fax (multiple heap allocator
00080  * in siu does not like zero size)
00081  * Revision 1.14  1997/11/21 14:59:07  PPATEL
00082  *  First version for Golden Gateway 3.0 (conditional V17 build, multi-channel
00083  * allocation for @small)
00084  * Revision 1.13  1997/10/28 21:34:19  PPATEL
00085  *   Merged latest changes with changes in offshoot for V.17 development
00086  * Revision 1.12  1997/09/26 16:29:14  PPATEL
00087  *  Tx level and threshold settings from outside dpu.c
00088  * Revision 1.11  1997/09/17 23:15:02  PPATEL
00089  *    Removed a bug in transmit level programmability
00090  * Revision 1.10  1997/09/16 23:06:17  PPATEL
00091  *   High power threshold comparison for dotting detector
00092  * Revision 1.9  1997/09/16 21:49:41  PPATEL
00093  *   Debugging info added. Changes made for transmit level
00094  * programmability
00095  * Revision 1.8  1997/08/27 17:59:35  PPATEL
00096  *     Threshold programmability from outside (thru dpuOpen)
00097  * Revision 1.7  1997/08/22 13:12:57  PPATEL
00098  * Incorporated change for threshold programmability
00099  * Revision 1.6  1997/05/25 16:17:34  Zoran
00100  *    Added clearing of sts structure in the open function
00101  * Revision 1.5  1997/05/18 12:28:11  Zoran
00102  * Cleaned, optimized version
00103  * Revision 1.3  1997/02/19 21:56:47  H.T.Li
00104  * Revision 1.2  1996/10/18 10:07:29  HTLI
00105  * Revision 1.1  1996/09/18 12:20:36  chandrav
00106  * Initial revision
00107  *
00108  * (C) Copyright 1995, 1996, TELOGY Networks, Inc.
00109  *****************************************************************************/
00110
00111 /* ANSI C header files */
00112 #include <stdlib.h>
00113 #include <string.h>
00114
00115 /* System level header files */
00116 #include <ti/mas/types/types.h>
00117 #include <ti/mas/fract/fract.h>
00118
00119 /* System utilities' API's */
00120 #include <ti/mas/util/ecomem.h>
00121
00122 /* Relocatable symbols for DPU */
00123 #ifndef PC
00124 #include "fmprag.h"
00125 #endif
00126
00127 /* Debug trace file */
00128 #include "fmtrace.h"
00129
00130
00131 /* FM high level header files */
00132 #include "fm.h"
00133
00134 /* DPU high level header files */
00135 #include "dpu.h"
00136
00137 /* DPU low level local header files */
00138 #include "fmloc.h"
00139 #include "dpuloc.h"
00140 #include "vxxInit.h"     /* Init routines */
00141 #include "vxxproc.h"
00142 #include "vxxsm.h"
00143 #include "dpu_fsk.h"
00144 #include "cdrx.h"
00145 #include <ti/mas/util/utl.h>
00146 #include "v17.h"
00147 #include "dpu_tgt.h"
00148 #include "dpu_trec.h"
00149 #include "fmloc.h"
00150 #include "int_init.h"
00151
00152 /* The following factor is used for calculating the correct timing offset in
00153    0.0001 of percentage, see notes for derivation of the formula */
00154 #define TREC_FACTOR ((DPU_TREC_INDEX_INC * DPU_TREC_K2 * 1000000.0) /  \
00155                      (Q15_SCALE * DPU_TREC_THR * DPU_TREC_NUMBER))
00156
00157 #ifdef BRAF_BUG
00158 #include "utilnum.h"
00159 #endif
00160
00161 #ifdef DPU_DBG
00162 #include "dpu_dbg.h"
00163 #endif
00164
00165 #define TX_LVL_TEST 0
00166
00167 #if TX_LVL_TEST
00168 int TX_LVL_INDEX=0;
00169 #define TX_LVL_SIZE 1024
00170 Fract TX_LVL_BUF[TX_LVL_SIZE];
00171 #endif
00172
00173 /* Relocatable Table size Global descripter - available for the system */
00174
00175 /*dpuRelocatableTableDescriptor_t dpuRelocatableTableDescriptor =
00176 {
00177  sizeof(v29Table_sPtrs_t),
00178  sizeof(v27Table_sPtrs_t),
00179  sizeof(v17Table_sPtrs_t),
00180  sizeof(commonTable1_sPtrs_t),
00181  sizeof(commonTable2_sPtrs_t)
00182 };*/
00183
00184 extern const Fract dpu_v21_freq_h_table[];
00185
00186 /* local function definitions */
00187 static void dpuconfigRX (dpuInst_t *inst);
00188
00189
00190 /******************************************************************************
00191  * FUNCTION PURPOSE: Open and configure an instance of DPU.
00192  ******************************************************************************
00193  * DESCRIPTION: This function configures an instance of DPU and binds it to
00194  *              a voice coding algorithm (VCA). Upon completion, both decoder
00195  *              and encoder are disabled. One must use dpuControl() to put
00196  *              DPU in operational state. Currently, both decoder and encoder
00197  *              must run the same VCA.
00198  *
00199  *  void dpuOpen (
00200  *    void        *dpuInst,   - a pointer to DPU instance
00201  *    dpuConfig_t *cfg)       - a pointer to DPU configuration structure
00202  *
00203  *****************************************************************************/
00204 void dpuOpen (void *dpuInst, dpuCfg_t *cfg)
00205 {
00206   dpuInst_t *inst = (dpuInst_t *)dpuInst;
00207
00208   if (!((inst->TxInst.tx_rate == DPU_RATE_NULL) &&
00209        (inst->RxInst.rx_rate == DPU_RATE_NULL)))
00210   {
00211      fmException (inst->ID, FM_EXC_DPU_OPEN);
00212   }
00213
00214   inst->cfg.protocol      = cfg->protocol;
00215   inst->cfg.frame         = cfg->frame;
00216   inst->cfg.rx_cd_thr_set = cfg->rx_cd_thr_set; /* TH_SET2; */
00217   inst->cfg.tx_level      = cfg->tx_level;      /* -13; */
00218   inst->cfg.TablePtr      = cfg->TablePtr;
00219   inst->cfg.DPUfeatureBitMap = cfg->DPUfeatureBitMap;
00220
00221   /* Initialize modem status */
00222   memset ((void *) &inst->sts, 0, sizeof(fmSigQStats_t));
00223   inst->sts.tx_level      =  cfg->tx_level;
00224
00225   inst->TablePtr          = (fmTablePtrs_t *) cfg->TablePtr;
00226
00227 #ifdef DPU_DBG
00228
00229   dpu_dbg_init();
00230 #endif
00231
00232 } /* dpuOpen */
00233
00234 /******************************************************************************
00235  * FUNCTION PURPOSE: Close an instance of VCU.
00236  ******************************************************************************
00237  * DESCRIPTION: Closes an instance of VCU. Stops processing samples/codewords.
00238  *
00239  *****************************************************************************/
00240 void dpuClose (void *dpuInst)
00241 {
00242   dpuInst_t *inst = (dpuInst_t *)dpuInst;
00243
00244     inst->TxInst.tx_rate = inst->RxInst.rx_rate = DPU_RATE_NULL; /* reset the rate para. */
00245
00246   } /* dpuClose */
00247
00248 /******************************************************************************
00249  * FUNCTION PURPOSE: Configure a DPU TX & RX instance.
00250  ******************************************************************************
00251  * DESCRIPTION: This function configures the instace of a DPU TX & RX.
00252  *
00253  *  void dpuConfig (
00254  *    void        *dpuInst,   - a pointer to DPU instance
00255  *    dpuConfig_t *cfg)       - a pointer to DPU configuration structure
00256 *
00257  *****************************************************************************/
00258 void dpuConfig(void *dpuInst, dpuCfg_t *cfg)
00259 {
00260   dpuInst_t *inst = (dpuInst_t *)dpuInst;
00261
00262   /**** initialize the DPU control register */
00263   inst->ctrl = 0;
00264
00265   if (inst->cfg.direction == DPU_DIR_TX)
00266   {
00267     /* Configure receiver to stay in idle mode */
00268     inst->RxInst.rx_rate = DPU_RATE_NULL;
00269     /* Operation mode is FAX mode and direction is TX */
00270     vxx_tx_init(inst);     /* Configure the TX instance */
00271   }
00272   else
00273   {
00274     /* Configure transmitter to stay in idle mode */
00275     inst->TxInst.tx_rate = DPU_RATE_NULL;
00276     /* Operation mode is FAX mode and direction is RX */
00277     dpuconfigRX(inst);     /* Configure the RX instance */
00278   }
00279 }   /* dpuConfig()         */
00280
00281 /******************************************************************************
00282  * FUNCTION PURPOSE: Configure a DPU RX instance.
00283  ******************************************************************************
00284  * DESCRIPTION: This function configures the instace of a DPU RX.
00285  *
00286  *  void dpuconfigRX (
00287  *    dpuInst_t  *dpuInst)       - a pointer to DPU instance structure
00288  *
00289  *****************************************************************************/
00290 static void dpuconfigRX(dpuInst_t *inst)
00291 {
00292  int frame = inst->cfg.frame;
00293  int rate = inst->cfg.rate;
00294  Fract phase_err_mul = DPU_SI_SS_ERRMUL; /* Default set for V.27/V.29 */
00295
00296  switch (inst->cfg.mode)
00297  {
00298    case DPU_MOD_NULL:
00299      break;
00300    case DPU_MOD_V21:
00301      dpu_rx_v21_init(inst, frame, rate);
00302      break;
00303    case DPU_MOD_V27T:
00304      dpu_rx_v27_init(inst, frame, rate);
00305      break;
00306    case DPU_MOD_V29:
00307      dpu_rx_v29_init(inst, frame, rate);
00308      break;
00309 #ifdef V17
00310    case DPU_MOD_V33:
00311    case DPU_MOD_V17:
00312    dpu_rx_v17_init(inst, frame, rate);
00313      phase_err_mul = DPU_SI_SS_ERRMUL_V17;
00314     break;
00315 #endif
00316    default:
00317      break;
00318  }  /* switch inst->cfg.mode */
00319
00320  inst->RxInst.cddet_inst.high_power_req = inst->TablePtr->commonTable1Ptrs->cd_thresholds_pt[inst->cfg.rx_cd_thr_set].high_thr;
00321  inst->RxInst.cddet_inst.low_power_req  = inst->TablePtr->commonTable1Ptrs->cd_thresholds_pt[inst->cfg.rx_cd_thr_set].low_thr;
00322
00323  /* saturation value 12 dB higher than higher threshold */
00324  inst->RxInst.cddet_inst.power_sat      = inst->RxInst.cddet_inst.high_power_req << 2;
00325  inst->RxInst.dotdet_inst.high_power_req  = inst->RxInst.cddet_inst.high_power_req;
00326
00327  /*****  Initialization of frame slip correction algorithm *******/
00328  /*****  Frame slip correction is off at start-up by default *****/
00329  dpu_SET_FSL_ENABLE((inst->RxInst.fsl_bitfield), FALSE);
00330  dpu_SET_FSL_DETECTED((inst->RxInst.fsl_bitfield), FALSE);
00331  inst->RxInst.freeze_count  = 0;
00332  inst->RxInst.phase_err_mul = phase_err_mul;
00333
00334 }   /* dpuconfigRX()         */
00335
00336 /******************************************************************************
00337  * FUNCTION PURPOSE: Controls operation of a DPU instance.
00338  ******************************************************************************
00339  * DESCRIPTION: This function controls the operation of a DPU instance.
00340  *
00341  *  void dpuControl (
00342  *    void  *dpuInst,       - a pointer to DPU instance structure
00343  *    uint  *ctrl)          - control register
00344  *
00345  *****************************************************************************/
00346 void dpuControl (void *dpuInst, tuint *ctrl)
00347 {
00348   dpuInst_t *inst = (dpuInst_t *)dpuInst;
00349
00350   /* Ignore this request if instance closed. */
00351   if (inst->TxInst.tx_rate == DPU_RATE_NULL &&
00352                  inst->RxInst.rx_rate == DPU_RATE_NULL) return;
00353
00354   *ctrl = inst->ctrl;
00355 } /* dpuControl */
00356
00357 /******************************************************************************
00358  * FUNCTION PURPOSE: Create an instance of DPU.
00359  ******************************************************************************
00360  * DESCRIPTION: Creates an instance of DPU and initializes memory buffers.
00361  *
00362  *  int dpuNew (
00363  *    void            **dpuInst,  - an address of memory location that will
00364  *                                  receive a pointer to instance structure
00365  *    int             nbufs,      - number of memory buffers
00366  *    ecomemBuffer_t     *bufs,      - a vector of buffer descriptors
00367  *    dpuNewConfig_t  *cfg)       - a pointer to configuration structure
00368  *
00369  *  Return value: DPU_NOMEMORY  - heap exhasuted
00370  *                DPU_NOERR     - success
00371  *                DPU_ERROR     - invalid input parameters
00372  *
00373  *****************************************************************************/
00374
00375 int dpuNew (void **dpuInst, int nbufs, ecomemBuffer_t *bufs, dpuNewCfg_t *cfg)
00376 {
00377   int i;
00378   dpuInst_t *inst;
00379   ecomemBuffer_t *bufp;
00380
00381   /* Test instance pointer (must be NULL) */
00382   if (*dpuInst != NULL || nbufs != DPU_NBUFS) return (DPU_ERROR);
00383
00384   /* Check all dynamic buffers (base address != NULL?) */
00385   for (i = 0, bufp = &bufs[0]; i < nbufs; bufp = &bufs[++i]) {
00386
00387 #ifdef BRAF_BUG
00388     utlDummy();
00389 #endif
00390     if (bufp->base == NULL) return(DPU_NOMEMORY);
00391   }
00392
00393   /* Identify the instance structure */
00394   bufp = &bufs[DPU_INSTANCE_BUFN];
00395   if (bufp->size < sizeof(dpuInst_t)) return(DPU_ERROR);
00396   inst = (dpuInst_t *)bufp->base;
00397
00398 #ifdef HALF_DUPLEX
00399   /* Identify the data in buffer */
00400   bufp = &bufs[DPU_DATAOUT_BUFN];
00401   inst->TxInst.data_in_buf = (Fract *)bufp->base;
00402 #else
00403   /* Identify the data in buffer */
00404   bufp = &bufs[DPU_DATAIN_BUFN];
00405   inst->TxInst.data_in_buf = (Fract *)bufp->base;
00406 #endif
00407
00408   /* Identify the data out buffer */
00409   bufp = &bufs[DPU_DATAOUT_BUFN];
00410   inst->RxInst.data_out_buf = (Fract *)bufp->base;
00411
00412 #ifdef HALF_DUPLEX
00413   /* overlay transmit data with receiver storage, it is assumed
00414      here that dpuBufs[DPU_DATAOUT_BUFN].size
00415       <= dpuBufs[DPU_ADEQ_DELAY_RE].size, dpuBufs[DPU_ADEQ_DELAY_IM].size
00416      Identify the TX inputdata manipulation begin buffer       */
00417 #if 0
00418   bufp = &bufs[DPU_ADEQ_DELAY_RE];
00419   inst->TxInst.inman_inst.begin = (int *)bufp->base;
00420
00421   /* Identify the TX inputdata manipulation end buffer */
00422   bufp = &bufs[DPU_ADEQ_DELAY_IM];
00423   inst->TxInst.inman_inst.end = (int *)bufp->base;
00424 #endif
00425 #else
00426   /* Identify the TX inputdata manipulation begin buffer */
00427   bufp = &bufs[DPU_INMAN_BEGIN];
00428   inst->TxInst.inman_inst.begin = (int *)bufp->base;
00429
00430   /* Identify the TX inputdata manipulation end buffer */
00431   bufp = &bufs[DPU_INMAN_END];
00432   inst->TxInst.inman_inst.end = (int *)bufp->base;
00433 #endif
00434
00435   /* Identify the RX interpolation delay buffer */
00436   bufp = &bufs[DPU_RX_INTP_OLDIN];
00437   inst->RxInst.interp_inst.oldin = (Fract *)bufp->base;
00438
00439 #ifdef HALF_DUPLEX
00440   bufp = &bufs[DPU_RX_INTP_OLDIN];
00441   inst->TxInst.interp_inst.oldin = (Fract *)bufp->base;
00442 #else
00443   /* Identify the TX interpolation delay buffer */
00444   bufp = &bufs[DPU_TX_INTP_OLDIN];
00445   inst->TxInst.interp_inst.oldin = (Fract *)bufp->base;
00446 #endif
00447
00448   /* Identify the RX hilbert filter delay buffer */
00449   bufp = &bufs[DPU_HILB_DELAY];
00450   inst->RxInst.bphilb_inst.delay = (Fract *)bufp->base;
00451
00452   /* Identify the RX ADEQ filter real delay buffer */
00453   bufp = &bufs[DPU_ADEQ_DELAY_RE];
00454   inst->RxInst.adeq_inst.delay_re = (Fract *)bufp->base;
00455
00456   /* Identify the RX ADEQ filter imaginary delay buffer */
00457   bufp = &bufs[DPU_ADEQ_DELAY_IM];
00458   inst->RxInst.adeq_inst.delay_im = (Fract *)bufp->base;
00459
00460   /* Identify the RX ADEQ filter real long coeff buffer */
00461   bufp = &bufs[DPU_ADEQ_CF_RE_LONG];
00462   inst->RxInst.adeq_inst.cf_re_long = (LFract *)bufp->base;
00463
00464   /* Identify the RX ADEQ filter imaginary long coeff buffer */
00465   bufp = &bufs[DPU_ADEQ_CF_IM_LONG];
00466   inst->RxInst.adeq_inst.cf_im_long = (LFract *)bufp->base;
00467
00468 #ifdef HALF_DUPLEX
00469   /* overlay transmit data with receive data. Here, it is
00470      assumed that
00471     dpuBufs[DPU_SHAP_OLDIN_RE].size + dpuBufs[DPU_SHAP_OLDIN_IM].size <=
00472     dpuBufs[DPU_CDEC_PATH_STORE].size */
00473   /* Identify the TX shaping filter real delay buffer */
00474   bufp = &bufs[DPU_CDEC_PATH_STORE];
00475   inst->TxInst.shap_inst.oldin_re = (Fract *)bufp->base;
00476
00477   /* Identify the TX shaping filter imaginary delay buffer */
00478   inst->TxInst.shap_inst.oldin_im = inst->TxInst.shap_inst.oldin_re +
00479                                     SHAP_MAX_M * sizeof(Fract);
00480 #else
00481   /* Identify the TX shaping filter real delay buffer */
00482   bufp = &bufs[DPU_SHAP_OLDIN_RE];
00483   inst->TxInst.shap_inst.oldin_re = (Fract *)bufp->base;
00484
00485   /* Identify the TX shaping filter imaginary delay buffer */
00486   bufp = &bufs[DPU_SHAP_OLDIN_IM];
00487   inst->TxInst.shap_inst.oldin_im = (Fract *)bufp->base;
00488 #endif
00489
00490   /* Identify the RX timing recovery output buffer */
00491   bufp = &bufs[DPU_TREC_OUTPUT];
00492   inst->RxInst.trec_inst.output = (Fract *)bufp->base;
00493
00494   /* Identify the RX timing recovery delay buffer */
00495   bufp = &bufs[DPU_TREC_DELAY];
00496   inst->RxInst.trec_inst.delay = (Fract *)bufp->base;
00497
00498   /* Identifyy the conv. decoder path distances buffer */
00499   bufp = &bufs[DPU_CDEC_PATH_DIST];
00500   inst->RxInst.cdec_inst.path_dist_ptr = (Fract *)bufp->base;
00501
00502   /* Identifyy the conv. decoder accumulated distances buffer */
00503   bufp = &bufs[DPU_CDEC_ACCUM_DIST];
00504   inst->RxInst.cdec_inst.accum_dist = (Fract *)bufp->base;
00505
00506   /* Identifyy the conv. decoder path storage buffer */
00507   bufp = &bufs[DPU_CDEC_PATH_STORE];
00508   inst->RxInst.cdec_inst.path_store = (path_t *)bufp->base;
00509
00510   /* Save some configuration parameters */
00511   inst->ID          = cfg->ID;
00512   inst->TxInst.tx_rate  = DPU_RATE_NULL;     /* reset the TX and RX rate */
00513   inst->RxInst.rx_rate  = DPU_RATE_NULL;
00514   inst->sizeCfg     = cfg->sizeCfg;   /* save the size configuration pars */
00515
00516   *dpuInst = (void*)inst;   /* return the instance pointer */
00517   return(DPU_NOERR);
00518 } /* dpuNew */
00519
00520 /******************************************************************************
00521  * FUNCTION PURPOSE: Tell a DPU instance to perform modulation.
00522  ******************************************************************************
00523  * DESCRIPTION: Signals the DPU transmitter to perform modulation on the
00524  *              input data segment. The input data segment is a bit
00525  *              vector which occupies multiple
00526  *              n-bit words and is transmitted by left-shifting each word
00527  *              through the MSB (i.e. Big Endian order of bits). The first
00528  *              bit transmitted is the MSB of the first n-bit word in the
00529  *              array. This function returns immediately if the DPU state
00530  *              is closed.
00531  *
00532  *  void dpuTx (
00533  *    void  *dpuInst,       - a pointer to DPU instance structure
00534  *    tword *data_in,       - a pointer to input data segment
00535  *    Fract *num_byts,      - size of send out data in byts
00536  *    linSample *samp_out,      - a pointer to output samples segment
00537  *    Fract *num_samps      - size of send out samples
00538  *    )
00539  *
00540  *****************************************************************************/
00541 void dpuTx (void *dpuInst, tword *data_in, Fract *num_byts,
00542               linSample *samp_out, Fract *num_samps)
00543 {
00544   dpuInst_t *Inst = (dpuInst_t *)dpuInst;
00545   Fract output[DPU_MAX_SAMPS_PER_SEG], tx_re[DPU_MAX_BAUDS_PER_SEG],
00546         tx_im[DPU_MAX_BAUDS_PER_SEG];
00547   int j;
00548   int number;
00549   Fract bits;
00550
00551   /* return if TX for this DPU instance isn't "on" */
00552   if (Inst->TxInst.tx_rate == DPU_RATE_NULL)
00553     return;
00554
00555   bits = Inst->TxInst.baud_per_seg * Inst->TxInst.bts_per_baud;
00556   number = Inst->TxInst.baud_per_seg * Inst->TxInst.samp_per_baud;
00557
00558   /* return numbers of output samples per frame */
00559   *num_samps = Inst->TxInst.samp_per_seg;
00560
00561   /* copy data into TX instance buffer and returns the number of baud */
00562   if (/* Inst->ctrl.ctrl_flag.cts */
00563       (Inst->ctrl & DPU_CTRL_CTS) && Inst->TxInst.copy_fcn != NULL)
00564         (*Inst->TxInst.copy_fcn)(&Inst->TxInst.inman_inst, data_in,num_byts,DPU_MAX_WORD,
00565                        Inst->TxInst.data_in_buf, bits);
00566
00567   /* Main program Loop */
00568   for (j=0; j<Inst->TxInst.baud_per_seg; j++ )
00569   {
00570     /* State machine */
00571     (*Inst->TxInst.smfn)(Inst);
00572
00573     /* Transmitter */
00574     (*Inst->TxInst.procfn)(Inst, &tx_re[j], &tx_im[j], output, j);
00575    }
00576
00577  /* shaping filter */
00578  if(Inst->TxInst.shap_fcn != NULL)
00579  (*Inst->TxInst.shap_fcn)(&(Inst->TxInst.shap_inst), tx_re, tx_im,
00580                   output,Inst->TxInst.baud_per_seg);
00581
00582 /* do interplation for the whole frame of symbol samples */
00583   (*Inst->TxInst.intrp_fcn)(&(Inst->TxInst.interp_inst), output,
00584                   samp_out,number);
00585
00586 /* for gain control and send resulting samples to the outside world by
00587    samp_out buffer */
00588  for (j=0; j<Inst->TxInst.samp_per_seg; j++)
00589  {
00590    samp_out[j] =
00591      frctLF2F( frctMul(samp_out[j], 14,Inst->TxInst.gain, 14, 28), 28, 16);
00592
00593 #if TX_LVL_TEST
00594
00595  TX_LVL_INDEX++;
00596  TX_LVL_INDEX &= TX_LVL_SIZE -1;
00597  TX_LVL_BUF[TX_LVL_INDEX] = samp_out[j];
00598
00599 #endif
00600
00601  }
00602
00603  /* return the number of used data bytes */
00604  *num_byts = Inst->TxInst.inman_inst.bytes_cnt;
00605
00606 } /* dpuTX */
00607
00608 /******************************************************************************
00609  * FUNCTION PURPOSE: Get status message of a DPU instance.
00610  ******************************************************************************
00611  * DESCRIPTION: This function get the status of a DPU instance.
00612  *
00613  *  void dpuStatus (
00614  *    void     *dpuInst,       - a pointer to DPU instance structure
00615  *    fmSigQStats_t *sts)      - DPU modem instantaneous stats pointer
00616  *
00617  *****************************************************************************/
00618 void dpuStatus (void *dpuInst, fmSigQStats_t *sts)
00619 {
00620   dpuInst_t *inst = (dpuInst_t *) dpuInst;
00621   dpuRxInst_t *RxInst = &inst->RxInst;
00622   LFract    avgNoisePow, avgSignalPow, temp;
00623   Fract     snr_Q4, carrFreqOffset, baudRateTimes10, trecFactor;
00624
00625   /* Ignore this request if instance closed. */
00626   if (inst->TxInst.tx_rate == DPU_RATE_NULL &&
00627                  inst->RxInst.rx_rate == DPU_RATE_NULL) return;
00628
00629   /* Compute SNR, carrier frequency offset and timing offset
00630      only if in data mode  */
00631   if ((RxInst->rx_state == DPU_V17_RX_ST8) ||
00632       (RxInst->rx_state == DPU_V27_RX_ST8) ||
00633       (RxInst->rx_state == DPU_V29_RX_ST8))   {
00634
00635    /* Compute SNR */
00636    /* rx_count keeps on incrementing continuously in data mode so take
00637        absolute to achieve maximum coverage */
00638     if ((abs(RxInst->rx_count) > 1000) &&
00639         (! RxInst->cddet_inst.carrLossPendingFlag)) {
00640
00641       /* If the input power is zero, give the minimum required = 1L */
00642       avgSignalPow = RxInst->slic_inst.avgSignalPow;
00643       if (avgSignalPow <= 0) avgSignalPow = 1L;
00644
00645       avgNoisePow = RxInst->slic_inst.avgNoisePow;
00646       if (avgNoisePow <= 0) avgNoisePow = 1L;
00647
00648       snr_Q4 = utlLin2dBPower(avgSignalPow) -
00649                 utlLin2dBPower(avgNoisePow);
00650       inst->sts.snr = frctRoundF(snr_Q4,4,0);
00651     }
00652
00653     /* compute carrier frequency offset */
00654     carrFreqOffset = RxInst->mod_inst.pre_p1;
00655
00656     switch (RxInst->samp_per_baud) {
00657
00658       case 4:
00659           baudRateTimes10 = 24000;
00660           trecFactor      = (Fract)(TREC_FACTOR/4.0* Q14_SCALE);
00661       break;
00662
00663       case 6:
00664           baudRateTimes10 = 16000;
00665           trecFactor      = (Fract)(TREC_FACTOR/6.0* Q14_SCALE);
00666       break;
00667
00668       case 8:
00669           baudRateTimes10 = 12000;
00670           trecFactor      = (Fract)(TREC_FACTOR/8.0* Q14_SCALE);
00671       break;
00672
00673       default:
00674       break;
00675     }
00676
00677     /* compute carrier frequency offset in 0.1 Hz e.g. 101 indicates 10.1 Hz */
00678     temp = frctMul(carrFreqOffset,FREQ_SCALE_Q, baudRateTimes10,0, FREQ_SCALE_Q-1);
00679     inst->sts.carr_offset = frctLF2F(temp,FREQ_SCALE_Q-1,0);
00680
00681     /* Compute percentage baud offset in 0.0001 percent e.g. value 28 indicates
00682        0.0028 % */
00683     inst->sts.percentBaudOffset = frctLF2F(frctMul(RxInst->trec_inst.p1,0,
00684                                                    trecFactor,14,14),14,0);
00685   }
00686
00687   sts->dpustatus         = inst->sts.dpustatus;
00688   sts->snr               = inst->sts.snr;
00689   sts->carr_offset       = inst->sts.carr_offset;
00690   sts->percentBaudOffset = inst->sts.percentBaudOffset;
00691   sts->tx_level          = inst->sts.tx_level;
00692   sts->rx_level          = inst->sts.rx_level;
00693   sts->tx_rate           = inst->sts.tx_rate;
00694   sts->rx_rate           = inst->sts.rx_rate;
00695 }
00696 /* nothing past this point */


FM: dpu.h File Reference

dpu.h File Reference

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

Include dependency graph for dpu.h:

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

Go to the source code of this file.

Data Structures

struct | dpuSizeCfg_t
struct | dpuNewCfg_t
struct | dpuSendOut_t
struct | dpuRecvOut_t
struct | dpuCfg_t

Defines

#define | MAX_MODEM_RATE 14400
#define | MAX_SENDOUT_T_MS 20
#define | MAX_BAUD_RATE 2400
#define | DPU_MAX_BAUDS_PER_SEG 48
#define | DPU_MAX_SAMPS_PER_SEG 192
#define | DPU_NBUFS 21
#define | DPU_INSTANCE_BUFN 9
#define | DPU_DATAIN_BUFN 1
#define | DPU_DATAOUT_BUFN 2
#define | DPU_RECVOUT_BUFN 3
#define | DPU_RECVIN_BUFN 4
#define | DPU_INMAN_BEGIN 5
#define | DPU_INMAN_END 6
#define | DPU_TX_INTP_OLDIN 7
#define | DPU_RX_INTP_OLDIN 10
#define | DPU_SHAP_OLDIN_RE 0
#define | DPU_SHAP_OLDIN_IM 8
#define | DPU_HILB_DELAY 11
#define | DPU_ADEQ_DELAY_RE 12
#define | DPU_ADEQ_DELAY_IM 13
#define | DPU_ADEQ_CF_RE_LONG 14
#define | DPU_ADEQ_CF_IM_LONG 15
#define | DPU_TREC_OUTPUT 16
#define | DPU_TREC_DELAY 17
#define | DPU_CDEC_PATH_DIST 18
#define | DPU_CDEC_ACCUM_DIST 19
#define | DPU_CDEC_PATH_STORE 20
#define | DPU_FEATURE_FLC 0
#define | DPU_FEATURE_FLC_ENABLE_MASK 0x01
#define | DPU_STATUS_TX 0x0000
#define | DPU_STATUS_RX 0x0100
#define | DPU_STATUS_HD 0x0000
#define | DPU_STATUS_FD 0x0200
#define | DPU_STATUS_V21 0x0400
#define | DPU_STATUS_V27 0x0800
#define | DPU_STATUS_V29 0x0C00
#define | DPU_STATUS_V17 0x1000
#define | DPU_ST_V21_TX (DPU_STATUS_V21+DPU_STATUS_TX+DPU_STATUS_HD)
#define | DPU_ST_V21_RX (DPU_STATUS_V21+DPU_STATUS_RX+DPU_STATUS_HD)
#define | DPU_ST_V27_TX (DPU_STATUS_V27+DPU_STATUS_TX+DPU_STATUS_HD)
#define | DPU_ST_V27_RX (DPU_STATUS_V27+DPU_STATUS_RX+DPU_STATUS_HD)
#define | DPU_ST_V29_TX (DPU_STATUS_V29+DPU_STATUS_TX+DPU_STATUS_HD)
#define | DPU_ST_V29_RX (DPU_STATUS_V29+DPU_STATUS_RX+DPU_STATUS_HD)
#define | DPU_ST_V17_TX (DPU_STATUS_V17+DPU_STATUS_TX+DPU_STATUS_HD)
#define | DPU_ST_V17_RX (DPU_STATUS_V17+DPU_STATUS_RX+DPU_STATUS_HD)

Typedefs

typedef tuint | dpuCtrl_t

Enumerations

enum | DpuErrorType_e { DPU_NOMEMORY = -1, DPU_NOERR = 0, DPU_ERROR = 1 }
enum DpuModeType_e {
DPU_MOD_NULL = -1, DPU_MOD_V21 = 0, DPU_MOD_V27T = 1, DPU_MOD_V29 = 2,
DPU_MOD_V17 = 3, DPU_MOD_V33 = 4
}
enum DpuRate_e {
DPU_RATE_NULL = 0, DPU_RATE_300 = 300, DPU_RATE_2400 = 2400, DPU_RATE_4800 = 4800,
DPU_RATE_7200 = 7200, DPU_RATE_9600 = 9600, DPU_RATE_12000 = 12000, DPU_RATE_14400 = 14400
}
enum | DpuOperationMode_e { DPU_FAX = 0, DPU_DATA = 1 }
enum | DpuDir_e { DPU_DIR_TX = 0, DPU_DIR_RX = 1 }
enum | DpuTrainingType_e { DPU_TRN_SHORT = 0, DPU_TRN_LONG = 1 }
enum | DpuCDThresh_e { TH_SET1 = 0, TH_SET2 = 1, TH_SET3 = 2 }
enum | { DPU_EXC_OPEN = 1, DPU_EXC_DELETE = 2 }

Functions

void | dpuClose (void *inst)
void | dpuConfig (void *inst, dpuCfg_t *cfg)
void | dpuControl (void *inst, tuint *ctrl)
int | dpuNew (void **inst, int nbufs, ecomemBuffer_t *bufs, dpuNewCfg_t *cfg)
void | dpuOpen (void *inst, dpuCfg_t *cfg)
void | dpuTx (void *dpuInst, tword *data_in, Fract *num_byts, linSample *samp_out, Fract *num_samps)
void | dpuStatus (void *inst, fmSigQStats_t *sts)
void | FAX_MODEM (fm_ctrl_str *ctrl_str, void *dpuInst)

Define Documentation

#define MAX_MODEM_RATE 14400

Definition at line 73 of file dpu.h.

#define MAX_SENDOUT_T_MS 20

Definition at line 74 of file dpu.h.

#define MAX_BAUD_RATE 2400

Definition at line 75 of file dpu.h.

#define DPU_MAX_BAUDS_PER_SEG 48

Definition at line 77 of file dpu.h.

Referenced by dpuRx(), and dpuTx().

#define DPU_MAX_SAMPS_PER_SEG 192

Definition at line 78 of file dpu.h.

Referenced by dpuRx(), and dpuTx().

#define DPU_NBUFS 21

Definition at line 80 of file dpu.h.

Referenced by dpuNew().

#define DPU_INSTANCE_BUFN 9

Definition at line 81 of file dpu.h.

Referenced by dpuNew().

#define DPU_DATAIN_BUFN 1

Definition at line 82 of file dpu.h.

Referenced by dpuNew().

#define DPU_DATAOUT_BUFN 2

Definition at line 83 of file dpu.h.

Referenced by dpuNew().

#define DPU_RECVOUT_BUFN 3

Definition at line 84 of file dpu.h.

#define DPU_RECVIN_BUFN 4

Definition at line 85 of file dpu.h.

#define DPU_INMAN_BEGIN 5

Definition at line 86 of file dpu.h.

Referenced by dpuNew().

#define DPU_INMAN_END 6

Definition at line 87 of file dpu.h.

Referenced by dpuNew().

#define DPU_TX_INTP_OLDIN 7

Definition at line 88 of file dpu.h.

Referenced by dpuNew().

#define DPU_RX_INTP_OLDIN 10

Definition at line 89 of file dpu.h.

Referenced by dpuNew().

#define DPU_SHAP_OLDIN_RE 0

Definition at line 90 of file dpu.h.

Referenced by dpuNew().

#define DPU_SHAP_OLDIN_IM 8

Definition at line 91 of file dpu.h.

Referenced by dpuNew().

#define DPU_HILB_DELAY 11

Definition at line 92 of file dpu.h.

Referenced by dpuNew().

#define DPU_ADEQ_DELAY_RE 12

Definition at line 93 of file dpu.h.

Referenced by dpuNew().

#define DPU_ADEQ_DELAY_IM 13

Definition at line 94 of file dpu.h.

Referenced by dpuNew().

#define DPU_ADEQ_CF_RE_LONG 14

Definition at line 95 of file dpu.h.

Referenced by dpuNew().

#define DPU_ADEQ_CF_IM_LONG 15

Definition at line 96 of file dpu.h.

Referenced by dpuNew().

#define DPU_TREC_OUTPUT 16

Definition at line 97 of file dpu.h.

Referenced by dpuNew().

#define DPU_TREC_DELAY 17

Definition at line 98 of file dpu.h.

Referenced by dpuNew().

#define DPU_CDEC_PATH_DIST 18

Definition at line 99 of file dpu.h.

Referenced by dpuNew().

#define DPU_CDEC_ACCUM_DIST 19

Definition at line 100 of file dpu.h.

Referenced by dpuNew().

#define DPU_CDEC_PATH_STORE 20

Definition at line 101 of file dpu.h.

Referenced by dpuNew().

#define DPU_FEATURE_FLC 0

Definition at line 121 of file dpu.h.

#define DPU_FEATURE_FLC_ENABLE_MASK 0x01

Definition at line 122 of file dpu.h.

#define DPU_STATUS_TX 0x0000

Definition at line 189 of file dpu.h.

#define DPU_STATUS_RX 0x0100

Definition at line 190 of file dpu.h.

#define DPU_STATUS_HD 0x0000

Definition at line 192 of file dpu.h.

#define DPU_STATUS_FD 0x0200

Definition at line 193 of file dpu.h.

#define DPU_STATUS_V21 0x0400

Definition at line 195 of file dpu.h.

#define DPU_STATUS_V27 0x0800

Definition at line 196 of file dpu.h.

#define DPU_STATUS_V29 0x0C00

Definition at line 197 of file dpu.h.

#define DPU_STATUS_V17 0x1000

Definition at line 198 of file dpu.h.

#define DPU_ST_V21_TX (DPU_STATUS_V21+DPU_STATUS_TX+DPU_STATUS_HD)

Definition at line 200 of file dpu.h.

Referenced by v21TxStM().

#define DPU_ST_V21_RX (DPU_STATUS_V21+DPU_STATUS_RX+DPU_STATUS_HD)

Definition at line 201 of file dpu.h.

Referenced by dpu_rx_v21_init(), and v21RxStM().

#define DPU_ST_V27_TX (DPU_STATUS_V27+DPU_STATUS_TX+DPU_STATUS_HD)

Definition at line 202 of file dpu.h.

Referenced by v27TxStM().

#define DPU_ST_V27_RX (DPU_STATUS_V27+DPU_STATUS_RX+DPU_STATUS_HD)

Definition at line 203 of file dpu.h.

Referenced by v27RxStM().

#define DPU_ST_V29_TX (DPU_STATUS_V29+DPU_STATUS_TX+DPU_STATUS_HD)

Definition at line 204 of file dpu.h.

Referenced by v29TxStM().

#define DPU_ST_V29_RX (DPU_STATUS_V29+DPU_STATUS_RX+DPU_STATUS_HD)

Definition at line 205 of file dpu.h.

Referenced by dpu_rx_v29_init(), and v29RxStM().

#define DPU_ST_V17_TX (DPU_STATUS_V17+DPU_STATUS_TX+DPU_STATUS_HD)

Definition at line 206 of file dpu.h.

#define DPU_ST_V17_RX (DPU_STATUS_V17+DPU_STATUS_RX+DPU_STATUS_HD)

Definition at line 207 of file dpu.h.

Typedef Documentation

typedef tuint dpuCtrl_t

Definition at line 233 of file dpu.h.

Enumeration Type Documentation

enum DpuErrorType_e

Enumerator:
DPU_NOMEMORY
DPU_NOERR
DPU_ERROR

Definition at line 129 of file dpu.h.

enum DpuModeType_e

Enumerator:
DPU_MOD_NULL
DPU_MOD_V21
DPU_MOD_V27T
DPU_MOD_V29
DPU_MOD_V17
DPU_MOD_V33

Definition at line 136 of file dpu.h.

enum DpuRate_e

Enumerator:
DPU_RATE_NULL
DPU_RATE_300
DPU_RATE_2400
DPU_RATE_4800
DPU_RATE_7200
DPU_RATE_9600
DPU_RATE_12000
DPU_RATE_14400

Definition at line 146 of file dpu.h.

enum DpuOperationMode_e

Enumerator:
DPU_FAX
DPU_DATA

Definition at line 158 of file dpu.h.

enum DpuDir_e

Enumerator:
DPU_DIR_TX
DPU_DIR_RX

Definition at line 164 of file dpu.h.

enum DpuTrainingType_e

Enumerator:
DPU_TRN_SHORT
DPU_TRN_LONG

Definition at line 170 of file dpu.h.

enum DpuCDThresh_e

Enumerator:
TH_SET1
TH_SET2
TH_SET3

Definition at line 176 of file dpu.h.

anonymous enum

Enumerator:
DPU_EXC_OPEN
DPU_EXC_DELETE

Definition at line 183 of file dpu.h.

Function Documentation

void dpuClose ( void * inst )

Definition at line 240 of file dpu.c.

References DPU_RATE_NULL, dpuRxInst_t::rx_rate, dpuInst_s::RxInst, dpuTxInst_t::tx_rate, and dpuInst_s::TxInst.

Referenced by fmClose().

void dpuConfig | ( | void * | inst,
 |  | dpuCfg_t * | cfg
 | ) |  |

Definition at line 258 of file dpu.c.

References dpuInst_s::cfg, dpuInst_s::ctrl, dpuCfg_t::direction, DPU_DIR_TX, DPU_RATE_NULL, dpuconfigRX(), dpuRxInst_t::rx_rate, dpuInst_s::RxInst, dpuTxInst_t::tx_rate, dpuInst_s::TxInst, and vxx_tx_init().

Referenced by FAX_MODEM().

Here is the call graph for this function:

void dpuControl | ( | void * | inst,
 |  | tuint * | ctrl
 | ) |  |

Definition at line 346 of file dpu.c.

References dpuInst_s::ctrl, DPU_RATE_NULL, dpuRxInst_t::rx_rate, dpuInst_s::RxInst, dpuTxInst_t::tx_rate, and dpuInst_s::TxInst.

int dpuNew | ( | void ** | inst,
 |  | int | nbufs,
 |  | ecomemBuffer_t * | bufs,
 |  | dpuNewCfg_t * | cfg
 | ) |  |

Definition at line 375 of file dpu.c.

References dpu_cdec_t::accum_dist, dpuRxInst_t::adeq_inst, dpuRxInst_t::bphilb_inst, dpuRxInst_t::cdec_inst, dpu_adeq_t::cf_im_long, dpu_adeq_t::cf_re_long, dpuTxInst_t::data_in_buf, dpuRxInst_t::data_out_buf, dpu_trec_t::delay, dpu_bphilb_t::delay, dpu_adeq_t::delay_im, dpu_adeq_t::delay_re, DPU_ADEQ_CF_IM_LONG, DPU_ADEQ_CF_RE_LONG, DPU_ADEQ_DELAY_IM, DPU_ADEQ_DELAY_RE, DPU_CDEC_ACCUM_DIST, DPU_CDEC_PATH_DIST, DPU_CDEC_PATH_STORE, DPU_DATAIN_BUFN, DPU_DATAOUT_BUFN, DPU_ERROR, DPU_HILB_DELAY, DPU_INMAN_BEGIN, DPU_INMAN_END, DPU_INSTANCE_BUFN, DPU_NBUFS, DPU_NOERR, DPU_NOMEMORY, DPU_RATE_NULL, DPU_RX_INTP_OLDIN, DPU_SHAP_OLDIN_IM, DPU_SHAP_OLDIN_RE, DPU_TREC_DELAY, DPU_TREC_OUTPUT, DPU_TX_INTP_OLDIN, dpuNewCfg_t::ID, dpuInst_s::ID, dpuTxInst_t::inman_inst, dpuTxInst_t::interp_inst, dpuRxInst_t::interp_inst, dpu_interp_t::oldin, dpu_shaping_t::oldin_im, dpu_shaping_t::oldin_re, dpu_trec_t::output, dpu_cdec_t::path_dist_ptr, dpu_cdec_t::path_store, dpuRxInst_t::rx_rate, dpuInst_s::RxInst, dpuTxInst_t::shap_inst, SHAP_MAX_M, dpuNewCfg_t::sizeCfg, dpuInst_s::sizeCfg, dpuRxInst_t::trec_inst, dpuTxInst_t::tx_rate, and dpuInst_s::TxInst.

void dpuOpen | ( | void * | inst,
 |  | dpuCfg_t * | cfg
 | ) |  |

Definition at line 204 of file dpu.c.

References dpuInst_s::cfg, DPU_RATE_NULL, dpuCfg_t::DPUfeatureBitMap, FM_EXC_DPU_OPEN, fmException(), dpuCfg_t::frame, dpuInst_s::ID, dpuCfg_t::protocol, dpuCfg_t::rx_cd_thr_set, dpuRxInst_t::rx_rate, dpuInst_s::RxInst, dpuInst_s::sts, dpuInst_s::TablePtr, dpuCfg_t::TablePtr, fmSigQStats_t::tx_level, dpuCfg_t::tx_level, dpuTxInst_t::tx_rate, and dpuInst_s::TxInst.

Referenced by fmOpen().

Here is the call graph for this function:

void dpuTx | ( | void * | dpuInst,
 |  | tword * | data_in,
 |  | Fract * | num_byts,
 |  | linSample * | samp_out,
 |  | Fract * | num_samps
 | ) |  |

Definition at line 541 of file dpu.c.

References dpuTxInst_t::baud_per_seg, dpuTxInst_t::bts_per_baud, dpu_inman_t::bytes_cnt, dpuTxInst_t::copy_fcn, dpuInst_s::ctrl, dpuTxInst_t::data_in_buf, DPU_CTRL_CTS, DPU_MAX_BAUDS_PER_SEG, DPU_MAX_SAMPS_PER_SEG, DPU_MAX_WORD, DPU_RATE_NULL, dpuTxInst_t::gain, dpuTxInst_t::inman_inst, dpuTxInst_t::interp_inst, dpuTxInst_t::intrp_fcn, dpuTxInst_t::procfn, dpuTxInst_t::samp_per_baud, dpuTxInst_t::samp_per_seg, dpuTxInst_t::shap_fcn, dpuTxInst_t::shap_inst, dpuTxInst_t::smfn, TX_LVL_TEST, dpuTxInst_t::tx_rate, and dpuInst_s::TxInst.

Referenced by FAX_MODEM().

void dpuStatus | ( | void * | inst,
 |  | fmSigQStats_t * | sts
 | ) |  |

Definition at line 618 of file dpu.c.

References dpu_slic_t::avgNoisePow, dpu_slic_t::avgSignalPow, fmSigQStats_t::carr_offset, dpu_cddet_t::carrLossPendingFlag, dpuRxInst_t::cddet_inst, DPU_RATE_NULL, DPU_V17_RX_ST8, DPU_V27_RX_ST8, DPU_V29_RX_ST8, fmSigQStats_t::dpustatus, FREQ_SCALE_Q, dpuRxInst_t::mod_inst, dpu_trec_t::p1, fmSigQStats_t::percentBaudOffset, dpu_crec_t::pre_p1, Q14_SCALE, dpuRxInst_t::rx_count, fmSigQStats_t::rx_level, fmSigQStats_t::rx_rate, dpuRxInst_t::rx_rate, dpuRxInst_t::rx_state, dpuInst_s::RxInst, dpuRxInst_t::samp_per_baud, dpuRxInst_t::slic_inst, fmSigQStats_t::snr, dpuInst_s::sts, TREC_FACTOR, dpuRxInst_t::trec_inst, fmSigQStats_t::tx_level, fmSigQStats_t::tx_rate, dpuTxInst_t::tx_rate, and dpuInst_s::TxInst.

Referenced by fmStats().

void FAX_MODEM | ( | fm_ctrl_str * | ctrl_str,
 |  | void * | dpuInst
 | ) |  |

Definition at line 106 of file fax_mod.c.

Referenced by fmDpuProcessDataRx(), and fmDpuProcessDataTx().


FM: dpu.h Source File

dpu.h

Go to the documentation of this file.
00001 #ifndef _DPU_H
00002 #define _DPU_H
00003 /******************************************************************************
00004  * FILE PURPOSE: Macros and defs for Data Pump Unit (DPU).
00005  *
00006  ******************************************************************************
00007  * FILE NAME:   dpu.h
00008  *
00009  * DESCRIPTION: Defines types and macros necessary for data pump unit.
00010  *              Global context (used by all channels) is defined in dpuloc.h.
00011  *
00012  * $Id: DPU.H 1.16 2002/07/10 10:21:35 Aravind B R Exp $
00013  *
00014  * REVISION HISTORY:
00015  *
00016  * $Log: dpu.h $
00017  * Revision 1.16 2002/07/10 10:21:35 Aravind B R
00018  * Added a new parameter in dpuCfg_t called 'DPUfeatureBitMap' which is a
00019  * 16-bit value for which Bit 0 enables/disables the frame slip correction feature.
00020  * Revision 1.15  2000/06/19 10:59:35  sakhtar
00021  * Merged in dpu.h version 1.13.1.1
00022  * Revision 1.13.1.1  2000/03/06 22:21:59  ffruth
00023  * - Added FAX_MODEM prototype.  Part of removing direct
00024  *   FAX_MODEM call from FIU.
00025  * Revision 1.13  1998/04/30 17:14:41  ppatel
00026  *  Changes for reporting modem status (timing offset, carrier freq offset,
00027  * snr, etc.)
00028  * Revision 1.12  1998/04/07 15:18:56  ppatel
00029  *  Annoying (during final builds) DPU_SAMPLING_RATE removed (which
00030  * was reported undefined)
00031  * Revision 1.11  1997/12/12 16:25:51  PPATEL
00032  *   Changes for V.33 included (tested to work for v.29 but not V.17 or
00033  * V.33)
00034  * Revision 1.10  1997/11/21 15:00:24  PPATEL
00035  *  First version for GG 3.0 (multichannel fax testing with special allocation
00036  * for memory)
00037  * Revision 1.9  1997/10/28 21:36:53  PPATEL
00038  *  Merged latest changes with offshoot for V.17 development
00039  * Revision 1.8  1997/09/05 17:42:03  PPATEL
00040  *  Addition of waiting_time_counter for measuring MIPS
00041  * Revision 1.7  1997/08/27 18:00:18  PPATEL
00042  * threshold enumeration added
00043  * Revision 1.6  1997/08/22 13:15:50  PPATEL
00044  * Incorporated change for threshold programmability
00045  * Revision 1.5  1997/05/25 16:06:20  Zoran
00046  *   Added #defs for status reporting
00047  * Revision 1.4  1997/05/18 12:51:31  Zoran
00048  *  Clean optimized code
00049  * Revision 1.3  1997/02/19 21:57:11  H.T.Li
00050  * Revision 1.2  1996/10/18 10:07:31  HTLI
00051  * Revision 1.1  1996/09/18 12:52:18  chandrav
00052  * Initial revision
00053  *
00054  * (C) Copyright 1996, TELOGY Networks, Inc.
00055  *****************************************************************************/
00056 /***************************************************************************/
00057 /* Include files                                                           */
00058 /***************************************************************************/
00059
00060 /* System level header files */
00061 #include <ti/mas/types/types.h>
00062
00063 /* System utilities APIs */
00064 #include <ti/mas/util/ecomem.h>
00065
00066 #include "fxmdpuif.h"
00067 #include <ti/mas/fm/fm.h>
00068 /***************************************************************************/
00069 /* Constant definitions and Enum types                                     */
00070 /***************************************************************************/
00071
00072 /* Maximum sendout codeword segment size in words */
00073 #define MAX_MODEM_RATE    14400 /* maximum modem rate is 14400 bits per sec */
00074 #define MAX_SENDOUT_T_MS  20    /* holds up to 20ms of compressed 8-bit PCM */
00075 #define MAX_BAUD_RATE     2400  /* maximum baud rate is 2400 bauds per sec  */
00076
00077 #define DPU_MAX_BAUDS_PER_SEG 48  /* maximum bauds per frame = 2400*20ms   */
00078 #define DPU_MAX_SAMPS_PER_SEG 192 /* maximum samples per frame = 9600*20ms */
00079
00080 #define DPU_NBUFS             21
00081 #define DPU_INSTANCE_BUFN     9
00082 #define DPU_DATAIN_BUFN       1
00083 #define DPU_DATAOUT_BUFN      2
00084 #define DPU_RECVOUT_BUFN      3
00085 #define DPU_RECVIN_BUFN       4
00086 #define DPU_INMAN_BEGIN       5
00087 #define DPU_INMAN_END         6
00088 #define DPU_TX_INTP_OLDIN     7
00089 #define DPU_RX_INTP_OLDIN    10
00090 #define DPU_SHAP_OLDIN_RE     0
00091 #define DPU_SHAP_OLDIN_IM     8
00092 #define DPU_HILB_DELAY       11
00093 #define DPU_ADEQ_DELAY_RE    12
00094 #define DPU_ADEQ_DELAY_IM    13
00095 #define DPU_ADEQ_CF_RE_LONG  14
00096 #define DPU_ADEQ_CF_IM_LONG  15
00097 #define DPU_TREC_OUTPUT      16
00098 #define DPU_TREC_DELAY       17
00099 #define DPU_CDEC_PATH_DIST   18
00100 #define DPU_CDEC_ACCUM_DIST  19
00101 #define DPU_CDEC_PATH_STORE  20
00102
00103 /******************************************************************************
00104 * DATA DEFINITION: DPU Feature register, DPUfeatureBitMap
00105 *
00106 *******************************************************************************
00107 * DESCRIPTION: A one-word (16-bit) Feature register that reflects the features
00108 *              enabled in the DPU. The register is laid out as follows:
00109 *
00110 *              ---------------------------------------------------------------
00111 *             |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |
00112 *             |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |
00113 *              ---------------------------------------------------------------
00114 *      Bit #:  15  14  13  12  11  10  09  08  07  06  05  04  03  02  01  00
00115 *                                                                           ^
00116 *                                                                           |
00117 *                                                                           |
00118 *                                                                          FLC
00119 *
00120 *****************************************************************************/
00121 #define DPU_FEATURE_FLC                     0  /* FrameSlip Logic bit number */
00122 #define DPU_FEATURE_FLC_ENABLE_MASK      0x01
00123
00124 /***************************************************************************/
00125 /* Structure definitions                                                   */
00126 /***************************************************************************/
00127
00128 /*  DPU Error Type  */
00129 typedef enum {
00130   DPU_NOMEMORY = -1,
00131   DPU_NOERR    = 0,
00132   DPU_ERROR    = 1
00133 } DpuErrorType_e;
00134
00135 /*  DPU Mode Type  */
00136 typedef enum {
00137   DPU_MOD_NULL   = -1,
00138   DPU_MOD_V21    = 0,
00139   DPU_MOD_V27T   = 1,
00140   DPU_MOD_V29    = 2,
00141   DPU_MOD_V17    = 3,
00142   DPU_MOD_V33    = 4
00143 } DpuModeType_e;
00144
00145 /*  DPU Rate Type  */
00146 typedef enum {
00147   DPU_RATE_NULL  = 0,
00148   DPU_RATE_300   = 300,
00149   DPU_RATE_2400  = 2400,
00150   DPU_RATE_4800  = 4800,
00151   DPU_RATE_7200  = 7200,
00152   DPU_RATE_9600  = 9600,
00153   DPU_RATE_12000 = 12000,
00154   DPU_RATE_14400 = 14400
00155 } DpuRate_e;
00156
00157 /* DPU Operation mode type */
00158 typedef enum {
00159   DPU_FAX    = 0,
00160   DPU_DATA   = 1
00161 } DpuOperationMode_e;
00162
00163 /* DPU Direction type */
00164 typedef enum {
00165   DPU_DIR_TX    = 0,
00166   DPU_DIR_RX    = 1
00167 } DpuDir_e;
00168
00169 /* DPU Training type */
00170 typedef enum {
00171   DPU_TRN_SHORT   = 0,
00172   DPU_TRN_LONG    = 1
00173 } DpuTrainingType_e;
00174
00175 /* Carrier Detect threshold */
00176 typedef enum {
00177   TH_SET1 = 0,
00178   TH_SET2 = 1,
00179   TH_SET3 = 2
00180 } DpuCDThresh_e;
00181
00182 /* Exception Messages */
00183 enum {
00184    DPU_EXC_OPEN      = 1,
00185    DPU_EXC_DELETE    = 2
00186 };
00187
00188 /* Status reporting constants */
00189 #define   DPU_STATUS_TX     0x0000
00190 #define   DPU_STATUS_RX     0x0100
00191
00192 #define   DPU_STATUS_HD     0x0000
00193 #define   DPU_STATUS_FD     0x0200
00194
00195 #define   DPU_STATUS_V21    0x0400
00196 #define   DPU_STATUS_V27    0x0800
00197 #define   DPU_STATUS_V29    0x0C00
00198 #define   DPU_STATUS_V17    0x1000
00199
00200 #define   DPU_ST_V21_TX     (DPU_STATUS_V21+DPU_STATUS_TX+DPU_STATUS_HD)
00201 #define   DPU_ST_V21_RX     (DPU_STATUS_V21+DPU_STATUS_RX+DPU_STATUS_HD)
00202 #define   DPU_ST_V27_TX     (DPU_STATUS_V27+DPU_STATUS_TX+DPU_STATUS_HD)
00203 #define   DPU_ST_V27_RX     (DPU_STATUS_V27+DPU_STATUS_RX+DPU_STATUS_HD)
00204 #define   DPU_ST_V29_TX     (DPU_STATUS_V29+DPU_STATUS_TX+DPU_STATUS_HD)
00205 #define   DPU_ST_V29_RX     (DPU_STATUS_V29+DPU_STATUS_RX+DPU_STATUS_HD)
00206 #define   DPU_ST_V17_TX     (DPU_STATUS_V17+DPU_STATUS_TX+DPU_STATUS_HD)
00207 #define   DPU_ST_V17_RX     (DPU_STATUS_V17+DPU_STATUS_RX+DPU_STATUS_HD)
00208
00209
00210 typedef struct
00211 {
00212   int max_data_per_frame;     /* Maximum # of data per frame for an
00213                                *  instance of DPU. */
00214   int max_samples_per_frame;  /* Maximum # of samples per frame for an
00215                                *  instance of DPU. */
00216 } dpuSizeCfg_t;
00217
00218 /*typedef struct
00219 {
00220      tint size_of_v29TableCluster;
00221      tint size_of_v27TableCluster;
00222      tint size_of_v17TableCluster;
00223      tint size_of_commonTable1Cluster;
00224      tint size_of_commonTable2Cluster;
00225 }dpuRelocatableTableDescriptor_t;*/
00226
00227 typedef struct
00228 {
00229  tuint        ID;                        /* Instance ID                */
00230  dpuSizeCfg_t sizeCfg;                   /* buffer sizes information   */
00231 } dpuNewCfg_t;
00232
00233 typedef tuint dpuCtrl_t;
00234
00235 typedef struct {                     /* send-out object description */
00236   void (*fcn_ptr)(void *targInst, int bits, void *data);
00237   void *targInst;
00238 } dpuSendOut_t;
00239
00240 typedef struct {                     /* recv-out object pointer */
00241   void (*fcn_ptr)(void *targInst, void *samples);
00242   void *targInst;
00243 } dpuRecvOut_t;
00244
00245 typedef struct
00246 {
00247     int            samples_per_seg; /* the number of samples in one segment      */
00248     dpuSendOut_t   send_out;        /* Address of a function and associated data
00249                                      *  structure to accept a demodulated data
00250                                      *  segment from the DPU.                    */
00251     dpuRecvOut_t   recv_out;        /* Address of a function and associated data
00252                                      *  structure to accept a frame of modulated
00253                                      *  samples from the DPU.                    */
00254     int            frame;           /* frame size in ms                          */
00255     int            mode;            /* DPU operation mode                        */
00256     int            protocol;        /* DPU protocol                              */
00257     int            rate;            /* DPU rate                                  */
00258     int            direction;       /* DPU direction ( TX or RX ).               */
00259     int            trn_type;        /* Training type ( Short or Long ).          */
00260     int            time_out;        /* Receiver timeout value                    */
00261     int            tx_level;        /* default transmit level ( in -dBm)         */
00262     int            max_rate;        /* max. rate              ( in bps )         */
00263     int            min_rate;        /* min. rate              ( in bps )         */
00264     int            rx_cd_thr_set;   /* received CD threshold set selector        */
00265     int            dummy;
00266     tint           trellis;         /* Trellis modes enabled? (where applicable) */
00267     tuint          DPUfeatureBitMap; /* DPU feature bit maps, bit0 for frame slip */
00268   fmTablePtrs_t  *TablePtr;       /* pointer to Structure holding the DPU Table
00269                                      pointers */
00270 } dpuCfg_t;
00271
00272 /***************************************************************************/
00273 /* External function declarations                                          */
00274 /***************************************************************************/
00275 void dpuClose        (void *inst);
00276 void dpuConfig       (void *inst,    dpuCfg_t *cfg);
00277 void dpuControl      (void *inst,    tuint *ctrl);
00278 int  dpuNew          (void **inst,   int  nbufs, ecomemBuffer_t *bufs, dpuNewCfg_t *cfg);
00279 void dpuOpen         (void *inst,    dpuCfg_t *cfg);
00280 void dpuTx           (void *dpuInst, tword *data_in, Fract *num_byts,
00281                       linSample *samp_out, Fract *num_samps);
00282 void dpuStatus       (void *inst,    fmSigQStats_t *sts);
00283 void FAX_MODEM       (fm_ctrl_str *ctrl_str, void *dpuInst);
00284
00285 #endif /* DPU_H */
00286 /* nothing after this point */


FM: dpu_adeq.c File Reference

dpu_adeq.c File Reference

#include "dpu_tgt.h"
#include <ti/mas/types/types.h>
#include <ti/mas/fract/fract.h>
#include "dpumath.h"
#include "dpu_fir.h"
#include "dpu_adeq.h"

Include dependency graph for dpu_adeq.c:

Go to the source code of this file.

Functions

void | convolu_complex (Fract *delay_real, Fract *delay_img, LFract *cf_re, LFract *cf_im, Fract *out_real, Fract *out_img, int h_1)
void | dpu_adeq (dpu_adeq_t *inst, Fract *in_re, Fract *in_im, Fract *out_re, Fract *out_im, Fract samp, int n)
void | update (int h1, Fract *x_real, Fract *y_img, Fract *delay_real, Fract *delay_img, Fract Beta, LFract *cf_re, LFract *cf_im)
void | dpu_update_adeq (dpu_adeq_t *inst, Fract err_re, Fract err_im, Fract cosfn, Fract sinfn)

Function Documentation

void convolu_complex | ( | Fract * | delay_real,
 |  | Fract * | delay_img,
 |  | LFract * | cf_re,
 |  | LFract * | cf_im,
 |  | Fract * | out_real,
 |  | Fract * | out_img,
 |  | int | h_1
 | ) |  |

Definition at line 60 of file dpu_adeq.c.

Referenced by dpu_adeq().

void dpu_adeq | ( | dpu_adeq_t * | inst,
 |  | Fract * | in_re,
 |  | Fract * | in_im,
 |  | Fract * | out_re,
 |  | Fract * | out_im,
 |  | Fract | samp,
 |  | int | n
 | ) |  |

Definition at line 85 of file dpu_adeq.c.

References dpu_adeq_t::cf_im_long, dpu_adeq_t::cf_re_long, convolu_complex(), dpu_adeq_t::delay_im, dpu_adeq_t::delay_re, dpu_adeq_t::inpPostAdeqX, dpu_adeq_t::inpPostAdeqY, dpu_adeq_t::length, dpu_adeq_t::postAdeqGain, and shift_data().

Referenced by HSrxCommonSt1Init(), v27RxSt3Init(), and v29RxSt3Init().

Here is the call graph for this function:

void update | ( | int | h1,
 |  | Fract * | x_real,
 |  | Fract * | y_img,
 |  | Fract * | delay_real,
 |  | Fract * | delay_img,
 |  | Fract | Beta,
 |  | LFract * | cf_re,
 |  | LFract * | cf_im
 | ) |  |

Definition at line 117 of file dpu_adeq.c.

Referenced by dpu_update_adeq().

void dpu_update_adeq | ( | dpu_adeq_t * | inst,
 |  | Fract | err_re,
 |  | Fract | err_im,
 |  | Fract | cosfn,
 |  | Fract | sinfn
 | ) |  |

Definition at line 150 of file dpu_adeq.c.

References dpu_adeq_t::beta, dpu_adeq_t::cf_im_long, dpu_adeq_t::cf_re_long, dpu_adeq_t::delay_im, dpu_adeq_t::delay_re, dpu_adeq_t::inpPostAdeqX, dpu_adeq_t::inpPostAdeqY, dpu_adeq_t::length, dpu_adeq_t::postAdeqGain, dpu_adeq_t::postAdeqStepSiz, dpu_adeq_t::postAdeqUpdateFlag, update(), and dpu_adeq_t::updateAdeqFlag.

Referenced by v27RxSt34Init(), and v29RxSt34Init().

Here is the call graph for this function:


FM: dpu_adeq.c Source File

dpu_adeq.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: DPU RX adaptive equalizer
00003  ******************************************************************************
00004  * FILE NAME:  dpu_adeq.c
00005  *
00006  * DESCRIPTION:  DPU RX adaptive equalizer
00007  *
00008  * TABS: NONE
00009  *
00010  * $Id: DPU_ADEQ.C 1.9 2002/09/21 17:38:58 Aravind B R Exp $
00011  *
00012  * REVISION HISTORY:
00013  *
00014  * $Log: DPU_ADEQ.C $
00015  * Revision 1.9 2002/09/21 17:38:58 Aravind B R
00016  * Added the update and convolu_complex functions.
00017  * Revision 1.8  1999/02/21 17:38:58  sakhtar
00018  * Modified for optimization
00019  * Revision 1.7  1998/01/30 14:13:34  PPATEL
00020  *   Single-tap equalizer added after the main equalizer for compensating
00021  * gain changes for short training in V.17. Has been verified to compensate
00022  * for +/- 3 dB gain changes from long training to short training.
00023  * Revision 1.6  1997/11/21 15:10:48  PPATEL
00024  *   initialization routine moved to another file (ade_init.c) for multi-channel
00025  * build (GG 3.0)
00026  * Revision 1.5  1997/10/28 21:47:43  PPATEL
00027  *   Only the long coefficients are needed. All code corresponding to
00028  * short coefficient usage is eliminated and the api's have been changed
00029  * Revision 1.4  1997/09/03 17:25:51  PPATEL
00030  * Changed C542 to C54x for compatibility with C548
00031  * Revision 1.3  1997/05/18 12:27:05  Zoran
00032  *   Cleaned, optimized version
00033  * Revision 1.2  1997/02/19 18:32:58  H.T.Li
00034  * Revision 1.1  1997/02/05 21:35:16  unknown
00035  * Initial revision
00036  *
00037  * (C) Copyright 1996, TELOGY Networks, Inc.
00038  *****************************************************************************/
00039
00040 #include "dpu_tgt.h"
00041 #ifdef PC
00042 #include <stdio.h>
00043 #include <math.h>
00044 #endif
00045
00046  /* System level header files */
00047 #include <ti/mas/types/types.h>
00048 #include <ti/mas/fract/fract.h>
00049 #include "dpumath.h"
00050 #include "dpu_fir.h"
00051 /* DPU RX adaptive equalizer header file */
00052 #include "dpu_adeq.h"
00053
00054 /******************************************************************************
00055  * FUNCTION PURPOSE: DPU adaptive equalizer
00056  ******************************************************************************
00057  * DESCRIPTION: DPU adaptive equalizer
00058  *
00059  *****************************************************************************/
00060 void  convolu_complex(Fract *delay_real, Fract *delay_img, LFract *cf_re,
00061                LFract *cf_im, Fract *out_real, Fract *out_img, int h_1)
00062 {
00063   Fract k, cf;
00064   LFract sum0,sum1,sum2,sum3;
00065
00066   sum0 = sum1 = sum2 = sum3 =0x0000;
00067   for (k =0; k <= h_1; k++)
00068   {
00069     cf  = frctLF2F(cf_re[k],32,16);
00070     sum0+=frctMul(delay_real[-k],14,cf,16,30);
00071     sum1+=frctMul(delay_img[-k],14,cf,16,30);
00072   }
00073
00074   for (k =0; k <= h_1; k++)
00075   {
00076     cf  = frctLF2F(cf_im[k],32,16);
00077     sum2+=frctMul(delay_real[-k],14,cf,16,30);
00078     sum3+=frctMul(delay_img[-k],14,cf,16,30);
00079   }
00080   /* (hr+jhi)*(xr+jxi) = (hr*xr - hi*xi) + j(hr*xi + hi*xr)*/
00081   *out_real = frctLF2F((sum0 - sum3)<<6,30,14); /* sum0 = hr*xr - hi*xi */
00082   *out_img  = frctLF2F((sum2 + sum1)<<6,30,14); /* sum2 = hr*xi + hi*xr */
00083 }
00084
00085 void dpu_adeq(dpu_adeq_t *inst, Fract *in_re, Fract *in_im, Fract *out_re,
00086               Fract *out_im, Fract samp, int n)
00087 {
00088    int h = inst->length + 1;
00089    Fract *delay_re=inst->delay_re;
00090    Fract *delay_im=inst->delay_im;
00091
00092    delay_re[h]= in_re[0];
00093    delay_im[h]= in_im[0];
00094    delay_re[h+1]= in_re[1];
00095    delay_im[h+1]= in_im[1];
00096
00097    convolu_complex(&delay_re[h], &delay_im[h], inst->cf_re_long,
00098                inst->cf_im_long, &out_re[n], &out_im[n], h - 2);
00099
00100    shift_data(&delay_re[2], delay_re, h - 1);
00101    shift_data(&delay_im[2], delay_im, h - 1);
00102
00103    /* Post equalizer tap output computation */
00104    inst->inpPostAdeqX = out_re[n];
00105    inst->inpPostAdeqY = out_im[n];
00106
00107    out_re[n] = frctLF2F(frctMul(out_re[n], 14, inst->postAdeqGain, 12, 26),26,14);
00108    out_im[n] = frctLF2F(frctMul(out_im[n], 14, inst->postAdeqGain, 12, 26),26,14);
00109 }
00110
00111 /******************************************************************************
00112  * FUNCTION PURPOSE: DPU update adaptive equalizer
00113  ******************************************************************************
00114  * DESCRIPTION: DPU update adaptive equalizer
00115  *
00116  *****************************************************************************/
00117 void update(int h1, Fract *x_real, Fract *y_img, Fract *delay_real, Fract *delay_img,
00118               Fract Beta, LFract *cf_re, LFract *cf_im)
00119 {
00120     LFract t1, t2, t3, t4,t5, t6, t7, t8;
00121   Fract  k;
00122
00123     /*  Equalizer update */
00124     for (k=0; k<=h1; k++)
00125     {
00126       t5 = frctMul(*x_real,14,delay_real[-k],14,28);
00127       t6 = frctMul(*y_img, 14,delay_img[-k],14,28);
00128
00129       t7 = frctMul(*y_img, 14,delay_real[-k],14,28);
00130       t8 = frctMul(*x_real,14,delay_img[-k],14,28);
00131
00132       t1 = (LFract)(t5+t6); t2 = (LFract)(t7-t8);
00133
00134     if (Beta > 0)
00135     {
00136       t3 = t1 << Beta;
00137       t4 = t2 << Beta;
00138     }
00139     else
00140     {
00141       t3 = t1 >> (-Beta);
00142       t4 = t2 >> (-Beta);
00143     }
00144
00145       cf_re[k] += t3 ;
00146       cf_im[k] += t4 ;
00147     }
00148 }
00149
00150 void dpu_update_adeq(dpu_adeq_t *inst, Fract err_re,
00151                 Fract err_im, Fract cosfn, Fract sinfn)
00152 {
00153 int h=inst->length-1;
00154 Fract *delay_re=inst->delay_re;
00155 Fract *delay_im=inst->delay_im;
00156 LFract *cf_re_long = inst->cf_re_long;
00157 LFract *cf_im_long = inst->cf_im_long;
00158 Fract x_re, y_im;
00159 Fract beta = inst->beta;
00160 LFract t5, t6;
00161 Fract  tf1;
00162
00163    t5 = frctMul(err_re, 14, cosfn, 14, 28);
00164    t6 = frctMul(err_im, 14, sinfn, 14, 28);
00165    x_re=frctLF2F(t5-t6, 28, 14);
00166    t5 = frctMul(err_im, 14, cosfn, 14, 28);
00167    t6 = frctMul(err_re, 14, sinfn, 14, 28);
00168    y_im=frctLF2F(t5+t6, 28, 14);
00169
00170 /*  Equalizer update                           */
00171 /*    for (k=0; k<=h; k++)                     */
00172 /*    {                                        */
00173 /*      t5 = (LFract)x_re * delay_re[h-k];     */
00174 /*      t6 = (LFract)y_im * delay_im[h-k];     */
00175 /*                                             */
00176 /*      t7 = (LFract)y_im * delay_re[h-k];     */
00177 /*      t8 = (LFract)x_re * delay_im[h-k];     */
00178 /*                                             */
00179 /*      cf_re[k] +=  (t5+t6)*beta;             */
00180 /*      cf_im[k] +=  (t7-t8)*beta;             */
00181 /*    }                                        */
00182
00183    if (inst->updateAdeqFlag)
00184    update(h, &x_re, &y_im, &delay_re[h], &delay_im[h],
00185               (Fract)-beta, cf_re_long, cf_im_long);
00186
00187   /* Post Equalizer update */
00188   if (inst->postAdeqUpdateFlag)
00189   {
00190       t5 =  frctMul(x_re,14, inst->inpPostAdeqX,14, 28);
00191     t5 += frctMul(y_im,14, inst->inpPostAdeqY,14, 28);
00192       tf1 = frctLF2F(t5,28,14);
00193     t5 = frctMul(tf1,14, inst->postAdeqStepSiz, 14,28);
00194     inst->postAdeqGain += frctLF2F(t5,28,12);
00195   }
00196 }
00197
00198 /* Nothing after this point */
00199


FM: dpu_adeq.h File Reference

dpu_adeq.h File Reference

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

Include dependency graph for dpu_adeq.h:

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

Go to the source code of this file.

Data Structures

struct | dpu_adeq_t

Defines

#define | DPU_ADEQ_DL_LEN 51
#define | DPU_ADEQ_COEF_LEN 48

Functions

void | dpu_adeq (dpu_adeq_t *inst, Fract *in_re, Fract *in_im, Fract *out_re, Fract *out_im, Fract samp, int n)
void | dpu_update_adeq (dpu_adeq_t *inst, Fract err_re, Fract err_im, Fract cosfn, Fract sinfn)
void | dpu_adeq_init (dpu_adeq_t *inst, int beta, int length)
void | convolu_complex (Fract *delay_real, Fract *delay_img, LFract *cf_re, LFract *cf_im, Fract *out_real, Fract *out_img, int h_1)
void | update (int h1, Fract *x_real, Fract *y_img, Fract *delay_real, Fract *delay_img, Fract Beta, LFract *cf_re, LFract *cf_im)

Define Documentation

#define DPU_ADEQ_DL_LEN 51

Definition at line 41 of file dpu_adeq.h.

Referenced by dpu_adeq_init().

#define DPU_ADEQ_COEF_LEN 48

Definition at line 42 of file dpu_adeq.h.

Referenced by dpu_adeq_init().

Function Documentation

void dpu_adeq | ( | dpu_adeq_t * | inst,
 |  | Fract * | in_re,
 |  | Fract * | in_im,
 |  | Fract * | out_re,
 |  | Fract * | out_im,
 |  | Fract | samp,
 |  | int | n
 | ) |  |

Definition at line 85 of file dpu_adeq.c.

References dpu_adeq_t::cf_im_long, dpu_adeq_t::cf_re_long, convolu_complex(), dpu_adeq_t::delay_im, dpu_adeq_t::delay_re, dpu_adeq_t::inpPostAdeqX, dpu_adeq_t::inpPostAdeqY, dpu_adeq_t::length, dpu_adeq_t::postAdeqGain, and shift_data().

Referenced by HSrxCommonSt1Init(), v27RxSt3Init(), and v29RxSt3Init().

Here is the call graph for this function:

void dpu_update_adeq | ( | dpu_adeq_t * | inst,
 |  | Fract | err_re,
 |  | Fract | err_im,
 |  | Fract | cosfn,
 |  | Fract | sinfn
 | ) |  |

Definition at line 150 of file dpu_adeq.c.

References dpu_adeq_t::beta, dpu_adeq_t::cf_im_long, dpu_adeq_t::cf_re_long, dpu_adeq_t::delay_im, dpu_adeq_t::delay_re, dpu_adeq_t::inpPostAdeqX, dpu_adeq_t::inpPostAdeqY, dpu_adeq_t::length, dpu_adeq_t::postAdeqGain, dpu_adeq_t::postAdeqStepSiz, dpu_adeq_t::postAdeqUpdateFlag, update(), and dpu_adeq_t::updateAdeqFlag.

Referenced by v27RxSt34Init(), and v29RxSt34Init().

Here is the call graph for this function:

void dpu_adeq_init | ( | dpu_adeq_t * | inst,
 |  | int | beta,
 |  | int | length
 | ) |  |

Definition at line 37 of file ade_init.c.

References dpu_adeq_t::beta, dpu_adeq_t::cf_im_long, dpu_adeq_t::cf_re_long, dpu_adeq_t::delay_im, dpu_adeq_t::delay_re, DPU_ADEQ_COEF_LEN, DPU_ADEQ_DL_LEN, dpu_adeq_t::inpPostAdeqX, dpu_adeq_t::inpPostAdeqY, dpu_adeq_t::length, dpu_adeq_t::postAdeqGain, dpu_adeq_t::postAdeqStepSiz, dpu_adeq_t::postAdeqUpdateFlag, Q12_SCALE, Q14_SCALE, and dpu_adeq_t::updateAdeqFlag.

Referenced by HSrxCommonSt1Init(), v27RxSt34Init(), and v29RxSt34Init().

void convolu_complex | ( | Fract * | delay_real,
 |  | Fract * | delay_img,
 |  | LFract * | cf_re,
 |  | LFract * | cf_im,
 |  | Fract * | out_real,
 |  | Fract * | out_img,
 |  | int | h_1
 | ) |  |

Definition at line 60 of file dpu_adeq.c.

void update | ( | int | h1,
 |  | Fract * | x_real,
 |  | Fract * | y_img,
 |  | Fract * | delay_real,
 |  | Fract * | delay_img,
 |  | Fract | Beta,
 |  | LFract * | cf_re,
 |  | LFract * | cf_im
 | ) |  |

Definition at line 117 of file dpu_adeq.c.


FM: dpu_adeq.h Source File

dpu_adeq.h

Go to the documentation of this file.
00001 #ifndef _DPU_ADEQ_H
00002 #define _DPU_ADEQ_H
00003
00004 /******************************************************************************
00005  * FILE PURPOSE:  header file for RX adaptive equalizer
00006  ******************************************************************************
00007  * FILE NAME: dpu_adeq.h
00008  *
00009  * DESCRIPTION: header file of TX adaptive equalizer
00010  *
00011  * TABS: NONE
00012  *
00013  * $Id: DPU_ADEQ.H 1.8 2000/03/21 19:50:54 jwright Exp $
00014  *
00015  * REVISION HISTORY:
00016  *
00017  * $Log: DPU_ADEQ.H $
00018  * Revision 1.8  2000/03/21 19:50:54  jwright
00019  * Clean up 3.50 compile warning.
00020  * Revision 1.7  1998/01/30 14:13:34  PPATEL
00021  *   Single-tap equalizer added after the main equalizer for compensating
00022  * gain changes for short training in V.17. Has been verified to compensate
00023  * for +/- 3 dB gain changes from long training to short training.
00024  * Revision 1.6  1997/11/21 15:11:37  PPATEL
00025  *   initialization api moved to ade_init.h
00026  * Revision 1.5  1997/10/28 21:48:40  PPATEL
00027  *   Elimination of short equalizer coefficients
00028  * Revision 1.4  1997/09/05 17:45:36  PPATEL
00029  *  Removed "fract.h"
00030  * Revision 1.3  1997/05/18 12:43:50  Zoran
00031  *   Cleaned code
00032  * Revision 1.2  1997/02/19 18:33:42  H.T.Li
00033  * Revision 1.1  1997/02/05 21:36:33  unknown
00034  * Initial revision
00035  *
00036  * (C) Copyright 1996, TELOGY Networks, Inc.
00037  *****************************************************************************/
00038 #include <ti/mas/types/types.h>
00039 #include "dpu_tgt.h"
00040
00041 #define DPU_ADEQ_DL_LEN      51  /* Delay line size in taps */
00042 #define DPU_ADEQ_COEF_LEN    48
00043
00044 typedef struct
00045 {
00046  int length;          /* filter length  */
00047  Fract beta;          /* beta parameter */
00048  Fract *delay_re;     /* real input data delay line  */
00049  Fract *delay_im;     /* imag. input data delay line  */
00050  LFract *cf_re_long;  /* real long coeff.  */
00051  LFract *cf_im_long;  /* imag. long coeff.  */
00052  int    updateAdeqFlag; /* equalizer update flag */
00053
00054  /* Post equalizer single tap for short training */
00055  Fract postAdeqGain;       /* gain of the tap */
00056  Fract postAdeqStepSiz;    /* adaptation step size */
00057  int   postAdeqUpdateFlag; /* whether to update the gain */
00058  Fract inpPostAdeqX;       /* input x to post equalizer */
00059  Fract inpPostAdeqY;       /* input y to post equalizer */
00060 } dpu_adeq_t;
00061
00062
00063 /*  ADEQ API */
00064 void dpu_adeq(dpu_adeq_t *inst, Fract *in_re, Fract *in_im, Fract *out_re,
00065                      Fract *out_im, Fract samp, int n);
00066
00067 void dpu_update_adeq(dpu_adeq_t *inst, Fract err_re,
00068                 Fract err_im, Fract cosfn, Fract sinfn);
00069
00070 void dpu_adeq_init (dpu_adeq_t *inst, int beta, int length);
00071
00072 void  convolu_complex(Fract *delay_real, Fract *delay_img, LFract *cf_re,
00073                LFract *cf_im, Fract *out_real, Fract *out_img, int h_1);
00074
00075 void update(int h1, Fract *x_real, Fract *y_img, Fract *delay_real, Fract *delay_img,
00076               Fract Beta, LFract *cf_re, LFract *cf_im);
00077
00078 #endif  /* _DPU_ADEQ_H */
00079 /* nothing past this point */


FM: dpu_agc.c File Reference

dpu_agc.c File Reference

#include <ti/mas/types/types.h>
#include <ti/mas/fract/fract.h>
#include "dpu_agc.h"
#include "dpu_tgt.h"
#include "fmport.h"
#include "fmprag.h"

Include dependency graph for dpu_agc.c:

Go to the source code of this file.

Functions

Fract | dpu_gain_calc (tint *rx_level, LFract rx_power)
void | dpu_agc_init (dpu_agc_t *inst)

Function Documentation

Fract dpu_gain_calc | ( | tint * | rx_level,
 |  | LFract | rx_power
 | ) |  |

Definition at line 59 of file dpu_agc.c.

References DPU_AGC_SCALE, GAIN_SCAL_FORMAT, GAIN_SCAL_MIN_1, GAIN_SCAL_MIN_2, GAIN_SCAL_PLUS_3, NOMINAL_INPUT_LEVEL, and NOMINAL_RX_LEVEL.

Referenced by dpu_cd_det_v21().

void dpu_agc_init ( dpu_agc_t * inst )

Definition at line 107 of file dpu_agc.c.

References DPU_AGC_SCALE, and dpu_agc_t::gain.

Referenced by HSrxCommonSt1Init(), and v21RxStNULLInit().


FM: dpu_agc.c Source File

dpu_agc.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE:  DPU RX auto gain controller
00003  ******************************************************************************
00004  * FILE NAME: dpu_agc.c
00005  *
00006  * DESCRIPTION:  DPU RX auto gain controller
00007  *
00008  * TABS: NONE
00009  *
00010  * $Id: DPU_AGC.C 1.9 2000/03/29 12:11:13 sakhtar Exp $
00011  *
00012  * REVISION HISTORY:
00013  *
00014  * $Log: DPU_AGC.C $
00015  * Revision 1.9  2000/03/29 12:11:13  sakhtar
00016  * Modified for compilation with 3.50 tools. Changes are compatible
00017  * with 1.20 and 1.16 tools as well. Replaced frctMul with dpu_mul
00018  * to prevent call to the function for multiplication
00019  * Revision 1.8  1997/11/21 15:12:22  PPATEL
00020  *  agc routine moved to another file (agcrx.c) for multi-channel build for GG 3.0
00021  * Revision 1.7  1997/09/26 16:32:07  PPATEL
00022  *   Moved some #defines in dpu_agc.h to be used elsewhere
00023  * Revision 1.6  1997/09/16 22:24:39  PPATEL
00024  *  debugging info added
00025  * Revision 1.5  1997/09/05 17:46:55  PPATEL
00026  *   included types and fract
00027  * Revision 1.4  1997/08/22 13:17:33  PPATEL
00028  * Improved rx power level measurement
00029  * Revision 1.3  1997/05/18 12:32:50  Zoran
00030  *   Modified AGC algorithm, added routine for calculating initial gain
00031  * Revision 1.2  1997/02/19 22:16:12  H.T.Li
00032  * Revision 1.1  1997/02/05 21:39:51  unknown
00033  * Initial revision
00034  *
00035  * (C) Copyright 1996, TELOGY Networks, Inc.
00036  *****************************************************************************/
00037
00038 #include <ti/mas/types/types.h>
00039 #include <ti/mas/fract/fract.h>
00040 /* DPU RX AGC header file */
00041 #include "dpu_agc.h"
00042 #include "dpu_tgt.h"
00043 #include "fmport.h"
00044 #include "fmprag.h"
00045
00046 #ifdef DPU_DBG
00047
00048 #include "dpu_dbg.h"
00049 #endif
00050
00051
00052 /******************************************************************************
00053  * FUNCTION PURPOSE: AGC Init.
00054  ******************************************************************************
00055  * DESCRIPTION: Initialize Auto gain controler
00056  *
00057  *****************************************************************************/
00058
00059 Fract dpu_gain_calc(tint *rx_level, LFract rx_power)
00060 {
00061       Fract rx_gain;
00062
00063 #ifdef DPU_DBG
00064  LFract rx_power_temp = rx_power;
00065 #endif
00066
00067       /* RX level and gain estimation */
00068       *rx_level = NOMINAL_RX_LEVEL;
00069       rx_gain = 1*DPU_AGC_SCALE;
00070       /* Do coarse power calculation */
00071       while ((rx_power<NOMINAL_INPUT_LEVEL) && (rx_power > 1))
00072       {
00073         *rx_level += 3;                 /* Add 3 dB to rx level */
00074         /* Scale gain by +3dB */
00075         rx_gain = (Fract) dpu_mul(rx_gain, 11, GAIN_SCAL_PLUS_3, GAIN_SCAL_FORMAT, 11);
00076         rx_power = rx_power<<1; /* Scale power by 3 dB */
00077       }
00078       /* Do fine power calculation */
00079       /* Check if it is 2 dB over estimated (10log(1.59)=2 */
00080       if(rx_power > (LFract)(NOMINAL_INPUT_LEVEL*1.59))
00081       {
00082         *rx_level -= 2;                /* Subtract 2 dB to rx level */
00083         /* Scale gain by -2dB */
00084         rx_gain = (Fract) dpu_mul(rx_gain, 11, GAIN_SCAL_MIN_2, GAIN_SCAL_FORMAT, 11);
00085       }
00086       /* Check if it is 1 dB over estimated (10log(1.26)=1 */
00087       else if(rx_power > (LFract)(NOMINAL_INPUT_LEVEL*1.26))
00088       {
00089         *rx_level -= 1;                /* Subtract 1 dB to rx level */
00090         /* Scale gain by -1dB */
00091         rx_gain = (Fract) dpu_mul(rx_gain, 11, GAIN_SCAL_MIN_1, GAIN_SCAL_FORMAT, 11);
00092       }
00093
00094 #ifdef DPU_DBG
00095   dpu_dbg_insert_rx_level(*rx_level, rx_power_temp);
00096 #endif
00097       return(rx_gain);
00098 }
00099
00100 /******************************************************************************
00101  * FUNCTION PURPOSE: AGC Init.
00102  ******************************************************************************
00103  * DESCRIPTION: Initialize Auto gain controler
00104  *
00105  *****************************************************************************/
00106
00107 void  dpu_agc_init(dpu_agc_t *inst)
00108 {
00109
00110   inst->gain = (Fract) (1*DPU_AGC_SCALE);
00111
00112 }


FM: dpu_agc.h File Reference

dpu_agc.h File Reference

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

Include dependency graph for dpu_agc.h:

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

Go to the source code of this file.

Data Structures

struct | dpu_agc_t

Defines

#define | DPU_AGC_SCALE Q9_SCALE
#define | NOMINAL_INPUT_LEVEL (LFract)(0.0628*Q31_SCALE)
#define | NOMINAL_RX_LEVEL 6
#define | GAIN_SCAL_NOMINAL 16384
#define | GAIN_SCAL_FORMAT 14
#define | GAIN_SCAL_PLUS_3 GAIN_SCAL_NOMINAL*1.4125
#define | GAIN_SCAL_MIN_2 GAIN_SCAL_NOMINAL*0.7943
#define | GAIN_SCAL_MIN_1 GAIN_SCAL_NOMINAL*0.8913

Functions

void | dpu_agc_init (dpu_agc_t *inst)
Fract | dpu_gain_calc (tint *rx_level, LFract power)

Define Documentation

#define DPU_AGC_SCALE Q9_SCALE

Definition at line 41 of file dpu_agc.h.

Referenced by dpu_agc_init(), dpu_gain_calc(), and v21RxStM().

#define NOMINAL_INPUT_LEVEL (LFract)(0.0628*Q31_SCALE)

Definition at line 44 of file dpu_agc.h.

Referenced by dpu_gain_calc().

#define NOMINAL_RX_LEVEL 6

Definition at line 46 of file dpu_agc.h.

Referenced by dpu_gain_calc().

#define GAIN_SCAL_NOMINAL 16384

Definition at line 48 of file dpu_agc.h.

#define GAIN_SCAL_FORMAT 14

Definition at line 49 of file dpu_agc.h.

Referenced by dpu_gain_calc().

#define GAIN_SCAL_PLUS_3 GAIN_SCAL_NOMINAL*1.4125

Definition at line 50 of file dpu_agc.h.

Referenced by dpu_gain_calc().

#define GAIN_SCAL_MIN_2 GAIN_SCAL_NOMINAL*0.7943

Definition at line 51 of file dpu_agc.h.

Referenced by dpu_gain_calc().

#define GAIN_SCAL_MIN_1 GAIN_SCAL_NOMINAL*0.8913

Definition at line 52 of file dpu_agc.h.

Referenced by dpu_gain_calc().

Function Documentation

void dpu_agc_init ( dpu_agc_t * inst )

Definition at line 107 of file dpu_agc.c.

References DPU_AGC_SCALE, and dpu_agc_t::gain.

Referenced by HSrxCommonSt1Init(), and v21RxStNULLInit().

Fract dpu_gain_calc | ( | tint * | rx_level,
 |  | LFract | power
 | ) |  |

Definition at line 59 of file dpu_agc.c.

References DPU_AGC_SCALE, GAIN_SCAL_FORMAT, GAIN_SCAL_MIN_1, GAIN_SCAL_MIN_2, GAIN_SCAL_PLUS_3, NOMINAL_INPUT_LEVEL, and NOMINAL_RX_LEVEL.

Referenced by dpu_cd_det_v21().


FM: dpu_agc.h Source File

dpu_agc.h

Go to the documentation of this file.
00001 #ifndef _DPU_AGC_H
00002 #define _DPU_AGC_H
00003
00004 /******************************************************************************
00005  * FILE PURPOSE:  header file of RX AGC
00006  ******************************************************************************
00007  * FILE NAME: dpu_agc.h
00008  *
00009  * DESCRIPTION: header file of RX auto gain controller
00010  *
00011  * TABS: NONE
00012  *
00013  * $Id: DPU_AGC.H 1.9 2000/03/21 19:46:11 jwright Exp $
00014  *
00015  * REVISION HISTORY:
00016  *
00017  * $Log: DPU_AGC.H $
00018  * Revision 1.9  2000/03/21 19:46:11  jwright
00019  * Clean up 3.50 compile warning.
00020  * Revision 1.8  1997/12/16 18:09:47  PPATEL
00021  *  old_agc gain required for V.17 short training.
00022  * Revision 1.7  1997/11/21 15:12:51  PPATEL
00023  *  agc api moved to agcrx.h
00024  * Revision 1.6  1997/09/26 16:33:04  PPATEL
00025  *   Moved some #defines from dpu_agc.c to this file to be used elsewhere
00026  * Revision 1.5  1997/09/05 17:48:38  PPATEL
00027  *    fract.h removal
00028  * Revision 1.4  1997/08/22 13:20:22  PPATEL
00029  * Improved rx power level measurement (using long fract)
00030  * Revision 1.3  1997/05/18 12:47:43  Zoran
00031  *   Cleaned, updated code
00032  * Revision 1.2  1997/02/19 22:17:59  H.T.Li
00033  * Revision 1.1  1997/02/05 21:40:54  unknown
00034  * Initial revision
00035  *
00036  * (C) Copyright 1996, TELOGY Networks, Inc.
00037  *****************************************************************************/
00038 #include <ti/mas/types/types.h>
00039 #include "dpu_tgt.h"
00040
00041 #define DPU_AGC_SCALE Q9_SCALE
00042
00043 /* 3 dBm corresponds to 0.25*10**(3/10) = 0.0628 */
00044 #define NOMINAL_INPUT_LEVEL (LFract)(0.0628*Q31_SCALE)
00045
00046 #define NOMINAL_RX_LEVEL 6
00047 /* Linear gain Scaling Constants */
00048 #define GAIN_SCAL_NOMINAL 16384
00049 #define GAIN_SCAL_FORMAT 14
00050 #define GAIN_SCAL_PLUS_3 GAIN_SCAL_NOMINAL*1.4125
00051 #define GAIN_SCAL_MIN_2 GAIN_SCAL_NOMINAL*0.7943
00052 #define GAIN_SCAL_MIN_1 GAIN_SCAL_NOMINAL*0.8913
00053
00054 typedef struct
00055 {
00056  Fract gain;
00057  Fract old_gain; /* for freezing equalizer gain for short training of V.17 */
00058  int rx_level;
00059 } dpu_agc_t;
00060
00061
00062 /*  AGC API */
00063
00064 void dpu_agc_init(dpu_agc_t *inst);
00065 Fract dpu_gain_calc(tint *rx_level, LFract power);
00066
00067 #endif  /* _DPU_AGC_H */
00068 /* nothing past this point */


FM: dpu_cd.c File Reference

dpu_cd.c File Reference

#include <ti/mas/types/types.h>
#include <ti/mas/fract/fract.h>
#include "dpu_cd.h"
#include "cdrx.h"
#include "dpu_ddet.h"
#include "dpu_agc.h"
#include "dpumath.h"
#include "dpu_fir.h"

Include dependency graph for dpu_cd.c:

Go to the source code of this file.

Defines

#define | CD_TEST 0
#define | CD_TEST1 0

Functions

int | dpu_cd_det_v21 (dpu_cddet_t *inst, Fract *in, int samp, int n, Fract *gain, tint *rx_level)
void | dpu_cd_det_init (dpu_cddet_t *inst, Fract freq, Fract mu)

Variables

int | RX_LEVEL
int | RX_GAIN

Define Documentation

#define CD_TEST 0

Definition at line 82 of file dpu_cd.c.

#define CD_TEST1 0

Definition at line 83 of file dpu_cd.c.

Function Documentation

int dpu_cd_det_v21 | ( | dpu_cddet_t * | inst,
 |  | Fract * | in,
 |  | int | samp,
 |  | int | n,
 |  | Fract * | gain,
 |  | tint * | rx_level
 | ) |  |

Definition at line 110 of file dpu_cd.c.

References dpu_cddet_t::alpha, averagePow(), dpu_cddet_t::count, dpu_cddet_t::count_false_req, dpu_cddet_t::count_true_req, dpu_cddet_t::division, dot_square_asm(), DPU_CD_FALSE, DPU_CD_TRUE, dpu_gain_calc(), dpu_cddet_t::fSignalPowerPresent, dpu_cddet_t::high_power_req, IIRUpdatOutPow(), IIRUpdatOutPowTep(), dpu_cddet_t::low_power_req, dpu_cddet_t::power_sat, RX_GAIN, RX_LEVEL, dpu_cddet_t::sig_pow, dpu_cddet_t::status, dpu_cddet_t::tep_cnt_thr, dpu_cddet_t::tep_count, dpu_cddet_t::tep_pow, dpu_cddet_t::tepCoefs, dpu_cddet_t::tepIIR, dpu_cddet_t::tepInp, dpu_cddet_t::v21_count, dpu_cddet_t::v21Filt, dpu_cddet_t::v21FreqVect, and dpu_cddet_t::v21OneMu.

Referenced by v21RxSt1Init(), and v21RxStNULLInit().

Here is the call graph for this function:

void dpu_cd_det_init | ( | dpu_cddet_t * | inst,
 |  | Fract | freq,
 |  | Fract | mu
 | ) |  |

Definition at line 249 of file dpu_cd.c.

References dpu_cddet_t::carrLossPendingFlag, dpu_cddet_t::count, DPU_CD_FALSE, dpu_cddet_t::fSignalPowerPresent, cmplx_t::im, INTERP_CONST_SCALE, cmplx_t::re, dpu_cddet_t::sig_pow, dpu_cddet_t::status, dpu_cddet_t::tep_cnt_thr, dpu_cddet_t::tep_pow, dpu_cddet_t::tepCoefs, dpu_cddet_t::tepIIR, dpu_cddet_t::tepInp, dpu_cddet_t::v21_count, dpu_cddet_t::v21Filt, dpu_cddet_t::v21FreqVect, and dpu_cddet_t::v21OneMu.

Referenced by v21RxStNULLInit(), v27RxSt8Init(), and v29RxSt8Init().

Variable Documentation

int RX_LEVEL

Definition at line 105 of file dpu_ddet.c.

Referenced by dpu_cd_det_v21().

int RX_GAIN

Definition at line 106 of file dpu_ddet.c.

Referenced by dpu_cd_det_v21().


FM: dpu_cd.c Source File

dpu_cd.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: DPU RX carrier detector
00003  ******************************************************************************
00004  * FILE NAME:  dpu_cd.c
00005  *
00006  * DESCRIPTION:  DPU RX carrier detector
00007  *
00008  * TABS: NONE
00009  *
00010  * $Id: DPU_CD.C 1.22 2000/03/21 22:34:42 jwright Exp $
00011  *
00012  * REVISION HISTORY:
00013  *
00014  * $Log: DPU_CD.C $
00015  * Revision 1.22  2000/03/21 22:34:42  jwright
00016  * Clean up 3.50 compile warnings.
00017  * Revision 1.21  1999/02/26 19:02:26  sakhtar
00018  * Modified the API of IIRUpdatOutPowTep function to return
00019  * another value. Fix for false P2 detect in V27 instead of V21
00020  * Revision 1.20  1998/04/30 17:14:41  ppatel
00021  *  Changes for reporting modem status (timing offset, carrier freq offset,
00022  * snr, etc.)
00023  * Revision 1.19  1997/12/21 16:24:46  PPATEL
00024  *  Disable reporting of TEP in v.21
00025  * Revision 1.18  1997/12/10 00:22:20  PPATEL
00026  *   utlSin used for sine and cosine
00027  * Revision 1.17  1997/11/28 21:56:59  PPATEL
00028  *  Using sine and cos through polynomial implementation
00029  * Revision 1.16  1997/11/21 15:14:59  PPATEL
00030  *   high speed cd detection moved to cdrx.c file for multi-channel build for
00031  * GG 3.0. Tep initialization changed for detection 1800 Hz (for V.27 in low speed)
00032  * instead of 1750 Hz.
00033  * Revision 1.15  1997/10/31 14:00:50  PPATEL
00034  *  Major computations now in assembly. This file can now be compiled
00035  * with Version 1.20 with optimizer on. Improved TEP detection using a 2nd
00036  * order IIR notch filter.
00037  * Revision 1.14  1997/10/28 21:56:40  PPATEL
00038  *   Use of assembly routine in hs_cd_det.... routine
00039  * Revision 1.13  1997/09/26 16:34:39  PPATEL
00040  *   Sine by polynomial implementation had some problems (constellation
00041  * having random points) so implemented by table again but in a clean way
00042  * Revision 1.12  1997/09/16 22:37:08  PPATEL
00043  *   Debugging info added and clean up corresponding to merge from
00044  * clean customer build (on sept 16th)
00045  * Revision 1.11  1997/09/05 17:49:59  PPATEL
00046  *   Sine look up removed.
00047  * Revision 1.10  1997/09/03 17:26:44  PPATEL
00048  * Changed C542 to C54x for C548 compatibility
00049  * Revision 1.9  1997/08/27 18:02:48  PPATEL
00050  *     Improved cd detection.
00051  * Revision 1.8  1997/08/25 18:42:32  PPATEL
00052  * const removed from cd_thresholds because of compiler bug
00053  * Revision 1.7  1997/08/22 13:21:49  PPATEL
00054  * Improved performance of cd detection at low power levels
00055  * Revision 1.6  1997/05/25 16:09:43  Zoran
00056  *   Added reporting of rx level when CD is detected
00057  * Revision 1.5  1997/05/19 15:55:57  Zoran
00058  *   Added dpu_agc.h - prototype for gain calc. function
00059  * Revision 1.4  1997/05/18 12:33:14  Zoran
00060  *    Cleaned code
00061  * Revision 1.2  1997/02/19 22:18:15  H.T.Li
00062  * Revision 1.1  1997/02/05 21:37:58  unknown
00063  * Initial revision
00064  *
00065  * (C) Copyright 1996, TELOGY Networks, Inc.
00066  *****************************************************************************/
00067 #include <ti/mas/types/types.h>
00068 #include <ti/mas/fract/fract.h>
00069
00070 /* DPU RX CD header file */
00071 #include "dpu_cd.h"
00072 #include "cdrx.h"
00073 #include "dpu_ddet.h"
00074 #include "dpu_agc.h"
00075 #include "dpumath.h"
00076 #include "dpu_fir.h"
00077 #ifdef DPU_DBG
00078
00079 #include "dpu_dbg.h"
00080 #endif
00081
00082 #define CD_TEST 0
00083 #define CD_TEST1 0
00084
00085 #if CD_TEST1
00086 #define CD_TEST_SIZE1 1024
00087 int CD_TEST_INDEX1 = 0;
00088 Fract CD_TEST_SAMPLE_BUF[CD_TEST_SIZE1];
00089 LFract CD_TEST_SIG_POW_BUF[CD_TEST_SIZE1];
00090 #endif
00091
00092 #if CD_TEST
00093 #define CD_TEST_SIZE 1024
00094 int CD_TEST_INDEX = 0;
00095 /*int CD_TEST_V21_BUF[CD_TEST_SIZE];
00096 int CD_TEST_TEP_BUF[CD_TEST_SIZE];*/
00097 LFract CD_TEST_SIG_BUF[CD_TEST_SIZE];
00098 /*int CD_TEST_SIGT_BUF[CD_TEST_SIZE];
00099 int CD_TEST_TEPT_BUF[CD_TEST_SIZE]; */
00100 #endif
00101 /******************************************************************************
00102  * FUNCTION PURPOSE: DPU carrier detector for low speed mode (V.21)
00103  ******************************************************************************
00104  * DESCRIPTION: DPU carrier detector
00105  *
00106  *****************************************************************************/
00107 extern int RX_LEVEL;
00108 extern int RX_GAIN;
00109
00110 int dpu_cd_det_v21(dpu_cddet_t *inst, Fract *in, int samp, int n,
00111                    Fract *gain, tint*rx_level)
00112 {
00113
00114  int j;
00115  LFract v21_pow = 0;
00116  LFract sig_pow = 0;
00117  LFract tep_pow = 0;
00118  int n1=n*samp;
00119
00120  Fract t1,t2;
00121
00122  for (j=0; j<samp; j++)
00123  {
00124
00125    t1 = in[n1+j];
00126    #if CD_TEST1
00127     CD_TEST_SAMPLE_BUF[CD_TEST_INDEX1] = in[n1+j];
00128     CD_TEST_SIG_POW_BUF[CD_TEST_INDEX1] = inst->sig_pow;
00129   CD_TEST_INDEX1++;
00130   CD_TEST_INDEX1 &= CD_TEST_SIZE1-1;
00131    #endif
00132
00133    v21_pow += IIRUpdatOutPow(&(inst->v21Filt) ,&(inst->v21FreqVect), t1, inst->v21OneMu);
00134    tep_pow += IIRUpdatOutPowTep(t1, inst->tepIIR, inst->tepInp, inst->tepCoefs,&t2);
00135  }
00136
00137  sig_pow = dot_square_asm(in+n1,samp-1);
00138  /* Average the signal power */
00139  averagePow(&inst->sig_pow, &sig_pow, inst->alpha, inst->division);
00140
00141  /* Average the TEP signal power */
00142  averagePow(&inst->tep_pow, &tep_pow, inst->alpha, inst->division);
00143
00144 #if CD_TEST
00145  CD_TEST_SIG_BUF[CD_TEST_INDEX]=inst->sig_pow;
00146  /*CD_TEST_TEP_BUF[CD_TEST_INDEX]=inst->tep_pow;
00147  CD_TEST_V21_BUF[CD_TEST_INDEX]=frctLF2F(v21_pow, 20,14);
00148  CD_TEST_SIGT_BUF[CD_TEST_INDEX]=frctLF2F(sig_pow, 20,14);
00149  CD_TEST_TEPT_BUF[CD_TEST_INDEX]=frctLF2F(tep_pow, 16,10);*/
00150  CD_TEST_INDEX++;
00151  CD_TEST_INDEX &= CD_TEST_SIZE-1;
00152 #endif
00153
00154  if (inst->status == DPU_CD_TRUE)
00155  {
00156     /* Check if there is no V21 in band power  */
00157     if ((v21_pow) <= (sig_pow >> 2))
00158     {
00159          inst->tep_count = 0; /* reset TeP counter - there is no in band energy */
00160          inst->v21_count += samp;
00161          if (inst->v21_count > inst->count_false_req)
00162          {
00163        /*   inst->status = DPU_CD_FALSE;*/
00164            /* reset counter for detecting CD detection */
00165            inst->v21_count = 0;
00166      /* inst->count = 0;*/
00167        /*    return(DPU_CD_FALSE);*/
00168          }
00169     }
00170     else /* V21 power is present, check tep detection */
00171     {
00172       if(inst->tep_pow < inst->sig_pow>>3)
00173       {
00174         inst->tep_count += samp;
00175         if(inst->tep_count > inst->tep_cnt_thr)
00176         {
00177           inst->tep_count = 0;
00178         /*  return(DPU_TEP_TRUE); */
00179         }
00180       }
00181     } /* if(v21_pow < sig_pow) */
00182
00183  } /* if (inst->status == DPU_CD_TRUE) */
00184
00185  if ((inst->status == DPU_CD_FALSE))
00186  {
00187    if (inst->sig_pow > inst->high_power_req)
00188    {
00189       inst->count += samp;
00190       if (inst->count > inst->count_true_req)
00191       {
00192         inst->status = DPU_CD_TRUE;
00193         inst->fSignalPowerPresent = TRUE;
00194         /* reset counter for detecting CD loss */
00195         inst->count = 0;
00197         *gain = dpu_gain_calc(rx_level,inst->sig_pow);
00198         RX_LEVEL = *rx_level;
00199         RX_GAIN = *gain;
00200
00201         return(DPU_CD_TRUE);
00202       }
00203       return(DPU_CD_FALSE);
00204     }
00205     else
00206     {
00207         inst->count = 0;
00208         return(DPU_CD_FALSE);
00209     }
00210  }
00211  else /* status = DPU_CD_TRUE */
00212  {
00213    if (inst->sig_pow > inst->power_sat)
00214    {
00215      inst->sig_pow = inst->power_sat;
00216      inst->count = 0;
00217      return(DPU_CD_TRUE);
00218    }
00219    if (inst->sig_pow < inst->low_power_req)
00220    {
00221      inst->count += samp;
00222      if (inst->count > inst->count_false_req)
00223      {
00224         inst->status = DPU_CD_FALSE;
00225         inst->fSignalPowerPresent = FALSE;
00226         /* reset counter for detecting CD detection */
00227         inst->count = 0;
00228         return(DPU_CD_FALSE);
00229       }
00230       return(DPU_CD_TRUE);
00231    }
00232    else
00233    {
00234       inst->count = 0;
00235       return(DPU_CD_TRUE);
00236    }
00237  }
00238 }
00239
00240
00241
00242 /******************************************************************************
00243  * FUNCTION PURPOSE:  dotting detector initialize
00244  ******************************************************************************
00245  * DESCRIPTION: dotting detector initialize
00246  *
00247  *****************************************************************************/
00248
00249 void dpu_cd_det_init (dpu_cddet_t *inst, Fract freq, Fract mu)
00250 {
00251   inst->status      = DPU_CD_FALSE;
00252   inst->count       = 0;
00253   inst->v21_count   = 0;
00254 #if 0 /* Retain the Signal power computed from Training, so that we do not falsely
00255          declare the Carrier Loss in HS mode */
00256   inst->sig_pow     = 0;
00257 #endif
00258   inst->tep_pow     = 0;
00259   inst->tep_cnt_thr = 320;
00260
00261     inst->tepIIR[0]   = 0;
00262   inst->tepIIR[1]   = 0;
00263   inst->tepInp[0]   = 0;
00264   inst->tepInp[1]   = 0;
00265         inst->tepCoefs[0] = (Fract)(2*0.382683*INTERP_CONST_SCALE); /* 2*cos(2*pi*1750/9600) */
00266         inst->tepCoefs[1] = (Fract)(2*0.98*0.382683*INTERP_CONST_SCALE); /* 2*mu*cos() */
00267   inst->tepCoefs[2] = (Fract)(0.98*0.98*INTERP_CONST_SCALE); /* mu*mu */
00268
00269     inst->v21Filt.re = 0;
00270     inst->v21Filt.im = 0;
00271     if (mu > 0)
00272     {
00273      inst->v21FreqVect.re = frctLF2F(frctMul(mu, 14, utlSin((Fract)((Fract)16384-freq)), 14, 28), 28, 14);
00274      inst->v21FreqVect.im = frctLF2F(frctMul(mu, 14, utlSin(freq), 14, 28), 28, 14);
00275      inst->v21OneMu = (Fract)(1 * INTERP_CONST_SCALE)-mu;
00276     }
00277    inst->carrLossPendingFlag = FALSE;
00278
00279    inst->fSignalPowerPresent = FALSE;
00280
00281 }


FM: dpu_cd.h File Reference

dpu_cd.h File Reference

#include <ti/mas/types/types.h>
#include "dpu_tgt.h"
#include "dpumath.h"
#include <ti/mas/fm/fmTablesTypes.h>

Include dependency graph for dpu_cd.h:

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

Go to the source code of this file.

Data Structures

struct | dpu_cddet_t

Defines

#define | DPU_CD_TRUE 1
#define | DPU_CD_FALSE 0

Functions

int | dpu_cd_det_v21 (dpu_cddet_t *inst, Fract *in, int samp, int n, Fract *gain, tint *rx_level)
void | dpu_cd_det_init (dpu_cddet_t *inst, Fract freq, Fract mu)
LFract | IIRUpdatOutPow (cmplx_t *filt, cmplx_t *freq, Fract in, Fract oneMu)
LFract | IIRUpdatOutPowTep (Fract in, Fract *tepIIR, Fract *tepInp, Fract *tepCoefs, Fract *out)

Define Documentation

#define DPU_CD_TRUE 1

Definition at line 51 of file dpu_cd.h.

Referenced by dpu_cd_det_hs(), dpu_cd_det_v21(), and v21RxStM().

#define DPU_CD_FALSE 0

Definition at line 52 of file dpu_cd.h.

Referenced by dpu_cd_det_hs(), dpu_cd_det_hs_pwrlatch(), dpu_cd_det_init(), dpu_cd_det_v21(), v21Rx(), v21RxStM(), v21RxStNULLInit(), v27RxStM(), and v29RxStM().

Function Documentation

int dpu_cd_det_v21 | ( | dpu_cddet_t * | inst,
 |  | Fract * | in,
 |  | int | samp,
 |  | int | n,
 |  | Fract * | gain,
 |  | tint * | rx_level
 | ) |  |

Definition at line 110 of file dpu_cd.c.

References dpu_cddet_t::alpha, averagePow(), dpu_cddet_t::count, dpu_cddet_t::count_false_req, dpu_cddet_t::count_true_req, dpu_cddet_t::division, dot_square_asm(), DPU_CD_FALSE, DPU_CD_TRUE, dpu_gain_calc(), dpu_cddet_t::fSignalPowerPresent, dpu_cddet_t::high_power_req, IIRUpdatOutPow(), IIRUpdatOutPowTep(), dpu_cddet_t::low_power_req, dpu_cddet_t::power_sat, RX_GAIN, RX_LEVEL, dpu_cddet_t::sig_pow, dpu_cddet_t::status, dpu_cddet_t::tep_cnt_thr, dpu_cddet_t::tep_count, dpu_cddet_t::tep_pow, dpu_cddet_t::tepCoefs, dpu_cddet_t::tepIIR, dpu_cddet_t::tepInp, dpu_cddet_t::v21_count, dpu_cddet_t::v21Filt, dpu_cddet_t::v21FreqVect, and dpu_cddet_t::v21OneMu.

Referenced by v21RxSt1Init(), and v21RxStNULLInit().

Here is the call graph for this function:

void dpu_cd_det_init | ( | dpu_cddet_t * | inst,
 |  | Fract | freq,
 |  | Fract | mu
 | ) |  |

Definition at line 249 of file dpu_cd.c.

References dpu_cddet_t::carrLossPendingFlag, dpu_cddet_t::count, DPU_CD_FALSE, dpu_cddet_t::fSignalPowerPresent, cmplx_t::im, INTERP_CONST_SCALE, cmplx_t::re, dpu_cddet_t::sig_pow, dpu_cddet_t::status, dpu_cddet_t::tep_cnt_thr, dpu_cddet_t::tep_pow, dpu_cddet_t::tepCoefs, dpu_cddet_t::tepIIR, dpu_cddet_t::tepInp, dpu_cddet_t::v21_count, dpu_cddet_t::v21Filt, dpu_cddet_t::v21FreqVect, and dpu_cddet_t::v21OneMu.

Referenced by v21RxStNULLInit(), v27RxSt8Init(), and v29RxSt8Init().

LFract IIRUpdatOutPow | ( | cmplx_t * | filt,
 |  | cmplx_t * | freq,
 |  | Fract | in,
 |  | Fract | oneMu
 | ) |  |

Definition at line 25 of file dpu_ddt.c.

Referenced by dpu_cd_det_v21(), and dpu_dot_det().

LFract IIRUpdatOutPowTep | ( | Fract | in,
 |  | Fract * | tepIIR,
 |  | Fract * | tepInp,
 |  | Fract * | tepCoefs,
 |  | Fract * | out
 | ) |  |

Definition at line 48 of file dpu_ddt.c.

Referenced by dpu_cd_det_v21(), and dpu_dot_det().


FM: dpu_cd.h Source File

dpu_cd.h

Go to the documentation of this file.
00001 #ifndef _DPU_CD_H
00002 #define _DPU_CD_H
00003
00004 /******************************************************************************
00005  * FILE PURPOSE:  header file of RX detector
00006  ******************************************************************************
00007  * FILE NAME: dpu_ddet.h
00008  *
00009  * DESCRIPTION: header file of RX dot detector
00010  *
00011  * TABS: NONE
00012  *
00013  * $Id: dpu_cd.h 1.11 1999/02/26 19:02:33 sakhtar Exp $
00014  *
00015  * REVISION HISTORY:
00016  *
00017  * $Log: dpu_cd.h $
00018  * Revision 1.11  1999/02/26 19:02:33  sakhtar
00019  * Modified the API of IIRUpdatOutPowTep function to return
00020  * another value. Fix for false P2 detect in V27 instead of V21
00021  * Revision 1.10  1998/04/30 17:14:41  ppatel
00022  *  Changes for reporting modem status (timing offset, carrier freq offset,
00023  * snr, etc.)
00024  * Revision 1.9  1997/11/21 15:15:40  PPATEL
00025  *  api change for multi-channel build for GG 3.0
00026  * Revision 1.8  1997/10/31 14:01:25  PPATEL
00027  *  Improved TEP tone detection
00028  * Revision 1.7  1997/09/05 17:51:25  PPATEL
00029  *   removed inclusion of fract.h and moved frctMulDBL API to
00030  *   dputmath.h
00031  * Revision 1.6  1997/08/27 18:04:14  PPATEL
00032  *  threshold enumeration moved to dpu.h
00033  * Revision 1.5  1997/08/22 13:22:54  PPATEL
00034  * Added structure for threshold programmability
00035  * Revision 1.4  1997/05/25 16:10:15  Zoran
00036  * Changed prototypes for CD detect functions to include reporting of
00037  * rx level
00038  * Revision 1.3  1997/05/18 12:48:00  Zoran
00039  *  Cleaned, updated code
00040  * Revision 1.2  1997/02/19 22:18:33  H.T.Li
00041  * Revision 1.1  1997/02/06 08:05:08  unknown
00042  * Initial revision
00043  *
00044  * (C) Copyright 1996, TELOGY Networks, Inc.
00045  *****************************************************************************/
00046 #include <ti/mas/types/types.h>
00047 #include "dpu_tgt.h"
00048 #include "dpumath.h"
00049 #include <ti/mas/fm/fmTablesTypes.h>
00050
00051 #define DPU_CD_TRUE 1
00052 #define DPU_CD_FALSE 0
00053
00054 typedef struct
00055 {
00056  int status;
00057  int count;
00058  int count_true_req;
00059  int count_false_req;
00060  LFract power;
00061  LFract high_power_req;
00062  LFract low_power_req;
00063  LFract power_sat;
00064
00065  /* for BP filter */
00066  cmplx_t v21FreqVect;
00067  cmplx_t v21Filt;
00068  Fract   v21OneMu;
00069
00070  /* variables for TEP tone detection notch filter
00071
00072          1 - 2*cos(2*pi*freq/9600)z^(-1) + z^(-2)
00073   H(z) = -------------------------------------------------
00074          1 - 2*nu*cos(2*pi*freq/9600)z^(-1) + nu*nu*z^(-2)
00075
00076  */
00077  Fract tepIIR[2];
00078  Fract tepInp[2];
00079  Fract tepCoefs[3];
00080
00081  /* Detection counters */
00082  int tep_count;
00083  int v21_count;
00084  /* Detection thresholds */
00085  int tep_cnt_thr;
00086  /* Power estimates */
00087  LFract sig_pow;
00088  LFract tep_pow;
00089  /* LPF parameters */
00090  Fract alpha;
00091  Fract division;
00092  tint  carrLossPendingFlag; /* carrier loss pending flag */
00093
00094  tint  fSignalPowerPresent; /* indication of if signal power is
00095                               on PCM interface in LS Rx mode */
00096 } dpu_cddet_t;
00097
00098
00099 int dpu_cd_det_v21(dpu_cddet_t *inst, Fract *in, int samp,
00100                    int n, Fract *gain, tint *rx_level);
00101
00102
00103 void dpu_cd_det_init(dpu_cddet_t *inst, Fract freq, Fract mu);
00104
00105
00106
00107 extern LFract IIRUpdatOutPow(cmplx_t *filt, cmplx_t *freq, Fract in, Fract oneMu);
00108 extern LFract IIRUpdatOutPowTep(Fract in, Fract *tepIIR, Fract *tepInp,
00109                                 Fract *tepCoefs,Fract *out);
00110 #endif  /* _DPU_CD_H */
00111 /* nothing past this point */


FM: dpu_cdc.c File Reference

dpu_cdc.c File Reference

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

Include dependency graph for dpu_cdc.c:

Go to the source code of this file.

Functions

void | findMin (int size_1, Fract *in_array, int *min_indx)
void | getTempDists (Fract *accum_dist, Fract *path_dist, Fract alpha, Fract division)
void | updateMetrics (Fract *temp_dist, int *delay_store_pt, Fract *scratch)

Variables

Fract | temp_acc_distU [4] = {0,0,0,0}
Fract | temp_acc_distL [4] = {0,0,0,0}
Fract | temp_path_distU [4] = {0,0,0,0}
Fract | temp_path_distL [4] = {0,0,0,0}
Fract | dpuIndxTable [8][4]

Function Documentation

void findMin | ( | int | size_1,
 |  | Fract * | in_array,
 |  | int * | min_indx
 | ) |  |

Definition at line 30 of file dpu_cdc.c.

void getTempDists | ( | Fract * | accum_dist,
 |  | Fract * | path_dist,
 |  | Fract | alpha,
 |  | Fract | division
 | ) |  |

Definition at line 47 of file dpu_cdc.c.

References temp_acc_distL, temp_acc_distU, temp_path_distL, and temp_path_distU.

void updateMetrics | ( | Fract * | temp_dist,
 |  | int * | delay_store_pt,
 |  | Fract * | scratch
 | ) |  |

Definition at line 89 of file dpu_cdc.c.

References dpuIndxTable, temp_acc_distL, temp_acc_distU, temp_path_distL, and temp_path_distU.

Variable Documentation

Fract temp_acc_distU[4] = {0,0,0,0}

Definition at line 13 of file dpu_cdc.c.

Referenced by getTempDists(), and updateMetrics().

Fract temp_acc_distL[4] = {0,0,0,0}

Definition at line 14 of file dpu_cdc.c.

Referenced by getTempDists(), and updateMetrics().

Fract temp_path_distU[4] = {0,0,0,0}

Definition at line 15 of file dpu_cdc.c.

Referenced by getTempDists(), and updateMetrics().

Fract temp_path_distL[4] = {0,0,0,0}

Definition at line 16 of file dpu_cdc.c.

Referenced by getTempDists(), and updateMetrics().

Fract dpuIndxTable[8][4]

Initial value:

{
   {(0*16+0),(2*16+1),(3*16+2),(1*16+3)},
   {(0*16+3),(2*16+2),(3*16+1),(1*16+0)},
   {(2*16+0),(0*16+1),(1*16+2),(3*16+3)},
   {(2*16+3),(0*16+2),(1*16+1),(3*16+0)},

   {(4*16+4),(7*16+5),(6*16+6),(5*16+7)},
   {(4*16+7),(7*16+6),(6*16+5),(5*16+4)},
   {(7*16+4),(4*16+5),(5*16+6),(6*16+7)},
   {(7*16+7),(4*16+6),(5*16+5),(6*16+4)}
}

Definition at line 17 of file dpu_cdc.c.

Referenced by updateMetrics().


FM: dpu_cdc.c Source File

dpu_cdc.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: Convolutional decoder (viterbi etc.) fast routines
00003  ******************************************************************************
00004  * FILE NAME:dpu_cdc.s
00005  * Rev 0.1
00006  * Authour:        Aravind B R
00007  * (C) Copyright 2002, Texas Instruments India,VoIP.
00008  *****************************************************************************/
00009
00010 #include <ti/mas/types/types.h>
00011 #include <ti/mas/fract/fract.h>
00012
00013 Fract temp_acc_distU[4] = {0,0,0,0};
00014 Fract temp_acc_distL[4] = {0,0,0,0};
00015 Fract temp_path_distU[4] = {0,0,0,0};
00016 Fract temp_path_distL[4] = {0,0,0,0};
00017 Fract dpuIndxTable[8][4] =
00018 {
00019    {(0*16+0),(2*16+1),(3*16+2),(1*16+3)},/* state 0 */
00020    {(0*16+3),(2*16+2),(3*16+1),(1*16+0)},/* state 6 */
00021    {(2*16+0),(0*16+1),(1*16+2),(3*16+3)},/* state 2 */
00022    {(2*16+3),(0*16+2),(1*16+1),(3*16+0)},/* state 4 */
00023
00024    {(4*16+4),(7*16+5),(6*16+6),(5*16+7)},/* state 1 */
00025    {(4*16+7),(7*16+6),(6*16+5),(5*16+4)},/* state 5 */
00026    {(7*16+4),(4*16+5),(5*16+6),(6*16+7)},/* state 3 */
00027    {(7*16+7),(4*16+6),(5*16+5),(6*16+4)} /* state 7 */
00028 };
00029
00030 void findMin(int size_1, Fract *in_array, int *min_indx)
00031 {
00032   Fract i,min;
00033
00034   *min_indx = 0;
00035   min = frct_MAX;
00036
00037   for (i=size_1; i>=0; i--) {
00038
00039     if (in_array[i] <= min) {
00040     min = in_array[i];
00041     *min_indx = i-1;
00042   }
00043   }
00044   *min_indx += 1;
00045 }
00046
00047 void getTempDists(Fract *accum_dist, Fract *path_dist, Fract alpha, Fract division)
00048 {
00049   Fract i;
00050   LFract temp;
00051
00052   for (i =0; i < 4; i++) {
00053     temp=frctF2LF(accum_dist[i],10,10);
00054     temp=frctMul((Fract)temp,10,alpha,10,26);
00055   temp_acc_distU[i]=frctLF2F(temp,32,16);
00056   }
00057   for (i =4; i < 8; i++) {
00058     temp=frctF2LF(accum_dist[i],10,10);
00059     temp=frctMul((Fract)temp,10,alpha,10,26);
00060   temp_acc_distL[i-4]=frctLF2F(temp,32,16);
00061   }
00062
00063   temp= frctMul(path_dist[0],10,division,10,26);
00064   temp_path_distU[0]=frctAdjustQ(temp,32,16);
00065
00066   temp= frctMul(path_dist[1],10,division,10,26);
00067   temp_path_distU[3]=frctAdjustQ(temp,32,16);
00068
00069   temp= frctMul(path_dist[2],10,division,10,26);
00070   temp_path_distU[1]=frctAdjustQ(temp,32,16);
00071
00072   temp= frctMul(path_dist[3],10,division,10,26);
00073   temp_path_distU[2]=frctAdjustQ(temp,32,16);
00074
00075   temp= frctMul(path_dist[4],10,division,10,26);
00076   temp_path_distL[0]=frctAdjustQ(temp,32,16);
00077
00078   temp= frctMul(path_dist[5],10,division,10,26);
00079   temp_path_distL[3]=frctAdjustQ(temp,32,16);
00080
00081   temp= frctMul(path_dist[6],10,division,10,26);
00082   temp_path_distL[2]=frctAdjustQ(temp,32,16);
00083
00084   temp= frctMul(path_dist[7],10,division,10,26);
00085   temp_path_distL[1]=frctAdjustQ(temp,32,16);
00086
00087 }
00088
00089 void updateMetrics(Fract *temp_dist, int *delay_store_pt, Fract *scratch)
00090 {
00091   Fract i,min,circ_indx;
00092   LFract t1;
00093
00094   /* State 0 */
00095   min = frct_MAX;
00096   for (i=0; i <=3; i++) {
00097     t1 = temp_acc_distU[i] + temp_path_distU[i];
00098
00099     if ( t1 <= min) {
00100     min = t1;
00101     delay_store_pt[0] = dpuIndxTable[0][i];
00102   }
00103   }
00104   temp_dist[0] = min;
00105
00106   /* State 6*/
00107   min = frct_MAX;
00108   for (i=3; i >=0; i--) {
00109     t1 = temp_acc_distU[i] + temp_path_distU[3-i];
00110
00111     if ( t1 <= min) {
00112     min = t1;
00113     delay_store_pt[6] = dpuIndxTable[1][3-i];
00114   }
00115   }
00116   temp_dist[6] = min;
00117
00118   /* STate 2 */
00119   min = frct_MAX; circ_indx =1;
00120   for (i=3; i >=0; i--) {
00121     t1 = temp_acc_distU[3-i] + temp_path_distU[circ_indx--];
00122
00123   if (circ_indx < 0)
00124     circ_indx =3;
00125
00126     if ( t1 <= min) {
00127     min = t1;
00128     delay_store_pt[2] = dpuIndxTable[2][3-i];
00129   }
00130   }
00131   temp_dist[2] = min;
00132
00133   /* STate 4 */
00134   min = frct_MAX; circ_indx =1;
00135   for (i=3; i >=0; i--) {
00136     t1 = temp_acc_distU[i] + temp_path_distU[circ_indx--];
00137
00138     if (circ_indx < 0)
00139     circ_indx =3;
00140
00141     if ( t1 <= min) {
00142     min = t1;
00143     delay_store_pt[4] = dpuIndxTable[3][3-i];
00144   }
00145   }
00146   temp_dist[4] = min;
00147
00148   /* State 1 */
00149   min = frct_MAX;
00150   for (i=0; i <=3; i++) {
00151     t1 = temp_acc_distL[i] + temp_path_distL[i];
00152
00153     if ( t1 <= min) {
00154     min = t1;
00155     delay_store_pt[1] = dpuIndxTable[4][i];
00156   }
00157   }
00158   temp_dist[1] = min;
00159
00160   /* State 5*/
00161   min = frct_MAX;
00162   for (i=3; i >=0; i--) {
00163     t1 = temp_acc_distL[i] + temp_path_distL[3-i];
00164
00165     if ( t1 <= min) {
00166     min = t1;
00167     delay_store_pt[5] = dpuIndxTable[5][3-i];
00168   }
00169   }
00170   temp_dist[5] = min;
00171
00172   /* STate 3 */
00173   min = frct_MAX; circ_indx =1;
00174   for (i=3; i >=0; i--) {
00175     t1 = temp_acc_distL[3-i] + temp_path_distL[circ_indx--];
00176
00177     if (circ_indx < 0)
00178     circ_indx =3;
00179
00180     if ( t1 <= min) {
00181     min = t1;
00182     delay_store_pt[3] = dpuIndxTable[6][3-i];
00183   }
00184   }
00185   temp_dist[3] = min;
00186
00187   /* STate 7 */
00188   min = frct_MAX;
00189   for (i=3; i >=0; i--) {
00190     t1 = temp_acc_distL[i] + temp_path_distL[circ_indx--];
00191
00192     if (circ_indx < 0)
00193     circ_indx =3;
00194
00195     if ( t1 <= min) {
00196     min = t1;
00197     delay_store_pt[7] = dpuIndxTable[7][3-i];
00198   }
00199   }
00200   temp_dist[7] = min;
00201 }
00202
00203 /* Nothing past this point */


FM: dpu_cdec.c File Reference

dpu_cdec.c File Reference

Go to the source code of this file.


FM: dpu_cdec.c Source File

dpu_cdec.c

Go to the documentation of this file.
00001 #ifdef V17
00002 #include <ti/mas/types/types.h>
00003 #include <ti/mas/fract/fract.h>
00004 #include "dpu_smap.h"
00005 #include "dpu_cdec.h"
00006 #include "v17data.h"
00007 #include "v17.h"
00008 #include "v17rx.h"
00009 #include "dpumath.h"
00010 #include "fmprag.h"
00011
00012
00013 static inline Fract find_min_path_dist(dpu_cdec_t *cdec_ptr, cmplx_t *input_pt, int path_index)
00014 {
00015   Fract indx;
00016
00017
00018     switch (path_index)
00019     {
00020             /* first group consists of states 0,1,6 and 7 */
00021       case 0: indx =  (*(cdec_ptr->slice0167_fcn_ptr))(input_pt->re, input_pt->im);
00022                break;
00023
00024       /* 180 degrees counter clockwise rotation wrt 0 */
00025       case 1: indx = (*(cdec_ptr->slice0167_fcn_ptr))((Fract)-input_pt->re, (Fract)-input_pt->im);
00026              break;
00027
00028            /*  90 degrees counter clockwise rotation wrt 0 */
00029       case 6:  indx = (*(cdec_ptr->slice0167_fcn_ptr))((Fract)-input_pt->im, input_pt->re);
00030              break;
00031
00032       /* 270 degrees  counter clockwise rotation wrt 0 */
00033       case 7:  indx = (*(cdec_ptr->slice0167_fcn_ptr))(input_pt->im, (Fract)-input_pt->re);
00034              break;
00035
00036           /* second group consists of states 2,3,4, and 5 */
00037       case 2:  indx = (*(cdec_ptr->slice2345_fcn_ptr))(input_pt->re, input_pt->im);
00038             break;
00039
00040       /* 180 degrees counter clockwise rotation wrt 2 */
00041       case 3:  indx = (*(cdec_ptr->slice2345_fcn_ptr))((Fract)-input_pt->re, (Fract)-input_pt->im);
00042             break;
00043
00044            /*  90 degrees counter clockwise rotation wrt 2 */
00045       case 5:  indx = (*(cdec_ptr->slice2345_fcn_ptr))((Fract)-input_pt->im, input_pt->re);
00046             break;
00047
00048       /* 270 degrees  counter clockwise rotation wrt 2 */
00049       case 4:  indx = (*(cdec_ptr->slice2345_fcn_ptr))(input_pt->im, (Fract)-input_pt->re);
00050             break;
00051         default:
00052               break;
00053     }
00054
00055        indx += path_index * cdec_ptr->shift_cnst;
00056
00057   return(indx);
00058 }
00059
00060 void find_min_acc_dists(dpu_cdec_t *cdec_ptr)
00061 {
00062   Fract  temp_dist[DPU_CDEC_DELAY_STATES];
00063   Fract  *accum_dist;
00064     int    *delay_store_pt;
00065   Fract scratch;
00066   int i;
00067
00068   accum_dist     = cdec_ptr->accum_dist;
00069   delay_store_pt = cdec_ptr->path_store_cur_ptr->path_and_delay;
00070
00071     getTempDists(accum_dist, cdec_ptr->path_dist_ptr, cdec_ptr->alpha,
00072                  cdec_ptr->division);
00073     updateMetrics(temp_dist, delay_store_pt, &scratch);
00074
00075   for(i = 0; i < DPU_CDEC_DELAY_STATES; i++)
00076   {
00077     accum_dist[i] = temp_dist[i];
00078   }
00079 }
00080
00081 /* traces back to get the path state and returns the output  bits */
00082 void traceback(dpu_cdec_t *cdec_ptr, int min_delay_state, Fract *bits)
00083 {
00084   int i, min_delay_st,path;
00085   path_t *local_pt;
00086
00087   local_pt = cdec_ptr->path_store_cur_ptr;
00088   min_delay_st = min_delay_state;
00089
00090   for(i = 1; i < DPU_CDEC_VIT_DELAY; i++)
00091   {
00092       min_delay_st = local_pt->path_and_delay[min_delay_st & 0x000f];
00093       local_pt     = local_pt->prev_path_pt;
00094   }
00095
00096   path = local_pt->path_and_delay[min_delay_st & 0x000f] >> 4;
00097     *bits = find_min_path_dist( cdec_ptr, &(local_pt->const_point),
00098                      /* local_pt->path_state[min_delay_st]*/ path);
00099   cdec_ptr->path_store_cur_ptr = local_pt;
00100 }
00101 /* void find_min_dist_state(dpu_cdec_t *cdec_ptr, int *min_delay_state) */
00102 /* {                                                                    */
00103 /*  int i;                                                              */
00104 /*  Fract min, *temp, t1;                                               */
00105 /*                                                                      */
00106 /*  temp = cdec_ptr->accum_dist;                                        */
00107 /*  min = temp[0]; *min_delay_state = 0;                                */
00108 /*  for(i = 0; i < DPU_CDEC_DELAY_STATES; i++)                          */
00109 /*  {                                                                   */
00110 /*    if ((t1 = *temp++) < min)                                       */
00111 /*    {                                                               */
00112 /*        min             = t1;                                       */
00113 /*       *min_delay_state = i;                                        */
00114 /*    }                                                             */
00115 /*  }                                                                   */
00116 /*    }                                                                 */
00117
00118 void dpu_cdec (dpu_cdec_t *cdec_ptr, Fract x_sym, Fract y_sym, Fract *bits)
00119 {
00120   int   min_delay_state;
00121
00122   cdec_ptr->path_store_cur_ptr->const_point.re = x_sym;
00123   cdec_ptr->path_store_cur_ptr->const_point.im = y_sym;
00124
00125   find_min_acc_dists  (cdec_ptr);
00126 /*  find_min_dist_state (cdec_ptr, &min_delay_state);*/
00127
00128   findMin(DPU_CDEC_DELAY_STATES-1, cdec_ptr->accum_dist, &min_delay_state);
00129   traceback           (cdec_ptr, min_delay_state, bits);
00130 }
00131
00132
00133 #endif
00134 /* Nothing past this point */


FM: dpu_cdec.h File Reference

dpu_cdec.h File Reference

#include <ti/mas/types/types.h>
#include "dpumath.h"
#include "dpu_smap.h"

Include dependency graph for dpu_cdec.h:

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

Go to the source code of this file.

Data Structures

struct | path_struct
struct | dpu_cdec_t

Defines

#define | DPU_CDEC_DELAY_STATES 8
#define | DPU_CDEC_VIT_DELAY 16

Typedefs

typedef path_struct * | path_ptr
typedef path_struct | path_t

Functions

void | dpu_cdec (dpu_cdec_t *cdec_ptr, Fract x_sym, Fract y_sym, Fract *bits)
void | sliceV17_no_conv (dpu_cdec_t *cdec_ptr, Fract x_sym, Fract y_sym, int *bits, int bits_per_symbol)
void | findMin (int size_1, Fract *in_array, int *min_indx)
void | getTempDists (Fract *accum_dist, Fract *path_dist, Fract alpha, Fract division)
void | updateMetrics (Fract *temp_dist, int *delay_store_pt, Fract *scratch)

Define Documentation

#define DPU_CDEC_DELAY_STATES 8

Definition at line 31 of file dpu_cdec.h.

#define DPU_CDEC_VIT_DELAY 16

Definition at line 32 of file dpu_cdec.h.

Typedef Documentation

typedef struct path_struct* path_ptr

Definition at line 35 of file dpu_cdec.h.

typedef struct path_struct path_t

Function Documentation

void dpu_cdec | ( | dpu_cdec_t * | cdec_ptr,
 |  | Fract | x_sym,
 |  | Fract | y_sym,
 |  | Fract * | bits
 | ) |  |

void sliceV17_no_conv | ( | dpu_cdec_t * | cdec_ptr,
 |  | Fract | x_sym,
 |  | Fract | y_sym,
 |  | int * | bits,
 |  | int | bits_per_symbol
 | ) |  |

void findMin | ( | int | size_1,
 |  | Fract * | in_array,
 |  | int * | min_indx
 | ) |  |

Definition at line 30 of file dpu_cdc.c.

void getTempDists | ( | Fract * | accum_dist,
 |  | Fract * | path_dist,
 |  | Fract | alpha,
 |  | Fract | division
 | ) |  |

Definition at line 47 of file dpu_cdc.c.

References temp_acc_distL, temp_acc_distU, temp_path_distL, and temp_path_distU.

void updateMetrics | ( | Fract * | temp_dist,
 |  | int * | delay_store_pt,
 |  | Fract * | scratch
 | ) |  |

Definition at line 89 of file dpu_cdc.c.

References dpuIndxTable, temp_acc_distL, temp_acc_distU, temp_path_distL, and temp_path_distU.


FM: dpu_cdec.h Source File

dpu_cdec.h

Go to the documentation of this file.
00001 #ifndef _DPU_CDEC_H
00002 #define _DPU_CDEC_H
00003
00004 /******************************************************************************
00005  * FILE PURPOSE:
00006  ******************************************************************************
00007  * FILE NAME:
00008  *
00009  * DESCRIPTION:
00010  *
00011  * TABS: NONE
00012  *
00013  * $Id: dpu_cdec.h 1.3 1997/11/21 15:44:55 PPATEL Exp $
00014  *
00015  * REVISION HISTORY:
00016  *
00017  * $Log: dpu_cdec.h $
00018  * Revision 1.3  1997/11/21 15:44:55  PPATEL
00019  *  changes for multi-channel build for GG 3.0
00020  * Revision 1.2  1997/10/28 23:07:17  PPATEL
00021  *  Many changes corresponding to writing critical code in assembly
00022  *
00023  * (C) Copyright 1997, TELOGY Networks, Inc.
00024  *****************************************************************************/
00025
00026 #include <ti/mas/types/types.h>
00027 #include "dpumath.h"
00028 #include "dpu_smap.h"
00029
00030
00031 #define DPU_CDEC_DELAY_STATES    8   /* Maximum possible delay states */
00032 #define DPU_CDEC_VIT_DELAY       16  /* Viterbi Delay */
00033
00034
00035 typedef struct path_struct *path_ptr;
00036 typedef struct path_struct
00037 {
00038   int       path_and_delay[DPU_CDEC_DELAY_STATES];
00039   cmplx_t   const_point;
00040   path_ptr  prev_path_pt;
00041
00042 } path_t;
00043
00044 typedef struct
00045 {
00046     path_t    *path_store;         /* pointer to path storage */
00047     path_t    *path_store_cur_ptr; /* current pointer for path storage */
00048     Fract     *path_dist_ptr; /* pointer to path distance array */
00049     Fract     *accum_dist;   /* accumulated distance storage of size NUM_PATH_STATES */
00050     tuint      shift_cnst;   /* shift constant = 2^(n-2) where n = number of bits to receive */
00051     Fract      alpha;        /* This is the exponential decay factor for distance computation */
00052   Fract      division;
00053   dpu_smap_t *smap_ptr;    /* symbol mapper to be used for convolutional decoder */
00054
00055 /* the following functions are specific to  V.17, when using this structure for generalized
00056    convolutional decoder function, neglect these functions and use find_min_path_dist(..) routine
00057    in place of find_min_path_dist_V17(..)                                  */
00058     Fract (*slice0167_fcn_ptr)(Fract, Fract); /* slicer function for path states 0,1,6 and 7 */
00059     Fract (*slice2345_fcn_ptr)(Fract, Fract); /* slicer function for path states 2,3,4 and 5 */
00060 } dpu_cdec_t;
00061
00062 void dpu_cdec (dpu_cdec_t *cdec_ptr, Fract x_sym, Fract y_sym, Fract *bits);
00063
00064
00065 void sliceV17_no_conv(dpu_cdec_t *cdec_ptr, Fract x_sym, Fract y_sym,
00066                  int *bits, int bits_per_symbol);
00067
00068 extern void findMin(int size_1, Fract *in_array, int *min_indx);
00069 extern void getTempDists(Fract *accum_dist, Fract *path_dist, Fract alpha, Fract division);
00070 extern void updateMetrics(Fract *temp_dist, int *delay_store_pt, Fract *scratch);
00071 #endif /* _TYPES_H */
00072 /* nothing after this point */


FM: dpu_cenc.c File Reference

dpu_cenc.c File Reference

Go to the source code of this file.


FM: dpu_cenc.c Source File

dpu_cenc.c

Go to the documentation of this file.
00001 #ifdef V17
00002 /******************************************************************************
00003  * FILE PURPOSE:
00004  ******************************************************************************
00005  * FILE NAME: dpu_cenc.c
00006  *
00007  * DESCRIPTION: Convolution Encoder  Implementation
00008  *
00009  * TABS: NONE
00010  *
00011  * $Id: dpu_cenc.c 1.3 2000/03/21 21:58:56 jwright Exp $
00012  *
00013  * REVISION HISTORY:
00014  *
00015  * $Log: dpu_cenc.c $
00016  * Revision 1.3  2000/03/21 21:58:56  jwright
00017  * Clean up 3.50 compile warning.
00018  * Revision 1.2  1997/11/21 15:45:36  PPATEL
00019  *  Conditional V17 build for multi-channel build for GG 3.0
00020  * Revision 1.1  1997/09/13 19:50:15  PPATEL
00021  * Initial revision
00022  *
00023  * (C) Copyright 1997, TELOGY Networks, Inc.
00024  *****************************************************************************/
00025
00026
00027 #include <ti/mas/types/types.h>
00028 #include "dpu_cenc.h"
00029
00030
00031 void dpu_cenc_init(dpu_cenc_t *cenc_ptr, Fract state, Fract mask)
00032 {
00033   cenc_ptr->state = state;
00034   cenc_ptr->mask  = mask;
00035 }
00036
00037 #endif
00038 /* Nothing past this point */


FM: dpu_cenc.h File Reference

dpu_cenc.h File Reference

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

Include dependency graph for dpu_cenc.h:

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

Go to the source code of this file.

Data Structures

struct | dpu_cenc_t

Functions

void | dpu_cenc_init (dpu_cenc_t *cenc_ptr, Fract state, Fract mask)

Function Documentation

void dpu_cenc_init | ( | dpu_cenc_t * | cenc_ptr,
 |  | Fract | state,
 |  | Fract | mask
 | ) |  |


FM: dpu_cenc.h Source File

dpu_cenc.h

Go to the documentation of this file.
00001 #ifndef _DPU_CENC_H
00002 #define _DPU_CENC_H
00003
00004 /* System level header files */
00005 #include <ti/mas/types/types.h>
00006
00007 /* Convolutional Encoder data definition structure */
00008
00009  typedef struct {
00010    Fract state;        /* state is stored as [0..0 S1 S2 S3...SN] */
00011    Fract mask;         /* Mask for the conv encoder bits */
00012  } dpu_cenc_t;
00013
00014 void dpu_cenc_init(dpu_cenc_t *cenc_ptr, Fract state, Fract mask);
00015
00016 #endif  /* _DPU_CENC_H */
00017 /* nothing past this point */


FM: dpu_crec.c File Reference

dpu_crec.c File Reference

#include <ti/mas/types/types.h>
#include <ti/mas/fract/fract.h>
#include "dpumath.h"
#include "dpu_mod.h"
#include "dpu_crec.h"
#include "fmprag.h"
#include "dpuatan2.h"
#include "fm.h"

Include dependency graph for dpu_crec.c:

Go to the source code of this file.

Defines

#define | PLL_TEST 0
#define | CREC_TEST 0
#define | DPU_CREC_ATAN2_2_PHASE_Q 6
#define | DPU_CREC_PHASE_Q 16
#define | DPU_CREC_ATAN2_2_PHASE_SCALE 25575

Functions

void | dpu_no_crec (dpu_crec_t *inst, Fract *phase, Fract *cf_offset)
void | dpu_no_crec_at_all (dpu_crec_t *inst, Fract *phase, Fract *cf_offset)
void | dpu_v21_demod (dpu_crec_t *inst, Fract *x_re, Fract *y_im)
void | dpu_crec_init (dpu_crec_t *inst, Fract k1, Fract k2, Fract freq)

Define Documentation

#define PLL_TEST 0

Definition at line 67 of file dpu_crec.c.

#define CREC_TEST 0

Definition at line 68 of file dpu_crec.c.

#define DPU_CREC_ATAN2_2_PHASE_Q 6

Referenced by dpu_v21_demod().

#define DPU_CREC_PHASE_Q 16

Referenced by dpu_v21_demod().

#define DPU_CREC_ATAN2_2_PHASE_SCALE 25575

Referenced by dpu_v21_demod().

Function Documentation

void dpu_no_crec | ( | dpu_crec_t * | inst,
 |  | Fract * | phase,
 |  | Fract * | cf_offset
 | ) |  |

Definition at line 95 of file dpu_crec.c.

References dpu_crec_t::freq, dpu_crec_t::phase, and dpu_crec_t::pre_p1.

Referenced by v27RxSt3Init(), and v29RxSt3Init().

void dpu_no_crec_at_all | ( | dpu_crec_t * | inst,
 |  | Fract * | phase,
 |  | Fract * | cf_offset
 | ) |  |

Definition at line 101 of file dpu_crec.c.

References dpu_crec_t::freq, dpu_crec_t::phase, and dpu_crec_t::pre_p1.

void dpu_v21_demod | ( | dpu_crec_t * | inst,
 |  | Fract * | x_re,
 |  | Fract * | y_im
 | ) |  |

Definition at line 112 of file dpu_crec.c.

References v17Table_sPtrs_t::atan2ScaleFactors_pt, DPU_CREC_ATAN2_2_PHASE_Q, DPU_CREC_ATAN2_2_PHASE_SCALE, DPU_CREC_PHASE_Q, dpuAtan2(), fmContext, dpu_crec_t::freq, dpu_crec_t::k1, dpu_crec_t::k2, dpu_crec_t::phase, dpu_crec_t::pre_p1, dpu_crec_t::samp, dpu_crec_t::scale, fmContext_t::tablePtr, v17Table_sPtrs_t::tanTableInFirstOctant_pt, and fmTablePtrs_t::v17TablePtrs.

Referenced by v21RxCommonInit().

Here is the call graph for this function:

void dpu_crec_init | ( | dpu_crec_t * | inst,
 |  | Fract | k1,
 |  | Fract | k2,
 |  | Fract | freq
 | ) |  |

Definition at line 169 of file dpu_crec.c.

References dpu_crec_t::freq, dpu_crec_t::k1, dpu_crec_t::k2, dpu_crec_t::max_error, dpu_crec_t::phase, and dpu_crec_t::pre_p1.

Referenced by v21RxCommonInit(), v27RxSt3Init(), and v29RxSt3Init().


FM: dpu_crec.c Source File

dpu_crec.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE:  DPU RX carrier recovery
00003  ******************************************************************************
00004  * FILE NAME: dpu_crec.c
00005  *
00006  * DESCRIPTION: DPU carrier recovery
00007
00008  *
00009  * TABS: NONE
00010  *
00011  * $Id: DPU_CREC.C 1.15  2002/07/17 16:56:21  Aravind BR Exp $
00012  *
00013  * REVISION HISTORY:
00014  *
00015  * $Log: DPU_CREC.C $
00016  * Revision 1.15  2002/07/17 16:56:21  Aravind BR
00017  * initialization of freeze_count, err_mul in dpu_crec_init.
00018  * Revision 1.14  2000/03/21 21:56:21  jwright
00019  * Clean up 3.50 compile warnings.
00020  * Revision 1.13  1998/02/01 21:09:24  PPATEL
00021  *  pre_p2 was unnecessary
00022  * Revision 1.12  1997/12/10 00:22:57  PPATEL
00023  *  utlSine used for sine computation
00024  * Revision 1.11  1997/11/28 21:57:45  PPATEL
00025  *  Using sine and cos through polynomial implementation
00026  * Revision 1.10  1997/11/21 15:16:42  PPATEL
00027  *  dpu_crec moved to crecrx.c for multi-channel fax build for GG 3.0
00028  * Revision 1.9  1997/10/28 22:02:37  PPATEL
00029  *   Changes made for V.17 development
00030  * Revision 1.8  1997/09/26 16:35:45  PPATEL
00031  *   Sine by polynomial does not work properly, so restored to table lookup
00032  * but in a clean way
00033  * Revision 1.7  1997/09/17 23:17:56  PPATEL
00034  *   Receiver was behaving improperly after the sine implementation.
00035  * Had to make changes in scaling factors in carrier recovery to
00036  * overcome this.
00037  * Revision 1.6  1997/09/05 17:52:55  PPATEL
00038  *    Sin/cos through polynomial implementation.
00039  * Revision 1.5  1997/09/03 17:27:42  PPATEL
00040  *    changed C542 to C54x for C548 compatibility
00041  * Revision 1.4  1997/05/25 16:12:54  Zoran
00042  *   Fixed reporting of freq. offset , limited phase error
00043  * Revision 1.3  1997/05/18 12:27:48  Zoran
00044  *   Cleaned, optimized version
00045  * Revision 1.2  1997/02/19 18:24:52  unknown
00046  * Revision 1.1  1997/02/06 08:44:32  unknown
00047  * Initial revision
00048  *
00049  * (C) Copyright 1996, TELOGY Networks, Inc.
00050  *****************************************************************************/
00051
00052 #include <ti/mas/types/types.h>
00053 #include <ti/mas/fract/fract.h>
00054 #include "dpumath.h"
00055 #include "dpu_mod.h"
00056 #include "dpu_crec.h"
00057 #include "fmprag.h"
00058 #include "dpuatan2.h"
00059 #include "fm.h"
00060
00061 /******************************************************************************
00062  * FUNCTION PURPOSE: dpu carrier recovery
00063  ******************************************************************************
00064  * DESCRIPTION: dpu carrier recovery
00065  *
00066  *****************************************************************************/
00067 #define PLL_TEST  0
00068 #define CREC_TEST 0
00069
00070 #if CREC_TEST
00071 #define CREC_TEST_SIZE 1024
00072 int CREC_INDEX=0;
00073
00074 Fract CREC_PHERR[CREC_TEST_SIZE];
00075 Fract CREC_2[CREC_TEST_SIZE];
00076 Fract CREC_1[CREC_TEST_SIZE];
00077 Fract CREC_FROFF[CREC_TEST_SIZE];
00078
00079 #endif
00080
00081 #if PLL_TEST
00082 #define PLL_TEST_SIZE  1024
00083 int PLL_TEST_INDEX = 0;
00084 Fract PLL_TEST_OUT_BUF[PLL_TEST_SIZE];
00085 #endif
00086
00087
00088
00089 /******************************************************************************
00090  * FUNCTION PURPOSE: dpu carrier recovery  in B1 state
00091  ******************************************************************************
00092  * DESCRIPTION: dpu carrier recovery in B1 sate (just update phase)
00093  *
00094  *****************************************************************************/
00095  void dpu_no_crec( dpu_crec_t *inst, Fract *phase, Fract *cf_offset)
00096  {
00097     inst->pre_p1 = 0;
00098     inst->phase += (inst->freq + frctAdjustQ(*phase,14,15));
00099  }
00100
00101  void dpu_no_crec_at_all( dpu_crec_t *inst, Fract *phase, Fract *cf_offset)
00102 {
00103   inst->phase += inst->pre_p1 + inst->freq;
00104 }
00105
00106 /******************************************************************************
00107  * FUNCTION PURPOSE: dpu carrier recovery
00108  ******************************************************************************
00109  * DESCRIPTION: dpu carrier recovery
00110  *
00111  *****************************************************************************/
00112 void dpu_v21_demod( dpu_crec_t *inst, Fract *x_re, Fract *y_im)
00113 {
00114   Fract  tmp1, tmp2;
00115   int    j;
00116
00117   for (j=0; j<inst->samp; j++)
00118   {
00119     tmp1 = dpuAtan2((LFract)y_im[j], (LFract)x_re[j],
00120                     fmContext.tablePtr->v17TablePtrs->tanTableInFirstOctant_pt,
00121                     fmContext.tablePtr->v17TablePtrs->atan2ScaleFactors_pt);
00122
00123 #define DPU_CREC_ATAN2_2_PHASE_Q   6
00124 #define DPU_CREC_PHASE_Q          16
00125 /* 2^DPU_CREC_PHASE_Q/(4*DPU_TREC_NUM)) << DPU_CREC_ATAN2_2_PHASE_Q),
00126    not expressing the define below generically to prevent compiler from combining
00127    shifts which defeats the purpose of the computation accuracy */
00128 #define DPU_CREC_ATAN2_2_PHASE_SCALE  25575
00129
00130     /* find angle in the PHASE_Q of the loop angle */
00131     tmp1 = frctLF2F(frctMul(tmp1,0,DPU_CREC_ATAN2_2_PHASE_SCALE, 6, 6),6,0);
00132
00133     /* compute error e(n), since phase is Q16, this is a nice modulo 16-bit subtraction
00134        which achieves the 2*pi wrap-around (just as we do in utlSin for tone generation) ! */
00135     y_im[j] = tmp1 - inst->phase;
00136
00137     /* start PLL */
00138     tmp1 = frctLF2F(frctMul(inst->k2, 14, y_im[j], 14, 28), 28, 14);
00139
00140     tmp1 += (inst->pre_p1);
00141     inst->pre_p1 = tmp1;
00142
00143 #if  1
00144     x_re[j] =  frctLF2F(frctMul(tmp1, 14, inst->scale, 6, 20),20,12); /* Q0 */
00145     tmp2 = frctLF2F((LFract)inst->k1 * y_im[j], 28, 14);   /* 12 */
00146 #else
00147     x_re[j] =  (Fract)(((LFract)tmp1 * inst->scale)*8192); /* Q0 */
00148     tmp2 = frctLF2F((LFract)inst->k1 * y_im[j], 28, 14);
00149 #endif
00150     tmp2 += (tmp1 + frctAdjustQ(inst->freq,15,14));
00151
00152     inst->phase += frctAdjustQ(tmp2,14,15);
00153
00154 #if   PLL_TEST
00155   PLL_TEST_INDEX++;
00156   PLL_TEST_INDEX &= PLL_TEST_SIZE -1;
00157   PLL_TEST_OUT_BUF[PLL_TEST_INDEX] = x_re[j];
00158 #endif
00159   }
00160
00161  }
00162
00163 /******************************************************************************
00164  * FUNCTION PURPOSE: initialize DPU carrier recovery
00165  ******************************************************************************
00166  * DESCRIPTION: initialize DPU RX carrier recovery
00167  *
00168  *****************************************************************************/
00169  void dpu_crec_init(dpu_crec_t *inst, Fract k1, Fract k2, Fract freq)
00170  {
00171     inst->k1 = k1;
00172     inst->k2 = k2;
00173     inst->pre_p1 = 0;
00174     inst->max_error = frct_MAX;
00175     if (freq != 0)
00176     {
00177       inst->freq = freq;
00178       inst->phase = 0;
00179     }
00180  }
00181
00182
00183
00184


FM: dpu_crec.h File Reference

dpu_crec.h File Reference

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

Include dependency graph for dpu_crec.h:

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

Go to the source code of this file.

Data Structures

struct | dpu_crec_t

Defines

#define | CREC_CONST_SCALE Q14_SCALE
#define | V21_CREC_CONST_SCALE Q6_SCALE

Functions

void | dpu_no_crec (dpu_crec_t *inst, Fract *pha, Fract *cf_offset)
void | dpu_crec_init (dpu_crec_t *inst, Fract k1, Fract k2, Fract freq)
void | dpu_v21_demod (dpu_crec_t *inst, Fract *x_re, Fract *y_im)
void | dpu_no_crec_at_all (dpu_crec_t *inst, Fract *pha, Fract *cf_offset)

Define Documentation

#define CREC_CONST_SCALE Q14_SCALE

Definition at line 38 of file dpu_crec.h.

#define V21_CREC_CONST_SCALE Q6_SCALE

Definition at line 39 of file dpu_crec.h.

Referenced by v21RxCommonInit().

Function Documentation

void dpu_no_crec | ( | dpu_crec_t * | inst,
 |  | Fract * | pha,
 |  | Fract * | cf_offset
 | ) |  |

Definition at line 95 of file dpu_crec.c.

References dpu_crec_t::freq, dpu_crec_t::phase, and dpu_crec_t::pre_p1.

Referenced by v27RxSt3Init(), and v29RxSt3Init().

void dpu_crec_init | ( | dpu_crec_t * | inst,
 |  | Fract | k1,
 |  | Fract | k2,
 |  | Fract | freq
 | ) |  |

Definition at line 169 of file dpu_crec.c.

References dpu_crec_t::freq, dpu_crec_t::k1, dpu_crec_t::k2, dpu_crec_t::max_error, dpu_crec_t::phase, and dpu_crec_t::pre_p1.

Referenced by v21RxCommonInit(), v27RxSt3Init(), and v29RxSt3Init().

void dpu_v21_demod | ( | dpu_crec_t * | inst,
 |  | Fract * | x_re,
 |  | Fract * | y_im
 | ) |  |

Definition at line 112 of file dpu_crec.c.

References v17Table_sPtrs_t::atan2ScaleFactors_pt, DPU_CREC_ATAN2_2_PHASE_Q, DPU_CREC_ATAN2_2_PHASE_SCALE, DPU_CREC_PHASE_Q, dpuAtan2(), fmContext, dpu_crec_t::freq, dpu_crec_t::k1, dpu_crec_t::k2, dpu_crec_t::phase, dpu_crec_t::pre_p1, dpu_crec_t::samp, dpu_crec_t::scale, fmContext_t::tablePtr, v17Table_sPtrs_t::tanTableInFirstOctant_pt, and fmTablePtrs_t::v17TablePtrs.

Referenced by v21RxCommonInit().

Here is the call graph for this function:

void dpu_no_crec_at_all | ( | dpu_crec_t * | inst,
 |  | Fract * | pha,
 |  | Fract * | cf_offset
 | ) |  |

Definition at line 101 of file dpu_crec.c.

References dpu_crec_t::freq, dpu_crec_t::phase, and dpu_crec_t::pre_p1.


FM: dpu_crec.h Source File

dpu_crec.h

Go to the documentation of this file.
00001 #ifndef _DPU_CREC_H
00002 #define _DPU_CREC_H
00003
00004 /******************************************************************************
00005  * FILE PURPOSE:  header file of RX carrier recovery
00006  ******************************************************************************
00007  * FILE NAME: dpu_crec.h
00008  *
00009  * DESCRIPTION: header file of RX carrier recovery
00010  *
00011  * TABS: NONE
00012  *
00013  * $Id: DPU_CREC.H 1.7  2002/07/17 16:09:25  ARAVIND BR Exp $
00014  *
00015  * REVISION HISTORY:
00016  *
00017  * $Log: DPU_CREC.H $
00018  * Revision 1.7  2002/07/17 16:09:25  ARAVIND BR
00019  * freeze_count and err_mul added into dpu_crec_t;
00020  * Revision 1.6  1998/02/01 21:09:25  PPATEL
00021  *  pre_p2 was unnecessary
00022  * Revision 1.5  1997/11/21 15:17:21  PPATEL
00023  *  api's moved to crecrx.h for multi-channel fax build for GG 3.0
00024  * Revision 1.4  1997/10/28 22:03:33  PPATEL
00025  *  Changes made for V.17 development
00026  * Revision 1.3  1997/09/05 17:53:41  PPATEL
00027  *  fract.h removed
00028  * Revision 1.2  1997/05/18 12:47:23  Zoran
00029  *   Cleaned, updated code
00030  * Revision 1.1  1997/02/06 08:45:51  unknown
00031  * Initial revision
00032  *
00033  * (C) Copyright 1996, TELOGY Networks, Inc.
00034  *****************************************************************************/
00035 #include <ti/mas/types/types.h>
00036 #include "dpu_tgt.h"
00037
00038 #define CREC_CONST_SCALE         Q14_SCALE
00039 #define V21_CREC_CONST_SCALE     Q6_SCALE
00040
00041 typedef struct
00042 {
00043  Fract  k1;
00044  Fract  k2;
00045  Fract  pre_p1;
00046  Fract  pre_p1_old;  /* for v.17 short training to store the freq. offset */
00047  Fract  phase;
00048  Fract  freq;
00049  Fract  cosfn;
00050  Fract  sinfn;
00051  Fract  scale;
00052  int    samp;         /* for V21 PLL only */
00053  Fract  max_error;    /* maximum phase error */
00054 } dpu_crec_t;
00055
00056
00057 /* Carrier recovery API */
00058
00059 void dpu_no_crec( dpu_crec_t *inst, Fract *pha, Fract *cf_offset);
00060
00061
00062 void dpu_crec_init(dpu_crec_t *inst, Fract k1, Fract k2, Fract freq);
00063
00064 void dpu_v21_demod( dpu_crec_t *inst, Fract *x_re, Fract *y_im);
00065
00066 /* only for debugging */
00067 void dpu_no_crec_at_all( dpu_crec_t *inst, Fract *pha, Fract *cf_offset);
00068
00069
00070 #endif  /* _DPU_CREC_H */
00071 /* nothing past this point */


FM: dpu_ddet.c File Reference

dpu_ddet.c File Reference

#include <string.h>
#include <ti/mas/types/types.h>
#include <ti/mas/fract/fract.h>
#include "dpumath.h"
#include "dpu_tgt.h"
#include "dpu_agc.h"
#include "dpu_ddet.h"
#include "fmport.h"
#include "dpu_fir.h"
#include "cdrx.h"
#include "fmprag.h"

Include dependency graph for dpu_ddet.c:

Go to the source code of this file.

Defines

#define | DOT_TEST 0

Functions

int | dpu_dot_det (dpu_dotdet_t *inst, Fract *in, int samp, int n, Fract *gain, tint *rx_level)
int | dpu_pc_det (dpu_dotdet_t *inst, Fract *in, int samp, int n, Fract *gain, tint *rx_level)
void | dpu_dot_det_init (dpu_dotdet_t *inst, int delay1, Fract division)

Variables

int | RX_LEVEL
int | RX_GAIN

Define Documentation

#define DOT_TEST 0

Definition at line 81 of file dpu_ddet.c.

Function Documentation

int dpu_dot_det | ( | dpu_dotdet_t * | inst,
 |  | Fract * | in,
 |  | int | samp,
 |  | int | n,
 |  | Fract * | gain,
 |  | tint * | rx_level
 | ) |  |

Definition at line 114 of file dpu_ddet.c.

References dpu_dotdet_t::delay, dpu_dotdet_t::delay1, dpu_dotdet_t::delay_buf_index, dpu_dotdet_t::dotCoefs, dpu_dotdet_t::dotIIR, dpu_dotdet_t::dotInp, DPU_DDET_MAX_DELAY_1, dpu_dotdet_t::high_power_req, IIRUpdatOutPow(), IIRUpdatOutPowTep(), dpu_dotdet_t::sig_power, dpu_dotdet_t::tepCoefs, dpu_dotdet_t::tepIIR, dpu_dotdet_t::tepInp, dpu_dotdet_t::v21Filt, dpu_dotdet_t::v21FreqVect, dpu_dotdet_t::v21OneMu, and dpu_dotdet_t::v27_flag.

Referenced by HSrxCommonSt1Init().

Here is the call graph for this function:

int dpu_pc_det | ( | dpu_dotdet_t * | inst,
 |  | Fract * | in,
 |  | int | samp,
 |  | int | n,
 |  | Fract * | gain,
 |  | tint * | rx_level
 | ) |  |

Definition at line 299 of file dpu_ddet.c.

References dpu_dotdet_t::delay, dpu_dotdet_t::delay1, dpu_dotdet_t::delay_buf_index, dpu_dotdet_t::dot_count, dpu_dotdet_t::dot_power, DPU_DDET_MAX_DELAY_1, DPU_PC_FALSE, DPU_PC_TRUE, dpu_dotdet_t::factor, and dpu_dotdet_t::v21_power.

Referenced by v27RxSt3Init(), and v29RxSt3Init().

void dpu_dot_det_init | ( | dpu_dotdet_t * | inst,
 |  | int | delay1,
 |  | Fract | division
 | ) |  |

Definition at line 352 of file dpu_ddet.c.

References dpu_dotdet_t::alpha, dpu_dotdet_t::delay1, dpu_dotdet_t::disable_v21, dpu_dotdet_t::division, DPU_P2_FALSE, dpu_dotdet_t::gain_calc_flag, dpu_dotdet_t::high_power_req, cmplx_t::im, INTERP_CONST_SCALE, Q15_SCALE, cmplx_t::re, dpu_dotdet_t::status, dpu_dotdet_t::tep_cnt_thr, dpu_dotdet_t::tepCoefs, dpu_dotdet_t::v21_cnt_thr, dpu_dotdet_t::v21FreqVect, and dpu_dotdet_t::v21OneMu.

Referenced by v27RxSt1Init(), and v29RxSt1Init().

Variable Documentation

int RX_LEVEL

Definition at line 105 of file dpu_ddet.c.

Referenced by dpu_cd_det_v21().

int RX_GAIN

Definition at line 106 of file dpu_ddet.c.

Referenced by dpu_cd_det_v21().


FM: dpu_ddet.c Source File

dpu_ddet.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: DPU RX dotting detector
00003  ******************************************************************************
00004  * FILE NAME:  dpu_dotdet.c
00005  *
00006  * DESCRIPTION:  DPU RX dotting detector
00007  *
00008  * TABS: NONE
00009  *
00010  * $Id: DPU_DDET.C 1.19 2000/03/29 12:11:14 sakhtar Exp $
00011  *
00012  * REVISION HISTORY:
00013  *
00014  * $Log: DPU_DDET.C $
00015  * Revision 1.19  2000/03/29 12:11:14  sakhtar
00016  * Modified for compilation with 3.50 tools. Changes are compatible
00017  * with 1.20 and 1.16 tools as well. Replaced frctMul with dpu_mul
00018  * to prevent call to the function for multiplication
00019  * Revision 1.18  2000/03/21 22:37:15  jwright
00020  * Clean up 3.50 compile warnings.
00021  * Revision 1.17  1999/02/26 19:02:42  sakhtar
00022  * Modified the API of IIRUpdatOutPowTep function to return
00023  * another value. Fix for false P2 detect in V27 instead of V21
00024  * Revision 1.16  1999/02/26 09:43:44  sakhtar
00025  * Modified to initialize all of dpu_dotdet_t to zero and then
00026  * initialize variables that are used.
00027  * Revision 1.15  1997/12/22 21:39:46  PPATEL
00028  *  V.21 count threshold is now 200 ms and is same for all the high speed
00029  * rates. Also, if TEP is detected, v.21 threshold is increased to prevent
00030  * detection of v.21. The TEP threshold (currently 60 ms) should be kept
00031  * smaller than that of v.21
00032  * Revision 1.14  1997/12/21 16:25:46  PPATEL
00033  *  Enabled TEP reporting in high speed
00034  * Revision 1.13  1997/11/21 15:18:47  PPATEL
00035  *   Insignificant changes for testing code
00036  * Revision 1.12  1997/10/31 14:03:45  PPATEL
00037  *  Major signal processing now in assembly. Improved TEP tone detection.
00038  * Revision 1.11  1997/10/28 22:09:19  PPATEL
00039  *  Merged latest changes with changes for V17 development from an
00040  * old offshoot.
00041  * Revision 1.10  1997/09/26 16:38:46  PPATEL
00042  *   Since the cd and rx_level estimation were corrected before, we had
00043  * problems with lines like C1 (see TAS manual). In order to compensate,
00044  * we found it necessary to reduce gain estimated during dotting sequence because
00045  * otherwise, there were overflows.
00046  * Revision 1.9  1997/09/16 23:14:57  PPATEL
00047  *   Merged changes made in clean customer build on Sept16th; this
00048  * includes increasing v21 detection threshold to prevent false trigger
00049  * from transmit echo. Also cleaned high power threshold comparison.
00050  * Revision 1.8  1997/09/05 17:54:40  PPATEL
00051  *   Added fract.h and types.h
00052  * Revision 1.7  1997/08/22 13:24:43  PPATEL
00053  * Cleaned up for improved power level measurement and false detection of dotting during silence periods.
00054  * Still needs cleanup for higher threshold comparison.
00055  * Revision 1.6  1997/05/25 16:14:51  Zoran
00056  *   Added reporting of rx level
00057  *    Added disableing of V.21 detection (used in V.27 mode)
00058  * Revision 1.5  1997/05/22 11:22:54  Zoran
00059  *   Optimized notch filter for TEP tone detection.
00060  * Revision 1.4  1997/05/18 12:03:18  Zoran
00061  *  Simplified algorithm, state machine, cleaned code, added TEP
00062  *   discrimination
00063  * Revision 1.2  1997/02/19 22:18:52  H.T.Li
00064  *
00065  * (C) Copyright 1996, TELOGY Networks, Inc.
00066  *****************************************************************************/
00067 #include <string.h>
00068
00069 #include <ti/mas/types/types.h>
00070 #include <ti/mas/fract/fract.h>
00071 #include "dpumath.h"
00072 #include "dpu_tgt.h"
00073 #include "dpu_agc.h"   /* For gain calculation */
00074 #include "dpu_ddet.h"
00075 #include "dpumath.h"
00076 #include "fmport.h"
00077 #include "dpu_fir.h"
00078 #include "cdrx.h"
00079 #include "fmprag.h"
00080
00081 #define DOT_TEST 0
00082
00083 #if DOT_TEST
00084  LFract TEST_DDET[128];
00085  int DDET_INDEX=0;
00086  int P2_COUNT=0;
00087  int TEST_P2_INDEX;
00088  int TEST_WRONG=0;
00089  int TEST_V21_SIGNAL=0;
00090 /* LFract V21_POW[1024];*/
00091  LFract SIG_POW[128];
00092  LFract DOT_POW[128];
00093  LFract TEP_POW[128];
00094  int V21_POW_INDEX=0;
00095  int fil_out_index = 0;
00096  int input_index = 0;
00097  Fract DDET_INPUT[1024]={0};
00098  int DDET_INPUT_INDX=0;
00099  int GAIN_VEC[8];
00100  int GAIN_VEC_INDEX =0;
00101  Fract test_phase = 0;
00102 /* 65536*1800/9600 */
00103  Fract test_phase_inc =  12288;
00104 #endif
00105  int RX_LEVEL;
00106  int RX_GAIN;
00107
00108 /******************************************************************************
00109  * FUNCTION PURPOSE: DPU dotting detector
00110  ******************************************************************************
00111  * DESCRIPTION: DPU dotting detector
00112  *
00113  *****************************************************************************/
00114 int dpu_dot_det(dpu_dotdet_t *inst, Fract *in, int samp, int n,
00115                 Fract *gain, tint *rx_level)
00116 {
00117   Fract delay1=inst->delay1, j;
00118   Fract delay1_1 = delay1 - 1;
00119
00120   Fract  t1,t2;
00121   LFract tmp;
00122   LFract v21_pow=0;
00123   LFract sig_pow=0;
00124   LFract dot_pow=0;
00125   LFract tep_pow=0;
00126
00127
00128   Fract *delay=inst->delay;
00129   /* Index of the input sample: n(baud index)*#of samples per baud */
00130   int n1=n*samp;
00131   Fract index = inst->delay_buf_index;
00132
00133   for (j=0; j<samp; j++)
00134   {
00135      t1 = in[n1+j];
00136
00137 #if DOT_TEST
00138 /*    t1 = sinByTableLookup(test_phase);
00139   in[n1+j] = t1;
00140   test_phase += test_phase_inc;*/
00141 if ((inst->sig_power > (inst->high_power_req)) && (DDET_INPUT_INDX <=1023))
00142 {
00143 DDET_INPUT_INDX &=1023;
00144 DDET_INPUT[DDET_INPUT_INDX++] = t1;
00145 }
00146 #endif
00147
00148     v21_pow += IIRUpdatOutPow(&(inst->v21Filt) ,&(inst->v21FreqVect), t1, inst->v21OneMu);
00149
00150     /* Calculate correlation output power */
00151     if (inst->v27_flag)
00152     {
00153       IIRUpdatOutPowTep(t1,inst->dotIIR,inst->dotInp,inst->dotCoefs,&t2);
00154       dot_pow += frctMul(t2, 14, delay[(index+delay1_1)& DPU_DDET_MAX_DELAY_1], 14, 23);
00155   }
00156   else
00157   {
00158       dot_pow += frctMul(t1, 14, delay[(index+delay1_1)& DPU_DDET_MAX_DELAY_1], 14, 23);
00159     }
00160
00161     tep_pow += IIRUpdatOutPowTep(t1, inst->tepIIR, inst->tepInp, inst->tepCoefs,&t2);
00162     /* store index = index-1 */
00163     index = ((index+DPU_DDET_MAX_DELAY_1)& DPU_DDET_MAX_DELAY_1);
00164     delay[index]=t1;
00165   }
00166
00167   sig_pow = dot_square_asm(in+n1,samp-1);
00168   /* Store index for next run */
00169   inst->delay_buf_index = index ; /* circular the buff. index */
00170
00171   /* Calculate averaged signal power */
00172     averagePow(&inst->sig_power, &sig_pow, inst->alpha, inst->division);
00173
00174   /* Calculate averaged BP filter output power */
00175     averagePow(&inst->v21_power, &v21_pow, inst->alpha, inst->division);
00176
00177   /* LPF correlation output */
00178     averagePow(&inst->dot_power, &dot_pow, inst->alpha, inst->division);
00179
00180   /* LPF TEP notch filter output */
00181     averagePow(&inst->tep_power, &tep_pow, inst->alpha, inst->division);
00182
00183 /* TESTESTESTESTESTESTESTESTESTESTESTESTESTESTEST */
00184 #if DOT_TEST
00185 /*  V21_POW[V21_POW_INDEX] = inst->v21_power;*/
00186   SIG_POW[V21_POW_INDEX] = inst->sig_power;
00187   DOT_POW[V21_POW_INDEX] = inst->dot_power;
00188   TEP_POW[V21_POW_INDEX] = inst->tep_power;
00189   V21_POW_INDEX++;
00190   V21_POW_INDEX &= 127;
00191 #endif
00192 /* TESTESTESTESTESTESTESTESTESTESTESTESTESTESTEST */
00193
00194   /* DECISION MAKING */
00195
00196 if (inst->sig_power > inst->high_power_req)
00197 {
00198
00199   /* Is it TEP */
00200   if ( inst->tep_power  < (inst->sig_power >> 3))
00201   {
00202     inst->tep_count+=samp; /* There is TEP (it is cancelled after the notch filt. )*/
00203
00204 #if DOT_TEST
00205 /*  if (inst->tep_count == 120)
00206   {
00207     inst->tep_count++;
00208   }*/
00209 #endif
00210
00211     inst->dot_count = 0; /* Reset dotting counter - it is TEP */
00212
00213   if(inst->tep_count > inst->tep_cnt_thr)
00214   {
00215     inst->tep_count = 0;
00216     /* set to a high value so that it won't flip-flop */
00217     inst->tep_cnt_thr = 10000;
00218
00219       /* since TEP is detected, disable v.21 detection */
00220       inst->v21_cnt_thr = 10000;
00221     return(DPU_TEP_TRUE);
00222   }
00223
00224   }
00225   else
00226   {
00227     inst->tep_count = 0; /* reset TEP counter - the signal is not TEP */
00228   }
00229
00230   /* Decide whether it is TEP or V.21 */
00231   if ( inst->v21_power > (inst->sig_power >> 3))
00232   {
00233     inst->v21_count +=samp;
00234     if (inst->v21_count > inst->v21_cnt_thr)
00235     {
00236       inst->v21_count = 0;
00237       inst->v21_cnt_thr = 10000; /* Increase the threshold so that it wouldn't flip-flop */
00238       if(!inst->disable_v21)
00239       {
00241           *gain = dpu_gain_calc(rx_level,inst->sig_power);
00242           RX_LEVEL = *rx_level;
00243           RX_GAIN = *gain;
00244           return(DPU_V21_HS_TRUE);    /* V.21 flags in high speed */
00245       }
00246     }
00247   }
00248   else
00249     inst->v21_count = 0;  /* Not V.21 => reset the counter */
00250 } /* if (&& (inst->sig_power> (LFract)(1.25297e-5*Q31_SCALE)) */
00251
00252   /* Is it Dotting */
00253
00254   tmp = (inst->factor >0) ? inst->dot_power : -inst->dot_power;
00255   if ((tmp > (inst->sig_power >> 1)) /* if ((inst->dot_power*inst->factor > inst->sig_power)  */
00256    && (inst->sig_power> inst->high_power_req))
00257   {
00258     inst->dot_count++;  /* Increment detection counter */
00259     if (inst->dot_count > inst->dot_cnt_thr /* DPU_P2_COUNT_REQ */)
00260     {
00261
00262       if (inst->gain_calc_flag == TRUE)
00263       {
00264       *gain = dpu_gain_calc(rx_level,inst->sig_power);
00265
00266     /* on some lines like C2, the attenuation is high at high frequency. Since
00267      the gain estimation is used during dotting, we reduce the gain by -4 dB */
00268       *gain = (Fract)dpu_mul(*gain, 11, GAIN_SCAL_MIN_2, GAIN_SCAL_FORMAT, 11);
00269       *gain = (Fract)dpu_mul(*gain, 11, GAIN_SCAL_MIN_2, GAIN_SCAL_FORMAT, 11);
00270
00271       RX_LEVEL = *rx_level;
00272       RX_GAIN = *gain;
00273     }
00274       /**** reset bp_counter for PC detection purpose *****/
00275       inst->dot_count = 0;
00276       inst->dot_power = 0;
00277       inst->v21_power = 0;
00278
00279       return(DPU_P2_TRUE);
00280     }
00281     else
00282       return(DPU_P2_FALSE);
00283   }
00284   else
00285   {
00286     inst->dot_count = 0;
00287     /*  inst->pre_sum=sum; */
00288     return(DPU_P2_FALSE);
00289   }
00290 }
00291
00292 /******************************************************************************
00293  * FUNCTION PURPOSE: DPU PC detector
00294  ******************************************************************************
00295  * DESCRIPTION: DPU phase change detector
00296  *
00297  *****************************************************************************/
00298
00299 int dpu_pc_det(dpu_dotdet_t *inst, Fract *in, int samp, int n,
00300                 Fract *gain, tint *rx_level)
00301 {
00302   int delay1=inst->delay1, j;
00303   int delay1_1 = delay1 - 1;
00304   LFract tmp, sum=0;
00305   Fract *delay=inst->delay;
00306   int n1=n*samp, index = inst->delay_buf_index;
00307
00308   for (j=0; j<samp; j++)
00309   {
00310     tmp = frctMul(in[n1+j], 14, delay[(index+delay1_1)& DPU_DDET_MAX_DELAY_1], 14, 24);
00311     index = ((index+DPU_DDET_MAX_DELAY_1)& DPU_DDET_MAX_DELAY_1);
00312     delay[index]=in[n1+j];         /* 0 */
00313     sum += tmp;
00314   }
00315
00316   inst->delay_buf_index = index ; /* circular the buff. index */
00317 /* TESTESTESTESTESTESTESTESTESTESTESTESTEST */
00318 #if DOT_TEST
00319   if (DDET_INDEX < 128)
00320   {
00321     TEST_DDET[DDET_INDEX] = sum;
00322     DDET_INDEX++;
00323   }
00324 #endif
00325 /* TESTESTESTESTESTESTESTESTESTESTESTESTEST */
00326
00327    if (   ((sum > 0) && (inst->factor < 0))
00328        || ((sum < 0) && (inst->factor > 0))
00329       )
00330      inst->dot_count++;
00331    else
00332      inst->dot_count = 0;
00333
00334 #if 0
00335    inst->dot_power = inst->v21_power;
00336    inst->v21_power = sum;
00337 #endif
00338
00339    if (inst->dot_count == 2)
00340      return(DPU_PC_TRUE);
00341    return(DPU_PC_FALSE);
00342 }
00343
00344 /******************************************************************************
00345  * FUNCTION PURPOSE:  dotting detector initialize
00346  ******************************************************************************
00347  * DESCRIPTION: dotting detector initialize
00348  *
00349  * CAUTION: This function will zero out all data in dpu_dotdet_t
00350  *****************************************************************************/
00351
00352 void dpu_dot_det_init (dpu_dotdet_t *inst, int delay1, Fract division)
00353 {
00354   LFract temp_pow = inst->high_power_req;
00355
00356 #if DOT_TEST
00357     P2_COUNT = 0;
00358 #endif
00359
00360 #if 0
00361     for (i = 0;i < sizeof(dpu_dotdet_t); i++)
00362   {
00363     tempPtr[i] = 0;
00364   }
00365 #else
00366     memset((dpu_dotdet_t *)inst,0,sizeof(dpu_dotdet_t));
00367 #endif
00368
00369     /* initialize the high power req */
00370   inst->high_power_req = temp_pow;
00371
00372     inst->delay1=delay1; /* Set delay for P2 detection */
00373     inst->disable_v21=FALSE;
00374
00375     /* corresponding to 200 ms @ 9600 samples/sec */
00376     inst->v21_cnt_thr = 1920;
00377
00378     /* for 60 ms, number of samples @9600 samples/sec for tep detection */
00379     inst->tep_cnt_thr = 576;
00380
00381    /* patch to make division compatible to Q15 */
00382     inst->division = frctAdjustQ(division,14,15);
00383     inst->alpha=(Fract)(0.5*Q15_SCALE);
00384     inst->status = DPU_P2_FALSE;
00385
00386   inst->tepCoefs[2] = (Fract)(0.95*0.95*INTERP_CONST_SCALE);
00387
00388     /* mu = 0.95; cos = mu * cos(2*pi*1750/9600); sin = mu *sin(2*pi*1750/9600) */
00389     inst->v21FreqVect.re = (Fract)(0.392072 * INTERP_CONST_SCALE);
00390     inst->v21FreqVect.im = (Fract)(0.865321 * INTERP_CONST_SCALE);
00391     inst->v21OneMu       = (Fract)((1-0.95) * INTERP_CONST_SCALE);
00392
00393     inst->gain_calc_flag = TRUE;
00394 }
00395 /* Nothing after this point */


FM: dpu_ddet.h File Reference

dpu_ddet.h File Reference

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

Include dependency graph for dpu_ddet.h:

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

Go to the source code of this file.

Data Structures

struct | dpu_dotdet_t

Defines

#define | DPU_DDET_MAX_DELAY 64
#define | DPU_DDET_MAX_DELAY_1 63
#define | DPU_P2_FALSE 0
#define | DPU_P2_TRUE 1
#define | DPU_V21_HS_TRUE 2
#define | DPU_V21_TRUE 3
#define | DPU_TEP_TRUE 4
#define | DPU_PC_FALSE 0
#define | DPU_PC_TRUE 1

Functions

int | dpu_dot_det (dpu_dotdet_t *inst, Fract *in, int samp, int n, Fract *gain, tint *rx_level)
int | dpu_pc_det (dpu_dotdet_t *inst, Fract *in, int samp, int n, Fract *gain, tint *rx_level)
void | dpu_dot_det_init (dpu_dotdet_t *inst, int delay1, Fract division)
LFract | IIRUpdatOutPow (cmplx_t *filt, cmplx_t *freq, Fract in, Fract oneMu)
LFract | IIRUpdatOutPowTep (Fract in, Fract *tepIIR, Fract *tepInp, Fract *tepCoefs, Fract *out)

Define Documentation

#define DPU_DDET_MAX_DELAY 64

Definition at line 50 of file dpu_ddet.h.

#define DPU_DDET_MAX_DELAY_1 63

Definition at line 51 of file dpu_ddet.h.

Referenced by dpu_dot_det(), and dpu_pc_det().

#define DPU_P2_FALSE 0

Definition at line 53 of file dpu_ddet.h.

Referenced by dpu_dot_det_init(), HSrxCommonSt1Init(), v27RxStM(), and v29RxStM().

#define DPU_P2_TRUE 1

Definition at line 54 of file dpu_ddet.h.

Referenced by v27RxStM(), and v29RxStM().

#define DPU_V21_HS_TRUE 2

Definition at line 55 of file dpu_ddet.h.

Referenced by v27RxStM(), and v29RxStM().

#define DPU_V21_TRUE 3

Definition at line 56 of file dpu_ddet.h.

Referenced by dpu_v21_check(), v21RxStM(), v27RxStM(), and v29RxStM().

#define DPU_TEP_TRUE 4

Definition at line 57 of file dpu_ddet.h.

Referenced by v21Rx(), v27RxStM(), and v29RxStM().

#define DPU_PC_FALSE 0

Definition at line 59 of file dpu_ddet.h.

Referenced by dpu_pc_det(), v27RxSt3Init(), and v29RxSt3Init().

#define DPU_PC_TRUE 1

Definition at line 60 of file dpu_ddet.h.

Referenced by dpu_pc_det().

Function Documentation

int dpu_dot_det | ( | dpu_dotdet_t * | inst,
 |  | Fract * | in,
 |  | int | samp,
 |  | int | n,
 |  | Fract * | gain,
 |  | tint * | rx_level
 | ) |  |

Definition at line 114 of file dpu_ddet.c.

References dpu_dotdet_t::delay, dpu_dotdet_t::delay1, dpu_dotdet_t::delay_buf_index, dpu_dotdet_t::dotCoefs, dpu_dotdet_t::dotIIR, dpu_dotdet_t::dotInp, DPU_DDET_MAX_DELAY_1, dpu_dotdet_t::high_power_req, IIRUpdatOutPow(), IIRUpdatOutPowTep(), dpu_dotdet_t::sig_power, dpu_dotdet_t::tepCoefs, dpu_dotdet_t::tepIIR, dpu_dotdet_t::tepInp, dpu_dotdet_t::v21Filt, dpu_dotdet_t::v21FreqVect, dpu_dotdet_t::v21OneMu, and dpu_dotdet_t::v27_flag.

Referenced by HSrxCommonSt1Init().

Here is the call graph for this function:

int dpu_pc_det | ( | dpu_dotdet_t * | inst,
 |  | Fract * | in,
 |  | int | samp,
 |  | int | n,
 |  | Fract * | gain,
 |  | tint * | rx_level
 | ) |  |

Definition at line 299 of file dpu_ddet.c.

References dpu_dotdet_t::delay, dpu_dotdet_t::delay1, dpu_dotdet_t::delay_buf_index, dpu_dotdet_t::dot_count, dpu_dotdet_t::dot_power, DPU_DDET_MAX_DELAY_1, DPU_PC_FALSE, DPU_PC_TRUE, dpu_dotdet_t::factor, and dpu_dotdet_t::v21_power.

Referenced by v27RxSt3Init(), and v29RxSt3Init().

void dpu_dot_det_init | ( | dpu_dotdet_t * | inst,
 |  | int | delay1,
 |  | Fract | division
 | ) |  |

Definition at line 352 of file dpu_ddet.c.

References dpu_dotdet_t::alpha, dpu_dotdet_t::delay1, dpu_dotdet_t::disable_v21, dpu_dotdet_t::division, DPU_P2_FALSE, dpu_dotdet_t::gain_calc_flag, dpu_dotdet_t::high_power_req, cmplx_t::im, INTERP_CONST_SCALE, Q15_SCALE, cmplx_t::re, dpu_dotdet_t::status, dpu_dotdet_t::tep_cnt_thr, dpu_dotdet_t::tepCoefs, dpu_dotdet_t::v21_cnt_thr, dpu_dotdet_t::v21FreqVect, and dpu_dotdet_t::v21OneMu.

Referenced by v27RxSt1Init(), and v29RxSt1Init().

LFract IIRUpdatOutPow | ( | cmplx_t * | filt,
 |  | cmplx_t * | freq,
 |  | Fract | in,
 |  | Fract | oneMu
 | ) |  |

Definition at line 25 of file dpu_ddt.c.

References cmplx_t::im, and cmplx_t::re.

LFract IIRUpdatOutPowTep | ( | Fract | in,
 |  | Fract * | tepIIR,
 |  | Fract * | tepInp,
 |  | Fract * | tepCoefs,
 |  | Fract * | out
 | ) |  |

Definition at line 48 of file dpu_ddt.c.


FM: dpu_ddet.h Source File

dpu_ddet.h

Go to the documentation of this file.
00001 #ifndef _DPU_DDET_H
00002 #define _DPU_DDET_H
00003
00004 /******************************************************************************
00005  * FILE PURPOSE:  header file of RX dot detector
00006  ******************************************************************************
00007  * FILE NAME: dpu_ddet.h
00008  *
00009  * DESCRIPTION: header file of RX dot detector
00010  *
00011  * TABS: NONE
00012  *
00013  * $Id: DPU_DDET.H 1.13 1999/02/26 19:02:47 sakhtar Exp $
00014  *
00015  * REVISION HISTORY:
00016  *
00017  * $Log: DPU_DDET.H $
00018  * Revision 1.13  1999/02/26 19:02:47  sakhtar
00019  * Modified the API of IIRUpdatOutPowTep function to return
00020  * another value. Fix for false P2 detect in V27 instead of V21
00021  * Revision 1.12  1997/12/21 16:57:36  PPATEL
00022  *  Name change to be more meaningful now that we are reporting TEP
00023  * in high speed and V21 in high speed as separate entities
00024  * Revision 1.11  1997/11/21 15:19:34  PPATEL
00025  *  Fract.h removed
00026  * Revision 1.10  1997/10/31 14:06:54  PPATEL
00027  *   prototypes for routines defined in assembly and change in structure
00028  * for new TEP tone detection
00029  * Revision 1.8  1997/10/28 22:11:42  PPATEL
00030  *  Merged latest changes with changes in old offshoot for v.17
00031  * development
00032  * Revision 1.7  1997/09/16 23:16:05  PPATEL
00033  *  Added high power field for carrier detection threshold
00034  * Revision 1.6  1997/05/25 16:15:26  Zoran
00035  *   Changed prototypes for dot det functions to include reporting of
00036  * rx level
00037  * Revision 1.5  1997/05/22 11:23:13  Zoran
00038  *    Added parameter for notch filter detection
00039  * Revision 1.4  1997/05/18 12:47:04  Zoran
00040  *   Cleaned, updated code
00041  * Revision 1.2  1997/02/19 22:19:29  H.T.Li
00042  * Revision 1.1  1997/02/06 08:48:55  unknown
00043  * Initial revision
00044  *
00045  * (C) Copyright 1996, TELOGY Networks, Inc.
00046  *****************************************************************************/
00047  #include <ti/mas/types/types.h>
00048  #include "dpumath.h"
00049
00050  #define DPU_DDET_MAX_DELAY 64  /* 16*4 */
00051  #define DPU_DDET_MAX_DELAY_1 63 /* DPU_DDET_MAX_DELAY -1 */
00052
00053  #define DPU_P2_FALSE     0
00054  #define DPU_P2_TRUE      1
00055  #define DPU_V21_HS_TRUE  2
00056  #define DPU_V21_TRUE     3
00057  #define DPU_TEP_TRUE     4
00058
00059  #define DPU_PC_FALSE     0
00060  #define DPU_PC_TRUE      1
00061
00062 typedef struct
00063 {
00064  Fract status;
00065  /* for BP filter */
00066
00067  cmplx_t v21FreqVect;
00068  cmplx_t v21Filt;
00069  Fract   v21OneMu;
00070
00071  /* variables for TEP tone detection notch filter
00072
00073          1 - 2*cos(2*pi*freq/9600)z^(-1) + z^(-2)
00074   H(z) = -------------------------------------------------
00075          1 - 2*nu*cos(2*pi*freq/9600)z^(-1) + nu*nu*z^(-2)
00076
00077  */
00078  Fract tepIIR[2];
00079  Fract tepInp[2];
00080  Fract tepCoefs[3];
00081
00082  Fract dotIIR[2];
00083  Fract dotInp[2];
00084  Fract dotCoefs[3];
00085  Fract v27_flag;
00086
00087  Fract delay_buf_index;
00088  Fract delay1;
00089  Fract factor;
00090  tint  disable_v21; /* Disable V.21 detection */
00091  /* Detection counters */
00092  Fract dot_count;
00093  Fract v21_count;
00094  Fract tep_count;
00095  /* Detection thresholds */
00096  Fract dot_cnt_thr;
00097  Fract v21_cnt_thr;
00098  Fract tep_cnt_thr;
00099  /* Power estimates */
00100  LFract dot_power;
00101  LFract sig_power;
00102  LFract v21_power;
00103  LFract tep_power;
00104  LFract high_power_req;
00105  /* LPF parameters */
00106  Fract alpha;
00107  Fract division;
00108  Fract delay[DPU_DDET_MAX_DELAY];
00109  Fract gain_calc_flag;
00110 } dpu_dotdet_t;
00111
00112
00113 int dpu_dot_det(dpu_dotdet_t *inst, Fract *in, int samp,
00114                 int n, Fract *gain, tint *rx_level );
00115
00116 int dpu_pc_det(dpu_dotdet_t *inst, Fract *in, int samp,
00117                 int n, Fract *gain, tint *rx_level );
00118
00119 void dpu_dot_det_init(dpu_dotdet_t *inst, int delay1, Fract division);
00120
00121 extern LFract IIRUpdatOutPow(cmplx_t *filt, cmplx_t *freq, Fract in, Fract oneMu);
00122 extern LFract IIRUpdatOutPowTep(Fract in, Fract *tepIIR, Fract *tepInp,
00123                                 Fract *tepCoefs,Fract *out);
00124
00125 #endif  /* _DPU_DDET_H */
00126 /* nothing past this point */


FM: dpu_ddt.c File Reference

dpu_ddt.c File Reference

#include <ti/mas/types/types.h>
#include <ti/mas/fract/fract.h>
#include "dpumath.h"

Include dependency graph for dpu_ddt.c:

Go to the source code of this file.

Functions

LFract | IIRUpdatOutPow (cmplx_t *filt, cmplx_t *freq, Fract in, Fract oneMu)
LFract | IIRUpdatOutPowTep (Fract in, Fract *tepIIR, Fract *tepInp, Fract *tepCoefs, Fract *out)

Function Documentation

LFract IIRUpdatOutPow | ( | cmplx_t * | filt,
 |  | cmplx_t * | freq,
 |  | Fract | in,
 |  | Fract | oneMu
 | ) |  |

Definition at line 25 of file dpu_ddt.c.

References cmplx_t::im, and cmplx_t::re.

LFract IIRUpdatOutPowTep | ( | Fract | in,
 |  | Fract * | tepIIR,
 |  | Fract * | tepInp,
 |  | Fract * | tepCoefs,
 |  | Fract * | out
 | ) |  |

Definition at line 48 of file dpu_ddt.c.


FM: dpu_ddt.c Source File

dpu_ddt.c

Go to the documentation of this file.
00001 /******************************************************************************
00002 ; * FILE PURPOSE:
00003 ; ******************************************************************************
00004 ; * FILE NAME:
00005 ; *
00006 ; * DESCRIPTION:
00007 ; *
00008 ; * TABS: NONE
00009 ; *
00010 ; * $Id: 1.1 2002/8/16 00:05:09 Aravind B R Exp $
00011 ; *
00012 ; * REVISION HISTORY:
00013 ; *
00014 ; * $Log: $
00015 ; * Revision 1.1 2002/8/16 00:05:09 Aravind B R
00016 ; * Initial revision
00017 ; *
00018 ; * (C) Copyright 2002, Texas Instruments, India.
00019 ; *****************************************************************************/
00020
00021 #include <ti/mas/types/types.h>
00022 #include <ti/mas/fract/fract.h>
00023 #include "dpumath.h"
00024
00025 LFract IIRUpdatOutPow(cmplx_t *filt, cmplx_t *freq, Fract in, Fract oneMu) {
00026
00027  LFract t1,t2,tmp;
00028
00029   t2  =  frctMul(in, 13, oneMu, 14, 28);  /* Aravind BR, change 22/8 */
00030   t2 +=  frctMul(filt->re,14,freq->re,14,28);
00031   t2 -=  frctMul(filt->im,14,freq->im,14,28);
00032
00033     t1  =  frctMul(filt->re,14,freq->im,14,28);
00034     t1 +=  frctMul(filt->im,14,freq->re,14,28);
00035
00036     t2  = frctAdjustQ(t2,28,30);
00037   t1  = frctAdjustQ(t1,28,30);
00038
00039     filt->re = frctAdjustQ(t2,32,16);
00040   filt->im = frctAdjustQ(t1,32,16);
00041
00042     tmp  =  frctMul(filt->re,14,filt->re,14,28);
00043   tmp +=  frctMul(filt->im,14,filt->im,14,28);
00044
00045     return(frctAdjustQ(tmp,28,23));
00046   }
00047
00048 LFract IIRUpdatOutPowTep(Fract in, Fract *tepIIR, Fract *tepInp,
00049                           Fract *tepCoefs,Fract *out) {
00050     LFract t1;
00051
00052   t1  =  ( (LFract)in << 14 ) - frctMul(tepInp[0],14,tepCoefs[0],14,28);
00053   t1 +=  (LFract)tepInp[1] << 14;
00054
00055     tepInp[1] = tepInp[0];
00056   tepInp[0] = in;
00057
00058     t1 += frctMul(tepIIR[0],14,tepCoefs[1],14,28);
00059     t1 -= frctMul(tepIIR[1],14,tepCoefs[2],14,28);
00060
00061   tepIIR[1] = tepIIR[0];
00062   t1 = frctAdjustQ(t1,28,30);
00063
00064   t1 = frctAdjustQ(t1,32,16);
00065   tepIIR[0] = t1;
00066   *out      = t1;
00067
00068     t1 =   frctMul(tepIIR[0],14,tepIIR[0],14,28);
00069   return(frctAdjustQ(t1,28,23));
00070  }
00071
00072 /* Nothing past this point */


FM: dpu_denc.h File Reference

dpu_denc.h File Reference

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

Include dependency graph for dpu_denc.h:

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

Go to the source code of this file.

Data Structures

struct | dpu_denc_t
struct | dpu_ddec_t

Functions

void | dpu_denc_init (dpu_denc_t *denc_ptr, int num_of_bits, const Fract *denc_table, Fract abs_phase)
void | dpu_denc_v29 (dpu_denc_t *denc_ptr, Fract *bits)
void | dpu_ddec_init (dpu_ddec_t *ddec_ptr, int num_of_bits, const Fract *ddec_table, Fract abs_phase)
void | dpu_ddec_v29 (dpu_ddec_t *ddec_ptr, Fract *bits)

Function Documentation

void dpu_denc_init | ( | dpu_denc_t * | denc_ptr,
 |  | int | num_of_bits,
 |  | const Fract * | denc_table,
 |  | Fract | abs_phase
 | ) |  |

Definition at line 94 of file dif_enc.c.

References dpu_denc_t::abs_phase, dpu_denc_t::denc_table, dpu_denc_t::mask, and dpu_denc_t::mask_comp.

Referenced by v27TxSt4Init(), and v29TxSt3Init().

void dpu_denc_v29 | ( | dpu_denc_t * | denc_ptr,
 |  | Fract * | bits
 | ) |  |

Definition at line 60 of file dif_enc.c.

References dpu_denc_t::abs_phase, dpu_denc_t::denc_table, dpu_denc_t::mask, and dpu_denc_t::mask_comp.

Referenced by v27TxSt4Init(), and v29TxSt3Init().

void dpu_ddec_init | ( | dpu_ddec_t * | ddec_ptr,
 |  | int | num_of_bits,
 |  | const Fract * | ddec_table,
 |  | Fract | abs_phase
 | ) |  |

Definition at line 96 of file dif_dec.c.

References dpu_ddec_t::ddec_table, dpu_ddec_t::last_phase, dpu_ddec_t::mask, and dpu_ddec_t::mask_comp.

Referenced by v27RxSt7Init(), and v29RxSt7Init().

void dpu_ddec_v29 | ( | dpu_ddec_t * | ddec_ptr,
 |  | Fract * | bits
 | ) |  |

Definition at line 59 of file dif_dec.c.

References dpu_ddec_t::ddec_table, dpu_ddec_t::last_phase, dpu_ddec_t::mask, and dpu_ddec_t::mask_comp.

Referenced by v27RxSt7Init(), and v29RxSt7Init().


FM: dpu_denc.h Source File

dpu_denc.h

Go to the documentation of this file.
00001 #ifndef _DPU_DENC_H
00002 #define _DPU_DENC_H
00003 /******************************************************************************
00004  * FILE PURPOSE: Differentail Encoder & Decoder Header File
00005  ******************************************************************************
00006  * FILE NAME:   dpu_denc.h
00007  *
00008  * DESCRIPTION: This file contains API and definitions for differential
00009  *              encoder and decoder routines for the DPU module.
00010  *
00011  * REQUIRES:    types.h   (generic DSP ECO types)
00012  *
00013  * TABS: NONE
00014  *
00015  * $Id: DPU_DENC.H 1.4 1997/10/28 22:13:32 PPATEL Exp $
00016  *
00017  * REVISION HISTORY:
00018  *
00019  * $Log: DPU_DENC.H $
00020  * Revision 1.4  1997/10/28 22:13:32  PPATEL
00021  *  diff decoder api changed
00022  * Revision 1.3  1997/09/13 19:24:45  PPATEL
00023  *   API change for abs_phase
00024  * Revision 1.2  1997/05/18 12:37:18  Zoran
00025  *   cleaned code
00026  * Revision 1.1  1997/02/06 08:50:23  unknown
00027  * Initial revision
00028  *
00029  * (C) Copyright 1995, 1996, TELOGY Networks, Inc.
00030  *****************************************************************************/
00031
00032 /* System level header files */
00033 #include <ti/mas/types/types.h>
00034
00035 /* Differential Encoder data definition structure */
00036
00037  typedef struct {
00038    Fract abs_phase;    /* Abs. phase of the encoder */
00039    const Fract *denc_table;  /* pointer to diff. encoder table */
00040    Fract mask;         /* Mask for the diff. encoder bits */
00041    Fract mask_comp;    /* 1st complement of mask */
00042 } dpu_denc_t;
00043
00044
00045 /* Descrambler data definition structure */
00046
00047  typedef struct {
00048    Fract last_phase;   /* Last phase of the decoder */
00049    const Fract *ddec_table;  /* pointer to diff. decoder table */
00050    Fract mask;         /* Mask for the diff. decoder bits */
00051    Fract mask_comp;    /* 1st complement of mask */
00052 } dpu_ddec_t;
00053
00054
00055
00056 /* Differential Encoder API */
00057 void dpu_denc_init(dpu_denc_t *denc_ptr,
00058                   int   num_of_bits,
00059                   const Fract *denc_table, Fract abs_phase);
00060 void dpu_denc_v29 (dpu_denc_t *denc_ptr, Fract *bits);
00061
00062
00063 /* Differential Decoder API */
00064 void dpu_ddec_init(dpu_ddec_t *ddec_ptr,
00065                   int   num_of_bits,
00066                   const Fract *ddec_table, Fract abs_phase);
00067 void dpu_ddec_v29 (dpu_ddec_t *ddec_ptr, Fract *bits);
00068
00069
00070 #endif  /* _DPU_DENC_H */
00071 /* nothing past this point */


FM: dpu_fir.c File Reference

dpu_fir.c File Reference

#include <ti/mas/types/types.h>
#include <ti/mas/fract/fract.h>
#include "dpu_intp.h"
#include "dpu_shap.h"
#include "dpu_fir.h"

Include dependency graph for dpu_fir.c:

Go to the source code of this file.

Functions

void | shift_data (Fract *src, Fract *dst, int len_1)
LFract | dot_square_asm (Fract *a, int length_1)
LFract | convoluI (Fract *in, Fract *hn, int h)
LFract | dot_prod (Fract *a, Fract *b, int l)
LFract | frctMulDBL (LFract *f1, LFract *f2)
void | dpu_interp_output (dpu_interp_t *Tmp, Fract *output, int length)
int | dpushaping_filt (Fract *oldin_re, Fract *oldin_im, Fract *in_re, Fract *in_im, const Fract filt_re[][SHAP_MAX_M_COEF], const Fract filt_im[][SHAP_MAX_M_COEF], int samp_per_baud, int h, Fract *output, int length)

Function Documentation

void shift_data | ( | Fract * | src,
 |  | Fract * | dst,
 |  | int | len_1
 | ) |  |

Definition at line 27 of file dpu_fir.c.

Referenced by dpu_adeq(), and dpu_interp().

LFract dot_square_asm | ( | Fract * | a,
 |  | int | length_1
 | ) |  |

Definition at line 33 of file dpu_fir.c.

Referenced by dpu_cd_det_util(), and dpu_cd_det_v21().

LFract convoluI | ( | Fract * | in,
 |  | Fract * | hn,
 |  | int | h
 | ) |  |

Definition at line 43 of file dpu_fir.c.

Referenced by dpu_bp_hilb(), dpu_interp(), dpu_interp_output(), and dpushaping_filt().

LFract dot_prod | ( | Fract * | a,
 |  | Fract * | b,
 |  | int | l
 | ) |  |

Definition at line 54 of file dpu_fir.c.

LFract frctMulDBL | ( | LFract * | f1,
 |  | LFract * | f2
 | ) |  |

Definition at line 65 of file dpu_fir.c.

Referenced by averagePow().

void dpu_interp_output | ( | dpu_interp_t * | Tmp,
 |  | Fract * | output,
 |  | int | length
 | ) |  |

Definition at line 102 of file dpu_fir.c.

References convoluI(), dpu_interp_t::filter, dpu_interp_t::index_tab, dpu_interp_t::L1, dpu_interp_t::L2, dpu_interp_t::length, and dpu_interp_t::oldin.

Referenced by dpu_interp().

Here is the call graph for this function:

int dpushaping_filt | ( | Fract * | oldin_re,
 |  | Fract * | oldin_im,
 |  | Fract * | in_re,
 |  | Fract * | in_im,
 |  | const Fract | filt_re[][SHAP_MAX_M_COEF],
 |  | const Fract | filt_im[][SHAP_MAX_M_COEF],
 |  | int | samp_per_baud,
 |  | int | h,
 |  | Fract * | output,
 |  | int | length
 | ) |  |

Definition at line 123 of file dpu_fir.c.

References convoluI().

Referenced by dpu_shaping().

Here is the call graph for this function:


FM: dpu_fir.c Source File

dpu_fir.c

Go to the documentation of this file.
00001 /******************************************************************************
00002 ; * FILE PURPOSE:
00003 ; ******************************************************************************
00004 ; * FILE NAME:
00005 ; *
00006 ; * DESCRIPTION:
00007 ; *
00008 ; * TABS: NONE
00009 ; *
00010 ; * $Id: 1.1 2002/8/16 00:05:09 Aravind B R Exp $
00011 ; *
00012 ; * REVISION HISTORY:
00013 ; *
00014 ; * $Log: $
00015 ; * Revision 1.1 2002/8/16 00:05:09 Aravind B R
00016 ; * Initial revision
00017 ; *
00018 ; * (C) Copyright 2002, Texas Instruments, India.
00019 ; *****************************************************************************/
00020
00021 #include <ti/mas/types/types.h>
00022 #include <ti/mas/fract/fract.h>
00023 #include "dpu_intp.h"
00024 #include "dpu_shap.h"
00025 #include "dpu_fir.h"
00026
00027 void shift_data(Fract *src,Fract *dst, int len_1) {
00028   int i;
00029   for (i=0; i<=len_1;i++)
00030     dst[i]=src[i];
00031 }
00032
00033 LFract dot_square_asm(Fract *a, int length_1) {
00034   LFract retv;
00035   Fract i;
00036   retv =0;
00037   for (i=0; i<=length_1; i++)
00038     retv += frctMul(a[i],14,a[i],14,28);
00039
00040   return(frctAdjustQ(retv,28,23));
00041 }
00042
00043 LFract convoluI (Fract *in, Fract *hn, int h)
00044 {
00045   LFract t1=0;
00046   do
00047   {
00048    t1+=(LFract)(*in--)*(*hn++);
00049   } while (h--);
00050
00051   return(t1);
00052 }
00053
00054 LFract dot_prod (Fract *a, Fract *b, int l)
00055 {
00056   LFract t1 =0;
00057   do
00058   {
00059    t1+= (LFract)(*a++)*(*b++);
00060   }while(l--);
00061
00062   return(t1);
00063 }
00064
00065 LFract frctMulDBL(LFract *f1, LFract *f2)
00066 {
00067   LFract    cp,crossProduct;
00068   LFract    result,x,y;
00069   Fract     t0,t1;
00070   UFract    t2;
00071
00072   x     =   *f1;
00073   y     =   *f2;
00074
00075   /* 32-bit Fractional multiplication */
00076   /* XRh XRl * YRh YRl = (XRh * YRh) << 1 + (XRh * YRl) >> 15 +  */
00077   /* (XRl * YRh) >> 15     */
00078
00079   t2   = (UFract)(y & (Fract)frct_FRACT_MASK);
00080   t1   = (Fract) (x >> TYP_FRACT_PREC);
00081
00082   crossProduct =  ((UFract)t2 * (LFract)t1);
00083
00084   t2   = (UFract)(x & (Fract)frct_FRACT_MASK);
00085   t1   = (Fract) (y >> TYP_FRACT_PREC);
00086
00087   crossProduct += ((UFract)t2 * (LFract)t1);
00088
00089   cp   = crossProduct >> TYP_FRACT_PREC;
00090
00091   t0   = (Fract)((x >> TYP_FRACT_PREC));
00092   t1   = (Fract)((y >> TYP_FRACT_PREC));
00093
00094   result = frctMul(t0,16,t1,16,32);
00095   result += cp;
00096
00097   result = result << 1;
00098
00099   return (result);
00100 } /* frctMulDBL */
00101
00102 void dpu_interp_output(dpu_interp_t *Tmp,Fract *output,int length)
00103 {
00104   Fract n,j,n1,oldindex;
00105   int count;
00106   Fract *in,*filter;
00107
00108   count =0;
00109   for (n=0; n < length; n += Tmp->L2)
00110    {
00111      n1 = n + Tmp->length - 1;    /* Prepare delay line base index */
00112      for (j=0; j<Tmp->L1; j++)
00113      {
00114        in     = (Fract *)(Tmp->oldin);
00115        oldindex =  n1 + *(Tmp->index_tab +j);
00116      in += oldindex;
00117      filter = (Fract *)(Tmp->filter + j * Tmp->length);
00118        output[count++]=frctLF2F(convoluI(in,filter,Tmp->length-1),28,14);
00119      }
00120    }
00121 }
00122
00123 int dpushaping_filt(Fract *oldin_re, Fract *oldin_im, Fract *in_re, Fract *in_im, const Fract filt_re[][SHAP_MAX_M_COEF],
00124                    const Fract filt_im[][SHAP_MAX_M_COEF], int samp_per_baud, int h, Fract *output, int length)
00125 {
00126   Fract n,j,n1;
00127   int count;
00128   LFract t1, t2;
00129
00130   count =0;
00131   /* Copy input to common delay line */
00132    for (n=0; n < length; n++)
00133    {
00134      oldin_re[n+h-1] = in_re[n];
00135      oldin_im[n+h-1] = in_im[n];
00136    }
00137    /* Calculate the filter output */
00138    for (n=0; n < length; n++)
00139    {
00140      n1 = n+h-1;
00141      for (j=0; j< samp_per_baud; j++ )
00142      {
00143        t1=convoluI(&oldin_re[n1],(Fract *)(filt_re[j]),h-1);
00144        t2=convoluI(&oldin_im[n1],(Fract *)(filt_im[j]),h-1);
00145        output[count++]=frctLF2F(t1-t2,28,14) ;
00146      }
00147    }
00148    /* Save remaining input for next cycle */
00149    j=length-h+1;
00150    for (n=0; n< (h-1); n++)
00151    {
00152      oldin_re[n]= in_re[j];
00153      oldin_im[n]= in_im[j++];
00154    }
00155
00156    return(count);
00157 }
00158
00159 /* nothing past this point */


FM: dpu_fir.h File Reference

dpu_fir.h File Reference

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

Go to the source code of this file.

Functions

void | shift_data (Fract *src, Fract *dst, int len_1)
LFract | dot_square_asm (Fract *a, int length_1)
LFract | convoluI (Fract *in, Fract *hn, int h)
LFract | dot_prod (Fract *a, Fract *b, int l)
LFract | frctMulDBL (LFract *f1, LFract *f2)

Function Documentation

void shift_data | ( | Fract * | src,
 |  | Fract * | dst,
 |  | int | len_1
 | ) |  |

Definition at line 27 of file dpu_fir.c.

Referenced by dpu_adeq(), and dpu_interp().

LFract dot_square_asm | ( | Fract * | a,
 |  | int | length_1
 | ) |  |

Definition at line 33 of file dpu_fir.c.

LFract convoluI | ( | Fract * | in,
 |  | Fract * | hn,
 |  | int | h
 | ) |  |

Definition at line 43 of file dpu_fir.c.

Referenced by dpu_bp_hilb(), dpu_interp(), dpu_interp_output(), and dpushaping_filt().

LFract dot_prod | ( | Fract * | a,
 |  | Fract * | b,
 |  | int | l
 | ) |  |

Definition at line 54 of file dpu_fir.c.

LFract frctMulDBL | ( | LFract * | f1,
 |  | LFract * | f2
 | ) |  |

Definition at line 65 of file dpu_fir.c.


FM: dpu_fir.h Source File

dpu_fir.h

Go to the documentation of this file.
00001 #ifndef _DPU_FIR_H
00002 #define _DPU_FIR_H
00003
00004 void   shift_data(Fract *src,Fract *dst, int len_1);
00005 LFract dot_square_asm(Fract *a, int length_1);
00006 LFract convoluI (Fract *in, Fract *hn, int h);
00007 LFract dot_prod (Fract *a, Fract *b, int l);
00008 LFract frctMulDBL(LFract *f1, LFract *f2);
00009 #endif /* _DPU_FIR_H */
00010
00011 /* nothing past this point */


FM: dpu_fsk.c File Reference

dpu_fsk.c File Reference

#include "dpumath.h"
#include "dpu_tgt.h"
#include <stdlib.h>
#include <ti/mas/types/types.h>
#include <ti/mas/fract/fract.h>
#include "dpu_fsk.h"
#include "fmprag.h"

Include dependency graph for dpu_fsk.c:

Go to the source code of this file.

Defines

#define | DPU_FSK_REQ_COUNT 2
#define | DPU_FSK_FREQ_UP_LIMIT 150
#define | DPU_FSK_FREQ_DOWN_LIMIT -DPU_FSK_FREQ_UP_LIMIT
#define | DPU_FSK_FREQ_LOW_LIMIT 55
#define | DPU_FSK_FREQ_HIGH_LIMIT -DPU_FSK_FREQ_LOW_LIMIT

Functions

void | dpu_v21_fsk_gen (dpu_fsk_gen_t *inst, Fract input_bits, Fract samp, Fract *output, int n)
void | dpu_fsk_gen_init (dpu_fsk_gen_t *inst, const Fract *freq_table, tuint mask)
int | dpu_v21_dec (dpu_v21_dec_t *inst, Fract *input, int samp, Fract *output, Fract *n)
int | dpu_v21_check (dpu_v21_dec_t *inst, Fract *input, int samp, Fract *output, Fract *n)
int | dpu_v21_check_high (dpu_v21_dec_t *inst, Fract *input, int samp, Fract *output, Fract *n)
void | dpu_v21_dec_init (dpu_v21_dec_t *inst, int samp_req)

Variables

const Fract | dpu_v21_freq_h_table [2]

Define Documentation

#define DPU_FSK_REQ_COUNT 2

Definition at line 67 of file dpu_fsk.c.

#define DPU_FSK_FREQ_UP_LIMIT 150

Definition at line 68 of file dpu_fsk.c.

Referenced by dpu_v21_check_high(), and dpu_v21_dec().

#define DPU_FSK_FREQ_DOWN_LIMIT -DPU_FSK_FREQ_UP_LIMIT

Definition at line 69 of file dpu_fsk.c.

Referenced by dpu_v21_check_high(), and dpu_v21_dec().

#define DPU_FSK_FREQ_LOW_LIMIT 55

Definition at line 70 of file dpu_fsk.c.

#define DPU_FSK_FREQ_HIGH_LIMIT -DPU_FSK_FREQ_LOW_LIMIT

Definition at line 71 of file dpu_fsk.c.

Function Documentation

void dpu_v21_fsk_gen | ( | dpu_fsk_gen_t * | inst,
 |  | Fract | input_bits,
 |  | Fract | samp,
 |  | Fract * | output,
 |  | int | n
 | ) |  |

Definition at line 85 of file dpu_fsk.c.

References dpu_fsk_gen_t::freq_table, dpu_fsk_gen_t::mask, and dpu_fsk_gen_t::phase.

Referenced by vxx_tx_init().

void dpu_fsk_gen_init | ( | dpu_fsk_gen_t * | inst,
 |  | const Fract * | freq_table,
 |  | tuint | mask
 | ) |  |

Definition at line 126 of file dpu_fsk.c.

References dpu_fsk_gen_t::freq_table, dpu_fsk_gen_t::mask, and dpu_fsk_gen_t::phase.

Referenced by vxx_tx_init().

int dpu_v21_dec | ( | dpu_v21_dec_t * | inst,
 |  | Fract * | input,
 |  | int | samp,
 |  | Fract * | output,
 |  | Fract * | n
 | ) |  |

Definition at line 141 of file dpu_fsk.c.

References dpu_v21_dec_t::cross_count, DPU_FSK_FREQ_DOWN_LIMIT, DPU_FSK_FREQ_UP_LIMIT, DPU_V21_FALSE, dpu_v21_dec_t::pattern, dpu_v21_dec_t::pre_sample, and dpu_v21_dec_t::start.

Referenced by dpu_v21_check(), and v21RxSt3Init().

int dpu_v21_check | ( | dpu_v21_dec_t * | inst,
 |  | Fract * | input,
 |  | int | samp,
 |  | Fract * | output,
 |  | Fract * | n
 | ) |  |

Definition at line 229 of file dpu_fsk.c.

References dpu_v21_dec(), DPU_V21_FALSE, DPU_V21_TRUE, and dpu_v21_dec_t::pattern.

Referenced by v21RxSt1Init().

Here is the call graph for this function:

int dpu_v21_check_high | ( | dpu_v21_dec_t * | inst,
 |  | Fract * | input,
 |  | int | samp,
 |  | Fract * | output,
 |  | Fract * | n
 | ) |  |

Definition at line 252 of file dpu_fsk.c.

References dpu_v21_dec_t::count, dpu_v21_dec_t::cross_count, DPU_FSK_FREQ_DOWN_LIMIT, DPU_FSK_FREQ_UP_LIMIT, DPU_V21_FALSE, and dpu_v21_dec_t::pre_sample.

Referenced by rxLSinitInHS().

void dpu_v21_dec_init | ( | dpu_v21_dec_t * | inst,
 |  | int | samp_req
 | ) |  |

Definition at line 313 of file dpu_fsk.c.

References dpu_v21_dec_t::count, dpu_v21_dec_t::cross_count, dpu_v21_dec_t::pattern, dpu_v21_dec_t::pre_sample, dpu_v21_dec_t::samp_req, and dpu_v21_dec_t::start.

Referenced by v21RxCommonInit().

Variable Documentation

const Fract dpu_v21_freq_h_table[2]

Initial value:

{
  (Fract)(0.25694445*FREQ_SCALE),
  (Fract)(0.22916667*FREQ_SCALE)
}

Definition at line 73 of file dpu_fsk.c.


FM: dpu_fsk.c Source File

dpu_fsk.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE:  V21 FSK TX
00003  ******************************************************************************
00004  * FILE NAME: dpu_fsk.c
00005  *
00006  * DESCRIPTION: DPU V21 FSK TX
00007
00008  *
00009  * TABS: NONE
00010  *
00011  * $Id: DPU_FSK.C 1.13 2000/03/21 20:13:18 jwright Exp $
00012  *
00013  * REVISION HISTORY:
00014  *
00015  * $Log: DPU_FSK.C $
00016  * Revision 1.13  2000/03/21 20:13:18  jwright
00017  * Clean up 3.50 compile warnings.
00018  * Revision 1.12  1999/04/01 10:48:21  sakhtar
00019  * Remove V21 L const buffer
00020  * Revision 1.11  1999/03/11 11:35:48  sakhtar
00021  * Modified API to change the type of a parameter to const *
00022  * Revision 1.10  1998/01/30 14:32:11  PPATEL
00023  *  Fix for the BRAF problem
00024  * Revision 1.9  1997/12/10 00:23:39  PPATEL
00025  *  utlSin used for sine computation
00026  * Revision 1.8  1997/11/28 21:58:37  PPATEL
00027  *  Using sine and cos through polynomial implementation
00028  * Revision 1.7  1997/09/26 16:40:18  PPATEL
00029  *   Sine by polynomial implementation didn't work properly, so we restored
00030  * back to table lookup but in a cleaner way
00031  * Revision 1.6  1997/09/16 23:23:23  PPATEL
00032  *   Merged changes from clean customer build on Sept 16th; this includes
00033  * the new dpu_v21_check routine which was causing all the trouble.
00034  * Revision 1.5  1997/09/05 17:56:06  PPATEL
00035  *    Changes made for sin/cos using polynomial
00036  * Revision 1.4  1997/09/03 17:29:52  PPATEL
00037  *    changed C542 to C54x for C548 compatibility
00038  * Revision 1.3  1997/05/18 12:32:15  Zoran
00039  *   Cleaned version
00040  * Revision 1.1  1997/02/06 08:52:56  unknown
00041  * Initial revision
00042  *
00043  * (C) Copyright 1996, TELOGY Networks, Inc.
00044  *****************************************************************************/
00045 #include "dpumath.h"
00046 #include "dpu_tgt.h"
00047 #include <stdlib.h>
00048 #ifdef PC
00049 #include <stdio.h>
00050 #include <math.h>
00051 #endif
00052 #include <ti/mas/types/types.h>
00053 #include <ti/mas/fract/fract.h>
00054 #include "dpu_fsk.h"
00055 #include "fmprag.h"
00056
00057 #ifdef BRAF_BUG
00058 #include "utilnum.h"
00059 #endif
00060
00061
00062
00063
00064
00065
00066
00067 #define DPU_FSK_REQ_COUNT          2   /* 3 */
00068 #define DPU_FSK_FREQ_UP_LIMIT      150
00069 #define DPU_FSK_FREQ_DOWN_LIMIT    -DPU_FSK_FREQ_UP_LIMIT
00070 #define DPU_FSK_FREQ_LOW_LIMIT     55
00071 #define DPU_FSK_FREQ_HIGH_LIMIT    -DPU_FSK_FREQ_LOW_LIMIT
00072
00073 const Fract dpu_v21_freq_h_table[2]=
00074 {
00075   (Fract)(0.25694445*FREQ_SCALE),   /* 1850/7200  for bit 0 */
00076   (Fract)(0.22916667*FREQ_SCALE)    /* 1650/7200 for bit 1 */
00077 };
00078
00079 /******************************************************************************
00080  * FUNCTION PURPOSE: dpu V21 FSK TX generation
00081  ******************************************************************************
00082  * DESCRIPTION: dpu V21 FSK TX generation
00083  *
00084  *****************************************************************************/
00085  void dpu_v21_fsk_gen( dpu_fsk_gen_t *inst, Fract input_bits, Fract samp,
00086                       Fract *output, int n)
00087  {
00088     Fract freq;
00089     int n1 = samp*n, j;
00090
00091 #ifdef PC
00092   static FILE *fp1;               /* file pointer */
00093   static int i=0;
00094
00095 /*  if (i==0) fp1 = fopen("test16.dat","w");    */
00096   i++;
00097 #endif
00098
00099   input_bits &= inst->mask;
00100   freq = inst->freq_table[input_bits];
00101   for (j=n1; j<n1+samp; j++)
00102   {
00103     inst->phase += freq;
00104
00105   #if 1
00106     output[j] = utlSin((Fract)((Fract)16384-inst->phase));
00107   #else
00108     output[j] = cos(2*3.14159*inst->phase);      /* 1 */
00109   #endif
00110
00111 #ifdef PC
00112  /* fprintf(fp1, "FSK gen %d output=%f bit=%d f=%f %f %f\n",
00113       j, output[j], input_bits, freq,inst->freq_table[0],inst->freq_table[1] );
00114   */
00115 #endif
00116   }
00117
00118  }
00119
00120 /******************************************************************************
00121  * FUNCTION PURPOSE: initialize DPU FSK generator
00122  ******************************************************************************
00123  * DESCRIPTION: initialize DPU FSK generator
00124  *
00125  *****************************************************************************/
00126  void dpu_fsk_gen_init(dpu_fsk_gen_t *inst,const Fract *freq_table, tuint mask)
00127  {
00128
00129     inst->freq_table = freq_table;
00130     inst->phase = 0;
00131     inst->mask = mask;
00132
00133  }
00134
00135 /******************************************************************************
00136  * FUNCTION PURPOSE: dpu V21 FSK RX decoder
00137  ******************************************************************************
00138  * DESCRIPTION: dpu V21 FSK RX decoder
00139  *
00140  *****************************************************************************/
00141 int dpu_v21_dec( dpu_v21_dec_t *inst, Fract *input, int samp,
00142                       Fract *output, Fract *n)
00143  {
00144     Fract tmp;
00145     int  j, count = 0;
00146     int  samp_half = (samp >>1);
00147
00148   inst->start -= samp;
00149   inst->cross_count ++;
00150   tmp = input[0] ^ inst->pre_sample;
00151 /*  tmp = input[0] * inst->pre_sample; */
00152   if (tmp < 0)
00153   {
00154     if (inst->cross_count < 24)
00155     return(DPU_V21_FALSE);
00156
00157     inst->cross_count = 0;
00158     inst->start = 0;
00159   }
00160   inst->pre_sample = input[samp-1];
00161
00162   for (j=1; j<samp; j++)
00163   {
00164 #ifdef BRAF_BUG
00165      utlDummy();
00166 #endif
00167      if (input[j] < DPU_FSK_FREQ_DOWN_LIMIT
00168          || input[j] > DPU_FSK_FREQ_UP_LIMIT)
00169      {
00170         return(DPU_V21_FALSE);
00171
00172      }
00173      inst->cross_count ++;
00174      tmp = input[j] ^ input[j-1];
00175 /*     tmp = input[j] * input[j-1];*/
00176      if (tmp < 0)
00177      {
00178        if (inst->cross_count < 24)
00179        return(DPU_V21_FALSE);
00180        inst->cross_count = 0;
00181        if ((j-inst->start) > (samp_half+1))    /* 17 */              /* 18 */
00182        {
00183          if (j >=2)
00184          {
00185           if (input[j-2]>0)
00186           {
00187             output[count++] = 0;  /* 2 */
00188       inst->pattern <<=1;
00189           }
00190           else
00191           {
00192             output[count++] = 1;
00193       inst->pattern <<=1;
00194       inst->pattern +=1;
00195       }
00196      }
00197        }
00198        inst->start = j;
00199      }
00200
00201   }
00202   if ((samp-inst->start) > (samp_half-1))    /* 15 */
00203   {
00204      if (input[samp-2]>0)
00205      {
00206      output[count++] = 0;     /* 2 */
00207    inst->pattern <<= 1;
00208    }
00209      else
00210      {
00211      output[count++] = 1;
00212      inst->pattern <<= 1;
00213    inst->pattern += 1;
00214      }
00215      inst->start += samp;
00216   }
00217   *n = count;
00218
00219   return(DPU_V21_TRUE);
00220
00221  }
00222
00223 /******************************************************************************
00224  * FUNCTION PURPOSE: dpu V21 FSK RX checker
00225  ******************************************************************************
00226  * DESCRIPTION: dpu V21 FSK RX checker
00227  *
00228  *****************************************************************************/
00229  int dpu_v21_check( dpu_v21_dec_t *inst, Fract *input, int samp,
00230                       Fract *output, Fract *n)
00231  {
00232     int status;
00233
00234     status =  dpu_v21_dec( inst, input, samp, output, n);
00235
00236   if (status == DPU_V21_FALSE)
00237   {
00238     return(DPU_V21_FALSE);
00239   }
00240
00241   /* status is now DPU_V21_TRUE */
00242   if ((inst->pattern & 0xffff) == 0x7e7e) return(DPU_V21_TRUE);
00243   return(DPU_V21_FALSE);
00244  }
00245
00246 /******************************************************************************
00247  * FUNCTION PURPOSE: dpu V21 FSK RX checker in high speed modem
00248  ******************************************************************************
00249  * DESCRIPTION: dpu V21 FSK RX checker in high speed modem
00250  *
00251  *****************************************************************************/
00252  int dpu_v21_check_high(dpu_v21_dec_t *inst, Fract *input, int samp,
00253                       Fract *output, Fract *n)
00254  {
00255   Fract tmp;
00256   int  j, samp_1 = samp - 1;
00257
00258   inst->cross_count ++;
00259
00260   tmp = input[0]^inst->pre_sample;
00261   if (tmp < 0)
00262   {
00263     if (inst->cross_count < 24)
00264     {
00265       inst->count = 0;
00266       return(DPU_V21_FALSE);
00267      }
00268     inst->cross_count = 0;
00269     inst->count++;
00270   }
00271   inst->pre_sample = input[samp_1];
00272   for (j=1; j<samp; j++)
00273   {
00274 #ifdef BRAF_BUG
00275      utlDummy();
00276 #endif
00277      if (input[j] < DPU_FSK_FREQ_DOWN_LIMIT ||
00278          input[j] > DPU_FSK_FREQ_UP_LIMIT)
00279      {
00280         inst->count =0;
00281         return(DPU_V21_FALSE);
00282      }
00283
00284      inst->cross_count ++;
00285      tmp = input[j] ^ input[j-1];
00286
00287      if (tmp < 0)
00288      {
00289        if (inst->cross_count < 24)
00290        {
00291          inst->count = 0;
00292          return(DPU_V21_FALSE);
00293         }
00294        inst->cross_count = 0;
00295        inst->count++;
00296       }
00297    }
00298
00299   if (inst->count > DPU_FSK_REQ_COUNT)
00300   {
00301     inst->count = 0;
00302     return(DPU_V21_TRUE);
00303   }
00304   else return(DPU_V21_FALSE);
00305  }
00306
00307 /******************************************************************************
00308  * FUNCTION PURPOSE: initialize DPU FSK V21 decoder
00309  ******************************************************************************
00310  * DESCRIPTION: initialize DPU FSK V21 decoder
00311  *
00312  *****************************************************************************/
00313  void dpu_v21_dec_init(dpu_v21_dec_t *inst, int samp_req)
00314  {
00315     inst->count = 0;
00316     inst->pre_sample = 0;
00317     inst->cross_count = 100;
00318     inst->samp_req = samp_req;
00319   inst->pattern = 0;
00320   inst->start = 0;
00321  }
00322
00323  /* nothing after this point */


FM: dpu_fsk.h File Reference

dpu_fsk.h File Reference

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

Include dependency graph for dpu_fsk.h:

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

Go to the source code of this file.

Data Structures

struct | dpu_fsk_gen_t
struct | dpu_v21_dec_t

Defines

#define | DPU_V21_HIGH_CHANNEL 2
#define | DPU_V21_LOW_CHANNEL 1
#define | DPU_V21_TRUE 3
#define | DPU_V21_FALSE 2

Functions

void | dpu_v21_fsk_gen (dpu_fsk_gen_t *inst, Fract input_bits, Fract samp, Fract *output, int index)
void | dpu_fsk_gen_init (dpu_fsk_gen_t *inst, const Fract *freq, tuint mask)
int | dpu_v21_check (dpu_v21_dec_t *inst, Fract *input, int samp, Fract *output, Fract *n)
int | dpu_v21_check_high (dpu_v21_dec_t *inst, Fract *input, int samp, Fract *output, Fract *n)
int | dpu_v21_dec (dpu_v21_dec_t *inst, Fract *input, int samp, Fract *output, Fract *n)
void | dpu_v21_dec_init (dpu_v21_dec_t *inst, int samp_req)

Define Documentation

#define DPU_V21_HIGH_CHANNEL 2

Definition at line 34 of file dpu_fsk.h.

#define DPU_V21_LOW_CHANNEL 1

Definition at line 35 of file dpu_fsk.h.

#define DPU_V21_TRUE 3

Definition at line 36 of file dpu_fsk.h.

#define DPU_V21_FALSE 2

Definition at line 37 of file dpu_fsk.h.

Referenced by dpu_v21_check(), dpu_v21_check_high(), dpu_v21_dec(), rxLSinitInHS(), and v21RxStM().

Function Documentation

void dpu_v21_fsk_gen | ( | dpu_fsk_gen_t * | inst,
 |  | Fract | input_bits,
 |  | Fract | samp,
 |  | Fract * | output,
 |  | int | index
 | ) |  |

Definition at line 85 of file dpu_fsk.c.

References dpu_fsk_gen_t::freq_table, dpu_fsk_gen_t::mask, and dpu_fsk_gen_t::phase.

Referenced by vxx_tx_init().

void dpu_fsk_gen_init | ( | dpu_fsk_gen_t * | inst,
 |  | const Fract * | freq,
 |  | tuint | mask
 | ) |  |

Definition at line 126 of file dpu_fsk.c.

References dpu_fsk_gen_t::freq_table, dpu_fsk_gen_t::mask, and dpu_fsk_gen_t::phase.

Referenced by vxx_tx_init().

int dpu_v21_check | ( | dpu_v21_dec_t * | inst,
 |  | Fract * | input,
 |  | int | samp,
 |  | Fract * | output,
 |  | Fract * | n
 | ) |  |

Definition at line 229 of file dpu_fsk.c.

References dpu_v21_dec(), DPU_V21_FALSE, DPU_V21_TRUE, and dpu_v21_dec_t::pattern.

Referenced by v21RxSt1Init().

Here is the call graph for this function:

int dpu_v21_check_high | ( | dpu_v21_dec_t * | inst,
 |  | Fract * | input,
 |  | int | samp,
 |  | Fract * | output,
 |  | Fract * | n
 | ) |  |

Definition at line 252 of file dpu_fsk.c.

References dpu_v21_dec_t::count, dpu_v21_dec_t::cross_count, DPU_FSK_FREQ_DOWN_LIMIT, DPU_FSK_FREQ_UP_LIMIT, DPU_V21_FALSE, and dpu_v21_dec_t::pre_sample.

Referenced by rxLSinitInHS().

int dpu_v21_dec | ( | dpu_v21_dec_t * | inst,
 |  | Fract * | input,
 |  | int | samp,
 |  | Fract * | output,
 |  | Fract * | n
 | ) |  |

Definition at line 141 of file dpu_fsk.c.

References dpu_v21_dec_t::cross_count, DPU_FSK_FREQ_DOWN_LIMIT, DPU_FSK_FREQ_UP_LIMIT, DPU_V21_FALSE, dpu_v21_dec_t::pattern, dpu_v21_dec_t::pre_sample, and dpu_v21_dec_t::start.

Referenced by dpu_v21_check(), and v21RxSt3Init().

void dpu_v21_dec_init | ( | dpu_v21_dec_t * | inst,
 |  | int | samp_req
 | ) |  |

Definition at line 313 of file dpu_fsk.c.

References dpu_v21_dec_t::count, dpu_v21_dec_t::cross_count, dpu_v21_dec_t::pattern, dpu_v21_dec_t::pre_sample, dpu_v21_dec_t::samp_req, and dpu_v21_dec_t::start.

Referenced by v21RxCommonInit().


FM: dpu_fsk.h Source File

dpu_fsk.h

Go to the documentation of this file.
00001 #ifndef _DPU_FSK_H
00002 #define _DPU_FSK_H
00003
00004 /******************************************************************************
00005  * FILE PURPOSE:  header file of V21 FSK TX
00006  ******************************************************************************
00007  * FILE NAME: dpu_fsk.h
00008  *
00009  * DESCRIPTION: header file of V21 FSK TX
00010  *
00011  * TABS: NONE
00012  *
00013  * $Id: DPU_FSK.H 1.6 1999/03/11 11:35:43 sakhtar Exp $
00014  *
00015  * REVISION HISTORY:
00016  *
00017  * $Log: DPU_FSK.H $
00018  * Revision 1.6  1999/03/11 11:35:43  sakhtar
00019  * Modified API to change the type of a parameter to const *
00020  * Revision 1.5  1997/09/16 23:25:54  PPATEL
00021  *  Merged changes from clean customer build on sept 16th.
00022  * Revision 1.4  1997/09/05 17:56:54  PPATEL
00023  *    Removed fract.h
00024  * Revision 1.3  1997/05/18 12:48:22  Zoran
00025  *   Cleaned, updated code
00026  * Revision 1.1  1997/02/06 08:54:08  unknown
00027  * Initial revision
00028  *
00029  * (C) Copyright 1996, TELOGY Networks, Inc.
00030  *****************************************************************************/
00031 #include <ti/mas/types/types.h>
00032 #include "dpu_tgt.h"
00033
00034 #define  DPU_V21_HIGH_CHANNEL 2
00035 #define  DPU_V21_LOW_CHANNEL  1
00036 #define  DPU_V21_TRUE 3
00037 #define  DPU_V21_FALSE 2
00038
00039 typedef struct
00040 {
00041  Fract phase;
00042  tuint mask;
00043  const Fract *freq_table;
00044 } dpu_fsk_gen_t;
00045
00046 typedef struct
00047 {
00048  int   count;
00049  int   cross_count;
00050  int   start;
00051  int   samp_req;
00052  Fract pre_sample;
00053  Fract pattern;
00054 } dpu_v21_dec_t;
00055
00056 /*  FSK generator API */
00057
00058 void dpu_v21_fsk_gen(dpu_fsk_gen_t *inst, Fract input_bits, Fract samp,
00059                       Fract *output, int index);
00060
00061 void dpu_fsk_gen_init(dpu_fsk_gen_t *inst,const Fract *freq, tuint mask);
00062
00063 /* V21 RX checker/decoder API */
00064 int dpu_v21_check( dpu_v21_dec_t *inst, Fract *input, int samp,
00065                       Fract *output, Fract *n);
00066
00067 int dpu_v21_check_high( dpu_v21_dec_t *inst, Fract *input, int samp,
00068                       Fract *output, Fract *n);
00069
00070 int dpu_v21_dec( dpu_v21_dec_t *inst, Fract *input, int samp,
00071                       Fract *output, Fract *n);
00072
00073 void dpu_v21_dec_init(dpu_v21_dec_t *inst, int samp_req);
00074
00075 #endif  /* _DPU_MOD_H */
00076 /* nothing past this point */


FM: dpu_gain.c File Reference

dpu_gain.c File Reference

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

Include dependency graph for dpu_gain.c:

Go to the source code of this file.

Variables

Fract dpu_gain_cst [16]

Variable Documentation

Fract dpu_gain_cst[16]

Initial value:

 {
 (Fract)(0.707946*INTERP_CONST_SCALE),
 (Fract)(0.630957*INTERP_CONST_SCALE),
 (Fract)(0.562341*INTERP_CONST_SCALE),
 (Fract)(0.501187*INTERP_CONST_SCALE),
 (Fract)(0.446684*INTERP_CONST_SCALE),
 (Fract)(0.398107*INTERP_CONST_SCALE),
 (Fract)(0.354813*INTERP_CONST_SCALE),
 (Fract)(0.316228*INTERP_CONST_SCALE),
 (Fract)(0.281838*INTERP_CONST_SCALE),
 (Fract)(0.251189*INTERP_CONST_SCALE),
 (Fract)(0.223872*INTERP_CONST_SCALE),
 (Fract)(0.199526*INTERP_CONST_SCALE),
 (Fract)(0.177828*INTERP_CONST_SCALE),
 (Fract)(0.158489*INTERP_CONST_SCALE),
 (Fract)(0.141254*INTERP_CONST_SCALE),
 (Fract)(0.125893*INTERP_CONST_SCALE),
 }

Definition at line 28 of file dpu_gain.c.

Referenced by vxx_tx_init().


FM: dpu_gain.c Source File

dpu_gain.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE:
00003  ******************************************************************************
00004  * FILE NAME:
00005  *
00006  * DESCRIPTION:
00007  *
00008  * TABS: NONE
00009  *
00010  * $Id: DPU_GAIN.C 1.3 2000/03/21 20:07:56 jwright Exp $
00011  *
00012  * REVISION HISTORY:
00013  *
00014  * $Log: DPU_GAIN.C $
00015  * Revision 1.3  2000/03/21 20:07:56  jwright
00016  * Clean up 3.50 compile warning.
00017  * Revision 1.2  1997/09/16 23:28:47  PPATEL
00018  *  New table for tx level programmability from 0 dbm to -15 dbm
00019  *
00020  * (C) Copyright 1997, TELOGY Networks, Inc.
00021  *****************************************************************************/
00022
00023 #include <ti/mas/types/types.h>
00024 #include "dpu_tgt.h"
00025
00026 /* gain multiplications corresponding to 0 dBm to -15 dBm */
00027 /* Formula used for computing = 0.707946 * 10^(dbm/20) */
00028 Fract dpu_gain_cst[16] =
00029  {
00030 /* Level  0  */ (Fract)(0.707946*INTERP_CONST_SCALE),
00031 /* Level -1  */ (Fract)(0.630957*INTERP_CONST_SCALE),
00032 /* Level -2  */ (Fract)(0.562341*INTERP_CONST_SCALE),
00033 /* Level -3  */ (Fract)(0.501187*INTERP_CONST_SCALE),
00034 /* Level -4  */ (Fract)(0.446684*INTERP_CONST_SCALE),
00035 /* Level -5  */ (Fract)(0.398107*INTERP_CONST_SCALE),
00036 /* Level -6  */ (Fract)(0.354813*INTERP_CONST_SCALE),
00037 /* Level -7  */ (Fract)(0.316228*INTERP_CONST_SCALE),
00038 /* Level -8  */ (Fract)(0.281838*INTERP_CONST_SCALE),
00039 /* Level -9  */ (Fract)(0.251189*INTERP_CONST_SCALE),
00040 /* Level -10 */ (Fract)(0.223872*INTERP_CONST_SCALE),
00041 /* Level -11 */ (Fract)(0.199526*INTERP_CONST_SCALE),
00042 /* Level -12 */ (Fract)(0.177828*INTERP_CONST_SCALE),
00043 /* Level -13 */ (Fract)(0.158489*INTERP_CONST_SCALE),
00044 /* Level -14 */ (Fract)(0.141254*INTERP_CONST_SCALE),
00045 /* Level -15 */ (Fract)(0.125893*INTERP_CONST_SCALE),
00046  };
00047
00048  /* nothing after this point */


FM: dpu_hilb.c File Reference

dpu_hilb.c File Reference

#include <ti/mas/types/types.h>
#include <ti/mas/fract/fract.h>
#include "dpumath.h"
#include "dpu_hilb.h"

Include dependency graph for dpu_hilb.c:

Go to the source code of this file.

Functions

void dpu_bp_hilb_init (dpu_bphilb_t *inst, int L1, int length, const Fract *bp_filt, const Fract *bp_hilt_filt)

Function Documentation

void dpu_bp_hilb_init | ( | dpu_bphilb_t * | inst,
 |  | int | L1,
 |  | int | length,
 |  | const Fract * | bp_filt,
 |  | const Fract * | bp_hilt_filt
 | ) |  |

Definition at line 44 of file dpu_hilb.c.

References dpu_bphilb_t::bp_filt, dpu_bphilb_t::bp_hilt_filt, dpu_bphilb_t::delay, DPU_HILB_LEN, dpu_bphilb_t::L1, and dpu_bphilb_t::length.

Referenced by v21RxCommonInit(), v27RxSt1Init(), and v29RxSt1Init().


FM: dpu_hilb.c Source File

dpu_hilb.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: DPU RX Band Pass Hilbert transformer
00003  ******************************************************************************
00004  * FILE NAME: dpu_hilb.c
00005  *
00006  * DESCRIPTION:  DPU RX Band Pass Hilbert transformer
00007  *
00008  * TABS: NONE
00009  *
00010  * $Id: DPU_HILB.C 1.7 1999/03/01 14:14:39 sakhtar Exp $
00011  *
00012  * REVISION HISTORY:
00013  *
00014  * $Log: DPU_HILB.C $
00015  * Revision 1.7  1999/03/01 14:14:39  sakhtar
00016  * Removed dpu_bp_hilb_v21() since it was the same as
00017  * dpu_bp_hilb().
00018  * Revision 1.6  1997/11/21 15:20:50  PPATEL
00019  *  Main receive routine moved to hilbrx.c for multi-channel fax build for
00020  * GG 3.0
00021  * Revision 1.5  1997/09/05 17:58:18  PPATEL
00022  *    Inclusion of types.h and fract.h
00023  * Revision 1.4  1997/05/19 15:56:23  Zoran
00024  *   Checked oin, 1.3 is the same as 1.2
00025  * Revision 1.1  1997/02/06 08:56:56  unknown
00026  * Initial revision
00027  *
00028  * (C) Copyright 1997, TELOGY Networks, Inc.
00029  *****************************************************************************/
00030 #include <ti/mas/types/types.h>
00031 #include <ti/mas/fract/fract.h>
00032
00033 #include "dpumath.h"   /* for convolution */
00034 #include "dpu_hilb.h"
00035
00036
00037  /******************************************************************************
00038  * FUNCTION PURPOSE:  b-pass Hilbert transformer initialize
00039  ******************************************************************************
00040  * DESCRIPTION: b-pass Hilbert transformer initialize
00041  *
00042  *****************************************************************************/
00043
00044 void dpu_bp_hilb_init (dpu_bphilb_t *inst, int L1, int length,
00045                        const Fract *bp_filt, const Fract *bp_hilt_filt)
00046 {
00047     int i;
00048
00049     inst->L1=L1;
00050     inst->length = length;
00051     inst->bp_filt=bp_filt;
00052     inst->bp_hilt_filt=bp_hilt_filt;
00053     for (i=0; i<DPU_HILB_LEN; i++)
00054     {
00055       inst->delay[i]=0;
00056     }
00057 }


FM: dpu_hilb.h File Reference

dpu_hilb.h File Reference

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

Include dependency graph for dpu_hilb.h:

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

Go to the source code of this file.

Data Structures

struct | dpu_bphilb_t

Defines

#define | DPU_HILB_LEN 64 /*52*/ /* 45 */

Functions

void | dpu_bp_hilb_init (dpu_bphilb_t *inst, int L1, int length, const Fract *bp_filt, const Fract *bp_hilt_filt)

Define Documentation

#define DPU_HILB_LEN 64 /*52*/ /* 45 */

Definition at line 36 of file dpu_hilb.h.

Referenced by dpu_bp_hilb_init().

Function Documentation

void dpu_bp_hilb_init | ( | dpu_bphilb_t * | inst,
 |  | int | L1,
 |  | int | length,
 |  | const Fract * | bp_filt,
 |  | const Fract * | bp_hilt_filt
 | ) |  |

Definition at line 44 of file dpu_hilb.c.

References dpu_bphilb_t::bp_filt, dpu_bphilb_t::bp_hilt_filt, dpu_bphilb_t::delay, DPU_HILB_LEN, dpu_bphilb_t::L1, and dpu_bphilb_t::length.

Referenced by v21RxCommonInit(), v27RxSt1Init(), and v29RxSt1Init().


FM: dpu_hilb.h Source File

dpu_hilb.h

Go to the documentation of this file.
00001 #ifndef _DPU_HILB_H
00002 #define _DPU_HILB_H
00003
00004 /******************************************************************************
00005  * FILE PURPOSE:  header file of RX band-pass Hilbert transformer
00006  ******************************************************************************
00007  * FILE NAME: dpu_hilb.h
00008  *
00009  * DESCRIPTION: header file of RX band-pass Hilbert transformer
00010  *
00011  * TABS: NONE
00012  *
00013  * $Id: DPU_HILB.H 1.6 2000/03/21 19:48:14 jwright Exp $
00014  *
00015  * REVISION HISTORY:
00016  *
00017  * $Log: DPU_HILB.H $
00018  * Revision 1.6  2000/03/21 19:48:14  jwright
00019  * Clean up 3.50 compile warning.
00020  * Revision 1.5  1999/03/01 14:18:49  sakhtar
00021  * Modified to remove dpu_bp_hilb_v21() since it is the same as
00022  * dpu_bp_hilb().
00023  * Revision 1.4  1997/11/21 15:21:42  PPATEL
00024  *  api transfer to file hilbrx.h for multi-channel build for GG 3.0
00025  * Revision 1.3  1997/09/05 17:59:09  PPATEL
00026  *    Removed fract.h
00027  * Revision 1.2  1997/05/18 12:37:38  Zoran
00028  *  Cleaned code
00029  * Revision 1.1  1997/02/06 08:58:12  unknown
00030  * Initial revision
00031  *
00032  * (C) Copyright 1996, TELOGY Networks, Inc.
00033  *****************************************************************************/
00034 #include <ti/mas/types/types.h>
00035
00036 #define DPU_HILB_LEN  64  /*52*/   /* 45 */   /* Hilbert transformer raps */
00037
00038 typedef struct
00039 {
00040  int L1;              /* samp_per_baud/2, or 1  */
00041  int length;          /* filter length */
00042  const Fract *bp_filt;      /* pointer to band-pass filter for real sig. */
00043  const Fract *bp_hilt_filt; /* pointer to bp Hilbert filter for imag. sig. */
00044  Fract *delay;        /* input data delay line  */
00045 } dpu_bphilb_t;
00046
00047
00048 void dpu_bp_hilb_init(dpu_bphilb_t *inst, int L1, int length,
00049                       const Fract *bp_filt, const Fract *bp_hilt_filt);
00050
00051 #endif  /* _DPU_HILB_H */
00052 /* nothing past this point */


FM: dpu_intp.h File Reference

dpu_intp.h File Reference

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

Include dependency graph for dpu_intp.h:

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

Go to the source code of this file.

Data Structures

struct | dpu_interp_t

Defines

#define | DPU_MAX_M_COEF 50
#define | DPU_MAX_M (DPU_MAX_M_COEF+200)
#define | DPU_INTP_96_80_INDEX 0
#define | DPU_INTP_72_80_INDEX 1
#define | DPU_INTP_80_96_INDEX 2
#define | DPU_INTP_96_80_FILT_SIZE 42
#define | DPU_INTP_72_80_FILT_SIZE 39
#define | DPU_INTP_80_96_FILT_SIZE 38

Functions

int | dpu_interp (dpu_interp_t *inst, Fract *input, Fract *output, int length)
void | dpu_interp_output (dpu_interp_t *inst, Fract *output, int length)

Define Documentation

#define DPU_MAX_M_COEF 50

Definition at line 47 of file dpu_intp.h.

#define DPU_MAX_M (DPU_MAX_M_COEF+200)

Definition at line 48 of file dpu_intp.h.

Referenced by dpu_interp_init().

#define DPU_INTP_96_80_INDEX 0

Definition at line 52 of file dpu_intp.h.

Referenced by dpu_interp_init(), and vxx_tx_init().

#define DPU_INTP_72_80_INDEX 1

Definition at line 53 of file dpu_intp.h.

Referenced by dpu_interp_init(), and vxx_tx_init().

#define DPU_INTP_80_96_INDEX 2

Definition at line 54 of file dpu_intp.h.

Referenced by dpu_interp_init(), v21RxStNULLInit(), v27RxSt1Init(), and v29RxSt1Init().

#define DPU_INTP_96_80_FILT_SIZE 42

Definition at line 56 of file dpu_intp.h.

#define DPU_INTP_72_80_FILT_SIZE 39

Definition at line 57 of file dpu_intp.h.

#define DPU_INTP_80_96_FILT_SIZE 38

Definition at line 58 of file dpu_intp.h.

Function Documentation

int dpu_interp | ( | dpu_interp_t * | inst,
 |  | Fract * | input,
 |  | Fract * | output,
 |  | int | length
 | ) |  |

Definition at line 49 of file interp.c.

References convoluI(), dpu_interp_output(), dpu_interp_t::filter, dpu_interp_t::index_tab, dpu_interp_t::L1, dpu_interp_t::L2, dpu_interp_t::length, dpu_interp_t::oldin, and shift_data().

Referenced by dpu_rx_v21_init(), HSrxCommonSt1Init(), and vxx_tx_init().

Here is the call graph for this function:

void dpu_interp_output | ( | dpu_interp_t * | inst,
 |  | Fract * | output,
 |  | int | length
 | ) |  |

Definition at line 102 of file dpu_fir.c.

References convoluI(), dpu_interp_t::filter, dpu_interp_t::index_tab, dpu_interp_t::L1, dpu_interp_t::L2, dpu_interp_t::length, and dpu_interp_t::oldin.

Referenced by dpu_interp().

Here is the call graph for this function:


FM: dpu_intp.h Source File

dpu_intp.h

Go to the documentation of this file.
00001 #ifndef _DPU_INTP_H
00002 #define _DPU_INTP_H
00003
00004 /******************************************************************************
00005  * FILE PURPOSE:
00006  ******************************************************************************
00007  * FILE NAME:
00008  *
00009  * DESCRIPTION:
00010  *
00011  * TABS: NONE
00012  *
00013  * $Id: DPU_INTP.H 1.6 1998/07/18 13:32:25 ppatel Exp $
00014  *
00015  * REVISION HISTORY:
00016  *
00017  * $Log: DPU_INTP.H $
00018  * Revision 1.6  1998/07/18 13:32:25  ppatel
00019  *  New interpolation filter bank for 8KHz to 9.6KHz conversion; the interpolation
00020  * redesigned to be bandlimited from 300 Hz to 3729 Hz
00021  * (previous filter was allowing d.c. which was causing the lucent switch problem)
00022  * Revision 1.5  1998/05/20 17:31:27  ppatel
00023  *  Redefined interpolation constant type as a two dimensional array to
00024  * avoid wasting extra words (previously, the structure was sized with
00025  * worst case filter size) and related changes
00026  * Revision 1.4  1997/11/21 15:28:36  PPATEL
00027  *  The interpolator delay line was undersized. The problem could not be
00028  * detected in the old code because everything was malloc(ed) and since
00029  * the interpolator for tx was followed by rx data (which was overwritten because
00030  * of undersized tx delay line for 4800 transmit for 80-96 conversion),
00031  * While testing for multi-channel build on @small and tiger, the problem
00032  * was noticed because of the break up of the tx followed by rx (in the
00033  * multi-channel build, the tx interpolator data is followed by tx shaping
00034  * data which when overwritten, resulted in tx crash for 4800 bps rate).
00035  * The max samples per segment of 20 ms is for 9600 Hz  and is 192.
00036  * We keep the size to 200 for safety.
00037  * Revision 1.3  1997/09/05 18:01:49  PPATEL
00038  * Revision 1.2  1997/05/18 12:37:56  Zoran
00039  *   Cleaned code
00040  * Revision 1.1  1997/02/06 08:59:47  unknown
00041  * Initial revision
00042  *
00043  * (C) Copyright 1996, TELOGY Networks, Inc.
00044  *****************************************************************************/
00045 #include <ti/mas/types/types.h>
00046
00047 #define DPU_MAX_M_COEF   50
00048 #define DPU_MAX_M        (DPU_MAX_M_COEF+200)
00049
00050 /* Indexes for initialization table */
00051 /* See table "interp_table" in interp.c */
00052 #define DPU_INTP_96_80_INDEX 0
00053 #define DPU_INTP_72_80_INDEX 1
00054 #define DPU_INTP_80_96_INDEX 2
00055
00056 #define DPU_INTP_96_80_FILT_SIZE   42
00057 #define DPU_INTP_72_80_FILT_SIZE   39
00058 #define DPU_INTP_80_96_FILT_SIZE   38
00059
00060 typedef struct
00061 {
00062  Fract               L1;
00063  Fract               L2;
00064  Fract               length;
00065  Fract               *index_tab;
00066  Fract               *filter;   /* two dimensional filter array as a single dimensional
00067                                  array */
00068  Fract             *oldin;
00069 } dpu_interp_t;
00070
00071 int  dpu_interp(dpu_interp_t *inst, Fract *input, Fract *output, int length);
00072
00073 /* Interp API */
00074 void dpu_interp_output( dpu_interp_t *inst, Fract *output,int length);
00075
00076 #endif  /* _DPU_INTP_H */
00077 /* nothing past this point */


FM: dpu_mod.c File Reference

dpu_mod.c File Reference

#include <ti/mas/types/types.h>
#include <ti/mas/fract/fract.h>
#include "dpu_mod.h"
#include "dpumath.h"

Include dependency graph for dpu_mod.c:

Go to the source code of this file.

Functions

void | dpu_un_modulate (dpu_mod_t *inst, Fract *x_re, Fract *y_im)
void | dpu_tx_mod (dpu_mod_t *inst, Fract *x_re, Fract *y_im)
void | dpu_mod_init (dpu_mod_t *inst, Fract freq)

Function Documentation

void dpu_un_modulate | ( | dpu_mod_t * | inst,
 |  | Fract * | x_re,
 |  | Fract * | y_im
 | ) |  |

Definition at line 53 of file dpu_mod.c.

References dpu_mod_t::freq, INTERP_CONST_SCALE, and dpu_mod_t::phase.

Referenced by vxx_tx_init().

void dpu_tx_mod | ( | dpu_mod_t * | inst,
 |  | Fract * | x_re,
 |  | Fract * | y_im
 | ) |  |

Definition at line 67 of file dpu_mod.c.

References dpu_mod_t::freq, and dpu_mod_t::phase.

Referenced by v27TxSt2Init(), and v29TxSt1Init().

void dpu_mod_init | ( | dpu_mod_t * | inst,
 |  | Fract | freq
 | ) |  |

Definition at line 86 of file dpu_mod.c.

References dpu_mod_t::freq, and dpu_mod_t::phase.

Referenced by v29TxSt1Init(), and vxx_tx_init().


FM: dpu_mod.c Source File

dpu_mod.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE:  DPU modulator
00003  ******************************************************************************
00004  * FILE NAME: dpu_mod.c
00005  *
00006  * DESCRIPTION: DPU modulator
00007
00008  *
00009  * TABS: NONE
00010  *
00011  * $Id: DPU_MOD.C 1.11 2000/03/21 20:00:53 jwright Exp $
00012  *
00013  * REVISION HISTORY:
00014  *
00015  * $Log: DPU_MOD.C $
00016  * Revision 1.11  2000/03/21 20:00:53  jwright
00017  * Clean up 3.50 compile warnings.
00018  * Revision 1.10  1999/04/05 13:22:36  sakhtar
00019  * Optimized
00020  * Revision 1.9  1997/12/10 00:24:13  PPATEL
00021  *  utlSin used for sine computation
00022  * Revision 1.8  1997/11/28 22:01:10  PPATEL
00023  *  Using sin and cosine through polynomial implementation
00024  * Revision 1.7  1997/10/17 13:53:27  PPATEL
00025  *  Tried to circumvent a C compiler bug by changing the dpu_un_modulate
00026  * routine
00027  * Revision 1.6  1997/09/26 16:41:24  PPATEL
00028  *   Sine implementation through polynomial didn't work properly, so we
00029  * reverted back to table lookup but in a clean way
00030  * Revision 1.5  1997/09/05 18:03:57  PPATEL
00031  *    Changes for sin/cos polynomial implementation usage
00032  * Revision 1.4  1997/05/18 12:04:54  Zoran
00033  *    Sine table dependent variables are moved to dpuport.h
00034  * Revision 1.2  1997/02/19 18:34:55  H.T.Li
00035  * Revision 1.1  1997/02/06 09:01:14  unknown
00036  * Initial revision
00037  *
00038  * (C) Copyright 1997, TELOGY Networks, Inc.
00039  *****************************************************************************/
00040
00041 #include <ti/mas/types/types.h>
00042 #include <ti/mas/fract/fract.h>
00043
00044 #include "dpu_mod.h"
00045 #include "dpumath.h"
00046
00047 /******************************************************************************
00048  * FUNCTION PURPOSE: dpu modulator for v27 unmod. carrier state
00049  ******************************************************************************
00050  * DESCRIPTION: dpu modulator for v27 unmod. carrier state
00051  *
00052  *****************************************************************************/
00053 void dpu_un_modulate( dpu_mod_t *inst, Fract *x_re, Fract *y_im)
00054 {
00055     *x_re=frctLF2F(frctMul(((Fract) (1*INTERP_CONST_SCALE)-1), 14, utlSin((Fract)((Fract)16384-inst->phase)), 14, 28), 28, 14);
00056     *y_im=frctLF2F(frctMul(((Fract) (1*INTERP_CONST_SCALE)-1), 14, utlSin(inst->phase), 14, 28), 28, 14);
00057
00058     inst->phase += (inst->freq);
00059 }
00060
00061 /******************************************************************************
00062  * FUNCTION PURPOSE: dpu TX modulation
00063  ******************************************************************************
00064  * DESCRIPTION: dpu carrier recovery
00065  *
00066  *****************************************************************************/
00067 void dpu_tx_mod( dpu_mod_t *inst, Fract *x_re, Fract *y_im)
00068 {
00069     Fract t1=*x_re, t2=*y_im, cos_f, sin_f;
00070
00071     sin_f = utlSin(inst->phase);
00072     cos_f = utlSin((Fract)((Fract)16384-inst->phase));
00073
00074     *x_re=frctLF2F((frctMul(t1, 14, cos_f, 14, 28)-frctMul(t2, 14, sin_f, 14, 28)), 28, 14);
00075     *y_im=frctLF2F((frctMul(t2, 14, cos_f, 14, 28)+frctMul(t1, 14, sin_f, 14, 28)), 28, 14);
00076
00077     inst->phase += (inst->freq);
00078 }
00079
00080 /******************************************************************************
00081  * FUNCTION PURPOSE: initialize DPU modulator
00082  ******************************************************************************
00083  * DESCRIPTION: initialize DPU modulator
00084  *
00085  *****************************************************************************/
00086  void dpu_mod_init(dpu_mod_t *inst, Fract freq)
00087  {
00088     inst->freq = freq;
00089     inst->phase = 0;
00090  }
00091 /* Nothing after this point */
00092
00093


FM: dpu_mod.h File Reference

dpu_mod.h File Reference

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

Include dependency graph for dpu_mod.h:

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

Go to the source code of this file.

Data Structures

struct | dpu_mod_t

Functions

void | dpu_un_modulate (dpu_mod_t *inst, Fract *x_re, Fract *y_im)
void | dpu_tx_mod (dpu_mod_t *inst, Fract *x_re, Fract *y_im)
void | dpu_mod_init (dpu_mod_t *inst, Fract freq)

Variables

Fract | dpu_gain_cst [16]

Function Documentation

void dpu_un_modulate | ( | dpu_mod_t * | inst,
 |  | Fract * | x_re,
 |  | Fract * | y_im
 | ) |  |

Definition at line 53 of file dpu_mod.c.

References dpu_mod_t::freq, INTERP_CONST_SCALE, and dpu_mod_t::phase.

Referenced by vxx_tx_init().

void dpu_tx_mod | ( | dpu_mod_t * | inst,
 |  | Fract * | x_re,
 |  | Fract * | y_im
 | ) |  |

Definition at line 67 of file dpu_mod.c.

References dpu_mod_t::freq, and dpu_mod_t::phase.

Referenced by v27TxSt2Init(), and v29TxSt1Init().

void dpu_mod_init | ( | dpu_mod_t * | inst,
 |  | Fract | freq
 | ) |  |

Definition at line 86 of file dpu_mod.c.

References dpu_mod_t::freq, and dpu_mod_t::phase.

Referenced by v29TxSt1Init(), and vxx_tx_init().

Variable Documentation

Fract dpu_gain_cst[16]

Definition at line 28 of file dpu_gain.c.

Referenced by vxx_tx_init().


FM: dpu_mod.h Source File

dpu_mod.h

Go to the documentation of this file.
00001 #ifndef _DPU_MOD_H
00002 #define _DPU_MOD_H
00003
00004 /******************************************************************************
00005  * FILE PURPOSE:  header file of TX modulator
00006  ******************************************************************************
00007  * FILE NAME: dpu_mod.h
00008  *
00009  * DESCRIPTION: header file of TX modulator
00010  *
00011  * TABS: NONE
00012  *
00013  * $Id: DPU_MOD.H 1.6 2000/03/21 19:33:47 jwright Exp $
00014  *
00015  * REVISION HISTORY:
00016  *
00017  * $Log: DPU_MOD.H $
00018  * Revision 1.6  2000/03/21 19:33:47  jwright
00019  * Clean up 3.50 compile warning.
00020  * Revision 1.5  1997/09/05 18:04:44  PPATEL
00021  *   removal of "fract.h"
00022  * Revision 1.4  1997/05/18 12:38:16  Zoran
00023  *  Cleaned code
00024  * Revision 1.2  1997/02/19 18:35:13  H.T.Li
00025  * Revision 1.1  1997/02/06 09:02:17  unknown
00026  * Initial revision
00027  *
00028  * (C) Copyright 1996, TELOGY Networks, Inc.
00029  *****************************************************************************/
00030 #include <ti/mas/types/types.h>
00031 #include "dpu_tgt.h"
00032
00033 typedef struct
00034 {
00035  Fract freq;
00036  Fract phase;
00037 } dpu_mod_t;
00038
00039 extern Fract dpu_gain_cst[16];
00040
00041 /*  modulator API */
00042
00043 void dpu_un_modulate(dpu_mod_t *inst,
00044                Fract *x_re, Fract *y_im);
00045 void dpu_tx_mod(dpu_mod_t *inst,
00046                Fract *x_re, Fract *y_im);
00047 void dpu_mod_init(dpu_mod_t *inst, Fract freq);
00048
00049 #endif  /* _DPU_MOD_H */
00050 /* nothing past this point */


FM: dpu_phas.c File Reference

dpu_phas.c File Reference

#include <ti/mas/types/types.h>
#include <ti/mas/fract/fract.h>
#include "dpu_tgt.h"
#include "dpu_phas.h"
#include "dpu_crec.h"
#include "dpu_smap.h"

Include dependency graph for dpu_phas.c:

Go to the source code of this file.

Functions

void dpu_phase_init (dpu_phase_t *inst, Fract *v_re, Fract *v_im, Fract div, int number)

Function Documentation

void dpu_phase_init | ( | dpu_phase_t * | inst,
 |  | Fract * | v_re,
 |  | Fract * | v_im,
 |  | Fract | div,
 |  | int | number
 | ) |  |

Definition at line 52 of file dpu_phas.c.

References dpu_phase_t::count, dpu_phase_t::delay_im, dpu_phase_t::delay_re, dpu_phase_t::division, DPU_PHASE_LEN, dpu_phase_t::number, dpu_phase_t::sum_im, dpu_phase_t::sum_re, dpu_phase_t::vect_im, and dpu_phase_t::vect_re.

Referenced by v27RxSt34Init(), v27RxSt3Init(), v29RxSt34Init(), and v29RxSt3Init().


FM: dpu_phas.c Source File

dpu_phas.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE:  DPU RX phase calculator
00003  ******************************************************************************
00004  * FILE NAME: dpu_phas.c
00005  *
00006  * DESCRIPTION: DPU RX phase calculator
00007
00008  *
00009  * TABS: NONE
00010  *
00011  * $Id: DPU_PHAS.C 1.8 1999/03/26 11:19:16 sakhtar Exp $
00012  *
00013  * REVISION HISTORY:
00014  *
00015  * $Log: DPU_PHAS.C $
00016  * Revision 1.8  1999/03/26 11:19:16  sakhtar
00017  * Moved some functions to assembly in file dpuphase.s
00018  * Revision 1.7  1999/03/24 17:13:13  sakhtar
00019  * Removed unused functions
00020  * Revision 1.6  1999/03/01 16:03:57  sakhtar
00021  * Modified for optimization. Removed all C54x specific IFDEF
00022  * options
00023  * Revision 1.5  1997/09/05 20:36:00  PPATEL
00024  *  Added types.h & fract.h
00025  * Revision 1.4  1997/09/03 17:32:05  PPATEL
00026  *     changed C542 to C54x for compatibility with C548
00027  * Revision 1.3  1997/05/18 12:21:31  Zoran
00028  *   Cleaned version, fixed bugs for training
00029  * Revision 1.2  1997/02/19 18:35:39  H.T.Li
00030  * Revision 1.1  1997/02/06 09:03:37  unknown
00031  * Initial revision
00032  *
00033  * (C) Copyright 1996, TELOGY Networks, Inc.
00034  *****************************************************************************/
00035
00036 #include <ti/mas/types/types.h>
00037 #include <ti/mas/fract/fract.h>
00038
00039 #include "dpu_tgt.h"
00040 #include "dpu_phas.h"
00041 #include "dpu_crec.h"
00042 #include "dpu_smap.h"
00043
00044
00045
00046 /******************************************************************************
00047  * FUNCTION PURPOSE: initialize DPU phase calculator
00048  ******************************************************************************
00049  * DESCRIPTION: initialize DPU phase calculator
00050  *
00051  *****************************************************************************/
00052  void dpu_phase_init(dpu_phase_t *inst, Fract *v_re, Fract *v_im,
00053                      Fract div, int number)
00054  {
00055     int i;
00056
00057     inst->number = number;
00058     inst->count =
00059       inst->sum_re =
00060       inst->sum_im = 0;
00061     inst->division = div;
00062     inst->vect_re = v_re[0];
00063     inst->vect_im = v_im[0];
00064     for (i=0; i<DPU_PHASE_LEN-1; i+=2)
00065     {
00066        inst->delay_re[i] = v_re[0];
00067        inst->delay_im[i] = v_im[0];
00068        inst->delay_re[i+1] = v_re[1];
00069        inst->delay_im[i+1] = v_im[1];
00070     }
00071
00072  }
00073
00074
00075


FM: dpu_phas.h File Reference

dpu_phas.h File Reference

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

Include dependency graph for dpu_phas.h:

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

Go to the source code of this file.

Data Structures

struct | dpu_phase_t

Defines

#define | DPU_PHASE_LEN (18+8*0)

Functions

void | dpu_phase_v29 (dpu_phase_t *inst, Fract in_re, Fract in_im, Fract *phase)
void | dpu_phase_v27 (dpu_phase_t *inst, Fract in_re, Fract in_im, Fract *phase)
void | dpu_err_pha_v29_96_1 (dpu_phase_t *inst, Fract *a_re, Fract *a_im, Fract x_re, Fract y_im, Fract *phase, Fract *premap, Fract dummyTable[][10])
void | dpu_err_pha_v29_96 (dpu_phase_t *inst, Fract *a_re, Fract *a_im, Fract x_re, Fract y_im, Fract *phase, Fract *premap, Fract dummyTable[][10])
void | dpu_err_pha_v29_72 (dpu_phase_t *inst, Fract *a_re, Fract *a_im, Fract x_re, Fract y_im, Fract *phase, Fract *premap, Fract dummyTable[][10])
void | dpu_err_pha_trn (dpu_phase_t *inst, Fract *a_re, Fract *a_im, Fract x_re, Fract y_im, Fract *phase, Fract *premap, Fract dummyTable[][10])
void | dpu_err_pha_v27_trn (dpu_phase_t *inst, Fract *a_re, Fract *a_im, Fract x_re, Fract y_im, Fract *phase, Fract *premap, Fract dummyTable[][10])
void | dpu_err_pha_v29_72_1 (dpu_phase_t *inst, Fract *a_re, Fract *a_im, Fract x_re, Fract y_im, Fract *phase, Fract *premap, Fract dummyTable[][10])
void | dpu_err_pha_trn_1 (dpu_phase_t *inst, Fract *a_re, Fract *a_im, Fract x_re, Fract y_im, Fract *phase, Fract *premap, Fract dummyTable[][10])
void | dpu_phase_init (dpu_phase_t *inst, Fract *v_re, Fract *v_im, Fract div, int number)

Define Documentation

#define DPU_PHASE_LEN (18+8*0)

Definition at line 29 of file dpu_phas.h.

Referenced by dpu_err_pha_trn_1(), dpu_err_pha_v27_trn(), dpu_err_pha_v29_72(), dpu_err_pha_v29_72_1(), dpu_err_pha_v29_96(), dpu_err_pha_v29_96_1(), dpu_phase_init(), v27RxStM(), and v29RxStM().

Function Documentation

void dpu_phase_v29 | ( | dpu_phase_t * | inst,
 |  | Fract | in_re,
 |  | Fract | in_im,
 |  | Fract * | phase
 | ) |  |

void dpu_phase_v27 | ( | dpu_phase_t * | inst,
 |  | Fract | in_re,
 |  | Fract | in_im,
 |  | Fract * | phase
 | ) |  |

void dpu_err_pha_v29_96_1 | ( | dpu_phase_t * | inst,
 |  | Fract * | a_re,
 |  | Fract * | a_im,
 |  | Fract | x_re,
 |  | Fract | y_im,
 |  | Fract * | phase,
 |  | Fract * | premap,
 |  | Fract | dummyTable[][10]
 | ) |  |

Definition at line 55 of file dpuphase.c.

References dpu_phase_t::delay_im, dpu_phase_t::delay_re, dpu_phase_t::division_table, DPU_PHASE_LEN, and V29_CSCALE_96.

Referenced by v29RxSt4Init().

void dpu_err_pha_v29_96 | ( | dpu_phase_t * | inst,
 |  | Fract * | a_re,
 |  | Fract * | a_im,
 |  | Fract | x_re,
 |  | Fract | y_im,
 |  | Fract * | phase,
 |  | Fract * | premap,
 |  | Fract | dummyTable[][10]
 | ) |  |

Definition at line 97 of file dpuphase.c.

References dpu_phase_t::delay_im, dpu_phase_t::delay_re, dpu_phase_t::division_table, DPU_PHASE_LEN, dpu_phase_t::number, and V29_CSCALE_96.

Referenced by v29RxSt34Init().

void dpu_err_pha_v29_72 | ( | dpu_phase_t * | inst,
 |  | Fract * | a_re,
 |  | Fract * | a_im,
 |  | Fract | x_re,
 |  | Fract | y_im,
 |  | Fract * | phase,
 |  | Fract * | premap,
 |  | Fract | dummyTable[][10]
 | ) |  |

Definition at line 141 of file dpuphase.c.

References dpu_phase_t::delay_im, dpu_phase_t::delay_re, dpu_phase_t::division_table, DPU_PHASE_LEN, and dpu_phase_t::number.

Referenced by v29RxSt34Init().

void dpu_err_pha_trn | ( | dpu_phase_t * | inst,
 |  | Fract * | a_re,
 |  | Fract * | a_im,
 |  | Fract | x_re,
 |  | Fract | y_im,
 |  | Fract * | phase,
 |  | Fract * | premap,
 |  | Fract | dummyTable[][10]
 | ) |  |

void dpu_err_pha_v27_trn | ( | dpu_phase_t * | inst,
 |  | Fract * | a_re,
 |  | Fract * | a_im,
 |  | Fract | x_re,
 |  | Fract | y_im,
 |  | Fract * | phase,
 |  | Fract * | premap,
 |  | Fract | dummyTable[][10]
 | ) |  |

Definition at line 213 of file dpuphase.c.

References dpu_phase_t::delay_im, dpu_phase_t::delay_re, dpu_phase_t::division_table, DPU_PHASE_LEN, and dpu_phase_t::number.

Referenced by v27RxSt34Init().

void dpu_err_pha_v29_72_1 | ( | dpu_phase_t * | inst,
 |  | Fract * | a_re,
 |  | Fract * | a_im,
 |  | Fract | x_re,
 |  | Fract | y_im,
 |  | Fract * | phase,
 |  | Fract * | premap,
 |  | Fract | dummyTable[][10]
 | ) |  |

Definition at line 179 of file dpuphase.c.

References dpu_phase_t::delay_im, dpu_phase_t::delay_re, dpu_phase_t::division_table, and DPU_PHASE_LEN.

Referenced by v29RxSt4Init().

void dpu_err_pha_trn_1 | ( | dpu_phase_t * | inst,
 |  | Fract * | a_re,
 |  | Fract * | a_im,
 |  | Fract | x_re,
 |  | Fract | y_im,
 |  | Fract * | phase,
 |  | Fract * | premap,
 |  | Fract | dummyTable[][10]
 | ) |  |

Definition at line 252 of file dpuphase.c.

References dpu_phase_t::delay_im, dpu_phase_t::delay_re, dpu_phase_t::division_table, and DPU_PHASE_LEN.

Referenced by v27RxSt4Init().

void dpu_phase_init | ( | dpu_phase_t * | inst,
 |  | Fract * | v_re,
 |  | Fract * | v_im,
 |  | Fract | div,
 |  | int | number
 | ) |  |

Definition at line 52 of file dpu_phas.c.

References dpu_phase_t::count, dpu_phase_t::delay_im, dpu_phase_t::delay_re, dpu_phase_t::division, DPU_PHASE_LEN, dpu_phase_t::number, dpu_phase_t::sum_im, dpu_phase_t::sum_re, dpu_phase_t::vect_im, and dpu_phase_t::vect_re.

Referenced by v27RxSt34Init(), v27RxSt3Init(), v29RxSt34Init(), and v29RxSt3Init().


FM: dpu_phas.h Source File

dpu_phas.h

Go to the documentation of this file.
00001 #ifndef _DPU_PHAS_H
00002 #define _DPU_PHAS_H
00003
00004 /******************************************************************************
00005  * FILE PURPOSE:  header file of RX phase calculator
00006  ******************************************************************************
00007  * FILE NAME: dpu_phas.h
00008  *
00009  * DESCRIPTION: header file of RX phase calculator
00010  *
00011  * TABS: NONE
00012  *
00013  * $Id: DPU_PHAS.H 1.3 2000/03/21 19:52:42 jwright Exp $
00014  *
00015  * REVISION HISTORY:
00016  *
00017  * $Log: DPU_PHAS.H $
00018  * Revision 1.3  2000/03/21 19:52:42  jwright
00019  * Clean up 3.50 compile warning.
00020  * Revision 1.2  1997/09/05 20:41:04  PPATEL
00021  *    Removed fract.h
00022  * Revision 1.1  1997/02/06 09:30:24  unknown
00023  * Initial revision
00024  *
00025  * (C) Copyright 1996, TELOGY Networks, Inc.
00026  *****************************************************************************/
00027 #include <ti/mas/types/types.h>
00028
00029 #define  DPU_PHASE_LEN  (18+8*0)
00030
00031 typedef struct
00032 {
00033  int count;
00034  int number;
00035  LFract sum_re;
00036  LFract sum_im;
00037  Fract  vect_re;
00038  Fract  vect_im;
00039  Fract  division;
00040  const  Fract  *division_table;
00041  Fract  delay_re[DPU_PHASE_LEN];
00042  Fract  delay_im[DPU_PHASE_LEN];
00043 } dpu_phase_t;
00044
00045
00046 /* phase calculator API */
00047 void dpu_phase_v29(dpu_phase_t *inst, Fract in_re, Fract in_im, Fract *phase);
00048
00049 void dpu_phase_v27(dpu_phase_t *inst, Fract in_re, Fract in_im, Fract *phase);
00050
00051 void dpu_err_pha_v29_96_1( dpu_phase_t *inst, Fract *a_re, Fract *a_im,
00052                      Fract x_re, Fract y_im, Fract *phase, Fract *premap, Fract dummyTable[][10]);
00053
00054 void dpu_err_pha_v29_96( dpu_phase_t *inst, Fract *a_re, Fract *a_im,
00055                      Fract x_re, Fract y_im, Fract *phase, Fract *premap, Fract dummyTable[][10]);
00056
00057 void dpu_err_pha_v29_72( dpu_phase_t *inst, Fract *a_re, Fract *a_im,
00058                      Fract x_re, Fract y_im, Fract *phase, Fract *premap, Fract dummyTable[][10]);
00059
00060 void dpu_err_pha_trn( dpu_phase_t *inst, Fract *a_re, Fract *a_im,
00061                      Fract x_re, Fract y_im, Fract *phase, Fract *premap, Fract dummyTable[][10]);
00062
00063 void dpu_err_pha_v27_trn( dpu_phase_t *inst, Fract *a_re, Fract *a_im,
00064                      Fract x_re, Fract y_im, Fract *phase, Fract *premap, Fract dummyTable[][10]);
00065
00066 void dpu_err_pha_v29_72_1( dpu_phase_t *inst, Fract *a_re, Fract *a_im,
00067                      Fract x_re, Fract y_im, Fract *phase, Fract *premap, Fract dummyTable[][10]);
00068
00069 void dpu_err_pha_trn_1( dpu_phase_t *inst, Fract *a_re, Fract *a_im,
00070                      Fract x_re, Fract y_im, Fract *phase, Fract *premap, Fract dummyTable[][10]);
00071
00072 void dpu_phase_init(dpu_phase_t *inst, Fract *v_re, Fract *v_im,
00073                     Fract div, int number);
00074
00075 #endif  /* _DPU_PHASE_H */
00076 /* nothing past this point */


FM: dpu_scr.h File Reference

dpu_scr.h File Reference

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

Include dependency graph for dpu_scr.h:

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

Go to the source code of this file.

Data Structures

struct | dpu_scr_t
struct | dpu_descr_t

Defines

#define | V27_SCR_INIT_PATTERN 0x0000003c
#define | PN_GEN_INIT_PATTERN 0x0000002a
#define | V29_TAP1 18
#define | V29_TAP2 23
#define | V27_TAP1 6
#define | V27_TAP2 7
#define | PN_TAP1 6
#define | PN_TAP2 7

Functions

void | dpu_scr_init (dpu_scr_t *scr_ptr, int num_of_bits, tulong init_pattern, Fract shift1, Fract shift2, const Fract *pn_table)
void | dpu_scr (dpu_scr_t *scr_ptr, Fract *bits)
void | dpu_scr_v27 (dpu_scr_t *scr_ptr, Fract *bits)
void | dpu_PN_gen (dpu_scr_t *scr_ptr, Fract *bits)
void | dpu_descr_init (dpu_descr_t *descr_ptr, int num_of_bits, tulong init_pattern, Fract shift1, Fract shift2)
void | dpu_descr_v27 (dpu_descr_t *descr_ptr, Fract *bits)

Define Documentation

#define V27_SCR_INIT_PATTERN 0x0000003c

Definition at line 62 of file dpu_scr.h.

Referenced by v27RxSt4Init(), and v27TxSt3Init().

#define PN_GEN_INIT_PATTERN 0x0000002a

Definition at line 63 of file dpu_scr.h.

Referenced by v29RxSt4Init(), and v29TxSt2Init().

#define V29_TAP1 18

Definition at line 66 of file dpu_scr.h.

Referenced by v29RxSt7Init(), and v29TxSt3Init().

#define V29_TAP2 23

Definition at line 67 of file dpu_scr.h.

Referenced by v29RxSt7Init(), and v29TxSt3Init().

#define V27_TAP1 6

Definition at line 70 of file dpu_scr.h.

Referenced by dpu_descr_v27(), dpu_scr_v27(), v27RxSt4Init(), v27TxSt3Init(), and v27TxSt4Init().

#define V27_TAP2 7

Definition at line 71 of file dpu_scr.h.

Referenced by dpu_descr_v27(), dpu_scr_v27(), v27RxSt4Init(), v27TxSt3Init(), and v27TxSt4Init().

#define PN_TAP1 6

Definition at line 72 of file dpu_scr.h.

Referenced by v29RxSt4Init(), and v29TxSt2Init().

#define PN_TAP2 7

Definition at line 73 of file dpu_scr.h.

Referenced by v29RxSt4Init(), and v29TxSt2Init().

Function Documentation

void dpu_scr_init | ( | dpu_scr_t * | scr_ptr,
 |  | int | num_of_bits,
 |  | tulong | init_pattern,
 |  | Fract | shift1,
 |  | Fract | shift2,
 |  | const Fract * | pn_table
 | ) |  |

Definition at line 267 of file scr.c.

References dpu_scr_t::counter, dpu_scr_t::mask, dpu_scr_t::next_bit, dpu_scr_t::num_of_bits, dpu_scr_t::pn_table, dpu_scr_t::scr_delay, dpu_scr_t::shift1, and dpu_scr_t::shift2.

Referenced by v27RxSt4Init(), v27TxSt3Init(), v27TxSt4Init(), v29RxSt4Init(), v29TxSt2Init(), and v29TxSt3Init().

void dpu_scr | ( | dpu_scr_t * | scr_ptr,
 |  | Fract * | bits
 | ) |  |

Definition at line 68 of file scr.c.

References dpu_scr_t::mask, dpu_scr_t::num_of_bits, dpu_scr_t::scr_delay, dpu_scr_t::shift1, and dpu_scr_t::shift2.

Referenced by v29TxSt3Init().

void dpu_scr_v27 | ( | dpu_scr_t * | scr_ptr,
 |  | Fract * | bits
 | ) |  |

Definition at line 169 of file scr.c.

References dpu_scr_t::counter, dpu_scr_t::mask, dpu_scr_t::next_bit, dpu_scr_t::num_of_bits, dpu_scr_t::scr_delay, V27_TAP1, and V27_TAP2.

Referenced by v27RxSt4Init(), and v27TxSt3Init().

void dpu_PN_gen | ( | dpu_scr_t * | scr_ptr,
 |  | Fract * | bits
 | ) |  |

Definition at line 111 of file scr.c.

References dpu_scr_t::mask, dpu_scr_t::num_of_bits, dpu_scr_t::pn_table, dpu_scr_t::scr_delay, dpu_scr_t::shift1, and dpu_scr_t::shift2.

Referenced by v29RxSt4Init(), and v29TxSt2Init().

void dpu_descr_init | ( | dpu_descr_t * | descr_ptr,
 |  | int | num_of_bits,
 |  | tulong | init_pattern,
 |  | Fract | shift1,
 |  | Fract | shift2
 | ) |  |

Definition at line 198 of file descr.c.

References dpu_descr_t::counter, dpu_descr_t::descr_delay, dpu_descr_t::mask, dpu_descr_t::next_bit, dpu_descr_t::num_of_bits, dpu_descr_t::shift1, and dpu_descr_t::shift2.

Referenced by v27RxSt4Init(), and v29RxSt7Init().

void dpu_descr_v27 | ( | dpu_descr_t * | descr_ptr,
 |  | Fract * | bits
 | ) |  |

Definition at line 87 of file descr.c.

References dpu_descr_t::counter, dpu_descr_t::descr_delay, dpu_descr_t::next_bit, dpu_descr_t::num_of_bits, V27_TAP1, and V27_TAP2.

Referenced by v27RxSt4Init().


FM: dpu_scr.h Source File

dpu_scr.h

Go to the documentation of this file.
00001 #ifndef _DPU_SCR_H
00002 #define _DPU_SCR_H
00003 /******************************************************************************
00004  * FILE PURPOSE: Header file for scrambler and descrabler routines
00005  ******************************************************************************
00006  * FILE NAME:   dpu_scr.h
00007  *
00008  * DESCRIPTION: This file contains API and definitions for the scrambler and
00009  *              descrambler used in DPU module.
00010  *
00011  * REQUIRES:    types.h   (generic DSP ECO types)
00012  *
00013  * TABS: NONE
00014  *
00015  * $Id: DPU_SCR.H 1.4 1997/11/21 15:34:42 PPATEL Exp $
00016  *
00017  * REVISION HISTORY:
00018  *
00019  * $Log: DPU_SCR.H $
00020  * Revision 1.4  1997/11/21 15:34:42  PPATEL
00021  *  descrambler  api shifted to descrrx.h
00022  * Revision 1.3  1997/09/13 19:28:39  PPATEL
00023  *   V17 definitions removed
00024  * Revision 1.2  1997/05/18 12:38:37  Zoran
00025  *  Cleaned code
00026  * Revision 1.1  1997/02/06 09:31:36  unknown
00027  * Initial revision
00028  *
00029  * (C) Copyright 1995, 1996, TELOGY Networks, Inc.
00030  *****************************************************************************/
00031
00032 /* System level header files */
00033 #include <ti/mas/types/types.h>
00034
00035 /* Scrambler data definition structure */
00036
00037  typedef struct {
00038    tulong scr_delay;  /* Scrambler delay line */
00039    tuint num_of_bits; /* Number of bits per symbol */
00040    tuint mask;        /* mask for output bits */
00041    Fract shift1;       /* shift1 for scrambler polynomial */
00042    Fract shift2;       /* shift2 for scrambler polynomial */
00043    Fract counter;      /* counter used for detect. V.27 rep. pattern */
00044    Fract next_bit;     /* flag used for detect. V.27 repeat. pattern */
00045    const Fract *pn_table;    /* pointer to PN table */
00046 } dpu_scr_t;
00047
00048
00049 /* Descrambler data definition structure */
00050
00051  typedef struct {
00052    tulong descr_delay;  /* Descrambler delay line */
00053    tuint num_of_bits;   /* Number of bits per symbol */
00054    tuint mask;          /* mask for output bits */
00055    Fract shift1;         /* shift1 for scrambler polynomial */
00056    Fract shift2;         /* shift2 for scrambler polynomial */
00057    Fract counter;        /* counter used for detect. V.27 rep. pattern */
00058    Fract next_bit;       /* flag used for detect. V.27 repeat. pattern */
00059 } dpu_descr_t;
00060
00061 /* Scrambler constants */
00062 #define V27_SCR_INIT_PATTERN 0x0000003c
00063 #define PN_GEN_INIT_PATTERN 0x0000002a
00064
00065 /* Scrambler polynomial for V.29 and V.17 1+x**-18+x**-23 */
00066 #define V29_TAP1 18
00067 #define V29_TAP2 23
00068
00069 /* Scrambler polynomial for V.27 and PN sequence 1+x**-6+x**-7 */
00070 #define V27_TAP1 6
00071 #define V27_TAP2 7
00072 #define PN_TAP1 6
00073 #define PN_TAP2 7
00074
00075
00076 /* Scrambler API */
00077 void dpu_scr_init(dpu_scr_t *scr_ptr,
00078                   int  num_of_bits,
00079                   tulong init_pattern,
00080                   Fract shift1,
00081                   Fract shift2,
00082                   const Fract *pn_table);
00083 void dpu_scr (dpu_scr_t *scr_ptr, Fract *bits);
00084 void dpu_scr_v27 (dpu_scr_t *scr_ptr, Fract *bits);
00085 void dpu_PN_gen (dpu_scr_t *scr_ptr, Fract *bits);
00086
00087
00088 /* Descrambler API */
00089 void dpu_descr_init (dpu_descr_t *descr_ptr,
00090                      int num_of_bits,
00091                      tulong init_pattern,
00092                      Fract shift1,
00093                      Fract shift2);
00094 void dpu_descr_v27 (dpu_descr_t *descr_ptr, Fract *bits);
00095
00096
00097 #endif  /* _DPU_SCR_H */
00098 /* nothing past this point */


FM: dpu_shap.h File Reference

dpu_shap.h File Reference

#include <ti/mas/types/types.h>
#include "dpu_tgt.h"
#include <ti/mas/fm/fmTablesTypes.h>

Include dependency graph for dpu_shap.h:

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

Go to the source code of this file.

Data Structures

struct | dpu_shaping_t

Defines

#define | SHAP_MAX_L 6
#define | SHAP_MAX_M_COEF 7
#define | SHAP_MAX_M SHAP_MAX_M_COEF+48
#define | SHAP_CONST_SCALE Q14_SCALE

Functions

Fract | dpu_fir (Fract *in, Fract *hn, int h)
void | dpu_tx_shaping_init (dpu_shaping_t *inst, Fract L1, const dpu_shaping_bank_t *filter)
int | dpu_shaping (dpu_shaping_t *inst, Fract *input_re, Fract *input_im, Fract *output, int length)
int | dpushaping_filt (Fract *oldin_re, Fract *oldin_im, Fract *in_re, Fract *in_im, const Fract filters_re[][SHAP_MAX_M_COEF], const Fract filters_im[][SHAP_MAX_M_COEF], int samp_per_baud, int h, Fract *output, int length)

Define Documentation

#define SHAP_MAX_L 6

Definition at line 33 of file dpu_shap.h.

#define SHAP_MAX_M_COEF 7

Definition at line 34 of file dpu_shap.h.

#define SHAP_MAX_M SHAP_MAX_M_COEF+48

Definition at line 35 of file dpu_shap.h.

Referenced by dpu_tx_shaping_init(), and dpuNew().

#define SHAP_CONST_SCALE Q14_SCALE

Definition at line 36 of file dpu_shap.h.

Function Documentation

Fract dpu_fir | ( | Fract * | in,
 |  | Fract * | hn,
 |  | int | h
 | ) |  |

void dpu_tx_shaping_init | ( | dpu_shaping_t * | inst,
 |  | Fract | L1,
 |  | const dpu_shaping_bank_t * | filter
 | ) |  |

Definition at line 58 of file shaping.c.

References dpu_shaping_t::filter, dpu_shaping_t::L1, dpu_shaping_t::length, dpu_shaping_t::oldin_im, dpu_shaping_t::oldin_re, and SHAP_MAX_M.

Referenced by vxx_tx_init().

int dpu_shaping | ( | dpu_shaping_t * | inst,
 |  | Fract * | input_re,
 |  | Fract * | input_im,
 |  | Fract * | output,
 |  | int | length
 | ) |  |

Definition at line 36 of file shaping.c.

References dpushaping_filt(), dpu_shaping_t::filter, dpu_shaping_bank_t::filters_im, dpu_shaping_bank_t::filters_re, dpu_shaping_t::L1, dpu_shaping_t::length, dpu_shaping_t::oldin_im, and dpu_shaping_t::oldin_re.

Referenced by vxx_tx_init().

Here is the call graph for this function:

int dpushaping_filt | ( | Fract * | oldin_re,
 |  | Fract * | oldin_im,
 |  | Fract * | in_re,
 |  | Fract * | in_im,
 |  | const Fract | filters_re[][SHAP_MAX_M_COEF],
 |  | const Fract | filters_im[][SHAP_MAX_M_COEF],
 |  | int | samp_per_baud,
 |  | int | h,
 |  | Fract * | output,
 |  | int | length
 | ) |  |

Definition at line 123 of file dpu_fir.c.

References convoluI().

Referenced by dpu_shaping().

Here is the call graph for this function:


FM: dpu_shap.h Source File

dpu_shap.h

Go to the documentation of this file.
00001 #ifndef _DPU_SHAP_H
00002 #define _DPU_SHAP_H
00003
00004 /******************************************************************************
00005  * FILE PURPOSE:  header file of TX shaping filter
00006  ******************************************************************************
00007  * FILE NAME: shaping.h
00008  *
00009  * DESCRIPTION: header file of TX shaping filter
00010  *
00011  * TABS: NONE
00012  *
00013  * $Id: DPU_SHAP.H 1.5 2002/10/9 19:33:05 Aravind BR Exp $
00014  * fixed the problem in dpushaping_filt API declaration
00015  * REVISION HISTORY:
00016  *
00017  * $Log: DPU_SHAP.H $
00018  * Revision 1.5  2000/03/21 19:33:05  jwright
00019  * Clean up 3.50 compile warning.
00020  * Revision 1.4  1997/09/05 20:43:28  PPATEL
00021  *   removed fract.h
00022  * Revision 1.3  1997/05/18 12:40:29  Zoran
00023  *   Cleaned, updated code
00024  * Revision 1.1  1997/02/06 09:33:57  unknown
00025  * Initial revision
00026  *
00027  * (C) Copyright 1996, TELOGY Networks, Inc.
00028  *****************************************************************************/
00029 #include <ti/mas/types/types.h>
00030 #include "dpu_tgt.h"
00031 #include <ti/mas/fm/fmTablesTypes.h>
00032
00033 #define SHAP_MAX_L        6
00034 #define SHAP_MAX_M_COEF   7
00035 #define SHAP_MAX_M        SHAP_MAX_M_COEF+48
00036 #define SHAP_CONST_SCALE  Q14_SCALE
00037
00038 typedef struct
00039 {
00040  Fract L1;
00041  Fract length;
00042  const dpu_shaping_bank_t *filter;
00043  Fract *oldin_re;
00044  Fract *oldin_im;
00045 } dpu_shaping_t;
00046
00047
00048 extern Fract dpu_fir(Fract *in, Fract *hn, int h);
00049
00050 void dpu_tx_shaping_init(dpu_shaping_t *inst, Fract L1, const dpu_shaping_bank_t *filter);
00051
00052
00053 int dpu_shaping(dpu_shaping_t *inst,
00054    Fract *input_re, Fract *input_im, Fract *output, int length);
00055
00056 int dpushaping_filt(Fract *oldin_re, Fract *oldin_im, Fract *in_re, Fract *in_im,
00057    const Fract filters_re[][SHAP_MAX_M_COEF], const Fract filters_im[][SHAP_MAX_M_COEF],
00058    int samp_per_baud, int h,
00059    Fract *output, int length);
00060
00061 #endif  /* _DPU_SHAP_H */
00062 /* nothing past this point */


FM: dpu_slic.h File Reference

dpu_slic.h File Reference

#include <ti/mas/types/types.h>
#include <ti/mas/fract/fract.h>
#include "dpu_tgt.h"
#include "dpu_cdec.h"

Include dependency graph for dpu_slic.h:

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

Go to the source code of this file.

Data Structures

struct | dpu_slic_t

Defines

#define | V29_RX_CSCALE_96 (0.2722*RX_CONST_SCALE)
#define | V29_RX_CSCALE_72 (0.4264*RX_CONST_SCALE)
#define | V29_RX_CSCALE_48 (1*RX_CONST_SCALE)
#define | V27_RX_CSCALE_48 (1*RX_CONST_SCALE)
#define | V27_RX_CSCALE_24 (1*RX_CONST_SCALE)
#define | V29_INVMOD_PT0_96 (INVMOD_SCALE*1.074296)
#define | V29_INVMOD_PT1_96 (INVMOD_SCALE*0.238732)
#define | V29_INVMOD_PT2_96 (INVMOD_SCALE*0.119366)
#define | V29_INVMOD_PT3_96 (INVMOD_SCALE*0.085944)
#define | V29_INVMOD_PT0_72 (INVMOD_SCALE*0.437676)
#define | V29_INVMOD_PT1_72 (INVMOD_SCALE*0.097260)
#define | V29_INVMOD_PT0_48 (INVMOD_SCALE*0.159155)
#define | V27_INVMOD_PT0_48 (INVMOD_SCALE*0.159155)
#define | V27_INVMOD_PT0_24 (INVMOD_SCALE*0.159155)

Functions

void | dpu_slic_init (dpu_slic_t *slic_ptr)
void | dpu_v27_v29_slicer (dpu_slic_t *slic_ptr, Fract *x_sym, Fract *y_sim, Fract *rx_bits, Fract *phase, Fract *dpu_slic_pt_V29_72_ptr, Fract *dpu_slic_pt_V27_48_ptr, Fract *dpu_slic_pt_V27_24_ptr, const Fract *dpu_PN_smap_table_v17_AllRates_ptr, Fract dpu_slic_invmod_v17_ptr[][10])
void | dpuUpdateSNRparms (dpu_slic_t *slic_p)

Define Documentation

#define V29_RX_CSCALE_96 (0.2722*RX_CONST_SCALE)

Definition at line 56 of file dpu_slic.h.

Referenced by dpu_v27_v29_slicer().

#define V29_RX_CSCALE_72 (0.4264*RX_CONST_SCALE)

Definition at line 57 of file dpu_slic.h.

Referenced by dpu_v27_v29_slicer().

#define V29_RX_CSCALE_48 (1*RX_CONST_SCALE)

Definition at line 58 of file dpu_slic.h.

#define V27_RX_CSCALE_48 (1*RX_CONST_SCALE)

Definition at line 60 of file dpu_slic.h.

#define V27_RX_CSCALE_24 (1*RX_CONST_SCALE)

Definition at line 61 of file dpu_slic.h.

#define V29_INVMOD_PT0_96 (INVMOD_SCALE*1.074296)

Definition at line 77 of file dpu_slic.h.

#define V29_INVMOD_PT1_96 (INVMOD_SCALE*0.238732)

Definition at line 78 of file dpu_slic.h.

#define V29_INVMOD_PT2_96 (INVMOD_SCALE*0.119366)

Definition at line 79 of file dpu_slic.h.

#define V29_INVMOD_PT3_96 (INVMOD_SCALE*0.085944)

Definition at line 80 of file dpu_slic.h.

#define V29_INVMOD_PT0_72 (INVMOD_SCALE*0.437676)

Definition at line 82 of file dpu_slic.h.

#define V29_INVMOD_PT1_72 (INVMOD_SCALE*0.097260)

Definition at line 83 of file dpu_slic.h.

#define V29_INVMOD_PT0_48 (INVMOD_SCALE*0.159155)

Definition at line 85 of file dpu_slic.h.

#define V27_INVMOD_PT0_48 (INVMOD_SCALE*0.159155)

Definition at line 87 of file dpu_slic.h.

#define V27_INVMOD_PT0_24 (INVMOD_SCALE*0.159155)

Definition at line 89 of file dpu_slic.h.

Function Documentation

void dpu_slic_init ( dpu_slic_t * slic_ptr )

Definition at line 309 of file slicers.c.

References dpu_slic_t::avgNoisePow, dpu_slic_t::avgSignalPow, dpu_slic_t::ph_error_scale, and PH_ERROR_SCALE.

Referenced by v27RxSt7Init(), and v29RxSt7Init().

void dpu_v27_v29_slicer | ( | dpu_slic_t * | slic_ptr,
 |  | Fract * | x_sym,
 |  | Fract * | y_sim,
 |  | Fract * | rx_bits,
 |  | Fract * | phase,
 |  | Fract * | dpu_slic_pt_V29_72_ptr,
 |  | Fract * | dpu_slic_pt_V27_48_ptr,
 |  | Fract * | dpu_slic_pt_V27_24_ptr,
 |  | const Fract * | dpu_PN_smap_table_v17_AllRates_ptr,
 |  | Fract | dpu_slic_invmod_v17_ptr[][10]
 | ) |  |

Definition at line 126 of file slicers.c.

References dpu_slic_t::bits_table, dpu_slic_t::decis_table, dpu_slic_t::invmod_table, dpu_slic_t::ph_error, V29_96_SC1, V29_96_SH1, V29_RX_CSCALE_72, V29_RX_CSCALE_96, dpu_slic_t::x_error, dpu_slic_t::x_ideal, dpu_slic_t::y_error, and dpu_slic_t::y_ideal.

Referenced by v27RxSt7Init(), and v29RxSt7Init().

void dpuUpdateSNRparms ( dpu_slic_t * slic_p )

Definition at line 87 of file slicers.c.

References dpu_slic_t::avgNoisePow, dpu_slic_t::avgSignalPow, POW_DECAY_SHIFT, dpu_slic_t::x_error, dpu_slic_t::x_ideal, dpu_slic_t::y_error, and dpu_slic_t::y_ideal.


FM: dpu_slic.h Source File

dpu_slic.h

Go to the documentation of this file.
00001 #ifndef _DPU_SLIC_H
00002 #define _DPU_SLIC_H
00003 /******************************************************************************
00004  * FILE PURPOSE: Slicer Header File
00005  ******************************************************************************
00006  * FILE NAME:   dpu_slic.h
00007  *
00008  * DESCRIPTION: This file contains API and definitions for slicer
00009  *              routines for the DPU module.
00010  *
00011  * REQUIRES:    types.h   (generic DSP ECO types)
00012  *
00013  * TABS: NONE
00014  *
00015  * $Id: DPU_SLIC.H 1.7 1999/04/05 11:23:43 sakhtar Exp $
00016  *
00017  * REVISION HISTORY:
00018  *
00019  * $Log: DPU_SLIC.H $
00020  * Revision 1.7  1999/04/05 11:23:43  sakhtar
00021  * Combined some functions to create a common slicer function
00022  * for v27 and v29
00023  * Revision 1.6  1998/04/30 17:14:41  ppatel
00024  *  Changes for reporting modem status (timing offset, carrier freq offset,
00025  * snr, etc.)
00026  * Revision 1.5  1997/10/28 22:27:05  PPATEL
00027  *  Changes made for V.17 support
00028  * Revision 1.4  1997/05/25 16:20:13  Zoran
00029  *   Added LPF quality filter parameters to slicer structure
00030  *    Added prototype for quality estimation function
00031  * Revision 1.3  1997/05/18 12:40:46  Zoran
00032  *   Cleaned, updated code
00033  * Revision 1.1  1997/02/06 09:35:03  unknown
00034  * Initial revision
00035  *
00036  * (C) Copyright 1996, TELOGY Networks, Inc.
00037  *****************************************************************************/
00038
00039 /* System level header files */
00040 #include <ti/mas/types/types.h>
00041 #include <ti/mas/fract/fract.h>
00042 #include "dpu_tgt.h"
00043 #include "dpu_cdec.h"
00044
00045 /******************************************************************************
00046  * Constellation Tables
00047  *****************************************************************************/
00048 /* Average power of all constellations - 1
00049    Calculated power V.29 9600   13.5
00050                          7200    5.5
00051                          4800    1
00052                     V.27 4800    1
00053                          2400    1
00054
00055 Definition of scaling constants for slicer tables */
00056 #define V29_RX_CSCALE_96 (0.2722*RX_CONST_SCALE)   /* 1/sqrt(13.5) */
00057 #define V29_RX_CSCALE_72 (0.4264*RX_CONST_SCALE)   /* 1/sqrt( 5.5) */
00058 #define V29_RX_CSCALE_48 (1*RX_CONST_SCALE)
00059
00060 #define V27_RX_CSCALE_48 (1*RX_CONST_SCALE)
00061 #define V27_RX_CSCALE_24 (1*RX_CONST_SCALE)
00062
00063
00064 /* Definition of inverse power of points for inverse modulus tables */
00065 /* These values are calculated as:
00066                   INVMOD_SCALE/(X*RX_CSCALE**2 + Y*RX_CSCALE**2)
00067    where the constellation scaling constants are:
00068         V29_RX_CSCALE_96 0.2722
00069         V29_RX_CSCALE_72 0.4264
00070         V29_RX_CSCALE_48 1
00071
00072         V27_RX_CSCALE_48 1
00073         V27_RX_CSCALE_24 1
00074 If any of these constants are changed, the values in this table will have
00075 to be changed */
00076 /* divide by 2*pi to change the phase from radian to normalized freq */
00077 #define V29_INVMOD_PT0_96 (INVMOD_SCALE*1.074296) /* 6.75    13.5/  2  */
00078 #define V29_INVMOD_PT1_96 (INVMOD_SCALE*0.238732) /* 1.50   / 13.5/  9  */
00079 #define V29_INVMOD_PT2_96 (INVMOD_SCALE*0.119366) /* 0.75   / 13.5/ 18  */
00080 #define V29_INVMOD_PT3_96 (INVMOD_SCALE*0.085944) /* 0.54   / 13.5/ 25  */
00081
00082 #define V29_INVMOD_PT0_72 (INVMOD_SCALE*0.437676) /* 2.75   /  5.5/  2  */
00083 #define V29_INVMOD_PT1_72 (INVMOD_SCALE*0.097260) /* 0.6111 /  5.5/  9  */
00084
00085 #define V29_INVMOD_PT0_48 (INVMOD_SCALE*0.159155) /* 1 */
00086
00087 #define V27_INVMOD_PT0_48 (INVMOD_SCALE*0.159155) /* 1 */
00088
00089 #define V27_INVMOD_PT0_24 (INVMOD_SCALE*0.159155) /* 1 */
00090
00091 /* Symbol Mapper data definition structure */
00092
00093  typedef struct {
00094    Fract *decis_table ; /* pointer to slicer table */
00095    Fract x_ideal;       /* Decision for x point */
00096    Fract y_ideal;       /* Decision for y point */
00097    Fract x_error;       /* Passband error in x direction */
00098    Fract y_error;       /* passband error in y direction */
00099    Fract ph_error;      /* Phase error */
00100    Fract ph_error_scale;/* Scaling constant for phase error */
00101    const Fract *invmod_table; /* Pointer to table with inverse modulus */
00102    Fract invmod_mask;   /* Mask for index to acces inv mod table */
00103    const Fract *bits_table;   /* pointer to table with bits corresp. to rx points */
00104    LFract avgNoisePow;  /* average power of error */
00105    LFract avgSignalPow; /* average signal power */
00106    dpu_cdec_t *cdec_ptr; /* convolutional decoder pointer for updating
00107                             path distances when finding the nearest neighbor
00108               in v.17; it is useless for other recommendations */
00109 } dpu_slic_t;
00110
00111 /* Slicer API */
00112 void dpu_slic_init(dpu_slic_t *slic_ptr);
00113 void dpu_v27_v29_slicer(dpu_slic_t *slic_ptr,Fract *x_sym,Fract *y_sim,
00114                   Fract *rx_bits,Fract *phase,
00115                       Fract *dpu_slic_pt_V29_72_ptr,
00116                         Fract *dpu_slic_pt_V27_48_ptr,
00117                         Fract *dpu_slic_pt_V27_24_ptr,
00118                         const Fract *dpu_PN_smap_table_v17_AllRates_ptr,
00119                         Fract dpu_slic_invmod_v17_ptr[][10]);
00120
00121 void dpuUpdateSNRparms(dpu_slic_t *slic_p);
00122 #endif  /* _DPU_SLIC_H */
00123 /* nothing past this point */


FM: dpu_smap.h File Reference

dpu_smap.h File Reference

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

Include dependency graph for dpu_smap.h:

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

Go to the source code of this file.

Data Structures

struct | dpu_smap_t

Defines

#define | V29_CSCALE_96 0.2722*TX_CONST_SCALE
#define | V29_CSCALE_72 0.4264*TX_CONST_SCALE
#define | V29_CSCALE_48 1*TX_CONST_SCALE
#define | V27_CSCALE_48 1*TX_CONST_SCALE
#define | V27_CSCALE_24 1*TX_CONST_SCALE

Functions

void | dpu_smap_init (dpu_smap_t *smap_ptr, const Fract *smap_table)
void | dpu_smap (dpu_smap_t *smap_ptr, Fract *bits, Fract *x_sym, Fract *y_sim, int index)
void | dpu_dot (dpu_smap_t *smap_ptr, Fract *bits, Fract *x_sym, Fract *y_sim, int index)
void | dpu_v27_St3_smap (dpu_smap_t *smap_ptr, Fract *bits, Fract *x_sym, Fract *y_sym, int index)

Define Documentation

#define V29_CSCALE_96 0.2722*TX_CONST_SCALE

Definition at line 39 of file dpu_smap.h.

Referenced by dpu_err_pha_v29_96(), dpu_err_pha_v29_96_1(), v29RxSt34Init(), and v29RxSt3Init().

#define V29_CSCALE_72 0.4264*TX_CONST_SCALE

Definition at line 40 of file dpu_smap.h.

Referenced by v29RxSt34Init(), and v29RxSt3Init().

#define V29_CSCALE_48 1*TX_CONST_SCALE

Definition at line 41 of file dpu_smap.h.

#define V27_CSCALE_48 1*TX_CONST_SCALE

Definition at line 43 of file dpu_smap.h.

Referenced by v27RxSt34Init(), and v27RxSt3Init().

#define V27_CSCALE_24 1*TX_CONST_SCALE

Definition at line 44 of file dpu_smap.h.

Referenced by v27RxSt34Init(), and v27RxSt3Init().

Function Documentation

void dpu_smap_init | ( | dpu_smap_t * | smap_ptr,
 |  | const Fract * | smap_table
 | ) |  |

Definition at line 156 of file sym_map.c.

References dpu_smap_t::pre_symbol, and dpu_smap_t::smap_table.

Referenced by v27TxSt2Init(), v27TxSt4Init(), v29RxSt4Init(), v29TxSt1Init(), and v29TxSt2Init().

void dpu_smap | ( | dpu_smap_t * | smap_ptr,
 |  | Fract * | bits,
 |  | Fract * | x_sym,
 |  | Fract * | y_sim,
 |  | int | index
 | ) |  |

Definition at line 58 of file sym_map.c.

References dpu_smap_t::smap_table.

Referenced by v27TxSt4Init(), v29RxSt4Init(), and v29TxSt2Init().

void dpu_dot | ( | dpu_smap_t * | smap_ptr,
 |  | Fract * | bits,
 |  | Fract * | x_sym,
 |  | Fract * | y_sim,
 |  | int | index
 | ) |  |

Definition at line 89 of file sym_map.c.

References dpu_smap_t::pre_symbol, and dpu_smap_t::smap_table.

Referenced by v27TxSt2Init(), and v29TxSt1Init().

void dpu_v27_St3_smap | ( | dpu_smap_t * | smap_ptr,
 |  | Fract * | bits,
 |  | Fract * | x_sym,
 |  | Fract * | y_sym,
 |  | int | index
 | ) |  |

Definition at line 124 of file sym_map.c.

References dpu_smap_t::pre_symbol, and dpu_smap_t::smap_table.

Referenced by v27RxSt4Init(), and v27TxSt3Init().


FM: dpu_smap.h Source File

dpu_smap.h

Go to the documentation of this file.
00001 #ifndef _DPU_SMAP_H
00002 #define _DPU_SMAP_H
00003 /******************************************************************************
00004  * FILE PURPOSE: Symbol Mapper Header File
00005  ******************************************************************************
00006  * FILE NAME:   dpu_smap.h
00007  *
00008  * DESCRIPTION: This file contains API and definitions for symbol mapper
00009  *              routines for the DPU module.
00010  *
00011  * REQUIRES:    types.h   (generic DSP ECO types)
00012  *
00013  * TABS: NONE
00014  *
00015  * $Id: DPU_SMAP.H 1.2 1997/05/18 12:41:05 Zoran Exp $
00016  *
00017  * REVISION HISTORY:
00018  *
00019  * $Log: DPU_SMAP.H $
00020  * Revision 1.2  1997/05/18 12:41:05  Zoran
00021  *  Cleaned, updated code
00022  * Revision 1.1  1997/02/06 09:36:39  unknown
00023  * Initial revision
00024  *
00025  * (C) Copyright 1996, TELOGY Networks, Inc.
00026  *****************************************************************************/
00027
00028 /* System level header files */
00029 #include <ti/mas/types/types.h>
00030
00031 /* Average power of all constellations - 1
00032    Calculated power V.29 9600   13.5
00033                          7200    5.5
00034                          4800    1
00035                     V.27 4800    1
00036                          2400    1
00037 */
00038 /* Definition of scaling constants for symbol mapper */
00039 #define V29_CSCALE_96 0.2722*TX_CONST_SCALE   /* 1/sqrt(13.5) */
00040 #define V29_CSCALE_72 0.4264*TX_CONST_SCALE   /* 1/sqrt(5.5)  */
00041 #define V29_CSCALE_48 1*TX_CONST_SCALE
00042
00043 #define V27_CSCALE_48 1*TX_CONST_SCALE
00044 #define V27_CSCALE_24 1*TX_CONST_SCALE
00045
00046 /* Symbol Mapper data definition structure */
00047
00048  typedef struct {
00049    Fract   pre_symbol;     /* previous symbol for V27 ST3 application */
00050    const Fract *smap_table ;  /* pointer to symbol mapper table */
00051 } dpu_smap_t;
00052
00053
00054
00055 /* Symbol Mapper API */
00056 void dpu_smap_init(dpu_smap_t *smap_ptr,
00057                   const Fract *smap_table);
00058 void dpu_smap(dpu_smap_t *smap_ptr, Fract *bits, Fract *x_sym, Fract *y_sim, int index);
00059 void dpu_dot(dpu_smap_t *smap_ptr, Fract *bits, Fract *x_sym, Fract *y_sim, int index);
00060 void dpu_v27_St3_smap(dpu_smap_t *smap_ptr, Fract *bits, Fract *x_sym, Fract *y_sym, int index);
00061
00062
00063 #endif  /* _DPU_SMAP_H */
00064 /* nothing past this point */


FM: dpu_tables.c File Reference

dpu_tables.c File Reference

#include <ti/mas/types/types.h>
#include <ti/mas/fract/fract.h>
#include "dpu_shap.h"
#include "dpu_intp.h"
#include "dpu_cd.h"
#include "dpu_cdec.h"
#include "dpuloc.h"
#include "dpumath.h"
#include "dpu_slic.h"
#include "v17.h"

Include dependency graph for dpu_tables.c:

Go to the source code of this file.

Defines

#define | SCALE 0.5

Variables

const v29Table_sPtrs_t | v29tables
const v27Table_sPtrs_t | v27tables
const v17Table_sPtrs_t | v17tables
const commonTable1_sPtrs_t | c1tables

Define Documentation

#define SCALE 0.5

Definition at line 31 of file dpu_tables.c.


FM: dpu_tables.c Source File

dpu_tables.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: For making all the tables into a table cluster for each modulation
00003  ******************************************************************************
00004  * FILE NAME:   dpu_tables.c
00005  *
00006  * DESCRIPTION:
00007  *
00008  * TABS: NONE
00009  *
00010  * $Id: dpu_tables.c 1.0 2002/10/21 22:48:21 Aravind B R Exp $
00011  *
00012  * REVISION HISTORY:
00013  *
00014  * $Log: dpu_smap.c $
00015  * Revision 1.0  2002/10/21 22:48:21  Aravind B R
00016  * Initial revision
00017  *
00018  * (C) Copyright 2002, TELOGY Networks, Inc.
00019  *****************************************************************************/
00020 #include <ti/mas/types/types.h>
00021 #include <ti/mas/fract/fract.h>
00022 #include "dpu_shap.h"
00023 #include "dpu_intp.h"
00024 #include "dpu_cd.h"
00025 #include "dpu_cdec.h"
00026 #include "dpuloc.h"
00027 #include "dpumath.h"
00028 #include "dpu_slic.h"
00029 #include "v17.h"
00030
00031 #define SCALE 0.5
00032
00033 /* V29 Table cluster */
00034 #ifndef PC
00035 #pragma DATA_SECTION (v29tables, "dpuv29RelocatableTables");
00036 #endif
00037 const v29Table_sPtrs_t v29tables =
00038 {
00039   /******************************************************************************
00040   * Constellation Tables
00041   *****************************************************************************/
00042   /* dpu_smap_V29_96[32] table valuse */
00043   {
00044      (Fract)( 3*V29_CSCALE_96),(Fract)( 0),
00045      (Fract)( 1*V29_CSCALE_96),(Fract)( 1*V29_CSCALE_96),
00046      (Fract)( 0),              (Fract)( 3*V29_CSCALE_96),
00047      (Fract)(-1*V29_CSCALE_96),(Fract)( 1*V29_CSCALE_96),
00048      (Fract)(-3*V29_CSCALE_96),(Fract)( 0),
00049      (Fract)(-1*V29_CSCALE_96),(Fract)(-1*V29_CSCALE_96),
00050      (Fract)( 0),              (Fract)(-3*V29_CSCALE_96),
00051      (Fract)( 1*V29_CSCALE_96),(Fract)(-1*V29_CSCALE_96),
00052      (Fract)( 5*V29_CSCALE_96),(Fract)( 0),
00053      (Fract)( 3*V29_CSCALE_96),(Fract)( 3*V29_CSCALE_96),
00054      (Fract)( 0),              (Fract)( 5*V29_CSCALE_96),
00055      (Fract)(-3*V29_CSCALE_96),(Fract)( 3*V29_CSCALE_96),
00056      (Fract)(-5*V29_CSCALE_96),(Fract)( 0),
00057      (Fract)(-3*V29_CSCALE_96),(Fract)(-3*V29_CSCALE_96),
00058      (Fract)( 0),              (Fract)(-5*V29_CSCALE_96),
00059      (Fract)( 3*V29_CSCALE_96),(Fract)(-3*V29_CSCALE_96)
00060   }, /* end of dpu_smap_V29_96[32] table valuse */
00061
00062   /* dpu_smap_V29_72[16] table valuse */
00063   {
00064     (Fract)( 3*V29_CSCALE_72),(Fract)( 0),
00065     (Fract)( 1*V29_CSCALE_72),(Fract)( 1*V29_CSCALE_72),
00066     (Fract)( 0),              (Fract)( 3*V29_CSCALE_72),
00067     (Fract)(-1*V29_CSCALE_72),(Fract)( 1*V29_CSCALE_72),
00068     (Fract)(-3*V29_CSCALE_72),(Fract)( 0),
00069     (Fract)(-1*V29_CSCALE_72),(Fract)(-1*V29_CSCALE_72),
00070     (Fract)( 0),              (Fract)(-3*V29_CSCALE_72),
00071     (Fract)( 1*V29_CSCALE_72),(Fract)(-1*V29_CSCALE_72)
00072   }, /* end of dpu_smap_V29_72[16] table valuse */
00073
00074   /* shape_v29 structure values */
00075   {
00076    {
00077      {
00078        {
00079         (Fract)(0.001228*SHAP_CONST_SCALE), (Fract)(-0.007715*SHAP_CONST_SCALE),
00080         (Fract)(-0.110780*SHAP_CONST_SCALE), (Fract)(0.070443*SHAP_CONST_SCALE),
00081         (Fract)(-0.298746*SHAP_CONST_SCALE), (Fract)(-0.014825*SHAP_CONST_SCALE),
00082         (Fract)(0.000768*SHAP_CONST_SCALE)
00083        },
00084        {
00085         (Fract)(-0.001821*SHAP_CONST_SCALE), (Fract)(-0.014769*SHAP_CONST_SCALE),
00086         (Fract)(0.014529*SHAP_CONST_SCALE), (Fract)(1.051698*SHAP_CONST_SCALE),
00087         (Fract)(0.014529*SHAP_CONST_SCALE), (Fract)(-0.014769*SHAP_CONST_SCALE),
00088         (Fract)(-0.001821*SHAP_CONST_SCALE)
00089        },
00090        {
00091         (Fract)(0.000768*SHAP_CONST_SCALE), (Fract)(-0.014825*SHAP_CONST_SCALE),
00092         (Fract)(-0.298746*SHAP_CONST_SCALE), (Fract)(0.070442*SHAP_CONST_SCALE),
00093         (Fract)(-0.110780*SHAP_CONST_SCALE), (Fract)(-0.007715*SHAP_CONST_SCALE),
00094         (Fract)(0.001228*SHAP_CONST_SCALE)
00095        },
00096        {
00097         (Fract)(0.000000*SHAP_CONST_SCALE), (Fract)(0.000000*SHAP_CONST_SCALE),
00098         (Fract)(0.000000*SHAP_CONST_SCALE), (Fract)(0.000000*SHAP_CONST_SCALE),
00099         (Fract)(0.000000*SHAP_CONST_SCALE), (Fract)(0.000000*SHAP_CONST_SCALE),
00100         (Fract)(0.000000*SHAP_CONST_SCALE)
00101        },
00102        {
00103         (Fract)(0.000000*SHAP_CONST_SCALE), (Fract)(0.000000*SHAP_CONST_SCALE),
00104         (Fract)(0.000000*SHAP_CONST_SCALE), (Fract)(0.000000*SHAP_CONST_SCALE),
00105         (Fract)(0.000000*SHAP_CONST_SCALE), (Fract)(0.000000*SHAP_CONST_SCALE),
00106         (Fract)(0.000000*SHAP_CONST_SCALE)
00107        },
00108        {
00109         (Fract)(0.000000*SHAP_CONST_SCALE), (Fract)(0.000000*SHAP_CONST_SCALE),
00110         (Fract)(0.000000*SHAP_CONST_SCALE), (Fract)(0.000000*SHAP_CONST_SCALE),
00111         (Fract)(0.000000*SHAP_CONST_SCALE), (Fract)(0.000000*SHAP_CONST_SCALE),
00112         (Fract)(0.000000*SHAP_CONST_SCALE)
00113        }
00114      },
00115      {
00116        {
00117         (Fract)(0.001464*SHAP_CONST_SCALE), (Fract)(0.011019*SHAP_CONST_SCALE),
00118         (Fract)(-0.040321*SHAP_CONST_SCALE), (Fract)(-0.805159*SHAP_CONST_SCALE),
00119         (Fract)(0.052677*SHAP_CONST_SCALE), (Fract)(-0.031793*SHAP_CONST_SCALE),
00120         (Fract)(-0.000645*SHAP_CONST_SCALE)
00121        },
00122        {
00123         (Fract)(0.001821*SHAP_CONST_SCALE), (Fract)(-0.008527*SHAP_CONST_SCALE),
00124         (Fract)(-0.054223*SHAP_CONST_SCALE), (Fract)(0.000000*SHAP_CONST_SCALE),
00125         (Fract)(0.054223*SHAP_CONST_SCALE), (Fract)(0.008527*SHAP_CONST_SCALE),
00126         (Fract)(-0.001821*SHAP_CONST_SCALE)
00127        },
00128        {
00129         (Fract)(0.000645*SHAP_CONST_SCALE), (Fract)(0.031793*SHAP_CONST_SCALE),
00130         (Fract)(-0.052677*SHAP_CONST_SCALE), (Fract)(0.805159*SHAP_CONST_SCALE),
00131         (Fract)(0.040321*SHAP_CONST_SCALE), (Fract)(-0.011019*SHAP_CONST_SCALE),
00132         (Fract)(-0.001464*SHAP_CONST_SCALE)
00133        },
00134        {
00135         (Fract)(0.000000*SHAP_CONST_SCALE), (Fract)(0.000000*SHAP_CONST_SCALE),
00136         (Fract)(0.000000*SHAP_CONST_SCALE), (Fract)(0.000000*SHAP_CONST_SCALE),
00137         (Fract)(0.000000*SHAP_CONST_SCALE), (Fract)(0.000000*SHAP_CONST_SCALE),
00138         (Fract)(0.000000*SHAP_CONST_SCALE)
00139        },
00140        {
00141         (Fract)(0.000000*SHAP_CONST_SCALE), (Fract)(0.000000*SHAP_CONST_SCALE),
00142         (Fract)(0.000000*SHAP_CONST_SCALE), (Fract)(0.000000*SHAP_CONST_SCALE),
00143         (Fract)(0.000000*SHAP_CONST_SCALE), (Fract)(0.000000*SHAP_CONST_SCALE),
00144         (Fract)(0.000000*SHAP_CONST_SCALE)
00145        },
00146        {
00147         (Fract)(0.000000*SHAP_CONST_SCALE), (Fract)(0.000000*SHAP_CONST_SCALE),
00148         (Fract)(0.000000*SHAP_CONST_SCALE), (Fract)(0.000000*SHAP_CONST_SCALE),
00149         (Fract)(0.000000*SHAP_CONST_SCALE), (Fract)(0.000000*SHAP_CONST_SCALE),
00150         (Fract)(0.000000*SHAP_CONST_SCALE)
00151        }
00152      }
00153    }
00154   }, /* end of shape_v29 structure values */
00155
00156   /*  dpu_slic_pt_V29_72[32] table values */
00157   {
00158    (Fract)( 1*V29_RX_CSCALE_72),  /* I quadrant decision points */
00159    (Fract)( 1*V29_RX_CSCALE_72),
00160    (Fract)( 3*V29_RX_CSCALE_72),
00161    (Fract)( 0*V29_RX_CSCALE_72),
00162    (Fract)( 1*V29_RX_CSCALE_72),
00163    (Fract)( 1*V29_RX_CSCALE_72),
00164    (Fract)( 0*V29_RX_CSCALE_72),
00165    (Fract)( 3*V29_RX_CSCALE_72),
00166
00167    (Fract)( 1*V29_RX_CSCALE_72),  /* II quadrant decision points */
00168    (Fract)(-1*V29_RX_CSCALE_72),
00169    (Fract)( 3*V29_RX_CSCALE_72),
00170    (Fract)( 0*V29_RX_CSCALE_72),
00171    (Fract)( 1*V29_RX_CSCALE_72),
00172    (Fract)(-1*V29_RX_CSCALE_72),
00173    (Fract)( 0*V29_RX_CSCALE_72),
00174    (Fract)(-3*V29_RX_CSCALE_72),
00175
00176    (Fract)(-1*V29_RX_CSCALE_72),  /* IV quadrant decision points */
00177    (Fract)( 1*V29_RX_CSCALE_72),
00178    (Fract)(-3*V29_RX_CSCALE_72),
00179    (Fract)( 0*V29_RX_CSCALE_72),
00180    (Fract)(-1*V29_RX_CSCALE_72),
00181    (Fract)( 1*V29_RX_CSCALE_72),
00182    (Fract)( 0*V29_RX_CSCALE_72),
00183    (Fract)( 3*V29_RX_CSCALE_72),
00184
00185    (Fract)(-1*V29_RX_CSCALE_72),  /* III quadrant decision points */
00186    (Fract)(-1*V29_RX_CSCALE_72),
00187    (Fract)(-3*V29_RX_CSCALE_72),
00188    (Fract)( 0*V29_RX_CSCALE_72),
00189    (Fract)(-1*V29_RX_CSCALE_72),
00190    (Fract)(-1*V29_RX_CSCALE_72),
00191    (Fract)( 0*V29_RX_CSCALE_72),
00192    (Fract)(-3*V29_RX_CSCALE_72)
00193   }, /* end of const Fract dpu_slic_pt_V29_72[32] */
00194
00195   /* dpu_slic_pt_V29_96 table values */
00196   {
00197    (Fract)( 1*V29_RX_CSCALE_96),  /* I quadrant decision points */
00198    (Fract)( 1*V29_RX_CSCALE_96),
00199    (Fract)( 3*V29_RX_CSCALE_96),
00200    (Fract)( 0*V29_RX_CSCALE_96),
00201    (Fract)( 5*V29_RX_CSCALE_96),
00202    (Fract)( 0*V29_RX_CSCALE_96),
00203    (Fract)( 3*V29_RX_CSCALE_96),
00204    (Fract)( 3*V29_RX_CSCALE_96),
00205
00206    (Fract)( 1*V29_RX_CSCALE_96),
00207    (Fract)( 1*V29_RX_CSCALE_96),
00208    (Fract)( 0*V29_RX_CSCALE_96),
00209    (Fract)( 3*V29_RX_CSCALE_96),
00210    (Fract)( 0*V29_RX_CSCALE_96),
00211    (Fract)( 5*V29_RX_CSCALE_96),
00212    (Fract)( 3*V29_RX_CSCALE_96),
00213    (Fract)( 3*V29_RX_CSCALE_96),
00214
00215    (Fract)( 1*V29_RX_CSCALE_96),  /* II quadrant decision points */
00216    (Fract)(-1*V29_RX_CSCALE_96),
00217    (Fract)( 3*V29_RX_CSCALE_96),
00218    (Fract)( 0*V29_RX_CSCALE_96),
00219    (Fract)( 5*V29_RX_CSCALE_96),
00220    (Fract)( 0*V29_RX_CSCALE_96),
00221    (Fract)( 3*V29_RX_CSCALE_96),
00222    (Fract)(-3*V29_RX_CSCALE_96),
00223
00224    (Fract)( 1*V29_RX_CSCALE_96),
00225    (Fract)(-1*V29_RX_CSCALE_96),
00226    (Fract)( 0*V29_RX_CSCALE_96),
00227    (Fract)(-3*V29_RX_CSCALE_96),
00228    (Fract)( 0*V29_RX_CSCALE_96),
00229    (Fract)(-5*V29_RX_CSCALE_96),
00230    (Fract)( 3*V29_RX_CSCALE_96),
00231    (Fract)(-3*V29_RX_CSCALE_96),
00232
00233    (Fract)(-1*V29_RX_CSCALE_96),  /* IV quadrant decision points */
00234    (Fract)( 1*V29_RX_CSCALE_96),
00235    (Fract)(-3*V29_RX_CSCALE_96),
00236    (Fract)( 0*V29_RX_CSCALE_96),
00237    (Fract)(-5*V29_RX_CSCALE_96),
00238    (Fract)( 0*V29_RX_CSCALE_96),
00239    (Fract)(-3*V29_RX_CSCALE_96),
00240    (Fract)( 3*V29_RX_CSCALE_96),
00241
00242    (Fract)(-1*V29_RX_CSCALE_96),
00243    (Fract)( 1*V29_RX_CSCALE_96),
00244    (Fract)( 0*V29_RX_CSCALE_96),
00245    (Fract)( 3*V29_RX_CSCALE_96),
00246    (Fract)( 0*V29_RX_CSCALE_96),
00247    (Fract)( 5*V29_RX_CSCALE_96),
00248    (Fract)(-3*V29_RX_CSCALE_96),
00249    (Fract)( 3*V29_RX_CSCALE_96),
00250
00251    (Fract)(-1*V29_RX_CSCALE_96),  /* III quadrant decision points */
00252    (Fract)(-1*V29_RX_CSCALE_96),
00253    (Fract)(-3*V29_RX_CSCALE_96),
00254    (Fract)( 0*V29_RX_CSCALE_96),
00255    (Fract)(-5*V29_RX_CSCALE_96),
00256    (Fract)( 0*V29_RX_CSCALE_96),
00257    (Fract)(-3*V29_RX_CSCALE_96),
00258    (Fract)(-3*V29_RX_CSCALE_96),
00259
00260    (Fract)(-1*V29_RX_CSCALE_96),
00261    (Fract)(-1*V29_RX_CSCALE_96),
00262    (Fract)( 0*V29_RX_CSCALE_96),
00263    (Fract)(-3*V29_RX_CSCALE_96),
00264    (Fract)( 0*V29_RX_CSCALE_96),
00265    (Fract)(-5*V29_RX_CSCALE_96),
00266    (Fract)(-3*V29_RX_CSCALE_96),
00267    (Fract)(-3*V29_RX_CSCALE_96)
00268   }, /* end of dpu_slic_pt_V29_96 table values */
00269
00270   /* dpu_denc_V29_9600_pt[8] table values */
00271   /******************************************************************************
00272   * Tables for Differential Encoding
00273   * V29_9600 table is used for V.29 9600,7200 and V.27 4800
00274   *****************************************************************************/
00275   {
00276    1,0,2,3,6,7,5,4
00277   }, /* end of dpu_denc_V29_9600_pt[8] table values */
00278
00279   /* dpu_denc_V29_4800_pt[4] table values */
00280   /******************************************************************************
00281   * Tables for Differential Encoding
00282   * V29_4800 table is used for V.29 4800 and V.27 2400
00283   *****************************************************************************/
00284   {
00285    0,1,3,2
00286   }, /* end of  dpu_denc_V29_4800_pt[4] table values */
00287
00288   /* dpu_ddec_V29_9600_pt[8] table values */
00289   /******************************************************************************
00290   * Tables for Differential Decoding
00291   * V29_9600 table is used for V.29 9600,7200 and V.27 4800
00292   *****************************************************************************/
00293   {
00294    1,0,2,3,7,6,4,5
00295   }, /* end of  dpu_ddec_V29_9600_pt[8] table values */
00296
00297   /* dpu_ddec_V29_4800_pt[4] table values */
00298   {
00299    0,1,3,2
00300   }, /* end of  dpu_ddec_V29_4800_pt[4] table values */
00301
00302   /* dpu_slic_bits_V29_72_pt[16] table values */
00303    {
00304     1, 0, 1, 2,
00305     7, 0, 7, 6,
00306     3, 4, 3, 2,
00307     5, 4, 5, 6
00308   }, /* end of  dpu_slic_bits_V29_72_pt[16] table values */
00309
00310   /* dpu_slic_bits_V29_96_pt[32] table values */
00311    {
00312     1, 0, 8, 9, 1, 2,10, 9,
00313     7, 0, 8,15, 7, 6,14,15,
00314     3, 4,12,11, 3, 2,10,11,
00315     5, 4,12,13, 5, 6,14,13
00316    }, /* end of  dpu_slic_bits_V29_96_pt[32] table values */
00317
00318   /* dpu_slic_invmod_V29_96_pt[4] table values */
00319   {
00320    (Fract)V29_INVMOD_PT0_96,    /* Inverse modulo for all decision points */
00321    (Fract)V29_INVMOD_PT1_96,
00322    (Fract)V29_INVMOD_PT3_96,
00323    (Fract)V29_INVMOD_PT2_96
00324   }, /* end of  dpu_slic_invmod_V29_96_pt[4] table values */
00325
00326   /* bp_rx_v29_pt[43] table values */
00327   {
00328   (Fract)(0.000275*INTERP_CONST_SCALE), (Fract)(0.002479*INTERP_CONST_SCALE),
00329   (Fract)(0.001138*INTERP_CONST_SCALE), (Fract)(0.000803*INTERP_CONST_SCALE),
00330   (Fract)(0.007034*INTERP_CONST_SCALE), (Fract)(0.004266*INTERP_CONST_SCALE),
00331   (Fract)(-0.001384*INTERP_CONST_SCALE), (Fract)(0.009832*INTERP_CONST_SCALE),
00332   (Fract)(0.006577*INTERP_CONST_SCALE), (Fract)(-0.012769*INTERP_CONST_SCALE),
00333   (Fract)(0.001954*INTERP_CONST_SCALE), (Fract)(0.004016*INTERP_CONST_SCALE),
00334   (Fract)(-0.038762*INTERP_CONST_SCALE), (Fract)(-0.025237*INTERP_CONST_SCALE),
00335   (Fract)(-0.001509*INTERP_CONST_SCALE), (Fract)(-0.076191*INTERP_CONST_SCALE),
00336   (Fract)(-0.076193*INTERP_CONST_SCALE), (Fract)(0.009880*INTERP_CONST_SCALE),
00337   (Fract)(-0.110801*INTERP_CONST_SCALE), (Fract)(-0.188516*INTERP_CONST_SCALE),
00338   (Fract)(0.210698*INTERP_CONST_SCALE), (Fract)(0.541667*INTERP_CONST_SCALE),
00339   (Fract)(0.210698*INTERP_CONST_SCALE), (Fract)(-0.188516*INTERP_CONST_SCALE),
00340   (Fract)(-0.110801*INTERP_CONST_SCALE), (Fract)(0.009880*INTERP_CONST_SCALE),
00341   (Fract)(-0.076193*INTERP_CONST_SCALE), (Fract)(-0.076191*INTERP_CONST_SCALE),
00342   (Fract)(-0.001509*INTERP_CONST_SCALE), (Fract)(-0.025237*INTERP_CONST_SCALE),
00343   (Fract)(-0.038762*INTERP_CONST_SCALE), (Fract)(0.004016*INTERP_CONST_SCALE),
00344   (Fract)(0.001954*INTERP_CONST_SCALE), (Fract)(-0.012769*INTERP_CONST_SCALE),
00345   (Fract)(0.006577*INTERP_CONST_SCALE), (Fract)(0.009832*INTERP_CONST_SCALE),
00346   (Fract)(-0.001384*INTERP_CONST_SCALE), (Fract)(0.004266*INTERP_CONST_SCALE),
00347   (Fract)(0.007034*INTERP_CONST_SCALE), (Fract)(0.000803*INTERP_CONST_SCALE),
00348   (Fract)(0.001138*INTERP_CONST_SCALE), (Fract)(0.002479*INTERP_CONST_SCALE),
00349   (Fract)(0.000275*INTERP_CONST_SCALE)
00350   }, /* end of  bp_rx_v29_pt[43] table values */
00351
00352   /* bp_hilb_v29_pt[43] table values */
00353   {
00354   (Fract)(-0.000021*INTERP_CONST_SCALE), (Fract)(0.000257*INTERP_CONST_SCALE),
00355   (Fract)(0.000178*INTERP_CONST_SCALE), (Fract)(0.000599*INTERP_CONST_SCALE),
00356   (Fract)(0.001407*INTERP_CONST_SCALE), (Fract)(0.002450*INTERP_CONST_SCALE),
00357   (Fract)(0.002433*INTERP_CONST_SCALE), (Fract)(0.006994*INTERP_CONST_SCALE),
00358   (Fract)(0.009039*INTERP_CONST_SCALE), (Fract)(0.006710*INTERP_CONST_SCALE),
00359   (Fract)(-0.002226*INTERP_CONST_SCALE), (Fract)(0.020488*INTERP_CONST_SCALE),
00360   (Fract)(0.023028*INTERP_CONST_SCALE), (Fract)(-0.021487*INTERP_CONST_SCALE),
00361   (Fract)(0.018173*INTERP_CONST_SCALE), (Fract)(0.027875*INTERP_CONST_SCALE),
00362   (Fract)(-0.068472*INTERP_CONST_SCALE), (Fract)(-0.040448*INTERP_CONST_SCALE),
00363   (Fract)(0.022071*INTERP_CONST_SCALE), (Fract)(-0.246056*INTERP_CONST_SCALE),
00364   (Fract)(-0.427351*INTERP_CONST_SCALE), (Fract)(0.000000*INTERP_CONST_SCALE),
00365   (Fract)(0.427351*INTERP_CONST_SCALE), (Fract)(0.246056*INTERP_CONST_SCALE),
00366   (Fract)(-0.022071*INTERP_CONST_SCALE), (Fract)(0.040448*INTERP_CONST_SCALE),
00367   (Fract)(0.068472*INTERP_CONST_SCALE), (Fract)(-0.027875*INTERP_CONST_SCALE),
00368   (Fract)(-0.018173*INTERP_CONST_SCALE), (Fract)(0.021487*INTERP_CONST_SCALE),
00369   (Fract)(-0.023028*INTERP_CONST_SCALE), (Fract)(-0.020488*INTERP_CONST_SCALE),
00370   (Fract)(0.002226*INTERP_CONST_SCALE), (Fract)(-0.006710*INTERP_CONST_SCALE),
00371   (Fract)(-0.009039*INTERP_CONST_SCALE), (Fract)(-0.006994*INTERP_CONST_SCALE),
00372   (Fract)(-0.002433*INTERP_CONST_SCALE), (Fract)(-0.002450*INTERP_CONST_SCALE),
00373   (Fract)(-0.001407*INTERP_CONST_SCALE), (Fract)(-0.000599*INTERP_CONST_SCALE),
00374   (Fract)(-0.000178*INTERP_CONST_SCALE), (Fract)(-0.000257*INTERP_CONST_SCALE),
00375   (Fract)(0.000021*INTERP_CONST_SCALE)
00376   }  /* end of  bp_hilb_v29_pt[43] table values */
00377 };
00378
00379 #ifndef PC
00380 /* V27 Table cluster */
00381 #pragma DATA_SECTION (v27tables, "dpuv27RelocatableTables");
00382 #endif
00383 const v27Table_sPtrs_t v27tables =
00384 {
00385    /*  dpu_smap_V27_48[16] table values */
00386    {
00387             1     *V27_CSCALE_48,           0,
00388    (Fract)( 0.7071*V27_CSCALE_48), (Fract)( 0.7071*V27_CSCALE_48),
00389             0,                              1     *V27_CSCALE_48,
00390    (Fract)(-0.7071*V27_CSCALE_48), (Fract)( 0.7071*V27_CSCALE_48),
00391            -1     *V27_CSCALE_48,           0,
00392    (Fract)(-0.7071*V27_CSCALE_48), (Fract)(-0.7071*V27_CSCALE_48),
00393             0,                             -1     *V27_CSCALE_48,
00394    (Fract)( 0.7071*V27_CSCALE_48), (Fract)(-0.7071*V27_CSCALE_48)
00395    }, /*  end of dpu_smap_V27_48[16] table values */
00396
00397    /*  dpu_smap_V27_24[8] table values */
00398    {
00399    1*V27_CSCALE_24, 0,
00400    0,               1*V27_CSCALE_24,
00401   -1*V27_CSCALE_24, 0,
00402    0,              -1*V27_CSCALE_24
00403    }, /*  end of dpu_smap_V27_24[8] table values */
00404
00405     /*  shape_v27_24 table values */
00406    {
00407      {
00408        {
00409          {
00410           (Fract)(0.001428*SHAP_CONST_SCALE), (Fract)(0.000955*SHAP_CONST_SCALE),
00411           (Fract)(-0.050640*SHAP_CONST_SCALE), (Fract)(-0.555109*SHAP_CONST_SCALE),
00412           (Fract)(0.315513*SHAP_CONST_SCALE), (Fract)(0.016224*SHAP_CONST_SCALE),
00413           (Fract)(-0.001881*SHAP_CONST_SCALE)
00414          },
00415          {
00416           (Fract)(0.001260*SHAP_CONST_SCALE), (Fract)(-0.002659*SHAP_CONST_SCALE),
00417           (Fract)(-0.082745*SHAP_CONST_SCALE), (Fract)(-0.767844*SHAP_CONST_SCALE),
00418           (Fract)(0.108635*SHAP_CONST_SCALE), (Fract)(-0.005212*SHAP_CONST_SCALE),
00419           (Fract)(-0.001260*SHAP_CONST_SCALE)
00420          },
00421          {
00422           (Fract)(-0.000611*SHAP_CONST_SCALE), (Fract)(0.008216*SHAP_CONST_SCALE),
00423           (Fract)(0.085122*SHAP_CONST_SCALE), (Fract)(0.893203*SHAP_CONST_SCALE),
00424           (Fract)(0.027431*SHAP_CONST_SCALE), (Fract)(0.011444*SHAP_CONST_SCALE),
00425           (Fract)(0.000268*SHAP_CONST_SCALE)
00426          },
00427          {
00428           (Fract)(0.000268*SHAP_CONST_SCALE), (Fract)(0.011444*SHAP_CONST_SCALE),
00429           (Fract)(0.027431*SHAP_CONST_SCALE), (Fract)(0.893205*SHAP_CONST_SCALE),
00430           (Fract)(0.085122*SHAP_CONST_SCALE), (Fract)(0.008216*SHAP_CONST_SCALE),
00431           (Fract)(-0.000611*SHAP_CONST_SCALE)
00432          },
00433          {
00434           (Fract)(-0.001260*SHAP_CONST_SCALE), (Fract)(-0.005212*SHAP_CONST_SCALE),
00435           (Fract)(0.108635*SHAP_CONST_SCALE), (Fract)(-0.767844*SHAP_CONST_SCALE),
00436           (Fract)(-0.082745*SHAP_CONST_SCALE), (Fract)(-0.002659*SHAP_CONST_SCALE),
00437           (Fract)(0.001260*SHAP_CONST_SCALE)
00438          },
00439          {
00440           (Fract)(-0.001881*SHAP_CONST_SCALE), (Fract)(0.016224*SHAP_CONST_SCALE),
00441           (Fract)(0.315514*SHAP_CONST_SCALE), (Fract)(-0.555111*SHAP_CONST_SCALE),
00442           (Fract)(-0.050640*SHAP_CONST_SCALE), (Fract)(0.000955*SHAP_CONST_SCALE),
00443           (Fract)(0.001428*SHAP_CONST_SCALE)
00444          }
00445        },
00446        {
00447          {
00448           (Fract)(-0.001428*SHAP_CONST_SCALE), (Fract)(-0.000955*SHAP_CONST_SCALE),
00449           (Fract)(0.050641*SHAP_CONST_SCALE), (Fract)(0.555110*SHAP_CONST_SCALE),
00450           (Fract)(-0.315514*SHAP_CONST_SCALE), (Fract)(-0.016224*SHAP_CONST_SCALE),
00451           (Fract)(0.001881*SHAP_CONST_SCALE)
00452          },
00453         {
00454          (Fract)(0.001260*SHAP_CONST_SCALE), (Fract)(-0.002659*SHAP_CONST_SCALE),
00455          (Fract)(-0.082745*SHAP_CONST_SCALE), (Fract)(-0.767844*SHAP_CONST_SCALE),
00456          (Fract)(0.108635*SHAP_CONST_SCALE), (Fract)(-0.005212*SHAP_CONST_SCALE),
00457          (Fract)(-0.001260*SHAP_CONST_SCALE)
00458         },
00459         {
00460          (Fract)(0.000611*SHAP_CONST_SCALE), (Fract)(-0.008216*SHAP_CONST_SCALE),
00461          (Fract)(-0.085122*SHAP_CONST_SCALE), (Fract)(-0.893205*SHAP_CONST_SCALE),
00462          (Fract)(-0.027431*SHAP_CONST_SCALE), (Fract)(-0.011444*SHAP_CONST_SCALE),
00463          (Fract)(-0.000268*SHAP_CONST_SCALE)
00464         },
00465         {
00466          (Fract)(0.000268*SHAP_CONST_SCALE), (Fract)(0.011444*SHAP_CONST_SCALE),
00467          (Fract)(0.027431*SHAP_CONST_SCALE), (Fract)(0.893204*SHAP_CONST_SCALE),
00468          (Fract)(0.085122*SHAP_CONST_SCALE), (Fract)(0.008216*SHAP_CONST_SCALE),
00469          (Fract)(-0.000611*SHAP_CONST_SCALE)
00470         },
00471         {
00472          (Fract)(0.001260*SHAP_CONST_SCALE), (Fract)(0.005212*SHAP_CONST_SCALE),
00473          (Fract)(-0.108635*SHAP_CONST_SCALE), (Fract)(0.767844*SHAP_CONST_SCALE),
00474          (Fract)(0.082745*SHAP_CONST_SCALE), (Fract)(0.002659*SHAP_CONST_SCALE),
00475          (Fract)(-0.001260*SHAP_CONST_SCALE)
00476         },
00477         {
00478          (Fract)(-0.001881*SHAP_CONST_SCALE), (Fract)(0.016224*SHAP_CONST_SCALE),
00479          (Fract)(0.315513*SHAP_CONST_SCALE), (Fract)(-0.555109*SHAP_CONST_SCALE),
00480          (Fract)(-0.050641*SHAP_CONST_SCALE), (Fract)(0.000955*SHAP_CONST_SCALE),
00481          (Fract)(0.001428*SHAP_CONST_SCALE)
00482         }
00483       }
00484     }
00485   }, /*  end of  shape_v27_24 table values */
00486
00487   /*  shape_v27_48[1] table values */
00488   {
00489     {
00490       {
00491         {
00492          (Fract)(0.000163*SHAP_CONST_SCALE*0.81), (Fract)(0.000665*SHAP_CONST_SCALE*0.81),
00493          (Fract)(0.031979*SHAP_CONST_SCALE*0.81), (Fract)(-0.638802*SHAP_CONST_SCALE*0.81),
00494          (Fract)(-0.194200*SHAP_CONST_SCALE*0.81), (Fract)(-0.000722*SHAP_CONST_SCALE*0.81),
00495          (Fract)(-0.001794*SHAP_CONST_SCALE*0.81)
00496         },
00497         {
00498          (Fract)(-0.000593*SHAP_CONST_SCALE*0.81), (Fract)(0.002004*SHAP_CONST_SCALE*0.81),
00499          (Fract)(0.066831*SHAP_CONST_SCALE*0.81), (Fract)(-0.180928*SHAP_CONST_SCALE*0.81),
00500          (Fract)(0.056465*SHAP_CONST_SCALE*0.81), (Fract)(0.011191*SHAP_CONST_SCALE*0.81),
00501          (Fract)(-0.000359*SHAP_CONST_SCALE*0.81)
00502         },
00503         {
00504          (Fract)(-0.001166*SHAP_CONST_SCALE*0.81), (Fract)(-0.001871*SHAP_CONST_SCALE*0.81),
00505          (Fract)(-0.019027*SHAP_CONST_SCALE*0.81), (Fract)(0.908628*SHAP_CONST_SCALE*0.81),
00506          (Fract)(-0.046681*SHAP_CONST_SCALE*0.81), (Fract)(0.005803*SHAP_CONST_SCALE*0.81),
00507          (Fract)(-0.000139*SHAP_CONST_SCALE*0.81)
00508         },
00509         {
00510          (Fract)(-0.000139*SHAP_CONST_SCALE*0.81), (Fract)(0.005803*SHAP_CONST_SCALE*0.81),
00511          (Fract)(-0.046681*SHAP_CONST_SCALE*0.81), (Fract)(0.908629*SHAP_CONST_SCALE*0.81),
00512          (Fract)(-0.019027*SHAP_CONST_SCALE*0.81), (Fract)(-0.001871*SHAP_CONST_SCALE*0.81),
00513          (Fract)(-0.001166*SHAP_CONST_SCALE*0.81)
00514         },
00515         {
00516          (Fract)(-0.000359*SHAP_CONST_SCALE*0.81), (Fract)(0.011191*SHAP_CONST_SCALE*0.81),
00517          (Fract)(0.056465*SHAP_CONST_SCALE*0.81), (Fract)(-0.180928*SHAP_CONST_SCALE*0.81),
00518          (Fract)(0.066831*SHAP_CONST_SCALE*0.81), (Fract)(0.002004*SHAP_CONST_SCALE*0.81),
00519          (Fract)(-0.000593*SHAP_CONST_SCALE*0.81)
00520         },
00521         {
00522          (Fract)(-0.001794*SHAP_CONST_SCALE*0.81), (Fract)(-0.000722*SHAP_CONST_SCALE*0.81),
00523          (Fract)(-0.194199*SHAP_CONST_SCALE*0.81), (Fract)(-0.638803*SHAP_CONST_SCALE*0.81),
00524          (Fract)(0.031979*SHAP_CONST_SCALE*0.81), (Fract)(0.000665*SHAP_CONST_SCALE*0.81),
00525          (Fract)(0.000163*SHAP_CONST_SCALE*0.81)
00526         }
00527       },
00528       {
00529         {
00530          (Fract)(0.000244*SHAP_CONST_SCALE*0.81), (Fract)(-0.003343*SHAP_CONST_SCALE*0.81),
00531          (Fract)(-0.021368*SHAP_CONST_SCALE*0.81), (Fract)(-0.127065*SHAP_CONST_SCALE*0.81),
00532          (Fract)(-0.290641*SHAP_CONST_SCALE*0.81), (Fract)(0.003627*SHAP_CONST_SCALE*0.81),
00533          (Fract)(0.001199*SHAP_CONST_SCALE*0.81)
00534         },
00535         {
00536          (Fract)(0.000888*SHAP_CONST_SCALE*0.81), (Fract)(-0.000399*SHAP_CONST_SCALE*0.81),
00537          (Fract)(0.044655*SHAP_CONST_SCALE*0.81), (Fract)(-0.909588*SHAP_CONST_SCALE*0.81),
00538          (Fract)(-0.084506*SHAP_CONST_SCALE*0.81), (Fract)(-0.002226*SHAP_CONST_SCALE*0.81),
00539          (Fract)(-0.000240*SHAP_CONST_SCALE*0.81)
00540         },
00541         {
00542          (Fract)(-0.000232*SHAP_CONST_SCALE*0.81), (Fract)(-0.002800*SHAP_CONST_SCALE*0.81),
00543          (Fract)(0.095655*SHAP_CONST_SCALE*0.81), (Fract)(-0.607127*SHAP_CONST_SCALE*0.81),
00544          (Fract)(-0.009286*SHAP_CONST_SCALE*0.81), (Fract)(0.008685*SHAP_CONST_SCALE*0.81),
00545          (Fract)(0.000698*SHAP_CONST_SCALE*0.81)
00546         },
00547         {
00548          (Fract)(-0.000698*SHAP_CONST_SCALE*0.81), (Fract)(-0.008685*SHAP_CONST_SCALE*0.81),
00549          (Fract)(0.009286*SHAP_CONST_SCALE*0.81), (Fract)(0.607126*SHAP_CONST_SCALE*0.81),
00550          (Fract)(-0.095655*SHAP_CONST_SCALE*0.81), (Fract)(0.002800*SHAP_CONST_SCALE*0.81),
00551          (Fract)(0.000232*SHAP_CONST_SCALE*0.81)
00552         },
00553         {
00554          (Fract)(0.000240*SHAP_CONST_SCALE*0.81), (Fract)(0.002226*SHAP_CONST_SCALE*0.81),
00555          (Fract)(0.084506*SHAP_CONST_SCALE*0.81), (Fract)(0.909588*SHAP_CONST_SCALE*0.81),
00556          (Fract)(-0.044655*SHAP_CONST_SCALE*0.81), (Fract)(0.000399*SHAP_CONST_SCALE*0.81),
00557          (Fract)(-0.000888*SHAP_CONST_SCALE*0.81)
00558         },
00559         {
00560          (Fract)(-0.001199*SHAP_CONST_SCALE*0.81), (Fract)(-0.003627*SHAP_CONST_SCALE*0.81),
00561          (Fract)(0.290641*SHAP_CONST_SCALE*0.81), (Fract)(0.127066*SHAP_CONST_SCALE*0.81),
00562          (Fract)(0.021368*SHAP_CONST_SCALE*0.81), (Fract)(0.003343*SHAP_CONST_SCALE*0.81),
00563          (Fract)(-0.000244*SHAP_CONST_SCALE*0.81)
00564         }
00565       }
00566     }
00567   }, /*  end of shape_v27_48[1] table values */
00568
00569   /*  dpu_slic_pt_V27_48[16] table values */
00570   {
00571    (Fract)( 0.9239*V27_RX_CSCALE_48), /* I quadrant */
00572    (Fract)( 0.3827*V27_RX_CSCALE_48),
00573
00574    (Fract)( 0.3827*V27_RX_CSCALE_48),
00575    (Fract)( 0.9239*V27_RX_CSCALE_48),
00576
00577    (Fract)( 0.9239*V27_RX_CSCALE_48), /* II quadrant */
00578    (Fract)(-0.3827*V27_RX_CSCALE_48),
00579
00580    (Fract)( 0.3827*V27_RX_CSCALE_48),
00581    (Fract)(-0.9239*V27_RX_CSCALE_48),
00582
00583    (Fract)(-0.9239*V27_RX_CSCALE_48), /* IV quadrant */
00584    (Fract)( 0.3827*V27_RX_CSCALE_48),
00585
00586    (Fract)(-0.3827*V27_RX_CSCALE_48),
00587    (Fract)( 0.9239*V27_RX_CSCALE_48),
00588
00589    (Fract)(-0.9239*V27_RX_CSCALE_48), /* III quadrant */
00590    (Fract)(-0.3827*V27_RX_CSCALE_48),
00591
00592    (Fract)(-0.3827*V27_RX_CSCALE_48),
00593    (Fract)(-0.9239*V27_RX_CSCALE_48)
00594   }, /*  end of dpu_slic_pt_V27_48[16] table values */
00595
00596   /*  dpu_slic_pt_V27_24[8] table values */
00597   {
00598    (Fract)( 0.7071*V27_RX_CSCALE_24),
00599    (Fract)( 0.7071*V27_RX_CSCALE_24), /* I quadrant decision points */
00600    (Fract)( 0.7071*V27_RX_CSCALE_24),
00601    (Fract)(-0.7071*V27_RX_CSCALE_24), /* II quadrant decision points */
00602    (Fract)(-0.7071*V27_RX_CSCALE_24),
00603    (Fract)( 0.7071*V27_RX_CSCALE_24), /* IV quadrant decision points */
00604    (Fract)(-0.7071*V27_RX_CSCALE_24),
00605    (Fract)(-0.7071*V27_RX_CSCALE_24)  /* III quadrant decision points */
00606   }, /*  end of dpu_slic_pt_V27_24[8] table values */
00607
00608   /*  dpu_slic_bits_V27_48[8] table values */
00609   {
00610       0, 1, 7, 6,
00611       3, 2, 4, 5
00612   }, /*  end of dpu_slic_bits_V27_48[8] table values */
00613
00614   /*  dpu_v27_count[8] table values */
00615   {
00616     240, 30,   /* count for rate 2400 ST0, ST1 */
00617     320, 40,   /* count for rate 4800 ST0, ST1 */
00618     14, 58,    /* count for trn. type short ST2, ST3 */
00619     50, 1074   /* 50, 1074 *//* count for trn. type long ST2, ST3 */
00620   },/*  end of  dpu_v27_count[8] table values */
00621
00622   /*  bp_rx_v27_48[45] table values */
00623   {
00624     (Fract)(0.000397*INTERP_CONST_SCALE), (Fract)(-0.000086*INTERP_CONST_SCALE),
00625     (Fract)(0.000211*INTERP_CONST_SCALE), (Fract)(0.003572*INTERP_CONST_SCALE),
00626     (Fract)(0.003266*INTERP_CONST_SCALE), (Fract)(-0.002317*INTERP_CONST_SCALE),
00627     (Fract)(-0.001024*INTERP_CONST_SCALE), (Fract)(0.001748*INTERP_CONST_SCALE),
00628     (Fract)(-0.011084*INTERP_CONST_SCALE), (Fract)(-0.018095*INTERP_CONST_SCALE),
00629     (Fract)(0.001524*INTERP_CONST_SCALE), (Fract)(0.007940*INTERP_CONST_SCALE),
00630     (Fract)(-0.008219*INTERP_CONST_SCALE), (Fract)(0.016539*INTERP_CONST_SCALE),
00631     (Fract)(0.058122*INTERP_CONST_SCALE), (Fract)(0.020889*INTERP_CONST_SCALE),
00632     (Fract)(-0.027442*INTERP_CONST_SCALE), (Fract)(0.016766*INTERP_CONST_SCALE),
00633     (Fract)(-0.002658*INTERP_CONST_SCALE), (Fract)(-0.184957*INTERP_CONST_SCALE),
00634     (Fract)(-0.202435*INTERP_CONST_SCALE), (Fract)(0.138175*INTERP_CONST_SCALE),
00635     (Fract)(0.379167*INTERP_CONST_SCALE), (Fract)(0.138175*INTERP_CONST_SCALE),
00636     (Fract)(-0.202435*INTERP_CONST_SCALE), (Fract)(-0.184957*INTERP_CONST_SCALE),
00637     (Fract)(-0.002658*INTERP_CONST_SCALE), (Fract)(0.016766*INTERP_CONST_SCALE),
00638     (Fract)(-0.027442*INTERP_CONST_SCALE), (Fract)(0.020889*INTERP_CONST_SCALE),
00639     (Fract)(0.058122*INTERP_CONST_SCALE), (Fract)(0.016539*INTERP_CONST_SCALE),
00640     (Fract)(-0.008219*INTERP_CONST_SCALE), (Fract)(0.007940*INTERP_CONST_SCALE),
00641     (Fract)(0.001524*INTERP_CONST_SCALE), (Fract)(-0.018095*INTERP_CONST_SCALE),
00642     (Fract)(-0.011084*INTERP_CONST_SCALE), (Fract)(0.001748*INTERP_CONST_SCALE),
00643     (Fract)(-0.001024*INTERP_CONST_SCALE), (Fract)(-0.002317*INTERP_CONST_SCALE),
00644     (Fract)(0.003266*INTERP_CONST_SCALE), (Fract)(0.003572*INTERP_CONST_SCALE),
00645     (Fract)(0.000211*INTERP_CONST_SCALE), (Fract)(-0.000086*INTERP_CONST_SCALE),
00646     (Fract)(0.000397*INTERP_CONST_SCALE)
00647   }, /*  end of  bp_rx_v27_48[45] table values */
00648
00649   /*  bp_hilb_v27_48[45] table values */
00650   {
00651     (Fract)(-0.000028*INTERP_CONST_SCALE), (Fract)(0.000044*INTERP_CONST_SCALE),
00652     (Fract)(-0.000205*INTERP_CONST_SCALE), (Fract)(-0.000424*INTERP_CONST_SCALE),
00653     (Fract)(-0.000712*INTERP_CONST_SCALE), (Fract)(-0.000497*INTERP_CONST_SCALE),
00654     (Fract)(-0.001747*INTERP_CONST_SCALE), (Fract)(-0.000911*INTERP_CONST_SCALE),
00655     (Fract)(0.000431*INTERP_CONST_SCALE), (Fract)(0.003294*INTERP_CONST_SCALE),
00656     (Fract)(-0.006722*INTERP_CONST_SCALE), (Fract)(-0.006100*INTERP_CONST_SCALE),
00657     (Fract)(-0.008968*INTERP_CONST_SCALE), (Fract)(-0.032216*INTERP_CONST_SCALE),
00658     (Fract)(0.008204*INTERP_CONST_SCALE), (Fract)(0.059647*INTERP_CONST_SCALE),
00659     (Fract)(0.029544*INTERP_CONST_SCALE), (Fract)(0.011126*INTERP_CONST_SCALE),
00660     (Fract)(0.104285*INTERP_CONST_SCALE), (Fract)(0.072103*INTERP_CONST_SCALE),
00661     (Fract)(-0.206568*INTERP_CONST_SCALE), (Fract)(-0.327392*INTERP_CONST_SCALE),
00662     (Fract)(0.000000*INTERP_CONST_SCALE), (Fract)(0.327392*INTERP_CONST_SCALE),
00663     (Fract)(0.206568*INTERP_CONST_SCALE), (Fract)(-0.072103*INTERP_CONST_SCALE),
00664     (Fract)(-0.104285*INTERP_CONST_SCALE), (Fract)(-0.011126*INTERP_CONST_SCALE),
00665     (Fract)(-0.029544*INTERP_CONST_SCALE), (Fract)(-0.059647*INTERP_CONST_SCALE),
00666     (Fract)(-0.008204*INTERP_CONST_SCALE), (Fract)(0.032216*INTERP_CONST_SCALE),
00667     (Fract)(0.008968*INTERP_CONST_SCALE), (Fract)(0.006100*INTERP_CONST_SCALE),
00668     (Fract)(0.006722*INTERP_CONST_SCALE), (Fract)(-0.003294*INTERP_CONST_SCALE),
00669     (Fract)(-0.000431*INTERP_CONST_SCALE), (Fract)(0.000911*INTERP_CONST_SCALE),
00670     (Fract)(0.001747*INTERP_CONST_SCALE), (Fract)(0.000497*INTERP_CONST_SCALE),
00671     (Fract)(0.000712*INTERP_CONST_SCALE), (Fract)(0.000424*INTERP_CONST_SCALE),
00672     (Fract)(0.000205*INTERP_CONST_SCALE), (Fract)(-0.000044*INTERP_CONST_SCALE),
00673    (Fract)(0.000028*INTERP_CONST_SCALE)
00674
00675   } /*  end of bp_hilb_v27_48[45] table values */
00676 };
00677 #ifndef PC
00678 /* V17 Table cluster */
00679 #pragma DATA_SECTION (v17tables, "dpuv17RelocatableTables");
00680 #endif
00681 const v17Table_sPtrs_t v17tables =
00682 {
00683   /* dpu_smap_V17_120[128]    table values  */
00684   {
00685   /* 000000 */  (Fract)( 7*V17_CSCALE),(Fract)( 1*V17_CSCALE),
00686   /* 000001 */  (Fract)( 3*V17_CSCALE),(Fract)( 5*V17_CSCALE),
00687   /* 000010 */  (Fract)( 7*V17_CSCALE),(Fract)(-7*V17_CSCALE),
00688   /* 000011 */  (Fract)(-5*V17_CSCALE),(Fract)( 5*V17_CSCALE),
00689   /* 000100 */  (Fract)( 3*V17_CSCALE),(Fract)(-3*V17_CSCALE),
00690   /* 000101 */  (Fract)(-1*V17_CSCALE),(Fract)( 1*V17_CSCALE),
00691   /* 000110 */  (Fract)(-1*V17_CSCALE),(Fract)(-7*V17_CSCALE),
00692   /* 000111 */  (Fract)(-5*V17_CSCALE),(Fract)(-3*V17_CSCALE),
00693   /* 001000 */  (Fract)(-7*V17_CSCALE),(Fract)(-1*V17_CSCALE),
00694   /* 001001 */  (Fract)(-3*V17_CSCALE),(Fract)(-5*V17_CSCALE),
00695   /* 001010 */  (Fract)(-7*V17_CSCALE),(Fract)( 7*V17_CSCALE),
00696   /* 001011 */  (Fract)( 5*V17_CSCALE),(Fract)(-5*V17_CSCALE),
00697   /* 001100 */  (Fract)(-3*V17_CSCALE),(Fract)( 3*V17_CSCALE),
00698   /* 001101 */  (Fract)( 1*V17_CSCALE),(Fract)(-1*V17_CSCALE),
00699   /* 001110 */  (Fract)( 1*V17_CSCALE),(Fract)( 7*V17_CSCALE),
00700   /* 001111 */  (Fract)( 5*V17_CSCALE),(Fract)( 3*V17_CSCALE),
00701   /* 010000 */  (Fract)(-1*V17_CSCALE),(Fract)( 5*V17_CSCALE),
00702   /* 010001 */  (Fract)(-5*V17_CSCALE),(Fract)( 1*V17_CSCALE),
00703   /* 010010 */  (Fract)( 7*V17_CSCALE),(Fract)( 5*V17_CSCALE),
00704   /* 010011 */  (Fract)(-5*V17_CSCALE),(Fract)(-7*V17_CSCALE),
00705   /* 010100 */  (Fract)( 3*V17_CSCALE),(Fract)( 1*V17_CSCALE),
00706   /* 010101 */  (Fract)(-1*V17_CSCALE),(Fract)(-3*V17_CSCALE),
00707   /* 010110 */  (Fract)( 7*V17_CSCALE),(Fract)(-3*V17_CSCALE),
00708   /* 010111 */  (Fract)( 3*V17_CSCALE),(Fract)(-7*V17_CSCALE),
00709   /* 011000 */  (Fract)( 1*V17_CSCALE),(Fract)(-5*V17_CSCALE),
00710   /* 011001 */  (Fract)( 5*V17_CSCALE),(Fract)(-1*V17_CSCALE),
00711   /* 011010 */  (Fract)(-7*V17_CSCALE),(Fract)(-5*V17_CSCALE),
00712   /* 011011 */  (Fract)( 5*V17_CSCALE),(Fract)( 7*V17_CSCALE),
00713   /* 011100 */  (Fract)(-3*V17_CSCALE),(Fract)(-1*V17_CSCALE),
00714   /* 011101 */  (Fract)( 1*V17_CSCALE),(Fract)( 3*V17_CSCALE),
00715   /* 011110 */  (Fract)(-7*V17_CSCALE),(Fract)( 3*V17_CSCALE),
00716   /* 011111 */  (Fract)(-3*V17_CSCALE),(Fract)( 7*V17_CSCALE),
00717   /* 100000 */  (Fract)(-5*V17_CSCALE),(Fract)(-1*V17_CSCALE),
00718   /* 100001 */  (Fract)(-1*V17_CSCALE),(Fract)(-5*V17_CSCALE),
00719   /* 100010 */  (Fract)(-5*V17_CSCALE),(Fract)( 7*V17_CSCALE),
00720   /* 100011 */  (Fract)( 7*V17_CSCALE),(Fract)(-5*V17_CSCALE),
00721   /* 100100 */  (Fract)(-1*V17_CSCALE),(Fract)( 3*V17_CSCALE),
00722   /* 100101 */  (Fract)( 3*V17_CSCALE),(Fract)(-1*V17_CSCALE),
00723   /* 100110 */  (Fract)( 3*V17_CSCALE),(Fract)( 7*V17_CSCALE),
00724   /* 100111 */  (Fract)( 7*V17_CSCALE),(Fract)( 3*V17_CSCALE),
00725   /* 101000 */  (Fract)( 5*V17_CSCALE),(Fract)( 1*V17_CSCALE),
00726   /* 101001 */  (Fract)( 1*V17_CSCALE),(Fract)( 5*V17_CSCALE),
00727   /* 101010 */  (Fract)( 5*V17_CSCALE),(Fract)(-7*V17_CSCALE),
00728   /* 101011 */  (Fract)(-7*V17_CSCALE),(Fract)( 5*V17_CSCALE),
00729   /* 101100 */  (Fract)( 1*V17_CSCALE),(Fract)(-3*V17_CSCALE),
00730   /* 101101 */  (Fract)(-3*V17_CSCALE),(Fract)( 1*V17_CSCALE),
00731   /* 101110 */  (Fract)(-3*V17_CSCALE),(Fract)(-7*V17_CSCALE),
00732   /* 101111 */  (Fract)(-7*V17_CSCALE),(Fract)(-3*V17_CSCALE),
00733   /* 110000 */  (Fract)( 1*V17_CSCALE),(Fract)(-7*V17_CSCALE),
00734   /* 110001 */  (Fract)( 5*V17_CSCALE),(Fract)(-3*V17_CSCALE),
00735   /* 110010 */  (Fract)(-7*V17_CSCALE),(Fract)(-7*V17_CSCALE),
00736   /* 110011 */  (Fract)( 5*V17_CSCALE),(Fract)( 5*V17_CSCALE),
00737   /* 110100 */  (Fract)(-3*V17_CSCALE),(Fract)(-3*V17_CSCALE),
00738   /* 110101 */  (Fract)( 1*V17_CSCALE),(Fract)( 1*V17_CSCALE),
00739   /* 110110 */  (Fract)(-7*V17_CSCALE),(Fract)( 1*V17_CSCALE),
00740   /* 110111 */  (Fract)(-3*V17_CSCALE),(Fract)( 5*V17_CSCALE),
00741   /* 111000 */  (Fract)(-1*V17_CSCALE),(Fract)( 7*V17_CSCALE),
00742   /* 111001 */  (Fract)(-5*V17_CSCALE),(Fract)( 3*V17_CSCALE),
00743   /* 111010 */  (Fract)( 7*V17_CSCALE),(Fract)( 7*V17_CSCALE),
00744   /* 111011 */  (Fract)(-5*V17_CSCALE),(Fract)(-5*V17_CSCALE),
00745   /* 111100 */  (Fract)( 3*V17_CSCALE),(Fract)( 3*V17_CSCALE),
00746   /* 111101 */  (Fract)(-1*V17_CSCALE),(Fract)(-1*V17_CSCALE),
00747   /* 111110 */  (Fract)( 7*V17_CSCALE),(Fract)(-1*V17_CSCALE),
00748   /* 111111 */  (Fract)( 3*V17_CSCALE),(Fract)(-5*V17_CSCALE)
00749   }, /* end of dpu_smap_V17_120[128]    table values  */
00750
00751   /* dpu_smap_V17_144[256]    table values  */
00752   {
00753   /* 0000000 */  (Fract)(-8*V17_CSCALE),(Fract)(-3*V17_CSCALE),
00754   /* 0000001 */  (Fract)( 8*V17_CSCALE),(Fract)(-3*V17_CSCALE),
00755   /* 0000010 */  (Fract)( 4*V17_CSCALE),(Fract)(-3*V17_CSCALE),
00756   /* 0000011 */  (Fract)( 4*V17_CSCALE),(Fract)(-7*V17_CSCALE),
00757   /* 0000100 */  (Fract)(-4*V17_CSCALE),(Fract)(-3*V17_CSCALE),
00758   /* 0000101 */  (Fract)(-4*V17_CSCALE),(Fract)(-7*V17_CSCALE),
00759   /* 0000110 */  (Fract)( 0*V17_CSCALE),(Fract)(-3*V17_CSCALE),
00760   /* 0000111 */  (Fract)( 0*V17_CSCALE),(Fract)(-7*V17_CSCALE),
00761   /* 0001000 */  (Fract)(-8*V17_CSCALE),(Fract)( 1*V17_CSCALE),
00762   /* 0001001 */  (Fract)( 8*V17_CSCALE),(Fract)( 1*V17_CSCALE),
00763   /* 0001010 */  (Fract)( 4*V17_CSCALE),(Fract)( 1*V17_CSCALE),
00764   /* 0001011 */  (Fract)( 4*V17_CSCALE),(Fract)( 5*V17_CSCALE),
00765   /* 0001100 */  (Fract)(-4*V17_CSCALE),(Fract)( 1*V17_CSCALE),
00766   /* 0001101 */  (Fract)(-4*V17_CSCALE),(Fract)( 5*V17_CSCALE),
00767   /* 0001110 */  (Fract)( 0*V17_CSCALE),(Fract)( 1*V17_CSCALE),
00768   /* 0001111 */  (Fract)( 0*V17_CSCALE),(Fract)( 5*V17_CSCALE),
00769   /* 0010000 */  (Fract)( 8*V17_CSCALE),(Fract)( 3*V17_CSCALE),
00770   /* 0010001 */  (Fract)(-8*V17_CSCALE),(Fract)( 3*V17_CSCALE),
00771   /* 0010010 */  (Fract)(-4*V17_CSCALE),(Fract)( 3*V17_CSCALE),
00772   /* 0010011 */  (Fract)(-4*V17_CSCALE),(Fract)( 7*V17_CSCALE),
00773   /* 0010100 */  (Fract)( 4*V17_CSCALE),(Fract)( 3*V17_CSCALE),
00774   /* 0010101 */  (Fract)( 4*V17_CSCALE),(Fract)( 7*V17_CSCALE),
00775   /* 0010110 */  (Fract)( 0*V17_CSCALE),(Fract)( 3*V17_CSCALE),
00776   /* 0010111 */  (Fract)( 0)           ,(Fract)( 7*V17_CSCALE),
00777   /* 0011000 */  (Fract)( 8*V17_CSCALE),(Fract)(-1*V17_CSCALE),
00778   /* 0011001 */  (Fract)(-8*V17_CSCALE),(Fract)(-1*V17_CSCALE),
00779   /* 0011010 */  (Fract)(-4*V17_CSCALE),(Fract)(-1*V17_CSCALE),
00780   /* 0011011 */  (Fract)(-4*V17_CSCALE),(Fract)(-5*V17_CSCALE),
00781   /* 0011100 */  (Fract)( 4*V17_CSCALE),(Fract)(-1*V17_CSCALE),
00782   /* 0011101 */  (Fract)( 4*V17_CSCALE),(Fract)(-5*V17_CSCALE),
00783   /* 0011110 */  (Fract)( 0*V17_CSCALE),(Fract)(-1*V17_CSCALE),
00784   /* 0011111 */  (Fract)( 0*V17_CSCALE),(Fract)(-5*V17_CSCALE),
00785   /* 0100000 */  (Fract)( 2*V17_CSCALE),(Fract)(-9*V17_CSCALE),
00786   /* 0100001 */  (Fract)( 2*V17_CSCALE),(Fract)( 7*V17_CSCALE),
00787   /* 0100010 */  (Fract)( 2*V17_CSCALE),(Fract)( 3*V17_CSCALE),
00788   /* 0100011 */  (Fract)( 6*V17_CSCALE),(Fract)( 3*V17_CSCALE),
00789   /* 0100100 */  (Fract)( 2*V17_CSCALE),(Fract)(-5*V17_CSCALE),
00790   /* 0100101 */  (Fract)( 6*V17_CSCALE),(Fract)(-5*V17_CSCALE),
00791   /* 0100110 */  (Fract)( 2*V17_CSCALE),(Fract)(-1*V17_CSCALE),
00792   /* 0100111 */  (Fract)( 6*V17_CSCALE),(Fract)(-1*V17_CSCALE),
00793   /* 0101000 */  (Fract)(-2*V17_CSCALE),(Fract)(-9*V17_CSCALE),
00794   /* 0101001 */  (Fract)(-2*V17_CSCALE),(Fract)( 7*V17_CSCALE),
00795   /* 0101010 */  (Fract)(-2*V17_CSCALE),(Fract)( 3*V17_CSCALE),
00796   /* 0101011 */  (Fract)(-6*V17_CSCALE),(Fract)( 3*V17_CSCALE),
00797   /* 0101100 */  (Fract)(-2*V17_CSCALE),(Fract)(-5*V17_CSCALE),
00798   /* 0101101 */  (Fract)(-6*V17_CSCALE),(Fract)(-5*V17_CSCALE),
00799   /* 0101110 */  (Fract)(-2*V17_CSCALE),(Fract)(-1*V17_CSCALE),
00800   /* 0101111 */  (Fract)(-6*V17_CSCALE),(Fract)(-1*V17_CSCALE),
00801   /* 0110000 */  (Fract)(-2*V17_CSCALE),(Fract)( 9*V17_CSCALE),
00802   /* 0110001 */  (Fract)(-2*V17_CSCALE),(Fract)(-7*V17_CSCALE),
00803   /* 0110010 */  (Fract)(-2*V17_CSCALE),(Fract)(-3*V17_CSCALE),
00804   /* 0110011 */  (Fract)(-6*V17_CSCALE),(Fract)(-3*V17_CSCALE),
00805   /* 0110100 */  (Fract)(-2*V17_CSCALE),(Fract)( 5*V17_CSCALE),
00806   /* 0110101 */  (Fract)(-6*V17_CSCALE),(Fract)( 5*V17_CSCALE),
00807   /* 0110110 */  (Fract)(-2*V17_CSCALE),(Fract)( 1*V17_CSCALE),
00808   /* 0110111 */  (Fract)(-6*V17_CSCALE),(Fract)( 1*V17_CSCALE),
00809   /* 0111000 */  (Fract)( 2*V17_CSCALE),(Fract)( 9*V17_CSCALE),
00810   /* 0111001 */  (Fract)( 2*V17_CSCALE),(Fract)(-7*V17_CSCALE),
00811   /* 0111010 */  (Fract)( 2*V17_CSCALE),(Fract)(-3*V17_CSCALE),
00812   /* 0111011 */  (Fract)( 6*V17_CSCALE),(Fract)(-3*V17_CSCALE),
00813   /* 0111100 */  (Fract)( 2*V17_CSCALE),(Fract)( 5*V17_CSCALE),
00814   /* 0111101 */  (Fract)( 6*V17_CSCALE),(Fract)( 5*V17_CSCALE),
00815   /* 0111110 */  (Fract)( 2*V17_CSCALE),(Fract)( 1*V17_CSCALE),
00816   /* 0111111 */  (Fract)( 6*V17_CSCALE),(Fract)( 1*V17_CSCALE),
00817   /* 1000000 */  (Fract)( 9*V17_CSCALE),(Fract)( 2*V17_CSCALE),
00818   /* 1000001 */  (Fract)(-7*V17_CSCALE),(Fract)( 2*V17_CSCALE),
00819   /* 1000010 */  (Fract)(-3*V17_CSCALE),(Fract)( 2*V17_CSCALE),
00820   /* 1000011 */  (Fract)(-3*V17_CSCALE),(Fract)( 6*V17_CSCALE),
00821   /* 1000100 */  (Fract)( 5*V17_CSCALE),(Fract)( 2*V17_CSCALE),
00822   /* 1000101 */  (Fract)( 5*V17_CSCALE),(Fract)( 6*V17_CSCALE),
00823   /* 1000110 */  (Fract)( 1*V17_CSCALE),(Fract)( 2*V17_CSCALE),
00824   /* 1000111 */  (Fract)( 1*V17_CSCALE),(Fract)( 6*V17_CSCALE),
00825   /* 1001000 */  (Fract)( 9*V17_CSCALE),(Fract)(-2*V17_CSCALE),
00826   /* 1001001 */  (Fract)(-7*V17_CSCALE),(Fract)(-2*V17_CSCALE),
00827   /* 1001010 */  (Fract)(-3*V17_CSCALE),(Fract)(-2*V17_CSCALE),
00828   /* 1001011 */  (Fract)(-3*V17_CSCALE),(Fract)(-6*V17_CSCALE),
00829   /* 1001100 */  (Fract)( 5*V17_CSCALE),(Fract)(-2*V17_CSCALE),
00830   /* 1001101 */  (Fract)( 5*V17_CSCALE),(Fract)(-6*V17_CSCALE),
00831   /* 1001110 */  (Fract)( 1*V17_CSCALE),(Fract)(-2*V17_CSCALE),
00832   /* 1001111 */  (Fract)( 1*V17_CSCALE),(Fract)(-6*V17_CSCALE),
00833   /* 1010000 */  (Fract)(-9*V17_CSCALE),(Fract)(-2*V17_CSCALE),
00834   /* 1010001 */  (Fract)( 7*V17_CSCALE),(Fract)(-2*V17_CSCALE),
00835   /* 1010010 */  (Fract)( 3*V17_CSCALE),(Fract)(-2*V17_CSCALE),
00836   /* 1010011 */  (Fract)( 3*V17_CSCALE),(Fract)(-6*V17_CSCALE),
00837   /* 1010100 */  (Fract)(-5*V17_CSCALE),(Fract)(-2*V17_CSCALE),
00838   /* 1010101 */  (Fract)(-5*V17_CSCALE),(Fract)(-6*V17_CSCALE),
00839   /* 1010110 */  (Fract)(-1*V17_CSCALE),(Fract)(-2*V17_CSCALE),
00840   /* 1010111 */  (Fract)(-1*V17_CSCALE),(Fract)(-6*V17_CSCALE),
00841   /* 1011000 */  (Fract)(-9*V17_CSCALE),(Fract)( 2*V17_CSCALE),
00842   /* 1011001 */  (Fract)( 7*V17_CSCALE),(Fract)( 2*V17_CSCALE),
00843   /* 1011010 */  (Fract)( 3*V17_CSCALE),(Fract)( 2*V17_CSCALE),
00844   /* 1011011 */  (Fract)( 3*V17_CSCALE),(Fract)( 6*V17_CSCALE),
00845   /* 1011100 */  (Fract)(-5*V17_CSCALE),(Fract)( 2*V17_CSCALE),
00846   /* 1011101 */  (Fract)(-5*V17_CSCALE),(Fract)( 6*V17_CSCALE),
00847   /* 1011110 */  (Fract)(-1*V17_CSCALE),(Fract)( 2*V17_CSCALE),
00848   /* 1011111 */  (Fract)(-1*V17_CSCALE),(Fract)( 6*V17_CSCALE),
00849   /* 1100000 */  (Fract)(-3*V17_CSCALE),(Fract)( 8*V17_CSCALE),
00850   /* 1100001 */  (Fract)(-3*V17_CSCALE),(Fract)(-8*V17_CSCALE),
00851   /* 1100010 */  (Fract)(-3*V17_CSCALE),(Fract)(-4*V17_CSCALE),
00852   /* 1100011 */  (Fract)(-7*V17_CSCALE),(Fract)(-4*V17_CSCALE),
00853   /* 1100100 */  (Fract)(-3*V17_CSCALE),(Fract)( 4*V17_CSCALE),
00854   /* 1100101 */  (Fract)(-7*V17_CSCALE),(Fract)( 4*V17_CSCALE),
00855   /* 1100110 */  (Fract)(-3*V17_CSCALE),(Fract)( 0*V17_CSCALE),
00856   /* 1100111 */  (Fract)(-7*V17_CSCALE),(Fract)( 0*V17_CSCALE),
00857   /* 1101000 */  (Fract)( 1*V17_CSCALE),(Fract)( 8*V17_CSCALE),
00858   /* 1101001 */  (Fract)( 1*V17_CSCALE),(Fract)(-8*V17_CSCALE),
00859   /* 1101010 */  (Fract)( 1*V17_CSCALE),(Fract)(-4*V17_CSCALE),
00860   /* 1101011 */  (Fract)( 5*V17_CSCALE),(Fract)(-4*V17_CSCALE),
00861   /* 1101100 */  (Fract)( 1*V17_CSCALE),(Fract)( 4*V17_CSCALE),
00862   /* 1101101 */  (Fract)( 5*V17_CSCALE),(Fract)( 4*V17_CSCALE),
00863   /* 1101110 */  (Fract)( 1*V17_CSCALE),(Fract)( 0*V17_CSCALE),
00864   /* 1101111 */  (Fract)( 5*V17_CSCALE),(Fract)( 0*V17_CSCALE),
00865   /* 1110000 */  (Fract)( 3*V17_CSCALE),(Fract)(-8*V17_CSCALE),
00866   /* 1110001 */  (Fract)( 3*V17_CSCALE),(Fract)( 8*V17_CSCALE),
00867   /* 1110010 */  (Fract)( 3*V17_CSCALE),(Fract)( 4*V17_CSCALE),
00868   /* 1110011 */  (Fract)( 7*V17_CSCALE),(Fract)( 4*V17_CSCALE),
00869   /* 1110100 */  (Fract)( 3*V17_CSCALE),(Fract)(-4*V17_CSCALE),
00870   /* 1110101 */  (Fract)( 7*V17_CSCALE),(Fract)(-4*V17_CSCALE),
00871   /* 1110110 */  (Fract)( 3*V17_CSCALE),(Fract)( 0*V17_CSCALE),
00872   /* 1110111 */  (Fract)( 7*V17_CSCALE),(Fract)( 0),
00873   /* 1111000 */  (Fract)(-1*V17_CSCALE),(Fract)(-8*V17_CSCALE),
00874   /* 1111001 */  (Fract)(-1*V17_CSCALE),(Fract)( 8*V17_CSCALE),
00875   /* 1111010 */  (Fract)(-1*V17_CSCALE),(Fract)( 4*V17_CSCALE),
00876   /* 1111011 */  (Fract)(-5*V17_CSCALE),(Fract)( 4*V17_CSCALE),
00877   /* 1111100 */  (Fract)(-1*V17_CSCALE),(Fract)(-4*V17_CSCALE),
00878   /* 1111101 */  (Fract)(-5*V17_CSCALE),(Fract)(-4*V17_CSCALE),
00879   /* 1111110 */  (Fract)(-1*V17_CSCALE),(Fract)( 0*V17_CSCALE),
00880   /* 1111111 */  (Fract)(-5*V17_CSCALE),(Fract)( 0)
00881   }, /* end of dpu_smap_V17_144[256]    table values  */
00882
00883   /* shape_v17[1]    table values  */
00884   /* real_coefficients */
00885  {
00886    {
00887      {
00888        {
00889        (Fract)( 0.000000*SHAP_CONST_SCALE), (Fract)( -0.011888*SHAP_CONST_SCALE),
00890        (Fract)( -0.000000*SHAP_CONST_SCALE),(Fract)( 0.717657*SHAP_CONST_SCALE),
00891        (Fract)( -0.000000*SHAP_CONST_SCALE),(Fract)( -0.011888*SHAP_CONST_SCALE),
00892        (Fract)( 0.000000*SHAP_CONST_SCALE)
00893        },
00894        {
00895        (Fract)( 0.008261*SHAP_CONST_SCALE),(Fract)( 0.000000*SHAP_CONST_SCALE),
00896        (Fract)( -0.243473*SHAP_CONST_SCALE),(Fract)( -0.000000*SHAP_CONST_SCALE),
00897        (Fract)( -0.104104*SHAP_CONST_SCALE),(Fract)( 0.000000*SHAP_CONST_SCALE),
00898        (Fract)( 0.000000*SHAP_CONST_SCALE)
00899        },
00900        {
00901        (Fract)( 0.000000*SHAP_CONST_SCALE),(Fract)( -0.104104*SHAP_CONST_SCALE),
00902        (Fract)( -0.000000*SHAP_CONST_SCALE),(Fract)( -0.243473*SHAP_CONST_SCALE),
00903        (Fract)( 0.000000*SHAP_CONST_SCALE),(Fract)( 0.008261*SHAP_CONST_SCALE),
00904        (Fract)( 0.000000*SHAP_CONST_SCALE)
00905        },
00906        {
00907        (Fract)(0.000000*SHAP_CONST_SCALE), (Fract)(0.000000*SHAP_CONST_SCALE),
00908        (Fract)(0.000000*SHAP_CONST_SCALE), (Fract)(0.000000*SHAP_CONST_SCALE),
00909        (Fract)(0.000000*SHAP_CONST_SCALE), (Fract)(0.000000*SHAP_CONST_SCALE),
00910        (Fract)(0.000000*SHAP_CONST_SCALE)
00911        },
00912        {
00913         (Fract)(0.000000*SHAP_CONST_SCALE), (Fract)(0.000000*SHAP_CONST_SCALE),
00914         (Fract)(0.000000*SHAP_CONST_SCALE), (Fract)(0.000000*SHAP_CONST_SCALE),
00915         (Fract)(0.000000*SHAP_CONST_SCALE), (Fract)(0.000000*SHAP_CONST_SCALE),
00916         (Fract)(0.000000*SHAP_CONST_SCALE)
00917        },
00918        {
00919         (Fract)(0.000000*SHAP_CONST_SCALE), (Fract)(0.000000*SHAP_CONST_SCALE),
00920         (Fract)(0.000000*SHAP_CONST_SCALE), (Fract)(0.000000*SHAP_CONST_SCALE),
00921         (Fract)(0.000000*SHAP_CONST_SCALE), (Fract)(0.000000*SHAP_CONST_SCALE),
00922         (Fract)(0.000000*SHAP_CONST_SCALE)
00923        }
00924      },
00925      {
00926        {
00927         (Fract)( 0.002992*SHAP_CONST_SCALE), (Fract)( 0.000000*SHAP_CONST_SCALE),
00928         (Fract)( -0.024239*SHAP_CONST_SCALE),(Fract)( 0.000000*SHAP_CONST_SCALE),
00929         (Fract)( 0.024239*SHAP_CONST_SCALE), (Fract)( -0.000000*SHAP_CONST_SCALE),
00930         (Fract)( -0.002992*SHAP_CONST_SCALE)
00931         },
00932         {
00933         (Fract)( -0.000000*SHAP_CONST_SCALE),(Fract)( 0.050531*SHAP_CONST_SCALE),
00934         (Fract)( 0.000000*SHAP_CONST_SCALE), (Fract)( 0.569324*SHAP_CONST_SCALE),
00935         (Fract)( -0.000000*SHAP_CONST_SCALE),(Fract)( -0.024307*SHAP_CONST_SCALE),
00936         (Fract)( 0.000000*SHAP_CONST_SCALE)
00937         },
00938         {
00939         (Fract)( 0.024307*SHAP_CONST_SCALE), (Fract)( 0.000000*SHAP_CONST_SCALE),
00940         (Fract)( -0.569324*SHAP_CONST_SCALE),(Fract)( -0.000000*SHAP_CONST_SCALE),
00941         (Fract)( -0.050531*SHAP_CONST_SCALE),(Fract)( 0.000000*SHAP_CONST_SCALE),
00942         (Fract)( 0.000000*SHAP_CONST_SCALE)
00943         },
00944         {
00945         (Fract)(0.000000*SHAP_CONST_SCALE),(Fract)(0.000000*SHAP_CONST_SCALE),
00946         (Fract)(0.000000*SHAP_CONST_SCALE),(Fract)(0.000000*SHAP_CONST_SCALE),
00947         (Fract)(0.000000*SHAP_CONST_SCALE),(Fract)(0.000000*SHAP_CONST_SCALE),
00948         (Fract)(0.000000*SHAP_CONST_SCALE)
00949        },
00950        {
00951         (Fract)(0.000000*SHAP_CONST_SCALE),(Fract)(0.000000*SHAP_CONST_SCALE),
00952         (Fract)(0.000000*SHAP_CONST_SCALE),(Fract)(0.000000*SHAP_CONST_SCALE),
00953         (Fract)(0.000000*SHAP_CONST_SCALE),(Fract)(0.000000*SHAP_CONST_SCALE),
00954         (Fract)(0.000000*SHAP_CONST_SCALE)
00955        },
00956        {
00957         (Fract)(0.000000*SHAP_CONST_SCALE), (Fract)(0.000000*SHAP_CONST_SCALE),
00958         (Fract)(0.000000*SHAP_CONST_SCALE), (Fract)(0.000000*SHAP_CONST_SCALE),
00959         (Fract)(0.000000*SHAP_CONST_SCALE), (Fract)(0.000000*SHAP_CONST_SCALE),
00960         (Fract)(0.000000*SHAP_CONST_SCALE)
00961        }
00962      }
00963    }
00964  }, /* end of shape_v17[1]    table values  */
00965
00966   /* dpu_smap_V17_96[64]    table values  */
00967   {
00968    /* 00000 */  (Fract)(-8*V17_CSCALE),(Fract)( 2*V17_CSCALE),
00969    /* 00001 */  (Fract)( 0)           ,(Fract)(-6*V17_CSCALE),
00970    /* 00010 */  (Fract)( 0)           ,(Fract)( 2*V17_CSCALE),
00971    /* 00011 */  (Fract)( 8*V17_CSCALE),(Fract)( 2*V17_CSCALE),
00972    /* 00100 */  (Fract)( 8*V17_CSCALE),(Fract)(-2*V17_CSCALE),
00973    /* 00101 */  (Fract)( 0)           ,(Fract)( 6*V17_CSCALE),
00974    /* 00110 */  (Fract)( 0)           ,(Fract)(-2*V17_CSCALE),
00975    /* 00111 */  (Fract)(-8*V17_CSCALE),(Fract)(-2*V17_CSCALE),
00976    /* 01000 */  (Fract)(-4*V17_CSCALE),(Fract)( 6*V17_CSCALE),
00977    /* 01001 */  (Fract)(-4*V17_CSCALE),(Fract)(-2*V17_CSCALE),
00978    /* 01010 */  (Fract)( 4*V17_CSCALE),(Fract)( 6*V17_CSCALE),
00979    /* 01011 */  (Fract)( 4*V17_CSCALE),(Fract)(-2*V17_CSCALE),
00980    /* 01100 */  (Fract)( 4*V17_CSCALE),(Fract)(-6*V17_CSCALE),
00981    /* 01101 */  (Fract)( 4*V17_CSCALE),(Fract)( 2*V17_CSCALE),
00982    /* 01110 */  (Fract)(-4*V17_CSCALE),(Fract)(-6*V17_CSCALE),
00983    /* 01111 */  (Fract)(-4*V17_CSCALE),(Fract)( 2*V17_CSCALE),
00984    /* 10000 */  (Fract)(-6*V17_CSCALE),(Fract)(-4*V17_CSCALE),
00985    /* 10001 */  (Fract)( 2*V17_CSCALE),(Fract)(-4*V17_CSCALE),
00986    /* 10010 */  (Fract)(-6*V17_CSCALE),(Fract)( 4*V17_CSCALE),
00987    /* 10011 */  (Fract)( 2*V17_CSCALE),(Fract)( 4*V17_CSCALE),
00988    /* 10100 */  (Fract)( 6*V17_CSCALE),(Fract)( 4*V17_CSCALE),
00989    /* 10101 */  (Fract)(-2*V17_CSCALE),(Fract)( 4*V17_CSCALE),
00990    /* 10110 */  (Fract)( 6*V17_CSCALE),(Fract)(-4*V17_CSCALE),
00991    /* 10111 */  (Fract)(-2*V17_CSCALE),(Fract)(-4*V17_CSCALE),
00992    /* 11000 */  (Fract)( 2*V17_CSCALE),(Fract)( 8*V17_CSCALE),
00993    /* 11001 */  (Fract)(-6*V17_CSCALE),(Fract)( 0),
00994    /* 11010 */  (Fract)( 2*V17_CSCALE),(Fract)( 0),
00995    /* 11011 */  (Fract)( 2*V17_CSCALE),(Fract)(-8*V17_CSCALE),
00996    /* 11100 */  (Fract)(-2*V17_CSCALE),(Fract)(-8*V17_CSCALE),
00997    /* 11101 */  (Fract)( 6*V17_CSCALE),(Fract)( 0),
00998    /* 11110 */  (Fract)(-2*V17_CSCALE),(Fract)( 0),
00999    /* 11111 */  (Fract)(-2*V17_CSCALE),(Fract)( 8*V17_CSCALE)
01000    }, /* end of dpu_smap_V17_96[64]    table values  */
01001
01002    /* dpu_smap_V17_72[32]    table values  */
01003    {
01004     /* 0000 */  (Fract)( 6*V17_CSCALE),(Fract)(-6*V17_CSCALE),
01005     /* 0001 */  (Fract)(-2*V17_CSCALE),(Fract)( 2*V17_CSCALE),
01006     /* 0010 */  (Fract)(-6*V17_CSCALE),(Fract)( 6*V17_CSCALE),
01007     /* 0011 */  (Fract)( 2*V17_CSCALE),(Fract)(-2*V17_CSCALE),
01008     /* 0100 */  (Fract)( 6*V17_CSCALE),(Fract)( 2*V17_CSCALE),
01009     /* 0101 */  (Fract)(-2*V17_CSCALE),(Fract)(-6*V17_CSCALE),
01010     /* 0110 */  (Fract)(-6*V17_CSCALE),(Fract)(-2*V17_CSCALE),
01011     /* 0111 */  (Fract)( 2*V17_CSCALE),(Fract)( 6*V17_CSCALE),
01012     /* 1000 */  (Fract)(-2*V17_CSCALE),(Fract)( 6*V17_CSCALE),
01013     /* 1001 */  (Fract)( 6*V17_CSCALE),(Fract)(-2*V17_CSCALE),
01014     /* 1010 */  (Fract)( 2*V17_CSCALE),(Fract)(-6*V17_CSCALE),
01015     /* 1011 */  (Fract)(-6*V17_CSCALE),(Fract)( 2*V17_CSCALE),
01016     /* 1100 */  (Fract)(-6*V17_CSCALE),(Fract)(-6*V17_CSCALE),
01017     /* 1101 */  (Fract)( 2*V17_CSCALE),(Fract)( 2*V17_CSCALE),
01018     /* 1110 */  (Fract)( 6*V17_CSCALE),(Fract)( 6*V17_CSCALE),
01019     /* 1111 */  (Fract)(-2*V17_CSCALE),(Fract)(-2*V17_CSCALE)
01020     },/* end of dpu_smap_V17_72[32]    table values  */
01021
01022    /* dpu_ddec_V17_AllRates[16]    table values  */
01023    {
01024     0,1,3,2,  1,0,2,3,  2,3,0,1,  3,2,1,0
01025    }, /* end of dpu_ddec_V17_AllRates[16]    table values  */
01026
01027    /* dpu_denc_V17_AllRates[16]    table values  */
01028    {
01029     0,1,2,3, 1,0,3,2, 2,3,1,0, 3,2,0,1
01030    }, /* end of dpu_denc_V17_AllRates[16]    table values  */
01031
01032    /* dpu_slic_invmod_v17[10][10]    table values  */
01033    {
01034    {
01035     (Fract)(6.3661977*INVMOD_SCALE_V17 /40.0), /* This will never occur */
01036     (Fract)(6.3661977*INVMOD_SCALE_V17 /40.0),
01037     (Fract)(1.5915494*INVMOD_SCALE_V17 /40.0),
01038     (Fract)(0.7073553*INVMOD_SCALE_V17 /40.0),
01039     (Fract)(0.3978874*INVMOD_SCALE_V17 /40.0),
01040     (Fract)(0.2546479*INVMOD_SCALE_V17 /40.0),
01041     (Fract)(0.1768388*INVMOD_SCALE_V17 /40.0),
01042     (Fract)(0.1299224*INVMOD_SCALE_V17 /40.0),
01043     (Fract)(0.0994718*INVMOD_SCALE_V17 /40.0),
01044     (Fract)(0.0785950*INVMOD_SCALE_V17 /40.0)
01045    },
01046    {
01047     (Fract)(6.3661977*INVMOD_SCALE_V17 /40.0),
01048     (Fract)(3.1830989*INVMOD_SCALE_V17 /40.0),
01049     (Fract)(1.2732395*INVMOD_SCALE_V17 /40.0),
01050     (Fract)(0.6366198*INVMOD_SCALE_V17 /40.0),
01051     (Fract)(0.3744822*INVMOD_SCALE_V17 /40.0),
01052     (Fract)(0.2448538*INVMOD_SCALE_V17 /40.0),
01053     (Fract)(0.1720594*INVMOD_SCALE_V17 /40.0),
01054     (Fract)(0.1273240*INVMOD_SCALE_V17 /40.0),
01055     (Fract)(0.0979415*INVMOD_SCALE_V17 /40.0),
01056     (Fract)(0.0776366*INVMOD_SCALE_V17 /40.0)
01057    },
01058    {
01059     (Fract)(1.5915494*INVMOD_SCALE_V17 /40.0),
01060     (Fract)(1.2732395*INVMOD_SCALE_V17 /40.0),
01061     (Fract)(0.7957747*INVMOD_SCALE_V17 /40.0),
01062     (Fract)(0.4897075*INVMOD_SCALE_V17 /40.0),
01063     (Fract)(0.3183099*INVMOD_SCALE_V17 /40.0),
01064     (Fract)(0.2195241*INVMOD_SCALE_V17 /40.0),
01065     (Fract)(0.1591549*INVMOD_SCALE_V17 /40.0),
01066     (Fract)(0.1201169*INVMOD_SCALE_V17 /40.0),
01067     (Fract)(0.0936206*INVMOD_SCALE_V17 /40.0),
01068     (Fract)(0.0748964*INVMOD_SCALE_V17 /40.0)
01069    },
01070    {
01071     (Fract)(0.7073553*INVMOD_SCALE_V17 /40.0),
01072     (Fract)(0.6366198*INVMOD_SCALE_V17 /40.0),
01073     (Fract)(0.4897075*INVMOD_SCALE_V17 /40.0),
01074     (Fract)(0.3536777*INVMOD_SCALE_V17 /40.0),
01075     (Fract)(0.2546479*INVMOD_SCALE_V17 /40.0),
01076     (Fract)(0.1872411*INVMOD_SCALE_V17 /40.0),
01077     (Fract)(0.1414711*INVMOD_SCALE_V17 /40.0),
01078     (Fract)(0.1097620*INVMOD_SCALE_V17 /40.0),
01079     (Fract)(0.0872082*INVMOD_SCALE_V17 /40.0),
01080     (Fract)(0.0707355*INVMOD_SCALE_V17 /40.0)
01081    },
01082    {
01083     (Fract)(0.3978874*INVMOD_SCALE_V17 /40.0),
01084     (Fract)(0.3744822*INVMOD_SCALE_V17 /40.0),
01085     (Fract)(0.3183099*INVMOD_SCALE_V17 /40.0),
01086     (Fract)(0.2546479*INVMOD_SCALE_V17 /40.0),
01087     (Fract)(0.1989437*INVMOD_SCALE_V17 /40.0),
01088     (Fract)(0.1552731*INVMOD_SCALE_V17 /40.0),
01089     (Fract)(0.1224269*INVMOD_SCALE_V17 /40.0),
01090     (Fract)(0.0979415*INVMOD_SCALE_V17 /40.0),
01091     (Fract)(0.0795775*INVMOD_SCALE_V17 /40.0),
01092     (Fract)(0.0656309*INVMOD_SCALE_V17 /40.0)
01093    },
01094    {
01095     (Fract)(0.2546479*INVMOD_SCALE_V17 /40.0),
01096     (Fract)(0.2448538*INVMOD_SCALE_V17 /40.0),
01097     (Fract)(0.2195241*INVMOD_SCALE_V17 /40.0),
01098     (Fract)(0.1872411*INVMOD_SCALE_V17 /40.0),
01099     (Fract)(0.1552731*INVMOD_SCALE_V17 /40.0),
01100     (Fract)(0.1273240*INVMOD_SCALE_V17 /40.0),
01101     (Fract)(0.1043639*INVMOD_SCALE_V17 /40.0),
01102     (Fract)(0.0860297*INVMOD_SCALE_V17 /40.0),
01103     (Fract)(0.0715303*INVMOD_SCALE_V17 /40.0),
01104     (Fract)(0.0600585*INVMOD_SCALE_V17 /40.0)
01105    },
01106    {
01107     (Fract)(0.1768388*INVMOD_SCALE_V17 /40.0),
01108     (Fract)(0.1720594*INVMOD_SCALE_V17 /40.0),
01109     (Fract)(0.1591549*INVMOD_SCALE_V17 /40.0),
01110     (Fract)(0.1414711*INVMOD_SCALE_V17 /40.0),
01111     (Fract)(0.1224269*INVMOD_SCALE_V17 /40.0),
01112     (Fract)(0.1043639*INVMOD_SCALE_V17 /40.0),
01113     (Fract)(0.0884194*INVMOD_SCALE_V17 /40.0),
01114     (Fract)(0.0748964*INVMOD_SCALE_V17 /40.0),
01115     (Fract)(0.0636620*INVMOD_SCALE_V17 /40.0),
01116     (Fract)(0.0544119*INVMOD_SCALE_V17 /40.0)
01117    },
01118    {
01119     (Fract)(0.1299224*INVMOD_SCALE_V17 /40.0),
01120     (Fract)(0.1273240*INVMOD_SCALE_V17 /40.0),
01121     (Fract)(0.1201169*INVMOD_SCALE_V17 /40.0),
01122     (Fract)(0.1097620*INVMOD_SCALE_V17 /40.0),
01123     (Fract)(0.0979415*INVMOD_SCALE_V17 /40.0),
01124     (Fract)(0.0860297*INVMOD_SCALE_V17 /40.0),
01125     (Fract)(0.0748964*INVMOD_SCALE_V17 /40.0),
01126     (Fract)(0.0649612*INVMOD_SCALE_V17 /40.0),
01127     (Fract)(0.0563380*INVMOD_SCALE_V17 /40.0),
01128     (Fract)(0.0489708*INVMOD_SCALE_V17 /40.0)
01129    },
01130    {
01131     (Fract)(0.0994718*INVMOD_SCALE_V17 /40.0),
01132     (Fract)(0.0979415*INVMOD_SCALE_V17 /40.0),
01133     (Fract)(0.0936206*INVMOD_SCALE_V17 /40.0),
01134     (Fract)(0.0872082*INVMOD_SCALE_V17 /40.0),
01135     (Fract)(0.0795775*INVMOD_SCALE_V17 /40.0),
01136     (Fract)(0.0715303*INVMOD_SCALE_V17 /40.0),
01137     (Fract)(0.0636620*INVMOD_SCALE_V17 /40.0),
01138     (Fract)(0.0563380*INVMOD_SCALE_V17 /40.0),
01139     (Fract)(0.0497359*INVMOD_SCALE_V17 /40.0),
01140     (Fract)(0.0439048*INVMOD_SCALE_V17 /40.0)
01141    },
01142    {
01143     (Fract)(0.0785950*INVMOD_SCALE_V17 /40.0),
01144     (Fract)(0.0776366*INVMOD_SCALE_V17 /40.0),
01145     (Fract)(0.0748964*INVMOD_SCALE_V17 /40.0),
01146     (Fract)(0.0707355*INVMOD_SCALE_V17 /40.0),
01147     (Fract)(0.0656309*INVMOD_SCALE_V17 /40.0),
01148     (Fract)(0.0600585*INVMOD_SCALE_V17 /40.0),
01149     (Fract)(0.0544119*INVMOD_SCALE_V17 /40.0),
01150     (Fract)(0.0489708*INVMOD_SCALE_V17 /40.0),
01151     (Fract)(0.0439048*INVMOD_SCALE_V17 /40.0),
01152     (Fract)(0.0392975*INVMOD_SCALE_V17 /40.0)
01153    }
01154    }, /* end of dpu_slic_invmod_v17[10][10]    table values  */
01155
01156    /* dpu_PN_smap_table_v17_AllRates[8]    table values  */
01157    {
01158    /* Symbol C */
01159    (Fract)(6*V17_CSCALE),   (Fract)(2*V17_CSCALE),
01160    /* Symbol D */
01161    (Fract)(-2*V17_CSCALE),  (Fract)(6*V17_CSCALE),
01162    /* Symbol B */
01163    (Fract)( 2*V17_CSCALE),  (Fract)(-6*V17_CSCALE),
01164    /* Symbol A */
01165    (Fract)(-6*V17_CSCALE),   (Fract)(-2*V17_CSCALE)
01166    }, /* end of dpu_PN_smap_table_v17_AllRates[8]    table values  */
01167
01168    /* dpu_bridge_smap_table_v17_AllRates[8]    table values  */
01169    {
01170   /* Symbol A */
01171    (Fract)(-6*V17_CSCALE),   (Fract)(-2*V17_CSCALE),
01172    /* Symbol B */
01173    (Fract)( 2*V17_CSCALE),  (Fract)(-6*V17_CSCALE),
01174    /* Symbol C */
01175    (Fract)(6*V17_CSCALE),   (Fract)(2*V17_CSCALE),
01176    /* Symbol D */
01177    (Fract)(-2*V17_CSCALE),  (Fract)(6*V17_CSCALE)
01178    },/* end of dpu_bridge_smap_table_v17_AllRates[8]    table values  */
01179
01180    /* tanTableInFirstOctant[10]    table values  */
01181     {
01182      2344,  /* tan(pi/44)    in Q15 */
01183      4711,  /* tan(2*pi/44)  in Q15 */
01184      7128,  /* tan(3*pi/44)  in Q15 */
01185      9622,  /* tan(4*pi/44)  in Q15 */
01186      12222, /* tan(5*pi/44)  in Q15 */
01187      14965, /* tan(6*pi/44)  in Q15 */
01188      17893, /* tan(7*pi/44)  in Q15 */
01189      21059, /* tan(8*pi/44)  in Q15 */
01190      24530, /* tan(9*pi/44)  in Q15 */
01191      28394  /* tan(10*pi/44) in Q15 */
01192     }, /* end of tanTableInFirstOctant[10]    table values  */
01193
01194    /* atan2ScaleFactors[16]    table values  */
01195   {
01196     -10496, /* ; _atan2ScaleFactors[0]._k1 @ 0   */
01197     -30534, /* ; _atan2ScaleFactors[0]._k2 @ 16  */
01198     -20992, /* ; _atan2ScaleFactors[1]._k1 @ 32  */
01199     30534,  /* ; _atan2ScaleFactors[1]._k2 @ 48  */
01200     10496,  /* ; _atan2ScaleFactors[2]._k1 @ 64  */
01201     30534,  /* ; _atan2ScaleFactors[2]._k2 @ 80  */
01202     20992,  /* ; _atan2ScaleFactors[3]._k1 @ 96  */
01203     -30534, /* ; _atan2ScaleFactors[3]._k2 @ 112 */
01204     -10496, /* ; _atan2ScaleFactors[4]._k1 @ 128 */
01205     30534,  /* ; _atan2ScaleFactors[4]._k2 @ 144 */
01206     0,      /* ; _atan2ScaleFactors[5]._k1 @ 160 */
01207     -30534, /* ; _atan2ScaleFactors[5]._k2 @ 176 */
01208     10496,  /* ; _atan2ScaleFactors[6]._k1 @ 192 */
01209     -30534, /* ; _atan2ScaleFactors[6]._k2 @ 208 */
01210     0,      /* ; _atan2ScaleFactors[7]._k1 @ 224 */
01211     30534   /* ; _atan2ScaleFactors[7]._k2 @ 240 */
01212     }, /* end of atan2ScaleFactors[16]    table values  */
01213
01214    /* bp_rx_v17[43]    table values  */
01215    {
01216     (Fract)(-0.000266*INTERP_CONST_SCALE),
01217     (Fract)(-0.002368*INTERP_CONST_SCALE),
01218     (Fract)(0.016807*INTERP_CONST_SCALE),
01219     (Fract)(0.001711*INTERP_CONST_SCALE),
01220     (Fract)(0.006694*INTERP_CONST_SCALE),
01221     (Fract)(0.029130*INTERP_CONST_SCALE),
01222     (Fract)(0.006570*INTERP_CONST_SCALE),
01223     (Fract)(0.008852*INTERP_CONST_SCALE),
01224     (Fract)(0.035594*INTERP_CONST_SCALE),
01225     (Fract)(0.000581*INTERP_CONST_SCALE),
01226     (Fract)(-0.006441*INTERP_CONST_SCALE),
01227     (Fract)(0.027365*INTERP_CONST_SCALE),
01228     (Fract)(-0.024019*INTERP_CONST_SCALE),
01229     (Fract)(-0.045506*INTERP_CONST_SCALE),
01230     (Fract)(0.007021*INTERP_CONST_SCALE),
01231     (Fract)(-0.063003*INTERP_CONST_SCALE),
01232     (Fract)(-0.106675*INTERP_CONST_SCALE),
01233     (Fract)(-0.000189*INTERP_CONST_SCALE),
01234     (Fract)(-0.099680*INTERP_CONST_SCALE),
01235     (Fract)(-0.221611*INTERP_CONST_SCALE),
01236     (Fract)(0.185021*INTERP_CONST_SCALE),
01237     (Fract)(0.551927*INTERP_CONST_SCALE),
01238     (Fract)(0.185021*INTERP_CONST_SCALE),
01239     (Fract)(-0.221611*INTERP_CONST_SCALE),
01240     (Fract)(-0.099680*INTERP_CONST_SCALE),
01241     (Fract)(-0.000189*INTERP_CONST_SCALE),
01242     (Fract)(-0.106675*INTERP_CONST_SCALE),
01243     (Fract)(-0.063003*INTERP_CONST_SCALE),
01244     (Fract)(0.007021*INTERP_CONST_SCALE),
01245     (Fract)(-0.045506*INTERP_CONST_SCALE),
01246     (Fract)(-0.024019*INTERP_CONST_SCALE),
01247     (Fract)(0.027365*INTERP_CONST_SCALE),
01248     (Fract)(-0.006441*INTERP_CONST_SCALE),
01249     (Fract)(0.000581*INTERP_CONST_SCALE),
01250     (Fract)(0.035594*INTERP_CONST_SCALE),
01251     (Fract)(0.008852*INTERP_CONST_SCALE),
01252     (Fract)(0.006570*INTERP_CONST_SCALE),
01253     (Fract)(0.029130*INTERP_CONST_SCALE),
01254     (Fract)(0.006694*INTERP_CONST_SCALE),
01255     (Fract)(0.001711*INTERP_CONST_SCALE),
01256     (Fract)(0.016807*INTERP_CONST_SCALE),
01257     (Fract)(-0.002368*INTERP_CONST_SCALE),
01258     (Fract)(-0.000266*INTERP_CONST_SCALE)
01259    },/* end of bp_rx_v17[43]    table values  */
01260
01261    /* bp_hilb_v17[43]    table values  */
01262    {
01263     (Fract)(-0.000193*INTERP_CONST_SCALE),
01264     (Fract)(-0.014249*INTERP_CONST_SCALE),
01265     (Fract)(-0.005726*INTERP_CONST_SCALE),
01266     (Fract)(0.001417*INTERP_CONST_SCALE),
01267     (Fract)(-0.018106*INTERP_CONST_SCALE),
01268     (Fract)(-0.000640*INTERP_CONST_SCALE),
01269     (Fract)(0.013185*INTERP_CONST_SCALE),
01270     (Fract)(-0.010846*INTERP_CONST_SCALE),
01271     (Fract)(0.013375*INTERP_CONST_SCALE),
01272     (Fract)(0.036437*INTERP_CONST_SCALE),
01273     (Fract)(0.001478*INTERP_CONST_SCALE),
01274     (Fract)(0.027004*INTERP_CONST_SCALE),
01275     (Fract)(0.059569*INTERP_CONST_SCALE),
01276     (Fract)(0.000597*INTERP_CONST_SCALE),
01277     (Fract)(0.018353*INTERP_CONST_SCALE),
01278     (Fract)(0.065160*INTERP_CONST_SCALE),
01279     (Fract)(-0.042375*INTERP_CONST_SCALE),
01280     (Fract)(-0.047788*INTERP_CONST_SCALE),
01281     (Fract)(0.043039*INTERP_CONST_SCALE),
01282     (Fract)(-0.220189*INTERP_CONST_SCALE),
01283     (Fract)(-0.446779*INTERP_CONST_SCALE),
01284     (Fract)(0.000000*INTERP_CONST_SCALE),
01285     (Fract)(0.446779*INTERP_CONST_SCALE),
01286     (Fract)(0.220189*INTERP_CONST_SCALE),
01287     (Fract)(-0.043039*INTERP_CONST_SCALE),
01288     (Fract)(0.047788*INTERP_CONST_SCALE),
01289     (Fract)(0.042375*INTERP_CONST_SCALE),
01290     (Fract)(-0.065160*INTERP_CONST_SCALE),
01291     (Fract)(-0.018353*INTERP_CONST_SCALE),
01292     (Fract)(-0.000597*INTERP_CONST_SCALE),
01293     (Fract)(-0.059569*INTERP_CONST_SCALE),
01294     (Fract)(-0.027004*INTERP_CONST_SCALE),
01295     (Fract)(-0.001478*INTERP_CONST_SCALE),
01296     (Fract)(-0.036437*INTERP_CONST_SCALE),
01297     (Fract)(-0.013375*INTERP_CONST_SCALE),
01298     (Fract)(0.010846*INTERP_CONST_SCALE),
01299     (Fract)(-0.013185*INTERP_CONST_SCALE),
01300     (Fract)(0.000640*INTERP_CONST_SCALE),
01301     (Fract)(0.018106*INTERP_CONST_SCALE),
01302     (Fract)(-0.001417*INTERP_CONST_SCALE),
01303     (Fract)(0.005726*INTERP_CONST_SCALE),
01304     (Fract)(0.014249*INTERP_CONST_SCALE),
01305     (Fract)(0.000193*INTERP_CONST_SCALE)
01306    } /* end of bp_hilb_v17[43]    table values  */
01307 };
01308 #ifndef PC
01309 /* common table cluster-1  */
01310 #pragma DATA_SECTION (c1tables, "dpuc1RelocatableTables");
01311 #endif
01312 const commonTable1_sPtrs_t c1tables =
01313 {
01314   /* dpuModConvTable[11]    table values  */
01315   /******************************************************************************
01316    * CONVERSION TABLE FOR CONVERTING MODULATION TYPES
01317    *****************************************************************************/
01318    {
01319        FM_MCONF_V21,      /* DPU_MODULATION_V21 */
01320        FM_MCONF_V27_2400,   /* DPU_MODULATION_V27_2400 */
01321        FM_MCONF_V27_4800,   /* DPU_MODULATION_V27_4800 */
01322        FM_MCONF_V29_7200,   /* DPU_MODULATION_V29_7200 */
01323        FM_MCONF_V29_9600,   /* DPU_MODULATION_V29_9600 */
01324    #ifdef V17
01325        FM_MCONF_V17_7200,   /* DPU_MODULATION_V17_7200 */
01326        FM_MCONF_V17_9600,   /* DPU_MODULATION_V17_9600 */
01327        FM_MCONF_V17_12000,    /* DPU_MODULATION_V17_12000 */
01328        FM_MCONF_V17_14400,    /* DPU_MODULATION_V17_14400 */
01329        FM_MCONF_V33_12000,    /* DPU_MODULATION_V33_12000 */
01330        FM_MCONF_V33_14400   /* DPU_MODULATION_V33_14400 */
01331    #endif
01332    }, /* end of dpuModConvTable[11]    table values  */
01333
01334   /* dpuModRateTable[11]    table values  */
01335   /******************************************************************************
01336    * CONVERSION TABLE FOR CONVERTING MODULATION TYPES TO MODULATION RATES
01337    *****************************************************************************/
01338    {
01339        DPU_V21_HIGH_CHANNEL,  /* DPU_MODULATION_V21 */
01340        DPU_RATE_2400,     /* DPU_MODULATION_V27_2400 */
01341        DPU_RATE_4800,     /* DPU_MODULATION_V27_4800 */
01342        DPU_RATE_7200,     /* DPU_MODULATION_V29_7200 */
01343        DPU_RATE_9600,     /* DPU_MODULATION_V29_9600 */
01344    #ifdef V17
01345        DPU_RATE_7200,     /* DPU_MODULATION_V17_7200 */
01346        DPU_RATE_9600,     /* DPU_MODULATION_V17_9600 */
01347        DPU_RATE_12000,      /* DPU_MODULATION_V17_12000 */
01348        DPU_RATE_14400,      /* DPU_MODULATION_V17_14400 */
01349        DPU_RATE_12000,      /* DPU_MODULATION_V33_12000 */
01350        DPU_RATE_14400     /* DPU_MODULATION_V33_14400 */
01351    #endif
01352    }, /* end of dpuModRateTable[11]    table values  */
01353
01354   /* dpuModTypeTable[11]    table values  */
01355   /******************************************************************************
01356    * CONVERSION TABLE FOR CONVERTING MODULATION TYPES TO MODULATION RATES
01357    *****************************************************************************/
01358    {
01359         DPU_MOD_V21,    /* DPU_MODULATION_V21 */
01360         DPU_MOD_V27T,   /* DPU_MODULATION_V27_2400 */
01361         DPU_MOD_V27T,   /* DPU_MODULATION_V27_4800 */
01362         DPU_MOD_V29,    /* DPU_MODULATION_V29_7200 */
01363         DPU_MOD_V29,    /* DPU_MODULATION_V29_9600 */
01364     #ifdef V17
01365         DPU_MOD_V17,    /* DPU_MODULATION_V17_7200 */
01366         DPU_MOD_V17,    /* DPU_MODULATION_V17_9600 */
01367         DPU_MOD_V17,    /* DPU_MODULATION_V17_12000 */
01368         DPU_MOD_V17,    /* DPU_MODULATION_V17_14400 */
01369         DPU_MOD_V33,    /* DPU_MODULATION_V33_12000 */
01370         DPU_MOD_V33     /* DPU_MODULATION_V33_14400 */
01371     #endif
01372    }, /* end of dpuModTypeTable[11]    table values  */
01373
01374   /* hn_96_80[5][42]    table values  */
01375    {
01376     {
01377      (Fract)(-0.000478*INTERP_CONST_SCALE), (Fract)(-0.003000*INTERP_CONST_SCALE),
01378      (Fract)(-0.005241*INTERP_CONST_SCALE), (Fract)( 0.000483*INTERP_CONST_SCALE),
01379      (Fract)(-0.011155*INTERP_CONST_SCALE), (Fract)(-0.000308*INTERP_CONST_SCALE),
01380      (Fract)(-0.008139*INTERP_CONST_SCALE), (Fract)(-0.012788*INTERP_CONST_SCALE),
01381      (Fract)( 0.003583*INTERP_CONST_SCALE), (Fract)(-0.025713*INTERP_CONST_SCALE),
01382      (Fract)( 0.003550*INTERP_CONST_SCALE), (Fract)(-0.015686*INTERP_CONST_SCALE),
01383      (Fract)(-0.023853*INTERP_CONST_SCALE), (Fract)( 0.015338*INTERP_CONST_SCALE),
01384      (Fract)(-0.053084*INTERP_CONST_SCALE), (Fract)( 0.021226*INTERP_CONST_SCALE),
01385      (Fract)(-0.028294*INTERP_CONST_SCALE), (Fract)(-0.046170*INTERP_CONST_SCALE),
01386      (Fract)( 0.075086*INTERP_CONST_SCALE), (Fract)(-0.181552*INTERP_CONST_SCALE),
01387      (Fract)( 0.253851*INTERP_CONST_SCALE), (Fract)( 0.776930*INTERP_CONST_SCALE),
01388      (Fract)( 0.087583*INTERP_CONST_SCALE), (Fract)(-0.141441*INTERP_CONST_SCALE),
01389      (Fract)( 0.083341*INTERP_CONST_SCALE), (Fract)(-0.073509*INTERP_CONST_SCALE),
01390      (Fract)( 0.000974*INTERP_CONST_SCALE), (Fract)( 0.000772*INTERP_CONST_SCALE),
01391      (Fract)(-0.044811*INTERP_CONST_SCALE), (Fract)( 0.018565*INTERP_CONST_SCALE),
01392      (Fract)(-0.033478*INTERP_CONST_SCALE), (Fract)(-0.004283*INTERP_CONST_SCALE),
01393      (Fract)(-0.004677*INTERP_CONST_SCALE), (Fract)(-0.021958*INTERP_CONST_SCALE),
01394      (Fract)( 0.004849*INTERP_CONST_SCALE), (Fract)(-0.016552*INTERP_CONST_SCALE),
01395      (Fract)(-0.003363*INTERP_CONST_SCALE), (Fract)(-0.003587*INTERP_CONST_SCALE),
01396      (Fract)(-0.009473*INTERP_CONST_SCALE), (Fract)( 0.000903*INTERP_CONST_SCALE),
01397      (Fract)(-0.006378*INTERP_CONST_SCALE), (Fract)(-0.001425*INTERP_CONST_SCALE)
01398     },
01399     {
01400      (Fract)( 0.000154*INTERP_CONST_SCALE), (Fract)(-0.004652*INTERP_CONST_SCALE),
01401      (Fract)(-0.003463*INTERP_CONST_SCALE), (Fract)(-0.001168*INTERP_CONST_SCALE),
01402      (Fract)(-0.011339*INTERP_CONST_SCALE), (Fract)( 0.001832*INTERP_CONST_SCALE),
01403      (Fract)(-0.012903*INTERP_CONST_SCALE), (Fract)(-0.007383*INTERP_CONST_SCALE),
01404      (Fract)(-0.000912*INTERP_CONST_SCALE), (Fract)(-0.025538*INTERP_CONST_SCALE),
01405      (Fract)( 0.008745*INTERP_CONST_SCALE), (Fract)(-0.026782*INTERP_CONST_SCALE),
01406      (Fract)(-0.010531*INTERP_CONST_SCALE), (Fract)( 0.004509*INTERP_CONST_SCALE),
01407      (Fract)(-0.051844*INTERP_CONST_SCALE), (Fract)( 0.034147*INTERP_CONST_SCALE),
01408      (Fract)(-0.057035*INTERP_CONST_SCALE), (Fract)(-0.007507*INTERP_CONST_SCALE),
01409      (Fract)( 0.041015*INTERP_CONST_SCALE), (Fract)(-0.185194*INTERP_CONST_SCALE),
01410      (Fract)( 0.428933*INTERP_CONST_SCALE), (Fract)( 0.710970*INTERP_CONST_SCALE),
01411      (Fract)(-0.049137*INTERP_CONST_SCALE), (Fract)(-0.080075*INTERP_CONST_SCALE),
01412      (Fract)( 0.067350*INTERP_CONST_SCALE), (Fract)(-0.084339*INTERP_CONST_SCALE),
01413      (Fract)( 0.023845*INTERP_CONST_SCALE), (Fract)(-0.021715*INTERP_CONST_SCALE),
01414      (Fract)(-0.029666*INTERP_CONST_SCALE), (Fract)( 0.013983*INTERP_CONST_SCALE),
01415      (Fract)(-0.037294*INTERP_CONST_SCALE), (Fract)( 0.004701*INTERP_CONST_SCALE),
01416      (Fract)(-0.013701*INTERP_CONST_SCALE), (Fract)(-0.015396*INTERP_CONST_SCALE),
01417      (Fract)( 0.002847*INTERP_CONST_SCALE), (Fract)(-0.017835*INTERP_CONST_SCALE),
01418      (Fract)( 0.000315*INTERP_CONST_SCALE), (Fract)(-0.007080*INTERP_CONST_SCALE),
01419      (Fract)(-0.006781*INTERP_CONST_SCALE), (Fract)( 0.000135*INTERP_CONST_SCALE),
01420      (Fract)(-0.006626*INTERP_CONST_SCALE), (Fract)(-0.000268*INTERP_CONST_SCALE)
01421     },
01422     {
01423      (Fract)( 0.000268*INTERP_CONST_SCALE), (Fract)(-0.005980*INTERP_CONST_SCALE),
01424      (Fract)(-0.001489*INTERP_CONST_SCALE), (Fract)(-0.003775*INTERP_CONST_SCALE),
01425      (Fract)(-0.009886*INTERP_CONST_SCALE), (Fract)( 0.002132*INTERP_CONST_SCALE),
01426      (Fract)(-0.016459*INTERP_CONST_SCALE), (Fract)(-0.001667*INTERP_CONST_SCALE),
01427      (Fract)(-0.007757*INTERP_CONST_SCALE), (Fract)(-0.021245*INTERP_CONST_SCALE),
01428      (Fract)( 0.009302*INTERP_CONST_SCALE), (Fract)(-0.034728*INTERP_CONST_SCALE),
01429      (Fract)( 0.003272*INTERP_CONST_SCALE), (Fract)(-0.011739*INTERP_CONST_SCALE),
01430      (Fract)(-0.040683*INTERP_CONST_SCALE), (Fract)( 0.035496*INTERP_CONST_SCALE),
01431      (Fract)(-0.077778*INTERP_CONST_SCALE), (Fract)( 0.033804*INTERP_CONST_SCALE),
01432      (Fract)(-0.014243*INTERP_CONST_SCALE), (Fract)(-0.142018*INTERP_CONST_SCALE),
01433      (Fract)( 0.588959*INTERP_CONST_SCALE), (Fract)( 0.588959*INTERP_CONST_SCALE),
01434      (Fract)(-0.142018*INTERP_CONST_SCALE), (Fract)(-0.014243*INTERP_CONST_SCALE),
01435      (Fract)( 0.033804*INTERP_CONST_SCALE), (Fract)(-0.077778*INTERP_CONST_SCALE),
01436      (Fract)( 0.035496*INTERP_CONST_SCALE), (Fract)(-0.040683*INTERP_CONST_SCALE),
01437      (Fract)(-0.011739*INTERP_CONST_SCALE), (Fract)( 0.003272*INTERP_CONST_SCALE),
01438      (Fract)(-0.034728*INTERP_CONST_SCALE), (Fract)( 0.009302*INTERP_CONST_SCALE),
01439      (Fract)(-0.021245*INTERP_CONST_SCALE), (Fract)(-0.007757*INTERP_CONST_SCALE),
01440      (Fract)(-0.001667*INTERP_CONST_SCALE), (Fract)(-0.016459*INTERP_CONST_SCALE),
01441      (Fract)( 0.002132*INTERP_CONST_SCALE), (Fract)(-0.009886*INTERP_CONST_SCALE),
01442      (Fract)(-0.003775*INTERP_CONST_SCALE), (Fract)(-0.001489*INTERP_CONST_SCALE),
01443      (Fract)(-0.005980*INTERP_CONST_SCALE), (Fract)( 0.000268*INTERP_CONST_SCALE)
01444     },
01445     {
01446      (Fract)(-0.000268*INTERP_CONST_SCALE), (Fract)(-0.006626*INTERP_CONST_SCALE),
01447      (Fract)( 0.000135*INTERP_CONST_SCALE), (Fract)(-0.006781*INTERP_CONST_SCALE),
01448      (Fract)(-0.007080*INTERP_CONST_SCALE), (Fract)( 0.000315*INTERP_CONST_SCALE),
01449      (Fract)(-0.017835*INTERP_CONST_SCALE), (Fract)( 0.002847*INTERP_CONST_SCALE),
01450      (Fract)(-0.015396*INTERP_CONST_SCALE), (Fract)(-0.013701*INTERP_CONST_SCALE),
01451      (Fract)( 0.004701*INTERP_CONST_SCALE), (Fract)(-0.037294*INTERP_CONST_SCALE),
01452      (Fract)( 0.013983*INTERP_CONST_SCALE), (Fract)(-0.029666*INTERP_CONST_SCALE),
01453      (Fract)(-0.021715*INTERP_CONST_SCALE), (Fract)( 0.023845*INTERP_CONST_SCALE),
01454      (Fract)(-0.084339*INTERP_CONST_SCALE), (Fract)( 0.067350*INTERP_CONST_SCALE),
01455      (Fract)(-0.080075*INTERP_CONST_SCALE), (Fract)(-0.049137*INTERP_CONST_SCALE),
01456      (Fract)( 0.710970*INTERP_CONST_SCALE), (Fract)( 0.428933*INTERP_CONST_SCALE),
01457      (Fract)(-0.185194*INTERP_CONST_SCALE), (Fract)( 0.041015*INTERP_CONST_SCALE),
01458      (Fract)(-0.007507*INTERP_CONST_SCALE), (Fract)(-0.057035*INTERP_CONST_SCALE),
01459      (Fract)( 0.034147*INTERP_CONST_SCALE), (Fract)(-0.051844*INTERP_CONST_SCALE),
01460      (Fract)( 0.004509*INTERP_CONST_SCALE), (Fract)(-0.010531*INTERP_CONST_SCALE),
01461      (Fract)(-0.026782*INTERP_CONST_SCALE), (Fract)( 0.008745*INTERP_CONST_SCALE),
01462      (Fract)(-0.025538*INTERP_CONST_SCALE), (Fract)(-0.000912*INTERP_CONST_SCALE),
01463      (Fract)(-0.007383*INTERP_CONST_SCALE), (Fract)(-0.012903*INTERP_CONST_SCALE),
01464      (Fract)( 0.001832*INTERP_CONST_SCALE), (Fract)(-0.011339*INTERP_CONST_SCALE),
01465      (Fract)(-0.001168*INTERP_CONST_SCALE), (Fract)(-0.003463*INTERP_CONST_SCALE),
01466      (Fract)(-0.004652*INTERP_CONST_SCALE), (Fract)( 0.000154*INTERP_CONST_SCALE)
01467     },
01468     {
01469      (Fract)(-0.001425*INTERP_CONST_SCALE), (Fract)(-0.006378*INTERP_CONST_SCALE),
01470      (Fract)( 0.000903*INTERP_CONST_SCALE), (Fract)(-0.009473*INTERP_CONST_SCALE),
01471      (Fract)(-0.003587*INTERP_CONST_SCALE), (Fract)(-0.003363*INTERP_CONST_SCALE),
01472      (Fract)(-0.016552*INTERP_CONST_SCALE), (Fract)( 0.004849*INTERP_CONST_SCALE),
01473      (Fract)(-0.021958*INTERP_CONST_SCALE), (Fract)(-0.004677*INTERP_CONST_SCALE),
01474      (Fract)(-0.004283*INTERP_CONST_SCALE), (Fract)(-0.033478*INTERP_CONST_SCALE),
01475      (Fract)( 0.018565*INTERP_CONST_SCALE), (Fract)(-0.044811*INTERP_CONST_SCALE),
01476      (Fract)( 0.000772*INTERP_CONST_SCALE), (Fract)( 0.000974*INTERP_CONST_SCALE),
01477      (Fract)(-0.073509*INTERP_CONST_SCALE), (Fract)( 0.083341*INTERP_CONST_SCALE),
01478      (Fract)(-0.141441*INTERP_CONST_SCALE), (Fract)( 0.087583*INTERP_CONST_SCALE),
01479      (Fract)( 0.776930*INTERP_CONST_SCALE), (Fract)( 0.253851*INTERP_CONST_SCALE),
01480      (Fract)(-0.181552*INTERP_CONST_SCALE), (Fract)( 0.075086*INTERP_CONST_SCALE),
01481      (Fract)(-0.046170*INTERP_CONST_SCALE), (Fract)(-0.028294*INTERP_CONST_SCALE),
01482      (Fract)( 0.021226*INTERP_CONST_SCALE), (Fract)(-0.053084*INTERP_CONST_SCALE),
01483      (Fract)( 0.015338*INTERP_CONST_SCALE), (Fract)(-0.023853*INTERP_CONST_SCALE),
01484      (Fract)(-0.015686*INTERP_CONST_SCALE), (Fract)( 0.003550*INTERP_CONST_SCALE),
01485      (Fract)(-0.025713*INTERP_CONST_SCALE), (Fract)( 0.003583*INTERP_CONST_SCALE),
01486      (Fract)(-0.012788*INTERP_CONST_SCALE), (Fract)(-0.008139*INTERP_CONST_SCALE),
01487      (Fract)(-0.000308*INTERP_CONST_SCALE), (Fract)(-0.011155*INTERP_CONST_SCALE),
01488      (Fract)( 0.000483*INTERP_CONST_SCALE), (Fract)(-0.005241*INTERP_CONST_SCALE),
01489      (Fract)(-0.003000*INTERP_CONST_SCALE), (Fract)(-0.000478*INTERP_CONST_SCALE)
01490     }
01491    },/* end of hn_96_80[5][42]    table values  */
01492
01493   /* hn_72_80[10][39]    table values  */
01494    {
01495     /* Sufilter 0 */
01496     {
01497      (Fract)(-0.004496*INTERP_CONST_SCALE), (Fract)(-0.000244*INTERP_CONST_SCALE),
01498      (Fract)(-0.008149*INTERP_CONST_SCALE), (Fract)(-0.000053*INTERP_CONST_SCALE),
01499      (Fract)(-0.013010*INTERP_CONST_SCALE), (Fract)( 0.000644*INTERP_CONST_SCALE),
01500      (Fract)(-0.019236*INTERP_CONST_SCALE), (Fract)( 0.002259*INTERP_CONST_SCALE),
01501      (Fract)(-0.027070*INTERP_CONST_SCALE), (Fract)( 0.005448*INTERP_CONST_SCALE),
01502      (Fract)(-0.037004*INTERP_CONST_SCALE), (Fract)( 0.011342*INTERP_CONST_SCALE),
01503      (Fract)(-0.050209*INTERP_CONST_SCALE), (Fract)( 0.022243*INTERP_CONST_SCALE),
01504      (Fract)(-0.069880*INTERP_CONST_SCALE), (Fract)( 0.044255*INTERP_CONST_SCALE),
01505      (Fract)(-0.107180*INTERP_CONST_SCALE), (Fract)( 0.102874*INTERP_CONST_SCALE),
01506      (Fract)(-0.236196*INTERP_CONST_SCALE), (Fract)( 0.675025*INTERP_CONST_SCALE),
01507      (Fract)( 0.549622*INTERP_CONST_SCALE), (Fract)(-0.223779*INTERP_CONST_SCALE),
01508      (Fract)( 0.099469*INTERP_CONST_SCALE), (Fract)(-0.106088*INTERP_CONST_SCALE),
01509      (Fract)( 0.044283*INTERP_CONST_SCALE), (Fract)(-0.070181*INTERP_CONST_SCALE),
01510      (Fract)( 0.022986*INTERP_CONST_SCALE), (Fract)(-0.050827*INTERP_CONST_SCALE),
01511      (Fract)( 0.012258*INTERP_CONST_SCALE), (Fract)(-0.037651*INTERP_CONST_SCALE),
01512      (Fract)( 0.006345*INTERP_CONST_SCALE), (Fract)(-0.027641*INTERP_CONST_SCALE),
01513      (Fract)( 0.003050*INTERP_CONST_SCALE), (Fract)(-0.019688*INTERP_CONST_SCALE),
01514      (Fract)( 0.001287*INTERP_CONST_SCALE), (Fract)(-0.013331*INTERP_CONST_SCALE),
01515      (Fract)( 0.000428*INTERP_CONST_SCALE), (Fract)(-0.008347*INTERP_CONST_SCALE),
01516      (Fract)( 0.000078*INTERP_CONST_SCALE)
01517     },
01518     /* Sufilter 9 */
01519     {
01520      (Fract)( 0.000078*INTERP_CONST_SCALE), (Fract)(-0.008347*INTERP_CONST_SCALE),
01521      (Fract)( 0.000428*INTERP_CONST_SCALE), (Fract)(-0.013331*INTERP_CONST_SCALE),
01522      (Fract)( 0.001287*INTERP_CONST_SCALE), (Fract)(-0.019688*INTERP_CONST_SCALE),
01523      (Fract)( 0.003050*INTERP_CONST_SCALE), (Fract)(-0.027641*INTERP_CONST_SCALE),
01524      (Fract)( 0.006345*INTERP_CONST_SCALE), (Fract)(-0.037651*INTERP_CONST_SCALE),
01525      (Fract)( 0.012258*INTERP_CONST_SCALE), (Fract)(-0.050827*INTERP_CONST_SCALE),
01526      (Fract)( 0.022986*INTERP_CONST_SCALE), (Fract)(-0.070181*INTERP_CONST_SCALE),
01527      (Fract)( 0.044283*INTERP_CONST_SCALE), (Fract)(-0.106088*INTERP_CONST_SCALE),
01528      (Fract)( 0.099469*INTERP_CONST_SCALE), (Fract)(-0.223779*INTERP_CONST_SCALE),
01529      (Fract)( 0.549622*INTERP_CONST_SCALE), (Fract)( 0.675025*INTERP_CONST_SCALE),
01530      (Fract)(-0.236196*INTERP_CONST_SCALE), (Fract)( 0.102874*INTERP_CONST_SCALE),
01531      (Fract)(-0.107180*INTERP_CONST_SCALE), (Fract)( 0.044255*INTERP_CONST_SCALE),
01532      (Fract)(-0.069880*INTERP_CONST_SCALE), (Fract)( 0.022243*INTERP_CONST_SCALE),
01533      (Fract)(-0.050209*INTERP_CONST_SCALE), (Fract)( 0.011342*INTERP_CONST_SCALE),
01534      (Fract)(-0.037004*INTERP_CONST_SCALE), (Fract)( 0.005448*INTERP_CONST_SCALE),
01535      (Fract)(-0.027070*INTERP_CONST_SCALE), (Fract)( 0.002259*INTERP_CONST_SCALE),
01536      (Fract)(-0.019236*INTERP_CONST_SCALE), (Fract)( 0.000644*INTERP_CONST_SCALE),
01537      (Fract)(-0.013010*INTERP_CONST_SCALE), (Fract)(-0.000053*INTERP_CONST_SCALE),
01538      (Fract)(-0.008149*INTERP_CONST_SCALE), (Fract)(-0.000244*INTERP_CONST_SCALE),
01539      (Fract)(-0.004496*INTERP_CONST_SCALE)
01540     },
01541     /* Sufilter 8 */
01542     {
01543      (Fract)( 0.000080*INTERP_CONST_SCALE), (Fract)(-0.008123*INTERP_CONST_SCALE),
01544      (Fract)( 0.000360*INTERP_CONST_SCALE), (Fract)(-0.012962*INTERP_CONST_SCALE),
01545      (Fract)( 0.001068*INTERP_CONST_SCALE), (Fract)(-0.019081*INTERP_CONST_SCALE),
01546      (Fract)( 0.002552*INTERP_CONST_SCALE), (Fract)(-0.026654*INTERP_CONST_SCALE),
01547      (Fract)( 0.005370*INTERP_CONST_SCALE), (Fract)(-0.036051*INTERP_CONST_SCALE),
01548      (Fract)( 0.010477*INTERP_CONST_SCALE), (Fract)(-0.048195*INTERP_CONST_SCALE),
01549      (Fract)( 0.019786*INTERP_CONST_SCALE), (Fract)(-0.065629*INTERP_CONST_SCALE),
01550      (Fract)( 0.038213*INTERP_CONST_SCALE), (Fract)(-0.097043*INTERP_CONST_SCALE),
01551      (Fract)( 0.085059*INTERP_CONST_SCALE), (Fract)(-0.194514*INTERP_CONST_SCALE),
01552      (Fract)( 0.415952*INTERP_CONST_SCALE), (Fract)( 0.785214*INTERP_CONST_SCALE),
01553      (Fract)(-0.228130*INTERP_CONST_SCALE), (Fract)( 0.093971*INTERP_CONST_SCALE),
01554      (Fract)(-0.099706*INTERP_CONST_SCALE), (Fract)( 0.037802*INTERP_CONST_SCALE),
01555      (Fract)(-0.064544*INTERP_CONST_SCALE), (Fract)( 0.017457*INTERP_CONST_SCALE),
01556      (Fract)(-0.046287*INTERP_CONST_SCALE), (Fract)( 0.007705*INTERP_CONST_SCALE),
01557      (Fract)(-0.034102*INTERP_CONST_SCALE), (Fract)( 0.002683*INTERP_CONST_SCALE),
01558      (Fract)(-0.024954*INTERP_CONST_SCALE), (Fract)( 0.000193*INTERP_CONST_SCALE),
01559      (Fract)(-0.017742*INTERP_CONST_SCALE), (Fract)(-0.000847*INTERP_CONST_SCALE),
01560      (Fract)(-0.012010*INTERP_CONST_SCALE), (Fract)(-0.001071*INTERP_CONST_SCALE),
01561      (Fract)(-0.007536*INTERP_CONST_SCALE), (Fract)(-0.000881*INTERP_CONST_SCALE),
01562      (Fract)(-0.004176*INTERP_CONST_SCALE)
01563     },
01564     /* Sufilter 7 */
01565     {
01566      (Fract)(-0.000211*INTERP_CONST_SCALE), (Fract)(-0.007511*INTERP_CONST_SCALE),
01567      (Fract)(-0.000211*INTERP_CONST_SCALE), (Fract)(-0.011956*INTERP_CONST_SCALE),
01568      (Fract)( 0.000057*INTERP_CONST_SCALE), (Fract)(-0.017504*INTERP_CONST_SCALE),
01569      (Fract)( 0.000876*INTERP_CONST_SCALE), (Fract)(-0.024249*INTERP_CONST_SCALE),
01570      (Fract)( 0.002696*INTERP_CONST_SCALE), (Fract)(-0.032425*INTERP_CONST_SCALE),
01571      (Fract)( 0.006281*INTERP_CONST_SCALE), (Fract)(-0.042675*INTERP_CONST_SCALE),
01572      (Fract)( 0.013116*INTERP_CONST_SCALE), (Fract)(-0.056857*INTERP_CONST_SCALE),
01573      (Fract)( 0.026923*INTERP_CONST_SCALE), (Fract)(-0.081350*INTERP_CONST_SCALE),
01574      (Fract)( 0.061809*INTERP_CONST_SCALE), (Fract)(-0.152883*INTERP_CONST_SCALE),
01575      (Fract)( 0.281202*INTERP_CONST_SCALE), (Fract)( 0.873953*INTERP_CONST_SCALE),
01576      (Fract)(-0.197127*INTERP_CONST_SCALE), (Fract)( 0.072507*INTERP_CONST_SCALE),
01577      (Fract)(-0.083844*INTERP_CONST_SCALE), (Fract)( 0.025208*INTERP_CONST_SCALE),
01578      (Fract)(-0.054477*INTERP_CONST_SCALE), (Fract)( 0.008917*INTERP_CONST_SCALE),
01579      (Fract)(-0.039329*INTERP_CONST_SCALE), (Fract)( 0.001590*INTERP_CONST_SCALE),
01580      (Fract)(-0.029162*INTERP_CONST_SCALE), (Fract)(-0.001760*INTERP_CONST_SCALE),
01581      (Fract)(-0.021456*INTERP_CONST_SCALE), (Fract)(-0.003006*INTERP_CONST_SCALE),
01582      (Fract)(-0.015323*INTERP_CONST_SCALE), (Fract)(-0.003087*INTERP_CONST_SCALE),
01583      (Fract)(-0.010412*INTERP_CONST_SCALE), (Fract)(-0.002563*INTERP_CONST_SCALE),
01584      (Fract)(-0.006557*INTERP_CONST_SCALE), (Fract)(-0.001797*INTERP_CONST_SCALE),
01585      (Fract)(-0.003653*INTERP_CONST_SCALE)
01586     },
01587     /* Sufilter 6 */
01588     {
01589      (Fract)(-0.000739*INTERP_CONST_SCALE), (Fract)(-0.006582*INTERP_CONST_SCALE),
01590      (Fract)(-0.001197*INTERP_CONST_SCALE), (Fract)(-0.010428*INTERP_CONST_SCALE),
01591      (Fract)(-0.001606*INTERP_CONST_SCALE), (Fract)(-0.015133*INTERP_CONST_SCALE),
01592      (Fract)(-0.001762*INTERP_CONST_SCALE), (Fract)(-0.020694*INTERP_CONST_SCALE),
01593      (Fract)(-0.001345*INTERP_CONST_SCALE), (Fract)(-0.027177*INTERP_CONST_SCALE),
01594      (Fract)( 0.000169*INTERP_CONST_SCALE), (Fract)(-0.034888*INTERP_CONST_SCALE),
01595      (Fract)( 0.003757*INTERP_CONST_SCALE), (Fract)(-0.044864*INTERP_CONST_SCALE),
01596      (Fract)( 0.011737*INTERP_CONST_SCALE), (Fract)(-0.060848*INTERP_CONST_SCALE),
01597      (Fract)( 0.032505*INTERP_CONST_SCALE), (Fract)(-0.103839*INTERP_CONST_SCALE),
01598      (Fract)( 0.152320*INTERP_CONST_SCALE), (Fract)( 0.936144*INTERP_CONST_SCALE),
01599      (Fract)(-0.142177*INTERP_CONST_SCALE), (Fract)( 0.039389*INTERP_CONST_SCALE),
01600      (Fract)(-0.060594*INTERP_CONST_SCALE), (Fract)( 0.007375*INTERP_CONST_SCALE),
01601      (Fract)(-0.040458*INTERP_CONST_SCALE), (Fract)(-0.002703*INTERP_CONST_SCALE),
01602      (Fract)(-0.029916*INTERP_CONST_SCALE), (Fract)(-0.006507*INTERP_CONST_SCALE),
01603      (Fract)(-0.022610*INTERP_CONST_SCALE), (Fract)(-0.007519*INTERP_CONST_SCALE),
01604      (Fract)(-0.016884*INTERP_CONST_SCALE), (Fract)(-0.007079*INTERP_CONST_SCALE),
01605      (Fract)(-0.012197*INTERP_CONST_SCALE), (Fract)(-0.005896*INTERP_CONST_SCALE),
01606      (Fract)(-0.008361*INTERP_CONST_SCALE), (Fract)(-0.004414*INTERP_CONST_SCALE),
01607      (Fract)(-0.005302*INTERP_CONST_SCALE), (Fract)(-0.002926*INTERP_CONST_SCALE),
01608      (Fract)(-0.002974*INTERP_CONST_SCALE)
01609     },
01610     /* Sufilter 5 */
01611     {
01612      (Fract)(-0.001433*INTERP_CONST_SCALE), (Fract)(-0.005432*INTERP_CONST_SCALE),
01613      (Fract)(-0.002474*INTERP_CONST_SCALE), (Fract)(-0.008536*INTERP_CONST_SCALE),
01614      (Fract)(-0.003720*INTERP_CONST_SCALE), (Fract)(-0.012213*INTERP_CONST_SCALE),
01615      (Fract)(-0.005058*INTERP_CONST_SCALE), (Fract)(-0.016358*INTERP_CONST_SCALE),
01616      (Fract)(-0.006306*INTERP_CONST_SCALE), (Fract)(-0.020854*INTERP_CONST_SCALE),
01617      (Fract)(-0.007193*INTERP_CONST_SCALE), (Fract)(-0.025647*INTERP_CONST_SCALE),
01618      (Fract)(-0.007287*INTERP_CONST_SCALE), (Fract)(-0.030914*INTERP_CONST_SCALE),
01619      (Fract)(-0.005722*INTERP_CONST_SCALE), (Fract)(-0.037710*INTERP_CONST_SCALE),
01620      (Fract)( 0.000268*INTERP_CONST_SCALE), (Fract)(-0.052407*INTERP_CONST_SCALE),
01621      (Fract)( 0.035569*INTERP_CONST_SCALE), (Fract)( 0.968174*INTERP_CONST_SCALE),
01622      (Fract)(-0.063866*INTERP_CONST_SCALE), (Fract)(-0.003305*INTERP_CONST_SCALE),
01623      (Fract)(-0.031741*INTERP_CONST_SCALE), (Fract)(-0.014235*INTERP_CONST_SCALE),
01624      (Fract)(-0.023696*INTERP_CONST_SCALE), (Fract)(-0.016398*INTERP_CONST_SCALE),
01625      (Fract)(-0.018889*INTERP_CONST_SCALE), (Fract)(-0.015874*INTERP_CONST_SCALE),
01626      (Fract)(-0.015045*INTERP_CONST_SCALE), (Fract)(-0.014085*INTERP_CONST_SCALE),
01627      (Fract)(-0.011666*INTERP_CONST_SCALE), (Fract)(-0.011670*INTERP_CONST_SCALE),
01628      (Fract)(-0.008659*INTERP_CONST_SCALE), (Fract)(-0.009034*INTERP_CONST_SCALE),
01629      (Fract)(-0.006053*INTERP_CONST_SCALE), (Fract)(-0.006466*INTERP_CONST_SCALE),
01630      (Fract)(-0.003893*INTERP_CONST_SCALE), (Fract)(-0.004174*INTERP_CONST_SCALE),
01631      (Fract)(-0.002208*INTERP_CONST_SCALE)
01632     },
01633     /* Sufilter 4 */
01634     {
01635      (Fract)(-0.002208*INTERP_CONST_SCALE), (Fract)(-0.004174*INTERP_CONST_SCALE),
01636      (Fract)(-0.003893*INTERP_CONST_SCALE), (Fract)(-0.006466*INTERP_CONST_SCALE),
01637      (Fract)(-0.006053*INTERP_CONST_SCALE), (Fract)(-0.009034*INTERP_CONST_SCALE),
01638      (Fract)(-0.008659*INTERP_CONST_SCALE), (Fract)(-0.011670*INTERP_CONST_SCALE),
01639      (Fract)(-0.011666*INTERP_CONST_SCALE), (Fract)(-0.014085*INTERP_CONST_SCALE),
01640      (Fract)(-0.015045*INTERP_CONST_SCALE), (Fract)(-0.015874*INTERP_CONST_SCALE),
01641      (Fract)(-0.018889*INTERP_CONST_SCALE), (Fract)(-0.016398*INTERP_CONST_SCALE),
01642      (Fract)(-0.023696*INTERP_CONST_SCALE), (Fract)(-0.014235*INTERP_CONST_SCALE),
01643      (Fract)(-0.031741*INTERP_CONST_SCALE), (Fract)(-0.003305*INTERP_CONST_SCALE),
01644      (Fract)(-0.063866*INTERP_CONST_SCALE), (Fract)( 0.968174*INTERP_CONST_SCALE),
01645      (Fract)( 0.035569*INTERP_CONST_SCALE), (Fract)(-0.052407*INTERP_CONST_SCALE),
01646      (Fract)( 0.000268*INTERP_CONST_SCALE), (Fract)(-0.037710*INTERP_CONST_SCALE),
01647      (Fract)(-0.005722*INTERP_CONST_SCALE), (Fract)(-0.030914*INTERP_CONST_SCALE),
01648      (Fract)(-0.007287*INTERP_CONST_SCALE), (Fract)(-0.025647*INTERP_CONST_SCALE),
01649      (Fract)(-0.007193*INTERP_CONST_SCALE), (Fract)(-0.020854*INTERP_CONST_SCALE),
01650      (Fract)(-0.006306*INTERP_CONST_SCALE), (Fract)(-0.016358*INTERP_CONST_SCALE),
01651      (Fract)(-0.005058*INTERP_CONST_SCALE), (Fract)(-0.012213*INTERP_CONST_SCALE),
01652      (Fract)(-0.003720*INTERP_CONST_SCALE), (Fract)(-0.008536*INTERP_CONST_SCALE),
01653      (Fract)(-0.002474*INTERP_CONST_SCALE), (Fract)(-0.005432*INTERP_CONST_SCALE),
01654      (Fract)(-0.001433*INTERP_CONST_SCALE)
01655     },
01656     /* Sufilter 3 */
01657     {
01658      (Fract)(-0.002974*INTERP_CONST_SCALE), (Fract)(-0.002926*INTERP_CONST_SCALE),
01659      (Fract)(-0.005302*INTERP_CONST_SCALE), (Fract)(-0.004414*INTERP_CONST_SCALE),
01660      (Fract)(-0.008361*INTERP_CONST_SCALE), (Fract)(-0.005896*INTERP_CONST_SCALE),
01661      (Fract)(-0.012197*INTERP_CONST_SCALE), (Fract)(-0.007079*INTERP_CONST_SCALE),
01662      (Fract)(-0.016884*INTERP_CONST_SCALE), (Fract)(-0.007519*INTERP_CONST_SCALE),
01663      (Fract)(-0.022610*INTERP_CONST_SCALE), (Fract)(-0.006507*INTERP_CONST_SCALE),
01664      (Fract)(-0.029916*INTERP_CONST_SCALE), (Fract)(-0.002703*INTERP_CONST_SCALE),
01665      (Fract)(-0.040458*INTERP_CONST_SCALE), (Fract)( 0.007375*INTERP_CONST_SCALE),
01666      (Fract)(-0.060594*INTERP_CONST_SCALE), (Fract)( 0.039389*INTERP_CONST_SCALE),
01667      (Fract)(-0.142177*INTERP_CONST_SCALE), (Fract)( 0.936144*INTERP_CONST_SCALE),
01668      (Fract)( 0.152320*INTERP_CONST_SCALE), (Fract)(-0.103839*INTERP_CONST_SCALE),
01669      (Fract)( 0.032505*INTERP_CONST_SCALE), (Fract)(-0.060848*INTERP_CONST_SCALE),
01670      (Fract)( 0.011737*INTERP_CONST_SCALE), (Fract)(-0.044864*INTERP_CONST_SCALE),
01671      (Fract)( 0.003757*INTERP_CONST_SCALE), (Fract)(-0.034888*INTERP_CONST_SCALE),
01672      (Fract)( 0.000169*INTERP_CONST_SCALE), (Fract)(-0.027177*INTERP_CONST_SCALE),
01673      (Fract)(-0.001345*INTERP_CONST_SCALE), (Fract)(-0.020694*INTERP_CONST_SCALE),
01674      (Fract)(-0.001762*INTERP_CONST_SCALE), (Fract)(-0.015133*INTERP_CONST_SCALE),
01675      (Fract)(-0.001606*INTERP_CONST_SCALE), (Fract)(-0.010428*INTERP_CONST_SCALE),
01676      (Fract)(-0.001197*INTERP_CONST_SCALE), (Fract)(-0.006582*INTERP_CONST_SCALE),
01677      (Fract)(-0.000739*INTERP_CONST_SCALE)
01678     },
01679     /* Sufilter 2 */
01680     {
01681      (Fract)(-0.003653*INTERP_CONST_SCALE), (Fract)(-0.001797*INTERP_CONST_SCALE),
01682      (Fract)(-0.006557*INTERP_CONST_SCALE), (Fract)(-0.002563*INTERP_CONST_SCALE),
01683      (Fract)(-0.010412*INTERP_CONST_SCALE), (Fract)(-0.003087*INTERP_CONST_SCALE),
01684      (Fract)(-0.015323*INTERP_CONST_SCALE), (Fract)(-0.003006*INTERP_CONST_SCALE),
01685      (Fract)(-0.021456*INTERP_CONST_SCALE), (Fract)(-0.001760*INTERP_CONST_SCALE),
01686      (Fract)(-0.029162*INTERP_CONST_SCALE), (Fract)( 0.001590*INTERP_CONST_SCALE),
01687      (Fract)(-0.039329*INTERP_CONST_SCALE), (Fract)( 0.008917*INTERP_CONST_SCALE),
01688      (Fract)(-0.054477*INTERP_CONST_SCALE), (Fract)( 0.025208*INTERP_CONST_SCALE),
01689      (Fract)(-0.083844*INTERP_CONST_SCALE), (Fract)( 0.072507*INTERP_CONST_SCALE),
01690      (Fract)(-0.197127*INTERP_CONST_SCALE), (Fract)( 0.873953*INTERP_CONST_SCALE),
01691      (Fract)( 0.281202*INTERP_CONST_SCALE), (Fract)(-0.152883*INTERP_CONST_SCALE),
01692      (Fract)( 0.061809*INTERP_CONST_SCALE), (Fract)(-0.081350*INTERP_CONST_SCALE),
01693      (Fract)( 0.026923*INTERP_CONST_SCALE), (Fract)(-0.056857*INTERP_CONST_SCALE),
01694      (Fract)( 0.013116*INTERP_CONST_SCALE), (Fract)(-0.042675*INTERP_CONST_SCALE),
01695      (Fract)( 0.006281*INTERP_CONST_SCALE), (Fract)(-0.032425*INTERP_CONST_SCALE),
01696      (Fract)( 0.002696*INTERP_CONST_SCALE), (Fract)(-0.024249*INTERP_CONST_SCALE),
01697      (Fract)( 0.000876*INTERP_CONST_SCALE), (Fract)(-0.017504*INTERP_CONST_SCALE),
01698      (Fract)( 0.000057*INTERP_CONST_SCALE), (Fract)(-0.011956*INTERP_CONST_SCALE),
01699      (Fract)(-0.000211*INTERP_CONST_SCALE), (Fract)(-0.007511*INTERP_CONST_SCALE),
01700      (Fract)(-0.000211*INTERP_CONST_SCALE)
01701     },
01702     /* Sufilter 1 */
01703     {
01704      (Fract)(-0.004176*INTERP_CONST_SCALE), (Fract)(-0.000881*INTERP_CONST_SCALE),
01705      (Fract)(-0.007536*INTERP_CONST_SCALE), (Fract)(-0.001071*INTERP_CONST_SCALE),
01706      (Fract)(-0.012010*INTERP_CONST_SCALE), (Fract)(-0.000847*INTERP_CONST_SCALE),
01707      (Fract)(-0.017742*INTERP_CONST_SCALE), (Fract)( 0.000193*INTERP_CONST_SCALE),
01708      (Fract)(-0.024954*INTERP_CONST_SCALE), (Fract)( 0.002683*INTERP_CONST_SCALE),
01709      (Fract)(-0.034102*INTERP_CONST_SCALE), (Fract)( 0.007705*INTERP_CONST_SCALE),
01710      (Fract)(-0.046287*INTERP_CONST_SCALE), (Fract)( 0.017457*INTERP_CONST_SCALE),
01711      (Fract)(-0.064544*INTERP_CONST_SCALE), (Fract)( 0.037802*INTERP_CONST_SCALE),
01712      (Fract)(-0.099706*INTERP_CONST_SCALE), (Fract)( 0.093971*INTERP_CONST_SCALE),
01713      (Fract)(-0.228130*INTERP_CONST_SCALE), (Fract)( 0.785214*INTERP_CONST_SCALE),
01714      (Fract)( 0.415952*INTERP_CONST_SCALE), (Fract)(-0.194514*INTERP_CONST_SCALE),
01715      (Fract)( 0.085059*INTERP_CONST_SCALE), (Fract)(-0.097043*INTERP_CONST_SCALE),
01716      (Fract)( 0.038213*INTERP_CONST_SCALE), (Fract)(-0.065629*INTERP_CONST_SCALE),
01717      (Fract)( 0.019786*INTERP_CONST_SCALE), (Fract)(-0.048195*INTERP_CONST_SCALE),
01718      (Fract)( 0.010477*INTERP_CONST_SCALE), (Fract)(-0.036051*INTERP_CONST_SCALE),
01719      (Fract)( 0.005370*INTERP_CONST_SCALE), (Fract)(-0.026654*INTERP_CONST_SCALE),
01720      (Fract)( 0.002552*INTERP_CONST_SCALE), (Fract)(-0.019081*INTERP_CONST_SCALE),
01721      (Fract)( 0.001068*INTERP_CONST_SCALE), (Fract)(-0.012962*INTERP_CONST_SCALE),
01722      (Fract)( 0.000360*INTERP_CONST_SCALE), (Fract)(-0.008123*INTERP_CONST_SCALE),
01723      (Fract)( 0.000080*INTERP_CONST_SCALE)
01724     }
01725    },/* end of hn_72_80[10][39]    table values  */
01726
01727   /* hn_80_96[6][38]    table values  */
01728    {
01729    /* Subfilter 5 */
01730      {
01731       (Fract)(-0.00000007*INTERP_CONST_SCALE*SCALE),
01732       (Fract)(0.00029734*INTERP_CONST_SCALE*SCALE),
01733       (Fract)(-0.00005261*INTERP_CONST_SCALE*SCALE),
01734       (Fract)(0.00166813*INTERP_CONST_SCALE*SCALE),
01735       (Fract)(-0.00040945*INTERP_CONST_SCALE*SCALE),
01736       (Fract)(0.00173015*INTERP_CONST_SCALE*SCALE),
01737       (Fract)(-0.00136330*INTERP_CONST_SCALE*SCALE),
01738       (Fract)(-0.00373544*INTERP_CONST_SCALE*SCALE),
01739       (Fract)(-0.00285151*INTERP_CONST_SCALE*SCALE),
01740       (Fract)(-0.01889635*INTERP_CONST_SCALE*SCALE),
01741       (Fract)(-0.00399540*INTERP_CONST_SCALE*SCALE),
01742       (Fract)(-0.04591032*INTERP_CONST_SCALE*SCALE),
01743       (Fract)(-0.00269195*INTERP_CONST_SCALE*SCALE),
01744       (Fract)(-0.08403074*INTERP_CONST_SCALE*SCALE),
01745       (Fract)(0.00512432*INTERP_CONST_SCALE*SCALE),
01746       (Fract)(-0.13185395*INTERP_CONST_SCALE*SCALE),
01747       (Fract)(0.03017485*INTERP_CONST_SCALE*SCALE),
01748       (Fract)(-0.20537938*INTERP_CONST_SCALE*SCALE),
01749       (Fract)(0.17102233*INTERP_CONST_SCALE*SCALE),
01750       (Fract)(0.82053144*INTERP_CONST_SCALE*SCALE),
01751       (Fract)(-0.14684649*INTERP_CONST_SCALE*SCALE),
01752       (Fract)(-0.06062958*INTERP_CONST_SCALE*SCALE),
01753       (Fract)(-0.04960906*INTERP_CONST_SCALE*SCALE),
01754       (Fract)(-0.08032395*INTERP_CONST_SCALE*SCALE),
01755       (Fract)(-0.02007930*INTERP_CONST_SCALE*SCALE),
01756       (Fract)(-0.06695637*INTERP_CONST_SCALE*SCALE),
01757       (Fract)(-0.00460424*INTERP_CONST_SCALE*SCALE),
01758       (Fract)(-0.04454159*INTERP_CONST_SCALE*SCALE),
01759       (Fract)(0.00289942*INTERP_CONST_SCALE*SCALE),
01760       (Fract)(-0.02335617*INTERP_CONST_SCALE*SCALE),
01761       (Fract)(0.00489449*INTERP_CONST_SCALE*SCALE),
01762       (Fract)(-0.00863312*INTERP_CONST_SCALE*SCALE),
01763       (Fract)(0.00374601*INTERP_CONST_SCALE*SCALE),
01764       (Fract)(-0.00139439*INTERP_CONST_SCALE*SCALE),
01765       (Fract)(0.00171610*INTERP_CONST_SCALE*SCALE),
01766       (Fract)(0.00042083*INTERP_CONST_SCALE*SCALE),
01767       (Fract)(0.00033678*INTERP_CONST_SCALE*SCALE),
01768       (Fract)(0.00009202*INTERP_CONST_SCALE*SCALE),
01769      },
01770    /* Subfilter 0 */
01771      {
01772       (Fract)(0.00018417*INTERP_CONST_SCALE*SCALE),
01773       (Fract)(0.00015295*INTERP_CONST_SCALE*SCALE),
01774       (Fract)(0.00101742*INTERP_CONST_SCALE*SCALE),
01775       (Fract)(0.00074201*INTERP_CONST_SCALE*SCALE),
01776       (Fract)(-0.00001707*INTERP_CONST_SCALE*SCALE),
01777       (Fract)(0.00159449*INTERP_CONST_SCALE*SCALE),
01778       (Fract)(-0.00685036*INTERP_CONST_SCALE*SCALE),
01779       (Fract)(0.00212966*INTERP_CONST_SCALE*SCALE),
01780       (Fract)(-0.02271388*INTERP_CONST_SCALE*SCALE),
01781       (Fract)(0.00169438*INTERP_CONST_SCALE*SCALE),
01782       (Fract)(-0.04812818*INTERP_CONST_SCALE*SCALE),
01783       (Fract)(-0.00000598*INTERP_CONST_SCALE*SCALE),
01784       (Fract)(-0.07980538*INTERP_CONST_SCALE*SCALE),
01785       (Fract)(-0.00264126*INTERP_CONST_SCALE*SCALE),
01786       (Fract)(-0.11113828*INTERP_CONST_SCALE*SCALE),
01787       (Fract)(-0.00532780*INTERP_CONST_SCALE*SCALE),
01788       (Fract)(-0.13423916*INTERP_CONST_SCALE*SCALE),
01789       (Fract)(-0.00702014*INTERP_CONST_SCALE*SCALE),
01790       (Fract)(0.85725000*INTERP_CONST_SCALE*SCALE),
01791       (Fract)(-0.00702014*INTERP_CONST_SCALE*SCALE),
01792       (Fract)(-0.13423916*INTERP_CONST_SCALE*SCALE),
01793       (Fract)(-0.00532780*INTERP_CONST_SCALE*SCALE),
01794       (Fract)(-0.11113828*INTERP_CONST_SCALE*SCALE),
01795       (Fract)(-0.00264126*INTERP_CONST_SCALE*SCALE),
01796       (Fract)(-0.07980538*INTERP_CONST_SCALE*SCALE),
01797       (Fract)(-0.00000598*INTERP_CONST_SCALE*SCALE),
01798       (Fract)(-0.04812818*INTERP_CONST_SCALE*SCALE),
01799       (Fract)(0.00169438*INTERP_CONST_SCALE*SCALE),
01800       (Fract)(-0.02271388*INTERP_CONST_SCALE*SCALE),
01801       (Fract)(0.00212966*INTERP_CONST_SCALE*SCALE),
01802       (Fract)(-0.00685036*INTERP_CONST_SCALE*SCALE),
01803       (Fract)(0.00159449*INTERP_CONST_SCALE*SCALE),
01804       (Fract)(-0.00001707*INTERP_CONST_SCALE*SCALE),
01805       (Fract)(0.00074201*INTERP_CONST_SCALE*SCALE),
01806       (Fract)(0.00101742*INTERP_CONST_SCALE*SCALE),
01807       (Fract)(0.00015295*INTERP_CONST_SCALE*SCALE),
01808       (Fract)(0.00018417*INTERP_CONST_SCALE*SCALE),
01809       (Fract)(0.00000000*INTERP_CONST_SCALE*SCALE),
01810      },
01811    /* Subfilter 1 */
01812      {
01813       (Fract)(0.00009202*INTERP_CONST_SCALE*SCALE),
01814       (Fract)(0.00033678*INTERP_CONST_SCALE*SCALE),
01815       (Fract)(0.00042083*INTERP_CONST_SCALE*SCALE),
01816       (Fract)(0.00171610*INTERP_CONST_SCALE*SCALE),
01817       (Fract)(-0.00139439*INTERP_CONST_SCALE*SCALE),
01818       (Fract)(0.00374601*INTERP_CONST_SCALE*SCALE),
01819       (Fract)(-0.00863312*INTERP_CONST_SCALE*SCALE),
01820       (Fract)(0.00489449*INTERP_CONST_SCALE*SCALE),
01821       (Fract)(-0.02335617*INTERP_CONST_SCALE*SCALE),
01822       (Fract)(0.00289942*INTERP_CONST_SCALE*SCALE),
01823       (Fract)(-0.04454159*INTERP_CONST_SCALE*SCALE),
01824       (Fract)(-0.00460424*INTERP_CONST_SCALE*SCALE),
01825       (Fract)(-0.06695637*INTERP_CONST_SCALE*SCALE),
01826       (Fract)(-0.02007930*INTERP_CONST_SCALE*SCALE),
01827       (Fract)(-0.08032395*INTERP_CONST_SCALE*SCALE),
01828       (Fract)(-0.04960906*INTERP_CONST_SCALE*SCALE),
01829       (Fract)(-0.06062958*INTERP_CONST_SCALE*SCALE),
01830       (Fract)(-0.14684649*INTERP_CONST_SCALE*SCALE),
01831       (Fract)(0.82053144*INTERP_CONST_SCALE*SCALE),
01832       (Fract)(0.17102233*INTERP_CONST_SCALE*SCALE),
01833       (Fract)(-0.20537938*INTERP_CONST_SCALE*SCALE),
01834       (Fract)(0.03017485*INTERP_CONST_SCALE*SCALE),
01835       (Fract)(-0.13185395*INTERP_CONST_SCALE*SCALE),
01836       (Fract)(0.00512432*INTERP_CONST_SCALE*SCALE),
01837       (Fract)(-0.08403074*INTERP_CONST_SCALE*SCALE),
01838       (Fract)(-0.00269195*INTERP_CONST_SCALE*SCALE),
01839       (Fract)(-0.04591032*INTERP_CONST_SCALE*SCALE),
01840       (Fract)(-0.00399540*INTERP_CONST_SCALE*SCALE),
01841       (Fract)(-0.01889635*INTERP_CONST_SCALE*SCALE),
01842       (Fract)(-0.00285151*INTERP_CONST_SCALE*SCALE),
01843       (Fract)(-0.00373544*INTERP_CONST_SCALE*SCALE),
01844       (Fract)(-0.00136330*INTERP_CONST_SCALE*SCALE),
01845       (Fract)(0.00173015*INTERP_CONST_SCALE*SCALE),
01846       (Fract)(-0.00040945*INTERP_CONST_SCALE*SCALE),
01847       (Fract)(0.00166813*INTERP_CONST_SCALE*SCALE),
01848       (Fract)(-0.00005261*INTERP_CONST_SCALE*SCALE),
01849       (Fract)(0.00029734*INTERP_CONST_SCALE*SCALE),
01850       (Fract)(-0.00000007*INTERP_CONST_SCALE*SCALE),
01851      },
01852    /* Subfilter 2 */
01853      {
01854       (Fract)(0.00003378*INTERP_CONST_SCALE*SCALE),
01855       (Fract)(0.00044624*INTERP_CONST_SCALE*SCALE),
01856       (Fract)(-0.00000389*INTERP_CONST_SCALE*SCALE),
01857       (Fract)(0.00231741*INTERP_CONST_SCALE*SCALE),
01858       (Fract)(-0.00212075*INTERP_CONST_SCALE*SCALE),
01859       (Fract)(0.00475011*INTERP_CONST_SCALE*SCALE),
01860       (Fract)(-0.00872973*INTERP_CONST_SCALE*SCALE),
01861       (Fract)(0.00517092*INTERP_CONST_SCALE*SCALE),
01862       (Fract)(-0.02076822*INTERP_CONST_SCALE*SCALE),
01863       (Fract)(-0.00003243*INTERP_CONST_SCALE*SCALE),
01864       (Fract)(-0.03614588*INTERP_CONST_SCALE*SCALE),
01865       (Fract)(-0.01454879*INTERP_CONST_SCALE*SCALE),
01866       (Fract)(-0.04874698*INTERP_CONST_SCALE*SCALE),
01867       (Fract)(-0.04213524*INTERP_CONST_SCALE*SCALE),
01868       (Fract)(-0.04690691*INTERP_CONST_SCALE*SCALE),
01869       (Fract)(-0.09182202*INTERP_CONST_SCALE*SCALE),
01870       (Fract)(0.00008798*INTERP_CONST_SCALE*SCALE),
01871       (Fract)(-0.23593859*INTERP_CONST_SCALE*SCALE),
01872       (Fract)(0.71559962*INTERP_CONST_SCALE*SCALE),
01873       (Fract)(0.36729241*INTERP_CONST_SCALE*SCALE),
01874       (Fract)(-0.25642592*INTERP_CONST_SCALE*SCALE),
01875       (Fract)(0.04674157*INTERP_CONST_SCALE*SCALE),
01876       (Fract)(-0.13661209*INTERP_CONST_SCALE*SCALE),
01877       (Fract)(0.00004169*INTERP_CONST_SCALE*SCALE),
01878       (Fract)(-0.07818634*INTERP_CONST_SCALE*SCALE),
01879       (Fract)(-0.01298639*INTERP_CONST_SCALE*SCALE),
01880       (Fract)(-0.03824146*INTERP_CONST_SCALE*SCALE),
01881       (Fract)(-0.01344746*INTERP_CONST_SCALE*SCALE),
01882       (Fract)(-0.01276547*INTERP_CONST_SCALE*SCALE),
01883       (Fract)(-0.00919970*INTERP_CONST_SCALE*SCALE),
01884       (Fract)(-0.00003217*INTERP_CONST_SCALE*SCALE),
01885       (Fract)(-0.00453849*INTERP_CONST_SCALE*SCALE),
01886       (Fract)(0.00341840*INTERP_CONST_SCALE*SCALE),
01887       (Fract)(-0.00145927*INTERP_CONST_SCALE*SCALE),
01888       (Fract)(0.00220884*INTERP_CONST_SCALE*SCALE),
01889       (Fract)(-0.00020073*INTERP_CONST_SCALE*SCALE),
01890       (Fract)(0.00040297*INTERP_CONST_SCALE*SCALE),
01891       (Fract)(-0.00000002*INTERP_CONST_SCALE*SCALE),
01892      },
01893    /* Subfilter 3 */
01894      {
01895       (Fract)(0.00000701*INTERP_CONST_SCALE*SCALE),
01896       (Fract)(0.00046369*INTERP_CONST_SCALE*SCALE),
01897       (Fract)(-0.00020588*INTERP_CONST_SCALE*SCALE),
01898       (Fract)(0.00246826*INTERP_CONST_SCALE*SCALE),
01899       (Fract)(-0.00210892*INTERP_CONST_SCALE*SCALE),
01900       (Fract)(0.00456409*INTERP_CONST_SCALE*SCALE),
01901       (Fract)(-0.00721690*INTERP_CONST_SCALE*SCALE),
01902       (Fract)(0.00327197*INTERP_CONST_SCALE*SCALE),
01903       (Fract)(-0.01564367*INTERP_CONST_SCALE*SCALE),
01904       (Fract)(-0.00585122*INTERP_CONST_SCALE*SCALE),
01905       (Fract)(-0.02495174*INTERP_CONST_SCALE*SCALE),
01906       (Fract)(-0.02685338*INTERP_CONST_SCALE*SCALE),
01907       (Fract)(-0.02938129*INTERP_CONST_SCALE*SCALE),
01908       (Fract)(-0.06315413*INTERP_CONST_SCALE*SCALE),
01909       (Fract)(-0.01824284*INTERP_CONST_SCALE*SCALE),
01910       (Fract)(-0.12275910*INTERP_CONST_SCALE*SCALE),
01911       (Fract)(0.03734104*INTERP_CONST_SCALE*SCALE),
01912       (Fract)(-0.27072497*INTERP_CONST_SCALE*SCALE),
01913       (Fract)(0.55723826*INTERP_CONST_SCALE*SCALE),
01914       (Fract)(0.55723826*INTERP_CONST_SCALE*SCALE),
01915       (Fract)(-0.27072497*INTERP_CONST_SCALE*SCALE),
01916       (Fract)(0.03734104*INTERP_CONST_SCALE*SCALE),
01917       (Fract)(-0.12275910*INTERP_CONST_SCALE*SCALE),
01918       (Fract)(-0.01824284*INTERP_CONST_SCALE*SCALE),
01919       (Fract)(-0.06315413*INTERP_CONST_SCALE*SCALE),
01920       (Fract)(-0.02938129*INTERP_CONST_SCALE*SCALE),
01921       (Fract)(-0.02685338*INTERP_CONST_SCALE*SCALE),
01922       (Fract)(-0.02495174*INTERP_CONST_SCALE*SCALE),
01923       (Fract)(-0.00585122*INTERP_CONST_SCALE*SCALE),
01924       (Fract)(-0.01564367*INTERP_CONST_SCALE*SCALE),
01925       (Fract)(0.00327197*INTERP_CONST_SCALE*SCALE),
01926       (Fract)(-0.00721690*INTERP_CONST_SCALE*SCALE),
01927       (Fract)(0.00456409*INTERP_CONST_SCALE*SCALE),
01928       (Fract)(-0.00210892*INTERP_CONST_SCALE*SCALE),
01929       (Fract)(0.00246826*INTERP_CONST_SCALE*SCALE),
01930       (Fract)(-0.00020588*INTERP_CONST_SCALE*SCALE),
01931       (Fract)(0.00046369*INTERP_CONST_SCALE*SCALE),
01932       (Fract)(0.00000701*INTERP_CONST_SCALE*SCALE),
01933      },
01934    /* Subfilter 4 */
01935      {
01936       (Fract)(-0.00000002*INTERP_CONST_SCALE*SCALE),
01937       (Fract)(0.00040297*INTERP_CONST_SCALE*SCALE),
01938       (Fract)(-0.00020073*INTERP_CONST_SCALE*SCALE),
01939       (Fract)(0.00220884*INTERP_CONST_SCALE*SCALE),
01940       (Fract)(-0.00145927*INTERP_CONST_SCALE*SCALE),
01941       (Fract)(0.00341840*INTERP_CONST_SCALE*SCALE),
01942       (Fract)(-0.00453849*INTERP_CONST_SCALE*SCALE),
01943       (Fract)(-0.00003217*INTERP_CONST_SCALE*SCALE),
01944       (Fract)(-0.00919970*INTERP_CONST_SCALE*SCALE),
01945       (Fract)(-0.01276547*INTERP_CONST_SCALE*SCALE),
01946       (Fract)(-0.01344746*INTERP_CONST_SCALE*SCALE),
01947       (Fract)(-0.03824146*INTERP_CONST_SCALE*SCALE),
01948       (Fract)(-0.01298639*INTERP_CONST_SCALE*SCALE),
01949       (Fract)(-0.07818634*INTERP_CONST_SCALE*SCALE),
01950       (Fract)(0.00004169*INTERP_CONST_SCALE*SCALE),
01951       (Fract)(-0.13661209*INTERP_CONST_SCALE*SCALE),
01952       (Fract)(0.04674157*INTERP_CONST_SCALE*SCALE),
01953       (Fract)(-0.25642592*INTERP_CONST_SCALE*SCALE),
01954       (Fract)(0.36729241*INTERP_CONST_SCALE*SCALE),
01955       (Fract)(0.71559962*INTERP_CONST_SCALE*SCALE),
01956       (Fract)(-0.23593859*INTERP_CONST_SCALE*SCALE),
01957       (Fract)(0.00008798*INTERP_CONST_SCALE*SCALE),
01958       (Fract)(-0.09182202*INTERP_CONST_SCALE*SCALE),
01959       (Fract)(-0.04690691*INTERP_CONST_SCALE*SCALE),
01960       (Fract)(-0.04213524*INTERP_CONST_SCALE*SCALE),
01961       (Fract)(-0.04874698*INTERP_CONST_SCALE*SCALE),
01962       (Fract)(-0.01454879*INTERP_CONST_SCALE*SCALE),
01963       (Fract)(-0.03614588*INTERP_CONST_SCALE*SCALE),
01964       (Fract)(-0.00003243*INTERP_CONST_SCALE*SCALE),
01965       (Fract)(-0.02076822*INTERP_CONST_SCALE*SCALE),
01966       (Fract)(0.00517092*INTERP_CONST_SCALE*SCALE),
01967       (Fract)(-0.00872973*INTERP_CONST_SCALE*SCALE),
01968       (Fract)(0.00475011*INTERP_CONST_SCALE*SCALE),
01969       (Fract)(-0.00212075*INTERP_CONST_SCALE*SCALE),
01970       (Fract)(0.00231741*INTERP_CONST_SCALE*SCALE),
01971       (Fract)(-0.00000389*INTERP_CONST_SCALE*SCALE),
01972       (Fract)(0.00044624*INTERP_CONST_SCALE*SCALE),
01973       (Fract)(0.00003378*INTERP_CONST_SCALE*SCALE),
01974      }
01975    }, /* end of hn_80_96[6][38]    table values  */
01976
01977    /* cd_thresholds[3]    table values  */
01978    /* Threholds calculated as fraction using the formula P = 0.25*10**(X dBm/10) */
01979    /* e.g. for -43 dBm, P = 0.25*10**(-43/10) */
01980    {
01981      /* -43 dBm, -48 dBm */
01982      {(LFract)(1.25297e-5*Q31_SCALE), (LFract)(3.96223e-6*Q31_SCALE) },
01983
01984      /* -26 dBm, -31 dBm */
01985      {(LFract)(6.28e-4*Q31_SCALE), (LFract)(1.986e-4*Q31_SCALE) },
01986
01987      /* -31 dBm, -37 dBm */
01988      {(LFract)(1.986e-4*Q31_SCALE), (LFract)(5e-5*Q31_SCALE) }
01989    }, /* end of cd_thresholds[3]    table values  */
01990
01991     /* dpu_trec_fil_coef[4][4]    table values  */
01992     /* Coefficients for timing recovery filters */
01993     {
01994      /* V.29, f1 = 500 Hz, f2 = 2900 Hz, mu = 0.98 */
01995      (Fract)(0.9280*DPU_TREC_COEF_SCALE),
01996      (Fract)(-0.3150*DPU_TREC_COEF_SCALE),
01997      (Fract)(0.3150*DPU_TREC_COEF_SCALE),
01998      (Fract)(0.9280*DPU_TREC_COEF_SCALE),
01999      /* V.27 4800 bps, f1 = 1000 Hz, f2 = 2600 Hz, mu = 0.98 */
02000      (Fract)(0.7775*DPU_TREC_COEF_SCALE),
02001      (Fract)(-0.1279*DPU_TREC_COEF_SCALE),
02002      (Fract)(0.5966*DPU_TREC_COEF_SCALE),
02003      (Fract)(0.9716*DPU_TREC_COEF_SCALE),
02004      /* V.27 2400 bps, f1 = 1200 Hz, f2 = 2400 Hz, mu = 0.98 */
02005      (Fract)(0.6930*DPU_TREC_COEF_SCALE),
02006      (Fract)(0.0000*DPU_TREC_COEF_SCALE),
02007      (Fract)(0.6930*DPU_TREC_COEF_SCALE),
02008      (Fract)(0.9800*DPU_TREC_COEF_SCALE),
02009      /* V.17 all rates, f1 = 600 Hz, f2 = 3000 Hz, mu = 0.98 Ts = 1/9600*/
02010      (Fract)(0.9054*DPU_TREC_COEF_SCALE),  /* mu * cos(2*pi*f1/Ts) */
02011      (Fract)(-0.3750*DPU_TREC_COEF_SCALE),  /* mu * cos(2*pi*f2/Ts) */
02012      (Fract)(0.3750*DPU_TREC_COEF_SCALE),  /* mu * sin(2*pi*f1/Ts) */
02013      (Fract)(0.9054*DPU_TREC_COEF_SCALE)   /* mu * sin(2*pi*f2/Ts) */
02014     }, /* end of dpu_trec_fil_coef[4][4]    table values  */
02015
02016     /* bp_rx_v21_96[23]    table values  */
02017     {
02018      (Fract)(-0.010378*INTERP_CONST_SCALE), (Fract)(-0.005536*INTERP_CONST_SCALE),
02019      (Fract)(0.006363*INTERP_CONST_SCALE), (Fract)(0.000000*INTERP_CONST_SCALE),
02020      (Fract)(-0.003223*INTERP_CONST_SCALE), (Fract)(0.041568*INTERP_CONST_SCALE),
02021      (Fract)(0.075721*INTERP_CONST_SCALE), (Fract)(-0.017440*INTERP_CONST_SCALE),
02022      (Fract)(-0.170201*INTERP_CONST_SCALE), (Fract)(-0.142162*INTERP_CONST_SCALE),
02023      (Fract)(0.099475*INTERP_CONST_SCALE), (Fract)(0.250000*INTERP_CONST_SCALE),
02024      (Fract)(0.099475*INTERP_CONST_SCALE), (Fract)(-0.142162*INTERP_CONST_SCALE),
02025      (Fract)(-0.170201*INTERP_CONST_SCALE), (Fract)(-0.017440*INTERP_CONST_SCALE),
02026      (Fract)(0.075721*INTERP_CONST_SCALE), (Fract)(0.041568*INTERP_CONST_SCALE),
02027      (Fract)(-0.003223*INTERP_CONST_SCALE), (Fract)(0.000000*INTERP_CONST_SCALE),
02028      (Fract)(0.006363*INTERP_CONST_SCALE), (Fract)(-0.005536*INTERP_CONST_SCALE),
02029      (Fract)(-0.010378*INTERP_CONST_SCALE)
02030     }, /* end of bp_rx_v21_96[23]    table values  */
02031
02032      /* bp_hilb_v21_96[23]    table values  */
02033     {
02034      (Fract)(-0.001573*INTERP_CONST_SCALE), (Fract)(-0.003607*INTERP_CONST_SCALE),
02035      (Fract)(-0.004003*INTERP_CONST_SCALE), (Fract)(0.001285*INTERP_CONST_SCALE),
02036      (Fract)(-0.009515*INTERP_CONST_SCALE), (Fract)(-0.024865*INTERP_CONST_SCALE),
02037      (Fract)(0.040670*INTERP_CONST_SCALE), (Fract)(0.127500*INTERP_CONST_SCALE),
02038      (Fract)(0.055830*INTERP_CONST_SCALE), (Fract)(-0.156038*INTERP_CONST_SCALE),
02039      (Fract)(-0.217935*INTERP_CONST_SCALE), (Fract)(-0.000000*INTERP_CONST_SCALE),
02040      (Fract)(0.217935*INTERP_CONST_SCALE), (Fract)(0.156038*INTERP_CONST_SCALE),
02041      (Fract)(-0.055830*INTERP_CONST_SCALE), (Fract)(-0.127500*INTERP_CONST_SCALE),
02042      (Fract)(-0.040670*INTERP_CONST_SCALE), (Fract)(0.024865*INTERP_CONST_SCALE),
02043      (Fract)(0.009515*INTERP_CONST_SCALE), (Fract)(-0.001285*INTERP_CONST_SCALE),
02044      (Fract)(0.004003*INTERP_CONST_SCALE), (Fract)(0.003607*INTERP_CONST_SCALE),
02045      (Fract)(0.001573*INTERP_CONST_SCALE)
02046     } /* end of bp_hilb_v21_96[23]    table values  */
02047 };
02048
02049 #ifdef ROM
02050 /* rom version number */
02051 #pragma DATA_SECTION(FM_ROMVER, ".fm_lversion")
02052 far const char FM_ROMVER[20] = {"FM ROM VER 1.0"};
02053 #endif /* ROM */
02054
02055 /* Nothing past this point */


FM: dpu_tgt.h File Reference

dpu_tgt.h File Reference

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

Include dependency graph for dpu_tgt.h:

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

Go to the source code of this file.

Defines

#define | Q0_ROUND 0
#define | Q1_ROUND 1
#define | Q2_ROUND 2
#define | Q3_ROUND 4
#define | Q4_ROUND 8
#define | Q5_ROUND 16
#define | Q6_ROUND 32
#define | Q7_ROUND 64
#define | Q8_ROUND 128
#define | Q9_ROUND 256
#define | Q10_ROUND 512
#define | Q11_ROUND 1024
#define | Q12_ROUND 2048
#define | Q13_ROUND 4096
#define | Q14_ROUND 8192
#define | Q15_ROUND 16384
#define | Q16_ROUND 32768
#define | Q17_ROUND 65536
#define | Q18_ROUND 131072
#define | Q19_ROUND 262144
#define | Q0_SCALE 1
#define | Q1_SCALE 2
#define | Q2_SCALE 4
#define | Q3_SCALE 8
#define | Q4_SCALE 16
#define | Q5_SCALE 32
#define | Q6_SCALE 64
#define | Q7_SCALE 128
#define | Q8_SCALE 256
#define | Q9_SCALE 512
#define | Q10_SCALE 1024
#define | Q11_SCALE 2048
#define | Q12_SCALE 4096
#define | Q13_SCALE 8192
#define | Q14_SCALE 16384
#define | Q15_SCALE 32768
#define | Q16_SCALE 65536
#define | Q17_SCALE 131072
#define | Q18_SCALE 262144
#define | Q31_SCALE 2147483648UL
#define | INTERP_CONST_SCALE Q14_SCALE
#define | FREQ_SCALE Q16_SCALE
#define | FREQ_SCALE_Q 16
#define | TX_CONST_SCALE Q14_SCALE
#define | RX_CONST_SCALE Q14_SCALE
#define | INVMOD_SCALE Q14_SCALE
#define | PH_ERROR_SCALE 15
#define | V29_96_SC1 4096
#define | V29_96_SH1 12

Define Documentation

#define Q0_ROUND 0

Definition at line 40 of file dpu_tgt.h.

#define Q1_ROUND 1

Definition at line 41 of file dpu_tgt.h.

#define Q2_ROUND 2

Definition at line 42 of file dpu_tgt.h.

#define Q3_ROUND 4

Definition at line 43 of file dpu_tgt.h.

#define Q4_ROUND 8

Definition at line 44 of file dpu_tgt.h.

#define Q5_ROUND 16

Definition at line 45 of file dpu_tgt.h.

#define Q6_ROUND 32

Definition at line 46 of file dpu_tgt.h.

#define Q7_ROUND 64

Definition at line 47 of file dpu_tgt.h.

#define Q8_ROUND 128

Definition at line 48 of file dpu_tgt.h.

#define Q9_ROUND 256

Definition at line 49 of file dpu_tgt.h.

Referenced by dpu_agc().

#define Q10_ROUND 512

Definition at line 50 of file dpu_tgt.h.

#define Q11_ROUND 1024

Definition at line 51 of file dpu_tgt.h.

#define Q12_ROUND 2048

Definition at line 52 of file dpu_tgt.h.

#define Q13_ROUND 4096

Definition at line 53 of file dpu_tgt.h.

Referenced by dpu_crec().

#define Q14_ROUND 8192

Definition at line 54 of file dpu_tgt.h.

#define Q15_ROUND 16384

Definition at line 55 of file dpu_tgt.h.

Referenced by updateIIR().

#define Q16_ROUND 32768

Definition at line 56 of file dpu_tgt.h.

#define Q17_ROUND 65536

Definition at line 57 of file dpu_tgt.h.

#define Q18_ROUND 131072

Definition at line 58 of file dpu_tgt.h.

#define Q19_ROUND 262144

Definition at line 59 of file dpu_tgt.h.

#define Q0_SCALE 1

Definition at line 62 of file dpu_tgt.h.

#define Q1_SCALE 2

Definition at line 63 of file dpu_tgt.h.

#define Q2_SCALE 4

Definition at line 64 of file dpu_tgt.h.

#define Q3_SCALE 8

Definition at line 65 of file dpu_tgt.h.

#define Q4_SCALE 16

Definition at line 66 of file dpu_tgt.h.

#define Q5_SCALE 32

Definition at line 67 of file dpu_tgt.h.

#define Q6_SCALE 64

Definition at line 68 of file dpu_tgt.h.

#define Q7_SCALE 128

Definition at line 69 of file dpu_tgt.h.

#define Q8_SCALE 256

Definition at line 70 of file dpu_tgt.h.

#define Q9_SCALE 512

Definition at line 71 of file dpu_tgt.h.

#define Q10_SCALE 1024

Definition at line 72 of file dpu_tgt.h.

#define Q11_SCALE 2048

Definition at line 73 of file dpu_tgt.h.

#define Q12_SCALE 4096

Definition at line 74 of file dpu_tgt.h.

Referenced by dpu_adeq_init().

#define Q13_SCALE 8192

Definition at line 75 of file dpu_tgt.h.

#define Q14_SCALE 16384

Definition at line 76 of file dpu_tgt.h.

Referenced by dpu_adeq_init(), and dpuStatus().

#define Q15_SCALE 32768

Definition at line 77 of file dpu_tgt.h.

Referenced by dpu_dot_det_init(), dpuHSrxSetCdParms(), fmHSrxSetCdParms(), and v21RxStNULLInit().

#define Q16_SCALE 65536

Definition at line 78 of file dpu_tgt.h.

#define Q17_SCALE 131072

Definition at line 79 of file dpu_tgt.h.

#define Q18_SCALE 262144

Definition at line 80 of file dpu_tgt.h.

#define Q31_SCALE 2147483648UL

Definition at line 82 of file dpu_tgt.h.

#define INTERP_CONST_SCALE Q14_SCALE

Definition at line 85 of file dpu_tgt.h.

Referenced by dpu_cd_det_init(), dpu_dot_det_init(), dpu_un_modulate(), v21RxCommonInit(), v21RxStNULLInit(), v27RxSt1Init(), v27RxSt3Init(), v29RxSt1Init(), v29RxSt3Init(), and vxx_tx_init().

#define FREQ_SCALE Q16_SCALE

Definition at line 86 of file dpu_tgt.h.

Referenced by v21RxCommonInit(), v21RxStNULLInit(), v27RxSt3Init(), v27RxSt7Init(), v29RxSt3Init(), v29RxSt7Init(), and vxx_tx_init().

#define FREQ_SCALE_Q 16

Definition at line 87 of file dpu_tgt.h.

Referenced by dpuStatus().

#define TX_CONST_SCALE Q14_SCALE

Definition at line 90 of file dpu_tgt.h.

#define RX_CONST_SCALE Q14_SCALE

Definition at line 91 of file dpu_tgt.h.

#define INVMOD_SCALE Q14_SCALE

Definition at line 94 of file dpu_tgt.h.

Referenced by v27RxSt34Init(), and v27RxSt3Init().

#define PH_ERROR_SCALE 15

Definition at line 96 of file dpu_tgt.h.

Referenced by dpu_slic_init().

#define V29_96_SC1 4096

Definition at line 99 of file dpu_tgt.h.

Referenced by dpu_v27_v29_slicer().

#define V29_96_SH1 12

Definition at line 100 of file dpu_tgt.h.

Referenced by dpu_v27_v29_slicer().


FM: dpu_tgt.h Source File

dpu_tgt.h

Go to the documentation of this file.
00001 #ifndef _DPU_TGT_H
00002 #define _DPU_TGT_H
00003 /******************************************************************************
00004  * FILE PURPOSE: DPU target specific constants definition
00005  ******************************************************************************
00006  * FILE NAME:   dpu_tgt.h
00007  *
00008  * DESCRIPTION: 16 bit fixed point DSP platform DPU specific definitions
00009  *
00010  * REQUIRES:
00011  *
00012  * TABS: NONE
00013  *
00014  * $Id: DPU_TGT.H 1.7 1998/04/30 17:14:42 ppatel Exp $
00015  *
00016  * REVISION HISTORY:
00017  *
00018  * $Log: DPU_TGT.H $
00019  * Revision 1.7  1998/04/30 17:14:42  ppatel
00020  *  Changes for reporting modem status (timing offset, carrier freq offset,
00021  * snr, etc.)
00022  * Revision 1.6  1997/09/05 20:44:17  PPATEL
00023  *   Removed defines for sine table
00024  * Revision 1.5  1997/09/03 17:14:17  PPATEL
00025  * Changed C542 to C54x in #ifdef for compatibility with C548
00026  * Revision 1.4  1997/08/22 13:27:45  PPATEL
00027  * Added Q31_SCALE definition used in carrier detection and dot detection
00028  * Revision 1.3  1997/05/22 11:23:31  Zoran
00029  *   removed siu.h
00030  * Revision 1.2  1997/05/18 12:41:36  Zoran
00031  *   Cleaned, updated, this is for Tiger only!!!!
00032  * Revision 1.1  1997/02/06 09:37:48  unknown
00033  * Initial revision
00034  *
00035  * (C) Copyright 1997, TELOGY Networks, Inc.
00036  *****************************************************************************/
00037 #include <ti/mas/types/types.h>
00038
00039 /* Rounding Constants */
00040 #define Q0_ROUND        0
00041 #define Q1_ROUND        1
00042 #define Q2_ROUND        2
00043 #define Q3_ROUND        4
00044 #define Q4_ROUND        8
00045 #define Q5_ROUND       16
00046 #define Q6_ROUND       32
00047 #define Q7_ROUND       64
00048 #define Q8_ROUND      128
00049 #define Q9_ROUND      256
00050 #define Q10_ROUND     512
00051 #define Q11_ROUND    1024
00052 #define Q12_ROUND    2048
00053 #define Q13_ROUND    4096
00054 #define Q14_ROUND    8192
00055 #define Q15_ROUND   16384
00056 #define Q16_ROUND   32768
00057 #define Q17_ROUND   65536
00058 #define Q18_ROUND  131072
00059 #define Q19_ROUND  262144
00060
00061 /* Scaling constants */
00062 #define Q0_SCALE        1
00063 #define Q1_SCALE        2
00064 #define Q2_SCALE        4
00065 #define Q3_SCALE        8
00066 #define Q4_SCALE       16
00067 #define Q5_SCALE       32
00068 #define Q6_SCALE       64
00069 #define Q7_SCALE      128
00070 #define Q8_SCALE      256
00071 #define Q9_SCALE      512
00072 #define Q10_SCALE    1024
00073 #define Q11_SCALE    2048
00074 #define Q12_SCALE    4096
00075 #define Q13_SCALE    8192
00076 #define Q14_SCALE   16384
00077 #define Q15_SCALE   32768
00078 #define Q16_SCALE   65536
00079 #define Q17_SCALE  131072
00080 #define Q18_SCALE  262144
00081
00082 #define Q31_SCALE  2147483648UL  /* 2**31 */
00083
00084 /* Interplation scaling constant for 16 bit platforms */
00085 #define INTERP_CONST_SCALE    Q14_SCALE
00086 #define FREQ_SCALE            Q16_SCALE
00087 #define FREQ_SCALE_Q          16
00088
00089 /* Constellation scaling constant for 16 bit platforms */
00090 #define TX_CONST_SCALE        Q14_SCALE
00091 #define RX_CONST_SCALE        Q14_SCALE
00092
00093 /* Definition of scaling constants for inverse modulus tables */
00094 #define INVMOD_SCALE   Q14_SCALE  /* because change the phase unit */
00095 /* Phase error scaling constants - not used on this platform */
00096 #define PH_ERROR_SCALE 15
00097
00098 /* Scaling constants used for V.29 9600 bps slicer */
00099 #define V29_96_SC1  4096  /* scale 2/3 by 2**12 */
00100 #define V29_96_SH1  12    /* shift back value */
00101
00102 #endif  /* _DPU_TGT_H */
00103 /* nothing past this point */
00104
00105
00106


FM: dpu_trec.c File Reference

dpu_trec.c File Reference

#include <ti/mas/types/types.h>
#include <ti/mas/fract/fract.h>
#include <ti/mas/util/utl.h>
#include "dpumath.h"
#include "dpu_trec.h"
#include "trec_com.h"
#include "dpu_fir.h"

Include dependency graph for dpu_trec.c:

Go to the source code of this file.

Defines

#define | TREC_TST1 0
#define | TREC_TST2 0

Functions

void | updateIIR (LFract input, cmplx_t *filt, cmplx_t *f)
void | crossCor (cmplx_t *c1, cmplx_t *c2, cmplx_t *c)
void | dpu_ttone (dpu_trec_t *inst, Fract *input, int samp, int samp_per_baud)
void | dpu_trec_interp (dpu_trec_t *inst, Fract *input, int samp, int index, Fract *tbl_ptr)

Define Documentation

#define TREC_TST1 0

Definition at line 52 of file dpu_trec.c.

#define TREC_TST2 0

Definition at line 53 of file dpu_trec.c.

Function Documentation

void updateIIR | ( | LFract | input,
 |  | cmplx_t * | filt,
 |  | cmplx_t * | f
 | ) |  |

Definition at line 78 of file dpu_trec.c.

References Q15_ROUND.

Referenced by dpu_ttone().

void crossCor | ( | cmplx_t * | c1,
 |  | cmplx_t * | c2,
 |  | cmplx_t * | c
 | ) |  |

Definition at line 91 of file dpu_trec.c.

Referenced by dpu_ttone().

void dpu_ttone | ( | dpu_trec_t * | inst,
 |  | Fract * | input,
 |  | int | samp,
 |  | int | samp_per_baud
 | ) |  |

Definition at line 112 of file dpu_trec.c.

References dpu_trec_t::accum, dpu_trec_t::accumImag, dpu_trec_t::accumReal, dpu_trec_t::alpha, crossCor(), dpu_trec_t::dcComponent, dpu_trec_t::division, dpu_trec_t::f1, dpu_trec_t::f2, dpu_trec_t::filt_index_inc, dpu_trec_t::hh1, dpu_trec_t::hh2, cmplx_t::im, dpu_trec_t::int_filt_index, dpu_trec_t::k1, dpu_trec_t::k2, dpu_trec_t::one_mu, dpu_trec_t::p1, cmplx_t::re, dpu_trec_t::rot_imag, dpu_trec_t::rot_imag_est, dpu_trec_t::rot_real, dpu_trec_t::rot_real_est, dpu_trec_t::threshold, dpu_trec_t::trec_enable, dpu_trec_t::ttone_count, and updateIIR().

Here is the call graph for this function:

void dpu_trec_interp | ( | dpu_trec_t * | inst,
 |  | Fract * | input,
 |  | int | samp,
 |  | int | index,
 |  | Fract * | tbl_ptr
 | ) |  |

Definition at line 228 of file dpu_trec.c.

References dpu_trec_t::count, dpu_trec_t::delay, DPU_TREC_LEN, dpu_trec_t::index, dpu_trec_t::length, dpu_trec_t::output, and dpu_trec_t::trec_enable.

Referenced by HSrxCommonSt1Init(), v27RxSt3Init(), and v29RxSt3Init().


FM: dpu_trec.c Source File

dpu_trec.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE:  DPU RX timing recovery
00003  ******************************************************************************
00004  * FILE NAME: dpu_trec.c
00005  *
00006  * DESCRIPTION: DPU timing recovery
00007
00008  *
00009  * TABS: NONE
00010  *
00011  * $Id: DPU_TREC.C 1.14 2000/06/19 11:03:36 sakhtar Exp $
00012  *
00013  * REVISION HISTORY:
00014  *
00015  * $Log: DPU_TREC.C $
00016  * Revision 1.14  2000/06/19 11:03:36  sakhtar
00017  * Merged version 1.10 to 1.14
00018  * Revision 1.10  1998/05/16 17:01:42  ppatel
00019  *  Timing recovery coefficients are now stored in program memory and
00020  * the sub-filter coefficients are swapped in the stack before convolving
00021  * Revision 1.9  1998/01/21 00:00:57  PPATEL
00022  *   Second order timing recovery implementation (was deemed necessary
00023  * for V.17 short training). Also compensates for D.C in cross correlation.
00024  * The MIPS is more compared to the previous case but has not been
00025  * accounted for yet.
00026  * Revision 1.9  2002/09/21 15:20:32  Aravind B R
00027  * Changes for the DC computation
00028  * Revision 1.8  1997/11/21 15:36:02  PPATEL
00029  *  Shifting of functions to different files for multi-channel build for GG 3.0
00030  * Revision 1.7  1997/10/28 22:36:29  PPATEL
00031  *   Removed bugs discovered while development of V.17 (short
00032  * training). This is a major upgrade over the previous version.
00033  * Revision 1.6  1997/09/05 20:45:30  PPATEL
00034  *   Inclusion of fract.h
00035  * Revision 1.5  1997/05/22 11:23:51  Zoran
00036  *   Init. for IIR filter coeff. done form the table
00037  * Revision 1.4  1997/05/18 12:33:49  Zoran
00038  *   Optimized timing recovery scheme, cleaned code
00039  * Revision 1.2  1997/02/19 18:36:01  H.T.Li
00040  * Revision 1.1  1997/02/06 09:38:56  unknown
00041  * Initial revision
00042  *
00043  * (C) Copyright 1996, TELOGY Networks, Inc.
00044  *****************************************************************************/
00045 #include <ti/mas/types/types.h>
00046 #include <ti/mas/fract/fract.h>
00047 #include <ti/mas/util/utl.h>
00048 #include "dpumath.h"  /* for convolution */
00049 #include "dpu_trec.h"
00050 #include "trec_com.h"
00051 #include "dpu_fir.h"
00052 #define TREC_TST1 0
00053 #define TREC_TST2 0
00054
00055 #if TREC_TST1
00056 #define TREC_TST1_SIZE 1024
00057 int TREC_TST1_INDX = 0;
00058 Fract TREC_TST1_IMOUT[TREC_TST1_SIZE];
00059 Fract TREC_TST1_REOUT[TREC_TST1_SIZE];
00060 Fract TREC_TST1_DC_IMOUT[TREC_TST1_SIZE];
00061 Fract TREC_TST1_DC_REOUT[TREC_TST1_SIZE];
00062 int TREC_TT1_INDX1 = 0;
00063 LFract TREC_TST1_IMOUT1[TREC_TST1_SIZE];
00064 LFract TREC_TST1_REOUT1[TREC_TST1_SIZE];
00065 #endif
00066
00067 #if TREC_TST2
00068 #define TREC_TST2_SIZE 512
00069 int TREC_TST2_INDX = 0;
00070 Fract TREC_TST2_OUT[TREC_TST2_SIZE];
00071 #endif
00072 #if 0
00073 extern void dpuTrecTableAsFcnPt(void);
00074 extern int last_sample,recovery_flag;
00075 #endif
00076
00077 /*---------------------------------------------------------------*/
00078 void updateIIR( LFract input, cmplx_t *filt, cmplx_t *f)
00079  {
00080     LFract t1,t2;
00081
00082       t1 =  frctMul( (*filt).re, 15,(*f).re, 15, 30);
00083         t1 -=  frctMul((*filt).im, 15, (*f).im, 15, 30);
00084         t1 += input;
00085         t2 =  frctMul((*filt).im, 15, (*f).re, 15, 30);
00086         t2 +=  frctMul((*filt).re, 15, (*f).im, 15, 30);
00087         (*filt).im = frctLF2F(t2+Q15_ROUND, 30, 15);
00088         (*filt).re = frctLF2F(t1+Q15_ROUND, 30, 15);
00089   }
00090
00091 void crossCor( cmplx_t *c1, cmplx_t *c2, cmplx_t *c)
00092  {
00093    LFract t1;
00094
00095        t1 =  frctMul((*c1).re, 15, (*c2).re, 15, 30);
00096        t1 += frctMul((*c1).im, 15, (*c2).im, 15, 30);
00097        (*c).re = frctLF2F(t1,30, 15);
00098        t1 =  frctMul((*c1).re, 15, (*c2).im, 15, 30);
00099        t1 -= frctMul((*c1).im, 15, (*c2).re, 15, 30);
00100        (*c).im = frctLF2F(t1,30, 15);
00101
00102  }
00103
00104
00105
00106 /*****************************************************************************
00107  FUNCTION PURPOSE: dpu timing tone extractor
00108 ******************************************************************************
00109 * DESCRIPTION: dpu timing tone extractor
00110 *
00111 *****************************************************************************/
00112 void dpu_ttone( dpu_trec_t *inst, Fract *input, int samp, int samp_per_baud)
00113 {
00114   int j;
00115   LFract t1,t2,tre,tim,t3,t4;
00116   Fract  ft1,ft2; //,ft3;
00117   Fract *inp = input;
00118   cmplx_t *hh1, *hh2, *f1, *f2, output[1];
00119
00120 //  Fract pn;
00121
00122   hh1 = &(inst->hh1);
00123   hh2 = &(inst->hh2);
00124   f1  = &(inst->f1);
00125   f2  = &(inst->f2);
00126
00127   /* Calculate Godard's bandPass Filters */
00128   for (j=0; j<samp; j++)
00129   {
00130     t1 =  frctMul(*inp++,14,inst->one_mu,15,30);
00131     updateIIR(t1, hh1, f1);
00132     updateIIR(t1, hh2, f2);
00133
00134     /* Calculate cross correlation output */
00135     crossCor(hh1, hh2, output);
00136
00137     inst->accumReal += output[0].re;
00138     inst->accumImag += output[0].im;
00139
00140     #if TREC_TST1
00141     if (! inst->trec_enable)
00142     {
00143     TREC_TST1_INDX = 0;
00144     TREC_TT1_INDX1 = 0;
00145     }
00146     if ((inst->trec_enable) && (TREC_TST1_INDX < TREC_TST1_SIZE-2))
00147     {
00148       TREC_TST1_INDX++;
00149       TREC_TST1_INDX &= TREC_TST1_SIZE-1;
00150       TREC_TST1_IMOUT[TREC_TST1_INDX] = output[0].im;
00151       TREC_TST1_REOUT[TREC_TST1_INDX] = output[0].re;
00152       TREC_TST1_DC_IMOUT[TREC_TST1_INDX] = inst->dcComponent.im; /*output[0].im;*/
00153       TREC_TST1_DC_REOUT[TREC_TST1_INDX] = inst->dcComponent.re; /*output[0].re;*/
00154     }
00155     #endif
00156
00157     inst->ttone_count++;
00158
00159     if (inst->ttone_count >= samp_per_baud)
00160     {
00161      inst->ttone_count = 0;
00162
00163       /* Save real and imag. output for rotation to 1,0 position  */
00164       inst->rot_real_est += output[0].re;
00165       inst->rot_imag_est += output[0].im;
00166
00167        t1 = frctMul((Fract)inst->accumReal, 14, inst->division, 15, 29);
00168       t2 = frctMul((Fract)inst->accumImag, 14, inst->division, 15, 29);
00169
00170       t1 += frctMul(inst->dcComponent.re, 14, inst->alpha, 15, 29);
00171       t2 += frctMul(inst->dcComponent.im, 14, inst->alpha, 15, 29);
00172
00173       t1 += 16384;
00174       inst->dcComponent.re  = frctLF2F(t1,29, 14);
00175
00176       t2 += 16384;
00177       inst->dcComponent.im = frctLF2F(t2, 29, 14);
00178
00179      inst->accumReal = inst->accumImag = 0;
00180
00181      tre = output[0].re -inst->dcComponent.re;
00182       tim = output[0].im -inst->dcComponent.im;
00183
00184       /* Do rotation of the output to 1,0 position */
00185       t1 = frctMul(inst->rot_real, 10, (Fract)tim /*output[0].im*/, 15, 25);
00186       t2 = frctMul(inst->rot_imag, 10, (Fract)tre /*output[0].re*/, 15, 25);
00187
00188       if (inst->trec_enable)
00189       {
00190      t3 = frctMul(inst->k2,30,inst->p1,0,30);
00191         t4 = frctF2LF(inst->k1,15,30);
00192         if((t1-t2) < 0)
00193         {
00194           t4 = t4;
00195           inst->p1 += 1; /* 1 in Q0*/
00196         }
00197         else
00198         {
00199           t4 = -t4;
00200           inst->p1 -= 1;
00201         }
00202
00203         t3 += t4;
00204         ft1 = frctLF2F(t3,30,15);
00205         ft2 = ft1 + inst->accum;
00206         inst->accum = ft2;
00207
00208         if (ft2 >= inst->threshold)
00209         {
00210           inst->int_filt_index += inst->filt_index_inc;
00211           inst->accum -= inst->threshold;
00212       }
00213
00214         if (ft2 <= -inst->threshold)
00215         {
00216           inst->int_filt_index -= inst->filt_index_inc;
00217           inst->accum += inst->threshold;
00218         }
00219       }
00220     }
00221   }
00222 }
00223
00224 /******************************************************************************
00225 * FUNCTION PURPOSE: put samples in the filter delay line and move data to
00226 *          the start of the of the buffer
00227 *****************************************************************************/
00228 void dpu_trec_interp(dpu_trec_t *inst, Fract *input, int samp, int index,Fract *tbl_ptr)
00229 {
00230   int j,k;
00231   Fract *output = inst->output;
00232   Fract *delay = inst->delay;
00233
00234   int   h=inst->length-1,n=inst->count;
00235   Fract *pt1, *pt2, *pt3, sampk1;
00236   Fract  coeffs[DPU_TREC_LEN];
00237
00238   /*  put samples in the filter delay line */
00239
00240   pt1 = inst->delay + inst->length;  /* last_sample;  frame slip addition is + 1 */
00241   pt2 = input + samp*index;
00242   for(j=0; j < samp; j++) *pt1++ = *pt2++;
00243
00244   /* move residual data to the start of the buffer */
00245   if ((inst->trec_enable) && (inst->index > 0))
00246   {
00247     pt1  = inst->output;
00248     pt2  = pt1 + samp;
00249     for (j=0; j < inst->count; j++) *pt1++ = *pt2++;
00250   }
00251
00252   k = 0; /* initialize k */
00253
00254   while (inst->int_filt_index >= DPU_TREC_NUMBER)
00255   {
00256     inst->int_filt_index -= DPU_TREC_NUMBER;
00257     k += 1; /* Neglect the current sample */
00258   }
00259
00260   while (inst->int_filt_index < 0)
00261   {
00262     inst->int_filt_index += DPU_TREC_NUMBER;
00263     k -= 1; /* Process 2 samples */
00264   }
00265
00266   /* Calculate interpolation filter output */
00267   pt1 = output + n;
00268   pt2 = delay + inst->length + k;  /* condition made as +1 for frame slip */
00269
00270   /* CAUTION: non-portable code used for swapping from external program
00271      memory to internal data memory */
00272   utlCopy((tword *)(tbl_ptr + (inst->int_filt_index*DPU_TREC_LEN))
00273                      , (tword *) coeffs, (tint)DPU_TREC_LEN);
00274   pt3 = coeffs;
00275   sampk1 = samp - k;
00276
00277   for (j=0; j < sampk1; j++)
00278   {
00279     *pt1++ = frctLF2F(convoluI(pt2++,pt3, h)+Q13_ROUND, 27, 14);
00280   }
00281
00282   /* Perform BP filters, cross correlation */
00283   dpu_ttone( inst, output + inst->count, sampk1, samp);
00284
00285   inst->count += sampk1; /* record number of output samples available in the buffer */
00286   pt1 = delay;
00287   pt2 = delay + samp;
00288   for (j=0;j < inst->length; j++)
00289     *pt1++ = *pt2++;
00290 }
00291
00292 /* Nothing after this point */
00293


FM: dpu_trec.h File Reference

dpu_trec.h File Reference

#include <ti/mas/types/types.h>
#include "dpu_tgt.h"
#include "dpumath.h"
#include <ti/mas/fm/fmTablesTypes.h>

Include dependency graph for dpu_trec.h:

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

Go to the source code of this file.

Data Structures

struct | dpu_trec_t

Defines

#define | DPU_TREC_OUT_LEN 20
#define | DPU_TREC_DELAY_LEN (DPU_TREC_LEN+9)
#define | DPU_TREC_CONST_SCALE Q15_SCALE
#define | DPU_TREC_COEF_SCALE Q15_SCALE
#define | V17_TREC_INDEX 3
#define | V29_TREC_INDEX 0
#define | V27_48_TREC_INDEX 1
#define | V27_24_TREC_INDEX 2
#define | DPU_TREC_K1 (0.0078125*DPU_TREC_CONST_SCALE)
#define | DPU_TREC_K2 (0.00000525*DPU_TREC_COEF_SCALE*DPU_TREC_COEF_SCALE)
#define | DPU_TREC_THR (40*DPU_TREC_K1)
#define | DPU_TREC_INDEX_INC 1

Functions

void | dpu_trec_interp (dpu_trec_t *inst, Fract *input, int samp, int index, Fract *tbl_ptr)

Define Documentation

#define DPU_TREC_OUT_LEN 20

Definition at line 51 of file dpu_trec.h.

#define DPU_TREC_DELAY_LEN (DPU_TREC_LEN+9)

Definition at line 52 of file dpu_trec.h.

Referenced by dpu_trec_init().

#define DPU_TREC_CONST_SCALE Q15_SCALE

Definition at line 53 of file dpu_trec.h.

#define DPU_TREC_COEF_SCALE Q15_SCALE

Definition at line 55 of file dpu_trec.h.

Referenced by dpu_trec_init(), v27RxSt1Init(), and v29RxSt1Init().

#define V17_TREC_INDEX 3

Definition at line 58 of file dpu_trec.h.

#define V29_TREC_INDEX 0

Definition at line 59 of file dpu_trec.h.

Referenced by v29RxSt1Init().

#define V27_48_TREC_INDEX 1

Definition at line 60 of file dpu_trec.h.

Referenced by v27RxSt1Init().

#define V27_24_TREC_INDEX 2

Definition at line 61 of file dpu_trec.h.

Referenced by v27RxSt1Init().

#define DPU_TREC_K1 (0.0078125*DPU_TREC_CONST_SCALE)

Definition at line 64 of file dpu_trec.h.

Referenced by dpu_trec_init().

#define DPU_TREC_K2 (0.00000525*DPU_TREC_COEF_SCALE*DPU_TREC_COEF_SCALE)

Definition at line 65 of file dpu_trec.h.

Referenced by dpu_trec_init().

#define DPU_TREC_THR (40*DPU_TREC_K1)

Definition at line 66 of file dpu_trec.h.

Referenced by dpu_trec_init().

#define DPU_TREC_INDEX_INC 1

Definition at line 67 of file dpu_trec.h.

Referenced by dpu_trec_init().

Function Documentation

void dpu_trec_interp | ( | dpu_trec_t * | inst,
 |  | Fract * | input,
 |  | int | samp,
 |  | int | index,
 |  | Fract * | tbl_ptr
 | ) |  |

Definition at line 228 of file dpu_trec.c.

References dpu_trec_t::count, dpu_trec_t::delay, DPU_TREC_LEN, dpu_trec_t::index, dpu_trec_t::length, dpu_trec_t::output, and dpu_trec_t::trec_enable.

Referenced by HSrxCommonSt1Init(), v27RxSt3Init(), and v29RxSt3Init().


FM: dpu_trec.h Source File

dpu_trec.h

Go to the documentation of this file.
00001 #ifndef _DPU_TREC_H
00002 #define _DPU_TREC_H
00003
00004 /******************************************************************************
00005  * FILE PURPOSE:  header file of RX timing recovery
00006  ******************************************************************************
00007  * FILE NAME: dpu_trec.h
00008  *
00009  * DESCRIPTION: header file of RX timing recovery
00010  *
00011  * TABS: NONE
00012  *
00013  * $Id: DPU_TREC.H 1.11 2000/03/21 19:44:17 jwright Exp $
00014  *
00015  * REVISION HISTORY:
00016  *
00017  * $Log: DPU_TREC.H $
00018  * Revision 1.11  2000/03/21 19:44:17  jwright
00019  * Clean up 3.50 compile warning.
00020  * Revision 1.10  1998/04/30 17:14:42  ppatel
00021  *  Changes for reporting modem status (timing offset, carrier freq offset,
00022  * snr, etc.)
00023  * Revision 1.9  1998/01/21 00:02:11  PPATEL
00024  *  Second order timinig recovery (deemed necessary for V.17 short training)
00025  * Also compensates for D.C in cross correlation. MIPS not yet measured.
00026  * Needs clean up in terms of putting things in assembly for reducing
00027  * MIPS
00028  * Revision 1.8  1997/11/21 15:38:04  PPATEL
00029  *  The delay line was undersized which caused 2400 bps receive to fail
00030  * (for 2400 , the samples per baud is max = 8 instead of 6), we increased
00031  * to 9. This file also has changes for multi-channel build for GG 3.0
00032  * Revision 1.7  1997/10/28 22:37:53  PPATEL
00033  *  Comments similar to dpu_trec.c
00034  * Revision 1.6  1997/09/05 20:46:14  PPATEL
00035  *   Removal of fract.h
00036  * Revision 1.5  1997/05/22 11:24:20  Zoran
00037  *    Changed API for trec_init function, added indexes for table initialization
00038  * Revision 1.4  1997/05/18 12:52:25  Zoran
00039  *  Clean, optimized code
00040  * Revision 1.2  1997/02/19 18:36:34  H.T.Li
00041  * Revision 1.1  1997/02/06 09:40:17  unknown
00042  * Initial revision
00043  *
00044  * (C) Copyright 1996, TELOGY Networks, Inc.
00045  *****************************************************************************/
00046 #include <ti/mas/types/types.h>
00047 #include "dpu_tgt.h"
00048 #include "dpumath.h"
00049 #include <ti/mas/fm/fmTablesTypes.h>
00050
00051 #define DPU_TREC_OUT_LEN     20
00052 #define DPU_TREC_DELAY_LEN   (DPU_TREC_LEN+9)
00053 #define DPU_TREC_CONST_SCALE Q15_SCALE
00054
00055 #define DPU_TREC_COEF_SCALE  Q15_SCALE
00056
00057 /* Indexes for timing recovery filters coefficients table */
00058 #define V17_TREC_INDEX       3
00059 #define V29_TREC_INDEX       0
00060 #define V27_48_TREC_INDEX    1
00061 #define V27_24_TREC_INDEX    2
00062
00063 /* K1 = 1/128 in Q15 */
00064 #define DPU_TREC_K1    (0.0078125*DPU_TREC_CONST_SCALE)
00065 #define DPU_TREC_K2    (0.00000525*DPU_TREC_COEF_SCALE*DPU_TREC_COEF_SCALE)
00066 #define DPU_TREC_THR   (40*DPU_TREC_K1)
00067 #define DPU_TREC_INDEX_INC   1
00068
00069 typedef struct
00070 {
00071  tint   trec_enable;
00072  int    length;
00073  int    count;
00074  int    index;
00075  Fract  one_mu;
00076
00077  Fract  scale;
00078
00079  cmplx_t f1;      /* lower nyquist freq vector */
00080  cmplx_t f2;      /* upper nyquist freq vector */
00081  cmplx_t hh1;     /* lower nyquist freq IIR filter */
00082  cmplx_t hh2;     /* upper nyquist freq IIR filter */
00083  cmplx_t dcComponent; /* d.c component in output */
00084
00085  Fract  *output;
00086  Fract  *delay;
00087
00088  int int_filt_index;  /* current index for interpolation filter */
00089  int filt_index_inc;
00090
00091  LFract rot_real_est; /* real vector estimation */
00092  LFract rot_imag_est; /* imag vector estimation */
00093
00094  Fract rot_real;      /* real rotation */
00095  Fract rot_imag;      /* imag rotation */
00096
00097  Fract alpha;         /* LPF parameters */
00098  Fract division;
00099  int   ttone_count;
00100
00101  Fract k1;
00102  Fract k2;
00103  Fract p1;
00104  Fract threshold;
00105  Fract accum;
00106  Fract old_p1;
00107
00108  LFract accumReal;
00109  LFract accumImag;
00110
00111  int angleComputeFlag;
00112 } dpu_trec_t;
00113
00114
00115 /* Timing recovery API */
00116 void dpu_trec_interp( dpu_trec_t *inst, Fract *input,
00117                       int samp, int index,Fract *tbl_ptr);
00118
00119 #endif  /* _DPU_TREC_H */
00120 /* nothing past this point */


FM: dpuatan2.c File Reference

dpuatan2.c File Reference

#include <stdlib.h>
#include <ti/mas/types/types.h>
#include <ti/mas/fract/fract.h>
#include "dpuatan2.h"

Include dependency graph for dpuatan2.c:

Go to the source code of this file.

Data Structures

struct | scaleFactors_t

Defines

#define | SAMPS_PER_BAUD 4
#define | DPU_TREC_NUM 41
#define | PI_Q8 20992
#define | PI_HALF_Q8 10496
#define | ONE_Q14 30534
#define | HALF_Q11 1024
#define | TAN_TABLE_SIZE 10

Functions

tint | getExp (tlong x)
void | normalize (tlong x, tlong y, tint *x1, tint *y1)
Fract | dpuAtan2 (LFract y, LFract x, const Fract *a, const Fract *b)

Variables

const Fract | tanTableInFirstOctant [TAN_TABLE_SIZE]
const scaleFactors_t | atan2ScaleFactors []

Define Documentation

#define SAMPS_PER_BAUD 4

Definition at line 27 of file dpuatan2.c.

#define DPU_TREC_NUM 41

Definition at line 28 of file dpuatan2.c.

#define PI_Q8 20992

Definition at line 34 of file dpuatan2.c.

#define PI_HALF_Q8 10496

Definition at line 35 of file dpuatan2.c.

#define ONE_Q14 30534

Definition at line 36 of file dpuatan2.c.

#define HALF_Q11 1024

Definition at line 37 of file dpuatan2.c.

Referenced by dpuAtan2().

#define TAN_TABLE_SIZE 10

Definition at line 49 of file dpuatan2.c.

Referenced by dpuAtan2().

Function Documentation

tint getExp ( tlong x )

Definition at line 86 of file dpuatan2.c.

Referenced by normalize().

void normalize | ( | tlong | x,
 |  | tlong | y,
 |  | tint * | x1,
 |  | tint * | y1
 | ) |  |

Definition at line 117 of file dpuatan2.c.

References getExp().

Referenced by dpuAtan2().

Here is the call graph for this function:

Fract dpuAtan2 | ( | LFract | y,
 |  | LFract | x,
 |  | const Fract * | a,
 |  | const Fract * | b
 | ) |  |

Definition at line 158 of file dpuatan2.c.

References atan2ScaleFactors, HALF_Q11, scaleFactors_t::k1, scaleFactors_t::k2, normalize(), TAN_TABLE_SIZE, and tanTableInFirstOctant.

Referenced by dpu_v21_demod().

Here is the call graph for this function:

Variable Documentation

const Fract tanTableInFirstOctant[TAN_TABLE_SIZE]

Initial value:

 {
     2344,
     4711,
     7128,
     9622,
     12222,
     14965,
     17893,
     21059,
     24530,
     28394
}

Definition at line 50 of file dpuatan2.c.

Referenced by dpuAtan2().

const scaleFactors_t atan2ScaleFactors[]

Initial value:

 {

  {-PI_HALF_Q8,-ONE_Q14},
  {-PI_Q8     , ONE_Q14},
  { PI_HALF_Q8, ONE_Q14},
  { PI_Q8     ,-ONE_Q14},
  {-PI_HALF_Q8, ONE_Q14},
  { 0         ,-ONE_Q14},
  { PI_HALF_Q8,-ONE_Q14},
  { 0         , ONE_Q14}
}

Definition at line 63 of file dpuatan2.c.

Referenced by dpuAtan2().


FM: dpuatan2.c Source File

dpuatan2.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: To compute arc tangent (used for V.17)
00003  ******************************************************************************
00004  * FILE NAME: dpuatan2.c
00005  *
00006  * DESCRIPTION: Computes the arc tangent to give the resolution necessary for
00007  *              V17's short training
00008  *
00009  * TABS: NONE
00010  *
00011  * $Id: DPUATAN2.C 1.1 1998/07/29 09:00:46 ppatel Exp $
00012  *
00013  * REVISION HISTORY:
00014  *
00015  * $Log: DPUATAN2.C $
00016  * Revision 1.1  1998/07/29 09:00:46  ppatel
00017  * Initial revision
00018  *
00019  * (C) Copyright 1997, TELOGY Networks, Inc.
00020  *****************************************************************************/
00021
00022 #include <stdlib.h>
00023 #include <ti/mas/types/types.h>
00024 #include <ti/mas/fract/fract.h>
00025 #include "dpuatan2.h"
00026
00027 #define SAMPS_PER_BAUD 4
00028 #define DPU_TREC_NUM   41 /* Number of subfilters of timing recovery. The
00029                              resolution is (1/41)th of a sampling interval */
00030
00031 /* 2*PI is equivalent to (SAMPS_PER_BAUD*DPU_TREC_NUM = 164) */
00032 /* ONE is equivalent to (2*PI) /(8*(TAN_TABLE_SIZE+1)) = 164/88 */
00033 /* HALF is 0.5 */
00034 #define PI_Q8            20992
00035 #define PI_HALF_Q8       10496
00036 #define ONE_Q14          30534
00037 #define HALF_Q11          1024
00038
00039 typedef struct {
00040   tint k1;
00041   tint k2;
00042 } scaleFactors_t;
00043
00044 /* design of the tan table size depends on how much resolution of the angle is
00045    required. The resolution required here is 164 angles in one circle which is
00046    164/8 angles in an octant. Since we can quantize between adjacent angles, the
00047    number of comparisons required is (164/8)/2 = 164/16 = 10.25. Therefore the
00048    angles required to be resolved is the octant are 11. So we need a size of 10 */
00049 #define TAN_TABLE_SIZE 10
00050 const Fract tanTableInFirstOctant[TAN_TABLE_SIZE] = {
00051      2344,    /* tan(pi/44)    in Q15 */
00052      4711,    /* tan(2*pi/44)  in Q15 */
00053      7128,    /* tan(3*pi/44)  in Q15 */
00054      9622,    /* tan(4*pi/44)  in Q15 */
00055      12222,   /* tan(5*pi/44)  in Q15 */
00056      14965,   /* tan(6*pi/44)  in Q15 */
00057      17893,   /* tan(7*pi/44)  in Q15 */
00058      21059,   /* tan(8*pi/44)  in Q15 */
00059      24530,   /* tan(9*pi/44)  in Q15 */
00060      28394    /* tan(10*pi/44) in Q15 */
00061 };
00062
00063 const scaleFactors_t atan2ScaleFactors[] = {
00064  /*    k1          k2         x > 0    y > 0   |x| > |y| */
00065   {-PI_HALF_Q8,-ONE_Q14},  /*  0        0         0  */
00066   {-PI_Q8     , ONE_Q14},  /*  0        0         1  */
00067   { PI_HALF_Q8, ONE_Q14},  /*  0        1         0  */
00068   { PI_Q8     ,-ONE_Q14},  /*  0        1         1  */
00069   {-PI_HALF_Q8, ONE_Q14},  /*  1        0         0  */
00070   { 0         ,-ONE_Q14},  /*  1        0         1  */
00071   { PI_HALF_Q8,-ONE_Q14},  /*  1        1         0  */
00072   { 0         , ONE_Q14}   /*  1        1         1  */
00073 };
00074
00075 /******************************************************************************
00076  * FUNCTION PURPOSE: Something similar to the EXP instruction
00077  ******************************************************************************
00078  * DESCRIPTION: Returns number of right shifts required to zero a number.
00079  *
00080  *  getExp(
00081  *     x)    - long integer
00082  *
00083  * Return Value: number of right shifts required to zero a number.
00084  *****************************************************************************/
00085
00086 tint getExp(tlong x)
00087 {
00088    tint   numShifts=0;
00089    tlong absx;
00090
00091    /* we could have used "labs" function below but the compiler does not do proper sign
00092       extension before labs is executed so that if the SXM bit were to be 0
00093       before execution, it does not cause proper execution of labs */
00094    if (x < 0) absx = -x; else absx = x;
00095    while(absx >= 1)
00096    {
00097     absx >>= 1;
00098     numShifts++;
00099    }
00100    return(numShifts);
00101 }
00102
00103 /******************************************************************************
00104  * FUNCTION PURPOSE: normalize inputs
00105  ******************************************************************************
00106  * DESCRIPTION: This function normalizes the inputs to Q15 format based on larger
00107  *              of the two inputs (in magnitude) from longs to ints.
00108  *
00109  *  normalize(
00110  *     tlong x - input x
00111  *     tlong y - input y
00112  *     tint *x - normalized output x
00113  *     tint *y) - normalized output y
00114  *
00115  *****************************************************************************/
00116
00117 void normalize(tlong x, tlong y, tint *x1, tint *y1)
00118 {
00119  tint numShifts,numShiftsX,numShiftsY;
00120
00121  numShiftsX = getExp(x);
00122  numShiftsY = getExp(y);
00123
00124  if (numShiftsX <= numShiftsY) numShifts = numShiftsY;
00125  else numShifts = numShiftsX;
00126
00127  *x1 = frctLF2F(x,numShifts,15);
00128  *y1 = frctLF2F(y,numShifts,15);
00129
00130 }
00131
00132 /******************************************************************************
00133  * FUNCTION PURPOSE: Compute arc tangent (Fixed Point Version)
00134  ******************************************************************************
00135  * DESCRIPTION: Finds the arc tangent with a resolution of pi/(2*DPU_TREC_NUM)
00136  *
00137  *              The steps used in the algorithm are as follows:
00138  *              1. Normalize the long inputs (32-bit) to integers (16-bit) because
00139  *                 we need to resolve only 1/164th of the circle.
00140  *              2. Identify the Octant of the normalized inputs.
00141  *              3. Find angle within the octant by linear search from lowest to
00142  *                 highest (tan(theta) is a monotonic increasing function in the
00143  *                 first octant).
00144  *              4. Map the angle within the octant to its actual value based on
00145  *                 the identified octant in 2.
00146  *
00147  * dpuAtan2(
00148  *       LFract y  - input y (Q0)
00149  *       LFract x) - input x (Q0)
00150  *
00151  * RETURN VALUE: Index of the filter (Q0) indicating the angle. The range is
00152  *        [-2*DPU_TREC_NUM,2*DPU_TREC_NUM].
00153  *        Close to the computation
00154  *        round(atan2((double)y,(double)x)*(2*DPU_TREC_NUM/PI)) within 1 where
00155  *        atan2 is the library function
00156  *****************************************************************************/
00157
00158 Fract dpuAtan2(LFract y, LFract x, const Fract *a, const Fract *b)
00159 {
00160   tint   i;
00161   tint   x1,y1,temp,octant;
00162   Fract  k1,k2;
00163   LFract tempL;
00164
00165   /* Step 1 - normalize inputs */
00166   normalize((tlong)x,(tlong)y,&x1,&y1);
00167
00168   /* Step 2 - identify octant */
00169   octant = ((x1 > 0) << 2) | ((y1 > 0) << 1) | (abs(x1) > abs(y1));
00170
00171   /* Get scale factors to be used later */
00172   k1 = atan2ScaleFactors[octant].k1;
00173   k2 = atan2ScaleFactors[octant].k2;
00174
00175   /* Map coordinates to the first octant. Identify angle within the octant */
00176   x1 = abs(x1);
00177   y1 = abs(y1);
00178
00179   if (x1 < y1) { temp = x1; x1 = y1; y1 = temp; }
00180
00181   i = 0;
00182   while (( frctLF2F(frctMul(x1,15,tanTableInFirstOctant[i],15,30),30,15) < y1) &&
00183          (i < TAN_TABLE_SIZE)) i++;
00184
00185   /* i += 0.5 in Q11 */
00186   i = frctAdjustQ(i,0,11);
00187   i += HALF_Q11;
00188
00189   /* Calculate the actual angle by using the scale factors */
00190   tempL = frctF2LF(k1,8,23) + frctMul(i,11,k2,14,23);
00191
00192   return((Fract)frctRoundLF(tempL,23,0));
00193 }
00194 /* Nothing past this point */
00195


FM: dpuatan2.h File Reference

dpuatan2.h File Reference

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

Include dependency graph for dpuatan2.h:

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

Go to the source code of this file.

Functions

Fract dpuAtan2 (LFract y, LFract x, const Fract *tanTableInFirstOctant_ptr, const Fract *atan2ScaleFactors_ptr)

Function Documentation

Fract dpuAtan2 | ( | LFract | y,
 |  | LFract | x,
 |  | const Fract * | tanTableInFirstOctant_ptr,
 |  | const Fract * | atan2ScaleFactors_ptr
 | ) |  |

Definition at line 158 of file dpuatan2.c.

References atan2ScaleFactors, HALF_Q11, scaleFactors_t::k1, scaleFactors_t::k2, normalize(), TAN_TABLE_SIZE, and tanTableInFirstOctant.

Referenced by dpu_v21_demod().

Here is the call graph for this function:


FM: dpuatan2.h Source File

dpuatan2.h

Go to the documentation of this file.
00001 #ifndef _DPUATAN2_H
00002 #define _DPUATAN2_H
00003 /******************************************************************************
00004  * FILE PURPOSE: Header file for dpuatan2.c
00005  ******************************************************************************
00006  * FILE NAME: dpuatan2.h
00007  *
00008  * DESCRIPTION: Defines api for using dpuatan2 function
00009  *
00010  * TABS: NONE
00011  *
00012  * $Id: DPUATAN2.H 1.1 1998/07/29 09:00:46 ppatel Exp $
00013  *
00014  * REVISION HISTORY:
00015  *
00016  * $Log: DPUATAN2.H $
00017  * Revision 1.1  1998/07/29 09:00:46  ppatel
00018  * Initial revision
00019  *
00020  * (C) Copyright 1997, TELOGY Networks, Inc.
00021  *****************************************************************************/
00022 #include <ti/mas/types/types.h>
00023
00024 Fract dpuAtan2(LFract y, LFract x, const Fract *tanTableInFirstOctant_ptr,
00025                              const Fract *atan2ScaleFactors_ptr);
00026 #endif
00027 /* Nothing past this point */


FM: dpuloc.h File Reference

dpuloc.h File Reference

#include <ti/mas/types/types.h>
#include <ti/mas/util/utl.h>
#include "dpu_tgt.h"
#include "dpu.h"
#include "dputxin.h"
#include "dpu_scr.h"
#include "dpu_denc.h"
#include "dpu_smap.h"
#include "dpu_slic.h"
#include "dpu_intp.h"
#include "dpu_shap.h"
#include "dpu_mod.h"
#include "dpu_fsk.h"
#include "dpu_cenc.h"
#include "dpu_cd.h"
#include "dpu_trec.h"
#include "dpu_ddet.h"
#include "dpu_agc.h"
#include "dpu_hilb.h"
#include "dpu_adeq.h"
#include "dpu_phas.h"
#include "dpu_crec.h"
#include "dpu_cdec.h"
#include "dpumath.h"
#include "dpu_fir.h"

Include dependency graph for dpuloc.h:

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

Go to the source code of this file.

Data Structures

struct | dpuTxInst_t
struct | dpuRxInst_t
struct | dpuInst_s

Defines

#define | DPU_MAX_WORD 40
#define | DPU_MAX_SAMPLE 320
#define | DPU_CTRL_ERROR 1
#define | DPU_CTRL_CTS 2
#define | DPU_CTRL_DSR 4
#define | DPU_CTRL_CDET 8
#define | DPU_CTRL_PDSQ 0x10
#define | DPU_CTRL_IDLE 0x20
#define | DPU_CTRL_RTS 0x40
#define | DPU_CTRL_TEST 0x80
#define | DPU_CTRL_UNDERRUN 0x100
#define | DPU_CTRL_OVERRUN 0x200
#define | DPU_CTRL_P2 0x400
#define | DPU_CTRL_TEP 0x800
#define | DPU_CTRL_V21 0x1000
#define | DPU_UPSAMPLE_RATE 9600
#define | DPU_DOWNSAMP_RATE 7200
#define | DPU_SS_SI_FREEZE_BAUDCNT 48
#define | DPU_SI_SS_ERRMUL 4
#define | DPU_SI_SS_ERRMUL_V17 12
#define | dpu_READ_FSL_ENABLE(x) utlGetBitfield(x,0,1)
#define | dpu_SET_FSL_ENABLE(x, y) utlSetBitfield(x,y,0,1)
#define | dpu_READ_FSL_DETECTED(x) utlGetBitfield(x,1,1)
#define | dpu_SET_FSL_DETECTED(x, y) utlSetBitfield(x,y,1,1)

Typedefs

typedef dpuInst_s | dpuInst_t

Enumerations

enum {
DPU_V29_TX_STNULL = -1, DPU_V29_TX_ST0 = 0, DPU_V29_TX_ST1 = 1, DPU_V29_TX_ST2 = 2,
DPU_V29_TX_ST3 = 3, DPU_V29_TX_ST4 = 4
}
enum {
DPU_V29_RX_STNULL = -1, DPU_V29_RX_ST0 = 0, DPU_V29_RX_ST1 = 1, DPU_V29_RX_ST2 = 2,
DPU_V29_RX_ST3 = 3, DPU_V29_RX_ST4 = 4, DPU_V29_RX_ST5 = 5, DPU_V29_RX_ST6 = 6,
DPU_V29_RX_ST7 = 7, DPU_V29_RX_ST8 = 8, DPU_V29_RX_ST34 = 9
}
enum {
DPU_V27_TX_STNULL = -1, DPU_V27_TX_ST0 = 0, DPU_V27_TX_ST1 = 1, DPU_V27_TX_ST2 = 2,
DPU_V27_TX_ST3 = 3, DPU_V27_TX_ST4 = 4, DPU_V27_TX_ST5 = 5, DPU_V27_TX_ST6 = 6,
DPU_V27_TX_ST7 = 7
}
enum {
DPU_V27_RX_STNULL = -1, DPU_V27_RX_ST0 = 0, DPU_V27_RX_ST1 = 1, DPU_V27_RX_ST2 = 2,
DPU_V27_RX_ST3 = 3, DPU_V27_RX_ST4 = 4, DPU_V27_RX_ST5 = 5, DPU_V27_RX_ST6 = 6,
DPU_V27_RX_ST7 = 7, DPU_V27_RX_ST8 = 8, DPU_V27_RX_ST34 = 9
}
enum {
DPU_V21_RX_STNULL = -1, DPU_V21_RX_ST0 = 0, DPU_V21_RX_ST1 = 1, DPU_V21_RX_ST2 = 2,
DPU_V21_RX_ST3 = 3, DPU_V21_RX_ST4 = 4
}
enum {
DPU_MODULATION_V21, DPU_MODULATION_V27_2400, DPU_MODULATION_V27_4800, DPU_MODULATION_V29_7200,
DPU_MODULATION_V29_9600, DPU_MODULATION_COUNT
}

Define Documentation

#define DPU_MAX_WORD 40

Definition at line 89 of file dpuloc.h.

Referenced by dpu_rx_packet(), and dpuTx().

#define DPU_MAX_SAMPLE 320

Definition at line 90 of file dpuloc.h.

#define DPU_CTRL_ERROR 1

Definition at line 93 of file dpuloc.h.

#define DPU_CTRL_CTS 2

Definition at line 94 of file dpuloc.h.

Referenced by dpuTx(), v21TxStM(), v27TxStM(), and v29TxStM().

#define DPU_CTRL_DSR 4

Definition at line 95 of file dpuloc.h.

#define DPU_CTRL_CDET 8

Definition at line 96 of file dpuloc.h.

Referenced by FAX_MODEM(), v21RxStM(), v27RxStM(), and v29RxStM().

#define DPU_CTRL_PDSQ 0x10

Definition at line 97 of file dpuloc.h.

#define DPU_CTRL_IDLE 0x20

Definition at line 98 of file dpuloc.h.

#define DPU_CTRL_RTS 0x40

Definition at line 99 of file dpuloc.h.

Referenced by FAX_MODEM().

#define DPU_CTRL_TEST 0x80

Definition at line 100 of file dpuloc.h.

#define DPU_CTRL_UNDERRUN 0x100

Definition at line 101 of file dpuloc.h.

#define DPU_CTRL_OVERRUN 0x200

Definition at line 102 of file dpuloc.h.

#define DPU_CTRL_P2 0x400

Definition at line 103 of file dpuloc.h.

Referenced by FAX_MODEM(), v27RxStM(), and v29RxStM().

#define DPU_CTRL_TEP 0x800

Definition at line 104 of file dpuloc.h.

Referenced by FAX_MODEM(), v27RxStM(), and v29RxStM().

#define DPU_CTRL_V21 0x1000

Definition at line 105 of file dpuloc.h.

Referenced by FAX_MODEM(), v27RxStM(), and v29RxStM().

#define DPU_UPSAMPLE_RATE 9600

Definition at line 122 of file dpuloc.h.

#define DPU_DOWNSAMP_RATE 7200

Definition at line 123 of file dpuloc.h.

#define DPU_SS_SI_FREEZE_BAUDCNT 48

Definition at line 216 of file dpuloc.h.

#define DPU_SI_SS_ERRMUL 4

Definition at line 222 of file dpuloc.h.

Referenced by dpuconfigRX().

#define DPU_SI_SS_ERRMUL_V17 12

Definition at line 223 of file dpuloc.h.

Referenced by dpuconfigRX().

#define dpu_READ_FSL_ENABLE ( x ) utlGetBitfield(x,0,1)

Definition at line 319 of file dpuloc.h.

#define dpu_SET_FSL_ENABLE | ( | x,
 |  | y | ) | utlSetBitfield(x,y,0,1)

Definition at line 320 of file dpuloc.h.

Referenced by dpuconfigRX().

#define dpu_READ_FSL_DETECTED ( x ) utlGetBitfield(x,1,1)

Definition at line 321 of file dpuloc.h.

#define dpu_SET_FSL_DETECTED | ( | x,
 |  | y | ) | utlSetBitfield(x,y,1,1)

Definition at line 322 of file dpuloc.h.

Referenced by dpuconfigRX().

Typedef Documentation

typedef struct dpuInst_s dpuInst_t

Enumeration Type Documentation

anonymous enum

Enumerator:
DPU_V29_TX_STNULL
DPU_V29_TX_ST0
DPU_V29_TX_ST1
DPU_V29_TX_ST2
DPU_V29_TX_ST3
DPU_V29_TX_ST4

Definition at line 126 of file dpuloc.h.

anonymous enum

Enumerator:
DPU_V29_RX_STNULL
DPU_V29_RX_ST0
DPU_V29_RX_ST1
DPU_V29_RX_ST2
DPU_V29_RX_ST3
DPU_V29_RX_ST4
DPU_V29_RX_ST5
DPU_V29_RX_ST6
DPU_V29_RX_ST7
DPU_V29_RX_ST8
DPU_V29_RX_ST34

Definition at line 137 of file dpuloc.h.

anonymous enum

Enumerator:
DPU_V27_TX_STNULL
DPU_V27_TX_ST0
DPU_V27_TX_ST1
DPU_V27_TX_ST2
DPU_V27_TX_ST3
DPU_V27_TX_ST4
DPU_V27_TX_ST5
DPU_V27_TX_ST6
DPU_V27_TX_ST7

Definition at line 153 of file dpuloc.h.

anonymous enum

Enumerator:
DPU_V27_RX_STNULL
DPU_V27_RX_ST0
DPU_V27_RX_ST1
DPU_V27_RX_ST2
DPU_V27_RX_ST3
DPU_V27_RX_ST4
DPU_V27_RX_ST5
DPU_V27_RX_ST6
DPU_V27_RX_ST7
DPU_V27_RX_ST8
DPU_V27_RX_ST34

Definition at line 166 of file dpuloc.h.

anonymous enum

Enumerator:
DPU_V21_RX_STNULL
DPU_V21_RX_ST0
DPU_V21_RX_ST1
DPU_V21_RX_ST2
DPU_V21_RX_ST3
DPU_V21_RX_ST4

Definition at line 182 of file dpuloc.h.

anonymous enum

Enumerator:
DPU_MODULATION_V21
DPU_MODULATION_V27_2400
DPU_MODULATION_V27_4800
DPU_MODULATION_V29_7200
DPU_MODULATION_V29_9600
DPU_MODULATION_COUNT

Definition at line 195 of file dpuloc.h.


FM: dpuloc.h Source File

dpuloc.h

Go to the documentation of this file.
00001 #ifndef _DPULOC_H
00002 #define _DPULOC_H
00003 /******************************************************************************
00004  * FILE PURPOSE: Macros and defs for inter data structure of DPU.
00005  *
00006  ******************************************************************************
00007  * FILE NAME:   dpuloc.h
00008  *
00009  * DESCRIPTION: Defines types and macros necessary for inter DPU including
00010  *              global context (used by all channels).
00011  *
00012  * $Id: DPULOC.H 2002/07/17 16:53:32  Aravind BR Exp $
00013  *
00014  * REVISION HISTORY:
00015  *
00016  * $Log: DPULOC.H $
00017  * Revision 1.17  2002/07/17 16:53:32  Aravind BR
00018  * modification for the table relocation and frame slip
00019  * Revision 1.16  1999/03/15 10:53:32  sakhtar
00020  * Revert to 1.14 and modified data_fcn API
00021  * Revision 1.14  1999/03/01 19:05:05  sakhtar
00022  * Modified the API of procrx(), copy_fcn(), and data_fcn()
00023  * Revision 1.13  1999/02/24 17:14:52  sakhtar
00024  * Revert to earlier version since the change made was causing a
00025  * problem in V.21
00026  * Revision 1.11  1998/05/12 17:49:01  ppatel
00027  *  Optimization of code-space by code reuse and removal of phase_fcn
00028  * from the instance (since it was not used in procrx.c)
00029  * Revision 1.10  1997/12/12 16:25:51  PPATEL
00030  *   Changes for V.33 included (tested to work for v.29 but not V.17 or
00031  * V.33)
00032  * Revision 1.9  1997/11/21 15:06:08  PPATEL
00033  *  For multi-channel fax testing, the max word is reduced back to
00034  * the original value of 30 (this is to prevent old fiu from not working with
00035  * dpu). Restore back to 40 when testing V.17
00036  * Revision 1.8  1997/10/28 21:39:38  PPATEL
00037  *  Merged latest changes with offshoot for V.17 development
00038  * Revision 1.7  1997/09/13 19:20:56  PPATEL
00039  *  Convolutional encoder added for V.17
00040  * Revision 1.6  1997/09/05 17:43:37  PPATEL
00041  *  Removal of spaces befoer #'s
00042  * Revision 1.5  1997/05/25 16:07:00  Zoran
00043  *   Changed prototypes for dotdet and cd det functions to report gain,
00044  * rx level
00045  * Revision 1.4  1997/05/22 11:22:15  Zoran
00046  *   Removed siu.h
00047  * Revision 1.3  1997/02/19 21:57:38  H.T.Li
00048  * Revision 1.2  1996/10/18 10:07:32  HTLI
00049  * Revision 1.1  1996/09/18 13:25:22  chandrav
00050  * Initial revision
00051  *
00052  * (C) Copyright 1996, TELOGY Networks, Inc.
00053  *****************************************************************************/
00054
00055 /***************************************************************************/
00056 /* Include files                                                           */
00057 /***************************************************************************/
00058 #include <ti/mas/types/types.h>
00059 #include <ti/mas/util/utl.h>
00060
00061 #include "dpu_tgt.h"
00062 #include "dpu.h"
00063 /* TX */
00064 #include "dputxin.h"     /* input data manipulation header file */
00065 #include "dpu_scr.h"     /* Scrambler & Descrambler header file */
00066 #include "dpu_denc.h"    /* Differential Encoder & Decoder header file */
00067 #include "dpu_smap.h"    /* Symbol mapper header file         */
00068 #include "dpu_slic.h"    /* Slicer header file                */
00069 #include "dpu_intp.h"    /* Interpolator header file          */
00070 #include "dpu_shap.h"    /* Shaping filter header file        */
00071 #include "dpu_mod.h"     /* TX modulator header file          */
00072 #include "dpu_fsk.h"     /* V21 FSK TX header file            */
00073 #include "dpu_cenc.h"    /* Convolutional encoder header file */
00074
00075 /* RX */
00076 #include "dpu_cd.h"      /* RX carrier detection hesder file  */
00077 #include "dpu_trec.h"    /* RX timing recovery header file    */
00078 #include "dpu_ddet.h"    /* RX dotting detector header file   */
00079 #include "dpu_agc.h"     /* RX AGC header file                */
00080 #include "dpu_hilb.h"    /* RX band-pass hilbert transformer header file */
00081 #include "dpu_adeq.h"    /* RX adaptive equalizer header file */
00082 #include "dpu_phas.h"    /* RX phase calculator  header file  */
00083 #include "dpu_crec.h"    /* RX carrier recovery  header file  */
00084 #include "dpu_cdec.h"
00085
00086 #include "dpumath.h"
00087 #include "dpu_fir.h"
00088
00089 #define DPU_MAX_WORD    40
00090 #define DPU_MAX_SAMPLE  320
00091
00092 /***   DPU control register   ***/
00093 #define  DPU_CTRL_ERROR     1 /* Modem exception error signal             */
00094 #define  DPU_CTRL_CTS       2 /* Clear to send  ( circuit 106, CTS/RFS )  */
00095 #define  DPU_CTRL_DSR       4 /* Data Set Ready ( circuit 107, DSR )      */
00096 #define  DPU_CTRL_CDET      8 /* Carrier Detect ( circuit 109, CD )       */
00097 #define  DPU_CTRL_PDSQ      0x10 /* Poor dara signal quality                 */
00098 #define  DPU_CTRL_IDLE      0x20 /* Idle/Standby   ( circuit 117 )           */
00099 #define  DPU_CTRL_RTS       0x40 /* Request to send( circuit 105, RTS )      */
00100 #define  DPU_CTRL_TEST      0x80 /* Test loop indicator                      */
00101 #define  DPU_CTRL_UNDERRUN  0x100 /* Input data queue was starved             */
00102 #define  DPU_CTRL_OVERRUN   0x200 /* Input data queue was full                */
00103 #define  DPU_CTRL_P2        0x400 /* P2 detected in V.29 and V.17 mode        */
00104 #define  DPU_CTRL_TEP       0x800 /* TEP detected in V.27ter mode             */
00105 #define  DPU_CTRL_V21       0x1000 /* V.21 carrier detected in high speed mode */
00106 /* DPU reconfigure mask      */
00107 /* #define DPU_RECFG_IDLE    0x0000
00108 #define DPU_RECFG_CONTROL 0x0800
00109 #define DPU_RECFG_CFG     0x0400
00110 #define DPU_CRTL_RTS      0x0001
00111 #define DPU_FLG_CTS       0x4000
00112 #define DPU_FLG_IDLE      0x0400
00113 #define DPU_FLG_RTS       0x0200
00114 #define DPU_FLG_P2        0x0020
00115 #define DPU_FLG_CD        0x1000
00116 #define DPU_FLG_CD_MASK   0xefff
00117 #define DPU_FLG_P2_MASK   0xffdf
00118 #define DPU_FLG_RTS_MASK  0xfdff
00119 #define DPU_FLG_V21       0x0008
00120 #define DPU_FLG_V21_MASK  0xfff7
00121 */
00122 #define DPU_UPSAMPLE_RATE 9600      /* constant of upsampling rate 9600Hz   */
00123 #define DPU_DOWNSAMP_RATE 7200      /* constant of downsampling rate 7200Hz */
00124
00125 /*  DPU V29 TX State Type  */
00126 enum {
00127   DPU_V29_TX_STNULL   = -1,
00128   DPU_V29_TX_ST0   = 0,
00129   DPU_V29_TX_ST1   = 1,
00130   DPU_V29_TX_ST2   = 2,
00131   DPU_V29_TX_ST3   = 3,
00132   DPU_V29_TX_ST4   = 4
00133
00134 };
00135
00136 /*  DPU V29 RX State Type  */
00137 enum {
00138   DPU_V29_RX_STNULL   = -1,
00139   DPU_V29_RX_ST0   = 0,
00140   DPU_V29_RX_ST1   = 1,
00141   DPU_V29_RX_ST2   = 2,
00142   DPU_V29_RX_ST3   = 3,
00143   DPU_V29_RX_ST4   = 4,
00144   DPU_V29_RX_ST5   = 5,
00145   DPU_V29_RX_ST6   = 6,
00146   DPU_V29_RX_ST7   = 7,
00147   DPU_V29_RX_ST8   = 8,
00148   DPU_V29_RX_ST34   = 9
00149
00150 };
00151
00152 /*  DPU V27 TX State Type  */
00153 enum {
00154   DPU_V27_TX_STNULL   = -1,
00155   DPU_V27_TX_ST0   = 0,
00156   DPU_V27_TX_ST1   = 1,
00157   DPU_V27_TX_ST2   = 2,
00158   DPU_V27_TX_ST3   = 3,
00159   DPU_V27_TX_ST4   = 4,
00160   DPU_V27_TX_ST5   = 5,
00161   DPU_V27_TX_ST6   = 6,
00162   DPU_V27_TX_ST7   = 7
00163
00164 };
00165 /*  DPU V27 RX State Type  */
00166 enum {
00167   DPU_V27_RX_STNULL   = -1,
00168   DPU_V27_RX_ST0   = 0,
00169   DPU_V27_RX_ST1   = 1,
00170   DPU_V27_RX_ST2   = 2,
00171   DPU_V27_RX_ST3   = 3,
00172   DPU_V27_RX_ST4   = 4,
00173   DPU_V27_RX_ST5   = 5,
00174   DPU_V27_RX_ST6   = 6,
00175   DPU_V27_RX_ST7   = 7,
00176   DPU_V27_RX_ST8   = 8,
00177   DPU_V27_RX_ST34   = 9
00178
00179 };
00180
00181 /*  DPU V21 RX State Type  */
00182 enum {
00183   DPU_V21_RX_STNULL   = -1,
00184   DPU_V21_RX_ST0   = 0,
00185   DPU_V21_RX_ST1   = 1,
00186   DPU_V21_RX_ST2   = 2,
00187   DPU_V21_RX_ST3   = 3,
00188   DPU_V21_RX_ST4   = 4
00189
00190 };
00191
00192 /******************************************************************************
00193 * MODULATION TYPES FOR THE DPU MODEM
00194 *****************************************************************************/
00195 enum {
00196   DPU_MODULATION_V21,
00197   DPU_MODULATION_V27_2400,
00198   DPU_MODULATION_V27_4800,
00199   DPU_MODULATION_V29_7200,
00200   DPU_MODULATION_V29_9600,
00201 #ifdef V17
00202   DPU_MODULATION_V17_7200,
00203   DPU_MODULATION_V17_9600,
00204   DPU_MODULATION_V17_12000,
00205   DPU_MODULATION_V17_14400,
00206   DPU_MODULATION_V33_12000,
00207   DPU_MODULATION_V33_14400,
00208 #endif
00209   DPU_MODULATION_COUNT
00210 };
00211
00212 /***** Definitions for DPU frame slip detection and correction algorithm *****/
00213
00214 /* Number of bauds to freeze adaptive equalizer and carrier recovery after a
00215    frame slip is detected */
00216 #define DPU_SS_SI_FREEZE_BAUDCNT 48
00217
00218 /* A frame slip is declared whene a "large" phase error is detected.
00219    The threshold for detecting the frame slip has been determined through
00220    experimentation.  For V.27 and V.29, a threshold of 4x the maximum phase error
00221    is used.  For V.17, a threshold of 12x the maximum phase error is used */
00222 #define DPU_SI_SS_ERRMUL         4
00223 #define DPU_SI_SS_ERRMUL_V17     12
00224
00225 /* TRANSMITTER INSTANCE STRUCTURE */
00226
00227  typedef struct {
00228     Fract            tx_baud;      /* Transmitter Baud Clock               */
00229     Fract            bts_per_baud; /* Transmitter Bits per baud            */
00230     Fract            baud_per_seg; /* Number of symbols per frame          */
00231     Fract            samp_per_baud;/* Number of samples per symbol         */
00232     Fract            samp_per_seg ;/* Number of samples per segment        */
00233     Fract            tx_count;     /* Transmitter state counter            */
00234     Fract            tx_state;     /* TX instance State                    */
00235     Fract            tx_mode;      /* DPU transmitter protocol mode        */
00236     Fract            tx_rate;      /* DPU transmitter rate                 */
00237     Fract            gain;         /* TX output gain level                 */
00238     Fract            buf_out_index; /* DPU TX out buf. current index       */
00239     Fract            buf_tx_index; /* DPU TX out buf. current index       */
00240     Fract            *data_in_buf; /* Pointer to the input data buffer */
00241     Fract            *out_buf;     /*  DPU TX out buf.                     */
00242    /* Processing Function pointer */
00243    void           (*procfn)(void *Inst,
00244                             Fract *x_ideal,
00245                             Fract *y_ideal,
00246                             Fract *output,
00247                             int   index);
00248    /* State machine Function pointer */
00249    void           (*smfn) (void *Inst);
00250    /* Pointers to modules */
00251
00252    int           (*copy_fcn)(dpu_inman_t *inst,         /* copy data */
00253                              void *data_in, Fract *byts, Fract limit,
00254                              Fract *data_in_buf, Fract bts_per_seg);
00255    int           (*data_fcn)(dpu_inman_t *dpuInst,    /* data manipulation */
00256                               Fract *in_baud,
00257                               Fract *data_in_buf, Fract bts_per_baud );
00258    void           (*scr_fcn) (dpu_scr_t *scr_ptr,          /* scrambler */
00259                              Fract *bits);
00260    void           (*denc_fcn)(dpu_denc_t *denc_ptr,       /* diff. enc.*/
00261                               Fract *bits);
00262    void           (*cenc_fcn)(dpu_cenc_t *cenc_ptr,       /* conv. enc.*/
00263                               Fract *bits);
00264
00265    void           (*smap_fcn)(dpu_smap_t *smap_ptr,       /* Sym. mapper */
00266                               Fract *bits,
00267                               Fract *x_sym,
00268                               Fract *y_sim, int index);
00269    void           (*mod_fcn) (dpu_mod_t *mod_ptr,         /* Modulator */
00270                               Fract *x_re,
00271                               Fract *y_im);
00272    int           (*shap_fcn)(dpu_shaping_t *shap_ptr,    /* shaping fil. */
00273                               Fract *x_sym,
00274                               Fract *y_sym,
00275                               Fract *output,
00276                               int index);
00277    int           (*intrp_fcn)(dpu_interp_t *intrp_ptr,    /* interplator */
00278                               Fract *input,
00279                               Fract *output,
00280                               int length);
00281    void          (*fsk_gen_fcn)(dpu_fsk_gen_t *fsk_gen_ptr, /* FSK generator */
00282                                 Fract input_bits, Fract samp,
00283                                 Fract *output, int index);
00284
00285    /* Data definition structures for modules */
00286    dpu_inman_t    inman_inst;   /* Input Data Manipulation       */
00287    dpu_scr_t      scr_inst;     /* Scrambler data structure      */
00288    dpu_denc_t     denc_inst;    /* Diff. Encoder data structure  */
00289    dpu_cenc_t     cenc_inst;    /* Conv. Encoder instance        */
00290    dpu_smap_t     smap_inst;    /* Symbol Mapper data structure  */
00291    dpu_mod_t      mod_inst;     /* Modulator data structure      */
00292    dpu_shaping_t  shap_inst;    /* Shaping filter data structure */
00293    dpu_interp_t   interp_inst;  /* Interpolator data structure   */
00294    dpu_fsk_gen_t  fsk_gen_inst; /* V21 FSK generator data structure   */
00295
00296 } dpuTxInst_t;
00297
00298
00299 /* RECEIVER INSTANCE STRUCTURE */
00300
00301  typedef struct {
00302     Fract            rx_baud;      /* Receiver baud clock                  */
00303     Fract            bts_per_baud; /* Receiver Bits per baud               */
00304     Fract            baud_per_seg; /* Number of symbols per frame          */
00305     Fract            samp_per_baud;/* Number of samples per symbol         */
00306     Fract            samp_per_seg ;/* Number of samples per segment        */
00307     Fract            rx_count;     /* receiver state counter               */
00308     Fract            rx_state;     /* RX instance state                    */
00309     Fract            rx_mode;      /* DPU receiver mode                    */
00310     Fract            rx_rate;      /* DPU receiver rate                    */
00311     Fract            change_det;   /* state change detection               */
00312     Fract            buf_in_index; /* DPU RX out buf. current index        */
00313     Fract            buf_rx_index; /* DPU RX out buf. current index        */
00314     Fract            *in_buf;      /* DPU RX out buf.                       */
00315     Fract            *data_out_buf;/* DPU RX output manipulation buffer     */
00316
00317     /* Frame slip correction algorithm parameters */
00318   tint   fsl_bitfield;     /* Determines if frame slip correction logic is enabled */
00319   #define dpu_READ_FSL_ENABLE(x)          utlGetBitfield(x,0,1)
00320     #define dpu_SET_FSL_ENABLE(x,y)         utlSetBitfield(x,y,0,1)
00321     #define dpu_READ_FSL_DETECTED(x)        utlGetBitfield(x,1,1)
00322     #define dpu_SET_FSL_DETECTED(x,y)      utlSetBitfield(x,y,1,1)
00323     Fract  phase_err_mul;  /* Used in threshold for frame slip detection */
00324     Fract  freeze_count;   /* Baud counter for freezing adaptive equalizer and
00325                               carrier recovery after a frame slip detection */
00326    /* Processing Function pointer */
00327    void           (*procfn)(void *Inst,
00328                             Fract *inputtput,
00329                             Fract *x_sym,
00330                             Fract *y_sym, int index, tword *output_data);
00331
00332     /* State machine Function pointer */
00333    void           (*smfn) (void *Inst);
00334    /* Pointers to modules */
00335    void           (*trec_fcn)  (dpu_trec_t *inst,          /* Timing recovery */
00336                                 Fract *input, int samp, int index,Fract *trec_table_ptr);
00337    int            (*cddet_fcn) (dpu_cddet_t *inst,         /* Carrier detection */
00338                                 Fract *in, int samp, int n, Fract *gain,
00339                                 tint *rx_level );
00340    int            (*dotdet_fcn)(dpu_dotdet_t *dotdet_ptr,  /* Dot Detector */
00341                                 Fract *in, int samp, int n, Fract *gain,
00342                                 tint *rx_level );
00343    void           (*agc_fcn)   (dpu_agc_t    *agc_ptr,     /* Auto gain ctl */
00344                                 Fract *in, int samp, int n);
00345    void           (*bphilb_fcn)(dpu_bphilb_t *bphilb_ptr,  /* BP Hilbert  */
00346                                 Fract *in, Fract *out_re,
00347                                 Fract *out_im, int samp, int n);
00348    void           (*adeq_fcn) (dpu_adeq_t *adeq_ptr,       /* Adaptive equ. */
00349                                Fract *in_re, Fract *in_im, Fract *out_re,
00350                                Fract *out_im, Fract samp, int n);
00351    void           (*demod_fcn)(dpu_crec_t *mod_ptr,         /* Modulator */
00352                                Fract *x_re,
00353                                Fract *y_im);
00354    void           (*err_phase_fcn)(dpu_phase_t *phase_ptr, /* Phase calculator */
00355                                Fract *x_re, Fract *y_im,
00356                                Fract a_re, Fract a_im, Fract *phase, Fract *premap,Fract dpu_slic_invmod_v17_tbl_ptr[][10]);
00357    void           (*crec_fcn) (dpu_crec_t *crec_ptr,         /* Carrier Rec. */
00358                                Fract *phase, Fract *cf_offset);
00359    void           (*update_adeq_fcn) (dpu_adeq_t *update_adeq_ptr, /* Adaptive equ. */
00360                                Fract err_re, Fract err_im,
00361                                Fract cosfn, Fract sinfn);
00362    void           (*descr_fcn)(dpu_descr_t *descr_ptr,     /* Descrambler */
00363                               Fract *bits);
00364    void           (*cdec_fcn)(dpu_cdec_t *cdec_ptr,      /* conv decoder */
00365                               Fract x_sym, Fract y_sym, Fract *bits);
00366    void           (*ddec_fcn)(dpu_ddec_t *ddec_ptr,        /* Diff. decoder */
00367                               Fract *bits);
00368    void           (*slic_fcn)(dpu_slic_t *slic_ptr,        /* Slicer */
00369                               Fract *x_sym,
00370                               Fract *y_sim,
00371                               Fract *rx_bits,
00372                               Fract *inv_power,
00373                               Fract *slic_pt_tbl_V29_72,
00374                               Fract *slic_pt_tbl_V27_48,
00375                               Fract *slic_pt_tbl_V27_24,
00376                               const Fract *dpu_PN_smap_tbl_v17_AllRates,
00377                               Fract dpu_slic_invmod_tbl_v17[][10]);
00378    int            (*intrp_fcn)(dpu_interp_t *intrp_ptr,    /* Interpolator */
00379                               Fract *input,
00380                               Fract *output,
00381                               int length);
00382
00383    /* v21 checking/decoding function */
00384    int            (*v21_fcn) (dpu_v21_dec_t *v21_ptr,     /* V21 decoder */
00385                               Fract *input, int samp,
00386                               Fract *output, Fract *n);
00387    int            (*data_fcn)(dpu_outman_t *inst,         /* output data */
00388                               Fract *input, Fract bits_per_baud,
00389                               int bauds, tword *output_data);
00390
00391    int            (*copy_fcn)(dpu_outman_t *inst,Fract *byts);
00392
00393    /* RX's tx part */
00394    void           (*scr_fcn) (dpu_scr_t *scr_ptr,          /* scrambler */
00395                              Fract *bits);
00396
00397    void           (*smap_fcn)(dpu_smap_t *smap_ptr,       /* Sym. mapper */
00398                               Fract *bits,
00399                               Fract *x_sym,
00400                               Fract *y_sim, int index);
00401
00402    /* Data definition structures for modules */
00403    dpu_cddet_t  cddet_inst;  /* Carrier detector data structure */
00404    dpu_trec_t   trec_inst;   /* Timing recovery data structure  */
00405    dpu_dotdet_t dotdet_inst; /* Dot detector data structure     */
00406    dpu_agc_t    agc_inst;    /* Automatic Gain Control          */
00407    dpu_bphilb_t bphilb_inst; /* Band pass Hilbert transformer   */
00408    dpu_adeq_t   adeq_inst;   /* BP Adaptive equalizer           */
00409    dpu_crec_t   mod_inst;    /* Modulator data structure        */
00410    dpu_phase_t  phase_inst;  /* Phase cal. data structure       */
00411    dpu_descr_t  descr_inst;  /* Descrambler data structure      */
00412    dpu_ddec_t   ddec_inst;   /* Diff. Decoder data structure    */
00413    dpu_cdec_t   cdec_inst;   /* Convolutional Decoder data str  */
00414    dpu_slic_t   slic_inst;   /* Slicer instance data structure  */
00415    dpu_interp_t  interp_inst;/* Interpolator data structure     */
00416    dpu_v21_dec_t v21_dec_inst; /* V21 decoder data structure    */
00417    dpu_outman_t outman_inst; /* output data mainpulation        */
00418    /* RX's tx part */
00419    dpu_scr_t      scr_inst;     /* Scrambler data structure     */
00420    dpu_smap_t     smap_inst;    /* Symbol Mapper data structure */
00421 } dpuRxInst_t;
00422
00423 /* DPU INSTANCE */
00424  typedef struct dpuInst_s {
00425    tuint         ID;          /* DPU instance ID               */
00426    dpuCfg_t      cfg;         /* DPU configuration structure   */
00427    fmSigQStats_t sts;         /* DPU sig quality structure     */
00428    dpuCtrl_t     ctrl;        /* DPU control structure         */
00429    dpuSizeCfg_t  sizeCfg;     /* buffer sizes information      */
00430
00431    /* Data definition structures for modules */
00432    dpuTxInst_t   TxInst;      /* Transmitter Instance          */
00433    dpuRxInst_t   RxInst;      /* Receiver Instance             */
00434    fmTablePtrs_t *TablePtr;   /* Pointer to array of DPU Table */
00435
00436 } dpuInst_t;
00437
00438 #endif  /* _DPULOC_H */
00439 /* nothing after this point */


FM: dpumath.h File Reference

dpumath.h File Reference

#include <ti/mas/types/types.h>
#include "dpu_tgt.h"
#include <ti/mas/util/utl.h>

Include dependency graph for dpumath.h:

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

Go to the source code of this file.

Data Structures

struct | cmplx_t

Functions

void | complex_mpy (Fract *s1_re, Fract *s1_im, Fract *s2_re, Fract *s2_im, Fract *o_re, Fract *o_im)
LFract | testonly (Fract *in, Fract *hn, int h)
void | update (int len, Fract *err_re, Fract *err_im, Fract *in_re, Fract *in_im, Fract beta, LFract *del_re, LFract *del_im)
void | convolu_complex (Fract *in_re, Fract *in_im, LFract *hn_re, LFract *hn_im, Fract *out_re, Fract *out_im, int length)
LFract | frctMulDBL (LFract *a, LFract *b)
Fract | find_dist_asm_cmplx (cmplx_t *a, cmplx_t *b)
LFract | dot_square_asm (Fract *a, int length_1)
void | updateIIR (LFract input, cmplx_t *filt, cmplx_t *f)
void | crossCor (cmplx_t *c1, cmplx_t *c2, cmplx_t *c)

Function Documentation

void complex_mpy | ( | Fract * | s1_re,
 |  | Fract * | s1_im,
 |  | Fract * | s2_re,
 |  | Fract * | s2_im,
 |  | Fract * | o_re,
 |  | Fract * | o_im
 | ) |  |

LFract testonly | ( | Fract * | in,
 |  | Fract * | hn,
 |  | int | h
 | ) |  |

void update | ( | int | len,
 |  | Fract * | err_re,
 |  | Fract * | err_im,
 |  | Fract * | in_re,
 |  | Fract * | in_im,
 |  | Fract | beta,
 |  | LFract * | del_re,
 |  | LFract * | del_im
 | ) |  |

Definition at line 117 of file dpu_adeq.c.

Referenced by dpu_update_adeq().

void convolu_complex | ( | Fract * | in_re,
 |  | Fract * | in_im,
 |  | LFract * | hn_re,
 |  | LFract * | hn_im,
 |  | Fract * | out_re,
 |  | Fract * | out_im,
 |  | int | length
 | ) |  |

Definition at line 60 of file dpu_adeq.c.

Referenced by dpu_adeq().

LFract frctMulDBL | ( | LFract * | a,
 |  | LFract * | b
 | ) |  |

Definition at line 65 of file dpu_fir.c.

Referenced by averagePow().

Fract find_dist_asm_cmplx | ( | cmplx_t * | a,
 |  | cmplx_t * | b
 | ) |  |

LFract dot_square_asm | ( | Fract * | a,
 |  | int | length_1
 | ) |  |

Definition at line 33 of file dpu_fir.c.

Referenced by dpu_cd_det_util(), and dpu_cd_det_v21().

void updateIIR | ( | LFract | input,
 |  | cmplx_t * | filt,
 |  | cmplx_t * | f
 | ) |  |

Definition at line 78 of file dpu_trec.c.

References Q15_ROUND.

Referenced by dpu_ttone().

void crossCor | ( | cmplx_t * | c1,
 |  | cmplx_t * | c2,
 |  | cmplx_t * | c
 | ) |  |

Definition at line 91 of file dpu_trec.c.

Referenced by dpu_ttone().


FM: dpumath.h Source File

dpumath.h

Go to the documentation of this file.
00001 #ifndef _DPUMATH_H
00002 #define _DPUMATH_H
00003 /******************************************************************************
00004  * FILE PURPOSE: Dpu local math lib files
00005  ******************************************************************************
00006  * FILE NAME:   dpumath.h
00007  *
00008  * DESCRIPTION: This file DPU local math lib
00009  *
00010  *
00011  * TABS: NONE
00012  *
00013  * $Id: DPUMATH.H 1.10 2000/03/21 23:31:03 jwright Exp $
00014  *
00015  * REVISION HISTORY:
00016  *
00017  * $Log: DPUMATH.H $
00018  * Revision 1.10  2000/03/21 23:31:03  jwright
00019  * Clean up last 3.50 tools compile warning.
00020  * Revision 1.9  2000/03/21 19:32:24  jwright
00021  * Clean up 3.50 compile warning.
00022  * Revision 1.8  1997/12/10 00:21:03  PPATEL
00023  *  Referring to util.h for utlSin
00024  * Revision 1.7  1997/11/21 15:07:09  PPATEL
00025  *   Unused function removed
00026  * Revision 1.6  1997/10/29 13:32:38  PPATEL
00027  *   included "fract.h"
00028  * Revision 1.5  1997/10/28 21:42:06  PPATEL
00029  *  Merged latest changes with offshoot for V.17 development
00030  * Revision 1.4  1997/09/05 17:44:46  PPATEL
00031  *   Added API for frctMulDBL and SIN (polynomial implementation)
00032  *   functions
00033  * Revision 1.3  1997/05/18 12:51:05  Zoran
00034  *   Cleaned, optimized code
00035  * Revision 1.1  1997/02/06 09:41:51  unknown
00036  * Initial revision
00037  *
00038  * (C) Copyright 1996, TELOGY Networks, Inc.
00039  *****************************************************************************/
00040
00041 /* System level header files */
00042 #include <ti/mas/types/types.h>
00043 #include "dpu_tgt.h"
00044 #include <ti/mas/util/utl.h>
00045
00046 typedef struct
00047 {
00048     Fract re;
00049   Fract im;
00050 } cmplx_t;
00051
00052
00053 #ifdef PC
00054 #if 0
00055 static inline LFract convoluI (Fract *in, Fract *hn, int h)
00056 {
00057   LFract t1=0;
00058
00059   do
00060   {
00061    t1+=(LFract)(*in--)*(*hn++);
00062   } while (h--);
00063
00064   return(t1);
00065 }
00066 #endif
00067
00068 static inline LFract correlateI (Fract *in, Fract *hn, int h)
00069 {
00070   LFract t1=0;
00071
00072   do
00073   {
00074     t1+=(LFract)(*in++)*(*hn++);
00075   } while (h--);
00076
00077   return(t1);
00078 }
00079 #else
00080 /*  extern LFract convoluI (void *in, void *hn, int h); */
00081 /* extern LFract convoluIII (Fract *in, Fract *hn, int h); */
00082 /* extern void shift_data (Fract *src, Fract *dest, int length); */
00083 extern void complex_mpy (Fract *s1_re, Fract *s1_im,
00084             Fract *s2_re, Fract *s2_im, Fract *o_re, Fract *o_im);
00085 extern LFract testonly (Fract *in, Fract *hn, int h);
00086 extern void update(int len, Fract *err_re, Fract *err_im, Fract *in_re,
00087                    Fract *in_im,
00088                    Fract beta, LFract *del_re, LFract *del_im);
00089 extern void convolu_complex(Fract *in_re, Fract *in_im, LFract *hn_re,
00090                    LFract *hn_im, Fract *out_re, Fract *out_im,
00091                    int  length);
00092 extern LFract frctMulDBL(LFract *a, LFract *b);
00093 extern Fract find_dist_asm_cmplx(cmplx_t *a, cmplx_t *b);
00094 extern LFract dot_square_asm(Fract *a, int length_1);
00095 extern void updateIIR( LFract input, cmplx_t *filt, cmplx_t *f);
00096 extern void crossCor( cmplx_t *c1, cmplx_t *c2, cmplx_t *c);
00097
00098 /* extern LFract correlateI (Fract *in, Fract *hn, int h); */
00099 #endif
00100
00101 /* static inline  Fract convoluII(Fract *in, Fract *oldin, int n, Fract *hn, int h) */
00102 /* {
00103    Fract t1;
00104    Fract *input=in;
00105
00106    LFract t2, t3;
00107
00108    t2=convoluI(&input[n], hn, n);
00109    t3=convoluI(&oldin[h-2],&hn[n+1],h-n-2);
00110    t1=frctLF2F(t2+t3,28,14);
00111
00112    t1=frctLF2F(convoluI(&input[n], hn, n),28,14);
00113    t1+=frctLF2F(convoluI(&oldin[h-2],&hn[n+1],h-n-2),28,14);
00114    */
00115 /*  return(t1);
00116  } */
00117
00118 /* static inline Fract convoluIII(Fract *in, Fract *oldin, int n, Fract *hn, int h) */
00119 /*  {                                                                               */
00120 /*    Fract t1;                                                                     */
00121 /*    Fract *input=in;                                                              */
00122 /*                                                                                  */
00123 /*    LFract t2, t3;                                                                */
00124 /*                                                                                  */
00125 /*    t2=convoluI(&input[n], hn, n);                                                */
00126 /*    t3=convoluI(&oldin[h-2],&hn[n+1],h-n-2);                                      */
00127 /*    t1=frctLF2F(t2+t3,28,14);                                                     */
00128 /*    return(t1);                                                                   */
00129 /*  }                                                                               */
00130 /*                                                                                  */
00131
00132
00133 #endif  /* _DPUMATH_H */
00134 /* nothing past this point */


FM: dpuphase.c File Reference

dpuphase.c File Reference

#include "dpu_phas.h"
#include "dpu_smap.h"
#include "dpu_tgt.h"
#include <ti/mas/fract/fract.h>

Include dependency graph for dpuphase.c:

Go to the source code of this file.

Functions

void | dpu_err_pha_v29_96_1 (dpu_phase_t *inst, Fract *a_re, Fract *a_im, Fract x_re, Fract y_im, Fract *phase, Fract *premap, Fract dummyTable[][10])
void | dpu_err_pha_v29_96 (dpu_phase_t *inst, Fract *a_re, Fract *a_im, Fract x_re, Fract y_im, Fract *phase, Fract *premap, Fract dummyTable[][10])
void | dpu_err_pha_v29_72 (dpu_phase_t *inst, Fract *a_re, Fract *a_im, Fract x_re, Fract y_im, Fract *phase, Fract *premap, Fract dummyTable[][10])
void | dpu_err_pha_v29_72_1 (dpu_phase_t *inst, Fract *a_re, Fract *a_im, Fract x_re, Fract y_im, Fract *phase, Fract *premap, Fract dummyTable[][10])
void | dpu_err_pha_v27_trn (dpu_phase_t *inst, Fract *a_re, Fract *a_im, Fract x_re, Fract y_im, Fract *phase, Fract *premap, Fract dummyTable[][10])
void | dpu_err_pha_trn_1 (dpu_phase_t *inst, Fract *a_re, Fract *a_im, Fract x_re, Fract y_im, Fract *phase, Fract *premap, Fract dummyTable[][10])

Function Documentation

void dpu_err_pha_v29_96_1 | ( | dpu_phase_t * | inst,
 |  | Fract * | a_re,
 |  | Fract * | a_im,
 |  | Fract | x_re,
 |  | Fract | y_im,
 |  | Fract * | phase,
 |  | Fract * | premap,
 |  | Fract | dummyTable[][10]
 | ) |  |

Definition at line 55 of file dpuphase.c.

References dpu_phase_t::delay_im, dpu_phase_t::delay_re, dpu_phase_t::division_table, DPU_PHASE_LEN, and V29_CSCALE_96.

Referenced by v29RxSt4Init().

void dpu_err_pha_v29_96 | ( | dpu_phase_t * | inst,
 |  | Fract * | a_re,
 |  | Fract * | a_im,
 |  | Fract | x_re,
 |  | Fract | y_im,
 |  | Fract * | phase,
 |  | Fract * | premap,
 |  | Fract | dummyTable[][10]
 | ) |  |

Definition at line 97 of file dpuphase.c.

References dpu_phase_t::delay_im, dpu_phase_t::delay_re, dpu_phase_t::division_table, DPU_PHASE_LEN, dpu_phase_t::number, and V29_CSCALE_96.

Referenced by v29RxSt34Init().

void dpu_err_pha_v29_72 | ( | dpu_phase_t * | inst,
 |  | Fract * | a_re,
 |  | Fract * | a_im,
 |  | Fract | x_re,
 |  | Fract | y_im,
 |  | Fract * | phase,
 |  | Fract * | premap,
 |  | Fract | dummyTable[][10]
 | ) |  |

Definition at line 141 of file dpuphase.c.

References dpu_phase_t::delay_im, dpu_phase_t::delay_re, dpu_phase_t::division_table, DPU_PHASE_LEN, and dpu_phase_t::number.

Referenced by v29RxSt34Init().

void dpu_err_pha_v29_72_1 | ( | dpu_phase_t * | inst,
 |  | Fract * | a_re,
 |  | Fract * | a_im,
 |  | Fract | x_re,
 |  | Fract | y_im,
 |  | Fract * | phase,
 |  | Fract * | premap,
 |  | Fract | dummyTable[][10]
 | ) |  |

Definition at line 179 of file dpuphase.c.

References dpu_phase_t::delay_im, dpu_phase_t::delay_re, dpu_phase_t::division_table, and DPU_PHASE_LEN.

Referenced by v29RxSt4Init().

void dpu_err_pha_v27_trn | ( | dpu_phase_t * | inst,
 |  | Fract * | a_re,
 |  | Fract * | a_im,
 |  | Fract | x_re,
 |  | Fract | y_im,
 |  | Fract * | phase,
 |  | Fract * | premap,
 |  | Fract | dummyTable[][10]
 | ) |  |

Definition at line 213 of file dpuphase.c.

References dpu_phase_t::delay_im, dpu_phase_t::delay_re, dpu_phase_t::division_table, DPU_PHASE_LEN, and dpu_phase_t::number.

Referenced by v27RxSt34Init().

void dpu_err_pha_trn_1 | ( | dpu_phase_t * | inst,
 |  | Fract * | a_re,
 |  | Fract * | a_im,
 |  | Fract | x_re,
 |  | Fract | y_im,
 |  | Fract * | phase,
 |  | Fract * | premap,
 |  | Fract | dummyTable[][10]
 | ) |  |

Definition at line 252 of file dpuphase.c.

References dpu_phase_t::delay_im, dpu_phase_t::delay_re, dpu_phase_t::division_table, and DPU_PHASE_LEN.

Referenced by v27RxSt4Init().


FM: dpuphase.c Source File

dpuphase.c

Go to the documentation of this file.
00001 /******************************************************************************
00002 ; * FILE PURPOSE:  DPU RX phase calculator
00003 ; ******************************************************************************
00004 ; * FILE NAME: dpu_phas.c
00005 ; *
00006 ; * DESCRIPTION: DPU RX phase calculator
00007 ; *
00008 ; *
00009 ; * TABS: NONE
00010 ; *
00011 ; * $Id: DPUPHASE.c 1.3 1999/04/02 10:13:32 sakhtar Exp $
00012 ; *
00013 ; * REVISION HISTORY:
00014 ; *
00015 ; * $Log: DPUPHASE.S $
00016 ; * Revision 1.3  1999/04/02 10:13:32  sakhtar
00017 ; * Added comments
00018 ; * Revision 1.2  1999/04/01 17:45:20  sakhtar
00019 ; * Added comments
00020 ; * Revision 1.1  1999/03/26 11:20:20  sakhtar
00021 ; * Initial revision
00022 ; *
00023 ; * Moved to Assembly
00024 ; *
00025 ; * Revision 1.7  1999/03/24 17:13:13  sakhtar
00026 ; * Removed unused functions
00027 ; * Revision 1.6  1999/03/01 16:03:57  sakhtar
00028 ; * Modified for optimization. Removed all C54x specific IFDEF
00029 ; * options
00030 ; * Revision 1.5  1997/09/05 20:36:00  PPATEL
00031 ; *  Added types.h & fract.h
00032 ; * Revision 1.4  1997/09/03 17:32:05  PPATEL
00033 ; *     changed C542 to C54x for compatibility with C548
00034 ; * Revision 1.3  1997/05/18 12:21:31  Zoran
00035 ; *   Cleaned version, fixed bugs for training
00036 ; * Revision 1.2  1997/02/19 18:35:39  H.T.Li
00037 ; * Revision 1.1  1997/02/06 09:03:37  unknown
00038 ; * Initial revision
00039 ; *
00040 ; * (C) Copyright 1996, TELOGY Networks, Inc.
00041 ; *****************************************************************************/
00042
00043 #include "dpu_phas.h"
00044 #include "dpu_smap.h"
00045 #include "dpu_tgt.h"
00046 #include <ti/mas/fract/fract.h>
00047
00048
00049 /******************************************************************************
00050 ; * FUNCTION PURPOSE: dpu RX phase error calculator for V29 9600 bps
00051 ; ******************************************************************************
00052 ; * DESCRIPTION: dpu RX phase error calculator for TRN and B1 states
00053 ; *
00054 ; *****************************************************************************/
00055 void dpu_err_pha_v29_96_1( dpu_phase_t *inst, Fract *a_re, Fract *a_im,
00056                      Fract x_re, Fract y_im, Fract *phase, Fract *premap,Fract dummyTable[][10])
00057  {
00058     LFract tmp_re, tmp_im;
00059     Fract *delay_re=inst->delay_re;
00060     Fract *delay_im=inst->delay_im, tmp;
00061     Fract tr_re=*a_re, tr_im=*a_im;
00062     int h = DPU_PHASE_LEN-1,index;
00063
00064     if ((Fract) tr_re==0 ||(Fract) tr_im == 0)
00065     {
00066       tmp = tr_re + tr_im;
00067        if (tmp == (Fract)(3*V29_CSCALE_96) || tmp == (Fract)(-3*V29_CSCALE_96) )
00068         index = 1;
00069       else index = 2;
00070     }
00071     else
00072     {
00073       if (tr_re == (Fract)(1*V29_CSCALE_96) ||
00074            tr_re == (Fract)(-1*V29_CSCALE_96) )
00075            index = 0;
00076       else index = 3;
00077     }
00078     tmp_re = frctMul( y_im, 14, tr_re, 14, 28);
00079     tmp_im = frctMul( x_re, 14, tr_im, 14, 28);
00080
00081
00082     tmp=frctLF2F(tmp_re-tmp_im,28,14);
00083
00084
00085     *phase = frctLF2F(frctMul(tmp,14,inst->division_table[index], 14, 28), 28, 14);
00086
00087     return;
00088
00089 }
00090
00091 /******************************************************************************
00092 ; * FUNCTION PURPOSE: dpu RX phase error calculator for V29 9600 bps
00093 ; ******************************************************************************
00094 ; * DESCRIPTION: dpu RX phase error calculator for TRN and B1 states
00095 ; *              for junction between Dotting and TRN states
00096 ; *****************************************************************************/
00097 void dpu_err_pha_v29_96( dpu_phase_t *inst, Fract *a_re, Fract *a_im,
00098                      Fract x_re, Fract y_im, Fract *phase, Fract *premap,Fract dummyTable[][10])
00099  {
00100     LFract tmp_re, tmp_im;
00101     Fract *delay_re=inst->delay_re;
00102     Fract *delay_im=inst->delay_im, tmp;
00103     int h = DPU_PHASE_LEN-1, index;
00104
00105     if ((Fract) delay_re[inst->number]==0 ||(Fract) delay_im[inst->number] == 0)
00106     {
00107       tmp = delay_re[inst->number] + delay_im[inst->number];
00108       if (tmp == (Fract)(3*V29_CSCALE_96) || tmp == (Fract)(-3*V29_CSCALE_96) )
00109         index = 1;
00110       else index = 2;
00111     }
00112     else
00113     {
00114       if (delay_re[inst->number] == (Fract)(1*V29_CSCALE_96) ||
00115            delay_re[inst->number] == (Fract)(-1*V29_CSCALE_96) )
00116            index = 0;
00117       else index = 3;
00118     }
00119     tmp_re = frctMul( y_im, 14, delay_re[inst->number], 14, 28);
00120     tmp_im = frctMul( x_re, 14, delay_im[inst->number], 14, 28);
00121
00122     tmp=frctLF2F(tmp_re-tmp_im,28,14);
00123
00124
00125     *phase = frctLF2F(frctMul(tmp, 14, inst->division_table[index], 14, 28), 28, 14);
00126
00127     *a_re = delay_re[inst->number];
00128     *a_im = delay_im[inst->number];
00129     inst->number++;
00130
00131     return;
00132
00133 }
00134
00135 /******************************************************************************
00136 ; * FUNCTION PURPOSE: dpu RX phase error calculator for V29 7200 bps
00137 ; ******************************************************************************
00138 ; * DESCRIPTION: dpu RX phase error calculator for TRN and B1 states
00139 ; *              for junction between Dotting and TRN states
00140 ; *****************************************************************************/
00141 void dpu_err_pha_v29_72( dpu_phase_t *inst, Fract *a_re, Fract *a_im,
00142                      Fract x_re, Fract y_im, Fract *phase, Fract *premap,Fract dummyTable[][10])
00143  {
00144     LFract tmp_re, tmp_im;
00145     Fract *delay_re=inst->delay_re;
00146     Fract *delay_im=inst->delay_im, tmp;
00147     int h = DPU_PHASE_LEN-1,index;
00148
00149     if (delay_re[inst->number] * delay_im[inst->number] == 0)
00150     {
00151         index = 1;
00152     }
00153     else
00154     {
00155         index = 0;
00156     }
00157     tmp_re = frctMul( y_im, 14, delay_re[inst->number], 14, 28);
00158     tmp_im = frctMul( x_re, 14, delay_im[inst->number], 14, 28);
00159
00160     tmp = frctLF2F(tmp_re-tmp_im,28,14);
00161
00162     *phase = frctLF2F(frctMul(tmp, 14, inst->division_table[index], 14, 28), 28, 14);
00163
00164     *a_re = delay_re[inst->number];
00165     *a_im = delay_im[inst->number];
00166     inst->number++;
00167
00168     return;
00169
00170 }
00171
00172
00173 /******************************************************************************
00174 ; * FUNCTION PURPOSE: dpu RX phase error calculator for V29 7200 bps
00175 ; ******************************************************************************
00176 ; * DESCRIPTION: dpu RX phase error calculator for TRN and B1 states
00177 ; *
00178 ; *****************************************************************************/
00179 void dpu_err_pha_v29_72_1( dpu_phase_t *inst, Fract *a_re, Fract *a_im,
00180                      Fract x_re, Fract y_im, Fract *phase, Fract *premap,Fract dummyTable[][10])
00181  {
00182     LFract tmp_re, tmp_im;
00183     Fract *delay_re=inst->delay_re;
00184     Fract *delay_im=inst->delay_im, tmp;
00185     Fract tr_re = *a_re, tr_im = *a_im;
00186     int h = DPU_PHASE_LEN-1,index;
00187
00188     if (tr_re * tr_im == 0)
00189     {
00190         index = 1;
00191     }
00192     else
00193     {
00194         index = 0;
00195     }
00196     tmp_re = frctMul( y_im, 14, tr_re, 14, 28);
00197     tmp_im = frctMul( x_re, 14, tr_im, 14, 28);
00198
00199     tmp = frctLF2F(tmp_re-tmp_im,28,14);
00200
00201     *phase = frctLF2F(frctMul(tmp, 14, inst->division_table[index], 14, 28), 28, 14);
00202
00203     return;
00204
00205 }
00206
00207 /******************************************************************************
00208 ; * FUNCTION PURPOSE: dpu RX phase error calculator for V27
00209 ; ******************************************************************************
00210 ; * DESCRIPTION: dpu RX phase error calculator for TRN and B1 states
00211 ; *              for junction between Dotting and TRN states
00212 ; *****************************************************************************/
00213 void dpu_err_pha_v27_trn( dpu_phase_t *inst, Fract *a_re, Fract *a_im,
00214                      Fract x_re, Fract y_im, Fract *phase, Fract *premap,Fract dummyTable[][10])
00215  {
00216     LFract tmp_re, tmp_im;
00217     Fract *delay_re=inst->delay_re;
00218     Fract *delay_im=inst->delay_im, tmp;
00219     int h = DPU_PHASE_LEN-1,index=0;
00220
00221     if (inst->number == 0)
00222     {
00223       *premap = 1;
00224       if (x_re<0)
00225       {
00226         inst->number = 1;
00227         *premap = 0;
00228       }
00229
00230     }
00231
00232     tmp_re = frctMul( y_im, 14, delay_re[inst->number], 14, 28);
00233     tmp_im = frctMul( x_re, 14, delay_im[inst->number], 14, 28);
00234
00235     tmp = frctLF2F(tmp_re-tmp_im, 28, 14);
00236
00237     *phase = frctLF2F(frctMul(tmp, 14, inst->division_table[index], 14, 28), 28, 14);
00238
00239     *a_re = delay_re[inst->number];
00240     *a_im = delay_im[inst->number];
00241     inst->number++;
00242     return;
00243
00244 }
00245
00246 /******************************************************************************
00247 ; * FUNCTION PURPOSE: dpu RX phase error calculator for V29 4800 bps, V27
00248 ; ******************************************************************************
00249 ; * DESCRIPTION: dpu RX phase error calculator for TRN and B1 states
00250 ; *
00251 ; *****************************************************************************/
00252 void dpu_err_pha_trn_1( dpu_phase_t *inst, Fract *a_re, Fract *a_im,
00253                      Fract x_re, Fract y_im, Fract *phase, Fract *premap,Fract dummyTable[][10])
00254  {
00255     LFract tmp_re, tmp_im;
00256     Fract *delay_re=inst->delay_re;
00257     Fract *delay_im=inst->delay_im, tmp;
00258     Fract tr_re = *a_re, tr_im = *a_im;
00259     int h = DPU_PHASE_LEN-1, index=0;
00260
00261     tmp_re = frctMul( y_im, 14, tr_re, 14, 28);
00262     tmp_im = frctMul( x_re, 14, tr_im, 14, 28);
00263
00264     tmp = frctLF2F(tmp_re-tmp_im,28,14);
00265
00266     *phase = frctLF2F(frctMul(tmp, 14, inst->division_table[index], 14, 28), 28, 14);
00267
00268     return;
00269
00270 }
00271 /* nothing beyond this point*/


FM: dpurx.c File Reference

dpurx.c File Reference

#include <ti/mas/types/types.h>
#include <stdlib.h>
#include "dpu.h"
#include "dpurx.h"
#include "dpuloc.h"

Include dependency graph for dpurx.c:

Go to the source code of this file.

Functions

int dpuRx (void *dpuInst, tword *data_out, linSample *samp_in)

Function Documentation

int dpuRx | ( | void * | dpuInst,
 |  | tword * | data_out,
 |  | linSample * | samp_in
 | ) |  |

Definition at line 73 of file dpurx.c.

References dpuRxInst_t::baud_per_seg, dpuRxInst_t::copy_fcn, DPU_MAX_BAUDS_PER_SEG, DPU_MAX_SAMPS_PER_SEG, DPU_RATE_NULL, dpuRxInst_t::interp_inst, dpuRxInst_t::intrp_fcn, dpuRxInst_t::outman_inst, dpuRxInst_t::procfn, dpuRxInst_t::rx_rate, dpuInst_s::RxInst, dpuRxInst_t::samp_per_seg, dpuRxInst_t::smfn, and dpu_outman_t::word_index.

Referenced by FAX_MODEM().


FM: dpurx.c Source File

dpurx.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE:
00003  ******************************************************************************
00004  * FILE NAME:
00005  *
00006  * DESCRIPTION:
00007  *
00008  * TABS: NONE
00009  *
00010  * $Id: dpurx.c 1.10 2000/03/21 22:39:00 jwright Exp $
00011  *
00012  * REVISION HISTORY:
00013  *
00014  * $Log: dpurx.c $
00015  * Revision 1.10  2000/03/21 22:39:00  jwright
00016  * Clear up 3.50 compile warning.
00017  * Revision 1.9  1999/03/15 10:51:25  sakhtar
00018  * We do not call copy_fcn instead read directly from inman
00019  * structure
00020  * Revision 1.8  1999/03/13 19:08:56  sakhtar
00021  * Modified to change the API of functions in vxxinit.c
00022  * Revision 1.6  1999/03/01 19:07:39  sakhtar
00023  * Modified the API of procrx(), copy_fcn(), and data_fcn() to oombine
00024  * the functionality of dpu_rx_copy() into dpu_rx_packet()
00025  * Revision 1.5  1999/02/24 17:20:37  sakhtar
00026  * Revert to earlier version since the change made was causing a
00027  * problem in V.21
00028  * Revision 1.3  1999/02/10 10:47:49  sakhtar
00029  * Cleanup. Modified to change the API of dpuRx function
00030  * Revision 1.2  1998/01/21 00:06:06  PPATEL
00031  *  Contains code for communicating with PC for transferring constellation
00032  * and timing recovery information in real time. Enable the flags only
00033  * when using TIGER and the C program CONSTDIS.C
00034  * Revision 1.1  1997/11/21 14:48:17  PPATEL
00035  * Initial revision
00036  *
00037  * (C) Copyright 1997, TELOGY Networks, Inc.
00038  *****************************************************************************/
00039 /* System level header files */
00040 #include <ti/mas/types/types.h>
00041
00042 #include<stdlib.h>
00043
00044 #ifdef TIGER
00045 #include "tiger542.h"
00046 #endif
00047
00048 /* DPU high level header files */
00049 #include "dpu.h"
00050 #include "dpurx.h"
00051
00052 /* DPU low level local header files */
00053 #include "dpuloc.h"
00054
00055 #ifdef DPU_DBG
00056 #include "dpu_dbg.h"
00057 #endif
00058
00059
00060 /******************************************************************************
00061  * FUNCTION PURPOSE: Tell a DPU instance to perform demodulation.
00062  ******************************************************************************
00063  * DESCRIPTION: The input to this function is a linear array of samples. The
00064  *              function returns immediately if the DPU state is closed.
00065  *
00066  *  int dpuRx (
00067  *    void  *dpuInst,        - a pointer to DPU instance structure
00068  *    tword *data_out,       - a pointer to output data segment
00069  *    Fract *samp_in,        - a pointer to input samples segment
00070  *    )
00071  *
00072  *****************************************************************************/
00073 int dpuRx (void *dpuInst, tword *data_out, linSample *samp_in)
00074 {
00075   dpuInst_t *Inst = (dpuInst_t *)dpuInst;
00076   Fract out3[DPU_MAX_SAMPS_PER_SEG], x_re[DPU_MAX_BAUDS_PER_SEG],
00077         y_im[DPU_MAX_BAUDS_PER_SEG];
00078   int j, byts=0;
00079
00080   /* return if encoder for this DPU instance isn't "on" */
00081   if (Inst->RxInst.rx_rate == DPU_RATE_NULL)
00082      return (0);
00083
00084   (*Inst->RxInst.intrp_fcn)(&(Inst->RxInst.interp_inst),
00085      samp_in,out3,Inst->RxInst.samp_per_seg);
00086
00087   for (j=0; j<Inst->RxInst.baud_per_seg; j++ )
00088   {
00089     /* state machine */
00090     (*Inst->RxInst.smfn)(Inst);
00091
00092     /* Receiver */
00093     (*Inst->RxInst.procfn)(Inst, out3, x_re, y_im, j,data_out);
00094   }
00095
00096   if (Inst->RxInst.copy_fcn != NULL)
00097   {
00098     byts = Inst->RxInst.outman_inst.word_index;
00099   Inst->RxInst.outman_inst.word_index = 0;
00100   }
00101
00102   return (byts);
00103
00104 } /* dpuRx */


FM: dpurx.h File Reference

dpurx.h File Reference

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

Go to the source code of this file.

Functions

int dpuRx (void *dpuInst, tword *data_out, linSample *samp_in)

Function Documentation

int dpuRx | ( | void * | dpuInst,
 |  | tword * | data_out,
 |  | linSample * | samp_in
 | ) |  |

Definition at line 73 of file dpurx.c.

References dpuRxInst_t::baud_per_seg, dpuRxInst_t::copy_fcn, DPU_MAX_BAUDS_PER_SEG, DPU_MAX_SAMPS_PER_SEG, DPU_RATE_NULL, dpuRxInst_t::interp_inst, dpuRxInst_t::intrp_fcn, dpuRxInst_t::outman_inst, dpuRxInst_t::procfn, dpuRxInst_t::rx_rate, dpuInst_s::RxInst, dpuRxInst_t::samp_per_seg, dpuRxInst_t::smfn, and dpu_outman_t::word_index.

Referenced by FAX_MODEM().


FM: dpurx.h Source File

dpurx.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE:
00003  ******************************************************************************
00004  * FILE NAME:
00005  *
00006  * DESCRIPTION:
00007  *
00008  * TABS: NONE
00009  *
00010  * $Id: dpurx.h 1.2 1999/02/10 10:45:19 sakhtar Exp $
00011  *
00012  * REVISION HISTORY:
00013  *
00014  * $Log: dpurx.h $
00015  * Revision 1.2  1999/02/10 10:45:19  sakhtar
00016  * Modified to change the API of dpuRx function
00017  * Revision 1.1  1997/11/21 14:48:17  PPATEL
00018  * Initial revision
00019  *
00020  * (C) Copyright 1997, TELOGY Networks, Inc.
00021  *****************************************************************************/
00022
00023 /* return the number of bytes decoded */
00024 int dpuRx (void *dpuInst, tword *data_out, linSample *samp_in);
00025
00026 /* nothing after this point */


FM: dputxin.c File Reference

dputxin.c File Reference

#include <string.h>
#include <ti/mas/types/types.h>
#include <ti/mas/util/pkt.h>
#include "dputxin.h"

Include dependency graph for dputxin.c:

Go to the source code of this file.

Functions

int | dpu_tx_copy (dpu_inman_t *inst, void *data, Fract *byts, Fract limit, Fract *data_in_buf, Fract bts_per_seg)
int | dpu_tx_extract (dpu_inman_t *inst, Fract *in_baud, Fract *data_in_buf, Fract bts_per_baud)
int | dpu_gen_marks (dpu_inman_t *inst, Fract *in_baud, Fract *data_in_buf, Fract bts_per_baud)
void | dpu_inman_init (dpu_inman_t *inst, Fract *data_in_buf, Fract word_size)
void | dpu_outman_init (dpu_outman_t *inst, Fract *data_out_buf, Fract word_size)

Function Documentation

int dpu_tx_copy | ( | dpu_inman_t * | inst,
 |  | void * | data,
 |  | Fract * | byts,
 |  | Fract | limit,
 |  | Fract * | data_in_buf,
 |  | Fract | bts_per_seg
 | ) |  |

Definition at line 67 of file dputxin.c.

References dpu_inman_t::bits_cnt, dpu_inman_t::bytes_cnt, and dpu_inman_t::data_in_buf.

Referenced by vxx_tx_init().

int dpu_tx_extract | ( | dpu_inman_t * | inst,
 |  | Fract * | in_baud,
 |  | Fract * | data_in_buf,
 |  | Fract | bts_per_baud
 | ) |  |

Definition at line 83 of file dputxin.c.

References dpu_inman_t::bit_index, dpu_inman_t::bits, dpu_inman_t::bits_cnt, dpu_inman_t::bytes_cnt, dpu_inman_t::data_in_buf, DPU_DATA_NO, dpu_inman_t::txUnderflowFill, and dpu_inman_t::word_size.

Referenced by v27TxSt5Init(), v29TxSt4Init(), and vxx_tx_init().

int dpu_gen_marks | ( | dpu_inman_t * | inst,
 |  | Fract * | in_baud,
 |  | Fract * | data_in_buf,
 |  | Fract | bts_per_baud
 | ) |  |

Definition at line 132 of file dputxin.c.

References DPU_DATA_OK.

Referenced by v27TxSt3Init(), and v29TxSt3Init().

void dpu_inman_init | ( | dpu_inman_t * | inst,
 |  | Fract * | data_in_buf,
 |  | Fract | word_size
 | ) |  |

Definition at line 145 of file dputxin.c.

References dpu_inman_t::bit_index, dpu_inman_t::bits_cnt, dpu_inman_t::bytes_cnt, and dpu_inman_t::word_size.

Referenced by vxx_tx_init().

void dpu_outman_init | ( | dpu_outman_t * | inst,
 |  | Fract * | data_out_buf,
 |  | Fract | word_size
 | ) |  |

Definition at line 161 of file dputxin.c.

References dpu_outman_t::bit_index, dpu_outman_t::mask, dpu_outman_t::temp_data, dpu_outman_t::word_index, and dpu_outman_t::word_size.

Referenced by HSrxCommonSt1Init(), v21RxStM(), and v21RxStNULLInit().


FM: dputxin.c Source File

dputxin.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE:  DPU TX Input Data Manipulation source file.
00003  ******************************************************************************
00004  * FILE NAME: dputxin.c
00005  *
00006  * DESCRIPTION: DPU TX Input Data Manipulation.
00007  *
00008  * GLOBAL FUNCTIONS:
00009  *
00010  *    dpuTxCopy()     : copy new input data into TX instance buffer
00011  *    dpuTxExtract()  : extract the bits of one symbol from the TX inst. buffer
00012  *
00013  * TABS: NONE
00014  *
00015  * $Id: DPUTXIN.C 1.11 1999/03/24 17:11:56 sakhtar Exp $
00016  *
00017  * REVISION HISTORY:
00018  *
00019  * $Log: DPUTXIN.C $
00020  * Revision 1.11  1999/03/24 17:11:56  sakhtar
00021  * Added comments. Renamed variables
00022  * Revision 1.10  1999/03/20 15:57:17  sakhtar
00023  * Optimized and rewritten. DPU takes data directly out of modem
00024  * driver buffer instead of copying into its buffer.
00025  * Revision 1.9  1999/03/15 10:53:08  sakhtar
00026  * Optimized.
00027  * Revision 1.8  1998/09/02 19:04:07  ppatel
00028  *  Configurable transmit underflow fill (all 0's or all 1's depending on
00029  * FM_MCTRL02 ) with dpu fiu interface header file from fxm project
00030  * ( replacing old fiusd\working ...)
00031  * Revision 1.7  1998/08/18 16:08:46  ppatel
00032  *  Configurable fill bits for tx underflow from makefile (default is 0 fill)
00033  * Revision 1.6  1997/12/21 16:23:52  PPATEL
00034  *  Generate 0's initially after training so that there is no reporting of bad-bits
00035  * before TCF
00036  * Revision 1.5  1997/11/21 15:08:22  PPATEL
00037  *  Receiver manipulation routines moved to file maniprx.c for multi-channel
00038  * @small (GG 3.0)
00039  * Revision 1.4  1997/05/18 12:11:19  Zoran
00040  *   ?
00041  * Revision 1.3  1997/02/19 18:25:35  unknown
00042  * Revision 1.2  1996/10/18 10:07:33  HTLI
00043  * Revision 1.1  1996/09/18 13:32:43  HTLI
00044  * Initial revision
00045  *
00046  * (C) Copyright 1996, TELOGY Networks, Inc.
00047  *****************************************************************************/
00048 #include <string.h>
00049
00050  /* System level header files */
00051 #include <ti/mas/types/types.h>
00052 #include <ti/mas/util/pkt.h>
00053
00054 /* DPU TX In Data Maipulation header file */
00055 #include "dputxin.h"
00056 /*
00057 int TEST_OUT_BUF[150];
00058 int TEST_OUT_BUF_INDEX=0;
00059 */
00060
00061 /******************************************************************************
00062  * FUNCTION PURPOSE:  copy new input data address into TX instance buffer.
00063  ******************************************************************************
00064  * DESCRIPTION:  copy new input data address into TX instance buffer.
00065  *
00066  *****************************************************************************/
00067 int dpu_tx_copy (dpu_inman_t *inst, void *data, Fract *byts, Fract limit,
00068                   Fract *data_in_buf, Fract bts_per_seg)
00069 {
00070   /* initialize the bits counter, data pointer and bytes counter */
00071   inst->bits_cnt = bts_per_seg;
00072   inst->data_in_buf = (tword *) data;
00073   inst->bytes_cnt  = 0;
00074   return (NULL);
00075 }
00076
00077 /******************************************************************************
00078  * FUNCTION PURPOSE:  extract an input baud data from TX instance buffer.
00079  ******************************************************************************
00080  * DESCRIPTION:  extract an input baud data from TX instance buffer.
00081  *
00082  *****************************************************************************/
00083 int dpu_tx_extract(dpu_inman_t *inst, Fract *in_baud,
00084                     Fract *data_in_buf, Fract bts_per_baud )
00085 {
00086   int i;
00087   Fract data;
00088   tword  *data_buf;
00089
00090   /* initialize pointer to the data buffer and data byte */
00091   data_buf = inst->data_in_buf;
00092   data = 0;
00093
00094   /* return fill bits if we do not have enough bits for a baud */
00095   if (inst->bits_cnt < bts_per_baud)
00096   {
00097   /* in_baud is either all 1's or all 0's */
00098     *in_baud = (inst->txUnderflowFill == 1) ? ((1 << bts_per_baud) - 1) : 0;
00099     return(DPU_DATA_NO);
00100   }
00101
00102   /* read one bit from data buffer during each iteration */
00103   for (i = 0;i < bts_per_baud; i++)
00104   {
00105   /* shift previous bits left to make room for next bit */
00106   data = data << 1;
00107
00108   /* extract one byte from data buffer if we do not have enough bits */
00109   if (inst->bit_index == 0)
00110   {
00111     inst->bit_index = inst->word_size;
00112     inst->bits = data_buf[inst->bytes_cnt++]; //inst->bits = pktRead8bits(data_buf,inst->bytes_cnt++);
00113   }
00114
00115   /* extract and save one bit */
00116   inst->bit_index -= 1;
00117   data |= (inst->bits >> inst->bit_index) & 0x01;
00118   }
00119
00120   /* decrement counter and return the baud */
00121   inst->bits_cnt -= bts_per_baud;
00122   *in_baud = data;
00123
00124   return(DPU_DATA_OK);
00125 }
00126 /******************************************************************************
00127  * FUNCTION PURPOSE:  generate an input baud data of all 1.
00128  ******************************************************************************
00129  * DESCRIPTION: generate an input baud data of all 1.
00130  *
00131  *****************************************************************************/
00132 int dpu_gen_marks(dpu_inman_t *inst, Fract *in_baud,
00133                     Fract *data_in_buf, Fract bts_per_baud )
00134 {
00135   *in_baud=0xff;
00136
00137   return(DPU_DATA_OK);
00138 }
00139 /******************************************************************************
00140  * FUNCTION PURPOSE:  initialize inman_inst
00141  ******************************************************************************
00142  * DESCRIPTION: initialize the DPU input data manipulation unit
00143  *
00144  *****************************************************************************/
00145 void dpu_inman_init (dpu_inman_t *inst, Fract *data_in_buf, Fract word_size)
00146 {
00147   inst->bytes_cnt = 0;
00148   inst->bit_index = 0;
00149   inst->bits_cnt = 0;
00150
00151   inst->word_size = word_size;
00152 }
00153
00154 /******************************************************************************
00155  * FUNCTION PURPOSE:  initialize outman_inst
00156  ******************************************************************************
00157  * DESCRIPTION: initialize the DPU output data manipulation unit
00158  *
00159  *****************************************************************************/
00160
00161  void dpu_outman_init (dpu_outman_t *inst, Fract *data_out_buf, Fract word_size)
00162  {
00163    inst->word_index  =
00164    inst->bit_index   =
00165    inst->temp_data   = 0;
00166    inst->word_size   = word_size;
00167    inst->mask = (word_size == 16) ? 0xFFFF : ((1 << word_size) - 1);
00168  }
00169
00170 /* nothing past this point */
00171


FM: dputxin.h File Reference

dputxin.h File Reference

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

Include dependency graph for dputxin.h:

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

Go to the source code of this file.

Data Structures

struct | dpu_inman_t
struct | dpu_outman_t

Defines

#define | DPU_MAX_WORD 40
#define | DPU_DATA_OK 7
#define | DPU_DATA_NO 5
#define | DPU_DATA_OVER 6
#define | DPU_IN_WORD_SIZE 8
#define | DPU_OUT_WORD_SIZE 8

Functions

int | dpu_tx_copy (dpu_inman_t *inst, void *data_in, Fract *byts, Fract limit, Fract *data_in_buf, Fract bts_per_seg)
int | dpu_tx_extract (dpu_inman_t *dpuInst, Fract *in_baud, Fract *data_in_buf, Fract bts_per_baud)
int | dpu_gen_marks (dpu_inman_t *dpuInst, Fract *in_baud, Fract *data_in_buf, Fract bts_per_baud)
void | dpu_inman_init (dpu_inman_t *inst, Fract *data_in_buf, Fract word_size)
void | dpu_outman_init (dpu_outman_t *inst, Fract *data_out_buf, Fract word_size)

Define Documentation

#define DPU_MAX_WORD 40

Definition at line 53 of file dputxin.h.

#define DPU_DATA_OK 7

Definition at line 54 of file dputxin.h.

Referenced by dpu_gen_marks().

#define DPU_DATA_NO 5

Definition at line 55 of file dputxin.h.

Referenced by dpu_tx_extract().

#define DPU_DATA_OVER 6

Definition at line 56 of file dputxin.h.

Referenced by dpu_rx_packet(), and v21RxStM().

#define DPU_IN_WORD_SIZE 8

Definition at line 57 of file dputxin.h.

Referenced by vxx_tx_init().

#define DPU_OUT_WORD_SIZE 8

Definition at line 58 of file dputxin.h.

Referenced by HSrxCommonSt1Init(), v21RxStM(), and v21RxStNULLInit().

Function Documentation

int dpu_tx_copy | ( | dpu_inman_t * | inst,
 |  | void * | data_in,
 |  | Fract * | byts,
 |  | Fract | limit,
 |  | Fract * | data_in_buf,
 |  | Fract | bts_per_seg
 | ) |  |

Definition at line 67 of file dputxin.c.

References dpu_inman_t::bits_cnt, dpu_inman_t::bytes_cnt, and dpu_inman_t::data_in_buf.

Referenced by vxx_tx_init().

int dpu_tx_extract | ( | dpu_inman_t * | dpuInst,
 |  | Fract * | in_baud,
 |  | Fract * | data_in_buf,
 |  | Fract | bts_per_baud
 | ) |  |

Definition at line 83 of file dputxin.c.

References dpu_inman_t::bit_index, dpu_inman_t::bits, dpu_inman_t::bits_cnt, dpu_inman_t::bytes_cnt, dpu_inman_t::data_in_buf, DPU_DATA_NO, dpu_inman_t::txUnderflowFill, and dpu_inman_t::word_size.

Referenced by v27TxSt5Init(), v29TxSt4Init(), and vxx_tx_init().

int dpu_gen_marks | ( | dpu_inman_t * | dpuInst,
 |  | Fract * | in_baud,
 |  | Fract * | data_in_buf,
 |  | Fract | bts_per_baud
 | ) |  |

Definition at line 132 of file dputxin.c.

References DPU_DATA_OK.

Referenced by v27TxSt3Init(), and v29TxSt3Init().

void dpu_inman_init | ( | dpu_inman_t * | inst,
 |  | Fract * | data_in_buf,
 |  | Fract | word_size
 | ) |  |

Definition at line 145 of file dputxin.c.

References dpu_inman_t::bit_index, dpu_inman_t::bits_cnt, dpu_inman_t::bytes_cnt, and dpu_inman_t::word_size.

Referenced by vxx_tx_init().

void dpu_outman_init | ( | dpu_outman_t * | inst,
 |  | Fract * | data_out_buf,
 |  | Fract | word_size
 | ) |  |

Definition at line 161 of file dputxin.c.

References dpu_outman_t::bit_index, dpu_outman_t::mask, dpu_outman_t::temp_data, dpu_outman_t::word_index, and dpu_outman_t::word_size.

Referenced by HSrxCommonSt1Init(), v21RxStM(), and v21RxStNULLInit().


FM: dputxin.h Source File

dputxin.h

Go to the documentation of this file.
00001 #ifndef _DPUTXIN_H
00002 #define _DPUTXIN_H
00003 /******************************************************************************
00004  * FILE PURPOSE: Macros and defs for input data manipulation data structure
00005  *  of DPU TX instance.
00006  *
00007  ******************************************************************************
00008  * FILE NAME:   dputxin.h
00009  *
00010  * DESCRIPTION: Defines types and macros necessary for the input data
00011  *              manipulation of DPU TX.
00012  *
00013  * $Id: DPUTXIN.H 1.11 1999/03/24 17:12:09 sakhtar Exp $
00014  *
00015  * REVISION HISTORY:
00016  *
00017  * $Log: DPUTXIN.H $
00018  * Revision 1.11  1999/03/24 17:12:09  sakhtar
00019  * Added comments.Renamed variables
00020  * Revision 1.10  1999/03/15 10:52:50  sakhtar
00021  * Changed inman structure for optimization
00022  * Revision 1.9  1998/09/02 19:04:11  ppatel
00023  *  Configurable transmit underflow fill (all 0's or all 1's depending on
00024  * FM_MCTRL02 ) with dpu fiu interface header file from fxm project
00025  * ( replacing old fiusd\working ...)
00026  * Revision 1.8  1997/12/21 16:56:29  PPATEL
00027  *   DPU_DATA_OK changed to 7 because the value 4 was used by
00028  * DPU_TEP_TRUE
00029  * Revision 1.7  1997/12/12 16:25:52  PPATEL
00030  *   Changes for V.33 included (tested to work for v.29 but not V.17 or
00031  * V.33)
00032  * Revision 1.6  1997/11/21 15:09:42  PPATEL
00033  *   Max word restored back to 30 for multi-channel testing with old fiu.
00034  * restore it back to 40 for v.17 testing.
00035  * Revision 1.5  1997/10/28 21:44:56  PPATEL
00036  *  For v17 at 14.4 kbps, the max word size has to be at least 36 (in
00037  * the old version it is 30).
00038  * Revision 1.4  1997/09/13 19:23:02  PPATEL
00039  *    Bridge state added for V.17
00040  * Revision 1.3  1997/02/19 18:26:03  unknown
00041  * Revision 1.2  1996/10/18 10:07:34  HTLI
00042  * Revision 1.1  1996/09/18 13:34:31  HTLI
00043  * Initial revision
00044  *
00045  * (C) Copyright 1996, TELOGY Networks, Inc.
00046  *****************************************************************************/
00047
00048 /***************************************************************************/
00049 /* Include files                                                           */
00050 /***************************************************************************/
00051 #include <ti/mas/types/types.h>
00052
00053 #define DPU_MAX_WORD     40
00054 #define DPU_DATA_OK       7
00055 #define DPU_DATA_NO       5
00056 #define DPU_DATA_OVER     6
00057 #define DPU_IN_WORD_SIZE  8
00058 #define DPU_OUT_WORD_SIZE 8
00059 /******************************************************************************
00060  * DATA DEFINITION: Instance data for a DPU TX input mainpulation instance
00061  ******************************************************************************
00062  * DESCRIPTION:
00063  * This structure specifies the data structure of an inpzut manipulation instance.
00064  *
00065  *****************************************************************************/
00066 typedef struct
00067 {
00068     Fract       word_size;        /* word size of the data out buffer */
00069     tword       *data_in_buf;     /* begin bit index for each word of data_in_buf */
00070     Fract       bytes_cnt;        /* number of bytes taken out of the buffer  */
00071     Fract       bits_cnt;         /* number of remaining bits in the buffer   */
00072     Fract       bit_index;        /* Index of bit of the data_in_buf        */
00073     Fract       bits;             /* number of unsent bits in data_in_buf   */
00074     Fract       bridge_state;     /* required for bridge sequence generation in V.17 */
00075     Fract       txUnderflowFill;  /* tx underflow fill bit (lsb indicates whether fill
00076                                    pattern is all 0's (if 0) or all 1's (if 1) */
00077 } dpu_inman_t;
00078
00079 typedef struct
00080 {
00081     Fract       word_size;        /* word size of the data out buffer */
00082     Fract       mask;             /* 2^word_size - 1                  */
00083     Fract       word_index;       /* Index of word of the data_out_buf       */
00084     Fract       bit_index;        /* Index of bit of the data_out_buf        */
00085   Fract       temp_data;      /* left over bits which are used next time to form a byte */
00086 } dpu_outman_t;
00087
00088 /*---------------------*/
00089 /* Function Prototypes */
00090 /*---------------------*/
00091
00092 /*        copy new input data into TX instance buffer           */
00093 int dpu_tx_copy (dpu_inman_t *inst, void *data_in, Fract *byts, Fract limit,
00094                   Fract *data_in_buf, Fract bts_per_seg);
00095 /* extract the bits of one symbol from the TX instance buffer   */
00096 int dpu_tx_extract (dpu_inman_t *dpuInst, Fract *in_baud,
00097                     Fract *data_in_buf, Fract bts_per_baud );
00098 int dpu_gen_marks (dpu_inman_t *dpuInst, Fract *in_baud,
00099                     Fract *data_in_buf, Fract bts_per_baud );
00100 void dpu_inman_init (dpu_inman_t *inst, Fract *data_in_buf, Fract word_size);
00101
00102
00103 void dpu_outman_init (dpu_outman_t *inst, Fract *data_out_buf, Fract word_size);
00104
00105
00106 #endif  /* _DPUTXIN_H */
00107 /* nothing after this point */


FM: fax_mod.c File Reference

fax_mod.c File Reference

#include "fxmdpuif.h"
#include "dpu.h"
#include "dpuloc.h"
#include "dpurx.h"
#include "fmport.h"
#include "v17.h"

Include dependency graph for fax_mod.c:

Go to the source code of this file.

Defines

#define | DPU_DBG_RCV_MSG 0
#define | DPU_DBG_XMT_MSG 0

Functions

void | FAX_MODEM (fm_ctrl_str *fm_ctrl, void *Dpu_Inst)

Define Documentation

#define DPU_DBG_RCV_MSG 0

Definition at line 81 of file fax_mod.c.

#define DPU_DBG_XMT_MSG 0

Definition at line 84 of file fax_mod.c.

Function Documentation

void FAX_MODEM | ( | fm_ctrl_str * | fm_ctrl,
 |  | void * | Dpu_Inst
 | ) |  |

Definition at line 106 of file fax_mod.c.

References dpuRxInst_t::cddet_inst, dpuInst_s::cfg, fmTablePtrs_t::commonTable1Ptrs, fm_ctrl_str::Config, dpuInst_s::ctrl, dpuCfg_t::direction, DPU_CTRL_CDET, DPU_CTRL_P2, DPU_CTRL_RTS, DPU_CTRL_TEP, DPU_CTRL_V21, DPU_DIR_RX, DPU_DIR_TX, DPU_MODULATION_COUNT, DPU_TRN_LONG, DPU_TRN_SHORT, DPU_V17_RX_ST7, DPU_V27_RX_ST7, DPU_V29_RX_ST7, dpuConfig(), commonTable1_sPtrs_t::dpuModConvTable_pt, commonTable1_sPtrs_t::dpuModRateTable_pt, commonTable1_sPtrs_t::dpuModTypeTable_pt, dpuRx(), dpuTx(), fm_ctrl_str::element_0, fm_ctrl_str::element_2, fm_ctrl_str::element_3, fm_ctrl_str::element_5, FM_DPU_CONFIG_MODEM_RX_MODE, FM_DPU_CONFIG_MODULATION_MASK, FM_DPU_CONFIG_RTS, FM_DPU_CONFIG_SETUP, FM_DPU_CONFIG_STRAIN, FM_DPU_CONFIG_TX_FILLBIT, FM_DPU_LINECOND_CARRIER_DETECT, FM_DPU_LINECOND_P2_DETECT, FM_DPU_LINECOND_PREAMBLE_DETECT, FM_DPU_LINECOND_SIGNAL_PRESENT, FM_DPU_LINECOND_TEP_DETECT, dpu_cddet_t::fSignalPowerPresent, fm_ctrl_str::LineCond, dpuCfg_t::mode, dpuCfg_t::rate, dpuRxInst_t::rx_state, dpuInst_s::RxInst, dpuInst_s::TablePtr, and dpuCfg_t::trn_type.

Here is the call graph for this function:


FM: fax_mod.c Source File

fax_mod.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: Dallas compatible shell program for modem
00003  ******************************************************************************
00004  * FILE NAME:   fax_mod.c
00005  *
00006  * DESCRIPTION:
00007  *
00008  * REQUIRES:    types.h (generic data types)
00009  *              dpu.h (all the data structures required by DPU)
00010  *
00011  * TABS: NONE
00012  *
00013  * $Id: FAX_MOD.C 1.22  2002/07/24 10:23:15  Aravind B R Exp $
00014  *
00015  * REVISION HISTORY:
00016  *
00017  * $Log: FAX_MOD.C $
00018  * Revision 1.22  2002/07/24 10:23:15  Aravind B R
00019  * Removed dpuStatus computation function after processing Data RX,and
00020  * implemented the same in a simple way, refer procrx.c
00021  * Revision 1.21  2002/07/17 11:18:15  Aravind B R
00022  * Added  dpuStatus computation function after processing Data RX
00023  * Revision 1.20  1999/03/10 14:42:07  sakhtar
00024  * Revert back to 1.17 and update the changes and optimize
00025  * them
00026  * Revision 1.19  1999/03/08 16:20:03  sakhtar
00027  * Modified to set the short training bit for only V17.
00028  * Revision 1.18  1999/03/07 15:12:27  sakhtar
00029  * New API for dpuConfig. Modified for optimization
00030  * Revision 1.17  1999/02/10 10:48:05  sakhtar
00031  * Modified to change the API of dpuRx function
00032  * Revision 1.16  1998/09/02 19:04:11  ppatel
00033  *  Configurable transmit underflow fill (all 0's or all 1's depending on
00034  * FM_MCTRL02 ) with dpu fiu interface header file from fxm project
00035  * ( replacing old fiusd\working ...)
00036  * Revision 1.15  1998/01/21 00:03:18  PPATEL
00037  *  Small change in terms of resetting the setup flag at the appropriate
00038  * place in the code
00039  * Revision 1.14  1997/12/21 16:26:57  PPATEL
00040  *  Debugging ability for recording received message in high speed.
00041  * Revision 1.13  1997/12/12 16:25:52  PPATEL
00042  *   Changes for V.33 included (tested to work for v.29 but not V.17 or
00043  * V.33)
00044  * Revision 1.12  1997/11/21 15:39:52  PPATEL
00045  *  Multi-channel fax with conditional V17
00046  * Revision 1.11  1997/11/12 21:41:06  PPATEL
00047  *  File for multi-channel fax w/o V.17
00048  * Revision 1.9  1997/09/16 23:39:46  PPATEL
00049  *  Merged changes from clean customer build on sept 16th; includes
00050  * debugging information and also removed V.17 additions.
00051  * Revision 1.8  1997/09/13 19:31:13  PPATEL
00052  *   V17 additions
00053  * Revision 1.6  1997/09/05 20:47:45  PPATEL
00054  *  Removal of fract.h and also removal of threshold programmability
00055  * Revision 1.4  1997/06/04 15:06:07  zoranm
00056  *   TX level reduced by 3dB
00057  * Revision 1.3  1997/05/18 12:28:55  Zoran
00058  * Cleaned, optimized version
00059  * Revision 1.2  1997/02/19 18:37:18  H.T.Li
00060  * Revision 1.1  1997/02/06 13:46:05  unknown
00061  * Initial revision
00062  *
00063  * (C) Copyright 1996, TELOGY Networks, Inc.
00064  *****************************************************************************/
00065
00066 /***  for FAX   ***/
00067 #include "fxmdpuif.h"
00068
00069 #ifdef DPU_DBG
00070 #include "dpu_dbg.h"
00071 #endif
00072
00073 #include "dpu.h"         /* Local DPU header file */
00074 #include "dpuloc.h"      /* Local DPU header file */
00075 #include "dpurx.h"
00076 #include "fmport.h"
00077
00078 #include "v17.h"
00079
00080 /* DPU RECEIVE DEBUGGING PARAMETERS */
00081 #define DPU_DBG_RCV_MSG 0
00082
00083 /* DPU TRANSMIT DEBUGGING PARAMETERS */
00084 #define DPU_DBG_XMT_MSG 0
00085
00086 #if DPU_DBG_RCV_MSG
00087  #define DPU_DBG_RCV_MSG_BUF_SIZE  512
00088  int  DPU_DBG_RCV_MSG_INDEX=0;
00089  tword DPU_DBG_RCV_MSG_BUF[DPU_DBG_RCV_MSG_BUF_SIZE];
00090 #endif
00091 #if DPU_DBG_XMT_MSG
00092  #define DPU_DBG_XMT_MSG_BUF_SIZE  512
00093  int  DPU_DBG_XMT_MSG_INDEX=0;
00094  tword DPU_DBG_XMT_MSG_BUF[DPU_DBG_XMT_MSG_BUF_SIZE];
00095 #endif
00096
00097 /******************************************************************************
00098  * FUNCTION PURPOSE: Fax modem to control instance of DPU.
00099  ******************************************************************************
00100  * DESCRIPTION: This function is a shell to control an instance of DPU.
00101  *
00102  *  void FAX_MODEM (
00103  *    fm_ctrl_str  *fm_ctrl,   - structure with control block for modem
00104  *
00105  *****************************************************************************/
00106 void FAX_MODEM (fm_ctrl_str *fm_ctrl, void *Dpu_Inst)
00107 {
00108   dpuInst_t *dpuInst;
00109   int mod;
00110   dpuCfg_t cfg;
00111   tuint dpuConfigRegister, dpuLineCondRegister;
00112
00113   /* initialize the instance pointer */
00114   dpuInst = (dpuInst_t *) Dpu_Inst;
00115
00116 #ifdef DPU_DBG
00117  dpu_dbg_increment_frame_cntr();
00118 #endif
00119
00120   /* Obtain DPU Config and Line Condition register values */
00121   dpuConfigRegister   = fm_ctrl->Config;
00122   dpuLineCondRegister = fm_ctrl->LineCond;
00123
00124   /***** Process modem CONTROL EVENT ********/
00125   if (dpuConfigRegister & FM_DPU_CONFIG_SETUP)
00126   {
00127   /* convert the modulation type of FXM to DPU rate index */
00128   for (mod = 0; (dpuConfigRegister & FM_DPU_CONFIG_MODULATION_MASK) != dpuInst->TablePtr->commonTable1Ptrs->dpuModConvTable_pt[mod]; mod++)
00129   {
00130     if (mod == DPU_MODULATION_COUNT)
00131       return;
00132   }
00133
00134   /* initialize the training type for all rates to long */
00135   dpuInst->cfg.trn_type = DPU_TRN_LONG;
00136
00137 #ifdef V17
00138   /* disable short training for all rates except V17 */
00139   if ((mod >= DPU_MODULATION_V17_7200) || (mod <= DPU_MODULATION_V17_14400))
00140   {
00141     dpuInst->cfg.trn_type = (dpuConfigRegister & FM_DPU_CONFIG_STRAIN) ? DPU_TRN_SHORT : DPU_TRN_LONG;
00142   }
00143 #endif
00144
00145   /* get the rate from the rate conversion table */
00146     dpuInst->cfg.rate = dpuInst->TablePtr->commonTable1Ptrs->dpuModRateTable_pt[mod];
00147
00148   /* get the modulation from the modulation conversion table */
00149   dpuInst->cfg.mode = dpuInst->TablePtr->commonTable1Ptrs->dpuModTypeTable_pt[mod];
00150
00151     /* set the modem direction , TX (0) or RX (1) */
00152     dpuInst->cfg.direction = (dpuConfigRegister & FM_DPU_CONFIG_MODEM_RX_MODE) ? DPU_DIR_RX : DPU_DIR_TX;
00153
00154     /* configure dpu instance */
00155     dpuConfig((void *) dpuInst, &cfg);
00156
00157   /* clear the set up bit */
00158     dpuConfigRegister &= ~FM_DPU_CONFIG_SETUP;
00159
00160   /* set the dpu TX fill bit - used only by TX mode */
00161     dpuInst->TxInst.inman_inst.txUnderflowFill =
00162              (dpuConfigRegister & FM_DPU_CONFIG_TX_FILLBIT) ? 0x0001 : 0x0000;
00163   }
00164
00165   /* DPU receiver */
00166   if (dpuInst->cfg.direction == DPU_DIR_RX)
00167   {
00168   /* record the number of bytes received in fm_ctrl */
00169     fm_ctrl->element_5 = dpuRx(dpuInst, fm_ctrl->element_3, fm_ctrl->element_0);
00170
00171 #if DPU_DBG_RCV_MSG
00172     {int i,num_byts;
00173   num_byts = fm_ctrl->element_5;
00174     if ((num_byts == 0) &&
00175          ((dpuInst->RxInst.rx_state == DPU_V27_RX_ST7) ||
00176       (dpuInst->RxInst.rx_state == DPU_V29_RX_ST7) ||
00177       (dpuInst->RxInst.rx_state == DPU_V17_RX_ST7))
00178      )
00179     {
00180       DPU_DBG_RCV_MSG_INDEX = 0;
00181     }
00182
00183     for (i = 0; i <  num_byts; i++)
00184     {
00185       /*if (DPU_DBG_RCV_MSG_INDEX < DPU_DBG_RCV_MSG_BUF_SIZE) */
00186       DPU_DBG_RCV_MSG_BUF[DPU_DBG_RCV_MSG_INDEX++] = (int)fm_ctrl->element_3[i];
00187       DPU_DBG_RCV_MSG_INDEX &= DPU_DBG_RCV_MSG_BUF_SIZE-1;
00188     }
00189   }
00190 #endif
00191
00192   /* clear CD, Flag, TEP, P2 indicator bits */
00193     dpuLineCondRegister &= ~(FM_DPU_LINECOND_CARRIER_DETECT | FM_DPU_LINECOND_P2_DETECT |
00194                              FM_DPU_LINECOND_TEP_DETECT | FM_DPU_LINECOND_PREAMBLE_DETECT |
00195                              FM_DPU_LINECOND_SIGNAL_PRESENT);
00196
00197     /*****     set CD bit    ******/
00198     if (dpuInst->ctrl & DPU_CTRL_CDET)
00199       dpuLineCondRegister |= FM_DPU_LINECOND_CARRIER_DETECT;
00200
00201     /*****     set V21 det bit    ******/
00202     if (dpuInst->ctrl & DPU_CTRL_V21)
00203       dpuLineCondRegister |= FM_DPU_LINECOND_PREAMBLE_DETECT;
00204
00205     /*****     set P2 bit    ******/
00206     if (dpuInst->ctrl & DPU_CTRL_P2)
00207       dpuLineCondRegister |= FM_DPU_LINECOND_P2_DETECT;
00208
00209     /*****     set TEP bit    ******/
00210     if (dpuInst->ctrl & DPU_CTRL_TEP)
00211       dpuLineCondRegister |= FM_DPU_LINECOND_TEP_DETECT;
00212
00213     /*****     set SIG_PRESENT bit    ******/
00214     if (dpuInst->RxInst.cddet_inst.fSignalPowerPresent == TRUE)
00215       dpuLineCondRegister |= FM_DPU_LINECOND_SIGNAL_PRESENT;
00216    /* End of RX */
00217
00218   }
00219
00220   else  /* dpu Transmitter */
00221   {
00222     /****     check RTS bit   ****/
00223     if (dpuConfigRegister & FM_DPU_CONFIG_RTS)
00224     {
00225       dpuInst->ctrl |= DPU_CTRL_RTS;
00226       dpuConfigRegister &= ~FM_DPU_CONFIG_RTS; /* set RTS bit to zero */
00227     }
00228
00229     dpuTx(dpuInst, fm_ctrl->element_3, &fm_ctrl->element_5, fm_ctrl->element_0, &fm_ctrl->element_2);
00230
00231 #if DPU_DBG_XMT_MSG
00232     {int i,num_byts;
00233   num_byts = fm_ctrl->element_5;
00234     if ((num_byts == 0) &&
00235          ((dpuInst->RxInst.rx_state == DPU_V27_RX_ST7) ||
00236       (dpuInst->RxInst.rx_state == DPU_V29_RX_ST7) ||
00237       (dpuInst->RxInst.rx_state == DPU_V17_RX_ST7))
00238      )
00239     {
00240       DPU_DBG_XMT_MSG_INDEX = 0;
00241     }
00242
00243     for (i = 0; i <  num_byts; i++)
00244     {
00245       /*if (DPU_DBG_XMT_MSG_INDEX < DPU_DBG_XMT_MSG_BUF_SIZE) */
00246       DPU_DBG_XMT_MSG_BUF[DPU_DBG_XMT_MSG_INDEX++] = fm_ctrl->element_3[i];
00247       DPU_DBG_RCV_MSG_INDEX &= DPU_DBG_RCV_MSG_BUF_SIZE-1;
00248     }
00249   }
00250 #endif
00251
00252   } /* End of TX */
00253
00254   fm_ctrl->Config   = dpuConfigRegister;
00255   fm_ctrl->LineCond = dpuLineCondRegister;
00256 }
00257 /* Nothing after this point */


FM: File Index

FM File List

Here is a list of all files with brief descriptions:
ade_init.c [code] |
ade_init.h [code] |
agcrx.c [code] |
agcrx.h [code] |
cdc_init.c [code] |
cdc_init.h [code] |
cdrx.c [code] |
cdrx.h [code] |
crecrx.c [code] |
crecrx.h [code] |
descr.c [code] |
descrrx.c [code] |
descrrx.h [code] |
dif_dec.c [code] |
dif_enc.c [code] |
doxygen.h [code] |
dpu.c [code] |
dpu.h [code] |
dpu_adeq.c [code] |
dpu_adeq.h [code] |
dpu_agc.c [code] |
dpu_agc.h [code] |
dpu_cd.c [code] |
dpu_cd.h [code] |
dpu_cdc.c [code] |
dpu_cdec.c [code] |
dpu_cdec.h [code] |
dpu_cenc.c [code] |
dpu_cenc.h [code] |
dpu_crec.c [code] |
dpu_crec.h [code] |
dpu_ddet.c [code] |
dpu_ddet.h [code] |
dpu_ddt.c [code] |
dpu_denc.h [code] |
dpu_fir.c [code] |
dpu_fir.h [code] |
dpu_fsk.c [code] |
dpu_fsk.h [code] |
dpu_gain.c [code] |
dpu_hilb.c [code] |
dpu_hilb.h [code] |
dpu_intp.h [code] |
dpu_mod.c [code] |
dpu_mod.h [code] |
dpu_phas.c [code] |
dpu_phas.h [code] |
dpu_scr.h [code] |
dpu_shap.h [code] |
dpu_slic.h [code] |
dpu_smap.h [code] |
dpu_tables.c [code] |
dpu_tgt.h [code] |
dpu_trec.c [code] |
dpu_trec.h [code] |
dpuatan2.c [code] |
dpuatan2.h [code] |
dpuloc.h [code] |
dpumath.h [code] |
dpuphase.c [code] |
dpurx.c [code] |
dpurx.h [code] |
dputxin.c [code] |
dputxin.h [code] |
fax_mod.c [code] |
fm.c [code] |
fm.h [code] | Public Definitions for Fax Modem
fmcommon.c [code] |
fmloc.h [code] |
fmport.h [code] |
fmprag.h [code] |
fmstate.c [code] |
fmTablesTypes.h [code] |
fmtrace.h [code] |
fmutil.c [code] |
fxmdpuif.h [code] |
hilbrx.c [code] |
hilbrx.h [code] |
int_init.c [code] |
int_init.h [code] |
interp.c [code] |
maniprx.c [code] |
maniprx.h [code] |
procrx.c [code] |
procrx.h [code] |
scr.c [code] |
shaping.c [code] |
slicers.c [code] |
sym_map.c [code] |
trc_init.c [code] |
trc_init.h [code] |
trec_com.h [code] |
trec_int.c [code] |
v17.c [code] |
v17.h [code] |
v17data.c [code] |
v17data.h [code] |
v17datrx.h [code] |
v17rx.c [code] |
v17rx.h [code] |
v17s.c [code] |
v17s.h [code] |
v17slic.c [code] |
v17slic.h [code] |
v17smap.h [code] |
Version.h [code] |
vxxinit.c [code] |
vxxinit.h [code] |
vxxproc.c [code] |
vxxproc.h [code] |
vxxsm.c [code] |
vxxsm.h [code] |


FM: fm.c File Reference

fm.c File Reference

#include <string.h>
#include <ti/mas/types/types.h>
#include <ti/mas/fract/fract.h>
#include "dpu.h"
#include <ti/mas/util/ecomem.h>
#include "fm.h"
#include "fmloc.h"
#include "dpuloc.h"
#include "vxxinit.h"
#include "vxxproc.h"
#include "vxxsm.h"
#include "dpu_fsk.h"
#include "cdrx.h"
#include <ti/mas/util/utl.h>
#include "v17.h"
#include "dpu_tgt.h"
#include "dpu_trec.h"
#include "fmtrace.h"
#include "fmport.h"
#include "fmprag.h"

Include dependency graph for fm.c:

Go to the source code of this file.

Defines

#define | FM_NBUF 21
#define | FM_INSTANCE_BUFN 0
#define | FM_DATA_BUFN 1
#define | FM_DPU_DATAOUT_BUFN 2
#define | FM_DPU_RECVOUT_BUFN 3
#define | FM_DPU_RECVIN_BUFN 4
#define | FM_DPU_INMAN_BEGIN_BUFN 5
#define | FM_DPU_INMAN_END_BUFN 6
#define | FM_DPU_TX_INTP_OLDIN_BUFN 7
#define | FM_DPU_SHAP_OLDIN_IM_BUFN 8
#define | FM_DPU_INSTANCE_BUFN 9
#define | FM_DPU_RX_INTP_OLDIN_BUFN 10
#define | FM_DPU_HILB_DELAY_BUFN 11
#define | FM_DPU_ADEQ_DELAY_RE_BUFN 12
#define | FM_DPU_ADEQ_DELAY_IM_BUFN 13
#define | FM_DPU_ADEQ_CF_RE_LONG_BUFN 14
#define | FM_DPU_ADEQ_CF_IM_LONG_BUFN 15
#define | FM_DPU_TREC_OUTPUT_BUFN 16
#define | FM_DPU_TREC_DELAY_BUFN 17
#define | FM_DPU_CDEC_PATH_DIST_BUFN 18
#define | FM_DPU_CDEC_ACCUM_DIST_BUFN 19
#define | FM_DPU_CDEC_PATH_STORE_BUFN 20

Functions

tint | fmGetSizes (tint *nbufs, const ecomemBuffer_t **bufs)
This function obtains memory requirements for an instance of FM.
tint | fmNew (void **fmInst, tint nbufs, ecomemBuffer_t *bufs, fmNewConfig_t *cfg)
This function creates an instance of FM and initializes the memory buffer pointers in the instance.
Remarks:
Function fmNew() must be called before fmOpen()is called.

void | fmDelete (void **fmInst)
This function deletes the FM instance identified by fmInst.
Remarks:
FM must be closed prior to being deleted.

tint | fmOpen (void *fmInst, fmOpenConfig_t *cfg)
This function initializes and configures an FM instance.
void | fmClose (void *fmInst)
This function closes the FM instance identified by fmInst. It sets the state of FM to CLOSED.
tint | fmReceiveIn (void *fmInst, void *message)
This function passes a message from the FIU to the FM.
static fmTablePtrs_t * | fmGetTablePtr (void)
static void | fmSetTablePtr (fmTablePtrs_t *tablePtr)
void | fmSendIn (void *fmInst, linSample *send_data)
This function passes a frame of PCM linear samples to the FM for processing.
void | fmStats (void *fmInst, tbool freset, fmStatsReport_t *stats)
Routine which obtains FM statistics.
void | fmToneDetect (void *fmInst, tuint toneID, tuint v8CallFunction, tuint v8ModMode)
This function notifies FM that a tone detection indication has been received from an external tone detection module.

Variables

ecomemBuffer_t | fmBufs [FM_NBUF]

Define Documentation

#define FM_NBUF 21

Definition at line 44 of file fm.c.

Referenced by fmGetSizes(), and fmNew().

#define FM_INSTANCE_BUFN 0

Definition at line 45 of file fm.c.

#define FM_DATA_BUFN 1

Definition at line 46 of file fm.c.

#define FM_DPU_DATAOUT_BUFN 2

Definition at line 47 of file fm.c.

#define FM_DPU_RECVOUT_BUFN 3

Definition at line 48 of file fm.c.

#define FM_DPU_RECVIN_BUFN 4

Definition at line 49 of file fm.c.

#define FM_DPU_INMAN_BEGIN_BUFN 5

Definition at line 50 of file fm.c.

#define FM_DPU_INMAN_END_BUFN 6

Definition at line 51 of file fm.c.

#define FM_DPU_TX_INTP_OLDIN_BUFN 7

Definition at line 52 of file fm.c.

#define FM_DPU_SHAP_OLDIN_IM_BUFN 8

Definition at line 53 of file fm.c.

#define FM_DPU_INSTANCE_BUFN 9

Definition at line 54 of file fm.c.

#define FM_DPU_RX_INTP_OLDIN_BUFN 10

Definition at line 55 of file fm.c.

#define FM_DPU_HILB_DELAY_BUFN 11

Definition at line 56 of file fm.c.

#define FM_DPU_ADEQ_DELAY_RE_BUFN 12

Definition at line 57 of file fm.c.

#define FM_DPU_ADEQ_DELAY_IM_BUFN 13

Definition at line 58 of file fm.c.

#define FM_DPU_ADEQ_CF_RE_LONG_BUFN 14

Definition at line 59 of file fm.c.

#define FM_DPU_ADEQ_CF_IM_LONG_BUFN 15

Definition at line 60 of file fm.c.

#define FM_DPU_TREC_OUTPUT_BUFN 16

Definition at line 61 of file fm.c.

#define FM_DPU_TREC_DELAY_BUFN 17

Definition at line 62 of file fm.c.

#define FM_DPU_CDEC_PATH_DIST_BUFN 18

Definition at line 63 of file fm.c.

#define FM_DPU_CDEC_ACCUM_DIST_BUFN 19

Definition at line 64 of file fm.c.

#define FM_DPU_CDEC_PATH_STORE_BUFN 20

Definition at line 65 of file fm.c.

Function Documentation

static fmTablePtrs_t* fmGetTablePtr ( void ) [inline, static]

Definition at line 397 of file fm.c.

References fmContext, and fmContext_t::tablePtr.

Referenced by fmSendIn().

static void fmSetTablePtr ( fmTablePtrs_t * tablePtr ) [inline, static]

Definition at line 402 of file fm.c.

References fmContext, and fmContext_t::tablePtr.

Referenced by fmSendIn().

Variable Documentation

ecomemBuffer_t fmBufs[FM_NBUF]

Definition at line 69 of file fm.c.

Referenced by fmGetSizes(), and fmNew().


FM: fm.c Source File

fm.c

Go to the documentation of this file.
00001 /*******************************************************************************
00002 * FILE PURPOSE: Main routines for Fax Modem (FM)
00003 ********************************************************************************
00004 * FILE NAME:    fm.c
00005 *
00006 * DESCRIPTION:  The FM is the software module which modulates and demodulates
00007 *               data with an interface similar to Class I Modem
00008 *
00009 * (C) Copyright 2000, TELOGY Networks, Inc.
00010 *******************************************************************************/
00011 #include <string.h>
00012
00013 #include <ti/mas/types/types.h>
00014 #include <ti/mas/fract/fract.h>
00015 #include "dpu.h"
00016 #include <ti/mas/util/ecomem.h>
00017 #include "fm.h"
00018 #include "fmloc.h"
00019 #include "dpuloc.h"
00020 #include "vxxinit.h"
00021 #include "vxxproc.h"
00022 #include "vxxsm.h"
00023 #include "dpu_fsk.h"
00024 #include "cdrx.h"
00025 #include <ti/mas/util/utl.h>
00026 #include "v17.h"
00027 #include "dpu_tgt.h"
00028 #include "dpu_trec.h"
00029 #include "fmtrace.h"
00030 #include "fmport.h"
00031
00032 /* Relocatable symbols */
00033 #ifndef   PC
00034 #include "fmprag.h"
00035 #endif
00036
00037 /*******************************************************************************
00038 * DATA DEFINITION: FM buffer definitions
00039 *
00040 * DESCRIPTION:     The FM requests memory buffers for each instance
00041 *                  according to the sizes specified in this file
00042 *
00043 *******************************************************************************/
00044 #define FM_NBUF                       21
00045 #define FM_INSTANCE_BUFN              0  /* overlayed over unused DPU buffer */
00046 #define FM_DATA_BUFN                  1  /* overlayed over unused DPU buffer */
00047 #define FM_DPU_DATAOUT_BUFN           2
00048 #define FM_DPU_RECVOUT_BUFN           3
00049 #define FM_DPU_RECVIN_BUFN            4
00050 #define FM_DPU_INMAN_BEGIN_BUFN       5
00051 #define FM_DPU_INMAN_END_BUFN         6
00052 #define FM_DPU_TX_INTP_OLDIN_BUFN     7
00053 #define FM_DPU_SHAP_OLDIN_IM_BUFN     8
00054 #define FM_DPU_INSTANCE_BUFN          9
00055 #define FM_DPU_RX_INTP_OLDIN_BUFN    10
00056 #define FM_DPU_HILB_DELAY_BUFN       11
00057 #define FM_DPU_ADEQ_DELAY_RE_BUFN    12
00058 #define FM_DPU_ADEQ_DELAY_IM_BUFN    13
00059 #define FM_DPU_ADEQ_CF_RE_LONG_BUFN  14
00060 #define FM_DPU_ADEQ_CF_IM_LONG_BUFN  15
00061 #define FM_DPU_TREC_OUTPUT_BUFN      16
00062 #define FM_DPU_TREC_DELAY_BUFN       17
00063 #define FM_DPU_CDEC_PATH_DIST_BUFN   18
00064 #define FM_DPU_CDEC_ACCUM_DIST_BUFN  19
00065 #define FM_DPU_CDEC_PATH_STORE_BUFN  20
00066
00067
00068 /* Default memory buffer descriptions  */
00069 ecomemBuffer_t fmBufs[FM_NBUF] = {
00070 #ifdef HALF_DUPLEX
00071  /* class,   log2align, size,                                 volat,  base */
00072  ecomem_CLASS_EXTERNAL, fm_LOG2ALIGN, sizeof(fmInst_t)                     , FALSE, NULL,
00073  ecomem_CLASS_EXTERNAL, fm_LOG2ALIGN, FM_DATA_BUF_SIZE_WORDS * sizeof(tword), FALSE, NULL,
00074  ecomem_CLASS_EXTERNAL, fm_LOG2ALIGN, FM_MAX_DATA_PER_FRAME * sizeof(tint) , FALSE, NULL,
00075  ecomem_CLASS_EXTERNAL, fm_LOG2ALIGN, 1                                    , FALSE, NULL,
00076  ecomem_CLASS_EXTERNAL, fm_LOG2ALIGN, 1                                    , FALSE, NULL,
00077  ecomem_CLASS_EXTERNAL, fm_LOG2ALIGN, 1                                    , FALSE, NULL,
00078  ecomem_CLASS_EXTERNAL, fm_LOG2ALIGN, 1                                    , FALSE, NULL,
00079  ecomem_CLASS_INTERNAL, fm_LOG2ALIGN, 1                                    , FALSE, NULL,
00080  ecomem_CLASS_INTERNAL, fm_LOG2ALIGN, 1                                    , FALSE, NULL,
00081  ecomem_CLASS_INTERNAL, fm_LOG2ALIGN, sizeof(dpuInst_t)                    , FALSE, NULL,
00082  ecomem_CLASS_INTERNAL, fm_LOG2ALIGN, DPU_MAX_M * sizeof(Fract)            , FALSE, NULL,
00083  ecomem_CLASS_INTERNAL, fm_LOG2ALIGN, DPU_HILB_LEN * sizeof(Fract)         , FALSE, NULL,
00084  ecomem_CLASS_INTERNAL, fm_LOG2ALIGN, DPU_ADEQ_DL_LEN  * sizeof(Fract)     , FALSE, NULL,
00085  ecomem_CLASS_INTERNAL, fm_LOG2ALIGN, DPU_ADEQ_DL_LEN  * sizeof(Fract)     , FALSE, NULL,
00086  ecomem_CLASS_INTERNAL, fm_LOG2ALIGN, DPU_ADEQ_COEF_LEN * sizeof(LFract)   , FALSE, NULL,
00087  ecomem_CLASS_INTERNAL, fm_LOG2ALIGN, DPU_ADEQ_COEF_LEN * sizeof(LFract)   , FALSE, NULL,
00088  ecomem_CLASS_INTERNAL, fm_LOG2ALIGN, DPU_TREC_OUT_LEN * sizeof(Fract)     , FALSE, NULL,
00089  ecomem_CLASS_INTERNAL, fm_LOG2ALIGN, DPU_TREC_DELAY_LEN * sizeof(Fract)   , FALSE, NULL,
00090  ecomem_CLASS_INTERNAL, fm_LOG2ALIGN, DPU_CDEC_DELAY_STATES * sizeof(Fract), FALSE, NULL,
00091  ecomem_CLASS_INTERNAL, fm_LOG2ALIGN, DPU_CDEC_DELAY_STATES * sizeof(Fract), FALSE, NULL,
00092  ecomem_CLASS_INTERNAL, fm_LOG2ALIGN, DPU_CDEC_VIT_DELAY * sizeof(path_t)  , FALSE, NULL
00093  #else
00094  /* class,   log2align, size,                                 volat,  base */
00095  ecomem_CLASS_EXTERNAL, 0, SHAP_MAX_M * sizeof(Fract)           , FALSE, NULL,
00096  ecomem_CLASS_EXTERNAL, 0, FM_MAX_DATA_PER_FRAME * sizeof(tint) , FALSE, NULL,
00097  ecomem_CLASS_EXTERNAL, 0, FM_MAX_DATA_PER_FRAME * sizeof(tint) , FALSE, NULL,
00098  ecomem_CLASS_EXTERNAL, 0, 1                                    , FALSE, NULL,
00099  ecomem_CLASS_EXTERNAL, 0, 1                                    , FALSE, NULL,
00100  ecomem_CLASS_EXTERNAL, 0, FM_MAX_DATA_PER_FRAME * sizeof(tint) , FALSE, NULL,
00101  ecomem_CLASS_EXTERNAL, 0, FM_MAX_DATA_PER_FRAME * sizeof(tint) , FALSE, NULL,
00102  ecomem_CLASS_INTERNAL, 0, DPU_MAX_M * sizeof(Fract)            , FALSE, NULL,
00103  ecomem_CLASS_INTERNAL, 0, SHAP_MAX_M * sizeof(Fract)           , FALSE, NULL,
00104  ecomem_CLASS_INTERNAL, 1, sizeof(dpuInst_t)                    , FALSE, NULL,
00105  ecomem_CLASS_INTERNAL, 0, DPU_MAX_M * sizeof(Fract)            , FALSE, NULL,
00106  ecomem_CLASS_INTERNAL, 0, DPU_HILB_LEN * sizeof(Fract)         , FALSE, NULL,
00107  ecomem_CLASS_INTERNAL, 0, DPU_ADEQ_DL_LEN  * sizeof(Fract)     , FALSE, NULL,
00108  ecomem_CLASS_INTERNAL, 0, DPU_ADEQ_DL_LEN  * sizeof(Fract)     , FALSE, NULL,
00109  ecomem_CLASS_INTERNAL, 1, DPU_ADEQ_COEF_LEN * sizeof(LFract)   , FALSE, NULL,
00110  ecomem_CLASS_INTERNAL, 1, DPU_ADEQ_COEF_LEN * sizeof(LFract)   , FALSE, NULL,
00111  ecomem_CLASS_INTERNAL, 0, DPU_TREC_OUT_LEN * sizeof(Fract)     , FALSE, NULL,
00112  ecomem_CLASS_INTERNAL, 0, DPU_TREC_DELAY_LEN * sizeof(Fract)   , FALSE, NULL,
00113  ecomem_CLASS_INTERNAL, 0, DPU_CDEC_DELAY_STATES * sizeof(Fract), FALSE, NULL,
00114  ecomem_CLASS_INTERNAL, 0, DPU_CDEC_DELAY_STATES * sizeof(Fract), FALSE, NULL,
00115  ecomem_CLASS_INTERNAL, 1, DPU_CDEC_VIT_DELAY * sizeof(path_t)  , FALSE, NULL,
00116  ecomem_CLASS_EXTERNAL, 0, sizeof(fmInst_t)                     , FALSE, NULL,
00117  ecomem_CLASS_EXTERNAL, 0, FM_DATA_BUF_SIZE_WORDS * sizeof(tword) , FALSE, NULL
00118  #endif
00119  };
00120
00121 /*******************************************************************************
00122 * FUNCTION PURPOSE:  Obtains memory requirements for an instance of FM
00123 ********************************************************************************
00124 * DESCRIPTION: Obtains memory requirements for an FM instance (class, alignment,
00125 * size, etc..). Memory buffer description as defined in ecomem.h is used for
00126 * buffer description.  Vector of memory buffer descriptions that is returned in
00127 * bufs must not be changed by external software.
00128 *
00129 *   tint fmGetSizes (
00130 *   tint                 *nbufs,   - a pointer to a memory address where the
00131 *                                    number of buffers used is stored
00132 *   const ecomemBuffer_t    **bufs)   - a pointer to memory buffer description
00133 *
00134 *   RETURN VALUES: fm_NOERR
00135 *
00136 *******************************************************************************/
00137 tint fmGetSizes (tint *nbufs, const ecomemBuffer_t **bufs)
00138 {
00139   *nbufs = FM_NBUF;     /* Number of buffers used */
00140   *bufs = &fmBufs[0];   /* Return pointer to requested memory information */
00141   return(fm_NOERR);
00142
00143 } /* fmGetSizes */
00144
00145 /*******************************************************************************
00146 * FUNCTION PURPOSE: Create an instance of FM
00147 ********************************************************************************
00148 * DESCRIPTION: Create an an instance of FM and initialize its memory buffers.
00149 *
00150 * tint fmNew(
00151 *   void            **fmInst,    - an address of memory location that will
00152 *                                   receive a pointer to instance structure
00153 *   tint            nbufs,        - number of buffers used
00154 *   ecomemBuffer_t     *bufs,        - a vector of buffer descriptors
00155 *   fmNewConfig_t  *cfg)         - a pointer to configuration structure
00156 *
00157 * Return values:  -1 = fm_NOMEMORY    - some buffers have base address NULL
00158 *                  0 = fm_NOERR       - success
00159 *                  1 = fm_ERROR       - invalid input parameters
00160 *
00161 *******************************************************************************/
00162 tint fmNew (void **fmInst, tint nbufs, ecomemBuffer_t *bufs, fmNewConfig_t *cfg)
00163 {
00164   tint i, ret;
00165   fmInst_t *inst;
00166   dpuNewCfg_t dpuNewCfg;
00167   ecomemBuffer_t *bufp;
00168   tint retval = fm_NOERR;
00169
00170   /* test instance pointer, must be NULL */
00171   if ((*fmInst != NULL) || (nbufs != FM_NBUF))
00172   {
00173     return(fm_ERROR);
00174   }
00175
00176   /* Check allocated buffer sizes (base address != NULL ?)   */
00177   for (i = 0, bufp = bufs; i < FM_NBUF; i++, bufp++)
00178   {
00179     if ((bufp->base == NULL) || (bufp->size < fmBufs[i].size))
00180     {
00181        retval = fm_NOMEMORY;
00182     }
00183   }
00184
00185   /* Return is insufficent memory allocated */
00186   if (retval != fm_NOERR)
00187   {
00188     return (retval);
00189   }
00190
00191   /* Extract FM Instance buffer */
00192   bufp = &bufs[FM_INSTANCE_BUFN];
00193   inst = (fmInst_t *) bufp->base;
00194
00195   /* Extract FM data buffer */
00196   bufp = &bufs[FM_DATA_BUFN];
00197   inst->FmData = (tword *) bufp->base;
00198   inst->FmDataWordSize = (tint) bufp->size;
00199
00200   /* Point instance FmFp data buffer to base of FM data buf (overlaid) */
00201   if (FM_FP_PKT_SIZE_WORDS < bufp->size)
00202     inst->FmFpData = inst->FmData;
00203   else
00204     return (fm_ERROR);
00205
00206   /* New DPU using existing DPU API */
00207   dpuNewCfg.ID = cfg->ID;
00208   dpuNewCfg.sizeCfg.max_data_per_frame = FM_MAX_DATA_PER_FRAME;
00209   dpuNewCfg.sizeCfg.max_samples_per_frame = 80; /* at 10ms, 80 samples */
00210
00211   inst->Dpu.TargetInst = NULL;
00212   ret = dpuNew (&inst->Dpu.TargetInst, DPU_NBUFS, bufs, &dpuNewCfg);
00213   if (ret != DPU_NOERR)
00214   {
00215      return (fm_ERROR);
00216   }
00217
00218   /* Initialize FM instance */
00219   inst->ID = cfg->ID;
00220
00221   /* set state to closed */
00222   inst->state = FM_CLOSED;
00223
00224   /* return module instance pointer */
00225   *fmInst = (void *) inst;
00226
00227   return(fm_NOERR);
00228 } /*  fmNew  */
00229
00230 /******************************************************************************
00231  * FUNCTION PURPOSE: Delete an instance of FM.
00232  ******************************************************************************
00233  * DESCRIPTION: Deletes an instance of FM.
00234  *
00235  * void fmDelete (
00236  *    void          **fmInst)  - an address of memory location that contains
00237  *                                a pointer to instance structure
00238  *
00239  *****************************************************************************/
00240 void fmDelete (void **fmInst)
00241 {
00242   fmInst_t *inst = (fmInst_t *) *fmInst;
00243
00244   if (inst->state != FM_CLOSED)
00245   {
00246     fmException (inst->ID, FM_EXC_DELETE);
00247   }
00248
00249   *fmInst = NULL;
00250
00251 } /* fmDelete  */
00252
00253 /******************************************************************************
00254  * FUNCTION PURPOSE: Opens an instance of FM.
00255  ******************************************************************************
00256  * DESCRIPTION: Starts FM module operation
00257  *
00258  * tint fmOpen (
00259  *    void            *fmInst,  -  a pointer to instance structure
00260  *    fmOpenConfig_t *cfg)      -  pointer to channel configuration info
00261  *
00262  * Return values:  fm_NOMEMORY    - some buffers have base address NULL
00263  *                 fm_NOERR       - success
00264  *                 fm_ERROR       - invalid input parameters
00265  *****************************************************************************/
00266 tint fmOpen (void *fmInst, fmOpenConfig_t *cfg)
00267 {
00268   dpuCfg_t dpuCfg;
00269   fmInst_t *inst = (fmInst_t *) fmInst;
00270
00271   /* If trying to open a non-closed FM instance, erturn an error */
00272   if (inst->state != FM_CLOSED)
00273      return (fm_ERROR);
00274
00275   /* pcm interface */
00276   inst->RxOutSpec.fmReceiveOut = cfg->RxOutSpec.fmReceiveOut;
00277   inst->RxOutSpec.TargetInst = cfg->RxOutSpec.TargetInst;
00278
00279   /* fp interface */
00280   inst->SendOutSpec.fmSendOut = cfg->SendOutSpec.fmSendOut;
00281   inst->SendOutSpec.TargetInst = cfg->SendOutSpec.TargetInst;
00282
00283 #ifndef NO_TONESUPP
00284   /* Initialize tone generation parameters */
00285   inst->FmToneState = (tuint) FM_TONE_ST_SIL;
00286   inst->FmTonePhase = 0;
00287   inst->FmToneCount = 0;
00288
00289   /* Initialize function pointer to tone detection control function */
00290   inst->ToneDetCtrl.ToneDetCtrl = cfg->ToneDetCtrl.ToneDetCtrl;
00291   inst->ToneDetCtrl.TargetInst  = cfg->ToneDetCtrl.TargetInst;
00292 #endif
00293
00294   /* dpu configuration */
00295   dpuCfg.frame         = 10;       /* 10 msec */
00296   dpuCfg.protocol      = DPU_FAX;
00297   dpuCfg.rx_cd_thr_set = cfg->rx_cd_thr_set;
00298   dpuCfg.tx_level      = cfg->tx_level;
00299   dpuCfg.TablePtr      = cfg->tablePtr;
00300   dpuCfg.DPUfeatureBitMap = cfg->FMfeatureBitMap;
00301
00302   dpuOpen (inst->Dpu.TargetInst, &dpuCfg);
00303
00304   /* fm variable initialization */
00305   inst->FmTaskRate              = 1; /* initialize the FM rate == 10 MS */
00306   inst->debugLvl                = cfg->debugLvl;
00307   inst->FmNewModemMode          = FALSE;
00308   inst->DataRate                = 0;
00309   inst->FmEcmMode               = FALSE;
00310   inst->fForceBadFCS            = FALSE;
00311   inst->TxFillByte              = 0;
00312   inst->fFmFpPacketizationMode  = cfg->fBufferData;
00313   if ((cfg->maxBytesToBuffer > FM_FP_PKT_SIZE_BYTES) ||(cfg->maxBytesToBuffer < 0))
00314   {
00315     return (fm_ERROR);
00316   }
00317   inst->maxBytesToBuffer        = cfg->maxBytesToBuffer;
00318   inst->DelayFlag               = FALSE;
00319
00320   /* Initialize command message FIFO */
00321   fmMsgFifoInit (inst);
00322
00323   /* Initialize DPU control structure */
00324   inst->Dpu.CtrlParam.element_2 = 0;
00325   inst->Dpu.CtrlParam.element_3 = inst->Dpu.DataBuf;
00326   inst->Dpu.CtrlParam.element_5 = 0;
00327   inst->Dpu.CtrlParam.Config    = 0x0000;
00328   inst->Dpu.CtrlParam.LineCond  = 0x0000;
00329
00330   /* Initialize state parameters */
00331   inst->FmState = FM_OFFLINE_STATE;
00332   inst->state = FM_OPEN;
00333
00334   /* Reset FM protocol statistics */
00335   memset ((void *) &inst->ProtoStats, 0, sizeof(fmProtoStats_t));
00336
00337   return (fm_NOERR);
00338 } /* fmOpen() */
00339
00340 /****************************************************************************
00341  * FUNCTION PURPOSE:   Close the current instance of FM
00342  ****************************************************************************
00343  * DESCRIPTION:   Close the current instance of FM. This function is
00344  *                called to end FM processing any more data. All messages
00345  *                and data passed to FM are ignored.
00346  *
00347  * PARAMETERS:    void *fmInst     Pointer to the FM instance structure
00348  *
00349  * RETURN:        void
00350  ***************************************************************************/
00351 void fmClose (void *fmInst)
00352 {
00353   fmInst_t *inst = (fmInst_t *) fmInst;
00354
00355   /* close DPU */
00356   dpuClose (inst->Dpu.TargetInst);
00357
00358   /* Set FM to CLOSED state */
00359   inst->state = FM_CLOSED;
00360
00361 } /* fmClose */
00362
00363 /****************************************************************************
00364  * FUNCTION PURPOSE:  Save the message passed to FM
00365  ****************************************************************************
00366  * DESCRIPTION:   This function is called to post a message to FM. The
00367  *                message is copied into the message FIFO if it is not full
00368  *
00369  * PARAMETERS:    void *fmInst        Pointer to the FM instance structure
00370  *                iffaxFpFmMsg_t *msg Pointer to the message passed to the FM
00371  *
00372  * RETURN:        iffax_FM_CMD_ACCEPTED     if the message is copied into message FIFO
00373  *                iffax_FM_CMD_NOT_ACCEPTED if the message is not copied into the
00374  *                                          message FIFO because the FIFO is full
00375  *                iffax_FM_CMD_ERROR        if message is not copied because FM
00376  *                                          is closed or invalid message ID
00377  ***************************************************************************/
00378 tint fmReceiveIn (void *fmInst, void *message)
00379 {
00380   iffaxFpFmMsg_t *NewMsg = (iffaxFpFmMsg_t *) message;
00381   fmInst_t *inst = (fmInst_t *) fmInst;
00382
00383   if ((inst->state == FM_CLOSED) || (NewMsg->MsgId >= iffax_FP_FM_COUNT))
00384   {
00385     return (iffax_FM_CMD_ERROR);
00386   }
00387
00388   if (fmMsgFifoPush(inst, NewMsg) == TRUE)
00389   {
00390     return (iffax_FM_CMD_ACCEPTED);
00391   }
00392
00393   return (iffax_FM_CMD_NOT_ACCEPTED);
00394
00395 } /* fmReceiveIn */
00396
00397 static inline fmTablePtrs_t* fmGetTablePtr (void)
00398 {
00399   return (fmContext.tablePtr);
00400 }
00401
00402 static inline void fmSetTablePtr (fmTablePtrs_t *tablePtr)
00403 {
00404   fmContext.tablePtr = tablePtr;
00405 }
00406
00407 /****************************************************************************
00408  * FUNCTION PURPOSE:  This function processes a segment of pcm samples and
00409  *                    implements the state machine for FM
00410  ****************************************************************************
00411  * DESCRIPTION:   This function implements the state machine of FM. It
00412  *                performs various functions.
00413  *
00414  *                It updates time which is used to implement delay and is part
00415  *                of the messages passed to the Fax Protocol Unit.
00416  *
00417  *                The FM processes PCM samples received based on the state it
00418  *                is in. The Processing in various states is done by calling
00419  *                the appropriate function. The FM sends zeroes (silence) or
00420  *                CED/CNG tone when receiving data or when it is in OFFLINE mode.
00421  *                During TX mode we ignore the PCM samples and do not process
00422  *                them since the modem is half duplex. The functions in each
00423  *                state process data and check the message FIFO for new messages.
00424  *                If a message requires change of modem mode, the
00425  *                inst->FmNewModemMode variable is set to TRUE by the state
00426  *                processing function. The fmModeChange() function is called
00427  *                to change the modem mode to change the modem mode
00428  *
00429  * PARAMETERS:    void *fmInst     Pointer to the FM instance structure
00430  *                linSample *send_data
00431  *                                  Pointer to an array of PCM samples
00432  * RETURN:        void
00433  ***************************************************************************/
00434 void fmSendIn (void *fmInst, linSample *send_data)
00435 {
00436   tuint TempFmState;
00437   fmInst_t *inst = (fmInst_t *) fmInst;
00438   dpuInst_t *dpuInst = (dpuInst_t*)(inst->Dpu.TargetInst);
00439   fmTablePtrs_t *prevTablePtr;
00440
00441   /* return if fm is closed */
00442   if (inst->state == FM_CLOSED)
00443     return;
00444
00445   /* Obtain the current table pointer from fmContext */
00446   prevTablePtr = fmGetTablePtr();
00447
00448   /* Set the table pointer in fmContext from the instance */
00449   fmSetTablePtr (dpuInst->TablePtr);
00450
00451   /* initialize the temporary state variable */
00452   TempFmState = inst->FmState;
00453
00454   /* call appropriate function based on the state machine */
00455   switch (inst->FmState)
00456   {
00457   case FM_OFFLINE_STATE:
00458     fmSendTxData (inst);      /* Send zeroes/tone to the modem since we're  */
00459     fmStateOffline (inst);    /* not transmitting anything at this time     */
00460     break;
00461
00462   case FM_HS_RX_STATE:
00463   case FM_LS_RX_STATE:
00464     fmSendTxData (inst);      /* Send zeroes/tone to the modem */
00465     fmDpuProcessDataRx (inst,send_data);
00466     fmStateRx (inst);
00467     break;
00468
00469   case FM_HS_TX_STATE_TRAINING:
00470     fmStateTxHsTraining (inst);
00471     fmDpuProcessDataTx (inst);
00472     break;
00473
00474   case FM_HS_TX_STATE_DATA:
00475     fmStateTxHsData (inst);
00476     fmDpuProcessDataTx (inst);
00477     break;
00478
00479   case FM_HS_TX_STATE_PRE_OFF:
00480     fmStateTxHsPreOff (inst);
00481     fmDpuProcessDataTx (inst);
00482     break;
00483
00484   case FM_LS_TX_STATE_FLAG:
00485     fmStateTxLsFlag (inst);
00486     fmDpuProcessDataTx (inst);
00487     break;
00488
00489   case FM_LS_TX_STATE_DATA:
00490     fmStateTxLsData (inst);
00491     fmDpuProcessDataTx (inst);
00492     break;
00493
00494   case FM_HS_TX_STATE_ECM:
00495     fmStateTxHsEcm (inst);
00496     fmDpuProcessDataTx (inst);
00497     break;
00498   }
00499
00500   /* check if we need to change the modem mode */
00501   if (inst->FmNewModemMode == TRUE)
00502   {
00503     /* configure for the new mode */
00504     fmModeChange (inst);
00505
00506     /* reset the new state flag */
00507     inst->FmNewModemMode = FALSE;
00508   }
00509
00510   /* send a trace message if we have changed states */
00511   if (TempFmState != inst->FmState)
00512   {
00513     fmDebugTrace (inst,(tuint)FM_TRC_DBG_LVL_2,(tuint)FM_TRC_NEW_STATE,(tuint)(inst->FmState));
00514   }
00515
00516   /* Retore the previous table pointer */
00517   fmSetTablePtr (prevTablePtr);
00518
00519
00520 }  /* fmSendIn */
00521
00522 /****************************************************************************
00523  * FUNCTION PURPOSE:   Gather fax modem statistics
00524  ****************************************************************************
00525  * DESCRIPTION:   Passes call to fmStats to function dpuStats().
00526  *
00527  * PARAMETERS:    void *fmInst        -- Pointer to FM instance
00528  *                tbool freset        -- Whether to reset stats or not
00529  *                fmStats_t *stats    -- Pointer to FM stats type
00530  *
00531  * RETURN:        void
00532  ***************************************************************************/
00533 void fmStats (void *fmInst, tbool freset, fmStatsReport_t *stats)
00534 {
00535   fmInst_t  *inst   = (fmInst_t *) fmInst;
00536   dpuInst_t *dpuinst = (dpuInst_t*) (inst->Dpu.TargetInst);
00537
00538   dpuStatus ((void*) dpuinst, &(stats->fmSigQStats));
00539
00540   /* copy the FM proto stats information from the instance */
00541   stats->fmProtoStats = inst->ProtoStats;
00542   /* reset the FM proto stats if required (note DPU stats are
00543      reset within DPU itself on dpuOpen - they are not reset
00544      when queried since they are continuously updated during
00545      fax processing */
00546   if (freset)
00547   {
00548     memset ((void *) &inst->ProtoStats, 0, sizeof(fmProtoStats_t));
00549   }
00550
00551 } /* fmStats */
00552
00553 #ifndef NO_TONESUPP
00554 /******************************************************************************
00555 * FUNCTION PURPOSE:  Tone detection indication from external tone detector unit
00556 *******************************************************************************
00557 * DESCRIPTION:  A tone detection indication has been received from the external
00558 *               tone detector unit.  Notify FRP of the event along with the
00559 *               detected tone ID
00560 *
00561 * PARAMETERS:   void  *fmInst        - Pointer to the FM instance structure
00562 *               tuint toneID         - ID of tone detected
00563 *               tuint v8CallFunction - V.8 call function
00564 *               tuint v8ModMode      - V.8 modulation mode
00565 *
00566 * RETURN:       void
00567 *
00568 ******************************************************************************/
00569 void fmToneDetect (void *fmInst, tuint toneID, tuint v8CallFunction, tuint v8ModMode)
00570 {
00571    fmInst_t *inst = (fmInst_t *)fmInst;
00572    iffaxFmFpMsg_t FpMsg;  /* Message to FRP */
00573
00574    switch (toneID)
00575    {
00576       case iffax_TONE_CNG:
00577       case iffax_TONE_CED:
00578       case iffax_TONE_ANSAM:
00579          /* Send tone detect message to FRP */
00580          FpMsg.MsgId = iffax_FM_FP_TONE_DETECT;
00581          FpMsg.MsgBody.ToneDetect.ToneId = (iffaxToneID_e) toneID;
00582          break;
00583
00584       case iffax_TONE_V8_CM:
00585          FpMsg.MsgId = iffax_FM_FP_V8_CM_RECEIVED;
00586          FpMsg.MsgBody.V8Data.callFunction = v8CallFunction;
00587          FpMsg.MsgBody.V8Data.modMode = v8ModMode;
00588          break;
00589
00590       case iffax_TONE_V8_CI:
00591          FpMsg.MsgId = iffax_FM_FP_V8_CI_RECEIVED;
00592          FpMsg.MsgBody.V8Data.callFunction = v8CallFunction;
00593          break;
00594
00595       default:
00596          /* Ignore invalid tone ID */
00597          return;
00598    }
00599
00600    FpMsg.Timestamp = (fmContext.fmGetTime) ();
00601    (*inst->SendOutSpec.fmSendOut) (inst->SendOutSpec.TargetInst, &FpMsg);
00602
00603 } /* fmToneDetect() */
00604 #endif
00605
00606 /* nothing past this point */


FM: fm.h File Reference

fm.h File Reference

Detailed Description

Public Definitions for Fax Modem.

path /dsps_gtmas/ti/mas/fm/fm.h

============================================================================ Copyright (c) Texas Instruments Incorporated 2002-2007

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

Definition in file fm.h.

#include <ti/mas/types/types.h>
#include <ti/mas/util/debug.h>
#include <ti/mas/iface/iffax/iffax.h>
#include <ti/mas/fm/fmTablesTypes.h>
#include <ti/mas/util/ecomem.h>

Include dependency graph for fm.h:

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

Go to the source code of this file.

Data Structures

struct | fmReceiveOutSpec_t
Specification of fmReceiveOutSpec Object. More...
struct | fmSendOutSpec_t
Specification of fmSendOutSpec Object. More...
struct | fmToneDetCtrlSpec_t
Specification of fmToneDetSpec Object. More...
struct | v29Table_sPtrs_t
V.29 Cluster definitions. More...
struct | v27Table_sPtrs_t
V.27 Cluster definitions. More...
struct | v17Table_sPtrs_t
V.17 Cluster definitions. More...
struct | commonTable1_sPtrs_t
common Cluster-1 definitions More...
struct | fmTablePtrs_t
FM table Pointer structure. More...
struct | fmContext_t
FM context Structure. More...
struct | fmNewConfig_t
FM New data structure. More...
struct | fmOpenConfig_t
Open Configuration structure. More...
struct | fmSigQStats_t
Statistics of signal quality. More...
struct | fmProtoStats_t
Statistics of protocol. More...
struct | fmStatsReport_t
FM Statistics Data Structure. More...

Defines

#define | fm_ERROR (-1)
#define | fm_NOERR 0
#define | fm_NOMEMORY (-2)
#define | fm_DBG_LVL_0 0
#define | fm_DBG_LVL_1 1
#define | fm_DBG_LVL_2 2
#define | fm_INFOMATIONAL 0
#define | fm_EXCEPTION 2
#define | fm_HDLC_FLAG_PATTERN 0x7E
HDLC Flag pattern used for T.30 processing.
#define | fm_FEATURE_FLC 0x00
#define | fm_FEATURE_FLC_ENABLE_MASK 0x01
#define | GG_NUM_FM_ENC_TABLES 0
Definitions of FM table relocation constants.
#define | GG_NUM_FM_DEC_TABLES 0
#define | GG_NUM_FM_COMMON_TABLES 5
#define | GG_NUM_FM_TABLES
#define | fm_TABLE1_START &v29tables
#define | fm_TABLE2_START &v27tables
#define | fm_TABLE3_START &v17tables
#define | fm_TABLE4_START &c1tables
#define | fm_TABLE5_START &dpuTrecTableAsFcnPt[0]
#define | fm_TABLE1_L sizeof(v29Table_sPtrs_t)
#define | fm_TABLE2_L sizeof(v27Table_sPtrs_t)
#define | fm_TABLE3_L sizeof(v17Table_sPtrs_t)
#define | fm_TABLE4_L sizeof(commonTable1_sPtrs_t)
#define | fm_TABLE5_L sizeof(dpuTrecTableAsFcnPt)

Functions

ECO (Telogy Embedded Communication Object) APIs
tint | fmGetSizes (tint *nbufs, const ecomemBuffer_t **bufs)
This function obtains memory requirements for an instance of FM.
tint | fmNew (void **fmInst, tint nbufs, ecomemBuffer_t *bufs, fmNewConfig_t *cfg)
This function creates an instance of FM and initializes the memory buffer pointers in the instance.
Remarks:
Function fmNew() must be called before fmOpen()is called.

tint | fmOpen (void *fmInst, fmOpenConfig_t *cfg)
This function initializes and configures an FM instance.
void | fmClose (void *fmInst)
This function closes the FM instance identified by fmInst. It sets the state of FM to CLOSED.
void | fmDelete (void **fmInst)
This function deletes the FM instance identified by fmInst.
Remarks:
FM must be closed prior to being deleted.

void | fmStats (void *fmInst, tbool freset, fmStatsReport_t *stats)
Routine which obtains FM statistics.
void | fmSendIn (void *fmInst, linSample *pcm_samples)
This function passes a frame of PCM linear samples to the FM for processing.
tint | fmReceiveIn (void *fmInst, void *message)
This function passes a message from the FIU to the FM.
void | fmToneDetect (void *fmInst, tuint toneID, tuint v8CallFunction, tuint v8ModMode)
This function notifies FM that a tone detection indication has been received from an external tone detection module.

Variables

fmContext_t fmContext
Reference to FM context Structure.
const v29Table_sPtrs_t | v29tables
const v27Table_sPtrs_t | v27tables
const v17Table_sPtrs_t | v17tables
const commonTable1_sPtrs_t | c1tables
Fract | dpuTrecTableAsFcnPt [1107]


FM: fm.h Source File

fm.h

Go to the documentation of this file.
00001 #ifndef _FM_H_
00002 #define _FM_H_
00003
00004 /* ========================================================================== */
00028 /* @{ */
00029 /* System level header files */
00030 #include <ti/mas/types/types.h>
00031 #include <ti/mas/util/debug.h>
00032 #include <ti/mas/iface/iffax/iffax.h>
00033 #include <ti/mas/fm/fmTablesTypes.h>
00034
00035 /* Memory management definitions */
00036 #include <ti/mas/util/ecomem.h>
00037
00042 /* @{ */
00047 #define fm_ERROR    (-1)
00048
00052 #define fm_NOERR        0
00053
00057 #define fm_NOMEMORY     (-2)
00058 /* @} */ /* ingroup */
00059
00064 /* @{ */
00069 #define fm_DBG_LVL_0   0
00070
00075 #define fm_DBG_LVL_1 1
00076
00080 #define fm_DBG_LVL_2 2
00081
00082 /* @} */ /* ingroup */
00083
00084
00089 /* @{ */
00094 #define fm_INFOMATIONAL   0
00095
00099 #define fm_EXCEPTION     2
00100 /* @} */ /* ingroup */
00101
00105 #define fm_HDLC_FLAG_PATTERN 0x7E
00106
00125 /* @{ */
00126 #define fm_FEATURE_FLC                  0x00
00127 #define fm_FEATURE_FLC_ENABLE_MASK      0x01
00128 /* @} */ /* ingroup */
00129
00136 typedef struct {
00142   void (*fmReceiveOut) (void *TargetInst, void *PcmData);
00143   void *TargetInst;
00144 } fmReceiveOutSpec_t;
00145
00152 typedef struct {
00158   void (*fmSendOut) (void *TargetInst, void *message);
00159   void *TargetInst;
00160 } fmSendOutSpec_t;
00161
00169 typedef struct {
00176   void (*ToneDetCtrl) (void *TargetInst, tuint ControlCode);
00177   void  *TargetInst;
00178 } fmToneDetCtrlSpec_t;
00179
00189  typedef struct
00190 {
00191   Fract dpu_smap_V29_96_pt[32];
00192   Fract dpu_smap_V29_72_pt[16];
00193   dpu_shaping_bank_t shape_v29_pt[1];
00194   Fract dpu_slic_pt_V29_72_pt[32];
00195   Fract dpu_slic_pt_V29_96_pt[64];
00196   Fract dpu_denc_V29_9600_pt[8];
00197   Fract dpu_denc_V29_4800_pt[4] ;
00198   Fract dpu_ddec_V29_9600_pt[8];
00199   Fract dpu_ddec_V29_4800_pt[4];
00200   Fract dpu_slic_bits_V29_72_pt[16];
00201   Fract dpu_slic_bits_V29_96_pt[32];
00202   Fract dpu_slic_invmod_V29_96_pt[4];
00203   Fract bp_rx_v29_pt[43];
00204   Fract bp_hilb_v29_pt[43];
00205 } v29Table_sPtrs_t;
00206
00211 typedef struct
00212 {
00213   Fract dpu_smap_V27_48_pt[16];
00214   Fract dpu_smap_V27_24_pt[8];
00215   dpu_shaping_bank_t shape_v27_24_pt[1];
00216   dpu_shaping_bank_t shape_v27_48_pt[1];
00217   Fract dpu_slic_pt_V27_48_pt[16];
00218   Fract dpu_slic_pt_V27_24_pt[8];
00219   Fract dpu_slic_bits_V27_48_pt[8];
00220   Fract dpu_v27_count_pt[8];
00221   Fract bp_rx_v27_48_pt[45];
00222   Fract bp_hilb_v27_48_pt[45];
00223 } v27Table_sPtrs_t;
00224
00228 typedef struct
00229 {
00230   Fract dpu_smap_V17_120_pt[128];
00231   Fract dpu_smap_V17_144_pt[256];
00232   dpu_shaping_bank_t shape_v17_pt[1];
00233   Fract dpu_smap_V17_96_pt[64];
00234   Fract dpu_smap_V17_72_pt[32];
00235   Fract dpu_ddec_V17_AllRates_pt[16];
00236   Fract dpu_denc_V17_AllRates_pt[16];
00237   Fract dpu_slic_invmod_v17_pt[10][10];
00238   Fract dpu_PN_smap_table_v17_AllRates_pt[8];
00239   Fract dpu_bridge_smap_table_v17_AllRates_pt[8];
00240   Fract tanTableInFirstOctant_pt[10];
00241   Fract atan2ScaleFactors_pt[16];
00242   Fract bp_rx_v17_pt[43];
00243   Fract bp_hilb_v17_pt[43];
00244 } v17Table_sPtrs_t;
00245
00249 typedef struct
00250 {
00251   Fract dpuModConvTable_pt[11];
00252   Fract dpuModRateTable_pt[11];
00253   Fract dpuModTypeTable_pt[11];
00254   Fract hn_96_80_pt[5][42];
00255   Fract hn_72_80_pt[10][39];
00256   Fract hn_80_96_pt[6][38];
00257   cd_thr_t cd_thresholds_pt[3];
00258   Fract dpu_trec_fil_coef_pt[4][4];
00259   Fract bp_rx_v21_96_pt[23];
00260   Fract bp_hilb_v21_96_pt[23];
00261 } commonTable1_sPtrs_t;
00262
00266 typedef struct
00267 {
00268   v29Table_sPtrs_t     *v29TablePtrs;
00269   v27Table_sPtrs_t     *v27TablePtrs;
00270   v17Table_sPtrs_t     *v17TablePtrs;
00271   commonTable1_sPtrs_t *commonTable1Ptrs;
00272   Fract                *commonTable2Ptrs;
00273 } fmTablePtrs_t;
00274
00286 typedef struct {
00287   dbgInfo_t debugInfo;
00288   tulong (*fmGetTime) (void);
00289   fmTablePtrs_t *tablePtr;
00290 } fmContext_t;
00291
00295 extern fmContext_t fmContext;
00296
00300 typedef struct {
00301   tuint  ID;
00302 } fmNewConfig_t;
00303
00310 typedef struct {
00311   tuint               debugLvl;
00312   tint                tx_level;
00313   tint                rx_cd_thr_set;
00318   tbool               fBufferData;
00322   tint                maxBytesToBuffer;
00323   tuint               FMfeatureBitMap;
00324   fmToneDetCtrlSpec_t ToneDetCtrl;
00325   fmReceiveOutSpec_t  RxOutSpec;
00326   fmSendOutSpec_t     SendOutSpec;
00327   fmTablePtrs_t       *tablePtr;
00337 } fmOpenConfig_t;
00338
00342 typedef struct {
00343   tuint dpustatus;
00346   tint snr;
00347   tint carr_offset;
00349   tint percentBaudOffset;
00351   tint tx_level;
00352   tint rx_level;
00353   tint tx_rate;
00354   tint rx_rate;
00355   tuint fslAdjCnt;
00356 } fmSigQStats_t;
00357
00361 typedef struct {
00362   tuint  HDLC_Tx_Underflow;
00363   tuint  Non_HDLC_Tx_Underflow;
00364   tuint  Bad_CRC_From_Tele;
00365   tuint  Bad_CRC_To_Tele;
00366   tulong Good_CRC_From_Tele;
00367   tulong Good_CRC_To_Tele;
00368   tulong Non_HDLC_Rx_From_Tele;
00369   tulong Non_HDLC_Tx_To_Tele;
00370 } fmProtoStats_t;
00371
00372
00376 typedef struct {
00377   fmSigQStats_t  fmSigQStats;
00378   fmProtoStats_t fmProtoStats;
00379 } fmStatsReport_t;
00380
00385
00395 tint fmGetSizes  (tint *nbufs, const ecomemBuffer_t **bufs);
00396
00413 tint fmNew       (void **fmInst, tint nbufs, ecomemBuffer_t *bufs,
00414                   fmNewConfig_t *cfg);
00415
00427 tint fmOpen      (void *fmInst, fmOpenConfig_t *cfg);
00428
00435 void fmClose     (void *fmInst);
00436
00445 void fmDelete    (void **fmInst);
00446
00447
00456 void fmStats     (void *fmInst, tbool freset, fmStatsReport_t *stats);
00457
00467 void fmSendIn    (void *fmInst, linSample *pcm_samples);
00468
00481 tint fmReceiveIn (void *fmInst, void *message);
00482
00494 void fmToneDetect(void *fmInst, tuint toneID, tuint v8CallFunction, tuint v8ModMode);
00495  /* @name ECO APIs */
00497
00498
00506 #define GG_NUM_FM_ENC_TABLES    0
00507 #define GG_NUM_FM_DEC_TABLES    0
00508 #define GG_NUM_FM_COMMON_TABLES 5
00509
00510 #define GG_NUM_FM_TABLES (GG_NUM_FM_ENC_TABLES + \
00511                           GG_NUM_FM_DEC_TABLES + \
00512                           GG_NUM_FM_COMMON_TABLES)
00513
00515 extern const v29Table_sPtrs_t     v29tables;
00516 extern const v27Table_sPtrs_t     v27tables;
00517 extern const v17Table_sPtrs_t     v17tables;
00518 extern const commonTable1_sPtrs_t c1tables;
00519 extern Fract dpuTrecTableAsFcnPt[1107];
00520
00521 #define fm_TABLE1_START &v29tables
00522 #define fm_TABLE2_START &v27tables
00523 #define fm_TABLE3_START &v17tables
00524 #define fm_TABLE4_START &c1tables
00525 #define fm_TABLE5_START &dpuTrecTableAsFcnPt[0]
00526
00528 #define fm_TABLE1_L sizeof(v29Table_sPtrs_t)
00529 #define fm_TABLE2_L sizeof(v27Table_sPtrs_t)
00530 #define fm_TABLE3_L sizeof(v17Table_sPtrs_t)
00531 #define fm_TABLE4_L sizeof(commonTable1_sPtrs_t)
00532 #define fm_TABLE5_L sizeof(dpuTrecTableAsFcnPt)
00533
00534 /* @} */ /* ingroup */
00535
00536 #endif /* _FM_H_ */
00537 /* nothing past this point */


FM: fmTablesTypes.h File Reference

fmTablesTypes.h File Reference

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

Include dependency graph for fmTablesTypes.h:

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

Go to the source code of this file.

Data Structures

struct | dpu_trec_bank_t
struct | dpu_shaping_bank_t
struct | cd_thr_t

Defines

#define | DPU_TREC_LEN 27
#define | DPU_TREC_NUMBER 41
#define | SHAP_MAX_L 6
#define | SHAP_MAX_M_COEF 7

Define Documentation

#define DPU_TREC_LEN 27

Definition at line 25 of file fmTablesTypes.h.

Referenced by dpu_trec_interp(), v27RxSt1Init(), and v29RxSt1Init().

#define DPU_TREC_NUMBER 41

Definition at line 26 of file fmTablesTypes.h.

Referenced by dpu_trec_init().

#define SHAP_MAX_L 6

Definition at line 33 of file fmTablesTypes.h.

#define SHAP_MAX_M_COEF 7

Definition at line 34 of file fmTablesTypes.h.


FM: fmTablesTypes.h Source File

fmTablesTypes.h

Go to the documentation of this file.
00001 #ifndef _FMTABLESTYPES_H_
00002 #define _FMTABLESTYPES_H_
00003 /******************************************************************************
00004 *
00005 * FILE PURPOSE: Public Definitions of Table types for Fax Modem
00006 *
00007 *******************************************************************************
00008 * FILE NAME: fm.h
00009 *
00010 * DESCRIPTION:  Public Definitions for Fax Modem.
00011 *
00012 * NOTE: none
00013 *
00014 * REVISION HISTORY:
00015 *
00016 * DATE          AUTHOR        CHANGE DESCRIPTION
00017 * ====          ======        ==================
00018 * 15-Nov-02     ppatel        Created initial version
00019 *
00020 *
00021 * (C) Copyright 2002 Telogy Networks, Inc.
00022 ******************************************************************************/
00023 #include <ti/mas/types/types.h>
00024
00025 #define DPU_TREC_LEN         27
00026 #define DPU_TREC_NUMBER      41
00027
00028 typedef struct
00029 {
00030  Fract filters[ DPU_TREC_NUMBER][DPU_TREC_LEN];
00031 } dpu_trec_bank_t;
00032
00033 #define SHAP_MAX_L        6
00034 #define SHAP_MAX_M_COEF   7
00035
00036 typedef struct
00037 {
00038  Fract filters_re[SHAP_MAX_L][SHAP_MAX_M_COEF];
00039  Fract filters_im[SHAP_MAX_L][SHAP_MAX_M_COEF];
00040 } dpu_shaping_bank_t;
00041
00042 typedef struct {
00043   LFract high_thr;
00044   LFract low_thr;
00045 } cd_thr_t;
00046
00047 #endif /* _FMTABLESTYPES_H_ */
00048 /* Nothing past this point */


FM: fmcommon.c File Reference

fmcommon.c File Reference

#include <ti/mas/types/types.h>
#include <ti/mas/fract/fract.h>
#include <ti/mas/util/utl.h>
#include "fm.h"
#include "fmloc.h"
#include "fmtrace.h"

Include dependency graph for fmcommon.c:

Go to the source code of this file.

Functions

void | fmModeChange (fmInst_t *inst)
void | fmDpuProcessDataRx (fmInst_t *inst, linSample *send_data)
void | fmDpuProcessDataTx (fmInst_t *inst)
tint | fmCheckCarrierOff (fmInst_t *inst)
void | fmCheckTep (fmInst_t *inst)
void | fmCheckP2 (fmInst_t *inst)
tint | fmCheckPreamble (fmInst_t *inst)
tint | fmCheckCarrierOn (fmInst_t *inst)
void | fmSendTxData (fmInst_t *inst)
void | fmMsgFifoInit (fmInst_t *inst)
tint | fmMsgFifoPeek (fmInst_t *inst, tuint *dataCount, iffaxFpFmMsg_t *CurrMsg)
tint | fmMsgFifoPop (fmInst_t *inst, iffaxFpFmMsg_t *CurrMsg)
tint | fmMsgFifoPush (fmInst_t *inst, iffaxFpFmMsg_t *NewMsg)
tint | fmDelay (fmInst_t *inst, iffaxFpFmMsg_t *CurrMsg)
void | fmToneGenOn (fmInst_t *inst, iffaxToneID_e tone_id)
void | fmToneGenOff (fmInst_t *inst)
void | fmToneDetCtrl (fmInst_t *inst, tuint ControlCode)
void | fmCheckSignalPresent (fmInst_t *inst)
void | fmDebugTrace (fmInst_t *inst, tuint level, tuint trc_message, tuint data)
void | fmException (tuint ID, tuint code)
void | fmShipOutData (fmInst_t *inst, tword *data, tuint size)

Variables

const tint | fmSpeedTable [iffax_MODEM_MODE_COUNT]
const tint | fmDataRateTable [iffax_MODEM_MODE_COUNT]

Function Documentation

void fmModeChange ( fmInst_t * inst )

Definition at line 84 of file fmcommon.c.

References fm_ctrl_str::Config, dpuIf_t::CtrlParam, fmInst_s::DataRate, fmInst_s::Dpu, fm_ctrl_str::element_5, FM_DPU_CONFIG_MODEM_RX_MODE, FM_DPU_CONFIG_MODULATION_MASK, FM_DPU_CONFIG_RTS, FM_DPU_CONFIG_SETUP, FM_DPU_CONFIG_STRAIN, FM_DPU_CONFIG_TX_FILLBIT, FM_HS_RX_STATE, FM_HS_TX_STATE_ECM, FM_HS_TX_STATE_TRAINING, FM_LS_RX_STATE, FM_LS_TX_STATE_FLAG, FM_MFILLBIT, FM_OFFLINE_STATE, FM_STATUS_TEP_DETECT, FM_TRC_DBG_LVL_1, FM_TRC_DBG_LVL_2, FM_TRC_INVALID_MSG, FM_TRC_MODE_MSG_ID, FM_TRC_NEW_MODULATION, fmInst_s::fmCurrMode, fmDataRateTable, fmDebugTrace(), fmInst_s::FmEcmMode, fmMsgFifoPop(), fmSpeedTable, fmInst_s::FmState, fmStateRxInit(), fmStateTxHsInit(), fmStateTxLsInit(), fmInst_s::FmStatus, fmInst_s::FmTaskRate, fmToneGenOff(), and fmInst_s::TxFillByte.

Referenced by fmSendIn().

Here is the call graph for this function:

void fmDpuProcessDataRx | ( | fmInst_t * | inst,
 |  | linSample * | send_data
 | ) |  |

Definition at line 273 of file fmcommon.c.

References dpuIf_t::CtrlParam, fmInst_s::Dpu, fm_ctrl_str::element_0, FAX_MODEM(), and dpuIf_t::TargetInst.

Referenced by fmSendIn().

Here is the call graph for this function:

void fmDpuProcessDataTx ( fmInst_t * inst )

Definition at line 300 of file fmcommon.c.

References fmInst_s::BytesNotUsed, dpuIf_t::CtrlParam, dpuIf_t::DataBuf, fmInst_s::Dpu, fm_ctrl_str::element_0, fm_ctrl_str::element_5, FAX_MODEM(), FM_PCM_SAMPLE_SIZE, fmReceiveOutSpec_t::fmReceiveOut, fmInst_s::RxOutSpec, dpuIf_t::TargetInst, and fmReceiveOutSpec_t::TargetInst.

Referenced by fmSendIn().

Here is the call graph for this function:

tint fmCheckCarrierOff ( fmInst_t * inst )

Definition at line 344 of file fmcommon.c.

References dpuIf_t::CtrlParam, fmInst_s::Dpu, FM_CARRIER_LOSS_DET_TIME, FM_DPU_LINECOND_CARRIER_DETECT, FM_STATUS_CARRIER_ON, FM_TRC_CARRIER_LOSS, FM_TRC_DBG_LVL_2, fmContext, fmDebugTrace(), fmContext_t::fmGetTime, fmSendDataToFp(), fmSendOutSpec_t::fmSendOut, fmInst_s::FmState, fmInst_s::FmStatus, fm_ctrl_str::LineCond, fmInst_s::SendOutSpec, and fmSendOutSpec_t::TargetInst.

Referenced by fmStateRx().

Here is the call graph for this function:

void fmCheckTep ( fmInst_t * inst )

Definition at line 391 of file fmcommon.c.

References dpuIf_t::CtrlParam, fmInst_s::Dpu, FM_DPU_LINECOND_TEP_DETECT, FM_HS_RX_TEP_DET_TIME, FM_STATUS_TEP_DETECT, FM_TRC_DBG_LVL_2, FM_TRC_TEP_DETECT, fmContext, fmDebugTrace(), fmContext_t::fmGetTime, fmSendOutSpec_t::fmSendOut, fmInst_s::FmState, fmInst_s::FmStatus, fm_ctrl_str::LineCond, fmInst_s::SendOutSpec, and fmSendOutSpec_t::TargetInst.

Referenced by fmStateRx().

Here is the call graph for this function:

void fmCheckP2 ( fmInst_t * inst )

Definition at line 425 of file fmcommon.c.

References dpuIf_t::CtrlParam, fmInst_s::Dpu, FM_DPU_LINECOND_P2_DETECT, FM_HS_RX_P2_DET_TIME, FM_STATUS_P2_DETECT, FM_TRC_DBG_LVL_2, FM_TRC_P2_DETECT, fmContext, fmDebugTrace(), fmContext_t::fmGetTime, fmSendOutSpec_t::fmSendOut, fmInst_s::FmState, fmInst_s::FmStatus, fm_ctrl_str::LineCond, fmInst_s::SendOutSpec, and fmSendOutSpec_t::TargetInst.

Referenced by fmStateRx().

Here is the call graph for this function:

tint fmCheckPreamble ( fmInst_t * inst )

Definition at line 464 of file fmcommon.c.

References dpuIf_t::CtrlParam, fmInst_s::Dpu, FM_DPU_LINECOND_PREAMBLE_DETECT, FM_HS_RX_PREAM_DET_TIME, FM_LS_RX_PREAM_DET_TIME, FM_LS_RX_STATE, FM_STATUS_PREAMBLE_DETECT, FM_TRC_DBG_LVL_2, FM_TRC_PREAMBLE_DETECT, fmCheckCarrierOn(), fmContext, fmDebugTrace(), fmContext_t::fmGetTime, fmSendOutSpec_t::fmSendOut, fmInst_s::FmState, fmInst_s::FmStatus, fm_ctrl_str::LineCond, fmInst_s::SendOutSpec, and fmSendOutSpec_t::TargetInst.

Referenced by fmStateRx().

Here is the call graph for this function:

tint fmCheckCarrierOn ( fmInst_t * inst )

Definition at line 524 of file fmcommon.c.

References dpuIf_t::CtrlParam, fmInst_s::Dpu, FM_CARRIER_DET_TIME, FM_DPU_LINECOND_CARRIER_DETECT, FM_STATUS_CARRIER_OFF, FM_STATUS_CARRIER_ON, FM_TRC_CARRIER_DETECT, FM_TRC_DBG_LVL_2, fmContext, fmDebugTrace(), fmContext_t::fmGetTime, fmSendOutSpec_t::fmSendOut, fmInst_s::FmState, fmInst_s::FmStatus, fm_ctrl_str::LineCond, fmInst_s::SendOutSpec, and fmSendOutSpec_t::TargetInst.

Referenced by fmCheckPreamble(), and fmStateRx().

Here is the call graph for this function:

void fmSendTxData ( fmInst_t * inst )

Definition at line 565 of file fmcommon.c.

References FM_PCM_SAMPLE_SIZE, FM_TGEN_CNG_OFF_CNT, FM_TONE_ST_CNG_OFF, FM_TONE_ST_CNG_ON, FM_TONE_ST_SIL, fmInst_s::FmToneCount, and fmInst_s::FmToneState.

Referenced by fmSendIn().

void fmMsgFifoInit ( fmInst_t * inst )

Definition at line 644 of file fmcommon.c.

References fmDataBufInit(), fmInst_s::MsgFifoInCnt, and fmInst_s::MsgFifoOutCnt.

Referenced by fmOpen().

Here is the call graph for this function:

tint fmMsgFifoPeek | ( | fmInst_t * | inst,
 |  | tuint * | dataCount,
 |  | iffaxFpFmMsg_t * | CurrMsg
 | ) |  |

Definition at line 674 of file fmcommon.c.

References FM_TRC_DBG_LVL_2, FM_TRC_SYNC_ACK, fmContext, fmDataBufPeek(), fmDebugTrace(), fmDelay(), fmContext_t::fmGetTime, fmMsgFifoPop(), fmSendOutSpec_t::fmSendOut, fmToneDetCtrl(), fmToneGenOff(), fmToneGenOn(), fmInst_s::MsgFifoData, fmInst_s::MsgFifoInCnt, fmInst_s::MsgFifoOutCnt, fmInst_s::SendOutSpec, fmSendOutSpec_t::TargetInst, and fmInst_s::TxFillByte.

Referenced by fmRxMsgProcess(), fmStateTxHsData(), fmStateTxHsEcm(), fmStateTxHsTraining(), fmStateTxLsData(), and fmStateTxLsFlag().

Here is the call graph for this function:

tint fmMsgFifoPop | ( | fmInst_t * | inst,
 |  | iffaxFpFmMsg_t * | CurrMsg
 | ) |  |

Definition at line 798 of file fmcommon.c.

References FM_MSG_FIFO_SIZE, fmDataBufOut(), fmInst_s::MsgFifoData, fmInst_s::MsgFifoInCnt, and fmInst_s::MsgFifoOutCnt.

Referenced by fmModeChange(), fmMsgFifoPeek(), fmRxMsgProcess(), fmStateTxHsData(), fmStateTxHsEcm(), fmStateTxLsData(), and fmStateTxLsFlag().

Here is the call graph for this function:

tint fmMsgFifoPush | ( | fmInst_t * | inst,
 |  | iffaxFpFmMsg_t * | NewMsg
 | ) |  |

Definition at line 836 of file fmcommon.c.

References FM_MSG_FIFO_SIZE, fmDataBufIn(), fmInst_s::MsgFifoData, fmInst_s::MsgFifoInCnt, and fmInst_s::MsgFifoOutCnt.

Referenced by fmReceiveIn().

Here is the call graph for this function:

tint fmDelay | ( | fmInst_t * | inst,
 |  | iffaxFpFmMsg_t * | CurrMsg
 | ) |  |

Definition at line 906 of file fmcommon.c.

References fmInst_s::DelayFlag, fmInst_s::EndTime, fm_timestamp16_compare(), FM_TRC_DBG_LVL_2, FM_TRC_DELAY_BEGIN, fmContext, fmDebugTrace(), and fmContext_t::fmGetTime.

Referenced by fmMsgFifoPeek().

Here is the call graph for this function:

void fmToneGenOn | ( | fmInst_t * | inst,
 |  | iffaxToneID_e | tone_id
 | ) |  |

Definition at line 960 of file fmcommon.c.

References FM_TONE_ST_CED, FM_TONE_ST_CNG_ON, fmInst_s::FmToneCount, fmInst_s::FmTonePhase, and fmInst_s::FmToneState.

Referenced by fmMsgFifoPeek().

void fmToneGenOff ( fmInst_t * inst )

Definition at line 987 of file fmcommon.c.

References FM_TONE_ST_SIL, and fmInst_s::FmToneState.

Referenced by fmModeChange(), and fmMsgFifoPeek().

void fmToneDetCtrl | ( | fmInst_t * | inst,
 |  | tuint | ControlCode
 | ) |  |

Definition at line 1006 of file fmcommon.c.

References fmToneDetCtrlSpec_t::TargetInst, fmInst_s::ToneDetCtrl, and fmToneDetCtrlSpec_t::ToneDetCtrl.

Referenced by fmMsgFifoPeek().

void fmCheckSignalPresent ( fmInst_t * inst )

Definition at line 1052 of file fmcommon.c.

References dpuIf_t::CtrlParam, fmInst_s::Dpu, FM_DPU_LINECOND_SIGNAL_PRESENT, FM_STATUS_SIGNAL_DETECT, fmContext, fmContext_t::fmGetTime, fmSendOutSpec_t::fmSendOut, fmInst_s::FmStatus, fm_ctrl_str::LineCond, fmInst_s::SendOutSpec, and fmSendOutSpec_t::TargetInst.

Referenced by fmStateRx().

void fmDebugTrace | ( | fmInst_t * | inst,
 |  | tuint | level,
 |  | tuint | trc_message,
 |  | tuint | data
 | ) |  |

Definition at line 1100 of file fmcommon.c.

References fmContext_t::debugInfo, fm_INFOMATIONAL, fmContext, fmContext_t::fmGetTime, and fmInst_s::ID.

Referenced by fmCheckCarrierOff(), fmCheckCarrierOn(), fmCheckP2(), fmCheckPreamble(), fmCheckTep(), fmDelay(), fmModeChange(), fmMsgFifoPeek(), fmRxMsgProcess(), fmSendIn(), fmStateTxHsData(), fmStateTxHsEcm(), fmStateTxHsTraining(), fmStateTxLsData(), and fmStateTxLsFlag().

void fmException | ( | tuint | ID,
 |  | tuint | code
 | ) |  |

Definition at line 1120 of file fmcommon.c.

References fmContext_t::debugInfo, and fmContext.

Referenced by dpuOpen(), and fmDelete().

void fmShipOutData | ( | fmInst_t * | inst,
 |  | tword * | data,
 |  | tuint | size
 | ) |  |

Definition at line 1139 of file fmcommon.c.

References fmContext, fmContext_t::fmGetTime, fmSendOutSpec_t::fmSendOut, fmInst_s::SendOutSpec, and fmSendOutSpec_t::TargetInst.

Referenced by fmPacketizeData(), and fmSendDataToFp().

Variable Documentation

const tint fmSpeedTable[iffax_MODEM_MODE_COUNT]

Initial value:

{
    FM_MCONF_V21,
    FM_MCONF_V27_2400,
    FM_MCONF_V27_4800,
    FM_MCONF_V29_7200,
    FM_MCONF_V29_9600,
    FM_MCONF_V17_7200,
    FM_MCONF_V17_9600,
    FM_MCONF_V17_12000,
    FM_MCONF_V17_14400,
    FM_MCONF_V17_7200,
    FM_MCONF_V17_9600,
    FM_MCONF_V17_12000,
    FM_MCONF_V17_14400,
    FM_MCONF_V33_12000,
    FM_MCONF_V33_14400
}

Definition at line 27 of file fmcommon.c.

Referenced by fmModeChange().

const tint fmDataRateTable[iffax_MODEM_MODE_COUNT]

Initial value:

{
    FM_V21_DATA_RATE,
    FM_V27_2400_DATA_RATE,
    FM_V27_4800_DATA_RATE,
    FM_V29_7200_DATA_RATE,
    FM_V29_9600_DATA_RATE,
    FM_V17_7200_DATA_RATE,
    FM_V17_9600_DATA_RATE,
    FM_V17_12000_DATA_RATE,
    FM_V17_14400_DATA_RATE,
    FM_V17_7200_DATA_RATE,
    FM_V17_9600_DATA_RATE,
    FM_V17_12000_DATA_RATE,
    FM_V17_14400_DATA_RATE,
    FM_V33_12000_DATA_RATE,
    FM_V33_14400_DATA_RATE
}

Definition at line 53 of file fmcommon.c.

Referenced by fmModeChange(), and fmStateTxHsTraining().


FM: fmcommon.c Source File

fmcommon.c

Go to the documentation of this file.
00001 /*******************************************************************************
00002 * FILE PURPOSE:     FM functions common functions that are used by the
00003 *                   module in different states.
00004 *
00005 * FILE NAME:        fmcommon.c
00006 *
00007 * DESCRIPTION:    Processing of data and messages to and from the modem.
00008 *                   Processing messages received from the FP and passing the
00009 *                   data and fax signalling events to the FP module.
00010 *
00011 * (C) Copyright 2000, TELOGY Networks, Inc.
00012 *******************************************************************************/
00013 #include <ti/mas/types/types.h>
00014 #include <ti/mas/fract/fract.h>
00015 #include <ti/mas/util/utl.h>
00016 #include "fm.h"
00017 #include "fmloc.h"
00018 #include "fmtrace.h"
00019
00020 /*******************************************************************************
00021 * DATA DEFINITION:  "FM Mode" TO "DPU Mode" conversion table
00022 *
00023 * DESCRIPTION:      The table is used to store the values passed to the modem
00024 *                   to configure it into various modes
00025 *
00026 *******************************************************************************/
00027 const tint fmSpeedTable[iffax_MODEM_MODE_COUNT] =
00028 {
00029     FM_MCONF_V21,           /* iffax_MODEM_MODE_V21         */
00030     FM_MCONF_V27_2400,      /* iffax_MODEM_MODE_V27_2400    */
00031     FM_MCONF_V27_4800,      /* iffax_MODEM_MODE_V27_4800    */
00032     FM_MCONF_V29_7200,      /* iffax_MODEM_MODE_V29_7200    */
00033     FM_MCONF_V29_9600,      /* iffax_MODEM_MODE_V29_9600    */
00034     FM_MCONF_V17_7200,      /* iffax_MODEM_MODE_V17_S_7200  */
00035     FM_MCONF_V17_9600,      /* iffax_MODEM_MODE_V17_S_9600  */
00036     FM_MCONF_V17_12000,     /* iffax_MODEM_MODE_V17_S_12000 */
00037     FM_MCONF_V17_14400,     /* iffax_MODEM_MODE_V17_S_14400 */
00038     FM_MCONF_V17_7200,      /* iffax_MODEM_MODE_V17_L_7200  */
00039     FM_MCONF_V17_9600,      /* iffax_MODEM_MODE_V17_L_9600  */
00040     FM_MCONF_V17_12000,     /* iffax_MODEM_MODE_V17_L_12000 */
00041     FM_MCONF_V17_14400,     /* iffax_MODEM_MODE_V17_L_14400 */
00042     FM_MCONF_V33_12000,     /* iffax_MODEM_MODE_V33_12000   */
00043     FM_MCONF_V33_14400      /* iffax_MODEM_MODE_V33_14400   */
00044 };
00045
00046 /*******************************************************************************
00047 * DATA DEFINITION:  "FM Mode" to "DPU data rate" conversion table
00048 *
00049 * DESCRIPTION:      The table is used to store the number of bytes used every
00050 *                   20ms by various modulation types
00051 *
00052 *******************************************************************************/
00053 const tint fmDataRateTable[iffax_MODEM_MODE_COUNT] =
00054 {
00055     FM_V21_DATA_RATE,         /* iffax_MODEM_MODE_V21         */
00056     FM_V27_2400_DATA_RATE,    /* iffax_MODEM_MODE_V27_2400    */
00057     FM_V27_4800_DATA_RATE,    /* iffax_MODEM_MODE_V27_4800    */
00058     FM_V29_7200_DATA_RATE,    /* iffax_MODEM_MODE_V29_7200    */
00059     FM_V29_9600_DATA_RATE,    /* iffax_MODEM_MODE_V29_9600    */
00060     FM_V17_7200_DATA_RATE,    /* iffax_MODEM_MODE_V17_S_7200  */
00061     FM_V17_9600_DATA_RATE,    /* iffax_MODEM_MODE_V17_S_9600  */
00062     FM_V17_12000_DATA_RATE,   /* iffax_MODEM_MODE_V17_S_12000 */
00063     FM_V17_14400_DATA_RATE,   /* iffax_MODEM_MODE_V17_S_14400 */
00064     FM_V17_7200_DATA_RATE,    /* iffax_MODEM_MODE_V17_L_7200  */
00065     FM_V17_9600_DATA_RATE,    /* iffax_MODEM_MODE_V17_L_9600  */
00066     FM_V17_12000_DATA_RATE,   /* iffax_MODEM_MODE_V17_L_12000 */
00067     FM_V17_14400_DATA_RATE,   /* iffax_MODEM_MODE_V17_L_14400 */
00068     FM_V33_12000_DATA_RATE,   /* iffax_MODEM_MODE_V33_12000   */
00069     FM_V33_14400_DATA_RATE    /* iffax_MODEM_MODE_V33_14400   */
00070 };
00071
00072 /*******************************************************************************
00073 * FUNCTION PURPOSE:  Set modem to the appropriate mode
00074 *
00075 * DESCRIPTION:       Change the FM state according to the new mode message or
00076 *                    if no message is in the queue or if the message in the
00077 *                    queue, set the modem to low-speed receive mode.
00078 *
00079 * PARAMETERS:        fmInst_t *inst    - FM instance
00080 *
00081 * RETURNS:           void
00082 *
00083 *******************************************************************************/
00084 void fmModeChange (fmInst_t *inst)
00085 {
00086   iffaxFpFmMsg_t CurrMsg;
00087   tint ret_val;
00088
00089   /* set modem to low speed rx if no mode message is available */
00090   ret_val = fmMsgFifoPop (inst,&CurrMsg);
00091   if ((ret_val == FALSE) || (CurrMsg.MsgId != iffax_FP_FM_MODE))
00092   {
00093     CurrMsg.MsgBody.Mode.HdlcEnable = 0;
00094     CurrMsg.MsgBody.Mode.TEPEnable = 0;
00095     CurrMsg.MsgBody.Mode.TrainLengthShort = 0;
00096     CurrMsg.MsgBody.Mode.Rx = 0;
00097     CurrMsg.MsgBody.Mode.Tx = 0;
00098     CurrMsg.MsgBody.Mode.reserved = 0;
00099     CurrMsg.MsgBody.Mode.Modulation = 0;
00100   }
00101
00102   /* save the mode in the instance */
00103   inst->fmCurrMode = CurrMsg.MsgBody.Mode;
00104
00105   /* When mode change occurs -- ensure tone generation is off */
00106 #ifndef NO_TONESUPP
00107   fmToneGenOff (inst);
00108 #endif
00109
00110   /* set the ECM flag for HDLC decoding */
00111   if (CurrMsg.MsgBody.Mode.HdlcEnable)
00112   {
00113     inst->FmEcmMode = TRUE;
00114   }
00115   else
00116   {
00117     inst->FmEcmMode = FALSE;
00118   }
00119
00120   /* DataRate is the number of bytes recieved/transmitted to the modem driver */
00121   /* during one execution. The fmDataRateTable has data rates for 10ms task   */
00122   /* execution. If the task is executed at rate higher then 10ms, we multiply */
00123   /* value from the table with the task rate */
00124   inst->DataRate = (tuint) fmDataRateTable [CurrMsg.MsgBody.Mode.Modulation] *
00125                                                               inst->FmTaskRate;
00126   /* the number of bytes in V.21 are 27ms per byte. We can't set the rate to */
00127   /* that value since it is not a multiple of 10ms. This should work for     */
00128   /* 10,20 and 30ms task rates */
00129   if (CurrMsg.MsgBody.Mode.Modulation == iffax_MODEM_MODE_V21)
00130   {
00131      if (inst->FmTaskRate == 2)
00132      {
00133         inst->DataRate = 1;
00134      }
00135      else if (inst->FmTaskRate == 3)
00136      {
00137         inst->DataRate = 2;
00138      }
00139   }
00140
00141   /* process rx mode message */
00142   if ((CurrMsg.MsgBody.Mode.Rx) && (CurrMsg.MsgBody.Mode.Tx))
00143   /* invalid - both TX and RX flags set - move to OFFLINE state*/
00144   {
00145     inst->FmState = FM_OFFLINE_STATE;
00146   }
00147   else if (CurrMsg.MsgBody.Mode.Rx)
00148   /* RX mode - determine whether HS or LS */
00149   {
00150      if (CurrMsg.MsgBody.Mode.Modulation == iffax_MODEM_MODE_V21)
00151      /* LS */
00152      {
00153         inst->FmState = FM_LS_RX_STATE;
00154      }
00155      else
00156      /* HS */
00157      {
00158         inst->FmState = FM_HS_RX_STATE;
00159      }
00160
00161      fmStateRxInit (inst);
00162   }
00163   else if (CurrMsg.MsgBody.Mode.Tx)
00164   /* TX mode - determine whether HS or LS */
00165   {
00166      if (CurrMsg.MsgBody.Mode.Modulation == iffax_MODEM_MODE_V21)
00167      /* LS */
00168      {
00169         inst->FmState = FM_LS_TX_STATE_FLAG;
00170         fmStateTxLsInit (inst);
00171      }
00172      else
00173      /* HS */
00174      {
00175         if (CurrMsg.MsgBody.Mode.HdlcEnable)
00176         {
00177            inst->FmState = FM_HS_TX_STATE_ECM;
00178         }
00179         else
00180         {
00181            inst->FmState = FM_HS_TX_STATE_TRAINING;
00182         }
00183
00184         fmStateTxHsInit (inst);
00185      }
00186   }
00187   else
00188   /* Neither TX nor RX bit set - process mode off message */
00189   {
00190      inst->FmState = FM_OFFLINE_STATE;
00191   }
00192
00193   /* send a trace to report the new state */
00194   fmDebugTrace (inst, FM_TRC_DBG_LVL_2, FM_TRC_MODE_MSG_ID,
00195                       (tuint) CurrMsg.MsgBody.Mode.Modulation);
00196
00197   /* no configuration required for modem to go offline */
00198   if (inst->FmState == FM_OFFLINE_STATE)
00199   {
00200      return;
00201   }
00202
00203   /* set the data rate in the instance using look up table */
00204   if (CurrMsg.MsgBody.Mode.Modulation >= iffax_MODEM_MODE_COUNT)
00205   {
00206      fmDebugTrace(inst, (tuint)FM_TRC_DBG_LVL_1, (tuint)FM_TRC_INVALID_MSG, (tuint)(CurrMsg.MsgId));
00207
00208      inst->FmState = FM_OFFLINE_STATE;
00209      return;
00210   }
00211   else
00212     fmDebugTrace(inst, (tuint)FM_TRC_DBG_LVL_1, (tuint)FM_TRC_NEW_MODULATION, (tuint)(CurrMsg.MsgBody.Mode.Modulation));
00213
00214    /* ignore TEP in V.29 mode since it is not allowed */
00215   /* we set the TEP flag here that prevents us from reporting it later */
00216   if (CurrMsg.MsgBody.Mode.TEPEnable == 0)
00217   {
00218      inst->FmStatus |= FM_STATUS_TEP_DETECT;
00219   }
00220
00221   /* clear the Config Register of the fax modem */
00222   inst->Dpu.CtrlParam.Config = 0x0000;
00223
00224   /* set the modem to appropriate mode */
00225   if (CurrMsg.MsgBody.Mode.Rx)
00226   {
00227     inst->Dpu.CtrlParam.Config |= FM_DPU_CONFIG_MODEM_RX_MODE;
00228   }
00229   else    /* set modem for TX mode */
00230   {
00231     inst->Dpu.CtrlParam.Config |= FM_DPU_CONFIG_RTS;   /* set RTS if transmitting */
00232   }
00233
00234   /* set the modem configuration register to the new mode */
00235   inst->Dpu.CtrlParam.Config |= (fmSpeedTable [CurrMsg.MsgBody.Mode.Modulation]
00236                                  & FM_DPU_CONFIG_MODULATION_MASK);
00237
00238   /* set the modem fill bit field -- use the LSB of the current fill pattern */
00239   /* If the modem fill byte is non-zero, set the fill bit in the Config Reg */
00240   if (inst->TxFillByte & FM_MFILLBIT)
00241   {
00242      inst->Dpu.CtrlParam.Config |= FM_DPU_CONFIG_TX_FILLBIT;
00243   }
00244
00245   /* default is long training */
00246   inst->Dpu.CtrlParam.Config &= ~FM_DPU_CONFIG_STRAIN;
00247
00248   /* set to short training if required */
00249   if (CurrMsg.MsgBody.Mode.TrainLengthShort)
00250   {
00251      inst->Dpu.CtrlParam.Config |= FM_DPU_CONFIG_STRAIN;
00252   }
00253
00254  /* Set the SETUP bit in Config Register */
00255   inst->Dpu.CtrlParam.Config |= FM_DPU_CONFIG_SETUP;
00256
00257   /* initialize the bytes used by the dpu */
00258   inst->Dpu.CtrlParam.element_5 = 0;
00259
00260 } /* fmModeChange */
00261
00262 /*******************************************************************************
00263 * FUNCTION PURPOSE:  Call data modem to demodulate
00264 *
00265 * DESCRIPTION:       This function calls the data modem to process the PCM
00266 *                    samples received from the PCM interface unit.
00267 *
00268 * PARAMETERS:        void      *fmInst     Pointer to the FM instance structure
00269 *                    linSample *send_data  address of PCM samples
00270 *
00271 * RETURN:            void
00272 *******************************************************************************/
00273 void fmDpuProcessDataRx (fmInst_t *inst,linSample *send_data)
00274 {
00275   inst->Dpu.CtrlParam.element_0 = send_data; /* set pointer to new data */
00276   FAX_MODEM (&inst->Dpu.CtrlParam,inst->Dpu.TargetInst);
00277
00278 } /* fmDpuProcessDataRx */
00279
00280 /*******************************************************************************
00281 * FUNCTION PURPOSE:  Call data modem to modulate data
00282 *
00283 * DESCRIPTION:       The function passes data to the modem for modulation. The
00284 *                    data is modulated into PCM samples that are transmitted to
00285 *                    the PCM Interface Unit. The data modem is passed one byte
00286 *                    at a time during low speed data transmission. During high
00287 *                    speed data transmission, data equivalent to 20ms is passed
00288 *                    to the modem. The modem returns the number of bytes it has
00289 *                    used using inst->Dpu.CtrlParam.element_5. The bytes that
00290 *                    are not used by the modem are moved to the beginning of the
00291 *                    data buffer (inst->Dpu.DataBuf). The variable
00292 *                    inst->BytesNotUsed is set to the location of the last data
00293 *                    byte not used by the modem, so that the next time data is
00294 *                    not copied over the existing data
00295 *
00296 * PARAMETERS:        void *fmInst     Pointer to the FM instance structure
00297 *
00298 * RETURN:            void
00299 *******************************************************************************/
00300 void fmDpuProcessDataTx (fmInst_t *inst)
00301 {
00302   tint i,j;
00303   linSample data[FM_PCM_SAMPLE_SIZE];
00304
00305   /* initialize the pointer used by dpu */
00306   inst->Dpu.CtrlParam.element_0 = &data[0];
00307
00308   /* call dpu to process the data */
00309   FAX_MODEM (&inst->Dpu.CtrlParam,inst->Dpu.TargetInst);
00310
00311   /* transmit the page data to PCM interface unit */
00312   (*inst->RxOutSpec.fmReceiveOut) (inst->RxOutSpec.TargetInst, &data[0]);
00313
00314   /* moving the remaining data to the beginning location */
00315   if (inst->Dpu.CtrlParam.element_5 > 0)
00316   {
00317     /* (*inst->DebugTrace) (inst->pmodule,0xD4,inst->Dpu.DataBuf[0]); */
00318     i = inst->Dpu.CtrlParam.element_5;
00319     j = 0;
00320     while (i < inst->BytesNotUsed)
00321     {
00322       inst->Dpu.DataBuf[j++] = inst->Dpu.DataBuf[i++];
00323     }
00324
00325     /* check for the number of bytes used for the next time */
00326     inst->BytesNotUsed -= (tuint) inst->Dpu.CtrlParam.element_5;
00327   }
00328 } /* fmDpuProcessDataTx */
00329
00330 /*******************************************************************************
00331 * FUNCTION PURPOSE:  Look for carrier loss and report it to fax protocol
00332 *
00333 * DESCRIPTION:       This function checks if we had earlier detected a carrier
00334 *                    If so, it checks the data modem Command/Status structure
00335 *                    for carrier off. If the carrier is lost, it
00336 *                    is reported to the fax protocol and FM status
00337 *                    (inst->FmStatus) is updated
00338 *
00339 * PARAMETERS:        void *fmInst     Pointer to the FM instance structure
00340 *
00341 * RETURN:            TRUE (1)          if there is no carrier
00342 *                    FALSE (0)         if the carrier is on
00343 *******************************************************************************/
00344 tint fmCheckCarrierOff (fmInst_t *inst)
00345 {
00346   iffaxFmFpMsg_t tempMsg; /* Message used to alert FP if Carrier Loss is detected */
00347
00348   if ((inst->FmStatus & FM_STATUS_CARRIER_ON) == FM_STATUS_CARRIER_ON)
00349   {
00350     /* check if carrier is off */
00351     if (!(inst->Dpu.CtrlParam.LineCond & FM_DPU_LINECOND_CARRIER_DETECT))
00352     {
00353       inst->FmStatus &= (~FM_STATUS_CARRIER_ON); /* clear FM status register */
00354
00355       fmSendDataToFp (inst, NULL, 0, TRUE);
00356
00357       /* report carrier loss to fax protocol */
00358       tempMsg.MsgId      = iffax_FM_FP_CARRIER_LOSS;
00359       tempMsg.Timestamp  = ((tuint) (fmContext.fmGetTime)()) - FM_CARRIER_LOSS_DET_TIME;
00360       (*inst->SendOutSpec.fmSendOut) (inst->SendOutSpec.TargetInst,&tempMsg);
00361
00362       /* send a trace message to report carrier status */
00363       fmDebugTrace (inst,(tuint)FM_TRC_DBG_LVL_2,(tuint)FM_TRC_CARRIER_LOSS,(tuint)(inst->FmState));
00364
00365       return (TRUE);
00366     }
00367   }
00368   else
00369   {
00370     return (TRUE);
00371   }
00372
00373   return (FALSE);
00374
00375 } /* fmCheckCarrierOff */
00376
00377 /*******************************************************************************
00378 * FUNCTION PURPOSE:  Check for TEP and report it to fax protocol
00379 *
00380 * DESCRIPTION:       The function checks the FM status (inst->FmStatus) for
00381 *                    TEP. If TEP had not been detected, it checks the modem
00382 *                    Command/Status structure to check TEP detection and reports
00383 *                    it to the fax protocol unit. It reports a TEP loss as well
00384 *                    by checking the Command/Status structure once the TEP has
00385 *                    been detected.
00386 *
00387 * PARAMETERS:        void *fmInst     Pointer to the FM instance structure
00388 *
00389 * RETURN:            void
00390 *******************************************************************************/
00391 void fmCheckTep (fmInst_t *inst)
00392 {
00393   iffaxFmFpMsg_t tempMsg;
00394
00395   if (!(inst->FmStatus & FM_STATUS_TEP_DETECT))
00396   {
00397     /* check if tep is on */
00398     if (inst->Dpu.CtrlParam.LineCond & FM_DPU_LINECOND_TEP_DETECT)
00399     {
00400       inst->FmStatus |= FM_STATUS_TEP_DETECT;   /* update status */
00401
00402       tempMsg.MsgId = iffax_FM_FP_TEP_DETECT;
00403       tempMsg.Timestamp  = ((tuint) (fmContext.fmGetTime)()) -
00404                                                          FM_HS_RX_TEP_DET_TIME;
00405       (*inst->SendOutSpec.fmSendOut) (inst->SendOutSpec.TargetInst, &tempMsg);
00406
00407       /* send a trace message to report carrier status */
00408       fmDebugTrace (inst,(tuint)FM_TRC_DBG_LVL_2,(tuint)FM_TRC_TEP_DETECT,(tuint)(inst->FmState));
00409     }
00410   }
00411 } /* fmCheckTep */
00412
00413 /*******************************************************************************
00414 * FUNCTION PURPOSE:  Check for P2 and report it to fax protocol
00415 *
00416 * DESCRIPTION:       The function checks the FM status (inst->FmStatus) for
00417 *                    P2. If P2 had not been detected, it checks the modem
00418 *                    Command/Status structure to check TEP detection and reports
00419 *                    it to the fax protocol unit.
00420 *
00421 * PARAMETERS:        void *fmInst     Pointer to the FM instance structure
00422 *
00423 * RETURN:            void
00424 *******************************************************************************/
00425 void fmCheckP2 (fmInst_t *inst)
00426 {
00427   iffaxFmFpMsg_t tempMsg;
00428
00429   if (!(inst->FmStatus & FM_STATUS_P2_DETECT))
00430   {
00431     /* check if carrier is off */
00432     if (inst->Dpu.CtrlParam.LineCond & FM_DPU_LINECOND_P2_DETECT)
00433     {
00434       inst->FmStatus |= FM_STATUS_P2_DETECT;   /* update status */
00435
00436       tempMsg.MsgId = iffax_FM_FP_HS_TRAIN_DETECT;
00437       tempMsg.Timestamp  = ((tuint) (fmContext.fmGetTime)()) -
00438                                                           FM_HS_RX_P2_DET_TIME;
00439       (*inst->SendOutSpec.fmSendOut) (inst->SendOutSpec.TargetInst, &tempMsg);
00440
00441       /* send a trace message to report carrier status */
00442       fmDebugTrace (inst,(tuint)FM_TRC_DBG_LVL_2,(tuint)FM_TRC_P2_DETECT,(tuint)(inst->FmState));
00443     }
00444   }
00445 } /* fmCheckP2 */
00446
00447 /*******************************************************************************
00448 * FUNCTION PURPOSE:  Look for preamble and report it to fax protocol
00449 *
00450 * DESCRIPTION:       This function checks if we had earlier detected preamble
00451 *                    If so, it checks the data modem Command/Status structure
00452 *                    for preamble. If the preamble is detected, it is reported to
00453 *                    fax protocol and FM status (inst->FmStatus) is updated
00454 *
00455 *                    If the modem is in LS RX mode, it will not detect the
00456 *                    preamble. The function looks for carrier on in LS RX state
00457 *                    instead of preamble and reports preamble to the fax protocol
00458 *
00459 * PARAMETERS:        void *fmInst     Pointer to the FM instance structure
00460 *
00461 * RETURN:            TRUE (1)          if preamble is on
00462 *                    FALSE (0)         if preamble is off
00463 *******************************************************************************/
00464 tint fmCheckPreamble (fmInst_t *inst)
00465 {
00466   iffaxFmFpMsg_t tempMsg;
00467   tuint detection_time;
00468
00469   /* check for preamble and  report it to fax protocol */
00470   if (!(inst->FmStatus & FM_STATUS_PREAMBLE_DETECT))
00471   {
00472     /* check for preamble and check for carrier on in lsrx state since we */
00473     /* don't get a preamble detect in lsrx state */
00474     if ((inst->Dpu.CtrlParam.LineCond & FM_DPU_LINECOND_PREAMBLE_DETECT) ||
00475         ((inst->FmState == FM_LS_RX_STATE) && (fmCheckCarrierOn(inst) == TRUE)))
00476     {
00477       /* report preamble to fax protocol */
00478       inst->FmStatus |= FM_STATUS_PREAMBLE_DETECT;
00479       tempMsg.MsgId  = iffax_FM_FP_PREAMBLE_DETECT;
00480
00481       /* correction for the detection time is LS RX and HS RX state */
00482       if (inst->FmState == FM_LS_RX_STATE)
00483       {
00484         detection_time = FM_LS_RX_PREAM_DET_TIME;
00485     }
00486       else
00487       {
00488         detection_time = FM_HS_RX_PREAM_DET_TIME;
00489       }
00490
00491     tempMsg.Timestamp = ((tuint) (fmContext.fmGetTime) ()) - detection_time;
00492
00493       /* send the message to fax protocol */
00494       (*inst->SendOutSpec.fmSendOut) (inst->SendOutSpec.TargetInst,&tempMsg);
00495
00496       /* send a trace message to report carrier status */
00497       fmDebugTrace (inst,(tuint)FM_TRC_DBG_LVL_2,(tuint)FM_TRC_PREAMBLE_DETECT,(tuint)(inst->FmState));
00498       return (TRUE);
00499     }
00500     else
00501     {
00502       return (FALSE);
00503     }
00504   }
00505   else
00506   {
00507     return (TRUE);
00508   }
00509 } /* fmCheckPreamble */
00510
00511 /*******************************************************************************
00512 * FUNCTION PURPOSE:  Look for carrier and report it to fax protocol
00513 *
00514 * DESCRIPTION:       This function checks if the carrier is off. If so, it
00515 *                    checks the data modem Command/Status structure for carrier
00516 *                    If the carrier is detected, it is reported to the fax
00517 *                    protocol and FM status (inst->FmStatus) is updated
00518 *
00519 * PARAMETERS:        void *fmInst     Pointer to the FM instance structure
00520 *
00521 * RETURN:            TRUE (1)          if there is carrier
00522 *                    FALSE (0)         if the carrier is off
00523 *******************************************************************************/
00524 tint fmCheckCarrierOn (fmInst_t *inst)
00525 {
00526   iffaxFmFpMsg_t tempMsg;
00527
00528   /* check if carrier detect was off */
00529   if ((inst->FmStatus & FM_STATUS_CARRIER_ON) == FM_STATUS_CARRIER_OFF)
00530   {
00531     /* check if carrier is detected */
00532     if (inst->Dpu.CtrlParam.LineCond & FM_DPU_LINECOND_CARRIER_DETECT)
00533     {
00534       inst->FmStatus |= FM_STATUS_CARRIER_ON;  /* update status */
00535       /* report carrier loss to fax protocol */
00536       tempMsg.MsgId      = iffax_FM_FP_CARRIER_DETECT;
00537       tempMsg.Timestamp  = ((tuint) (fmContext.fmGetTime) ()) -
00538                                                            FM_CARRIER_DET_TIME;
00539       (*inst->SendOutSpec.fmSendOut) (inst->SendOutSpec.TargetInst,&tempMsg);
00540
00541       /* send a trace message to report carrier status */
00542       fmDebugTrace (inst,(tuint)FM_TRC_DBG_LVL_2,(tuint)FM_TRC_CARRIER_DETECT,(tuint)(inst->FmState));
00543       return (TRUE);
00544     }
00545   }
00546   else
00547   {
00548     return (TRUE);
00549   }
00550
00551   return (FALSE);
00552
00553 } /* fmCheckCarrierOn */
00554
00555 /*******************************************************************************
00556 * FUNCTION PURPOSE:  Generate silence/tones
00557 *
00558 * DESCRIPTION:       This function is called to send silence (zeroes) or to
00559 *                    generate tones (CED/CNG) to the PCM interface unit
00560 *
00561 * PARAMETERS:        void *fmInst     Pointer to the FM instance structure
00562 *
00563 * RETURN:            void
00564 *******************************************************************************/
00565 void fmSendTxData (fmInst_t *inst)
00566 {
00567   linSample PcmData[FM_PCM_SAMPLE_SIZE];
00568   Fract phase;
00569   tuint i;
00570
00571   switch (inst->FmToneState) {
00572   /* Generate silence */
00573   case FM_TONE_ST_SIL:
00574   case FM_TONE_ST_CNG_OFF:
00575     /* Generate linear silence samples */
00576     for (i=0; i<FM_PCM_SAMPLE_SIZE; i++) {
00577       PcmData[i] = 0;
00578     }
00579
00580     /* If CNG silence - check for cadence switch to ON */
00581     if (inst->FmToneState == (tuint) FM_TONE_ST_CNG_OFF) {
00582       inst->FmToneCount += FM_PCM_SAMPLE_SIZE;
00583       if (inst->FmToneCount >= FM_TGEN_CNG_OFF_CNT) {
00584         inst->FmToneState = FM_TONE_ST_CNG_ON;
00585         inst->FmToneCount = 0;
00586       }
00587     }
00588     break;
00589
00590   /* Generate CED tone */
00591   case FM_TONE_ST_CED:
00592     phase = inst->FmTonePhase;
00593     /* Generate CNG tone (2100 Hz) samples */
00594     for (i=0; i<FM_PCM_SAMPLE_SIZE; i++) {
00595       PcmData[i] = (linSample) frctMul ((Fract) FM_TGEN_TONE_AMP, 0, utlSin (frctAdjustQ
00596                                         (phase, FM_TGEN_PHASE_Q, 15)), 14, 0);
00597       /* Increment the phase and check for roll */
00598       phase += FM_TGEN_CED_INC;
00599       if (phase >= FM_TGEN_ONE_PHASE_Q) {
00600         phase -= FM_TGEN_TWO_PHASE_Q;
00601       }
00602     }
00603     inst->FmTonePhase = phase;
00604     break;
00605
00606   /* Generate CNG tone */
00607   case FM_TONE_ST_CNG_ON:
00608     phase = inst->FmTonePhase;
00609     /* Generate CNG tone (1100 Hz) samples */
00610     for (i=0; i<FM_PCM_SAMPLE_SIZE; i++) {
00611       PcmData[i] = (linSample) frctMul ((Fract) FM_TGEN_TONE_AMP, 0, utlSin (frctAdjustQ
00612                                         (phase, FM_TGEN_PHASE_Q, 15)), 14, 0);
00613       /* Increment the phase and check for roll */
00614       phase += FM_TGEN_CNG_INC;
00615       if (phase >= FM_TGEN_ONE_PHASE_Q) {
00616         phase -= FM_TGEN_TWO_PHASE_Q;
00617       }
00618     }
00619     inst->FmTonePhase = phase;
00620
00621     /* Check for cadence switch to OFF */
00622     inst->FmToneCount += FM_PCM_SAMPLE_SIZE;
00623     if (inst->FmToneCount >= FM_TGEN_CNG_ON_CNT) {
00624       inst->FmToneState = FM_TONE_ST_CNG_OFF;
00625       inst->FmToneCount = 0;
00626     }
00627     break;
00628   }
00629
00630   /* send buffer to PCM interface */
00631   (inst->RxOutSpec.fmReceiveOut) (inst->RxOutSpec.TargetInst, (void *) &PcmData[0]);
00632 } /* fmSendTxData */
00633
00634 /*******************************************************************************
00635 * FUNCTION PURPOSE:  Initialize FM message FIFO
00636 *
00637 * DESCRIPTION:
00638 *
00639 * PARAMETERS:        void *fmInst     Pointer to the FM instance structure
00640 *
00641 * RETURN:            void
00642 *
00643 *******************************************************************************/
00644 void fmMsgFifoInit (fmInst_t *inst)
00645 {
00646   inst->MsgFifoInCnt  =
00647   inst->MsgFifoOutCnt = 0;
00648
00649   fmDataBufInit (inst);
00650 } /* fmMsgFifoInit */
00651
00652 /*******************************************************************************
00653 * FUNCTION PURPOSE:  Peek at the message on top of FM message FIFO
00654 *
00655 * DESCRIPTION:       This function peeks at the next message in the FM message
00656 *                    FIFO and returns the message using the message pointer. The
00657 *                    function also processes some functions that do not need to
00658 *                    be passed to the calling function. These functions include
00659 *                    DELAY, SYNC_ACK and FILL_PATTERN. The function returns a
00660 *                    boolean signifying whether there is a msg to be processed
00661 *                    currently or not.
00662 *
00663 * PARAMETERS:        void *fmInst        Pointer to the FM instance structure
00664 *                    tuint *dataCount    Address of a location where this function
00665 *                                        returns the number of data packets
00666 *                    iffaxFpFmMsg_t* CurrMsg  Address of the location where this function
00667 *                                             returns the message on top of FIFO
00668 *
00669 * RETURN:            FALSE(0)            There is no message in the message FIFO
00670 *                                        or we are processing the DELAY message
00671 *                    TRUE(1)             There is a message in the FIFO and the
00672 *                                        pointer CurrMsg points to it
00673 *******************************************************************************/
00674 tint fmMsgFifoPeek (fmInst_t *inst, tuint *dataCount, iffaxFpFmMsg_t *CurrMsg)
00675 {
00676   iffaxFmFpMsg_t tempMsg;
00677   tint NewMsgFlag;    /* indicates if we need to look for another message */
00678   tint NewMsgProc;    /* indicates that we have a new message to return   */
00679   tuint current_time;
00680
00681   /* number of byte in the message buffer */
00682   *dataCount = fmDataBufPeek (inst);
00683
00684   /* initialize current time */
00685   current_time = (tuint) (fmContext.fmGetTime) ();
00686
00687   /* initialize the flags */
00688   NewMsgFlag = NewMsgProc = FALSE;
00689
00690   /* check if we have a message and process it */
00691   while (NewMsgFlag == FALSE)
00692   {
00693     if (inst->MsgFifoOutCnt != inst->MsgFifoInCnt)
00694     {
00695       switch (inst->MsgFifoData[inst->MsgFifoOutCnt].MsgId)
00696       {
00697       case iffax_FP_FM_DELAY:
00698         if (fmDelay(inst, &inst->MsgFifoData[inst->MsgFifoOutCnt]) == TRUE)
00699         {
00700           fmMsgFifoPop (inst, CurrMsg); /* delay message processed */
00701         }
00702         else /* wait - inserting delay */
00703         {
00704           NewMsgFlag = TRUE;
00705         }
00706         break;
00707
00708       case iffax_FP_FM_FILL_PATTERN:
00709         inst->TxFillByte =
00710            inst->MsgFifoData[inst->MsgFifoOutCnt].MsgBody.FillPattern.FillByte;
00711
00712         /* send a trace message to report carrier status */
00713         fmMsgFifoPop (inst, CurrMsg);
00714         break;
00715
00716       case iffax_FP_FM_SYNC:
00717         /* send ACK for the sync message */
00718         tempMsg.MsgId = iffax_FM_FP_SYNC_ACK;
00719         tempMsg.Timestamp = current_time;
00720         (*inst->SendOutSpec.fmSendOut) (inst->SendOutSpec.TargetInst, &tempMsg);
00721
00722         /* send a trace message to report carrier status */
00723         fmDebugTrace (inst, FM_TRC_DBG_LVL_2, FM_TRC_SYNC_ACK, 0);
00724         fmMsgFifoPop (inst, CurrMsg);
00725         break;
00726
00727 #ifndef NO_TONESUPP
00728       case iffax_FP_FM_TONE_ON:
00729         /* send tone on indication */
00730         fmToneGenOn (inst, inst->MsgFifoData[inst->MsgFifoOutCnt].MsgBody.ToneOn.Tone);
00731         fmMsgFifoPop (inst, CurrMsg);
00732         break;
00733
00734      case iffax_FP_FM_TONE_OFF:
00735         /* send tone off indication */
00736         fmToneGenOff (inst);
00737         fmMsgFifoPop (inst, CurrMsg);
00738         break;
00739
00740      case iffax_FP_FM_TONE_DET_CTRL:
00741         /* send tone detection control message */
00742         fmToneDetCtrl (inst,
00743                        inst->MsgFifoData[inst->MsgFifoOutCnt].MsgBody.ToneDetCtrl.ControlCode);
00744         fmMsgFifoPop (inst, CurrMsg);
00745
00746         /* send an acknowledgement if the message is for disabling tone detection */
00747         if (inst->MsgFifoData[inst->MsgFifoOutCnt].MsgBody.ToneDetCtrl.ControlCode == iffax_TONE_DETECT_CTRL_DISABLE)
00748         {
00749           tempMsg.MsgId = iffax_FM_FP_TONE_DET_DISABLE_ACK;
00750           tempMsg.Timestamp = current_time;
00751           (*inst->SendOutSpec.fmSendOut) (inst->SendOutSpec.TargetInst, &tempMsg);
00752         }
00753         break;
00754 #endif
00755
00756       default:
00757         NewMsgFlag = TRUE;
00758         NewMsgProc = TRUE;
00759         break;
00760       }
00761     }
00762     else
00763     {
00764       NewMsgFlag = TRUE;
00765     }
00766   }
00767
00768   /* check if we have a message in the fifo */
00769   if (NewMsgProc == TRUE)
00770   {
00771     /* save address of the present message */
00772     *CurrMsg = inst->MsgFifoData[inst->MsgFifoOutCnt];
00773
00774     return (TRUE);      /* we have a message */
00775   }
00776   else
00777   {
00778     return (FALSE);
00779   }
00780 }  /* fmMsgFifoPeek */
00781
00782 /*******************************************************************************
00783 * FUNCTION PURPOSE:  Pop a message from the FM message FIFO
00784 *
00785 * DESCRIPTION:       This function is used to remove a message from the message
00786 *                    FIFO. The message on top is returned using the CurrMsg
00787 *                    pointer
00788 *
00789 * PARAMETERS:        void *fmInst      Pointer to the FM instance structure
00790 *                    iffaxFpFmMsg_t*CurrMsg Address of the location where this function
00791 *                                           returns the message on top of FIFO
00792 *
00793 * RETURN:            FALSE(0)          There is no message in the message FIFO
00794 *                                      or we are processing the DELAY message
00795 *                    TRUE(1)           There is a message in the FIFO and the
00796 *                                      pointer CurrMsg points to it
00797 *******************************************************************************/
00798 tint fmMsgFifoPop (fmInst_t *inst, iffaxFpFmMsg_t *CurrMsg)
00799 {
00800   if (inst->MsgFifoOutCnt != inst->MsgFifoInCnt)
00801   {
00802     /* save address of the present message */
00803     *CurrMsg = inst->MsgFifoData[inst->MsgFifoOutCnt];
00804
00805     /* remove the data buffer, if any */
00806     if (CurrMsg->MsgId == iffax_FP_FM_DATA)
00807     {
00808       fmDataBufOut (inst);
00809       }
00810
00811     /* wrap around the circular buffer */
00812     if (++inst->MsgFifoOutCnt == FM_MSG_FIFO_SIZE)
00813     {
00814       inst->MsgFifoOutCnt = 0;
00815     }
00816
00817     return (TRUE);  /* we have a message */
00818   }
00819   else
00820   {
00821     return (FALSE);
00822   }
00823
00824 }  /* fmMsgFifoPop */
00825
00826 /*******************************************************************************
00827 * FUNCTION PURPOSE:  Push a message on the FM message FIFO
00828 *
00829 * DESCRIPTION:       This function puts a message in the FM message FIFO.
00830 *
00831 * PARAMETERS:        fmInst_t *fmInst         Pointer to the FM instance structure
00832 *                    iffaxFpFmMsg_t*NewMsg    Pointer to the new message posted to FM
00833 *
00834 * RETURN:            void
00835 *******************************************************************************/
00836 tint fmMsgFifoPush (fmInst_t *inst, iffaxFpFmMsg_t *NewMsg)
00837 {
00838   iffaxFpFmMsg_t *msgPtr;
00839   tuint          msgCount;
00840   tword          *bufAddr;
00841
00842   msgCount = inst->MsgFifoInCnt + 1;
00843
00844   if (msgCount == FM_MSG_FIFO_SIZE)
00845   {
00846     msgCount = 0;
00847   }
00848
00849   /* check if we have room in the message fifo */
00850   if (msgCount == inst->MsgFifoOutCnt)
00851   {
00852     return (FALSE);
00853   }
00854
00855   /* check if we have room in the data fifo */
00856   if (NewMsg->MsgId == iffax_FP_FM_DATA)
00857   {
00858     bufAddr = fmDataBufIn(inst,NewMsg->MsgBody.DataPayload.DataAddr,
00859                           NewMsg->MsgBody.DataPayload.numBytes);
00860
00861     if (bufAddr == NULL) /* data buffer does not have space avaiable */
00862     {
00863       return (FALSE);
00864     }
00865   }
00866
00867   /* add message to the fifo */
00868   msgPtr = &inst->MsgFifoData[inst->MsgFifoInCnt];
00869   *msgPtr = *NewMsg;
00870
00871   /* for data messages, initialize the data buffer address */
00872   if (NewMsg->MsgId == iffax_FP_FM_DATA)
00873   {
00874     msgPtr->MsgBody.DataPayload.DataAddr = bufAddr;
00875   }
00876
00877   /* wrap around the message fifo */
00878   if (++inst->MsgFifoInCnt == FM_MSG_FIFO_SIZE)
00879   {
00880     inst->MsgFifoInCnt = 0;
00881   }
00882
00883   return (TRUE);
00884 } /* fmMsgFifoPush */
00885
00886 /*******************************************************************************
00887 * FUNCTION PURPOSE:  Process delay message iffax_FP_FM_DELAY
00888 *
00889 * DESCRIPTION:  This function returns TRUE whenever the current time has exceeded
00890 *               the delay time, and FALSE otherwise.  It is meant to be called
00891 *               multiple times by the surrounding code, resulting in an overall
00892 *               fax modem message processing delay.  Note that this function calls
00893 *               the separate function fm_timestamp16_compare, so that the maximum
00894 *               allowable delay that can be correctly processed is 0x7fff (32767 ms).
00895 *
00896 * PARAMETERS:   fmInst_t *inst           Pointer to the FM instance structure
00897 *               iffaxFpFmMsg_t*CurrMsg   Pointer to the delay message
00898 *
00899 * NOTE:         The CurrMsg must point to a delay message when this function
00900 *               is called
00901 *
00902 * RETURNS:      TRUE(0):  The delay has been inserted according to the iffax_FP_FM_DELAY
00903 *                         message
00904 *               FALSE(1): Delay has not yet expired
00905 *******************************************************************************/
00906 tint fmDelay (fmInst_t *inst, iffaxFpFmMsg_t *CurrMsg)
00907 {
00908   tuint current_time;  /* Current system time as returned from call to fmGetTime() */
00909   tint return_val;     /* Return value from call to function fm_timestamp16_compare */
00910
00911   if (inst->DelayFlag == FALSE)
00912   /* First time through fmDelay for this delay message, so need to initialize */
00913   {
00914     inst->DelayFlag = TRUE; /* Set flag to prevent re-initialization during
00915                                subsequent calls to fmDelay for this delay msg */
00916
00917     /* Initialize current time */
00918     current_time = ((tuint) (fmContext.fmGetTime) ());
00919
00920     /* Determine time at which delay expires */
00921     inst->EndTime   = current_time + CurrMsg->MsgBody.Delay.DelayTime;
00922
00923     /* Send trace to notify beginning of delay message processing */
00924     fmDebugTrace (inst, FM_TRC_DBG_LVL_2, FM_TRC_DELAY_BEGIN, CurrMsg->MsgBody.Delay.DelayTime);
00925
00926     /* Delay has not yet expired */
00927     return (FALSE);
00928   }
00929
00930   /* Update the current time from the system time */
00931   current_time = ((tuint) (fmContext.fmGetTime) ());
00932
00933   return_val = fm_timestamp16_compare (current_time, inst->EndTime);
00934
00935   if (return_val >= 0)
00936   /* current_time has exceeded inst->EndTime - the delay has expired */
00937   {
00938     /* Send trace to notify end of delay message processing */
00939     /* (*inst->DebugTrace) (inst->pmodule,FM_TRC_DELAY_END,0); */
00940
00941     /* Clear flag for use by next delay message, and return TRUE */
00942     inst->DelayFlag = FALSE;
00943     return (TRUE);
00944   }
00945
00946   else
00947   /* delay not yet expired - still in process */
00948   {
00949      return (FALSE);
00950   }
00951
00952 } /* fmDelay */
00953
00954 #ifndef NO_TONESUPP
00955 /******************************************************************************
00956 * FUNCTION PURPOSE:  Tone on message processing - Starts generation of
00957 * specified tone.
00958 *
00959 ******************************************************************************/
00960 void fmToneGenOn (fmInst_t *inst, iffaxToneID_e tone_id)
00961 {
00962   switch (tone_id) {
00963     /* Generate CED tone */
00964     case iffax_TONE_CED:
00965       inst->FmToneState = (tuint) FM_TONE_ST_CED;
00966       inst->FmTonePhase = 0;
00967       break;
00968
00969     /* Generate CNG tone */
00970      case iffax_TONE_CNG:
00971       inst->FmToneState = (tuint) FM_TONE_ST_CNG_ON;
00972       inst->FmTonePhase = 0;
00973       inst->FmToneCount = 0;
00974       break;
00975
00976     /* Invalid tone - ignore */
00977     default:
00978       return;
00979   }
00980 } /* fmToneGenOn () */
00981
00982 /******************************************************************************
00983 * FUNCTION PURPOSE:  Tone off message processing - Stops generation of
00984 * any current tone.
00985 *
00986 ******************************************************************************/
00987 void fmToneGenOff (fmInst_t *inst)
00988 {
00989
00990   inst->FmToneState = (tuint) FM_TONE_ST_SIL;
00991
00992 } /* fmToneGenOff() */
00993
00994 /******************************************************************************
00995 * FUNCTION PURPOSE:  Tone detection control message processing
00996 *******************************************************************************
00997 * DESCRIPTION:  Callout to function that configures external tone detector unit
00998 *
00999 * PARAMETERS:   fmInst_t *fmInst    - Pointer to the FM instance structure
01000 *       tuint ControlCode   - one of two values:
01001 *                                        iffax_TONE_DETECT_CTRL_ENABLE  (1)
01002 *                                        iffax_TONE_DETECT_CTRL_DISABLE (0)
01003 * RETURN:       void
01004 *
01005 ******************************************************************************/
01006 void fmToneDetCtrl (fmInst_t *inst, tuint ControlCode)
01007 {
01008   /* only process tone detector enable and disable at this time */
01009   if ((ControlCode == iffax_TONE_DETECT_CTRL_ENABLE) ||
01010       (ControlCode == iffax_TONE_DETECT_CTRL_DISABLE))
01011   {
01012     /* enable or disable tone detection */
01013     (*inst->ToneDetCtrl.ToneDetCtrl) (inst->ToneDetCtrl.TargetInst,
01014                                       ControlCode);
01015   }
01016
01017   /* all other tone detect control codes are invalid and ignored */
01018   else
01019     return;
01020
01021 } /* fmToneDetCtrl() */
01022 #endif
01023
01024 /*******************************************************************************
01025 * FUNCTION PURPOSE:  Look for signal power and report it to fax protocol
01026 *
01027 * DESCRIPTION:       This function checks if we are currently detecting any power
01028 *                    on the telephony interface while in LS Rx mode.  It is not
01029 *                    intended to be a generic signal power detector, rather, it
01030 *                    is only intended to be used within the context of the LS Rx
01031 *                    mode of FM, in the cae where CD has not been asserted, to
01032 *                    see if there is any activity on the line.  This is a special
01033 *                    case where, for example, we may be seeing high speed data
01034 *                    but are in LS Rx mode.  It typically corresponds to the case
01035 *                    where HS training has failed on the fax modem's PCM
01036 *                    interface.
01037 *
01038 *                    If signal detection was not previosuly asserted (as shown
01039 *                    in FM status field), and signal detection occurs, then
01040 *                    send a message to FP that signal detect is present.
01041 *
01042 *                    If signal detection was previosuly asserted and signal
01043 *                    loss occurs, then send a message to FP that signal loss
01044 *                    has occured.
01045 *
01046 *                    Do nothing otherwise, as the line condition has not
01047 *                    changed.
01048 *
01049 * PARAMETERS:        void *fmInst      Pointer to the FM instance structure
01050 *
01051 *******************************************************************************/
01052 void fmCheckSignalPresent (fmInst_t *inst)
01053 {
01054   iffaxFmFpMsg_t tempMsg;
01055
01056   /* check if signal detect was previously false */
01057   if ((inst->FmStatus & FM_STATUS_SIGNAL_DETECT) != FM_STATUS_SIGNAL_DETECT)
01058   {
01059     /* check if signal was detected */
01060     if ((inst->Dpu.CtrlParam.LineCond & FM_DPU_LINECOND_SIGNAL_PRESENT) ==
01061          FM_DPU_LINECOND_SIGNAL_PRESENT)
01062     {
01063       /* set FM status sig detect bit */
01064       inst->FmStatus |= FM_STATUS_SIGNAL_DETECT;
01065
01066       /* report signal detected to fax protocol */
01067       tempMsg.MsgId               = iffax_FM_FP_SIGNAL_DETECT;
01068       tempMsg.Timestamp           = ((tuint) (fmContext.fmGetTime) ());
01069       (*inst->SendOutSpec.fmSendOut) (inst->SendOutSpec.TargetInst, &tempMsg);
01070     }
01071   }
01072   else /* signal detect must have been previously asserted */
01073   {
01074     /* check if signal loss was detected */
01075     if ((inst->Dpu.CtrlParam.LineCond & FM_DPU_LINECOND_SIGNAL_PRESENT) !=
01076          FM_DPU_LINECOND_SIGNAL_PRESENT)
01077     {
01078       /* clear FM status sig detect bit */
01079       inst->FmStatus &= ~FM_STATUS_SIGNAL_DETECT;
01080
01081       /* report signal loss to fax protocol */
01082       tempMsg.MsgId               = iffax_FM_FP_SIGNAL_LOSS;
01083       tempMsg.Timestamp           = ((tuint) (fmContext.fmGetTime) ());
01084       (*inst->SendOutSpec.fmSendOut) (inst->SendOutSpec.TargetInst, &tempMsg);
01085     }
01086   }
01087
01088 } /* fmCheckSignalPresent */
01089
01090 /******************************************************************************
01091 * FUNCTION PURPOSE:  Send a debug/exception trace to the system
01092 *
01093 * DESCRIPTION:       Level 0 - exception, level - 1 warning/error
01094 *                    Level 2 - informational
01095 *
01096 * PARAMETERS:        fmInst_t *inst    - FM instance
01097 *
01098 * RETURNS:           void
01099 ******************************************************************************/
01100 void fmDebugTrace (fmInst_t *inst, tuint level, tuint trc_message, tuint data)
01101 {
01102   tuint traceBuf[2];
01103
01104   if (level <= inst->debugLvl)
01105   {
01106      /* Else, if the message level exceeds the current debug level, trace
01107       event. */
01108      traceBuf[0] = data;
01109      traceBuf[1] = (tuint) (fmContext.fmGetTime) ();
01110      (*fmContext.debugInfo) ((void *)inst->ID,fm_INFOMATIONAL,trc_message,2,&traceBuf[0]);
01111   }
01112 } /* fmDebugTrace */
01113
01114 /******************************************************************************
01115  * FUNCTION PURPOSE: Exception function
01116  ******************************************************************************
01117  * DESCRIPTION: Relays a fatal exception through the global exception
01118  *              pointer.
01119  *****************************************************************************/
01120 void fmException (tuint ID, tuint code)
01121 {
01122    (*fmContext.debugInfo) ((void *)ID, dbg_EXCEPTION_FATAL, code, 0, NULL);
01123
01124 } /* fm_exception() */
01125
01126 /******************************************************************************
01127 * FUNCTION PURPOSE:  Configure data message and send it to FP
01128 *
01129 * DESCRIPTION:       This function accepts msg parameters as inputs, writes them
01130 *                    to a local message, then sends that message to FP.  Note that
01131 *                    *data must point to a packed data array.
01132 *
01133 * PARAMETERS:        fmInst_t *inst    - FM instance
01134 *                    tword *data       - pointer to data to send
01135 *                    tuint size        - size of msg payload in bytes
01136 *
01137 * RETURNS:           void
01138 ******************************************************************************/
01139 void fmShipOutData (fmInst_t *inst, tword *data, tuint size)
01140 {
01141    iffaxFmFpMsg_t TempMsg;
01142    TempMsg.MsgId = iffax_FM_FP_DATA;
01143    TempMsg.Timestamp = (tuint) ((fmContext.fmGetTime) () & 0xFFFFL);
01144    TempMsg.MsgBody.DataPayload.DataAddress = data;
01145    TempMsg.MsgBody.DataPayload.numBytes = (tint) size;
01146    (*inst->SendOutSpec.fmSendOut) (inst->SendOutSpec.TargetInst, &TempMsg);
01147 } /* fmShipOutData */
01148
01149 /* nothing beyond this line */


FM: fmloc.h File Reference

fmloc.h File Reference

#include <ti/mas/types/types.h>
#include <ti/mas/fract/fract.h>
#include <ti/mas/fm/fm.h>
#include <ti/mas/fm/src/fxmdpuif.h>
#include <stdlib.h>
#include <ti/mas/hdlc/hdlcrx.h>
#include <ti/mas/hdlc/hdlctx.h>

Include dependency graph for fmloc.h:

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

Go to the source code of this file.

Data Structures

struct | dpuIf_t
struct | fmInst_s

Defines

#define | FM_MSG_FIFO_SIZE 12
#define | FM_LS_TX_MIN_CLOSING_FLAGS 5
#define | FM_LS_TX_BYTE_DELAY 2
#define | FM_HS_TX_BYTE_DELAY 4
#define | FM_V21_FLAG 0x007E
#define | FM_PCM_SAMPLE_SIZE 80
#define | FM_DATA_BUF_SIZE_WORDS 200
#define | FM_MAX_DATA_PER_FRAME 40
#define | FM_FP_PKT_SIZE_WORDS 32
#define | FM_FP_PKT_SIZE_BYTES 64
#define | FM_STATUS_RESET_ALL 0x0000
#define | FM_STATUS_CARRIER_ON 0x0001
#define | FM_STATUS_CARRIER_OFF 0x0000
#define | FM_STATUS_PREAMBLE_DETECT 0x0002
#define | FM_STATUS_P2_DETECT 0x0004
#define | FM_STATUS_TEP_DETECT 0x0008
#define | FM_STATUS_TX_DPU_FLUSH 0x0010
#define | FM_STATUS_TX_DATA_FLAG 0x0020
#define | FM_STATUS_TX_DATA_END_FLAG 0x0040
#define | FM_STATUS_SIGNAL_DETECT 0x0080
#define | FM_V21_DATA_RATE 1
#define | FM_V27_2400_DATA_RATE 3
#define | FM_V27_4800_DATA_RATE 6
#define | FM_V29_7200_DATA_RATE 9
#define | FM_V29_9600_DATA_RATE 12
#define | FM_V17_7200_DATA_RATE 9
#define | FM_V17_9600_DATA_RATE 12
#define | FM_V17_12000_DATA_RATE 15
#define | FM_V17_14400_DATA_RATE 18
#define | FM_V33_12000_DATA_RATE 15
#define | FM_V33_14400_DATA_RATE 18
#define | FM_CARRIER_DET_TIME 0
#define | FM_CARRIER_LOSS_DET_TIME 0
#define | FM_LS_RX_PREAM_DET_TIME 0
#define | FM_HS_RX_PREAM_DET_TIME 200
#define | FM_HS_RX_P2_DET_TIME 30
#define | FM_HS_RX_TEP_DET_TIME 60
#define | FM_TGEN_CED_INC 4301
#define | FM_TGEN_CNG_INC 2253
#define | FM_TGEN_TONE_AMP 5193
#define | FM_TGEN_CNG_ON_CNT 4000
#define | FM_TGEN_CNG_OFF_CNT 24000
#define | FM_TGEN_PHASE_Q 13
#define | FM_TGEN_ONE_PHASE_Q frctAdjustQ (1,0,FM_TGEN_PHASE_Q)
#define | FM_TGEN_TWO_PHASE_Q frctAdjustQ (2,0,FM_TGEN_PHASE_Q)

Typedefs

typedef fmInst_s | fmInst_t

Enumerations

enum | fmState_e { FM_OPEN, FM_CLOSED }
enum fmProcState_e {
FM_OFFLINE_STATE, FM_HS_RX_STATE, FM_LS_RX_STATE, FM_LS_TX_STATE_FLAG,
FM_LS_TX_STATE_DATA, FM_LS_TX_STATE_FCS, FM_HS_TX_STATE_TRAINING, FM_HS_TX_STATE_DATA,
FM_HS_TX_STATE_PRE_OFF, FM_HS_TX_STATE_ECM
}
enum | fmEcmSt_e { FM_TX_ECM_FLAG, FM_TX_ECM_DATA, FM_TX_ECM_FRAME_COMP }
enum | fmToneSt_e { FM_TONE_ST_SIL, FM_TONE_ST_CED, FM_TONE_ST_CNG_ON, FM_TONE_ST_CNG_OFF }

Functions

void | fmModeChange (fmInst_t *inst)
void | fmDpuProcessDataRx (fmInst_t *inst, linSample *send_data)
void | fmDpuProcessDataTx (fmInst_t *inst)
tint | fmCheckCarrierOff (fmInst_t *inst)
void | fmCheckP2 (fmInst_t *inst)
void | fmCheckTep (fmInst_t *inst)
tint | fmCheckPreamble (fmInst_t *inst)
tint | fmCheckCarrierOn (fmInst_t *inst)
void | fmSendTxData (fmInst_t *inst)
void | fmMsgFifoInit (fmInst_t *inst)
tint | fmMsgFifoPeek (fmInst_t *inst, tuint *dataCount, iffaxFpFmMsg_t *CurrMsg)
tint | fmMsgFifoPop (fmInst_t *inst, iffaxFpFmMsg_t *CurrMsg)
tint | fmMsgFifoPush (fmInst_t *inst, iffaxFpFmMsg_t *NewMsg)
tint | fmDelay (fmInst_t *inst, iffaxFpFmMsg_t *CurrMsg)
void | fmToneGenOn (fmInst_t *inst, iffaxToneID_e tone_id)
void | fmToneGenOff (fmInst_t *inst)
void | fmToneDetCtrl (fmInst_t *inst, tuint ControlCode)
void | fmCheckSignalPresent (fmInst_t *inst)
void | fmDebugTrace (fmInst_t *inst, tuint traceLvl, tuint traceID, tuint traceData)
void | fmException (tuint ID, tuint code)
void | fmShipOutData (fmInst_t *inst, tword *data, tuint size)
void | fmStateOffline (fmInst_t *inst)
void | fmStateTxLsInit (fmInst_t *inst)
void | fmStateTxLsFlag (fmInst_t *inst)
void | fmStateTxLsData (fmInst_t *inst)
void | fmStateTxHsInit (fmInst_t *inst)
void | fmStateTxHsTraining (fmInst_t *inst)
void | fmStateTxHsData (fmInst_t *inst)
void | fmStateTxHsEcm (fmInst_t *inst)
void | fmStateTxHsPreOff (fmInst_t *inst)
void | fmHdlcRx (fmInst_t *inst)
void | fmStateRxInit (fmInst_t *inst)
void | fmStateRx (fmInst_t *inst)
void | fmSendDataToFp (fmInst_t *inst, tword *data, tuint size, tint flush)
void | fmRxMsgProcess (fmInst_t *inst)
void | fmCheckNewModeMsg (fmInst_t *inst)
void | fmDataBufInit (fmInst_t *inst)
tword * | fmDataBufIn (fmInst_t *inst, tword *dataIn, tint byteCnt)
tuint | fmDataBufPeek (fmInst_t *inst)
void | fmDataBufOut (fmInst_t *inst)
void | fmDoublePackData (tword *src, tword *dst, tuint size)
void | fmUnPackData (tword *src, tword *dst, tuint size)
void | fmPacketizeData (fmInst_t *inst, tword *unpacked, tuint size)
tint | fm_timestamp16_compare (tuint a, tuint b)

Variables

const tint | fmDataRateTable []

Define Documentation

#define FM_MSG_FIFO_SIZE 12

Definition at line 27 of file fmloc.h.

Referenced by fmDataBufPeek(), fmMsgFifoPop(), and fmMsgFifoPush().

#define FM_LS_TX_MIN_CLOSING_FLAGS 5

Definition at line 29 of file fmloc.h.

Referenced by fmStateTxLsFlag().

#define FM_LS_TX_BYTE_DELAY 2

Definition at line 33 of file fmloc.h.

Referenced by fmStateTxLsFlag().

#define FM_HS_TX_BYTE_DELAY 4

Definition at line 38 of file fmloc.h.

Referenced by fmStateTxHsEcm(), and fmStateTxHsTraining().

#define FM_V21_FLAG 0x007E

Definition at line 42 of file fmloc.h.

Referenced by fmStateTxHsInit(), and fmStateTxLsInit().

#define FM_PCM_SAMPLE_SIZE 80

Definition at line 44 of file fmloc.h.

Referenced by fmDpuProcessDataTx(), and fmSendTxData().

#define FM_DATA_BUF_SIZE_WORDS 200

Definition at line 45 of file fmloc.h.

#define FM_MAX_DATA_PER_FRAME 40

Definition at line 46 of file fmloc.h.

#define FM_FP_PKT_SIZE_WORDS 32

Definition at line 48 of file fmloc.h.

#define FM_FP_PKT_SIZE_BYTES 64

Definition at line 49 of file fmloc.h.

Referenced by fmOpen().

#define FM_STATUS_RESET_ALL 0x0000

Definition at line 56 of file fmloc.h.

Referenced by fmStateRxInit(), fmStateTxHsInit(), and fmStateTxLsInit().

#define FM_STATUS_CARRIER_ON 0x0001

Definition at line 57 of file fmloc.h.

Referenced by fmCheckCarrierOff(), and fmCheckCarrierOn().

#define FM_STATUS_CARRIER_OFF 0x0000

Definition at line 58 of file fmloc.h.

Referenced by fmCheckCarrierOn().

#define FM_STATUS_PREAMBLE_DETECT 0x0002

Definition at line 59 of file fmloc.h.

Referenced by fmCheckPreamble().

#define FM_STATUS_P2_DETECT 0x0004

Definition at line 60 of file fmloc.h.

Referenced by fmCheckP2().

#define FM_STATUS_TEP_DETECT 0x0008

Definition at line 61 of file fmloc.h.

Referenced by fmCheckTep(), and fmModeChange().

#define FM_STATUS_TX_DPU_FLUSH 0x0010

Definition at line 62 of file fmloc.h.

Referenced by fmStateTxHsPreOff().

#define FM_STATUS_TX_DATA_FLAG 0x0020

Definition at line 63 of file fmloc.h.

Referenced by fmDataBufPeek().

#define FM_STATUS_TX_DATA_END_FLAG 0x0040

Definition at line 64 of file fmloc.h.

Referenced by fmDataBufPeek(), fmStateTxHsEcm(), fmStateTxHsTraining(), and fmStateTxLsFlag().

#define FM_STATUS_SIGNAL_DETECT 0x0080

Definition at line 65 of file fmloc.h.

Referenced by fmCheckSignalPresent().

#define FM_V21_DATA_RATE 1

Definition at line 71 of file fmloc.h.

#define FM_V27_2400_DATA_RATE 3

Definition at line 72 of file fmloc.h.

#define FM_V27_4800_DATA_RATE 6

Definition at line 73 of file fmloc.h.

#define FM_V29_7200_DATA_RATE 9

Definition at line 74 of file fmloc.h.

#define FM_V29_9600_DATA_RATE 12

Definition at line 75 of file fmloc.h.

#define FM_V17_7200_DATA_RATE 9

Definition at line 76 of file fmloc.h.

#define FM_V17_9600_DATA_RATE 12

Definition at line 77 of file fmloc.h.

#define FM_V17_12000_DATA_RATE 15

Definition at line 78 of file fmloc.h.

#define FM_V17_14400_DATA_RATE 18

Definition at line 79 of file fmloc.h.

#define FM_V33_12000_DATA_RATE 15

Definition at line 80 of file fmloc.h.

#define FM_V33_14400_DATA_RATE 18

Definition at line 81 of file fmloc.h.

#define FM_CARRIER_DET_TIME 0

Definition at line 86 of file fmloc.h.

Referenced by fmCheckCarrierOn().

#define FM_CARRIER_LOSS_DET_TIME 0

Definition at line 87 of file fmloc.h.

Referenced by fmCheckCarrierOff().

#define FM_LS_RX_PREAM_DET_TIME 0

Definition at line 88 of file fmloc.h.

Referenced by fmCheckPreamble().

#define FM_HS_RX_PREAM_DET_TIME 200

Definition at line 89 of file fmloc.h.

Referenced by fmCheckPreamble().

#define FM_HS_RX_P2_DET_TIME 30

Definition at line 90 of file fmloc.h.

Referenced by fmCheckP2().

#define FM_HS_RX_TEP_DET_TIME 60

Definition at line 91 of file fmloc.h.

Referenced by fmCheckTep().

#define FM_TGEN_CED_INC 4301

Definition at line 132 of file fmloc.h.

#define FM_TGEN_CNG_INC 2253

Definition at line 133 of file fmloc.h.

#define FM_TGEN_TONE_AMP 5193

Definition at line 134 of file fmloc.h.

#define FM_TGEN_CNG_ON_CNT 4000

Definition at line 135 of file fmloc.h.

#define FM_TGEN_CNG_OFF_CNT 24000

Definition at line 136 of file fmloc.h.

Referenced by fmSendTxData().

#define FM_TGEN_PHASE_Q 13

Definition at line 137 of file fmloc.h.

#define FM_TGEN_ONE_PHASE_Q frctAdjustQ (1,0,FM_TGEN_PHASE_Q)

Definition at line 138 of file fmloc.h.

#define FM_TGEN_TWO_PHASE_Q frctAdjustQ (2,0,FM_TGEN_PHASE_Q)

Definition at line 139 of file fmloc.h.

Typedef Documentation

typedef struct fmInst_s fmInst_t

Enumeration Type Documentation

enum fmState_e

Enumerator:
FM_OPEN
FM_CLOSED

Definition at line 97 of file fmloc.h.

enum fmProcState_e

Enumerator:
FM_OFFLINE_STATE
FM_HS_RX_STATE
FM_LS_RX_STATE
FM_LS_TX_STATE_FLAG
FM_LS_TX_STATE_DATA
FM_LS_TX_STATE_FCS
FM_HS_TX_STATE_TRAINING
FM_HS_TX_STATE_DATA
FM_HS_TX_STATE_PRE_OFF
FM_HS_TX_STATE_ECM

Definition at line 105 of file fmloc.h.

enum fmEcmSt_e

Enumerator:
FM_TX_ECM_FLAG
FM_TX_ECM_DATA
FM_TX_ECM_FRAME_COMP

Definition at line 122 of file fmloc.h.

enum fmToneSt_e

Enumerator:
FM_TONE_ST_SIL
FM_TONE_ST_CED
FM_TONE_ST_CNG_ON
FM_TONE_ST_CNG_OFF

Definition at line 144 of file fmloc.h.

Function Documentation

void fmModeChange ( fmInst_t * inst )

Definition at line 84 of file fmcommon.c.

References fm_ctrl_str::Config, dpuIf_t::CtrlParam, fmInst_s::DataRate, fmInst_s::Dpu, fm_ctrl_str::element_5, FM_DPU_CONFIG_MODEM_RX_MODE, FM_DPU_CONFIG_MODULATION_MASK, FM_DPU_CONFIG_RTS, FM_DPU_CONFIG_SETUP, FM_DPU_CONFIG_STRAIN, FM_DPU_CONFIG_TX_FILLBIT, FM_HS_RX_STATE, FM_HS_TX_STATE_ECM, FM_HS_TX_STATE_TRAINING, FM_LS_RX_STATE, FM_LS_TX_STATE_FLAG, FM_MFILLBIT, FM_OFFLINE_STATE, FM_STATUS_TEP_DETECT, FM_TRC_DBG_LVL_1, FM_TRC_DBG_LVL_2, FM_TRC_INVALID_MSG, FM_TRC_MODE_MSG_ID, FM_TRC_NEW_MODULATION, fmInst_s::fmCurrMode, fmDataRateTable, fmDebugTrace(), fmInst_s::FmEcmMode, fmMsgFifoPop(), fmSpeedTable, fmInst_s::FmState, fmStateRxInit(), fmStateTxHsInit(), fmStateTxLsInit(), fmInst_s::FmStatus, fmInst_s::FmTaskRate, fmToneGenOff(), and fmInst_s::TxFillByte.

Referenced by fmSendIn().

Here is the call graph for this function:

void fmDpuProcessDataRx | ( | fmInst_t * | inst,
 |  | linSample * | send_data
 | ) |  |

Definition at line 273 of file fmcommon.c.

References dpuIf_t::CtrlParam, fmInst_s::Dpu, fm_ctrl_str::element_0, FAX_MODEM(), and dpuIf_t::TargetInst.

Referenced by fmSendIn().

Here is the call graph for this function:

void fmDpuProcessDataTx ( fmInst_t * inst )

Definition at line 300 of file fmcommon.c.

References fmInst_s::BytesNotUsed, dpuIf_t::CtrlParam, dpuIf_t::DataBuf, fmInst_s::Dpu, fm_ctrl_str::element_0, fm_ctrl_str::element_5, FAX_MODEM(), FM_PCM_SAMPLE_SIZE, fmReceiveOutSpec_t::fmReceiveOut, fmInst_s::RxOutSpec, fmReceiveOutSpec_t::TargetInst, and dpuIf_t::TargetInst.

Referenced by fmSendIn().

Here is the call graph for this function:

tint fmCheckCarrierOff ( fmInst_t * inst )

Definition at line 344 of file fmcommon.c.

References dpuIf_t::CtrlParam, fmInst_s::Dpu, FM_CARRIER_LOSS_DET_TIME, FM_DPU_LINECOND_CARRIER_DETECT, FM_STATUS_CARRIER_ON, FM_TRC_CARRIER_LOSS, FM_TRC_DBG_LVL_2, fmContext, fmDebugTrace(), fmContext_t::fmGetTime, fmSendDataToFp(), fmSendOutSpec_t::fmSendOut, fmInst_s::FmState, fmInst_s::FmStatus, fm_ctrl_str::LineCond, fmInst_s::SendOutSpec, and fmSendOutSpec_t::TargetInst.

Referenced by fmStateRx().

Here is the call graph for this function:

void fmCheckP2 ( fmInst_t * inst )

Definition at line 425 of file fmcommon.c.

References dpuIf_t::CtrlParam, fmInst_s::Dpu, FM_DPU_LINECOND_P2_DETECT, FM_HS_RX_P2_DET_TIME, FM_STATUS_P2_DETECT, FM_TRC_DBG_LVL_2, FM_TRC_P2_DETECT, fmContext, fmDebugTrace(), fmContext_t::fmGetTime, fmSendOutSpec_t::fmSendOut, fmInst_s::FmState, fmInst_s::FmStatus, fm_ctrl_str::LineCond, fmInst_s::SendOutSpec, and fmSendOutSpec_t::TargetInst.

Referenced by fmStateRx().

Here is the call graph for this function:

void fmCheckTep ( fmInst_t * inst )

Definition at line 391 of file fmcommon.c.

References dpuIf_t::CtrlParam, fmInst_s::Dpu, FM_DPU_LINECOND_TEP_DETECT, FM_HS_RX_TEP_DET_TIME, FM_STATUS_TEP_DETECT, FM_TRC_DBG_LVL_2, FM_TRC_TEP_DETECT, fmContext, fmDebugTrace(), fmContext_t::fmGetTime, fmSendOutSpec_t::fmSendOut, fmInst_s::FmState, fmInst_s::FmStatus, fm_ctrl_str::LineCond, fmInst_s::SendOutSpec, and fmSendOutSpec_t::TargetInst.

Referenced by fmStateRx().

Here is the call graph for this function:

tint fmCheckPreamble ( fmInst_t * inst )

Definition at line 464 of file fmcommon.c.

References dpuIf_t::CtrlParam, fmInst_s::Dpu, FM_DPU_LINECOND_PREAMBLE_DETECT, FM_HS_RX_PREAM_DET_TIME, FM_LS_RX_PREAM_DET_TIME, FM_LS_RX_STATE, FM_STATUS_PREAMBLE_DETECT, FM_TRC_DBG_LVL_2, FM_TRC_PREAMBLE_DETECT, fmCheckCarrierOn(), fmContext, fmDebugTrace(), fmContext_t::fmGetTime, fmSendOutSpec_t::fmSendOut, fmInst_s::FmState, fmInst_s::FmStatus, fm_ctrl_str::LineCond, fmInst_s::SendOutSpec, and fmSendOutSpec_t::TargetInst.

Referenced by fmStateRx().

Here is the call graph for this function:

tint fmCheckCarrierOn ( fmInst_t * inst )

Definition at line 524 of file fmcommon.c.

References dpuIf_t::CtrlParam, fmInst_s::Dpu, FM_CARRIER_DET_TIME, FM_DPU_LINECOND_CARRIER_DETECT, FM_STATUS_CARRIER_OFF, FM_STATUS_CARRIER_ON, FM_TRC_CARRIER_DETECT, FM_TRC_DBG_LVL_2, fmContext, fmDebugTrace(), fmContext_t::fmGetTime, fmSendOutSpec_t::fmSendOut, fmInst_s::FmState, fmInst_s::FmStatus, fm_ctrl_str::LineCond, fmInst_s::SendOutSpec, and fmSendOutSpec_t::TargetInst.

Referenced by fmCheckPreamble(), and fmStateRx().

Here is the call graph for this function:

void fmSendTxData ( fmInst_t * inst )

Definition at line 565 of file fmcommon.c.

References FM_PCM_SAMPLE_SIZE, FM_TGEN_CNG_OFF_CNT, FM_TONE_ST_CNG_OFF, FM_TONE_ST_CNG_ON, FM_TONE_ST_SIL, fmInst_s::FmToneCount, and fmInst_s::FmToneState.

Referenced by fmSendIn().

void fmMsgFifoInit ( fmInst_t * inst )

Definition at line 644 of file fmcommon.c.

References fmDataBufInit(), fmInst_s::MsgFifoInCnt, and fmInst_s::MsgFifoOutCnt.

Referenced by fmOpen().

Here is the call graph for this function:

tint fmMsgFifoPeek | ( | fmInst_t * | inst,
 |  | tuint * | dataCount,
 |  | iffaxFpFmMsg_t * | CurrMsg
 | ) |  |

Definition at line 674 of file fmcommon.c.

References FM_TRC_DBG_LVL_2, FM_TRC_SYNC_ACK, fmContext, fmDataBufPeek(), fmDebugTrace(), fmDelay(), fmContext_t::fmGetTime, fmMsgFifoPop(), fmSendOutSpec_t::fmSendOut, fmToneDetCtrl(), fmToneGenOff(), fmToneGenOn(), fmInst_s::MsgFifoData, fmInst_s::MsgFifoInCnt, fmInst_s::MsgFifoOutCnt, fmInst_s::SendOutSpec, fmSendOutSpec_t::TargetInst, and fmInst_s::TxFillByte.

Referenced by fmRxMsgProcess(), fmStateTxHsData(), fmStateTxHsEcm(), fmStateTxHsTraining(), fmStateTxLsData(), and fmStateTxLsFlag().

Here is the call graph for this function:

tint fmMsgFifoPop | ( | fmInst_t * | inst,
 |  | iffaxFpFmMsg_t * | CurrMsg
 | ) |  |

Definition at line 798 of file fmcommon.c.

References FM_MSG_FIFO_SIZE, fmDataBufOut(), fmInst_s::MsgFifoData, fmInst_s::MsgFifoInCnt, and fmInst_s::MsgFifoOutCnt.

Referenced by fmModeChange(), fmMsgFifoPeek(), fmRxMsgProcess(), fmStateTxHsData(), fmStateTxHsEcm(), fmStateTxLsData(), and fmStateTxLsFlag().

Here is the call graph for this function:

tint fmMsgFifoPush | ( | fmInst_t * | inst,
 |  | iffaxFpFmMsg_t * | NewMsg
 | ) |  |

Definition at line 836 of file fmcommon.c.

References FM_MSG_FIFO_SIZE, fmDataBufIn(), fmInst_s::MsgFifoData, fmInst_s::MsgFifoInCnt, and fmInst_s::MsgFifoOutCnt.

Referenced by fmReceiveIn().

Here is the call graph for this function:

tint fmDelay | ( | fmInst_t * | inst,
 |  | iffaxFpFmMsg_t * | CurrMsg
 | ) |  |

Definition at line 906 of file fmcommon.c.

References fmInst_s::DelayFlag, fmInst_s::EndTime, fm_timestamp16_compare(), FM_TRC_DBG_LVL_2, FM_TRC_DELAY_BEGIN, fmContext, fmDebugTrace(), and fmContext_t::fmGetTime.

Referenced by fmMsgFifoPeek().

Here is the call graph for this function:

void fmToneGenOn | ( | fmInst_t * | inst,
 |  | iffaxToneID_e | tone_id
 | ) |  |

Definition at line 960 of file fmcommon.c.

References FM_TONE_ST_CED, FM_TONE_ST_CNG_ON, fmInst_s::FmToneCount, fmInst_s::FmTonePhase, and fmInst_s::FmToneState.

Referenced by fmMsgFifoPeek().

void fmToneGenOff ( fmInst_t * inst )

Definition at line 987 of file fmcommon.c.

References FM_TONE_ST_SIL, and fmInst_s::FmToneState.

Referenced by fmModeChange(), and fmMsgFifoPeek().

void fmToneDetCtrl | ( | fmInst_t * | inst,
 |  | tuint | ControlCode
 | ) |  |

Definition at line 1006 of file fmcommon.c.

References fmToneDetCtrlSpec_t::TargetInst, fmToneDetCtrlSpec_t::ToneDetCtrl, and fmInst_s::ToneDetCtrl.

Referenced by fmMsgFifoPeek().

void fmCheckSignalPresent ( fmInst_t * inst )

Definition at line 1052 of file fmcommon.c.

References dpuIf_t::CtrlParam, fmInst_s::Dpu, FM_DPU_LINECOND_SIGNAL_PRESENT, FM_STATUS_SIGNAL_DETECT, fmContext, fmContext_t::fmGetTime, fmSendOutSpec_t::fmSendOut, fmInst_s::FmStatus, fm_ctrl_str::LineCond, fmInst_s::SendOutSpec, and fmSendOutSpec_t::TargetInst.

Referenced by fmStateRx().

void fmDebugTrace | ( | fmInst_t * | inst,
 |  | tuint | traceLvl,
 |  | tuint | traceID,
 |  | tuint | traceData
 | ) |  |

Definition at line 1100 of file fmcommon.c.

References fmContext_t::debugInfo, fm_INFOMATIONAL, fmContext, fmContext_t::fmGetTime, and fmInst_s::ID.

Referenced by fmCheckCarrierOff(), fmCheckCarrierOn(), fmCheckP2(), fmCheckPreamble(), fmCheckTep(), fmDelay(), fmModeChange(), fmMsgFifoPeek(), fmRxMsgProcess(), fmSendIn(), fmStateTxHsData(), fmStateTxHsEcm(), fmStateTxHsTraining(), fmStateTxLsData(), and fmStateTxLsFlag().

void fmException | ( | tuint | ID,
 |  | tuint | code
 | ) |  |

Definition at line 1120 of file fmcommon.c.

References fmContext_t::debugInfo, and fmContext.

Referenced by dpuOpen(), and fmDelete().

void fmShipOutData | ( | fmInst_t * | inst,
 |  | tword * | data,
 |  | tuint | size
 | ) |  |

Definition at line 1139 of file fmcommon.c.

References fmContext, fmContext_t::fmGetTime, fmSendOutSpec_t::fmSendOut, fmInst_s::SendOutSpec, and fmSendOutSpec_t::TargetInst.

Referenced by fmPacketizeData(), and fmSendDataToFp().

void fmStateOffline ( fmInst_t * inst )

Definition at line 70 of file fmstate.c.

References fmRxMsgProcess().

Referenced by fmSendIn().

Here is the call graph for this function:

void fmStateTxLsInit ( fmInst_t * inst )

Definition at line 87 of file fmstate.c.

References fmInst_s::BytesNotUsed, dpuIf_t::CtrlParam, dpuIf_t::DataBuf, fmInst_s::Dpu, fm_ctrl_str::element_5, FM_LS_TX_STATE_FLAG, FM_STATUS_RESET_ALL, FM_V21_FLAG, fmInst_s::FmBytesCnt, fmInst_s::FmState, fmInst_s::FmStatus, fmInst_s::Hdlc, fmInst_s::HdlcFlagsCnt, and fmInst_s::Tx.

Referenced by fmModeChange().

void fmStateTxLsFlag ( fmInst_t * inst )

Definition at line 141 of file fmstate.c.

References fmInst_s::BytesNotUsed, dpuIf_t::DataBuf, fmInst_s::Dpu, fmInst_s::fForceBadFCS, fm_HDLC_FLAG_PATTERN, FM_LS_TX_BYTE_DELAY, FM_LS_TX_MIN_CLOSING_FLAGS, FM_LS_TX_STATE_DATA, FM_STATUS_TX_DATA_END_FLAG, FM_TRC_DATA_BEGIN, FM_TRC_DBG_LVL_2, FM_TRC_INVALID_MSG, fmDebugTrace(), fmMsgFifoPeek(), fmMsgFifoPop(), fmInst_s::FmNewModemMode, fmInst_s::FmState, fmInst_s::FmStatus, fmInst_s::Hdlc, fmInst_s::HdlcFlagsCnt, and fmInst_s::Tx.

Referenced by fmSendIn().

Here is the call graph for this function:

void fmStateTxLsData ( fmInst_t * inst )

Definition at line 224 of file fmstate.c.

References fmInst_s::BytesNotUsed, dpuIf_t::DataBuf, fmInst_s::Dpu, fm_HDLC_FLAG_PATTERN, FM_LS_TX_STATE_FLAG, FM_TRC_BAD_FRAME, FM_TRC_DBG_LVL_1, FM_TRC_DBG_LVL_2, FM_TRC_GOOD_FRAME, FM_TRC_TX_UNDERRUN, fmDebugTrace(), fmMsgFifoPeek(), fmMsgFifoPop(), fmInst_s::Hdlc, and fmInst_s::Tx.

Referenced by fmSendIn().

Here is the call graph for this function:

void fmStateTxHsInit ( fmInst_t * inst )

Definition at line 310 of file fmstate.c.

References fmInst_s::BytesNotUsed, dpuIf_t::CtrlParam, dpuIf_t::DataBuf, fmInst_s::DataRate, fmInst_s::Dpu, fm_ctrl_str::element_5, FM_DPU_DATA_BUF_SIZE, FM_STATUS_RESET_ALL, FM_TX_ECM_FLAG, FM_V21_FLAG, fmInst_s::FmBytesCnt, fmInst_s::FmEcmMode, fmInst_s::FmStatus, fmInst_s::Hdlc, fmInst_s::Tx, fmInst_s::TxEcmState, and fmInst_s::TxFillByte.

Referenced by fmModeChange().

void fmStateTxHsTraining ( fmInst_t * inst )

Definition at line 369 of file fmstate.c.

References fmInst_s::BytesNotUsed, fmInst_s::DataRate, FM_HS_TX_BYTE_DELAY, FM_HS_TX_STATE_DATA, FM_STATUS_TX_DATA_END_FLAG, FM_TRC_DATA_BEGIN, FM_TRC_DBG_LVL_2, FM_TRC_INVALID_MSG, fmDataRateTable, fmDebugTrace(), fmMsgFifoPeek(), and fmStateTxHsData().

Referenced by fmSendIn().

Here is the call graph for this function:

void fmStateTxHsData ( fmInst_t * inst )

Definition at line 448 of file fmstate.c.

References FM_HS_TX_STATE_PRE_OFF, FM_TRC_DATA_END, FM_TRC_DBG_LVL_2, FM_TRC_INVALID_MSG, FM_TRC_TX_UNDERRUN, fmDebugTrace(), fmMsgFifoPeek(), and fmMsgFifoPop().

Referenced by fmSendIn(), and fmStateTxHsTraining().

Here is the call graph for this function:

void fmStateTxHsEcm ( fmInst_t * inst )

Definition at line 582 of file fmstate.c.

References fmProtoStats_t::Bad_CRC_To_Tele, fmInst_s::BytesNotUsed, dpuIf_t::DataBuf, fmInst_s::DataRate, fmInst_s::Dpu, fmInst_s::fForceBadFCS, FM_DPU_DATA_BUF_SIZE, fm_HDLC_FLAG_PATTERN, FM_HS_TX_BYTE_DELAY, FM_STATUS_TX_DATA_END_FLAG, FM_TRC_BAD_FRAME, FM_TRC_DBG_LVL_1, FM_TRC_DBG_LVL_2, FM_TRC_TX_UNDERRUN, FM_TX_ECM_DATA, FM_TX_ECM_FLAG, fmInst_s::FmBytesCnt, fmDebugTrace(), fmMsgFifoPeek(), fmMsgFifoPop(), fmInst_s::FmNewModemMode, fmInst_s::FmStatus, fmUnPackData(), fmProtoStats_t::Good_CRC_To_Tele, fmInst_s::Hdlc, fmInst_s::HdlcFlagsCnt, fmInst_s::ProtoStats, fmInst_s::Tx, and fmInst_s::TxEcmState.

Referenced by fmSendIn().

Here is the call graph for this function:

void fmStateTxHsPreOff ( fmInst_t * inst )

Definition at line 743 of file fmstate.c.

References fmInst_s::BytesNotUsed, dpuIf_t::DataBuf, fmInst_s::DataRate, fmInst_s::Dpu, FM_STATUS_TX_DPU_FLUSH, fmInst_s::FmNewModemMode, fmInst_s::FmStatus, and fmInst_s::TxFillByte.

Referenced by fmSendIn().

void fmHdlcRx ( fmInst_t * inst )

Definition at line 778 of file fmstate.c.

References fmProtoStats_t::Bad_CRC_From_Tele, dpuIf_t::CtrlParam, dpuIf_t::DataBuf, fmInst_s::Dpu, fm_ctrl_str::element_5, FM_DPU_DATA_BUF_SIZE, fmContext, fmContext_t::fmGetTime, fmSendDataToFp(), fmSendOutSpec_t::fmSendOut, fmUnPackData(), fmProtoStats_t::Good_CRC_From_Tele, fmInst_s::Hdlc, fmInst_s::ProtoStats, fmInst_s::Rx, fmInst_s::SendOutSpec, and fmSendOutSpec_t::TargetInst.

Referenced by fmStateRx().

Here is the call graph for this function:

void fmStateRxInit ( fmInst_t * inst )

Definition at line 846 of file fmstate.c.

References FM_STATUS_RESET_ALL, fmInst_s::FmBytesCnt, fmInst_s::FmStatus, fmInst_s::Hdlc, fmInst_s::HdlcFlagsCnt, fmInst_s::numBytesStored, and fmInst_s::Rx.

Referenced by fmModeChange().

void fmStateRx ( fmInst_t * inst )

Definition at line 889 of file fmstate.c.

References dpuIf_t::CtrlParam, dpuIf_t::DataBuf, fmInst_s::Dpu, fm_ctrl_str::element_5, fmCheckCarrierOff(), fmCheckCarrierOn(), fmCheckP2(), fmCheckPreamble(), fmCheckSignalPresent(), fmCheckTep(), fmInst_s::FmEcmMode, fmHdlcRx(), fmRxMsgProcess(), fmSendDataToFp(), fmProtoStats_t::Non_HDLC_Rx_From_Tele, and fmInst_s::ProtoStats.

Referenced by fmSendIn().

Here is the call graph for this function:

void fmSendDataToFp | ( | fmInst_t * | inst,
 |  | tword * | data,
 |  | tuint | size,
 |  | tint | flush
 | ) |  |

Definition at line 944 of file fmstate.c.

References fmInst_s::fFmFpPacketizationMode, fmInst_s::FmFpData, fmPacketizeData(), fmShipOutData(), and fmInst_s::numBytesStored.

Referenced by fmCheckCarrierOff(), fmHdlcRx(), and fmStateRx().

Here is the call graph for this function:

void fmRxMsgProcess ( fmInst_t * inst )

Definition at line 983 of file fmstate.c.

References FM_TRC_DBG_LVL_2, FM_TRC_INVALID_MSG, fmDebugTrace(), fmMsgFifoPeek(), and fmMsgFifoPop().

Referenced by fmStateOffline(), and fmStateRx().

Here is the call graph for this function:

void fmCheckNewModeMsg ( fmInst_t * inst )

void fmDataBufInit ( fmInst_t * inst )

Definition at line 24 of file fmutil.c.

References fmInst_s::FmDataIn, fmInst_s::FmDataOut, and fmInst_s::FmDataWordCnt.

Referenced by fmMsgFifoInit().

tword* fmDataBufIn | ( | fmInst_t * | inst,
 |  | tword * | dataIn,
 |  | tint | byteCnt
 | ) |  |

Definition at line 45 of file fmutil.c.

References fmInst_s::FmData, fmInst_s::FmDataIn, fmInst_s::FmDataOut, fmInst_s::FmDataWordCnt, and fmInst_s::FmDataWordSize.

Referenced by fmMsgFifoPush().

tuint fmDataBufPeek ( fmInst_t * inst )

Definition at line 133 of file fmutil.c.

References FM_MSG_FIFO_SIZE, FM_STATUS_TX_DATA_END_FLAG, FM_STATUS_TX_DATA_FLAG, fmInst_s::FmStatus, fmInst_s::MsgFifoData, fmInst_s::MsgFifoInCnt, and fmInst_s::MsgFifoOutCnt.

Referenced by fmMsgFifoPeek().

void fmDataBufOut ( fmInst_t * inst )

Definition at line 187 of file fmutil.c.

References fmInst_s::FmDataIn, fmInst_s::FmDataOut, fmInst_s::FmDataWordCnt, fmInst_s::FmDataWordSize, fmInst_s::MsgFifoData, and fmInst_s::MsgFifoOutCnt.

Referenced by fmMsgFifoPop().

void fmDoublePackData | ( | tword * | src,
 |  | tword * | dst,
 |  | tuint | size
 | ) |  |

void fmUnPackData | ( | tword * | src,
 |  | tword * | dst,
 |  | tuint | size
 | ) |  |

Definition at line 244 of file fmutil.c.

Referenced by fmHdlcRx(), and fmStateTxHsEcm().

void fmPacketizeData | ( | fmInst_t * | inst,
 |  | tword * | unpacked,
 |  | tuint | size
 | ) |  |

Definition at line 283 of file fmutil.c.

References fmInst_s::FmFpData, fmPacketizeData(), fmShipOutData(), fmInst_s::maxBytesToBuffer, and fmInst_s::numBytesStored.

Referenced by fmPacketizeData(), and fmSendDataToFp().

Here is the call graph for this function:

tint fm_timestamp16_compare | ( | tuint | a,
 |  | tuint | b
 | ) |  |

Definition at line 345 of file fmutil.c.

Referenced by fmDelay().

Variable Documentation

const tint fmDataRateTable[]

Definition at line 53 of file fmcommon.c.

Referenced by fmModeChange(), and fmStateTxHsTraining().


FM: fmloc.h Source File

fmloc.h

Go to the documentation of this file.
00001 #ifndef _FMLOC_H_
00002 #define _FMLOC_H_
00003 /******************************************************************************
00004 *
00005 * FILE PURPOSE: Constants and instance structure for FM
00006 *
00007 *******************************************************************************
00008 * FILE NAME: fmloc.h
00009 *
00010 * DESCRIPTION:  Definitions, instance structure and function prototypes of
00011 *               functions that are shared by FM functions only. These
00012 *               details are internal to FM functions
00013 *
00014 * (C) Copyright 2000, Telogy Networks, Inc.
00015 ******************************************************************************/
00016 #include <ti/mas/types/types.h>
00017 #include <ti/mas/fract/fract.h>
00018 #include <ti/mas/fm/fm.h>
00019 #include <ti/mas/fm/src/fxmdpuif.h>
00020 #include <stdlib.h>
00021 #include <ti/mas/hdlc/hdlcrx.h>
00022 #include <ti/mas/hdlc/hdlctx.h>
00023
00024 /*******************************************************************************
00025 * DATA DEFINITION: FM Constants and definitions
00026 *******************************************************************************/
00027 #define   FM_MSG_FIFO_SIZE              12    /* Size of the FM message FIFO  */
00028
00029 #define   FM_LS_TX_MIN_CLOSING_FLAGS     5    /* Allow for the FCS to go thru */
00030                                               /* and at least generate two    */
00031                                               /* before turning off           */
00032
00033 #define   FM_LS_TX_BYTE_DELAY            2    /* 54 ms of delay is inserted   */
00034                                               /* added before we begin xmit   */
00035                                               /* low-speed data to prevent    */
00036                                               /* underruns                    */
00037
00038 #define   FM_HS_TX_BYTE_DELAY            4    /* Corresponds to 40ms of delay */
00039                                               /* inserted before we begin     */
00040                                               /* transmitting high-speed data */
00041
00042 #define   FM_V21_FLAG                    0x007E
00043
00044 #define   FM_PCM_SAMPLE_SIZE             80   /* 10 ms of PCM samples         */
00045 #define   FM_DATA_BUF_SIZE_WORDS         200  /* Size of the FM data buffer   */
00046 #define   FM_MAX_DATA_PER_FRAME          40   /* Based on 20ms @ 14400 plus
00047                                                  overhead                     */
00048 #define   FM_FP_PKT_SIZE_WORDS           32   /* # words in FM to FP pkt      */
00049 #define   FM_FP_PKT_SIZE_BYTES           64   /* # words in FM to FP pkt      */
00050
00051
00052 /*******************************************************************************
00053 * DATA DEFINITION: FM Status bit-field definitions. Each bit is used to indicate
00054 *                  a certain event which are used by the FM state
00055 *******************************************************************************/
00056 #define   FM_STATUS_RESET_ALL        0x0000
00057 #define   FM_STATUS_CARRIER_ON       0x0001
00058 #define   FM_STATUS_CARRIER_OFF      0x0000
00059 #define   FM_STATUS_PREAMBLE_DETECT  0x0002
00060 #define   FM_STATUS_P2_DETECT        0x0004
00061 #define   FM_STATUS_TEP_DETECT       0x0008
00062 #define   FM_STATUS_TX_DPU_FLUSH     0x0010
00063 #define   FM_STATUS_TX_DATA_FLAG     0x0020
00064 #define   FM_STATUS_TX_DATA_END_FLAG 0x0040
00065 #define   FM_STATUS_SIGNAL_DETECT    0x0080
00066
00067 /*******************************************************************************
00068 * DATA DEFINITION: Number of bytes transmitted or received during 10ms for
00069 *                  different modulation types
00070 *******************************************************************************/
00071 #define FM_V21_DATA_RATE         1
00072 #define FM_V27_2400_DATA_RATE    3
00073 #define FM_V27_4800_DATA_RATE    6
00074 #define FM_V29_7200_DATA_RATE    9
00075 #define FM_V29_9600_DATA_RATE   12
00076 #define FM_V17_7200_DATA_RATE    9
00077 #define FM_V17_9600_DATA_RATE   12
00078 #define FM_V17_12000_DATA_RATE  15
00079 #define FM_V17_14400_DATA_RATE  18
00080 #define FM_V33_12000_DATA_RATE  15
00081 #define FM_V33_14400_DATA_RATE  18
00082
00083 /*******************************************************************************
00084 * DATA DEFINITION: The detection time for different events detected by modem
00085 *******************************************************************************/
00086 #define FM_CARRIER_DET_TIME          0
00087 #define FM_CARRIER_LOSS_DET_TIME     0
00088 #define FM_LS_RX_PREAM_DET_TIME      0
00089 #define FM_HS_RX_PREAM_DET_TIME      200
00090 #define FM_HS_RX_P2_DET_TIME         30
00091 #define FM_HS_RX_TEP_DET_TIME        60
00092
00093
00094 /*******************************************************************************
00095 * DATA DEFINITION: FM control state definitions
00096 *******************************************************************************/
00097 typedef enum {
00098   FM_OPEN,
00099   FM_CLOSED
00100 } fmState_e;
00101
00102 /*******************************************************************************
00103 * DATA DEFINITION: FM processing state definitions
00104 *******************************************************************************/
00105 typedef enum
00106 {
00107   FM_OFFLINE_STATE,
00108   FM_HS_RX_STATE,
00109   FM_LS_RX_STATE,
00110   FM_LS_TX_STATE_FLAG,
00111   FM_LS_TX_STATE_DATA,
00112   FM_LS_TX_STATE_FCS,
00113   FM_HS_TX_STATE_TRAINING,
00114   FM_HS_TX_STATE_DATA,
00115   FM_HS_TX_STATE_PRE_OFF,
00116   FM_HS_TX_STATE_ECM
00117 } fmProcState_e;
00118
00119 /*******************************************************************************
00120 * DATA DEFINITION: FM TX ECM processing state definitions
00121 *******************************************************************************/
00122 typedef enum
00123 {
00124   FM_TX_ECM_FLAG,
00125   FM_TX_ECM_DATA,
00126   FM_TX_ECM_FRAME_COMP
00127 } fmEcmSt_e;
00128
00129 /*******************************************************************************
00130  * DATA DEFINITION: FM Tone generation related definitions
00131  *******************************************************************************/
00132 #define FM_TGEN_CED_INC        4301  /* Q13      */
00133 #define FM_TGEN_CNG_INC        2253  /* Q13      */
00134 #define FM_TGEN_TONE_AMP       5193  /* -13 dBm0 */
00135 #define FM_TGEN_CNG_ON_CNT     4000  /* 0.5 seconds @ 8 KHz */
00136 #define FM_TGEN_CNG_OFF_CNT   24000  /* 3.0 seconds @ 8 KHz */
00137 #define FM_TGEN_PHASE_Q          13
00138 #define FM_TGEN_ONE_PHASE_Q   frctAdjustQ (1,0,FM_TGEN_PHASE_Q)
00139 #define FM_TGEN_TWO_PHASE_Q   frctAdjustQ (2,0,FM_TGEN_PHASE_Q)
00140
00141 /*******************************************************************************
00142  * DATA DEFINITION: FM Tone generation state definitions
00143  *******************************************************************************/
00144 typedef enum
00145 {
00146   FM_TONE_ST_SIL,
00147   FM_TONE_ST_CED,
00148   FM_TONE_ST_CNG_ON,
00149   FM_TONE_ST_CNG_OFF
00150 } fmToneSt_e;
00151
00152
00153 /*******************************************************************************
00154 * DATA DEFINITION: FM - DPU shared data interface
00155 *******************************************************************************/
00156 typedef struct
00157 {
00158   void        *TargetInst;
00159   fm_ctrl_str CtrlParam;
00160   tword       DataBuf[FM_DPU_DATA_BUF_SIZE];
00161 } dpuIf_t;
00162
00163 /*******************************************************************************
00164 * DATA DEFINITION: FM Instance structure
00165 *******************************************************************************/
00166 typedef struct fmInst_s
00167 {
00168   tuint       state;
00169   tuint       ID;
00170   tuint       debugLvl;
00171   tuint       FmState;
00172
00173 #ifndef GG_REF_PAGE
00174   /* The reflection page does not support C bitfields */
00175   tuint       fFmFpPacketizationMode : 1;
00176                               /* Flag used to indicate whether we are buffering */
00177                               /* (i.e. packetizing) data or simply relaying it  */
00178                               /* from FM to FP */
00179
00180   tuint       FmNewModemMode : 1; /* this flag is used to signal that the after  */
00181                               /* processing, we must change the modem mode   */
00182                               /* if a mode message is available or configure */
00183                               /* it into low speed receive mode */
00184   tuint       fForceBadFCS : 1;  /* TRUE: bad FCS must be forced; FALSE: no bad FCS */
00185
00186   tuint       DelayFlag : 1;  /* variable to signify if this is the first time */
00187                               /* we're calling function fmDelay for a particular */
00188                               /* FP to FM delay message */
00189
00190   tuint       FmEcmMode : 1;  /* variables used for ECM processing */
00191 #else
00192   tuint       bitfield;       /* (private) */
00193 #endif
00194
00195   tint        maxBytesToBuffer;
00196                               /* Maximum number of bytes to buffer in */
00197                               /* packetization mode */
00198
00199   tuint       MsgFifoInCnt;   /* message processing fifo variables */
00200   tuint       MsgFifoOutCnt;
00201   iffaxFpFmMsg_t MsgFifoData[FM_MSG_FIFO_SIZE];
00202
00203   dpuIf_t     Dpu;            /* fm-dpu interface */
00204
00205   union {                     /* hdlc processing control block */
00206   hdlcTxInst_t Tx;
00207   hdlcRxInst_t Rx;
00208   } Hdlc;
00209
00210   tuint       FmStatus;       /* different bits indicate different events */
00211
00212   tuint       HdlcFlagsCnt;   /* counter for the number of flags */
00213
00214   tuint       EndTime;        /* Time at which delay expires */
00215
00216   tuint       BytesNotUsed;   /* number of bytes not used by the dpu when    */
00217                               /* called when transmitting */
00218
00219   tuint       DataRate;       /* number of data bytes used by dpu per call   */
00220                               /* during transmitting */
00221
00222   tuint       TxFillByte;     /* fill pattern during high speed underruns    */
00223
00224   tuint       FmBytesCnt;     /* number of bytes we took from a data buffer. */
00225                               /* this variable is used to start from where   */
00226                               /* we left off last time */
00227
00228   struct iffaxFpFmMode_s fmCurrMode;  /* fm's current mode structure */
00229
00230   tuint       FmTaskRate;     /* rate of the FM task at which it is being    */
00231                               /* called in ms */
00232
00233   tuint       TxEcmState;
00234
00235   tword       *FmData;        /* fm data buffer handling variables */
00236   tint        FmDataIn;
00237   tint        FmDataOut;
00238   tint        FmDataWordCnt;
00239   tint        FmDataWordSize;
00240
00241   tword *     FmFpData;       /* Pointer to memory location where FM-FP data
00242                                  packets are stored */
00243                               /* Data array used to send data to FP from FM   */
00244   tuint       numBytesStored; /* Number of bytes currently stored in FmFpData */
00245                               /* array, used from 1 function call to the next */
00246
00247   Fract       FmTonePhase;    /* Tracks phase during tone generation      */
00248   tuint       FmToneState;    /* Tracks tone state during tone generation */
00249   tuint       FmToneCount;    /* Tracks tone cadence for CNG generation   */
00250   fmToneDetCtrlSpec_t  ToneDetCtrl; /* Tone detection control specification */
00251
00252   fmProtoStats_t ProtoStats;  /* FM statistics */
00253
00254   /* function and instance pointers */
00255   fmReceiveOutSpec_t RxOutSpec;
00256   fmSendOutSpec_t    SendOutSpec;
00257
00258 } fmInst_t;
00259
00260 /*******************************************************************************
00261 * DATA DEFINITION: External variables
00262 *******************************************************************************/
00263
00264 extern const tint fmDataRateTable[];
00265
00266 /*******************************************************************************
00267 * DATA DEFINITION: Function prototypes of local functions
00268 *******************************************************************************/
00269
00270 /* functions in fmcommon.c */
00271 void fmModeChange (fmInst_t *inst);
00272 void fmDpuProcessDataRx (fmInst_t *inst, linSample *send_data);
00273 void fmDpuProcessDataTx (fmInst_t *inst);
00274 tint fmCheckCarrierOff (fmInst_t *inst);
00275 void fmCheckP2 (fmInst_t *inst);
00276 void fmCheckTep (fmInst_t *inst);
00277 tint fmCheckPreamble (fmInst_t *inst);
00278 tint fmCheckCarrierOn (fmInst_t *inst);
00279 void fmSendTxData (fmInst_t *inst);
00280 void fmMsgFifoInit (fmInst_t *inst);
00281 tint fmMsgFifoPeek (fmInst_t *inst, tuint *dataCount, iffaxFpFmMsg_t *CurrMsg);
00282 tint fmMsgFifoPop (fmInst_t *inst, iffaxFpFmMsg_t *CurrMsg);
00283 tint fmMsgFifoPush (fmInst_t *inst, iffaxFpFmMsg_t *NewMsg);
00284 tint fmDelay (fmInst_t *inst, iffaxFpFmMsg_t *CurrMsg);
00285 void fmToneGenOn (fmInst_t *inst, iffaxToneID_e tone_id);
00286 void fmToneGenOff (fmInst_t *inst);
00287 void fmToneDetCtrl (fmInst_t *inst, tuint ControlCode);
00288 void fmCheckSignalPresent (fmInst_t *inst);
00289 void fmDebugTrace (fmInst_t *inst, tuint traceLvl, tuint traceID, tuint traceData);
00290 void fmException (tuint ID, tuint code);
00291 void fmShipOutData (fmInst_t *inst, tword *data, tuint size);
00292
00293 /* functions in fmstate.c */
00294 void fmStateOffline (fmInst_t *inst);
00295 void fmStateTxLsInit (fmInst_t *inst);
00296 void fmStateTxLsFlag (fmInst_t *inst);
00297 void fmStateTxLsData (fmInst_t *inst);
00298 void fmStateTxHsInit (fmInst_t *inst);
00299 void fmStateTxHsTraining (fmInst_t *inst);
00300 void fmStateTxHsData (fmInst_t *inst);
00301 void fmStateTxHsEcm (fmInst_t *inst);
00302 void fmStateTxHsPreOff (fmInst_t *inst);
00303 void fmHdlcRx (fmInst_t *inst);
00304 void fmStateRxInit (fmInst_t *inst);
00305 void fmStateRx (fmInst_t *inst);
00306 void fmSendDataToFp (fmInst_t *inst, tword *data, tuint size, tint flush);
00307 void fmRxMsgProcess (fmInst_t *inst);
00308 void fmCheckNewModeMsg (fmInst_t *inst);
00309
00310 /* functions in fmutil.c */
00311 void fmDataBufInit (fmInst_t *inst);
00312 tword *fmDataBufIn (fmInst_t *inst, tword *dataIn, tint byteCnt);
00313 tuint fmDataBufPeek (fmInst_t *inst);
00314 void fmDataBufOut (fmInst_t *inst);
00315 void fmDoublePackData (tword *src, tword *dst, tuint size);
00316 void fmUnPackData (tword *src, tword *dst, tuint size);
00317 void fmPacketizeData (fmInst_t *inst, tword *unpacked, tuint size);
00318 tint fm_timestamp16_compare (tuint a, tuint b);
00319
00320 #endif /* nothing beyond this line */
00321


FM: fmport.h File Reference

fmport.h File Reference

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

Go to the source code of this file.

Defines

#define | _FMPORT_C54 0
#define | _FMPORT_C54_FAR 0
#define | _FMPORT_C55 0
#define | _FMPORT_C55L 0
#define | _FMPORT_C64 0
#define | _FMPORT_C64_BIG_ENDIAN 0
#define | _FMPORT_C64P 0
#define | _FMPORT_C64P_BIG_ENDIAN 0

Define Documentation

#define _FMPORT_C54 0

Definition at line 17 of file fmport.h.

#define _FMPORT_C54_FAR 0

Definition at line 23 of file fmport.h.

#define _FMPORT_C55 0

Definition at line 29 of file fmport.h.

#define _FMPORT_C55L 0

Definition at line 35 of file fmport.h.

#define _FMPORT_C64 0

Definition at line 41 of file fmport.h.

#define _FMPORT_C64_BIG_ENDIAN 0

Definition at line 47 of file fmport.h.

#define _FMPORT_C64P 0

Definition at line 53 of file fmport.h.

#define _FMPORT_C64P_BIG_ENDIAN 0

Definition at line 59 of file fmport.h.


FM: fmport.h Source File

fmport.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: To include the header file specific to platforms for FM.
00003  ******************************************************************************
00004  * FILE NAME:   fmport.h
00005  *
00006  * DESCRIPTION: Based on compiler switch, include platform specific header file.
00007  *
00008  * (C) Copyright 2006, Texas Instruments, Inc.
00009  *****************************************************************************/
00010
00011 #ifndef _FMPORT_H
00012 #define _FMPORT_H
00013
00014 #ifdef ti_targets_C54
00015 #define _FMPORT_C54 1
00016 #else
00017 #define _FMPORT_C54 0
00018 #endif
00019
00020 #ifdef ti_targets_C54_far
00021 #define _FMPORT_C54_FAR 1
00022 #else
00023 #define _FMPORT_C54_FAR 0
00024 #endif
00025
00026 #ifdef ti_targets_C55
00027 #define _FMPORT_C55 1
00028 #else
00029 #define _FMPORT_C55 0
00030 #endif
00031
00032 #ifdef ti_targets_C55_large
00033 #define _FMPORT_C55L 1
00034 #else
00035 #define _FMPORT_C55L 0
00036 #endif
00037
00038 #ifdef ti_targets_C64
00039 #define _FMPORT_C64 1
00040 #else
00041 #define _FMPORT_C64 0
00042 #endif
00043
00044 #ifdef ti_targets_C64_big_endian
00045 #define _FMPORT_C64_BIG_ENDIAN 1
00046 #else
00047 #define _FMPORT_C64_BIG_ENDIAN 0
00048 #endif
00049
00050 #ifdef ti_targets_C64P
00051 #define _FMPORT_C64P 1
00052 #else
00053 #define _FMPORT_C64P 0
00054 #endif
00055
00056 #ifdef ti_targets_C64P_big_endian
00057 #define _FMPORT_C64P_BIG_ENDIAN 1
00058 #else
00059 #define _FMPORT_C64P_BIG_ENDIAN 0
00060 #endif
00061
00062 #if (_FMPORT_C54_FAR || _FMPORT_C54)
00063 #include <ti/mas/fm/src/c54/fmport.h>
00064 #elif (_FMPORT_C55 || _FMPORT_C55L)
00065 #include <ti/mas/fm/src/c55/fmport.h>
00066 #elif (_FMPORT_C64 || _FMPORT_C64_BIG_ENDIAN || _FMPORT_C64P || _FMPORT_C64P_BIG_ENDIAN)
00067 #include <ti/mas/fm/src/c64/fmport.h>
00068 #else
00069 #error invalid target
00070 #endif
00071
00072 #endif /* _FMPORT_H */
00073
00074 /* nothing past this point */


FM: fmprag.h File Reference

fmprag.h File Reference

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

Go to the source code of this file.

Defines

#define | _FMPRAG_C54 0
#define | _FMPRAG_C54_FAR 0
#define | _FMPRAG_C55 0
#define | _FMPRAG_C55L 0
#define | _FMPRAG_C64 0
#define | _FMPRAG_C64_BIG_ENDIAN 0
#define | _FMPRAG_C64P 0
#define | _FMPRAG_C64P_BIG_ENDIAN 0

Define Documentation

#define _FMPRAG_C54 0

Definition at line 17 of file fmprag.h.

#define _FMPRAG_C54_FAR 0

Definition at line 23 of file fmprag.h.

#define _FMPRAG_C55 0

Definition at line 29 of file fmprag.h.

#define _FMPRAG_C55L 0

Definition at line 35 of file fmprag.h.

#define _FMPRAG_C64 0

Definition at line 41 of file fmprag.h.

#define _FMPRAG_C64_BIG_ENDIAN 0

Definition at line 47 of file fmprag.h.

#define _FMPRAG_C64P 0

Definition at line 53 of file fmprag.h.

#define _FMPRAG_C64P_BIG_ENDIAN 0

Definition at line 59 of file fmprag.h.


FM: fmprag.h Source File

fmprag.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: To include the header file specific to platforms for FM.
00003  ******************************************************************************
00004  * FILE NAME:   fmprag.h
00005  *
00006  * DESCRIPTION: Based on compiler switch, include platform specific header file.
00007  *
00008  * (C) Copyright 2006, Texas Instruments, Inc.
00009  *****************************************************************************/
00010
00011 #ifndef _FMPRAG_H
00012 #define _FMPRAG_H
00013
00014 #ifdef ti_targets_C54
00015 #define _FMPRAG_C54 1
00016 #else
00017 #define _FMPRAG_C54 0
00018 #endif
00019
00020 #ifdef ti_targets_C54_far
00021 #define _FMPRAG_C54_FAR 1
00022 #else
00023 #define _FMPRAG_C54_FAR 0
00024 #endif
00025
00026 #ifdef ti_targets_C55
00027 #define _FMPRAG_C55 1
00028 #else
00029 #define _FMPRAG_C55 0
00030 #endif
00031
00032 #ifdef ti_targets_C55_large
00033 #define _FMPRAG_C55L 1
00034 #else
00035 #define _FMPRAG_C55L 0
00036 #endif
00037
00038 #ifdef ti_targets_C64
00039 #define _FMPRAG_C64 1
00040 #else
00041 #define _FMPRAG_C64 0
00042 #endif
00043
00044 #ifdef ti_targets_C64_big_endian
00045 #define _FMPRAG_C64_BIG_ENDIAN 1
00046 #else
00047 #define _FMPRAG_C64_BIG_ENDIAN 0
00048 #endif
00049
00050 #ifdef ti_targets_C64P
00051 #define _FMPRAG_C64P 1
00052 #else
00053 #define _FMPRAG_C64P 0
00054 #endif
00055
00056 #ifdef ti_targets_C64P_big_endian
00057 #define _FMPRAG_C64P_BIG_ENDIAN 1
00058 #else
00059 #define _FMPRAG_C64P_BIG_ENDIAN 0
00060 #endif
00061
00062 #if (_FMPRAG_C54_FAR || _FMPRAG_C54)
00063 #include <ti/mas/fm/src/c54/fmprag.h>
00064 #elif (_FMPRAG_C55 || _FMPRAG_C55L)
00065 #include <ti/mas/fm/src/c55/fmprag.h>
00066 #elif (_FMPRAG_C64 || _FMPRAG_C64_BIG_ENDIAN || _FMPRAG_C64P || _FMPRAG_C64P_BIG_ENDIAN)
00067 #include <ti/mas/fm/src/c64/fmprag.h>
00068 #else
00069 #error invalid target
00070 #endif
00071
00072 #endif /* _FMPRAG_H */
00073
00074 /* nothing past this point */


FM: fmstate.c File Reference

fmstate.c File Reference

#include <ti/mas/types/types.h>
#include "fm.h"
#include "fmloc.h"
#include "fmtrace.h"
#include <ti/mas/util/pkt.h>

Include dependency graph for fmstate.c:

Go to the source code of this file.

Functions

void | fmStateOffline (fmInst_t *inst)
void | fmStateTxLsInit (fmInst_t *inst)
void | fmStateTxLsFlag (fmInst_t *inst)
void | fmStateTxLsData (fmInst_t *inst)
void | fmStateTxHsInit (fmInst_t *inst)
void | fmStateTxHsTraining (fmInst_t *inst)
void | fmStateTxHsData (fmInst_t *inst)
void | fmStateTxHsEcm (fmInst_t *inst)
void | fmStateTxHsPreOff (fmInst_t *inst)
void | fmHdlcRx (fmInst_t *inst)
void | fmStateRxInit (fmInst_t *inst)
void | fmStateRx (fmInst_t *inst)
void | fmSendDataToFp (fmInst_t *inst, tword *data, tuint size, tint flush)
void | fmRxMsgProcess (fmInst_t *inst)

Function Documentation

void fmStateOffline ( fmInst_t * inst )

Definition at line 70 of file fmstate.c.

References fmRxMsgProcess().

Referenced by fmSendIn().

Here is the call graph for this function:

void fmStateTxLsInit ( fmInst_t * inst )

Definition at line 87 of file fmstate.c.

References fmInst_s::BytesNotUsed, dpuIf_t::CtrlParam, dpuIf_t::DataBuf, fmInst_s::Dpu, fm_ctrl_str::element_5, FM_LS_TX_STATE_FLAG, FM_STATUS_RESET_ALL, FM_V21_FLAG, fmInst_s::FmBytesCnt, fmInst_s::FmState, fmInst_s::FmStatus, fmInst_s::Hdlc, fmInst_s::HdlcFlagsCnt, and fmInst_s::Tx.

Referenced by fmModeChange().

void fmStateTxLsFlag ( fmInst_t * inst )

Definition at line 141 of file fmstate.c.

References fmInst_s::BytesNotUsed, dpuIf_t::DataBuf, fmInst_s::Dpu, fmInst_s::fForceBadFCS, fm_HDLC_FLAG_PATTERN, FM_LS_TX_BYTE_DELAY, FM_LS_TX_MIN_CLOSING_FLAGS, FM_LS_TX_STATE_DATA, FM_STATUS_TX_DATA_END_FLAG, FM_TRC_DATA_BEGIN, FM_TRC_DBG_LVL_2, FM_TRC_INVALID_MSG, fmDebugTrace(), fmMsgFifoPeek(), fmMsgFifoPop(), fmInst_s::FmNewModemMode, fmInst_s::FmState, fmInst_s::FmStatus, fmInst_s::Hdlc, fmInst_s::HdlcFlagsCnt, and fmInst_s::Tx.

Referenced by fmSendIn().

Here is the call graph for this function:

void fmStateTxLsData ( fmInst_t * inst )

Definition at line 224 of file fmstate.c.

References fmInst_s::BytesNotUsed, dpuIf_t::DataBuf, fmInst_s::Dpu, fm_HDLC_FLAG_PATTERN, FM_LS_TX_STATE_FLAG, FM_TRC_BAD_FRAME, FM_TRC_DBG_LVL_1, FM_TRC_DBG_LVL_2, FM_TRC_GOOD_FRAME, FM_TRC_TX_UNDERRUN, fmDebugTrace(), fmMsgFifoPeek(), fmMsgFifoPop(), fmInst_s::Hdlc, and fmInst_s::Tx.

Referenced by fmSendIn().

Here is the call graph for this function:

void fmStateTxHsInit ( fmInst_t * inst )

Definition at line 310 of file fmstate.c.

References fmInst_s::BytesNotUsed, dpuIf_t::CtrlParam, dpuIf_t::DataBuf, fmInst_s::DataRate, fmInst_s::Dpu, fm_ctrl_str::element_5, FM_DPU_DATA_BUF_SIZE, FM_STATUS_RESET_ALL, FM_TX_ECM_FLAG, FM_V21_FLAG, fmInst_s::FmBytesCnt, fmInst_s::FmEcmMode, fmInst_s::FmStatus, fmInst_s::Hdlc, fmInst_s::Tx, fmInst_s::TxEcmState, and fmInst_s::TxFillByte.

Referenced by fmModeChange().

void fmStateTxHsTraining ( fmInst_t * inst )

Definition at line 369 of file fmstate.c.

References fmInst_s::BytesNotUsed, fmInst_s::DataRate, FM_HS_TX_BYTE_DELAY, FM_HS_TX_STATE_DATA, FM_STATUS_TX_DATA_END_FLAG, FM_TRC_DATA_BEGIN, FM_TRC_DBG_LVL_2, FM_TRC_INVALID_MSG, fmDataRateTable, fmDebugTrace(), fmMsgFifoPeek(), and fmStateTxHsData().

Referenced by fmSendIn().

Here is the call graph for this function:

void fmStateTxHsData ( fmInst_t * inst )

Definition at line 448 of file fmstate.c.

References FM_HS_TX_STATE_PRE_OFF, FM_TRC_DATA_END, FM_TRC_DBG_LVL_2, FM_TRC_INVALID_MSG, FM_TRC_TX_UNDERRUN, fmDebugTrace(), fmMsgFifoPeek(), and fmMsgFifoPop().

Referenced by fmSendIn(), and fmStateTxHsTraining().

Here is the call graph for this function:

void fmStateTxHsEcm ( fmInst_t * inst )

Definition at line 582 of file fmstate.c.

References fmProtoStats_t::Bad_CRC_To_Tele, fmInst_s::BytesNotUsed, dpuIf_t::DataBuf, fmInst_s::DataRate, fmInst_s::Dpu, fmInst_s::fForceBadFCS, FM_DPU_DATA_BUF_SIZE, fm_HDLC_FLAG_PATTERN, FM_HS_TX_BYTE_DELAY, FM_STATUS_TX_DATA_END_FLAG, FM_TRC_BAD_FRAME, FM_TRC_DBG_LVL_1, FM_TRC_DBG_LVL_2, FM_TRC_TX_UNDERRUN, FM_TX_ECM_DATA, FM_TX_ECM_FLAG, fmInst_s::FmBytesCnt, fmDebugTrace(), fmMsgFifoPeek(), fmMsgFifoPop(), fmInst_s::FmNewModemMode, fmInst_s::FmStatus, fmUnPackData(), fmProtoStats_t::Good_CRC_To_Tele, fmInst_s::Hdlc, fmInst_s::HdlcFlagsCnt, fmInst_s::ProtoStats, fmInst_s::Tx, and fmInst_s::TxEcmState.

Referenced by fmSendIn().

Here is the call graph for this function:

void fmStateTxHsPreOff ( fmInst_t * inst )

Definition at line 743 of file fmstate.c.

References fmInst_s::BytesNotUsed, dpuIf_t::DataBuf, fmInst_s::DataRate, fmInst_s::Dpu, FM_STATUS_TX_DPU_FLUSH, fmInst_s::FmNewModemMode, fmInst_s::FmStatus, and fmInst_s::TxFillByte.

Referenced by fmSendIn().

void fmHdlcRx ( fmInst_t * inst )

Definition at line 778 of file fmstate.c.

References fmProtoStats_t::Bad_CRC_From_Tele, dpuIf_t::CtrlParam, dpuIf_t::DataBuf, fmInst_s::Dpu, fm_ctrl_str::element_5, FM_DPU_DATA_BUF_SIZE, fmContext, fmContext_t::fmGetTime, fmSendDataToFp(), fmSendOutSpec_t::fmSendOut, fmUnPackData(), fmProtoStats_t::Good_CRC_From_Tele, fmInst_s::Hdlc, fmInst_s::ProtoStats, fmInst_s::Rx, fmInst_s::SendOutSpec, and fmSendOutSpec_t::TargetInst.

Referenced by fmStateRx().

Here is the call graph for this function:

void fmStateRxInit ( fmInst_t * inst )

Definition at line 846 of file fmstate.c.

References FM_STATUS_RESET_ALL, fmInst_s::FmBytesCnt, fmInst_s::FmStatus, fmInst_s::Hdlc, fmInst_s::HdlcFlagsCnt, fmInst_s::numBytesStored, and fmInst_s::Rx.

Referenced by fmModeChange().

void fmStateRx ( fmInst_t * inst )

Definition at line 889 of file fmstate.c.

References dpuIf_t::CtrlParam, dpuIf_t::DataBuf, fmInst_s::Dpu, fm_ctrl_str::element_5, fmCheckCarrierOff(), fmCheckCarrierOn(), fmCheckP2(), fmCheckPreamble(), fmCheckSignalPresent(), fmCheckTep(), fmInst_s::FmEcmMode, fmHdlcRx(), fmRxMsgProcess(), fmSendDataToFp(), fmProtoStats_t::Non_HDLC_Rx_From_Tele, and fmInst_s::ProtoStats.

Referenced by fmSendIn().

Here is the call graph for this function:

void fmSendDataToFp | ( | fmInst_t * | inst,
 |  | tword * | data,
 |  | tuint | size,
 |  | tint | flush
 | ) |  |

Definition at line 944 of file fmstate.c.

References fmInst_s::fFmFpPacketizationMode, fmInst_s::FmFpData, fmPacketizeData(), fmShipOutData(), and fmInst_s::numBytesStored.

Referenced by fmCheckCarrierOff(), fmHdlcRx(), and fmStateRx().

Here is the call graph for this function:

void fmRxMsgProcess ( fmInst_t * inst )

Definition at line 983 of file fmstate.c.

References FM_TRC_DBG_LVL_2, FM_TRC_INVALID_MSG, fmDebugTrace(), fmMsgFifoPeek(), and fmMsgFifoPop().

Referenced by fmStateOffline(), and fmStateRx().

Here is the call graph for this function:


FM: fmstate.c Source File

fmstate.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: FM State Processing Functions
00003  ******************************************************************************
00004  * FILE NAME: fmstate.c
00005  *
00006  * DESCRIPTION:
00007  *            Processing of data and messages to and from the modem and
00008  *            interfacing with fax protocol. The FM is designed to be
00009  *            called at regular intervals to exchange PCM samples. The
00010  *            data is processed according to the FM state. The file
00011  *            contains functions that process PCM data and messages
00012  *            from the fax protocol in each of FM states
00013  *
00014  *  The FM software consists of the following states and the functions
00015  *  that are called to process data and messages in each state:
00016  *
00017  *  state                             function
00018  *  =====                             ========
00019  *  FM_OFFLINE_STATE                 fmStateOffline()
00020  *  FM_HS_RX_STATE                   fmStateHsRx()
00021  *  FM_LS_RX_STATE                   fmStateLsRx()
00022  *  FM_LS_TX_STATE_FLAG              fmStateTxLsFlag()
00023  *  FM_LS_TX_STATE_DATA              fmStateTxLsData()
00024  *  FM_LS_TX_STATE_FCS               fmStateTxLsFrameComp()
00025  *  FM_HS_TX_STATE_TRAINING          fmStateTxHsTraining()
00026  *  FM_HS_TX_STATE_DATA              fmStateTxHsData()
00027  *  FM_HS_TX_STATE_PRE_OFF           fmStateTxHsPreOff()
00028  *
00029  *  This file also contains the following functions in addition to those
00030  *  listed above:
00031  *
00032  *  fmStateTxLsInit()      Initialize variables for TX LS state
00033  *  fmStateTxHsInit()      Initialize variables for TX HS state
00034  *  fmStateRxLsInit()      Initialize variables for RX LS state
00035  *  fmStateRxHsInit()      Initialize variables for RX HS state
00036  *  fmHdlcRx()             Decode HDLC data received from the the DPU in
00037  *                          LS RX state and pass the data and status to
00038  *                          the fax protocol
00039  * DATE         Programmer      Description
00040  * ====         ==========      ===========
00041  * 10-Jan-00    F. Fruth        Creation of file.
00042  * 19-Jan-00    J. Wright       Implemented changes to include broader message
00043  *                              type handling capabilities.
00044  * 26-Jan-00    J. Wright       More changes as a result of going over code w/
00045  *                              Frank.
00046  *
00047  * (C) Copyright 2000, TELOGY Networks, Inc.
00048  *****************************************************************************/
00049 #include <ti/mas/types/types.h>
00050 #include "fm.h"
00051 #include "fmloc.h"
00052 #include "fmtrace.h"
00053 #include <ti/mas/util/pkt.h>
00054 /* #include "fmport.h" */
00055
00056 /****************************************************************************
00057  * FUNCTION PURPOSE:  Process data and messages in offline state
00058  ****************************************************************************
00059  * DESCRIPTION:   This function checks processes PCM samples received from
00060  *                the PCM interface and the messages received from the fax
00061  *                protocol unit. The processing of messages is not done for
00062  *                some time when we enter the OFFLINE state. This is
00063  *                neccessary to provide silence between various modes of
00064  *                data transmission
00065  *
00066  * PARAMETERS:    fmInst_t *inst     Pointer to the FM instance structure
00067  *
00068  * RETURN:        void
00069  ***************************************************************************/
00070 void fmStateOffline (fmInst_t *inst)
00071 {
00072   /* check for new mode message */
00073   fmRxMsgProcess (inst);
00074
00075 } /* fmStateOffline */
00076
00077 /****************************************************************************
00078  * FUNCTION PURPOSE:  Initialize LS TX state variables
00079  ****************************************************************************
00080  * DESCRIPTION:   This function is called to initialize the variables in
00081  *                LS TX state.
00082  *
00083  * PARAMETERS:    fmInst_t *inst - Pointer to the FM instance structure
00084  *
00085  * RETURN:        void
00086  ***************************************************************************/
00087 void fmStateTxLsInit (fmInst_t *inst)
00088 {
00089   hdlcTxInit_t init;
00090
00091   init.minFlagsCnt = 2;
00092
00093   hdlcTxInit (&inst->Hdlc.Tx, &init);
00094
00095   /* send flags at first */
00096   inst->FmState = FM_LS_TX_STATE_FLAG;
00097
00098   /* number of hdlc flags received */
00099   inst->HdlcFlagsCnt = inst->FmBytesCnt = 0;
00100
00101   /* prepare transmit for V.21 transparent synchronous framing mode */
00102   inst->Dpu.DataBuf[0] = FM_V21_FLAG;
00103
00104   /* initialize the fax modem LS Tx variables */
00105   inst->BytesNotUsed = 1;
00106   inst->Dpu.CtrlParam.element_5 = 0;
00107
00108   /* reset fm status bits */
00109   inst->FmStatus = FM_STATUS_RESET_ALL;
00110 }
00111
00112 /****************************************************************************
00113  * FUNCTION PURPOSE:  Process PCM data and messages in LS TX FLAG state
00114  ****************************************************************************
00115  * DESCRIPTION:   This function processes PCM data and messages in LS TX
00116  *                state. We pass data to the modem one byte at a time.
00117  *
00118  *                Pseudocode for processing in this state:
00119  *
00120  *                if the modem has used last byte
00121  *                  get a flag from HDLC and increment flag counter
00122  *                  if HDLC is ready to accept data
00123  *                    if we have LS DATA in message FIFO
00124  *                      if we have a collected some LS DATA in message FIFO
00125  *                        change state to TX LS DATA.
00126  *                      else
00127  *                        wait and timeout and turn the modem off if we have
00128  *                        not collected some LS DATA in the message FIFO in
00129  *                        a certain time
00130  *                    if we have a MODE message in the FIFO
00131  *                      wait until we have sent minimum number of closing flags
00132  *                      and then change modem mode
00133  *                    else
00134  *                      ignore and drop the message in the FIFO
00135  *                  copy the data to the DPU buffer
00136  *
00137  * PARAMETERS:    fmInst_t *inst     Pointer to the FM instance structure
00138  *
00139  * RETURN:        void
00140  ***************************************************************************/
00141 void fmStateTxLsFlag (fmInst_t *inst)
00142 {
00143   tword HdlcData;
00144   tuint DataCount;
00145   iffaxFpFmMsg_t CurrMsg;
00146
00147   if (inst->BytesNotUsed == 0)
00148   {
00149     inst->HdlcFlagsCnt++;
00150     hdlcTxConfig (&inst->Hdlc.Tx, &HdlcData, 1);
00151     hdlcTxFlags (&inst->Hdlc.Tx, 1, fm_HDLC_FLAG_PATTERN);
00152     inst->BytesNotUsed = 1;
00153     inst->Dpu.DataBuf[0] = HdlcData >> (TYP_TWORD_SIZE - 8);
00154
00155     if (fmMsgFifoPeek(inst, &DataCount, &CurrMsg) == TRUE)
00156     {
00157       switch (CurrMsg.MsgId)
00158       {
00159         case iffax_FP_FM_DATA:
00160           if ((DataCount >= FM_LS_TX_BYTE_DELAY) || (inst->FmStatus & FM_STATUS_TX_DATA_END_FLAG))
00161           {
00162             inst->fForceBadFCS = FALSE;
00163             inst->FmStatus &= (~FM_STATUS_TX_DATA_END_FLAG);
00164             fmDebugTrace (inst, FM_TRC_DBG_LVL_2, FM_TRC_DATA_BEGIN, inst->HdlcFlagsCnt);
00165             inst->FmState = FM_LS_TX_STATE_DATA;
00166           }
00167         break;
00168
00169         case iffax_FP_FM_FRAME_COMP:
00170            /* Ignore Frame complete message */
00171            fmDebugTrace (inst,(tuint)FM_TRC_DBG_LVL_2, (tuint)FM_TRC_INVALID_MSG, (tuint)(CurrMsg.MsgId));
00172            fmMsgFifoPop (inst, &CurrMsg);
00173         break;
00174
00175         default:
00176           if (inst->HdlcFlagsCnt > FM_LS_TX_MIN_CLOSING_FLAGS)
00177           {
00178             if (CurrMsg.MsgId != iffax_FP_FM_MODE)
00179             {
00180               fmDebugTrace (inst, (tuint)FM_TRC_DBG_LVL_2, (tuint)FM_TRC_INVALID_MSG, (tuint)(CurrMsg.MsgId));
00181             }
00182             inst->FmNewModemMode = TRUE;
00183           }
00184         break;
00185
00186       }
00187     }
00188   }
00189
00190 } /* fmStateTxLsFlag */
00191
00192 /****************************************************************************
00193  * FUNCTION PURPOSE:  Process data and messages in LS TX DATA state
00194  ****************************************************************************
00195  * DESCRIPTION:   This function processes PCM data and messages in LS TX
00196  *                state. We pass data to the modem one byte at a time.
00197  *
00198  *                Pseudocode for processing in this state:
00199  *
00200  *                if the modem has used last byte
00201  *                  if HDLC is not ready to accept data
00202  *                    get an encoded byte from HDLC
00203  *                  else
00204  *                  if we do not have any LS DATA in message FIFO
00205  *                    if HDLC may accept a byte
00206  *                      get an encoded byte from HDLC
00207  *                    else
00208  *                      underrun, fill with a flag
00209  *                  else
00210  *                    if we have LS DATA in message FIFO
00211  *                      pass the data byte to HDLC for processing and get an
00212  *                      encoded byte
00213  *                    if we have FRAME COMP in message FIFO
00214  *                      generate good or bad FCS from HDLC and change state
00215  *                      to LS TX FRAME COMP
00216  *                    else
00217  *                      generate bad FCS and change state to LS TX FRAME COMP
00218  *                  copy the data to the DPU buffer
00219  *
00220  * PARAMETERS:    fmInst_t *inst     Pointer to the FM instance structure
00221  *
00222  * RETURN:        void
00223  ***************************************************************************/
00224 void fmStateTxLsData (fmInst_t *inst)
00225 {
00226   tword hdlcEncodedData, hdlc_stat;
00227   tuint DataCount;
00228   iffaxFpFmMsg_t CurrMsg;
00229   tword fillWord = 0x0000;
00230   tuint fillWord_idx = 0;
00231
00232   if (inst->BytesNotUsed == 0)
00233   {
00234     hdlcTxConfig (&inst->Hdlc.Tx, &hdlcEncodedData,1);
00235     hdlc_stat = hdlcTxFlags (&inst->Hdlc.Tx, 0, fm_HDLC_FLAG_PATTERN);
00236     inst->BytesNotUsed = 1;
00237
00238     if (hdlc_stat & hdlc_TX_CONTINUE)
00239     {
00240       if (fmMsgFifoPeek(inst, &DataCount, &CurrMsg) == FALSE)
00241       {
00242         fmDebugTrace (inst, FM_TRC_DBG_LVL_2, FM_TRC_TX_UNDERRUN, inst->FmBytesCnt);
00243         inst->ProtoStats.HDLC_Tx_Underflow ++;
00244         hdlcTxData (&inst->Hdlc.Tx, &fillWord, &fillWord_idx, 1);
00245         inst->HdlcFlagsCnt = 0;
00246         inst->fForceBadFCS = TRUE;
00247       }
00248       else
00249       {
00250         switch (CurrMsg.MsgId)
00251         {
00252           case iffax_FP_FM_FRAME_COMP:
00253             if (CurrMsg.MsgBody.FrameComp.FrameFcs == iffax_FCS_GOOD
00254                 && inst->fForceBadFCS == FALSE)
00255             {
00256               fmDebugTrace (inst, FM_TRC_DBG_LVL_1, FM_TRC_GOOD_FRAME, inst->FmBytesCnt);
00257               inst->ProtoStats.Good_CRC_To_Tele++;
00258               hdlcTxFcs (&inst->Hdlc.Tx, TRUE);
00259             }
00260             else
00261             {
00262               fmDebugTrace (inst, FM_TRC_DBG_LVL_1, FM_TRC_BAD_FRAME, inst->FmBytesCnt);
00263               inst->ProtoStats.Bad_CRC_To_Tele++;
00264               hdlcTxFcs (&inst->Hdlc.Tx, FALSE);
00265             }
00266
00267             inst->FmState = FM_LS_TX_STATE_FLAG;
00268             inst->FmBytesCnt = 0;
00269             inst->HdlcFlagsCnt = 0;
00270             fmMsgFifoPop(inst, &CurrMsg);
00271           break;
00272
00273           case iffax_FP_FM_DATA:
00274             hdlcTxData (&inst->Hdlc.Tx, CurrMsg.MsgBody.DataPayload.DataAddr,
00275                         &inst->FmBytesCnt, CurrMsg.MsgBody.DataPayload.numBytes);
00276
00277             /* check if all bytes in the buffer have been used */
00278             if (inst->FmBytesCnt == CurrMsg.MsgBody.DataPayload.numBytes)
00279             {
00280               fmMsgFifoPop(inst,&CurrMsg);
00281               inst->FmBytesCnt = 0;
00282             }
00283
00284           break;
00285
00286           default:
00287             hdlcTxAbort (&inst->Hdlc.Tx);
00288             inst->ProtoStats.Bad_CRC_To_Tele++;
00289             inst->FmState = FM_LS_TX_STATE_FLAG;
00290             inst->HdlcFlagsCnt = 0;
00291           break;
00292         }
00293       }
00294     }
00295
00296   inst->Dpu.DataBuf[0] = hdlcEncodedData >> (TYP_TWORD_SIZE - 8);
00297   }
00298 } /* fmStateTxLsData */
00299
00300 /****************************************************************************
00301  * FUNCTION PURPOSE:  Initialize HS TX state variables
00302  ****************************************************************************
00303  * DESCRIPTION:   This function is called to initialize the variables in
00304  *                HS TX state.
00305  *
00306  * PARAMETERS:    fmInst_t *inst     Pointer to the FM instance structure
00307  *
00308  * RETURN:        void
00309  ***************************************************************************/
00310 void fmStateTxHsInit (fmInst_t *inst)
00311 {
00312   tuint i;
00313   hdlcTxInit_t init;
00314
00315   /* Initialize hdlc software */
00316   init.minFlagsCnt = 2;
00317   hdlcTxInit (&inst->Hdlc.Tx, &init);
00318
00319   inst->FmBytesCnt              = 0;
00320   inst->FmStatus                = FM_STATUS_RESET_ALL;
00321   inst->Dpu.CtrlParam.element_5 = 0;
00322   inst->BytesNotUsed            = inst->DataRate;
00323
00324   /* Initialize the FM Tx state */
00325   if (inst->FmEcmMode == TRUE)
00326   {
00327     inst->TxEcmState = FM_TX_ECM_FLAG;
00328   }
00329
00330   /* Initialize the DPU data buffer */
00331   for (i = 0; i < FM_DPU_DATA_BUF_SIZE; i++)
00332   {
00333     if (inst->FmEcmMode == FALSE)
00334     {
00335       inst->Dpu.DataBuf[i] = inst->TxFillByte;
00336     }
00337     else
00338     {
00339       inst->Dpu.DataBuf[i] = FM_V21_FLAG;
00340     }
00341   }
00342 }
00343
00344 /****************************************************************************
00345  * FUNCTION PURPOSE:  Process data and messages in HS TX TRAINING state
00346  ****************************************************************************
00347  * DESCRIPTION:   This state is for TRAINING the DPU before transmitting
00348  *                HS DATA. We wait for the modem to end TRAINING and then
00349  *                pass fill bytes (inst->TxFillByte) to the modem until we
00350  *                have collected some HS data buffers for transmission. Note
00351  *                that since the DPU data buffer is filled with the fill
00352  *                pattern during initialization, we do not need to copy fill
00353  *                pattern in this state.
00354  *
00355  *                Pseudocode for processing in this state is as follows:
00356  *
00357  *                if the modem has used some data bytes (i.e. TRAINING has ended)
00358  *                  if we have collected a certain number of HS DATA buffers
00359  *                    change to HS TX DATA state
00360  *                  else
00361  *                    change the modem mode since we have received an invalid
00362  *                    message
00363  *                  pass the buffer with fill bytes to the modem
00364  *
00365  * PARAMETERS:    fmInst_t *inst     Pointer to the FM instance structure
00366  *
00367  * RETURN:        void
00368  ***************************************************************************/
00369 void fmStateTxHsTraining (fmInst_t *inst)
00370 {
00371   tuint          DataCount;     /* Retreive number of data bytes on msg FIFO */
00372   iffaxFpFmMsg_t CurrMsg;       /* Message on top of FIFO */
00373   tuint          dataBytesReqd; /* # bytes required before trasnmission */
00374
00375   if (inst->BytesNotUsed < inst->DataRate)
00376   {
00377     if (fmMsgFifoPeek (inst, &DataCount, &CurrMsg) == TRUE)
00378     {
00379       /* we can only process high speed page data in this state */
00380       switch (CurrMsg.MsgId)
00381       {
00382         case iffax_FP_FM_DATA:
00383           /* compute the number of bytes required before we begin transmitting */
00384           dataBytesReqd = (tuint) FM_HS_TX_BYTE_DELAY *
00385                            fmDataRateTable[(tint) inst->fmCurrMode.Modulation];
00386
00387           /* Begin transmitting data if we have enough data, or if we have detected
00388             an end of data indication */
00389           if ((DataCount >= dataBytesReqd) || (inst->FmStatus & FM_STATUS_TX_DATA_END_FLAG))
00390           {
00391             inst->FmStatus &= (~FM_STATUS_TX_DATA_END_FLAG);
00392             inst->FmState = FM_HS_TX_STATE_DATA;
00393             fmDebugTrace (inst, FM_TRC_DBG_LVL_2, FM_TRC_DATA_BEGIN, DataCount);
00394             fmStateTxHsData (inst);
00395           }
00396          break;
00397
00398          default:
00399           fmDebugTrace (inst,(tuint)FM_TRC_DBG_LVL_2,(tuint)FM_TRC_INVALID_MSG,(tuint)(CurrMsg.MsgId));
00400           inst->FmNewModemMode = TRUE;
00401          break;
00402       } /* switch */
00403
00404     } /* if (fmMsgFifoPeek) */
00405
00406     /* the data buffer is filled with the fill pattern */
00407     inst->BytesNotUsed = inst->DataRate;
00408   }
00409 } /* fmStateHsTxTraining */
00410
00411 /****************************************************************************
00412  * FUNCTION PURPOSE:  Process data and message in HS TX DATA state
00413  ****************************************************************************
00414  * DESCRIPTION:   HS data is processed and passed to the DPU in this state.
00415  *                We pass HS data directly to the modem by filling the DPU
00416  *                data buffer with data equivalent to inst->DataRate. (The
00417  *                HDLC engine is bypassed since the HS data is not ECM). If
00418  *                we run out of HS DATA messages in the message FIFO, we
00419  *                start sending fill bytes (inst->TxFillByte).
00420  *
00421  *                Pseudocode for processing in this state is as follows:
00422  *
00423  *                if we have a message in the message FIFO
00424  *                  if message is HS DATA
00425  *                    initialize data pointers
00426  *                  else
00427  *                    set the fill flag
00428  *                    change state to HS TX PRE OFF
00429  *                else
00430  *                  there is no message in message FIFO; set the fill flag
00431  *
00432  *                loop until the DPU data buffer is not filled
00433  *                  get another HS DATA buffer when we reach the end of
00434  *                  HS DATA buffer. If no HS DATA buffer is available, send
00435  *                  fill bytes to the DPU. If we have a message other then
00436  *                  HS DATA, change state to HS TX PRE OFF and start sending
00437  *                  fill bytes
00438  *
00439  *                save the location of the where to start taking out bytes
00440  *                in the HS DATA buffer next time
00441  *
00442  *                pass data to the modem
00443  *
00444  * PARAMETERS:    fmInst_t *inst     Pointer to the FM instance structure
00445  *
00446  * RETURN:        void
00447  ***************************************************************************/
00448 void fmStateTxHsData (fmInst_t *inst)
00449 {
00450   tuint          i, j;        /* Loop counters */
00451   tuint          DataCount;   /* # of data bytes on msg FIFO */
00452   tword          *DataPtr;    /* Pointer to the data buffer */
00453   iffaxFpFmMsg_t CurrMsg;     /* Message on top of the message FIFO */
00454   tint          FillFlag;    /* Check if we need to fill page data */
00455
00456   /* Initialize local variables */
00457   FillFlag = FALSE;
00458
00459   /* We enter this state only if we have a message with HS data in the message */
00460   /* FIFO.  When we see a message other than HS data, we leave this state.     */
00461   if (fmMsgFifoPeek (inst, &DataCount, &CurrMsg) == TRUE)
00462   {
00463     if (CurrMsg.MsgId == iffax_FP_FM_DATA)
00464     {
00465       DataPtr = CurrMsg.MsgBody.DataPayload.DataAddr;
00466     }
00467     else
00468     {
00469       FillFlag = TRUE;
00470       inst->FmState = FM_HS_TX_STATE_PRE_OFF;
00471       fmDebugTrace (inst, FM_TRC_DBG_LVL_2, FM_TRC_DATA_END, inst->FmBytesCnt);
00472     }
00473   } /* if (Peek() == TRUE) */
00474
00475   else
00476   {
00477     FillFlag = TRUE;
00478     inst->ProtoStats.Non_HDLC_Tx_Underflow += (inst->DataRate - inst->BytesNotUsed);
00479     fmDebugTrace (inst, FM_TRC_DBG_LVL_2, FM_TRC_TX_UNDERRUN, inst->FmBytesCnt);
00480   }
00481
00482   /* Copy data being passed to the modem */
00483   for (i = inst->BytesNotUsed, j = inst->FmBytesCnt; i < inst->DataRate; i++, j++)
00484   {
00485     if (FillFlag == FALSE)
00486     /* We are passing actual message data */
00487     {
00488       /* If we reach end of msg data buffer, check message FIFO for another */
00489       if (j == CurrMsg.MsgBody.DataPayload.numBytes)
00490       {
00491         j = 0;
00492         fmMsgFifoPop (inst, &CurrMsg);
00493
00494         /* Check FIFO for another buffer */
00495         if (fmMsgFifoPeek (inst, &DataCount, &CurrMsg) == TRUE)
00496         {
00497           switch (CurrMsg.MsgId)
00498           {
00499             case iffax_FP_FM_DATA:
00500               DataPtr = CurrMsg.MsgBody.DataPayload.DataAddr;
00501               break;
00502
00503             default:
00504               if (CurrMsg.MsgId != iffax_FP_FM_MODE)
00505               {
00506                 fmDebugTrace (inst,(tuint)FM_TRC_DBG_LVL_2,(tuint)FM_TRC_INVALID_MSG,(tuint)(CurrMsg.MsgId));
00507               }
00508               FillFlag = TRUE;
00509             break;
00510           }
00511         } /* if (Peek() == TRUE) */
00512
00513         else
00514         /* No more high speed data available, so fill page data */
00515         {
00516           FillFlag = TRUE;
00517           inst->ProtoStats.Non_HDLC_Tx_Underflow += (inst->DataRate - inst->BytesNotUsed);
00518           fmDebugTrace (inst, FM_TRC_DBG_LVL_2, FM_TRC_TX_UNDERRUN, inst->FmBytesCnt);
00519         }
00520       } /* if (j == numBytes) */
00521     } /* if (FillFlag == FALSE) */
00522
00523     if (FillFlag == TRUE)
00524     /* Check if we need to fill page data. */
00525     {
00526       inst->Dpu.DataBuf[i] = inst->TxFillByte;
00527     }
00528
00529     else
00530     /* Actual message data - unpack the message data buffer and copy data into
00531        the DPU buffer. */
00532     {
00533 #if 0
00534     if ((j & 0x0001) == 0x0000)
00535       /* Even byte */
00536       {
00537         inst->Dpu.DataBuf[i] = *(DataPtr + (j >> 1)) >> 8;
00538       }
00539       else
00540       /* Odd byte */
00541       {
00542         inst->Dpu.DataBuf[i] = *(DataPtr + (j >> 1)) & 0x00FF;
00543       }
00544 #else
00545     inst->Dpu.DataBuf[i] = (tword) pktRead8bits(DataPtr,j);
00546 #endif
00547     }
00548   }
00549
00550   inst->ProtoStats.Non_HDLC_Tx_To_Tele += inst->DataRate;
00551
00552   /* Save the number of bytes we removed from the data buffer so we can */
00553   /* start from there next time. */
00554   if (FillFlag == TRUE)
00555   {
00556     inst->FmBytesCnt = 0;  /* Need to start from beginning */
00557   }
00558
00559   else
00560   {
00561     inst->FmBytesCnt = j;  /* Number of bytes taken out of data buffer */
00562   }
00563
00564   /* Number of bytes passed to the modem */
00565   inst->BytesNotUsed = inst->DataRate;
00566
00567 }  /* fmStateHsTxData */
00568
00569 /****************************************************************************
00570  * FUNCTION PURPOSE:  Process data and message in HS TX DATA state (ECM mode)
00571  ****************************************************************************
00572  * DESCRIPTION:   The HS data is processed and passed to the DPU in this
00573  *                state. We pass HS data to the modem by filling the DPU
00574  *                data buffer with data equivalent to inst->DataRate. If
00575  *                we run out of HS DATA messages in the message FIFO, we
00576  *                start sending flags.
00577  *
00578  * PARAMETERS:    fmInst_t *inst     Pointer to the FM instance structure
00579  *
00580  * RETURN:        void
00581  ***************************************************************************/
00582 void fmStateTxHsEcm (fmInst_t *inst)
00583 {
00584   tuint status,DataCount, bytes_reqd;
00585   tword TempHdlcBuf[FM_DPU_DATA_BUF_SIZE];
00586   iffaxFpFmMsg_t CurrMsg;
00587   tint msg_flag;
00588   tword fillWord = 0x0000;
00589   tuint fillWord_idx = 0;
00590   tint dbgTraceFlag = FALSE;
00591
00592   bytes_reqd = inst->DataRate - inst->BytesNotUsed;
00593
00594   if (bytes_reqd > 0)
00595   {
00596      status = hdlcTxConfig (&inst->Hdlc.Tx, &TempHdlcBuf[0], bytes_reqd);
00597
00598      while (status & hdlc_TX_CONTINUE)
00599      {
00600        msg_flag = fmMsgFifoPeek (inst, &DataCount, &CurrMsg);
00601
00602        switch (inst->TxEcmState)
00603        {
00604         case FM_TX_ECM_FLAG:
00605            if (msg_flag == TRUE)
00606            {
00607              switch (CurrMsg.MsgId)
00608              {
00609                case iffax_FP_FM_DATA:
00610                   if ((DataCount >= inst->DataRate * FM_HS_TX_BYTE_DELAY) || (inst->FmStatus & FM_STATUS_TX_DATA_END_FLAG))
00611                   {
00612                      inst->fForceBadFCS = FALSE;
00613                      inst->FmStatus  &= (~FM_STATUS_TX_DATA_END_FLAG);
00614                      inst->TxEcmState = FM_TX_ECM_DATA;
00615                   }
00616                   else
00617                   {
00618                      status = hdlcTxFlags (&inst->Hdlc.Tx, bytes_reqd, fm_HDLC_FLAG_PATTERN);
00619                      inst->HdlcFlagsCnt += bytes_reqd;
00620                   }
00621                   break;
00622
00623                case iffax_FP_FM_FRAME_COMP:
00624                   /* ignore an frame complete received without data */
00625                   fmMsgFifoPop (inst, &CurrMsg);
00626                   break;
00627
00628                default:
00629                  status = hdlcTxFlags (&inst->Hdlc.Tx, bytes_reqd, fm_HDLC_FLAG_PATTERN);
00630                  inst->HdlcFlagsCnt += bytes_reqd;
00631
00632                  /* We generate twice the data rate flags to ensure that all data */
00633                  /* has been flushed out of the DPU, and that we do not stop */
00634                  /* transmission in the middle of a data frame */
00635                  if (inst->HdlcFlagsCnt > (inst->DataRate * 2))
00636                  {
00637                    inst->FmNewModemMode = TRUE;
00638                  }
00639                  break;
00640              }
00641            }
00642            else
00643            {
00644              /* No data or message pending, continue to send flags... */
00645              status = hdlcTxFlags (&inst->Hdlc.Tx, bytes_reqd, fm_HDLC_FLAG_PATTERN);
00646              inst->HdlcFlagsCnt += bytes_reqd;
00647            }
00648            break;
00649
00650         case FM_TX_ECM_DATA:
00651            if (msg_flag == FALSE)
00652            {
00653              if (dbgTraceFlag == FALSE)
00654              {
00655                 fmDebugTrace (inst, FM_TRC_DBG_LVL_2, FM_TRC_TX_UNDERRUN, inst->FmBytesCnt);
00656                 inst->ProtoStats.HDLC_Tx_Underflow ++;
00657                 dbgTraceFlag = TRUE;
00658              }
00659              status = hdlcTxData (&inst->Hdlc.Tx, &fillWord, &fillWord_idx, 1);
00660              fillWord_idx = 0;
00661              inst->HdlcFlagsCnt = 0;
00662              inst->fForceBadFCS = TRUE;
00663            }
00664            else
00665            {
00666              switch (CurrMsg.MsgId)
00667              {
00668                case iffax_FP_FM_DATA:
00669                   status = hdlcTxData (&inst->Hdlc.Tx, CurrMsg.MsgBody.DataPayload.DataAddr,
00670                                  &inst->FmBytesCnt, CurrMsg.MsgBody.DataPayload.numBytes);
00671
00672                   /* Check if we are at the end of the data buffer */
00673                   if (inst->FmBytesCnt == CurrMsg.MsgBody.DataPayload.numBytes)
00674                   {
00675                      inst->FmBytesCnt = 0;
00676                      fmMsgFifoPop (inst, &CurrMsg);
00677                   }
00678                   break;
00679
00680                case iffax_FP_FM_FRAME_COMP:
00681                   if ((CurrMsg.MsgBody.FrameComp.FrameFcs == iffax_FCS_GOOD) &&
00682                       (inst->fForceBadFCS == FALSE))
00683                   {
00684                      status = hdlcTxFcs (&inst->Hdlc.Tx, TRUE);
00685                      inst->ProtoStats.Good_CRC_To_Tele++;
00686                   }
00687
00688                   else
00689                   {
00690                      status = hdlcTxFcs (&inst->Hdlc.Tx,FALSE);
00691                      fmDebugTrace (inst, FM_TRC_DBG_LVL_1, FM_TRC_BAD_FRAME, inst->FmBytesCnt);
00692                      inst->ProtoStats.Bad_CRC_To_Tele++;
00693                   }
00694
00695                   fmMsgFifoPop (inst, &CurrMsg);
00696                   inst->TxEcmState = FM_TX_ECM_FLAG;
00697                   inst->HdlcFlagsCnt = 0;
00698                   break;
00699
00700                default:
00701                   hdlcTxAbort (&inst->Hdlc.Tx);
00702                   inst->ProtoStats.Bad_CRC_To_Tele++;
00703                   inst->TxEcmState = FM_TX_ECM_FLAG;
00704                   inst->HdlcFlagsCnt = 0;
00705                   break;
00706              } /* switch (CurrMsg.MsgId) */
00707            } /* */
00708
00709            break;
00710        }
00711      }
00712 #if 0
00713      fmUnPackData (&TempHdlcBuf[0], (tword *) &inst->Dpu.DataBuf[inst->BytesNotUsed], bytes_reqd);
00714 #else
00715      pktUnpackWordsIntoBytes(&TempHdlcBuf[0], (tword *) &inst->Dpu.DataBuf[inst->BytesNotUsed], bytes_reqd,0);
00716 #endif
00717      inst->BytesNotUsed = inst->DataRate;
00718   }
00719
00720 } /* fmStateHsTxDataEcm */
00721
00722 /****************************************************************************
00723  * FUNCTION PURPOSE:  Process data and message in HS TX PRE OFF state
00724  ****************************************************************************
00725  * DESCRIPTION:   This state is intended to flush out the internal buffers of
00726  *                DPU and transmit all high speed data buffers. Two frames
00727  *                of fill bytes are passed to the modem and they ensure
00728  *                that all data bytes have been transmitted.
00729
00730  *                Pseudocode for processing in this state is as follows:
00731  *
00732  *                if we have sent two frames of fill bytes
00733  *                  change modem mode
00734  *                else
00735  *                  set a flag to indicate that we have sent one frame
00736  *                  of fill bytes
00737  *                fill the DPU data buffer with fill bytes
00738  *
00739  * PARAMETERS:    fmInst_t *inst     Pointer to the FM instance structure
00740  *
00741  * RETURN:        void
00742  ***************************************************************************/
00743 void fmStateTxHsPreOff (fmInst_t *inst)
00744 {
00745   /* Make sure that we flush out the modem completely by sending two frames  */
00746   /* of fill bytes before we turn the modem off - one frame partially filled */
00747   /* and the other completely filled with the fill pattern. */
00748   if (inst->FmStatus & FM_STATUS_TX_DPU_FLUSH)
00749   {
00750     inst->FmNewModemMode = TRUE;
00751   }
00752   else
00753   {
00754     inst->FmStatus |= FM_STATUS_TX_DPU_FLUSH;
00755   }
00756
00757   while (inst->BytesNotUsed < inst->DataRate)
00758   {
00759     inst->Dpu.DataBuf[inst->BytesNotUsed++] = inst->TxFillByte;
00760   }
00761
00762 } /* fmStateHsTxPreOff */
00763
00764 /****************************************************************************
00765  * FUNCTION PURPOSE:  Decode HDLC data and pass it to the fax protocol
00766  ****************************************************************************
00767  * DESCRIPTION:   This function calls the HDLC processing function and passes
00768  *                the data to HDLC for decoding. The HDLC processing
00769  *                function returns DATA and STATUS which is used by the
00770  *                function for reporting the status and passing the data to
00771  *                the fax protocol.
00772  *
00773  * PARAMETERS:    fmInst_t *inst      Pointer to the FM instance structure
00774  *                tuint     data      LS data received from the DPU
00775  *
00776  * RETURN:        void
00777  ***************************************************************************/
00778 void fmHdlcRx (fmInst_t *inst)
00779 {
00780   tuint          TempBufCnt;
00781   iffaxFmFpMsg_t TempMsg;
00782   tword          TempBufPacked   [FM_DPU_DATA_BUF_SIZE];
00783   tword          TempBufUnpacked [FM_DPU_DATA_BUF_SIZE];
00784   tuint          status;
00785
00786   /* initialize local variables */
00787   TempBufCnt = 0;
00788   TempMsg.MsgId = iffax_FM_FP_FRAME_COMP;
00789   TempMsg.Timestamp = (tuint) (fmContext.fmGetTime) ();
00790   pktPackBytesIntoWords((tword *) &inst->Dpu.DataBuf[0], (tword *) &inst->Dpu.DataBuf[0],
00791                     inst->Dpu.CtrlParam.element_5,0);
00792
00793   hdlcRxConfig (&inst->Hdlc.Rx, (tword *) &inst->Dpu.DataBuf[0], inst->Dpu.CtrlParam.element_5);
00794
00795   do
00796   {
00797   status = hdlcRx (&inst->Hdlc.Rx, TempBufPacked, &TempBufCnt, FM_DPU_DATA_BUF_SIZE);
00798
00799   /* check for end of frame and process it */
00800   if (status & (hdlc_RX_FRAME_ABORT | hdlc_RX_FRAME_END))
00801   {
00802     /* default for bad frame and abort case */
00803     TempMsg.MsgBody.FrameComp.FrameFcs = iffax_FCS_BAD;
00804     if (status & hdlc_RX_FRAME_GOOD) /* for good fcs */
00805     {
00806       TempMsg.MsgBody.FrameComp.FrameFcs = iffax_FCS_GOOD;
00807       inst->ProtoStats.Good_CRC_From_Tele++;
00808     }
00809     else
00810     {
00811       inst->ProtoStats.Bad_CRC_From_Tele++;
00812     }
00813
00814 #if 0
00815   fmUnPackData (TempBufPacked, TempBufUnpacked, TempBufCnt);
00816 #else
00817   pktUnpackWordsIntoBytes(TempBufPacked,TempBufUnpacked,TempBufCnt,0);
00818 #endif
00819
00820     fmSendDataToFp (inst, TempBufUnpacked, TempBufCnt, TRUE);
00821     TempBufCnt = 0;
00822       (*inst->SendOutSpec.fmSendOut) (inst->SendOutSpec.TargetInst, &TempMsg);
00823   }
00824
00825   } while ((status & hdlc_RX_BUFFER_END) == 0);
00826
00827 #if 0
00828   fmUnPackData (TempBufPacked, TempBufUnpacked, TempBufCnt);
00829 #else
00830   pktUnpackWordsIntoBytes(TempBufPacked,TempBufUnpacked,TempBufCnt,0);
00831 #endif
00832
00833   fmSendDataToFp (inst, TempBufUnpacked, TempBufCnt, FALSE);
00834 } /* End { fmHdlcRx() } */
00835
00836 /****************************************************************************
00837  * FUNCTION PURPOSE:  Initialize HS & LS RX state variables
00838  ****************************************************************************
00839  * DESCRIPTION:   This function is called to initialize the variables in
00840  *                HS and LS RX state.
00841  *
00842  * PARAMETERS:    fmInst_t *inst     Pointer to the FM instance structure
00843  *
00844  * RETURN:        void
00845  ***************************************************************************/
00846 void fmStateRxInit (fmInst_t *inst)
00847 {
00848   hdlcRxInit_t init;
00849
00850   hdlcRxInit (&inst->Hdlc.Rx,&init);
00851   inst->FmStatus = FM_STATUS_RESET_ALL;
00852   inst->FmBytesCnt = 0;
00853   inst->HdlcFlagsCnt = 0;
00854   inst->numBytesStored = 0;
00855 }
00856
00857 /****************************************************************************
00858  * FUNCTION PURPOSE:  Process data and messages in LS or HS RX state
00859  ****************************************************************************
00860  * DESCRIPTION:   This state is for passing HS data received from the modem
00861  *                to the fax protocol by packing it into HS DATA buffers. The
00862  *                HS DATA buffers are allocated by calling a function outside
00863  *                FM and are passed with the message to the fax protocol.
00864  *                Note that the DPU can provide a few bytes more then the
00865  *                inst->DataRate because of difference in the clock rates
00866  *                of the transmitting modem and DPU. Note that we do not
00867  *                process HS data if we have detected preamble since we
00868  *                are getting low speed data. In that case we wait for the
00869  *                fax protocol to put the FM in LS RX mode. The Pseudocode
00870  *                for processing in this this state is as follows:
00871  *
00872  *                check for preamble, P2 and TEP and report to fax protocol
00873  *                if the carrier is on and preamble has not been detected
00874  *                  if DPU has passed us some data
00875  *                    get a HS DATA buffer and copy the data from the DPU
00876  *                    buffer into the HS DATA buffer and send a HS DATA
00877  *                    message to the fax Protocol
00878  *                    reset the DPU data counter
00879  *                if the carrier is off or preamble was detected
00880  *                  if we have a mode message in the message FIFO
00881  *                    change modem mode
00882  *                  else
00883  *                    drop the message
00884  *
00885  * PARAMETERS:    fmInst_t *inst     Pointer to the FM instance structure
00886  *
00887  * RETURN:        void
00888  ***************************************************************************/
00889 void fmStateRx (fmInst_t *inst)
00890 {
00891   /* check for p2, TEP and preamble */
00892   fmCheckP2 (inst);
00893   fmCheckTep (inst);
00894   fmCheckPreamble (inst);
00895
00896   /* Check if signal energy is present on line when HS training has failed.
00897      If it is, we send out an indication whether sig energy is detected */
00898   fmCheckSignalPresent(inst);
00899
00900   /* check for carrier on */
00901   if (fmCheckCarrierOn(inst) == TRUE)
00902   {
00903     /* if number of data bytes is greater then zero */
00904     if (inst->Dpu.CtrlParam.element_5 > 0)
00905     {
00906       /* check if data is to be hdlc decoded */
00907       if (inst->FmEcmMode == TRUE)
00908       {
00909         fmHdlcRx (inst);
00910       }
00911       else
00912       {
00913         fmSendDataToFp (inst, (tword *) &inst->Dpu.DataBuf[0],
00914                         inst->Dpu.CtrlParam.element_5, FALSE);
00915         inst->ProtoStats.Non_HDLC_Rx_From_Tele += inst->Dpu.CtrlParam.element_5;
00916       }
00917     }
00918   } /* if (inst->Dpu.CtrlParam.element_5 > 0) */
00919
00920   fmCheckCarrierOff (inst);       /* Check if carrier lost, and report event to FP */
00921   fmRxMsgProcess (inst);          /* Process all messages on the message queue */
00922
00923 } /* End { fmStateRx() } */
00924
00925 /****************************************************************************
00926  * FUNCTION PURPOSE:  Send data messages to the FP
00927  ****************************************************************************
00928  * DESCRIPTION:   This function is called to send data & messages to the FP.
00929  *                Data passed to this function should be unpacked.  If FM
00930  *                packetization mode is enabled (flag fFmFpPacketizationMode),
00931  *                the data is packetized (packed), and sent on to the FP as the
00932  *                packets become full.  If packetization mode is disabled
00933  *                (relay mode), the data is double packed and then shipped out
00934  *                to the FP.
00935  *
00936  * PARAMETERS:    fmInst_t *inst      Pointer to the FM instance structure
00937  *                tword     *data     Address of the unpacked data to be sent
00938  *                tuint     size      Number of bytes of data to be sent
00939  *                tint     flush     Whether or not any remaining packed data
00940  *                                    is to be flushed to the FP
00941  *
00942  * RETURN:        void
00943  ***************************************************************************/
00944 void fmSendDataToFp (fmInst_t *inst, tword *data, tuint size, tint flush)
00945 {
00946
00947   if (inst->fFmFpPacketizationMode == FALSE)
00948   /* Relay mode; no buffering of data */
00949   {
00950     if (size == 0)
00951     {
00952       return;
00953     }
00954     pktPackBytesIntoWords(data,data,size,0);
00955
00956     fmShipOutData (inst, data, size);     /* OK since data is now packed */
00957   }
00958
00959   else
00960   /* Packetization mode; packetize data and send it out to FP */
00961   {
00962     fmPacketizeData (inst, data, size);
00963     if (flush && (inst->numBytesStored > 0))
00964     {
00965       fmShipOutData (inst, inst->FmFpData, inst->numBytesStored);
00966       inst->numBytesStored = 0;
00967     }
00968   }
00969
00970 } /* End { fmSendDataToFp() } */
00971
00972 /****************************************************************************
00973  * FUNCTION PURPOSE:  Check for and process messages from FP
00974  ****************************************************************************
00975  * DESCRIPTION:   This function checks for and processes messages in the receive
00976  *                mode of fax modem operation.  Invalid messages are traced in
00977  *                a debug message and ignored.
00978  *
00979  * PARAMETERS:    fmInst_t *inst -  pointer to the FM instance structure
00980  *
00981  * RETURN:        void
00982  ***************************************************************************/
00983 void fmRxMsgProcess (fmInst_t *inst)
00984 {
00985   /* local variables */
00986   tuint DataCount;
00987   iffaxFpFmMsg_t CurrMsg;
00988   tint fMsgQEmpty = FALSE;
00989
00990   do
00991   {
00992      if (fmMsgFifoPeek (inst, &DataCount, &CurrMsg) == TRUE)
00993      {
00994         switch (CurrMsg.MsgId)
00995         {
00996            case iffax_FP_FM_MODE:
00997              inst->FmNewModemMode = TRUE;
00998              fMsgQEmpty = TRUE;
00999            break;
01000
01001            default:
01002              fmDebugTrace (inst,(tuint)FM_TRC_DBG_LVL_2,(tuint)FM_TRC_INVALID_MSG,(tuint)(CurrMsg.MsgId));
01003              fmMsgFifoPop (inst, &CurrMsg);
01004            break;
01005         }
01006      } /* if (Peek == TRUE) */
01007
01008      else
01009      {
01010         fMsgQEmpty = TRUE;
01011      }
01012
01013   } while (!fMsgQEmpty);
01014 } /* End { fmRxMsgProcess () } */
01015
01016 /* nothing past this point */
01017


FM: fmtrace.h File Reference

fmtrace.h File Reference

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

Go to the source code of this file.

Defines

#define | FM_TRC_DBG_LVL_1 1
#define | FM_TRC_DBG_LVL_2 2
#define | FM_TRC_FIFO_FULL 0xC0
#define | FM_TRC_NEW_STATE 0xC1
#define | FM_TRC_MODE_MSG_ID 0xC2
#define | FM_TRC_NEW_MODULATION 0xC3
#define | FM_TRC_CARRIER_LOSS 0xC4
#define | FM_TRC_TEP_DETECT 0xC5
#define | FM_TRC_P2_DETECT 0xC6
#define | FM_TRC_PREAMBLE_DETECT 0xC7
#define | FM_TRC_CARRIER_DETECT 0xC8
#define | FM_TRC_DELAY_BEGIN 0xC9
#define | FM_TRC_DELAY_END 0xCA
#define | FM_TRC_FILL_PATTERN 0xCB
#define | FM_TRC_SYNC_ACK 0xCC
#define | FM_TRC_INVALID_MSG 0xCD
#define | FM_TRC_CURRENT_STATE 0xCE
#define | FM_TRC_TX_UNDERRUN 0xCF
#define | FM_TRC_DATA_BEGIN 0xD0
#define | FM_TRC_DATA_END 0xD1
#define | FM_TRC_GOOD_FRAME 0xD2
#define | FM_TRC_BAD_FRAME 0xD3
#define | FM_DBG_OFFLINE_STATE 0
#define | FM_DBG_HS_RX_STATE 1
#define | FM_DBG_LS_RX_STATE 2
#define | FM_DBG_LS_TX_STATE_FLAG 3
#define | FM_DBG_LS_TX_STATE_DATA 4
#define | FM_DBG_LS_TX_STATE_FCS 5
#define | FM_DBG_HS_TX_STATE_TRAINING 6
#define | FM_DBG_HS_TX_STATE_DATA 7
#define | FM_DBG_HS_TX_STATE_PRE_OFF 8
#define | FM_DBG_HS_TX_STATE_ECM 9
#define | FM_EXC_DELETE 0x01
#define | FM_EXC_DPU_OPEN 0x02

Define Documentation

#define FM_TRC_DBG_LVL_1 1

Definition at line 16 of file fmtrace.h.

Referenced by fmModeChange(), fmStateTxHsEcm(), and fmStateTxLsData().

#define FM_TRC_DBG_LVL_2 2

Definition at line 17 of file fmtrace.h.

Referenced by fmCheckCarrierOff(), fmCheckCarrierOn(), fmCheckP2(), fmCheckPreamble(), fmCheckTep(), fmDelay(), fmModeChange(), fmMsgFifoPeek(), fmRxMsgProcess(), fmSendIn(), fmStateTxHsData(), fmStateTxHsEcm(), fmStateTxHsTraining(), fmStateTxLsData(), and fmStateTxLsFlag().

#define FM_TRC_FIFO_FULL 0xC0

Definition at line 23 of file fmtrace.h.

#define FM_TRC_NEW_STATE 0xC1

Definition at line 28 of file fmtrace.h.

Referenced by fmSendIn().

#define FM_TRC_MODE_MSG_ID 0xC2

Definition at line 40 of file fmtrace.h.

Referenced by fmModeChange().

#define FM_TRC_NEW_MODULATION 0xC3

Definition at line 44 of file fmtrace.h.

Referenced by fmModeChange().

#define FM_TRC_CARRIER_LOSS 0xC4

Definition at line 63 of file fmtrace.h.

Referenced by fmCheckCarrierOff().

#define FM_TRC_TEP_DETECT 0xC5

Definition at line 75 of file fmtrace.h.

Referenced by fmCheckTep().

#define FM_TRC_P2_DETECT 0xC6

Definition at line 87 of file fmtrace.h.

Referenced by fmCheckP2().

#define FM_TRC_PREAMBLE_DETECT 0xC7

Definition at line 99 of file fmtrace.h.

Referenced by fmCheckPreamble().

#define FM_TRC_CARRIER_DETECT 0xC8

Definition at line 111 of file fmtrace.h.

Referenced by fmCheckCarrierOn().

#define FM_TRC_DELAY_BEGIN 0xC9

Definition at line 123 of file fmtrace.h.

Referenced by fmDelay().

#define FM_TRC_DELAY_END 0xCA

Definition at line 127 of file fmtrace.h.

#define FM_TRC_FILL_PATTERN 0xCB

Definition at line 130 of file fmtrace.h.

#define FM_TRC_SYNC_ACK 0xCC

Definition at line 133 of file fmtrace.h.

Referenced by fmMsgFifoPeek().

#define FM_TRC_INVALID_MSG 0xCD

Definition at line 136 of file fmtrace.h.

Referenced by fmModeChange(), fmRxMsgProcess(), fmStateTxHsData(), fmStateTxHsTraining(), and fmStateTxLsFlag().

#define FM_TRC_CURRENT_STATE 0xCE

Definition at line 140 of file fmtrace.h.

#define FM_TRC_TX_UNDERRUN 0xCF

Definition at line 152 of file fmtrace.h.

Referenced by fmStateTxHsData(), fmStateTxHsEcm(), and fmStateTxLsData().

#define FM_TRC_DATA_BEGIN 0xD0

Definition at line 156 of file fmtrace.h.

Referenced by fmStateTxHsTraining(), and fmStateTxLsFlag().

#define FM_TRC_DATA_END 0xD1

Definition at line 159 of file fmtrace.h.

Referenced by fmStateTxHsData().

#define FM_TRC_GOOD_FRAME 0xD2

Definition at line 162 of file fmtrace.h.

Referenced by fmStateTxLsData().

#define FM_TRC_BAD_FRAME 0xD3

Definition at line 166 of file fmtrace.h.

Referenced by fmStateTxHsEcm(), and fmStateTxLsData().

#define FM_DBG_OFFLINE_STATE 0

Definition at line 174 of file fmtrace.h.

#define FM_DBG_HS_RX_STATE 1

Definition at line 175 of file fmtrace.h.

#define FM_DBG_LS_RX_STATE 2

Definition at line 176 of file fmtrace.h.

#define FM_DBG_LS_TX_STATE_FLAG 3

Definition at line 177 of file fmtrace.h.

#define FM_DBG_LS_TX_STATE_DATA 4

Definition at line 178 of file fmtrace.h.

#define FM_DBG_LS_TX_STATE_FCS 5

Definition at line 179 of file fmtrace.h.

#define FM_DBG_HS_TX_STATE_TRAINING 6

Definition at line 180 of file fmtrace.h.

#define FM_DBG_HS_TX_STATE_DATA 7

Definition at line 181 of file fmtrace.h.

#define FM_DBG_HS_TX_STATE_PRE_OFF 8

Definition at line 182 of file fmtrace.h.

#define FM_DBG_HS_TX_STATE_ECM 9

Definition at line 183 of file fmtrace.h.

#define FM_EXC_DELETE 0x01

Definition at line 191 of file fmtrace.h.

Referenced by fmDelete().

#define FM_EXC_DPU_OPEN 0x02

Definition at line 192 of file fmtrace.h.

Referenced by dpuOpen().


FM: fmtrace.h Source File

fmtrace.h

Go to the documentation of this file.
00001 #ifndef _FMTRACE_H
00002 #define _FMTRACE_H
00003 /******************************************************************************
00004  * FILE PURPOSE: Defines the debug traces for FM module
00005  ******************************************************************************
00006  * FILE NAME: fmtrace.h
00007  *
00008  * DESCRIPTION: Defines all debug trace messages for the FIU FaxRelay module.
00009  *
00010  * (C) Copyright 2000, TELOGY Networks, Inc.
00011  *****************************************************************************/
00012
00013 /*****************************************************************************
00014  * FM Debug Trace Levels (used for filtering messages per debug mode)
00015  *****************************************************************************/
00016 #define FM_TRC_DBG_LVL_1    1   /* warnings      */
00017 #define FM_TRC_DBG_LVL_2    2  /* informational */
00018
00019
00020 /*****************************************************************************
00021  * FM Debug Trace Codes:
00022  *****************************************************************************/
00023 #define FM_TRC_FIFO_FULL        0xC0   /* The message FIFO of the FM instance
00024                                            is full and FM is not accepting
00025                                            any messages fmom fax protocol
00026                                            Supporting data: MsgId of message
00027                                            dropped (see fpfxmif.h) */
00028 #define FM_TRC_NEW_STATE        0xC1   /* Trace state transitions of the FM
00029                                            task
00030                                            Supporting data: FM new state
00031                                            0 - FM_OFFLINE_STATE,
00032                                            1 - FM_HS_RX_STATE,
00033                                            2 - FM_LS_RX_STATE,
00034                                            3 - FM_LS_TX_STATE_FLAG,
00035                                            4 - FM_LS_TX_STATE_DATA,
00036                                            5 - FM_LS_TX_STATE_FCS,
00037                                            6 - FM_HS_TX_STATE_TRAINING,
00038                                            7 - FM_HS_TX_STATE_DATA,
00039                                            8 - FM_HS_TX_STATE_PRE_OFF */
00040 #define FM_TRC_MODE_MSG_ID      0xC2   /* Trace FM direction when FM is
00041                                            configured into a new mode
00042                                            Supporting data: MsgId of message
00043                                            dropped (see fpfxmif.h) */
00044 #define FM_TRC_NEW_MODULATION   0xC3   /* Trace FM mode when FM is
00045                                            configured into a new mode
00046                                            Supporting data: Type of the new
00047                                            modulation
00048                                            0 - V.21 300 bps
00049                                            1 - V.27 2400 bps
00050                                            2 - V.27 4800 bps
00051                                            3 - V.29 7200 bps
00052                                            4 - V.29 9600 bps
00053                                            5 - V.17 S 7200 bps
00054                                            6 - V.17 S 9600 bps
00055                                            7 - V.17 S 12000 bps
00056                                            8 - V.17 S 14400 bps
00057                                            9 - V.17 L 7200 bps
00058                                            10- V.17 L 9600 bps
00059                                            11- V.17 L 12000 bps
00060                                            12- V.17 L 14400 bps
00061                                            13- V.33 12000 bps
00062                                            14- V.33 14400 bps */
00063 #define FM_TRC_CARRIER_LOSS     0xC4   /* Trace carrier loss when it is
00064                                            detected
00065                                            Supporting data: FM new state
00066                                            0 - FM_OFFLINE_STATE,
00067                                            1 - FM_HS_RX_STATE,
00068                                            2 - FM_LS_RX_STATE,
00069                                            3 - FM_LS_TX_STATE_FLAG,
00070                                            4 - FM_LS_TX_STATE_DATA,
00071                                            5 - FM_LS_TX_STATE_FCS,
00072                                            6 - FM_HS_TX_STATE_TRAINING,
00073                                            7 - FM_HS_TX_STATE_DATA,
00074                                            8 - FM_HS_TX_STATE_PRE_OFF */
00075 #define FM_TRC_TEP_DETECT       0xC5   /* Trace TEP detect when it is
00076                                            detected
00077                                            Supporting data: FM new state
00078                                            0 - FM_OFFLINE_STATE,
00079                                            1 - FM_HS_RX_STATE,
00080                                            2 - FM_LS_RX_STATE,
00081                                            3 - FM_LS_TX_STATE_FLAG,
00082                                            4 - FM_LS_TX_STATE_DATA,
00083                                            5 - FM_LS_TX_STATE_FCS,
00084                                            6 - FM_HS_TX_STATE_TRAINING,
00085                                            7 - FM_HS_TX_STATE_DATA,
00086                                            8 - FM_HS_TX_STATE_PRE_OFF */
00087 #define FM_TRC_P2_DETECT        0xC6   /* Trace P2 detect when it is
00088                                            detected
00089                                            Supporting data: FM new state
00090                                            0 - FM_OFFLINE_STATE,
00091                                            1 - FM_HS_RX_STATE,
00092                                            2 - FM_LS_RX_STATE,
00093                                            3 - FM_LS_TX_STATE_FLAG,
00094                                            4 - FM_LS_TX_STATE_DATA,
00095                                            5 - FM_LS_TX_STATE_FCS,
00096                                            6 - FM_HS_TX_STATE_TRAINING,
00097                                            7 - FM_HS_TX_STATE_DATA,
00098                                            8 - FM_HS_TX_STATE_PRE_OFF */
00099 #define FM_TRC_PREAMBLE_DETECT  0xC7   /* Trace preamble detect when it is
00100                                            detected
00101                                            Supporting data: FM new state
00102                                            0 - FM_OFFLINE_STATE,
00103                                            1 - FM_HS_RX_STATE,
00104                                            2 - FM_LS_RX_STATE,
00105                                            3 - FM_LS_TX_STATE_FLAG,
00106                                            4 - FM_LS_TX_STATE_DATA,
00107                                            5 - FM_LS_TX_STATE_FCS,
00108                                            6 - FM_HS_TX_STATE_TRAINING,
00109                                            7 - FM_HS_TX_STATE_DATA,
00110                                            8 - FM_HS_TX_STATE_PRE_OFF */
00111 #define FM_TRC_CARRIER_DETECT   0xC8   /* Trace carrier detect when it is
00112                                            detected
00113                                            Supporting data: FM new state
00114                                            0 - FM_OFFLINE_STATE,
00115                                            1 - FM_HS_RX_STATE,
00116                                            2 - FM_LS_RX_STATE,
00117                                            3 - FM_LS_TX_STATE_FLAG,
00118                                            4 - FM_LS_TX_STATE_DATA,
00119                                            5 - FM_LS_TX_STATE_FCS,
00120                                            6 - FM_HS_TX_STATE_TRAINING,
00121                                            7 - FM_HS_TX_STATE_DATA,
00122                                            8 - FM_HS_TX_STATE_PRE_OFF */
00123 #define FM_TRC_DELAY_BEGIN      0xC9   /* Trace beginning of the delay
00124                                            message processing
00125                                            Supporting data: MsgData1 of the
00126                                            delay message */
00127 #define FM_TRC_DELAY_END        0xCA   /* Trace end of the delay
00128                                            message processing
00129                                            Supporting data: none */
00130 #define FM_TRC_FILL_PATTERN     0xCB   /* Trace processing of the fill
00131                                            pattern message
00132                                            Supporting data: fill byte */
00133 #define FM_TRC_SYNC_ACK         0xCC   /* Trace processing of the sync
00134                                            message processing
00135                                            Supporting data: none */
00136 #define FM_TRC_INVALID_MSG      0xCD   /* Trace invalid message during
00137                                            processing
00138                                            Supporting data: MsgId of the
00139                                            invalid message */
00140 #define FM_TRC_CURRENT_STATE    0xCE   /* Trace current state of FM
00141                                            processing module
00142                                            Supporting data: FM new state
00143                                            0 - FM_OFFLINE_STATE,
00144                                            1 - FM_HS_RX_STATE,
00145                                            2 - FM_LS_RX_STATE,
00146                                            3 - FM_LS_TX_STATE_FLAG,
00147                                            4 - FM_LS_TX_STATE_DATA,
00148                                            5 - FM_LS_TX_STATE_FCS,
00149                                            6 - FM_HS_TX_STATE_TRAINING,
00150                                            7 - FM_HS_TX_STATE_DATA,
00151                                            8 - FM_HS_TX_STATE_PRE_OFF */
00152 #define FM_TRC_TX_UNDERRUN      0xCF   /* Trace underrun when we ran out of
00153                                            data during transmission
00154                                            Supporting data: number of bytes
00155                                            transmitted to modem */
00156 #define FM_TRC_DATA_BEGIN       0xD0   /* Trace beginning of data RX or TX
00157                                            during transmission,
00158                                            Supporting data: none */
00159 #define FM_TRC_DATA_END         0xD1   /* Trace end of data RX or TX
00160                                            during transmission
00161                                            Supporting data: none */
00162 #define FM_TRC_GOOD_FRAME       0xD2   /* Trace TX or RX of a good HDLC fmame
00163                                            during transmission
00164                                            Supporting data: number of bytes
00165                                            in the fmame */
00166 #define FM_TRC_BAD_FRAME        0xD3   /* Trace TX or RX of a bad HDLC fmame
00167                                            during transmission
00168                                            Supporting data: number of bytes
00169                                            in the fmame */
00170
00171 /*****************************************************************************
00172  * FM Debug NEW STATES:
00173  *****************************************************************************/
00174 #define   FM_DBG_OFFLINE_STATE            0
00175 #define   FM_DBG_HS_RX_STATE              1
00176 #define   FM_DBG_LS_RX_STATE              2
00177 #define   FM_DBG_LS_TX_STATE_FLAG         3
00178 #define   FM_DBG_LS_TX_STATE_DATA         4
00179 #define   FM_DBG_LS_TX_STATE_FCS          5
00180 #define   FM_DBG_HS_TX_STATE_TRAINING     6
00181 #define   FM_DBG_HS_TX_STATE_DATA         7
00182 #define   FM_DBG_HS_TX_STATE_PRE_OFF      8
00183 #define   FM_DBG_HS_TX_STATE_ECM          9
00184
00185
00186
00187 /*****************************************************************************
00188  * FM Exception Codes:
00189  *****************************************************************************/
00190
00191 #define FM_EXC_DELETE   0x01
00192 #define FM_EXC_DPU_OPEN 0x02
00193
00194 #endif /* _FMTRACE_H */
00195 /* nothing past this point */


FM: fmutil.c File Reference

fmutil.c File Reference

#include <ti/mas/types/types.h>
#include "fmloc.h"
#include <ti/mas/util/utl.h>
#include <ti/mas/util/pkt.h>

Include dependency graph for fmutil.c:

Go to the source code of this file.

Functions

void | fmDataBufInit (fmInst_t *inst)
tword * | fmDataBufIn (fmInst_t *inst, tword *dataIn, tint byteCnt)
tuint | fmDataBufPeek (fmInst_t *inst)
void | fmDataBufOut (fmInst_t *inst)
void | fmUnPackData (tword *src, tword *dst, tuint size)
void | fmPacketizeData (fmInst_t *inst, tword *unpacked, tuint size)
tint | fm_timestamp16_compare (tuint a, tuint b)

Function Documentation

void fmDataBufInit ( fmInst_t * inst )

Definition at line 24 of file fmutil.c.

References fmInst_s::FmDataIn, fmInst_s::FmDataOut, and fmInst_s::FmDataWordCnt.

Referenced by fmMsgFifoInit().

tword* fmDataBufIn | ( | fmInst_t * | inst,
 |  | tword * | dataIn,
 |  | tint | byteCnt
 | ) |  |

Definition at line 45 of file fmutil.c.

References fmInst_s::FmData, fmInst_s::FmDataIn, fmInst_s::FmDataOut, fmInst_s::FmDataWordCnt, and fmInst_s::FmDataWordSize.

Referenced by fmMsgFifoPush().

tuint fmDataBufPeek ( fmInst_t * inst )

Definition at line 133 of file fmutil.c.

References FM_MSG_FIFO_SIZE, FM_STATUS_TX_DATA_END_FLAG, FM_STATUS_TX_DATA_FLAG, fmInst_s::FmStatus, fmInst_s::MsgFifoData, fmInst_s::MsgFifoInCnt, and fmInst_s::MsgFifoOutCnt.

Referenced by fmMsgFifoPeek().

void fmDataBufOut ( fmInst_t * inst )

Definition at line 187 of file fmutil.c.

References fmInst_s::FmDataIn, fmInst_s::FmDataOut, fmInst_s::FmDataWordCnt, fmInst_s::FmDataWordSize, fmInst_s::MsgFifoData, and fmInst_s::MsgFifoOutCnt.

Referenced by fmMsgFifoPop().

void fmUnPackData | ( | tword * | src,
 |  | tword * | dst,
 |  | tuint | size
 | ) |  |

Definition at line 244 of file fmutil.c.

Referenced by fmHdlcRx(), and fmStateTxHsEcm().

void fmPacketizeData | ( | fmInst_t * | inst,
 |  | tword * | unpacked,
 |  | tuint | size
 | ) |  |

Definition at line 283 of file fmutil.c.

References fmInst_s::FmFpData, fmPacketizeData(), fmShipOutData(), fmInst_s::maxBytesToBuffer, and fmInst_s::numBytesStored.

Referenced by fmPacketizeData(), and fmSendDataToFp().

Here is the call graph for this function:

tint fm_timestamp16_compare | ( | tuint | a,
 |  | tuint | b
 | ) |  |

Definition at line 345 of file fmutil.c.

Referenced by fmDelay().


FM: fmutil.c Source File

fmutil.c

Go to the documentation of this file.
00001 /******************************************************************************
00002 * FILE PURPOSE:     C54x-based utilities for FM module
00003 *******************************************************************************
00004 * FILE NAME:        fmutil.c
00005 *
00006 * DESCRIPTION:      A collection of FM utilities.
00007 *
00008 * (C) Copyright 2000, TELOGY Networks, Inc.
00009 ******************************************************************************/
00010 #include <ti/mas/types/types.h>
00011 #include "fmloc.h"
00012 #include <ti/mas/util/utl.h>
00013 #include <ti/mas/util/pkt.h>
00014
00015 /******************************************************************************
00016 * FUNCTION PURPOSE:  Initialize the data buffer variables
00017 *
00018 * DESCRIPTION:       initialization
00019 *
00020 * PARAMETERS:        fmInst_t *inst    - FM instance
00021 *
00022 * RETURNS:           void
00023 ******************************************************************************/
00024 void fmDataBufInit (fmInst_t *inst)
00025 {
00026   inst->FmDataIn =
00027   inst->FmDataOut =
00028   inst->FmDataWordCnt = 0;
00029 } /* fmDataBufInit */
00030
00031 /******************************************************************************
00032 * FUNCTION PURPOSE:  Packs data bytes into data buffer
00033 *
00034 * DESCRIPTION:       Packs data bytes into the data buffer. For C54x, bytes
00035 *                    are assumed packed into 16-bit words.
00036 *
00037 * PARAMETERS:        fmInst_t *inst    - FM instance
00038 *                    tword *data       - Data Address
00039 *                    tint ByteCnt      - Number of Bytes
00040 *
00041 * RETURNS:           NULL              - if we do not have room to save this
00042 *                                        data buffer
00043 *                    otherwise         - pointer to the start of the data
00044 ******************************************************************************/
00045 tword *fmDataBufIn (fmInst_t *inst, tword *dataIn, tint byteCnt)
00046 {
00047   tint i, wordReqd, wordAvail;
00048   tword *to, *from, *bufStartAddr;
00049
00050   /* Compute the number of 16-bit words required to store the data bytes */
00051   wordReqd  = utlNbytes2NtwordsCeil(byteCnt);
00052
00053   if (inst->FmDataOut > inst->FmDataIn)
00054   {
00055      /* Check if the space available between the IN and OUT Pointers, is
00056       * sufficient for storing the data bytes. */
00057      wordAvail = inst->FmDataOut - inst->FmDataIn - 1;
00058      if (wordAvail < wordReqd)
00059      {
00060         return (NULL);  /* Not enough room */
00061      }
00062      else
00063      {
00064         /* Yes, enough room copy in data bytes and update IN Pointer */
00065         from = dataIn;
00066         to = inst->FmData;
00067         bufStartAddr = &inst->FmData[inst->FmDataIn];
00068         for (i = 0; i < wordReqd; i++)
00069         {
00070            to[inst->FmDataIn++] = *from++;
00071         }
00072      }
00073   }
00074   else
00075   {
00076      /* Check if the space between the IN Pointer and end of the buffer is
00077       * sufficient to store all the data bytes.  Wrap around is not allowed. */
00078      wordAvail = inst->FmDataWordSize - inst->FmDataIn - 1;
00079      if (wordAvail < wordReqd)
00080      {
00081         /* Not enough room exists at the end of the buffer -- so check if there
00082          * is enough room between the top of the buffer and the OUT Pointer to
00083          * store all the data bytes. */
00084         wordAvail = inst->FmDataOut - 1;
00085         if (wordAvail < wordReqd)
00086         {
00087            return (NULL);  /* Not enough room in buffer */
00088         }
00089         else
00090         {
00091            /* Enough room exists at the top of the data buffer -- So, reset
00092             * IN Pointer to the top of the buffer and copy all data bytes. */
00093            from = dataIn;
00094            to = inst->FmData;
00095            inst->FmDataIn = 0;
00096            bufStartAddr = &inst->FmData[inst->FmDataIn];
00097            for (i = 0; i < wordReqd; i++)
00098            {
00099               to[inst->FmDataIn++] = *from++;
00100            }
00101         }
00102      }
00103      else
00104      {
00105         /* Enough room exists between the IN Pointer and the end of the buffer.
00106          * Copy the data bytes and update the IN Pointer */
00107         from = dataIn;
00108         to = inst->FmData;
00109         bufStartAddr = &inst->FmData[inst->FmDataIn];
00110         for (i = 0; i < wordReqd; i++)
00111         {
00112            to[inst->FmDataIn++] = *from++;
00113         }
00114      }
00115   }
00116
00117   inst->FmDataWordCnt++;  /* Increment number of records stored in the data
00118                              buffer. */
00119
00120   return (bufStartAddr);
00121 } /* fmDataBufIn */
00122
00123 /******************************************************************************
00124 * FUNCTION PURPOSE:  report the number of data bytes into data buffer
00125 *
00126 * DESCRIPTION:       For C54x, bytes are assumed packed into 16-bit words.
00127 *
00128 * PARAMETERS:        fmInst_t *inst    - FM instance
00129 *
00130 * RETURNS:           number of data bytes available for transmission in the
00131 *                    current mode
00132 ******************************************************************************/
00133 tuint fmDataBufPeek (fmInst_t *inst)
00134 {
00135   tuint i, dataByteCnt;
00136   tbool dataFlag;
00137   iffaxFpFmMsg_t *msgPtr;
00138
00139   dataFlag = TRUE;
00140   dataByteCnt = 0;
00141   i = inst->MsgFifoOutCnt;
00142
00143   while ((i != inst->MsgFifoInCnt) && (dataFlag == TRUE))
00144   {
00145     msgPtr = &inst->MsgFifoData[i++];
00146
00147   if (i == FM_MSG_FIFO_SIZE)
00148   {
00149     i = 0;
00150   }
00151
00152   switch (msgPtr->MsgId)
00153   {
00154   case iffax_FP_FM_DATA:
00155       inst->FmStatus |= FM_STATUS_TX_DATA_FLAG;
00156     dataByteCnt += msgPtr->MsgBody.DataPayload.numBytes;
00157     break;
00158
00159   case iffax_FP_FM_FRAME_COMP:
00160     dataByteCnt += 2;
00161     break;
00162
00163   default:
00164     dataFlag = FALSE;
00165     break;
00166   }
00167   }
00168
00169   if ((inst->FmStatus & FM_STATUS_TX_DATA_FLAG) && (dataFlag == FALSE))
00170   {
00171     inst->FmStatus |= FM_STATUS_TX_DATA_END_FLAG;
00172   inst->FmStatus &= (~FM_STATUS_TX_DATA_FLAG);
00173   }
00174
00175   return (dataByteCnt);
00176 } /* fmDataBufPeek */
00177
00178 /******************************************************************************
00179 * FUNCTION PURPOSE:  free the data buffer associated with a message
00180 *
00181 * DESCRIPTION:       For C54x, bytes are assumed packed into 16-bit words.
00182 *
00183 * PARAMETERS:        fmInst_t *inst    - FM instance
00184 *
00185 * RETURNS:           void
00186 ******************************************************************************/
00187 void fmDataBufOut (fmInst_t *inst)
00188 {
00189   iffaxFpFmMsg_t *msgPtr;
00190   tint byteCnt, wordCnt;
00191
00192   msgPtr = &inst->MsgFifoData[inst->MsgFifoOutCnt];
00193
00194   /* Number of data bytes (and 16-bit words) associated with current message */
00195   byteCnt = msgPtr->MsgBody.DataPayload.numBytes;
00196   wordCnt = utlNbytes2NtwordsCeil(byteCnt);
00197
00198   /* Error checking -- If not elements in the data buffer, return */
00199   if (inst->FmDataWordCnt <= 0)
00200   {
00201      inst->FmDataWordCnt = 0;
00202      return;
00203   }
00204
00205   /* Need to update the OUT Pointer to the end of the data associated with this
00206    * message. */
00207   if (inst->FmDataOut > inst->FmDataIn)
00208   {
00209      if ( (inst->FmDataOut + wordCnt) >= inst->FmDataWordSize )
00210      {
00211         inst->FmDataOut = wordCnt;
00212      }
00213      else
00214      {
00215         inst->FmDataOut += wordCnt;
00216         if (inst->FmDataOut == inst->FmDataWordSize)
00217         {
00218            inst->FmDataOut = 0;
00219         }
00220      }
00221   }
00222   else
00223   {
00224      inst->FmDataOut += wordCnt;
00225   }
00226
00227   /* Update the number of records stored in the data buffer */
00228   inst->FmDataWordCnt--;
00229
00230
00231 } /* fmDataBufOut */
00232 /******************************************************************************
00233 * FUNCTION PURPOSE:  Double pack data
00234 *******************************************************************************
00235 * DESCRIPTION:   Double pack data in an array into the appropriate word
00236 *                size
00237 *
00238 * PARAMETERS:    tword *src         address of the source
00239 *                tword *dst         address o the destination
00240 *                tuint size         number of bytes to be copied
00241 *
00242 * RETURN:        void
00243 ******************************************************************************/
00244 void fmUnPackData (tword *src, tword *dst, tuint size)
00245 {
00246   tword *to,*from;
00247   tint i, j;
00248
00249   to = dst;
00250   from = src;
00251
00252   j = TYP_TWORD_SIZE - 8;
00253
00254   for (i = 0;i < size; i++)
00255   {
00256   *to++ = ((*from >> j) & 0xFF);
00257
00258   if (j == 0)
00259   {
00260     j = TYP_TWORD_SIZE;
00261     from ++;
00262   }
00263
00264   j -= 8;
00265   }
00266 }  /* fmUnPackData */
00267
00268 /******************************************************************************
00269 * FUNCTION PURPOSE:  Packetize data and send out to FP
00270 *******************************************************************************
00271 * DESCRIPTION:   Double packs unpacked data provided by input data pointer *unpacked
00272 *                into packed data structure *packed.  Calls function fmShipOutData()
00273 *                when *packed gets full, which sends data out to FP.  Leaves behind
00274 *                residual (packed) data in fmInst->FmFpData memory area for next time
00275 *                this function is called.
00276 *
00277 * PARAMETERS:    fmInst_t    *inst       - pointer to FM instance structure
00278 *                tword       *unpacked   - address of the source data
00279 *                tuint       size        - number of bytes to be copied
00280 *
00281 * RETURN:        void
00282 ******************************************************************************/
00283 void fmPacketizeData (fmInst_t *inst, tword *unpacked, tuint size)
00284 {
00285    tword *src  = unpacked;
00286    tword *dest = (tword *) (inst->FmFpData + utlNbytes2NtwordsFloor(inst->numBytesStored));
00287    tuint remainingBytesToProcess = size;
00288
00289    while ((inst->numBytesStored < inst->maxBytesToBuffer) && (remainingBytesToProcess > 0))
00290    {
00291 #if 0
00292     if ((inst->numBytesStored & 0x0001) == 0)
00293       {
00294          *dest = (*src++) << 8;
00295       }
00296       else
00297       {
00298          *dest++ |= *src++;
00299       }
00300 #else
00301       pktPackBytesIntoWords(src++,dest++,(TYP_TWORD_SIZE >> 3),0);
00302 #endif
00303       inst->numBytesStored++;
00304       remainingBytesToProcess--;
00305    }
00306
00307    if (inst->numBytesStored == inst->maxBytesToBuffer)
00308    {
00309       fmShipOutData (inst, inst->FmFpData, inst->numBytesStored);
00310       inst->numBytesStored = 0;
00311
00312       if (remainingBytesToProcess > 0)
00313       {
00314          fmPacketizeData (inst, src, remainingBytesToProcess);
00315       }
00316    }
00317 } /* fmPacketizeData */
00318
00319 /******************************************************************************
00320  * FUNCTION PURPOSE: Compare two 16-bit timestamps
00321  ******************************************************************************
00322  * DESCRIPTION: Returns a value indicating the relationship between two
00323  *              timestamps "a" and "b".
00324  *
00325  * tint fm_timestamp16_compare (a, b)
00326  *
00327  * Return values:
00328  *
00329  *  -1 if a is earlier in time than b (eg. a = 3:00 p.m., b = 5:00 p.m.)
00330  *  0  if a = b
00331  *  1  if a is later in time than b (eg. a = 9:00 p.m., b = 8:00 p.m.)
00332  *
00333  * HOW IT WORKS:
00334  *
00335  * The timestamp is a 16-bit unsigned value which rolls over at 0xffff.
00336  * We basically assume that no two times will ever be greater than 0x7fff
00337  * apart.  We start by subtracting the the larger of the two from the smaller
00338  * of the two.  Let's assume, for example, that the unsigned integer value
00339  * of a is > that of b.  If (a - b) > 0x7fff then we assume that b is later
00340  * in time than a (the timestamp counter rolled over between a and b). If
00341  * (a - b) <= 0x7fff then we assume that a is later in time than b.
00342  *
00343  ******************************************************************************/
00344
00345 tint fm_timestamp16_compare (tuint a, tuint b)
00346 {
00347   if  (a == b)
00348   {
00349     /* Timestamps are equal */
00350     return (0);
00351   }
00352
00353   if  (a > b)
00354   {
00355     if  ((a - b) > 0x7fff)
00356     {
00357       /**********************************
00358       *
00359       * B is later than A (A is earlier than B)
00360       * (B's timestamp has wrapped around)
00361       *
00362       **********************************/
00363
00364       return (-1);
00365     }
00366     else
00367     {
00368       /**********************************
00369       *
00370       * A is later than B
00371       * (neither timestamp has wrapped around)
00372       *
00373       **********************************/
00374
00375       return (1);
00376     }
00377   }
00378   else
00379   {
00380     if  ((b - a) > 0x7fff)
00381     {
00382       /**********************************
00383       *
00384       * A is later than B
00385       * (A's timestamp has wrapped around)
00386       *
00387       **********************************/
00388
00389       return (1);
00390     }
00391     else
00392     {
00393       /**********************************
00394       *
00395       * B is later than A (A is earlier than B)
00396       * (neither timestamp has wrapped around)
00397       *
00398       **********************************/
00399
00400       return (-1);
00401     }
00402   }
00403
00404 }  /* fm_timestamp16_compare() */
00405
00406 /* nothing past this point */
00407


FM: Data Fields

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

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

- a -

  • abs_phase : dpu_denc_t
  • accum : dpu_trec_t
  • accum_dist : dpu_cdec_t
  • accumImag : dpu_trec_t
  • accumReal : dpu_trec_t
  • adeq_fcn : dpuRxInst_t
  • adeq_inst : dpuRxInst_t
  • agc_fcn : dpuRxInst_t
  • agc_inst : dpuRxInst_t
  • alpha : dpu_dotdet_t , dpu_trec_t , dpu_cdec_t , dpu_cddet_t
  • angleComputeFlag : dpu_trec_t
  • atan2ScaleFactors_pt : v17Table_sPtrs_t
  • avgNoisePow : dpu_slic_t
  • avgSignalPow : dpu_slic_t


FM: Data Fields

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

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

- k -

  • k1 : dpu_crec_t , scaleFactors_t , dpu_trec_t
  • k2 : dpu_trec_t , dpu_crec_t , scaleFactors_t


FM: Data Fields

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

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

- l -

  • L1 : dpu_bphilb_t , dpu_shaping_t , dpu_interp_t , interp_params_t
  • L2 : dpu_interp_t , interp_params_t
  • last_phase : dpu_ddec_t
  • length : dpu_shaping_t , interp_params_t , dpu_interp_t , dpu_bphilb_t , dpu_adeq_t , dpu_trec_t
  • LineCond : fm_ctrl_str
  • low_power_req : dpu_cddet_t
  • low_thr : cd_thr_t


FM: Data Fields

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

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

- m -

  • mask : dpu_cenc_t , dpu_denc_t , dpu_outman_t , dpu_ddec_t , dpu_fsk_gen_t , dpu_scr_t , dpu_descr_t
  • mask_comp : dpu_denc_t , dpu_ddec_t
  • max_data_per_frame : dpuSizeCfg_t
  • max_error : dpu_crec_t
  • max_rate : dpuCfg_t
  • max_samples_per_frame : dpuSizeCfg_t
  • maxBytesToBuffer : fmOpenConfig_t , fmInst_s
  • min_rate : dpuCfg_t
  • mod_fcn : dpuTxInst_t
  • mod_inst : dpuTxInst_t , dpuRxInst_t
  • mode : dpuCfg_t
  • MsgFifoData : fmInst_s
  • MsgFifoInCnt : fmInst_s
  • MsgFifoOutCnt : fmInst_s


FM: Data Fields

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

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

- n -

  • next_bit : dpu_scr_t , dpu_descr_t
  • Non_HDLC_Rx_From_Tele : fmProtoStats_t
  • Non_HDLC_Tx_To_Tele : fmProtoStats_t
  • Non_HDLC_Tx_Underflow : fmProtoStats_t
  • num_of_bits : dpu_scr_t , dpu_descr_t
  • number : dpu_phase_t
  • numBytesStored : fmInst_s


FM: Data Fields

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

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

- o -

  • old_gain : dpu_agc_t
  • old_p1 : dpu_trec_t
  • oldin : dpu_interp_t
  • oldin_im : dpu_shaping_t
  • oldin_re : dpu_shaping_t
  • one_mu : dpu_trec_t
  • out_buf : dpuTxInst_t
  • outman_inst : dpuRxInst_t
  • output : dpu_trec_t


FM: Data Fields

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

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

- b -

  • Bad_CRC_From_Tele : fmProtoStats_t
  • Bad_CRC_To_Tele : fmProtoStats_t
  • baud_per_seg : dpuTxInst_t , dpuRxInst_t
  • beta : dpu_adeq_t
  • bit_index : dpu_inman_t , dpu_outman_t
  • bits : dpu_inman_t
  • bits_cnt : dpu_inman_t
  • bits_table : dpu_slic_t
  • bp_filt : dpu_bphilb_t
  • bp_hilb_v17_pt : v17Table_sPtrs_t
  • bp_hilb_v21_96_pt : commonTable1_sPtrs_t
  • bp_hilb_v27_48_pt : v27Table_sPtrs_t
  • bp_hilb_v29_pt : v29Table_sPtrs_t
  • bp_hilt_filt : dpu_bphilb_t
  • bp_rx_v17_pt : v17Table_sPtrs_t
  • bp_rx_v21_96_pt : commonTable1_sPtrs_t
  • bp_rx_v27_48_pt : v27Table_sPtrs_t
  • bp_rx_v29_pt : v29Table_sPtrs_t
  • bphilb_fcn : dpuRxInst_t
  • bphilb_inst : dpuRxInst_t
  • bridge_state : dpu_inman_t
  • bts_per_baud : dpuTxInst_t , dpuRxInst_t
  • buf_in_index : dpuRxInst_t
  • buf_out_index : dpuTxInst_t
  • buf_rx_index : dpuRxInst_t
  • buf_tx_index : dpuTxInst_t
  • bytes_cnt : dpu_inman_t
  • BytesNotUsed : fmInst_s


FM: Data Fields

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

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

- c -

  • carr_offset : fmSigQStats_t
  • carrLossPendingFlag : dpu_cddet_t
  • cd_thresholds_pt : commonTable1_sPtrs_t
  • cddet_fcn : dpuRxInst_t
  • cddet_inst : dpuRxInst_t
  • cdec_fcn : dpuRxInst_t
  • cdec_inst : dpuRxInst_t
  • cdec_ptr : dpu_slic_t
  • cenc_fcn : dpuTxInst_t
  • cenc_inst : dpuTxInst_t
  • cf_im_long : dpu_adeq_t
  • cf_re_long : dpu_adeq_t
  • cfg : dpuInst_s
  • change_det : dpuRxInst_t
  • commonTable1Ptrs : fmTablePtrs_t
  • commonTable2Ptrs : fmTablePtrs_t
  • Config : fm_ctrl_str
  • const_point : path_struct
  • copy_fcn : dpuTxInst_t , dpuRxInst_t
  • cosfn : dpu_crec_t
  • count : dpu_v21_dec_t , dpu_trec_t , dpu_phase_t , dpu_cddet_t
  • count_false_req : dpu_cddet_t
  • count_true_req : dpu_cddet_t
  • counter : dpu_scr_t , dpu_descr_t
  • crec_fcn : dpuRxInst_t
  • cross_count : dpu_v21_dec_t
  • ctrl : dpuInst_s
  • CtrlParam : dpuIf_t


FM: Data Fields

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

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

- d -

  • data_fcn : dpuTxInst_t , dpuRxInst_t
  • data_in_buf : dpuTxInst_t , dpu_inman_t
  • data_out_buf : dpuRxInst_t
  • DataBuf : dpuIf_t
  • DataRate : fmInst_s
  • dcComponent : dpu_trec_t
  • ddec_fcn : dpuRxInst_t
  • ddec_inst : dpuRxInst_t
  • ddec_table : dpu_ddec_t
  • debugInfo : fmContext_t
  • debugLvl : fmOpenConfig_t , fmInst_s
  • decis_table : dpu_slic_t
  • delay : dpu_dotdet_t , dpu_bphilb_t , dpu_trec_t
  • delay1 : dpu_dotdet_t
  • delay_buf_index : dpu_dotdet_t
  • delay_im : dpu_adeq_t , dpu_phase_t
  • delay_re : dpu_adeq_t , dpu_phase_t
  • DelayFlag : fmInst_s
  • demod_fcn : dpuRxInst_t
  • denc_fcn : dpuTxInst_t
  • denc_inst : dpuTxInst_t
  • denc_table : dpu_denc_t
  • descr_delay : dpu_descr_t
  • descr_fcn : dpuRxInst_t
  • descr_inst : dpuRxInst_t
  • direction : dpuCfg_t
  • disable_v21 : dpu_dotdet_t
  • division : dpu_cddet_t , dpu_cdec_t , dpu_dotdet_t , dpu_phase_t , dpu_trec_t
  • division_table : dpu_phase_t
  • dot_cnt_thr : dpu_dotdet_t
  • dot_count : dpu_dotdet_t
  • dot_power : dpu_dotdet_t
  • dotCoefs : dpu_dotdet_t
  • dotdet_fcn : dpuRxInst_t
  • dotdet_inst : dpuRxInst_t
  • dotIIR : dpu_dotdet_t
  • dotInp : dpu_dotdet_t
  • Dpu : fmInst_s
  • dpu_bridge_smap_table_v17_AllRates_pt : v17Table_sPtrs_t
  • dpu_ddec_V17_AllRates_pt : v17Table_sPtrs_t
  • dpu_ddec_V29_4800_pt : v29Table_sPtrs_t
  • dpu_ddec_V29_9600_pt : v29Table_sPtrs_t
  • dpu_denc_V17_AllRates_pt : v17Table_sPtrs_t
  • dpu_denc_V29_4800_pt : v29Table_sPtrs_t
  • dpu_denc_V29_9600_pt : v29Table_sPtrs_t
  • dpu_PN_smap_table_v17_AllRates_pt : v17Table_sPtrs_t
  • dpu_slic_bits_V27_48_pt : v27Table_sPtrs_t
  • dpu_slic_bits_V29_72_pt : v29Table_sPtrs_t
  • dpu_slic_bits_V29_96_pt : v29Table_sPtrs_t
  • dpu_slic_invmod_v17_pt : v17Table_sPtrs_t
  • dpu_slic_invmod_V29_96_pt : v29Table_sPtrs_t
  • dpu_slic_pt_V27_24_pt : v27Table_sPtrs_t
  • dpu_slic_pt_V27_48_pt : v27Table_sPtrs_t
  • dpu_slic_pt_V29_72_pt : v29Table_sPtrs_t
  • dpu_slic_pt_V29_96_pt : v29Table_sPtrs_t
  • dpu_smap_V17_120_pt : v17Table_sPtrs_t
  • dpu_smap_V17_144_pt : v17Table_sPtrs_t
  • dpu_smap_V17_72_pt : v17Table_sPtrs_t
  • dpu_smap_V17_96_pt : v17Table_sPtrs_t
  • dpu_smap_V27_24_pt : v27Table_sPtrs_t
  • dpu_smap_V27_48_pt : v27Table_sPtrs_t
  • dpu_smap_V29_72_pt : v29Table_sPtrs_t
  • dpu_smap_V29_96_pt : v29Table_sPtrs_t
  • dpu_trec_fil_coef_pt : commonTable1_sPtrs_t
  • dpu_v27_count_pt : v27Table_sPtrs_t
  • DPUfeatureBitMap : dpuCfg_t
  • dpuModConvTable_pt : commonTable1_sPtrs_t
  • dpuModRateTable_pt : commonTable1_sPtrs_t
  • dpuModTypeTable_pt : commonTable1_sPtrs_t
  • dpustatus : fmSigQStats_t
  • dummy : dpuCfg_t


FM: Data Fields

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

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

- e -

  • element_0 : fm_ctrl_str
  • element_2 : fm_ctrl_str
  • element_3 : fm_ctrl_str
  • element_5 : fm_ctrl_str
  • EndTime : fmInst_s
  • err_phase_fcn : dpuRxInst_t


FM: Data Fields

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

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

- f -

  • f1 : dpu_trec_t
  • f2 : dpu_trec_t
  • factor : dpu_dotdet_t
  • fBufferData : fmOpenConfig_t
  • fcn_ptr : dpuSendOut_t , dpuRecvOut_t
  • fFmFpPacketizationMode : fmInst_s
  • fForceBadFCS : fmInst_s
  • filt_index_inc : dpu_trec_t
  • filter : dpu_interp_t , dpu_shaping_t
  • filters : dpu_trec_bank_t
  • filters_im : dpu_shaping_bank_t
  • filters_re : dpu_shaping_bank_t
  • FmBytesCnt : fmInst_s
  • fmCurrMode : fmInst_s
  • FmData : fmInst_s
  • FmDataIn : fmInst_s
  • FmDataOut : fmInst_s
  • FmDataWordCnt : fmInst_s
  • FmDataWordSize : fmInst_s
  • FmEcmMode : fmInst_s
  • FMfeatureBitMap : fmOpenConfig_t
  • FmFpData : fmInst_s
  • fmGetTime : fmContext_t
  • FmNewModemMode : fmInst_s
  • fmProtoStats : fmStatsReport_t
  • fmReceiveOut : fmReceiveOutSpec_t
  • fmSendOut : fmSendOutSpec_t
  • fmSigQStats : fmStatsReport_t
  • FmState : fmInst_s
  • FmStatus : fmInst_s
  • FmTaskRate : fmInst_s
  • FmToneCount : fmInst_s
  • FmTonePhase : fmInst_s
  • FmToneState : fmInst_s
  • frame : dpuCfg_t
  • freeze_count : dpuRxInst_t
  • freq : dpu_crec_t , dpu_mod_t
  • freq_table : dpu_fsk_gen_t
  • fSignalPowerPresent : dpu_cddet_t
  • fsk_gen_fcn : dpuTxInst_t
  • fsk_gen_inst : dpuTxInst_t
  • fsl_bitfield : dpuRxInst_t
  • fslAdjCnt : fmSigQStats_t


FM: Data Fields

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

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

- g -

  • gain : dpu_agc_t , dpuTxInst_t
  • gain_calc_flag : dpu_dotdet_t
  • Good_CRC_From_Tele : fmProtoStats_t
  • Good_CRC_To_Tele : fmProtoStats_t


FM: Data Fields

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

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

- h -

  • Hdlc : fmInst_s
  • HDLC_Tx_Underflow : fmProtoStats_t
  • HdlcFlagsCnt : fmInst_s
  • hh1 : dpu_trec_t
  • hh2 : dpu_trec_t
  • high_power_req : dpu_dotdet_t , dpu_cddet_t
  • high_thr : cd_thr_t
  • hn_72_80_pt : commonTable1_sPtrs_t
  • hn_80_96_pt : commonTable1_sPtrs_t
  • hn_96_80_pt : commonTable1_sPtrs_t


FM: Data Fields

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

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

- i -

  • ID : fmNewConfig_t , dpuNewCfg_t , dpuInst_s , fmInst_s
  • im : cmplx_t
  • in_buf : dpuRxInst_t
  • index : dpu_trec_t
  • index_tab : interp_params_t , dpu_interp_t
  • inman_inst : dpuTxInst_t
  • inpPostAdeqX : dpu_adeq_t
  • inpPostAdeqY : dpu_adeq_t
  • int_filt_index : dpu_trec_t
  • interp_inst : dpuRxInst_t , dpuTxInst_t
  • intrp_fcn : dpuTxInst_t , dpuRxInst_t
  • invmod_mask : dpu_slic_t
  • invmod_table : dpu_slic_t


FM: Data Fields

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

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

- p -

  • p1 : dpu_trec_t
  • path_and_delay : path_struct
  • path_dist_ptr : dpu_cdec_t
  • path_store : dpu_cdec_t
  • path_store_cur_ptr : dpu_cdec_t
  • pattern : dpu_v21_dec_t
  • percentBaudOffset : fmSigQStats_t
  • ph_error : dpu_slic_t
  • ph_error_scale : dpu_slic_t
  • phase : dpu_fsk_gen_t , dpu_mod_t , dpu_crec_t
  • phase_err_mul : dpuRxInst_t
  • phase_inst : dpuRxInst_t
  • pn_table : dpu_scr_t
  • postAdeqGain : dpu_adeq_t
  • postAdeqStepSiz : dpu_adeq_t
  • postAdeqUpdateFlag : dpu_adeq_t
  • power : dpu_cddet_t
  • power_sat : dpu_cddet_t
  • pre_p1 : dpu_crec_t
  • pre_p1_old : dpu_crec_t
  • pre_sample : dpu_v21_dec_t
  • pre_symbol : dpu_smap_t
  • prev_path_pt : path_struct
  • procfn : dpuTxInst_t , dpuRxInst_t
  • protocol : dpuCfg_t
  • ProtoStats : fmInst_s


FM: Data Fields

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

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

- r -

  • rate : dpuCfg_t
  • re : cmplx_t
  • recv_out : dpuCfg_t
  • rot_imag : dpu_trec_t
  • rot_imag_est : dpu_trec_t
  • rot_real : dpu_trec_t
  • rot_real_est : dpu_trec_t
  • Rx : fmInst_s
  • rx_baud : dpuRxInst_t
  • rx_cd_thr_set : fmOpenConfig_t , dpuCfg_t
  • rx_count : dpuRxInst_t
  • rx_level : dpu_agc_t , fmSigQStats_t
  • rx_mode : dpuRxInst_t
  • rx_rate : fmSigQStats_t , dpuRxInst_t
  • rx_state : dpuRxInst_t
  • RxInst : dpuInst_s
  • RxOutSpec : fmInst_s , fmOpenConfig_t


FM: Data Fields

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

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

- s -

  • samp : dpu_crec_t
  • samp_per_baud : dpuTxInst_t , dpuRxInst_t
  • samp_per_seg : dpuTxInst_t , dpuRxInst_t
  • samp_req : dpu_v21_dec_t
  • samples_per_seg : dpuCfg_t
  • scale : dpu_trec_t , dpu_crec_t
  • scr_delay : dpu_scr_t
  • scr_fcn : dpuTxInst_t , dpuRxInst_t
  • scr_inst : dpuTxInst_t , dpuRxInst_t
  • send_out : dpuCfg_t
  • SendOutSpec : fmOpenConfig_t , fmInst_s
  • shap_fcn : dpuTxInst_t
  • shap_inst : dpuTxInst_t
  • shape_v17_pt : v17Table_sPtrs_t
  • shape_v27_24_pt : v27Table_sPtrs_t
  • shape_v27_48_pt : v27Table_sPtrs_t
  • shape_v29_pt : v29Table_sPtrs_t
  • shift1 : dpu_scr_t , dpu_descr_t
  • shift2 : dpu_scr_t , dpu_descr_t
  • shift_cnst : dpu_cdec_t
  • sig_pow : dpu_cddet_t
  • sig_power : dpu_dotdet_t
  • sinfn : dpu_crec_t
  • sizeCfg : dpuInst_s , dpuNewCfg_t
  • slic_fcn : dpuRxInst_t
  • slic_inst : dpuRxInst_t
  • slice0167_fcn_ptr : dpu_cdec_t
  • slice2345_fcn_ptr : dpu_cdec_t
  • smap_fcn : dpuRxInst_t , dpuTxInst_t
  • smap_inst : dpuTxInst_t , dpuRxInst_t
  • smap_ptr : dpu_cdec_t
  • smap_table : dpu_smap_t
  • smfn : dpuTxInst_t , dpuRxInst_t
  • snr : fmSigQStats_t
  • start : dpu_v21_dec_t
  • state : fmInst_s , dpu_cenc_t
  • status : dpu_cddet_t , dpu_dotdet_t
  • sts : dpuInst_s
  • sum_im : dpu_phase_t
  • sum_re : dpu_phase_t


FM: Data Fields

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

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

- t -

  • tablePtr : fmContext_t , fmOpenConfig_t
  • TablePtr : dpuCfg_t , dpuInst_s
  • tanTableInFirstOctant_pt : v17Table_sPtrs_t
  • TargetInst : fmReceiveOutSpec_t , fmToneDetCtrlSpec_t , fmSendOutSpec_t , dpuIf_t
  • targInst : dpuSendOut_t , dpuRecvOut_t
  • temp_data : dpu_outman_t
  • tep_cnt_thr : dpu_cddet_t , dpu_dotdet_t
  • tep_count : dpu_cddet_t , dpu_dotdet_t
  • tep_pow : dpu_cddet_t
  • tep_power : dpu_dotdet_t
  • tepCoefs : dpu_cddet_t , dpu_dotdet_t
  • tepIIR : dpu_cddet_t , dpu_dotdet_t
  • tepInp : dpu_cddet_t , dpu_dotdet_t
  • threshold : dpu_trec_t
  • time_out : dpuCfg_t
  • ToneDetCtrl : fmOpenConfig_t , fmInst_s , fmToneDetCtrlSpec_t
  • trec_enable : dpu_trec_t
  • trec_fcn : dpuRxInst_t
  • trec_inst : dpuRxInst_t
  • trellis : dpuCfg_t
  • trn_type : dpuCfg_t
  • ttone_count : dpu_trec_t
  • Tx : fmInst_s
  • tx_baud : dpuTxInst_t
  • tx_count : dpuTxInst_t
  • tx_level : fmOpenConfig_t , dpuCfg_t , fmSigQStats_t
  • tx_mode : dpuTxInst_t
  • tx_rate : fmSigQStats_t , dpuTxInst_t
  • tx_state : dpuTxInst_t
  • TxEcmState : fmInst_s
  • TxFillByte : fmInst_s
  • TxInst : dpuInst_s
  • txUnderflowFill : dpu_inman_t


FM: Data Fields

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

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

- u -

  • update_adeq_fcn : dpuRxInst_t
  • updateAdeqFlag : dpu_adeq_t


FM: Data Fields

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

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

- v -

  • v17TablePtrs : fmTablePtrs_t
  • v21_cnt_thr : dpu_dotdet_t
  • v21_count : dpu_cddet_t , dpu_dotdet_t
  • v21_dec_inst : dpuRxInst_t
  • v21_fcn : dpuRxInst_t
  • v21_power : dpu_dotdet_t
  • v21Filt : dpu_dotdet_t , dpu_cddet_t
  • v21FreqVect : dpu_cddet_t , dpu_dotdet_t
  • v21OneMu : dpu_dotdet_t , dpu_cddet_t
  • v27_flag : dpu_dotdet_t
  • v27TablePtrs : fmTablePtrs_t
  • v29TablePtrs : fmTablePtrs_t
  • vect_im : dpu_phase_t
  • vect_re : dpu_phase_t


FM: Data Fields

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

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

- w -

  • word_index : dpu_outman_t
  • word_size : dpu_inman_t , dpu_outman_t


FM: Data Fields

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

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

- x -

  • x_error : dpu_slic_t
  • x_ideal : dpu_slic_t


FM: Data Fields

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

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

- y -

  • y_error : dpu_slic_t
  • y_ideal : dpu_slic_t


FM: Data Fields - Variables

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

- a -

  • abs_phase : dpu_denc_t
  • accum : dpu_trec_t
  • accum_dist : dpu_cdec_t
  • accumImag : dpu_trec_t
  • accumReal : dpu_trec_t
  • adeq_fcn : dpuRxInst_t
  • adeq_inst : dpuRxInst_t
  • agc_fcn : dpuRxInst_t
  • agc_inst : dpuRxInst_t
  • alpha : dpu_dotdet_t , dpu_trec_t , dpu_cdec_t , dpu_cddet_t
  • angleComputeFlag : dpu_trec_t
  • atan2ScaleFactors_pt : v17Table_sPtrs_t
  • avgNoisePow : dpu_slic_t
  • avgSignalPow : dpu_slic_t


FM: Data Fields - Variables

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

- k -

  • k1 : dpu_crec_t , scaleFactors_t , dpu_trec_t
  • k2 : dpu_trec_t , dpu_crec_t , scaleFactors_t


FM: Data Fields - Variables

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

- l -

  • L1 : dpu_bphilb_t , dpu_shaping_t , dpu_interp_t , interp_params_t
  • L2 : dpu_interp_t , interp_params_t
  • last_phase : dpu_ddec_t
  • length : dpu_shaping_t , interp_params_t , dpu_interp_t , dpu_bphilb_t , dpu_adeq_t , dpu_trec_t
  • LineCond : fm_ctrl_str
  • low_power_req : dpu_cddet_t
  • low_thr : cd_thr_t


FM: Data Fields - Variables

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

- m -

  • mask : dpu_cenc_t , dpu_denc_t , dpu_outman_t , dpu_ddec_t , dpu_fsk_gen_t , dpu_scr_t , dpu_descr_t
  • mask_comp : dpu_denc_t , dpu_ddec_t
  • max_data_per_frame : dpuSizeCfg_t
  • max_error : dpu_crec_t
  • max_rate : dpuCfg_t
  • max_samples_per_frame : dpuSizeCfg_t
  • maxBytesToBuffer : fmOpenConfig_t , fmInst_s
  • min_rate : dpuCfg_t
  • mod_fcn : dpuTxInst_t
  • mod_inst : dpuTxInst_t , dpuRxInst_t
  • mode : dpuCfg_t
  • MsgFifoData : fmInst_s
  • MsgFifoInCnt : fmInst_s
  • MsgFifoOutCnt : fmInst_s


FM: Data Fields - Variables

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

- n -

  • next_bit : dpu_scr_t , dpu_descr_t
  • Non_HDLC_Rx_From_Tele : fmProtoStats_t
  • Non_HDLC_Tx_To_Tele : fmProtoStats_t
  • Non_HDLC_Tx_Underflow : fmProtoStats_t
  • num_of_bits : dpu_scr_t , dpu_descr_t
  • number : dpu_phase_t
  • numBytesStored : fmInst_s


FM: Data Fields - Variables

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

- o -

  • old_gain : dpu_agc_t
  • old_p1 : dpu_trec_t
  • oldin : dpu_interp_t
  • oldin_im : dpu_shaping_t
  • oldin_re : dpu_shaping_t
  • one_mu : dpu_trec_t
  • out_buf : dpuTxInst_t
  • outman_inst : dpuRxInst_t
  • output : dpu_trec_t


FM: Data Fields - Variables

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

- b -

  • Bad_CRC_From_Tele : fmProtoStats_t
  • Bad_CRC_To_Tele : fmProtoStats_t
  • baud_per_seg : dpuTxInst_t , dpuRxInst_t
  • beta : dpu_adeq_t
  • bit_index : dpu_inman_t , dpu_outman_t
  • bits : dpu_inman_t
  • bits_cnt : dpu_inman_t
  • bits_table : dpu_slic_t
  • bp_filt : dpu_bphilb_t
  • bp_hilb_v17_pt : v17Table_sPtrs_t
  • bp_hilb_v21_96_pt : commonTable1_sPtrs_t
  • bp_hilb_v27_48_pt : v27Table_sPtrs_t
  • bp_hilb_v29_pt : v29Table_sPtrs_t
  • bp_hilt_filt : dpu_bphilb_t
  • bp_rx_v17_pt : v17Table_sPtrs_t
  • bp_rx_v21_96_pt : commonTable1_sPtrs_t
  • bp_rx_v27_48_pt : v27Table_sPtrs_t
  • bp_rx_v29_pt : v29Table_sPtrs_t
  • bphilb_fcn : dpuRxInst_t
  • bphilb_inst : dpuRxInst_t
  • bridge_state : dpu_inman_t
  • bts_per_baud : dpuTxInst_t , dpuRxInst_t
  • buf_in_index : dpuRxInst_t
  • buf_out_index : dpuTxInst_t
  • buf_rx_index : dpuRxInst_t
  • buf_tx_index : dpuTxInst_t
  • bytes_cnt : dpu_inman_t
  • BytesNotUsed : fmInst_s


FM: Data Fields - Variables

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

- c -

  • carr_offset : fmSigQStats_t
  • carrLossPendingFlag : dpu_cddet_t
  • cd_thresholds_pt : commonTable1_sPtrs_t
  • cddet_fcn : dpuRxInst_t
  • cddet_inst : dpuRxInst_t
  • cdec_fcn : dpuRxInst_t
  • cdec_inst : dpuRxInst_t
  • cdec_ptr : dpu_slic_t
  • cenc_fcn : dpuTxInst_t
  • cenc_inst : dpuTxInst_t
  • cf_im_long : dpu_adeq_t
  • cf_re_long : dpu_adeq_t
  • cfg : dpuInst_s
  • change_det : dpuRxInst_t
  • commonTable1Ptrs : fmTablePtrs_t
  • commonTable2Ptrs : fmTablePtrs_t
  • Config : fm_ctrl_str
  • const_point : path_struct
  • copy_fcn : dpuTxInst_t , dpuRxInst_t
  • cosfn : dpu_crec_t
  • count : dpu_v21_dec_t , dpu_trec_t , dpu_phase_t , dpu_cddet_t
  • count_false_req : dpu_cddet_t
  • count_true_req : dpu_cddet_t
  • counter : dpu_scr_t , dpu_descr_t
  • crec_fcn : dpuRxInst_t
  • cross_count : dpu_v21_dec_t
  • ctrl : dpuInst_s
  • CtrlParam : dpuIf_t


FM: Data Fields - Variables

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

- d -

  • data_fcn : dpuTxInst_t , dpuRxInst_t
  • data_in_buf : dpuTxInst_t , dpu_inman_t
  • data_out_buf : dpuRxInst_t
  • DataBuf : dpuIf_t
  • DataRate : fmInst_s
  • dcComponent : dpu_trec_t
  • ddec_fcn : dpuRxInst_t
  • ddec_inst : dpuRxInst_t
  • ddec_table : dpu_ddec_t
  • debugInfo : fmContext_t
  • debugLvl : fmOpenConfig_t , fmInst_s
  • decis_table : dpu_slic_t
  • delay : dpu_dotdet_t , dpu_bphilb_t , dpu_trec_t
  • delay1 : dpu_dotdet_t
  • delay_buf_index : dpu_dotdet_t
  • delay_im : dpu_adeq_t , dpu_phase_t
  • delay_re : dpu_adeq_t , dpu_phase_t
  • DelayFlag : fmInst_s
  • demod_fcn : dpuRxInst_t
  • denc_fcn : dpuTxInst_t
  • denc_inst : dpuTxInst_t
  • denc_table : dpu_denc_t
  • descr_delay : dpu_descr_t
  • descr_fcn : dpuRxInst_t
  • descr_inst : dpuRxInst_t
  • direction : dpuCfg_t
  • disable_v21 : dpu_dotdet_t
  • division : dpu_cddet_t , dpu_cdec_t , dpu_dotdet_t , dpu_phase_t , dpu_trec_t
  • division_table : dpu_phase_t
  • dot_cnt_thr : dpu_dotdet_t
  • dot_count : dpu_dotdet_t
  • dot_power : dpu_dotdet_t
  • dotCoefs : dpu_dotdet_t
  • dotdet_fcn : dpuRxInst_t
  • dotdet_inst : dpuRxInst_t
  • dotIIR : dpu_dotdet_t
  • dotInp : dpu_dotdet_t
  • Dpu : fmInst_s
  • dpu_bridge_smap_table_v17_AllRates_pt : v17Table_sPtrs_t
  • dpu_ddec_V17_AllRates_pt : v17Table_sPtrs_t
  • dpu_ddec_V29_4800_pt : v29Table_sPtrs_t
  • dpu_ddec_V29_9600_pt : v29Table_sPtrs_t
  • dpu_denc_V17_AllRates_pt : v17Table_sPtrs_t
  • dpu_denc_V29_4800_pt : v29Table_sPtrs_t
  • dpu_denc_V29_9600_pt : v29Table_sPtrs_t
  • dpu_PN_smap_table_v17_AllRates_pt : v17Table_sPtrs_t
  • dpu_slic_bits_V27_48_pt : v27Table_sPtrs_t
  • dpu_slic_bits_V29_72_pt : v29Table_sPtrs_t
  • dpu_slic_bits_V29_96_pt : v29Table_sPtrs_t
  • dpu_slic_invmod_v17_pt : v17Table_sPtrs_t
  • dpu_slic_invmod_V29_96_pt : v29Table_sPtrs_t
  • dpu_slic_pt_V27_24_pt : v27Table_sPtrs_t
  • dpu_slic_pt_V27_48_pt : v27Table_sPtrs_t
  • dpu_slic_pt_V29_72_pt : v29Table_sPtrs_t
  • dpu_slic_pt_V29_96_pt : v29Table_sPtrs_t
  • dpu_smap_V17_120_pt : v17Table_sPtrs_t
  • dpu_smap_V17_144_pt : v17Table_sPtrs_t
  • dpu_smap_V17_72_pt : v17Table_sPtrs_t
  • dpu_smap_V17_96_pt : v17Table_sPtrs_t
  • dpu_smap_V27_24_pt : v27Table_sPtrs_t
  • dpu_smap_V27_48_pt : v27Table_sPtrs_t
  • dpu_smap_V29_72_pt : v29Table_sPtrs_t
  • dpu_smap_V29_96_pt : v29Table_sPtrs_t
  • dpu_trec_fil_coef_pt : commonTable1_sPtrs_t
  • dpu_v27_count_pt : v27Table_sPtrs_t
  • DPUfeatureBitMap : dpuCfg_t
  • dpuModConvTable_pt : commonTable1_sPtrs_t
  • dpuModRateTable_pt : commonTable1_sPtrs_t
  • dpuModTypeTable_pt : commonTable1_sPtrs_t
  • dpustatus : fmSigQStats_t
  • dummy : dpuCfg_t


FM: Data Fields - Variables

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

- e -

  • element_0 : fm_ctrl_str
  • element_2 : fm_ctrl_str
  • element_3 : fm_ctrl_str
  • element_5 : fm_ctrl_str
  • EndTime : fmInst_s
  • err_phase_fcn : dpuRxInst_t


FM: Data Fields - Variables

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

- f -

  • f1 : dpu_trec_t
  • f2 : dpu_trec_t
  • factor : dpu_dotdet_t
  • fBufferData : fmOpenConfig_t
  • fcn_ptr : dpuSendOut_t , dpuRecvOut_t
  • fFmFpPacketizationMode : fmInst_s
  • fForceBadFCS : fmInst_s
  • filt_index_inc : dpu_trec_t
  • filter : dpu_interp_t , dpu_shaping_t
  • filters : dpu_trec_bank_t
  • filters_im : dpu_shaping_bank_t
  • filters_re : dpu_shaping_bank_t
  • FmBytesCnt : fmInst_s
  • fmCurrMode : fmInst_s
  • FmData : fmInst_s
  • FmDataIn : fmInst_s
  • FmDataOut : fmInst_s
  • FmDataWordCnt : fmInst_s
  • FmDataWordSize : fmInst_s
  • FmEcmMode : fmInst_s
  • FMfeatureBitMap : fmOpenConfig_t
  • FmFpData : fmInst_s
  • fmGetTime : fmContext_t
  • FmNewModemMode : fmInst_s
  • fmProtoStats : fmStatsReport_t
  • fmReceiveOut : fmReceiveOutSpec_t
  • fmSendOut : fmSendOutSpec_t
  • fmSigQStats : fmStatsReport_t
  • FmState : fmInst_s
  • FmStatus : fmInst_s
  • FmTaskRate : fmInst_s
  • FmToneCount : fmInst_s
  • FmTonePhase : fmInst_s
  • FmToneState : fmInst_s
  • frame : dpuCfg_t
  • freeze_count : dpuRxInst_t
  • freq : dpu_crec_t , dpu_mod_t
  • freq_table : dpu_fsk_gen_t
  • fSignalPowerPresent : dpu_cddet_t
  • fsk_gen_fcn : dpuTxInst_t
  • fsk_gen_inst : dpuTxInst_t
  • fsl_bitfield : dpuRxInst_t
  • fslAdjCnt : fmSigQStats_t


FM: Data Fields - Variables

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

- g -

  • gain : dpu_agc_t , dpuTxInst_t
  • gain_calc_flag : dpu_dotdet_t
  • Good_CRC_From_Tele : fmProtoStats_t
  • Good_CRC_To_Tele : fmProtoStats_t


FM: Data Fields - Variables

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

- h -

  • Hdlc : fmInst_s
  • HDLC_Tx_Underflow : fmProtoStats_t
  • HdlcFlagsCnt : fmInst_s
  • hh1 : dpu_trec_t
  • hh2 : dpu_trec_t
  • high_power_req : dpu_dotdet_t , dpu_cddet_t
  • high_thr : cd_thr_t
  • hn_72_80_pt : commonTable1_sPtrs_t
  • hn_80_96_pt : commonTable1_sPtrs_t
  • hn_96_80_pt : commonTable1_sPtrs_t


FM: Data Fields - Variables

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

- i -

  • ID : fmNewConfig_t , dpuNewCfg_t , dpuInst_s , fmInst_s
  • im : cmplx_t
  • in_buf : dpuRxInst_t
  • index : dpu_trec_t
  • index_tab : interp_params_t , dpu_interp_t
  • inman_inst : dpuTxInst_t
  • inpPostAdeqX : dpu_adeq_t
  • inpPostAdeqY : dpu_adeq_t
  • int_filt_index : dpu_trec_t
  • interp_inst : dpuRxInst_t , dpuTxInst_t
  • intrp_fcn : dpuTxInst_t , dpuRxInst_t
  • invmod_mask : dpu_slic_t
  • invmod_table : dpu_slic_t


FM: Data Fields - Variables

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

- p -

  • p1 : dpu_trec_t
  • path_and_delay : path_struct
  • path_dist_ptr : dpu_cdec_t
  • path_store : dpu_cdec_t
  • path_store_cur_ptr : dpu_cdec_t
  • pattern : dpu_v21_dec_t
  • percentBaudOffset : fmSigQStats_t
  • ph_error : dpu_slic_t
  • ph_error_scale : dpu_slic_t
  • phase : dpu_fsk_gen_t , dpu_mod_t , dpu_crec_t
  • phase_err_mul : dpuRxInst_t
  • phase_inst : dpuRxInst_t
  • pn_table : dpu_scr_t
  • postAdeqGain : dpu_adeq_t
  • postAdeqStepSiz : dpu_adeq_t
  • postAdeqUpdateFlag : dpu_adeq_t
  • power : dpu_cddet_t
  • power_sat : dpu_cddet_t
  • pre_p1 : dpu_crec_t
  • pre_p1_old : dpu_crec_t
  • pre_sample : dpu_v21_dec_t
  • pre_symbol : dpu_smap_t
  • prev_path_pt : path_struct
  • procfn : dpuTxInst_t , dpuRxInst_t
  • protocol : dpuCfg_t
  • ProtoStats : fmInst_s


FM: Data Fields - Variables

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

- r -

  • rate : dpuCfg_t
  • re : cmplx_t
  • recv_out : dpuCfg_t
  • rot_imag : dpu_trec_t
  • rot_imag_est : dpu_trec_t
  • rot_real : dpu_trec_t
  • rot_real_est : dpu_trec_t
  • Rx : fmInst_s
  • rx_baud : dpuRxInst_t
  • rx_cd_thr_set : fmOpenConfig_t , dpuCfg_t
  • rx_count : dpuRxInst_t
  • rx_level : dpu_agc_t , fmSigQStats_t
  • rx_mode : dpuRxInst_t
  • rx_rate : fmSigQStats_t , dpuRxInst_t
  • rx_state : dpuRxInst_t
  • RxInst : dpuInst_s
  • RxOutSpec : fmInst_s , fmOpenConfig_t


FM: Data Fields - Variables

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

- s -

  • samp : dpu_crec_t
  • samp_per_baud : dpuTxInst_t , dpuRxInst_t
  • samp_per_seg : dpuTxInst_t , dpuRxInst_t
  • samp_req : dpu_v21_dec_t
  • samples_per_seg : dpuCfg_t
  • scale : dpu_trec_t , dpu_crec_t
  • scr_delay : dpu_scr_t
  • scr_fcn : dpuTxInst_t , dpuRxInst_t
  • scr_inst : dpuTxInst_t , dpuRxInst_t
  • send_out : dpuCfg_t
  • SendOutSpec : fmOpenConfig_t , fmInst_s
  • shap_fcn : dpuTxInst_t
  • shap_inst : dpuTxInst_t
  • shape_v17_pt : v17Table_sPtrs_t
  • shape_v27_24_pt : v27Table_sPtrs_t
  • shape_v27_48_pt : v27Table_sPtrs_t
  • shape_v29_pt : v29Table_sPtrs_t
  • shift1 : dpu_scr_t , dpu_descr_t
  • shift2 : dpu_scr_t , dpu_descr_t
  • shift_cnst : dpu_cdec_t
  • sig_pow : dpu_cddet_t
  • sig_power : dpu_dotdet_t
  • sinfn : dpu_crec_t
  • sizeCfg : dpuInst_s , dpuNewCfg_t
  • slic_fcn : dpuRxInst_t
  • slic_inst : dpuRxInst_t
  • slice0167_fcn_ptr : dpu_cdec_t
  • slice2345_fcn_ptr : dpu_cdec_t
  • smap_fcn : dpuRxInst_t , dpuTxInst_t
  • smap_inst : dpuTxInst_t , dpuRxInst_t
  • smap_ptr : dpu_cdec_t
  • smap_table : dpu_smap_t
  • smfn : dpuTxInst_t , dpuRxInst_t
  • snr : fmSigQStats_t
  • start : dpu_v21_dec_t
  • state : fmInst_s , dpu_cenc_t
  • status : dpu_cddet_t , dpu_dotdet_t
  • sts : dpuInst_s
  • sum_im : dpu_phase_t
  • sum_re : dpu_phase_t


FM: Data Fields - Variables

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

- t -

  • tablePtr : fmContext_t , fmOpenConfig_t
  • TablePtr : dpuCfg_t , dpuInst_s
  • tanTableInFirstOctant_pt : v17Table_sPtrs_t
  • TargetInst : fmReceiveOutSpec_t , fmToneDetCtrlSpec_t , fmSendOutSpec_t , dpuIf_t
  • targInst : dpuSendOut_t , dpuRecvOut_t
  • temp_data : dpu_outman_t
  • tep_cnt_thr : dpu_cddet_t , dpu_dotdet_t
  • tep_count : dpu_cddet_t , dpu_dotdet_t
  • tep_pow : dpu_cddet_t
  • tep_power : dpu_dotdet_t
  • tepCoefs : dpu_cddet_t , dpu_dotdet_t
  • tepIIR : dpu_cddet_t , dpu_dotdet_t
  • tepInp : dpu_cddet_t , dpu_dotdet_t
  • threshold : dpu_trec_t
  • time_out : dpuCfg_t
  • ToneDetCtrl : fmOpenConfig_t , fmInst_s , fmToneDetCtrlSpec_t
  • trec_enable : dpu_trec_t
  • trec_fcn : dpuRxInst_t
  • trec_inst : dpuRxInst_t
  • trellis : dpuCfg_t
  • trn_type : dpuCfg_t
  • ttone_count : dpu_trec_t
  • Tx : fmInst_s
  • tx_baud : dpuTxInst_t
  • tx_count : dpuTxInst_t
  • tx_level : fmOpenConfig_t , dpuCfg_t , fmSigQStats_t
  • tx_mode : dpuTxInst_t
  • tx_rate : fmSigQStats_t , dpuTxInst_t
  • tx_state : dpuTxInst_t
  • TxEcmState : fmInst_s
  • TxFillByte : fmInst_s
  • TxInst : dpuInst_s
  • txUnderflowFill : dpu_inman_t


FM: Data Fields - Variables

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

- u -

  • update_adeq_fcn : dpuRxInst_t
  • updateAdeqFlag : dpu_adeq_t


FM: Data Fields - Variables

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

- v -

  • v17TablePtrs : fmTablePtrs_t
  • v21_cnt_thr : dpu_dotdet_t
  • v21_count : dpu_cddet_t , dpu_dotdet_t
  • v21_dec_inst : dpuRxInst_t
  • v21_fcn : dpuRxInst_t
  • v21_power : dpu_dotdet_t
  • v21Filt : dpu_dotdet_t , dpu_cddet_t
  • v21FreqVect : dpu_cddet_t , dpu_dotdet_t
  • v21OneMu : dpu_dotdet_t , dpu_cddet_t
  • v27_flag : dpu_dotdet_t
  • v27TablePtrs : fmTablePtrs_t
  • v29TablePtrs : fmTablePtrs_t
  • vect_im : dpu_phase_t
  • vect_re : dpu_phase_t


FM: Data Fields - Variables

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

- w -

  • word_index : dpu_outman_t
  • word_size : dpu_inman_t , dpu_outman_t


FM: Data Fields - Variables

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

- x -

  • x_error : dpu_slic_t
  • x_ideal : dpu_slic_t


FM: Data Fields - Variables

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

- y -

  • y_error : dpu_slic_t
  • y_ideal : dpu_slic_t


FM: fxmdpuif.h File Reference

fxmdpuif.h File Reference

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

Include dependency graph for fxmdpuif.h:

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

Go to the source code of this file.

Data Structures

struct | fm_ctrl_str

Defines

#define | FM_DPU_DATA_BUF_SIZE 20
#define | FM_DPU_CONFIG_MODEM_RX_MODE 0x8000
#define | FM_DPU_CONFIG_TX_FILLBIT 0x4000
#define | FM_DPU_CONFIG_RTS 0x2000
#define | FM_DPU_CONFIG_TEP_ENABLE 0x1000
#define | FM_DPU_CONFIG_SETUP 0x0800
#define | FM_DPU_CONFIG_STRAIN 0x0400
#define | FM_DPU_CONFIG_MODULATION_MASK 0x00FF
#define | FM_DPU_LINECOND_CARRIER_DETECT 0x0001
#define | FM_DPU_LINECOND_P2_DETECT 0x0004
#define | FM_DPU_LINECOND_TEP_DETECT 0x0008
#define | FM_DPU_LINECOND_PREAMBLE_DETECT 0x0040
#define | FM_DPU_LINECOND_SIGNAL_PRESENT 0x0080
#define | FM_MFILLBIT 1
#define | FM_MCONF_V29_9600 0x11
#define | FM_MCONF_V29_7200 0x12
#define | FM_MCONF_V29_4800 0x14
#define | FM_MCONF_V27_4800 0x21
#define | FM_MCONF_V27_2400 0x22
#define | FM_MCONF_V21 0x41
#define | FM_MCONF_V17_14400 0x13
#define | FM_MCONF_V17_12000 0x15
#define | FM_MCONF_V17_9600 0x16
#define | FM_MCONF_V17_7200 0x17
#define | FM_MCONF_V33_14400 0x18
#define | FM_MCONF_V33_12000 0x19

Functions

void | FAX_MODEM (fm_ctrl_str *ctrl_str, void *dpuInst)

Define Documentation

#define FM_DPU_DATA_BUF_SIZE 20

Definition at line 37 of file fxmdpuif.h.

Referenced by fmHdlcRx(), fmStateTxHsEcm(), and fmStateTxHsInit().

#define FM_DPU_CONFIG_MODEM_RX_MODE 0x8000

Definition at line 69 of file fxmdpuif.h.

Referenced by FAX_MODEM(), and fmModeChange().

#define FM_DPU_CONFIG_TX_FILLBIT 0x4000

Definition at line 70 of file fxmdpuif.h.

Referenced by FAX_MODEM(), and fmModeChange().

#define FM_DPU_CONFIG_RTS 0x2000

Definition at line 71 of file fxmdpuif.h.

Referenced by FAX_MODEM(), and fmModeChange().

#define FM_DPU_CONFIG_TEP_ENABLE 0x1000

Definition at line 72 of file fxmdpuif.h.

#define FM_DPU_CONFIG_SETUP 0x0800

Definition at line 73 of file fxmdpuif.h.

Referenced by FAX_MODEM(), and fmModeChange().

#define FM_DPU_CONFIG_STRAIN 0x0400

Definition at line 74 of file fxmdpuif.h.

Referenced by FAX_MODEM(), and fmModeChange().

#define FM_DPU_CONFIG_MODULATION_MASK 0x00FF

Definition at line 75 of file fxmdpuif.h.

Referenced by FAX_MODEM(), and fmModeChange().

#define FM_DPU_LINECOND_CARRIER_DETECT 0x0001

Definition at line 101 of file fxmdpuif.h.

Referenced by FAX_MODEM(), fmCheckCarrierOff(), and fmCheckCarrierOn().

#define FM_DPU_LINECOND_P2_DETECT 0x0004

Definition at line 102 of file fxmdpuif.h.

Referenced by FAX_MODEM(), and fmCheckP2().

#define FM_DPU_LINECOND_TEP_DETECT 0x0008

Definition at line 103 of file fxmdpuif.h.

Referenced by FAX_MODEM(), and fmCheckTep().

#define FM_DPU_LINECOND_PREAMBLE_DETECT 0x0040

Definition at line 104 of file fxmdpuif.h.

Referenced by FAX_MODEM(), and fmCheckPreamble().

#define FM_DPU_LINECOND_SIGNAL_PRESENT 0x0080

Definition at line 105 of file fxmdpuif.h.

Referenced by FAX_MODEM(), and fmCheckSignalPresent().

#define FM_MFILLBIT 1

Definition at line 111 of file fxmdpuif.h.

Referenced by fmModeChange().

#define FM_MCONF_V29_9600 0x11

Definition at line 115 of file fxmdpuif.h.

#define FM_MCONF_V29_7200 0x12

Definition at line 116 of file fxmdpuif.h.

#define FM_MCONF_V29_4800 0x14

Definition at line 117 of file fxmdpuif.h.

#define FM_MCONF_V27_4800 0x21

Definition at line 118 of file fxmdpuif.h.

#define FM_MCONF_V27_2400 0x22

Definition at line 119 of file fxmdpuif.h.

#define FM_MCONF_V21 0x41

Definition at line 120 of file fxmdpuif.h.

#define FM_MCONF_V17_14400 0x13

Definition at line 122 of file fxmdpuif.h.

#define FM_MCONF_V17_12000 0x15

Definition at line 123 of file fxmdpuif.h.

#define FM_MCONF_V17_9600 0x16

Definition at line 124 of file fxmdpuif.h.

#define FM_MCONF_V17_7200 0x17

Definition at line 125 of file fxmdpuif.h.

#define FM_MCONF_V33_14400 0x18

Definition at line 127 of file fxmdpuif.h.

#define FM_MCONF_V33_12000 0x19

Definition at line 128 of file fxmdpuif.h.

Function Documentation

void FAX_MODEM | ( | fm_ctrl_str * | ctrl_str,
 |  | void * | dpuInst
 | ) |  |

Definition at line 106 of file fax_mod.c.

References dpuRxInst_t::cddet_inst, dpuInst_s::cfg, fmTablePtrs_t::commonTable1Ptrs, fm_ctrl_str::Config, dpuInst_s::ctrl, dpuCfg_t::direction, DPU_CTRL_CDET, DPU_CTRL_P2, DPU_CTRL_RTS, DPU_CTRL_TEP, DPU_CTRL_V21, DPU_DIR_RX, DPU_DIR_TX, DPU_MODULATION_COUNT, DPU_TRN_LONG, DPU_TRN_SHORT, DPU_V17_RX_ST7, DPU_V27_RX_ST7, DPU_V29_RX_ST7, dpuConfig(), commonTable1_sPtrs_t::dpuModConvTable_pt, commonTable1_sPtrs_t::dpuModRateTable_pt, commonTable1_sPtrs_t::dpuModTypeTable_pt, dpuRx(), dpuTx(), fm_ctrl_str::element_0, fm_ctrl_str::element_2, fm_ctrl_str::element_3, fm_ctrl_str::element_5, FM_DPU_CONFIG_MODEM_RX_MODE, FM_DPU_CONFIG_MODULATION_MASK, FM_DPU_CONFIG_RTS, FM_DPU_CONFIG_SETUP, FM_DPU_CONFIG_STRAIN, FM_DPU_CONFIG_TX_FILLBIT, FM_DPU_LINECOND_CARRIER_DETECT, FM_DPU_LINECOND_P2_DETECT, FM_DPU_LINECOND_PREAMBLE_DETECT, FM_DPU_LINECOND_SIGNAL_PRESENT, FM_DPU_LINECOND_TEP_DETECT, dpu_cddet_t::fSignalPowerPresent, fm_ctrl_str::LineCond, dpuCfg_t::mode, dpuCfg_t::rate, dpuRxInst_t::rx_state, dpuInst_s::RxInst, dpuInst_s::TablePtr, and dpuCfg_t::trn_type.

Here is the call graph for this function:


FM: fxmdpuif.h Source File

fxmdpuif.h

Go to the documentation of this file.
00001 #ifndef _FXMDPUIF_H_
00002 #define _FXMDPUIF_H_
00003 /******************************************************************************
00004 *
00005 * FILE PURPOSE: functions and structures shared by DPU and FM
00006 *
00007 *******************************************************************************
00008 * FILE NAME: fxmdpuif.h
00009 *
00010 * DESCRIPTION:  This file has the definitions and function calls shared by
00011 *               the DPU and the fax modem driver
00012 *
00013 *
00014 * NOTE: This file is used to compile FM files for GG 4.1, while DPU is
00015 *       compiled using files checked out of FIU project. The files
00016 *       FMDDPU.H and FAXC30.H of FIU project have been combined into this
00017 *       file
00018 *
00019 * $Id: fxmdpuif.h 1.3 1998/09/02 09:52:51 ffruth Exp $
00020 *
00021 * REVISION HISTORY:
00022 *
00023 * $Log: fxmdpuif.h $
00024 * Revision 1.3  1998/09/02 09:52:51  ffruth
00025 * - Added definition of modem fill bit in command structure.  FM_MCRTL02.
00026 * Revision 1.2  1998/07/21 17:20:16  sakhtar
00027 * Modified for customer/GG5.0. This file has new API for debug, exception
00028 * and messages exchanged between FXM and fax protocol (FP)
00029 * Revision 1.1  1998/07/15 17:28:38  sakhtar
00030 * Initial revision
00031 *
00032 * (C) Copyright 1998, Telogy Networks, Inc.
00033 ******************************************************************************/
00034 #include <ti/mas/types/types.h>
00035
00036 /* size of the data buffer shared by the FM and DPU */
00037 #define   FM_DPU_DATA_BUF_SIZE     20
00038
00039 /******************************************************************************
00040 * DATA DEFINITION: FM - DPU Config register
00041 *
00042 *******************************************************************************
00043 * DESCRIPTION: A one-word (16-bit) config register that reflects the current
00044 *              configuration of the DPU.  Used to communicate between the FM
00045 *              and DPU fax modules.  The register is laid out as follows:
00046 *
00047 *              ---------------------------------------------------------------
00048 *             |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |
00049 *             |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |
00050 *              ---------------------------------------------------------------
00051 *      Bit #:  15  14  13  12  11  10  09  08  07  06  05  04  03  02  01  00
00052 *               ^   ^   ^   ^   ^   ^  <====> <==============================>
00053 *               |   |   |   |   |   |  unused   Modulation Rate (Bits 0 - 7)
00054 *               |   |   |   |   |   |  (8, 9)   (see FM_MCONF_Vxx_xxxxx below)
00055 *               |   |   |   |   |   |
00056 *               |   |   |   |   |    \ Modem short training: 1 = Yes, 0 = No
00057 *               |   |   |   |   |
00058 *               |   |   |   |    \  Modem Setup bit: 1 = new config; 0 = same
00059 *               |   |   |   |
00060 *               |   |   |    \ Modem TEP enable: 1 = enabled, 0 = disabled
00061 *               |   |   |
00062 *               |   |    \ Modem RTS (ready to send) indication: 1 = RTS, 0 = not
00063 *               |   |
00064 *               |    \ Modem TX Underrun Bit: 1 or 0
00065 *               |
00066 *                \ Modem Mode: TX = 0, RX = 1
00067 *
00068 ******************************************************************************/
00069 #define FM_DPU_CONFIG_MODEM_RX_MODE           0x8000              /* Bit 15 */
00070 #define FM_DPU_CONFIG_TX_FILLBIT              0x4000              /* Bit 14 */
00071 #define FM_DPU_CONFIG_RTS                     0x2000              /* Bit 13 */
00072 #define FM_DPU_CONFIG_TEP_ENABLE              0x1000              /* Bit 12 */
00073 #define FM_DPU_CONFIG_SETUP                   0x0800              /* Bit 11 */
00074 #define FM_DPU_CONFIG_STRAIN                  0x0400              /* Bit 10 */
00075 #define FM_DPU_CONFIG_MODULATION_MASK         0x00FF              /* Masks out
00076                                                                      8 LSBs */
00077 /******************************************************************************
00078 * DATA DEFINITION: FM - DPU Line Condition register
00079 *
00080 *******************************************************************************
00081 * DESCRIPTION: A one-word (16-bit) status register that reflects the current
00082 *              line condition of the DPU. The register is laid out as follows:
00083 *
00084 *              ---------------------------------------------------------------
00085 *             |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |
00086 *             |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |
00087 *              ---------------------------------------------------------------
00088 *      Bit #:  15  14  13  12  11  10  09  08  07  06  05  04  03  02  01  00
00089 *                                               ^    ^           ^   ^       ^
00090 *                                               |    |           |   |       |
00091 *                                               |    |           |   |       |
00092 *                                               |  V21 FLAGS    TEP  P2     CD
00093 *                                           SIG_PRESENT
00094 *
00095 * NOTE: The current usage of this register left-shifts the FM_DPULINECOND
00096 *       values up by 8 bits (fxmloc.h), so you can really only use the lower
00097 *       8 bits.  This is because the DPU line condition register is XOR'd with
00098 *       the FXM status register to determine current status (see function
00099 *       fxmCheckLineCond() in fxm.c).
00100 ******************************************************************************/
00101 #define FM_DPU_LINECOND_CARRIER_DETECT        0x0001              /* Bit 0  */
00102 #define FM_DPU_LINECOND_P2_DETECT             0x0004              /* Bit 2  */
00103 #define FM_DPU_LINECOND_TEP_DETECT            0x0008              /* Bit 3  */
00104 #define FM_DPU_LINECOND_PREAMBLE_DETECT       0x0040              /* Bit 6  */
00105 #define FM_DPU_LINECOND_SIGNAL_PRESENT        0x0080              /* Bit 7  */
00106
00107 /******************************************************************************
00108 * DATA DEFINITION: Supporting constants for use with FM/DPU interface
00109 *
00110 ******************************************************************************/
00111 #define FM_MFILLBIT 1   /* Specifies the transmit fill bit (0 or 1) */
00112
00113 /* Values for the modem configuration in register hw_mconf (not all values are
00114 listed here). */
00115 #define FM_MCONF_V29_9600  0x11
00116 #define FM_MCONF_V29_7200  0x12
00117 #define FM_MCONF_V29_4800  0x14
00118 #define FM_MCONF_V27_4800  0x21
00119 #define FM_MCONF_V27_2400  0x22
00120 #define FM_MCONF_V21       0x41
00121 /* Values for V.17 these are arbitrary chosen will have to be corrected later */
00122 #define FM_MCONF_V17_14400  0x13
00123 #define FM_MCONF_V17_12000  0x15
00124 #define FM_MCONF_V17_9600   0x16
00125 #define FM_MCONF_V17_7200   0x17
00126 /* Values for V.33 these are arbitrary chosen will have to be corrected later */
00127 #define FM_MCONF_V33_14400  0x18
00128 #define FM_MCONF_V33_12000  0x19
00129
00130 /*******************************************************************************
00131 * DATA DEFINITION: Data Structure for the Fax Modem Pump
00132 *
00133 ********************************************************************************
00134 * DESCRIPTION: Definition of the fax modem pump control area data structure
00135 *
00136 *******************************************************************************/
00137 typedef struct
00138 {
00139     linSample *element_0;   /* pointer to the base of the PCM buffer */
00140     Fract      element_2;   /* number of PCM words used by the modem */
00141     tword     *element_3;   /* pointer to the base of the data buffer */
00142     Fract      element_5;   /* number of Scan Line words used by the modem */
00143     tuint      Config;      /* DPU Configuration Register */
00144     tuint      LineCond;    /* DPU Line Condition Register */
00145
00146 } fm_ctrl_str;
00147 /******************************************************
00148 *
00149 * Prototype of the DPU function called by FM task
00150 *
00151 ******************************************************/
00152
00153 void FAX_MODEM (fm_ctrl_str *ctrl_str, void *dpuInst);
00154
00155 #endif /* _FXMDPUIF_H_ */


FM: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • 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:

- _ -

  • __extern : Version.h
  • _FMPORT_C54 : fmport.h
  • _FMPORT_C54_FAR : fmport.h
  • _FMPORT_C55 : fmport.h
  • _FMPORT_C55L : fmport.h
  • _FMPORT_C64 : fmport.h
  • _FMPORT_C64_BIG_ENDIAN : fmport.h
  • _FMPORT_C64P : fmport.h
  • _FMPORT_C64P_BIG_ENDIAN : fmport.h
  • _FMPRAG_C54 : fmprag.h
  • _FMPRAG_C54_FAR : fmprag.h
  • _FMPRAG_C55 : fmprag.h
  • _FMPRAG_C55L : fmprag.h
  • _FMPRAG_C64 : fmprag.h
  • _FMPRAG_C64_BIG_ENDIAN : fmprag.h
  • _FMPRAG_C64P : fmprag.h
  • _FMPRAG_C64P_BIG_ENDIAN : fmprag.h


FM: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • 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 -

  • MAX_BAUD_RATE : dpu.h
  • MAX_MODEM_RATE : dpu.h
  • MAX_SENDOUT_T_MS : dpu.h
  • MY_Q10_SCALE : v17.h
  • MY_Q15_SCALE : v17.h
  • MY_Q16_SCALE : v17.h


FM: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • 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 -

  • NOMINAL_INPUT_LEVEL : dpu_agc.h
  • NOMINAL_RX_LEVEL : dpu_agc.h
  • normalize() : dpuatan2.c
  • NUM_PATH_STATES : v17s.c


FM: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • 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 -

  • ONE_Q14 : dpuatan2.c


FM: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • 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 -

  • atan2ScaleFactors : dpuatan2.c
  • averagePow() : cdrx.h , cdrx.c


FM: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • 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 -

  • bp_hilb_v17 : v17datrx.h
  • bp_rx_v17 : v17datrx.h


FM: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • 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 -

  • c1tables : fm.h , dpu_tables.c
  • CD_TEST : dpu_cd.c
  • CD_TEST1 : dpu_cd.c
  • complex_mpy() : dpumath.h
  • compute_baud_per_seg() : vxxinit.c
  • compute_bts_per_baud() : vxxinit.c
  • CONST_TEST : procrx.c
  • convolu_complex() : dpu_adeq.h , dpumath.h , dpu_adeq.c
  • convoluI() : dpu_fir.h , dpu_fir.c
  • CREC_CONST_SCALE : dpu_crec.h
  • CREC_TEST : dpu_crec.c
  • crossCor() : dpu_trec.c , dpumath.h


FM: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • 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 -

  • division_table : vxxinit.c
  • dot_prod() : dpu_fir.c , dpu_fir.h
  • dot_square_asm() : dpu_fir.c , dpu_fir.h , dpumath.h
  • DOT_TEST : dpu_ddet.c
  • dpu_adeq() : dpu_adeq.c , dpu_adeq.h
  • DPU_ADEQ_CF_IM_LONG : dpu.h
  • DPU_ADEQ_CF_RE_LONG : dpu.h
  • DPU_ADEQ_COEF_LEN : dpu_adeq.h
  • DPU_ADEQ_DELAY_IM : dpu.h
  • DPU_ADEQ_DELAY_RE : dpu.h
  • DPU_ADEQ_DL_LEN : dpu_adeq.h
  • dpu_adeq_init() : ade_init.c , ade_init.h , dpu_adeq.h
  • dpu_agc() : agcrx.c , agcrx.h
  • dpu_agc_init() : dpu_agc.c , dpu_agc.h
  • DPU_AGC_SCALE : dpu_agc.h
  • dpu_bp_hilb() : hilbrx.c , hilbrx.h
  • dpu_bp_hilb_init() : dpu_hilb.c , dpu_hilb.h
  • dpu_bridge_seq_v17 : v17data.h
  • dpu_bridge_seq_v17_init() : v17.h
  • DPU_CAR_PHASE_TEST : crecrx.c
  • dpu_cd_det_hs() : cdrx.c , cdrx.h
  • dpu_cd_det_hs_pwrlatch() : cdrx.c , cdrx.h
  • dpu_cd_det_init() : dpu_cd.c , dpu_cd.h
  • dpu_cd_det_util() : cdrx.c , cdrx.h
  • dpu_cd_det_v21() : dpu_cd.c , dpu_cd.h
  • DPU_CD_FALSE : dpu_cd.h
  • DPU_CD_TRUE : dpu_cd.h
  • dpu_cdec() : dpu_cdec.h
  • DPU_CDEC_ACCUM_DIST : dpu.h
  • DPU_CDEC_DELAY_STATES : dpu_cdec.h
  • dpu_cdec_init() : cdc_init.h
  • DPU_CDEC_PATH_DIST : dpu.h
  • DPU_CDEC_PATH_STORE : dpu.h
  • DPU_CDEC_VIT_DELAY : dpu_cdec.h
  • dpu_cenc_init() : dpu_cenc.h
  • dpu_cenc_v17() : v17.h
  • dpu_crec() : crecrx.c , crecrx.h
  • DPU_CREC_ATAN2_2_PHASE_Q : dpu_crec.c
  • DPU_CREC_ATAN2_2_PHASE_SCALE : dpu_crec.c
  • dpu_crec_init() : dpu_crec.c , dpu_crec.h
  • DPU_CREC_PHASE_Q : dpu_crec.c
  • DPU_CTRL_CDET : dpuloc.h
  • DPU_CTRL_CTS : dpuloc.h
  • DPU_CTRL_DSR : dpuloc.h
  • DPU_CTRL_ERROR : dpuloc.h
  • DPU_CTRL_IDLE : dpuloc.h
  • DPU_CTRL_OVERRUN : dpuloc.h
  • DPU_CTRL_P2 : dpuloc.h
  • DPU_CTRL_PDSQ : dpuloc.h
  • DPU_CTRL_RTS : dpuloc.h
  • DPU_CTRL_TEP : dpuloc.h
  • DPU_CTRL_TEST : dpuloc.h
  • DPU_CTRL_UNDERRUN : dpuloc.h
  • DPU_CTRL_V21 : dpuloc.h
  • DPU_DATA : dpu.h
  • DPU_DATA_NO : dputxin.h
  • DPU_DATA_OK : dputxin.h
  • DPU_DATA_OVER : dputxin.h
  • DPU_DATAIN_BUFN : dpu.h
  • DPU_DATAOUT_BUFN : dpu.h
  • DPU_DBG_RCV_MSG : fax_mod.c
  • DPU_DBG_XMT_MSG : fax_mod.c
  • dpu_ddec_init() : dif_dec.c , dpu_denc.h
  • dpu_ddec_v17() : v17rx.h
  • dpu_ddec_v29() : dif_dec.c , dpu_denc.h
  • DPU_DDET_MAX_DELAY : dpu_ddet.h
  • DPU_DDET_MAX_DELAY_1 : dpu_ddet.h
  • dpu_denc_init() : dif_enc.c , dpu_denc.h
  • dpu_denc_table_bridge_v17 : v17data.h
  • dpu_denc_v17() : v17.h
  • dpu_denc_v17_bridge() : v17.h
  • dpu_denc_v29() : dif_enc.c , dpu_denc.h
  • dpu_descr() : descrrx.c , descrrx.h
  • dpu_descr_init() : descr.c , dpu_scr.h
  • dpu_descr_v27() : descr.c , dpu_scr.h
  • DPU_DIR_RX : dpu.h
  • DPU_DIR_TX : dpu.h
  • dpu_dot() : dpu_smap.h , sym_map.c
  • dpu_dot_det() : dpu_ddet.c , dpu_ddet.h
  • dpu_dot_det_init() : dpu_ddet.c , dpu_ddet.h
  • dpu_dot_v17() : v17.h
  • dpu_dot_V17_AllRates : v17data.h
  • dpu_dot_V27 : vxxinit.c
  • dpu_dot_V27_24 : vxxinit.c
  • dpu_dot_V27_48 : vxxinit.c
  • dpu_dot_V29_72 : vxxinit.c
  • dpu_dot_V29_96 : vxxinit.c
  • DPU_DOWNSAMP_RATE : dpuloc.h
  • dpu_err_pha_trn() : dpu_phas.h
  • dpu_err_pha_trn_1() : dpu_phas.h , dpuphase.c
  • dpu_err_pha_v17() : v17.h
  • dpu_err_pha_v17_1() : v17.h
  • dpu_err_pha_v27_trn() : dpu_phas.h , dpuphase.c
  • dpu_err_pha_v29_72() : dpu_phas.h , dpuphase.c
  • dpu_err_pha_v29_72_1() : dpu_phas.h , dpuphase.c
  • dpu_err_pha_v29_96() : dpu_phas.h , dpuphase.c
  • dpu_err_pha_v29_96_1() : dpu_phas.h , dpuphase.c
  • DPU_ERROR : dpu.h
  • DPU_EXC_DELETE : dpu.h
  • DPU_EXC_OPEN : dpu.h
  • DPU_FAX : dpu.h
  • DPU_FEATURE_FLC : dpu.h
  • DPU_FEATURE_FLC_ENABLE_MASK : dpu.h
  • dpu_fir() : dpu_shap.h
  • DPU_FSK_FREQ_DOWN_LIMIT : dpu_fsk.c
  • DPU_FSK_FREQ_HIGH_LIMIT : dpu_fsk.c
  • DPU_FSK_FREQ_LOW_LIMIT : dpu_fsk.c
  • DPU_FSK_FREQ_UP_LIMIT : dpu_fsk.c
  • dpu_fsk_gen_init() : dpu_fsk.c , dpu_fsk.h
  • DPU_FSK_REQ_COUNT : dpu_fsk.c
  • dpu_gain_calc() : dpu_agc.c , dpu_agc.h
  • dpu_gain_cst : dpu_gain.c , dpu_mod.h
  • dpu_gen_bridge_seq_v17() : v17.h
  • dpu_gen_marks() : dputxin.c , dputxin.h
  • dpu_get_division_v17() : v17.h
  • DPU_HILB_DELAY : dpu.h
  • DPU_HILB_LEN : dpu_hilb.h
  • DPU_IN_WORD_SIZE : dputxin.h
  • DPU_INMAN_BEGIN : dpu.h
  • DPU_INMAN_END : dpu.h
  • dpu_inman_init() : dputxin.c , dputxin.h
  • DPU_INSTANCE_BUFN : dpu.h
  • dpu_interp() : dpu_intp.h , interp.c
  • dpu_interp_init() : int_init.c , int_init.h
  • dpu_interp_output() : dpu_fir.c , dpu_intp.h
  • DPU_INTP_72_80_FILT_SIZE : dpu_intp.h
  • DPU_INTP_72_80_INDEX : dpu_intp.h
  • DPU_INTP_80_96_FILT_SIZE : dpu_intp.h
  • DPU_INTP_80_96_INDEX : dpu_intp.h
  • DPU_INTP_96_80_FILT_SIZE : dpu_intp.h
  • DPU_INTP_96_80_INDEX : dpu_intp.h
  • DPU_MAX_BAUDS_PER_SEG : dpu.h
  • DPU_MAX_M : dpu_intp.h
  • DPU_MAX_M_COEF : dpu_intp.h
  • DPU_MAX_SAMPLE : dpuloc.h
  • DPU_MAX_SAMPS_PER_SEG : dpu.h
  • DPU_MAX_WORD : dpuloc.h , dputxin.h
  • dpu_mod_init() : dpu_mod.c , dpu_mod.h
  • DPU_MOD_NULL : dpu.h
  • DPU_MOD_V17 : dpu.h
  • DPU_MOD_V21 : dpu.h
  • DPU_MOD_V27T : dpu.h
  • DPU_MOD_V29 : dpu.h
  • DPU_MOD_V33 : dpu.h
  • DPU_MODULATION_COUNT : dpuloc.h
  • DPU_MODULATION_V21 : dpuloc.h
  • DPU_MODULATION_V27_2400 : dpuloc.h
  • DPU_MODULATION_V27_4800 : dpuloc.h
  • DPU_MODULATION_V29_7200 : dpuloc.h
  • DPU_MODULATION_V29_9600 : dpuloc.h
  • DPU_NBUFS : dpu.h
  • dpu_no_crec() : dpu_crec.c , dpu_crec.h
  • dpu_no_crec_at_all() : dpu_crec.c , dpu_crec.h
  • DPU_NOERR : dpu.h
  • DPU_NOMEMORY : dpu.h
  • DPU_OUT_WORD_SIZE : dputxin.h
  • dpu_outman_init() : dputxin.c , dputxin.h
  • DPU_P2_FALSE : dpu_ddet.h
  • DPU_P2_TRUE : dpu_ddet.h
  • dpu_pc_det() : dpu_ddet.c , dpu_ddet.h
  • DPU_PC_FALSE : dpu_ddet.h
  • DPU_PC_TRUE : dpu_ddet.h
  • dpu_phase_init() : dpu_phas.c , dpu_phas.h
  • DPU_PHASE_LEN : dpu_phas.h
  • dpu_phase_v27() : dpu_phas.h
  • dpu_phase_v29() : dpu_phas.h
  • dpu_PN_gen() : scr.c , dpu_scr.h
  • dpu_PN_table_v17_AllRates : v17data.h
  • dpu_PN_table_v29_7200 : vxxinit.c
  • dpu_PN_table_v29_9600 : vxxinit.c
  • DPU_RATE_12000 : dpu.h
  • DPU_RATE_14400 : dpu.h
  • DPU_RATE_2400 : dpu.h
  • DPU_RATE_300 : dpu.h
  • DPU_RATE_4800 : dpu.h
  • DPU_RATE_7200 : dpu.h
  • DPU_RATE_9600 : dpu.h
  • DPU_RATE_NULL : dpu.h
  • dpu_READ_FSL_DETECTED : dpuloc.h
  • dpu_READ_FSL_ENABLE : dpuloc.h
  • DPU_RECVIN_BUFN : dpu.h
  • DPU_RECVOUT_BUFN : dpu.h
  • dpu_rx_common_init() : vxxinit.c
  • dpu_rx_copy() : maniprx.h , maniprx.c
  • dpu_rx_demod() : crecrx.c , crecrx.h
  • DPU_RX_INTP_OLDIN : dpu.h
  • dpu_rx_packet() : maniprx.h , maniprx.c
  • dpu_rx_v17_init() : v17.h
  • dpu_rx_v21_init() : vxxinit.c , vxxinit.h
  • dpu_rx_v27_init() : vxxinit.c , vxxinit.h
  • dpu_rx_v29_init() : vxxinit.c , vxxinit.h
  • dpu_scr() : scr.c , dpu_scr.h
  • dpu_scr_init() : dpu_scr.h , scr.c
  • dpu_scr_v27() : scr.c , dpu_scr.h
  • dpu_SET_FSL_DETECTED : dpuloc.h
  • dpu_SET_FSL_ENABLE : dpuloc.h
  • DPU_SHAP_OLDIN_IM : dpu.h
  • DPU_SHAP_OLDIN_RE : dpu.h
  • dpu_shaping() : shaping.c , dpu_shap.h
  • DPU_SI_SS_ERRMUL : dpuloc.h
  • DPU_SI_SS_ERRMUL_V17 : dpuloc.h
  • dpu_slic_bits_V27_24 : slicers.c , vxxinit.c
  • dpu_slic_init() : dpu_slic.h , slicers.c
  • dpu_slic_invmod_V27_24 : vxxinit.c , slicers.c
  • dpu_slic_invmod_V27_48 : vxxinit.c , slicers.c
  • dpu_slic_invmod_V29_72 : slicers.c , vxxinit.c
  • dpu_slic_v17() : v17slic.h
  • dpu_smap() : sym_map.c , dpu_smap.h
  • dpu_smap_init() : dpu_smap.h , sym_map.c
  • dpu_smap_v17() : v17.h
  • dpu_smap_V17_120 : v17datrx.h , v17smap.h
  • dpu_smap_V17_144 : v17smap.h , v17datrx.h
  • DPU_SS_SI_FREEZE_BAUDCNT : dpuloc.h
  • DPU_ST_V17_RX : dpu.h
  • DPU_ST_V17_TX : dpu.h
  • DPU_ST_V21_RX : dpu.h
  • DPU_ST_V21_TX : dpu.h
  • DPU_ST_V27_RX : dpu.h
  • DPU_ST_V27_TX : dpu.h
  • DPU_ST_V29_RX : dpu.h
  • DPU_ST_V29_TX : dpu.h
  • DPU_STATUS_FD : dpu.h
  • DPU_STATUS_HD : dpu.h
  • DPU_STATUS_RX : dpu.h
  • DPU_STATUS_TX : dpu.h
  • DPU_STATUS_V17 : dpu.h
  • DPU_STATUS_V21 : dpu.h
  • DPU_STATUS_V27 : dpu.h
  • DPU_STATUS_V29 : dpu.h
  • DPU_TEP_TRUE : dpu_ddet.h
  • DPU_TREC_COEF_SCALE : dpu_trec.h
  • DPU_TREC_CONST_SCALE : dpu_trec.h
  • DPU_TREC_DELAY : dpu.h
  • DPU_TREC_DELAY_LEN : dpu_trec.h
  • DPU_TREC_INDEX_INC : dpu_trec.h
  • dpu_trec_init() : trc_init.h , trc_init.c
  • dpu_trec_interp() : dpu_trec.c , dpu_trec.h
  • DPU_TREC_K1 : dpu_trec.h
  • DPU_TREC_K2 : dpu_trec.h
  • DPU_TREC_LEN : fmTablesTypes.h
  • DPU_TREC_NUM : dpuatan2.c
  • DPU_TREC_NUMBER : fmTablesTypes.h
  • DPU_TREC_OUT_LEN : dpu_trec.h
  • DPU_TREC_OUTPUT : dpu.h
  • DPU_TREC_THR : dpu_trec.h
  • DPU_TRN_LONG : dpu.h
  • DPU_TRN_SHORT : dpu.h
  • dpu_ttone() : dpu_trec.c
  • dpu_tx_copy() : dputxin.c , dputxin.h
  • dpu_tx_extract() : dputxin.h , dputxin.c
  • DPU_TX_INTP_OLDIN : dpu.h
  • dpu_tx_mod() : dpu_mod.c , dpu_mod.h
  • dpu_tx_shaping_init() : shaping.c , dpu_shap.h
  • dpu_un_modulate() : dpu_mod.c , dpu_mod.h
  • dpu_un_modulate_v17() : v17.h
  • dpu_update_adeq() : dpu_adeq.c , dpu_adeq.h
  • DPU_UPSAMPLE_RATE : dpuloc.h
  • DPU_V17_RX_ST0 : v17.h
  • DPU_V17_RX_ST1 : v17.h
  • DPU_V17_RX_ST10 : v17.h
  • DPU_V17_RX_ST2 : v17.h
  • DPU_V17_RX_ST3 : v17.h
  • DPU_V17_RX_ST34 : v17.h
  • DPU_V17_RX_ST4 : v17.h
  • DPU_V17_RX_ST5 : v17.h
  • DPU_V17_RX_ST6 : v17.h
  • DPU_V17_RX_ST7 : v17.h
  • DPU_V17_RX_ST8 : v17.h
  • DPU_V17_RX_ST9 : v17.h
  • DPU_V17_RX_STNULL : v17.h
  • DPU_V17_TX_ST0 : v17.h
  • DPU_V17_TX_ST1 : v17.h
  • DPU_V17_TX_ST2 : v17.h
  • DPU_V17_TX_ST3 : v17.h
  • DPU_V17_TX_ST4 : v17.h
  • DPU_V17_TX_ST5 : v17.h
  • DPU_V17_TX_ST6 : v17.h
  • DPU_V17_TX_STNULL : v17.h
  • dpu_v21_check() : dpu_fsk.c , dpu_fsk.h
  • dpu_v21_check_high() : dpu_fsk.c , dpu_fsk.h
  • dpu_v21_dec() : dpu_fsk.h , dpu_fsk.c
  • dpu_v21_dec_init() : dpu_fsk.h , dpu_fsk.c
  • dpu_v21_demod() : dpu_crec.h , dpu_crec.c
  • DPU_V21_FALSE : dpu_fsk.h
  • dpu_v21_freq_h_table : vxxinit.c , dpu.c , dpu_fsk.c
  • dpu_v21_fsk_gen() : dpu_fsk.c , dpu_fsk.h
  • DPU_V21_HIGH_CHANNEL : dpu_fsk.h
  • DPU_V21_HS_TRUE : dpu_ddet.h
  • DPU_V21_LOW_CHANNEL : dpu_fsk.h
  • DPU_V21_RX_ST0 : dpuloc.h
  • DPU_V21_RX_ST1 : dpuloc.h
  • DPU_V21_RX_ST2 : dpuloc.h
  • DPU_V21_RX_ST3 : dpuloc.h
  • DPU_V21_RX_ST4 : dpuloc.h
  • DPU_V21_RX_STNULL : dpuloc.h
  • DPU_V21_TRUE : dpu_ddet.h , dpu_fsk.h
  • DPU_V27_RX_ST0 : dpuloc.h
  • DPU_V27_RX_ST1 : dpuloc.h
  • DPU_V27_RX_ST2 : dpuloc.h
  • DPU_V27_RX_ST3 : dpuloc.h
  • DPU_V27_RX_ST34 : dpuloc.h
  • DPU_V27_RX_ST4 : dpuloc.h
  • DPU_V27_RX_ST5 : dpuloc.h
  • DPU_V27_RX_ST6 : dpuloc.h
  • DPU_V27_RX_ST7 : dpuloc.h
  • DPU_V27_RX_ST8 : dpuloc.h
  • DPU_V27_RX_STNULL : dpuloc.h
  • dpu_v27_St3_smap() : sym_map.c , dpu_smap.h
  • DPU_V27_TX_ST0 : dpuloc.h
  • DPU_V27_TX_ST1 : dpuloc.h
  • DPU_V27_TX_ST2 : dpuloc.h
  • DPU_V27_TX_ST3 : dpuloc.h
  • DPU_V27_TX_ST4 : dpuloc.h
  • DPU_V27_TX_ST5 : dpuloc.h
  • DPU_V27_TX_ST6 : dpuloc.h
  • DPU_V27_TX_ST7 : dpuloc.h
  • DPU_V27_TX_STNULL : dpuloc.h
  • dpu_v27_v29_slicer() : dpu_slic.h , slicers.c
  • DPU_V29_RX_ST0 : dpuloc.h
  • DPU_V29_RX_ST1 : dpuloc.h
  • DPU_V29_RX_ST2 : dpuloc.h
  • DPU_V29_RX_ST3 : dpuloc.h
  • DPU_V29_RX_ST34 : dpuloc.h
  • DPU_V29_RX_ST4 : dpuloc.h
  • DPU_V29_RX_ST5 : dpuloc.h
  • DPU_V29_RX_ST6 : dpuloc.h
  • DPU_V29_RX_ST7 : dpuloc.h
  • DPU_V29_RX_ST8 : dpuloc.h
  • DPU_V29_RX_STNULL : dpuloc.h
  • DPU_V29_TX_ST0 : dpuloc.h
  • DPU_V29_TX_ST1 : dpuloc.h
  • DPU_V29_TX_ST2 : dpuloc.h
  • DPU_V29_TX_ST3 : dpuloc.h
  • DPU_V29_TX_ST4 : dpuloc.h
  • DPU_V29_TX_STNULL : dpuloc.h
  • dpuAtan2() : dpuatan2.c , dpuatan2.h
  • DpuCDThresh_e : dpu.h
  • dpuClose() : dpu.h , dpu.c
  • dpuConfig() : dpu.h , dpu.c
  • dpuconfigRX() : dpu.c
  • dpuControl() : dpu.c , dpu.h
  • dpuCtrl_t : dpu.h
  • DpuDir_e : dpu.h
  • DpuErrorType_e : dpu.h
  • dpuHSrxSetCdParms() : vxxinit.h , vxxinit.c
  • dpuIndxTable : dpu_cdc.c
  • dpuIndxTable120 : v17s.c
  • dpuInst_t : dpuloc.h
  • DpuModeType_e : dpu.h
  • dpuNew() : dpu.c , dpu.h
  • dpuOpen() : dpu.c , dpu.h
  • DpuOperationMode_e : dpu.h
  • DpuRate_e : dpu.h
  • dpuRx() : dpurx.h , dpurx.c
  • dpuRx2400BaudInit() : vxxinit.h , vxxinit.c
  • dpushaping_filt() : dpu_fir.c , dpu_shap.h
  • dpuStatus() : dpu.h , dpu.c
  • DpuTrainingType_e : dpu.h
  • dpuTrecTableAsFcnPt : trec_int.c , fm.h
  • dpuTx() : dpu.h , dpu.c
  • dpuUpdateSNRparms() : slicers.c , dpu_slic.h


FM: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • 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 -

  • ERROR_BTS : vxxproc.c


FM: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • 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 -

  • FAX_MODEM() : dpu.h , fxmdpuif.h , fax_mod.c
  • find_dist_asm_cmplx() : dpumath.h
  • findMin() : dpu_cdc.c , dpu_cdec.h
  • findMinIndx() : v17.h , v17s.c , v17s.h
  • FM_CARRIER_DET_TIME : fmloc.h
  • FM_CARRIER_LOSS_DET_TIME : fmloc.h
  • FM_CLOSED : fmloc.h
  • FM_DATA_BUF_SIZE_WORDS : fmloc.h
  • FM_DATA_BUFN : fm.c
  • FM_DBG_HS_RX_STATE : fmtrace.h
  • FM_DBG_HS_TX_STATE_DATA : fmtrace.h
  • FM_DBG_HS_TX_STATE_ECM : fmtrace.h
  • FM_DBG_HS_TX_STATE_PRE_OFF : fmtrace.h
  • FM_DBG_HS_TX_STATE_TRAINING : fmtrace.h
  • FM_DBG_LS_RX_STATE : fmtrace.h
  • FM_DBG_LS_TX_STATE_DATA : fmtrace.h
  • FM_DBG_LS_TX_STATE_FCS : fmtrace.h
  • FM_DBG_LS_TX_STATE_FLAG : fmtrace.h
  • fm_DBG_LVL_0 : fm.h
  • fm_DBG_LVL_1 : fm.h
  • fm_DBG_LVL_2 : fm.h
  • FM_DBG_OFFLINE_STATE : fmtrace.h
  • FM_DPU_ADEQ_CF_IM_LONG_BUFN : fm.c
  • FM_DPU_ADEQ_CF_RE_LONG_BUFN : fm.c
  • FM_DPU_ADEQ_DELAY_IM_BUFN : fm.c
  • FM_DPU_ADEQ_DELAY_RE_BUFN : fm.c
  • FM_DPU_CDEC_ACCUM_DIST_BUFN : fm.c
  • FM_DPU_CDEC_PATH_DIST_BUFN : fm.c
  • FM_DPU_CDEC_PATH_STORE_BUFN : fm.c
  • FM_DPU_CONFIG_MODEM_RX_MODE : fxmdpuif.h
  • FM_DPU_CONFIG_MODULATION_MASK : fxmdpuif.h
  • FM_DPU_CONFIG_RTS : fxmdpuif.h
  • FM_DPU_CONFIG_SETUP : fxmdpuif.h
  • FM_DPU_CONFIG_STRAIN : fxmdpuif.h
  • FM_DPU_CONFIG_TEP_ENABLE : fxmdpuif.h
  • FM_DPU_CONFIG_TX_FILLBIT : fxmdpuif.h
  • FM_DPU_DATA_BUF_SIZE : fxmdpuif.h
  • FM_DPU_DATAOUT_BUFN : fm.c
  • FM_DPU_HILB_DELAY_BUFN : fm.c
  • FM_DPU_INMAN_BEGIN_BUFN : fm.c
  • FM_DPU_INMAN_END_BUFN : fm.c
  • FM_DPU_INSTANCE_BUFN : fm.c
  • FM_DPU_LINECOND_CARRIER_DETECT : fxmdpuif.h
  • FM_DPU_LINECOND_P2_DETECT : fxmdpuif.h
  • FM_DPU_LINECOND_PREAMBLE_DETECT : fxmdpuif.h
  • FM_DPU_LINECOND_SIGNAL_PRESENT : fxmdpuif.h
  • FM_DPU_LINECOND_TEP_DETECT : fxmdpuif.h
  • FM_DPU_RECVIN_BUFN : fm.c
  • FM_DPU_RECVOUT_BUFN : fm.c
  • FM_DPU_RX_INTP_OLDIN_BUFN : fm.c
  • FM_DPU_SHAP_OLDIN_IM_BUFN : fm.c
  • FM_DPU_TREC_DELAY_BUFN : fm.c
  • FM_DPU_TREC_OUTPUT_BUFN : fm.c
  • FM_DPU_TX_INTP_OLDIN_BUFN : fm.c
  • fm_ERROR : fm.h
  • FM_EXC_DELETE : fmtrace.h
  • FM_EXC_DPU_OPEN : fmtrace.h
  • fm_EXCEPTION : fm.h
  • fm_FEATURE_FLC : fm.h
  • fm_FEATURE_FLC_ENABLE_MASK : fm.h
  • FM_FP_PKT_SIZE_BYTES : fmloc.h
  • FM_FP_PKT_SIZE_WORDS : fmloc.h
  • fm_HDLC_FLAG_PATTERN : fm.h
  • FM_HS_RX_P2_DET_TIME : fmloc.h
  • FM_HS_RX_PREAM_DET_TIME : fmloc.h
  • FM_HS_RX_STATE : fmloc.h
  • FM_HS_RX_TEP_DET_TIME : fmloc.h
  • FM_HS_TX_BYTE_DELAY : fmloc.h
  • FM_HS_TX_STATE_DATA : fmloc.h
  • FM_HS_TX_STATE_ECM : fmloc.h
  • FM_HS_TX_STATE_PRE_OFF : fmloc.h
  • FM_HS_TX_STATE_TRAINING : fmloc.h
  • fm_INFOMATIONAL : fm.h
  • FM_INSTANCE_BUFN : fm.c
  • FM_LS_RX_PREAM_DET_TIME : fmloc.h
  • FM_LS_RX_STATE : fmloc.h
  • FM_LS_TX_BYTE_DELAY : fmloc.h
  • FM_LS_TX_MIN_CLOSING_FLAGS : fmloc.h
  • FM_LS_TX_STATE_DATA : fmloc.h
  • FM_LS_TX_STATE_FCS : fmloc.h
  • FM_LS_TX_STATE_FLAG : fmloc.h
  • FM_MAX_DATA_PER_FRAME : fmloc.h
  • FM_MCONF_V17_12000 : fxmdpuif.h
  • FM_MCONF_V17_14400 : fxmdpuif.h
  • FM_MCONF_V17_7200 : fxmdpuif.h
  • FM_MCONF_V17_9600 : fxmdpuif.h
  • FM_MCONF_V21 : fxmdpuif.h
  • FM_MCONF_V27_2400 : fxmdpuif.h
  • FM_MCONF_V27_4800 : fxmdpuif.h
  • FM_MCONF_V29_4800 : fxmdpuif.h
  • FM_MCONF_V29_7200 : fxmdpuif.h
  • FM_MCONF_V29_9600 : fxmdpuif.h
  • FM_MCONF_V33_12000 : fxmdpuif.h
  • FM_MCONF_V33_14400 : fxmdpuif.h
  • FM_MFILLBIT : fxmdpuif.h
  • FM_MSG_FIFO_SIZE : fmloc.h
  • FM_NBUF : fm.c
  • fm_NOERR : fm.h
  • fm_NOMEMORY : fm.h
  • FM_OFFLINE_STATE : fmloc.h
  • FM_OPEN : fmloc.h
  • FM_PCM_SAMPLE_SIZE : fmloc.h
  • FM_STATUS_CARRIER_OFF : fmloc.h
  • FM_STATUS_CARRIER_ON : fmloc.h
  • FM_STATUS_P2_DETECT : fmloc.h
  • FM_STATUS_PREAMBLE_DETECT : fmloc.h
  • FM_STATUS_RESET_ALL : fmloc.h
  • FM_STATUS_SIGNAL_DETECT : fmloc.h
  • FM_STATUS_TEP_DETECT : fmloc.h
  • FM_STATUS_TX_DATA_END_FLAG : fmloc.h
  • FM_STATUS_TX_DATA_FLAG : fmloc.h
  • FM_STATUS_TX_DPU_FLUSH : fmloc.h
  • fm_TABLE1_L : fm.h
  • fm_TABLE1_START : fm.h
  • fm_TABLE2_L : fm.h
  • fm_TABLE2_START : fm.h
  • fm_TABLE3_L : fm.h
  • fm_TABLE3_START : fm.h
  • fm_TABLE4_L : fm.h
  • fm_TABLE4_START : fm.h
  • fm_TABLE5_L : fm.h
  • fm_TABLE5_START : fm.h
  • FM_TGEN_CED_INC : fmloc.h
  • FM_TGEN_CNG_INC : fmloc.h
  • FM_TGEN_CNG_OFF_CNT : fmloc.h
  • FM_TGEN_CNG_ON_CNT : fmloc.h
  • FM_TGEN_ONE_PHASE_Q : fmloc.h
  • FM_TGEN_PHASE_Q : fmloc.h
  • FM_TGEN_TONE_AMP : fmloc.h
  • FM_TGEN_TWO_PHASE_Q : fmloc.h
  • fm_timestamp16_compare() : fmloc.h , fmutil.c
  • FM_TONE_ST_CED : fmloc.h
  • FM_TONE_ST_CNG_OFF : fmloc.h
  • FM_TONE_ST_CNG_ON : fmloc.h
  • FM_TONE_ST_SIL : fmloc.h
  • FM_TRC_BAD_FRAME : fmtrace.h
  • FM_TRC_CARRIER_DETECT : fmtrace.h
  • FM_TRC_CARRIER_LOSS : fmtrace.h
  • FM_TRC_CURRENT_STATE : fmtrace.h
  • FM_TRC_DATA_BEGIN : fmtrace.h
  • FM_TRC_DATA_END : fmtrace.h
  • FM_TRC_DBG_LVL_1 : fmtrace.h
  • FM_TRC_DBG_LVL_2 : fmtrace.h
  • FM_TRC_DELAY_BEGIN : fmtrace.h
  • FM_TRC_DELAY_END : fmtrace.h
  • FM_TRC_FIFO_FULL : fmtrace.h
  • FM_TRC_FILL_PATTERN : fmtrace.h
  • FM_TRC_GOOD_FRAME : fmtrace.h
  • FM_TRC_INVALID_MSG : fmtrace.h
  • FM_TRC_MODE_MSG_ID : fmtrace.h
  • FM_TRC_NEW_MODULATION : fmtrace.h
  • FM_TRC_NEW_STATE : fmtrace.h
  • FM_TRC_P2_DETECT : fmtrace.h
  • FM_TRC_PREAMBLE_DETECT : fmtrace.h
  • FM_TRC_SYNC_ACK : fmtrace.h
  • FM_TRC_TEP_DETECT : fmtrace.h
  • FM_TRC_TX_UNDERRUN : fmtrace.h
  • FM_TX_ECM_DATA : fmloc.h
  • FM_TX_ECM_FLAG : fmloc.h
  • FM_TX_ECM_FRAME_COMP : fmloc.h
  • FM_V17_12000_DATA_RATE : fmloc.h
  • FM_V17_14400_DATA_RATE : fmloc.h
  • FM_V17_7200_DATA_RATE : fmloc.h
  • FM_V17_9600_DATA_RATE : fmloc.h
  • FM_V21_DATA_RATE : fmloc.h
  • FM_V21_FLAG : fmloc.h
  • FM_V27_2400_DATA_RATE : fmloc.h
  • FM_V27_4800_DATA_RATE : fmloc.h
  • FM_V29_7200_DATA_RATE : fmloc.h
  • FM_V29_9600_DATA_RATE : fmloc.h
  • FM_V33_12000_DATA_RATE : fmloc.h
  • FM_V33_14400_DATA_RATE : fmloc.h
  • fmBufs : fm.c
  • fmCheckCarrierOff() : fmcommon.c , fmloc.h
  • fmCheckCarrierOn() : fmcommon.c , fmloc.h
  • fmCheckNewModeMsg() : fmloc.h
  • fmCheckP2() : fmcommon.c , fmloc.h
  • fmCheckPreamble() : fmcommon.c , fmloc.h
  • fmCheckSignalPresent() : fmcommon.c , fmloc.h
  • fmCheckTep() : fmloc.h , fmcommon.c
  • fmClose() : fm.h , fm.c
  • fmContext : fm.h
  • fmDataBufIn() : fmloc.h , fmutil.c
  • fmDataBufInit() : fmutil.c , fmloc.h
  • fmDataBufOut() : fmutil.c , fmloc.h
  • fmDataBufPeek() : fmutil.c , fmloc.h
  • fmDataRateTable : fmcommon.c , fmloc.h
  • fmDebugTrace() : fmcommon.c , fmloc.h
  • fmDelay() : fmcommon.c , fmloc.h
  • fmDelete() : fm.c , fm.h
  • fmDoublePackData() : fmloc.h
  • fmDpuProcessDataRx() : fmcommon.c , fmloc.h
  • fmDpuProcessDataTx() : fmcommon.c , fmloc.h
  • fmEcmSt_e : fmloc.h
  • fmException() : fmloc.h , fmcommon.c
  • fmGetSizes() : fm.c , fm.h
  • fmGetTablePtr() : fm.c
  • fmHdlcRx() : fmloc.h , fmstate.c
  • fmHSrxSetCdParms() : vxxinit.c
  • fmInst_t : fmloc.h
  • fmModeChange() : fmloc.h , fmcommon.c
  • fmMsgFifoInit() : fmcommon.c , fmloc.h
  • fmMsgFifoPeek() : fmcommon.c , fmloc.h
  • fmMsgFifoPop() : fmloc.h , fmcommon.c
  • fmMsgFifoPush() : fmloc.h , fmcommon.c
  • fmNew() : fm.c , fm.h
  • fmOpen() : fm.h , fm.c
  • fmPacketizeData() : fmutil.c , fmloc.h
  • fmProcState_e : fmloc.h
  • fmReceiveIn() : fm.c , fm.h
  • fmRxMsgProcess() : fmloc.h , fmstate.c
  • fmSendDataToFp() : fmloc.h , fmstate.c
  • fmSendIn() : fm.c , fm.h
  • fmSendTxData() : fmcommon.c , fmloc.h
  • fmSetTablePtr() : fm.c
  • fmShipOutData() : fmloc.h , fmcommon.c
  • fmSpeedTable : fmcommon.c
  • fmState_e : fmloc.h
  • fmStateOffline() : fmloc.h , fmstate.c
  • fmStateRx() : fmloc.h , fmstate.c
  • fmStateRxInit() : fmloc.h , fmstate.c
  • fmStateTxHsData() : fmstate.c , fmloc.h
  • fmStateTxHsEcm() : fmstate.c , fmloc.h
  • fmStateTxHsInit() : fmstate.c , fmloc.h
  • fmStateTxHsPreOff() : fmloc.h , fmstate.c
  • fmStateTxHsTraining() : fmstate.c , fmloc.h
  • fmStateTxLsData() : fmstate.c , fmloc.h
  • fmStateTxLsFlag() : fmstate.c , fmloc.h
  • fmStateTxLsInit() : fmstate.c , fmloc.h
  • fmStats() : fm.c , fm.h
  • fmToneDetCtrl() : fmcommon.c , fmloc.h
  • fmToneDetect() : fm.h , fm.c
  • fmToneGenOff() : fmcommon.c , fmloc.h
  • fmToneGenOn() : fmcommon.c , fmloc.h
  • fmToneSt_e : fmloc.h
  • fmUnPackData() : fmutil.c , fmloc.h
  • frctMulDBL() : dpu_fir.h , dpumath.h , dpu_fir.c
  • FREQ_OFFSET_TEST : vxxinit.c
  • FREQ_SCALE : dpu_tgt.h
  • FREQ_SCALE_Q : dpu_tgt.h


FM: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • 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 -

  • GAIN_SCAL_FORMAT : dpu_agc.h
  • GAIN_SCAL_MIN_1 : dpu_agc.h
  • GAIN_SCAL_MIN_2 : dpu_agc.h
  • GAIN_SCAL_NOMINAL : dpu_agc.h
  • GAIN_SCAL_PLUS_3 : dpu_agc.h
  • getExp() : dpuatan2.c
  • getIndx() : v17s.c
  • getTempDists() : dpu_cdc.c , dpu_cdec.h
  • GG_NUM_FM_COMMON_TABLES : fm.h
  • GG_NUM_FM_DEC_TABLES : fm.h
  • GG_NUM_FM_ENC_TABLES : fm.h
  • GG_NUM_FM_TABLES : fm.h


FM: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • 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 -

  • HALF_Q11 : dpuatan2.c
  • HS_TEST : procrx.c
  • HSrxCommonSt1Init() : vxxinit.c , vxxinit.h


FM: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • 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 -

  • IIRUpdatOutPow() : dpu_cd.h , dpu_ddet.h , dpu_ddt.c
  • IIRUpdatOutPowTep() : dpu_ddet.h , dpu_ddt.c , dpu_cd.h
  • in_delay : int_init.c
  • INTERP_CONST_SCALE : dpu_tgt.h
  • interp_table : int_init.c
  • INVMOD_SCALE : dpu_tgt.h
  • INVMOD_SCALE_V17 : v17.h


FM: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • 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 -

  • path_ptr : dpu_cdec.h
  • path_t : dpu_cdec.h
  • PH_ERROR_SCALE : dpu_tgt.h
  • PI_HALF_Q8 : dpuatan2.c
  • PI_Q8 : dpuatan2.c
  • PLL_TEST : dpu_crec.c
  • PN_GEN_INIT_PATTERN : dpu_scr.h
  • PN_TAP1 : dpu_scr.h
  • PN_TAP2 : dpu_scr.h
  • POW_DECAY_SHIFT : slicers.c
  • PROC2_INDEX : vxxproc.c


FM: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • 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 -

  • Q0_ROUND : dpu_tgt.h
  • Q0_SCALE : dpu_tgt.h
  • Q10_ROUND : dpu_tgt.h
  • Q10_SCALE : dpu_tgt.h
  • Q11_ROUND : dpu_tgt.h
  • Q11_SCALE : dpu_tgt.h
  • Q12_ROUND : dpu_tgt.h
  • Q12_SCALE : dpu_tgt.h
  • Q13_ROUND : dpu_tgt.h
  • Q13_SCALE : dpu_tgt.h
  • Q14_ROUND : dpu_tgt.h
  • Q14_SCALE : dpu_tgt.h
  • Q15_ROUND : dpu_tgt.h
  • Q15_SCALE : dpu_tgt.h
  • Q16_ROUND : dpu_tgt.h
  • Q16_SCALE : dpu_tgt.h
  • Q17_ROUND : dpu_tgt.h
  • Q17_SCALE : dpu_tgt.h
  • Q18_ROUND : dpu_tgt.h
  • Q18_SCALE : dpu_tgt.h
  • Q19_ROUND : dpu_tgt.h
  • Q1_ROUND : dpu_tgt.h
  • Q1_SCALE : dpu_tgt.h
  • Q2_ROUND : dpu_tgt.h
  • Q2_SCALE : dpu_tgt.h
  • Q31_SCALE : dpu_tgt.h
  • Q3_ROUND : dpu_tgt.h
  • Q3_SCALE : dpu_tgt.h
  • Q4_ROUND : dpu_tgt.h
  • Q4_SCALE : dpu_tgt.h
  • Q5_ROUND : dpu_tgt.h
  • Q5_SCALE : dpu_tgt.h
  • Q6_ROUND : dpu_tgt.h
  • Q6_SCALE : dpu_tgt.h
  • Q7_ROUND : dpu_tgt.h
  • Q7_SCALE : dpu_tgt.h
  • Q8_ROUND : dpu_tgt.h
  • Q8_SCALE : dpu_tgt.h
  • Q9_ROUND : dpu_tgt.h
  • Q9_SCALE : dpu_tgt.h


FM: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • 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 -

  • RX_CONST_SCALE : dpu_tgt.h
  • RX_GAIN : dpu_ddet.c , dpu_cd.c
  • RX_LEVEL : dpu_cd.c , dpu_ddet.c
  • rxLSinitInHS() : vxxinit.c , vxxinit.h


FM: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • 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 -

  • SAMPS_PER_BAUD : dpuatan2.c
  • SCALE : dpu_tables.c
  • sfIndx72_8 : int_init.c
  • sfIndx8_72 : int_init.c
  • sfIndx8_96 : int_init.c
  • sfIndx96_8 : int_init.c
  • SHAP_CONST_SCALE : dpu_shap.h
  • SHAP_MAX_L : dpu_shap.h , fmTablesTypes.h
  • SHAP_MAX_M : dpu_shap.h
  • SHAP_MAX_M_COEF : fmTablesTypes.h , dpu_shap.h
  • shape_v17 : v17data.h
  • shift_data() : dpu_fir.c , dpu_fir.h
  • SHIFTVAL : cdrx.c
  • sliceV17_no_conv() : dpu_cdec.h


FM: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • 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 -

  • TAN_TABLE_SIZE : dpuatan2.c
  • tanTableInFirstOctant : dpuatan2.c
  • temp_acc_distL : dpu_cdc.c
  • temp_acc_distU : dpu_cdc.c
  • temp_path_distL : dpu_cdc.c
  • temp_path_distU : dpu_cdc.c
  • TEST_DESCR : procrx.c
  • testonly() : dpumath.h
  • TH_SET1 : dpu.h
  • TH_SET2 : dpu.h
  • TH_SET3 : dpu.h
  • ti_mas_fm_Version___VERS : Version.h
  • ti_mas_fm_Version__top__ : Version.h
  • ti_mas_fm_Version_BTYPE : Version.h
  • ti_mas_fm_Version_BUILD : Version.h
  • ti_mas_fm_Version_MAJOR : Version.h
  • ti_mas_fm_Version_MINOR : Version.h
  • ti_mas_fm_Version_PATCH : Version.h
  • ti_mas_fm_Version_QUALITY : Version.h
  • ti_mas_fm_Version_WIDTH : Version.h
  • ti_mas_fm_Version_XVERTICAL : Version.h
  • trec_compute_slow() : trec_com.h
  • TREC_FACTOR : dpu.c
  • TREC_TST1 : dpu_trec.c
  • TREC_TST2 : dpu_trec.c
  • TX_CONST_SCALE : dpu_tgt.h
  • TX_LVL_TEST : dpu.c


FM: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • 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 -

  • update() : dpu_adeq.c , dpu_adeq.h , dpumath.h
  • updateIIR() : dpu_trec.c , dpumath.h
  • updateMetrics() : dpu_cdc.c , dpu_cdec.h


FM: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • 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 -

  • V17_144_symbol_num : v17s.c
  • V17_CSCALE : v17.h
  • V17_SCR_INIT_PATTERN : v17.h
  • V17_slice0167_120() : v17.h , v17s.c
  • V17_slice0167_144() : v17.h , v17s.c
  • V17_slice0167_72() : v17rx.h
  • V17_slice0167_96() : v17rx.h
  • V17_slice2345_120() : v17.h , v17s.c
  • V17_slice2345_144() : v17.h , v17s.c
  • V17_slice2345_72() : v17rx.h
  • V17_slice2345_96() : v17rx.h
  • V17_TAP1 : v17.h
  • V17_TAP2 : v17.h
  • V17_TREC_INDEX : dpu_trec.h
  • V17_TX_CONST_SCALE : v17.h
  • v17RxSt1Init() : v17.h
  • v17RxSt2Init() : v17.h
  • v17RxSt34Init() : v17.h
  • v17RxSt3Init() : v17.h
  • v17RxSt4Init() : v17.h
  • v17RxSt5Init() : v17.h
  • v17RxSt6Init() : v17.h
  • v17RxSt7Init() : v17.h
  • v17RxSt8Init() : v17.h
  • v17RxSt9Init() : v17.h
  • v17RxStM() : v17.h
  • V17SCALE : v17s.c
  • v17tables : dpu_tables.c , fm.h
  • v17TxSt1Init() : v17.h
  • v17TxSt2Init() : v17.h
  • v17TxSt3Init() : v17.h
  • v17TxSt4Init() : v17.h
  • v17TxSt5Init() : v17.h
  • v17TxSt6Init() : v17.h
  • v17TxStM() : v17.h
  • V21_CREC_CONST_SCALE : dpu_crec.h
  • V21_TEST : vxxproc.c
  • V21_TX_ST_INIT_MASK : vxxinit.h
  • v21Rx() : vxxproc.c , vxxproc.h
  • v21RxCommonInit() : vxxinit.c
  • v21RxSt1Init() : vxxinit.c , vxxinit.h
  • v21RxSt3Init() : vxxinit.c , vxxinit.h
  • v21RxStM() : vxxsm.c , vxxsm.h
  • v21RxStNULLInit() : vxxinit.c , vxxinit.h
  • v21Tx() : vxxproc.h
  • v21TxStM() : vxxsm.c , vxxsm.h
  • V27_24_TREC_INDEX : dpu_trec.h
  • V27_48_TREC_INDEX : dpu_trec.h
  • V27_CSCALE_24 : dpu_smap.h
  • V27_CSCALE_48 : dpu_smap.h
  • V27_DESCR_DEBUG : descr.c
  • V27_INVMOD_PT0_24 : dpu_slic.h
  • V27_INVMOD_PT0_48 : dpu_slic.h
  • V27_RX_CSCALE_24 : dpu_slic.h
  • V27_RX_CSCALE_48 : dpu_slic.h
  • V27_SCR_DEBUG : scr.c
  • V27_SCR_INIT_PATTERN : dpu_scr.h
  • V27_TAP1 : dpu_scr.h
  • V27_TAP2 : dpu_scr.h
  • v27RxSt1Init() : vxxinit.h , vxxinit.c
  • v27RxSt2Init() : vxxinit.h , vxxinit.c
  • v27RxSt34Init() : vxxinit.h , vxxinit.c
  • v27RxSt3Init() : vxxinit.h , vxxinit.c
  • v27RxSt4Init() : vxxinit.c , vxxinit.h
  • v27RxSt5Init() : vxxinit.h , vxxinit.c
  • v27RxSt6Init() : vxxinit.h , vxxinit.c
  • v27RxSt7Init() : vxxinit.h , vxxinit.c
  • v27RxSt8Init() : vxxinit.h , vxxinit.c
  • v27RxStM() : vxxsm.c , vxxsm.h
  • v27tables : fm.h , dpu_tables.c
  • v27TxSt0Init() : vxxinit.h
  • v27TxSt1Init() : vxxinit.h , vxxinit.c
  • v27TxSt2Init() : vxxinit.h , vxxinit.c
  • v27TxSt3Init() : vxxinit.h , vxxinit.c
  • v27TxSt4Init() : vxxinit.h , vxxinit.c
  • v27TxSt5Init() : vxxinit.h , vxxinit.c
  • v27TxSt7Init() : vxxinit.h
  • v27TxStM() : vxxsm.h , vxxsm.c
  • v27TxStNULLInit() : vxxinit.h
  • V29_96_SC1 : dpu_tgt.h
  • V29_96_SH1 : dpu_tgt.h
  • V29_CSCALE_48 : dpu_smap.h
  • V29_CSCALE_72 : dpu_smap.h
  • V29_CSCALE_96 : dpu_smap.h
  • V29_INVMOD_PT0_48 : dpu_slic.h
  • V29_INVMOD_PT0_72 : dpu_slic.h
  • V29_INVMOD_PT0_96 : dpu_slic.h
  • V29_INVMOD_PT1_72 : dpu_slic.h
  • V29_INVMOD_PT1_96 : dpu_slic.h
  • V29_INVMOD_PT2_96 : dpu_slic.h
  • V29_INVMOD_PT3_96 : dpu_slic.h
  • V29_RX_CSCALE_48 : dpu_slic.h
  • V29_RX_CSCALE_72 : dpu_slic.h
  • V29_RX_CSCALE_96 : dpu_slic.h
  • V29_TAP1 : dpu_scr.h
  • V29_TAP2 : dpu_scr.h
  • V29_TREC_INDEX : dpu_trec.h
  • v29RxSt1Init() : vxxinit.h , vxxinit.c
  • v29RxSt2Init() : vxxinit.h , vxxinit.c
  • v29RxSt34Init() : vxxinit.c , vxxinit.h
  • v29RxSt3Init() : vxxinit.c , vxxinit.h
  • v29RxSt4Init() : vxxinit.h , vxxinit.c
  • v29RxSt5Init() : vxxinit.c , vxxinit.h
  • v29RxSt6Init() : vxxinit.h , vxxinit.c
  • v29RxSt7Init() : vxxinit.h , vxxinit.c
  • v29RxSt8Init() : vxxinit.h , vxxinit.c
  • v29RxStM() : vxxsm.h , vxxsm.c
  • v29tables : dpu_tables.c , fm.h
  • v29TxSt0Init() : vxxinit.h
  • v29TxSt1Init() : vxxinit.c , vxxinit.h
  • v29TxSt2Init() : vxxinit.h , vxxinit.c
  • v29TxSt3Init() : vxxinit.h , vxxinit.c
  • v29TxSt4Init() : vxxinit.c , vxxinit.h
  • v29TxStM() : vxxsm.c , vxxsm.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
  • vHSRx() : procrx.h , procrx.c
  • vHSTx() : vxxproc.h , vxxproc.c
  • vxx_tx_init() : vxxinit.c , vxxinit.h


FM: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • c
  • d
  • f
  • g
  • h
  • i
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • v

- _ -

  • __extern : Version.h
  • _FMPORT_C54 : fmport.h
  • _FMPORT_C54_FAR : fmport.h
  • _FMPORT_C55 : fmport.h
  • _FMPORT_C55L : fmport.h
  • _FMPORT_C64 : fmport.h
  • _FMPORT_C64_BIG_ENDIAN : fmport.h
  • _FMPORT_C64P : fmport.h
  • _FMPORT_C64P_BIG_ENDIAN : fmport.h
  • _FMPRAG_C54 : fmprag.h
  • _FMPRAG_C54_FAR : fmprag.h
  • _FMPRAG_C55 : fmprag.h
  • _FMPRAG_C55L : fmprag.h
  • _FMPRAG_C64 : fmprag.h
  • _FMPRAG_C64_BIG_ENDIAN : fmprag.h
  • _FMPRAG_C64P : fmprag.h
  • _FMPRAG_C64P_BIG_ENDIAN : fmprag.h


FM: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • c
  • d
  • f
  • g
  • h
  • i
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • v

- m -

  • MAX_BAUD_RATE : dpu.h
  • MAX_MODEM_RATE : dpu.h
  • MAX_SENDOUT_T_MS : dpu.h
  • MY_Q10_SCALE : v17.h
  • MY_Q15_SCALE : v17.h
  • MY_Q16_SCALE : v17.h


FM: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • c
  • d
  • f
  • g
  • h
  • i
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • v

- n -

  • NOMINAL_INPUT_LEVEL : dpu_agc.h
  • NOMINAL_RX_LEVEL : dpu_agc.h
  • NUM_PATH_STATES : v17s.c


FM: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • c
  • d
  • f
  • g
  • h
  • i
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • v

- o -

  • ONE_Q14 : dpuatan2.c


FM: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • c
  • d
  • f
  • g
  • h
  • i
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • v

- c -

  • CD_TEST : dpu_cd.c
  • CD_TEST1 : dpu_cd.c
  • CONST_TEST : procrx.c
  • CREC_CONST_SCALE : dpu_crec.h
  • CREC_TEST : dpu_crec.c


FM: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • c
  • d
  • f
  • g
  • h
  • i
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • v

- d -

  • DOT_TEST : dpu_ddet.c
  • DPU_ADEQ_CF_IM_LONG : dpu.h
  • DPU_ADEQ_CF_RE_LONG : dpu.h
  • DPU_ADEQ_COEF_LEN : dpu_adeq.h
  • DPU_ADEQ_DELAY_IM : dpu.h
  • DPU_ADEQ_DELAY_RE : dpu.h
  • DPU_ADEQ_DL_LEN : dpu_adeq.h
  • DPU_AGC_SCALE : dpu_agc.h
  • DPU_CAR_PHASE_TEST : crecrx.c
  • DPU_CD_FALSE : dpu_cd.h
  • DPU_CD_TRUE : dpu_cd.h
  • DPU_CDEC_ACCUM_DIST : dpu.h
  • DPU_CDEC_DELAY_STATES : dpu_cdec.h
  • DPU_CDEC_PATH_DIST : dpu.h
  • DPU_CDEC_PATH_STORE : dpu.h
  • DPU_CDEC_VIT_DELAY : dpu_cdec.h
  • DPU_CREC_ATAN2_2_PHASE_Q : dpu_crec.c
  • DPU_CREC_ATAN2_2_PHASE_SCALE : dpu_crec.c
  • DPU_CREC_PHASE_Q : dpu_crec.c
  • DPU_CTRL_CDET : dpuloc.h
  • DPU_CTRL_CTS : dpuloc.h
  • DPU_CTRL_DSR : dpuloc.h
  • DPU_CTRL_ERROR : dpuloc.h
  • DPU_CTRL_IDLE : dpuloc.h
  • DPU_CTRL_OVERRUN : dpuloc.h
  • DPU_CTRL_P2 : dpuloc.h
  • DPU_CTRL_PDSQ : dpuloc.h
  • DPU_CTRL_RTS : dpuloc.h
  • DPU_CTRL_TEP : dpuloc.h
  • DPU_CTRL_TEST : dpuloc.h
  • DPU_CTRL_UNDERRUN : dpuloc.h
  • DPU_CTRL_V21 : dpuloc.h
  • DPU_DATA_NO : dputxin.h
  • DPU_DATA_OK : dputxin.h
  • DPU_DATA_OVER : dputxin.h
  • DPU_DATAIN_BUFN : dpu.h
  • DPU_DATAOUT_BUFN : dpu.h
  • DPU_DBG_RCV_MSG : fax_mod.c
  • DPU_DBG_XMT_MSG : fax_mod.c
  • DPU_DDET_MAX_DELAY : dpu_ddet.h
  • DPU_DDET_MAX_DELAY_1 : dpu_ddet.h
  • DPU_DOWNSAMP_RATE : dpuloc.h
  • DPU_FEATURE_FLC : dpu.h
  • DPU_FEATURE_FLC_ENABLE_MASK : dpu.h
  • DPU_FSK_FREQ_DOWN_LIMIT : dpu_fsk.c
  • DPU_FSK_FREQ_HIGH_LIMIT : dpu_fsk.c
  • DPU_FSK_FREQ_LOW_LIMIT : dpu_fsk.c
  • DPU_FSK_FREQ_UP_LIMIT : dpu_fsk.c
  • DPU_FSK_REQ_COUNT : dpu_fsk.c
  • DPU_HILB_DELAY : dpu.h
  • DPU_HILB_LEN : dpu_hilb.h
  • DPU_IN_WORD_SIZE : dputxin.h
  • DPU_INMAN_BEGIN : dpu.h
  • DPU_INMAN_END : dpu.h
  • DPU_INSTANCE_BUFN : dpu.h
  • DPU_INTP_72_80_FILT_SIZE : dpu_intp.h
  • DPU_INTP_72_80_INDEX : dpu_intp.h
  • DPU_INTP_80_96_FILT_SIZE : dpu_intp.h
  • DPU_INTP_80_96_INDEX : dpu_intp.h
  • DPU_INTP_96_80_FILT_SIZE : dpu_intp.h
  • DPU_INTP_96_80_INDEX : dpu_intp.h
  • DPU_MAX_BAUDS_PER_SEG : dpu.h
  • DPU_MAX_M : dpu_intp.h
  • DPU_MAX_M_COEF : dpu_intp.h
  • DPU_MAX_SAMPLE : dpuloc.h
  • DPU_MAX_SAMPS_PER_SEG : dpu.h
  • DPU_MAX_WORD : dpuloc.h , dputxin.h
  • DPU_NBUFS : dpu.h
  • DPU_OUT_WORD_SIZE : dputxin.h
  • DPU_P2_FALSE : dpu_ddet.h
  • DPU_P2_TRUE : dpu_ddet.h
  • DPU_PC_FALSE : dpu_ddet.h
  • DPU_PC_TRUE : dpu_ddet.h
  • DPU_PHASE_LEN : dpu_phas.h
  • dpu_READ_FSL_DETECTED : dpuloc.h
  • dpu_READ_FSL_ENABLE : dpuloc.h
  • DPU_RECVIN_BUFN : dpu.h
  • DPU_RECVOUT_BUFN : dpu.h
  • DPU_RX_INTP_OLDIN : dpu.h
  • dpu_SET_FSL_DETECTED : dpuloc.h
  • dpu_SET_FSL_ENABLE : dpuloc.h
  • DPU_SHAP_OLDIN_IM : dpu.h
  • DPU_SHAP_OLDIN_RE : dpu.h
  • DPU_SI_SS_ERRMUL : dpuloc.h
  • DPU_SI_SS_ERRMUL_V17 : dpuloc.h
  • DPU_SS_SI_FREEZE_BAUDCNT : dpuloc.h
  • DPU_ST_V17_RX : dpu.h
  • DPU_ST_V17_TX : dpu.h
  • DPU_ST_V21_RX : dpu.h
  • DPU_ST_V21_TX : dpu.h
  • DPU_ST_V27_RX : dpu.h
  • DPU_ST_V27_TX : dpu.h
  • DPU_ST_V29_RX : dpu.h
  • DPU_ST_V29_TX : dpu.h
  • DPU_STATUS_FD : dpu.h
  • DPU_STATUS_HD : dpu.h
  • DPU_STATUS_RX : dpu.h
  • DPU_STATUS_TX : dpu.h
  • DPU_STATUS_V17 : dpu.h
  • DPU_STATUS_V21 : dpu.h
  • DPU_STATUS_V27 : dpu.h
  • DPU_STATUS_V29 : dpu.h
  • DPU_TEP_TRUE : dpu_ddet.h
  • DPU_TREC_COEF_SCALE : dpu_trec.h
  • DPU_TREC_CONST_SCALE : dpu_trec.h
  • DPU_TREC_DELAY : dpu.h
  • DPU_TREC_DELAY_LEN : dpu_trec.h
  • DPU_TREC_INDEX_INC : dpu_trec.h
  • DPU_TREC_K1 : dpu_trec.h
  • DPU_TREC_K2 : dpu_trec.h
  • DPU_TREC_LEN : fmTablesTypes.h
  • DPU_TREC_NUM : dpuatan2.c
  • DPU_TREC_NUMBER : fmTablesTypes.h
  • DPU_TREC_OUT_LEN : dpu_trec.h
  • DPU_TREC_OUTPUT : dpu.h
  • DPU_TREC_THR : dpu_trec.h
  • DPU_TX_INTP_OLDIN : dpu.h
  • DPU_UPSAMPLE_RATE : dpuloc.h
  • DPU_V21_FALSE : dpu_fsk.h
  • DPU_V21_HIGH_CHANNEL : dpu_fsk.h
  • DPU_V21_HS_TRUE : dpu_ddet.h
  • DPU_V21_LOW_CHANNEL : dpu_fsk.h
  • DPU_V21_TRUE : dpu_ddet.h , dpu_fsk.h


FM: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • c
  • d
  • f
  • g
  • h
  • i
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • v

- f -

  • FM_CARRIER_DET_TIME : fmloc.h
  • FM_CARRIER_LOSS_DET_TIME : fmloc.h
  • FM_DATA_BUF_SIZE_WORDS : fmloc.h
  • FM_DATA_BUFN : fm.c
  • FM_DBG_HS_RX_STATE : fmtrace.h
  • FM_DBG_HS_TX_STATE_DATA : fmtrace.h
  • FM_DBG_HS_TX_STATE_ECM : fmtrace.h
  • FM_DBG_HS_TX_STATE_PRE_OFF : fmtrace.h
  • FM_DBG_HS_TX_STATE_TRAINING : fmtrace.h
  • FM_DBG_LS_RX_STATE : fmtrace.h
  • FM_DBG_LS_TX_STATE_DATA : fmtrace.h
  • FM_DBG_LS_TX_STATE_FCS : fmtrace.h
  • FM_DBG_LS_TX_STATE_FLAG : fmtrace.h
  • fm_DBG_LVL_0 : fm.h
  • fm_DBG_LVL_1 : fm.h
  • fm_DBG_LVL_2 : fm.h
  • FM_DBG_OFFLINE_STATE : fmtrace.h
  • FM_DPU_ADEQ_CF_IM_LONG_BUFN : fm.c
  • FM_DPU_ADEQ_CF_RE_LONG_BUFN : fm.c
  • FM_DPU_ADEQ_DELAY_IM_BUFN : fm.c
  • FM_DPU_ADEQ_DELAY_RE_BUFN : fm.c
  • FM_DPU_CDEC_ACCUM_DIST_BUFN : fm.c
  • FM_DPU_CDEC_PATH_DIST_BUFN : fm.c
  • FM_DPU_CDEC_PATH_STORE_BUFN : fm.c
  • FM_DPU_CONFIG_MODEM_RX_MODE : fxmdpuif.h
  • FM_DPU_CONFIG_MODULATION_MASK : fxmdpuif.h
  • FM_DPU_CONFIG_RTS : fxmdpuif.h
  • FM_DPU_CONFIG_SETUP : fxmdpuif.h
  • FM_DPU_CONFIG_STRAIN : fxmdpuif.h
  • FM_DPU_CONFIG_TEP_ENABLE : fxmdpuif.h
  • FM_DPU_CONFIG_TX_FILLBIT : fxmdpuif.h
  • FM_DPU_DATA_BUF_SIZE : fxmdpuif.h
  • FM_DPU_DATAOUT_BUFN : fm.c
  • FM_DPU_HILB_DELAY_BUFN : fm.c
  • FM_DPU_INMAN_BEGIN_BUFN : fm.c
  • FM_DPU_INMAN_END_BUFN : fm.c
  • FM_DPU_INSTANCE_BUFN : fm.c
  • FM_DPU_LINECOND_CARRIER_DETECT : fxmdpuif.h
  • FM_DPU_LINECOND_P2_DETECT : fxmdpuif.h
  • FM_DPU_LINECOND_PREAMBLE_DETECT : fxmdpuif.h
  • FM_DPU_LINECOND_SIGNAL_PRESENT : fxmdpuif.h
  • FM_DPU_LINECOND_TEP_DETECT : fxmdpuif.h
  • FM_DPU_RECVIN_BUFN : fm.c
  • FM_DPU_RECVOUT_BUFN : fm.c
  • FM_DPU_RX_INTP_OLDIN_BUFN : fm.c
  • FM_DPU_SHAP_OLDIN_IM_BUFN : fm.c
  • FM_DPU_TREC_DELAY_BUFN : fm.c
  • FM_DPU_TREC_OUTPUT_BUFN : fm.c
  • FM_DPU_TX_INTP_OLDIN_BUFN : fm.c
  • fm_ERROR : fm.h
  • FM_EXC_DELETE : fmtrace.h
  • FM_EXC_DPU_OPEN : fmtrace.h
  • fm_EXCEPTION : fm.h
  • fm_FEATURE_FLC : fm.h
  • fm_FEATURE_FLC_ENABLE_MASK : fm.h
  • FM_FP_PKT_SIZE_BYTES : fmloc.h
  • FM_FP_PKT_SIZE_WORDS : fmloc.h
  • fm_HDLC_FLAG_PATTERN : fm.h
  • FM_HS_RX_P2_DET_TIME : fmloc.h
  • FM_HS_RX_PREAM_DET_TIME : fmloc.h
  • FM_HS_RX_TEP_DET_TIME : fmloc.h
  • FM_HS_TX_BYTE_DELAY : fmloc.h
  • fm_INFOMATIONAL : fm.h
  • FM_INSTANCE_BUFN : fm.c
  • FM_LS_RX_PREAM_DET_TIME : fmloc.h
  • FM_LS_TX_BYTE_DELAY : fmloc.h
  • FM_LS_TX_MIN_CLOSING_FLAGS : fmloc.h
  • FM_MAX_DATA_PER_FRAME : fmloc.h
  • FM_MCONF_V17_12000 : fxmdpuif.h
  • FM_MCONF_V17_14400 : fxmdpuif.h
  • FM_MCONF_V17_7200 : fxmdpuif.h
  • FM_MCONF_V17_9600 : fxmdpuif.h
  • FM_MCONF_V21 : fxmdpuif.h
  • FM_MCONF_V27_2400 : fxmdpuif.h
  • FM_MCONF_V27_4800 : fxmdpuif.h
  • FM_MCONF_V29_4800 : fxmdpuif.h
  • FM_MCONF_V29_7200 : fxmdpuif.h
  • FM_MCONF_V29_9600 : fxmdpuif.h
  • FM_MCONF_V33_12000 : fxmdpuif.h
  • FM_MCONF_V33_14400 : fxmdpuif.h
  • FM_MFILLBIT : fxmdpuif.h
  • FM_MSG_FIFO_SIZE : fmloc.h
  • FM_NBUF : fm.c
  • fm_NOERR : fm.h
  • fm_NOMEMORY : fm.h
  • FM_PCM_SAMPLE_SIZE : fmloc.h
  • FM_STATUS_CARRIER_OFF : fmloc.h
  • FM_STATUS_CARRIER_ON : fmloc.h
  • FM_STATUS_P2_DETECT : fmloc.h
  • FM_STATUS_PREAMBLE_DETECT : fmloc.h
  • FM_STATUS_RESET_ALL : fmloc.h
  • FM_STATUS_SIGNAL_DETECT : fmloc.h
  • FM_STATUS_TEP_DETECT : fmloc.h
  • FM_STATUS_TX_DATA_END_FLAG : fmloc.h
  • FM_STATUS_TX_DATA_FLAG : fmloc.h
  • FM_STATUS_TX_DPU_FLUSH : fmloc.h
  • fm_TABLE1_L : fm.h
  • fm_TABLE1_START : fm.h
  • fm_TABLE2_L : fm.h
  • fm_TABLE2_START : fm.h
  • fm_TABLE3_L : fm.h
  • fm_TABLE3_START : fm.h
  • fm_TABLE4_L : fm.h
  • fm_TABLE4_START : fm.h
  • fm_TABLE5_L : fm.h
  • fm_TABLE5_START : fm.h
  • FM_TGEN_CED_INC : fmloc.h
  • FM_TGEN_CNG_INC : fmloc.h
  • FM_TGEN_CNG_OFF_CNT : fmloc.h
  • FM_TGEN_CNG_ON_CNT : fmloc.h
  • FM_TGEN_ONE_PHASE_Q : fmloc.h
  • FM_TGEN_PHASE_Q : fmloc.h
  • FM_TGEN_TONE_AMP : fmloc.h
  • FM_TGEN_TWO_PHASE_Q : fmloc.h
  • FM_TRC_BAD_FRAME : fmtrace.h
  • FM_TRC_CARRIER_DETECT : fmtrace.h
  • FM_TRC_CARRIER_LOSS : fmtrace.h
  • FM_TRC_CURRENT_STATE : fmtrace.h
  • FM_TRC_DATA_BEGIN : fmtrace.h
  • FM_TRC_DATA_END : fmtrace.h
  • FM_TRC_DBG_LVL_1 : fmtrace.h
  • FM_TRC_DBG_LVL_2 : fmtrace.h
  • FM_TRC_DELAY_BEGIN : fmtrace.h
  • FM_TRC_DELAY_END : fmtrace.h
  • FM_TRC_FIFO_FULL : fmtrace.h
  • FM_TRC_FILL_PATTERN : fmtrace.h
  • FM_TRC_GOOD_FRAME : fmtrace.h
  • FM_TRC_INVALID_MSG : fmtrace.h
  • FM_TRC_MODE_MSG_ID : fmtrace.h
  • FM_TRC_NEW_MODULATION : fmtrace.h
  • FM_TRC_NEW_STATE : fmtrace.h
  • FM_TRC_P2_DETECT : fmtrace.h
  • FM_TRC_PREAMBLE_DETECT : fmtrace.h
  • FM_TRC_SYNC_ACK : fmtrace.h
  • FM_TRC_TEP_DETECT : fmtrace.h
  • FM_TRC_TX_UNDERRUN : fmtrace.h
  • FM_V17_12000_DATA_RATE : fmloc.h
  • FM_V17_14400_DATA_RATE : fmloc.h
  • FM_V17_7200_DATA_RATE : fmloc.h
  • FM_V17_9600_DATA_RATE : fmloc.h
  • FM_V21_DATA_RATE : fmloc.h
  • FM_V21_FLAG : fmloc.h
  • FM_V27_2400_DATA_RATE : fmloc.h
  • FM_V27_4800_DATA_RATE : fmloc.h
  • FM_V29_7200_DATA_RATE : fmloc.h
  • FM_V29_9600_DATA_RATE : fmloc.h
  • FM_V33_12000_DATA_RATE : fmloc.h
  • FM_V33_14400_DATA_RATE : fmloc.h
  • FREQ_OFFSET_TEST : vxxinit.c
  • FREQ_SCALE : dpu_tgt.h
  • FREQ_SCALE_Q : dpu_tgt.h


FM: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • c
  • d
  • f
  • g
  • h
  • i
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • v

- g -

  • GAIN_SCAL_FORMAT : dpu_agc.h
  • GAIN_SCAL_MIN_1 : dpu_agc.h
  • GAIN_SCAL_MIN_2 : dpu_agc.h
  • GAIN_SCAL_NOMINAL : dpu_agc.h
  • GAIN_SCAL_PLUS_3 : dpu_agc.h
  • GG_NUM_FM_COMMON_TABLES : fm.h
  • GG_NUM_FM_DEC_TABLES : fm.h
  • GG_NUM_FM_ENC_TABLES : fm.h
  • GG_NUM_FM_TABLES : fm.h


FM: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • c
  • d
  • f
  • g
  • h
  • i
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • v

- h -

  • HALF_Q11 : dpuatan2.c
  • HS_TEST : procrx.c


FM: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • c
  • d
  • f
  • g
  • h
  • i
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • v

- i -

  • INTERP_CONST_SCALE : dpu_tgt.h
  • INVMOD_SCALE : dpu_tgt.h
  • INVMOD_SCALE_V17 : v17.h


FM: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • c
  • d
  • f
  • g
  • h
  • i
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • v

- p -

  • PH_ERROR_SCALE : dpu_tgt.h
  • PI_HALF_Q8 : dpuatan2.c
  • PI_Q8 : dpuatan2.c
  • PLL_TEST : dpu_crec.c
  • PN_GEN_INIT_PATTERN : dpu_scr.h
  • PN_TAP1 : dpu_scr.h
  • PN_TAP2 : dpu_scr.h
  • POW_DECAY_SHIFT : slicers.c


FM: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • c
  • d
  • f
  • g
  • h
  • i
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • v

- q -

  • Q0_ROUND : dpu_tgt.h
  • Q0_SCALE : dpu_tgt.h
  • Q10_ROUND : dpu_tgt.h
  • Q10_SCALE : dpu_tgt.h
  • Q11_ROUND : dpu_tgt.h
  • Q11_SCALE : dpu_tgt.h
  • Q12_ROUND : dpu_tgt.h
  • Q12_SCALE : dpu_tgt.h
  • Q13_ROUND : dpu_tgt.h
  • Q13_SCALE : dpu_tgt.h
  • Q14_ROUND : dpu_tgt.h
  • Q14_SCALE : dpu_tgt.h
  • Q15_ROUND : dpu_tgt.h
  • Q15_SCALE : dpu_tgt.h
  • Q16_ROUND : dpu_tgt.h
  • Q16_SCALE : dpu_tgt.h
  • Q17_ROUND : dpu_tgt.h
  • Q17_SCALE : dpu_tgt.h
  • Q18_ROUND : dpu_tgt.h
  • Q18_SCALE : dpu_tgt.h
  • Q19_ROUND : dpu_tgt.h
  • Q1_ROUND : dpu_tgt.h
  • Q1_SCALE : dpu_tgt.h
  • Q2_ROUND : dpu_tgt.h
  • Q2_SCALE : dpu_tgt.h
  • Q31_SCALE : dpu_tgt.h
  • Q3_ROUND : dpu_tgt.h
  • Q3_SCALE : dpu_tgt.h
  • Q4_ROUND : dpu_tgt.h
  • Q4_SCALE : dpu_tgt.h
  • Q5_ROUND : dpu_tgt.h
  • Q5_SCALE : dpu_tgt.h
  • Q6_ROUND : dpu_tgt.h
  • Q6_SCALE : dpu_tgt.h
  • Q7_ROUND : dpu_tgt.h
  • Q7_SCALE : dpu_tgt.h
  • Q8_ROUND : dpu_tgt.h
  • Q8_SCALE : dpu_tgt.h
  • Q9_ROUND : dpu_tgt.h
  • Q9_SCALE : dpu_tgt.h


FM: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • c
  • d
  • f
  • g
  • h
  • i
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • v

- r -

  • RX_CONST_SCALE : dpu_tgt.h


FM: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • c
  • d
  • f
  • g
  • h
  • i
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • v

- s -

  • SAMPS_PER_BAUD : dpuatan2.c
  • SCALE : dpu_tables.c
  • SHAP_CONST_SCALE : dpu_shap.h
  • SHAP_MAX_L : dpu_shap.h , fmTablesTypes.h
  • SHAP_MAX_M : dpu_shap.h
  • SHAP_MAX_M_COEF : fmTablesTypes.h , dpu_shap.h
  • SHIFTVAL : cdrx.c


FM: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • c
  • d
  • f
  • g
  • h
  • i
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • v

- t -

  • TAN_TABLE_SIZE : dpuatan2.c
  • TEST_DESCR : procrx.c
  • ti_mas_fm_Version___VERS : Version.h
  • ti_mas_fm_Version__top__ : Version.h
  • ti_mas_fm_Version_BTYPE : Version.h
  • ti_mas_fm_Version_BUILD : Version.h
  • ti_mas_fm_Version_MAJOR : Version.h
  • ti_mas_fm_Version_MINOR : Version.h
  • ti_mas_fm_Version_PATCH : Version.h
  • ti_mas_fm_Version_QUALITY : Version.h
  • ti_mas_fm_Version_WIDTH : Version.h
  • ti_mas_fm_Version_XVERTICAL : Version.h
  • TREC_FACTOR : dpu.c
  • TREC_TST1 : dpu_trec.c
  • TREC_TST2 : dpu_trec.c
  • TX_CONST_SCALE : dpu_tgt.h
  • TX_LVL_TEST : dpu.c


FM: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • _
  • c
  • d
  • f
  • g
  • h
  • i
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • v

- v -

  • V17_CSCALE : v17.h
  • V17_SCR_INIT_PATTERN : v17.h
  • V17_TAP1 : v17.h
  • V17_TAP2 : v17.h
  • V17_TREC_INDEX : dpu_trec.h
  • V17_TX_CONST_SCALE : v17.h
  • V17SCALE : v17s.c
  • V21_CREC_CONST_SCALE : dpu_crec.h
  • V21_TEST : vxxproc.c
  • V21_TX_ST_INIT_MASK : vxxinit.h
  • V27_24_TREC_INDEX : dpu_trec.h
  • V27_48_TREC_INDEX : dpu_trec.h
  • V27_CSCALE_24 : dpu_smap.h
  • V27_CSCALE_48 : dpu_smap.h
  • V27_DESCR_DEBUG : descr.c
  • V27_INVMOD_PT0_24 : dpu_slic.h
  • V27_INVMOD_PT0_48 : dpu_slic.h
  • V27_RX_CSCALE_24 : dpu_slic.h
  • V27_RX_CSCALE_48 : dpu_slic.h
  • V27_SCR_DEBUG : scr.c
  • V27_SCR_INIT_PATTERN : dpu_scr.h
  • V27_TAP1 : dpu_scr.h
  • V27_TAP2 : dpu_scr.h
  • V29_96_SC1 : dpu_tgt.h
  • V29_96_SH1 : dpu_tgt.h
  • V29_CSCALE_48 : dpu_smap.h
  • V29_CSCALE_72 : dpu_smap.h
  • V29_CSCALE_96 : dpu_smap.h
  • V29_INVMOD_PT0_48 : dpu_slic.h
  • V29_INVMOD_PT0_72 : dpu_slic.h
  • V29_INVMOD_PT0_96 : dpu_slic.h
  • V29_INVMOD_PT1_72 : dpu_slic.h
  • V29_INVMOD_PT1_96 : dpu_slic.h
  • V29_INVMOD_PT2_96 : dpu_slic.h
  • V29_INVMOD_PT3_96 : dpu_slic.h
  • V29_RX_CSCALE_48 : dpu_slic.h
  • V29_RX_CSCALE_72 : dpu_slic.h
  • V29_RX_CSCALE_96 : dpu_slic.h
  • V29_TAP1 : dpu_scr.h
  • V29_TAP2 : dpu_scr.h
  • V29_TREC_INDEX : dpu_trec.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


FM: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines

  • DpuCDThresh_e : dpu.h
  • DpuDir_e : dpu.h
  • DpuErrorType_e : dpu.h
  • DpuModeType_e : dpu.h
  • DpuOperationMode_e : dpu.h
  • DpuRate_e : dpu.h
  • DpuTrainingType_e : dpu.h
  • fmEcmSt_e : fmloc.h
  • fmProcState_e : fmloc.h
  • fmState_e : fmloc.h
  • fmToneSt_e : fmloc.h


FM: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • d
  • f
  • t

- d -

  • DPU_DATA : dpu.h
  • DPU_DIR_RX : dpu.h
  • DPU_DIR_TX : dpu.h
  • DPU_ERROR : dpu.h
  • DPU_EXC_DELETE : dpu.h
  • DPU_EXC_OPEN : dpu.h
  • DPU_FAX : dpu.h
  • DPU_MOD_NULL : dpu.h
  • DPU_MOD_V17 : dpu.h
  • DPU_MOD_V21 : dpu.h
  • DPU_MOD_V27T : dpu.h
  • DPU_MOD_V29 : dpu.h
  • DPU_MOD_V33 : dpu.h
  • DPU_MODULATION_COUNT : dpuloc.h
  • DPU_MODULATION_V21 : dpuloc.h
  • DPU_MODULATION_V27_2400 : dpuloc.h
  • DPU_MODULATION_V27_4800 : dpuloc.h
  • DPU_MODULATION_V29_7200 : dpuloc.h
  • DPU_MODULATION_V29_9600 : dpuloc.h
  • DPU_NOERR : dpu.h
  • DPU_NOMEMORY : dpu.h
  • DPU_RATE_12000 : dpu.h
  • DPU_RATE_14400 : dpu.h
  • DPU_RATE_2400 : dpu.h
  • DPU_RATE_300 : dpu.h
  • DPU_RATE_4800 : dpu.h
  • DPU_RATE_7200 : dpu.h
  • DPU_RATE_9600 : dpu.h
  • DPU_RATE_NULL : dpu.h
  • DPU_TRN_LONG : dpu.h
  • DPU_TRN_SHORT : dpu.h
  • DPU_V17_RX_ST0 : v17.h
  • DPU_V17_RX_ST1 : v17.h
  • DPU_V17_RX_ST10 : v17.h
  • DPU_V17_RX_ST2 : v17.h
  • DPU_V17_RX_ST3 : v17.h
  • DPU_V17_RX_ST34 : v17.h
  • DPU_V17_RX_ST4 : v17.h
  • DPU_V17_RX_ST5 : v17.h
  • DPU_V17_RX_ST6 : v17.h
  • DPU_V17_RX_ST7 : v17.h
  • DPU_V17_RX_ST8 : v17.h
  • DPU_V17_RX_ST9 : v17.h
  • DPU_V17_RX_STNULL : v17.h
  • DPU_V17_TX_ST0 : v17.h
  • DPU_V17_TX_ST1 : v17.h
  • DPU_V17_TX_ST2 : v17.h
  • DPU_V17_TX_ST3 : v17.h
  • DPU_V17_TX_ST4 : v17.h
  • DPU_V17_TX_ST5 : v17.h
  • DPU_V17_TX_ST6 : v17.h
  • DPU_V17_TX_STNULL : v17.h
  • DPU_V21_RX_ST0 : dpuloc.h
  • DPU_V21_RX_ST1 : dpuloc.h
  • DPU_V21_RX_ST2 : dpuloc.h
  • DPU_V21_RX_ST3 : dpuloc.h
  • DPU_V21_RX_ST4 : dpuloc.h
  • DPU_V21_RX_STNULL : dpuloc.h
  • DPU_V27_RX_ST0 : dpuloc.h
  • DPU_V27_RX_ST1 : dpuloc.h
  • DPU_V27_RX_ST2 : dpuloc.h
  • DPU_V27_RX_ST3 : dpuloc.h
  • DPU_V27_RX_ST34 : dpuloc.h
  • DPU_V27_RX_ST4 : dpuloc.h
  • DPU_V27_RX_ST5 : dpuloc.h
  • DPU_V27_RX_ST6 : dpuloc.h
  • DPU_V27_RX_ST7 : dpuloc.h
  • DPU_V27_RX_ST8 : dpuloc.h
  • DPU_V27_RX_STNULL : dpuloc.h
  • DPU_V27_TX_ST0 : dpuloc.h
  • DPU_V27_TX_ST1 : dpuloc.h
  • DPU_V27_TX_ST2 : dpuloc.h
  • DPU_V27_TX_ST3 : dpuloc.h
  • DPU_V27_TX_ST4 : dpuloc.h
  • DPU_V27_TX_ST5 : dpuloc.h
  • DPU_V27_TX_ST6 : dpuloc.h
  • DPU_V27_TX_ST7 : dpuloc.h
  • DPU_V27_TX_STNULL : dpuloc.h
  • DPU_V29_RX_ST0 : dpuloc.h
  • DPU_V29_RX_ST1 : dpuloc.h
  • DPU_V29_RX_ST2 : dpuloc.h
  • DPU_V29_RX_ST3 : dpuloc.h
  • DPU_V29_RX_ST34 : dpuloc.h
  • DPU_V29_RX_ST4 : dpuloc.h
  • DPU_V29_RX_ST5 : dpuloc.h
  • DPU_V29_RX_ST6 : dpuloc.h
  • DPU_V29_RX_ST7 : dpuloc.h
  • DPU_V29_RX_ST8 : dpuloc.h
  • DPU_V29_RX_STNULL : dpuloc.h
  • DPU_V29_TX_ST0 : dpuloc.h
  • DPU_V29_TX_ST1 : dpuloc.h
  • DPU_V29_TX_ST2 : dpuloc.h
  • DPU_V29_TX_ST3 : dpuloc.h
  • DPU_V29_TX_ST4 : dpuloc.h
  • DPU_V29_TX_STNULL : dpuloc.h

- f -

  • FM_CLOSED : fmloc.h
  • FM_HS_RX_STATE : fmloc.h
  • FM_HS_TX_STATE_DATA : fmloc.h
  • FM_HS_TX_STATE_ECM : fmloc.h
  • FM_HS_TX_STATE_PRE_OFF : fmloc.h
  • FM_HS_TX_STATE_TRAINING : fmloc.h
  • FM_LS_RX_STATE : fmloc.h
  • FM_LS_TX_STATE_DATA : fmloc.h
  • FM_LS_TX_STATE_FCS : fmloc.h
  • FM_LS_TX_STATE_FLAG : fmloc.h
  • FM_OFFLINE_STATE : fmloc.h
  • FM_OPEN : fmloc.h
  • FM_TONE_ST_CED : fmloc.h
  • FM_TONE_ST_CNG_OFF : fmloc.h
  • FM_TONE_ST_CNG_ON : fmloc.h
  • FM_TONE_ST_SIL : fmloc.h
  • FM_TX_ECM_DATA : fmloc.h
  • FM_TX_ECM_FLAG : fmloc.h
  • FM_TX_ECM_FRAME_COMP : fmloc.h

- t -

  • TH_SET1 : dpu.h
  • TH_SET2 : dpu.h
  • TH_SET3 : dpu.h


FM: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • a
  • c
  • d
  • f
  • g
  • h
  • i
  • n
  • r
  • s
  • t
  • u
  • v

- a -

  • averagePow() : cdrx.c , cdrx.h


FM: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • a
  • c
  • d
  • f
  • g
  • h
  • i
  • n
  • r
  • s
  • t
  • u
  • v

- n -

  • normalize() : dpuatan2.c


FM: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • a
  • c
  • d
  • f
  • g
  • h
  • i
  • n
  • r
  • s
  • t
  • u
  • v

- c -

  • complex_mpy() : dpumath.h
  • compute_baud_per_seg() : vxxinit.c
  • compute_bts_per_baud() : vxxinit.c
  • convolu_complex() : dpu_adeq.h , dpumath.h , dpu_adeq.c
  • convoluI() : dpu_fir.h , dpu_fir.c
  • crossCor() : dpumath.h , dpu_trec.c


FM: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • a
  • c
  • d
  • f
  • g
  • h
  • i
  • n
  • r
  • s
  • t
  • u
  • v

- d -

  • dot_prod() : dpu_fir.c , dpu_fir.h
  • dot_square_asm() : dpu_fir.c , dpumath.h , dpu_fir.h
  • dpu_adeq() : dpu_adeq.c , dpu_adeq.h
  • dpu_adeq_init() : ade_init.h , ade_init.c , dpu_adeq.h
  • dpu_agc() : agcrx.h , agcrx.c
  • dpu_agc_init() : dpu_agc.c , dpu_agc.h
  • dpu_bp_hilb() : hilbrx.c , hilbrx.h
  • dpu_bp_hilb_init() : dpu_hilb.c , dpu_hilb.h
  • dpu_bridge_seq_v17_init() : v17.h
  • dpu_cd_det_hs() : cdrx.c , cdrx.h
  • dpu_cd_det_hs_pwrlatch() : cdrx.h , cdrx.c
  • dpu_cd_det_init() : dpu_cd.c , dpu_cd.h
  • dpu_cd_det_util() : cdrx.h , cdrx.c
  • dpu_cd_det_v21() : dpu_cd.c , dpu_cd.h
  • dpu_cdec() : dpu_cdec.h
  • dpu_cdec_init() : cdc_init.h
  • dpu_cenc_init() : dpu_cenc.h
  • dpu_cenc_v17() : v17.h
  • dpu_crec() : crecrx.c , crecrx.h
  • dpu_crec_init() : dpu_crec.c , dpu_crec.h
  • dpu_ddec_init() : dpu_denc.h , dif_dec.c
  • dpu_ddec_v17() : v17rx.h
  • dpu_ddec_v29() : dpu_denc.h , dif_dec.c
  • dpu_denc_init() : dpu_denc.h , dif_enc.c
  • dpu_denc_v17() : v17.h
  • dpu_denc_v17_bridge() : v17.h
  • dpu_denc_v29() : dpu_denc.h , dif_enc.c
  • dpu_descr() : descrrx.c , descrrx.h
  • dpu_descr_init() : descr.c , dpu_scr.h
  • dpu_descr_v27() : descr.c , dpu_scr.h
  • dpu_dot() : sym_map.c , dpu_smap.h
  • dpu_dot_det() : dpu_ddet.h , dpu_ddet.c
  • dpu_dot_det_init() : dpu_ddet.c , dpu_ddet.h
  • dpu_dot_v17() : v17.h
  • dpu_err_pha_trn() : dpu_phas.h
  • dpu_err_pha_trn_1() : dpuphase.c , dpu_phas.h
  • dpu_err_pha_v17() : v17.h
  • dpu_err_pha_v17_1() : v17.h
  • dpu_err_pha_v27_trn() : dpuphase.c , dpu_phas.h
  • dpu_err_pha_v29_72() : dpuphase.c , dpu_phas.h
  • dpu_err_pha_v29_72_1() : dpuphase.c , dpu_phas.h
  • dpu_err_pha_v29_96() : dpuphase.c , dpu_phas.h
  • dpu_err_pha_v29_96_1() : dpuphase.c , dpu_phas.h
  • dpu_fir() : dpu_shap.h
  • dpu_fsk_gen_init() : dpu_fsk.c , dpu_fsk.h
  • dpu_gain_calc() : dpu_agc.c , dpu_agc.h
  • dpu_gen_bridge_seq_v17() : v17.h
  • dpu_gen_marks() : dputxin.c , dputxin.h
  • dpu_get_division_v17() : v17.h
  • dpu_inman_init() : dputxin.c , dputxin.h
  • dpu_interp() : interp.c , dpu_intp.h
  • dpu_interp_init() : int_init.c , int_init.h
  • dpu_interp_output() : dpu_fir.c , dpu_intp.h
  • dpu_mod_init() : dpu_mod.c , dpu_mod.h
  • dpu_no_crec() : dpu_crec.c , dpu_crec.h
  • dpu_no_crec_at_all() : dpu_crec.c , dpu_crec.h
  • dpu_outman_init() : dputxin.h , dputxin.c
  • dpu_pc_det() : dpu_ddet.h , dpu_ddet.c
  • dpu_phase_init() : dpu_phas.c , dpu_phas.h
  • dpu_phase_v27() : dpu_phas.h
  • dpu_phase_v29() : dpu_phas.h
  • dpu_PN_gen() : scr.c , dpu_scr.h
  • dpu_rx_common_init() : vxxinit.c
  • dpu_rx_copy() : maniprx.c , maniprx.h
  • dpu_rx_demod() : crecrx.c , crecrx.h
  • dpu_rx_packet() : maniprx.h , maniprx.c
  • dpu_rx_v17_init() : v17.h
  • dpu_rx_v21_init() : vxxinit.c , vxxinit.h
  • dpu_rx_v27_init() : vxxinit.h , vxxinit.c
  • dpu_rx_v29_init() : vxxinit.c , vxxinit.h
  • dpu_scr() : scr.c , dpu_scr.h
  • dpu_scr_init() : dpu_scr.h , scr.c
  • dpu_scr_v27() : scr.c , dpu_scr.h
  • dpu_shaping() : dpu_shap.h , shaping.c
  • dpu_slic_init() : slicers.c , dpu_slic.h
  • dpu_slic_v17() : v17slic.h
  • dpu_smap() : sym_map.c , dpu_smap.h
  • dpu_smap_init() : sym_map.c , dpu_smap.h
  • dpu_smap_v17() : v17.h
  • dpu_trec_init() : trc_init.c , trc_init.h
  • dpu_trec_interp() : dpu_trec.c , dpu_trec.h
  • dpu_ttone() : dpu_trec.c
  • dpu_tx_copy() : dputxin.c , dputxin.h
  • dpu_tx_extract() : dputxin.c , dputxin.h
  • dpu_tx_mod() : dpu_mod.h , dpu_mod.c
  • dpu_tx_shaping_init() : shaping.c , dpu_shap.h
  • dpu_un_modulate() : dpu_mod.h , dpu_mod.c
  • dpu_un_modulate_v17() : v17.h
  • dpu_update_adeq() : dpu_adeq.c , dpu_adeq.h
  • dpu_v21_check() : dpu_fsk.c , dpu_fsk.h
  • dpu_v21_check_high() : dpu_fsk.c , dpu_fsk.h
  • dpu_v21_dec() : dpu_fsk.c , dpu_fsk.h
  • dpu_v21_dec_init() : dpu_fsk.h , dpu_fsk.c
  • dpu_v21_demod() : dpu_crec.c , dpu_crec.h
  • dpu_v21_fsk_gen() : dpu_fsk.c , dpu_fsk.h
  • dpu_v27_St3_smap() : dpu_smap.h , sym_map.c
  • dpu_v27_v29_slicer() : slicers.c , dpu_slic.h
  • dpuAtan2() : dpuatan2.c , dpuatan2.h
  • dpuClose() : dpu.c , dpu.h
  • dpuConfig() : dpu.h , dpu.c
  • dpuconfigRX() : dpu.c
  • dpuControl() : dpu.h , dpu.c
  • dpuHSrxSetCdParms() : vxxinit.c , vxxinit.h
  • dpuNew() : dpu.c , dpu.h
  • dpuOpen() : dpu.c , dpu.h
  • dpuRx() : dpurx.h , dpurx.c
  • dpuRx2400BaudInit() : vxxinit.h , vxxinit.c
  • dpushaping_filt() : dpu_fir.c , dpu_shap.h
  • dpuStatus() : dpu.h , dpu.c
  • dpuTx() : dpu.c , dpu.h
  • dpuUpdateSNRparms() : slicers.c , dpu_slic.h


FM: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • a
  • c
  • d
  • f
  • g
  • h
  • i
  • n
  • r
  • s
  • t
  • u
  • v

- f -

  • FAX_MODEM() : dpu.h , fax_mod.c , fxmdpuif.h
  • find_dist_asm_cmplx() : dpumath.h
  • findMin() : dpu_cdc.c , dpu_cdec.h
  • findMinIndx() : v17.h , v17s.c , v17s.h
  • fm_timestamp16_compare() : fmloc.h , fmutil.c
  • fmCheckCarrierOff() : fmcommon.c , fmloc.h
  • fmCheckCarrierOn() : fmcommon.c , fmloc.h
  • fmCheckNewModeMsg() : fmloc.h
  • fmCheckP2() : fmcommon.c , fmloc.h
  • fmCheckPreamble() : fmcommon.c , fmloc.h
  • fmCheckSignalPresent() : fmloc.h , fmcommon.c
  • fmCheckTep() : fmcommon.c , fmloc.h
  • fmClose() : fm.h , fm.c
  • fmDataBufIn() : fmloc.h , fmutil.c
  • fmDataBufInit() : fmloc.h , fmutil.c
  • fmDataBufOut() : fmloc.h , fmutil.c
  • fmDataBufPeek() : fmutil.c , fmloc.h
  • fmDebugTrace() : fmloc.h , fmcommon.c
  • fmDelay() : fmcommon.c , fmloc.h
  • fmDelete() : fm.c , fm.h
  • fmDoublePackData() : fmloc.h
  • fmDpuProcessDataRx() : fmloc.h , fmcommon.c
  • fmDpuProcessDataTx() : fmloc.h , fmcommon.c
  • fmException() : fmloc.h , fmcommon.c
  • fmGetSizes() : fm.c , fm.h
  • fmGetTablePtr() : fm.c
  • fmHdlcRx() : fmloc.h , fmstate.c
  • fmHSrxSetCdParms() : vxxinit.c
  • fmModeChange() : fmloc.h , fmcommon.c
  • fmMsgFifoInit() : fmloc.h , fmcommon.c
  • fmMsgFifoPeek() : fmcommon.c , fmloc.h
  • fmMsgFifoPop() : fmcommon.c , fmloc.h
  • fmMsgFifoPush() : fmcommon.c , fmloc.h
  • fmNew() : fm.h , fm.c
  • fmOpen() : fm.c , fm.h
  • fmPacketizeData() : fmloc.h , fmutil.c
  • fmReceiveIn() : fm.h , fm.c
  • fmRxMsgProcess() : fmloc.h , fmstate.c
  • fmSendDataToFp() : fmstate.c , fmloc.h
  • fmSendIn() : fm.c , fm.h
  • fmSendTxData() : fmcommon.c , fmloc.h
  • fmSetTablePtr() : fm.c
  • fmShipOutData() : fmloc.h , fmcommon.c
  • fmStateOffline() : fmstate.c , fmloc.h
  • fmStateRx() : fmloc.h , fmstate.c
  • fmStateRxInit() : fmstate.c , fmloc.h
  • fmStateTxHsData() : fmstate.c , fmloc.h
  • fmStateTxHsEcm() : fmloc.h , fmstate.c
  • fmStateTxHsInit() : fmloc.h , fmstate.c
  • fmStateTxHsPreOff() : fmstate.c , fmloc.h
  • fmStateTxHsTraining() : fmloc.h , fmstate.c
  • fmStateTxLsData() : fmloc.h , fmstate.c
  • fmStateTxLsFlag() : fmloc.h , fmstate.c
  • fmStateTxLsInit() : fmstate.c , fmloc.h
  • fmStats() : fm.h , fm.c
  • fmToneDetCtrl() : fmcommon.c , fmloc.h
  • fmToneDetect() : fm.h , fm.c
  • fmToneGenOff() : fmcommon.c , fmloc.h
  • fmToneGenOn() : fmloc.h , fmcommon.c
  • fmUnPackData() : fmloc.h , fmutil.c
  • frctMulDBL() : dpu_fir.h , dpu_fir.c , dpumath.h


FM: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • a
  • c
  • d
  • f
  • g
  • h
  • i
  • n
  • r
  • s
  • t
  • u
  • v

- g -

  • getExp() : dpuatan2.c
  • getIndx() : v17s.c
  • getTempDists() : dpu_cdc.c , dpu_cdec.h


FM: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • a
  • c
  • d
  • f
  • g
  • h
  • i
  • n
  • r
  • s
  • t
  • u
  • v

- h -

  • HSrxCommonSt1Init() : vxxinit.c , vxxinit.h


FM: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • a
  • c
  • d
  • f
  • g
  • h
  • i
  • n
  • r
  • s
  • t
  • u
  • v

- i -

  • IIRUpdatOutPow() : dpu_cd.h , dpu_ddt.c , dpu_ddet.h
  • IIRUpdatOutPowTep() : dpu_ddet.h , dpu_cd.h , dpu_ddt.c


FM: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • a
  • c
  • d
  • f
  • g
  • h
  • i
  • n
  • r
  • s
  • t
  • u
  • v

- r -

  • rxLSinitInHS() : vxxinit.c , vxxinit.h


FM: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • a
  • c
  • d
  • f
  • g
  • h
  • i
  • n
  • r
  • s
  • t
  • u
  • v

- s -

  • shift_data() : dpu_fir.c , dpu_fir.h
  • sliceV17_no_conv() : dpu_cdec.h


FM: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • a
  • c
  • d
  • f
  • g
  • h
  • i
  • n
  • r
  • s
  • t
  • u
  • v

- t -

  • testonly() : dpumath.h
  • trec_compute_slow() : trec_com.h


FM: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • a
  • c
  • d
  • f
  • g
  • h
  • i
  • n
  • r
  • s
  • t
  • u
  • v

- u -

  • update() : dpu_adeq.c , dpu_adeq.h , dpumath.h
  • updateIIR() : dpu_trec.c , dpumath.h
  • updateMetrics() : dpu_cdc.c , dpu_cdec.h


FM: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • a
  • c
  • d
  • f
  • g
  • h
  • i
  • n
  • r
  • s
  • t
  • u
  • v

- v -

  • V17_slice0167_120() : v17.h , v17s.c
  • V17_slice0167_144() : v17.h , v17s.c
  • V17_slice0167_72() : v17rx.h
  • V17_slice0167_96() : v17rx.h
  • V17_slice2345_120() : v17.h , v17s.c
  • V17_slice2345_144() : v17s.c , v17.h
  • V17_slice2345_72() : v17rx.h
  • V17_slice2345_96() : v17rx.h
  • v17RxSt1Init() : v17.h
  • v17RxSt2Init() : v17.h
  • v17RxSt34Init() : v17.h
  • v17RxSt3Init() : v17.h
  • v17RxSt4Init() : v17.h
  • v17RxSt5Init() : v17.h
  • v17RxSt6Init() : v17.h
  • v17RxSt7Init() : v17.h
  • v17RxSt8Init() : v17.h
  • v17RxSt9Init() : v17.h
  • v17RxStM() : v17.h
  • v17TxSt1Init() : v17.h
  • v17TxSt2Init() : v17.h
  • v17TxSt3Init() : v17.h
  • v17TxSt4Init() : v17.h
  • v17TxSt5Init() : v17.h
  • v17TxSt6Init() : v17.h
  • v17TxStM() : v17.h
  • v21Rx() : vxxproc.c , vxxproc.h
  • v21RxCommonInit() : vxxinit.c
  • v21RxSt1Init() : vxxinit.h , vxxinit.c
  • v21RxSt3Init() : vxxinit.h , vxxinit.c
  • v21RxStM() : vxxsm.c , vxxsm.h
  • v21RxStNULLInit() : vxxinit.h , vxxinit.c
  • v21Tx() : vxxproc.h
  • v21TxStM() : vxxsm.c , vxxsm.h
  • v27RxSt1Init() : vxxinit.h , vxxinit.c
  • v27RxSt2Init() : vxxinit.h , vxxinit.c
  • v27RxSt34Init() : vxxinit.h , vxxinit.c
  • v27RxSt3Init() : vxxinit.h , vxxinit.c
  • v27RxSt4Init() : vxxinit.h , vxxinit.c
  • v27RxSt5Init() : vxxinit.h , vxxinit.c
  • v27RxSt6Init() : vxxinit.h , vxxinit.c
  • v27RxSt7Init() : vxxinit.h , vxxinit.c
  • v27RxSt8Init() : vxxinit.h , vxxinit.c
  • v27RxStM() : vxxsm.c , vxxsm.h
  • v27TxSt0Init() : vxxinit.h
  • v27TxSt1Init() : vxxinit.h , vxxinit.c
  • v27TxSt2Init() : vxxinit.h , vxxinit.c
  • v27TxSt3Init() : vxxinit.h , vxxinit.c
  • v27TxSt4Init() : vxxinit.c , vxxinit.h
  • v27TxSt5Init() : vxxinit.h , vxxinit.c
  • v27TxSt7Init() : vxxinit.h
  • v27TxStM() : vxxsm.c , vxxsm.h
  • v27TxStNULLInit() : vxxinit.h
  • v29RxSt1Init() : vxxinit.c , vxxinit.h
  • v29RxSt2Init() : vxxinit.c , vxxinit.h
  • v29RxSt34Init() : vxxinit.c , vxxinit.h
  • v29RxSt3Init() : vxxinit.h , vxxinit.c
  • v29RxSt4Init() : vxxinit.h , vxxinit.c
  • v29RxSt5Init() : vxxinit.c , vxxinit.h
  • v29RxSt6Init() : vxxinit.c , vxxinit.h
  • v29RxSt7Init() : vxxinit.h , vxxinit.c
  • v29RxSt8Init() : vxxinit.h , vxxinit.c
  • v29RxStM() : vxxsm.h , vxxsm.c
  • v29TxSt0Init() : vxxinit.h
  • v29TxSt1Init() : vxxinit.c , vxxinit.h
  • v29TxSt2Init() : vxxinit.c , vxxinit.h
  • v29TxSt3Init() : vxxinit.c , vxxinit.h
  • v29TxSt4Init() : vxxinit.h , vxxinit.c
  • v29TxStM() : vxxsm.h , vxxsm.c
  • vHSRx() : procrx.c , procrx.h
  • vHSTx() : vxxproc.h , vxxproc.c
  • vxx_tx_init() : vxxinit.c , vxxinit.h


FM: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines

  • dpuCtrl_t : dpu.h
  • dpuInst_t : dpuloc.h
  • fmInst_t : fmloc.h
  • path_ptr : dpu_cdec.h
  • path_t : dpu_cdec.h


FM: Data Fields

  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • a
  • b
  • c
  • d
  • e
  • f
  • i
  • p
  • r
  • s
  • t
  • v

- a -

  • atan2ScaleFactors : dpuatan2.c

- b -

  • bp_hilb_v17 : v17datrx.h
  • bp_rx_v17 : v17datrx.h

- c -

  • c1tables : fm.h , dpu_tables.c

- d -

  • division_table : vxxinit.c
  • dpu_bridge_seq_v17 : v17data.h
  • dpu_denc_table_bridge_v17 : v17data.h
  • dpu_dot_V17_AllRates : v17data.h
  • dpu_dot_V27 : vxxinit.c
  • dpu_dot_V27_24 : vxxinit.c
  • dpu_dot_V27_48 : vxxinit.c
  • dpu_dot_V29_72 : vxxinit.c
  • dpu_dot_V29_96 : vxxinit.c
  • dpu_gain_cst : dpu_mod.h , dpu_gain.c
  • dpu_PN_table_v17_AllRates : v17data.h
  • dpu_PN_table_v29_7200 : vxxinit.c
  • dpu_PN_table_v29_9600 : vxxinit.c
  • dpu_slic_bits_V27_24 : slicers.c , vxxinit.c
  • dpu_slic_invmod_V27_24 : vxxinit.c , slicers.c
  • dpu_slic_invmod_V27_48 : vxxinit.c , slicers.c
  • dpu_slic_invmod_V29_72 : vxxinit.c , slicers.c
  • dpu_smap_V17_120 : v17datrx.h , v17smap.h
  • dpu_smap_V17_144 : v17smap.h , v17datrx.h
  • dpu_v21_freq_h_table : dpu.c , dpu_fsk.c , vxxinit.c
  • dpuIndxTable : dpu_cdc.c
  • dpuIndxTable120 : v17s.c
  • dpuTrecTableAsFcnPt : fm.h , trec_int.c

- e -

  • ERROR_BTS : vxxproc.c

- f -

  • fmBufs : fm.c
  • fmContext : fm.h
  • fmDataRateTable : fmcommon.c , fmloc.h
  • fmSpeedTable : fmcommon.c

- i -

  • in_delay : int_init.c
  • interp_table : int_init.c

- p -

  • PROC2_INDEX : vxxproc.c

- r -

  • RX_GAIN : dpu_cd.c , dpu_ddet.c
  • RX_LEVEL : dpu_ddet.c , dpu_cd.c

- s -

  • sfIndx72_8 : int_init.c
  • sfIndx8_72 : int_init.c
  • sfIndx8_96 : int_init.c
  • sfIndx96_8 : int_init.c
  • shape_v17 : v17data.h

- t -

  • tanTableInFirstOctant : dpuatan2.c
  • temp_acc_distL : dpu_cdc.c
  • temp_acc_distU : dpu_cdc.c
  • temp_path_distL : dpu_cdc.c
  • temp_path_distU : dpu_cdc.c

- v -

  • V17_144_symbol_num : v17s.c
  • v17tables : dpu_tables.c , fm.h
  • v27tables : dpu_tables.c , fm.h
  • v29tables : dpu_tables.c , fm.h


FM: 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.


FM: Fax Debug Mode

Fax Debug Mode
[FM External API]

Collaboration diagram for Fax Debug Mode:

Defines

#define | fm_DBG_LVL_0 0
#define | fm_DBG_LVL_1 1
#define | fm_DBG_LVL_2 2

Define Documentation

#define fm_DBG_LVL_0 0

FM Debug Mode -- Only fatal errors are reported

Definition at line 69 of file fm.h.

#define fm_DBG_LVL_1 1

FM Debug Mode -- Reports high-level FM state information and fatal errors.

Definition at line 75 of file fm.h.

#define fm_DBG_LVL_2 2

FM Debug Mode -- Telogy internal debug mode

Definition at line 80 of file fm.h.


FM: Return Error Codes

Return Error Codes
[FM External API]

Collaboration diagram for Return Error Codes:

Defines

#define | fm_ERROR (-1)
#define | fm_NOERR 0
#define | fm_NOMEMORY (-2)

Define Documentation

#define fm_ERROR (-1)

FM return code -- Invalid configuration

Definition at line 47 of file fm.h.

Referenced by fmNew().

#define fm_NOERR 0

FM return code -- Initiaization of FM was successful

Definition at line 52 of file fm.h.

Referenced by fmGetSizes(), fmNew(), and fmOpen().

#define fm_NOMEMORY (-2)

FIU return code -- Insufficient memory allocated

Definition at line 57 of file fm.h.

Referenced by fmNew().


FM: FM External API

FM External API

Collaboration diagram for FM External API:

Detailed Description

FM external interfaces are divided into three subcategories: Control Interface, PCM Interface, and Protocol Interface.

Modules

Return Error Codes
Fax Debug Mode
FM Debug message types for debugInfo()
FM Feature register

Data Structures

struct | fmReceiveOutSpec_t
Specification of fmReceiveOutSpec Object. More...
struct | fmSendOutSpec_t
Specification of fmSendOutSpec Object. More...
struct | fmToneDetCtrlSpec_t
Specification of fmToneDetSpec Object. More...
struct | v29Table_sPtrs_t
V.29 Cluster definitions. More...
struct | v29Table_sPtrs_t
V.29 Cluster definitions. More...
struct | v27Table_sPtrs_t
V.27 Cluster definitions. More...
struct | v17Table_sPtrs_t
V.17 Cluster definitions. More...
struct | commonTable1_sPtrs_t
common Cluster-1 definitions More...
struct | fmTablePtrs_t
FM table Pointer structure. More...
struct | fmContext_t
FM context Structure. More...
struct | fmNewConfig_t
FM New data structure. More...
struct | fmOpenConfig_t
Open Configuration structure. More...
struct | fmSigQStats_t
Statistics of signal quality. More...
struct | fmProtoStats_t
Statistics of protocol. More...
struct | fmStatsReport_t
FM Statistics Data Structure. More...

ECO (Telogy Embedded Communication Object) APIs

tint | fmGetSizes (tint *nbufs, const ecomemBuffer_t **bufs)
This function obtains memory requirements for an instance of FM.
tint | fmNew (void **fmInst, tint nbufs, ecomemBuffer_t *bufs, fmNewConfig_t *cfg)
This function creates an instance of FM and initializes the memory buffer pointers in the instance.
Remarks:
Function fmNew() must be called before fmOpen()is called.

tint | fmOpen (void *fmInst, fmOpenConfig_t *cfg)
This function initializes and configures an FM instance.
void | fmClose (void *fmInst)
This function closes the FM instance identified by fmInst. It sets the state of FM to CLOSED.
void | fmDelete (void **fmInst)
This function deletes the FM instance identified by fmInst.
Remarks:
FM must be closed prior to being deleted.

void | fmStats (void *fmInst, tbool freset, fmStatsReport_t *stats)
Routine which obtains FM statistics.
void | fmSendIn (void *fmInst, linSample *pcm_samples)
This function passes a frame of PCM linear samples to the FM for processing.
tint | fmReceiveIn (void *fmInst, void *message)
This function passes a message from the FIU to the FM.
void | fmToneDetect (void *fmInst, tuint toneID, tuint v8CallFunction, tuint v8ModMode)
This function notifies FM that a tone detection indication has been received from an external tone detection module.

Defines

#define | fm_HDLC_FLAG_PATTERN 0x7E
HDLC Flag pattern used for T.30 processing.
#define | GG_NUM_FM_ENC_TABLES 0
Definitions of FM table relocation constants.
#define | GG_NUM_FM_DEC_TABLES 0
#define | GG_NUM_FM_COMMON_TABLES 5
#define | GG_NUM_FM_TABLES
#define | fm_TABLE1_START &v29tables
#define | fm_TABLE2_START &v27tables
#define | fm_TABLE3_START &v17tables
#define | fm_TABLE4_START &c1tables
#define | fm_TABLE5_START &dpuTrecTableAsFcnPt[0]
#define | fm_TABLE1_L sizeof(v29Table_sPtrs_t)
#define | fm_TABLE2_L sizeof(v27Table_sPtrs_t)
#define | fm_TABLE3_L sizeof(v17Table_sPtrs_t)
#define | fm_TABLE4_L sizeof(commonTable1_sPtrs_t)
#define | fm_TABLE5_L sizeof(dpuTrecTableAsFcnPt)

Variables

fmContext_t fmContext
Reference to FM context Structure.
const v29Table_sPtrs_t | v29tables
const v27Table_sPtrs_t | v27tables
const v17Table_sPtrs_t | v17tables
const commonTable1_sPtrs_t | c1tables
Fract | dpuTrecTableAsFcnPt [1107]

Define Documentation

#define fm_HDLC_FLAG_PATTERN 0x7E

HDLC Flag pattern used for T.30 processing.

Definition at line 105 of file fm.h.

Referenced by fmStateTxHsEcm(), fmStateTxLsData(), and fmStateTxLsFlag().

#define GG_NUM_FM_ENC_TABLES 0

Definitions of FM table relocation constants.

Defines sizes of FM tables and symbols that are used as base of these tables (for dynamic table relocation).

Definition at line 506 of file fm.h.

#define GG_NUM_FM_DEC_TABLES 0

Definition at line 507 of file fm.h.

#define GG_NUM_FM_COMMON_TABLES 5

Definition at line 508 of file fm.h.

#define GG_NUM_FM_TABLES

Value:

(GG_NUM_FM_ENC_TABLES + \
                          GG_NUM_FM_DEC_TABLES + \
                          GG_NUM_FM_COMMON_TABLES)
Table address definitions

Definition at line 510 of file fm.h.

#define fm_TABLE1_START &v29tables

Definition at line 521 of file fm.h.

#define fm_TABLE2_START &v27tables

Definition at line 522 of file fm.h.

#define fm_TABLE3_START &v17tables

Definition at line 523 of file fm.h.

#define fm_TABLE4_START &c1tables

Definition at line 524 of file fm.h.

#define fm_TABLE5_START &dpuTrecTableAsFcnPt[0]

Table Lengths

Definition at line 525 of file fm.h.

#define fm_TABLE1_L sizeof(v29Table_sPtrs_t)

Definition at line 528 of file fm.h.

#define fm_TABLE2_L sizeof(v27Table_sPtrs_t)

Definition at line 529 of file fm.h.

#define fm_TABLE3_L sizeof(v17Table_sPtrs_t)

Definition at line 530 of file fm.h.

#define fm_TABLE4_L sizeof(commonTable1_sPtrs_t)

Definition at line 531 of file fm.h.

#define fm_TABLE5_L sizeof(dpuTrecTableAsFcnPt)

Definition at line 532 of file fm.h.

Function Documentation

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

This function obtains memory requirements for an instance of FM.

Parameters:
[out] | nbufs | Number of memory buffers stored in this address.
[out] | bufs | Address of buffer descriptors stored in this address.
Return values:
Value Return Error Codes
Precondition:
Global data structure fmContext must be defined and initialized properly.

Definition at line 137 of file fm.c.

References FM_NBUF, fm_NOERR, and fmBufs.

tint fmNew | ( | void ** | fmInst,
 |  | tint | nbufs,
 |  | ecomemBuffer_t * | bufs,
 |  | fmNewConfig_t * | cfg
 | ) |  |

This function creates an instance of FM and initializes the memory buffer pointers in the instance.

Remarks:
Function fmNew() must be called before fmOpen()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] | fmInst | Pointer to FM instance
Return values:
Value Return Error Codes
Precondition:
Pointer fmInst must be set to NULL before this function is called.
Postcondition:
Pointer fmInst will be set to point to the instance buffer described by bufs.
See also:
fmNewConfig_t

Definition at line 162 of file fm.c.

References fm_ERROR, FM_NBUF, fm_NOERR, fm_NOMEMORY, and fmBufs.

tint fmOpen | ( | void * | fmInst,
 |  | fmOpenConfig_t * | cfg
 | ) |  |

This function initializes and configures an FM instance.

Parameters:
[in] | cfg | Pointer to FM Open Configuration Structure.
[in,out] | fmInst | Pointer to FM instance.
Return values:
Value Return Error Codes
Postcondition:
The instance's state will be set to OPEN.
See also:
fmOpenConfig_t

Definition at line 266 of file fm.c.

References fm_ctrl_str::Config, dpuIf_t::CtrlParam, dpuIf_t::DataBuf, fmInst_s::DataRate, fmInst_s::debugLvl, fmOpenConfig_t::debugLvl, fmInst_s::DelayFlag, fmInst_s::Dpu, DPU_FAX, dpuCfg_t::DPUfeatureBitMap, dpuOpen(), fm_ctrl_str::element_2, fm_ctrl_str::element_3, fm_ctrl_str::element_5, fmOpenConfig_t::fBufferData, fmInst_s::fFmFpPacketizationMode, fmInst_s::fForceBadFCS, FM_CLOSED, FM_FP_PKT_SIZE_BYTES, fm_NOERR, FM_OFFLINE_STATE, FM_OPEN, FM_TONE_ST_SIL, fmInst_s::FmEcmMode, fmOpenConfig_t::FMfeatureBitMap, fmMsgFifoInit(), fmInst_s::FmNewModemMode, fmReceiveOutSpec_t::fmReceiveOut, fmSendOutSpec_t::fmSendOut, fmInst_s::FmState, fmInst_s::FmTaskRate, fmInst_s::FmToneCount, fmInst_s::FmTonePhase, fmInst_s::FmToneState, dpuCfg_t::frame, fm_ctrl_str::LineCond, fmOpenConfig_t::maxBytesToBuffer, fmInst_s::maxBytesToBuffer, dpuCfg_t::protocol, fmInst_s::ProtoStats, dpuCfg_t::rx_cd_thr_set, fmOpenConfig_t::rx_cd_thr_set, fmInst_s::RxOutSpec, fmOpenConfig_t::RxOutSpec, fmInst_s::SendOutSpec, fmOpenConfig_t::SendOutSpec, fmInst_s::state, dpuCfg_t::TablePtr, fmOpenConfig_t::tablePtr, fmReceiveOutSpec_t::TargetInst, fmSendOutSpec_t::TargetInst, fmToneDetCtrlSpec_t::TargetInst, dpuIf_t::TargetInst, fmInst_s::ToneDetCtrl, fmToneDetCtrlSpec_t::ToneDetCtrl, fmOpenConfig_t::ToneDetCtrl, dpuCfg_t::tx_level, fmOpenConfig_t::tx_level, and fmInst_s::TxFillByte.

Here is the call graph for this function:

void fmClose ( void * fmInst )

This function closes the FM instance identified by fmInst. It sets the state of FM to CLOSED.

Parameters:
[in,out] fmInst

Definition at line 351 of file fm.c.

References fmInst_s::Dpu, dpuClose(), FM_CLOSED, fmInst_s::state, and dpuIf_t::TargetInst.

Here is the call graph for this function:

void fmDelete ( void ** fmInst )

This function deletes the FM instance identified by fmInst.

Remarks:
FM must be closed prior to being deleted.

Parameters:
[in,out] fmInst Pointer to FM instance.
Postcondition:
Pointer fmInst will be set to NULL after this function is called.

Definition at line 240 of file fm.c.

References FM_CLOSED, FM_EXC_DELETE, fmException(), fmInst_s::ID, and fmInst_s::state.

Here is the call graph for this function:

void fmStats | ( | void * | fmInst,
 |  | tbool | freset,
 |  | fmStatsReport_t * | stats
 | ) |  |

Routine which obtains FM statistics.

Remarks:
Some of the values are meaningful only if the modem is configured in the proper mode (e.g., high or low speed transmit or receive).
Parameters:
[in,out] | fmInst | Pointer to FM instance
[in] | freset | Flag indicating whether to reset statistics
[in] | stats | pointer to statistics report structure

Definition at line 533 of file fm.c.

References fmInst_s::Dpu, dpuStatus(), fmStatsReport_t::fmProtoStats, fmStatsReport_t::fmSigQStats, fmInst_s::ProtoStats, and dpuIf_t::TargetInst.

Here is the call graph for this function:

void fmSendIn | ( | void * | fmInst,
 |  | linSample * | pcm_samples
 | ) |  |

This function passes a frame of PCM linear samples to the FM for processing.

The FM demodulates the input signal and passes the corresponding data and signaling information to the FIU module.

Parameters:
[in] | pcm_samples | Pointer to an array of PCM samples .
[in,out] | fmInst | Pointer to FM instance.

Definition at line 434 of file fm.c.

References fmInst_s::Dpu, FM_CLOSED, FM_HS_RX_STATE, FM_HS_TX_STATE_DATA, FM_HS_TX_STATE_ECM, FM_HS_TX_STATE_PRE_OFF, FM_HS_TX_STATE_TRAINING, FM_LS_RX_STATE, FM_LS_TX_STATE_DATA, FM_LS_TX_STATE_FLAG, FM_OFFLINE_STATE, FM_TRC_DBG_LVL_2, FM_TRC_NEW_STATE, fmDebugTrace(), fmDpuProcessDataRx(), fmDpuProcessDataTx(), fmGetTablePtr(), fmModeChange(), fmInst_s::FmNewModemMode, fmSendTxData(), fmSetTablePtr(), fmInst_s::FmState, fmStateOffline(), fmStateRx(), fmStateTxHsData(), fmStateTxHsEcm(), fmStateTxHsPreOff(), fmStateTxHsTraining(), fmStateTxLsData(), fmStateTxLsFlag(), fmInst_s::state, dpuInst_s::TablePtr, and dpuIf_t::TargetInst.

Here is the call graph for this function:

tint fmReceiveIn | ( | void * | fmInst,
 |  | void * | message
 | ) |  |

This function passes a message from the FIU to the FM.

IFFAX.chm describes the format and meaning of the messages from the FIU to the FM

Parameters:
[in] | message | Pointer to the message passed to the FM.
[in,out] | fmInst | Pointer to FM instance.
Return values:
iffax_FM_CMD_ACCEPTED | if the message is copied into message FIFO
iffax_FM_CMD_NOT_ACCEPTED | if the message is not copied into the message FIFO because the FIFO is full
iffax_FM_CMD_ERROR | if message is not copied because FM is closed or invalid message ID

Definition at line 378 of file fm.c.

References FM_CLOSED, fmMsgFifoPush(), and fmInst_s::state.

Here is the call graph for this function:

void fmToneDetect | ( | void * | fmInst,
 |  | tuint | toneID,
 |  | tuint | v8CallFunction,
 |  | tuint | v8ModMode
 | ) |  |

This function notifies FM that a tone detection indication has been received from an external tone detection module.

The toneID, v8CallFunction, and v8ModMode parameters are described in the IFFAX.chm.

Parameters:
[in] | toneID | ID of tone detected.
[in] | v8CallFunction | V.8 call function.
[in] | v8ModMode | V.8 modulation mode.
[in,out] | fmInst | Pointer to FM instance.

Definition at line 569 of file fm.c.

References fmContext, fmContext_t::fmGetTime, fmSendOutSpec_t::fmSendOut, fmInst_s::SendOutSpec, and fmSendOutSpec_t::TargetInst.

Variable Documentation

fmContext_t fmContext

Reference to FM context Structure.

Referenced by dpu_interp_init(), dpu_v21_demod(), fmCheckCarrierOff(), fmCheckCarrierOn(), fmCheckP2(), fmCheckPreamble(), fmCheckSignalPresent(), fmCheckTep(), fmDebugTrace(), fmDelay(), fmException(), fmGetTablePtr(), fmHdlcRx(), fmMsgFifoPeek(), fmSetTablePtr(), fmShipOutData(), and fmToneDetect().

const v29Table_sPtrs_t v29tables

Definition at line 37 of file dpu_tables.c.

const v27Table_sPtrs_t v27tables

Definition at line 383 of file dpu_tables.c.

const v17Table_sPtrs_t v17tables

Definition at line 681 of file dpu_tables.c.

const commonTable1_sPtrs_t c1tables

Definition at line 1312 of file dpu_tables.c.

Fract dpuTrecTableAsFcnPt[1107]

Definition at line 17 of file trec_int.c.


FM: FM Feature register

FM Feature register
[FM External API]

Collaboration diagram for FM Feature register:

Detailed Description

A one-word (16-bit) Feature register that reflects the features enabled in FM. The register is laid out as follows:
               ---------------------------------------------------------------
              |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |
              |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |
               ---------------------------------------------------------------
       Bit #:  15  14  13  12  11  10  09  08  07  06  05  04  03  02  01  00
                                                                            ^
                                                                            |
                                                                            |
                                                                           FLC

Defines

#define | fm_FEATURE_FLC 0x00
#define | fm_FEATURE_FLC_ENABLE_MASK 0x01

Define Documentation

#define fm_FEATURE_FLC 0x00

FrameSlip Logic bit number

Definition at line 126 of file fm.h.

#define fm_FEATURE_FLC_ENABLE_MASK 0x01

FrameSlip Logic bit number Mask

Definition at line 127 of file fm.h.


FM: FM Debug message types for debugInfo()

FM Debug message types for debugInfo()
[FM External API]

Collaboration diagram for FM Debug message types for debugInfo():

Defines

#define | fm_INFOMATIONAL 0
#define | fm_EXCEPTION 2

Define Documentation

#define fm_INFOMATIONAL 0

FM Debug Message Type -- Fax general debug information message

Definition at line 94 of file fm.h.

Referenced by fmDebugTrace().

#define fm_EXCEPTION 2

FM Debug Message Type -- Fax critical debug information message

Definition at line 99 of file fm.h.


FM: hilbrx.c File Reference

hilbrx.c File Reference

#include <ti/mas/types/types.h>
#include <ti/mas/fract/fract.h>
#include "dpumath.h"
#include "dpu_hilb.h"
#include "hilbrx.h"
#include "dpu_fir.h"

Include dependency graph for hilbrx.c:

Go to the source code of this file.

Functions

void dpu_bp_hilb (dpu_bphilb_t *inst, Fract *input, Fract *output_re, Fract *output_im, int samp, int n)

Function Documentation

void dpu_bp_hilb | ( | dpu_bphilb_t * | inst,
 |  | Fract * | input,
 |  | Fract * | output_re,
 |  | Fract * | output_im,
 |  | int | samp,
 |  | int | n
 | ) |  |

Definition at line 34 of file hilbrx.c.

References dpu_bphilb_t::bp_filt, dpu_bphilb_t::bp_hilt_filt, convoluI(), dpu_bphilb_t::delay, dpu_bphilb_t::L1, and dpu_bphilb_t::length.

Referenced by HSrxCommonSt1Init(), and v21RxCommonInit().

Here is the call graph for this function:


FM: hilbrx.c Source File

hilbrx.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE:
00003  ******************************************************************************
00004  * FILE NAME:
00005  *
00006  * DESCRIPTION:
00007  *
00008  * TABS: NONE
00009  *
00010  * $Id: hilbrx.c 1.2 1999/02/17 13:00:55 sakhtar Exp $
00011  *
00012  * REVISION HISTORY:
00013  *
00014  * $Log: hilbrx.c $
00015  * Revision 1.2  1999/02/17 13:00:55  sakhtar
00016  * Cleanup
00017  * Revision 1.1  1997/11/21 14:48:17  PPATEL
00018  * Initial revision
00019  *
00020  * (C) Copyright 1997, TELOGY Networks, Inc.
00021  *****************************************************************************/
00022 #include <ti/mas/types/types.h>
00023 #include <ti/mas/fract/fract.h>
00024 #include "dpumath.h"
00025 #include "dpu_hilb.h"
00026 #include "hilbrx.h"
00027 #include "dpu_fir.h"
00028 /******************************************************************************
00029  * FUNCTION PURPOSE: DPU RX band pass hilbert transformer
00030  ******************************************************************************
00031  * DESCRIPTION: DPU RX band pass hilbert transformer
00032  *
00033  *****************************************************************************/
00034 void dpu_bp_hilb(dpu_bphilb_t *inst, Fract *input, Fract *output_re,
00035                      Fract *output_im, int samp, int n)
00036 {
00037   int j,count,  /* counters */
00038       nl,   /* index variable for moving new data into delay line */
00039       L1,   /* samp/baud or 1 */
00040       h;     /* length - 1 of the filter */
00041   Fract *oldin,  /* ptr to delay line */
00042       t1,t2;   /* temporary */
00043
00044   /* initialize local variables */
00045   nl = n * samp;
00046   L1 = inst->L1;
00047   h  = inst->length - 1;
00048   count = 0;
00049   oldin = inst->delay;
00050
00051   /* copy new data to the delay line */
00052   for (j=0;j < samp; j++)
00053   {
00054     oldin[h+j]= input[nl+j];
00055   }
00056
00057   /* hilbert transform */
00058   for (j=0; j<samp; j+=L1)
00059   {
00060     t1=frctLF2F(convoluI(&oldin[h+j],(Fract *)(inst->bp_filt),h), 28, 14);
00061     t2=frctLF2F(convoluI(&oldin[h+j],(Fract *)(inst->bp_hilt_filt),h), 28, 14);
00062     output_re[count]=t1;
00063     output_im[count++]=t2;
00064   }
00065
00066   /* shift data in delay line */
00067   for (j=0; j<h; j++)
00068   {
00069     oldin[j]= oldin[j+samp];
00070   }
00071
00072  }


FM: hilbrx.h File Reference

hilbrx.h File Reference

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

Include dependency graph for hilbrx.h:

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

Go to the source code of this file.

Functions

void dpu_bp_hilb (dpu_bphilb_t *inst, Fract *input, Fract *output_re, Fract *output_im, int samp, int n)

Function Documentation

void dpu_bp_hilb | ( | dpu_bphilb_t * | inst,
 |  | Fract * | input,
 |  | Fract * | output_re,
 |  | Fract * | output_im,
 |  | int | samp,
 |  | int | n
 | ) |  |

Definition at line 34 of file hilbrx.c.

References dpu_bphilb_t::bp_filt, dpu_bphilb_t::bp_hilt_filt, convoluI(), dpu_bphilb_t::delay, dpu_bphilb_t::L1, and dpu_bphilb_t::length.

Referenced by HSrxCommonSt1Init(), and v21RxCommonInit().

Here is the call graph for this function:


FM: hilbrx.h Source File

hilbrx.h

Go to the documentation of this file.
00001 #ifndef _HILBRX_H
00002 #define _HILBRX_H
00003
00004 /******************************************************************************
00005  * FILE PURPOSE:
00006  ******************************************************************************
00007  * FILE NAME:
00008  *
00009  * DESCRIPTION:
00010  *
00011  * TABS: NONE
00012  *
00013  * $Id: hilbrx.h 1.1 1997/11/21 14:48:18 PPATEL Exp $
00014  *
00015  * REVISION HISTORY:
00016  *
00017  * $Log: hilbrx.h $
00018  * Revision 1.1  1997/11/21 14:48:18  PPATEL
00019  * Initial revision
00020  *
00021  * (C) Copyright 1997, TELOGY Networks, Inc.
00022  *****************************************************************************/
00023
00024 #include <ti/mas/types/types.h>
00025 #include "dpu_hilb.h"
00026
00027 void dpu_bp_hilb(dpu_bphilb_t *inst, Fract *input, Fract *output_re,
00028                      Fract *output_im, int samp, int n);
00029
00030 #endif
00031 /* nothing past this point */


FM: FM (Fax Modem) Package

FM (Fax Modem) Package

Release 3.0.1.2

Page Contents

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

Description

The Facsimile Modem Unit (FM) is a software module that performs all the modulation and demodulation functions required of a fax modem: demodulation of PCM data received at the analog interface, and modulation of facsimile protocol messages received from the FIU. The FM module has the following capabilities and features:
  • V.21 300 bps channel 2 (1750 Hz nominal frequency) binary signal modulation and demodulation
  • HDLC framing / deframing (0 bit insertion & removal, CRC generation & checking)
  • V.27ter (2400 / 4800 bps),
  • V.29 (7200 / 9600 bps),
  • V.17 (7200 / 9600 / 12000 / 14400 bps),
  • V.33 (12000 / 14400 bps) high-speed data modulation and demodulation
  • Control the generation of fax tones (i.e. CNG / CED) by an external tone generation utility through API's

Integration

The FM component can be integrated into a system and provide reliable fax modem 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 FM 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: | FM External API
 | FM Integration

Default Configuration

None

Performance

Additional links: Performance

Limitations

None

Standards Compliance

  1. CCITT Recommendation T.30, “Procedures for Document Facsimile Transmission in the General Switched Telephone Network.”
  2. CCITT Recommendation T.4, “Standardization of Group 3 Facsimile Apparatus for Document Transmission.”
  3. CCITT Recommendation T.6, “Facsimile Coding Schemes and Coding Control Functions for Group 4 Facsimile Apparatus.
  4. ITU-T Recommendation V.21, “300 Bits Per Second Duplex Modem Standardized for Use in the General Switched Telephone Network.”
  5. ITU-T Recommendation V.27 ter, “4800/2400 Bits Per Second Modem Standardized for Use in the General Switched Telephone Network.”
  6. ITU-T Recommendation V.29, “9600 Bits Per Second Modem Standardized for Use on Point-To-Point 4-Wire Leased Telephone-Type Circuits.”
  7. ITU-T Recommendation V.33, “14400 Bits Per Second Modem Standardized for Use on Point-To-Point 4-Wire Leased Telephone-Type Circuits.”
  8. ITU-T Recommendation V.17, “A 2-Wire Modem for Facsimile Applications with Rates Up To 14400 bit/s.”

Dependent Packages

The FM package depends on the following packages for build and/or integration. The specific versions and compatibility keys are provided in the release notes.

  1. ti.mas.types (Common data type defintions)
  2. ti.mas.util (Common utilities)
  3. ti.mas.fract (Common fractional arithmetic macros)
  4. ti.mas.iffax (External fax interface for configuration)
  5. ti.mas.ifsys (Common Interface Package)
  6. ti.mas.swtools (Internally used s/w tools)


FM: int_init.c File Reference

int_init.c File Reference

#include <ti/mas/types/types.h>
#include "dpu_tgt.h"
#include "dpumath.h"
#include "dpu_intp.h"
#include "int_init.h"
#include "fmprag.h"
#include "fm.h"

Include dependency graph for int_init.c:

Go to the source code of this file.

Functions

void | dpu_interp_init (dpu_interp_t *inst, int index)

Variables

Fract * | in_delay
const Fract | sfIndx8_96 [6]
const Fract | sfIndx8_72 [9]
const Fract | sfIndx72_8 [10]
const Fract | sfIndx96_8 [5]
interp_params_t | interp_table [3]

Function Documentation

void dpu_interp_init | ( | dpu_interp_t * | inst,
 |  | int | index
 | ) |  |

Definition at line 65 of file int_init.c.

References fmTablePtrs_t::commonTable1Ptrs, DPU_INTP_72_80_INDEX, DPU_INTP_80_96_INDEX, DPU_INTP_96_80_INDEX, DPU_MAX_M, dpu_interp_t::filter, fmContext, commonTable1_sPtrs_t::hn_72_80_pt, commonTable1_sPtrs_t::hn_80_96_pt, commonTable1_sPtrs_t::hn_96_80_pt, dpu_interp_t::index_tab, interp_table, dpu_interp_t::L1, interp_params_t::L1, dpu_interp_t::L2, interp_params_t::L2, dpu_interp_t::length, interp_params_t::length, dpu_interp_t::oldin, and fmContext_t::tablePtr.

Referenced by v21RxStNULLInit(), v27RxSt1Init(), v29RxSt1Init(), and vxx_tx_init().

Variable Documentation

Fract* in_delay

const Fract sfIndx8_96[6]

Initial value:

{
  0,0,1,2,3,4
}

Definition at line 35 of file int_init.c.

const Fract sfIndx8_72[9]

Initial value:

{
  0,1,2,3,4,5,6,7,8
}

Definition at line 39 of file int_init.c.

const Fract sfIndx72_8[10]

Initial value:

{
  0,0,1,2,3,4,5,6,7,8
}

Definition at line 43 of file int_init.c.

const Fract sfIndx96_8[5]

Initial value:

{
  0,1,2,3,4
}

Definition at line 47 of file int_init.c.

interp_params_t interp_table[3]

Initial value:

{
  { 5, 6, DPU_INTP_96_80_FILT_SIZE, (Fract *)sfIndx96_8 },
  {10, 9, DPU_INTP_72_80_FILT_SIZE, (Fract *)sfIndx72_8 },
  { 6, 5, DPU_INTP_80_96_FILT_SIZE, (Fract *)sfIndx8_96 }
}

Definition at line 52 of file int_init.c.

Referenced by dpu_interp_init().


FM: int_init.c Source File

int_init.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE:
00003  ******************************************************************************
00004  * FILE NAME:
00005  *
00006  * DESCRIPTION:
00007  *
00008  * TABS: NONE
00009  *
00010  * $Id: int_init.c 1.2 1998/05/20 17:31:29 ppatel Exp $
00011  *
00012  * REVISION HISTORY:
00013  *
00014  * $Log: int_init.c $
00015  * Revision 1.2  1998/05/20 17:31:29  ppatel
00016  *  Redefined interpolation constant type as a two dimensional array to
00017  * avoid wasting extra words (previously, the structure was sized with
00018  * worst case filter size) and related changes
00019  * Revision 1.1  1997/11/21 14:48:18  PPATEL
00020  * Initial revision
00021  *
00022  * (C) Copyright 1997, TELOGY Networks, Inc.
00023  *****************************************************************************/
00024
00025 #include <ti/mas/types/types.h>
00026 #include "dpu_tgt.h"
00027 #include "dpumath.h" /* for convolution */
00028 #include "dpu_intp.h"
00029 #include "int_init.h"
00030 #include "fmprag.h"
00031 #include "fm.h"
00032
00033 extern Fract *in_delay;
00034
00035 const Fract sfIndx8_96[6] =
00036 {
00037   0,0,1,2,3,4
00038 };
00039 const Fract sfIndx8_72[9] =
00040 {
00041   0,1,2,3,4,5,6,7,8
00042 };
00043 const Fract sfIndx72_8[10] =
00044 {
00045   0,0,1,2,3,4,5,6,7,8
00046 };
00047 const Fract sfIndx96_8[5] =
00048 {
00049   0,1,2,3,4
00050 };
00051
00052 interp_params_t interp_table[3]={
00053   { 5, 6, DPU_INTP_96_80_FILT_SIZE, (Fract *)sfIndx96_8 },
00054   {10, 9, DPU_INTP_72_80_FILT_SIZE, (Fract *)sfIndx72_8 },
00055   { 6, 5, DPU_INTP_80_96_FILT_SIZE, (Fract *)sfIndx8_96 }
00056 };
00057
00058 /******************************************************************************
00059  * FUNCTION PURPOSE: initialize TX interplator for 9600 Hz
00060  ******************************************************************************
00061  * DESCRIPTION: initialize TX interplator for 9600 Hz
00062  *
00063  *****************************************************************************/
00064
00065 void dpu_interp_init(dpu_interp_t *inst,int index)
00066 {
00067     int i;
00068
00069     inst->L1=interp_table[index].L1;
00070     inst->L2=interp_table[index].L2;
00071     inst->length=interp_table[index].length;
00072
00073     switch (index)
00074     {
00075       case DPU_INTP_96_80_INDEX:
00076         inst->filter = (Fract *)(fmContext.tablePtr->commonTable1Ptrs->hn_96_80_pt);
00077         break;
00078
00079       case DPU_INTP_72_80_INDEX:
00080         inst->filter = (Fract *)(fmContext.tablePtr->commonTable1Ptrs->hn_72_80_pt);
00081         break;
00082
00083       case DPU_INTP_80_96_INDEX:
00084         inst->filter = (Fract *)(fmContext.tablePtr->commonTable1Ptrs->hn_80_96_pt);
00085         break;
00086     }
00087
00088     inst->index_tab= (Fract *)interp_table[index].index_tab;
00089
00090     for (i=0; i<DPU_MAX_M; i++)
00091     {
00092       inst->oldin[i] =  0;
00093     }
00094 }
00095 /* Nothing after this point */
00096


FM: int_init.h File Reference

int_init.h File Reference

#include "dpu_intp.h"

Include dependency graph for int_init.h:

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

Go to the source code of this file.

Data Structures

struct | interp_params_t

Functions

void | dpu_interp_init (dpu_interp_t *inst, int index)

Function Documentation

void dpu_interp_init | ( | dpu_interp_t * | inst,
 |  | int | index
 | ) |  |

Definition at line 65 of file int_init.c.

References fmTablePtrs_t::commonTable1Ptrs, DPU_INTP_72_80_INDEX, DPU_INTP_80_96_INDEX, DPU_INTP_96_80_INDEX, DPU_MAX_M, dpu_interp_t::filter, fmContext, commonTable1_sPtrs_t::hn_72_80_pt, commonTable1_sPtrs_t::hn_80_96_pt, commonTable1_sPtrs_t::hn_96_80_pt, dpu_interp_t::index_tab, interp_table, interp_params_t::L1, dpu_interp_t::L1, interp_params_t::L2, dpu_interp_t::L2, interp_params_t::length, dpu_interp_t::length, dpu_interp_t::oldin, and fmContext_t::tablePtr.

Referenced by v21RxStNULLInit(), v27RxSt1Init(), v29RxSt1Init(), and vxx_tx_init().


FM: int_init.h Source File

int_init.h

Go to the documentation of this file.
00001 #ifndef INT_INIT_H
00002 #define INT_INIT_H
00003 /******************************************************************************
00004  * FILE PURPOSE:
00005  ******************************************************************************
00006  * FILE NAME:
00007  *
00008  * DESCRIPTION:
00009  *
00010  * TABS: NONE
00011  *
00012  * $Id: int_init.h 1.1 1997/11/21 14:48:19 PPATEL Exp $
00013  *
00014  * REVISION HISTORY:
00015  *
00016  * $Log: int_init.h $
00017  * Revision 1.1  1997/11/21 14:48:19  PPATEL
00018  * Initial revision
00019  *
00020  * (C) Copyright 1997, TELOGY Networks, Inc.
00021  *****************************************************************************/
00022
00023 #include "dpu_intp.h"
00024
00025 typedef struct {
00026   tint            L1;
00027   tint            L2;
00028   tint            length;
00029   const Fract     *index_tab;
00030 } interp_params_t;
00031
00032 void dpu_interp_init(dpu_interp_t *inst, int index);
00033
00034 #endif  /* _INT_INIT_H */
00035 /* nothing past this point */


FM: FM Integration

FM (Fax Modem) Package

FM Integration

Page Contents

  • XDC Build Process
  • Make Build Process
  • Linking FM with System

XDC Build Process

Required Tools

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

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

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

Windows Configuration

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

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

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

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

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

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

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

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

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

    rem # End of file

Linux Configuration

TBD

Compilation

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

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

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

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

The XDC environment provides several build options.

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

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

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

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

Make Build Process

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

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

Procedure

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

Required Tools:

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

Procedure:

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

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

Linking FM with System

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

  <WORK>/ti/mas/asm
               /hdlc
               /swtools
               /types
               /util
               /fm
               /iface
               /fract

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

Include Requirements

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

  1. #include <ti/mas/types/types.h>
  2. #include <ti/mas/fm/fm.h>
  3. #include <ti/mas/iface/iffax/iffax.h>

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

  1. -i <WORK>

Where WORK is the path to the working directory.

Compile Defines

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

  1. -Dti_targets_<xtarg>

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

Linking

The following libraries must be included in the final link:

  1. ti\mas\util\c<rtarg>\util_a.a<rtarg>
  2. ti\mas\util\c<rtarg>\util_c.a<rtarg>
  3. **ti\mas\hdlc\c<rtarg>\hdlc_a.a<rtarg>
  4. ti\mas\hdlc\c<rtarg>\hdlc_c.a<rtarg>
  5. ti\mas\util\c<rtarg>\fm_a.a<rtarg>
  6. ti\mas\util\c<rtarg>\fm_c.a<rtarg>

**Only required for C55x

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


FM: interp.c File Reference

interp.c File Reference

#include <ti/mas/types/types.h>
#include <ti/mas/fract/fract.h>
#include "dpu_tgt.h"
#include "dpumath.h"
#include "dpu_intp.h"
#include "dpu_fir.h"

Include dependency graph for interp.c:

Go to the source code of this file.

Functions

int dpu_interp (dpu_interp_t *inst, Fract *in, Fract *output, int length)

Function Documentation

int dpu_interp | ( | dpu_interp_t * | inst,
 |  | Fract * | in,
 |  | Fract * | output,
 |  | int | length
 | ) |  |

Definition at line 49 of file interp.c.

References convoluI(), dpu_interp_output(), dpu_interp_t::filter, dpu_interp_t::index_tab, dpu_interp_t::L1, dpu_interp_t::L2, dpu_interp_t::length, dpu_interp_t::oldin, and shift_data().

Referenced by dpu_rx_v21_init(), HSrxCommonSt1Init(), and vxx_tx_init().

Here is the call graph for this function:


FM: interp.c Source File

interp.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE:  Interpolation filters
00003  ******************************************************************************
00004  * FILE NAME:  interp.c
00005  *
00006  * DESCRIPTION: FIR Interpolation Filters
00007  *
00008  * TABS: NONE
00009  *
00010  * $Id: INTERP.C 1.9 1999/02/22 19:24:12 sakhtar Exp $
00011  *
00012  * REVISION HISTORY:
00013  *
00014  * $Log: INTERP.C $
00015  * Revision 1.9  1999/02/22 19:24:12  sakhtar
00016  * Modified for optimization
00017  * Revision 1.8  1999/02/11 11:22:43  sakhtar
00018  * Modified to cleanup and optimize
00019  * Revision 1.7  1998/05/20 17:31:28  ppatel
00020  *  Redefined interpolation constant type as a two dimensional array to
00021  * avoid wasting extra words (previously, the structure was sized with
00022  * worst case filter size) and related changes
00023  * Revision 1.6  1997/11/21 15:40:57  PPATEL
00024  *  Splitting of files for multi-channel fax build for GG 3.0
00025  * Revision 1.5  1997/09/05 20:48:55  PPATEL
00026  *    Inclusion of types.h and fract.h
00027  * Revision 1.4  1997/05/18 12:34:18  Zoran
00028  *  Cleaned, optimized code, little bit increased memory usage
00029  * Revision 1.2  1997/02/19 18:39:31  H.T.Li
00030  * Revision 1.1  1997/02/06 09:56:34  unknown
00031  * Initial revision
00032  *
00033  * (C) Copyright 1996, TELOGY Networks, Inc.
00034  *****************************************************************************/
00035 #include <ti/mas/types/types.h>
00036 #include <ti/mas/fract/fract.h>
00037
00038 #include "dpu_tgt.h"
00039 #include "dpumath.h" /* for convolution */
00040 #include "dpu_intp.h"
00041 #include "dpu_fir.h"
00042 /******************************************************************************
00043  * FUNCTION PURPOSE: interplator
00044  ******************************************************************************
00045  * DESCRIPTION:  interplator
00046  *
00047  *****************************************************************************/
00048
00049 int dpu_interp(dpu_interp_t *inst, Fract *in, Fract *output, int length)
00050  {
00051    dpu_interp_t Tmp;
00052    int count, h_1;                       /* Length minus 1 */
00053    Fract *input = in;                    /* New input */
00054
00055    /* initialize local variables */
00056    Tmp = *inst;
00057    count = 0;
00058    h_1 = Tmp.length - 1;
00059
00060    /* Copy input to common delay line */
00061    shift_data (&input[0],&inst->oldin[h_1],length - 1);
00062
00063    /* Calculate filter output and store it in output vector */
00064
00065   /* REPLACED BY ASM CODE */
00066
00067 #if 0
00068    for (n=0; n<length; n+=Tmp.L2)
00069    {
00070      n1 = n+h_1;    /* Prepare delay line base index */
00071      for (j=0; j<Tmp.L1; j++)
00072      {
00073        output[count++]=frctLF2F(convoluI(&Tmp.oldin[n1+Tmp.index_tab[j]],Tmp.filter+j*Tmp.length,h_1),28,14);
00074      }
00075    }
00076 #endif
00077
00078    dpu_interp_output(&Tmp,output,length);
00079
00080    /* Save the samples that are needed for next run */
00081    shift_data (&input[length - h_1],&Tmp.oldin[0],h_1 - 1);
00082
00083    return(count);
00084  }
00085
00086 /* Nothing after this point */
00087
00088
00089
00090
00091


FM: maniprx.c File Reference

maniprx.c File Reference

#include <string.h>
#include <ti/mas/types/types.h>
#include "dputxin.h"
#include "maniprx.h"

Include dependency graph for maniprx.c:

Go to the source code of this file.

Functions

int | dpu_rx_packet (dpu_outman_t *inst, Fract *input, Fract bits_per_baud, int bauds, tword *output_data)
int | dpu_rx_copy (dpu_outman_t *inst, Fract *byts)

Function Documentation

int dpu_rx_packet | ( | dpu_outman_t * | inst,
 |  | Fract * | input,
 |  | Fract | bits_per_baud,
 |  | int | bauds,
 |  | tword * | output_data
 | ) |  |

Definition at line 65 of file maniprx.c.

References dpu_outman_t::bit_index, DPU_DATA_OVER, DPU_MAX_WORD, dpu_outman_t::mask, dpu_outman_t::temp_data, dpu_outman_t::word_index, and dpu_outman_t::word_size.

Referenced by v21RxSt3Init(), v27RxSt8Init(), and v29RxSt8Init().

int dpu_rx_copy | ( | dpu_outman_t * | inst,
 |  | Fract * | byts
 | ) |  |

Definition at line 115 of file maniprx.c.

Referenced by dpu_rx_v21_init(), HSrxCommonSt1Init(), v27RxSt8Init(), and v29RxSt8Init().


FM: maniprx.c Source File

maniprx.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: data packing routines
00003  ******************************************************************************
00004  * FILE NAME:   maniprx.c
00005  *
00006  * DESCRIPTION:  pack bauds into words
00007  *
00008  * CAUTION:     This function assumes that the function calling dpuRx() has
00009  *              taken out all bytes in the buffer. The Fax Modem Driver does
00010  *              make sure that it takes all bytes from the buffer.
00011  *
00012  * TABS: NONE
00013  *
00014  * $Id: maniprx.c 1.10 1999/03/18 10:02:12 sakhtar Exp $
00015  *
00016  * REVISION HISTORY:
00017  *
00018  * $Log: maniprx.c $
00019  * Revision 1.10  1999/03/18 10:02:12  sakhtar
00020  * Revert to 1.7.1.1 and optimize it. dpu_rx_copy() is not used
00021  * Revision 1.7.1.1  1999/03/17 10:39:58  sakhtar
00022  * Fixed a problem at runtime. We now use the original algorithm
00023  * Revision 1.8  1999/03/02 09:31:49  sakhtar
00024  * Modified to use the same algorithm that I used in the .S file. Now
00025  * we can update the .S file easily and manage it as well.
00026  * Revision 1.7  1999/03/01 21:18:33  sakhtar
00027  * Modified for optimization and rewritten the function.
00028  * Revision 1.6  1999/03/01 19:07:50  sakhtar
00029  * Modified the API of procrx(), copy_fcn(), and data_fcn() to oombine
00030  * the functionality of dpu_rx_copy() into dpu_rx_packet()
00031  * Revision 1.5  1999/02/19 16:10:23  sakhtar
00032  * Modified for optimization
00033  * Revision 1.4  1999/02/19 15:57:27  sakhtar
00034  * Removed dpu_rx_copy() function which has been moved to
00035  * assembly
00036  * Revision 1.3  1999/02/10 19:00:58  sakhtar
00037  * Modified for cleanup and optimization
00038  * Revision 1.2  1998/01/30 14:32:12  PPATEL
00039  *  Fix for the BRAF problem
00040  * Revision 1.1  1997/11/21 14:48:19  PPATEL
00041  * Initial revision
00042  *
00043  * (C) Copyright 1997, TELOGY Networks, Inc.
00044  *****************************************************************************/
00045
00046 #include <string.h>
00047
00048  /* System level header files */
00049 #include <ti/mas/types/types.h>
00050
00051 /* DPU TX In Data Maipulation header file */
00052 #include "dputxin.h"
00053 #include "maniprx.h"
00054
00055 #ifdef BRAF_BUG
00056 #include "utilnum.h"
00057 #endif
00058
00059 /******************************************************************************
00060  * FUNCTION PURPOSE:  packet an output data from RX instance buffer.
00061  ******************************************************************************
00062  * DESCRIPTION:  packet an output data from RX instance buffer.
00063  *             NOTE: assume TYP_TWORD_SIZE > bits_per_baud
00064  *****************************************************************************/
00065 int dpu_rx_packet(dpu_outman_t *inst, Fract *input, Fract bits_per_baud, int bauds, tword *output_data)
00066 {
00067   int bit_index = inst->bit_index;
00068   int word_index = inst->word_index;
00069   int i, tmp_int, mask = inst->mask, j;
00070
00071   for (i=0; i<bauds; i++)
00072   {
00073 #ifdef BRAF_BUG
00074    utlDummy();
00075 #endif
00076    tmp_int = inst->word_size - bit_index - bits_per_baud;
00077    if (tmp_int >= 0)
00078    {
00079      inst->temp_data =  ((inst->temp_data << bits_per_baud)
00080                                  | input[i]) ;
00081      bit_index += bits_per_baud;
00082      if (bit_index == inst->word_size)
00083      {
00084        bit_index = 0;
00085      output_data[word_index++] = (inst->temp_data & mask);
00086        if (word_index  == DPU_MAX_WORD)
00087         return(DPU_DATA_OVER);
00088      }
00089
00090    }
00091    else
00092    {
00093     if ((word_index + 1) == DPU_MAX_WORD)
00094       return(DPU_DATA_OVER);
00095     j = (bits_per_baud+tmp_int);
00096     inst->temp_data = ((inst->temp_data << j)
00097                                  | (input[i] >> -tmp_int)) ;
00098   output_data[word_index++] = (inst->temp_data & mask);
00099     bit_index = (-tmp_int);
00100     inst->temp_data = input[i];
00101    }
00102   }
00103   inst->bit_index = bit_index;
00104   inst->word_index = word_index;
00105
00106   return(DPU_DATA_OK);
00107 }
00108
00109 /******************************************************************************
00110  * FUNCTION PURPOSE:  copy new output data from RX instance buffer.
00111  ******************************************************************************
00112  * DESCRIPTION:  copy new output data from RX instance buffer.
00113  *
00114  *****************************************************************************/
00115 int dpu_rx_copy (dpu_outman_t *inst, Fract *byts)
00116 {
00117   return ((int)0);
00118 }
00119
00120 /* nothing past this point */


FM: maniprx.h File Reference

maniprx.h File Reference

#include "dputxin.h"

Include dependency graph for maniprx.h:

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

Go to the source code of this file.

Functions

int | dpu_rx_copy (dpu_outman_t *inst, Fract *byts)
int | dpu_rx_packet (dpu_outman_t *inst, Fract *input, Fract bts_per_baud, int bauds, tword *output_data)

Function Documentation

int dpu_rx_copy | ( | dpu_outman_t * | inst,
 |  | Fract * | byts
 | ) |  |

Definition at line 115 of file maniprx.c.

Referenced by dpu_rx_v21_init(), HSrxCommonSt1Init(), v27RxSt8Init(), and v29RxSt8Init().

int dpu_rx_packet | ( | dpu_outman_t * | inst,
 |  | Fract * | input,
 |  | Fract | bts_per_baud,
 |  | int | bauds,
 |  | tword * | output_data
 | ) |  |

Definition at line 65 of file maniprx.c.

References dpu_outman_t::bit_index, DPU_DATA_OVER, DPU_MAX_WORD, dpu_outman_t::mask, dpu_outman_t::temp_data, dpu_outman_t::word_index, and dpu_outman_t::word_size.

Referenced by v21RxSt3Init(), v27RxSt8Init(), and v29RxSt8Init().


FM: maniprx.h Source File

maniprx.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE:
00003  ******************************************************************************
00004  * FILE NAME:
00005  *
00006  * DESCRIPTION:
00007  *
00008  * TABS: NONE
00009  *
00010  * $Id: maniprx.h 1.3 1999/03/15 10:50:44 sakhtar Exp $
00011  *
00012  * REVISION HISTORY:
00013  *
00014  * $Log: maniprx.h $
00015  * Revision 1.3  1999/03/15 10:50:44  sakhtar
00016  * New API of data_fcn
00017  * Revision 1.2  1999/03/01 19:07:56  sakhtar
00018  * Modified the API of procrx(), copy_fcn(), and data_fcn() to oombine
00019  * the functionality of dpu_rx_copy() into dpu_rx_packet()
00020  * Revision 1.1  1997/11/21 14:48:19  PPATEL
00021  * Initial revision
00022  *
00023  * (C) Copyright 1997, TELOGY Networks, Inc.
00024  *****************************************************************************/
00025 #include "dputxin.h"
00026
00027 int dpu_rx_copy (dpu_outman_t *inst,Fract *byts);
00028
00029 int dpu_rx_packet (dpu_outman_t *inst, Fract *input,
00030                    Fract bts_per_baud, int bauds, tword *output_data);
00031
00032 /* nothing past this point */


FM: Performance

FM (Fax Modem) Package

Performance

  • C64x+ Data Sheet
  • C55x Data Sheet


FM: Module Index

FM Modules

Here is a list of all modules:
  • FM External API
    • Return Error Codes
    • Fax Debug Mode
    • FM Debug message types for debugInfo()
    • FM Feature register


FM: Page Index

FM Related Pages

Here is a list of all related documentation pages:
  • C55x Data Sheet
  • C64x+ Data Sheet
  • History
  • Disclaimer


FM: procrx.c File Reference

procrx.c File Reference

#include <ti/mas/types/types.h>
#include <stdlib.h>
#include "dpuloc.h"
#include "v17.h"

Include dependency graph for procrx.c:

Go to the source code of this file.

Defines

#define | HS_TEST 0
#define | CONST_TEST 0
#define | TEST_DESCR 0

Functions

void | vHSRx (void *Inst, Fract *input_data, Fract *x_sym, Fract *y_sym, int index, tword *output_data)

Define Documentation

#define HS_TEST 0

Definition at line 73 of file procrx.c.

#define CONST_TEST 0

Definition at line 75 of file procrx.c.

#define TEST_DESCR 0

Definition at line 76 of file procrx.c.

Function Documentation

void vHSRx | ( | void * | Inst,
 |  | Fract * | input_data,
 |  | Fract * | x_sym,
 |  | Fract * | y_sym,
 |  | int | index,
 |  | tword * | output_data
 | ) |  |

Definition at line 118 of file procrx.c.

References dpuRxInst_t::cddet_fcn, dpuRxInst_t::cddet_inst, dpuRxInst_t::change_det, dpuInst_s::RxInst, and dpuRxInst_t::samp_per_baud.

Referenced by HSrxCommonSt1Init().


FM: procrx.c Source File

procrx.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE:
00003  ******************************************************************************
00004  * FILE NAME:
00005  *
00006  * DESCRIPTION:
00007  *
00008  * TABS: NONE
00009  *
00010  * $Id: procrx.c 1.19  2002/07/23 14:37:30  Aravind B R Exp $
00011  *
00012  * REVISION HISTORY:
00013  *
00014  * $Log: procrx.c $
00015  * Revision 1.19  2002/07/23 14:37:30  Aravind B R
00016  * Simplified the logic to handle frame slip/insertion problem only if
00017  * SNR reported is greater than 27dB and frame slip logic (fsl) bit is set
00018  * Revision 1.18  2002/07/19 14:37:30  Aravind B R
00019  * Added a logic to handle frame slip/insertion problem only if
00020  * SNR reported is greater than 28dB and frame slip logic (fsl) bit
00021  * is enabled in dpuBitMap Register (bit 0).
00022  * Revision 1.17  2001/10/12    aravind
00023  * Added a logic to fix the sample slip/insertion problem
00024  * Revision 1.16  2000/03/24 12:38:54  sakhtar
00025  * Bug fixes
00026  * Revision 1.15  2000/03/23 20:25:53  jwright
00027  * Final (?) compile bugs removed due to 3.50 tools warning cleanup
00028  * Revision 1.14  2000/03/21 22:41:29  jwright
00029  * Clear up 3.50 compile warnings.
00030  * Revision 1.13  1999/03/15 10:50:14  sakhtar
00031  * Revert to 1.11. New API of data_fcn
00032  * Revision 1.11  1999/03/01 19:08:15  sakhtar
00033  * Modified the API of procrx(), copy_fcn(), and data_fcn() to oombine
00034  * the functionality of dpu_rx_copy() into dpu_rx_packet()
00035  * Revision 1.10  1999/02/24 17:11:24  sakhtar
00036  * Same as version 1.8. Revert earlier changes since in V.21
00037  * the status of the data_fcn is used.
00038  * Revision 1.8  1999/02/19 15:25:06  sakhtar
00039  * Revision 1.7  1999/02/19 15:03:46  sakhtar
00040  * Modified for simulation
00041  * Revision 1.6  1999/02/04 13:48:12  sakhtar
00042  * Modified for simulation using the Tiger card
00043  * Revision 1.5  1998/05/12 17:53:22  ppatel
00044  *  Removal of phase_fcn call (which was not compiled in the previous files)
00045  * Revision 1.4  1998/04/30 17:14:43  ppatel
00046  *  Changes for reporting modem status (timing offset, carrier freq offset,
00047  * snr, etc.)
00048  * Revision 1.3  1998/01/30 14:18:17  PPATEL
00049  *  debugging code organized properly.
00050  * Revision 1.2  1998/01/21 00:07:17  PPATEL
00051  *  bit error rate testing code now through a function call. Actual code
00052  * in in bert.c.
00053  * Revision 1.1  1997/11/21 14:48:20  PPATEL
00054  * Initial revision
00055  *
00056  * (C) Copyright 1997, TELOGY Networks, Inc.
00057  *****************************************************************************/
00058
00059 #include <ti/mas/types/types.h>
00060 #include <stdlib.h>
00061 #include "dpuloc.h"
00062 #include "v17.h"
00063
00064 /******************************************************************************
00065  * Subroutine:  V29 RX Routine
00066  ******************************************************************************
00067  * SUBROUTINE NAME: v29Rx
00068  *
00069  * DESCRIPTION: Processing routine for V.29 RX Mode
00070  *
00071  * API:         RxInst - receive instance
00072  *****************************************************************************/
00073 #define HS_TEST 0
00074
00075 #define CONST_TEST 0
00076 #define TEST_DESCR 0
00077
00078 #if TEST_DESCR
00079 #include "v17.h"
00080 #define TEST_DESCR_SIZE 1024
00081 int TEST_DESCR_INDX = 0;
00082 int TEST_DESCR_BUF[TEST_DESCR_SIZE];
00083 #endif
00084
00085 #if (SIMC54X || SIMC55X)
00086 void sim_compute_cksum (Fract *X,Fract *Y);
00087 #endif
00088
00089 #if CONST_TEST
00090 #define CONST_TEST_SIZE 1024
00091 int CONST_INDX = 0;
00092 Fract CONST_RE_BUF[CONST_TEST_SIZE];
00093 Fract CONST_IM_BUF[CONST_TEST_SIZE];
00094 #endif
00095
00096 #if HS_TEST
00097 #define HS_TEST_SIZE 1024
00098 int DPU_RAW_INPUT_BUF[HS_TEST_SIZE];
00099 int DPU_RAW_INPUT_MAX=0;
00100 int DPU_RAW_INPUT_BUF_INDX=0;
00101
00102 int DPU_AGC_OUT_BUF[HS_TEST_SIZE];
00103 int DPU_AGC_OUT_MAX=0;
00104 int DPU_AGC_OUT_BUF_INDX=0;
00105
00106 int DPU_TREC_OUT_BUF[HS_TEST_SIZE];
00107 int DPU_TREC_OUT_MAX=0;
00108 int DPU_TREC_OUT_BUF_INDX=0;
00109
00110 int DPU_HILB_OUT_RE_BUF[HS_TEST_SIZE];
00111 int DPU_HILB_OUT_RE_MAX=0;
00112 int DPU_HILB_OUT_IM_BUF[HS_TEST_SIZE];
00113 int DPU_HILB_OUT_IM_MAX=0;
00114 int DPU_HILB_OUT_RE_BUF_INDX=0;
00115
00116 int temp_index;
00117 #endif
00118 void vHSRx(void *Inst, Fract *input_data, Fract *x_sym, Fract *y_sym, int index, tword *output_data)
00119 {
00120   dpuRxInst_t *RxInst;     /* RX Instance pointer */
00121   Fract input_bits;          /* To store locally input bits */
00122   Fract x_point;           /* To store locally const. point */
00123   Fract y_point;
00124   dpuInst_t *Instl = Inst;  /* cast locally dpu Instance pointer */
00125   int  dot_det, n;
00126   Fract out_re[8], out_im[8], phase, t1, t2;
00127   Fract *input;
00128   Fract output[2];
00129   int   cd_loss_det;
00130   tint   dummy;
00131   Fract unquantized_x, unquantized_y;
00132   LFract SignalPow,NoisePow;
00133
00134   RxInst = &Instl->RxInst;  /* Store locally RX instance pointer */
00135   x_point = *x_sym;         /* transfer input to locals */
00136   y_point = *y_sym;
00137
00138   /* initialize phase, to eliminate BUG */
00139   phase = 0;
00140
00141 /* TESTESTESTESTESTESTESTESTESTESTESTESTESTESTESTEST */
00142 #if HS_TEST
00143  { Fract i,j;
00144 temp_index = index* RxInst->samp_per_baud;
00145   for (j= temp_index,i=0;i<RxInst->samp_per_baud;i++,j++)
00146   {
00147     DPU_RAW_INPUT_BUF_INDX &= (HS_TEST_SIZE-1);
00148     if ((DPU_RAW_INPUT_BUF[DPU_RAW_INPUT_BUF_INDX] = input_data[j]) > DPU_RAW_INPUT_MAX)
00149     {
00150       DPU_RAW_INPUT_MAX = input_data[j];
00151     }
00152     DPU_RAW_INPUT_BUF_INDX++;
00153
00154   }
00155  }
00156 #endif
00157 /* TESTESTESTESTESTESTESTESTESTESTESTESTESTESTESTEST */
00158   /*     Carrier Loss detection     */
00159   if (RxInst->cddet_fcn != NULL)
00160   {
00161       cd_loss_det=(*RxInst->cddet_fcn)( &RxInst->cddet_inst, input_data,
00162                RxInst->samp_per_baud, index, NULL, &dummy );
00163       RxInst->change_det = cd_loss_det;
00164   }
00165   /*     AGC     */
00166   if (RxInst->agc_fcn != NULL)
00167       (*RxInst->agc_fcn)( &RxInst->agc_inst, input_data,
00168                           RxInst->samp_per_baud, index);
00169   /* TESTESTESTESTESTESTESTESTESTESTESTESTESTESTESTEST */
00170 #if HS_TEST
00171   {Fract i,j;
00172   for (j=temp_index,i=0;i<RxInst->samp_per_baud;i++,j++)
00173   {
00174     DPU_AGC_OUT_BUF_INDX &= (HS_TEST_SIZE-1);
00175     if ((DPU_AGC_OUT_BUF[DPU_AGC_OUT_BUF_INDX] = input_data[j]) > DPU_AGC_OUT_MAX)
00176     {
00177       DPU_AGC_OUT_MAX = input_data[j];
00178     }
00179     DPU_AGC_OUT_BUF_INDX++;
00180   }
00181   }
00182 #endif
00183 /* TESTESTESTESTESTESTESTESTESTESTESTESTESTESTESTEST */
00184   if (RxInst->trec_fcn != NULL)
00185   {
00186     (*RxInst->trec_fcn)( &RxInst->trec_inst, input_data,
00187                RxInst->samp_per_baud, index,Instl->TablePtr->commonTable2Ptrs);
00188     input = RxInst->trec_inst.output;
00189     n = 0;
00190   }
00191 /* TESTESTESTESTESTESTESTESTESTESTESTESTESTESTESTEST */
00192 #if HS_TEST
00193   { Fract i,j;
00194   for (j=temp_index,i=0;i<RxInst->samp_per_baud;i++,j++)
00195   {
00196     DPU_TREC_OUT_BUF_INDX &= (HS_TEST_SIZE-1);
00197     if ((DPU_TREC_OUT_BUF[DPU_TREC_OUT_BUF_INDX] = input[i]) > DPU_TREC_OUT_MAX)
00198     {
00199         DPU_TREC_OUT_MAX = input[i];
00200     }
00201     DPU_TREC_OUT_BUF_INDX++;
00202   }
00203   }
00204 #endif
00205 /* TESTESTESTESTESTESTESTESTESTESTESTESTESTESTESTEST */
00206
00207   RxInst->trec_inst.index = 0;
00208   while (RxInst->trec_inst.count >= RxInst->samp_per_baud)
00209   {
00210     RxInst->trec_inst.count -= RxInst->samp_per_baud;
00211     RxInst->trec_inst.index = 1;
00212     /* dotting detector */
00213     if (RxInst->dotdet_fcn != NULL)
00214     {
00215         dot_det=(*RxInst->dotdet_fcn)( &RxInst->dotdet_inst, input,
00216                  RxInst->samp_per_baud, n, &RxInst->agc_inst.gain,
00217                  &Instl->sts.rx_level );
00218         RxInst->change_det=dot_det;
00219     }
00220     /* BP Hilbert transformer */
00221     if (RxInst->bphilb_fcn != NULL)
00222        (*RxInst->bphilb_fcn)( &RxInst->bphilb_inst, input, out_re,
00223                  out_im, RxInst->samp_per_baud, n);
00224     /* TESTESTESTESTESTESTESTESTESTESTESTESTESTESTESTEST */
00225 #if HS_TEST
00226 { Fract i,j;
00227   for (j=temp_index,i=0;i<RxInst->samp_per_baud;i++,j++)
00228   {
00229     DPU_HILB_OUT_RE_BUF_INDX &= (HS_TEST_SIZE-1);
00230     if ((DPU_HILB_OUT_RE_BUF[DPU_HILB_OUT_RE_BUF_INDX] = out_re[n]) > DPU_HILB_OUT_RE_MAX)
00231     {
00232         DPU_HILB_OUT_RE_MAX = out_re[n];
00233     }
00234     if ((DPU_HILB_OUT_IM_BUF[DPU_HILB_OUT_RE_BUF_INDX] = out_im[n]) > DPU_HILB_OUT_IM_MAX)
00235     {
00236         DPU_HILB_OUT_IM_MAX = out_im[n];
00237     }
00238     DPU_HILB_OUT_RE_BUF_INDX++;
00239   }
00240 }
00241 #endif
00242 /* TESTESTESTESTESTESTESTESTESTESTESTESTESTESTESTEST */
00243
00244     /* Adaptive equalizer */
00245     if (RxInst->adeq_fcn != NULL)
00246        (*RxInst->adeq_fcn)( &RxInst->adeq_inst, out_re, out_im, x_sym,
00247                            y_sym, RxInst->samp_per_baud, index);
00248
00249
00250     /* Demodulator */
00251     if (RxInst->demod_fcn != NULL)
00252        (*RxInst->demod_fcn)( &RxInst->mod_inst, &x_sym[index],
00253                            &y_sym[index]);
00254
00255 #if (SIMC54X || SIMC55X)    /* SimulationTest */
00256     sim_compute_cksum (&x_sym[index],&y_sym[index]);
00257 #endif
00258
00259 #if CONST_TEST
00260 CONST_INDX++;
00261 CONST_INDX &= CONST_TEST_SIZE-1;
00262 CONST_RE_BUF[CONST_INDX] = x_sym[index];
00263 CONST_IM_BUF[CONST_INDX] = y_sym[index];
00264 #endif
00265
00266     unquantized_x = x_sym[index];
00267     unquantized_y = y_sym[index];
00268
00269     /* Slicer */
00270     if (RxInst->slic_fcn != NULL)
00271     {
00272
00273       (*RxInst->slic_fcn)(&RxInst->slic_inst, &x_sym[index], &y_sym[index],
00274                       &input_bits,
00275                       &phase,
00276                       Instl->TablePtr->v29TablePtrs->dpu_slic_pt_V29_72_pt,
00277                       Instl->TablePtr->v27TablePtrs->dpu_slic_pt_V27_48_pt,
00278                       Instl->TablePtr->v27TablePtrs->dpu_slic_pt_V27_24_pt,
00279                       Instl->TablePtr->v17TablePtrs->dpu_PN_smap_table_v17_AllRates_pt,
00280                       Instl->TablePtr->v17TablePtrs->dpu_slic_invmod_v17_pt);
00281
00282      /*---------------------------------------------------*/
00283      /* Logic to handle the sample slip/insertion problem */
00284      /*---------------------------------------------------*/
00285     if ( dpu_READ_FSL_ENABLE((RxInst->fsl_bitfield)) == TRUE) {
00286
00287          RxInst->freeze_count--;
00288          if (RxInst->freeze_count < 0)  /* decrement freeze_count and */
00289            RxInst->freeze_count = 0;    /* limit to zero              */
00290
00291          /* If phase error is greater than threshold, freeze equalizer and
00292             carrier recovery updates. */
00293          if (abs(phase) > (RxInst->phase_err_mul * RxInst->mod_inst.max_error)) {
00294            dpu_SET_FSL_DETECTED((RxInst->fsl_bitfield), TRUE);
00295            RxInst->freeze_count = DPU_SS_SI_FREEZE_BAUDCNT;
00296        Instl->sts.fslAdjCnt++;
00297          }
00298          if (RxInst->freeze_count > 0)
00299            phase = 0;
00300     }
00301
00302       /* Update Adaptive equalizer, if the freeze_count is 0 */
00303       if ((RxInst->update_adeq_fcn != NULL) && (RxInst->freeze_count == 0))
00304           (*RxInst->update_adeq_fcn)( &RxInst->adeq_inst, RxInst->slic_inst.x_error,
00305                                        RxInst->slic_inst.y_error, RxInst->mod_inst.cosfn,
00306                                        RxInst->mod_inst.sinfn );
00307     }
00308     else
00309     {
00310       /* RX's tx part */
00311       input_bits = 0xff;
00312       /* Scrambler function */
00313       if (RxInst->scr_fcn != NULL)
00314         (*RxInst->scr_fcn) (&RxInst->scr_inst, &input_bits);
00315       /* Symbol mapping Function */
00316       if (RxInst->smap_fcn != NULL)
00317         (*RxInst->smap_fcn) (&RxInst->smap_inst, &input_bits, &x_point,
00318                        &y_point,RxInst->rx_count );
00319
00320         /* phase error calculator  */
00321         if (RxInst->err_phase_fcn != NULL)
00322            (*RxInst->err_phase_fcn)( &RxInst->phase_inst, &x_point, &y_point,
00323              x_sym[index], y_sym[index], &phase, &RxInst->smap_inst.pre_symbol,Instl->TablePtr->v17TablePtrs->dpu_slic_invmod_v17_pt);
00324
00325         /* Update Adaptive equalizer */
00326         if (RxInst->update_adeq_fcn != NULL)
00327         {
00328            t1 = x_point-x_sym[index];
00329            t2 = y_point-y_sym[index];
00330            (*RxInst->update_adeq_fcn)( &RxInst->adeq_inst, t1, t2,
00331              RxInst->mod_inst.cosfn, RxInst->mod_inst.sinfn );
00332         }
00333 #if 0
00334       }
00335 #endif
00336     }
00337
00338     /* Update SNR information when in data mode */
00339     if ((RxInst->rx_state == DPU_V17_RX_ST8) ||
00340         (RxInst->rx_state == DPU_V27_RX_ST8) ||
00341         (RxInst->rx_state == DPU_V29_RX_ST8))   {
00342        dpuUpdateSNRparms(&RxInst->slic_inst);
00343
00344        /* After 1000 bauds use the SNR information to enable/disable frame slip
00345           detection logic. */
00346        if ((abs(RxInst->rx_count) > 1000) &&
00347           (! RxInst->cddet_inst.carrLossPendingFlag)) {
00348
00349           /* If SNR > 27 db and feature is enabled --> frame slip detection
00350              and correction is enabled */
00351           SignalPow = Instl->RxInst.slic_inst.avgSignalPow >> 9;
00352           NoisePow  = Instl->RxInst.slic_inst.avgNoisePow;
00353           if ( (SignalPow > NoisePow) && (Instl->cfg.DPUfeatureBitMap & DPU_FEATURE_FLC_ENABLE_MASK) )
00354               dpu_SET_FSL_ENABLE((RxInst->fsl_bitfield), TRUE);
00355        }
00356     }
00357
00358     /* Carrier recovery */
00359     if (RxInst->crec_fcn != NULL)
00360       (*RxInst->crec_fcn)( &RxInst->mod_inst, &phase, &Instl->sts.carr_offset);
00361
00362     /* Convolutional Decoder (Viterbi Algorithm) */
00363     if (RxInst->cdec_fcn != NULL)
00364       (*RxInst->cdec_fcn)( &RxInst->cdec_inst, unquantized_x, unquantized_y,
00365                            &input_bits);
00366
00367     /* Differential Decoder */
00368     if (RxInst->ddec_fcn!=NULL)
00369       (*RxInst->ddec_fcn)(&RxInst->ddec_inst, &input_bits);
00370     /* Descrambler */
00371
00372 #if TEST_DESCR
00373 if (RxInst->rx_state == DPU_V17_RX_ST3)
00374 {
00375     TEST_DESCR_INDX = -1;
00376 }
00377 #endif
00378
00379     if (RxInst->descr_fcn!=NULL)
00380     {
00381       (*RxInst->descr_fcn)(&RxInst->descr_inst, &input_bits);
00382
00383 #if TEST_DESCR
00384 /*TEST_DESCR_INDX &= TEST_DESCR_SIZE -1;*/
00385 if (TEST_DESCR_INDX < TEST_DESCR_SIZE-1){
00386 TEST_DESCR_INDX++;
00387 TEST_DESCR_BUF[TEST_DESCR_INDX] = input_bits;
00388 }
00389 #endif
00390
00391     }
00392     /* Transfer output */
00393     RxInst->rx_count++;
00394     output[n] = input_bits;
00395     n++;
00396   } /* while loop */
00397   /* output data manipulation */
00398   if (RxInst->data_fcn != NULL)
00399   {
00400     (*RxInst->data_fcn)(&RxInst->outman_inst, output,
00401                                        RxInst->bts_per_baud, n,output_data);
00402   }
00403
00404 }
00405 /* Nothing after this point */


FM: procrx.h File Reference

procrx.h File Reference

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

Include dependency graph for procrx.h:

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

Go to the source code of this file.

Functions

void vHSRx (void *Inst, Fract *input, Fract *x_ideal, Fract *y_ideal, int index, tword *output_data)

Function Documentation

void vHSRx | ( | void * | Inst,
 |  | Fract * | input,
 |  | Fract * | x_ideal,
 |  | Fract * | y_ideal,
 |  | int | index,
 |  | tword * | output_data
 | ) |  |

Definition at line 118 of file procrx.c.

References dpuRxInst_t::cddet_fcn, dpuRxInst_t::cddet_inst, dpuRxInst_t::change_det, dpuInst_s::RxInst, and dpuRxInst_t::samp_per_baud.

Referenced by HSrxCommonSt1Init().


FM: procrx.h Source File

procrx.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE:
00003  ******************************************************************************
00004  * FILE NAME:
00005  *
00006  * DESCRIPTION:
00007  *
00008  * TABS: NONE
00009  *
00010  * $Id: procrx.h 1.4 1999/03/01 19:08:04 sakhtar Exp $
00011  *
00012  * REVISION HISTORY:
00013  *
00014  * $Log: procrx.h $
00015  * Revision 1.4  1999/03/01 19:08:04  sakhtar
00016  * Modified the API of procrx(), copy_fcn(), and data_fcn() to oombine
00017  * the functionality of dpu_rx_copy() into dpu_rx_packet()
00018  * Revision 1.3  1999/02/24 17:13:15  sakhtar
00019  * Revert to version 1.1 since the change made was causing a
00020  * problem in V.21
00021  * Revision 1.1  1997/11/21 14:48:20  PPATEL
00022  * Initial revision
00023  *
00024  * (C) Copyright 1997, TELOGY Networks, Inc.
00025  *****************************************************************************/
00026 #include <ti/mas/types/types.h>
00027
00028
00029 void vHSRx(void *Inst,
00030            Fract *input,
00031            Fract *x_ideal,
00032            Fract *y_ideal, int index, tword *output_data);
00033
00034 /* nothing past this point */


FM: History

History

Revision History

Version | Comments
1.0.0.0 | Initial Version


FM: scr.c File Reference

scr.c File Reference

#include <stdlib.h>
#include <ti/mas/types/types.h>
#include "dpu_scr.h"
#include "fmprag.h"

Include dependency graph for scr.c:

Go to the source code of this file.

Defines

#define | V27_SCR_DEBUG 0

Functions

void | dpu_scr (dpu_scr_t *scr_ptr, Fract *bits)
void | dpu_PN_gen (dpu_scr_t *scr_ptr, Fract *bits)
void | dpu_scr_v27 (dpu_scr_t *scr_ptr, Fract *bits)
void | dpu_scr_init (dpu_scr_t *scr_ptr, int num_of_bits, tulong init_pattern, Fract shift1, Fract shift2, const Fract *pn_table)

Define Documentation

#define V27_SCR_DEBUG 0

Definition at line 157 of file scr.c.

Function Documentation

void dpu_scr | ( | dpu_scr_t * | scr_ptr,
 |  | Fract * | bits
 | ) |  |

Definition at line 68 of file scr.c.

References dpu_scr_t::mask, dpu_scr_t::num_of_bits, dpu_scr_t::scr_delay, dpu_scr_t::shift1, and dpu_scr_t::shift2.

Referenced by v29TxSt3Init().

void dpu_PN_gen | ( | dpu_scr_t * | scr_ptr,
 |  | Fract * | bits
 | ) |  |

Definition at line 111 of file scr.c.

References dpu_scr_t::mask, dpu_scr_t::num_of_bits, dpu_scr_t::pn_table, dpu_scr_t::scr_delay, dpu_scr_t::shift1, and dpu_scr_t::shift2.

Referenced by v29RxSt4Init(), and v29TxSt2Init().

void dpu_scr_v27 | ( | dpu_scr_t * | scr_ptr,
 |  | Fract * | bits
 | ) |  |

Definition at line 169 of file scr.c.

References dpu_scr_t::counter, dpu_scr_t::mask, dpu_scr_t::next_bit, dpu_scr_t::num_of_bits, dpu_scr_t::scr_delay, V27_TAP1, and V27_TAP2.

Referenced by v27RxSt4Init(), and v27TxSt3Init().

void dpu_scr_init | ( | dpu_scr_t * | scr_ptr,
 |  | int | num_of_bits,
 |  | tulong | init_pattern,
 |  | Fract | shift1,
 |  | Fract | shift2,
 |  | const Fract * | pn_table
 | ) |  |

Definition at line 267 of file scr.c.

References dpu_scr_t::counter, dpu_scr_t::mask, dpu_scr_t::next_bit, dpu_scr_t::num_of_bits, dpu_scr_t::pn_table, dpu_scr_t::scr_delay, dpu_scr_t::shift1, and dpu_scr_t::shift2.

Referenced by v27RxSt4Init(), v27TxSt3Init(), v27TxSt4Init(), v29RxSt4Init(), v29TxSt2Init(), and v29TxSt3Init().


FM: scr.c Source File

scr.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: DPU scrambler routines
00003  ******************************************************************************
00004  * FILE NAME:   dpu_scr.c
00005  *
00006  * DESCRIPTION: DPU scrambler routines in C
00007  *
00008  * REQUIRES:    types.h (generic data types)
00009  *              dpu.h (all the data structures required by DPU)
00010  *
00011  * TABS: NONE
00012  *
00013  * $Id: SCR.C 1.5 2000/03/23 13:22:15 sakhtar Exp $
00014  *
00015  * REVISION HISTORY:
00016  *
00017  * $Log: SCR.C $
00018  * Revision 1.5  2000/03/23 13:22:15  sakhtar
00019  * Modified to add debug code to capture IO of the scrambler
00020  * Revision 1.3  1999/04/01 15:14:30  sakhtar
00021  * Removed unused buffers
00022  * Revision 1.2  1997/05/18 12:19:55  Zoran
00023  *   Tables have const declarations
00024  * Revision 1.1  1997/02/06 10:15:52  unknown
00025  * Initial revision
00026  *
00027  * (C) Copyright 1996, TELOGY Networks, Inc.
00028  *****************************************************************************/
00029
00030
00031 #include <stdlib.h>
00032 #ifdef PC
00033 #include <stdio.h>
00034 #include <math.h>
00035 #endif
00036 #include <ti/mas/types/types.h>
00037
00038 #include "dpu_scr.h"
00039 #include "fmprag.h"
00040
00041 /******************************************************************************
00042  * Subroutine:  1 + x**-s1 + x**-s2 scrambler routine
00043  ******************************************************************************
00044  * SUBROUTINE NAME: dpu_scr
00045  *
00046  * DESCRIPTION: Scrambler with polynomial: 1 + x**-s1 + x**-s2.
00047  *              The scrambler shift register -  scr_delay has data
00048  *              positioned as LSBs with the LSB being last in time.
00049  *
00050  * API:    *scr_ptr - points to the scrambler definition structure
00051  *              ulong scr_delay - delay line of the scrambler
00052  *              uint  num_of_bits - number of bits to be scrambled
00053  *              uint  mask - output bit mask
00054  *              int   shift1 - s1 for the scrambling polynomial
00055  *              int   shift2 - s2 for the scrambling polynomial
00056  *              int   counter - counter used for detect. V.27 rep. pattern
00057  *              int   next_bit - flag used for detect. V.27 repeat. pattern
00058  *
00059  *         *bits - pointer to location where input bits are stored as
00060  *                 num_of_bits LSBs. The scrambler will put the output
00061  *                 at the same place.
00062  *
00063  * TABS: NONE
00064  *
00065  * (C) Copyright 1996, TELOGY Networks, Inc.
00066  *****************************************************************************/
00067
00068 void dpu_scr(dpu_scr_t *scr_ptr, Fract *bits)
00069 {
00070   int temp1,temp2;
00071
00072   /* Shift delay line and XOR with input bits */
00073   temp1 = (int) (scr_ptr->scr_delay >> scr_ptr->shift1);
00074   temp2 = (int) (scr_ptr->scr_delay >> scr_ptr->shift2);
00075   (*bits) = (temp1^temp2^(*bits))&scr_ptr->mask;
00076
00077   /* Shift delay line and add new bits */
00078   scr_ptr->scr_delay = (scr_ptr->scr_delay << scr_ptr->num_of_bits)+(*bits);
00079
00080   return;
00081 }
00082 /******************************************************************************
00083  * Subroutine:  1 + x**-s1 + x**-s2 PN generator routine
00084  ******************************************************************************
00085  * SUBROUTINE NAME: dpu_PN_gen
00086  *
00087  * DESCRIPTION: Scrambler with polynomial: 1 + x**-s1 + x**-s2.
00088  *              The scrambler shift register -  scr_delay has data
00089  *              positioned as LSBs with the LSB being last in time.
00090  *              Difference with the scrambler is that the output is taken
00091  *              from the s2 tap, instead of the input tap.
00092  *
00093  * API:    *scr_ptr - points to the scrambler definition structure
00094  *              ulong scr_delay - delay line of the scrambler
00095  *              uint  num_of_bits - number of bits to be scrambled
00096  *              uint  mask - output bit mask
00097  *              int   shift1 - s1 for the scrambling polynomial
00098  *              int   shift2 - s2 for the scrambling polynomial
00099  *              int   counter - counter used for detect. V.27 rep. pattern
00100  *              int   next_bit - flag used for detect. V.27 repeat. pattern
00101  *
00102  *         *bits - pointer to location where input bits are stored as
00103  *                 num_of_bits LSBs. The scrambler will put the output
00104  *                 at the same place.
00105  *
00106  * TABS: NONE
00107  *
00108  * (C) Copyright 1996, TELOGY Networks, Inc.
00109  *****************************************************************************/
00110
00111 void dpu_PN_gen(dpu_scr_t *scr_ptr, Fract *bits)
00112 {
00113   int temp1,temp2;
00114
00115   /* Shift delay line and XOR with input bits */
00116   temp1 = (int) (scr_ptr->scr_delay >> scr_ptr->shift1);
00117   temp2 = (int) (scr_ptr->scr_delay >> scr_ptr->shift2);
00118   temp1 = (temp1^temp2)&scr_ptr->mask;
00119
00120   /* Shift delay line and add new bits */
00121   scr_ptr->scr_delay = (scr_ptr->scr_delay << scr_ptr->num_of_bits)+temp1;
00122
00123   /* Take the output */
00124   temp1 = temp2 & scr_ptr->mask;
00125   (*bits)  = (scr_ptr->pn_table)[temp1];
00126   return;
00127 }
00128 /******************************************************************************
00129  * Subroutine:  V.27 scrambler with the protection against repeating patterns
00130  *              of size 1,2,3,4,6,8,9 and 12
00131  ******************************************************************************
00132  * SUBROUTINE NAME: dpu_scr_v27
00133  *
00134  * DESCRIPTION: Scrambler with polynomial: 1 + x**-6 + x**-7.
00135  *              The scrambler shift register -  scr_delay has data
00136  *              positioned as LSBs with the LSB being last in time.
00137  *              The scrambling is done on a bit per bit basis, to be
00138  *              able to do pattern protection
00139  *
00140  * API:    *scr_ptr - points to the scrambler definition structure
00141  *              ulong scr_delay - delay line of the scrambler
00142  *              uint  num_of_bits - number of bits to be scrambled
00143  *              uint  mask - output bit mask
00144  *              int   shift1 - s1 for the scrambling polynomial
00145  *              int   shift2 - s2 for the scrambling polynomial
00146  *              int   counter - counter used for detect. V.27 rep. pattern
00147  *              int   next_bit - flag used for detect. V.27 repeat. pattern
00148  *
00149  *         *bits - pointer to location where input bits are stored as
00150  *                 num_of_bits LSBs. The scrambler will put the output
00151  *                 at the same place.
00152  *
00153  * TABS: NONE
00154  *
00155  * (C) Copyright 1996, TELOGY Networks, Inc.
00156  *****************************************************************************/
00157 #define V27_SCR_DEBUG 0
00158
00159 #if V27_SCR_DEBUG
00160  #define V27_SCR_DEBUG_BUF_SIZE  800
00161  tuint v27_scr_in_bit_ctr;
00162  tuint v27_scr_in_word_ctr;
00163  tuint v27_scr_out_bit_ctr;
00164  tuint v27_scr_out_word_ctr;
00165  tuint v27_scr_in_buf[V27_SCR_DEBUG_BUF_SIZE];
00166  tuint v27_scr_out_buf[V27_SCR_DEBUG_BUF_SIZE];
00167 #endif
00168
00169 void dpu_scr_v27(dpu_scr_t *scr_ptr, Fract *bits)
00170 {
00171   int j,new_bit,temp1,temp2,temp3;
00172   int scr_delay;
00173
00174   scr_delay = (int) scr_ptr->scr_delay;
00175   /* Do scrambling one bit at a time */
00176   for (j=scr_ptr->num_of_bits ; j>0 ; j-- )
00177   {
00178     /* Extract new bit */
00179     new_bit = ((*bits)>>(j-1))&0x1;
00180
00181 #if V27_SCR_DEBUG
00182  /* Debug code to record input to descrambler */
00183  if (v27_scr_in_word_ctr < V27_SCR_DEBUG_BUF_SIZE)
00184  {
00185    v27_scr_in_buf[v27_scr_in_word_ctr] = (v27_scr_in_buf[v27_scr_in_word_ctr] << 1) | new_bit;
00186    v27_scr_in_bit_ctr++;
00187    if (v27_scr_in_bit_ctr == 16)
00188    {
00189       v27_scr_in_word_ctr++;
00190       v27_scr_in_bit_ctr = 0;
00191       v27_scr_in_buf[v27_scr_in_word_ctr] = 0;
00192    }
00193  }
00194 #endif
00195
00196     /* Shift delay line and XOR with input bits */
00197     temp1 = scr_delay >> V27_TAP1-1;
00198     temp2 = scr_delay >> V27_TAP2-1;
00199     new_bit = (temp1^temp2^new_bit)&0x1;
00200     /* Shift delay line and add new bit */
00201     scr_delay = (scr_delay << 1)+new_bit;
00202     /* Protection against repeating patterns */
00203     scr_ptr->counter++; /* Increment repeating counter */
00204     if (scr_ptr->next_bit==0) /* Reset counter if any of the repeat.bits is 0*/
00205        scr_ptr->counter=0;
00206     if (scr_ptr->counter==33) /* if counter equals 33, flip the LSB of the SR */
00207     {
00208        scr_ptr->counter= -1;
00209        scr_delay = scr_delay^0x1; /* Flip the LSB */
00210     }
00211     temp1 = (scr_delay >>12)^new_bit;
00212     temp2 = (scr_delay >>9)^new_bit;
00213     temp3 = (scr_delay >>8)^new_bit;
00214     scr_ptr->next_bit=(temp1&temp2&temp3&0x1)^0x1;
00215
00216 #if V27_SCR_DEBUG
00217  /* Debug code to record input to descrambler */
00218  if (v27_scr_out_word_ctr < V27_SCR_DEBUG_BUF_SIZE)
00219  {
00220    v27_scr_out_buf[v27_scr_out_word_ctr] = (v27_scr_out_buf[v27_scr_out_word_ctr] << 1) | (scr_delay & 0x01);
00221    v27_scr_out_bit_ctr++;
00222    if (v27_scr_out_bit_ctr == 16)
00223    {
00224       v27_scr_out_word_ctr++;
00225       v27_scr_out_bit_ctr = 0;
00226       v27_scr_out_buf[v27_scr_out_word_ctr] = 0;
00227    }
00228  }
00229 #endif
00230
00231   }
00232   /* Prepare the output directly from the scrambler shift register */
00233
00234   *bits = scr_delay & scr_ptr->mask;
00235
00236   scr_ptr->scr_delay = scr_delay;
00237   return;
00238 }
00239 /******************************************************************************
00240  * Subroutine:  1 + x**-s1 + x**-s2 scrambler routine initialization
00241  ******************************************************************************
00242  * SUBROUTINE NAME: dpu_scr_init
00243  *
00244  * DESCRIPTION: Scrambler Initialization
00245  *
00246  * API:    *scr_ptr - points to the scrambler definition structure
00247  *              ulong scr_delay - delay line of the scrambler
00248  *              uint  num_of_bits - number of bits to be scrambled
00249  *              uint  mask - output bit mask
00250  *              int   shift1 - s1 for the scrambling polynomial
00251  *              int   shift2 - s2 for the scrambling polynomial
00252  *              int counter - counter used for detect. V.27 rep. pattern
00253  *              int next_bit - flag used for detect. V.27 repeat. pattern
00254  *              int *pn_table - pointer to PN table if used
00255  *
00256  *         num_of_bits - number of bits per symbol.
00257  *         init_pattern - initialization for the shift register
00258  *         shift1 - s1 for the scrambling polynomial
00259  *         shift2 - s2 for the scrambling polynomial
00260  *
00261  *
00262  * TABS: NONE
00263  *
00264  * (C) Copyright 1996, TELOGY Networks, Inc.
00265  *****************************************************************************/
00266
00267 void dpu_scr_init(dpu_scr_t *scr_ptr,
00268                   int num_of_bits,
00269                   tulong init_pattern,
00270                   Fract shift1,
00271                   Fract shift2,
00272                   const Fract *pn_table)
00273 {
00274   int j,power;
00275
00276   power = 1;
00277   /* Calculate power = 2**num_of_bits */
00278   for (j=0 ;j<num_of_bits ;j++ )
00279   {
00280     power = power*2;
00281   }
00282   /* Initialize structure */
00283   scr_ptr->mask = (power - 1);
00284   scr_ptr->num_of_bits = num_of_bits;
00285   if (init_pattern != 0xffffffff)
00286    {
00287    /* for V.27 2400 bps ST4 no need to do the following,
00288       just change the num_of_bits from 3 to 2           */
00289
00290     scr_ptr->scr_delay = init_pattern;
00291     scr_ptr->counter = 0;
00292     scr_ptr->next_bit = 0;
00293    }
00294   scr_ptr->shift1 = shift1 - num_of_bits;
00295   scr_ptr->shift2 = shift2 - num_of_bits;
00296   scr_ptr->pn_table = pn_table;
00297
00298 #if V27_SCR_DEBUG
00299  for (j = 0; j < V27_SCR_DEBUG_BUF_SIZE; j++)
00300  {
00301    v27_scr_in_buf[j] = v27_scr_out_buf[j] = 0;
00302  }
00303
00304  v27_scr_in_word_ctr = v27_scr_in_bit_ctr = 0;
00305  v27_scr_out_word_ctr = v27_scr_out_bit_ctr = 0;
00306 #endif
00307
00308   return;
00309 }


FM: shaping.c File Reference

shaping.c File Reference

#include <ti/mas/types/types.h>
#include <ti/mas/fract/fract.h>
#include "dpumath.h"
#include "dpu_shap.h"

Include dependency graph for shaping.c:

Go to the source code of this file.

Functions

int | dpu_shaping (dpu_shaping_t *inst, Fract *input_re, Fract *input_im, Fract *output, int length)
void | dpu_tx_shaping_init (dpu_shaping_t *inst, Fract L1, const dpu_shaping_bank_t *filter)

Function Documentation

int dpu_shaping | ( | dpu_shaping_t * | inst,
 |  | Fract * | input_re,
 |  | Fract * | input_im,
 |  | Fract * | output,
 |  | int | length
 | ) |  |

Definition at line 36 of file shaping.c.

References dpushaping_filt(), dpu_shaping_t::filter, dpu_shaping_bank_t::filters_im, dpu_shaping_bank_t::filters_re, dpu_shaping_t::L1, dpu_shaping_t::length, dpu_shaping_t::oldin_im, and dpu_shaping_t::oldin_re.

Referenced by vxx_tx_init().

Here is the call graph for this function:

void dpu_tx_shaping_init | ( | dpu_shaping_t * | inst,
 |  | Fract | L1,
 |  | const dpu_shaping_bank_t * | filter
 | ) |  |

Definition at line 58 of file shaping.c.

References dpu_shaping_t::filter, dpu_shaping_t::L1, dpu_shaping_t::length, dpu_shaping_t::oldin_im, dpu_shaping_t::oldin_re, and SHAP_MAX_M.

Referenced by vxx_tx_init().


FM: shaping.c Source File

shaping.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE:  Shaping filter design
00003  ******************************************************************************
00004  * FILE NAME: shaping.c
00005  *
00006  * DESCRIPTION:  Shaping filter design
00007  *
00008  * TABS: NONE
00009  *
00010  * $Id: SHAPING.C 1.4 1997/09/05 20:49:43 PPATEL Exp $
00011  *
00012  * REVISION HISTORY:
00013  *
00014  * $Log: SHAPING.C $
00015  * Revision 1.4  1997/09/05 20:49:43  PPATEL
00016  *   Inclusion of types and fract.h
00017  * Revision 1.3  1997/05/18 12:20:34  Zoran
00018  *   Greatly simplified shaping at the expense of slightly increased memory
00019  * Revision 1.1  1997/02/06 10:17:20  unknown
00020  * Initial revision
00021  *
00022  * (C) Copyright 1996, TELOGY Networks, Inc.
00023  *****************************************************************************/
00024 #include <ti/mas/types/types.h>
00025 #include <ti/mas/fract/fract.h>
00026
00027 #include "dpumath.h" /* for convolution */
00028 #include "dpu_shap.h"
00029
00030 /******************************************************************************
00031  * FUNCTION PURPOSE: shaping filter with frame base  for V29
00032  ******************************************************************************
00033  * DESCRIPTION:  shaping filter with frame base for V29
00034  *
00035  *****************************************************************************/
00036 int dpu_shaping(dpu_shaping_t *inst,Fract *input_re, Fract *input_im,
00037                 Fract *output, int length)
00038 {
00039
00040    int count;
00041    int samp_per_baud=inst->L1, h=inst->length;
00042    const dpu_shaping_bank_t *hn=inst->filter;
00043    Fract *oldin_re = inst->oldin_re;
00044    Fract *oldin_im = inst->oldin_im;
00045    Fract *in_re = input_re, *in_im = input_im;
00046
00047    count = dpushaping_filt(oldin_re, oldin_im, in_re, in_im, hn->filters_re,
00048                    hn->filters_im, samp_per_baud, h, output, length);
00049    return(count);
00050 }
00051
00052 /******************************************************************************
00053  * FUNCTION PURPOSE: initualize TX shaping filter
00054  ******************************************************************************
00055  * DESCRIPTION:  initualize TX shaping filter
00056  *
00057  *****************************************************************************/
00058  void dpu_tx_shaping_init(dpu_shaping_t *inst, Fract L1,
00059                           const dpu_shaping_bank_t *filter)
00060 {
00061     int i;
00062
00063     inst->L1=L1; /* Number of samples per baud */
00064     inst->length=7;
00065     inst->filter=filter;
00066
00067     for (i=0; i<SHAP_MAX_M; i++)
00068     {
00069        inst->oldin_re[i] =  0;
00070        inst->oldin_im[i] =  0;
00071     }
00072 }
00073  /* Nothing after this point */


FM: slicers.c File Reference

slicers.c File Reference

#include <stdlib.h>
#include <ti/mas/types/types.h>
#include "dpu_slic.h"
#include "dpu_tgt.h"
#include "fmport.h"
#include <ti/mas/fract/fract.h>
#include "fmprag.h"

Include dependency graph for slicers.c:

Go to the source code of this file.

Defines

#define | POW_DECAY_SHIFT 10

Functions

void | dpuUpdateSNRparms (dpu_slic_t *slic_p)
void | dpu_v27_v29_slicer (dpu_slic_t *slic_ptr, Fract *x_sym, Fract *y_sym, Fract *rx_bits, Fract *phase, Fract *dpu_slic_pt_V29_72_ptr, Fract *dpu_slic_pt_V27_48_ptr, Fract *dpu_slic_pt_V27_24_ptr, const Fract *dpu_PN_smap_table_v17_AllRates_ptr, Fract dpu_slic_invmod_v17_ptr[][10])
void | dpu_slic_init (dpu_slic_t *slic_ptr)

Variables

const Fract | dpu_slic_invmod_V29_72 [2]
const Fract | dpu_slic_invmod_V27_48 [1]
const Fract | dpu_slic_invmod_V27_24 [1]
const Fract | dpu_slic_bits_V27_24 [4]

Define Documentation

#define POW_DECAY_SHIFT 10

Definition at line 85 of file slicers.c.

Referenced by dpuUpdateSNRparms().

Function Documentation

void dpuUpdateSNRparms ( dpu_slic_t * slic_p )

Definition at line 87 of file slicers.c.

References dpu_slic_t::avgNoisePow, dpu_slic_t::avgSignalPow, POW_DECAY_SHIFT, dpu_slic_t::x_error, dpu_slic_t::x_ideal, dpu_slic_t::y_error, and dpu_slic_t::y_ideal.

void dpu_v27_v29_slicer | ( | dpu_slic_t * | slic_ptr,
 |  | Fract * | x_sym,
 |  | Fract * | y_sym,
 |  | Fract * | rx_bits,
 |  | Fract * | phase,
 |  | Fract * | dpu_slic_pt_V29_72_ptr,
 |  | Fract * | dpu_slic_pt_V27_48_ptr,
 |  | Fract * | dpu_slic_pt_V27_24_ptr,
 |  | const Fract * | dpu_PN_smap_table_v17_AllRates_ptr,
 |  | Fract | dpu_slic_invmod_v17_ptr[][10]
 | ) |  |

Definition at line 126 of file slicers.c.

References dpu_slic_t::bits_table, dpu_slic_t::decis_table, dpu_slic_t::invmod_table, dpu_slic_t::ph_error, V29_96_SC1, V29_96_SH1, V29_RX_CSCALE_72, V29_RX_CSCALE_96, dpu_slic_t::x_error, dpu_slic_t::x_ideal, dpu_slic_t::y_error, and dpu_slic_t::y_ideal.

Referenced by v27RxSt7Init(), and v29RxSt7Init().

void dpu_slic_init ( dpu_slic_t * slic_ptr )

Definition at line 309 of file slicers.c.

References dpu_slic_t::avgNoisePow, dpu_slic_t::avgSignalPow, PH_ERROR_SCALE, and dpu_slic_t::ph_error_scale.

Referenced by v27RxSt7Init(), and v29RxSt7Init().

Variable Documentation

const Fract dpu_slic_invmod_V29_72[2]

Initial value:

{
   (Fract)V29_INVMOD_PT0_72,
   (Fract)V29_INVMOD_PT1_72
}

Definition at line 53 of file slicers.c.

Referenced by v29RxSt34Init(), and v29RxSt7Init().

const Fract dpu_slic_invmod_V27_48[1]

Initial value:

{
   (Fract)V27_INVMOD_PT0_48
}

Definition at line 59 of file slicers.c.

Referenced by v27RxSt34Init(), and v27RxSt7Init().

const Fract dpu_slic_invmod_V27_24[1]

Initial value:

{
   (Fract)V27_INVMOD_PT0_24
}

Definition at line 64 of file slicers.c.

Referenced by v27RxSt34Init(), and v27RxSt7Init().

const Fract dpu_slic_bits_V27_24[4]

Initial value:

{
    0, 3, 1, 2
}

Definition at line 69 of file slicers.c.

Referenced by v27RxSt7Init().


FM: slicers.c Source File

slicers.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: DPU symbol mapping routines
00003  ******************************************************************************
00004  * FILE NAME:   sym_map.c
00005  *
00006  * DESCRIPTION: DPU symbol mapping routines in C
00007  *
00008  * REQUIRES:    types.h (generic data types)
00009  *              dpu.h (all the data structures required by DPU)
00010  *
00011  * TABS: NONE
00012  *
00013  * $Id: SLICERS.C 2.0 2002/08/04 10:44:15 Aravind B R Exp $
00014  *
00015  * REVISION HISTORY:
00016  *
00017  * $Log: SLICERS.C $
00018  * Revision 2.0  2002/08/04 10:44:15 Aravind B R
00019  * fixed the indexing problem for inv_mod table
00020  * Revision 1.9  2000/03/29 12:11:15  sakhtar
00021  * Modified for compilation with 3.50 tools. Changes are compatible
00022  * with 1.20 and 1.16 tools as well. Replaced frctMul with dpu_mul
00023  * to prevent call to the function for multiplication
00024  * Revision 1.8  2000/03/21 19:56:48  jwright
00025  * Clean up 3.50 compile warning.
00026  * Revision 1.7  1999/04/05 12:46:55  sakhtar
00027  * Added updatesnrparms() function
00028  * Revision 1.6  1999/04/05 11:23:11  sakhtar
00029  * Combined some functions to create a common slicer function
00030  * for v27 and v29
00031  * Revision 1.5  1999/04/01 15:27:12  sakhtar
00032  * Removed unused buffers
00033  * Revision 1.4  1998/04/30 17:14:43  ppatel
00034  *  Changes for reporting modem status (timing offset, carrier freq offset,
00035  * snr, etc.)
00036  * Revision 1.3  1997/05/25 16:17:07  Zoran
00037  *    Added function for quality estimation
00038  * Revision 1.2  1997/05/18 11:56:06  Zoran
00039  *   Tables use const declaration, cleanup
00040  * Revision 1.1  1997/02/06 10:18:46  unknown
00041  * Initial revision
00042  *
00043  * (C) Copyright 1996, TELOGY Networks, Inc.
00044  *****************************************************************************/
00045 #include <stdlib.h>
00046 #include <ti/mas/types/types.h>
00047 #include "dpu_slic.h"
00048 #include "dpu_tgt.h"
00049 #include "fmport.h"
00050 #include <ti/mas/fract/fract.h>
00051 #include "fmprag.h"
00052
00053 const Fract dpu_slic_invmod_V29_72[2] =
00054 {
00055    (Fract)V29_INVMOD_PT0_72,    /* Inverse modulo for all decision points */
00056    (Fract)V29_INVMOD_PT1_72
00057 };
00058
00059 const Fract dpu_slic_invmod_V27_48[1] =
00060 {
00061    (Fract)V27_INVMOD_PT0_48     /* Inverse modulo for all decision points */
00062 };
00063
00064 const Fract dpu_slic_invmod_V27_24[1] =
00065 {
00066    (Fract)V27_INVMOD_PT0_24     /* Inverse modulo for all decision points */
00067 };
00068
00069 const Fract dpu_slic_bits_V27_24[4] =
00070 {
00071     0, 3, 1, 2
00072 };
00073
00074 /******************************************************************************
00075  * FUNCTION PURPOSE: Updates the average noise and signal powers
00076  ******************************************************************************
00077  * DESCRIPTION: Exponential averaging is performed on the noise and signal powers
00078  *
00079  *              NOTE: Function is not currently portable to floating point platform
00080  *              ====
00081  * void dpuUpdateSNRparms(
00082  *      dpu_slic_t *slic_p)  - pointer to slicer's instance
00083  *
00084  *****************************************************************************/
00085 #define POW_DECAY_SHIFT 10   /* division = 2^(-10) = 1/1024, alpha = 1-1/1024 */
00086
00087 void dpuUpdateSNRparms(dpu_slic_t *slic_p)
00088 {
00089   LFract temp,avgPow;
00090
00091   /* update noise power */
00092   temp = frctMul(slic_p->x_ideal, 0, slic_p->x_ideal, 0, 0);
00093   temp += frctMul(slic_p->y_ideal, 0, slic_p->y_ideal, 0, 0);
00094   avgPow = slic_p->avgSignalPow;
00095   avgPow = (avgPow - (avgPow >> POW_DECAY_SHIFT)) + (temp >> POW_DECAY_SHIFT);
00096   slic_p->avgSignalPow = avgPow;
00097
00098   /* update signal power */
00099   temp = frctMul(slic_p->x_error, 0, slic_p->x_error, 0, 0);
00100   temp += frctMul(slic_p->y_error, 0, slic_p->y_error, 0, 0);
00101   avgPow = slic_p->avgNoisePow;
00102   avgPow = (avgPow - (avgPow >> POW_DECAY_SHIFT)) + (temp >> POW_DECAY_SHIFT);
00103   slic_p->avgNoisePow = avgPow;
00104 }
00105
00106
00107 /******************************************************************************
00108  * Subroutine: Slicer for 8PSK modulation
00109  ******************************************************************************
00110  * SUBROUTINE NAME: dpu_slic_8PSK
00111  *
00112  * DESCRIPTION: Decision about the received point for 8 PSK constellation
00113  *
00114  * API:    *slic_ptr - points to the slicer definition structure
00115  *              Fract   *slic_table - table used for slicer
00116  *
00117  *         *bits  - received bits
00118  *         *x_sym - x coordinate of the symbol received
00119  *         *y_sym - y coordinate of the symbol received
00120  *         *inv_power - 1/power of the received point
00121  *
00122  * TABS: NONE
00123  *
00124  * (C) Copyright 1996, TELOGY Networks, Inc.
00125  *****************************************************************************/
00126 void dpu_v27_v29_slicer (dpu_slic_t *slic_ptr,Fract *x_sym,Fract *y_sym,Fract *rx_bits,Fract *phase,
00127                       Fract *dpu_slic_pt_V29_72_ptr,
00128                       Fract *dpu_slic_pt_V27_48_ptr,
00129                       Fract *dpu_slic_pt_V27_24_ptr,
00130                       const Fract *dpu_PN_smap_table_v17_AllRates_ptr,
00131                       Fract dpu_slic_invmod_v17_ptr[][10])
00132 {
00133   int index;
00134   Fract x_coord,y_coord, temp;
00135   LFract tmp_re, tmp_im, templ;
00136   Fract indx_inv_mod;
00137
00138   indx_inv_mod = 0;
00139   index = 0;
00140   x_coord = *x_sym;
00141   y_coord = *y_sym;
00142
00143   if (slic_ptr->decis_table == dpu_slic_pt_V27_24_ptr)
00144   {
00145     if(x_coord < 0)
00146     {
00147       index = index + 2;
00148     }
00149     if(y_coord < 0)
00150     {
00151       index = index + 1;
00152     }
00153   }
00154   else  if (slic_ptr->decis_table == dpu_slic_pt_V27_48_ptr)
00155   {
00156     if(x_coord < 0)
00157     {
00158       index = index + 4;
00159       x_coord = -x_coord;
00160     }
00161     if(y_coord < 0)
00162     {
00163       index = index + 2;
00164       y_coord = -y_coord;
00165     }
00166     /* If x<y revert it */
00167     if(x_coord < y_coord)
00168     {
00169       index = index + 1;
00170     }
00171   }
00172   else  if (slic_ptr->decis_table == dpu_slic_pt_V29_72_ptr)
00173   {
00174     /* Move everything to 1st quadrant */
00175     if(x_coord < 0)
00176     {
00177       index = index + 8;
00178       x_coord = -x_coord;
00179     }
00180     if(y_coord < 0)
00181     {
00182       index = index + 4;
00183       y_coord = -y_coord;
00184     }
00185     /* If x<y revert it */
00186     if(x_coord < y_coord)
00187     {
00188       index = index + 2;
00189       /* swap x and y */
00190       temp = x_coord;
00191       x_coord = y_coord;
00192       y_coord = temp;
00193     }
00194
00195     /* Decide which of the 2 points is the closest */
00196     tmp_re=(LFract)(x_coord)*2;
00197     templ = (LFract)y_coord - tmp_re + (Fract)(3.5*V29_RX_CSCALE_72);
00198
00199     if(templ < 0)
00200     {
00201       index = index + 1;
00202     }
00203
00204   indx_inv_mod = index & 0x0001; /* indx_inv_mod = index %2, modulo 2 arithmatic */
00205   }
00206   else  /* v29 */
00207   {
00208     /* Move everything to 1st quadrant */
00209     if(x_coord < 0)
00210     {
00211       index = index + 16;
00212       x_coord = -x_coord;
00213     }
00214     if(y_coord < 0)
00215     {
00216       index = index + 8;
00217       y_coord = -y_coord;
00218     }
00219     /* If x<y revert it */
00220     if(x_coord < y_coord)
00221     {
00222       index = index + 4;
00223       /* swap x and y */
00224       temp = x_coord;
00225       x_coord = y_coord;
00226       y_coord = temp;
00227     }
00228
00229     /* Decide which of the 4 points is the closest */
00230     if(x_coord < (Fract)(4*V29_RX_CSCALE_96))
00231     {
00232       if(y_coord > (Fract)(1.5*V29_RX_CSCALE_96))
00233       {
00234         templ = (LFract)x_coord + (LFract)y_coord-(Fract)(4*V29_RX_CSCALE_96);
00235         if(templ > 0)
00236         {
00237           index = index +3;
00238         }
00239       }
00240       else
00241       {
00242         tmp_re = (LFract)x_coord * 2;
00243         templ = (LFract)y_coord - tmp_re + (Fract)(3.5*V29_RX_CSCALE_96);
00244         if(templ < 0)
00245         {
00246           index = index + 1;
00247         }
00248       }
00249     }
00250     else
00251     {
00252       templ = dpu_mul((Fract)(0.667*V29_96_SC1), 14, x_coord, 14, 28);
00253       templ = frctAdjust_dQ(templ,-V29_96_SH1);
00254       templ = (LFract)y_coord - templ +(LFract)(1.167*V29_RX_CSCALE_96);
00255       if(templ > 0)
00256       {
00257         index = index + 3;
00258       }
00259       else
00260       {
00261         index = index + 2;
00262       }
00263     }
00264
00265   indx_inv_mod = index & 0x0003; /* indx_inv_mod = index %4, modulo 4 arithmatic */
00266   }
00267
00268
00269   /* Read the coordinates of the point from the table */
00270   x_coord = slic_ptr->decis_table[index*2];
00271   y_coord = slic_ptr->decis_table[index*2 + 1];
00272
00273   slic_ptr->x_ideal = x_coord;
00274   slic_ptr->y_ideal = y_coord;
00275
00276   slic_ptr->x_error = x_coord - *x_sym;
00277   slic_ptr->y_error = y_coord - *y_sym;
00278
00279   /* Calculate the phase error */
00280   tmp_re = frctMul( (*y_sym), 14, x_coord, 14, 28);
00281   tmp_im = frctMul( (*x_sym), 14, y_coord, 14, 28);
00282   temp = frctLF2F(tmp_re-tmp_im, 28, 14);
00283   slic_ptr->ph_error = frctLF2F(frctMul(temp, 14, slic_ptr->invmod_table[indx_inv_mod],14, 28),
00284                        28, 14);
00285
00286   *phase = slic_ptr->ph_error;
00287   /* Read the bits from the table */
00288   (*rx_bits) = slic_ptr->bits_table[index];
00289 }
00290
00291 /******************************************************************************
00292  * Subroutine:  Slicer Initialization
00293  ******************************************************************************
00294  * SUBROUTINE NAME: dpu_slic_init
00295  *
00296  * DESCRIPTION: Slicer Initialization
00297  *
00298  * API:    *slic_ptr - points to the slicer definition structure
00299  *              Fract   *slic_table - table used for slicer
00300  *
00301  *         int *slic_table - table used for slicer
00302  *
00303  *
00304  * TABS: NONE
00305  *
00306  * (C) Copyright 1996, TELOGY Networks, Inc.
00307  *****************************************************************************/
00308
00309 void dpu_slic_init(dpu_slic_t *slic_ptr)
00310 {
00311   /* Initialize structure */
00312   slic_ptr->ph_error_scale = PH_ERROR_SCALE;
00313
00314   slic_ptr->avgNoisePow  = 0;
00315   slic_ptr->avgSignalPow = 0;
00316 }
00317 /* nothing past this point */


FM: cd_thr_t Struct Reference

  • Data Structures
  • Data Fields

cd_thr_t Struct Reference

#include <fmTablesTypes.h>

Detailed Description

Definition at line 42 of file fmTablesTypes.h.

Data Fields

LFract | high_thr
LFract | low_thr

Field Documentation

LFract cd_thr_t::high_thr

Definition at line 43 of file fmTablesTypes.h.

Referenced by dpuconfigRX().

LFract cd_thr_t::low_thr

Definition at line 44 of file fmTablesTypes.h.

Referenced by dpuconfigRX().

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


FM: cmplx_t Struct Reference

  • Data Structures
  • Data Fields

cmplx_t Struct Reference

#include <dpumath.h>

Detailed Description

Definition at line 46 of file dpumath.h.

Data Fields

Fract | re
Fract | im

Field Documentation

Fract cmplx_t::re

Definition at line 48 of file dpumath.h.

Referenced by dpu_cd_det_init(), dpu_dot_det_init(), dpu_trec_init(), dpu_ttone(), findMinIndx(), and IIRUpdatOutPow().

Fract cmplx_t::im

Definition at line 49 of file dpumath.h.

Referenced by dpu_cd_det_init(), dpu_dot_det_init(), dpu_trec_init(), dpu_ttone(), findMinIndx(), and IIRUpdatOutPow().

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


FM: commonTable1_sPtrs_t Struct Reference

  • Data Structures
  • Data Fields

commonTable1_sPtrs_t Struct Reference
[FM External API]

#include <fm.h>

Collaboration diagram for commonTable1_sPtrs_t:

[legend]

Detailed Description

common Cluster-1 definitions

Definition at line 249 of file fm.h.

Data Fields

Fract | dpuModConvTable_pt [11]
Fract | dpuModRateTable_pt [11]
Fract | dpuModTypeTable_pt [11]
Fract | hn_96_80_pt [5][42]
Fract | hn_72_80_pt [10][39]
Fract | hn_80_96_pt [6][38]
cd_thr_t | cd_thresholds_pt [3]
Fract | dpu_trec_fil_coef_pt [4][4]
Fract | bp_rx_v21_96_pt [23]
Fract | bp_hilb_v21_96_pt [23]

Field Documentation

Fract commonTable1_sPtrs_t::dpuModConvTable_pt[11]

Definition at line 251 of file fm.h.

Referenced by FAX_MODEM().

Fract commonTable1_sPtrs_t::dpuModRateTable_pt[11]

Definition at line 252 of file fm.h.

Referenced by FAX_MODEM().

Fract commonTable1_sPtrs_t::dpuModTypeTable_pt[11]

Definition at line 253 of file fm.h.

Referenced by FAX_MODEM().

Fract commonTable1_sPtrs_t::hn_96_80_pt[5][42]

Definition at line 254 of file fm.h.

Referenced by dpu_interp_init().

Fract commonTable1_sPtrs_t::hn_72_80_pt[10][39]

Definition at line 255 of file fm.h.

Referenced by dpu_interp_init().

Fract commonTable1_sPtrs_t::hn_80_96_pt[6][38]

Definition at line 256 of file fm.h.

Referenced by dpu_interp_init().

cd_thr_t commonTable1_sPtrs_t::cd_thresholds_pt[3]

Definition at line 257 of file fm.h.

Referenced by dpuconfigRX().

Fract commonTable1_sPtrs_t::dpu_trec_fil_coef_pt[4][4]

Definition at line 258 of file fm.h.

Referenced by dpu_trec_init().

Fract commonTable1_sPtrs_t::bp_rx_v21_96_pt[23]

Definition at line 259 of file fm.h.

Referenced by v21RxCommonInit().

Fract commonTable1_sPtrs_t::bp_hilb_v21_96_pt[23]

Definition at line 260 of file fm.h.

Referenced by v21RxCommonInit().

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


FM: dpu_adeq_t Struct Reference

  • Data Structures
  • Data Fields

dpu_adeq_t Struct Reference

#include <dpu_adeq.h>

Detailed Description

Definition at line 44 of file dpu_adeq.h.

Data Fields

int | length
Fract | beta
Fract * | delay_re
Fract * | delay_im
LFract * | cf_re_long
LFract * | cf_im_long
int | updateAdeqFlag
Fract | postAdeqGain
Fract | postAdeqStepSiz
int | postAdeqUpdateFlag
Fract | inpPostAdeqX
Fract | inpPostAdeqY

Field Documentation

int dpu_adeq_t::length

Definition at line 46 of file dpu_adeq.h.

Referenced by dpu_adeq(), dpu_adeq_init(), and dpu_update_adeq().

Fract dpu_adeq_t::beta

Definition at line 47 of file dpu_adeq.h.

Referenced by dpu_adeq_init(), dpu_update_adeq(), v27RxSt5Init(), v27RxSt6Init(), v27RxSt7Init(), v29RxSt5Init(), v29RxSt6Init(), and v29RxSt7Init().

Fract* dpu_adeq_t::delay_re

Definition at line 48 of file dpu_adeq.h.

Referenced by dpu_adeq(), dpu_adeq_init(), dpu_update_adeq(), and dpuNew().

Fract* dpu_adeq_t::delay_im

Definition at line 49 of file dpu_adeq.h.

Referenced by dpu_adeq(), dpu_adeq_init(), dpu_update_adeq(), and dpuNew().

LFract* dpu_adeq_t::cf_re_long

Definition at line 50 of file dpu_adeq.h.

Referenced by dpu_adeq(), dpu_adeq_init(), dpu_update_adeq(), and dpuNew().

LFract* dpu_adeq_t::cf_im_long

Definition at line 51 of file dpu_adeq.h.

Referenced by dpu_adeq(), dpu_adeq_init(), dpu_update_adeq(), and dpuNew().

int dpu_adeq_t::updateAdeqFlag

Definition at line 52 of file dpu_adeq.h.

Referenced by dpu_adeq_init(), and dpu_update_adeq().

Fract dpu_adeq_t::postAdeqGain

Definition at line 55 of file dpu_adeq.h.

Referenced by dpu_adeq(), dpu_adeq_init(), and dpu_update_adeq().

Fract dpu_adeq_t::postAdeqStepSiz

Definition at line 56 of file dpu_adeq.h.

Referenced by dpu_adeq_init(), and dpu_update_adeq().

int dpu_adeq_t::postAdeqUpdateFlag

Definition at line 57 of file dpu_adeq.h.

Referenced by dpu_adeq_init(), and dpu_update_adeq().

Fract dpu_adeq_t::inpPostAdeqX

Definition at line 58 of file dpu_adeq.h.

Referenced by dpu_adeq(), dpu_adeq_init(), and dpu_update_adeq().

Fract dpu_adeq_t::inpPostAdeqY

Definition at line 59 of file dpu_adeq.h.

Referenced by dpu_adeq(), dpu_adeq_init(), and dpu_update_adeq().

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


FM: dpu_agc_t Struct Reference

  • Data Structures
  • Data Fields

dpu_agc_t Struct Reference

#include <dpu_agc.h>

Detailed Description

Definition at line 54 of file dpu_agc.h.

Data Fields

Fract | gain
Fract | old_gain
int | rx_level

Field Documentation

Fract dpu_agc_t::gain

Definition at line 56 of file dpu_agc.h.

Referenced by dpu_agc(), dpu_agc_init(), v21Rx(), and v21RxStM().

Fract dpu_agc_t::old_gain

Definition at line 57 of file dpu_agc.h.

int dpu_agc_t::rx_level

Definition at line 58 of file dpu_agc.h.

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


FM: dpu_bphilb_t Struct Reference

  • Data Structures
  • Data Fields

dpu_bphilb_t Struct Reference

#include <dpu_hilb.h>

Detailed Description

Definition at line 38 of file dpu_hilb.h.

Data Fields

int | L1
int | length
const Fract * | bp_filt
const Fract * | bp_hilt_filt
Fract * | delay

Field Documentation

int dpu_bphilb_t::L1

Definition at line 40 of file dpu_hilb.h.

Referenced by dpu_bp_hilb(), and dpu_bp_hilb_init().

int dpu_bphilb_t::length

Definition at line 41 of file dpu_hilb.h.

Referenced by dpu_bp_hilb(), and dpu_bp_hilb_init().

const Fract* dpu_bphilb_t::bp_filt

Definition at line 42 of file dpu_hilb.h.

Referenced by dpu_bp_hilb(), and dpu_bp_hilb_init().

const Fract* dpu_bphilb_t::bp_hilt_filt

Definition at line 43 of file dpu_hilb.h.

Referenced by dpu_bp_hilb(), and dpu_bp_hilb_init().

Fract* dpu_bphilb_t::delay

Definition at line 44 of file dpu_hilb.h.

Referenced by dpu_bp_hilb(), dpu_bp_hilb_init(), and dpuNew().

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


FM: dpu_cddet_t Struct Reference

  • Data Structures
  • Data Fields

dpu_cddet_t Struct Reference

#include <dpu_cd.h>

Collaboration diagram for dpu_cddet_t:

[legend]

Detailed Description

Definition at line 54 of file dpu_cd.h.

Data Fields

int | status
int | count
int | count_true_req
int | count_false_req
LFract | power
LFract | high_power_req
LFract | low_power_req
LFract | power_sat
cmplx_t v21FreqVect
cmplx_t v21Filt
Fract | v21OneMu
Fract | tepIIR [2]
Fract | tepInp [2]
Fract | tepCoefs [3]
int | tep_count
int | v21_count
int | tep_cnt_thr
LFract | sig_pow
LFract | tep_pow
Fract | alpha
Fract | division
tint | carrLossPendingFlag
tint | fSignalPowerPresent

Field Documentation

int dpu_cddet_t::status

Definition at line 56 of file dpu_cd.h.

Referenced by dpu_cd_det_hs(), dpu_cd_det_init(), and dpu_cd_det_v21().

int dpu_cddet_t::count

Definition at line 57 of file dpu_cd.h.

Referenced by dpu_cd_det_hs(), dpu_cd_det_init(), and dpu_cd_det_v21().

int dpu_cddet_t::count_true_req

Definition at line 58 of file dpu_cd.h.

Referenced by dpu_cd_det_v21(), and v21RxStNULLInit().

int dpu_cddet_t::count_false_req

Definition at line 59 of file dpu_cd.h.

Referenced by dpu_cd_det_hs(), dpu_cd_det_v21(), dpuHSrxSetCdParms(), fmHSrxSetCdParms(), and v21RxStNULLInit().

LFract dpu_cddet_t::power

Definition at line 60 of file dpu_cd.h.

LFract dpu_cddet_t::high_power_req

Definition at line 61 of file dpu_cd.h.

Referenced by dpu_cd_det_v21(), and dpuconfigRX().

LFract dpu_cddet_t::low_power_req

Definition at line 62 of file dpu_cd.h.

Referenced by dpu_cd_det_v21(), and dpuconfigRX().

LFract dpu_cddet_t::power_sat

Definition at line 63 of file dpu_cd.h.

Referenced by dpu_cd_det_hs(), dpu_cd_det_hs_pwrlatch(), dpu_cd_det_v21(), and dpuconfigRX().

cmplx_t dpu_cddet_t::v21FreqVect

Definition at line 66 of file dpu_cd.h.

Referenced by dpu_cd_det_init(), and dpu_cd_det_v21().

cmplx_t dpu_cddet_t::v21Filt

Definition at line 67 of file dpu_cd.h.

Referenced by dpu_cd_det_init(), and dpu_cd_det_v21().

Fract dpu_cddet_t::v21OneMu

Definition at line 68 of file dpu_cd.h.

Referenced by dpu_cd_det_init(), and dpu_cd_det_v21().

Fract dpu_cddet_t::tepIIR[2]

Definition at line 77 of file dpu_cd.h.

Referenced by dpu_cd_det_init(), and dpu_cd_det_v21().

Fract dpu_cddet_t::tepInp[2]

Definition at line 78 of file dpu_cd.h.

Referenced by dpu_cd_det_init(), and dpu_cd_det_v21().

Fract dpu_cddet_t::tepCoefs[3]

Definition at line 79 of file dpu_cd.h.

Referenced by dpu_cd_det_init(), and dpu_cd_det_v21().

int dpu_cddet_t::tep_count

Definition at line 82 of file dpu_cd.h.

Referenced by dpu_cd_det_v21().

int dpu_cddet_t::v21_count

Definition at line 83 of file dpu_cd.h.

Referenced by dpu_cd_det_hs(), dpu_cd_det_init(), and dpu_cd_det_v21().

int dpu_cddet_t::tep_cnt_thr

Definition at line 85 of file dpu_cd.h.

Referenced by dpu_cd_det_init(), and dpu_cd_det_v21().

LFract dpu_cddet_t::sig_pow

Definition at line 87 of file dpu_cd.h.

Referenced by dpu_cd_det_hs(), dpu_cd_det_init(), dpu_cd_det_util(), dpu_cd_det_v21(), dpuHSrxSetCdParms(), and fmHSrxSetCdParms().

LFract dpu_cddet_t::tep_pow

Definition at line 88 of file dpu_cd.h.

Referenced by dpu_cd_det_init(), and dpu_cd_det_v21().

Fract dpu_cddet_t::alpha

Definition at line 90 of file dpu_cd.h.

Referenced by dpu_cd_det_util(), dpu_cd_det_v21(), dpuHSrxSetCdParms(), fmHSrxSetCdParms(), and v21RxStNULLInit().

Fract dpu_cddet_t::division

Definition at line 91 of file dpu_cd.h.

Referenced by dpu_cd_det_util(), dpu_cd_det_v21(), dpuHSrxSetCdParms(), fmHSrxSetCdParms(), and v21RxStNULLInit().

tint dpu_cddet_t::carrLossPendingFlag

Definition at line 92 of file dpu_cd.h.

Referenced by dpu_cd_det_hs(), dpu_cd_det_init(), and dpuStatus().

tint dpu_cddet_t::fSignalPowerPresent

Definition at line 94 of file dpu_cd.h.

Referenced by dpu_cd_det_init(), dpu_cd_det_v21(), and FAX_MODEM().

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


FM: dpu_cdec_t Struct Reference

  • Data Structures
  • Data Fields

dpu_cdec_t Struct Reference

#include <dpu_cdec.h>

Collaboration diagram for dpu_cdec_t:

[legend]

Detailed Description

Definition at line 44 of file dpu_cdec.h.

Data Fields

path_t * path_store
path_t * path_store_cur_ptr
Fract * | path_dist_ptr
Fract * | accum_dist
tuint | shift_cnst
Fract | alpha
Fract | division
dpu_smap_t * smap_ptr
Fract(* | slice0167_fcn_ptr )(Fract, Fract)
Fract(* | slice2345_fcn_ptr )(Fract, Fract)

Field Documentation

path_t* dpu_cdec_t::path_store

Definition at line 46 of file dpu_cdec.h.

Referenced by dpuNew().

path_t* dpu_cdec_t::path_store_cur_ptr

Definition at line 47 of file dpu_cdec.h.

Fract* dpu_cdec_t::path_dist_ptr

Definition at line 48 of file dpu_cdec.h.

Referenced by dpuNew().

Fract* dpu_cdec_t::accum_dist

Definition at line 49 of file dpu_cdec.h.

Referenced by dpuNew().

tuint dpu_cdec_t::shift_cnst

Definition at line 50 of file dpu_cdec.h.

Fract dpu_cdec_t::alpha

Definition at line 51 of file dpu_cdec.h.

Fract dpu_cdec_t::division

Definition at line 52 of file dpu_cdec.h.

dpu_smap_t* dpu_cdec_t::smap_ptr

Definition at line 53 of file dpu_cdec.h.

Fract(* dpu_cdec_t::slice0167_fcn_ptr)(Fract, Fract)

Fract(* dpu_cdec_t::slice2345_fcn_ptr)(Fract, Fract)

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


FM: dpu_cenc_t Struct Reference

  • Data Structures
  • Data Fields

dpu_cenc_t Struct Reference

#include <dpu_cenc.h>

Detailed Description

Definition at line 9 of file dpu_cenc.h.

Data Fields

Fract | state
Fract | mask

Field Documentation

Fract dpu_cenc_t::state

Definition at line 10 of file dpu_cenc.h.

Fract dpu_cenc_t::mask

Definition at line 11 of file dpu_cenc.h.

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


FM: dpu_crec_t Struct Reference

  • Data Structures
  • Data Fields

dpu_crec_t Struct Reference

#include <dpu_crec.h>

Detailed Description

Definition at line 41 of file dpu_crec.h.

Data Fields

Fract | k1
Fract | k2
Fract | pre_p1
Fract | pre_p1_old
Fract | phase
Fract | freq
Fract | cosfn
Fract | sinfn
Fract | scale
int | samp
Fract | max_error

Field Documentation

Fract dpu_crec_t::k1

Definition at line 43 of file dpu_crec.h.

Referenced by dpu_crec(), dpu_crec_init(), dpu_v21_demod(), v27RxSt6Init(), v27RxSt7Init(), v29RxSt6Init(), and v29RxSt8Init().

Fract dpu_crec_t::k2

Definition at line 44 of file dpu_crec.h.

Referenced by dpu_crec(), dpu_crec_init(), dpu_v21_demod(), v27RxSt6Init(), v27RxSt7Init(), v29RxSt6Init(), and v29RxSt8Init().

Fract dpu_crec_t::pre_p1

Definition at line 45 of file dpu_crec.h.

Referenced by dpu_crec(), dpu_crec_init(), dpu_no_crec(), dpu_no_crec_at_all(), dpu_v21_demod(), and dpuStatus().

Fract dpu_crec_t::pre_p1_old

Definition at line 46 of file dpu_crec.h.

Fract dpu_crec_t::phase

Definition at line 47 of file dpu_crec.h.

Referenced by dpu_crec(), dpu_crec_init(), dpu_no_crec(), dpu_no_crec_at_all(), dpu_rx_demod(), and dpu_v21_demod().

Fract dpu_crec_t::freq

Definition at line 48 of file dpu_crec.h.

Referenced by dpu_crec(), dpu_crec_init(), dpu_no_crec(), dpu_no_crec_at_all(), and dpu_v21_demod().

Fract dpu_crec_t::cosfn

Definition at line 49 of file dpu_crec.h.

Referenced by dpu_rx_demod().

Fract dpu_crec_t::sinfn

Definition at line 50 of file dpu_crec.h.

Referenced by dpu_rx_demod().

Fract dpu_crec_t::scale

Definition at line 51 of file dpu_crec.h.

Referenced by dpu_v21_demod(), v21RxCommonInit(), v27RxSt3Init(), and v29RxSt3Init().

int dpu_crec_t::samp

Definition at line 52 of file dpu_crec.h.

Referenced by dpu_v21_demod(), and v21RxCommonInit().

Fract dpu_crec_t::max_error

Definition at line 53 of file dpu_crec.h.

Referenced by dpu_crec(), dpu_crec_init(), v27RxSt3Init(), v27RxSt7Init(), v29RxSt3Init(), and v29RxSt7Init().

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


FM: dpu_ddec_t Struct Reference

  • Data Structures
  • Data Fields

dpu_ddec_t Struct Reference

#include <dpu_denc.h>

Detailed Description

Definition at line 47 of file dpu_denc.h.

Data Fields

Fract | last_phase
const Fract * | ddec_table
Fract | mask
Fract | mask_comp

Field Documentation

Fract dpu_ddec_t::last_phase

Definition at line 48 of file dpu_denc.h.

Referenced by dpu_ddec_init(), and dpu_ddec_v29().

const Fract* dpu_ddec_t::ddec_table

Definition at line 49 of file dpu_denc.h.

Referenced by dpu_ddec_init(), and dpu_ddec_v29().

Fract dpu_ddec_t::mask

Definition at line 50 of file dpu_denc.h.

Referenced by dpu_ddec_init(), and dpu_ddec_v29().

Fract dpu_ddec_t::mask_comp

Definition at line 51 of file dpu_denc.h.

Referenced by dpu_ddec_init(), and dpu_ddec_v29().

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


FM: dpu_denc_t Struct Reference

  • Data Structures
  • Data Fields

dpu_denc_t Struct Reference

#include <dpu_denc.h>

Detailed Description

Definition at line 37 of file dpu_denc.h.

Data Fields

Fract | abs_phase
const Fract * | denc_table
Fract | mask
Fract | mask_comp

Field Documentation

Fract dpu_denc_t::abs_phase

Definition at line 38 of file dpu_denc.h.

Referenced by dpu_denc_init(), and dpu_denc_v29().

const Fract* dpu_denc_t::denc_table

Definition at line 39 of file dpu_denc.h.

Referenced by dpu_denc_init(), and dpu_denc_v29().

Fract dpu_denc_t::mask

Definition at line 40 of file dpu_denc.h.

Referenced by dpu_denc_init(), and dpu_denc_v29().

Fract dpu_denc_t::mask_comp

Definition at line 41 of file dpu_denc.h.

Referenced by dpu_denc_init(), and dpu_denc_v29().

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


FM: dpu_descr_t Struct Reference

  • Data Structures
  • Data Fields

dpu_descr_t Struct Reference

#include <dpu_scr.h>

Detailed Description

Definition at line 51 of file dpu_scr.h.

Data Fields

tulong | descr_delay
tuint | num_of_bits
tuint | mask
Fract | shift1
Fract | shift2
Fract | counter
Fract | next_bit

Field Documentation

tulong dpu_descr_t::descr_delay

Definition at line 52 of file dpu_scr.h.

Referenced by dpu_descr(), dpu_descr_init(), and dpu_descr_v27().

tuint dpu_descr_t::num_of_bits

Definition at line 53 of file dpu_scr.h.

Referenced by dpu_descr(), dpu_descr_init(), dpu_descr_v27(), and v27RxSt7Init().

tuint dpu_descr_t::mask

Definition at line 54 of file dpu_scr.h.

Referenced by dpu_descr(), and dpu_descr_init().

Fract dpu_descr_t::shift1

Definition at line 55 of file dpu_scr.h.

Referenced by dpu_descr(), and dpu_descr_init().

Fract dpu_descr_t::shift2

Definition at line 56 of file dpu_scr.h.

Referenced by dpu_descr(), and dpu_descr_init().

Fract dpu_descr_t::counter

Definition at line 57 of file dpu_scr.h.

Referenced by dpu_descr_init(), and dpu_descr_v27().

Fract dpu_descr_t::next_bit

Definition at line 58 of file dpu_scr.h.

Referenced by dpu_descr_init(), and dpu_descr_v27().

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


FM: dpu_dotdet_t Struct Reference

  • Data Structures
  • Data Fields

dpu_dotdet_t Struct Reference

#include <dpu_ddet.h>

Collaboration diagram for dpu_dotdet_t:

[legend]

Detailed Description

Definition at line 62 of file dpu_ddet.h.

Data Fields

Fract | status
cmplx_t v21FreqVect
cmplx_t v21Filt
Fract | v21OneMu
Fract | tepIIR [2]
Fract | tepInp [2]
Fract | tepCoefs [3]
Fract | dotIIR [2]
Fract | dotInp [2]
Fract | dotCoefs [3]
Fract | v27_flag
Fract | delay_buf_index
Fract | delay1
Fract | factor
tint | disable_v21
Fract | dot_count
Fract | v21_count
Fract | tep_count
Fract | dot_cnt_thr
Fract | v21_cnt_thr
Fract | tep_cnt_thr
LFract | dot_power
LFract | sig_power
LFract | v21_power
LFract | tep_power
LFract | high_power_req
Fract | alpha
Fract | division
Fract | delay [DPU_DDET_MAX_DELAY]
Fract | gain_calc_flag

Field Documentation

Fract dpu_dotdet_t::status

Definition at line 64 of file dpu_ddet.h.

Referenced by dpu_dot_det_init().

cmplx_t dpu_dotdet_t::v21FreqVect

Definition at line 67 of file dpu_ddet.h.

Referenced by dpu_dot_det(), and dpu_dot_det_init().

cmplx_t dpu_dotdet_t::v21Filt

Definition at line 68 of file dpu_ddet.h.

Referenced by dpu_dot_det().

Fract dpu_dotdet_t::v21OneMu

Definition at line 69 of file dpu_ddet.h.

Referenced by dpu_dot_det(), and dpu_dot_det_init().

Fract dpu_dotdet_t::tepIIR[2]

Definition at line 78 of file dpu_ddet.h.

Referenced by dpu_dot_det().

Fract dpu_dotdet_t::tepInp[2]

Definition at line 79 of file dpu_ddet.h.

Referenced by dpu_dot_det().

Fract dpu_dotdet_t::tepCoefs[3]

Definition at line 80 of file dpu_ddet.h.

Referenced by dpu_dot_det(), dpu_dot_det_init(), v27RxSt1Init(), and v29RxSt1Init().

Fract dpu_dotdet_t::dotIIR[2]

Definition at line 82 of file dpu_ddet.h.

Referenced by dpu_dot_det().

Fract dpu_dotdet_t::dotInp[2]

Definition at line 83 of file dpu_ddet.h.

Referenced by dpu_dot_det().

Fract dpu_dotdet_t::dotCoefs[3]

Definition at line 84 of file dpu_ddet.h.

Referenced by dpu_dot_det(), and v27RxSt1Init().

Fract dpu_dotdet_t::v27_flag

Definition at line 85 of file dpu_ddet.h.

Referenced by dpu_dot_det(), and v27RxSt1Init().

Fract dpu_dotdet_t::delay_buf_index

Definition at line 87 of file dpu_ddet.h.

Referenced by dpu_dot_det(), and dpu_pc_det().

Fract dpu_dotdet_t::delay1

Definition at line 88 of file dpu_ddet.h.

Referenced by dpu_dot_det(), dpu_dot_det_init(), and dpu_pc_det().

Fract dpu_dotdet_t::factor

Definition at line 89 of file dpu_ddet.h.

Referenced by dpu_pc_det(), v27RxSt1Init(), and v29RxSt1Init().

tint dpu_dotdet_t::disable_v21

Definition at line 90 of file dpu_ddet.h.

Referenced by dpu_dot_det_init().

Fract dpu_dotdet_t::dot_count

Definition at line 92 of file dpu_ddet.h.

Referenced by dpu_pc_det().

Fract dpu_dotdet_t::v21_count

Definition at line 93 of file dpu_ddet.h.

Fract dpu_dotdet_t::tep_count

Definition at line 94 of file dpu_ddet.h.

Fract dpu_dotdet_t::dot_cnt_thr

Definition at line 96 of file dpu_ddet.h.

Referenced by v27RxSt1Init(), and v29RxSt1Init().

Fract dpu_dotdet_t::v21_cnt_thr

Definition at line 97 of file dpu_ddet.h.

Referenced by dpu_dot_det_init().

Fract dpu_dotdet_t::tep_cnt_thr

Definition at line 98 of file dpu_ddet.h.

Referenced by dpu_dot_det_init().

LFract dpu_dotdet_t::dot_power

Definition at line 100 of file dpu_ddet.h.

Referenced by dpu_pc_det().

LFract dpu_dotdet_t::sig_power

Definition at line 101 of file dpu_ddet.h.

Referenced by dpu_dot_det().

LFract dpu_dotdet_t::v21_power

Definition at line 102 of file dpu_ddet.h.

Referenced by dpu_pc_det().

LFract dpu_dotdet_t::tep_power

Definition at line 103 of file dpu_ddet.h.

LFract dpu_dotdet_t::high_power_req

Definition at line 104 of file dpu_ddet.h.

Referenced by dpu_dot_det(), dpu_dot_det_init(), and dpuconfigRX().

Fract dpu_dotdet_t::alpha

Definition at line 106 of file dpu_ddet.h.

Referenced by dpu_dot_det_init().

Fract dpu_dotdet_t::division

Definition at line 107 of file dpu_ddet.h.

Referenced by dpu_dot_det_init().

Fract dpu_dotdet_t::delay[DPU_DDET_MAX_DELAY]

Definition at line 108 of file dpu_ddet.h.

Referenced by dpu_dot_det(), and dpu_pc_det().

Fract dpu_dotdet_t::gain_calc_flag

Definition at line 109 of file dpu_ddet.h.

Referenced by dpu_dot_det_init().

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


FM: dpu_fsk_gen_t Struct Reference

  • Data Structures
  • Data Fields

dpu_fsk_gen_t Struct Reference

#include <dpu_fsk.h>

Detailed Description

Definition at line 39 of file dpu_fsk.h.

Data Fields

Fract | phase
tuint | mask
const Fract * | freq_table

Field Documentation

Fract dpu_fsk_gen_t::phase

Definition at line 41 of file dpu_fsk.h.

Referenced by dpu_fsk_gen_init(), and dpu_v21_fsk_gen().

tuint dpu_fsk_gen_t::mask

Definition at line 42 of file dpu_fsk.h.

Referenced by dpu_fsk_gen_init(), and dpu_v21_fsk_gen().

const Fract* dpu_fsk_gen_t::freq_table

Definition at line 43 of file dpu_fsk.h.

Referenced by dpu_fsk_gen_init(), and dpu_v21_fsk_gen().

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


FM: dpu_inman_t Struct Reference

  • Data Structures
  • Data Fields

dpu_inman_t Struct Reference

#include <dputxin.h>

Detailed Description

Definition at line 66 of file dputxin.h.

Data Fields

Fract | word_size
tword * | data_in_buf
Fract | bytes_cnt
Fract | bits_cnt
Fract | bit_index
Fract | bits
Fract | bridge_state
Fract | txUnderflowFill

Field Documentation

Fract dpu_inman_t::word_size

Definition at line 68 of file dputxin.h.

Referenced by dpu_inman_init(), and dpu_tx_extract().

tword* dpu_inman_t::data_in_buf

Definition at line 69 of file dputxin.h.

Referenced by dpu_tx_copy(), and dpu_tx_extract().

Fract dpu_inman_t::bytes_cnt

Definition at line 70 of file dputxin.h.

Referenced by dpu_inman_init(), dpu_tx_copy(), dpu_tx_extract(), and dpuTx().

Fract dpu_inman_t::bits_cnt

Definition at line 71 of file dputxin.h.

Referenced by dpu_inman_init(), dpu_tx_copy(), and dpu_tx_extract().

Fract dpu_inman_t::bit_index

Definition at line 72 of file dputxin.h.

Referenced by dpu_inman_init(), and dpu_tx_extract().

Fract dpu_inman_t::bits

Definition at line 73 of file dputxin.h.

Referenced by dpu_tx_extract().

Fract dpu_inman_t::bridge_state

Definition at line 74 of file dputxin.h.

Fract dpu_inman_t::txUnderflowFill

Definition at line 75 of file dputxin.h.

Referenced by dpu_tx_extract().

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


FM: dpu_interp_t Struct Reference

  • Data Structures
  • Data Fields

dpu_interp_t Struct Reference

#include <dpu_intp.h>

Detailed Description

Definition at line 60 of file dpu_intp.h.

Data Fields

Fract | L1
Fract | L2
Fract | length
Fract * | index_tab
Fract * | filter
Fract * | oldin

Field Documentation

Fract dpu_interp_t::L1

Definition at line 62 of file dpu_intp.h.

Referenced by dpu_interp(), dpu_interp_init(), and dpu_interp_output().

Fract dpu_interp_t::L2

Definition at line 63 of file dpu_intp.h.

Referenced by dpu_interp(), dpu_interp_init(), and dpu_interp_output().

Fract dpu_interp_t::length

Definition at line 64 of file dpu_intp.h.

Referenced by dpu_interp(), dpu_interp_init(), and dpu_interp_output().

Fract* dpu_interp_t::index_tab

Definition at line 65 of file dpu_intp.h.

Referenced by dpu_interp(), dpu_interp_init(), and dpu_interp_output().

Fract* dpu_interp_t::filter

Definition at line 66 of file dpu_intp.h.

Referenced by dpu_interp(), dpu_interp_init(), and dpu_interp_output().

Fract* dpu_interp_t::oldin

Definition at line 68 of file dpu_intp.h.

Referenced by dpu_interp(), dpu_interp_init(), dpu_interp_output(), and dpuNew().

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


FM: dpu_mod_t Struct Reference

  • Data Structures
  • Data Fields

dpu_mod_t Struct Reference

#include <dpu_mod.h>

Detailed Description

Definition at line 33 of file dpu_mod.h.

Data Fields

Fract | freq
Fract | phase

Field Documentation

Fract dpu_mod_t::freq

Definition at line 35 of file dpu_mod.h.

Referenced by dpu_mod_init(), dpu_tx_mod(), and dpu_un_modulate().

Fract dpu_mod_t::phase

Definition at line 36 of file dpu_mod.h.

Referenced by dpu_mod_init(), dpu_tx_mod(), and dpu_un_modulate().

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


FM: dpu_outman_t Struct Reference

  • Data Structures
  • Data Fields

dpu_outman_t Struct Reference

#include <dputxin.h>

Detailed Description

Definition at line 79 of file dputxin.h.

Data Fields

Fract | word_size
Fract | mask
Fract | word_index
Fract | bit_index
Fract | temp_data

Field Documentation

Fract dpu_outman_t::word_size

Definition at line 81 of file dputxin.h.

Referenced by dpu_outman_init(), and dpu_rx_packet().

Fract dpu_outman_t::mask

Definition at line 82 of file dputxin.h.

Referenced by dpu_outman_init(), and dpu_rx_packet().

Fract dpu_outman_t::word_index

Definition at line 83 of file dputxin.h.

Referenced by dpu_outman_init(), dpu_rx_packet(), and dpuRx().

Fract dpu_outman_t::bit_index

Definition at line 84 of file dputxin.h.

Referenced by dpu_outman_init(), and dpu_rx_packet().

Fract dpu_outman_t::temp_data

Definition at line 85 of file dputxin.h.

Referenced by dpu_outman_init(), and dpu_rx_packet().

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


FM: dpu_phase_t Struct Reference

  • Data Structures
  • Data Fields

dpu_phase_t Struct Reference

#include <dpu_phas.h>

Detailed Description

Definition at line 31 of file dpu_phas.h.

Data Fields

int | count
int | number
LFract | sum_re
LFract | sum_im
Fract | vect_re
Fract | vect_im
Fract | division
const Fract * | division_table
Fract | delay_re [DPU_PHASE_LEN]
Fract | delay_im [DPU_PHASE_LEN]

Field Documentation

int dpu_phase_t::count

Definition at line 33 of file dpu_phas.h.

Referenced by dpu_phase_init().

int dpu_phase_t::number

Definition at line 34 of file dpu_phas.h.

Referenced by dpu_err_pha_v27_trn(), dpu_err_pha_v29_72(), dpu_err_pha_v29_96(), and dpu_phase_init().

LFract dpu_phase_t::sum_re

Definition at line 35 of file dpu_phas.h.

Referenced by dpu_phase_init().

LFract dpu_phase_t::sum_im

Definition at line 36 of file dpu_phas.h.

Referenced by dpu_phase_init().

Fract dpu_phase_t::vect_re

Definition at line 37 of file dpu_phas.h.

Referenced by dpu_phase_init().

Fract dpu_phase_t::vect_im

Definition at line 38 of file dpu_phas.h.

Referenced by dpu_phase_init().

Fract dpu_phase_t::division

Definition at line 39 of file dpu_phas.h.

Referenced by dpu_phase_init().

const Fract* dpu_phase_t::division_table

Definition at line 40 of file dpu_phas.h.

Referenced by dpu_err_pha_trn_1(), dpu_err_pha_v27_trn(), dpu_err_pha_v29_72(), dpu_err_pha_v29_72_1(), dpu_err_pha_v29_96(), dpu_err_pha_v29_96_1(), v27RxSt34Init(), and v29RxSt34Init().

Fract dpu_phase_t::delay_re[DPU_PHASE_LEN]

Definition at line 41 of file dpu_phas.h.

Referenced by dpu_err_pha_trn_1(), dpu_err_pha_v27_trn(), dpu_err_pha_v29_72(), dpu_err_pha_v29_72_1(), dpu_err_pha_v29_96(), dpu_err_pha_v29_96_1(), and dpu_phase_init().

Fract dpu_phase_t::delay_im[DPU_PHASE_LEN]

Definition at line 42 of file dpu_phas.h.

Referenced by dpu_err_pha_trn_1(), dpu_err_pha_v27_trn(), dpu_err_pha_v29_72(), dpu_err_pha_v29_72_1(), dpu_err_pha_v29_96(), dpu_err_pha_v29_96_1(), and dpu_phase_init().

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


FM: dpu_scr_t Struct Reference

  • Data Structures
  • Data Fields

dpu_scr_t Struct Reference

#include <dpu_scr.h>

Detailed Description

Definition at line 37 of file dpu_scr.h.

Data Fields

tulong | scr_delay
tuint | num_of_bits
tuint | mask
Fract | shift1
Fract | shift2
Fract | counter
Fract | next_bit
const Fract * | pn_table

Field Documentation

tulong dpu_scr_t::scr_delay

Definition at line 38 of file dpu_scr.h.

Referenced by dpu_PN_gen(), dpu_scr(), dpu_scr_init(), dpu_scr_v27(), and v27TxSt4Init().

tuint dpu_scr_t::num_of_bits

Definition at line 39 of file dpu_scr.h.

Referenced by dpu_PN_gen(), dpu_scr(), dpu_scr_init(), and dpu_scr_v27().

tuint dpu_scr_t::mask

Definition at line 40 of file dpu_scr.h.

Referenced by dpu_PN_gen(), dpu_scr(), dpu_scr_init(), and dpu_scr_v27().

Fract dpu_scr_t::shift1

Definition at line 41 of file dpu_scr.h.

Referenced by dpu_PN_gen(), dpu_scr(), and dpu_scr_init().

Fract dpu_scr_t::shift2

Definition at line 42 of file dpu_scr.h.

Referenced by dpu_PN_gen(), dpu_scr(), and dpu_scr_init().

Fract dpu_scr_t::counter

Definition at line 43 of file dpu_scr.h.

Referenced by dpu_scr_init(), and dpu_scr_v27().

Fract dpu_scr_t::next_bit

Definition at line 44 of file dpu_scr.h.

Referenced by dpu_scr_init(), and dpu_scr_v27().

const Fract* dpu_scr_t::pn_table

Definition at line 45 of file dpu_scr.h.

Referenced by dpu_PN_gen(), and dpu_scr_init().

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


FM: dpu_shaping_bank_t Struct Reference

  • Data Structures
  • Data Fields

dpu_shaping_bank_t Struct Reference

#include <fmTablesTypes.h>

Detailed Description

Definition at line 36 of file fmTablesTypes.h.

Data Fields

Fract | filters_re [SHAP_MAX_L][SHAP_MAX_M_COEF]
Fract | filters_im [SHAP_MAX_L][SHAP_MAX_M_COEF]

Field Documentation

Fract dpu_shaping_bank_t::filters_re[SHAP_MAX_L][SHAP_MAX_M_COEF]

Definition at line 38 of file fmTablesTypes.h.

Referenced by dpu_shaping().

Fract dpu_shaping_bank_t::filters_im[SHAP_MAX_L][SHAP_MAX_M_COEF]

Definition at line 39 of file fmTablesTypes.h.

Referenced by dpu_shaping().

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


FM: dpu_shaping_t Struct Reference

  • Data Structures
  • Data Fields

dpu_shaping_t Struct Reference

#include <dpu_shap.h>

Collaboration diagram for dpu_shaping_t:

[legend]

Detailed Description

Definition at line 38 of file dpu_shap.h.

Data Fields

Fract | L1
Fract | length
const dpu_shaping_bank_t * | filter
Fract * | oldin_re
Fract * | oldin_im

Field Documentation

Fract dpu_shaping_t::L1

Definition at line 40 of file dpu_shap.h.

Referenced by dpu_shaping(), and dpu_tx_shaping_init().

Fract dpu_shaping_t::length

Definition at line 41 of file dpu_shap.h.

Referenced by dpu_shaping(), and dpu_tx_shaping_init().

const dpu_shaping_bank_t* dpu_shaping_t::filter

Definition at line 42 of file dpu_shap.h.

Referenced by dpu_shaping(), and dpu_tx_shaping_init().

Fract* dpu_shaping_t::oldin_re

Definition at line 43 of file dpu_shap.h.

Referenced by dpu_shaping(), dpu_tx_shaping_init(), and dpuNew().

Fract* dpu_shaping_t::oldin_im

Definition at line 44 of file dpu_shap.h.

Referenced by dpu_shaping(), dpu_tx_shaping_init(), and dpuNew().

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


FM: dpu_slic_t Struct Reference

  • Data Structures
  • Data Fields

dpu_slic_t Struct Reference

#include <dpu_slic.h>

Collaboration diagram for dpu_slic_t:

[legend]

Detailed Description

Definition at line 93 of file dpu_slic.h.

Data Fields

Fract * | decis_table
Fract | x_ideal
Fract | y_ideal
Fract | x_error
Fract | y_error
Fract | ph_error
Fract | ph_error_scale
const Fract * | invmod_table
Fract | invmod_mask
const Fract * | bits_table
LFract | avgNoisePow
LFract | avgSignalPow
dpu_cdec_t * cdec_ptr

Field Documentation

Fract* dpu_slic_t::decis_table

Definition at line 94 of file dpu_slic.h.

Referenced by dpu_v27_v29_slicer(), v27RxSt7Init(), and v29RxSt7Init().

Fract dpu_slic_t::x_ideal

Definition at line 95 of file dpu_slic.h.

Referenced by dpu_v27_v29_slicer(), and dpuUpdateSNRparms().

Fract dpu_slic_t::y_ideal

Definition at line 96 of file dpu_slic.h.

Referenced by dpu_v27_v29_slicer(), and dpuUpdateSNRparms().

Fract dpu_slic_t::x_error

Definition at line 97 of file dpu_slic.h.

Referenced by dpu_v27_v29_slicer(), and dpuUpdateSNRparms().

Fract dpu_slic_t::y_error

Definition at line 98 of file dpu_slic.h.

Referenced by dpu_v27_v29_slicer(), and dpuUpdateSNRparms().

Fract dpu_slic_t::ph_error

Definition at line 99 of file dpu_slic.h.

Referenced by dpu_v27_v29_slicer().

Fract dpu_slic_t::ph_error_scale

Definition at line 100 of file dpu_slic.h.

Referenced by dpu_slic_init().

const Fract* dpu_slic_t::invmod_table

Definition at line 101 of file dpu_slic.h.

Referenced by dpu_v27_v29_slicer(), v27RxSt7Init(), and v29RxSt7Init().

Fract dpu_slic_t::invmod_mask

Definition at line 102 of file dpu_slic.h.

Referenced by v27RxSt7Init(), and v29RxSt7Init().

const Fract* dpu_slic_t::bits_table

Definition at line 103 of file dpu_slic.h.

Referenced by dpu_v27_v29_slicer(), v27RxSt7Init(), and v29RxSt7Init().

LFract dpu_slic_t::avgNoisePow

Definition at line 104 of file dpu_slic.h.

Referenced by dpu_slic_init(), dpuStatus(), and dpuUpdateSNRparms().

LFract dpu_slic_t::avgSignalPow

Definition at line 105 of file dpu_slic.h.

Referenced by dpu_slic_init(), dpuStatus(), and dpuUpdateSNRparms().

dpu_cdec_t* dpu_slic_t::cdec_ptr

Definition at line 106 of file dpu_slic.h.

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


FM: dpu_smap_t Struct Reference

  • Data Structures
  • Data Fields

dpu_smap_t Struct Reference

#include <dpu_smap.h>

Detailed Description

Definition at line 48 of file dpu_smap.h.

Data Fields

Fract | pre_symbol
const Fract * | smap_table

Field Documentation

Fract dpu_smap_t::pre_symbol

Definition at line 49 of file dpu_smap.h.

Referenced by dpu_dot(), dpu_smap_init(), and dpu_v27_St3_smap().

const Fract* dpu_smap_t::smap_table

Definition at line 50 of file dpu_smap.h.

Referenced by dpu_dot(), dpu_smap(), dpu_smap_init(), dpu_v27_St3_smap(), and v27RxSt4Init().

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


FM: dpu_trec_bank_t Struct Reference

  • Data Structures
  • Data Fields

dpu_trec_bank_t Struct Reference

#include <fmTablesTypes.h>

Detailed Description

Definition at line 28 of file fmTablesTypes.h.

Data Fields

Fract filters [DPU_TREC_NUMBER][DPU_TREC_LEN]

Field Documentation

Fract dpu_trec_bank_t::filters[DPU_TREC_NUMBER][DPU_TREC_LEN]

Definition at line 30 of file fmTablesTypes.h.

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


FM: dpu_trec_t Struct Reference

  • Data Structures
  • Data Fields

dpu_trec_t Struct Reference

#include <dpu_trec.h>

Collaboration diagram for dpu_trec_t:

[legend]

Detailed Description

Definition at line 69 of file dpu_trec.h.

Data Fields

tint | trec_enable
int | length
int | count
int | index
Fract | one_mu
Fract | scale
cmplx_t f1
cmplx_t f2
cmplx_t hh1
cmplx_t hh2
cmplx_t dcComponent
Fract * | output
Fract * | delay
int | int_filt_index
int | filt_index_inc
LFract | rot_real_est
LFract | rot_imag_est
Fract | rot_real
Fract | rot_imag
Fract | alpha
Fract | division
int | ttone_count
Fract | k1
Fract | k2
Fract | p1
Fract | threshold
Fract | accum
Fract | old_p1
LFract | accumReal
LFract | accumImag
int | angleComputeFlag

Field Documentation

tint dpu_trec_t::trec_enable

Definition at line 71 of file dpu_trec.h.

Referenced by dpu_trec_init(), dpu_trec_interp(), dpu_ttone(), v27RxSt34Init(), and v29RxSt34Init().

int dpu_trec_t::length

Definition at line 72 of file dpu_trec.h.

Referenced by dpu_trec_init(), and dpu_trec_interp().

int dpu_trec_t::count

Definition at line 73 of file dpu_trec.h.

Referenced by dpu_trec_init(), and dpu_trec_interp().

int dpu_trec_t::index

Definition at line 74 of file dpu_trec.h.

Referenced by dpu_trec_interp().

Fract dpu_trec_t::one_mu

Definition at line 75 of file dpu_trec.h.

Referenced by dpu_trec_init(), and dpu_ttone().

Fract dpu_trec_t::scale

Definition at line 77 of file dpu_trec.h.

cmplx_t dpu_trec_t::f1

Definition at line 79 of file dpu_trec.h.

Referenced by dpu_trec_init(), and dpu_ttone().

cmplx_t dpu_trec_t::f2

Definition at line 80 of file dpu_trec.h.

Referenced by dpu_trec_init(), and dpu_ttone().

cmplx_t dpu_trec_t::hh1

Definition at line 81 of file dpu_trec.h.

Referenced by dpu_trec_init(), and dpu_ttone().

cmplx_t dpu_trec_t::hh2

Definition at line 82 of file dpu_trec.h.

Referenced by dpu_trec_init(), and dpu_ttone().

cmplx_t dpu_trec_t::dcComponent

Definition at line 83 of file dpu_trec.h.

Referenced by dpu_trec_init(), and dpu_ttone().

Fract* dpu_trec_t::output

Definition at line 85 of file dpu_trec.h.

Referenced by dpu_trec_interp(), and dpuNew().

Fract* dpu_trec_t::delay

Definition at line 86 of file dpu_trec.h.

Referenced by dpu_trec_init(), dpu_trec_interp(), and dpuNew().

int dpu_trec_t::int_filt_index

Definition at line 88 of file dpu_trec.h.

Referenced by dpu_trec_init(), and dpu_ttone().

int dpu_trec_t::filt_index_inc

Definition at line 89 of file dpu_trec.h.

Referenced by dpu_trec_init(), and dpu_ttone().

LFract dpu_trec_t::rot_real_est

Definition at line 91 of file dpu_trec.h.

Referenced by dpu_trec_init(), dpu_ttone(), v27RxSt34Init(), v27RxSt3Init(), v29RxSt34Init(), and v29RxSt3Init().

LFract dpu_trec_t::rot_imag_est

Definition at line 92 of file dpu_trec.h.

Referenced by dpu_trec_init(), dpu_ttone(), v27RxSt34Init(), v27RxSt3Init(), v29RxSt34Init(), and v29RxSt3Init().

Fract dpu_trec_t::rot_real

Definition at line 94 of file dpu_trec.h.

Referenced by dpu_trec_init(), dpu_ttone(), v27RxSt34Init(), and v29RxSt34Init().

Fract dpu_trec_t::rot_imag

Definition at line 95 of file dpu_trec.h.

Referenced by dpu_trec_init(), dpu_ttone(), v27RxSt34Init(), and v29RxSt34Init().

Fract dpu_trec_t::alpha

Definition at line 97 of file dpu_trec.h.

Referenced by dpu_trec_init(), and dpu_ttone().

Fract dpu_trec_t::division

Definition at line 98 of file dpu_trec.h.

Referenced by dpu_trec_init(), and dpu_ttone().

int dpu_trec_t::ttone_count

Definition at line 99 of file dpu_trec.h.

Referenced by dpu_trec_init(), and dpu_ttone().

Fract dpu_trec_t::k1

Definition at line 101 of file dpu_trec.h.

Referenced by dpu_trec_init(), and dpu_ttone().

Fract dpu_trec_t::k2

Definition at line 102 of file dpu_trec.h.

Referenced by dpu_trec_init(), and dpu_ttone().

Fract dpu_trec_t::p1

Definition at line 103 of file dpu_trec.h.

Referenced by dpu_trec_init(), dpu_ttone(), and dpuStatus().

Fract dpu_trec_t::threshold

Definition at line 104 of file dpu_trec.h.

Referenced by dpu_trec_init(), and dpu_ttone().

Fract dpu_trec_t::accum

Definition at line 105 of file dpu_trec.h.

Referenced by dpu_trec_init(), and dpu_ttone().

Fract dpu_trec_t::old_p1

Definition at line 106 of file dpu_trec.h.

LFract dpu_trec_t::accumReal

Definition at line 108 of file dpu_trec.h.

Referenced by dpu_trec_init(), and dpu_ttone().

LFract dpu_trec_t::accumImag

Definition at line 109 of file dpu_trec.h.

Referenced by dpu_trec_init(), and dpu_ttone().

int dpu_trec_t::angleComputeFlag

Definition at line 111 of file dpu_trec.h.

Referenced by dpu_trec_init().

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


FM: dpu_v21_dec_t Struct Reference

  • Data Structures
  • Data Fields

dpu_v21_dec_t Struct Reference

#include <dpu_fsk.h>

Detailed Description

Definition at line 46 of file dpu_fsk.h.

Data Fields

int | count
int | cross_count
int | start
int | samp_req
Fract | pre_sample
Fract | pattern

Field Documentation

int dpu_v21_dec_t::count

Definition at line 48 of file dpu_fsk.h.

Referenced by dpu_v21_check_high(), and dpu_v21_dec_init().

int dpu_v21_dec_t::cross_count

Definition at line 49 of file dpu_fsk.h.

Referenced by dpu_v21_check_high(), dpu_v21_dec(), and dpu_v21_dec_init().

int dpu_v21_dec_t::start

Definition at line 50 of file dpu_fsk.h.

Referenced by dpu_v21_dec(), and dpu_v21_dec_init().

int dpu_v21_dec_t::samp_req

Definition at line 51 of file dpu_fsk.h.

Referenced by dpu_v21_dec_init().

Fract dpu_v21_dec_t::pre_sample

Definition at line 52 of file dpu_fsk.h.

Referenced by dpu_v21_check_high(), dpu_v21_dec(), and dpu_v21_dec_init().

Fract dpu_v21_dec_t::pattern

Definition at line 53 of file dpu_fsk.h.

Referenced by dpu_v21_check(), dpu_v21_dec(), and dpu_v21_dec_init().

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


FM: dpuCfg_t Struct Reference

  • Data Structures
  • Data Fields

dpuCfg_t Struct Reference

#include <dpu.h>

Collaboration diagram for dpuCfg_t:

[legend]

Detailed Description

Definition at line 245 of file dpu.h.

Data Fields

int | samples_per_seg
dpuSendOut_t send_out
dpuRecvOut_t recv_out
int | frame
int | mode
int | protocol
int | rate
int | direction
int | trn_type
int | time_out
int | tx_level
int | max_rate
int | min_rate
int | rx_cd_thr_set
int | dummy
tint | trellis
tuint | DPUfeatureBitMap
fmTablePtrs_t * TablePtr

Field Documentation

int dpuCfg_t::samples_per_seg

Definition at line 247 of file dpu.h.

dpuSendOut_t dpuCfg_t::send_out

Definition at line 248 of file dpu.h.

dpuRecvOut_t dpuCfg_t::recv_out

Definition at line 251 of file dpu.h.

int dpuCfg_t::frame

Definition at line 254 of file dpu.h.

Referenced by dpuconfigRX(), dpuOpen(), fmOpen(), and vxx_tx_init().

int dpuCfg_t::mode

Definition at line 255 of file dpu.h.

Referenced by dpuconfigRX(), FAX_MODEM(), and vxx_tx_init().

int dpuCfg_t::protocol

Definition at line 256 of file dpu.h.

Referenced by dpu_rx_common_init(), dpuOpen(), and fmOpen().

int dpuCfg_t::rate

Definition at line 257 of file dpu.h.

Referenced by dpuconfigRX(), FAX_MODEM(), and vxx_tx_init().

int dpuCfg_t::direction

Definition at line 258 of file dpu.h.

Referenced by dpuConfig(), and FAX_MODEM().

int dpuCfg_t::trn_type

Definition at line 259 of file dpu.h.

Referenced by FAX_MODEM().

int dpuCfg_t::time_out

Definition at line 260 of file dpu.h.

int dpuCfg_t::tx_level

Definition at line 261 of file dpu.h.

Referenced by dpuOpen(), fmOpen(), and vxx_tx_init().

int dpuCfg_t::max_rate

Definition at line 262 of file dpu.h.

int dpuCfg_t::min_rate

Definition at line 263 of file dpu.h.

int dpuCfg_t::rx_cd_thr_set

Definition at line 264 of file dpu.h.

Referenced by dpuconfigRX(), dpuOpen(), and fmOpen().

int dpuCfg_t::dummy

Definition at line 265 of file dpu.h.

tint dpuCfg_t::trellis

Definition at line 266 of file dpu.h.

tuint dpuCfg_t::DPUfeatureBitMap

Definition at line 267 of file dpu.h.

Referenced by dpuOpen(), and fmOpen().

fmTablePtrs_t* dpuCfg_t::TablePtr

Definition at line 268 of file dpu.h.

Referenced by dpuOpen(), and fmOpen().

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


FM: dpuIf_t Struct Reference

  • Data Structures
  • Data Fields

dpuIf_t Struct Reference

#include <fmloc.h>

Collaboration diagram for dpuIf_t:

[legend]

Detailed Description

Definition at line 156 of file fmloc.h.

Data Fields

void * | TargetInst
fm_ctrl_str CtrlParam
tword | DataBuf [FM_DPU_DATA_BUF_SIZE]

Field Documentation

void* dpuIf_t::TargetInst

Definition at line 158 of file fmloc.h.

Referenced by fmClose(), fmDpuProcessDataRx(), fmDpuProcessDataTx(), fmOpen(), fmSendIn(), and fmStats().

fm_ctrl_str dpuIf_t::CtrlParam

Definition at line 159 of file fmloc.h.

Referenced by fmCheckCarrierOff(), fmCheckCarrierOn(), fmCheckP2(), fmCheckPreamble(), fmCheckSignalPresent(), fmCheckTep(), fmDpuProcessDataRx(), fmDpuProcessDataTx(), fmHdlcRx(), fmModeChange(), fmOpen(), fmStateRx(), fmStateTxHsInit(), and fmStateTxLsInit().

tword dpuIf_t::DataBuf[FM_DPU_DATA_BUF_SIZE]

Definition at line 160 of file fmloc.h.

Referenced by fmDpuProcessDataTx(), fmHdlcRx(), fmOpen(), fmStateRx(), fmStateTxHsEcm(), fmStateTxHsInit(), fmStateTxHsPreOff(), fmStateTxLsData(), fmStateTxLsFlag(), and fmStateTxLsInit().

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


FM: dpuInst_s Struct Reference

  • Data Structures
  • Data Fields

dpuInst_s Struct Reference

#include <dpuloc.h>

Collaboration diagram for dpuInst_s:

[legend]

Detailed Description

Definition at line 424 of file dpuloc.h.

Data Fields

tuint ID
dpuCfg_t cfg
fmSigQStats_t sts
dpuCtrl_t ctrl
dpuSizeCfg_t sizeCfg
dpuTxInst_t TxInst
dpuRxInst_t RxInst
fmTablePtrs_t * TablePtr

Field Documentation

tuint dpuInst_s::ID

Definition at line 425 of file dpuloc.h.

Referenced by dpuNew(), and dpuOpen().

dpuCfg_t dpuInst_s::cfg

Definition at line 426 of file dpuloc.h.

Referenced by dpu_rx_common_init(), dpuConfig(), dpuconfigRX(), dpuOpen(), FAX_MODEM(), and vxx_tx_init().

fmSigQStats_t dpuInst_s::sts

Definition at line 427 of file dpuloc.h.

Referenced by dpuOpen(), dpuStatus(), v21Rx(), v21RxStM(), v21TxStM(), v27RxStM(), v27TxStM(), v29RxStM(), and v29TxStM().

dpuCtrl_t dpuInst_s::ctrl

Definition at line 428 of file dpuloc.h.

Referenced by dpuConfig(), dpuControl(), dpuTx(), FAX_MODEM(), v21RxStM(), v21TxStM(), v27RxStM(), v29RxStM(), and v29TxStM().

dpuSizeCfg_t dpuInst_s::sizeCfg

Definition at line 429 of file dpuloc.h.

Referenced by dpuNew().

dpuTxInst_t dpuInst_s::TxInst

Definition at line 432 of file dpuloc.h.

Referenced by dpuClose(), dpuConfig(), dpuControl(), dpuNew(), dpuOpen(), dpuStatus(), dpuTx(), v21TxStM(), v27TxSt1Init(), v27TxSt2Init(), v27TxSt3Init(), v27TxSt4Init(), v27TxSt5Init(), v27TxStM(), v29TxSt1Init(), v29TxSt2Init(), v29TxSt3Init(), v29TxSt4Init(), v29TxStM(), vHSTx(), and vxx_tx_init().

dpuRxInst_t dpuInst_s::RxInst

Definition at line 433 of file dpuloc.h.

Referenced by dpu_rx_common_init(), dpu_rx_v21_init(), dpu_rx_v27_init(), dpu_trec_init(), dpuClose(), dpuConfig(), dpuconfigRX(), dpuControl(), dpuNew(), dpuOpen(), dpuRx(), dpuRx2400BaudInit(), dpuStatus(), FAX_MODEM(), HSrxCommonSt1Init(), rxLSinitInHS(), v21Rx(), v21RxCommonInit(), v21RxSt1Init(), v21RxSt3Init(), v21RxStM(), v21RxStNULLInit(), v27RxSt1Init(), v27RxSt2Init(), v27RxSt34Init(), v27RxSt3Init(), v27RxSt4Init(), v27RxSt5Init(), v27RxSt6Init(), v27RxSt7Init(), v27RxSt8Init(), v27RxStM(), v29RxSt1Init(), v29RxSt2Init(), v29RxSt34Init(), v29RxSt3Init(), v29RxSt4Init(), v29RxSt5Init(), v29RxSt6Init(), v29RxSt7Init(), v29RxSt8Init(), v29RxStM(), and vHSRx().

fmTablePtrs_t* dpuInst_s::TablePtr

Definition at line 434 of file dpuloc.h.

Referenced by dpu_trec_init(), dpuconfigRX(), dpuOpen(), FAX_MODEM(), fmSendIn(), v21RxCommonInit(), v27RxSt1Init(), v27RxSt7Init(), v27TxSt4Init(), v27TxStM(), v29RxSt1Init(), v29RxSt34Init(), v29RxSt4Init(), v29RxSt7Init(), v29TxSt2Init(), v29TxSt3Init(), and vxx_tx_init().

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


FM: dpuNewCfg_t Struct Reference

  • Data Structures
  • Data Fields

dpuNewCfg_t Struct Reference

#include <dpu.h>

Collaboration diagram for dpuNewCfg_t:

[legend]

Detailed Description

Definition at line 227 of file dpu.h.

Data Fields

tuint ID
dpuSizeCfg_t sizeCfg

Field Documentation

tuint dpuNewCfg_t::ID

Definition at line 229 of file dpu.h.

Referenced by dpuNew().

dpuSizeCfg_t dpuNewCfg_t::sizeCfg

Definition at line 230 of file dpu.h.

Referenced by dpuNew().

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


FM: dpuRecvOut_t Struct Reference

  • Data Structures
  • Data Fields

dpuRecvOut_t Struct Reference

#include <dpu.h>

Detailed Description

Definition at line 240 of file dpu.h.

Data Fields

void(* | fcn_ptr )(void *targInst, void *samples)
void * | targInst

Field Documentation

void(* dpuRecvOut_t::fcn_ptr)(void *targInst, void *samples)

void* dpuRecvOut_t::targInst

Definition at line 242 of file dpu.h.

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


FM: dpuRxInst_t Struct Reference

  • Data Structures
  • Data Fields

dpuRxInst_t Struct Reference

#include <dpuloc.h>

Collaboration diagram for dpuRxInst_t:

[legend]

Detailed Description

Definition at line 301 of file dpuloc.h.

Data Fields

Fract | rx_baud
Fract | bts_per_baud
Fract | baud_per_seg
Fract | samp_per_baud
Fract | samp_per_seg
Fract | rx_count
Fract | rx_state
Fract | rx_mode
Fract | rx_rate
Fract | change_det
Fract | buf_in_index
Fract | buf_rx_index
Fract * | in_buf
Fract * | data_out_buf
tint | fsl_bitfield
Fract | phase_err_mul
Fract | freeze_count
void(* | procfn )(void *Inst, Fract *inputtput, Fract *x_sym, Fract *y_sym, int index, tword *output_data)
void(* | smfn )(void *Inst)
void(* | trec_fcn )(dpu_trec_t *inst, Fract *input, int samp, int index, Fract *trec_table_ptr)
int(* | cddet_fcn )(dpu_cddet_t *inst, Fract *in, int samp, int n, Fract *gain, tint *rx_level)
int(* | dotdet_fcn )(dpu_dotdet_t *dotdet_ptr, Fract *in, int samp, int n, Fract *gain, tint *rx_level)
void(* | agc_fcn )(dpu_agc_t *agc_ptr, Fract *in, int samp, int n)
void(* | bphilb_fcn )(dpu_bphilb_t *bphilb_ptr, Fract *in, Fract *out_re, Fract *out_im, int samp, int n)
void(* | adeq_fcn )(dpu_adeq_t *adeq_ptr, Fract *in_re, Fract *in_im, Fract *out_re, Fract *out_im, Fract samp, int n)
void(* | demod_fcn )(dpu_crec_t *mod_ptr, Fract *x_re, Fract *y_im)
void(* | err_phase_fcn )(dpu_phase_t *phase_ptr, Fract *x_re, Fract *y_im, Fract a_re, Fract a_im, Fract *phase, Fract *premap, Fract dpu_slic_invmod_v17_tbl_ptr[][10])
void(* | crec_fcn )(dpu_crec_t *crec_ptr, Fract *phase, Fract *cf_offset)
void(* | update_adeq_fcn )(dpu_adeq_t *update_adeq_ptr, Fract err_re, Fract err_im, Fract cosfn, Fract sinfn)
void(* | descr_fcn )(dpu_descr_t *descr_ptr, Fract *bits)
void(* | cdec_fcn )(dpu_cdec_t *cdec_ptr, Fract x_sym, Fract y_sym, Fract *bits)
void(* | ddec_fcn )(dpu_ddec_t *ddec_ptr, Fract *bits)
void(* | slic_fcn )(dpu_slic_t *slic_ptr, Fract *x_sym, Fract *y_sim, Fract *rx_bits, Fract *inv_power, Fract *slic_pt_tbl_V29_72, Fract *slic_pt_tbl_V27_48, Fract *slic_pt_tbl_V27_24, const Fract *dpu_PN_smap_tbl_v17_AllRates, Fract dpu_slic_invmod_tbl_v17[][10])
int(* | intrp_fcn )(dpu_interp_t *intrp_ptr, Fract *input, Fract *output, int length)
int(* | v21_fcn )(dpu_v21_dec_t *v21_ptr, Fract *input, int samp, Fract *output, Fract *n)
int(* | data_fcn )(dpu_outman_t *inst, Fract *input, Fract bits_per_baud, int bauds, tword *output_data)
int(* | copy_fcn )(dpu_outman_t *inst, Fract *byts)
void(* | scr_fcn )(dpu_scr_t *scr_ptr, Fract *bits)
void(* | smap_fcn )(dpu_smap_t *smap_ptr, Fract *bits, Fract *x_sym, Fract *y_sim, int index)
dpu_cddet_t cddet_inst
dpu_trec_t trec_inst
dpu_dotdet_t dotdet_inst
dpu_agc_t agc_inst
dpu_bphilb_t bphilb_inst
dpu_adeq_t adeq_inst
dpu_crec_t mod_inst
dpu_phase_t phase_inst
dpu_descr_t descr_inst
dpu_ddec_t ddec_inst
dpu_cdec_t cdec_inst
dpu_slic_t slic_inst
dpu_interp_t interp_inst
dpu_v21_dec_t v21_dec_inst
dpu_outman_t outman_inst
dpu_scr_t scr_inst
dpu_smap_t smap_inst

Field Documentation

Fract dpuRxInst_t::rx_baud

Definition at line 302 of file dpuloc.h.

Referenced by dpu_rx_common_init().

Fract dpuRxInst_t::bts_per_baud

Definition at line 303 of file dpuloc.h.

Referenced by dpu_rx_common_init().

Fract dpuRxInst_t::baud_per_seg

Definition at line 304 of file dpuloc.h.

Referenced by dpu_rx_common_init(), and dpuRx().

Fract dpuRxInst_t::samp_per_baud

Definition at line 305 of file dpuloc.h.

Referenced by dpu_rx_v21_init(), dpu_rx_v27_init(), dpuHSrxSetCdParms(), dpuRx2400BaudInit(), dpuStatus(), fmHSrxSetCdParms(), v21Rx(), v21RxCommonInit(), v27RxSt1Init(), v29RxSt1Init(), v29RxSt3Init(), and vHSRx().

Fract dpuRxInst_t::samp_per_seg

Definition at line 306 of file dpuloc.h.

Referenced by dpu_rx_common_init(), dpuRx(), and v21RxStNULLInit().

Fract dpuRxInst_t::rx_count

Definition at line 307 of file dpuloc.h.

Referenced by dpuStatus(), HSrxCommonSt1Init(), v21RxCommonInit(), v21RxSt3Init(), v21RxStNULLInit(), v27RxSt34Init(), v27RxSt3Init(), v27RxSt4Init(), v27RxSt5Init(), v27RxSt6Init(), v27RxSt7Init(), v27RxSt8Init(), v27RxStM(), v29RxSt34Init(), v29RxSt3Init(), v29RxSt4Init(), v29RxSt5Init(), v29RxSt6Init(), v29RxSt7Init(), v29RxSt8Init(), and v29RxStM().

Fract dpuRxInst_t::rx_state

Definition at line 308 of file dpuloc.h.

Referenced by dpuStatus(), FAX_MODEM(), v21RxSt1Init(), v21RxSt3Init(), v21RxStM(), v21RxStNULLInit(), v27RxSt1Init(), v27RxSt2Init(), v27RxSt34Init(), v27RxSt3Init(), v27RxSt4Init(), v27RxSt5Init(), v27RxSt6Init(), v27RxSt7Init(), v27RxSt8Init(), v27RxStM(), v29RxSt1Init(), v29RxSt2Init(), v29RxSt34Init(), v29RxSt3Init(), v29RxSt4Init(), v29RxSt5Init(), v29RxSt6Init(), v29RxSt7Init(), v29RxSt8Init(), and v29RxStM().

Fract dpuRxInst_t::rx_mode

Definition at line 309 of file dpuloc.h.

Referenced by dpu_rx_common_init().

Fract dpuRxInst_t::rx_rate

Definition at line 310 of file dpuloc.h.

Referenced by dpu_rx_common_init(), dpuClose(), dpuConfig(), dpuControl(), dpuNew(), dpuOpen(), dpuRx(), dpuStatus(), v21RxStM(), v27RxSt1Init(), v27RxSt34Init(), v27RxSt3Init(), v27RxSt4Init(), v27RxSt7Init(), v27RxStM(), v29RxSt34Init(), v29RxSt3Init(), v29RxSt4Init(), v29RxSt6Init(), v29RxSt7Init(), and v29RxStM().

Fract dpuRxInst_t::change_det

Definition at line 311 of file dpuloc.h.

Referenced by HSrxCommonSt1Init(), rxLSinitInHS(), v21Rx(), v21RxStM(), v21RxStNULLInit(), v27RxSt3Init(), v27RxStM(), v29RxSt3Init(), v29RxStM(), and vHSRx().

Fract dpuRxInst_t::buf_in_index

Definition at line 312 of file dpuloc.h.

Fract dpuRxInst_t::buf_rx_index

Definition at line 313 of file dpuloc.h.

Fract* dpuRxInst_t::in_buf

Definition at line 314 of file dpuloc.h.

Fract* dpuRxInst_t::data_out_buf

Definition at line 315 of file dpuloc.h.

Referenced by dpuNew(), HSrxCommonSt1Init(), v21RxStM(), and v21RxStNULLInit().

tint dpuRxInst_t::fsl_bitfield

Definition at line 318 of file dpuloc.h.

Referenced by dpuconfigRX().

Fract dpuRxInst_t::phase_err_mul

Definition at line 323 of file dpuloc.h.

Referenced by dpuconfigRX().

Fract dpuRxInst_t::freeze_count

Definition at line 324 of file dpuloc.h.

Referenced by dpuconfigRX().

void(* dpuRxInst_t::procfn)(void *Inst, Fract *inputtput, Fract *x_sym, Fract *y_sym, int index, tword *output_data)

Referenced by dpu_rx_v21_init(), dpuRx(), HSrxCommonSt1Init(), and rxLSinitInHS().

void(* dpuRxInst_t::smfn)(void *Inst)

Referenced by dpu_rx_v21_init(), dpuRx(), v27RxSt1Init(), v27RxSt2Init(), v29RxSt1Init(), and v29RxSt2Init().

void(* dpuRxInst_t::trec_fcn)(dpu_trec_t *inst,Fract *input, int samp, int index, Fract *trec_table_ptr)

Referenced by HSrxCommonSt1Init(), v27RxSt3Init(), and v29RxSt3Init().

int(* dpuRxInst_t::cddet_fcn)(dpu_cddet_t *inst,Fract *in, int samp, int n, Fract *gain, tint *rx_level)

Referenced by dpuHSrxSetCdParms(), fmHSrxSetCdParms(), HSrxCommonSt1Init(), rxLSinitInHS(), v21Rx(), v21RxSt1Init(), v21RxStNULLInit(), and vHSRx().

int(* dpuRxInst_t::dotdet_fcn)(dpu_dotdet_t *dotdet_ptr,Fract *in, int samp, int n, Fract *gain, tint *rx_level)

Referenced by HSrxCommonSt1Init(), v27RxSt34Init(), v27RxSt3Init(), v29RxSt34Init(), and v29RxSt3Init().

void(* dpuRxInst_t::agc_fcn)(dpu_agc_t *agc_ptr,Fract *in, int samp, int n)

Referenced by HSrxCommonSt1Init(), v21Rx(), v21RxCommonInit(), and v21RxStNULLInit().

void(* dpuRxInst_t::bphilb_fcn)(dpu_bphilb_t *bphilb_ptr,Fract *in, Fract *out_re, Fract *out_im, int samp, int n)

Referenced by HSrxCommonSt1Init(), v21Rx(), v21RxCommonInit(), and v21RxStNULLInit().

void(* dpuRxInst_t::adeq_fcn)(dpu_adeq_t *adeq_ptr,Fract *in_re, Fract *in_im, Fract *out_re, Fract *out_im, Fract samp, int n)

Referenced by HSrxCommonSt1Init(), v27RxSt3Init(), and v29RxSt3Init().

void(* dpuRxInst_t::demod_fcn)(dpu_crec_t *mod_ptr,Fract *x_re, Fract *y_im)

Referenced by HSrxCommonSt1Init(), v21Rx(), v21RxCommonInit(), v21RxStNULLInit(), v27RxSt3Init(), and v29RxSt3Init().

void(* dpuRxInst_t::err_phase_fcn)(dpu_phase_t *phase_ptr,Fract *x_re, Fract *y_im, Fract a_re, Fract a_im, Fract *phase, Fract *premap, Fract dpu_slic_invmod_v17_tbl_ptr[][10])

Referenced by HSrxCommonSt1Init(), v27RxSt34Init(), v27RxSt4Init(), v27RxSt8Init(), v29RxSt34Init(), v29RxSt4Init(), and v29RxSt7Init().

void(* dpuRxInst_t::crec_fcn)(dpu_crec_t *crec_ptr,Fract *phase, Fract *cf_offset)

Referenced by HSrxCommonSt1Init(), v27RxSt34Init(), v27RxSt3Init(), v29RxSt34Init(), and v29RxSt3Init().

void(* dpuRxInst_t::update_adeq_fcn)(dpu_adeq_t *update_adeq_ptr,Fract err_re, Fract err_im, Fract cosfn, Fract sinfn)

Referenced by HSrxCommonSt1Init(), v27RxSt34Init(), and v29RxSt34Init().

void(* dpuRxInst_t::descr_fcn)(dpu_descr_t *descr_ptr,Fract *bits)

Referenced by HSrxCommonSt1Init(), v27RxSt4Init(), and v29RxSt7Init().

void(* dpuRxInst_t::cdec_fcn)(dpu_cdec_t *cdec_ptr,Fract x_sym, Fract y_sym, Fract *bits)

Referenced by HSrxCommonSt1Init().

void(* dpuRxInst_t::ddec_fcn)(dpu_ddec_t *ddec_ptr,Fract *bits)

Referenced by HSrxCommonSt1Init(), v27RxSt7Init(), and v29RxSt7Init().

void(* dpuRxInst_t::slic_fcn)(dpu_slic_t *slic_ptr,Fract *x_sym, Fract *y_sim, Fract *rx_bits, Fract *inv_power, Fract *slic_pt_tbl_V29_72, Fract *slic_pt_tbl_V27_48, Fract *slic_pt_tbl_V27_24, const Fract *dpu_PN_smap_tbl_v17_AllRates, Fract dpu_slic_invmod_tbl_v17[][10])

Referenced by HSrxCommonSt1Init(), v27RxSt7Init(), and v29RxSt7Init().

int(* dpuRxInst_t::intrp_fcn)(dpu_interp_t *intrp_ptr,Fract *input, Fract *output, int length)

Referenced by dpu_rx_v21_init(), dpuRx(), and HSrxCommonSt1Init().

int(* dpuRxInst_t::v21_fcn)(dpu_v21_dec_t *v21_ptr,Fract *input, int samp, Fract *output, Fract *n)

Referenced by rxLSinitInHS(), v21RxSt1Init(), v21RxSt3Init(), and v21RxStNULLInit().

int(* dpuRxInst_t::data_fcn)(dpu_outman_t *inst,Fract *input, Fract bits_per_baud, int bauds, tword *output_data)

Referenced by HSrxCommonSt1Init(), rxLSinitInHS(), v21RxSt1Init(), v21RxSt3Init(), v21RxStNULLInit(), v27RxSt8Init(), and v29RxSt8Init().

int(* dpuRxInst_t::copy_fcn)(dpu_outman_t *inst, Fract *byts)

Referenced by dpu_rx_v21_init(), dpuRx(), HSrxCommonSt1Init(), rxLSinitInHS(), v27RxSt8Init(), and v29RxSt8Init().

void(* dpuRxInst_t::scr_fcn)(dpu_scr_t *scr_ptr,Fract *bits)

Referenced by HSrxCommonSt1Init(), v27RxSt4Init(), v27RxSt7Init(), v29RxSt4Init(), and v29RxSt7Init().

void(* dpuRxInst_t::smap_fcn)(dpu_smap_t *smap_ptr,Fract *bits, Fract *x_sym, Fract *y_sim, int index)

Referenced by HSrxCommonSt1Init(), v27RxSt4Init(), v27RxSt7Init(), v29RxSt4Init(), and v29RxSt7Init().

dpu_cddet_t dpuRxInst_t::cddet_inst

Definition at line 403 of file dpuloc.h.

Referenced by dpuconfigRX(), dpuHSrxSetCdParms(), dpuStatus(), FAX_MODEM(), fmHSrxSetCdParms(), v21Rx(), v21RxStNULLInit(), v27RxSt8Init(), v29RxSt8Init(), and vHSRx().

dpu_trec_t dpuRxInst_t::trec_inst

Definition at line 404 of file dpuloc.h.

Referenced by dpu_trec_init(), dpuNew(), dpuStatus(), v27RxSt34Init(), v27RxSt3Init(), v29RxSt34Init(), and v29RxSt3Init().

dpu_dotdet_t dpuRxInst_t::dotdet_inst

Definition at line 405 of file dpuloc.h.

Referenced by dpuconfigRX(), v27RxSt1Init(), and v29RxSt1Init().

dpu_agc_t dpuRxInst_t::agc_inst

Definition at line 406 of file dpuloc.h.

Referenced by HSrxCommonSt1Init(), v21Rx(), v21RxStM(), and v21RxStNULLInit().

dpu_bphilb_t dpuRxInst_t::bphilb_inst

Definition at line 407 of file dpuloc.h.

Referenced by dpuNew(), v21Rx(), v21RxCommonInit(), v27RxSt1Init(), and v29RxSt1Init().

dpu_adeq_t dpuRxInst_t::adeq_inst

Definition at line 408 of file dpuloc.h.

Referenced by dpuNew(), HSrxCommonSt1Init(), v27RxSt34Init(), v27RxSt5Init(), v27RxSt6Init(), v27RxSt7Init(), v29RxSt34Init(), v29RxSt5Init(), v29RxSt6Init(), and v29RxSt7Init().

dpu_crec_t dpuRxInst_t::mod_inst

Definition at line 409 of file dpuloc.h.

Referenced by dpuStatus(), v21Rx(), v21RxCommonInit(), v27RxSt3Init(), v27RxSt6Init(), v27RxSt7Init(), v29RxSt3Init(), v29RxSt6Init(), v29RxSt7Init(), and v29RxSt8Init().

dpu_phase_t dpuRxInst_t::phase_inst

Definition at line 410 of file dpuloc.h.

Referenced by v27RxSt34Init(), v27RxSt3Init(), v29RxSt34Init(), and v29RxSt3Init().

dpu_descr_t dpuRxInst_t::descr_inst

Definition at line 411 of file dpuloc.h.

Referenced by v27RxSt4Init(), v27RxSt7Init(), and v29RxSt7Init().

dpu_ddec_t dpuRxInst_t::ddec_inst

Definition at line 412 of file dpuloc.h.

Referenced by v27RxSt7Init(), and v29RxSt7Init().

dpu_cdec_t dpuRxInst_t::cdec_inst

Definition at line 413 of file dpuloc.h.

Referenced by dpuNew().

dpu_slic_t dpuRxInst_t::slic_inst

Definition at line 414 of file dpuloc.h.

Referenced by dpuStatus(), v27RxSt7Init(), and v29RxSt7Init().

dpu_interp_t dpuRxInst_t::interp_inst

Definition at line 415 of file dpuloc.h.

Referenced by dpuNew(), dpuRx(), v21RxStNULLInit(), v27RxSt1Init(), and v29RxSt1Init().

dpu_v21_dec_t dpuRxInst_t::v21_dec_inst

Definition at line 416 of file dpuloc.h.

Referenced by v21RxCommonInit().

dpu_outman_t dpuRxInst_t::outman_inst

Definition at line 417 of file dpuloc.h.

Referenced by dpuRx(), HSrxCommonSt1Init(), v21RxStM(), and v21RxStNULLInit().

dpu_scr_t dpuRxInst_t::scr_inst

Definition at line 419 of file dpuloc.h.

Referenced by v27RxSt4Init(), and v29RxSt4Init().

dpu_smap_t dpuRxInst_t::smap_inst

Definition at line 420 of file dpuloc.h.

Referenced by v27RxSt4Init(), and v29RxSt4Init().

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


FM: dpuSendOut_t Struct Reference

  • Data Structures
  • Data Fields

dpuSendOut_t Struct Reference

#include <dpu.h>

Detailed Description

Definition at line 235 of file dpu.h.

Data Fields

void(* | fcn_ptr )(void *targInst, int bits, void *data)
void * | targInst

Field Documentation

void(* dpuSendOut_t::fcn_ptr)(void *targInst, int bits, void *data)

void* dpuSendOut_t::targInst

Definition at line 237 of file dpu.h.

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


FM: dpuSizeCfg_t Struct Reference

  • Data Structures
  • Data Fields

dpuSizeCfg_t Struct Reference

#include <dpu.h>

Detailed Description

Definition at line 210 of file dpu.h.

Data Fields

int | max_data_per_frame
int | max_samples_per_frame

Field Documentation

int dpuSizeCfg_t::max_data_per_frame

Definition at line 212 of file dpu.h.

int dpuSizeCfg_t::max_samples_per_frame

Definition at line 214 of file dpu.h.

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


FM: dpuTxInst_t Struct Reference

  • Data Structures
  • Data Fields

dpuTxInst_t Struct Reference

#include <dpuloc.h>

Collaboration diagram for dpuTxInst_t:

[legend]

Detailed Description

Definition at line 227 of file dpuloc.h.

Data Fields

Fract | tx_baud
Fract | bts_per_baud
Fract | baud_per_seg
Fract | samp_per_baud
Fract | samp_per_seg
Fract | tx_count
Fract | tx_state
Fract | tx_mode
Fract | tx_rate
Fract | gain
Fract | buf_out_index
Fract | buf_tx_index
Fract * | data_in_buf
Fract * | out_buf
void(* | procfn )(void *Inst, Fract *x_ideal, Fract *y_ideal, Fract *output, int index)
void(* | smfn )(void *Inst)
int(* | copy_fcn )(dpu_inman_t *inst, void *data_in, Fract *byts, Fract limit, Fract *data_in_buf, Fract bts_per_seg)
int(* | data_fcn )(dpu_inman_t *dpuInst, Fract *in_baud, Fract *data_in_buf, Fract bts_per_baud)
void(* | scr_fcn )(dpu_scr_t *scr_ptr, Fract *bits)
void(* | denc_fcn )(dpu_denc_t *denc_ptr, Fract *bits)
void(* | cenc_fcn )(dpu_cenc_t *cenc_ptr, Fract *bits)
void(* | smap_fcn )(dpu_smap_t *smap_ptr, Fract *bits, Fract *x_sym, Fract *y_sim, int index)
void(* | mod_fcn )(dpu_mod_t *mod_ptr, Fract *x_re, Fract *y_im)
int(* | shap_fcn )(dpu_shaping_t *shap_ptr, Fract *x_sym, Fract *y_sym, Fract *output, int index)
int(* | intrp_fcn )(dpu_interp_t *intrp_ptr, Fract *input, Fract *output, int length)
void(* | fsk_gen_fcn )(dpu_fsk_gen_t *fsk_gen_ptr, Fract input_bits, Fract samp, Fract *output, int index)
dpu_inman_t inman_inst
dpu_scr_t scr_inst
dpu_denc_t denc_inst
dpu_cenc_t cenc_inst
dpu_smap_t smap_inst
dpu_mod_t mod_inst
dpu_shaping_t shap_inst
dpu_interp_t interp_inst
dpu_fsk_gen_t fsk_gen_inst

Field Documentation

Fract dpuTxInst_t::tx_baud

Definition at line 228 of file dpuloc.h.

Referenced by vxx_tx_init().

Fract dpuTxInst_t::bts_per_baud

Definition at line 229 of file dpuloc.h.

Referenced by dpuTx(), vHSTx(), and vxx_tx_init().

Fract dpuTxInst_t::baud_per_seg

Definition at line 230 of file dpuloc.h.

Referenced by dpuTx(), and vxx_tx_init().

Fract dpuTxInst_t::samp_per_baud

Definition at line 231 of file dpuloc.h.

Referenced by dpuTx(), vHSTx(), and vxx_tx_init().

Fract dpuTxInst_t::samp_per_seg

Definition at line 232 of file dpuloc.h.

Referenced by dpuTx(), and vxx_tx_init().

Fract dpuTxInst_t::tx_count

Definition at line 233 of file dpuloc.h.

Referenced by v27TxSt1Init(), v27TxSt2Init(), v27TxSt3Init(), v27TxSt4Init(), v27TxSt5Init(), v27TxStM(), v29TxSt1Init(), v29TxSt2Init(), v29TxSt3Init(), v29TxSt4Init(), v29TxStM(), vHSTx(), and vxx_tx_init().

Fract dpuTxInst_t::tx_state

Definition at line 234 of file dpuloc.h.

Referenced by v27TxSt1Init(), v27TxSt2Init(), v27TxSt3Init(), v27TxSt4Init(), v27TxSt5Init(), v27TxStM(), v29TxSt1Init(), v29TxSt2Init(), v29TxSt3Init(), v29TxSt4Init(), v29TxStM(), and vxx_tx_init().

Fract dpuTxInst_t::tx_mode

Definition at line 235 of file dpuloc.h.

Fract dpuTxInst_t::tx_rate

Definition at line 236 of file dpuloc.h.

Referenced by dpuClose(), dpuConfig(), dpuControl(), dpuNew(), dpuOpen(), dpuStatus(), dpuTx(), v21TxStM(), v27TxSt4Init(), v27TxStM(), v29TxSt1Init(), v29TxSt2Init(), v29TxSt3Init(), v29TxStM(), and vxx_tx_init().

Fract dpuTxInst_t::gain

Definition at line 237 of file dpuloc.h.

Referenced by dpuTx(), and vxx_tx_init().

Fract dpuTxInst_t::buf_out_index

Definition at line 238 of file dpuloc.h.

Fract dpuTxInst_t::buf_tx_index

Definition at line 239 of file dpuloc.h.

Fract* dpuTxInst_t::data_in_buf

Definition at line 240 of file dpuloc.h.

Referenced by dpuNew(), dpuTx(), vHSTx(), and vxx_tx_init().

Fract* dpuTxInst_t::out_buf

Definition at line 241 of file dpuloc.h.

void(* dpuTxInst_t::procfn)(void *Inst, Fract *x_ideal, Fract *y_ideal, Fract *output, int index)

Referenced by dpuTx(), and vxx_tx_init().

void(* dpuTxInst_t::smfn)(void *Inst)

Referenced by dpuTx(), and vxx_tx_init().

int(* dpuTxInst_t::copy_fcn)(dpu_inman_t *inst,void *data_in, Fract *byts, Fract limit, Fract *data_in_buf, Fract bts_per_seg)

Referenced by dpuTx(), and vxx_tx_init().

int(* dpuTxInst_t::data_fcn)(dpu_inman_t *dpuInst,Fract *in_baud, Fract *data_in_buf, Fract bts_per_baud)

Referenced by v27TxSt3Init(), v27TxSt5Init(), v29TxSt3Init(), v29TxSt4Init(), vHSTx(), and vxx_tx_init().

void(* dpuTxInst_t::scr_fcn)(dpu_scr_t *scr_ptr,Fract *bits)

Referenced by v27TxSt3Init(), v29TxSt2Init(), v29TxSt3Init(), vHSTx(), and vxx_tx_init().

void(* dpuTxInst_t::denc_fcn)(dpu_denc_t *denc_ptr,Fract *bits)

Referenced by v27TxSt4Init(), v29TxSt3Init(), vHSTx(), and vxx_tx_init().

void(* dpuTxInst_t::cenc_fcn)(dpu_cenc_t *cenc_ptr,Fract *bits)

Referenced by vHSTx(), and vxx_tx_init().

void(* dpuTxInst_t::smap_fcn)(dpu_smap_t *smap_ptr,Fract *bits, Fract *x_sym, Fract *y_sim, int index)

Referenced by v27TxSt2Init(), v27TxSt3Init(), v27TxSt4Init(), v29TxSt1Init(), v29TxSt2Init(), vHSTx(), and vxx_tx_init().

void(* dpuTxInst_t::mod_fcn)(dpu_mod_t *mod_ptr,Fract *x_re, Fract *y_im)

Referenced by v27TxSt1Init(), v27TxSt2Init(), v29TxSt1Init(), vHSTx(), and vxx_tx_init().

int(* dpuTxInst_t::shap_fcn)(dpu_shaping_t *shap_ptr,Fract *x_sym, Fract *y_sym, Fract *output, int index)

Referenced by dpuTx(), and vxx_tx_init().

int(* dpuTxInst_t::intrp_fcn)(dpu_interp_t *intrp_ptr,Fract *input, Fract *output, int length)

Referenced by dpuTx(), and vxx_tx_init().

void(* dpuTxInst_t::fsk_gen_fcn)(dpu_fsk_gen_t *fsk_gen_ptr,Fract input_bits, Fract samp, Fract *output, int index)

Referenced by vHSTx(), and vxx_tx_init().

dpu_inman_t dpuTxInst_t::inman_inst

Definition at line 286 of file dpuloc.h.

Referenced by dpuNew(), dpuTx(), vHSTx(), and vxx_tx_init().

dpu_scr_t dpuTxInst_t::scr_inst

Definition at line 287 of file dpuloc.h.

Referenced by v27TxSt3Init(), v27TxSt4Init(), v29TxSt2Init(), v29TxSt3Init(), and vHSTx().

dpu_denc_t dpuTxInst_t::denc_inst

Definition at line 288 of file dpuloc.h.

Referenced by v27TxSt4Init(), v29TxSt3Init(), and vHSTx().

dpu_cenc_t dpuTxInst_t::cenc_inst

Definition at line 289 of file dpuloc.h.

Referenced by vHSTx().

dpu_smap_t dpuTxInst_t::smap_inst

Definition at line 290 of file dpuloc.h.

Referenced by v27TxSt2Init(), v27TxSt4Init(), v29TxSt1Init(), v29TxSt2Init(), and vHSTx().

dpu_mod_t dpuTxInst_t::mod_inst

Definition at line 291 of file dpuloc.h.

Referenced by v29TxSt1Init(), vHSTx(), and vxx_tx_init().

dpu_shaping_t dpuTxInst_t::shap_inst

Definition at line 292 of file dpuloc.h.

Referenced by dpuNew(), dpuTx(), and vxx_tx_init().

dpu_interp_t dpuTxInst_t::interp_inst

Definition at line 293 of file dpuloc.h.

Referenced by dpuNew(), dpuTx(), and vxx_tx_init().

dpu_fsk_gen_t dpuTxInst_t::fsk_gen_inst

Definition at line 294 of file dpuloc.h.

Referenced by vHSTx(), and vxx_tx_init().

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


FM: fm_ctrl_str Struct Reference

  • Data Structures
  • Data Fields

fm_ctrl_str Struct Reference

#include <fxmdpuif.h>

Detailed Description

Definition at line 137 of file fxmdpuif.h.

Data Fields

linSample * | element_0
Fract | element_2
tword * | element_3
Fract | element_5
tuint | Config
tuint | LineCond

Field Documentation

linSample* fm_ctrl_str::element_0

Definition at line 139 of file fxmdpuif.h.

Referenced by FAX_MODEM(), fmDpuProcessDataRx(), and fmDpuProcessDataTx().

Fract fm_ctrl_str::element_2

Definition at line 140 of file fxmdpuif.h.

Referenced by FAX_MODEM(), and fmOpen().

tword* fm_ctrl_str::element_3

Definition at line 141 of file fxmdpuif.h.

Referenced by FAX_MODEM(), and fmOpen().

Fract fm_ctrl_str::element_5

Definition at line 142 of file fxmdpuif.h.

Referenced by FAX_MODEM(), fmDpuProcessDataTx(), fmHdlcRx(), fmModeChange(), fmOpen(), fmStateRx(), fmStateTxHsInit(), and fmStateTxLsInit().

tuint fm_ctrl_str::Config

Definition at line 143 of file fxmdpuif.h.

Referenced by FAX_MODEM(), fmModeChange(), and fmOpen().

tuint fm_ctrl_str::LineCond

Definition at line 144 of file fxmdpuif.h.

Referenced by FAX_MODEM(), fmCheckCarrierOff(), fmCheckCarrierOn(), fmCheckP2(), fmCheckPreamble(), fmCheckSignalPresent(), fmCheckTep(), and fmOpen().

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


FM: fmContext_t Struct Reference

  • Data Structures
  • Data Fields

fmContext_t Struct Reference
[FM External API]

#include <fm.h>

Collaboration diagram for fmContext_t:

[legend]

Detailed Description

FM context Structure.

The FM software module has a global context structure that contains non channel specific configuration information which is used by all active FM instances. FM context is a structure that must be declared globally by system code, and initialized prior to any calls to the FM API's.

Definition at line 286 of file fm.h.

Data Fields

dbgInfo_t | debugInfo
tulong(* | fmGetTime )(void)
fmTablePtrs_t * tablePtr

Field Documentation

dbgInfo_t fmContext_t::debugInfo

Pointer to a function for sending debug trace messages and exceptions

Definition at line 287 of file fm.h.

Referenced by fmDebugTrace(), and fmException().

tulong(* fmContext_t::fmGetTime)(void)

Pointer to a function for obtaining system time in milliseconds

Referenced by fmCheckCarrierOff(), fmCheckCarrierOn(), fmCheckP2(), fmCheckPreamble(), fmCheckSignalPresent(), fmCheckTep(), fmDebugTrace(), fmDelay(), fmHdlcRx(), fmMsgFifoPeek(), fmShipOutData(), and fmToneDetect().

fmTablePtrs_t* fmContext_t::tablePtr

Pointer to the FM tables that should be initialized to NULL

Definition at line 289 of file fm.h.

Referenced by dpu_interp_init(), dpu_v21_demod(), fmGetTablePtr(), and fmSetTablePtr().

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


FM: fmInst_s Struct Reference

  • Data Structures
  • Data Fields

fmInst_s Struct Reference

#include <fmloc.h>

Collaboration diagram for fmInst_s:

[legend]

Detailed Description

Definition at line 166 of file fmloc.h.

Data Fields

tuint | state
tuint | ID
tuint | debugLvl
tuint | FmState
tuint | fFmFpPacketizationMode: 1
tuint | FmNewModemMode: 1
tuint | fForceBadFCS: 1
tuint | DelayFlag: 1
tuint | FmEcmMode: 1
tint | maxBytesToBuffer
tuint | MsgFifoInCnt
tuint | MsgFifoOutCnt
iffaxFpFmMsg_t | MsgFifoData [FM_MSG_FIFO_SIZE]
dpuIf_t Dpu
union {
hdlcTxInst_t Tx
hdlcRxInst_t Rx
} Hdlc
tuint | FmStatus
tuint | HdlcFlagsCnt
tuint | EndTime
tuint | BytesNotUsed
tuint | DataRate
tuint | TxFillByte
tuint | FmBytesCnt
iffaxFpFmMode_s | fmCurrMode
tuint | FmTaskRate
tuint | TxEcmState
tword * | FmData
tint | FmDataIn
tint | FmDataOut
tint | FmDataWordCnt
tint | FmDataWordSize
tword * | FmFpData
tuint | numBytesStored
Fract | FmTonePhase
tuint | FmToneState
tuint | FmToneCount
fmToneDetCtrlSpec_t ToneDetCtrl
fmProtoStats_t ProtoStats
fmReceiveOutSpec_t RxOutSpec
fmSendOutSpec_t SendOutSpec

Field Documentation

tuint fmInst_s::state

Definition at line 168 of file fmloc.h.

Referenced by fmClose(), fmDelete(), fmOpen(), fmReceiveIn(), and fmSendIn().

tuint fmInst_s::ID

Definition at line 169 of file fmloc.h.

Referenced by fmDebugTrace(), and fmDelete().

tuint fmInst_s::debugLvl

Definition at line 170 of file fmloc.h.

Referenced by fmOpen().

tuint fmInst_s::FmState

Definition at line 171 of file fmloc.h.

Referenced by fmCheckCarrierOff(), fmCheckCarrierOn(), fmCheckP2(), fmCheckPreamble(), fmCheckTep(), fmModeChange(), fmOpen(), fmSendIn(), fmStateTxLsFlag(), and fmStateTxLsInit().

tuint fmInst_s::fFmFpPacketizationMode

Definition at line 175 of file fmloc.h.

Referenced by fmOpen(), and fmSendDataToFp().

tuint fmInst_s::FmNewModemMode

Definition at line 180 of file fmloc.h.

Referenced by fmOpen(), fmSendIn(), fmStateTxHsEcm(), fmStateTxHsPreOff(), and fmStateTxLsFlag().

tuint fmInst_s::fForceBadFCS

Definition at line 184 of file fmloc.h.

Referenced by fmOpen(), fmStateTxHsEcm(), and fmStateTxLsFlag().

tuint fmInst_s::DelayFlag

Definition at line 186 of file fmloc.h.

Referenced by fmDelay(), and fmOpen().

tuint fmInst_s::FmEcmMode

Definition at line 190 of file fmloc.h.

Referenced by fmModeChange(), fmOpen(), fmStateRx(), and fmStateTxHsInit().

tint fmInst_s::maxBytesToBuffer

Definition at line 195 of file fmloc.h.

Referenced by fmOpen(), and fmPacketizeData().

tuint fmInst_s::MsgFifoInCnt

Definition at line 199 of file fmloc.h.

Referenced by fmDataBufPeek(), fmMsgFifoInit(), fmMsgFifoPeek(), fmMsgFifoPop(), and fmMsgFifoPush().

tuint fmInst_s::MsgFifoOutCnt

Definition at line 200 of file fmloc.h.

Referenced by fmDataBufOut(), fmDataBufPeek(), fmMsgFifoInit(), fmMsgFifoPeek(), fmMsgFifoPop(), and fmMsgFifoPush().

iffaxFpFmMsg_t fmInst_s::MsgFifoData[FM_MSG_FIFO_SIZE]

Definition at line 201 of file fmloc.h.

Referenced by fmDataBufOut(), fmDataBufPeek(), fmMsgFifoPeek(), fmMsgFifoPop(), and fmMsgFifoPush().

dpuIf_t fmInst_s::Dpu

Definition at line 203 of file fmloc.h.

Referenced by fmCheckCarrierOff(), fmCheckCarrierOn(), fmCheckP2(), fmCheckPreamble(), fmCheckSignalPresent(), fmCheckTep(), fmClose(), fmDpuProcessDataRx(), fmDpuProcessDataTx(), fmHdlcRx(), fmModeChange(), fmOpen(), fmSendIn(), fmStateRx(), fmStateTxHsEcm(), fmStateTxHsInit(), fmStateTxHsPreOff(), fmStateTxLsData(), fmStateTxLsFlag(), fmStateTxLsInit(), and fmStats().

hdlcTxInst_t fmInst_s::Tx

Definition at line 206 of file fmloc.h.

Referenced by fmStateTxHsEcm(), fmStateTxHsInit(), fmStateTxLsData(), fmStateTxLsFlag(), and fmStateTxLsInit().

hdlcRxInst_t fmInst_s::Rx

Definition at line 207 of file fmloc.h.

Referenced by fmHdlcRx(), and fmStateRxInit().

union { ... } fmInst_s::Hdlc

Referenced by fmHdlcRx(), fmStateRxInit(), fmStateTxHsEcm(), fmStateTxHsInit(), fmStateTxLsData(), fmStateTxLsFlag(), and fmStateTxLsInit().

tuint fmInst_s::FmStatus

Definition at line 210 of file fmloc.h.

Referenced by fmCheckCarrierOff(), fmCheckCarrierOn(), fmCheckP2(), fmCheckPreamble(), fmCheckSignalPresent(), fmCheckTep(), fmDataBufPeek(), fmModeChange(), fmStateRxInit(), fmStateTxHsEcm(), fmStateTxHsInit(), fmStateTxHsPreOff(), fmStateTxLsFlag(), and fmStateTxLsInit().

tuint fmInst_s::HdlcFlagsCnt

Definition at line 212 of file fmloc.h.

Referenced by fmStateRxInit(), fmStateTxHsEcm(), fmStateTxLsFlag(), and fmStateTxLsInit().

tuint fmInst_s::EndTime

Definition at line 214 of file fmloc.h.

Referenced by fmDelay().

tuint fmInst_s::BytesNotUsed

Definition at line 216 of file fmloc.h.

Referenced by fmDpuProcessDataTx(), fmStateTxHsEcm(), fmStateTxHsInit(), fmStateTxHsPreOff(), fmStateTxHsTraining(), fmStateTxLsData(), fmStateTxLsFlag(), and fmStateTxLsInit().

tuint fmInst_s::DataRate

Definition at line 219 of file fmloc.h.

Referenced by fmModeChange(), fmOpen(), fmStateTxHsEcm(), fmStateTxHsInit(), fmStateTxHsPreOff(), and fmStateTxHsTraining().

tuint fmInst_s::TxFillByte

Definition at line 222 of file fmloc.h.

Referenced by fmModeChange(), fmMsgFifoPeek(), fmOpen(), fmStateTxHsInit(), and fmStateTxHsPreOff().

tuint fmInst_s::FmBytesCnt

Definition at line 224 of file fmloc.h.

Referenced by fmStateRxInit(), fmStateTxHsEcm(), fmStateTxHsInit(), and fmStateTxLsInit().

struct iffaxFpFmMode_s fmInst_s::fmCurrMode

Definition at line 228 of file fmloc.h.

Referenced by fmModeChange().

tuint fmInst_s::FmTaskRate

Definition at line 230 of file fmloc.h.

Referenced by fmModeChange(), and fmOpen().

tuint fmInst_s::TxEcmState

Definition at line 233 of file fmloc.h.

Referenced by fmStateTxHsEcm(), and fmStateTxHsInit().

tword* fmInst_s::FmData

Definition at line 235 of file fmloc.h.

Referenced by fmDataBufIn().

tint fmInst_s::FmDataIn

Definition at line 236 of file fmloc.h.

Referenced by fmDataBufIn(), fmDataBufInit(), and fmDataBufOut().

tint fmInst_s::FmDataOut

Definition at line 237 of file fmloc.h.

Referenced by fmDataBufIn(), fmDataBufInit(), and fmDataBufOut().

tint fmInst_s::FmDataWordCnt

Definition at line 238 of file fmloc.h.

Referenced by fmDataBufIn(), fmDataBufInit(), and fmDataBufOut().

tint fmInst_s::FmDataWordSize

Definition at line 239 of file fmloc.h.

Referenced by fmDataBufIn(), and fmDataBufOut().

tword* fmInst_s::FmFpData

Definition at line 241 of file fmloc.h.

Referenced by fmPacketizeData(), and fmSendDataToFp().

tuint fmInst_s::numBytesStored

Definition at line 244 of file fmloc.h.

Referenced by fmPacketizeData(), fmSendDataToFp(), and fmStateRxInit().

Fract fmInst_s::FmTonePhase

Definition at line 247 of file fmloc.h.

Referenced by fmOpen(), and fmToneGenOn().

tuint fmInst_s::FmToneState

Definition at line 248 of file fmloc.h.

Referenced by fmOpen(), fmSendTxData(), fmToneGenOff(), and fmToneGenOn().

tuint fmInst_s::FmToneCount

Definition at line 249 of file fmloc.h.

Referenced by fmOpen(), fmSendTxData(), and fmToneGenOn().

fmToneDetCtrlSpec_t fmInst_s::ToneDetCtrl

Definition at line 250 of file fmloc.h.

Referenced by fmOpen(), and fmToneDetCtrl().

fmProtoStats_t fmInst_s::ProtoStats

Definition at line 252 of file fmloc.h.

Referenced by fmHdlcRx(), fmOpen(), fmStateRx(), fmStateTxHsEcm(), and fmStats().

fmReceiveOutSpec_t fmInst_s::RxOutSpec

Definition at line 255 of file fmloc.h.

Referenced by fmDpuProcessDataTx(), and fmOpen().

fmSendOutSpec_t fmInst_s::SendOutSpec

Definition at line 256 of file fmloc.h.

Referenced by fmCheckCarrierOff(), fmCheckCarrierOn(), fmCheckP2(), fmCheckPreamble(), fmCheckSignalPresent(), fmCheckTep(), fmHdlcRx(), fmMsgFifoPeek(), fmOpen(), fmShipOutData(), and fmToneDetect().

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


FM: fmNewConfig_t Struct Reference

  • Data Structures
  • Data Fields

fmNewConfig_t Struct Reference
[FM External API]

#include <fm.h>

Detailed Description

FM New data structure.

Definition at line 300 of file fm.h.

Data Fields

tuint ID

Field Documentation

tuint fmNewConfig_t::ID

User-specified module ID

Definition at line 301 of file fm.h.

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


FM: fmOpenConfig_t Struct Reference

  • Data Structures
  • Data Fields

fmOpenConfig_t Struct Reference
[FM External API]

#include <fm.h>

Collaboration diagram for fmOpenConfig_t:

[legend]

Detailed Description

Open Configuration structure.

Data structure providing configuration information in fmOpen

Definition at line 310 of file fm.h.

Data Fields

tuint | debugLvl
tint | tx_level
tint | rx_cd_thr_set
tbool | fBufferData
tint | maxBytesToBuffer
tuint | FMfeatureBitMap
fmToneDetCtrlSpec_t ToneDetCtrl
fmReceiveOutSpec_t RxOutSpec
fmSendOutSpec_t SendOutSpec
fmTablePtrs_t * tablePtr

Field Documentation

tuint fmOpenConfig_t::debugLvl

Valid FM Debug Modes

Definition at line 311 of file fm.h.

Referenced by fmOpen().

tint fmOpenConfig_t::tx_level

default transmit level ( in -dBm)

Definition at line 312 of file fm.h.

Referenced by fmOpen().

tint fmOpenConfig_t::rx_cd_thr_set

Received CD threshold set selector:
0: off-to-on = -43dBm, on-to-off = -48dBm
1: off-to-on = -26dBm, on-to-off = -31dBm
2: off-to-on = -31dBm, on-to-off = -37dBm

Definition at line 313 of file fm.h.

Referenced by fmOpen().

tbool fmOpenConfig_t::fBufferData

Indication to buffer data:
FALSE (0): data is passed to the partner module as soon as it is received.
TRUE (1): data is collected in buffers of maxBytesToBuffer size before sending to partner module.

Definition at line 318 of file fm.h.

Referenced by fmOpen().

tint fmOpenConfig_t::maxBytesToBuffer

Maximum number of bytes to buffer in BufferData mode

Definition at line 322 of file fm.h.

Referenced by fmOpen().

tuint fmOpenConfig_t::FMfeatureBitMap

FM feature bitmap: unused

Definition at line 323 of file fm.h.

Referenced by fmOpen().

fmToneDetCtrlSpec_t fmOpenConfig_t::ToneDetCtrl

Address of function and associated data structure for tone detection control

Definition at line 324 of file fm.h.

Referenced by fmOpen().

fmReceiveOutSpec_t fmOpenConfig_t::RxOutSpec

Address of function and associated data structure for passing PCM samples

Definition at line 325 of file fm.h.

Referenced by fmOpen().

fmSendOutSpec_t fmOpenConfig_t::SendOutSpec

Address of function and associated data structure for passing data and signaling

Definition at line 326 of file fm.h.

Referenced by fmOpen().

fmTablePtrs_t* fmOpenConfig_t::tablePtr

Pointer to relocatable FM tables (i.e. fmTablePtrs). fmTablePtrs should be initialized to point to the tables as shown below:
void * fmTablePtrs[] =
{
(void *) fm_TABLE1_START,
(void *) fm_TABLE2_START,
(void *) fm_TABLE3_START,
(void *) fm_TABLE4_START,
(void *) fm_TABLE5_START
};

Definition at line 327 of file fm.h.

Referenced by fmOpen().

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


FM: fmProtoStats_t Struct Reference

  • Data Structures
  • Data Fields

fmProtoStats_t Struct Reference
[FM External API]

#include <fm.h>

Detailed Description

Statistics of protocol.

Definition at line 361 of file fm.h.

Data Fields

tuint | HDLC_Tx_Underflow
tuint | Non_HDLC_Tx_Underflow
tuint | Bad_CRC_From_Tele
tuint | Bad_CRC_To_Tele
tulong | Good_CRC_From_Tele
tulong | Good_CRC_To_Tele
tulong | Non_HDLC_Rx_From_Tele
tulong | Non_HDLC_Tx_To_Tele

Field Documentation

tuint fmProtoStats_t::HDLC_Tx_Underflow

Underflow counter of HDLC tx

Definition at line 362 of file fm.h.

tuint fmProtoStats_t::Non_HDLC_Tx_Underflow

Underflow counter of non-HDLC tx

Definition at line 363 of file fm.h.

tuint fmProtoStats_t::Bad_CRC_From_Tele

Number of bad CRC frames from telephony

Definition at line 364 of file fm.h.

Referenced by fmHdlcRx().

tuint fmProtoStats_t::Bad_CRC_To_Tele

Number of bad CRC frames to telephony

Definition at line 365 of file fm.h.

Referenced by fmStateTxHsEcm().

tulong fmProtoStats_t::Good_CRC_From_Tele

Number of good CRC frames from telephony

Definition at line 366 of file fm.h.

Referenced by fmHdlcRx().

tulong fmProtoStats_t::Good_CRC_To_Tele

Number of good CRC frames to telephony

Definition at line 367 of file fm.h.

Referenced by fmStateTxHsEcm().

tulong fmProtoStats_t::Non_HDLC_Rx_From_Tele

Number of non-HDLC data bytes received from telephony

Definition at line 368 of file fm.h.

Referenced by fmStateRx().

tulong fmProtoStats_t::Non_HDLC_Tx_To_Tele

Number of non-HDLC data bytes transmitted to telephony

Definition at line 369 of file fm.h.

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


FM: fmReceiveOutSpec_t Struct Reference

  • Data Structures
  • Data Fields

fmReceiveOutSpec_t Struct Reference
[FM External API]

#include <fm.h>

Detailed Description

Specification of fmReceiveOutSpec Object.

This structure contains the address of function and associated data structure for sending data to the PCM interface unit

Definition at line 136 of file fm.h.

Data Fields

void(* | fmReceiveOut )(void *TargetInst, void *PcmData)
Routine called by FM to send a frame of linear PCM samples to the target instance (typically the PIU). This callout function is invoked whenever fmSendIn() is called.
void * | TargetInst

Field Documentation

void(* fmReceiveOutSpec_t::fmReceiveOut)(void *TargetInst, void *PcmData)

Routine called by FM to send a frame of linear PCM samples to the target instance (typically the PIU). This callout function is invoked whenever fmSendIn() is called.

Referenced by fmDpuProcessDataTx(), and fmOpen().

void* fmReceiveOutSpec_t::TargetInst

Pointer to Target Instance

Definition at line 143 of file fm.h.

Referenced by fmDpuProcessDataTx(), and fmOpen().

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


FM: fmSendOutSpec_t Struct Reference

  • Data Structures
  • Data Fields

fmSendOutSpec_t Struct Reference
[FM External API]

#include <fm.h>

Detailed Description

Specification of fmSendOutSpec Object.

This structure contains the address of function and associated data structure for sending modem event/data to the FAX protocol processing unit.

Definition at line 152 of file fm.h.

Data Fields

void(* | fmSendOut )(void *TargetInst, void *message)
Routine called by FM to send a message to the FIU. A non-zero return value indicates an error. Please refer IFFAX.chm for messages from the FM to the FIU.
void * | TargetInst

Field Documentation

void(* fmSendOutSpec_t::fmSendOut)(void *TargetInst, void *message)

Routine called by FM to send a message to the FIU. A non-zero return value indicates an error. Please refer IFFAX.chm for messages from the FM to the FIU.

Referenced by fmCheckCarrierOff(), fmCheckCarrierOn(), fmCheckP2(), fmCheckPreamble(), fmCheckSignalPresent(), fmCheckTep(), fmHdlcRx(), fmMsgFifoPeek(), fmOpen(), fmShipOutData(), and fmToneDetect().

void* fmSendOutSpec_t::TargetInst

Pointer to Target Instance

Definition at line 159 of file fm.h.

Referenced by fmCheckCarrierOff(), fmCheckCarrierOn(), fmCheckP2(), fmCheckPreamble(), fmCheckSignalPresent(), fmCheckTep(), fmHdlcRx(), fmMsgFifoPeek(), fmOpen(), fmShipOutData(), and fmToneDetect().

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


FM: fmSigQStats_t Struct Reference

  • Data Structures
  • Data Fields

fmSigQStats_t Struct Reference
[FM External API]

#include <fm.h>

Detailed Description

Statistics of signal quality.

Definition at line 342 of file fm.h.

Data Fields

tuint | dpustatus
tint | snr
tint | carr_offset
tint | percentBaudOffset
tint | tx_level
tint | rx_level
tint | tx_rate
tint | rx_rate
tuint | fslAdjCnt

Field Documentation

tuint fmSigQStats_t::dpustatus

Status of the DPU. The 8 MSBs contain configuration parameters:
6 MSBs specify the modulation mode, 1 bit specifies the half/full duplex, 1 bit TX or RX. The 8 LSBs specify the current state of the state machine.

Definition at line 343 of file fm.h.

Referenced by dpuStatus(), v21RxStM(), v21TxStM(), v27RxStM(), v27TxStM(), v29RxStM(), and v29TxStM().

tint fmSigQStats_t::snr

Estimated signal to noise ratio (in dB) in data mode for high speed (V.27ter, V.29, V.17 or V.33).

Definition at line 346 of file fm.h.

Referenced by dpuStatus().

tint fmSigQStats_t::carr_offset

Carrier frequency offset in 0.1 Hz (e.g., if carr_offset is 100, the carrier frequency offset is 10 Hz). This value is meaningful only in data mode for high speed (V.27ter, V.29, V.17 or V.33).

Definition at line 347 of file fm.h.

Referenced by dpuStatus().

tint fmSigQStats_t::percentBaudOffset

Timing offset in 0.0001% (e.g., if percentBaudOffset is 25, the timing offset is 25e-4 %). This value is meaningful only in data mode for high speed (V.27ter, V.29, V.17 or V.33).

Definition at line 349 of file fm.h.

Referenced by dpuStatus().

tint fmSigQStats_t::tx_level

TX Level ( in -dBm )

Definition at line 351 of file fm.h.

Referenced by dpuOpen(), and dpuStatus().

tint fmSigQStats_t::rx_level

RX Level ( in -dBm )

Definition at line 352 of file fm.h.

Referenced by dpuStatus(), and v21Rx().

tint fmSigQStats_t::tx_rate

Configured TX rate (in bps).

Definition at line 353 of file fm.h.

Referenced by dpuStatus(), v21TxStM(), v27TxStM(), and v29TxStM().

tint fmSigQStats_t::rx_rate

Configured RX rate (in bps).

Definition at line 354 of file fm.h.

Referenced by dpuStatus(), v21RxStM(), v27RxStM(), and v29RxStM().

tuint fmSigQStats_t::fslAdjCnt

Frame slip adjustment counter

Definition at line 355 of file fm.h.

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


FM: fmStatsReport_t Struct Reference

  • Data Structures
  • Data Fields

fmStatsReport_t Struct Reference
[FM External API]

#include <fm.h>

Collaboration diagram for fmStatsReport_t:

[legend]

Detailed Description

FM Statistics Data Structure.

Definition at line 376 of file fm.h.

Data Fields

fmSigQStats_t fmSigQStats
fmProtoStats_t fmProtoStats

Field Documentation

fmSigQStats_t fmStatsReport_t::fmSigQStats

Signal quality stats structure

Definition at line 377 of file fm.h.

Referenced by fmStats().

fmProtoStats_t fmStatsReport_t::fmProtoStats

Protocol stats structure

Definition at line 378 of file fm.h.

Referenced by fmStats().

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


FM: fmTablePtrs_t Struct Reference

  • Data Structures
  • Data Fields

fmTablePtrs_t Struct Reference
[FM External API]

#include <fm.h>

Collaboration diagram for fmTablePtrs_t:

[legend]

Detailed Description

FM table Pointer structure.

Definition at line 266 of file fm.h.

Data Fields

v29Table_sPtrs_t * v29TablePtrs
v27Table_sPtrs_t * v27TablePtrs
v17Table_sPtrs_t * v17TablePtrs
commonTable1_sPtrs_t * commonTable1Ptrs
Fract * commonTable2Ptrs

Field Documentation

v29Table_sPtrs_t* fmTablePtrs_t::v29TablePtrs

Pointer to V.29 Cluster tables

Definition at line 268 of file fm.h.

Referenced by v27RxSt7Init(), v27TxSt4Init(), v29RxSt1Init(), v29RxSt34Init(), v29RxSt4Init(), v29RxSt7Init(), v29TxSt2Init(), v29TxSt3Init(), and vxx_tx_init().

v27Table_sPtrs_t* fmTablePtrs_t::v27TablePtrs

Pointer to V.27 Cluster tables

Definition at line 269 of file fm.h.

Referenced by v27RxSt1Init(), v27RxSt7Init(), v27TxSt4Init(), v27TxStM(), and vxx_tx_init().

v17Table_sPtrs_t* fmTablePtrs_t::v17TablePtrs

Pointer to V.17 Cluster tables

Definition at line 270 of file fm.h.

Referenced by dpu_v21_demod(), and vxx_tx_init().

commonTable1_sPtrs_t* fmTablePtrs_t::commonTable1Ptrs

Pointer to Common Cluster-1 tables

Definition at line 271 of file fm.h.

Referenced by dpu_interp_init(), dpu_trec_init(), dpuconfigRX(), FAX_MODEM(), and v21RxCommonInit().

Fract* fmTablePtrs_t::commonTable2Ptrs

Pointer to Common Cluster-2 tables

Definition at line 272 of file fm.h.

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


FM: fmToneDetCtrlSpec_t Struct Reference

  • Data Structures
  • Data Fields

fmToneDetCtrlSpec_t Struct Reference
[FM External API]

#include <fm.h>

Detailed Description

Specification of fmToneDetSpec Object.

This structure contains the address of function and associated data structure for tone detection.

Definition at line 169 of file fm.h.

Data Fields

void(* | ToneDetCtrl )(void *TargetInst, tuint ControlCode)
Routine called by FM to configure tone detection funtionality Control Codes:
iffax_TONE_DETECT_CTRL_DISABLE 0
iffax_TONE_DETECT_CTRL_ENABLE 1.
void * | TargetInst

Field Documentation

void(* fmToneDetCtrlSpec_t::ToneDetCtrl)(void *TargetInst, tuint ControlCode)

Routine called by FM to configure tone detection funtionality Control Codes:
iffax_TONE_DETECT_CTRL_DISABLE 0
iffax_TONE_DETECT_CTRL_ENABLE 1.

Referenced by fmOpen(), and fmToneDetCtrl().

void* fmToneDetCtrlSpec_t::TargetInst

Pointer to Target Instance

Definition at line 177 of file fm.h.

Referenced by fmOpen(), and fmToneDetCtrl().

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


FM: interp_params_t Struct Reference

  • Data Structures
  • Data Fields

interp_params_t Struct Reference

#include <int_init.h>

Detailed Description

Definition at line 25 of file int_init.h.

Data Fields

tint | L1
tint | L2
tint | length
const Fract * | index_tab

Field Documentation

tint interp_params_t::L1

Definition at line 26 of file int_init.h.

Referenced by dpu_interp_init().

tint interp_params_t::L2

Definition at line 27 of file int_init.h.

Referenced by dpu_interp_init().

tint interp_params_t::length

Definition at line 28 of file int_init.h.

Referenced by dpu_interp_init().

const Fract* interp_params_t::index_tab

Definition at line 29 of file int_init.h.

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


FM: path_struct Struct Reference

  • Data Structures
  • Data Fields

path_struct Struct Reference

#include <dpu_cdec.h>

Collaboration diagram for path_struct:

[legend]

Detailed Description

Definition at line 36 of file dpu_cdec.h.

Data Fields

int path_and_delay [DPU_CDEC_DELAY_STATES]
cmplx_t const_point
path_ptr prev_path_pt

Field Documentation

int path_struct::path_and_delay[DPU_CDEC_DELAY_STATES]

Definition at line 38 of file dpu_cdec.h.

cmplx_t path_struct::const_point

Definition at line 39 of file dpu_cdec.h.

path_ptr path_struct::prev_path_pt

Definition at line 40 of file dpu_cdec.h.

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


FM: scaleFactors_t Struct Reference

  • Data Structures
  • Data Fields

scaleFactors_t Struct Reference

Detailed Description

Definition at line 39 of file dpuatan2.c.

Data Fields

tint | k1
tint | k2

Field Documentation

tint scaleFactors_t::k1

Definition at line 40 of file dpuatan2.c.

Referenced by dpuAtan2().

tint scaleFactors_t::k2

Definition at line 41 of file dpuatan2.c.

Referenced by dpuAtan2().

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


FM: v17Table_sPtrs_t Struct Reference

  • Data Structures
  • Data Fields

v17Table_sPtrs_t Struct Reference
[FM External API]

#include <fm.h>

Collaboration diagram for v17Table_sPtrs_t:

[legend]

Detailed Description

V.17 Cluster definitions.

Definition at line 228 of file fm.h.

Data Fields

Fract | dpu_smap_V17_120_pt [128]
Fract | dpu_smap_V17_144_pt [256]
dpu_shaping_bank_t | shape_v17_pt [1]
Fract | dpu_smap_V17_96_pt [64]
Fract | dpu_smap_V17_72_pt [32]
Fract | dpu_ddec_V17_AllRates_pt [16]
Fract | dpu_denc_V17_AllRates_pt [16]
Fract | dpu_slic_invmod_v17_pt [10][10]
Fract | dpu_PN_smap_table_v17_AllRates_pt [8]
Fract | dpu_bridge_smap_table_v17_AllRates_pt [8]
Fract | tanTableInFirstOctant_pt [10]
Fract | atan2ScaleFactors_pt [16]
Fract | bp_rx_v17_pt [43]
Fract | bp_hilb_v17_pt [43]

Field Documentation

Fract v17Table_sPtrs_t::dpu_smap_V17_120_pt[128]

Definition at line 230 of file fm.h.

Fract v17Table_sPtrs_t::dpu_smap_V17_144_pt[256]

Definition at line 231 of file fm.h.

dpu_shaping_bank_t v17Table_sPtrs_t::shape_v17_pt[1]

Definition at line 232 of file fm.h.

Referenced by vxx_tx_init().

Fract v17Table_sPtrs_t::dpu_smap_V17_96_pt[64]

Definition at line 233 of file fm.h.

Fract v17Table_sPtrs_t::dpu_smap_V17_72_pt[32]

Definition at line 234 of file fm.h.

Fract v17Table_sPtrs_t::dpu_ddec_V17_AllRates_pt[16]

Definition at line 235 of file fm.h.

Fract v17Table_sPtrs_t::dpu_denc_V17_AllRates_pt[16]

Definition at line 236 of file fm.h.

Fract v17Table_sPtrs_t::dpu_slic_invmod_v17_pt[10][10]

Definition at line 237 of file fm.h.

Fract v17Table_sPtrs_t::dpu_PN_smap_table_v17_AllRates_pt[8]

Definition at line 238 of file fm.h.

Fract v17Table_sPtrs_t::dpu_bridge_smap_table_v17_AllRates_pt[8]

Definition at line 239 of file fm.h.

Fract v17Table_sPtrs_t::tanTableInFirstOctant_pt[10]

Definition at line 240 of file fm.h.

Referenced by dpu_v21_demod().

Fract v17Table_sPtrs_t::atan2ScaleFactors_pt[16]

Definition at line 241 of file fm.h.

Referenced by dpu_v21_demod().

Fract v17Table_sPtrs_t::bp_rx_v17_pt[43]

Definition at line 242 of file fm.h.

Fract v17Table_sPtrs_t::bp_hilb_v17_pt[43]

Definition at line 243 of file fm.h.

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


FM: v27Table_sPtrs_t Struct Reference

  • Data Structures
  • Data Fields

v27Table_sPtrs_t Struct Reference
[FM External API]

#include <fm.h>

Collaboration diagram for v27Table_sPtrs_t:

[legend]

Detailed Description

V.27 Cluster definitions.

Definition at line 211 of file fm.h.

Data Fields

Fract | dpu_smap_V27_48_pt [16]
Fract | dpu_smap_V27_24_pt [8]
dpu_shaping_bank_t | shape_v27_24_pt [1]
dpu_shaping_bank_t | shape_v27_48_pt [1]
Fract | dpu_slic_pt_V27_48_pt [16]
Fract | dpu_slic_pt_V27_24_pt [8]
Fract | dpu_slic_bits_V27_48_pt [8]
Fract | dpu_v27_count_pt [8]
Fract | bp_rx_v27_48_pt [45]
Fract | bp_hilb_v27_48_pt [45]

Field Documentation

Fract v27Table_sPtrs_t::dpu_smap_V27_48_pt[16]

Definition at line 213 of file fm.h.

Referenced by v27TxSt4Init().

Fract v27Table_sPtrs_t::dpu_smap_V27_24_pt[8]

Definition at line 214 of file fm.h.

Referenced by v27TxSt4Init().

dpu_shaping_bank_t v27Table_sPtrs_t::shape_v27_24_pt[1]

Definition at line 215 of file fm.h.

Referenced by vxx_tx_init().

dpu_shaping_bank_t v27Table_sPtrs_t::shape_v27_48_pt[1]

Definition at line 216 of file fm.h.

Referenced by vxx_tx_init().

Fract v27Table_sPtrs_t::dpu_slic_pt_V27_48_pt[16]

Definition at line 217 of file fm.h.

Referenced by v27RxSt7Init().

Fract v27Table_sPtrs_t::dpu_slic_pt_V27_24_pt[8]

Definition at line 218 of file fm.h.

Referenced by v27RxSt7Init().

Fract v27Table_sPtrs_t::dpu_slic_bits_V27_48_pt[8]

Definition at line 219 of file fm.h.

Referenced by v27RxSt7Init().

Fract v27Table_sPtrs_t::dpu_v27_count_pt[8]

Definition at line 220 of file fm.h.

Referenced by v27TxStM().

Fract v27Table_sPtrs_t::bp_rx_v27_48_pt[45]

Definition at line 221 of file fm.h.

Referenced by v27RxSt1Init().

Fract v27Table_sPtrs_t::bp_hilb_v27_48_pt[45]

Definition at line 222 of file fm.h.

Referenced by v27RxSt1Init().

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


FM: v29Table_sPtrs_t Struct Reference

  • Data Structures
  • Data Fields

v29Table_sPtrs_t Struct Reference
[FM External API, FM External API]

#include <fm.h>

Collaboration diagram for v29Table_sPtrs_t:

[legend]

Detailed Description

V.29 Cluster definitions.

Definition at line 189 of file fm.h.

Data Fields

Fract | dpu_smap_V29_96_pt [32]
Fract | dpu_smap_V29_72_pt [16]
dpu_shaping_bank_t | shape_v29_pt [1]
Fract | dpu_slic_pt_V29_72_pt [32]
Fract | dpu_slic_pt_V29_96_pt [64]
Fract | dpu_denc_V29_9600_pt [8]
Fract | dpu_denc_V29_4800_pt [4]
Fract | dpu_ddec_V29_9600_pt [8]
Fract | dpu_ddec_V29_4800_pt [4]
Fract | dpu_slic_bits_V29_72_pt [16]
Fract | dpu_slic_bits_V29_96_pt [32]
Fract | dpu_slic_invmod_V29_96_pt [4]
Fract | bp_rx_v29_pt [43]
Fract | bp_hilb_v29_pt [43]

Field Documentation

Fract v29Table_sPtrs_t::dpu_smap_V29_96_pt[32]

Definition at line 191 of file fm.h.

Referenced by v29RxSt4Init(), and v29TxSt2Init().

Fract v29Table_sPtrs_t::dpu_smap_V29_72_pt[16]

Definition at line 192 of file fm.h.

Referenced by v29RxSt4Init(), and v29TxSt2Init().

dpu_shaping_bank_t v29Table_sPtrs_t::shape_v29_pt[1]

Definition at line 193 of file fm.h.

Referenced by vxx_tx_init().

Fract v29Table_sPtrs_t::dpu_slic_pt_V29_72_pt[32]

Definition at line 194 of file fm.h.

Referenced by v29RxSt7Init().

Fract v29Table_sPtrs_t::dpu_slic_pt_V29_96_pt[64]

Definition at line 195 of file fm.h.

Referenced by v29RxSt7Init().

Fract v29Table_sPtrs_t::dpu_denc_V29_9600_pt[8]

Definition at line 196 of file fm.h.

Referenced by v27TxSt4Init(), and v29TxSt3Init().

Fract v29Table_sPtrs_t::dpu_denc_V29_4800_pt[4]

Definition at line 197 of file fm.h.

Referenced by v27TxSt4Init().

Fract v29Table_sPtrs_t::dpu_ddec_V29_9600_pt[8]

Definition at line 198 of file fm.h.

Referenced by v27RxSt7Init(), and v29RxSt7Init().

Fract v29Table_sPtrs_t::dpu_ddec_V29_4800_pt[4]

Definition at line 199 of file fm.h.

Referenced by v27RxSt7Init().

Fract v29Table_sPtrs_t::dpu_slic_bits_V29_72_pt[16]

Definition at line 200 of file fm.h.

Referenced by v29RxSt7Init().

Fract v29Table_sPtrs_t::dpu_slic_bits_V29_96_pt[32]

Definition at line 201 of file fm.h.

Referenced by v29RxSt7Init().

Fract v29Table_sPtrs_t::dpu_slic_invmod_V29_96_pt[4]

Definition at line 202 of file fm.h.

Referenced by v29RxSt34Init(), and v29RxSt7Init().

Fract v29Table_sPtrs_t::bp_rx_v29_pt[43]

Definition at line 203 of file fm.h.

Referenced by v29RxSt1Init().

Fract v29Table_sPtrs_t::bp_hilb_v29_pt[43]

Definition at line 204 of file fm.h.

Referenced by v29RxSt1Init().

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


FM: sym_map.c File Reference

sym_map.c File Reference

#include <stdlib.h>
#include <ti/mas/types/types.h>
#include "dpu_smap.h"
#include "dpu_tgt.h"
#include "fmport.h"

Include dependency graph for sym_map.c:

Go to the source code of this file.

Functions

void | dpu_smap (dpu_smap_t *smap_ptr, Fract *bits, Fract *x_sym, Fract *y_sym, int ind)
void | dpu_dot (dpu_smap_t *smap_ptr, Fract *bits, Fract *x_sym, Fract *y_sym, int index)
void | dpu_v27_St3_smap (dpu_smap_t *smap_ptr, Fract *bits, Fract *x_sym, Fract *y_sym, int index)
void | dpu_smap_init (dpu_smap_t *smap_ptr, const Fract *smap_table)

Function Documentation

void dpu_smap | ( | dpu_smap_t * | smap_ptr,
 |  | Fract * | bits,
 |  | Fract * | x_sym,
 |  | Fract * | y_sym,
 |  | int | ind
 | ) |  |

Definition at line 58 of file sym_map.c.

References dpu_smap_t::smap_table.

Referenced by v27TxSt4Init(), v29RxSt4Init(), and v29TxSt2Init().

void dpu_dot | ( | dpu_smap_t * | smap_ptr,
 |  | Fract * | bits,
 |  | Fract * | x_sym,
 |  | Fract * | y_sym,
 |  | int | index
 | ) |  |

Definition at line 89 of file sym_map.c.

References dpu_smap_t::pre_symbol, and dpu_smap_t::smap_table.

Referenced by v27TxSt2Init(), and v29TxSt1Init().

void dpu_v27_St3_smap | ( | dpu_smap_t * | smap_ptr,
 |  | Fract * | bits,
 |  | Fract * | x_sym,
 |  | Fract * | y_sym,
 |  | int | index
 | ) |  |

Definition at line 124 of file sym_map.c.

References dpu_smap_t::pre_symbol, and dpu_smap_t::smap_table.

Referenced by v27RxSt4Init(), and v27TxSt3Init().

void dpu_smap_init | ( | dpu_smap_t * | smap_ptr,
 |  | const Fract * | smap_table
 | ) |  |

Definition at line 156 of file sym_map.c.

References dpu_smap_t::pre_symbol, and dpu_smap_t::smap_table.

Referenced by v27TxSt2Init(), v27TxSt4Init(), v29RxSt4Init(), v29TxSt1Init(), and v29TxSt2Init().


FM: sym_map.c Source File

sym_map.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: DPU symbol mapping routines
00003  ******************************************************************************
00004  * FILE NAME:   sym_map.c
00005  *
00006  * DESCRIPTION: DPU symbol mapping routines in C
00007  *
00008  * REQUIRES:    types.h (generic data types)
00009  *              dpu.h (all the data structures required by DPU)
00010  *
00011  * TABS: NONE
00012  *
00013  * $Id: SYM_MAP.C 1.4 1999/04/01 15:30:42 sakhtar Exp $
00014  *
00015  * REVISION HISTORY:
00016  *
00017  * $Log: SYM_MAP.C $
00018  * Revision 1.4  1999/04/01 15:30:42  sakhtar
00019  * Removed unused buffers
00020  * Revision 1.3  1997/10/28 22:54:04  PPATEL
00021  *  Improvement in execution time of mapper (see compiler output to
00022  * verify )
00023  * Revision 1.2  1997/05/18 12:20:55  Zoran
00024  *   All tables use const declarations
00025  * Revision 1.1  1997/02/06 10:20:15  unknown
00026  * Initial revision
00027  *
00028  * (C) Copyright 1996, TELOGY Networks, Inc.
00029  *****************************************************************************/
00030
00031
00032 #include <stdlib.h>
00033 #include <ti/mas/types/types.h>
00034
00035 #include "dpu_smap.h"
00036 #include "dpu_tgt.h"
00037 #include "fmport.h"
00038
00039 /******************************************************************************
00040  * Subroutine: Symbol Mapper
00041  ******************************************************************************
00042  * SUBROUTINE NAME: dpu_smap
00043  *
00044  * DESCRIPTION: Symbol mapper for QAM constellations
00045  *
00046  * API:    *smap_ptr - points to the sym.mapper definition structure
00047  *              Fract   *smap_table - table used for symbol mapper
00048  *
00049  *         *bits - index for accessing the table with symbols
00050  *         *x_sym - x coordinate of the symbol
00051  *         *y_sym - y coordinate of the symbol
00052  *
00053  * TABS: NONE
00054  *
00055  * (C) Copyright 1996, TELOGY Networks, Inc.
00056  *****************************************************************************/
00057
00058 void dpu_smap(dpu_smap_t *smap_ptr, Fract *bits, Fract *x_sym, Fract *y_sym, int ind)
00059 {
00060
00061   const Fract *table = smap_ptr->smap_table;
00062
00063   table += (*bits)*2;
00064   /* Read the coordinates of the point from the table */
00065   (*x_sym) = *table++;
00066   (*y_sym) = *table;
00067
00068   return;
00069 }
00070 /******************************************************************************
00071  * Subroutine: Symbol dotting
00072  ******************************************************************************
00073  * SUBROUTINE NAME: dpu_smap
00074  *
00075  * DESCRIPTION: Symbol mapper for alternations
00076  *
00077  * API:    *smap_ptr - points to the sym.mapper definition structure
00078  *              Fract   *smap_table - table used for symbol mapper
00079  *
00080  *         *bits - index for accessing the table with symbols
00081  *         *x_sym - x coordinate of the symbol
00082  *         *y_sym - y coordinate of the symbol
00083  *
00084  * TABS: NONE
00085  *
00086  * (C) Copyright 1996, TELOGY Networks, Inc.
00087  *****************************************************************************/
00088
00089 void dpu_dot(dpu_smap_t *smap_ptr, Fract *bits, Fract *x_sym, Fract *y_sym, int index)
00090 {
00091
00092   int ind;
00093
00094   /* ind = (index & 0x01)*2;   */
00095
00096   smap_ptr->pre_symbol =  (smap_ptr->pre_symbol+1)& 0x01 ;
00097   ind = (smap_ptr->pre_symbol << 1);
00098   /* Read the coordinates of the point from the table */
00099   (*x_sym) = smap_ptr->smap_table [ind];
00100   (*y_sym) = smap_ptr->smap_table [ind+1];
00101
00102   return;
00103 }
00104
00105 /******************************************************************************
00106  * Subroutine: Symbol for V27 TRN state
00107  ******************************************************************************
00108  * SUBROUTINE NAME: dpu_smap
00109  *
00110  * DESCRIPTION: Symbol mapper for  V27 TRN state
00111  *
00112  * API:    *smap_ptr - points to the sym.mapper definition structure
00113  *              Fract   *smap_table - table used for symbol mapper
00114  *
00115  *         *bits - index for accessing the table with symbols
00116  *         *x_sym - x coordinate of the symbol
00117  *         *y_sym - y coordinate of the symbol
00118  *
00119  * TABS: NONE
00120  *
00121  * (C) Copyright 1996, TELOGY Networks, Inc.
00122  *****************************************************************************/
00123
00124 void dpu_v27_St3_smap(dpu_smap_t *smap_ptr, Fract *bits, Fract *x_sym, Fract *y_sym, int index)
00125 {
00126
00127   int ind;
00128
00129   ind = (*bits & 0x04)>> 2;
00130   smap_ptr->pre_symbol =  smap_ptr->pre_symbol ^ ind;
00131   ind = smap_ptr->pre_symbol << 1;
00132   /* Read the coordinates of the point from the table */
00133   (*x_sym) = smap_ptr->smap_table [ind];
00134   (*y_sym) = smap_ptr->smap_table [ind+1];
00135
00136   return;
00137 }
00138 /******************************************************************************
00139  * Subroutine:  Symbol mapper Initialization
00140  ******************************************************************************
00141  * SUBROUTINE NAME: dpu_smap_init
00142  *
00143  * DESCRIPTION: Symbol Mapper Initialization
00144  *
00145  * API:    *smap_ptr - points to the dif.encoder definition structure
00146  *              Fract   *smap_table - table used for symbol mapper
00147  *
00148  *         int *smap_table - table used for symbol mapping
00149  *
00150  *
00151  * TABS: NONE
00152  *
00153  * (C) Copyright 1996, TELOGY Networks, Inc.
00154  *****************************************************************************/
00155
00156 void dpu_smap_init(dpu_smap_t *smap_ptr,
00157                   const Fract *smap_table )
00158 {
00159   /* Initialize structure */
00160   smap_ptr->smap_table = smap_table;
00161   smap_ptr->pre_symbol = 1;
00162
00163   return;
00164 }
00165
00166 /* Nothing past this point */


FM: trc_init.c File Reference

trc_init.c File Reference

#include <ti/mas/types/types.h>
#include <ti/mas/fract/fract.h>
#include "dpu_trec.h"
#include "dpumath.h"
#include "dpuloc.h"
#include "fmport.h"

Include dependency graph for trc_init.c:

Go to the source code of this file.

Functions

void dpu_trec_init (dpuInst_t *Inst, int index, int length, Fract invBaud)

Function Documentation

void dpu_trec_init | ( | dpuInst_t * | Inst,
 |  | int | index,
 |  | int | length,
 |  | Fract | invBaud
 | ) |  |

Definition at line 41 of file trc_init.c.

References dpu_trec_t::accum, dpu_trec_t::accumImag, dpu_trec_t::accumReal, dpu_trec_t::alpha, dpu_trec_t::angleComputeFlag, fmTablePtrs_t::commonTable1Ptrs, dpu_trec_t::count, dpu_trec_t::dcComponent, dpu_trec_t::delay, dpu_trec_t::division, DPU_TREC_COEF_SCALE, DPU_TREC_DELAY_LEN, commonTable1_sPtrs_t::dpu_trec_fil_coef_pt, DPU_TREC_INDEX_INC, DPU_TREC_K1, DPU_TREC_K2, DPU_TREC_NUMBER, DPU_TREC_THR, dpu_trec_t::f1, dpu_trec_t::f2, dpu_trec_t::filt_index_inc, dpu_trec_t::hh1, dpu_trec_t::hh2, cmplx_t::im, dpu_trec_t::int_filt_index, dpu_trec_t::k1, dpu_trec_t::k2, dpu_trec_t::length, dpu_trec_t::one_mu, dpu_trec_t::p1, cmplx_t::re, dpu_trec_t::rot_imag, dpu_trec_t::rot_imag_est, dpu_trec_t::rot_real, dpu_trec_t::rot_real_est, dpuInst_s::RxInst, dpuInst_s::TablePtr, dpu_trec_t::threshold, dpu_trec_t::trec_enable, dpuRxInst_t::trec_inst, and dpu_trec_t::ttone_count.

Referenced by v27RxSt1Init(), and v29RxSt1Init().


FM: trc_init.c Source File

trc_init.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE:
00003  ******************************************************************************
00004  * FILE NAME:
00005  *
00006  * DESCRIPTION:
00007  *
00008  * TABS: NONE
00009  *
00010  * $Id: trc_init.c 1.3 1998/04/30 17:14:43 ppatel Exp $
00011  *
00012  * REVISION HISTORY:
00013  *
00014  * $Log: trc_init.c $
00015  * Revision 1.3  1998/04/30 17:14:43  ppatel
00016  *  Changes for reporting modem status (timing offset, carrier freq offset,
00017  * snr, etc.)
00018  * Revision 1.2  1998/01/21 00:02:11  PPATEL
00019  *  Second order timinig recovery (deemed necessary for V.17 short training)
00020  * Also compensates for D.C in cross correlation. MIPS not yet measured.
00021  * Needs clean up in terms of putting things in assembly for reducing
00022  * MIPS
00023  * Revision 1.1  1997/11/21 14:48:20  PPATEL
00024  * Initial revision
00025  *
00026  * (C) Copyright 1997, TELOGY Networks, Inc.
00027  *****************************************************************************/
00028 #include <ti/mas/types/types.h>
00029 #include <ti/mas/fract/fract.h>
00030 #include "dpu_trec.h"
00031 #include "dpumath.h"
00032 #include "dpuloc.h"
00033 #include "fmport.h"
00034
00035 /******************************************************************************
00036  * FUNCTION PURPOSE: initialize DPU timing recovery
00037  ******************************************************************************
00038  * DESCRIPTION: initialize DPU RX timing recovery
00039  *
00040  *****************************************************************************/
00041  void dpu_trec_init(dpuInst_t *Inst, int index, int length, Fract invBaud)
00042  {
00043     int i;
00044     LFract t1;
00045     dpu_trec_t *inst;
00046     dpuRxInst_t *RxInst;
00047
00048     RxInst = &Inst->RxInst;         /* Store locally Rx instance address */
00049
00050     inst = &RxInst->trec_inst;
00051
00052     for (i=0; i<DPU_TREC_DELAY_LEN; i++)
00053       inst->delay[i] = 0;
00054
00055     inst->trec_enable = FALSE;
00056     inst->count  = 0;
00057     inst->hh1.re = 0;
00058     inst->hh1.im = 0;
00059     inst->hh2.re = 0;
00060     inst->hh2.im = 0;
00061     inst->length = length;
00062     inst->int_filt_index = ((int)(DPU_TREC_NUMBER - 1)) >> 1;
00063     inst->rot_real_est = 0;
00064     inst->rot_imag_est = 0;
00065     inst->rot_real     = 2048;
00066     inst->rot_imag     = 0;
00067
00068     /* parameters for dc component estimation */
00069     inst->alpha = (Fract)(0.6*DPU_TREC_COEF_SCALE);
00070   t1 = frctMul((Fract)(0.4*DPU_TREC_COEF_SCALE), 15, invBaud, 15, 30);
00071     inst->division = frctLF2F(t1, 30, 15);
00072
00073     inst->f1.re = Inst->TablePtr->commonTable1Ptrs->dpu_trec_fil_coef_pt[index][0];
00074     inst->f2.re = Inst->TablePtr->commonTable1Ptrs->dpu_trec_fil_coef_pt[index][1];
00075     inst->f1.im = Inst->TablePtr->commonTable1Ptrs->dpu_trec_fil_coef_pt[index][2];
00076     inst->f2.im = Inst->TablePtr->commonTable1Ptrs->dpu_trec_fil_coef_pt[index][3];
00077
00078   /* 4*(1-mu) as the scaling factor */
00079     inst->one_mu = (Fract)(4*0.02*DPU_TREC_COEF_SCALE);
00080
00081     inst->filt_index_inc = DPU_TREC_INDEX_INC;
00082     inst->ttone_count    = 0;
00083
00084   inst->dcComponent.re = 0;
00085   inst->dcComponent.im = 0;
00086
00087   inst->k2        = (Fract)(DPU_TREC_K2);
00088   inst->k1        = (Fract)(DPU_TREC_K1);
00089   inst->accum     = 0;
00090   inst->p1        = 0;
00091   inst->threshold = (Fract)(DPU_TREC_THR);
00092
00093   inst->accumReal = 0;
00094   inst->accumImag = 0;
00095
00096   inst->angleComputeFlag = 0;
00097
00098  } /* Nothing after this point */


FM: trc_init.h File Reference

trc_init.h File Reference

#include "dpu_trec.h"

Include dependency graph for trc_init.h:

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

Go to the source code of this file.

Functions

void dpu_trec_init (dpuInst_t *inst, int index, int length, Fract invBaud)

Function Documentation

void dpu_trec_init | ( | dpuInst_t * | inst,
 |  | int | index,
 |  | int | length,
 |  | Fract | invBaud
 | ) |  |

Definition at line 41 of file trc_init.c.

References dpu_trec_t::accum, dpu_trec_t::accumImag, dpu_trec_t::accumReal, dpu_trec_t::alpha, dpu_trec_t::angleComputeFlag, fmTablePtrs_t::commonTable1Ptrs, dpu_trec_t::count, dpu_trec_t::dcComponent, dpu_trec_t::delay, dpu_trec_t::division, DPU_TREC_COEF_SCALE, DPU_TREC_DELAY_LEN, commonTable1_sPtrs_t::dpu_trec_fil_coef_pt, DPU_TREC_INDEX_INC, DPU_TREC_K1, DPU_TREC_K2, DPU_TREC_NUMBER, DPU_TREC_THR, dpu_trec_t::f1, dpu_trec_t::f2, dpu_trec_t::filt_index_inc, dpu_trec_t::hh1, dpu_trec_t::hh2, cmplx_t::im, dpu_trec_t::int_filt_index, dpu_trec_t::k1, dpu_trec_t::k2, dpu_trec_t::length, dpu_trec_t::one_mu, dpu_trec_t::p1, cmplx_t::re, dpu_trec_t::rot_imag, dpu_trec_t::rot_imag_est, dpu_trec_t::rot_real, dpu_trec_t::rot_real_est, dpuInst_s::RxInst, dpuInst_s::TablePtr, dpu_trec_t::threshold, dpu_trec_t::trec_enable, dpuRxInst_t::trec_inst, and dpu_trec_t::ttone_count.

Referenced by v27RxSt1Init(), and v29RxSt1Init().


FM: trc_init.h Source File

trc_init.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE:
00003  ******************************************************************************
00004  * FILE NAME:
00005  *
00006  * DESCRIPTION:
00007  *
00008  * TABS: NONE
00009  *
00010  * $Id: trc_init.h 1.2 1998/01/21 00:02:11 PPATEL Exp $
00011  *
00012  * REVISION HISTORY:
00013  *
00014  * $Log: trc_init.h $
00015  * Revision 1.2  1998/01/21 00:02:11  PPATEL
00016  *  Second order timinig recovery (deemed necessary for V.17 short training)
00017  * Also compensates for D.C in cross correlation. MIPS not yet measured.
00018  * Needs clean up in terms of putting things in assembly for reducing
00019  * MIPS
00020  * Revision 1.1  1997/11/21 14:48:21  PPATEL
00021  * Initial revision
00022  *
00023  * (C) Copyright 1997, TELOGY Networks, Inc.
00024  *****************************************************************************/
00025 #include "dpu_trec.h"
00026
00027 void dpu_trec_init(dpuInst_t *inst, int index, int length, Fract invBaud);
00028
00029 /* nothing past this point */


FM: trec_com.h File Reference

trec_com.h File Reference

#include "dpu_trec.h"

Include dependency graph for trec_com.h:

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

Go to the source code of this file.

Functions

void trec_compute_slow (dpu_trec_t *inst, int *k)

Function Documentation

void trec_compute_slow | ( | dpu_trec_t * | inst,
 |  | int * | k
 | ) |  |


FM: trec_com.h Source File

trec_com.h

Go to the documentation of this file.
00001 #ifndef TREC_COM_H
00002 #define TREC_COM_H
00003 /******************************************************************************
00004  * FILE PURPOSE:
00005  ******************************************************************************
00006  * FILE NAME:
00007  *
00008  * DESCRIPTION:
00009  *
00010  * TABS: NONE
00011  *
00012  * $Id: trec_com.h 1.1 1997/11/21 14:48:21 PPATEL Exp $
00013  *
00014  * REVISION HISTORY:
00015  *
00016  * $Log: trec_com.h $
00017  * Revision 1.1  1997/11/21 14:48:21  PPATEL
00018  * Initial revision
00019  *
00020  * (C) Copyright 1997, TELOGY Networks, Inc.
00021  *****************************************************************************/
00022
00023 #include "dpu_trec.h"
00024
00025 void trec_compute_slow(dpu_trec_t *inst, int *k);
00026
00027 #endif
00028
00029 /* nothing past this point */


FM: trec_int.c File Reference

trec_int.c File Reference

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

Include dependency graph for trec_int.c:

Go to the source code of this file.

Variables

const Fract dpuTrecTableAsFcnPt [1107]


FM: trec_int.c Source File

trec_int.c

Go to the documentation of this file.
00001 /******************************************************************************
00002 ;* FILE PURPOSE: Timing Recovery coefficients of sub-filters
00003 ;******************************************************************************
00004 ;* FILE NAME: trec_int.c
00005 ;*
00006 ;* DESCRIPTION: Contains timing recovery coefficients
00007 ;*
00008 ;* TABS: NONE
00009 ;*
00010 ;* Initial revision
00011 ;*
00012 ;*****************************************************************************/
00013 #include <ti/mas/types/types.h>
00014
00015 #pragma DATA_SECTION(dpuTrecTableAsFcnPt, "dputrecRelocatableTable");
00016
00017 const Fract  dpuTrecTableAsFcnPt[1107] =
00018 {
00019     (Fract)     7
00020   , (Fract)    -20
00021   , (Fract)     41
00022   , (Fract)    -68
00023   , (Fract)     99
00024   , (Fract)    -125
00025   , (Fract)     137
00026   , (Fract)    -121
00027   , (Fract)     64
00028   , (Fract)     55
00029   , (Fract)    -267
00030   , (Fract)     640
00031   , (Fract)    -1426
00032   , (Fract)     4974
00033   , (Fract)     4788
00034   , (Fract)    -1452
00035   , (Fract)     678
00036   , (Fract)    -303
00037   , (Fract)     85
00038   , (Fract)     40
00039   , (Fract)    -105
00040   , (Fract)     127
00041   , (Fract)    -120
00042   , (Fract)     97
00043   , (Fract)    -69
00044   , (Fract)     42
00045   , (Fract)    -21
00046   , (Fract)     6
00047   , (Fract)    -18
00048   , (Fract)     39
00049   , (Fract)    -68
00050   , (Fract)     100
00051   , (Fract)    -130
00052   , (Fract)     146
00053   , (Fract)    -137
00054   , (Fract)     87
00055   , (Fract)     24
00056   , (Fract)    -229
00057   , (Fract)     598
00058   , (Fract)    -1392
00059   , (Fract)     5154
00060   , (Fract)     4597
00061   , (Fract)    -1471
00062   , (Fract)     713
00063   , (Fract)    -337
00064   , (Fract)     115
00065   , (Fract)     17
00066   , (Fract)    -89
00067   , (Fract)     116
00068   , (Fract)    -114
00069   , (Fract)     95
00070   , (Fract)    -68
00071   , (Fract)     43
00072   , (Fract)    -22
00073   , (Fract)     5
00074   , (Fract)    -17
00075   , (Fract)     38
00076   , (Fract)    -67
00077   , (Fract)     101
00078   , (Fract)    -134
00079   , (Fract)     155
00080   , (Fract)    -153
00081   , (Fract)     110
00082   , (Fract)    -7
00083   , (Fract)    -189
00084   , (Fract)     552
00085   , (Fract)    -1350
00086   , (Fract)     5329
00087   , (Fract)     4402
00088   , (Fract)    -1482
00089   , (Fract)     743
00090   , (Fract)    -369
00091   , (Fract)     143
00092   , (Fract)    -5
00093   , (Fract)    -72
00094   , (Fract)     105
00095   , (Fract)    -108
00096   , (Fract)     92
00097   , (Fract)    -68
00098   , (Fract)     43
00099   , (Fract)    -23
00100   , (Fract)     3
00101   , (Fract)    -15
00102   , (Fract)     36
00103   , (Fract)    -66
00104   , (Fract)     102
00105   , (Fract)    -137
00106   , (Fract)     164
00107   , (Fract)    -167
00108   , (Fract)     133
00109   , (Fract)    -39
00110   , (Fract)    -147
00111   , (Fract)     502
00112   , (Fract)    -1300
00113   , (Fract)     5497
00114   , (Fract)     4203
00115   , (Fract)    -1485
00116   , (Fract)     769
00117   , (Fract)    -399
00118   , (Fract)     171
00119   , (Fract)    -27
00120   , (Fract)    -55
00121   , (Fract)     94
00122   , (Fract)    -101
00123   , (Fract)     89
00124   , (Fract)    -67
00125   , (Fract)     43
00126   , (Fract)    -24
00127   , (Fract)     2
00128   , (Fract)    -14
00129   , (Fract)     34
00130   , (Fract)    -64
00131   , (Fract)     102
00132   , (Fract)    -140
00133   , (Fract)     171
00134   , (Fract)    -182
00135   , (Fract)     155
00136   , (Fract)    -71
00137   , (Fract)    -104
00138   , (Fract)     449
00139   , (Fract)    -1241
00140   , (Fract)     5658
00141   , (Fract)     4000
00142   , (Fract)    -1482
00143   , (Fract)     791
00144   , (Fract)    -426
00145   , (Fract)     197
00146   , (Fract)    -49
00147   , (Fract)    -38
00148   , (Fract)     82
00149   , (Fract)    -94
00150   , (Fract)     85
00151   , (Fract)    -66
00152   , (Fract)     44
00153   , (Fract)    -24
00154   , (Fract)     1
00155   , (Fract)    -12
00156   , (Fract)     32
00157   , (Fract)    -63
00158   , (Fract)     101
00159   , (Fract)    -143
00160   , (Fract)     178
00161   , (Fract)    -195
00162   , (Fract)     178
00163   , (Fract)    -104
00164   , (Fract)    -60
00165   , (Fract)     392
00166   , (Fract)    -1175
00167   , (Fract)     5812
00168   , (Fract)     3795
00169   , (Fract)    -1471
00170   , (Fract)     808
00171   , (Fract)    -451
00172   , (Fract)     221
00173   , (Fract)    -71
00174   , (Fract)    -22
00175   , (Fract)     70
00176   , (Fract)    -87
00177   , (Fract)     81
00178   , (Fract)    -64
00179   , (Fract)     44
00180   , (Fract)    -25
00181   , (Fract)     0
00182   , (Fract)    -10
00183   , (Fract)     30
00184   , (Fract)    -60
00185   , (Fract)     100
00186   , (Fract)    -144
00187   , (Fract)     184
00188   , (Fract)    -208
00189   , (Fract)     199
00190   , (Fract)    -136
00191   , (Fract)    -15
00192   , (Fract)     332
00193   , (Fract)    -1100
00194   , (Fract)     5959
00195   , (Fract)     3588
00196   , (Fract)    -1454
00197   , (Fract)     822
00198   , (Fract)    -473
00199   , (Fract)     245
00200   , (Fract)    -91
00201   , (Fract)    -5
00202   , (Fract)     58
00203   , (Fract)    -79
00204   , (Fract)     77
00205   , (Fract)    -63
00206   , (Fract)     43
00207   , (Fract)    -25
00208   , (Fract)     0
00209   , (Fract)    -8
00210   , (Fract)     27
00211   , (Fract)    -58
00212   , (Fract)     99
00213   , (Fract)    -145
00214   , (Fract)     190
00215   , (Fract)    -220
00216   , (Fract)     220
00217   , (Fract)    -168
00218   , (Fract)     30
00219   , (Fract)     269
00220   , (Fract)    -1017
00221   , (Fract)     6097
00222   , (Fract)     3379
00223   , (Fract)    -1431
00224   , (Fract)     831
00225   , (Fract)    -493
00226   , (Fract)     267
00227   , (Fract)    -111
00228   , (Fract)     10
00229   , (Fract)     46
00230   , (Fract)    -71
00231   , (Fract)     73
00232   , (Fract)    -61
00233   , (Fract)     43
00234   , (Fract)    -25
00235   , (Fract)    -2
00236   , (Fract)    -6
00237   , (Fract)     25
00238   , (Fract)    -55
00239   , (Fract)     97
00240   , (Fract)    -146
00241   , (Fract)     194
00242   , (Fract)    -231
00243   , (Fract)     241
00244   , (Fract)    -201
00245   , (Fract)     77
00246   , (Fract)     203
00247   , (Fract)    -926
00248   , (Fract)     6226
00249   , (Fract)     3169
00250   , (Fract)    -1402
00251   , (Fract)     836
00252   , (Fract)    -510
00253   , (Fract)     287
00254   , (Fract)    -131
00255   , (Fract)     27
00256   , (Fract)     34
00257   , (Fract)    -63
00258   , (Fract)     68
00259   , (Fract)    -58
00260   , (Fract)     42
00261   , (Fract)    -25
00262   , (Fract)    -3
00263   , (Fract)    -4
00264   , (Fract)     22
00265   , (Fract)    -52
00266   , (Fract)     94
00267   , (Fract)    -145
00268   , (Fract)     198
00269   , (Fract)    -241
00270   , (Fract)     260
00271   , (Fract)    -232
00272   , (Fract)     125
00273   , (Fract)     135
00274   , (Fract)    -827
00275   , (Fract)     6347
00276   , (Fract)     2959
00277   , (Fract)    -1367
00278   , (Fract)     837
00279   , (Fract)    -524
00280   , (Fract)     305
00281   , (Fract)    -149
00282   , (Fract)     42
00283   , (Fract)     22
00284   , (Fract)    -55
00285   , (Fract)     63
00286   , (Fract)    -56
00287   , (Fract)     41
00288   , (Fract)    -25
00289   , (Fract)    -4
00290   , (Fract)    -2
00291   , (Fract)     19
00292   , (Fract)    -48
00293   , (Fract)     91
00294   , (Fract)    -144
00295   , (Fract)     201
00296   , (Fract)    -251
00297   , (Fract)     278
00298   , (Fract)    -263
00299   , (Fract)     172
00300   , (Fract)     64
00301   , (Fract)    -719
00302   , (Fract)     6458
00303   , (Fract)     2748
00304   , (Fract)    -1326
00305   , (Fract)     834
00306   , (Fract)    -536
00307   , (Fract)     322
00308   , (Fract)    -167
00309   , (Fract)     58
00310   , (Fract)     10
00311   , (Fract)    -46
00312   , (Fract)     58
00313   , (Fract)    -53
00314   , (Fract)     40
00315   , (Fract)    -25
00316   , (Fract)    -6
00317   , (Fract)     0
00318   , (Fract)     15
00319   , (Fract)    -45
00320   , (Fract)     88
00321   , (Fract)    -142
00322   , (Fract)     203
00323   , (Fract)    -259
00324   , (Fract)     296
00325   , (Fract)    -293
00326   , (Fract)     220
00327   , (Fract)    -8
00328   , (Fract)    -604
00329   , (Fract)     6560
00330   , (Fract)     2538
00331   , (Fract)    -1280
00332   , (Fract)     827
00333   , (Fract)    -544
00334   , (Fract)     337
00335   , (Fract)    -183
00336   , (Fract)     73
00337   , (Fract)    -1
00338   , (Fract)    -38
00339   , (Fract)     52
00340   , (Fract)    -50
00341   , (Fract)     39
00342   , (Fract)    -25
00343   , (Fract)    -7
00344   , (Fract)     2
00345   , (Fract)     12
00346   , (Fract)    -40
00347   , (Fract)     84
00348   , (Fract)    -140
00349   , (Fract)     204
00350   , (Fract)    -266
00351   , (Fract)     312
00352   , (Fract)    -323
00353   , (Fract)     267
00354   , (Fract)    -82
00355   , (Fract)    -481
00356   , (Fract)     6651
00357   , (Fract)     2329
00358   , (Fract)    -1230
00359   , (Fract)     817
00360   , (Fract)    -550
00361   , (Fract)     351
00362   , (Fract)    -198
00363   , (Fract)     87
00364   , (Fract)    -13
00365   , (Fract)    -29
00366   , (Fract)     47
00367   , (Fract)    -47
00368   , (Fract)     37
00369   , (Fract)    -24
00370   , (Fract)    -8
00371   , (Fract)     5
00372   , (Fract)     9
00373   , (Fract)    -36
00374   , (Fract)     79
00375   , (Fract)    -136
00376   , (Fract)     203
00377   , (Fract)    -271
00378   , (Fract)     327
00379   , (Fract)    -351
00380   , (Fract)     314
00381   , (Fract)    -158
00382   , (Fract)    -350
00383   , (Fract)     6733
00384   , (Fract)     2122
00385   , (Fract)    -1175
00386   , (Fract)     802
00387   , (Fract)    -554
00388   , (Fract)     362
00389   , (Fract)    -212
00390   , (Fract)     101
00391   , (Fract)    -24
00392   , (Fract)    -20
00393   , (Fract)     41
00394   , (Fract)    -44
00395   , (Fract)     36
00396   , (Fract)    -24
00397   , (Fract)    -10
00398   , (Fract)     7
00399   , (Fract)     5
00400   , (Fract)    -32
00401   , (Fract)     74
00402   , (Fract)    -132
00403   , (Fract)     202
00404   , (Fract)    -276
00405   , (Fract)     340
00406   , (Fract)    -378
00407   , (Fract)     361
00408   , (Fract)    -235
00409   , (Fract)    -212
00410   , (Fract)     6804
00411   , (Fract)     1917
00412   , (Fract)    -1117
00413   , (Fract)     784
00414   , (Fract)    -554
00415   , (Fract)     371
00416   , (Fract)    -225
00417   , (Fract)     114
00418   , (Fract)    -35
00419   , (Fract)    -12
00420   , (Fract)     35
00421   , (Fract)    -40
00422   , (Fract)     34
00423   , (Fract)    -23
00424   , (Fract)    -11
00425   , (Fract)     9
00426   , (Fract)     1
00427   , (Fract)    -27
00428   , (Fract)     69
00429   , (Fract)    -128
00430   , (Fract)     200
00431   , (Fract)    -279
00432   , (Fract)     352
00433   , (Fract)    -403
00434   , (Fract)     406
00435   , (Fract)    -312
00436   , (Fract)    -66
00437   , (Fract)     6865
00438   , (Fract)     1714
00439   , (Fract)    -1054
00440   , (Fract)     763
00441   , (Fract)    -552
00442   , (Fract)     379
00443   , (Fract)    -237
00444   , (Fract)     126
00445   , (Fract)    -46
00446   , (Fract)    -3
00447   , (Fract)     29
00448   , (Fract)    -37
00449   , (Fract)     32
00450   , (Fract)    -23
00451   , (Fract)    -13
00452   , (Fract)     12
00453   , (Fract)    -2
00454   , (Fract)    -22
00455   , (Fract)     63
00456   , (Fract)    -122
00457   , (Fract)     197
00458   , (Fract)    -281
00459   , (Fract)     363
00460   , (Fract)    -427
00461   , (Fract)     451
00462   , (Fract)    -391
00463   , (Fract)     85
00464   , (Fract)     6915
00465   , (Fract)     1515
00466   , (Fract)    -988
00467   , (Fract)     739
00468   , (Fract)    -548
00469   , (Fract)     385
00470   , (Fract)    -247
00471   , (Fract)     137
00472   , (Fract)    -57
00473   , (Fract)     4
00474   , (Fract)     23
00475   , (Fract)    -33
00476   , (Fract)     30
00477   , (Fract)    -22
00478   , (Fract)    -14
00479   , (Fract)     14
00480   , (Fract)    -5
00481   , (Fract)    -16
00482   , (Fract)     57
00483   , (Fract)    -116
00484   , (Fract)     193
00485   , (Fract)    -281
00486   , (Fract)     372
00487   , (Fract)    -449
00488   , (Fract)     494
00489   , (Fract)    -469
00490   , (Fract)     244
00491   , (Fract)     6953
00492   , (Fract)     1319
00493   , (Fract)    -920
00494   , (Fract)     711
00495   , (Fract)    -540
00496   , (Fract)     388
00497   , (Fract)    -256
00498   , (Fract)     148
00499   , (Fract)    -67
00500   , (Fract)     12
00501   , (Fract)     17
00502   , (Fract)    -29
00503   , (Fract)     28
00504   , (Fract)    -21
00505   , (Fract)    -15
00506   , (Fract)     17
00507   , (Fract)    -9
00508   , (Fract)    -11
00509   , (Fract)     50
00510   , (Fract)    -109
00511   , (Fract)     188
00512   , (Fract)    -281
00513   , (Fract)     379
00514   , (Fract)    -470
00515   , (Fract)     535
00516   , (Fract)    -547
00517   , (Fract)     409
00518   , (Fract)     6981
00519   , (Fract)     1127
00520   , (Fract)    -849
00521   , (Fract)     681
00522   , (Fract)    -531
00523   , (Fract)     390
00524   , (Fract)    -264
00525   , (Fract)     158
00526   , (Fract)    -76
00527   , (Fract)     20
00528   , (Fract)     11
00529   , (Fract)    -25
00530   , (Fract)     26
00531   , (Fract)    -20
00532   , (Fract)    -16
00533   , (Fract)     19
00534   , (Fract)    -13
00535   , (Fract)    -5
00536   , (Fract)     43
00537   , (Fract)    -102
00538   , (Fract)     182
00539   , (Fract)    -279
00540   , (Fract)     384
00541   , (Fract)    -488
00542   , (Fract)     575
00543   , (Fract)    -624
00544   , (Fract)     581
00545   , (Fract)     6998
00546   , (Fract)     940
00547   , (Fract)    -775
00548   , (Fract)     648
00549   , (Fract)    -519
00550   , (Fract)     390
00551   , (Fract)    -270
00552   , (Fract)     167
00553   , (Fract)    -86
00554   , (Fract)     28
00555   , (Fract)     5
00556   , (Fract)    -21
00557   , (Fract)     24
00558   , (Fract)    -19
00559   , (Fract)    -18
00560   , (Fract)     22
00561   , (Fract)    -17
00562   , (Fract)     0
00563   , (Fract)     36
00564   , (Fract)    -94
00565   , (Fract)     175
00566   , (Fract)    -275
00567   , (Fract)     388
00568   , (Fract)    -505
00569   , (Fract)     613
00570   , (Fract)    -700
00571   , (Fract)     758
00572   , (Fract)     7004
00573   , (Fract)     758
00574   , (Fract)    -700
00575   , (Fract)     613
00576   , (Fract)    -505
00577   , (Fract)     388
00578   , (Fract)    -275
00579   , (Fract)     175
00580   , (Fract)    -94
00581   , (Fract)     36
00582   , (Fract)     0
00583   , (Fract)    -17
00584   , (Fract)     22
00585   , (Fract)    -18
00586   , (Fract)    -19
00587   , (Fract)     24
00588   , (Fract)    -21
00589   , (Fract)     5
00590   , (Fract)     28
00591   , (Fract)    -86
00592   , (Fract)     167
00593   , (Fract)    -270
00594   , (Fract)     390
00595   , (Fract)    -519
00596   , (Fract)     648
00597   , (Fract)    -775
00598   , (Fract)     940
00599   , (Fract)     6998
00600   , (Fract)     581
00601   , (Fract)    -624
00602   , (Fract)     575
00603   , (Fract)    -488
00604   , (Fract)     384
00605   , (Fract)    -279
00606   , (Fract)     182
00607   , (Fract)    -102
00608   , (Fract)     43
00609   , (Fract)    -5
00610   , (Fract)    -13
00611   , (Fract)     19
00612   , (Fract)    -16
00613   , (Fract)    -20
00614   , (Fract)     26
00615   , (Fract)    -25
00616   , (Fract)     11
00617   , (Fract)     20
00618   , (Fract)    -76
00619   , (Fract)     158
00620   , (Fract)    -264
00621   , (Fract)     390
00622   , (Fract)    -531
00623   , (Fract)     681
00624   , (Fract)    -849
00625   , (Fract)     1127
00626   , (Fract)     6981
00627   , (Fract)     409
00628   , (Fract)    -547
00629   , (Fract)     535
00630   , (Fract)    -470
00631   , (Fract)     379
00632   , (Fract)    -281
00633   , (Fract)     188
00634   , (Fract)    -109
00635   , (Fract)     50
00636   , (Fract)    -11
00637   , (Fract)    -9
00638   , (Fract)     17
00639   , (Fract)    -15
00640   , (Fract)    -21
00641   , (Fract)     28
00642   , (Fract)    -29
00643   , (Fract)     17
00644   , (Fract)     12
00645   , (Fract)    -67
00646   , (Fract)     148
00647   , (Fract)    -256
00648   , (Fract)     388
00649   , (Fract)    -540
00650   , (Fract)     711
00651   , (Fract)    -920
00652   , (Fract)     1319
00653   , (Fract)     6953
00654   , (Fract)     244
00655   , (Fract)    -469
00656   , (Fract)     494
00657   , (Fract)    -449
00658   , (Fract)     372
00659   , (Fract)    -281
00660   , (Fract)     193
00661   , (Fract)    -116
00662   , (Fract)     57
00663   , (Fract)    -16
00664   , (Fract)    -5
00665   , (Fract)     14
00666   , (Fract)    -14
00667   , (Fract)    -22
00668   , (Fract)     30
00669   , (Fract)    -33
00670   , (Fract)     23
00671   , (Fract)     4
00672   , (Fract)    -57
00673   , (Fract)     137
00674   , (Fract)    -247
00675   , (Fract)     385
00676   , (Fract)    -548
00677   , (Fract)     739
00678   , (Fract)    -988
00679   , (Fract)     1515
00680   , (Fract)     6915
00681   , (Fract)     85
00682   , (Fract)    -391
00683   , (Fract)     451
00684   , (Fract)    -427
00685   , (Fract)     363
00686   , (Fract)    -281
00687   , (Fract)     197
00688   , (Fract)    -122
00689   , (Fract)     63
00690   , (Fract)    -22
00691   , (Fract)    -2
00692   , (Fract)     12
00693   , (Fract)    -13
00694   , (Fract)    -23
00695   , (Fract)     32
00696   , (Fract)    -37
00697   , (Fract)     29
00698   , (Fract)    -3
00699   , (Fract)    -46
00700   , (Fract)     126
00701   , (Fract)    -237
00702   , (Fract)     379
00703   , (Fract)    -552
00704   , (Fract)     763
00705   , (Fract)    -1054
00706   , (Fract)     1714
00707   , (Fract)     6865
00708   , (Fract)    -66
00709   , (Fract)    -312
00710   , (Fract)     406
00711   , (Fract)    -403
00712   , (Fract)     352
00713   , (Fract)    -279
00714   , (Fract)     200
00715   , (Fract)    -128
00716   , (Fract)     69
00717   , (Fract)    -27
00718   , (Fract)     1
00719   , (Fract)     9
00720   , (Fract)    -11
00721   , (Fract)    -23
00722   , (Fract)     34
00723   , (Fract)    -40
00724   , (Fract)     35
00725   , (Fract)    -12
00726   , (Fract)    -35
00727   , (Fract)     114
00728   , (Fract)    -225
00729   , (Fract)     371
00730   , (Fract)    -554
00731   , (Fract)     784
00732   , (Fract)    -1117
00733   , (Fract)     1917
00734   , (Fract)     6804
00735   , (Fract)    -212
00736   , (Fract)    -235
00737   , (Fract)     361
00738   , (Fract)    -378
00739   , (Fract)     340
00740   , (Fract)    -276
00741   , (Fract)     202
00742   , (Fract)    -132
00743   , (Fract)     74
00744   , (Fract)    -32
00745   , (Fract)     5
00746   , (Fract)     7
00747   , (Fract)    -10
00748   , (Fract)    -24
00749   , (Fract)     36
00750   , (Fract)    -44
00751   , (Fract)     41
00752   , (Fract)    -20
00753   , (Fract)    -24
00754   , (Fract)     101
00755   , (Fract)    -212
00756   , (Fract)     362
00757   , (Fract)    -554
00758   , (Fract)     802
00759   , (Fract)    -1175
00760   , (Fract)     2122
00761   , (Fract)     6733
00762   , (Fract)    -350
00763   , (Fract)    -158
00764   , (Fract)     314
00765   , (Fract)    -351
00766   , (Fract)     327
00767   , (Fract)    -271
00768   , (Fract)     203
00769   , (Fract)    -136
00770   , (Fract)     79
00771   , (Fract)    -36
00772   , (Fract)     9
00773   , (Fract)     5
00774   , (Fract)    -8
00775   , (Fract)    -24
00776   , (Fract)     37
00777   , (Fract)    -47
00778   , (Fract)     47
00779   , (Fract)    -29
00780   , (Fract)    -13
00781   , (Fract)     87
00782   , (Fract)    -198
00783   , (Fract)     351
00784   , (Fract)    -550
00785   , (Fract)     817
00786   , (Fract)    -1230
00787   , (Fract)     2329
00788   , (Fract)     6651
00789   , (Fract)    -481
00790   , (Fract)    -82
00791   , (Fract)     267
00792   , (Fract)    -323
00793   , (Fract)     312
00794   , (Fract)    -266
00795   , (Fract)     204
00796   , (Fract)    -140
00797   , (Fract)     84
00798   , (Fract)    -40
00799   , (Fract)     12
00800   , (Fract)     2
00801   , (Fract)    -7
00802   , (Fract)    -25
00803   , (Fract)     39
00804   , (Fract)    -50
00805   , (Fract)     52
00806   , (Fract)    -38
00807   , (Fract)    -1
00808   , (Fract)     73
00809   , (Fract)    -183
00810   , (Fract)     337
00811   , (Fract)    -544
00812   , (Fract)     827
00813   , (Fract)    -1280
00814   , (Fract)     2538
00815   , (Fract)     6560
00816   , (Fract)    -604
00817   , (Fract)    -8
00818   , (Fract)     220
00819   , (Fract)    -293
00820   , (Fract)     296
00821   , (Fract)    -259
00822   , (Fract)     203
00823   , (Fract)    -142
00824   , (Fract)     88
00825   , (Fract)    -45
00826   , (Fract)     15
00827   , (Fract)     0
00828   , (Fract)    -6
00829   , (Fract)    -25
00830   , (Fract)     40
00831   , (Fract)    -53
00832   , (Fract)     58
00833   , (Fract)    -46
00834   , (Fract)     10
00835   , (Fract)     58
00836   , (Fract)    -167
00837   , (Fract)     322
00838   , (Fract)    -536
00839   , (Fract)     834
00840   , (Fract)    -1326
00841   , (Fract)     2748
00842   , (Fract)     6458
00843   , (Fract)    -719
00844   , (Fract)     64
00845   , (Fract)     172
00846   , (Fract)    -263
00847   , (Fract)     278
00848   , (Fract)    -251
00849   , (Fract)     201
00850   , (Fract)    -144
00851   , (Fract)     91
00852   , (Fract)    -48
00853   , (Fract)     19
00854   , (Fract)    -2
00855   , (Fract)    -4
00856   , (Fract)    -25
00857   , (Fract)     41
00858   , (Fract)    -56
00859   , (Fract)     63
00860   , (Fract)    -55
00861   , (Fract)     22
00862   , (Fract)     42
00863   , (Fract)    -149
00864   , (Fract)     305
00865   , (Fract)    -524
00866   , (Fract)     837
00867   , (Fract)    -1367
00868   , (Fract)     2959
00869   , (Fract)     6347
00870   , (Fract)    -827
00871   , (Fract)     135
00872   , (Fract)     125
00873   , (Fract)    -232
00874   , (Fract)     260
00875   , (Fract)    -241
00876   , (Fract)     198
00877   , (Fract)    -145
00878   , (Fract)     94
00879   , (Fract)    -52
00880   , (Fract)     22
00881   , (Fract)    -4
00882   , (Fract)    -3
00883   , (Fract)    -25
00884   , (Fract)     42
00885   , (Fract)    -58
00886   , (Fract)     68
00887   , (Fract)    -63
00888   , (Fract)     34
00889   , (Fract)     27
00890   , (Fract)    -131
00891   , (Fract)     287
00892   , (Fract)    -510
00893   , (Fract)     836
00894   , (Fract)    -1402
00895   , (Fract)     3169
00896   , (Fract)     6226
00897   , (Fract)    -926
00898   , (Fract)     203
00899   , (Fract)     77
00900   , (Fract)    -201
00901   , (Fract)     241
00902   , (Fract)    -231
00903   , (Fract)     194
00904   , (Fract)    -146
00905   , (Fract)     97
00906   , (Fract)    -55
00907   , (Fract)     25
00908   , (Fract)    -6
00909   , (Fract)    -2
00910   , (Fract)    -25
00911   , (Fract)     43
00912   , (Fract)    -61
00913   , (Fract)     73
00914   , (Fract)    -71
00915   , (Fract)     46
00916   , (Fract)     10
00917   , (Fract)    -111
00918   , (Fract)     267
00919   , (Fract)    -493
00920   , (Fract)     831
00921   , (Fract)    -1431
00922   , (Fract)     3379
00923   , (Fract)     6097
00924   , (Fract)    -1017
00925   , (Fract)     269
00926   , (Fract)     30
00927   , (Fract)    -168
00928   , (Fract)     220
00929   , (Fract)    -220
00930   , (Fract)     190
00931   , (Fract)    -145
00932   , (Fract)     99
00933   , (Fract)    -58
00934   , (Fract)     27
00935   , (Fract)    -8
00936   , (Fract)     0
00937   , (Fract)    -25
00938   , (Fract)     43
00939   , (Fract)    -63
00940   , (Fract)     77
00941   , (Fract)    -79
00942   , (Fract)     58
00943   , (Fract)    -5
00944   , (Fract)    -91
00945   , (Fract)     245
00946   , (Fract)    -473
00947   , (Fract)     822
00948   , (Fract)    -1454
00949   , (Fract)     3588
00950   , (Fract)     5959
00951   , (Fract)    -1100
00952   , (Fract)     332
00953   , (Fract)    -15
00954   , (Fract)    -136
00955   , (Fract)     199
00956   , (Fract)    -208
00957   , (Fract)     184
00958   , (Fract)    -144
00959   , (Fract)     100
00960   , (Fract)    -60
00961   , (Fract)     30
00962   , (Fract)    -10
00963   , (Fract)     0
00964   , (Fract)    -25
00965   , (Fract)     44
00966   , (Fract)    -64
00967   , (Fract)     81
00968   , (Fract)    -87
00969   , (Fract)     70
00970   , (Fract)    -22
00971   , (Fract)    -71
00972   , (Fract)     221
00973   , (Fract)    -451
00974   , (Fract)     808
00975   , (Fract)    -1471
00976   , (Fract)     3795
00977   , (Fract)     5812
00978   , (Fract)    -1175
00979   , (Fract)     392
00980   , (Fract)    -60
00981   , (Fract)    -104
00982   , (Fract)     178
00983   , (Fract)    -195
00984   , (Fract)     178
00985   , (Fract)    -143
00986   , (Fract)     101
00987   , (Fract)    -63
00988   , (Fract)     32
00989   , (Fract)    -12
00990   , (Fract)     1
00991   , (Fract)    -24
00992   , (Fract)     44
00993   , (Fract)    -66
00994   , (Fract)     85
00995   , (Fract)    -94
00996   , (Fract)     82
00997   , (Fract)    -38
00998   , (Fract)    -49
00999   , (Fract)     197
01000   , (Fract)    -426
01001   , (Fract)     791
01002   , (Fract)    -1482
01003   , (Fract)     4000
01004   , (Fract)     5658
01005   , (Fract)    -1241
01006   , (Fract)     449
01007   , (Fract)    -104
01008   , (Fract)    -71
01009   , (Fract)     155
01010   , (Fract)    -182
01011   , (Fract)     171
01012   , (Fract)    -140
01013   , (Fract)     102
01014   , (Fract)    -64
01015   , (Fract)     34
01016   , (Fract)    -14
01017   , (Fract)     2
01018   , (Fract)    -24
01019   , (Fract)     43
01020   , (Fract)    -67
01021   , (Fract)     89
01022   , (Fract)    -101
01023   , (Fract)     94
01024   , (Fract)    -55
01025   , (Fract)    -27
01026   , (Fract)     171
01027   , (Fract)    -399
01028   , (Fract)     769
01029   , (Fract)    -1485
01030   , (Fract)     4203
01031   , (Fract)     5497
01032   , (Fract)    -1300
01033   , (Fract)     502
01034   , (Fract)    -147
01035   , (Fract)    -39
01036   , (Fract)     133
01037   , (Fract)    -167
01038   , (Fract)     164
01039   , (Fract)    -137
01040   , (Fract)     102
01041   , (Fract)    -66
01042   , (Fract)     36
01043   , (Fract)    -15
01044   , (Fract)     3
01045   , (Fract)    -23
01046   , (Fract)     43
01047   , (Fract)    -68
01048   , (Fract)     92
01049   , (Fract)    -108
01050   , (Fract)     105
01051   , (Fract)    -72
01052   , (Fract)    -5
01053   , (Fract)     143
01054   , (Fract)    -369
01055   , (Fract)     743
01056   , (Fract)    -1482
01057   , (Fract)     4402
01058   , (Fract)     5329
01059   , (Fract)    -1350
01060   , (Fract)     552
01061   , (Fract)    -189
01062   , (Fract)    -7
01063   , (Fract)     110
01064   , (Fract)    -153
01065   , (Fract)     155
01066   , (Fract)    -134
01067   , (Fract)     101
01068   , (Fract)    -67
01069   , (Fract)     38
01070   , (Fract)    -17
01071   , (Fract)     5
01072   , (Fract)    -22
01073   , (Fract)     43
01074   , (Fract)    -68
01075   , (Fract)     95
01076   , (Fract)    -114
01077   , (Fract)     116
01078   , (Fract)    -89
01079   , (Fract)     17
01080   , (Fract)     115
01081   , (Fract)    -337
01082   , (Fract)     713
01083   , (Fract)    -1471
01084   , (Fract)     4597
01085   , (Fract)     5154
01086   , (Fract)    -1392
01087   , (Fract)     598
01088   , (Fract)    -229
01089   , (Fract)     24
01090   , (Fract)     87
01091   , (Fract)    -137
01092   , (Fract)     146
01093   , (Fract)    -130
01094   , (Fract)     100
01095   , (Fract)    -68
01096   , (Fract)     39
01097   , (Fract)    -18
01098   , (Fract)     6
01099   , (Fract)    -21
01100   , (Fract)     42
01101   , (Fract)    -69
01102   , (Fract)     97
01103   , (Fract)    -120
01104   , (Fract)     127
01105   , (Fract)    -105
01106   , (Fract)     40
01107   , (Fract)     85
01108   , (Fract)    -303
01109   , (Fract)     678
01110   , (Fract)    -1452
01111   , (Fract)     4788
01112   , (Fract)     4974
01113   , (Fract)    -1426
01114   , (Fract)     640
01115   , (Fract)    -267
01116   , (Fract)     55
01117   , (Fract)     64
01118   , (Fract)    -121
01119   , (Fract)     137
01120   , (Fract)    -125
01121   , (Fract)     99
01122   , (Fract)    -68
01123   , (Fract)     41
01124   , (Fract)    -20
01125   , (Fract)     7
01126   };
01127 /* Nothing past this point  */


FM: v17.c File Reference

v17.c File Reference

Go to the source code of this file.


FM: v17.c Source File

v17.c

Go to the documentation of this file.
00001 #ifdef V17
00002 /******************************************************************************
00003  * FILE PURPOSE: Routines for implementing Recommendation V.17
00004  ******************************************************************************
00005  * FILE NAME: v17.c
00006  *
00007  * DESCRIPTION:
00008  *
00009  * TABS: NONE
00010  *
00011  * $Id$ 1.2 2002/07/17 12:21:35 Aravind B R
00012  *
00013  * REVISION HISTORY:
00014  *
00015  * $Log$ v17.c $
00016  * Revision 1.2 2002/07/17 12:21:35 Aravind B R
00017  * increased the threshold (err_mul in mod_inst) for v.17 modulation only
00018  * Revision 1.1 Telogy Networks
00019  * Initial Revision
00020  * (C) Copyright 1997, TELOGY Networks, Inc.
00021  *****************************************************************************/
00022 #include <ti/mas/types/types.h>
00023 #include <ti/mas/fract/fract.h>
00024 #include "v17.h"
00025 #include "v17rx.h"
00026 #include "v17data.h"
00027 #include "v17datrx.h"
00028 #include "v17smap.h"
00029 #include "dpuloc.h"
00030 #include "dpu.h"
00031 #include "vxxproc.h"
00032 #include "procrx.h"
00033 #include "dpu_trec.h"
00034 #include "dpu_cdec.h"
00035 #include "dpu_slic.h"
00036 #include "dpumath.h"
00037 #include "cdrx.h"
00038 #include "maniprx.h"
00039 #include "v17rx.h"
00040 #include "v17slic.h"
00041 #include "cdc_init.h"
00042 #include "crecrx.h"
00043 #include "trc_init.h"
00044 #include "hilbrx.h"
00045 #include "int_init.h"
00046 #include "descrrx.h"
00047 #include "agcrx.h"
00048 #include "vxxinit.h"
00049 #include "fmport.h"
00050 #include "dpu_adeq.h"
00051 #include "fmprag.h"
00052
00053 extern Fract dpuAtan2(LFract y, LFract x,Fract *tanTableInFirstOctant_ptr,Fract *atan2ScaleFactors_ptr);
00054
00055 #include<stdlib.h>
00056
00057 #define TRN_SLICER_TEST  0
00058 #define FREQ_OFFSET_TEST 0
00059
00060 #if TRN_SLICER_TEST
00061 #define TRN_SLICER_SIZE 128
00062 int TRN_SLICER_INDX = 0;
00063 int TRN_SLICER_X[TRN_SLICER_SIZE];
00064 int TRN_SLICER_Y[TRN_SLICER_SIZE];
00065 int TRN_SLICER_XIDEAL[TRN_SLICER_SIZE];
00066 int TRN_SLICER_YIDEAL[TRN_SLICER_SIZE];
00067 #endif
00068
00069 #if FREQ_OFFSET_TEST
00070 #define FREQ_OFFSET  10 /* in Hz */
00071 #endif
00072
00073 #ifdef DPU_DBG
00074 #include "dpu_dbg.h"
00075 #endif
00076
00077 #ifdef TIGER
00078 /****** for TEST only ****/
00079 #include "tiger542.h"    /* Tiger 542 */
00080 #endif
00081
00082 extern const Fract division_table[];
00083
00084 /******************************************************************************
00085  * FUNCTION PURPOSE: differential encoder for V.17 for the bridge sequence
00086  *                   generation
00087  *****************************************************************************/
00088 void dpu_denc_v17_bridge(dpu_denc_t *denc_ptr, Fract *bits)
00089 {
00090    /* Take the  phase change from the table, add abs. phase */
00091   denc_ptr->abs_phase =
00092           (denc_ptr->abs_phase + denc_ptr->denc_table [(*bits)&denc_ptr->mask])
00093           &(denc_ptr->mask);
00094
00095   /* Prepare output bits */
00096   (*bits) = ((*bits)&denc_ptr->mask_comp)+denc_ptr->abs_phase;
00097 }
00098
00099 /******************************************************************************
00100  * FUNCTION PURPOSE: differential encoder  for V.17 for data transmission
00101  *****************************************************************************/
00102 void dpu_denc_v17(dpu_denc_t *denc_ptr, Fract *bits)
00103 {
00104 /*-----------------------------------------------------------------------------------**
00105 **                                                                                   **
00106 **  For v.17, the absolute phase is represented as [0...0 Y1(n-1) Y2(n-1)]           **
00107 **  The input (*bits) has the format [00..00 Q1 Q2 Q3..Qk]                           **
00108 **  For table look-up, this needs to be brought in the form [0..0 Q1 Q2 0 0]         **
00109 **  and then added to [0..0 Y1(n-1) Y2(n-1)] to give [0..0 Q1 Q2 Y1(n-1) Y2(n-1)]    **
00110 **  which is used for table lookup  to obtain [0..0 Y1n Y2n]. This has then to       **
00111 **  be brought to the form [0..0 Y1n Y2n Q3 Q4..Qk] to be input to the convolutional **
00112 **  encoder subsequently.                                                            **
00113 **  The "mask" field has k 1's left justified i.e mask = 0..011..1 (k  one's)        **
00114 **-----------------------------------------------------------------------------------*/
00115
00116   int mask,tempBits,numShifts;
00117
00118   *bits &= denc_ptr->mask;
00119
00120   for(mask =  denc_ptr->mask, tempBits = *bits, numShifts = 0;
00121       mask > 3; numShifts++, mask >>= 1, tempBits >>= 1);
00122
00123   /* tempBits  is in format [0..0 Q1 Q2], bring to format [0..0 Q1 Q2 0 0] */
00124   tempBits  = (tempBits << 2) & 0x0c;
00125
00126   /* make tempBits = [0..0 Q1 Q2 Y1(n-1) Y2(n-1)] */
00127   denc_ptr->abs_phase  = denc_ptr->abs_phase & 0x03;
00128   tempBits             = (tempBits + denc_ptr->abs_phase) & 0x0f;
00129
00130   /* update abs_phase = [0..0 Y1n Y2n] by table look-up */
00131   tempBits =  denc_ptr->abs_phase  =  denc_ptr->denc_table[tempBits]  & 0x03;
00132   tempBits = tempBits << numShifts;
00133
00134   /* finally, (*bits) = [0..0 Y1n Y2n Q3 Q4..Qk] */
00135   (*bits) = ((*bits) & (denc_ptr->mask >> 2)) | tempBits;
00136
00137 }
00138
00139 /******************************************************************************
00140  * FUNCTION PURPOSE:
00141  *****************************************************************************/
00142 void dpu_dot_v17(dpu_smap_t *smap_ptr, Fract *bits, Fract *x_sym, Fract *y_sym, int index)
00143 {
00144
00145   int ind;
00146
00147   /* ind = (index & 0x01)*2;   */
00148
00149   smap_ptr->pre_symbol =  (smap_ptr->pre_symbol+1)& 0x01 ;
00150   ind = (smap_ptr->pre_symbol << 1);
00151   /* Read the coordinates of the point from the table */
00152   (*x_sym) = smap_ptr->smap_table [ind];
00153   (*y_sym) = smap_ptr->smap_table [ind+1];
00154
00155 #ifdef DPU_DBG
00156   dpu_dbg_insert_const_pt(*x_sym, *y_sym);
00157 #endif
00158
00159 #ifdef TIGER
00160         /* for tiger testing only */
00161      out_da = ((tuint)(*x_sym+32768)) & 0xff00;
00162      out_da += ((tuint)(*y_sym+32768))>>8;
00163      T542_DA = out_da;
00164 #endif
00165 }
00166
00167 /******************************************************************************
00168  * FUNCTION PURPOSE:
00169  *****************************************************************************/
00170 void dpu_smap_v17(dpu_smap_t *smap_ptr, Fract *bits, Fract *x_sym, Fract *y_sym, int ind)
00171 {
00172   const Fract *table = smap_ptr->smap_table;
00173
00174   table += (*bits)*2;
00175   /* Read the coordinates of the point from the table */
00176   (*x_sym) = *table++;
00177   (*y_sym) = *table;
00178 }
00179
00180 /******************************************************************************
00181  * FUNCTION PURPOSE: Convolutional encoder implementation
00182  *****************************************************************************/
00183 void dpu_cenc_v17 (dpu_cenc_t *cenc_ptr, Fract *bits)
00184 {
00185   int s1,s2,s3,t1,t2,t3,y0,y1,y2,mask,tempBits,numShifts;
00186 /*---------------------------------------------------------------------------**
00187 **   first separate out s1,s2 and s3 from the input format [0.0 S1 S2 S3] of **
00188 **   of cenc_ptr->state                                                      **
00189 **---------------------------------------------------------------------------*/
00190   s1 = cenc_ptr->state;
00191   t3 = s3 = s1 & 0x01;
00192   s1 = s1 >> 1;
00193   t2 = s2 = s1 & 0x01;
00194   s1 = s1 >> 1;
00195   t1 = s1 & 0x01;
00196
00197   /* the format of input bits (*bits) is [0..0 Y1 Y2 Q3 Q4...Qn] with the *
00198    * mask in cenc_ptr->mask set to       [0..0 1   1  1  1... 1]          *
00199    * bring (*bits) to the format [0..0 Y1 Y2] and then extract Y1 and Y2  */
00200     for(mask = cenc_ptr->mask, tempBits = *bits, numShifts = 0;
00201         mask > 3; numShifts++, mask >>= 1, tempBits >>= 1);
00202     y2 = tempBits        & 0x01;
00203   y1 = (tempBits >> 1) & 0x01;
00204
00205   /* Now process s1,s2,s3 and y1,y2 to generate the redundant bit Y0  */
00206     y0 = t1;
00207   s3 = t1;
00208   s2 = t3 ^ (y1 ^ y2) ^ (t1 & (t2 ^ y2));
00209   s1 = (t2 ^ y2) ^ (y1 & t1);
00210     s1 = s1 & 0x01;
00211   s2 = s2 & 0x01;
00212
00213   /* Lump back s1,s2 and s3 in the format [0..0 S1 S2 S3] */
00214     cenc_ptr->state = (s1 << 2) | (s2 << 1) | s3;
00215
00216   /* We originally had [0..0 Y1 Y2 Q3 Q4...Qn] in (*bits) and now we have     *
00217    * to insert Y0 so that the output in (*bits) is [0..0 Y0 Y1 Y2 Q3 Q4...Qn] *
00218    * Note that numShifts = (n-2) at this point. so we have to shift       *
00219    * y0 stored as [0..0 Y0] left by n bits to give [0..0 Y0 0..0 (n 0's)]     *
00220    * and then OR with (*bits)                                                 */
00221    (*bits) = (*bits) | (y0 << (numShifts + 2));
00222 }
00223
00224 /******************************************************************************
00225  * FUNCTION PURPOSE:
00226  *****************************************************************************/
00227 void dpu_bridge_seq_v17_init(dpu_inman_t  *inst, int bridge_state)
00228 {
00229   inst->bridge_state = bridge_state;
00230 }
00231
00232 /******************************************************************************
00233  * FUNCTION PURPOSE:
00234  *****************************************************************************/
00235 int dpu_gen_bridge_seq_v17(dpu_inman_t *inst, Fract *in_baud,
00236                     Fract *data_in_buf, Fract bts_per_baud )
00237 {
00238  /* power <<= bts_per_baud;
00239   *in_baud=power-1; */
00240   inst->bridge_state &= 7;
00241   *in_baud             = dpu_bridge_seq_v17[inst->bridge_state];
00242   inst->bridge_state  += 1;
00243   return(DPU_DATA_OK);
00244 }
00245
00246 /******************************************************************************
00247  * FUNCTION PURPOSE: dpu modulator for v17 unmod. carrier state
00248  ******************************************************************************
00249  * DESCRIPTION: dpu modulator for v17 unmod. carrier state
00250  *
00251  *****************************************************************************/
00252 void dpu_un_modulate_v17( dpu_mod_t *inst, Fract *x_re, Fract *y_im)
00253 {
00254     Fract cos_f, sin_f;
00255     Fract t1;
00256
00257     t1 = (Fract) (4.472*V17_CSCALE); /* inst-> */
00258
00259     sin_f = utlSin(inst->phase);
00260     cos_f = utlSin((Fract)((Fract)16384-inst->phase));
00261
00262     *x_re=frctLF2F(dpu_mul(t1, 14, cos_f, 14, 28), 28, 14);
00263     *y_im=frctLF2F(dpu_mul(t1, 14, sin_f, 14, 28), 28, 14);
00264
00265     inst->phase += (inst->freq);
00266 }
00267
00268 /******************************************************************************
00269  * Subroutine:  V17 TX ST6 initialization subroutine
00270  ******************************************************************************
00271  * SUBROUTINE NAME: v17TxSt6Init
00272  *
00273  * DESCRIPTION: Initialization routine for V.17 TX Mode of ST6 (silence after TEP)
00274  *
00275  * API:         Inst - DPU instance
00276  *****************************************************************************/
00277 void v17TxSt6Init(dpuInst_t *Inst, int rate)
00278 {
00279   dpuTxInst_t *TxInst;
00280
00281   /* Store locally tx instance address */
00282   TxInst           = &Inst->TxInst;
00283
00284   /* State initialization */
00285   TxInst->tx_state = DPU_V17_TX_ST6;
00286
00287   TxInst->tx_count = 0;
00288   TxInst->mod_fcn  = NULL;            /* Modulator function */
00289 }
00290
00291 /******************************************************************************
00292  * Subroutine:  V17 TX ST1 initialization subroutine
00293  ******************************************************************************
00294  * SUBROUTINE NAME: v17TxSt1Init
00295  *
00296  * DESCRIPTION: Initialization routine for V.17 TX Mode of ST1 (Dotting)
00297  *
00298  * API:         Inst - DPU instance
00299  *****************************************************************************/
00300 void v17TxSt1Init(dpuInst_t *Inst, int rate)
00301 {
00302   dpuTxInst_t *TxInst;
00303   /* Carrier frequency = 1800/2400 */
00304   /* the phase  increment is therefore (1800/2400)*Q16_SCALE      */
00305   /* = (1-1800/2400)*Q16_SCALE (because Q16_SCALE represents 2*pi */
00306   Fract freq=(Fract)(-0.25*65536);
00307
00308   /* Store locally tx instance address */
00309   TxInst           = &Inst->TxInst;
00310   /* State initialization */
00311   TxInst->tx_state = DPU_V17_TX_ST1;
00312   TxInst->tx_count = 0;
00313
00314   /* Initialize function pointers */
00315   TxInst->smap_fcn = dpu_dot_v17;         /* Symbol Mapper function */
00316   TxInst->mod_fcn  = dpu_tx_mod;      /* Modulator function */
00317
00318   /* Initialize TX modules */
00319   dpu_smap_init(&TxInst->smap_inst, dpu_dot_V17_AllRates); /* Symbol Mapper Init. */
00320   dpu_mod_init (&TxInst->mod_inst, freq); /* Modulator Initialization  */
00321 }
00322
00323 /******************************************************************************
00324  * Subroutine:  V17 TX ST2 initialization subroutine
00325  ******************************************************************************
00326  * SUBROUTINE NAME: v17TxSt2Init
00327  *
00328  * DESCRIPTION: Initialization routine for V.17 TX Mode of ST2 (TRN)
00329  *
00330  * API:         Inst - DPU instance
00331  *****************************************************************************/
00332 void v17TxSt2Init(dpuInst_t *Inst, int rate)
00333 {
00334   dpuTxInst_t *TxInst;
00335
00336   /* Store locally tx instance address */
00337   TxInst           = &Inst->TxInst;
00338   /* State initialization */
00339   TxInst->tx_state = DPU_V17_TX_ST2;
00340   TxInst->tx_count = 0;
00341
00342   /* Initialize function pointers */
00343   TxInst->data_fcn  = dpu_gen_marks;    /* input data  manipulation */
00344   TxInst->scr_fcn   = dpu_scr;          /* Scrambler function */
00345   TxInst->smap_fcn  = dpu_smap_v17;         /* Symbol Mapper function */
00346
00347   /* Initialize TX modules */
00348   dpu_scr_init(&TxInst->scr_inst,       /* Scrambler initialization */
00349                2,
00350                V17_SCR_INIT_PATTERN,
00351                V17_TAP1,
00352                V17_TAP2,
00353                dpu_PN_table_v17_AllRates);
00354
00355   /* Symbol Mapper Init.*/
00356   dpu_smap_init(&TxInst->smap_inst,Inst->TablePtr->v17TablePtrs->dpu_PN_smap_table_v17_AllRates_pt);
00357 }
00358
00359 /******************************************************************************
00360  * Subroutine:  V17 TX ST3 initialization subroutine
00361  ******************************************************************************
00362  * SUBROUTINE NAME: v17TxSt3Init
00363  *
00364  * DESCRIPTION: Initialization routine for V.17 TX Mode of ST3 (Bridge Sequence)
00365  *
00366  * API:         Inst - DPU instance
00367  *****************************************************************************/
00368 void v17TxSt3Init(dpuInst_t *Inst, int rate)
00369 {
00370      dpuTxInst_t *TxInst;
00371
00372   /* Store locally tx instance address */
00373   TxInst           = &Inst->TxInst;
00374
00375   /* State initialization */
00376   TxInst->tx_state = DPU_V17_TX_ST3;
00377   TxInst->tx_count = 0;
00378
00379   /* Initialize function pointers */
00380   TxInst->data_fcn = dpu_gen_bridge_seq_v17;  /* input data  manipulation - generate bridge sequence data*/
00381   TxInst->scr_fcn  = dpu_scr;                 /* Scrambler function */
00382   TxInst->denc_fcn = dpu_denc_v17_bridge;     /* Diff. Encoder function */
00383
00384   /* Initialize TX modules */
00385    dpu_denc_init(&TxInst->denc_inst,          /* Diff. Encoder Initialization */
00386                 2,
00387                 dpu_denc_table_bridge_v17,0);
00388    dpu_bridge_seq_v17_init(&TxInst->inman_inst,0);
00389
00390   /* Symbol Mapper Init.*/
00391    dpu_smap_init(&TxInst->smap_inst,Inst->TablePtr->v17TablePtrs->dpu_bridge_smap_table_v17_AllRates_pt);
00392 }
00393
00394 /******************************************************************************
00395  * Subroutine:  V17 TX ST4 initialization subroutine
00396  ******************************************************************************
00397  * SUBROUTINE NAME: v17TxSt4Init
00398  *
00399  * DESCRIPTION: Initialization routine for V.17 TX Mode of ST4 (B1)
00400  *
00401  * API:         Inst - DPU instance
00402  *****************************************************************************/
00403 void v17TxSt4Init(dpuInst_t *Inst, int rate)
00404 {
00405   int         num_of_scr_bits;
00406   const Fract *smap_table;
00407   dpuTxInst_t *TxInst;
00408
00409   /* prepare rate dependent variables */
00410   switch(rate)
00411   {
00412     case 14400:
00413       num_of_scr_bits  = 6;
00414       smap_table       = Inst->TablePtr->v17TablePtrs->dpu_smap_V17_144_pt;
00415       break;
00416     case 12000:
00417       num_of_scr_bits  = 5;
00418       smap_table       = Inst->TablePtr->v17TablePtrs->dpu_smap_V17_120_pt;
00419       break;
00420     case 9600:
00421       num_of_scr_bits  = 4;
00422       smap_table       = Inst->TablePtr->v17TablePtrs->dpu_smap_V17_96_pt;
00423       break;
00424     case 7200:
00425       num_of_scr_bits  = 3;
00426       smap_table       = Inst->TablePtr->v17TablePtrs->dpu_smap_V17_72_pt;
00427       break;
00428   }
00429
00430   /* Store locally tx instance address */
00431   TxInst           = &Inst->TxInst;
00432   /* State initialization */
00433   TxInst->tx_state = DPU_V17_TX_ST4;
00434   TxInst->tx_count = 0;
00435
00436   /* Initialize function pointers */
00437   TxInst->data_fcn = dpu_gen_marks;     /* input data  manipulation */
00438   TxInst->denc_fcn = dpu_denc_v17;
00439   TxInst->cenc_fcn = dpu_cenc_v17;
00440
00441   /* Initialize TX modules */
00442   dpu_scr_init(&TxInst->scr_inst,       /* Scrambler initialization */
00443                num_of_scr_bits,
00444                TxInst->scr_inst.scr_delay, /* use previous state */
00445                V17_TAP1,
00446                V17_TAP2,
00447                (const Fract *)NULL);
00448   dpu_denc_init(&TxInst->denc_inst,     /* Diff. Encoder Initialization */
00449                 num_of_scr_bits,
00450                 Inst->TablePtr->v17TablePtrs->dpu_denc_V17_AllRates_pt, 3);
00451
00452  /* initialize convolutional encoder with zero state and same mask as the diff. encoder *
00453   * dpu_cenc_init should be called only after dpu_denc_init has been called             */
00454   dpu_cenc_init (&TxInst->cenc_inst, 0, TxInst->denc_inst.mask);
00455
00456   /* Symbol Mapper Init.*/
00457   dpu_smap_init(&TxInst->smap_inst,smap_table);
00458 }
00459
00460 /******************************************************************************
00461  * Subroutine:  V17 TX ST5 initialization subroutine
00462  ******************************************************************************
00463  * SUBROUTINE NAME: v17TxSt5Init
00464  *
00465  * DESCRIPTION: Initialization routine for V.17 TX Mode of ST5 (DATA)
00466  *
00467  * API:         Inst - DPU instance
00468  *              rate   - required rate
00469  *****************************************************************************/
00470 void v17TxSt5Init(dpuInst_t *Inst, int rate)
00471 {
00472   dpuTxInst_t *TxInst;
00473
00474   /* Store locally tx instance address */
00475   TxInst           = &Inst->TxInst;
00476   /* State initialization */
00477   TxInst->tx_state = DPU_V17_TX_ST5;
00478   TxInst->tx_count = 0;
00479
00480   /* Initialize function pointers */
00481   TxInst->data_fcn = dpu_tx_extract;  /* dpu_tx_extract */
00482 }
00483
00484 /******************************************************************************
00485  * Subroutine:  V17 TX State Machine
00486  ******************************************************************************
00487  * SUBROUTINE NAME: v17TxStM
00488  *
00489  * DESCRIPTION: State Machine for V17 TX Mode
00490  *
00491  * API:         Inst - DPU instance
00492  *****************************************************************************/
00493 void v17TxStM(void *inst)
00494 {
00495   dpuInst_t *Inst=(dpuInst_t *) inst;
00496   dpuTxInst_t *TxInst;
00497   int rate;
00498
00499   TxInst = &Inst->TxInst;         /* Store locally tx instance address */
00500   rate = TxInst->tx_rate;
00501   /* Status update */
00502   Inst->sts.dpustatus = DPU_ST_V17_TX + TxInst->tx_state;
00503   Inst->sts.tx_rate = TxInst->tx_rate;
00504   /* process any state */
00505   switch(TxInst->tx_state)
00506   {
00507     case DPU_V17_TX_ST0:
00508       /* TEP tone generation for 195 ms = 0.195*2400 symbols */
00509       if (TxInst->tx_count == 468)
00510         v17TxSt6Init(Inst, rate);
00511       break;
00512     case DPU_V17_TX_ST6:
00513       /* silence after TEP tone generation for 22 ms = 0.022*2400 symbols */
00514       if (TxInst->tx_count == 53)
00515         v17TxSt1Init(Inst, rate);
00516       break;
00517     case DPU_V17_TX_ST1:
00518       if (TxInst->tx_count == 256)
00519         v17TxSt2Init(Inst, rate);
00520      break;
00521     case DPU_V17_TX_ST2:
00522     if (Inst->cfg.trn_type == DPU_TRN_LONG)
00523       {
00524         if (TxInst->tx_count == 2976)
00525         v17TxSt3Init(Inst, rate);
00526       }
00527       else
00528       {
00529         if (TxInst->tx_count == 38)
00530         v17TxSt4Init(Inst,rate);
00531       }
00532       break;
00533   case DPU_V17_TX_ST3:
00534     if (TxInst->tx_count == 64)
00535     v17TxSt4Init(Inst, rate);
00536     break;
00537     case DPU_V17_TX_ST4:
00538       if (TxInst->tx_count == 48)
00539       {
00540          Inst->ctrl |= DPU_CTRL_CTS;
00541          v17TxSt5Init(Inst, rate);
00542       }
00543       break;
00544     case DPU_V17_TX_ST5:
00545       break;
00546   }
00547   return;
00548 }
00549
00550 /******************************************************************************
00551  * FUNCTION PURPOSE: dpu RX phase error calculator for V29 9600 bps
00552  ******************************************************************************
00553  * DESCRIPTION: dpu RX phase error calculator for TRN and B1 states
00554  *
00555  *****************************************************************************/
00556  void dpu_err_pha_v17_1( dpu_phase_t *inst, Fract *a_re, Fract *a_im,
00557                      Fract x_re, Fract y_im, Fract *phase, Fract *premap,
00558                      Fract dpu_slic_invmod_v17_ptr[][10])
00559  {
00560     LFract tmp_re, tmp_im;
00561     Fract  tmp, tr_re=*a_re, tr_im=*a_im;
00562
00563     tmp_re = frctMul( y_im, 10, tr_re, 10, 20);
00564     tmp_im = frctMul( x_re, 10, tr_im, 10, 20);
00565
00566     tmp    = frctLF2F(tmp_re-tmp_im,20,10);
00567
00568     *phase = frctLF2F(frctMul(tmp,10,dpu_slic_invmod_v17_ptr[abs(tr_re >>10)][abs(tr_im>>10)],
00569                               16, 26), 26, 14);
00570 }
00571
00572 /******************************************************************************
00573  * FUNCTION PURPOSE: dpu RX phase error calculator for V29 9600 bps
00574  ******************************************************************************
00575  * DESCRIPTION: dpu RX phase error calculator for TRN and B1 states
00576  *              for junction between Dotting and TRN states
00577  *****************************************************************************/
00578  void dpu_err_pha_v17( dpu_phase_t *inst, Fract *a_re, Fract *a_im,
00579                      Fract x_re, Fract y_im, Fract *phase, Fract *premap,
00580                      Fract dpu_slic_invmod_v17_ptr[][10])
00581  {
00582     LFract tmp_re, tmp_im;
00583     Fract  tmp_re1, tmp_im1;
00584     Fract *delay_re=inst->delay_re;
00585     Fract *delay_im=inst->delay_im, tmp;
00586
00587   tmp_re1 = delay_re[inst->number];
00588   tmp_im1 = delay_im[inst->number];
00589
00590     tmp_re = frctMul( y_im, 10, tmp_re1, 10, 20);
00591     tmp_im = frctMul( x_re, 10, tmp_im1, 10, 20);
00592
00593     tmp    = frctLF2F(tmp_re-tmp_im,20,10);
00594     *phase = frctLF2F(frctMul(tmp, 10,dpu_slic_invmod_v17_ptr[abs(tmp_re1>>10)][abs(tmp_im1>>10)],
00595                               16, 26), 26, 14);
00596
00597     *a_re = tmp_re1;
00598     *a_im = tmp_im1;
00599
00600     inst->number++;
00601 }
00602
00603 /******************************************************************************
00604  * FUNCTION PURPOSE: slicer for symbols A,B,C,D used for carrier recovery in
00605  *                   short training
00606  ******************************************************************************
00607  * DESCRIPTION:
00608  *
00609  *****************************************************************************/
00610 void dpu_slic_v17_TRN(dpu_slic_t *slic_ptr, Fract *x_sym, Fract *y_sym,
00611                   Fract *rx_bits, Fract *phase,
00612                   Fract *dpu_slic_pt_V29_72_ptr,
00613                   Fract *dpu_slic_pt_V27_48_ptr,
00614                   Fract *dpu_slic_pt_V27_24_ptr,
00615                   const Fract *dpu_PN_smap_table_v17_AllRates_ptr,
00616                   Fract dpu_slic_invmod_v17_ptr[][10])
00617 {
00618   Fract x_coord,y_coord;
00619   LFract tx,ty;
00620   int   index=0;
00621   Fract temp;
00622   LFract tmp_re, tmp_im;
00623   const Fract *table;
00624
00625   tx = dpu_mul(*x_sym,10,(Fract)(0.8944*V17_CSCALE),10,20);
00626   tx -= dpu_mul(*y_sym,10,(Fract)(0.4472*V17_CSCALE),10,20);
00627
00628   ty = dpu_mul(*x_sym,10,(Fract)(0.4472*V17_CSCALE),10,20);
00629   ty += dpu_mul(*y_sym,10,(Fract)(0.8944*V17_CSCALE),10,20);
00630
00631
00632   if (tx > 0)
00633   {
00634     if (ty > 0) index = 0; else index = 2;
00635   }
00636   else
00637   {
00638     if (ty > 0) index = 1; else index = 3;
00639   }
00640
00641   table = dpu_PN_smap_table_v17_AllRates_ptr + index *2;
00642   x_coord = *table++;
00643   y_coord = *table;
00644
00645   slic_ptr->x_ideal = x_coord;
00646   slic_ptr->y_ideal = y_coord;
00647
00648   slic_ptr->x_error = x_coord - *x_sym;
00649   slic_ptr->y_error = y_coord - *y_sym;
00650
00651 #if TRN_SLICER_TEST
00652 TRN_SLICER_INDX++;
00653 TRN_SLICER_INDX &= TRN_SLICER_SIZE -1;
00654 TRN_SLICER_X[TRN_SLICER_INDX] = *x_sym;
00655 TRN_SLICER_Y[TRN_SLICER_INDX] = *y_sym;
00656 TRN_SLICER_XIDEAL[TRN_SLICER_INDX] = x_coord;
00657 TRN_SLICER_YIDEAL[TRN_SLICER_INDX] = y_coord;
00658 #endif
00659
00660   /* Calculate the phase error */
00661   tmp_re = frctMul( *y_sym, 10, x_coord, 10, 20);
00662   tmp_im = frctMul( *x_sym, 10, y_coord, 10, 20);
00663   temp = frctLF2F(tmp_re-tmp_im, 20, 10);
00664
00665   slic_ptr->ph_error = frctLF2F(frctMul(temp, 10,
00666                                         dpu_slic_invmod_v17_ptr[abs(x_coord)>>10][abs(y_coord)>>10]
00667                                         , 16, 26),26, 14);
00668   *phase = slic_ptr->ph_error;
00669 }
00670
00671 /******************************************************************************
00672  * FUNCTION PURPOSE: Carrier recovery during short training. The frequency
00673  *                   offset calculation is not done.
00674  ******************************************************************************
00675  * DESCRIPTION:
00676  *
00677  *****************************************************************************/
00678  void dpu_crec_short_trn(dpu_crec_t *inst, Fract *phase, Fract *cf_offset)
00679  {
00680     Fract tmp1, tmp2;
00681
00682     /* Calc. the first order term */
00683     tmp2 = frctLF2F(frctMul(inst->k1,14, *phase, 14, 28), 28, 15);
00684     /* Current PLL output */
00685     /*tmp2 += tmp1;*/ /* Add first and second order output */
00686     tmp1 = inst->pre_p1 + tmp2 + inst->freq ;
00687
00688     /* Add delayed PLL output to the current phase */
00689     inst->phase += tmp1;
00690  }
00691
00692 /******************************************************************************
00693  * Subroutine:  V17 RX initialization subroutine  of ST1
00694  ******************************************************************************
00695  * SUBROUTINE NAME: v17RxSt1Init
00696  *
00697  * DESCRIPTION: Initialization routine for V.29 RX of ST1 (Dot detection)
00698  *
00699  * API:         Inst - DPU instance
00700  *****************************************************************************/
00701 void v17RxSt1Init(dpuInst_t *Inst, int rate)
00702  {
00703    int           delay1;
00704    dpuRxInst_t   *RxInst = &Inst->RxInst;
00705    Fract         division;
00706    int           L1;
00707    int           adeqStepSize = -1;
00708    Fract         rot_real;
00709    Fract         rot_imag;
00710    dpu_dotdet_t  *ddetInst_pt;
00711
00712    ddetInst_pt = &RxInst->dotdet_inst;
00713
00714    if (Inst->cfg.trn_type == DPU_TRN_SHORT)
00715    {
00716       adeqStepSize = 5;
00717    }
00718
00719    L1       = RxInst->samp_per_baud >> 1; /* samp_per_baud/2-1 for Hilbert */
00720    division = division_table[RxInst->samp_per_baud-2];
00721
00722    delay1             = RxInst->samp_per_baud*2*6;  /* 4 , 6 */
00723    RxInst->rx_state   = DPU_V17_RX_ST1;
00724
00725    /* initialize the dot detector, CAUTION: this function will zero out all variables */
00726    /* in dotdet_inst and then initialize some of them. */
00727    dpu_dot_det_init(ddetInst_pt, delay1, division);
00728
00729    /* initialization for V21 detection */
00730    ddetInst_pt->dot_cnt_thr = 30;   /* Threshold for dotting detection */
00731    ddetInst_pt->factor      = 2;    /* since the correlator lag is pi  */
00732
00733    /* Initialization for tep detection in dotting */
00734    /* mu = 0.9954; cos = mu *cos(2*pi*1800/9600); sin = mu *sin(2*pi*1800/9600) */
00735    ddetInst_pt->tepCoefs[0] = (Fract)(2*0.3826834 /* 0.380923*/ * INTERP_CONST_SCALE);
00736    ddetInst_pt->tepCoefs[1] = (Fract)(2*0.95*0.3826834 /* 0.919630*/ * INTERP_CONST_SCALE);
00737
00738    /* Receiver Initialization */
00739    rot_real = RxInst->trec_inst.rot_real;
00740    rot_imag = RxInst->trec_inst.rot_imag;
00741
00742    dpu_trec_init(Inst, V17_TREC_INDEX, DPU_TREC_LEN,
00743                  (Fract)(0.25*DPU_TREC_COEF_SCALE));
00744    if (Inst->cfg.trn_type == DPU_TRN_SHORT)
00745    {
00746      RxInst->trec_inst.rot_real = rot_real;
00747      RxInst->trec_inst.rot_imag = rot_imag;
00748    }
00749
00750    if (Inst->cfg.trn_type == DPU_TRN_SHORT)
00751    {
00752        ddetInst_pt->gain_calc_flag = FALSE;
00753    }
00754
00755    dpu_bp_hilb_init(&RxInst->bphilb_inst, L1, 43,Inst->TablePtr->v17TablePtrs->bp_rx_v17_pt,Inst->TablePtr->v17TablePtrs->bp_hilb_v17_pt);
00756
00757    dpu_interp_init(&RxInst->interp_inst,DPU_INTP_80_96_INDEX); /* Interp.Init.*/
00758
00759    HSrxCommonSt1Init(Inst, adeqStepSize);
00760    RxInst->smfn = v17RxStM;
00761 }
00762
00763 /******************************************************************************
00764  * Subroutine:  V17 RX initialization subroutine  of ST2
00765  ******************************************************************************
00766  * SUBROUTINE NAME: v17RxSt2Init
00767  *
00768  * DESCRIPTION: Initialization routine for V.29 RX of ST2 (v21 or tep detection)
00769  *
00770  * API:         Inst - DPU instance
00771  *****************************************************************************/
00772 void v17RxSt2Init(dpuInst_t *Inst, int rate)
00773 {
00774   dpuRxInst_t *RxInst = &Inst->RxInst;
00775   rxLSinitInHS(Inst);
00776   RxInst->rx_state = DPU_V17_RX_ST2;
00777   RxInst->smfn     = v17RxStM;
00778 }
00779
00780 /******************************************************************************
00781  * Subroutine:  V17 RX initialization subroutine of ST3
00782  ******************************************************************************
00783  * SUBROUTINE NAME: v17RxSt3Init
00784  *
00785  * DESCRIPTION: Initialization routine for V.29 RX of ST3 (PC detection)
00786  *
00787  * API:         Inst - DPU instance
00788  *****************************************************************************/
00789 void v17RxSt3Init(dpuInst_t *Inst, int rate)
00790 {
00791   dpuRxInst_t *RxInst;
00792   /* 2*pi*1800/2400 = 2*pi*1800/2400 - 2*pi */
00793   Fract freq=(Fract)(-0.25*FREQ_SCALE);
00794   Fract K1,K2;
00795
00796 #if FREQ_OFFSET_TEST
00797   freq += (Fract)(FREQ_OFFSET/2400.0*FREQ_SCALE);
00798 #endif
00799
00800   K1= (Fract)(1*INTERP_CONST_SCALE),
00801   K2= (Fract)(0.02*INTERP_CONST_SCALE);
00802
00803   RxInst = &Inst->RxInst;         /* Store locally Rx instance address */
00804   RxInst->rx_state = DPU_V17_RX_ST3;
00805   RxInst->rx_count = 0;
00806   RxInst->samp_per_baud = 4;
00807   RxInst->change_det = DPU_PC_FALSE;
00808   /* scaling const for crec fre. offset calculation, 2400*10/1024*16*16 */
00809   RxInst->mod_inst.scale = (Fract)(1.4648*INTERP_CONST_SCALE);
00810
00811   /* Initialize function pointers */
00812   RxInst->trec_fcn   = dpu_trec_interp;
00813   RxInst->dotdet_fcn = dpu_pc_det;
00814   RxInst->adeq_fcn   = dpu_adeq;
00815   RxInst->demod_fcn  = dpu_rx_demod;
00816   RxInst->crec_fcn   = dpu_no_crec_at_all;
00817
00818   /* Receiver Initialization */
00819   dpu_crec_init(&RxInst->mod_inst, K1, K2, freq);
00820
00821   if (Inst->cfg.trn_type == DPU_TRN_SHORT)
00822   {
00823   RxInst->mod_inst.pre_p1    = RxInst->mod_inst.pre_p1_old;
00824   /* Allow 5 Hz variation in carrier frequency */
00825   RxInst->mod_inst.max_error = (Fract)(5.0/2400.0*FREQ_SCALE);
00826   }
00827   else
00828   {
00829   /* Until offset has accumulated, allow 15 Hz variation in carrier frequency */
00830   RxInst->mod_inst.max_error = (Fract)(15.0/2400.0*FREQ_SCALE);
00831   }
00832
00833   /* Init. estimation of timing phase */
00834   RxInst->trec_inst.rot_real_est = 0;
00835   RxInst->trec_inst.rot_imag_est = 0;
00836
00837   /* Initialize processing function pointer */
00838   RxInst->procfn = vHSRx;
00839   RxInst->smfn   = v17RxStM;
00840
00841   if (Inst->cfg.trn_type == DPU_TRN_SHORT)
00842   {
00843     RxInst->agc_inst.gain = RxInst->agc_inst.old_gain;
00844   }
00845   else
00846   {
00847     RxInst->agc_inst.old_gain = RxInst->agc_inst.gain;
00848   }
00849 }
00850
00851 /******************************************************************************
00852  * Subroutine:  V17 RX initialization subroutine of ST34
00853  ******************************************************************************
00854  * SUBROUTINE NAME: v17RxSt34Init
00855  *
00856  * DESCRIPTION: Initialization routine for V.29 RX of ST34 (Jun)
00857  *
00858  * API:         Inst - DPU instance
00859  *****************************************************************************/
00860 void v17RxSt34Init(dpuInst_t *Inst, int rate)
00861 {
00862   dpuRxInst_t *RxInst;
00863   int length=48, beta;   /* 6, 4 */
00864   int delay_num = 0 /* 2 */;  /* adq delay: 12, Hilbert delay:6, 12+6+2-18=2 */
00865   Fract vect_re[2], vect_im[2];
00866   Fract phas_div = 0;
00867
00868   RxInst = &Inst->RxInst;         /* Store locally Rx instance address */
00869   RxInst->rx_state = DPU_V17_RX_ST34;
00870   RxInst->rx_count = delay_num;
00871
00872   vect_re[0] = (Fract)(-6*V17_CSCALE);
00873   vect_im[0] = (Fract)(-2*V17_CSCALE);
00874   vect_re[1] = (Fract)(2*V17_CSCALE);
00875   vect_im[1] = (Fract)(-6*V17_CSCALE);
00876
00877   /* initialization for carrier loss detection during training */
00878   dpuHSrxSetCdParms(RxInst,1);
00879
00880   /* Initialize function pointers */
00881    RxInst->dotdet_fcn      = NULL;
00882    RxInst->crec_fcn        = dpu_crec;
00883
00884    if (Inst->cfg.trn_type == DPU_TRN_LONG)
00885    {
00886     beta = 4;
00887     RxInst->update_adeq_fcn = dpu_update_adeq;
00888     RxInst->err_phase_fcn   = dpu_err_pha_v17;
00889    }
00890   else
00891    {
00892     /* start from Previously latched power for short train*/
00893     RxInst->cddet_inst.sig_pow  = RxInst->cddet_inst.power_sat;
00894     beta = 8;
00895   /*  RxInst->update_adeq_fcn = dpu_update_adeq; */
00896    RxInst->crec_fcn = NULL;
00897    }
00898
00899   /* Receiver Initialization */
00900   dpu_adeq_init(&RxInst->adeq_inst, beta, length);
00901   dpu_phase_init(&RxInst->phase_inst, vect_re, vect_im, phas_div, delay_num);
00902 }
00903
00904 /******************************************************************************
00905  * Subroutine:  V17 RX initialization subroutine of ST4
00906  ******************************************************************************
00907  * SUBROUTINE NAME: v17RxSt4Init
00908  *
00909  * DESCRIPTION: Initialization routine for V.29 RX of ST4 (TRN 1)
00910  *
00911  * API:         Inst - DPU instance
00912  *****************************************************************************/
00913 void v17RxSt4Init(dpuInst_t *Inst, int rate)
00914 {
00915   dpuRxInst_t *RxInst;
00916   /*  RX's tx part */
00917
00918   RxInst = &Inst->RxInst;         /* Store locally Rx instance address */
00919   RxInst->rx_state = DPU_V17_RX_ST4;
00920   RxInst->rx_count = 0;
00921
00922   if (Inst->cfg.trn_type == DPU_TRN_LONG)
00923   {
00924   RxInst->err_phase_fcn = dpu_err_pha_v17_1;
00925   }
00926   else
00927   {
00928 #if TRN_SLICER_TEST
00929 TRN_SLICER_INDX = 0;
00930 #endif
00931
00932    RxInst->crec_fcn        = dpu_crec_short_trn;
00933    RxInst->slic_fcn        = dpu_slic_v17_TRN;
00934    RxInst->err_phase_fcn   = NULL;
00935    dpu_slic_init(&RxInst->slic_inst);
00936
00937    /* Enable post equalizer one tap update for gain correction */
00938    RxInst->adeq_inst.postAdeqUpdateFlag = 1;
00939
00940    RxInst->update_adeq_fcn = dpu_update_adeq;
00941    RxInst->adeq_inst.updateAdeqFlag = 0;
00942  /*  RxInst->adeq_inst.beta = 6;  */
00943   }
00944
00945     /* RX's tx part */
00946
00947   RxInst->scr_fcn   = dpu_scr;          /* Scrambler function */
00948   RxInst->smap_fcn  = dpu_smap_v17;         /* Symbol Mapper function */
00949
00950
00951   /* Initialize  modules */
00952   dpu_scr_init(&RxInst->scr_inst,       /* Scrambler initialization */
00953                2,
00954                V17_SCR_INIT_PATTERN,
00955                V17_TAP1,
00956                V17_TAP2,
00957                dpu_PN_table_v17_AllRates);
00958
00959   /* Symbol Mapper Init.*/
00960   dpu_smap_init(&RxInst->smap_inst,Inst->TablePtr->v17TablePtrs->dpu_PN_smap_table_v17_AllRates_pt);
00961  }
00962
00963 /******************************************************************************
00964  * Subroutine:  V17 RX initialization subroutine of ST5
00965  ******************************************************************************
00966  * SUBROUTINE NAME: v17RxInit
00967  *
00968  * DESCRIPTION: Initialization routine for V.29 RX of ST5 (TRN 2)
00969  *
00970  * API:         Inst - DPU instance
00971  *****************************************************************************/
00972 void v17RxSt5Init(dpuInst_t *Inst, int rate)
00973 {
00974   dpuRxInst_t *RxInst;
00975   int beta=4;   /* smaller step size */    /* 7 */
00976
00977   RxInst = &Inst->RxInst;         /* Store locally Rx instance address */
00978   RxInst->rx_state = DPU_V17_RX_ST5;
00979   RxInst->rx_count = 0;
00980   RxInst->adeq_inst.beta = (Fract) beta;
00981 }
00982
00983 /******************************************************************************
00984  * Subroutine:  V17 RX initialization subroutine of ST6
00985  ******************************************************************************
00986  * SUBROUTINE NAME: v17RxInit
00987  *
00988  * DESCRIPTION: Initialization routine for V.29 RX of ST6 (TRN 3)
00989  *
00990  * API:         Inst - DPU instance
00991  *****************************************************************************/
00992 void v17RxSt6Init(dpuInst_t *Inst, int rate)
00993 {
00994   dpuRxInst_t *RxInst;
00995   int beta=5;   /* smaller step size */       /* 7 */
00996
00997   RxInst = &Inst->RxInst;         /* Store locally Rx instance address */
00998   RxInst->rx_state = DPU_V17_RX_ST6;
00999   RxInst->rx_count = 0;
01000
01001   /* Narrow down Carrier PLL */
01002   RxInst->mod_inst.k1 = RxInst->mod_inst.k1 >>1;
01003   RxInst->mod_inst.k2 = RxInst->mod_inst.k2 >>1;
01004
01005   /* set the adeq step size */
01006   RxInst->adeq_inst.beta = (Fract) beta;
01007 }
01008
01009 /******************************************************************************
01010  * FUNCTION PURPOSE: This state is for the bridge sequence. Currently, we
01011  *                   disable equalizer update (because the slicer is not ready)
01012  ******************************************************************************
01013  * DESCRIPTION:
01014  *
01015  *****************************************************************************/
01016  void v17RxSt9Init(dpuInst_t *Inst, int rate)
01017 {
01018   int num_of_descr_bits;
01019   int descr_init_pattern=0;
01020   const Fract *smap_table;
01021   tuint shift_const;
01022
01023   dpuRxInst_t *RxInst;
01024
01025   RxInst = &Inst->RxInst;         /* Store locally Rx instance address */
01026   RxInst->rx_state = DPU_V17_RX_ST9;
01027   RxInst->rx_count = 0;
01028
01029   RxInst->scr_fcn       = NULL;         /* Scrambler function */
01030   RxInst->smap_fcn      = NULL;         /* Symbol    Mapper   function */
01031
01032   RxInst->slic_fcn        = dpu_slic_v17_TRN;
01033   RxInst->err_phase_fcn   = NULL;
01034   RxInst->crec_fcn        = dpu_crec;
01035
01036   if (Inst->cfg.trn_type == DPU_TRN_SHORT)
01037   {
01038   RxInst->crec_fcn = dpu_no_crec_at_all;
01039   }
01040
01041   switch(rate)
01042   {
01043     case 14400:
01044       smap_table        = Inst->TablePtr->v17TablePtrs->dpu_smap_V17_144_pt;
01045       shift_const       = 16; /* 2^(num_of_scr_bits-2) */
01046       num_of_descr_bits = 6;
01047       break;
01048     case 12000:
01049       smap_table        = Inst->TablePtr->v17TablePtrs->dpu_smap_V17_120_pt;
01050       shift_const       = 8;
01051       num_of_descr_bits = 5;
01052       break;
01053     case 9600:
01054       smap_table        = Inst->TablePtr->v17TablePtrs->dpu_smap_V17_96_pt;
01055       shift_const       = 4;
01056       num_of_descr_bits = 4;
01057       break;
01058     case 7200:
01059       smap_table        = Inst->TablePtr->v17TablePtrs->dpu_smap_V17_72_pt;
01060       shift_const       = 2;
01061       num_of_descr_bits = 3;
01062       break;
01063   }
01064
01065   /* Receiver Initialization */
01066   dpu_descr_init(&RxInst->descr_inst,
01067                  num_of_descr_bits,
01068                  descr_init_pattern,
01069                  V17_TAP1,
01070                  V17_TAP2);
01071   dpu_ddec_init(&RxInst->ddec_inst,
01072                 num_of_descr_bits,
01073                 Inst->TablePtr->v17TablePtrs->dpu_ddec_V17_AllRates_pt,3);
01074
01075   dpu_slic_init(&RxInst->slic_inst);
01076   dpu_smap_init (&RxInst->smap_inst, smap_table);
01077   dpu_cdec_init (&RxInst->cdec_inst, shift_const, (Fract)(0.95*MY_Q10_SCALE),
01078                 (Fract)(0.05*MY_Q10_SCALE), &RxInst->smap_inst);
01079
01080   RxInst->slic_inst.cdec_ptr = &RxInst->cdec_inst;
01081 }
01082
01083 /******************************************************************************
01084  * Subroutine:  V17 RX initialization subroutine of ST7
01085  ******************************************************************************
01086  * SUBROUTINE NAME: v17RxInit
01087  *
01088  * DESCRIPTION: Initialization routine for V.29 RX of ST7 (B1)
01089  *
01090  * API:         Inst - DPU instance
01091  *****************************************************************************/
01092 void v17RxSt7Init(dpuInst_t *Inst, int rate)
01093 {
01094   dpuRxInst_t *RxInst;
01095   int beta;
01096
01097   RxInst = &Inst->RxInst;         /* Store locally Rx instance address */
01098   RxInst->rx_state = DPU_V17_RX_ST7;
01099   RxInst->rx_count = 0;         /* since the first two C, D had been received */
01100   beta = 7;    /* adeq step size */
01101   RxInst->adeq_inst.beta = (Fract) beta;
01102
01103   /* Initialize function pointers */
01104   RxInst->slic_fcn      = dpu_slic_v17;
01105   RxInst->descr_fcn     = dpu_descr;
01106   RxInst->ddec_fcn      = dpu_ddec_v17;
01107   RxInst->intrp_fcn     = dpu_interp;
01108   RxInst->cdec_fcn      = dpu_cdec;
01109   /* RxInst->update_adeq_fcn = NULL;  */
01110
01111   /* Narrow down Carrier PLL */
01112   if (Inst->cfg.trn_type == DPU_TRN_SHORT)
01113   {
01114   RxInst->mod_inst.k1 = RxInst->mod_inst.k1 >>3;
01115   RxInst->mod_inst.k2 = 0; /*RxInst->mod_inst.k2 >>3;  */
01116    /*RxInst->update_adeq_fcn = dpu_update_adeq;
01117    RxInst->adeq_inst.beta = 6;  */
01118   RxInst->adeq_inst.postAdeqStepSiz >>= 2;
01119   }
01120   else
01121   {
01122   /*RxInst->mod_inst.k1 = RxInst->mod_inst.k1 >>1;*/
01123   RxInst->mod_inst.k2 = 0; /*RxInst->mod_inst.k2 >>1;*/
01124   /* Offset has been collected by now, Allow 5 Hz variation in carrier frequency */
01125   RxInst->mod_inst.max_error = (Fract)(5.0/2400.0*FREQ_SCALE);
01126   }
01127  }
01128
01129 /******************************************************************************
01130  * Subroutine:  V17 RX initialization subroutine of ST8
01131  ******************************************************************************
01132  * SUBROUTINE NAME: v17RxInit
01133  *
01134  * DESCRIPTION: Initialization routine for V.29 RX of ST8 (DATA)
01135  *
01136  * API:         Inst - DPU instance
01137  *****************************************************************************/
01138 void v17RxSt8Init(dpuInst_t *Inst, int rate)
01139 {
01140   dpuRxInst_t *RxInst;
01141
01142   RxInst = &Inst->RxInst;         /* Store locally Rx instance address */
01143
01144   RxInst->rx_state = DPU_V17_RX_ST8;
01145   RxInst->rx_count = 0;
01146
01147   /* initialization for carrier loss detection */
01148   dpuHSrxSetCdParms(RxInst,0);
01149
01150   /* following two functions disabled for debugging only */
01151    RxInst->data_fcn = dpu_rx_packet;  /* RX output data manipulation function */
01152    RxInst->copy_fcn = dpu_rx_copy;     /* RX output copy function */
01153
01154   /* Receiver Initialization */
01155   dpu_cd_det_init (&RxInst->cddet_inst, 0, 0);
01156 }
01157
01158 /******************************************************************************
01159  * Subroutine:  V17 RX initialization subroutine of ST10
01160  ******************************************************************************
01161  * SUBROUTINE NAME: v17RxInit
01162  *
01163  * DESCRIPTION: Initialization routine for V.17 RX of ST10 (DATA - frame slip Recovery state)
01164  *
01165  * API:         Inst - DPU instance
01166  *****************************************************************************/
01167 void v17RxSt10Init(dpuInst_t *Inst, int rate)
01168 {
01169   dpuRxInst_t *RxInst;
01170
01171   RxInst = &Inst->RxInst;         /* Store locally Rx instance address */
01172
01173   RxInst->rx_state = DPU_V17_RX_ST10;
01174   RxInst->rx_count = 0;
01175
01176   /* Disable post equalizer one tap update for gain correction */
01177   RxInst->adeq_inst.postAdeqUpdateFlag = 0;
01178   /* Reset the gain to Unity */
01179   RxInst->adeq_inst.postAdeqGain       = (Fract)(1*Q12_SCALE); /* unity default gain */
01180
01181 }
01182
01183 /******************************************************************************
01184  * Subroutine:  V17 RX subroutine to change state from  ST10 to ST8
01185  ******************************************************************************
01186  * SUBROUTINE NAME: v17RxInit
01187  *
01188  * DESCRIPTION: Initialization routine for V.17 RX of ST10 (DATA - frame slip Recovery state)
01189  *
01190  * API:         Inst - DPU instance
01191  *****************************************************************************/
01192 void v17RxSt10to8Init(dpuInst_t *Inst, int rate)
01193 {
01194   dpuRxInst_t *RxInst;
01195
01196   RxInst = &Inst->RxInst;         /* Store locally Rx instance address */
01197   RxInst->rx_count = 0;
01198
01199   RxInst->rx_state = DPU_V17_RX_ST8;
01200
01201   /* Enable post equalizer one tap update for gain correction */
01202   RxInst->adeq_inst.postAdeqUpdateFlag = 1;
01203   dpu_SET_FSL_DETECTED((RxInst->fsl_bitfield), FALSE);
01204
01205 }
01206
01207 /******************************************************************************
01208  * Subroutine:  V17 RX State Machine
01209  ******************************************************************************
01210  * SUBROUTINE NAME: v17RxStM
01211  *
01212  * DESCRIPTION: State Machine for V17 RX Mode
01213  *
01214  * API:         Inst - DPU instance
01215  *****************************************************************************/
01216
01217 #define TREC_TST 0
01218
01219 #if TREC_TST
01220 #define TREC_TST_SIZE 1024
01221 int TREC_TST_INDX = 0;
01222 int TREC_TST_BUF[TREC_TST_SIZE];
01223 #endif
01224
01225 /*extern TREC_TST1_INDX;
01226 extern TREC_TT1_INDX1;*/
01227
01228 void v17RxStM(void *inst)
01229 {
01230   dpuInst_t *Inst=(dpuInst_t *) inst;
01231   dpuRxInst_t *RxInst;
01232   int rate;
01233
01234   Fract ft1, ft2;
01235   LFract lft1, lft2;
01236
01237   RxInst = &Inst->RxInst;         /* Store locally rx instance address */
01238   rate = RxInst->rx_rate;
01239
01240   /* Status update */
01241   Inst->sts.dpustatus = DPU_ST_V17_RX + RxInst->rx_state;
01242   Inst->sts.rx_rate = RxInst->rx_rate;
01243
01244   /* process any state */
01245   switch(RxInst->rx_state)
01246   {
01247     case DPU_V17_RX_ST1:
01248       if  (RxInst->change_det == DPU_P2_TRUE)
01249       {
01250         Inst->ctrl |= DPU_CTRL_P2;
01251         v17RxSt3Init(Inst, rate);
01252 #if 0
01253 RxInst->trec_inst.ttone_count = 0;
01254 #endif
01255
01256 #if TREC_TST
01257  TREC_TST_INDX = 0;
01258 #endif
01259     }
01260       else  if (RxInst->change_det == DPU_P2_FALSE)
01261       {
01262         Inst->ctrl &= ~DPU_CTRL_P2;
01263       }
01264       else if  (RxInst->change_det == DPU_V21_TRUE)
01265       {
01266         Inst->ctrl |= DPU_CTRL_V21;
01267       }
01268       else if  (RxInst->change_det == DPU_TEP_TRUE)
01269       {
01270         Inst->ctrl |= DPU_CTRL_TEP;
01271       }
01272       else if (RxInst->change_det == DPU_V21_HS_TRUE)
01273       {
01274        /*  Inst->ctrl |= DPU_CTRL_V21; */
01275         v17RxSt2Init(Inst, rate);
01276       }
01277       break;
01278     case DPU_V17_RX_ST2:
01279       if (RxInst->change_det == DPU_V21_TRUE)
01280       {
01281          Inst->ctrl |= DPU_CTRL_V21;
01282          v17RxSt1Init(Inst, rate);
01283       }
01284       if (RxInst->rx_count == 160)
01285          v17RxSt1Init(Inst, rate);
01286       break;
01287     case DPU_V17_RX_ST3:
01288
01289       if (RxInst->change_det)
01290       {
01291         if (RxInst->rx_count > 150)
01292         v17RxSt34Init(Inst, rate);
01293       }
01294
01295       if (Inst->cfg.trn_type == DPU_TRN_LONG)
01296       {
01297       /*  RxInst->trec_inst.trec_enable = TRUE;*/
01298         if (RxInst->rx_count == 62)
01299         {
01300 #if 0
01301  RxInst->trec_inst.k2 = 0;
01302 #endif
01303           RxInst->trec_inst.rot_real_est = 0;
01304           RxInst->trec_inst.rot_imag_est = 0;
01305         }
01306       if (RxInst->rx_count == 126)
01307     {
01308         RxInst->trec_inst.rot_real = frctLF2F(RxInst->trec_inst.rot_real_est, 29,23);
01309         RxInst->trec_inst.rot_imag = frctLF2F(RxInst->trec_inst.rot_imag_est, 29,23);
01310         RxInst->trec_inst.trec_enable = TRUE;
01311       }
01312        }
01313
01314    if (Inst->cfg.trn_type == DPU_TRN_SHORT)
01315       {
01316 /*----------------------------------------------------------------------------**
01317 **              if ((RxInst->rx_count >=  2) && (RxInst->rx_count <= 190))    **
01318 ** {                                                                        **
01319 ** #if TREC_TST                                                               **
01320 **  TREC_TST_INDX++;                                                          **
01321 **  TREC_TST_INDX &= TREC_TST_SIZE -1;                                        **
01322 **  TREC_TST_BUF[TREC_TST_INDX] = RxInst->trec_inst.int_filt_index;           **
01323 ** #endif                                                                     **
01324 ** }                                                                        **
01325 **----------------------------------------------------------------------------*/
01326
01327       /* Estimate the phase by averaging over 16 symbols and compute the phase
01328        difference between the estimated and that during long training (to which
01329      the phase at that time had been driven to).
01330      The angleComputeFlag is used to avoid recomputation of the angle because
01331      there is a possibility that the rx_count remains same for one more execution
01332      of the state machine because the angle may be such that there can be a rejection
01333      of one or two samples (see procrx.c). This was observed in actual practice. */
01334         if (RxInst->rx_count ==  20)
01335         {
01336            RxInst->trec_inst.rot_real_est     = 0;
01337          RxInst->trec_inst.rot_imag_est     = 0;
01338                RxInst->trec_inst.angleComputeFlag = 0;
01339         }
01340
01341         if ((RxInst->rx_count == 36) &&
01342             (RxInst->trec_inst.angleComputeFlag == 0))
01343         {
01344           ft1 =   frctLF2F(RxInst->trec_inst.rot_real_est, 29,25);
01345           ft2 =   frctLF2F(RxInst->trec_inst.rot_imag_est, 29,25);
01346                 lft1 =  frctMul(RxInst->trec_inst.rot_real,14,ft1,14,28);
01347         lft1 += frctMul(RxInst->trec_inst.rot_imag,14,ft2,14,28);
01348         lft2 =  frctMul(RxInst->trec_inst.rot_real,14,ft2,14,28);
01349         lft2 -= frctMul(RxInst->trec_inst.rot_imag,14,ft1,14,28);
01350
01351         /* adjust filter index, this adjustment will take immediate effect in
01352         the next symbol, there is no need to enable timing recovery (and it should
01353         not be enabled) see timing recovery algorithm */
01354                 RxInst->trec_inst.int_filt_index -= dpuAtan2(lft2,lft1,
01355                              Inst->TablePtr->v17TablePtrs->tanTableInFirstOctant_pt,
01356                              Inst->TablePtr->v17TablePtrs->atan2ScaleFactors_pt);
01357         RxInst->trec_inst.angleComputeFlag = 1;
01358       }
01359
01360        /* allow for timing recovery computation to stabilize because of the previous
01361         sudden jamming of phase. We use (50 -16 = 34 symbols) */
01362       if (RxInst->rx_count == 70)
01363       {
01364            RxInst->trec_inst.trec_enable = TRUE;
01365
01366 /*  TREC_TST1_INDX = 0;
01367   TREC_TT1_INDX1 = 0;*/
01368         RxInst->trec_inst.filt_index_inc = DPU_TREC_INDEX_INC;
01369         RxInst->trec_inst.threshold      = (Fract)(5*DPU_TREC_K1);
01370         RxInst->trec_inst.accum          = 0;
01371         RxInst->trec_inst.k2             = 0;
01372       }
01373
01374       if (RxInst->rx_count == 100)
01375       {
01376         RxInst->trec_inst.filt_index_inc = DPU_TREC_INDEX_INC;
01377         RxInst->trec_inst.threshold = (Fract)(10*DPU_TREC_K1);
01378       }
01379       if (RxInst->rx_count == 130)
01380       {
01381         RxInst->trec_inst.filt_index_inc = DPU_TREC_INDEX_INC;
01382         RxInst->trec_inst.threshold = (Fract)(DPU_TREC_THR);
01383
01384         /* Start second order loop now */
01385         /* Restore accumulated p1 in long training, note that the threshold
01386         is same (40) as it was in long training because the offset p1 will
01387         be difference for different gains (which depends on the threshold) */
01388         RxInst->trec_inst.p1 = RxInst->trec_inst.old_p1;
01389         RxInst->trec_inst.k2 = (Fract)(DPU_TREC_K2);
01390       }
01391       }
01392
01393       /***** not P2 data return to state 1 *****/
01394       if (RxInst->rx_count == 256)
01395          v17RxSt1Init(Inst, rate);
01396       break;
01397     case DPU_V17_RX_ST34:
01398       if (Inst->cfg.trn_type == DPU_TRN_LONG)
01399       {
01400       if (RxInst->rx_count == (DPU_PHASE_LEN))
01401         v17RxSt4Init(Inst, rate);
01402       }
01403       else
01404       {
01405       if (RxInst->rx_count == (DPU_PHASE_LEN))
01406         v17RxSt4Init(Inst, rate);
01407       }
01408       break;
01409     case DPU_V17_RX_ST4:
01410   if (Inst->cfg.trn_type == DPU_TRN_LONG)
01411   {
01412       if (RxInst->rx_count == 100)
01413         v17RxSt5Init(Inst, rate);
01414     }
01415     else
01416     {
01417       /* one baud here and there can make a difference */
01418       if (RxInst->rx_count == 37)
01419       {
01420       RxInst->crec_fcn = dpu_no_crec_at_all;
01421       }
01422     if (RxInst->rx_count == 38)
01423       {
01424         v17RxSt9Init(Inst, rate);
01425       v17RxSt7Init(Inst, rate);
01426         }
01427     }
01428       break;
01429     case DPU_V17_RX_ST5:
01430       if (RxInst->rx_count == 100)
01431         v17RxSt6Init(Inst, rate);
01432       break;
01433     case DPU_V17_RX_ST6:
01434     if (RxInst->rx_count == 1000)
01435     {
01436       /* Narrow down Carrier PLL */
01437       RxInst->mod_inst.k1 = RxInst->mod_inst.k1 >>1;
01438       RxInst->mod_inst.k2 = RxInst->mod_inst.k2 >>1;
01439     }
01440     if (RxInst->rx_count == 2000)
01441     {
01442       /* Narrow down Carrier PLL */
01443       RxInst->mod_inst.k1 = RxInst->mod_inst.k1 >>1;
01444       RxInst->mod_inst.k2 = RxInst->mod_inst.k2 >>1;
01445     }
01446
01447       if (RxInst->rx_count == 2776)
01448         v17RxSt9Init(Inst, rate);
01449       break;
01450   case DPU_V17_RX_ST9:
01451     if (RxInst->rx_count == 64)
01452     v17RxSt7Init(Inst, rate);
01453     break;
01454     case DPU_V17_RX_ST7:
01455
01456       if (Inst->cfg.trn_type == DPU_TRN_SHORT)
01457       {
01458       if (RxInst->rx_count == 2) RxInst->crec_fcn = dpu_crec;
01459       }
01460
01461       /* this is a patch, since in short training, there could be a difference of
01462        one baud (because of timing recovery converging on either side !!), we
01463      declare one more baud of data so that the case in which there is a delay of
01464      one baud, the initial data is not lost. In the case when there is no delay,
01465      we would declare 1's which is harmless for FAX (because EOL (to be present
01466      at the beginnning of a page) starts with 0)                               */
01467       if (Inst->cfg.trn_type == DPU_TRN_SHORT)
01468       {
01469       if (RxInst->rx_count == (48+(DPU_CDEC_VIT_DELAY-1)))
01470       {
01471      /*  RxInst->crec_fcn = dpu_no_crec_at_all;*/
01472          /* set CD bit after B1 is over */
01473         Inst->ctrl |= DPU_CTRL_CDET;
01474         v17RxSt8Init(Inst, rate);
01475       }
01476       }
01477     else
01478     {
01479       if (RxInst->rx_count == (48+(DPU_CDEC_VIT_DELAY-1)))
01480       {
01481      /*  RxInst->crec_fcn = dpu_no_crec_at_all;*/
01482          /* set CD bit after B1 is over */
01483         Inst->ctrl |= DPU_CTRL_CDET;
01484         v17RxSt8Init(Inst, rate);
01485       }
01486       }
01487       break;
01488     case DPU_V17_RX_ST8:
01489
01490     /* freeze equalizer coefficients and 2nd order parameters of timing recovery
01491        and carrier recovery after about 1 sec. Note that for FAX this will be during
01492      TCF which is at least 1.5 sec. This gives enough time for proper convergence
01493      in bad lines and for 2nd order parameters to stabilize */
01494       if (RxInst->rx_count == 2400)
01495       {
01496        if ((Inst->cfg.trn_type == DPU_TRN_LONG) && (Inst->cfg.mode == DPU_MOD_V17))
01497        {
01498        RxInst->update_adeq_fcn     = NULL;
01499        RxInst->mod_inst.pre_p1_old = RxInst->mod_inst.pre_p1;
01500        RxInst->trec_inst.old_p1    = RxInst->trec_inst.p1;
01501        }
01502       }
01503
01504       if (dpu_READ_FSL_DETECTED((RxInst->fsl_bitfield)) == TRUE)
01505     {
01506           v17RxSt10Init(Inst, rate);
01507     }
01508
01509       if (RxInst->change_det == DPU_CD_FALSE)
01510       {
01511       if (Inst->cfg.mode == DPU_MOD_V17)
01512       Inst->cfg.trn_type = DPU_TRN_SHORT;
01513
01514         Inst->ctrl &= ~DPU_CTRL_CDET;
01515         v17RxSt1Init(Inst, rate);
01516       }
01517       break;
01518    case DPU_V17_RX_ST10:
01519      /* After 2 seconds switch to state machine 8 */
01520      if (RxInst->rx_count == 4800)
01521      {
01522           v17RxSt10to8Init(Inst, rate);
01523        }
01524
01525      if (RxInst->change_det == DPU_CD_FALSE)
01526       {
01527       if (Inst->cfg.mode == DPU_MOD_V17)
01528       Inst->cfg.trn_type = DPU_TRN_SHORT;
01529
01530         Inst->ctrl &= ~DPU_CTRL_CDET;
01531         v17RxSt1Init(Inst, rate);
01532       }
01533
01534        break;
01535
01536   }
01537
01538 #if TREC_TST
01539 if ((RxInst->rx_state >= DPU_V17_RX_ST3) && (RxInst->rx_state < DPU_V17_RX_ST8) &&
01540     (Inst->cfg.trn_type == DPU_TRN_SHORT)
01541    )
01542 {
01543  TREC_TST_INDX++;
01544  TREC_TST_INDX &= TREC_TST_SIZE -1;
01545  TREC_TST_BUF[TREC_TST_INDX] = RxInst->trec_inst.int_filt_index;
01546 }
01547 #endif
01548 }
01549
01550 /******************************************************************************
01551  * FUNCTION PURPOSE: Initialize V17 RX instance.
01552  ******************************************************************************
01553  * DESCRIPTION:  Initialize V17 RX instance.
01554  *               NOTE assume the rx sample rate is 9600 bps
01555  *****************************************************************************/
01556 void dpu_rx_v17_init(dpuInst_t *inst, int frame, int rate)
01557 {
01558   dpuRx2400BaudInit(inst, frame, rate);
01559   /* call the V17 default state initialization */
01560   v17RxSt1Init(inst, rate);
01561 }
01562 #endif
01563 /* Nothing past this point */


FM: v17.h File Reference

v17.h File Reference

#include <ti/mas/types/types.h>
#include "dpu_denc.h"
#include "dpu_cenc.h"
#include "dputxin.h"
#include "dpu_smap.h"
#include "dpuloc.h"

Include dependency graph for v17.h:

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

Go to the source code of this file.

Defines

#define | V17_SCR_INIT_PATTERN 0x002ecdd5
#define | V17_TAP1 18
#define | V17_TAP2 23
#define | MY_Q15_SCALE 32768
#define | MY_Q10_SCALE 1024
#define | MY_Q16_SCALE 65536
#define | V17_TX_CONST_SCALE MY_Q10_SCALE
#define | V17_CSCALE V17_TX_CONST_SCALE
#define | INVMOD_SCALE_V17 MY_Q16_SCALE

Enumerations

enum {
DPU_V17_TX_STNULL = -1, DPU_V17_TX_ST0 = 0, DPU_V17_TX_ST1 = 1, DPU_V17_TX_ST2 = 2,
DPU_V17_TX_ST3 = 3, DPU_V17_TX_ST4 = 4, DPU_V17_TX_ST5 = 5, DPU_V17_TX_ST6 = 6
}
enum {
DPU_V17_RX_STNULL = -1, DPU_V17_RX_ST0 = 0, DPU_V17_RX_ST1 = 1, DPU_V17_RX_ST2 = 2,
DPU_V17_RX_ST3 = 3, DPU_V17_RX_ST4 = 4, DPU_V17_RX_ST5 = 5, DPU_V17_RX_ST6 = 6,
DPU_V17_RX_ST7 = 7, DPU_V17_RX_ST8 = 8, DPU_V17_RX_ST34 = 9, DPU_V17_RX_ST9 = 10,
DPU_V17_RX_ST10 = 11
}

Functions

void | dpu_denc_v17_bridge (dpu_denc_t *denc_ptr, Fract *bits)
void | dpu_denc_v17 (dpu_denc_t *denc_ptr, Fract *bits)
void | dpu_cenc_v17 (dpu_cenc_t *cenc_ptr, Fract *bits)
void | dpu_dot_v17 (dpu_smap_t *smap_ptr, Fract *bits, Fract *x_sym, Fract *y_sym, int index)
void | dpu_smap_v17 (dpu_smap_t *smap_ptr, Fract *bits, Fract *x_sym, Fract *y_sym, int ind)
void | dpu_bridge_seq_v17_init (dpu_inman_t *inst, int bridge_state)
int | dpu_gen_bridge_seq_v17 (dpu_inman_t *inst, Fract *in_baud, Fract *data_in_buf, Fract bts_per_baud)
void | dpu_un_modulate_v17 (dpu_mod_t *inst, Fract *x_re, Fract *y_im)
void | v17TxSt1Init (dpuInst_t *Inst, int rate)
void | v17TxSt2Init (dpuInst_t *Inst, int rate)
void | v17TxSt3Init (dpuInst_t *Inst, int rate)
void | v17TxSt4Init (dpuInst_t *Inst, int rate)
void | v17TxSt5Init (dpuInst_t *Inst, int rate)
void | v17TxSt6Init (dpuInst_t *Inst, int rate)
void | v17TxStM (void *inst)
void | v17RxSt1Init (dpuInst_t *Inst, int rate)
void | v17RxSt2Init (dpuInst_t *Inst, int rate)
void | v17RxSt3Init (dpuInst_t *Inst, int rate)
void | v17RxSt34Init (dpuInst_t *Inst, int rate)
void | v17RxSt4Init (dpuInst_t *Inst, int rate)
void | v17RxSt5Init (dpuInst_t *Inst, int rate)
void | v17RxSt6Init (dpuInst_t *Inst, int rate)
void | v17RxSt9Init (dpuInst_t *Inst, int rate)
void | v17RxSt7Init (dpuInst_t *Inst, int rate)
void | v17RxSt8Init (dpuInst_t *Inst, int rate)
void | v17RxStM (void *inst)
void | dpu_rx_v17_init (dpuInst_t *inst, int frame, int rate)
Fract | dpu_get_division_v17 (Fract x, Fract y)
void | dpu_err_pha_v17_1 (dpu_phase_t *inst, Fract *a_re, Fract *a_im, Fract x_re, Fract y_im, Fract *phase, Fract *premap, Fract dpu_slic_invmod_v17_ptr[][10])
void | dpu_err_pha_v17 (dpu_phase_t *inst, Fract *a_re, Fract *a_im, Fract x_re, Fract y_im, Fract *phase, Fract *premap, Fract dpu_slic_invmod_v17_ptr[][10])
void | findMinIndx (Fract *min_scratch, cmplx_t *input_pt, Fract *path_dist_pt, Fract *min_indx_pt, Fract *min_min_indx, Fract *table)
Fract | V17_slice0167_120 (Fract x, Fract y)
Fract | V17_slice2345_120 (Fract x, Fract y)
Fract | V17_slice0167_144 (Fract x, Fract y)
Fract | V17_slice2345_144 (Fract x, Fract y)

Define Documentation

#define V17_SCR_INIT_PATTERN 0x002ecdd5

Definition at line 75 of file v17.h.

#define V17_TAP1 18

Definition at line 76 of file v17.h.

#define V17_TAP2 23

Definition at line 77 of file v17.h.

#define MY_Q15_SCALE 32768

Definition at line 78 of file v17.h.

#define MY_Q10_SCALE 1024

Definition at line 79 of file v17.h.

#define MY_Q16_SCALE 65536

Definition at line 80 of file v17.h.

#define V17_TX_CONST_SCALE MY_Q10_SCALE

Definition at line 81 of file v17.h.

#define V17_CSCALE V17_TX_CONST_SCALE

Definition at line 82 of file v17.h.

#define INVMOD_SCALE_V17 MY_Q16_SCALE

Definition at line 83 of file v17.h.

Enumeration Type Documentation

anonymous enum

Enumerator:
DPU_V17_TX_STNULL
DPU_V17_TX_ST0
DPU_V17_TX_ST1
DPU_V17_TX_ST2
DPU_V17_TX_ST3
DPU_V17_TX_ST4
DPU_V17_TX_ST5
DPU_V17_TX_ST6

Definition at line 47 of file v17.h.

anonymous enum

Enumerator:
DPU_V17_RX_STNULL
DPU_V17_RX_ST0
DPU_V17_RX_ST1
DPU_V17_RX_ST2
DPU_V17_RX_ST3
DPU_V17_RX_ST4
DPU_V17_RX_ST5
DPU_V17_RX_ST6
DPU_V17_RX_ST7
DPU_V17_RX_ST8
DPU_V17_RX_ST34
DPU_V17_RX_ST9
DPU_V17_RX_ST10

Definition at line 59 of file v17.h.

Function Documentation

void dpu_denc_v17_bridge | ( | dpu_denc_t * | denc_ptr,
 |  | Fract * | bits
 | ) |  |

void dpu_denc_v17 | ( | dpu_denc_t * | denc_ptr,
 |  | Fract * | bits
 | ) |  |

void dpu_cenc_v17 | ( | dpu_cenc_t * | cenc_ptr,
 |  | Fract * | bits
 | ) |  |

void dpu_dot_v17 | ( | dpu_smap_t * | smap_ptr,
 |  | Fract * | bits,
 |  | Fract * | x_sym,
 |  | Fract * | y_sym,
 |  | int | index
 | ) |  |

void dpu_smap_v17 | ( | dpu_smap_t * | smap_ptr,
 |  | Fract * | bits,
 |  | Fract * | x_sym,
 |  | Fract * | y_sym,
 |  | int | ind
 | ) |  |

void dpu_bridge_seq_v17_init | ( | dpu_inman_t * | inst,
 |  | int | bridge_state
 | ) |  |

int dpu_gen_bridge_seq_v17 | ( | dpu_inman_t * | inst,
 |  | Fract * | in_baud,
 |  | Fract * | data_in_buf,
 |  | Fract | bts_per_baud
 | ) |  |

void dpu_un_modulate_v17 | ( | dpu_mod_t * | inst,
 |  | Fract * | x_re,
 |  | Fract * | y_im
 | ) |  |

Referenced by vxx_tx_init().

void v17TxSt1Init | ( | dpuInst_t * | Inst,
 |  | int | rate
 | ) |  |

void v17TxSt2Init | ( | dpuInst_t * | Inst,
 |  | int | rate
 | ) |  |

void v17TxSt3Init | ( | dpuInst_t * | Inst,
 |  | int | rate
 | ) |  |

void v17TxSt4Init | ( | dpuInst_t * | Inst,
 |  | int | rate
 | ) |  |

void v17TxSt5Init | ( | dpuInst_t * | Inst,
 |  | int | rate
 | ) |  |

void v17TxSt6Init | ( | dpuInst_t * | Inst,
 |  | int | rate
 | ) |  |

void v17TxStM ( void * inst )

Referenced by vxx_tx_init().

void v17RxSt1Init | ( | dpuInst_t * | Inst,
 |  | int | rate
 | ) |  |

void v17RxSt2Init | ( | dpuInst_t * | Inst,
 |  | int | rate
 | ) |  |

void v17RxSt3Init | ( | dpuInst_t * | Inst,
 |  | int | rate
 | ) |  |

void v17RxSt34Init | ( | dpuInst_t * | Inst,
 |  | int | rate
 | ) |  |

void v17RxSt4Init | ( | dpuInst_t * | Inst,
 |  | int | rate
 | ) |  |

void v17RxSt5Init | ( | dpuInst_t * | Inst,
 |  | int | rate
 | ) |  |

void v17RxSt6Init | ( | dpuInst_t * | Inst,
 |  | int | rate
 | ) |  |

void v17RxSt9Init | ( | dpuInst_t * | Inst,
 |  | int | rate
 | ) |  |

void v17RxSt7Init | ( | dpuInst_t * | Inst,
 |  | int | rate
 | ) |  |

void v17RxSt8Init | ( | dpuInst_t * | Inst,
 |  | int | rate
 | ) |  |

void v17RxStM ( void * inst )

void dpu_rx_v17_init | ( | dpuInst_t * | inst,
 |  | int | frame,
 |  | int | rate
 | ) |  |

Referenced by dpuconfigRX().

Fract dpu_get_division_v17 | ( | Fract | x,
 |  | Fract | y
 | ) |  |

void dpu_err_pha_v17_1 | ( | dpu_phase_t * | inst,
 |  | Fract * | a_re,
 |  | Fract * | a_im,
 |  | Fract | x_re,
 |  | Fract | y_im,
 |  | Fract * | phase,
 |  | Fract * | premap,
 |  | Fract | dpu_slic_invmod_v17_ptr[][10]
 | ) |  |

void dpu_err_pha_v17 | ( | dpu_phase_t * | inst,
 |  | Fract * | a_re,
 |  | Fract * | a_im,
 |  | Fract | x_re,
 |  | Fract | y_im,
 |  | Fract * | phase,
 |  | Fract * | premap,
 |  | Fract | dpu_slic_invmod_v17_ptr[][10]
 | ) |  |

void findMinIndx | ( | Fract * | min_scratch,
 |  | cmplx_t * | input_pt,
 |  | Fract * | path_dist_pt,
 |  | Fract * | min_indx_pt,
 |  | Fract * | min_min_indx,
 |  | Fract * | table
 | ) |  |

Definition at line 28 of file v17s.c.

Fract V17_slice0167_120 | ( | Fract | x,
 |  | Fract | y
 | ) |  |

Definition at line 96 of file v17s.c.

References getIndx().

Here is the call graph for this function:

Fract V17_slice2345_120 | ( | Fract | x,
 |  | Fract | y
 | ) |  |

Definition at line 111 of file v17s.c.

References getIndx(), and V17SCALE.

Here is the call graph for this function:

Fract V17_slice0167_144 | ( | Fract | x,
 |  | Fract | y
 | ) |  |

Definition at line 133 of file v17s.c.

References V17_144_symbol_num.

Fract V17_slice2345_144 | ( | Fract | x,
 |  | Fract | y
 | ) |  |

Definition at line 163 of file v17s.c.

References V17_144_symbol_num.


FM: v17.h Source File

v17.h

Go to the documentation of this file.
00001 #ifndef _V17_H
00002 #define _V17_H
00003 /******************************************************************************
00004  * FILE PURPOSE:
00005  ******************************************************************************
00006  * FILE NAME: v17.h
00007  *
00008  * DESCRIPTION:
00009  *
00010  * TABS: NONE
00011  *
00012  * $Id: v17.h 1.9 1999/03/11 17:07:59 sakhtar Exp $
00013  *
00014  * REVISION HISTORY:
00015  *
00016  * $Log: v17.h $
00017  * Revision 1.9  1999/03/11 17:07:59  sakhtar
00018  * Removed functions which are moved to dpu.c and added
00019  * dpu_un_mod_v17 to the header
00020  * Revision 1.7  1998/08/28 01:18:35  ppatel
00021  *  Some unused functions removed to save program memory
00022  * Revision 1.6  1998/02/01 21:21:30  PPATEL
00023  *  change in scale factor for inverse modulus data in v17data.c
00024  * Revision 1.5  1997/12/17 00:13:47  PPATEL
00025  *  changes made for tep tone generation in transmit
00026  * Revision 1.4  1997/11/21 15:49:34  PPATEL
00027  *  Changes for multi-channel build for GG 3.0
00028  * Revision 1.3  1997/10/28 23:11:27  PPATEL
00029  *  Changes corresponding to writing critical code in assembly
00030  * Revision 1.2  1997/09/26 16:27:10  PPATEL
00031  *  file corresponding to version 1.2 of v17.c
00032  * Revision 1.1  1997/09/13 19:48:21  PPATEL
00033  * Initial revision
00034  *
00035  * (C) Copyright 1997, TELOGY Networks, Inc.
00036  *****************************************************************************/
00037
00038
00039 #include <ti/mas/types/types.h>
00040 #include "dpu_denc.h"
00041 #include "dpu_cenc.h"
00042 #include "dputxin.h"
00043 #include "dpu_smap.h"
00044 #include "dpuloc.h"
00045
00046 /*  DPU V17 TX State Type  */
00047 enum {
00048   DPU_V17_TX_STNULL   = -1,
00049   DPU_V17_TX_ST0   = 0,
00050   DPU_V17_TX_ST1   = 1,
00051   DPU_V17_TX_ST2   = 2,
00052   DPU_V17_TX_ST3   = 3,
00053   DPU_V17_TX_ST4   = 4,
00054   DPU_V17_TX_ST5   = 5,
00055   DPU_V17_TX_ST6   = 6
00056 };
00057
00058 /*  DPU V17 RX State Type  */
00059 enum {
00060   DPU_V17_RX_STNULL   = -1,
00061   DPU_V17_RX_ST0   = 0,
00062   DPU_V17_RX_ST1   = 1,
00063   DPU_V17_RX_ST2   = 2,
00064   DPU_V17_RX_ST3   = 3,
00065   DPU_V17_RX_ST4   = 4,
00066   DPU_V17_RX_ST5   = 5,
00067   DPU_V17_RX_ST6   = 6,
00068   DPU_V17_RX_ST7   = 7,
00069   DPU_V17_RX_ST8   = 8,
00070   DPU_V17_RX_ST34  = 9,
00071   DPU_V17_RX_ST9   = 10,
00072   DPU_V17_RX_ST10   = 11
00073
00074 };
00075 #define V17_SCR_INIT_PATTERN 0x002ecdd5
00076 #define V17_TAP1             18
00077 #define V17_TAP2             23
00078 #define MY_Q15_SCALE         32768
00079 #define MY_Q10_SCALE         1024
00080 #define MY_Q16_SCALE         65536
00081 #define V17_TX_CONST_SCALE   MY_Q10_SCALE
00082 #define V17_CSCALE           V17_TX_CONST_SCALE
00083 #define INVMOD_SCALE_V17     MY_Q16_SCALE
00084
00085 void dpu_denc_v17_bridge(dpu_denc_t *denc_ptr, Fract *bits);
00086 void dpu_denc_v17(dpu_denc_t *denc_ptr, Fract *bits);
00087 void dpu_cenc_v17(dpu_cenc_t *cenc_ptr, Fract *bits);
00088 void dpu_dot_v17(dpu_smap_t *smap_ptr, Fract *bits, Fract *x_sym, Fract *y_sym, int index);
00089 void dpu_smap_v17(dpu_smap_t *smap_ptr, Fract *bits,
00090                   Fract *x_sym, Fract *y_sym, int ind);
00091 void dpu_bridge_seq_v17_init(dpu_inman_t  *inst, int bridge_state);
00092 int  dpu_gen_bridge_seq_v17(dpu_inman_t *inst, Fract *in_baud,
00093                     Fract *data_in_buf, Fract bts_per_baud );
00094 void dpu_un_modulate_v17( dpu_mod_t *inst, Fract *x_re, Fract *y_im);
00095
00096 /*#if !defined(GENERAL)*/
00097
00098
00099 /* #endif */
00100 void v17TxSt1Init(dpuInst_t *Inst,
00101                int rate);
00102 void v17TxSt2Init(dpuInst_t *Inst,
00103                int rate);
00104 void v17TxSt3Init(dpuInst_t *Inst,
00105                int rate);
00106 void v17TxSt4Init(dpuInst_t *Inst,
00107                int rate);
00108 void v17TxSt5Init(dpuInst_t *Inst,
00109                int rate);
00110 void v17TxSt6Init(dpuInst_t *Inst,
00111                int rate);
00112
00113 void v17TxStM(void *inst);
00114
00115
00116 void v17RxSt1Init(dpuInst_t *Inst,
00117                int rate);
00118 void v17RxSt2Init(dpuInst_t *Inst,
00119                int rate);
00120 void v17RxSt3Init(dpuInst_t *Inst,
00121                int rate);
00122 void v17RxSt34Init(dpuInst_t *Inst,
00123                int rate);
00124 void v17RxSt4Init(dpuInst_t *Inst,
00125                int rate);
00126 void v17RxSt5Init(dpuInst_t *Inst,
00127                int rate);
00128 void v17RxSt6Init(dpuInst_t *Inst,
00129                int rate);
00130 void v17RxSt9Init(dpuInst_t *Inst,
00131                int rate);
00132 void v17RxSt7Init(dpuInst_t *Inst,
00133                int rate);
00134 void v17RxSt8Init(dpuInst_t *Inst,
00135                int rate);
00136 void v17RxStM(void *inst);
00137 void dpu_rx_v17_init(dpuInst_t *inst, int frame, int rate);
00138
00139 Fract dpu_get_division_v17(Fract x, Fract y);
00140
00141 void dpu_err_pha_v17_1( dpu_phase_t *inst, Fract *a_re, Fract *a_im,
00142                         Fract x_re, Fract y_im, Fract *phase, Fract *premap, Fract dpu_slic_invmod_v17_ptr[][10]);
00143 void dpu_err_pha_v17( dpu_phase_t *inst, Fract *a_re, Fract *a_im,
00144                       Fract x_re, Fract y_im, Fract *phase, Fract *premap, Fract dpu_slic_invmod_v17_ptr[][10]);
00145
00146 extern void findMinIndx(Fract *min_scratch, cmplx_t *input_pt, Fract *path_dist_pt,
00147                         Fract *min_indx_pt, Fract *min_min_indx, Fract *table);
00148 extern Fract V17_slice0167_120(Fract x, Fract y);
00149 extern Fract V17_slice2345_120(Fract x, Fract y);
00150 extern Fract V17_slice0167_144(Fract x, Fract y);
00151 extern Fract V17_slice2345_144(Fract x, Fract y);
00152
00153
00154 #endif  /* _V17_H */
00155 /* nothing after this point */
00156
00157


FM: v17data.c File Reference

v17data.c File Reference

Go to the source code of this file.


FM: v17data.c Source File

v17data.c

Go to the documentation of this file.
00001 #ifdef V17
00002 /******************************************************************************
00003  * FILE PURPOSE:
00004  ******************************************************************************
00005  * FILE NAME: v17data.c
00006  *
00007  * DESCRIPTION:
00008  *
00009  * TABS: NONE
00010  *
00011  * $Id: v17data.c 1.6 2000/03/21 21:59:42 jwright Exp $
00012  *
00013  * REVISION HISTORY:
00014  *
00015  * $Log: v17data.c $
00016  * Revision 1.6  2000/03/21 21:59:42  jwright
00017  * Clean up 3.50 compile warning.
00018  * Revision 1.5  1998/02/01 21:22:52  PPATEL
00019  *  Multiplication by average power was not required since the sliced
00020  * points do not take this into account. So dividing by 40 to get the
00021  * correct inv modulus
00022  * Revision 1.4  1997/11/21 15:50:20  PPATEL
00023  *  changes for multi-channel build for GG 3.0
00024  * Revision 1.3  1997/10/28 23:12:49  PPATEL
00025  *  inverse slicer table had to be defined in v17.c because it was not
00026  * accessible properly (at run-time not compile time) by use of extern directive
00027  * Revision 1.1  1997/09/13 19:49:26  PPATEL
00028  * Initial revision
00029  *
00030  * (C) Copyright 1997, TELOGY Networks, Inc.
00031  *****************************************************************************/
00032
00033
00034 #include <ti/mas/types/types.h>
00035 #include "v17.h"
00036 #include "dpu_shap.h"
00037 #include "dpu_cdec.h"
00038 #include "fmport.h"
00039
00040 const Fract dpu_denc_table_bridge_v17[4] =
00041 {
00042   1,0,2,3
00043 };
00044
00045 const Fract dpu_PN_table_v17_AllRates[4] =
00046 {
00047   0x00,0x01,0x02,0x03
00048 };
00049 const Fract dpu_dot_V17_AllRates[4] =
00050 {
00051    /* Symbol A */
00052    (Fract)(-6*V17_CSCALE),  (Fract)(-2*V17_CSCALE),
00053    /* Symbol B */
00054    (Fract)(2*V17_CSCALE),   (Fract)(-6*V17_CSCALE)
00055 };
00056
00057 /* dibit bridge sequence for training */
00058 const Fract dpu_bridge_seq_v17[8] =
00059 {
00060   0,0,0,1,0,1,0,1
00061 };
00062
00063 /* Nothing past this point */
00064 #endif


FM: v17data.h File Reference

v17data.h File Reference

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

Include dependency graph for v17data.h:

Go to the source code of this file.

Variables

const Fract | dpu_denc_table_bridge_v17 []
const Fract | dpu_PN_table_v17_AllRates []
const Fract | dpu_dot_V17_AllRates []
const Fract | dpu_bridge_seq_v17 []
dpu_shaping_bank_t shape_v17

Variable Documentation

const Fract dpu_denc_table_bridge_v17[]

const Fract dpu_PN_table_v17_AllRates[]

const Fract dpu_dot_V17_AllRates[]

const Fract dpu_bridge_seq_v17[]


FM: v17data.h Source File

v17data.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE:
00003  ******************************************************************************
00004  * FILE NAME: v17data.h
00005  *
00006  * DESCRIPTION:
00007  *
00008  * TABS: NONE
00009  *
00010  * $Id: v17data.h 1.4 1997/11/21 15:52:27 PPATEL Exp $
00011  *
00012  * REVISION HISTORY:
00013  *
00014  * $Log: v17data.h $
00015  * Revision 1.4  1997/11/21 15:52:27  PPATEL
00016  *  note the extern statement for inverse modulus 2-D array reference
00017  * (all 2-D arrays should be referenced in this manner otherwise there
00018  * may be run-time problems (not compile time)).
00019  * Also has changes for multi-channel build for GG 3.0
00020  * Revision 1.3  1997/10/28 23:13:51  PPATEL
00021  *  upgrade
00022  * Revision 1.1  1997/09/13 19:48:59  PPATEL
00023  * Initial revision
00024  *
00025  * (C) Copyright 1997, TELOGY Networks, Inc.
00026  *****************************************************************************/
00027
00028 #ifndef _V17DATA_H
00029 #define _V17DATA_H
00030
00031 #include <ti/mas/types/types.h>
00032 #include "dpu_shap.h"
00033
00034 extern const Fract              dpu_denc_table_bridge_v17[];
00035 extern const Fract              dpu_PN_table_v17_AllRates[];
00036 extern const Fract              dpu_dot_V17_AllRates[];
00037 extern const Fract              dpu_bridge_seq_v17[];
00038 extern dpu_shaping_bank_t shape_v17;
00039
00040 #endif /* _V17DATA_H */
00041 /* nothing past this point */


FM: v17datrx.h File Reference

v17datrx.h File Reference

Go to the source code of this file.

Variables

const Fract | dpu_smap_V17_144 []
const Fract | dpu_smap_V17_120 []
const Fract | bp_hilb_v17 []
const Fract | bp_rx_v17 []

Variable Documentation

const Fract dpu_smap_V17_144[]

const Fract dpu_smap_V17_120[]

const Fract bp_hilb_v17[]

const Fract bp_rx_v17[]


FM: v17datrx.h Source File

v17datrx.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE:
00003  ******************************************************************************
00004  * FILE NAME:
00005  *
00006  * DESCRIPTION:
00007  *
00008  * TABS: NONE
00009  *
00010  * $Id: v17datrx.h 1.1 1997/11/21 16:34:03 PPATEL Exp $
00011  *
00012  * REVISION HISTORY:
00013  *
00014  * $Log: v17datrx.h $
00015  * Revision 1.1  1997/11/21 16:34:03  PPATEL
00016  * Initial revision
00017  *
00018  * (C) Copyright 1997, TELOGY Networks, Inc.
00019  *****************************************************************************/
00020
00021 extern const Fract dpu_smap_V17_144[];
00022 extern const Fract dpu_smap_V17_120[];
00023 extern const Fract bp_hilb_v17[];
00024 extern const Fract bp_rx_v17[];
00025
00026 /* Nothing past this point */


FM: v17rx.c File Reference

v17rx.c File Reference

Go to the source code of this file.


FM: v17rx.c Source File

v17rx.c

Go to the documentation of this file.
00001 #ifdef V17
00002 /******************************************************************************
00003  * FILE PURPOSE:
00004  ******************************************************************************
00005  * FILE NAME:
00006  *
00007  * DESCRIPTION:
00008  *
00009  * TABS: NONE
00010  *
00011  * $Id: v17rx.c 1.2 2000/03/21 22:43:39 jwright Exp $
00012  *
00013  * REVISION HISTORY:
00014  *
00015  * $Log: v17rx.c $
00016  * Revision 1.2  2000/03/21 22:43:39  jwright
00017  * Clear up 3.50 compile warning.
00018  * Revision 1.1  1997/11/21 16:34:03  PPATEL
00019  * Initial revision
00020  *
00021  * (C) Copyright 1997, TELOGY Networks, Inc.
00022  *****************************************************************************/
00023
00024 #include <ti/mas/types/types.h>
00025 #include <ti/mas/fract/fract.h>
00026
00027 #include "v17rx.h"
00028 #include "v17data.h"
00029 #include "fmprag.h"
00030
00031
00032 void dpu_ddec_v17(dpu_ddec_t *ddec_ptr, Fract *bits)
00033 {
00034 /*-----------------------------------------------------------------------------------**
00035 **                                                                                   **
00036 **  For v.17, the last     phase is represented as [0...0 Y1(n-1) Y2(n-1)]           **
00037 **  The input (*bits) has the format [0...0 Y1n Y2n Q3..Qk]                         **
00038 **  For table look-up, this needs to be brought in the form [0..0 Y1n Y2n 0 0]       **
00039 **  and then added to [0..0 Y1(n-1) Y2(n-1)] to give [0..0 Y1n Y2n Y1(n-1) Y2(n-1)]  **
00040 **  which is used for table lookup  to obtain [0..0 Q1 Q2]. This has then to         **
00041 **  be brought to the form [0..0 Q1 Q2 Q3 Q4..Qk] to be input to the descrambler     **
00042 **  The "mask" field has k 1's left justified i.e mask = 0..011..1 (k  one's)        **
00043 **-----------------------------------------------------------------------------------*/
00044
00045  int mask,tempBits,numShifts,t1;
00046
00047    *bits &= ddec_ptr->mask;
00048
00049   for(mask =  ddec_ptr->mask, tempBits = *bits, numShifts = 0;
00050       mask > 3; numShifts++, mask >>= 1, tempBits >>= 1);
00051
00052   t1 = tempBits  & 0x03;
00053
00054   /* tempBits  is in format [0..0 Y1n Y2n], bring to format [0..0 Y1n Y2n 0 0] */
00055   tempBits  = (tempBits << 2) & 0x0c;
00056
00057   /* make tempBits = [0..0 Y1n Y2n Y1(n-1) Y2(n-1)] */
00058   ddec_ptr->last_phase  = ddec_ptr->last_phase & 0x03;
00059   tempBits              = (tempBits + ddec_ptr->last_phase) & 0x0f;
00060
00061   /* update last_phase = [0..0 Y1n Y2n]  */
00062   ddec_ptr->last_phase = t1;
00063
00064   /* obtain the format  [0..0  Q1 Q2] by table lookup  */
00065   tempBits =  ddec_ptr->ddec_table[tempBits]  & 0x03;
00066
00067   /* finally, (*bits) = [0..0 Q1 Q2 Q3 Q4..Qk] */
00068   tempBits = tempBits << numShifts;
00069   (*bits) = ((*bits) & (ddec_ptr->mask >> 2)) | tempBits;
00070 }
00071 /******************************************************************************
00072  * FUNCTION PURPOSE: Optimum slicer for path state 0
00073  *                   used for states 0,1,6 and 7 for 9600 bps
00074  ******************************************************************************
00075  * DESCRIPTION: Computes the index of the nearest neighbor within the
00076  *              subconstellation.
00077  *
00078  *****************************************************************************/
00079 Fract V17_slice0167_96(Fract x_sym, Fract y_sym)
00080 {
00081     Fract indx; Fract y_cord;
00082
00083   /* caution: y_cord can take -16-2 = -18 */
00084   y_cord = y_sym - (Fract)(2* V17_CSCALE);
00085
00086   if (x_sym  > (Fract)(4*V17_CSCALE))
00087   {
00088     if (-y_cord < x_sym)
00089     {
00090       indx = 3;
00091     }
00092     else
00093     {
00094       indx = 1;
00095     }
00096     }
00097   else
00098   {
00099     if (x_sym < (Fract)(-4*V17_CSCALE))
00100     {
00101       if (x_sym < y_cord)
00102       {
00103           indx = 0;
00104       }
00105       else
00106       {
00107         indx =  1;
00108       }
00109     }
00110     else /* i.e.  -4 <= x_cord <= 4 */
00111     {
00112       if (y_cord > (Fract)(-4*V17_CSCALE))
00113       {
00114         indx = 2;
00115       }
00116       else
00117       {
00118         indx = 1;
00119       }
00120
00121     }
00122   }
00123
00124   return(indx);
00125 }
00126
00127 /******************************************************************************
00128  * FUNCTION PURPOSE: Optimum slicer for path state 2
00129  *                   used for states 2,3,4 and 5  for 9600 bps
00130  ******************************************************************************
00131  * DESCRIPTION: Computes the index of the nearest neighbor within the
00132  *              subconstellation.
00133  *
00134  *****************************************************************************/
00135 Fract V17_slice2345_96(Fract x_sym, Fract y_sym)
00136 {
00137     Fract indx;
00138
00139   if (x_sym  > 0)
00140   {
00141     if (y_sym > (Fract)(2*V17_CSCALE))
00142     {
00143       indx = 2;
00144     }
00145     else
00146     {
00147       indx = 3;
00148     }
00149     }
00150   else /* i.e. if (x_sym < 0) */
00151   {
00152     if (y_sym > (Fract)(2*V17_CSCALE))
00153     {
00154       indx = 0;
00155     }
00156     else
00157     {
00158       indx = 1;
00159
00160     }
00161   }
00162   return(indx);
00163 }
00164
00165
00166 /******************************************************************************
00167  * FUNCTION PURPOSE: Optimum slicer for path state 2
00168  *                   used for states 0,1,6 and 7  for  7200 bps
00169  ******************************************************************************
00170  * DESCRIPTION: Computes the index of the nearest neighbor within the
00171  *              subconstellation.
00172  *
00173  *****************************************************************************/
00174 Fract V17_slice0167_72 (Fract x_sym, Fract y_sym)
00175 {
00176   if (x_sym > y_sym + (Fract)(4*V17_CSCALE)) return(0);
00177   else return(1);
00178 }
00179
00180 /******************************************************************************
00181  * FUNCTION PURPOSE: Optimum slicer for path state 2
00182  *                   used for states 2,3,4 and 5  for  7200 bps
00183  ******************************************************************************
00184  * DESCRIPTION: Computes the index of the nearest neighbor within the
00185  *              subconstellation.
00186  *
00187  *****************************************************************************/
00188 Fract V17_slice2345_72 (Fract x_sym, Fract y_sym)
00189 {
00190    if (y_sym > -x_sym) return(0);
00191    else return(1);
00192 }
00193
00194
00195 /* Nothing past this point */
00196 #endif
00197 /* Nothing past this point */


FM: v17rx.h File Reference

v17rx.h File Reference

#include <ti/mas/types/types.h>
#include "v17.h"
#include "dpu_denc.h"
#include "dpu_slic.h"

Include dependency graph for v17rx.h:

Go to the source code of this file.

Functions

void | dpu_ddec_v17 (dpu_ddec_t *ddec_ptr, Fract *bits)
Fract | V17_slice0167_96 (Fract x_sym, Fract y_sym)
Fract | V17_slice2345_96 (Fract x_sym, Fract y_sym)
Fract | V17_slice0167_72 (Fract x_sym, Fract y_sym)
Fract | V17_slice2345_72 (Fract x_sym, Fract y_sym)

Function Documentation

void dpu_ddec_v17 | ( | dpu_ddec_t * | ddec_ptr,
 |  | Fract * | bits
 | ) |  |

Fract V17_slice0167_96 | ( | Fract | x_sym,
 |  | Fract | y_sym
 | ) |  |

Fract V17_slice2345_96 | ( | Fract | x_sym,
 |  | Fract | y_sym
 | ) |  |

Fract V17_slice0167_72 | ( | Fract | x_sym,
 |  | Fract | y_sym
 | ) |  |

Fract V17_slice2345_72 | ( | Fract | x_sym,
 |  | Fract | y_sym
 | ) |  |


FM: v17rx.h Source File

v17rx.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE:
00003  ******************************************************************************
00004  * FILE NAME:
00005  *
00006  * DESCRIPTION:
00007  *
00008  * TABS: NONE
00009  *
00010  * $Id: v17rx.h 1.1 1997/11/21 16:34:03 PPATEL Exp $
00011  *
00012  * REVISION HISTORY:
00013  *
00014  * $Log: v17rx.h $
00015  * Revision 1.1  1997/11/21 16:34:03  PPATEL
00016  * Initial revision
00017  *
00018  * (C) Copyright 1997, TELOGY Networks, Inc.
00019  *****************************************************************************/
00020
00021 #include <ti/mas/types/types.h>
00022 #include "v17.h"
00023 #include "dpu_denc.h"
00024 #include "dpu_slic.h"
00025
00026 void dpu_ddec_v17(dpu_ddec_t *ddec_ptr, Fract *bits);
00027
00028 Fract V17_slice0167_96(Fract x_sym, Fract y_sym);
00029 Fract V17_slice2345_96(Fract x_sym, Fract y_sym);
00030
00031 Fract V17_slice0167_72(Fract x_sym, Fract y_sym);
00032 Fract V17_slice2345_72(Fract x_sym, Fract y_sym);
00033
00034 /* Nothing past this point */


FM: v17s.c File Reference

v17s.c File Reference

#include <stdlib.h>
#include <ti/mas/types/types.h>
#include <ti/mas/fract/fract.h>
#include "dpumath.h"
#include "v17s.h"

Include dependency graph for v17s.c:

Go to the source code of this file.

Defines

#define | V17SCALE 1024
#define | NUM_PATH_STATES 8

Functions

void | findMinIndx (Fract *min_scratch, cmplx_t *input_pt, Fract *path_dist_pt, Fract *min_indx_pt, Fract *min_min_indx, Fract *table)
Fract | getIndx (Fract a, Fract b)
Fract | V17_slice0167_120 (Fract x_sym, Fract y_sym)
Fract | V17_slice2345_120 (Fract x_sym, Fract y_sym)
Fract | V17_slice0167_144 (Fract x_sym, Fract y_sym)
Fract | V17_slice2345_144 (Fract x, Fract y)

Variables

const Fract | dpuIndxTable120 [32]
const Fract | V17_144_symbol_num [5][4]

Define Documentation

#define V17SCALE 1024

Definition at line 24 of file v17s.c.

Referenced by getIndx(), and V17_slice2345_120().

#define NUM_PATH_STATES 8

Definition at line 25 of file v17s.c.

Referenced by findMinIndx().

Function Documentation

void findMinIndx | ( | Fract * | min_scratch,
 |  | cmplx_t * | input_pt,
 |  | Fract * | path_dist_pt,
 |  | Fract * | min_indx_pt,
 |  | Fract * | min_min_indx,
 |  | Fract * | table
 | ) |  |

Definition at line 28 of file v17s.c.

References cmplx_t::im, NUM_PATH_STATES, and cmplx_t::re.

Fract getIndx | ( | Fract | a,
 |  | Fract | b
 | ) |  |

Definition at line 78 of file v17s.c.

References dpuIndxTable120, and V17SCALE.

Referenced by V17_slice0167_120(), and V17_slice2345_120().

Fract V17_slice0167_120 | ( | Fract | x_sym,
 |  | Fract | y_sym
 | ) |  |

Definition at line 96 of file v17s.c.

References getIndx().

Here is the call graph for this function:

Fract V17_slice2345_120 | ( | Fract | x_sym,
 |  | Fract | y_sym
 | ) |  |

Definition at line 111 of file v17s.c.

References getIndx(), and V17SCALE.

Here is the call graph for this function:

Fract V17_slice0167_144 | ( | Fract | x_sym,
 |  | Fract | y_sym
 | ) |  |

Definition at line 133 of file v17s.c.

References V17_144_symbol_num.

Fract V17_slice2345_144 | ( | Fract | x,
 |  | Fract | y
 | ) |  |

Definition at line 163 of file v17s.c.

References V17_144_symbol_num.

Variable Documentation

const Fract dpuIndxTable120[32]

Initial value:

{
 5, 5, 4, 4, 5, 5, 4, 4,
 7, 1, 6, 0, 7, 1, 6, 0,
 7, 1, 6, 0, 3, 3, 2, 2,
 7, 1, 6, 0, 3, 3, 2, 2
}

Definition at line 70 of file v17s.c.

Referenced by getIndx().

const Fract V17_144_symbol_num[5][4]

Initial value:

{
   {0,0,8,13},
   {5,4,12,13},
   {7,6,14,15},
   {3,2,10,11},
   {3,1,9,11}
}

Definition at line 124 of file v17s.c.

Referenced by V17_slice0167_144(), and V17_slice2345_144().


FM: v17s.c Source File

v17s.c

Go to the documentation of this file.
00001 /******************************************************************************
00002 ; * FILE PURPOSE: Convolutional decoder (viterbi etc.) fast routines
00003 ; ******************************************************************************
00004 ; * FILE NAME:
00005 ; *
00006 ; * DESCRIPTION:
00007 ; *
00008 ; * TABS: NONE
00009 ; *
00010 ; * $Id: v17s.c 1.1 2002/8/16 00:05:09 Aravind B R Exp $
00011 ; *
00012 ; * REVISION HISTORY:
00013 ; *
00014 ; * $Log: v17s.c $
00015 ; * Revision 1.1 2002/8/16 00:05:09 Aravind B R
00016 ; * Initial revision
00017 ; *
00018 ; * (C) Copyright 2002, Texas Instruments, India.
00019 ; *****************************************************************************/
00020 #include <stdlib.h>
00021 #include <ti/mas/types/types.h>
00022 #include <ti/mas/fract/fract.h>
00023 #include "dpumath.h"
00024 #define  V17SCALE 1024
00025 #define NUM_PATH_STATES 8
00026 #include "v17s.h"
00027
00028 void findMinIndx(Fract *min_scratch, cmplx_t *input_pt, Fract *path_dist_pt,
00029                  Fract *min_indx_pt, Fract *min_min_indx, Fract *table)
00030 {
00031   Fract t1,path_indx,*Table;
00032   LFract path_dist,t2,t3;
00033   cmplx_t ideal_pt,rx_pt;
00034
00035   *min_scratch = frct_MAX;
00036   *min_min_indx = 0;
00037
00038
00039   for (path_indx =0; path_indx < NUM_PATH_STATES; path_indx++)
00040   {
00041
00042     Table = (Fract *) (table + 2 * min_indx_pt[path_indx]);
00043
00044     ideal_pt.re = (Fract)Table[0];
00045     ideal_pt.im = (Fract)Table[1];
00046
00047     rx_pt.re    = input_pt[0].re;
00048     rx_pt.im    = input_pt[0].im;
00049
00050   t2 = ideal_pt.re - rx_pt.re;
00051   t3 = ideal_pt.im - rx_pt.im; /* Q10 format*/
00052
00053     path_dist  =  frctMul((Fract)t2,10,(Fract)t2,10,20);
00054
00055     path_dist +=  frctMul((Fract)t3,10,(Fract)t3,10,20);
00056
00057     t2 = frctAdjustQ(path_dist,20,6);
00058
00059     path_dist_pt[path_indx] = t2;
00060
00061   t1 = path_dist_pt[path_indx];
00062
00063     if ( t1 <= *min_scratch) {
00064       *min_scratch = t1;
00065     *min_min_indx = min_indx_pt[path_indx];
00066     }
00067   }
00068 }
00069
00070 const Fract dpuIndxTable120[32] =
00071 {
00072  5, 5, 4, 4, 5, 5, 4, 4,
00073  7, 1, 6, 0, 7, 1, 6, 0,
00074  7, 1, 6, 0, 3, 3, 2, 2,
00075  7, 1, 6, 0, 3, 3, 2, 2
00076 };
00077
00078 Fract getIndx(Fract a,Fract b)
00079 {
00080   Fract x_abs,y_abs,index;
00081
00082   x_abs = abs(a);
00083   y_abs = abs(b);
00084   index = 0;
00085
00086   index |= ( (x_abs >= 8 * V17SCALE) << 4 );
00087   index |= ( (y_abs >= 4 * V17SCALE) << 3 );
00088   index |= ( (y_abs <= (x_abs-4 * V17SCALE)) << 2 );
00089   index |= ( (a >= 0) << 1 );
00090   index |= ( (b >= 0) << 0 );
00091
00092   return(dpuIndxTable120[index]);
00093
00094 }
00095
00096 Fract V17_slice0167_120(Fract x_sym, Fract y_sym)
00097 {
00098
00099   Fract x,y,index;
00100
00101   x = x_sym-y_sym-2*1024;
00102
00103   y = x_sym+y_sym;
00104
00105   index = getIndx(x,y);
00106
00107   return(index);
00108
00109 }
00110
00111 Fract V17_slice2345_120(Fract x_sym, Fract y_sym)
00112 {
00113   Fract x,y,index;
00114
00115   x = x_sym+y_sym;
00116
00117   y = y_sym + 2* V17SCALE - x_sym;
00118
00119   index = getIndx(x,y);
00120
00121   return(index);
00122
00123 }
00124 const Fract V17_144_symbol_num[5][4] =
00125 {
00126    {0,0,8,13},
00127    {5,4,12,13},
00128    {7,6,14,15},
00129    {3,2,10,11},
00130    {3,1,9,11}
00131 };
00132
00133 Fract V17_slice0167_144(Fract x_sym, Fract y_sym)
00134 {
00135    Fract x_cord, y_cord;
00136
00137    x_cord = frctAdjustQ(x_sym,12,10);
00138    y_cord = frctAdjustQ(y_sym,12,10);
00139
00140    x_cord += 512; /* 512 = 1024/2*/
00141    x_cord = frctAdjustQ(x_cord,10,0);
00142
00143    y_cord += 256; /* 256 = 1024/4;*/
00144    y_cord = frctAdjustQ(y_cord,10,0);
00145
00146    /* clip coordinates */
00147    if (x_cord > 2)  x_cord =  2;
00148    if (x_cord < -2) x_cord = -2;
00149    if (y_cord > 1)  y_cord =  1;
00150    if (y_cord < -2) y_cord = -2;
00151
00152    /* adjust coordinates for array indexing */
00153    x_cord += 2;
00154    y_cord += 2;
00155
00156    /* look up in the table to get the symbol number */
00157    return(V17_144_symbol_num[x_cord][y_cord]);
00158
00159 }
00160
00161
00162
00163 Fract V17_slice2345_144(Fract x, Fract y)
00164 {
00165    Fract x_crd, y_crd;
00166    x_crd =0-frctAdjustQ(x,12,10);
00167    y_crd = frctAdjustQ(y,12,10);
00168
00169    x_crd = frctAdjustQ(x_crd,10,0);
00170
00171    y_crd += 768; /* 768 = 1024/2 + 1024/4;*/
00172    y_crd = frctAdjustQ(y_crd,10,0);
00173
00174    /* clip coordinates */
00175    if (y_crd > 2)  y_crd =  2;
00176    if (y_crd < -2) y_crd = -2;
00177    if (x_crd < -2) x_crd = -2;
00178    if (x_crd > 1)  x_crd =  1;
00179
00180
00181    /* adjust coordinates for array indexing */
00182    x_crd += 2;
00183    y_crd += 2;
00184
00185    /* look up in the table to get the symbol number */
00186    return(V17_144_symbol_num[y_crd][x_crd]);
00187
00188 }
00189
00190 /* Nothing past this point */


FM: v17s.h File Reference

v17s.h File Reference

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

Go to the source code of this file.

Functions

void findMinIndx (Fract *min_scratch, cmplx_t *input_pt, Fract *path_dist_pt, Fract *min_indx_pt, Fract *min_min_indx, Fract *table)

Function Documentation

void findMinIndx | ( | Fract * | min_scratch,
 |  | cmplx_t * | input_pt,
 |  | Fract * | path_dist_pt,
 |  | Fract * | min_indx_pt,
 |  | Fract * | min_min_indx,
 |  | Fract * | table
 | ) |  |

Definition at line 28 of file v17s.c.

References cmplx_t::im, NUM_PATH_STATES, and cmplx_t::re.


FM: v17s.h Source File

v17s.h

Go to the documentation of this file.
00001 #ifndef _V17S
00002 #define _V17S
00003 void findMinIndx(Fract *min_scratch, cmplx_t *input_pt, Fract *path_dist_pt,
00004                  Fract *min_indx_pt, Fract *min_min_indx, Fract *table);
00005 #endif /* _V17S */


FM: v17slic.c File Reference

v17slic.c File Reference

Go to the source code of this file.


FM: v17slic.c Source File

v17slic.c

Go to the documentation of this file.
00001 #ifdef V17
00002 /******************************************************************************
00003  * FILE PURPOSE:
00004  ******************************************************************************
00005  * FILE NAME:
00006  *
00007  * DESCRIPTION:
00008  *
00009  * TABS: NONE
00010  *
00011  * $Id: v17slic.c 1.4 2000/03/21 22:49:32 jwright Exp $
00012  *
00013  * REVISION HISTORY:
00014  *
00015  * $Log: v17slic.c $
00016  * Revision 1.4  2000/03/21 22:49:32  jwright
00017  * Clear up 3.50 compile warnings.
00018  * Revision 1.3  1998/02/01 21:23:49  PPATEL
00019  *  Proper scaling for carrier phase error computation
00020  * Revision 1.2  1998/01/21 00:22:53  PPATEL
00021  *  Adjustment for carrier recovery loop gain
00022  * Revision 1.1  1997/11/21 16:34:04  PPATEL
00023  * Initial revision
00024  *
00025  * (C) Copyright 1997, TELOGY Networks, Inc.
00026  *****************************************************************************/
00027 #include <ti/mas/types/types.h>
00028 #include <ti/mas/fract/fract.h>
00029
00030 #include "v17slic.h"
00031 #include "v17data.h"
00032 #include "v17s.h"
00033
00034 /******************************************************************************
00035  * FUNCTION PURPOSE: Slicer Implementation
00036  ******************************************************************************
00037  * DESCRIPTION:
00038  *
00039  *****************************************************************************/
00040 void dpu_slic_v17(dpu_slic_t *slic_ptr, Fract *x_sym, Fract *y_sym,
00041                   Fract *rx_bits, Fract *phase,
00042                       Fract *dpu_slic_pt_V29_72_ptr,
00043                       Fract *dpu_slic_pt_V27_48_ptr,
00044                       Fract *dpu_slic_pt_V27_24_ptr,
00045                       const Fract *dpu_PN_smap_table_v17_AllRates_ptr,
00046                       Fract dpu_slic_invmod_v17_ptr[][10])
00047 {
00048   Fract           x_coord,y_coord,x,y,neg_x,neg_y;
00049   Fract           temp;
00050   LFract          tmp_re,tmp_im;
00051
00052   Fract          min_scratch;
00053
00054   Fract             min_indx[8], *min_indx_pt = min_indx;
00055   Fract             min_min_indx;
00056   dpu_cdec_t      *cdec_ptr;
00057   Fract           *path_dist_pt;
00058   tuint           shft_cnst;
00059   cmplx_t         input_pt[1];
00060
00061 /*  int    min_indx[NUM_PATH_STATES], *min_indx_pt = &min_indx[0];*/
00062   const Fract *table ;
00063
00064   cdec_ptr     = slic_ptr->cdec_ptr;
00065     path_dist_pt = cdec_ptr->path_dist_ptr;
00066     shft_cnst    = cdec_ptr->shift_cnst;
00067   table        = cdec_ptr->smap_ptr->smap_table;
00068
00069   input_pt->re = *x_sym;
00070   input_pt->im = *y_sym;
00071
00072   x = *x_sym;
00073   y = *y_sym;
00074   neg_x = -x;
00075   neg_y = -y;
00076
00077       *min_indx_pt++ = (*(cdec_ptr->slice0167_fcn_ptr))(x, y);
00078     *min_indx_pt++ = shft_cnst   + (*(cdec_ptr->slice0167_fcn_ptr))(neg_x, neg_y);
00079       *min_indx_pt++ = 2*shft_cnst + (*(cdec_ptr->slice2345_fcn_ptr))(x, y);
00080       *min_indx_pt++ = 3*shft_cnst + (*(cdec_ptr->slice2345_fcn_ptr))(neg_x, neg_y);
00081       *min_indx_pt++ = 4*shft_cnst + (*(cdec_ptr->slice2345_fcn_ptr))(y, neg_x);
00082       *min_indx_pt++ = 5*shft_cnst + (*(cdec_ptr->slice2345_fcn_ptr))(neg_y, x);
00083       *min_indx_pt++ = 6*shft_cnst + (*(cdec_ptr->slice0167_fcn_ptr))(neg_y, x);
00084       *min_indx_pt++ = 7*shft_cnst + (*(cdec_ptr->slice0167_fcn_ptr))(y, neg_x);
00085
00086 /*   min = frct_MAX;                                                       */
00087 /*   min_min_indx = 0;                                                     */
00088 /*   min_indx_pt = min_indx;                                               */
00089 /*   for (path_indx =0; path_indx < NUM_PATH_STATES; path_indx++)          */
00090 /*   {                                                                     */
00091 /*                                                                         */
00092 /*  if ((t1 = *path_dist_pt++ =                                            */
00093 /*     find_dist_asm_cmplx(input_pt, (cmplx_t *)(table + 2* *min_indx_pt)) */
00094 /*         ) < min)                                                        */
00095 /*  {                                                                      */
00096 /*    min = t1;                                                          */
00097 /*    min_min_indx = *min_indx_pt;                                       */
00098 /*  }                                                                      */
00099 /*  min_indx_pt++;                                                         */
00100 /*   }                                                                     */
00101
00102   findMinIndx(&min_scratch, input_pt, path_dist_pt, min_indx, &min_min_indx, (Fract *)table);
00103
00104   table += min_min_indx *2;
00105   x_coord = *table++;
00106   y_coord = *table;
00107
00108   slic_ptr->x_ideal = x_coord;
00109   slic_ptr->y_ideal = y_coord;
00110
00111   slic_ptr->x_error = x_coord - *x_sym;
00112   slic_ptr->y_error = y_coord - *y_sym;
00113
00114   /* Calculate the phase error */
00115   tmp_re = frctMul( *y_sym, 10, x_coord, 10, 20);
00116   tmp_im = frctMul( *x_sym, 10, y_coord, 10, 20);
00117   temp = frctLF2F(tmp_re-tmp_im, 20, 10);
00118
00119   slic_ptr->ph_error = frctLF2F(frctMul(temp, 10,
00120                         dpu_slic_invmod_v17_ptr[abs(x_coord)>>10][abs(y_coord)>>10]
00121                                         , 16, 26),26, 14);
00122
00123   *phase = slic_ptr->ph_error;
00124 }
00125
00126 /* Nothing past this point */
00127 #endif
00128 /* Nothing past this point */


FM: v17slic.h File Reference

v17slic.h File Reference

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

Include dependency graph for v17slic.h:

Go to the source code of this file.

Functions

void dpu_slic_v17 (dpu_slic_t *slic_ptr, Fract *x_sym, Fract *y_sym, Fract *rx_bits, Fract *phase, Fract *dpu_slic_pt_V29_72_ptr, Fract *dpu_slic_pt_V27_48_ptr, Fract *dpu_slic_pt_V27_24_ptr, const Fract *dpu_PN_smap_table_v17_AllRates_ptr, Fract dpu_slic_invmod_v17_ptr[][10])

Function Documentation

void dpu_slic_v17 | ( | dpu_slic_t * | slic_ptr,
 |  | Fract * | x_sym,
 |  | Fract * | y_sym,
 |  | Fract * | rx_bits,
 |  | Fract * | phase,
 |  | Fract * | dpu_slic_pt_V29_72_ptr,
 |  | Fract * | dpu_slic_pt_V27_48_ptr,
 |  | Fract * | dpu_slic_pt_V27_24_ptr,
 |  | const Fract * | dpu_PN_smap_table_v17_AllRates_ptr,
 |  | Fract | dpu_slic_invmod_v17_ptr[][10]
 | ) |  |


FM: v17slic.h Source File

v17slic.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE:
00003  ******************************************************************************
00004  * FILE NAME:
00005  *
00006  * DESCRIPTION:
00007  *
00008  * TABS: NONE
00009  *
00010  * $Id: v17slic.h 1.1 1997/11/21 16:34:04 PPATEL Exp $
00011  *
00012  * REVISION HISTORY:
00013  *
00014  * $Log: v17slic.h $
00015  * Revision 1.1  1997/11/21 16:34:04  PPATEL
00016  * Initial revision
00017  *
00018  * (C) Copyright 1997, TELOGY Networks, Inc.
00019  *****************************************************************************/
00020
00021 #include <ti/mas/types/types.h>
00022 #include "dpu_slic.h"
00023
00024 void dpu_slic_v17(dpu_slic_t *slic_ptr, Fract *x_sym, Fract *y_sym,
00025                   Fract *rx_bits, Fract *phase,
00026                   Fract *dpu_slic_pt_V29_72_ptr,
00027                   Fract *dpu_slic_pt_V27_48_ptr,
00028                   Fract *dpu_slic_pt_V27_24_ptr,
00029                   const Fract *dpu_PN_smap_table_v17_AllRates_ptr,
00030                   Fract dpu_slic_invmod_v17_ptr[][10]);
00031
00032 /* Nothing past this point */


FM: v17smap.h File Reference

v17smap.h File Reference

Go to the source code of this file.

Variables

const Fract | dpu_smap_V17_144 []
const Fract | dpu_smap_V17_120 []

Variable Documentation

const Fract dpu_smap_V17_144[]

const Fract dpu_smap_V17_120[]


FM: v17smap.h Source File

v17smap.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE:
00003  ******************************************************************************
00004  * FILE NAME:
00005  *
00006  * DESCRIPTION:
00007  *
00008  * TABS: NONE
00009  *
00010  * $Id: v17smap.h 1.1 1997/11/21 16:34:05 PPATEL Exp $
00011  *
00012  * REVISION HISTORY:
00013  *
00014  * $Log: v17smap.h $
00015  * Revision 1.1  1997/11/21 16:34:05  PPATEL
00016  * Initial revision
00017  *
00018  * (C) Copyright 1997, TELOGY Networks, Inc.
00019  *****************************************************************************/
00020
00021 extern const Fract dpu_smap_V17_144[];
00022 extern const Fract dpu_smap_V17_120[];
00023
00024 /* Nothing past this point */


FM: vxxinit.c File Reference

vxxinit.c File Reference

#include <ti/mas/types/types.h>
#include <ti/mas/fract/fract.h>
#include <stdlib.h>
#include "dpuloc.h"
#include "vxxproc.h"
#include "procrx.h"
#include "vxxsm.h"
#include "dpu_tgt.h"
#include "dpu_cd.h"
#include "cdrx.h"
#include "maniprx.h"
#include "crecrx.h"
#include "trc_init.h"
#include "hilbrx.h"
#include "int_init.h"
#include "descrrx.h"
#include "agcrx.h"
#include "v17.h"
#include "vxxinit.h"
#include "fmprag.h"
#include "dpu.h"

Include dependency graph for vxxinit.c:

Go to the source code of this file.

Defines

#define | FREQ_OFFSET_TEST 0

Functions

void | dpu_rx_common_init (dpuInst_t *inst, int baud, int frame, int rate)
void | fmHSrxSetCdParms (dpuRxInst_t *RxInst, tuint isTraining)
void | dpuHSrxSetCdParms (dpuRxInst_t *RxInst, tuint isTraining)
void | v21RxStNULLInit (dpuInst_t *Inst)
void | v21RxCommonInit (dpuInst_t *Inst)
void | v21RxSt1Init (dpuInst_t *Inst)
void | v21RxSt3Init (dpuInst_t *Inst)
void | v29TxSt1Init (dpuInst_t *Inst)
void | v29TxSt2Init (dpuInst_t *Inst)
void | v29TxSt3Init (dpuInst_t *Inst)
void | v29TxSt4Init (dpuInst_t *Inst)
void | v27TxSt1Init (dpuInst_t *Inst)
void | v27TxSt2Init (dpuInst_t *Inst)
void | v27TxSt3Init (dpuInst_t *Inst)
void | v27TxSt4Init (dpuInst_t *Inst)
void | v27TxSt5Init (dpuInst_t *Inst)
void | HSrxCommonSt1Init (dpuInst_t *Inst, int adeqStepSize)
void | v29RxSt1Init (dpuInst_t *Inst)
void | rxLSinitInHS (dpuInst_t *Inst)
void | v29RxSt2Init (dpuInst_t *Inst)
void | v29RxSt3Init (dpuInst_t *Inst)
void | v29RxSt34Init (dpuInst_t *Inst)
void | v29RxSt4Init (dpuInst_t *Inst)
void | v29RxSt5Init (dpuInst_t *Inst)
void | v29RxSt6Init (dpuInst_t *Inst)
void | v29RxSt7Init (dpuInst_t *Inst)
void | v29RxSt8Init (dpuInst_t *Inst)
void | v27RxSt1Init (dpuInst_t *Inst)
void | v27RxSt2Init (dpuInst_t *Inst)
void | v27RxSt3Init (dpuInst_t *Inst)
void | v27RxSt34Init (dpuInst_t *Inst)
void | v27RxSt4Init (dpuInst_t *Inst)
void | v27RxSt5Init (dpuInst_t *Inst)
void | v27RxSt6Init (dpuInst_t *Inst)
void | v27RxSt7Init (dpuInst_t *Inst)
void | v27RxSt8Init (dpuInst_t *Inst)
void | dpu_rx_v21_init (dpuInst_t *inst, int frame, int rate)
int | compute_bts_per_baud (int rate, int baud)
int | compute_baud_per_seg (int baud, int frame)
void | dpuRx2400BaudInit (dpuInst_t *inst, int frame, int rate)
void | dpu_rx_v29_init (dpuInst_t *inst, int frame, int rate)
void | dpu_rx_v27_init (dpuInst_t *inst, int frame, int rate)
void | vxx_tx_init (dpuInst_t *inst)

Variables

const Fract | dpu_v21_freq_h_table []
const Fract | dpu_slic_bits_V27_24 []
const Fract | dpu_dot_V27 [4]
const Fract | dpu_dot_V27_48 [4]
const Fract | dpu_dot_V27_24 [4]
const Fract | dpu_slic_invmod_V29_72 []
const Fract | dpu_slic_invmod_V27_48 []
const Fract | dpu_slic_invmod_V27_24 []
const Fract | dpu_PN_table_v29_9600 [2]
const Fract | dpu_PN_table_v29_7200 [2]
const Fract | dpu_dot_V29_96 [4]
const Fract | dpu_dot_V29_72 [4]
const Fract | division_table []

Define Documentation

#define FREQ_OFFSET_TEST 0

Definition at line 50 of file vxxinit.c.

Function Documentation

void dpu_rx_common_init | ( | dpuInst_t * | inst,
 |  | int | baud,
 |  | int | frame,
 |  | int | rate
 | ) |  |

Definition at line 1564 of file vxxinit.c.

References dpuRxInst_t::baud_per_seg, dpuRxInst_t::bts_per_baud, dpuInst_s::cfg, compute_baud_per_seg(), compute_bts_per_baud(), dpuCfg_t::protocol, dpuRxInst_t::rx_baud, dpuRxInst_t::rx_mode, dpuRxInst_t::rx_rate, dpuInst_s::RxInst, and dpuRxInst_t::samp_per_seg.

Referenced by dpu_rx_v21_init(), dpu_rx_v27_init(), and dpuRx2400BaudInit().

Here is the call graph for this function:

void fmHSrxSetCdParms | ( | dpuRxInst_t * | RxInst,
 |  | tuint | isTraining
 | ) |  |

Definition at line 122 of file vxxinit.c.

References dpu_cddet_t::alpha, dpuRxInst_t::cddet_fcn, dpuRxInst_t::cddet_inst, dpu_cddet_t::count_false_req, dpu_cddet_t::division, dpu_cd_det_hs(), dpu_cd_det_hs_pwrlatch(), Q15_SCALE, dpuRxInst_t::samp_per_baud, and dpu_cddet_t::sig_pow.

Referenced by v29RxSt34Init().

Here is the call graph for this function:

void dpuHSrxSetCdParms | ( | dpuRxInst_t * | RxInst,
 |  | tuint | isTraining
 | ) |  |

Definition at line 150 of file vxxinit.c.

References dpu_cddet_t::alpha, dpuRxInst_t::cddet_fcn, dpuRxInst_t::cddet_inst, dpu_cddet_t::count_false_req, dpu_cddet_t::division, dpu_cd_det_hs(), dpu_cd_det_hs_pwrlatch(), Q15_SCALE, dpuRxInst_t::samp_per_baud, and dpu_cddet_t::sig_pow.

Referenced by v27RxSt34Init(), v27RxSt8Init(), v29RxSt34Init(), and v29RxSt8Init().

Here is the call graph for this function:

void v21RxStNULLInit ( dpuInst_t * Inst )

Definition at line 187 of file vxxinit.c.

References dpuRxInst_t::agc_fcn, dpuRxInst_t::agc_inst, dpu_cddet_t::alpha, dpuRxInst_t::bphilb_fcn, dpuRxInst_t::cddet_fcn, dpuRxInst_t::cddet_inst, dpuRxInst_t::change_det, dpu_cddet_t::count_false_req, dpu_cddet_t::count_true_req, dpuRxInst_t::data_fcn, dpuRxInst_t::data_out_buf, dpuRxInst_t::demod_fcn, dpu_cddet_t::division, dpu_agc_init(), dpu_cd_det_init(), dpu_cd_det_v21(), DPU_CD_FALSE, dpu_interp_init(), DPU_INTP_80_96_INDEX, DPU_OUT_WORD_SIZE, dpu_outman_init(), DPU_V21_RX_STNULL, FREQ_SCALE, INTERP_CONST_SCALE, dpuRxInst_t::interp_inst, dpuRxInst_t::outman_inst, Q15_SCALE, dpuRxInst_t::rx_count, dpuRxInst_t::rx_state, dpuInst_s::RxInst, dpuRxInst_t::samp_per_seg, and dpuRxInst_t::v21_fcn.

Referenced by dpu_rx_v21_init(), and v21RxStM().

Here is the call graph for this function:

void v21RxCommonInit ( dpuInst_t * Inst )

Definition at line 240 of file vxxinit.c.

References dpuRxInst_t::agc_fcn, commonTable1_sPtrs_t::bp_hilb_v21_96_pt, commonTable1_sPtrs_t::bp_rx_v21_96_pt, dpuRxInst_t::bphilb_fcn, dpuRxInst_t::bphilb_inst, fmTablePtrs_t::commonTable1Ptrs, dpuRxInst_t::demod_fcn, dpu_agc(), dpu_bp_hilb(), dpu_bp_hilb_init(), dpu_crec_init(), dpu_v21_dec_init(), dpu_v21_demod(), FREQ_SCALE, INTERP_CONST_SCALE, dpuRxInst_t::mod_inst, dpuRxInst_t::rx_count, dpuInst_s::RxInst, dpu_crec_t::samp, dpuRxInst_t::samp_per_baud, dpu_crec_t::scale, dpuInst_s::TablePtr, V21_CREC_CONST_SCALE, and dpuRxInst_t::v21_dec_inst.

Referenced by rxLSinitInHS(), and v21RxSt1Init().

Here is the call graph for this function:

void v21RxSt1Init ( dpuInst_t * Inst )

Definition at line 276 of file vxxinit.c.

References dpuRxInst_t::cddet_fcn, dpuRxInst_t::data_fcn, dpu_cd_det_v21(), dpu_v21_check(), DPU_V21_RX_ST1, dpuRxInst_t::rx_state, dpuInst_s::RxInst, dpuRxInst_t::v21_fcn, and v21RxCommonInit().

Referenced by v21RxStM().

Here is the call graph for this function:

void v21RxSt3Init ( dpuInst_t * Inst )

Definition at line 304 of file vxxinit.c.

References dpuRxInst_t::data_fcn, dpu_rx_packet(), dpu_v21_dec(), DPU_V21_RX_ST3, dpuRxInst_t::rx_count, dpuRxInst_t::rx_state, dpuInst_s::RxInst, and dpuRxInst_t::v21_fcn.

Referenced by v21RxStM().

Here is the call graph for this function:

void v29TxSt1Init ( dpuInst_t * Inst )

Definition at line 327 of file vxxinit.c.

References dpu_dot(), dpu_dot_V29_72, dpu_dot_V29_96, dpu_mod_init(), dpu_smap_init(), dpu_tx_mod(), DPU_V29_TX_ST1, dpuTxInst_t::mod_fcn, dpuTxInst_t::mod_inst, dpuTxInst_t::smap_fcn, dpuTxInst_t::smap_inst, dpuTxInst_t::tx_count, dpuTxInst_t::tx_rate, dpuTxInst_t::tx_state, and dpuInst_s::TxInst.

Referenced by v29TxStM().

Here is the call graph for this function:

void v29TxSt2Init ( dpuInst_t * Inst )

Definition at line 360 of file vxxinit.c.

References dpu_PN_gen(), dpu_PN_table_v29_7200, dpu_PN_table_v29_9600, dpu_scr_init(), dpu_smap(), dpu_smap_init(), v29Table_sPtrs_t::dpu_smap_V29_72_pt, v29Table_sPtrs_t::dpu_smap_V29_96_pt, DPU_V29_TX_ST2, PN_GEN_INIT_PATTERN, PN_TAP1, PN_TAP2, dpuTxInst_t::scr_fcn, dpuTxInst_t::scr_inst, dpuTxInst_t::smap_fcn, dpuTxInst_t::smap_inst, dpuInst_s::TablePtr, dpuTxInst_t::tx_count, dpuTxInst_t::tx_rate, dpuTxInst_t::tx_state, dpuInst_s::TxInst, and fmTablePtrs_t::v29TablePtrs.

Referenced by v29TxStM().

Here is the call graph for this function:

void v29TxSt3Init ( dpuInst_t * Inst )

Definition at line 407 of file vxxinit.c.

References dpuTxInst_t::data_fcn, dpuTxInst_t::denc_fcn, dpuTxInst_t::denc_inst, dpu_denc_init(), dpu_denc_v29(), v29Table_sPtrs_t::dpu_denc_V29_9600_pt, dpu_gen_marks(), dpu_scr(), dpu_scr_init(), DPU_V29_TX_ST3, dpuTxInst_t::scr_fcn, dpuTxInst_t::scr_inst, dpuInst_s::TablePtr, dpuTxInst_t::tx_count, dpuTxInst_t::tx_rate, dpuTxInst_t::tx_state, dpuInst_s::TxInst, V29_TAP1, V29_TAP2, and fmTablePtrs_t::v29TablePtrs.

Referenced by v29TxStM().

Here is the call graph for this function:

void v29TxSt4Init ( dpuInst_t * Inst )

Definition at line 448 of file vxxinit.c.

References dpuTxInst_t::data_fcn, dpu_tx_extract(), DPU_V29_TX_ST4, dpuTxInst_t::tx_count, dpuTxInst_t::tx_state, and dpuInst_s::TxInst.

Referenced by v29TxStM().

Here is the call graph for this function:

void v27TxSt1Init ( dpuInst_t * Inst )

Definition at line 472 of file vxxinit.c.

References DPU_V27_TX_ST1, dpuTxInst_t::mod_fcn, dpuTxInst_t::tx_count, dpuTxInst_t::tx_state, and dpuInst_s::TxInst.

Referenced by v27TxStM().

void v27TxSt2Init ( dpuInst_t * Inst )

Definition at line 494 of file vxxinit.c.

References dpu_dot(), dpu_dot_V27, dpu_smap_init(), dpu_tx_mod(), DPU_V27_TX_ST2, dpuTxInst_t::mod_fcn, dpuTxInst_t::smap_fcn, dpuTxInst_t::smap_inst, dpuTxInst_t::tx_count, dpuTxInst_t::tx_state, and dpuInst_s::TxInst.

Referenced by v27TxStM().

Here is the call graph for this function:

void v27TxSt3Init ( dpuInst_t * Inst )

Definition at line 521 of file vxxinit.c.

References dpuTxInst_t::data_fcn, dpu_gen_marks(), dpu_scr_init(), dpu_scr_v27(), dpu_v27_St3_smap(), DPU_V27_TX_ST3, dpuTxInst_t::scr_fcn, dpuTxInst_t::scr_inst, dpuTxInst_t::smap_fcn, dpuTxInst_t::tx_count, dpuTxInst_t::tx_state, dpuInst_s::TxInst, V27_SCR_INIT_PATTERN, V27_TAP1, and V27_TAP2.

Referenced by v27TxStM().

Here is the call graph for this function:

void v27TxSt4Init ( dpuInst_t * Inst )

Definition at line 554 of file vxxinit.c.

References dpuTxInst_t::denc_fcn, dpuTxInst_t::denc_inst, dpu_denc_init(), dpu_denc_v29(), v29Table_sPtrs_t::dpu_denc_V29_4800_pt, v29Table_sPtrs_t::dpu_denc_V29_9600_pt, dpu_scr_init(), dpu_smap(), dpu_smap_init(), v27Table_sPtrs_t::dpu_smap_V27_24_pt, v27Table_sPtrs_t::dpu_smap_V27_48_pt, DPU_V27_TX_ST4, dpu_scr_t::scr_delay, dpuTxInst_t::scr_inst, dpuTxInst_t::smap_fcn, dpuTxInst_t::smap_inst, dpuInst_s::TablePtr, dpuTxInst_t::tx_count, dpuTxInst_t::tx_rate, dpuTxInst_t::tx_state, dpuInst_s::TxInst, V27_TAP1, V27_TAP2, fmTablePtrs_t::v27TablePtrs, and fmTablePtrs_t::v29TablePtrs.

Referenced by v27TxStM().

Here is the call graph for this function:

void v27TxSt5Init ( dpuInst_t * Inst )

Definition at line 611 of file vxxinit.c.

References dpuTxInst_t::data_fcn, dpu_tx_extract(), DPU_V27_TX_ST5, dpuTxInst_t::tx_count, dpuTxInst_t::tx_state, and dpuInst_s::TxInst.

Referenced by v27TxStM().

Here is the call graph for this function:

void HSrxCommonSt1Init | ( | dpuInst_t * | Inst,
 |  | int | adeqStepSize
 | ) |  |

Definition at line 634 of file vxxinit.c.

References dpuRxInst_t::adeq_fcn, dpuRxInst_t::adeq_inst, dpuRxInst_t::agc_fcn, dpuRxInst_t::agc_inst, dpuRxInst_t::bphilb_fcn, dpuRxInst_t::cddet_fcn, dpuRxInst_t::cdec_fcn, dpuRxInst_t::change_det, dpuRxInst_t::copy_fcn, dpuRxInst_t::crec_fcn, dpuRxInst_t::data_fcn, dpuRxInst_t::data_out_buf, dpuRxInst_t::ddec_fcn, dpuRxInst_t::demod_fcn, dpuRxInst_t::descr_fcn, dpuRxInst_t::dotdet_fcn, dpu_adeq(), dpu_adeq_init(), dpu_agc(), dpu_agc_init(), dpu_bp_hilb(), dpu_dot_det(), dpu_interp(), DPU_OUT_WORD_SIZE, dpu_outman_init(), DPU_P2_FALSE, dpu_rx_copy(), dpu_trec_interp(), dpuRxInst_t::err_phase_fcn, dpuRxInst_t::intrp_fcn, dpuRxInst_t::outman_inst, dpuRxInst_t::procfn, dpuRxInst_t::rx_count, dpuInst_s::RxInst, dpuRxInst_t::scr_fcn, dpuRxInst_t::slic_fcn, dpuRxInst_t::smap_fcn, dpuRxInst_t::trec_fcn, dpuRxInst_t::update_adeq_fcn, and vHSRx().

Referenced by v27RxSt1Init(), and v29RxSt1Init().

Here is the call graph for this function:

void v29RxSt1Init ( dpuInst_t * Inst )

Definition at line 679 of file vxxinit.c.

References v29Table_sPtrs_t::bp_hilb_v29_pt, v29Table_sPtrs_t::bp_rx_v29_pt, dpuRxInst_t::bphilb_inst, division_table, dpu_dotdet_t::dot_cnt_thr, dpuRxInst_t::dotdet_inst, dpu_bp_hilb_init(), dpu_dot_det_init(), dpu_interp_init(), DPU_INTP_80_96_INDEX, DPU_TREC_COEF_SCALE, dpu_trec_init(), DPU_TREC_LEN, DPU_V29_RX_ST1, dpu_dotdet_t::factor, HSrxCommonSt1Init(), INTERP_CONST_SCALE, dpuRxInst_t::interp_inst, dpuRxInst_t::rx_state, dpuInst_s::RxInst, dpuRxInst_t::samp_per_baud, dpuRxInst_t::smfn, dpuInst_s::TablePtr, dpu_dotdet_t::tepCoefs, V29_TREC_INDEX, v29RxStM(), and fmTablePtrs_t::v29TablePtrs.

Referenced by dpu_rx_v29_init(), and v29RxStM().

Here is the call graph for this function:

void rxLSinitInHS ( dpuInst_t * Inst )

Definition at line 722 of file vxxinit.c.

References dpuRxInst_t::cddet_fcn, dpuRxInst_t::change_det, dpuRxInst_t::copy_fcn, dpuRxInst_t::data_fcn, dpu_v21_check_high(), DPU_V21_FALSE, dpuRxInst_t::procfn, dpuInst_s::RxInst, dpuRxInst_t::v21_fcn, v21Rx(), and v21RxCommonInit().

Referenced by v27RxSt2Init(), and v29RxSt2Init().

Here is the call graph for this function:

void v29RxSt2Init ( dpuInst_t * Inst )

Definition at line 752 of file vxxinit.c.

References DPU_V29_RX_ST2, dpuRxInst_t::rx_state, dpuInst_s::RxInst, rxLSinitInHS(), dpuRxInst_t::smfn, and v29RxStM().

Referenced by v29RxStM().

Here is the call graph for this function:

void v29RxSt3Init ( dpuInst_t * Inst )

Definition at line 771 of file vxxinit.c.

References dpuRxInst_t::adeq_fcn, dpuRxInst_t::change_det, dpuRxInst_t::crec_fcn, dpuRxInst_t::demod_fcn, dpuRxInst_t::dotdet_fcn, dpu_adeq(), dpu_crec_init(), dpu_no_crec(), dpu_pc_det(), DPU_PC_FALSE, dpu_phase_init(), dpu_rx_demod(), dpu_trec_interp(), DPU_V29_RX_ST3, FREQ_SCALE, INTERP_CONST_SCALE, dpu_crec_t::max_error, dpuRxInst_t::mod_inst, dpuRxInst_t::phase_inst, dpu_trec_t::rot_imag_est, dpu_trec_t::rot_real_est, dpuRxInst_t::rx_count, dpuRxInst_t::rx_rate, dpuRxInst_t::rx_state, dpuInst_s::RxInst, dpuRxInst_t::samp_per_baud, dpu_crec_t::scale, dpuRxInst_t::trec_fcn, dpuRxInst_t::trec_inst, V29_CSCALE_72, and V29_CSCALE_96.

Referenced by v29RxStM().

Here is the call graph for this function:

void v29RxSt34Init ( dpuInst_t * Inst )

Definition at line 834 of file vxxinit.c.

References dpuRxInst_t::adeq_inst, dpuRxInst_t::crec_fcn, dpu_phase_t::division_table, dpuRxInst_t::dotdet_fcn, dpu_adeq_init(), dpu_crec(), dpu_err_pha_v29_72(), dpu_err_pha_v29_96(), dpu_phase_init(), dpu_slic_invmod_V29_72, v29Table_sPtrs_t::dpu_slic_invmod_V29_96_pt, dpu_update_adeq(), DPU_V29_RX_ST34, dpuHSrxSetCdParms(), dpuRxInst_t::err_phase_fcn, fmHSrxSetCdParms(), dpuRxInst_t::phase_inst, dpu_trec_t::rot_imag, dpu_trec_t::rot_imag_est, dpu_trec_t::rot_real, dpu_trec_t::rot_real_est, dpuRxInst_t::rx_count, dpuRxInst_t::rx_rate, dpuRxInst_t::rx_state, dpuInst_s::RxInst, dpuInst_s::TablePtr, dpu_trec_t::trec_enable, dpuRxInst_t::trec_inst, dpuRxInst_t::update_adeq_fcn, V29_CSCALE_72, V29_CSCALE_96, and fmTablePtrs_t::v29TablePtrs.

Referenced by v29RxStM().

Here is the call graph for this function:

void v29RxSt4Init ( dpuInst_t * Inst )

Definition at line 898 of file vxxinit.c.

References dpu_err_pha_v29_72_1(), dpu_err_pha_v29_96_1(), dpu_PN_gen(), dpu_PN_table_v29_7200, dpu_PN_table_v29_9600, dpu_scr_init(), dpu_smap(), dpu_smap_init(), v29Table_sPtrs_t::dpu_smap_V29_72_pt, v29Table_sPtrs_t::dpu_smap_V29_96_pt, DPU_V29_RX_ST4, dpuRxInst_t::err_phase_fcn, PN_GEN_INIT_PATTERN, PN_TAP1, PN_TAP2, dpuRxInst_t::rx_count, dpuRxInst_t::rx_rate, dpuRxInst_t::rx_state, dpuInst_s::RxInst, dpuRxInst_t::scr_fcn, dpuRxInst_t::scr_inst, dpuRxInst_t::smap_fcn, dpuRxInst_t::smap_inst, dpuInst_s::TablePtr, and fmTablePtrs_t::v29TablePtrs.

Referenced by v29RxStM().

Here is the call graph for this function:

void v29RxSt5Init ( dpuInst_t * Inst )

Definition at line 946 of file vxxinit.c.

References dpuRxInst_t::adeq_inst, dpu_adeq_t::beta, DPU_V29_RX_ST5, dpuRxInst_t::rx_count, dpuRxInst_t::rx_state, and dpuInst_s::RxInst.

Referenced by v29RxStM().

void v29RxSt6Init ( dpuInst_t * Inst )

Definition at line 967 of file vxxinit.c.

References dpuRxInst_t::adeq_inst, dpu_adeq_t::beta, DPU_V29_RX_ST6, dpu_crec_t::k1, dpu_crec_t::k2, dpuRxInst_t::mod_inst, dpuRxInst_t::rx_count, dpuRxInst_t::rx_rate, dpuRxInst_t::rx_state, and dpuInst_s::RxInst.

Referenced by v29RxStM().

void v29RxSt7Init ( dpuInst_t * Inst )

Definition at line 990 of file vxxinit.c.

References dpuRxInst_t::adeq_inst, dpu_adeq_t::beta, dpu_slic_t::bits_table, dpuRxInst_t::ddec_fcn, dpuRxInst_t::ddec_inst, dpu_slic_t::decis_table, dpuRxInst_t::descr_fcn, dpuRxInst_t::descr_inst, dpu_ddec_init(), dpu_ddec_v29(), v29Table_sPtrs_t::dpu_ddec_V29_9600_pt, dpu_descr(), dpu_descr_init(), v29Table_sPtrs_t::dpu_slic_bits_V29_72_pt, v29Table_sPtrs_t::dpu_slic_bits_V29_96_pt, dpu_slic_init(), dpu_slic_invmod_V29_72, v29Table_sPtrs_t::dpu_slic_invmod_V29_96_pt, v29Table_sPtrs_t::dpu_slic_pt_V29_72_pt, v29Table_sPtrs_t::dpu_slic_pt_V29_96_pt, dpu_v27_v29_slicer(), DPU_V29_RX_ST7, dpuRxInst_t::err_phase_fcn, FREQ_SCALE, dpu_slic_t::invmod_mask, dpu_slic_t::invmod_table, dpu_crec_t::max_error, dpuRxInst_t::mod_inst, dpuRxInst_t::rx_count, dpuRxInst_t::rx_rate, dpuRxInst_t::rx_state, dpuInst_s::RxInst, dpuRxInst_t::scr_fcn, dpuRxInst_t::slic_fcn, dpuRxInst_t::slic_inst, dpuRxInst_t::smap_fcn, dpuInst_s::TablePtr, V29_TAP1, V29_TAP2, and fmTablePtrs_t::v29TablePtrs.

Referenced by v29RxStM().

Here is the call graph for this function:

void v29RxSt8Init ( dpuInst_t * Inst )

Definition at line 1051 of file vxxinit.c.

References dpuRxInst_t::cddet_inst, dpuRxInst_t::copy_fcn, dpuRxInst_t::data_fcn, dpu_cd_det_init(), dpu_rx_copy(), dpu_rx_packet(), DPU_V29_RX_ST8, dpuHSrxSetCdParms(), dpu_crec_t::k1, dpu_crec_t::k2, dpuRxInst_t::mod_inst, dpuRxInst_t::rx_count, dpuRxInst_t::rx_state, and dpuInst_s::RxInst.

Referenced by v29RxStM().

Here is the call graph for this function:

void v27RxSt1Init ( dpuInst_t * Inst )

Definition at line 1085 of file vxxinit.c.

References v27Table_sPtrs_t::bp_hilb_v27_48_pt, v27Table_sPtrs_t::bp_rx_v27_48_pt, dpuRxInst_t::bphilb_inst, division_table, dpu_dotdet_t::dot_cnt_thr, dpu_dotdet_t::dotCoefs, dpuRxInst_t::dotdet_inst, dpu_bp_hilb_init(), dpu_dot_det_init(), dpu_interp_init(), DPU_INTP_80_96_INDEX, DPU_TREC_COEF_SCALE, dpu_trec_init(), DPU_TREC_LEN, DPU_V27_RX_ST1, dpu_dotdet_t::factor, HSrxCommonSt1Init(), INTERP_CONST_SCALE, dpuRxInst_t::interp_inst, dpuRxInst_t::rx_rate, dpuRxInst_t::rx_state, dpuInst_s::RxInst, dpuRxInst_t::samp_per_baud, dpuRxInst_t::smfn, dpuInst_s::TablePtr, dpu_dotdet_t::tepCoefs, V27_24_TREC_INDEX, V27_48_TREC_INDEX, dpu_dotdet_t::v27_flag, v27RxStM(), and fmTablePtrs_t::v27TablePtrs.

Referenced by dpu_rx_v27_init(), and v27RxStM().

Here is the call graph for this function:

void v27RxSt2Init ( dpuInst_t * Inst )

Definition at line 1151 of file vxxinit.c.

References DPU_V27_RX_ST2, dpuRxInst_t::rx_state, dpuInst_s::RxInst, rxLSinitInHS(), dpuRxInst_t::smfn, and v27RxStM().

Referenced by v27RxStM().

Here is the call graph for this function:

void v27RxSt3Init ( dpuInst_t * Inst )

Definition at line 1171 of file vxxinit.c.

References dpuRxInst_t::adeq_fcn, dpuRxInst_t::change_det, dpuRxInst_t::crec_fcn, dpuRxInst_t::demod_fcn, dpuRxInst_t::dotdet_fcn, dpu_adeq(), dpu_crec_init(), dpu_no_crec(), dpu_pc_det(), DPU_PC_FALSE, dpu_phase_init(), dpu_rx_demod(), dpu_trec_interp(), DPU_V27_RX_ST3, FREQ_SCALE, INTERP_CONST_SCALE, INVMOD_SCALE, dpu_crec_t::max_error, dpuRxInst_t::mod_inst, dpuRxInst_t::phase_inst, dpu_trec_t::rot_imag_est, dpu_trec_t::rot_real_est, dpuRxInst_t::rx_count, dpuRxInst_t::rx_rate, dpuRxInst_t::rx_state, dpuInst_s::RxInst, dpu_crec_t::scale, dpuRxInst_t::trec_fcn, dpuRxInst_t::trec_inst, V27_CSCALE_24, and V27_CSCALE_48.

Referenced by v27RxStM().

Here is the call graph for this function:

void v27RxSt34Init ( dpuInst_t * Inst )

Definition at line 1240 of file vxxinit.c.

References dpuRxInst_t::adeq_inst, dpuRxInst_t::crec_fcn, dpu_phase_t::division_table, dpuRxInst_t::dotdet_fcn, dpu_adeq_init(), dpu_crec(), dpu_err_pha_v27_trn(), dpu_phase_init(), dpu_slic_invmod_V27_24, dpu_slic_invmod_V27_48, dpu_update_adeq(), DPU_V27_RX_ST34, dpuHSrxSetCdParms(), dpuRxInst_t::err_phase_fcn, INVMOD_SCALE, dpuRxInst_t::phase_inst, dpu_trec_t::rot_imag, dpu_trec_t::rot_imag_est, dpu_trec_t::rot_real, dpu_trec_t::rot_real_est, dpuRxInst_t::rx_count, dpuRxInst_t::rx_rate, dpuRxInst_t::rx_state, dpuInst_s::RxInst, dpu_trec_t::trec_enable, dpuRxInst_t::trec_inst, dpuRxInst_t::update_adeq_fcn, V27_CSCALE_24, and V27_CSCALE_48.

Referenced by v27RxStM().

Here is the call graph for this function:

void v27RxSt4Init ( dpuInst_t * Inst )

Definition at line 1302 of file vxxinit.c.

References dpuRxInst_t::descr_fcn, dpuRxInst_t::descr_inst, dpu_descr_init(), dpu_descr_v27(), dpu_dot_V27_24, dpu_dot_V27_48, dpu_err_pha_trn_1(), dpu_scr_init(), dpu_scr_v27(), DPU_V27_RX_ST4, dpu_v27_St3_smap(), dpuRxInst_t::err_phase_fcn, dpuRxInst_t::rx_count, dpuRxInst_t::rx_rate, dpuRxInst_t::rx_state, dpuInst_s::RxInst, dpuRxInst_t::scr_fcn, dpuRxInst_t::scr_inst, dpuRxInst_t::smap_fcn, dpuRxInst_t::smap_inst, dpu_smap_t::smap_table, V27_SCR_INIT_PATTERN, V27_TAP1, and V27_TAP2.

Referenced by v27RxStM().

Here is the call graph for this function:

void v27RxSt5Init ( dpuInst_t * Inst )

Definition at line 1346 of file vxxinit.c.

References dpuRxInst_t::adeq_inst, dpu_adeq_t::beta, DPU_V27_RX_ST5, dpuRxInst_t::rx_count, dpuRxInst_t::rx_state, and dpuInst_s::RxInst.

Referenced by v27RxStM().

void v27RxSt6Init ( dpuInst_t * Inst )

Definition at line 1367 of file vxxinit.c.

References dpuRxInst_t::adeq_inst, dpu_adeq_t::beta, DPU_V27_RX_ST6, dpu_crec_t::k1, dpu_crec_t::k2, dpuRxInst_t::mod_inst, dpuRxInst_t::rx_count, dpuRxInst_t::rx_state, and dpuInst_s::RxInst.

Referenced by v27RxStM().

void v27RxSt7Init ( dpuInst_t * Inst )

Definition at line 1392 of file vxxinit.c.

References dpuRxInst_t::adeq_inst, dpu_adeq_t::beta, dpu_slic_t::bits_table, dpuRxInst_t::ddec_fcn, dpuRxInst_t::ddec_inst, dpu_slic_t::decis_table, dpuRxInst_t::descr_inst, dpu_ddec_init(), dpu_ddec_v29(), v29Table_sPtrs_t::dpu_ddec_V29_4800_pt, v29Table_sPtrs_t::dpu_ddec_V29_9600_pt, dpu_slic_bits_V27_24, v27Table_sPtrs_t::dpu_slic_bits_V27_48_pt, dpu_slic_init(), dpu_slic_invmod_V27_24, dpu_slic_invmod_V27_48, v27Table_sPtrs_t::dpu_slic_pt_V27_24_pt, v27Table_sPtrs_t::dpu_slic_pt_V27_48_pt, DPU_V27_RX_ST7, dpu_v27_v29_slicer(), FREQ_SCALE, dpu_slic_t::invmod_mask, dpu_slic_t::invmod_table, dpu_crec_t::k1, dpu_crec_t::k2, dpu_crec_t::max_error, dpuRxInst_t::mod_inst, dpu_descr_t::num_of_bits, dpuRxInst_t::rx_count, dpuRxInst_t::rx_rate, dpuRxInst_t::rx_state, dpuInst_s::RxInst, dpuRxInst_t::scr_fcn, dpuRxInst_t::slic_fcn, dpuRxInst_t::slic_inst, dpuRxInst_t::smap_fcn, dpuInst_s::TablePtr, fmTablePtrs_t::v27TablePtrs, and fmTablePtrs_t::v29TablePtrs.

Referenced by v27RxStM().

Here is the call graph for this function:

void v27RxSt8Init ( dpuInst_t * Inst )

Definition at line 1457 of file vxxinit.c.

References dpuRxInst_t::cddet_inst, dpuRxInst_t::copy_fcn, dpuRxInst_t::data_fcn, dpu_cd_det_init(), dpu_rx_copy(), dpu_rx_packet(), DPU_V27_RX_ST8, dpuHSrxSetCdParms(), dpuRxInst_t::err_phase_fcn, dpuRxInst_t::rx_count, dpuRxInst_t::rx_state, and dpuInst_s::RxInst.

Referenced by v27RxStM().

Here is the call graph for this function:

void dpu_rx_v21_init | ( | dpuInst_t * | inst,
 |  | int | frame,
 |  | int | rate
 | ) |  |

Definition at line 1485 of file vxxinit.c.

References dpuRxInst_t::copy_fcn, dpu_interp(), dpu_rx_common_init(), dpu_rx_copy(), DPU_ST_V21_RX, DPU_V21_RX_STNULL, dpuRxInst_t::intrp_fcn, dpuRxInst_t::procfn, dpuInst_s::RxInst, dpuRxInst_t::samp_per_baud, dpuRxInst_t::smfn, v21Rx(), v21RxStM(), and v21RxStNULLInit().

Referenced by dpuconfigRX().

Here is the call graph for this function:

int compute_bts_per_baud | ( | int | rate,
 |  | int | baud
 | ) |  |

Definition at line 1518 of file vxxinit.c.

Referenced by dpu_rx_common_init(), and vxx_tx_init().

int compute_baud_per_seg | ( | int | baud,
 |  | int | frame
 | ) |  |

Definition at line 1537 of file vxxinit.c.

Referenced by dpu_rx_common_init(), and vxx_tx_init().

void dpuRx2400BaudInit | ( | dpuInst_t * | inst,
 |  | int | frame,
 |  | int | rate
 | ) |  |

Definition at line 1589 of file vxxinit.c.

References dpu_rx_common_init(), dpuInst_s::RxInst, and dpuRxInst_t::samp_per_baud.

Referenced by dpu_rx_v29_init().

Here is the call graph for this function:

void dpu_rx_v29_init | ( | dpuInst_t * | inst,
 |  | int | frame,
 |  | int | rate
 | ) |  |

Definition at line 1603 of file vxxinit.c.

References DPU_ST_V29_RX, DPU_V29_RX_ST1, dpuRx2400BaudInit(), and v29RxSt1Init().

Referenced by dpuconfigRX().

Here is the call graph for this function:

void dpu_rx_v27_init | ( | dpuInst_t * | inst,
 |  | int | frame,
 |  | int | rate
 | ) |  |

Definition at line 1623 of file vxxinit.c.

References dpu_rx_common_init(), dpuInst_s::RxInst, dpuRxInst_t::samp_per_baud, and v27RxSt1Init().

Referenced by dpuconfigRX().

Here is the call graph for this function:

void vxx_tx_init ( dpuInst_t * inst )

Definition at line 1652 of file vxxinit.c.

References dpuTxInst_t::baud_per_seg, dpuTxInst_t::bts_per_baud, dpuTxInst_t::cenc_fcn, dpuInst_s::cfg, compute_baud_per_seg(), compute_bts_per_baud(), dpuTxInst_t::copy_fcn, dpuTxInst_t::data_fcn, dpuTxInst_t::data_in_buf, dpuTxInst_t::denc_fcn, dpu_fsk_gen_init(), dpu_gain_cst, DPU_IN_WORD_SIZE, dpu_inman_init(), dpu_interp(), dpu_interp_init(), DPU_INTP_72_80_INDEX, DPU_INTP_96_80_INDEX, dpu_mod_init(), DPU_MOD_V17, DPU_MOD_V21, DPU_MOD_V27T, DPU_MOD_V29, DPU_MOD_V33, dpu_shaping(), dpu_tx_copy(), dpu_tx_extract(), dpu_tx_shaping_init(), dpu_un_modulate(), dpu_un_modulate_v17(), DPU_V17_TX_ST0, dpu_v21_freq_h_table, dpu_v21_fsk_gen(), DPU_V27_TX_ST0, DPU_V29_TX_ST0, dpuCfg_t::frame, FREQ_SCALE, dpuTxInst_t::fsk_gen_fcn, dpuTxInst_t::fsk_gen_inst, dpuTxInst_t::gain, dpuTxInst_t::inman_inst, INTERP_CONST_SCALE, dpuTxInst_t::interp_inst, dpuTxInst_t::intrp_fcn, dpuTxInst_t::mod_fcn, dpuTxInst_t::mod_inst, dpuCfg_t::mode, dpuTxInst_t::procfn, dpuCfg_t::rate, dpuTxInst_t::samp_per_baud, dpuTxInst_t::samp_per_seg, dpuTxInst_t::scr_fcn, dpuTxInst_t::shap_fcn, dpuTxInst_t::shap_inst, v17Table_sPtrs_t::shape_v17_pt, v27Table_sPtrs_t::shape_v27_24_pt, v27Table_sPtrs_t::shape_v27_48_pt, v29Table_sPtrs_t::shape_v29_pt, dpuTxInst_t::smap_fcn, dpuTxInst_t::smfn, dpuInst_s::TablePtr, dpuTxInst_t::tx_baud, dpuTxInst_t::tx_count, dpuCfg_t::tx_level, dpuTxInst_t::tx_rate, dpuTxInst_t::tx_state, dpuInst_s::TxInst, fmTablePtrs_t::v17TablePtrs, v17TxStM(), V21_TX_ST_INIT_MASK, v21TxStM(), fmTablePtrs_t::v27TablePtrs, v27TxStM(), fmTablePtrs_t::v29TablePtrs, v29TxStM(), and vHSTx().

Referenced by dpuConfig().

Here is the call graph for this function:

Variable Documentation

const Fract dpu_v21_freq_h_table[]

Definition at line 73 of file dpu_fsk.c.

const Fract dpu_slic_bits_V27_24[]

Definition at line 69 of file slicers.c.

Referenced by v27RxSt7Init().

const Fract dpu_dot_V27[4]

Initial value:

{
   (Fract)(1*V29_CSCALE_48),  (Fract)(0*V29_CSCALE_48),
   (Fract)(-1*V29_CSCALE_48), (Fract)(0*V29_CSCALE_48)
}

Definition at line 62 of file vxxinit.c.

Referenced by v27TxSt2Init().

const Fract dpu_dot_V27_48[4]

Initial value:

{
   (Fract)(0.9239*V29_CSCALE_48),  (Fract)(0.3827*V29_CSCALE_48),
   (Fract)(-0.9239*V29_CSCALE_48), (Fract)(-0.3827*V29_CSCALE_48)
}

Definition at line 68 of file vxxinit.c.

Referenced by v27RxSt4Init().

const Fract dpu_dot_V27_24[4]

Initial value:

{
   (Fract)(0.7071*V29_CSCALE_48),  (Fract)(0.7071*V29_CSCALE_48),
   (Fract)(-0.7071*V29_CSCALE_48), (Fract)(-0.7071*V29_CSCALE_48)
}

Definition at line 74 of file vxxinit.c.

Referenced by v27RxSt4Init().

const Fract dpu_slic_invmod_V29_72[]

Definition at line 53 of file slicers.c.

Referenced by v29RxSt34Init(), and v29RxSt7Init().

const Fract dpu_slic_invmod_V27_48[]

Definition at line 59 of file slicers.c.

Referenced by v27RxSt34Init(), and v27RxSt7Init().

const Fract dpu_slic_invmod_V27_24[]

Definition at line 64 of file slicers.c.

Referenced by v27RxSt34Init(), and v27RxSt7Init().

const Fract dpu_PN_table_v29_9600[2]

Initial value:

{
  0x00,0x0b
}

Definition at line 90 of file vxxinit.c.

Referenced by v29RxSt4Init(), and v29TxSt2Init().

const Fract dpu_PN_table_v29_7200[2]

Initial value:

{
  0x00,0x03
}

Definition at line 94 of file vxxinit.c.

Referenced by v29RxSt4Init(), and v29TxSt2Init().

const Fract dpu_dot_V29_96[4]

Initial value:

{
   (Fract)(-3*V29_CSCALE_96),  (Fract)(0*V29_CSCALE_96),
   (Fract)(3*V29_CSCALE_96), (Fract)(-3*V29_CSCALE_96)
}

Definition at line 99 of file vxxinit.c.

Referenced by v29TxSt1Init().

const Fract dpu_dot_V29_72[4]

Initial value:

{
   (Fract)(-3*V29_CSCALE_72),  (Fract)(0*V29_CSCALE_72),
   (Fract)(1*V29_CSCALE_72), (Fract)(-1*V29_CSCALE_72)
}

Definition at line 105 of file vxxinit.c.

Referenced by v29TxSt1Init().

const Fract division_table[]

Initial value:

{
 (Fract)(0.25*INTERP_CONST_SCALE), (Fract)(0.1666667*INTERP_CONST_SCALE),
 (Fract)(0.125*INTERP_CONST_SCALE), (Fract)(0.1*INTERP_CONST_SCALE),
 (Fract)(0.0833333*INTERP_CONST_SCALE), (Fract)(0.0714286*INTERP_CONST_SCALE),
 (Fract)(0.0625 * INTERP_CONST_SCALE)
}

Definition at line 111 of file vxxinit.c.

Referenced by v27RxSt1Init(), and v29RxSt1Init().


FM: vxxinit.c Source File

vxxinit.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: Initialization routines for different modulation modes
00003  ******************************************************************************
00004  * FILE NAME:   vxx_init.c
00005  *
00006  * DESCRIPTION: Initialization routines for different modulation modes
00007  *
00008  * REQUIRES:    types.h (generic data types)
00009  *              dpu.h (all the data structures required by DPU)
00010  *
00011  * TABS: NONE
00012  *
00013  * $Id$
00014  *
00015  * REVISION HISTORY:
00016  *
00017  * $Log$
00018  *
00019  * (C) Copyright 1997, TELOGY Networks, Inc.
00020  *****************************************************************************/
00021
00022 #include <ti/mas/types/types.h>
00023 #include <ti/mas/fract/fract.h>
00024
00025 #include <stdlib.h>
00026
00027 #include "dpuloc.h"
00028 #include "vxxproc.h"
00029 #include "procrx.h"
00030 #include "vxxsm.h"
00031 #include "dpu_tgt.h"
00032 #include "dpu_cd.h"
00033 #include "cdrx.h"
00034 #include "maniprx.h"
00035 #include "crecrx.h"
00036 #include "trc_init.h"
00037 #include "hilbrx.h"
00038 #include "int_init.h"
00039 #include "descrrx.h"
00040 #include "agcrx.h"
00041 #include "v17.h"
00042 #include "vxxinit.h"
00043 #include "fmprag.h"
00044
00045 #include "dpu.h"
00046 #ifdef DPU_DBG
00047 #include "dpu_dbg.h"
00048 #endif
00049
00050 #define FREQ_OFFSET_TEST    0
00051
00052 #if FREQ_OFFSET_TEST
00053 #define FREQ_OFFSET  10    /* in Hz */
00054 #endif
00055
00056 /* these are for C55x table relocation work */
00057
00058 extern const Fract dpu_v21_freq_h_table[];
00059 extern const Fract dpu_slic_bits_V27_24[];
00060
00061 /* dotting Detector Tables */
00062 const Fract dpu_dot_V27[4] =
00063 {
00064    (Fract)(1*V29_CSCALE_48),  (Fract)(0*V29_CSCALE_48),
00065    (Fract)(-1*V29_CSCALE_48), (Fract)(0*V29_CSCALE_48)
00066 };
00067
00068 const Fract dpu_dot_V27_48[4] =
00069 {
00070    (Fract)(0.9239*V29_CSCALE_48),  (Fract)(0.3827*V29_CSCALE_48),
00071    (Fract)(-0.9239*V29_CSCALE_48), (Fract)(-0.3827*V29_CSCALE_48)
00072 };
00073
00074 const Fract dpu_dot_V27_24[4] =
00075 {
00076    (Fract)(0.7071*V29_CSCALE_48),  (Fract)(0.7071*V29_CSCALE_48),
00077    (Fract)(-0.7071*V29_CSCALE_48), (Fract)(-0.7071*V29_CSCALE_48)
00078 };
00079
00080 /*extern Fract dpu_slic_invmod_V29_96[];*/
00081 extern const Fract dpu_slic_invmod_V29_72[];
00082 extern const Fract dpu_slic_invmod_V27_48[];
00083 extern const Fract dpu_slic_invmod_V27_24[];
00084
00085 /* PN generator tables */
00086 /*****************************************************************************
00087  * PN tables - used to produce output used by mapper
00088  *
00089  *****************************************************************************/
00090 const Fract dpu_PN_table_v29_9600 [2] =
00091 {
00092   0x00,0x0b
00093 };
00094 const Fract dpu_PN_table_v29_7200 [2] =
00095 {
00096   0x00,0x03
00097 };
00098
00099 const Fract dpu_dot_V29_96[4] =
00100 {
00101    (Fract)(-3*V29_CSCALE_96),  (Fract)(0*V29_CSCALE_96),
00102    (Fract)(3*V29_CSCALE_96), (Fract)(-3*V29_CSCALE_96)
00103 };
00104
00105 const Fract dpu_dot_V29_72[4] =
00106 {
00107    (Fract)(-3*V29_CSCALE_72),  (Fract)(0*V29_CSCALE_72),
00108    (Fract)(1*V29_CSCALE_72), (Fract)(-1*V29_CSCALE_72)
00109 };
00110
00111 const Fract division_table[]=
00112 {
00113  (Fract)(0.25*INTERP_CONST_SCALE), (Fract)(0.1666667*INTERP_CONST_SCALE),
00114  (Fract)(0.125*INTERP_CONST_SCALE), (Fract)(0.1*INTERP_CONST_SCALE),
00115  (Fract)(0.0833333*INTERP_CONST_SCALE), (Fract)(0.0714286*INTERP_CONST_SCALE),
00116  (Fract)(0.0625 * INTERP_CONST_SCALE)
00117 };
00118
00119 void dpu_rx_common_init (dpuInst_t *inst,int baud, int frame, int rate);
00120
00121 /* Helper API to initialize carrier loss detection parameters */
00122 void fmHSrxSetCdParms( dpuRxInst_t *RxInst, tuint isTraining )
00123 {
00124   dpu_cddet_t *inst = &RxInst->cddet_inst;
00125
00126   if (isTraining) {
00127 //    RxInst->cddet_inst.count_false_req = 276; /* This is irrelevant, don't waste code */
00128     inst->division    = (Fract)(0.005*Q15_SCALE);   /* (1-alpha)/samp */
00129     inst->alpha       = (Fract)(0.98*Q15_SCALE);
00130     inst->sig_pow     = 0;
00131     RxInst->cddet_fcn = dpu_cd_det_hs_pwrlatch;
00132   } else {
00133
00134
00135   /* for 30 ms loss time and alpha = 0.95, this is total time to check for
00136      signal power to drop by 6 dB. For exponential averaging, the time it takes to
00137      drop from a steady stable value by fraction k is logBaseAlpha(k). For k = 0.25
00138      = 27 bauds, 30 ms = 288 samples @ 9.6 KHz, hence required count
00139      = 288-27*9600/baudRate = 288 - 27 * samplesPerBaud
00140      following may be cheaper in program memory than using a switch statement with
00141      3 cases, MIPS is irrelevant */
00142     inst->count_false_req = 288 - 27*RxInst->samp_per_baud;
00143     inst->division    = (Fract)(0.0125*Q15_SCALE);  /* (1-alpha)/samp */
00144     inst->alpha       = (Fract)(0.95*Q15_SCALE);
00145     RxInst->cddet_fcn =  dpu_cd_det_hs;
00146   }
00147 }
00148
00149 /* Helper API to initialize carrier loss detection parameters */
00150 void dpuHSrxSetCdParms( dpuRxInst_t *RxInst, tuint isTraining )
00151 {
00152   dpu_cddet_t *inst = &RxInst->cddet_inst;
00153
00154   if (isTraining) {
00155 //    RxInst->cddet_inst.count_false_req = 276; /* This is irrelevant, don't waste code */
00156     inst->division    = (Fract)(0.005*Q15_SCALE);   /* (1-alpha)/samp */
00157     inst->alpha       = (Fract)(0.98*Q15_SCALE);
00158     inst->sig_pow     = 0;
00159     RxInst->cddet_fcn = dpu_cd_det_hs_pwrlatch;
00160   } else {
00161
00162
00163   /* for 30 ms loss time and alpha = 0.95, this is total time to check for
00164      signal power to drop by 6 dB. For exponential averaging, the time it takes to
00165      drop from a steady stable value by fraction k is logBaseAlpha(k). For k = 0.25
00166      = 27 bauds, 30 ms = 288 samples @ 9.6 KHz, hence required count
00167      = 288-27*9600/baudRate = 288 - 27 * samplesPerBaud
00168      following may be cheaper in program memory than using a switch statement with
00169      3 cases, MIPS is irrelevant */
00170     inst->count_false_req = 288 - 27*RxInst->samp_per_baud;
00171     inst->division    = (Fract)(0.0125*Q15_SCALE);  /* (1-alpha)/samp */
00172     inst->alpha       = (Fract)(0.95*Q15_SCALE);
00173     RxInst->cddet_fcn =  dpu_cd_det_hs;
00174   }
00175 }
00176
00177 /******************************************************************************
00178  * Subroutine:  V21 RX initialization subroutine  of STNULL
00179  ******************************************************************************
00180  * SUBROUTINE NAME: v21RxSt1Init
00181  *
00182  * DESCRIPTION: Initialization routine for V.21 RX of STNULL (carrier detection)
00183  *
00184  * API:         Inst - DPU instance
00185  *              rate   - required rate
00186  *****************************************************************************/
00187 void v21RxStNULLInit(dpuInst_t *Inst)
00188 {
00189   dpuRxInst_t *RxInst;
00190
00191   RxInst = &Inst->RxInst;         /* Store locally Rx instance address */
00192   RxInst->rx_count = 0;
00193
00194   /* scaling const for crec fre. offset calculation, 9600/8192 */
00195   /*  RxInst->mod_inst.scale = (Fract)(1.171875*V21_CREC_CONST_SCALE); */
00196   RxInst->rx_state = DPU_V21_RX_STNULL;
00197
00198   RxInst->change_det = DPU_CD_FALSE;
00199
00200    /* initialization for carrier detection */
00201   RxInst->cddet_inst.count_true_req = 1000;
00202
00203   /* Carrier off detect time depends on frame size */
00204   RxInst->cddet_inst.count_false_req =
00205     (RxInst->samp_per_seg  == 80) ? 150 : 288; /* 15.625 msec or 30msec */
00206
00207   /* set division = (1-alpha)/samp  in Q15 format */
00208   RxInst->cddet_inst.division = (Fract)(0.015625*Q15_SCALE);
00209
00210   RxInst->cddet_inst.alpha = (Fract)(0.5*Q15_SCALE);
00211
00212   /* Initialize function pointers */
00213   RxInst->cddet_fcn  = dpu_cd_det_v21;
00214   RxInst->agc_fcn    = NULL;
00215   RxInst->bphilb_fcn = NULL;
00216   RxInst->demod_fcn  = NULL;
00217   RxInst->v21_fcn    = NULL;
00218   RxInst->data_fcn   = NULL;
00219
00220   /* Receiver Initialization */
00221   dpu_cd_det_init (&RxInst->cddet_inst,(Fract)(0.182291667*FREQ_SCALE),
00222                                        (Fract)(0.92*INTERP_CONST_SCALE));
00223   dpu_agc_init(&RxInst->agc_inst);
00224   dpu_interp_init(&RxInst->interp_inst,DPU_INTP_80_96_INDEX); /* Interp. Init.*/
00225   dpu_outman_init (&RxInst->outman_inst, RxInst->data_out_buf, DPU_OUT_WORD_SIZE);
00226
00227  }
00228
00229
00230 /******************************************************************************
00231  * Subroutine:  V21 RX initialization subroutine  of ST3
00232  ******************************************************************************
00233  * SUBROUTINE NAME: v21RxSt1Init
00234  *
00235  * DESCRIPTION: Initialization routine for V.21 RX of ST3 (v21 decoding)
00236  *
00237  * API:         Inst - DPU instance
00238  *              rate   - required rate
00239  *****************************************************************************/
00240 void v21RxCommonInit(dpuInst_t *Inst)
00241 {
00242   dpuRxInst_t *RxInst;
00243
00244   RxInst = &Inst->RxInst;         /* Store locally Rx instance address */
00245   RxInst->rx_count = 0;
00246
00247   /* scaling const for crec fre. offset calculation, 9600/8192 */
00248   RxInst->mod_inst.scale = (Fract)(1.171875*V21_CREC_CONST_SCALE);
00249   RxInst->mod_inst.samp = RxInst->samp_per_baud; /* for V21 demodulator only */
00250
00251   /* initialize functions */
00252   RxInst->agc_fcn    = dpu_agc;
00253   RxInst->bphilb_fcn = dpu_bp_hilb;
00254   RxInst->demod_fcn  = dpu_v21_demod;
00255
00256   /* Receiver Initialization */
00257   dpu_v21_dec_init(&RxInst->v21_dec_inst,24 /* samp_per_baud - 8 */);
00258   dpu_bp_hilb_init(&RxInst->bphilb_inst,1,23,Inst->TablePtr->commonTable1Ptrs->bp_rx_v21_96_pt,Inst->TablePtr->commonTable1Ptrs->bp_hilb_v21_96_pt);
00259   dpu_crec_init(&RxInst->mod_inst,(Fract)(0.085*INTERP_CONST_SCALE),/*0.1, 0.079*/
00260                   (Fract)(0.0055*INTERP_CONST_SCALE),/*0.0095, 0.00202*/
00261                   (Fract)(0.182291667*FREQ_SCALE)); /* freq */
00262
00263 }
00264
00265
00266 /******************************************************************************
00267  * Subroutine:  V21 RX initialization subroutine  of ST1
00268  ******************************************************************************
00269  * SUBROUTINE NAME: v21RxSt1Init
00270  *
00271  * DESCRIPTION: Initialization routine for V.21 RX of ST1 (v21 detection)
00272  *
00273  * API:         Inst - DPU instance
00274  *              rate   - required rate
00275  *****************************************************************************/
00276 void v21RxSt1Init(dpuInst_t *Inst)
00277 {
00278   dpuRxInst_t *RxInst;
00279
00280   RxInst = &Inst->RxInst;         /* Store locally Rx instance address */
00281
00282   /* initialize v21 rx common variables */
00283   v21RxCommonInit(Inst);
00284
00285   /* scaling const for crec fre. offset calculation, 9600/8192 */
00286   RxInst->rx_state = DPU_V21_RX_ST1;
00287
00288   /* Initialize function pointers */
00289   RxInst->cddet_fcn  = dpu_cd_det_v21;
00290   RxInst->v21_fcn    = dpu_v21_check;
00291   RxInst->data_fcn   = NULL;               /* output data manipulation */
00292 }
00293
00294 /******************************************************************************
00295  * Subroutine:  V21 RX initialization subroutine  of ST3
00296  ******************************************************************************
00297  * SUBROUTINE NAME: v21RxSt1Init
00298  *
00299  * DESCRIPTION: Initialization routine for V.21 RX of ST3 (v21 decoding)
00300  *
00301  * API:         Inst - DPU instance
00302  *              rate   - required rate
00303  *****************************************************************************/
00304 void v21RxSt3Init(dpuInst_t *Inst)
00305 {
00306   dpuRxInst_t *RxInst;
00307
00308   RxInst = &Inst->RxInst;         /* Store locally Rx instance address */
00309   RxInst->rx_count = 0;
00310   RxInst->rx_state = DPU_V21_RX_ST3;
00311
00312   /* Initialize function pointers */
00313   RxInst->v21_fcn    = dpu_v21_dec;         /* dpu_v21_dec */
00314   RxInst->data_fcn   = dpu_rx_packet;       /* output data manipulation */
00315 }
00316
00317
00318 /******************************************************************************
00319  * Subroutine:  V29 TX ST1 initialization subroutine
00320  ******************************************************************************
00321  * SUBROUTINE NAME: v29TxSt1Init
00322  *
00323  * DESCRIPTION: Initialization routine for V.29 TX Mode of ST1 (Dotting)
00324  *
00325  * API:         Inst - DPU instance
00326  *****************************************************************************/
00327 void v29TxSt1Init(dpuInst_t *Inst)
00328 {
00329   const Fract *smap_table;
00330   dpuTxInst_t *TxInst;
00331
00332   TxInst = &Inst->TxInst;         /* Store locally Tx instance address */
00333   /* State initialization */
00334   TxInst->tx_state = DPU_V29_TX_ST1;
00335   TxInst->tx_count = 0;
00336
00337   /* prepare rate dependent variables */
00338   smap_table = (TxInst->tx_rate == 9600) ? (Fract *)dpu_dot_V29_96 : (Fract *)dpu_dot_V29_72;
00339
00340   /* Initialize function pointers */
00341   TxInst->smap_fcn = dpu_dot;         /* Symbol Mapper function */
00342   TxInst->mod_fcn  = dpu_tx_mod;      /* Modulator function */
00343
00344   /* Initialize TX modules */
00345   dpu_smap_init(&TxInst->smap_inst, smap_table); /* Symbol Mapper Init. */
00346   /* carrier freq 1700/2400 */
00347   dpu_mod_init (&TxInst->mod_inst,(Fract)
00348                     (-0.58333333*32768 /*CREC_CONST_SCALE */));
00349 }
00350
00351 /******************************************************************************
00352  * Subroutine:  V29 TX ST2 initialization subroutine
00353  ******************************************************************************
00354  * SUBROUTINE NAME: v29TxSt2Init
00355  *
00356  * DESCRIPTION: Initialization routine for V.29 TX Mode of ST2 (TRN)
00357  *
00358  * API:         Inst - DPU instance
00359  *****************************************************************************/
00360 void v29TxSt2Init(dpuInst_t *Inst)
00361 {
00362   const Fract   *pn_table;
00363   const Fract *smap_table;
00364   dpuTxInst_t *TxInst;
00365
00366   TxInst = &Inst->TxInst;         /* Store locally Tx instance address */
00367
00368   /* State initialization */
00369   TxInst->tx_state = DPU_V29_TX_ST2;
00370   TxInst->tx_count = 0;
00371
00372   /* prepare rate dependent variables */
00373   if (TxInst->tx_rate == 9600)
00374   {
00375       pn_table   = dpu_PN_table_v29_9600;
00376       smap_table = Inst->TablePtr->v29TablePtrs->dpu_smap_V29_96_pt;
00377   }
00378   else
00379   {
00380       pn_table   = dpu_PN_table_v29_7200;
00381       smap_table = Inst->TablePtr->v29TablePtrs->dpu_smap_V29_72_pt;
00382   }
00383
00384   /* Initialize function pointers */
00385   TxInst->scr_fcn   = dpu_PN_gen;       /* Scrambler function */
00386   TxInst->smap_fcn  = dpu_smap;         /* Symbol Mapper function */
00387
00388   /* Initialize TX modules */
00389   dpu_scr_init(&TxInst->scr_inst,       /* Scrambler initialization */
00390                1,
00391                PN_GEN_INIT_PATTERN,
00392                PN_TAP1,
00393                PN_TAP2,
00394                pn_table);
00395   dpu_smap_init(&TxInst->smap_inst,smap_table); /* Symbol Mapper Init.*/
00396 }
00397
00398 /******************************************************************************
00399  * Subroutine:  V29 TX ST3 initialization subroutine
00400  ******************************************************************************
00401  * SUBROUTINE NAME: v29TxSt3Init
00402  *
00403  * DESCRIPTION: Initialization routine for V.29 TX Mode of ST3 (B1)
00404  *
00405  * API:         Inst - DPU instance
00406  *****************************************************************************/
00407 void v29TxSt3Init(dpuInst_t *Inst)
00408 {
00409   int         num_of_scr_bits;
00410   dpuTxInst_t *TxInst;
00411
00412   TxInst = &Inst->TxInst;         /* Store locally Tx instance address */
00413
00414   /* State initialization */
00415   TxInst->tx_state = DPU_V29_TX_ST3;
00416   TxInst->tx_count = 0;
00417
00418   /* prepare rate dependent variables */
00419   num_of_scr_bits = (TxInst->tx_rate == 9600) ? 4 : 3;
00420
00421   /* Initialize function pointers */
00422   TxInst->data_fcn = dpu_gen_marks;     /* input data  manipulation */
00423   TxInst->scr_fcn  = dpu_scr;            /* Scrambler function */
00424   TxInst->denc_fcn = dpu_denc_v29;      /* Diff. Encoder function */
00425
00426   /* Initialize TX modules */
00427   dpu_scr_init(&TxInst->scr_inst,       /* Scrambler initialization */
00428                num_of_scr_bits,
00429                0x0,
00430                V29_TAP1,
00431                V29_TAP2,
00432                NULL);
00433   dpu_denc_init(&TxInst->denc_inst,     /* Diff. Encoder Initialization */
00434                 3, /* number of denc bits */
00435                 Inst->TablePtr->v29TablePtrs->dpu_denc_V29_9600_pt,0);
00436  }
00437
00438 /******************************************************************************
00439  * Subroutine:  V29 TX ST4 initialization subroutine
00440  ******************************************************************************
00441  * SUBROUTINE NAME: v29TxSt4Init
00442  *
00443  * DESCRIPTION: Initialization routine for V.29 TX Mode of ST4 (DATA)
00444  *
00445  * API:         Inst - DPU instance
00446  *              rate   - required rate
00447  *****************************************************************************/
00448 void v29TxSt4Init(dpuInst_t *Inst)
00449 {
00450   dpuTxInst_t *TxInst;
00451
00452   TxInst = &Inst->TxInst;         /* Store locally Tx instance address */
00453
00454   /* State initialization */
00455   TxInst->tx_state = DPU_V29_TX_ST4;
00456   TxInst->tx_count = 0;
00457
00458   /* Initialize function pointer */
00459   TxInst->data_fcn = dpu_tx_extract;
00460 }
00461
00462 /******************************************************************************
00463  * Subroutine:  V27 TX ST1 initialization subroutine
00464  ******************************************************************************
00465  * SUBROUTINE NAME: v27TxSt1Init
00466  *
00467  * DESCRIPTION: Initialization routine for V.27 TX Mode ST1
00468  *              (Silence after the TEP tone)
00469  *
00470  * API:         Inst - DPU instance
00471  *****************************************************************************/
00472 void v27TxSt1Init(dpuInst_t *Inst)
00473 {
00474   dpuTxInst_t *TxInst;
00475
00476   TxInst = &Inst->TxInst;         /* Store locally Tx instance address */
00477
00478   /* State initialization */
00479   TxInst->tx_state = DPU_V27_TX_ST1;
00480   TxInst->tx_count = 0;
00481
00482   TxInst->mod_fcn  = NULL;            /* Modulator function */
00483 }
00484
00485 /******************************************************************************
00486  * Subroutine:  V27 TX ST2 initialization subroutine
00487  ******************************************************************************
00488  * SUBROUTINE NAME: v27TxSt2Init
00489  *
00490  * DESCRIPTION: Initialization routine for V.27 TX Mode ST2 (Dotting)
00491  *
00492  * API:         Inst - DPU instance
00493  *****************************************************************************/
00494 void v27TxSt2Init(dpuInst_t *Inst)
00495 {
00496   dpuTxInst_t *TxInst;
00497
00498   TxInst = &Inst->TxInst;         /* Store locally Tx instance address */
00499
00500   /* State initialization */
00501   TxInst->tx_state = DPU_V27_TX_ST2;
00502   TxInst->tx_count = 0;
00503
00504   /* Initialize function pointers */
00505   TxInst->smap_fcn = dpu_dot;    /* Symbol Mapper function */
00506   TxInst->mod_fcn  = dpu_tx_mod; /* Modulator function */
00507
00508   /* Initialize TX modules */
00509   dpu_smap_init(&TxInst->smap_inst,dpu_dot_V27); /* Symbol Mapper Init.*/
00510 }
00511
00512 /******************************************************************************
00513  * Subroutine:  V27 TX ST3 initialization subroutine
00514  ******************************************************************************
00515  * SUBROUTINE NAME: v27TxSt3Init
00516  *
00517  * DESCRIPTION: Initialization routine for V.27 TX Mode ST3 (TRN)
00518  *
00519  * API:         Inst - DPU instance
00520  *****************************************************************************/
00521 void v27TxSt3Init(dpuInst_t *Inst)
00522 {
00523   dpuTxInst_t *TxInst;
00524
00525   TxInst = &Inst->TxInst;         /* Store locally Tx instance address */
00526
00527   /* State initialization */
00528   TxInst->tx_state = DPU_V27_TX_ST3;
00529   TxInst->tx_count = 0;
00530
00531   /* Initialize function pointers */
00532   TxInst->data_fcn = dpu_gen_marks;    /* input data  manipulation */
00533   TxInst->scr_fcn  = dpu_scr_v27;      /* Scrambler function */
00534   TxInst->smap_fcn = dpu_v27_St3_smap; /* Symbol Mapper function */
00535
00536   /* Initialize TX modules */
00537   dpu_scr_init(&TxInst->scr_inst,       /* Scrambler initialization */
00538                3,
00539                V27_SCR_INIT_PATTERN,
00540                V27_TAP1,
00541                V27_TAP2,
00542                NULL);
00543 }
00544
00545 /******************************************************************************
00546  * Subroutine:  V27 TX ST4 initialization subroutine
00547  ******************************************************************************
00548  * SUBROUTINE NAME: v27TxSt4Init
00549  *
00550  * DESCRIPTION: Initialization routine for V.27 TX Mode ST4 (B1)
00551  *
00552  * API:         Inst - DPU instance
00553  *****************************************************************************/
00554 void v27TxSt4Init(dpuInst_t *Inst)
00555 {
00556   Fract       *denc_table;
00557   int         num_of_denc_bits;
00558   Fract       *smap_table;
00559   int         abs_phase;
00560   dpuTxInst_t *TxInst;
00561
00562   TxInst = &Inst->TxInst;         /* Store locally Tx instance address */
00563
00564   /* State initialization */
00565   TxInst->tx_state = DPU_V27_TX_ST4;
00566   TxInst->tx_count = 0;
00567
00568   /* prepare rate dependent variables */
00569   if (TxInst->tx_rate == 4800)
00570   {
00571       denc_table       = Inst->TablePtr->v29TablePtrs->dpu_denc_V29_9600_pt;
00572       num_of_denc_bits = 3;
00573       smap_table       = Inst->TablePtr->v27TablePtrs->dpu_smap_V27_48_pt;
00574       abs_phase        = 1;
00575   }
00576   else
00577   {
00578       denc_table       = Inst->TablePtr->v29TablePtrs->dpu_denc_V29_4800_pt;
00579       num_of_denc_bits = 2;
00580       smap_table       = Inst->TablePtr->v27TablePtrs->dpu_smap_V27_24_pt;
00581       abs_phase        = 0;
00582       dpu_scr_init(&TxInst->scr_inst,       /* Scrambler initialization */
00583                2,
00584                TxInst->scr_inst.scr_delay,
00585                V27_TAP1,
00586                V27_TAP2,
00587                NULL);
00588   }
00589
00590   /* Initialize function pointers */
00591   TxInst->denc_fcn = dpu_denc_v29;      /* Diff. Encoder function */
00592   TxInst->smap_fcn = dpu_smap;          /* Symbol Mapper function */
00593
00594   /* Initialize TX modules */
00595   dpu_denc_init(&TxInst->denc_inst,     /* Diff. Encoder Initialization */
00596                 num_of_denc_bits,
00597                 denc_table,abs_phase);
00598   dpu_smap_init(&TxInst->smap_inst,     /* Symbol Mapper Initialization */
00599                 smap_table);
00600 }
00601
00602 /******************************************************************************
00603  * Subroutine:  V27 TX initialization subroutine ST5
00604  ******************************************************************************
00605  * SUBROUTINE NAME: v27TxSt5Init
00606  *
00607  * DESCRIPTION: Initialization routine for V.27 TX Mode  ST5 (Data)
00608  *
00609  * API:         Inst - DPU instance
00610  *****************************************************************************/
00611 void v27TxSt5Init(dpuInst_t *Inst)
00612 {
00613   dpuTxInst_t *TxInst;
00614
00615   TxInst = &Inst->TxInst;         /* Store locally Tx instance address */
00616
00617   /* State initialization */
00618   TxInst->tx_state = DPU_V27_TX_ST5;
00619   TxInst->tx_count = 0;
00620
00621   /* Initialize function pointers */
00622   TxInst->data_fcn = dpu_tx_extract;    /* input data  manipulation */
00623 }
00624
00625 /******************************************************************************
00626  * Subroutine:  Common HS RX initialization subroutine  of ST1
00627  ******************************************************************************
00628  * SUBROUTINE NAME: HSrxCommonSt1Init
00629  *
00630  * DESCRIPTION: Initialization routine for V.29 RX of ST1 (Dot detection)
00631  *
00632  * API:         Inst - DPU instance
00633  *****************************************************************************/
00634  void HSrxCommonSt1Init(dpuInst_t *Inst, int adeqStepSize)
00635  {
00636    dpuRxInst_t *RxInst;
00637
00638    RxInst = &Inst->RxInst;         /* Store locally Rx instance address */
00639    RxInst->rx_count   = 0;
00640    RxInst->change_det = DPU_P2_FALSE;
00641
00642    /* Initialize function pointers */
00643    RxInst->cddet_fcn       = NULL;
00644    RxInst->trec_fcn        = dpu_trec_interp;
00645    RxInst->dotdet_fcn      = dpu_dot_det;
00646    RxInst->agc_fcn         = dpu_agc;
00647    RxInst->bphilb_fcn      = dpu_bp_hilb;
00648    RxInst->adeq_fcn        = dpu_adeq;        /* Fill in equalizer delay line */
00649    RxInst->demod_fcn       = NULL;
00650    RxInst->slic_fcn        = NULL;
00651    RxInst->err_phase_fcn   = NULL;
00652    RxInst->crec_fcn        = NULL;
00653    RxInst->update_adeq_fcn = NULL;
00654    RxInst->descr_fcn       = NULL;
00655    RxInst->ddec_fcn        = NULL;
00656    RxInst->intrp_fcn       = dpu_interp;
00657    RxInst->scr_fcn         = NULL;
00658    RxInst->smap_fcn        = NULL;
00659    RxInst->data_fcn        = NULL;
00660    RxInst->copy_fcn        = dpu_rx_copy;
00661    RxInst->cdec_fcn        = NULL;
00662
00663    dpu_agc_init(&RxInst->agc_inst);
00664    dpu_outman_init (&RxInst->outman_inst, RxInst->data_out_buf,DPU_OUT_WORD_SIZE);
00665    dpu_adeq_init(&RxInst->adeq_inst, adeqStepSize,48);
00666
00667    /* Initialize processing function pointer */
00668    RxInst->procfn = vHSRx;
00669 }
00670 /******************************************************************************
00671  * Subroutine:  V29 RX initialization subroutine  of ST1
00672  ******************************************************************************
00673  * SUBROUTINE NAME: v29RxSt1Init
00674  *
00675  * DESCRIPTION: Initialization routine for V.29 RX of ST1 (Dot detection)
00676  *
00677  * API:         Inst - DPU instance
00678  *****************************************************************************/
00679  void v29RxSt1Init(dpuInst_t *Inst)
00680  {
00681    dpuRxInst_t *RxInst;
00682    dpu_dotdet_t *ddetInst_pt;
00683
00684    RxInst = &Inst->RxInst;         /* Store locally Rx instance address */
00685    ddetInst_pt = &RxInst->dotdet_inst;
00686
00687    RxInst->rx_state   = DPU_V29_RX_ST1;
00688
00689    /* initialize the dot detector, CAUTION: this function will zero out all variables */
00690    /* in dotdet_inst and then initialize some of them. */
00691    dpu_dot_det_init(ddetInst_pt,RxInst->samp_per_baud*2*6,
00692                     division_table[RxInst->samp_per_baud-2]);
00693
00694    /* initialization for V21 detection */
00695    ddetInst_pt->dot_cnt_thr = 30;   /* Threshold for dotting detection */
00696    ddetInst_pt->factor      = -2;   /* since the correlator lag is pi  */
00697
00698    /* Initialization for tep detection in dotting */
00699    /* mu = 0.95; coef0 = 2*cos(2*pi*1700/9600); coef1 = 2*mu *cos(2*pi*1700/9600) */
00700    ddetInst_pt->tepCoefs[0] = (Fract)(2* 0.442289 * INTERP_CONST_SCALE);
00701    ddetInst_pt->tepCoefs[1] = (Fract)(2*0.95* 0.442289 * INTERP_CONST_SCALE);
00702
00703    /* Receiver Initialization */
00704    dpu_trec_init(Inst, V29_TREC_INDEX,
00705            DPU_TREC_LEN, (Fract)(0.25*DPU_TREC_COEF_SCALE));
00706    dpu_bp_hilb_init(&RxInst->bphilb_inst,RxInst->samp_per_baud >> 1,
00707                     43, Inst->TablePtr->v29TablePtrs->bp_rx_v29_pt, Inst->TablePtr->v29TablePtrs->bp_hilb_v29_pt);
00708    dpu_interp_init(&RxInst->interp_inst,DPU_INTP_80_96_INDEX); /* Interp.Init.*/
00709
00710    RxInst->smfn   = v29RxStM;
00711
00712    HSrxCommonSt1Init(Inst,-1);
00713 }
00714
00715 /******************************************************************************
00716  * FUNCTION PURPOSE: Generic Routine for low speed state initialization in high
00717  *                   speed
00718  ******************************************************************************
00719  * DESCRIPTION:
00720  *
00721  *****************************************************************************/
00722 void rxLSinitInHS(dpuInst_t *Inst)
00723 {
00724   dpuRxInst_t *RxInst;
00725
00726   RxInst = &Inst->RxInst;         /* Store locally Rx instance address */
00727
00728   RxInst->change_det = DPU_V21_FALSE;
00729
00730   /* initialize v21 rx common variables */
00731   v21RxCommonInit(Inst);
00732
00733   /* Initialize function pointers */
00734   RxInst->cddet_fcn  = NULL;
00735   RxInst->v21_fcn    = dpu_v21_check_high;
00736   RxInst->data_fcn   = NULL;
00737   RxInst->copy_fcn   = NULL;
00738
00739   /* Initialize processing function pointer */
00740   RxInst->procfn = v21Rx;
00741 }
00742
00743 /******************************************************************************
00744  * Subroutine:  V29 RX initialization subroutine  of ST2
00745  ******************************************************************************
00746  * SUBROUTINE NAME: v29RxSt2Init
00747  *
00748  * DESCRIPTION: Initialization routine for V.29 RX of ST2 (v21 or tep detection)
00749  *
00750  * API:         Inst - DPU instance
00751  *****************************************************************************/
00752 void v29RxSt2Init(dpuInst_t *Inst)
00753 {
00754   dpuRxInst_t *RxInst;
00755
00756   RxInst = &Inst->RxInst;         /* Store locally Rx instance address */
00757   rxLSinitInHS(Inst);
00758   RxInst->rx_state = DPU_V29_RX_ST2;
00759   RxInst->smfn     = v29RxStM;
00760 }
00761
00762 /******************************************************************************
00763  * Subroutine:  V29 RX initialization subroutine of ST3
00764  ******************************************************************************
00765  * SUBROUTINE NAME: v29RxSt3Init
00766  *
00767  * DESCRIPTION: Initialization routine for V.29 RX of ST3 (PC detection)
00768  *
00769  * API:         Inst - DPU instance
00770  *****************************************************************************/
00771 void v29RxSt3Init(dpuInst_t *Inst)
00772 {
00773   dpuRxInst_t *RxInst;
00774   Fract vect_re[2], vect_im[2], phas_div;
00775
00776   RxInst = &Inst->RxInst;         /* Store locally Rx instance address */
00777
00778 #if FREQ_OFFSET_TEST
00779   freq += (Fract)(FREQ_OFFSET/2400.0*FREQ_SCALE);
00780 #endif
00781
00782   RxInst->rx_state      = DPU_V29_RX_ST3;
00783   RxInst->rx_count      = 0;
00784   RxInst->samp_per_baud = 4;
00785   RxInst->change_det    = DPU_PC_FALSE;
00786
00787   /* scaling const for crec fre. offset calculation, 2400*10/1024*16*16 */
00788   RxInst->mod_inst.scale = (Fract)(1.4648*INTERP_CONST_SCALE);
00789
00790   /* prepare rate dependent variables */
00791   if (RxInst->rx_rate == 9600)
00792   {
00793       vect_re[0] = 0;
00794       vect_im[0] = (Fract)(-3*V29_CSCALE_96);        /* -1 */
00795       phas_div   = (Fract)(1.5*0.15915494*V29_CSCALE_96);   /* 13.5/9 */
00796   }
00797   else
00798   {
00799       vect_re[0] = (Fract)(-2*V29_CSCALE_72);
00800       vect_im[0] = (Fract)(-1*V29_CSCALE_72);
00801       phas_div   = (Fract)(1.1*0.15915494*V29_CSCALE_72);         /* 5.5/5 */
00802   }
00803
00804   /* Initialize function pointers */
00805   RxInst->trec_fcn   = dpu_trec_interp;
00806   RxInst->dotdet_fcn = dpu_pc_det;
00807   RxInst->adeq_fcn   = dpu_adeq;
00808   RxInst->demod_fcn  = dpu_rx_demod;
00809   RxInst->crec_fcn   = dpu_no_crec;
00810
00811   /* Receiver Initialization */
00812   dpu_crec_init(&RxInst->mod_inst,(Fract)(1*INTERP_CONST_SCALE),
00813                     (Fract)(0.02*INTERP_CONST_SCALE),
00814                     (Fract)(-0.29167*FREQ_SCALE));
00815
00816   /* Until offset has accumulated, allow 15 Hz variation in carrier frequency */
00817   RxInst->mod_inst.max_error = (Fract)(15.0/2400.0*FREQ_SCALE);
00818
00819   dpu_phase_init(&RxInst->phase_inst, vect_re, vect_im, phas_div, 2); /* 2 */
00820
00821   /* Init. estimation of timing phase */
00822   RxInst->trec_inst.rot_real_est = RxInst->trec_inst.rot_imag_est = 0;
00823 }
00824
00825 /******************************************************************************
00826  * Subroutine:  V29 RX initialization subroutine of ST34
00827  ******************************************************************************
00828  * SUBROUTINE NAME: v29RxSt34Init
00829  *
00830  * DESCRIPTION: Initialization routine for V.29 RX of ST34 (Jun)
00831  *
00832  * API:         Inst - DPU instance
00833  *****************************************************************************/
00834 void v29RxSt34Init(dpuInst_t *Inst)
00835 {
00836   dpuRxInst_t *RxInst;
00837   Fract vect_re[2], vect_im[2], phas_div;
00838
00839   RxInst = &Inst->RxInst;         /* Store locally Rx instance address */
00840   RxInst->rx_state = DPU_V29_RX_ST34;
00841   RxInst->rx_count = 0;
00842
00843   /* prepare rate dependent variables */
00844   if (RxInst->rx_rate == 9600)
00845   {
00846       vect_re[0] = (Fract)(-3*V29_CSCALE_96);
00847       vect_im[0] = (Fract)(0*V29_CSCALE_96);
00848       vect_re[1] = (Fract)(3*V29_CSCALE_96);
00849       vect_im[1] = (Fract)(-3*V29_CSCALE_96);
00850       RxInst->phase_inst.division_table = (Fract *)(Inst->TablePtr->v29TablePtrs->dpu_slic_invmod_V29_96_pt);
00851       RxInst->err_phase_fcn             = dpu_err_pha_v29_96;
00852       phas_div   = (Fract)(1.5*0.15915494*V29_CSCALE_96);   /* 13.5/9 */
00853   }
00854   else
00855   {
00856       vect_re[0] = (Fract)(-3*V29_CSCALE_72);
00857       vect_im[0] = (Fract)(0*V29_CSCALE_72);
00858       vect_re[1] = (Fract)(1*V29_CSCALE_72);
00859       vect_im[1] = (Fract)(-1*V29_CSCALE_72);
00860       RxInst->phase_inst.division_table = dpu_slic_invmod_V29_72;
00861       RxInst->err_phase_fcn             = dpu_err_pha_v29_72;
00862       phas_div   = (Fract)(1.1*0.15915494*V29_CSCALE_72);         /* 5.5/5 */
00863   }
00864
00865   /* Initialize function pointers */
00866   RxInst->dotdet_fcn      = NULL;
00867   RxInst->crec_fcn        = dpu_crec;
00868   RxInst->update_adeq_fcn = dpu_update_adeq;
00869
00870   /* initialization for carrier loss detection for training */
00871   fmHSrxSetCdParms(RxInst,1);
00872
00873   /* initialization for carrier loss detection for training */
00874   dpuHSrxSetCdParms(RxInst,1);
00875
00876   /* preserve timing phase estimation */
00877   RxInst->trec_inst.rot_real = frctLF2F(RxInst->trec_inst.rot_real_est, 29,22);
00878   RxInst->trec_inst.rot_imag = frctLF2F(RxInst->trec_inst.rot_imag_est, 29,22);
00879
00880   /* Enable timing recovery */
00881   RxInst->trec_inst.trec_enable = TRUE;
00882
00883   /* Receiver Initialization */
00884   dpu_adeq_init(&RxInst->adeq_inst,5,48);
00885   dpu_phase_init(&RxInst->phase_inst, vect_re, vect_im,phas_div,
00886            0  /* adq delay: 12, Hilbert delay:6, 12+6+2-18=2 */);
00887 }
00888
00889 /******************************************************************************
00890  * Subroutine:  V29 RX initialization subroutine of ST4
00891  ******************************************************************************
00892  * SUBROUTINE NAME: v29RxSt4Init
00893  *
00894  * DESCRIPTION: Initialization routine for V.29 RX of ST4 (TRN 1)
00895  *
00896  * API:         Inst - DPU instance
00897  *****************************************************************************/
00898 void v29RxSt4Init(dpuInst_t *Inst)
00899 {
00900   const Fract *pn_table;
00901   const Fract *smap_table;
00902   dpuRxInst_t *RxInst;
00903
00904   RxInst = &Inst->RxInst;         /* Store locally Rx instance address */
00905
00906   RxInst->rx_state = DPU_V29_RX_ST4;
00907   RxInst->rx_count = 0;
00908
00909   if (RxInst->rx_rate == 9600)
00910   {
00911       RxInst->err_phase_fcn =  dpu_err_pha_v29_96_1;
00912       pn_table              =  dpu_PN_table_v29_9600;
00913       smap_table            =  Inst->TablePtr->v29TablePtrs->dpu_smap_V29_96_pt;
00914   }
00915   else
00916   {
00917       RxInst->err_phase_fcn =  dpu_err_pha_v29_72_1;
00918       pn_table              =  dpu_PN_table_v29_7200;
00919       smap_table            =  Inst->TablePtr->v29TablePtrs->dpu_smap_V29_72_pt;
00920   }
00921
00922   /* Initialize function pointers */
00923   RxInst->scr_fcn  = dpu_PN_gen;         /* Scrambler function */
00924   RxInst->smap_fcn = dpu_smap;          /* Symbol Mapper function */
00925
00926   /* Initialize RX's tx  modules */
00927   dpu_scr_init(&RxInst->scr_inst,       /* Scrambler initialization */
00928                1,  /* num_of_scr_bits */
00929                PN_GEN_INIT_PATTERN,
00930                PN_TAP1,
00931                PN_TAP2,
00932                pn_table);
00933   dpu_smap_init(&RxInst->smap_inst,     /* Symbol Mapper Initialization */
00934                 smap_table);
00935 }
00936
00937 /******************************************************************************
00938  * Subroutine:  V29 RX initialization subroutine of ST5
00939  ******************************************************************************
00940  * SUBROUTINE NAME: v29RxInit
00941  *
00942  * DESCRIPTION: Initialization routine for V.29 RX of ST5 (TRN 2)
00943  *
00944  * API:         Inst - DPU instance
00945  *****************************************************************************/
00946 void v29RxSt5Init(dpuInst_t *Inst)
00947 {
00948   dpuRxInst_t *RxInst;
00949
00950   RxInst = &Inst->RxInst;         /* Store locally Rx instance address */
00951   RxInst->rx_state = DPU_V29_RX_ST5;
00952   RxInst->rx_count = 0;
00953
00954   /* set the adeq step size */
00955   RxInst->adeq_inst.beta = (Fract) 5;
00956 }
00957
00958 /******************************************************************************
00959  * Subroutine:  V29 RX initialization subroutine of ST6
00960  ******************************************************************************
00961  * SUBROUTINE NAME: v29RxInit
00962  *
00963  * DESCRIPTION: Initialization routine for V.29 RX of ST6 (TRN 3)
00964  *
00965  * API:         Inst - DPU instance
00966  *****************************************************************************/
00967 void v29RxSt6Init(dpuInst_t *Inst)
00968 {
00969   dpuRxInst_t *RxInst;
00970
00971   RxInst = &Inst->RxInst;         /* Store locally Rx instance address */
00972   RxInst->rx_state = DPU_V29_RX_ST6;
00973   RxInst->rx_count = 0;
00974
00975   /* Narrow down Carrier PLL */
00976   RxInst->mod_inst.k1 = RxInst->mod_inst.k1 >>2;
00977   RxInst->mod_inst.k2 = RxInst->mod_inst.k2 >>2;
00978   RxInst->adeq_inst.beta = (RxInst->rx_rate == 9600) ? (Fract) 6 : (Fract) 5;
00979 }
00980
00981 /******************************************************************************
00982  * Subroutine:  V29 RX initialization subroutine of ST7
00983  ******************************************************************************
00984  * SUBROUTINE NAME: v29RxInit
00985  *
00986  * DESCRIPTION: Initialization routine for V.29 RX of ST7 (B1)
00987  *
00988  * API:         Inst - DPU instance
00989  *****************************************************************************/
00990 void v29RxSt7Init(dpuInst_t *Inst)
00991 {
00992   int num_of_descr_bits;
00993   dpuRxInst_t *RxInst;
00994
00995   RxInst = &Inst->RxInst;         /* Store locally Rx instance address */
00996   RxInst->rx_state = DPU_V29_RX_ST7;
00997   RxInst->rx_count = 0;         /* since the first two C, D had been received */
00998   RxInst->adeq_inst.beta = (Fract) 7;
00999
01000   /* Offset has been collected by now, Allow 5 Hz variation in carrier frequency */
01001   RxInst->mod_inst.max_error = (Fract)(5.0/2400.0*FREQ_SCALE);
01002
01003   RxInst->slic_fcn  = dpu_v27_v29_slicer;
01004
01005   /* prepare rate dependent variables */
01006   if (RxInst->rx_rate == 9600)
01007   {
01008       num_of_descr_bits              = 4;
01009       RxInst->slic_inst.decis_table  = Inst->TablePtr->v29TablePtrs->dpu_slic_pt_V29_96_pt;
01010       RxInst->slic_inst.bits_table   = Inst->TablePtr->v29TablePtrs->dpu_slic_bits_V29_96_pt;
01011       RxInst->slic_inst.invmod_mask  = 2;
01012       RxInst->slic_inst.invmod_table = (Fract *)(Inst->TablePtr->v29TablePtrs->dpu_slic_invmod_V29_96_pt);
01013   }
01014   else
01015   {
01016       num_of_descr_bits              = 3;
01017       RxInst->slic_inst.decis_table  = Inst->TablePtr->v29TablePtrs->dpu_slic_pt_V29_72_pt;
01018       RxInst->slic_inst.bits_table   = Inst->TablePtr->v29TablePtrs->dpu_slic_bits_V29_72_pt;
01019       RxInst->slic_inst.invmod_mask  = 1;
01020       RxInst->slic_inst.invmod_table = dpu_slic_invmod_V29_72;
01021   }
01022
01023   /* Initialize function pointers */
01024   RxInst->err_phase_fcn = NULL;
01025   RxInst->descr_fcn     = dpu_descr;
01026   RxInst->ddec_fcn      = dpu_ddec_v29;
01027   RxInst->scr_fcn       = NULL;          /* Scrambler function */
01028   RxInst->smap_fcn      = NULL;          /* Symbol Mapper function */
01029
01030   /* Receiver Initialization */
01031   dpu_descr_init(&RxInst->descr_inst,
01032                  num_of_descr_bits,
01033                  0,  /* pn gen init pattern */
01034                  V29_TAP1,
01035                  V29_TAP2);
01036   dpu_ddec_init(&RxInst->ddec_inst,
01037                 3, /* num_of_ddec_bits */
01038                 Inst->TablePtr->v29TablePtrs->dpu_ddec_V29_9600_pt,0);
01039   dpu_slic_init(&RxInst->slic_inst);
01040 }
01041
01042 /******************************************************************************
01043  * Subroutine:  V29 RX initialization subroutine of ST8
01044  ******************************************************************************
01045  * SUBROUTINE NAME: v29RxInit
01046  *
01047  * DESCRIPTION: Initialization routine for V.29 RX of ST8 (DATA)
01048  *
01049  * API:         Inst - DPU instance
01050  *****************************************************************************/
01051 void v29RxSt8Init(dpuInst_t *Inst)
01052 {
01053   dpuRxInst_t *RxInst;
01054
01055   RxInst = &Inst->RxInst;         /* Store locally Rx instance address */
01056   RxInst->rx_state = DPU_V29_RX_ST8;
01057   RxInst->rx_count = 0;
01058
01059   dpuHSrxSetCdParms(RxInst,0);
01060
01061  #if 1
01062   /* Narrow down Carrier PLL */
01063   RxInst->mod_inst.k1 = RxInst->mod_inst.k1 >>1;
01064   RxInst->mod_inst.k2 = RxInst->mod_inst.k2 >>1;
01065 #endif
01066   /* Note that count_false_req,division and alpha are intialized in State34 */
01067
01068   /* Initialize function pointers */
01069   RxInst->data_fcn  = dpu_rx_packet;   /* RX output data manipulation function */
01070   RxInst->copy_fcn  = dpu_rx_copy;     /* RX output copy function */
01071
01072   /* Receiver Initialization */
01073   dpu_cd_det_init (&RxInst->cddet_inst, 0, 0);
01074 }
01075
01076 /******************************************************************************
01077  * Subroutine:  V27 RX initialization subroutine  of ST1
01078  ******************************************************************************
01079  * SUBROUTINE NAME: v27RxSt1Init
01080  *
01081  * DESCRIPTION: Initialization routine for V.27 RX of ST1 (Dot detection)
01082  *
01083  * API:         Inst - DPU instance
01084  *****************************************************************************/
01085 void v27RxSt1Init(dpuInst_t *Inst)
01086 {
01087   Fract       invBaud;
01088   int         trec_index;        /* Index for timing rec. filter table */
01089   dpu_dotdet_t  *ddetInst_pt;
01090   dpuRxInst_t *RxInst;
01091
01092   RxInst = &Inst->RxInst;         /* Store locally Rx instance address */
01093
01094   ddetInst_pt = &RxInst->dotdet_inst;
01095
01096   RxInst->rx_state = DPU_V27_RX_ST1;
01097
01098    /* initialize the dot detector, CAUTION: this function will zero out all variables */
01099    /* in dotdet_inst and then initialize some of them. */
01100    dpu_dot_det_init(ddetInst_pt,RxInst->samp_per_baud*4,
01101                   division_table[RxInst->samp_per_baud-2]);
01102
01103   /* initialization for V21 detection */
01104   ddetInst_pt->dot_cnt_thr = 20;
01105
01106   /* Initialization for tep detection in dotting */
01107   /* mu = 0.95; coef0 = 2*cos(2*pi*1800/9600); coef1 = 2*mu *cos(2*pi*1800/9600) */
01108   ddetInst_pt->tepCoefs[0] = (Fract)(2*0.3826834 * INTERP_CONST_SCALE);
01109   ddetInst_pt->tepCoefs[1] = (Fract)(2*0.95*0.3826834 * INTERP_CONST_SCALE);
01110
01111   /* mu = 0.95; coef0 = 2*cos(2*pi*1850/9600);coef1=2*mu*cos(2*pi*1850/9600);coef2=mu*mu */
01112   ddetInst_pt->dotCoefs[0] = (Fract)(2 * 0.3522500 * INTERP_CONST_SCALE);
01113   ddetInst_pt->dotCoefs[1] = (Fract)(2 * 0.95 * 0.3522500 * INTERP_CONST_SCALE);
01114   ddetInst_pt->dotCoefs[2] = (Fract)(0.95 * 0.95 * INTERP_CONST_SCALE);
01115   ddetInst_pt->v27_flag = 1;
01116
01117   /* prepare rate dependent variables */
01118   if (RxInst->rx_rate == 4800)
01119   {
01120       trec_index = V27_48_TREC_INDEX;
01121       ddetInst_pt->factor = -2;          /*** since the correlator lag is pi ****/
01122       invBaud = (Fract)(0.16667*DPU_TREC_COEF_SCALE); /* 1/samples_per_baud */
01123   }
01124   else
01125   {
01126       trec_index = V27_24_TREC_INDEX;
01127       ddetInst_pt->factor = 2;          /*** since the correlator lag is 2 pi ****/
01128       invBaud = (Fract)(0.125*DPU_TREC_COEF_SCALE); /* 1/ samples_per_baud */
01129   }
01130
01131   /* Receiver Initialization */
01132   dpu_interp_init(&RxInst->interp_inst,DPU_INTP_80_96_INDEX); /* Interp.Init.*/
01133   dpu_trec_init(Inst, trec_index, DPU_TREC_LEN, invBaud);
01134   dpu_bp_hilb_init(&RxInst->bphilb_inst,RxInst->samp_per_baud >> 1, /* samp_per_baud/2-1 for Hilbert */
01135              45, Inst->TablePtr->v27TablePtrs->bp_rx_v27_48_pt, Inst->TablePtr->v27TablePtrs->bp_hilb_v27_48_pt);
01136
01137   /* Initialize processing function pointer */
01138   RxInst->smfn = v27RxStM;
01139   HSrxCommonSt1Init(Inst,-1);
01140 }
01141 /******************************************************************************
01142  * Subroutine:  V27 RX initialization subroutine  of ST2
01143  ******************************************************************************
01144  * SUBROUTINE NAME: v27RxSt2Init
01145  *
01146  * DESCRIPTION: Initialization routine for V.27 RX of ST2 (v21 or tep detection)
01147  *
01148  * API:         Inst - DPU instance
01149  *              rate   - required rate
01150  *****************************************************************************/
01151 void v27RxSt2Init(dpuInst_t *Inst)
01152 {
01153   dpuRxInst_t *RxInst;
01154
01155   RxInst = &Inst->RxInst;         /* Store locally Rx instance address */
01156   rxLSinitInHS(Inst);
01157   RxInst->rx_state = DPU_V27_RX_ST2;
01158   RxInst->smfn   = v27RxStM;
01159 }
01160
01161 /******************************************************************************
01162  * Subroutine:  V27 RX initialization subroutine of ST3
01163  ******************************************************************************
01164  * SUBROUTINE NAME: v27RxInit
01165  *
01166  * DESCRIPTION: Initialization routine for V.27 RX of ST3 (PC detection)
01167  *
01168  * API:         Inst - DPU instance
01169  *              rate   - required rate
01170  *****************************************************************************/
01171 void v27RxSt3Init(dpuInst_t *Inst)
01172 {
01173   Fract freq;
01174   Fract vect_re[2], vect_im[2], phas_div;
01175   dpuRxInst_t *RxInst;
01176
01177   RxInst = &Inst->RxInst;         /* Store locally Rx instance address */
01178   RxInst->change_det = DPU_PC_FALSE;
01179   RxInst->rx_state   = DPU_V27_RX_ST3;
01180   RxInst->rx_count   = 0;
01181
01182   phas_div = (Fract)(0.15915494*INVMOD_SCALE);
01183
01184   /* prepare rate dependent variables */
01185   if (RxInst->rx_rate == 4800)
01186   {
01187       vect_re[0] = (Fract)(0.9239*V27_CSCALE_48);
01188       vect_im[0] = (Fract)(0.3827*V27_CSCALE_48);
01189       freq=(Fract)(0.125*FREQ_SCALE);
01190       RxInst->mod_inst.max_error = (Fract)(15.0/1600.0*FREQ_SCALE);
01191
01192 #if FREQ_OFFSET_TEST
01193     freq += (Fract)(FREQ_OFFSET/1600.0*FREQ_SCALE);
01194 #endif
01195
01196       /* scaling const for crec fre. offset calculation, 1600*10/1024*16*16 */
01197       RxInst->mod_inst.scale = (Fract)(0.9766*INTERP_CONST_SCALE);
01198   }
01199   else
01200   {
01201       vect_re[0] = (Fract)(0.7071*V27_CSCALE_24);
01202       vect_im[0] = (Fract)(0.7071*V27_CSCALE_24);
01203       freq=(Fract)(0.49998*FREQ_SCALE);
01204       RxInst->mod_inst.max_error = (Fract)(15.0/1200.0*FREQ_SCALE);
01205
01206 #if FREQ_OFFSET_TEST
01207     freq += (Fract)(FREQ_OFFSET/1200.0*FREQ_SCALE);
01208 #endif
01209
01210       /* scaling const for crec fre. offset calculation, 1200*10/1024*16*16 */
01211       RxInst->mod_inst.scale = (Fract)(0.7324*INTERP_CONST_SCALE);
01212   }
01213
01214   /* Init. estimation of timing phase */
01215   RxInst->trec_inst.rot_real_est = 0;
01216   RxInst->trec_inst.rot_imag_est = 0;
01217
01218   /* Initialize function pointers */
01219   RxInst->trec_fcn   = dpu_trec_interp;
01220   RxInst->dotdet_fcn = dpu_pc_det;
01221   RxInst->adeq_fcn   = dpu_adeq;
01222   RxInst->demod_fcn  = dpu_rx_demod;
01223   RxInst->crec_fcn   = dpu_no_crec;
01224
01225   /* Receiver Initialization */
01226   dpu_crec_init(&RxInst->mod_inst,(Fract)(1*INTERP_CONST_SCALE),(Fract)(0.02*INTERP_CONST_SCALE), freq);
01227   dpu_phase_init(&RxInst->phase_inst, vect_re, vect_im, phas_div, 2);
01228 }
01229
01230 /******************************************************************************
01231  * Subroutine:  V27 RX initialization subroutine of ST34
01232  ******************************************************************************
01233  * SUBROUTINE NAME: v29RxInit
01234  *
01235  * DESCRIPTION: Initialization routine for V.27 RX of ST34 (Jun)
01236  *
01237  * API:         Inst - DPU instance
01238  *              rate   - required rate
01239  *****************************************************************************/
01240 void v27RxSt34Init(dpuInst_t *Inst)
01241 {
01242   Fract       vect_re[2], vect_im[2];
01243   dpuRxInst_t *RxInst;
01244
01245   RxInst = &Inst->RxInst;         /* Store locally Rx instance address */
01246
01247   RxInst->rx_state = DPU_V27_RX_ST34;
01248   RxInst->rx_count = 0;
01249
01250   /* prepare rate dependent variables */
01251   if (RxInst->rx_rate == 4800)
01252   {
01253       vect_re[0] = (Fract)(0.9239*V27_CSCALE_48);     /* 1 */
01254       vect_im[0] = (Fract)(0.3827*V27_CSCALE_48);     /* 0 */
01255       vect_re[1] = (Fract)(-0.9239*V27_CSCALE_48);    /* -1 */
01256       vect_im[1] = (Fract)(-0.3827*V27_CSCALE_48);     /* 0 */
01257
01258       RxInst->phase_inst.division_table = dpu_slic_invmod_V27_48;
01259   }
01260   else
01261   {
01262       vect_re[0] = (Fract)(0.7071*V27_CSCALE_24);
01263       vect_im[0] = (Fract)(0.7071*V27_CSCALE_24);
01264       vect_re[1] = (Fract)(-0.7071*V27_CSCALE_24);
01265       vect_im[1] = (Fract)(-0.7071*V27_CSCALE_24);
01266
01267       RxInst->phase_inst.division_table = dpu_slic_invmod_V27_24;
01268   }
01269
01270   /* preserve timing phase estimation */
01271   RxInst->trec_inst.rot_real = frctLF2F(RxInst->trec_inst.rot_real_est, 29,25);
01272   RxInst->trec_inst.rot_imag = frctLF2F(RxInst->trec_inst.rot_imag_est, 29,25);
01273
01274   /* Enable timing recovery */
01275   RxInst->trec_inst.trec_enable = TRUE;
01276
01277   /* initialization for carrier loss detection for training */
01278   dpuHSrxSetCdParms(RxInst,1);
01279
01280   /* Initialize function pointers */
01281   RxInst->dotdet_fcn      = NULL;
01282   RxInst->err_phase_fcn   = dpu_err_pha_v27_trn;
01283   RxInst->crec_fcn        = dpu_crec;
01284   RxInst->update_adeq_fcn = dpu_update_adeq;
01285
01286   /* Receiver Initialization */
01287   dpu_adeq_init(&RxInst->adeq_inst,5 /* beta */,48 /* length */);
01288   dpu_phase_init(&RxInst->phase_inst, vect_re, vect_im, (Fract)(0.15915494*INVMOD_SCALE),/* phase div */
01289                               0 /* delay_num */);
01290 }
01291
01292 /******************************************************************************
01293  * Subroutine:  V27 RX initialization subroutine of ST4
01294  ******************************************************************************
01295  * SUBROUTINE NAME: v27RxInit
01296  *
01297  * DESCRIPTION: Initialization routine for V.27 RX of ST4 (TRN 1)
01298  *
01299  * API:         Inst - DPU instance
01300  *              rate   - required rate
01301  *****************************************************************************/
01302 void v27RxSt4Init(dpuInst_t *Inst)
01303 {
01304   dpuRxInst_t *RxInst;
01305
01306   RxInst = &Inst->RxInst;         /* Store locally Rx instance address */
01307   RxInst->rx_state = DPU_V27_RX_ST4;
01308   RxInst->rx_count = 0;
01309
01310   /* prepare rate dependent variables */
01311   RxInst->smap_inst.smap_table =
01312       (RxInst->rx_rate == 4800) ? dpu_dot_V27_48 : dpu_dot_V27_24;
01313
01314   /* Initialize function pointers */
01315   RxInst->err_phase_fcn = dpu_err_pha_trn_1;
01316   RxInst->descr_fcn     = dpu_descr_v27;
01317   RxInst->scr_fcn       = dpu_scr_v27;      /* Scrambler function */
01318   RxInst->smap_fcn      = dpu_v27_St3_smap; /* Symbol Mapper function */
01319
01320   /* Receiver Initialization */
01321   dpu_descr_init(&RxInst->descr_inst,
01322                  3,
01323                  V27_SCR_INIT_PATTERN,
01324                  V27_TAP1,
01325                  V27_TAP2);
01326
01327   /* Initialize RX's tx  modules */
01328   dpu_scr_init(&RxInst->scr_inst,       /* Scrambler initialization */
01329                3,
01330                V27_SCR_INIT_PATTERN,
01331                V27_TAP1,
01332                V27_TAP2,
01333                NULL);
01334 }
01335
01336 /******************************************************************************
01337  * Subroutine:  V27 RX initialization subroutine of ST5
01338  ******************************************************************************
01339  * SUBROUTINE NAME: v27RxInit
01340  *
01341  * DESCRIPTION: Initialization routine for V.27 RX of ST5 (TRN 2)
01342  *
01343  * API:         Inst - DPU instance
01344  *              rate   - required rate
01345  *****************************************************************************/
01346 void v27RxSt5Init(dpuInst_t *Inst)
01347 {
01348   dpuRxInst_t *RxInst;
01349
01350   RxInst = &Inst->RxInst;         /* Store locally Rx instance address */
01351   RxInst->rx_state = DPU_V27_RX_ST5;
01352   RxInst->rx_count = 0;
01353
01354   RxInst->adeq_inst.beta = (Fract) 5;
01355 }
01356
01357 /******************************************************************************
01358  * Subroutine:  V29 RX initialization subroutine of ST6
01359  ******************************************************************************
01360  * SUBROUTINE NAME: v29RxInit
01361  *
01362  * DESCRIPTION: Initialization routine for V.29 RX of ST6 (TRN 3)
01363  *
01364  * API:         Inst - DPU instance
01365  *              rate   - required rate
01366  *****************************************************************************/
01367 void v27RxSt6Init(dpuInst_t *Inst)
01368 {
01369   dpuRxInst_t *RxInst;
01370
01371   RxInst = &Inst->RxInst;         /* Store locally Rx instance address */
01372   RxInst->rx_state = DPU_V27_RX_ST6;
01373   RxInst->rx_count = 0;
01374
01375   RxInst->adeq_inst.beta = (Fract) 6;
01376
01377   /* Narrow down carrier loop */
01378   RxInst->mod_inst.k1 = RxInst->mod_inst.k1 >>2;
01379   RxInst->mod_inst.k2 = RxInst->mod_inst.k2 >>2;
01380 }
01381
01382 /******************************************************************************
01383  * Subroutine:  V27 RX initialization subroutine of ST7
01384  ******************************************************************************
01385  * SUBROUTINE NAME: v27RxInit
01386  *
01387  * DESCRIPTION: Initialization routine for V.27 RX of ST7 (B1)
01388  *
01389  * API:         Inst - DPU instance
01390  *              rate   - required rate
01391  *****************************************************************************/
01392 void v27RxSt7Init(dpuInst_t *Inst)
01393 {
01394   Fract       *ddec_table;
01395   int         num_of_ddec_bits;
01396   dpuRxInst_t *RxInst;
01397
01398   RxInst = &Inst->RxInst;         /* Store locally Rx instance address */
01399
01400   RxInst->rx_state = DPU_V27_RX_ST7;
01401   RxInst->rx_count = 0;         /* since the first two C, D had been received */
01402   RxInst->adeq_inst.beta = (Fract) 8;
01403   RxInst->slic_inst.invmod_mask  = 0;
01404   RxInst->slic_fcn               = dpu_v27_v29_slicer;
01405
01406   /* prepare rate dependent variables */
01407   if (RxInst->rx_rate == 4800)
01408   {
01409       ddec_table                     = Inst->TablePtr->v29TablePtrs->dpu_ddec_V29_9600_pt;
01410       num_of_ddec_bits               = 3;
01411       RxInst->slic_inst.decis_table  = Inst->TablePtr->v27TablePtrs->dpu_slic_pt_V27_48_pt;
01412       RxInst->slic_inst.bits_table   = Inst->TablePtr->v27TablePtrs->dpu_slic_bits_V27_48_pt;
01413       RxInst->slic_inst.invmod_table = dpu_slic_invmod_V27_48;
01414
01415       /* Offset has been collected by now, Allow 5 Hz variation in carrier frequency */
01416       RxInst->mod_inst.max_error     = (Fract)(5.0/1600.0*FREQ_SCALE);
01417   }
01418   else
01419   {
01420       RxInst->descr_inst.num_of_bits = 2;
01421       ddec_table                     = Inst->TablePtr->v29TablePtrs->dpu_ddec_V29_4800_pt;
01422       num_of_ddec_bits               = 2;
01423       RxInst->slic_inst.decis_table  = Inst->TablePtr->v27TablePtrs->dpu_slic_pt_V27_24_pt;
01424       RxInst->slic_inst.bits_table   = dpu_slic_bits_V27_24;
01425       RxInst->slic_inst.invmod_table = dpu_slic_invmod_V27_24;
01426
01427       /* Offset has been collected by now, Allow 5 Hz variation in carrier frequency */
01428       RxInst->mod_inst.max_error     = (Fract)(5.0/1200.0*FREQ_SCALE);
01429   }
01430
01431   /* Initialize function pointers */
01432   RxInst->ddec_fcn = dpu_ddec_v29;
01433   RxInst->scr_fcn  = NULL;           /* Scrambler function */
01434   RxInst->smap_fcn = NULL;           /* Symbol Mapper function */
01435
01436   /* Receiver Initialization */
01437   dpu_slic_init(&RxInst->slic_inst);
01438   dpu_ddec_init(&RxInst->ddec_inst,
01439                 num_of_ddec_bits,
01440                 ddec_table,0);
01441
01442   /* Narrow down carrier loop */
01443   RxInst->mod_inst.k1 = RxInst->mod_inst.k1 >>1;
01444   RxInst->mod_inst.k2 = RxInst->mod_inst.k2 >>1;
01445 }
01446
01447 /******************************************************************************
01448  * Subroutine:  V27 RX initialization subroutine of ST8
01449  ******************************************************************************
01450  * SUBROUTINE NAME: v27RxInit
01451  *
01452  * DESCRIPTION: Initialization routine for V.27 RX of ST8 (DATA)
01453  *
01454  * API:         Inst - DPU instance
01455  *              rate   - required rate
01456  *****************************************************************************/
01457 void v27RxSt8Init(dpuInst_t *Inst)
01458 {
01459   dpuRxInst_t *RxInst;
01460
01461   RxInst = &Inst->RxInst;         /* Store locally Rx instance address */
01462   RxInst->rx_state = DPU_V27_RX_ST8;
01463   RxInst->rx_count = 0;
01464
01465   /* initialization for carrier loss detection */
01466   dpuHSrxSetCdParms(RxInst,0);
01467 /*  RxInst->mod_inst.k1 = (Fract)(0.079*1*INTERP_CONST_SCALE),   / 0.079 */
01468 /*  RxInst->mod_inst.k2 = (Fract)(0.00202*0.5*INTERP_CONST_SCALE);  / 0.00202 */
01469
01470   /* Initialize function pointers */
01471   RxInst->err_phase_fcn = NULL;
01472   RxInst->data_fcn      = dpu_rx_packet; /* RX output data manipulation function */
01473   RxInst->copy_fcn      = dpu_rx_copy;   /* RX output copy function */
01474
01475   /* Receiver Initialization */
01476    dpu_cd_det_init (&RxInst->cddet_inst, 0, 0);
01477 }
01478
01479 /******************************************************************************
01480  * FUNCTION PURPOSE: Initialize V21 RX instance.
01481  ******************************************************************************
01482  * DESCRIPTION:  Initialize V21 RX instance.
01483  *               NOTE assume the rx sample rate is 9600 bps
01484  *****************************************************************************/
01485 void dpu_rx_v21_init(dpuInst_t *inst, int frame, int rate)
01486 {
01487
01488   /* initialize baud rate,segment size, rates etc */
01489   dpu_rx_common_init (inst,300,frame,rate);
01490
01491   /* initialize bits per baud since the common function has incorrect value */
01492   inst->RxInst.samp_per_baud = 9600/300;
01493
01494   /* call the V21 default state initialization */
01495   v21RxStNULLInit(inst);
01496
01497 #ifdef DPU_DBG
01498
01499        dpu_dbg_insert_state_and_ctrl(DPU_ST_V21_RX + DPU_V21_RX_STNULL, inst);
01500
01501 #endif
01502
01503   /* Initialize processing function pointer */
01504   inst->RxInst.procfn = v21Rx;
01505   inst->RxInst.smfn   = v21RxStM;
01506   inst->RxInst.intrp_fcn  = dpu_interp;
01507   inst->RxInst.copy_fcn   = dpu_rx_copy;        /* copy output data  */
01508 }
01509
01510
01511
01512 /******************************************************************************
01513  * FUNCTION PURPOSE: dpu TX common init
01514  ******************************************************************************
01515  * DESCRIPTION:
01516  *
01517  *****************************************************************************/
01518 int compute_bts_per_baud (int rate,int baud)
01519 {
01520   int i = 0;
01521
01522   do {
01523     rate -= baud;
01524     i++;
01525   } while (rate > 0);
01526
01527   return (i);
01528 }
01529
01530
01531 /******************************************************************************
01532  * FUNCTION PURPOSE: dpu TX common init
01533  ******************************************************************************
01534  * DESCRIPTION:
01535  *
01536  *****************************************************************************/
01537 int compute_baud_per_seg (int baud,int frame)
01538 {
01539   int i,j,baud_per_seg;
01540
01541   i = j = baud_per_seg = 0;
01542
01543   /* compute bauds per 5ms */
01544   while ((i * 100) != baud)
01545     i++;
01546
01547   while (j < frame)
01548   {
01549     j += 10;
01550   baud_per_seg += i;
01551   }
01552
01553   return (baud_per_seg);
01554 }
01555
01556
01557
01558 /******************************************************************************
01559  * FUNCTION PURPOSE: dpu TX common init
01560  ******************************************************************************
01561  * DESCRIPTION:
01562  *
01563  *****************************************************************************/
01564 void dpu_rx_common_init (dpuInst_t *inst,int baud, int frame, int rate)
01565 {
01566   dpuRxInst_t *rxInst = &inst->RxInst;
01567
01568   /* initialize rates */
01569   rxInst->rx_rate       = rate;
01570   rxInst->bts_per_baud  = compute_bts_per_baud(rate,baud);
01571   rxInst->rx_baud       = baud;
01572   rxInst->samp_per_seg  = frame * 8;
01573   rxInst->baud_per_seg  = compute_baud_per_seg(baud,frame);
01574
01575   /* initialize mode */
01576   rxInst->rx_mode = inst->cfg.protocol;
01577
01578 }
01579
01580
01581
01582
01583 /******************************************************************************
01584  * FUNCTION PURPOSE:  Initialize parameters for 2400 receive baud
01585  ******************************************************************************
01586  * DESCRIPTION:
01587  *
01588  *****************************************************************************/
01589 void dpuRx2400BaudInit(dpuInst_t *inst, int frame, int rate)
01590 {
01591   /* initialize baud rate, segment size etc. */
01592   dpu_rx_common_init (inst,2400,frame,rate);
01593
01594   inst->RxInst.samp_per_baud = 9600/2400;
01595 }
01596
01597 /******************************************************************************
01598  * FUNCTION PURPOSE: Initialize V29 RX instance.
01599  ******************************************************************************
01600  * DESCRIPTION:  Initialize V29 RX instance.
01601  *               NOTE assume the rx sample rate is 9600 bps
01602  *****************************************************************************/
01603 void dpu_rx_v29_init(dpuInst_t *inst, int frame, int rate)
01604 {
01605   dpuRx2400BaudInit(inst, frame, rate);
01606
01607   /* call the V29 default state initialization */
01608   v29RxSt1Init(inst);
01609
01610 #ifdef DPU_DBG
01611
01612        dpu_dbg_insert_state_and_ctrl(DPU_ST_V29_RX + DPU_V29_RX_ST1, inst);
01613
01614 #endif
01615 }
01616
01617 /******************************************************************************
01618  * FUNCTION PURPOSE: Initialize V21 RX instance.
01619  ******************************************************************************
01620  * DESCRIPTION:  Initialize V21 RX instance.
01621  *   NOTE assume the rx sample rate is 9600/7200 bps for 4800/1200 V21
01622  *****************************************************************************/
01623 void dpu_rx_v27_init(dpuInst_t *inst, int frame, int rate)
01624 {
01625   int baud = (rate == 4800) ? 1600 : 1200;
01626
01627   if (rate == 4800)
01628   {
01629     baud = 1600;
01630   inst->RxInst.samp_per_baud = 9600/1600;
01631   }
01632   else
01633   {
01634     baud = 1200;
01635   inst->RxInst.samp_per_baud = 9600/1200;
01636   }
01637
01638   /* initialize Rx rate based parameters */
01639   dpu_rx_common_init (inst,baud,frame,rate);
01640
01641
01642   /* call the V21 default state initialization */
01643   v27RxSt1Init(inst);
01644 }
01645
01646
01647 /******************************************************************************
01648  * FUNCTION PURPOSE: Initialize Vxx TX instance.
01649  ******************************************************************************
01650  * DESCRIPTION:  Initialize Vxx TX instance.
01651  *****************************************************************************/
01652 void vxx_tx_init (dpuInst_t *inst)
01653 {
01654   dpuTxInst_t *txInst;
01655   dpu_shaping_bank_t *shape;
01656   Fract freq;
01657   const Fract *freq_table;
01658   int tx_interp_index;
01659
01660   txInst = &inst->TxInst;
01661   txInst->tx_count = 0;
01662   txInst->tx_rate = inst->cfg.rate;
01663   txInst->gain = (dpu_gain_cst[-inst->cfg.tx_level] >> 1);
01664   txInst->procfn     = vHSTx;
01665   txInst->smfn       = NULL;
01666   txInst->copy_fcn   = dpu_tx_copy;
01667   txInst->data_fcn   = NULL;
01668   txInst->scr_fcn    = NULL;
01669   txInst->denc_fcn   = NULL;
01670   txInst->cenc_fcn   = NULL;
01671   txInst->smap_fcn   = NULL;
01672   txInst->mod_fcn    = NULL;
01673   txInst->shap_fcn   = NULL;
01674   txInst->intrp_fcn   = dpu_interp;
01675   txInst->fsk_gen_fcn = NULL;
01676
01677   switch (inst->cfg.mode)
01678   {
01679     case DPU_MOD_V21:
01680     txInst->tx_baud = 300;
01681       txInst->samp_per_baud = 7200/300;
01682     txInst->smfn=v21TxStM;
01683       freq_table = dpu_v21_freq_h_table;
01684       txInst->data_fcn    = dpu_tx_extract;     /* input data  manipulation */
01685       txInst->fsk_gen_fcn = dpu_v21_fsk_gen;    /* FSK generator function   */
01686     tx_interp_index = DPU_INTP_72_80_INDEX;
01687       break;
01688
01689     case DPU_MOD_V27T:
01690       txInst->smfn   = v27TxStM;
01691     txInst->samp_per_baud = 6;
01692       txInst->shap_fcn = dpu_shaping;     /* Shaping filter function */
01693       txInst->mod_fcn  = dpu_un_modulate; /* Modulator function */
01694       txInst->tx_state  = DPU_V27_TX_ST0;
01695     if (txInst->tx_rate == 2400)
01696     {
01697         shape=inst->TablePtr->v27TablePtrs->shape_v27_24_pt;
01698         freq = (Fract)(0.49998*FREQ_SCALE);
01699       tx_interp_index = DPU_INTP_72_80_INDEX;
01700       txInst->tx_baud = 1200;
01701     }
01702     else
01703     {
01704         shape=inst->TablePtr->v27TablePtrs->shape_v27_48_pt;
01705         freq = (Fract)(0.125*FREQ_SCALE);
01706       tx_interp_index = DPU_INTP_96_80_INDEX;
01707       txInst->tx_baud = 1600;
01708     }
01709       break;
01710
01711     case DPU_MOD_V29:
01712       shape=inst->TablePtr->v29TablePtrs->shape_v29_pt;
01713       freq = (Fract)(-0.58333333*32768 /* crec const scale */);
01714       txInst->tx_state = DPU_V29_TX_ST0;
01715       txInst->shap_fcn  = dpu_shaping;      /* Shaping filter function */
01716     tx_interp_index = DPU_INTP_72_80_INDEX;
01717     txInst->samp_per_baud = 7200/2400;
01718     txInst->tx_baud = 2400;
01719       txInst->smfn   = v29TxStM;
01720       break;
01721 #ifdef V17
01722     case DPU_MOD_V33:
01723     case DPU_MOD_V17:
01724       shape=inst->TablePtr->v17TablePtrs->shape_v17_pt;
01725     freq = (Fract)(-0.25*65536);
01726     txInst->shap_fcn  = dpu_shaping;      /* Shaping filter function */
01727     tx_interp_index = DPU_INTP_72_80_INDEX;
01728     txInst->samp_per_baud = 7200/2400;
01729     txInst->tx_baud = 2400;
01730       txInst->tx_state = DPU_V17_TX_ST0;
01731       txInst->gain = frctLF2F(frctMul(dpu_gain_cst[-inst->cfg.tx_level],14,
01732                                   (Fract)(1.9294*INTERP_CONST_SCALE),14,28),28,14);
01733       txInst->mod_fcn   = dpu_un_modulate_v17;   /* Modulator function */
01734     txInst->smfn = v17TxStM;
01735       break;
01736 #endif
01737     default:
01738       break;
01739   }  /* switch inst->cfg.mode */
01740
01741   /* initialize common rate and baud based variables */
01742   txInst->tx_rate       = inst->cfg.rate;
01743   txInst->bts_per_baud  = compute_bts_per_baud (inst->cfg.rate,txInst->tx_baud);
01744   txInst->samp_per_seg  = inst->cfg.frame * 8;
01745   txInst->baud_per_seg  = compute_baud_per_seg (txInst->tx_baud,inst->cfg.frame);
01746
01747   dpu_interp_init(&txInst->interp_inst,tx_interp_index);
01748   dpu_mod_init (&txInst->mod_inst,freq);
01749   dpu_tx_shaping_init(&txInst->shap_inst,txInst->samp_per_baud,shape);
01750   dpu_inman_init(&txInst->inman_inst,txInst->data_in_buf,DPU_IN_WORD_SIZE);
01751   dpu_fsk_gen_init(&txInst->fsk_gen_inst,freq_table,V21_TX_ST_INIT_MASK);
01752 }
01753
01754 /* Nothing after this point */
01755


FM: vxxinit.h File Reference

vxxinit.h File Reference

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

Include dependency graph for vxxinit.h:

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

Go to the source code of this file.

Defines

#define | V21_TX_ST_INIT_MASK 0x01

Functions

void | dpu_rx_v21_init (dpuInst_t *inst, int frame, int rate)
void | dpu_rx_v29_init (dpuInst_t *inst, int frame, int rate)
void | dpu_rx_v27_init (dpuInst_t *inst, int frame, int rate)
void | vxx_tx_init (dpuInst_t *inst)
void | v21RxStNULLInit (dpuInst_t *Inst)
void | v21RxSt1Init (dpuInst_t *Inst)
void | v21RxSt3Init (dpuInst_t *Inst)
void | v29TxSt0Init (dpuInst_t *Inst)
void | v29TxSt1Init (dpuInst_t *Inst)
void | v29TxSt2Init (dpuInst_t *Inst)
void | v29TxSt3Init (dpuInst_t *Inst)
void | v29TxSt4Init (dpuInst_t *Inst)
void | v27TxStNULLInit (dpuInst_t *Inst)
void | v27TxSt0Init (dpuInst_t *Inst)
void | v27TxSt1Init (dpuInst_t *Inst)
void | v27TxSt2Init (dpuInst_t *Inst)
void | v27TxSt3Init (dpuInst_t *Inst)
void | v27TxSt4Init (dpuInst_t *Inst)
void | v27TxSt5Init (dpuInst_t *Inst)
void | v27TxSt7Init (dpuInst_t *Inst)
void | v29RxSt1Init (dpuInst_t *Inst)
void | v29RxSt2Init (dpuInst_t *Inst)
void | v29RxSt3Init (dpuInst_t *Inst)
void | v29RxSt34Init (dpuInst_t *Inst)
void | v29RxSt4Init (dpuInst_t *Inst)
void | v29RxSt5Init (dpuInst_t *Inst)
void | v29RxSt6Init (dpuInst_t *Inst)
void | v29RxSt7Init (dpuInst_t *Inst)
void | v29RxSt8Init (dpuInst_t *Inst)
void | v27RxSt1Init (dpuInst_t *Inst)
void | v27RxSt3Init (dpuInst_t *Inst)
void | v27RxSt34Init (dpuInst_t *Inst)
void | v27RxSt4Init (dpuInst_t *Inst)
void | v27RxSt5Init (dpuInst_t *Inst)
void | v27RxSt6Init (dpuInst_t *Inst)
void | v27RxSt7Init (dpuInst_t *Inst)
void | v27RxSt8Init (dpuInst_t *Inst)
void | v27RxSt2Init (dpuInst_t *Inst)
void | rxLSinitInHS (dpuInst_t *Inst)
void | HSrxCommonSt1Init (dpuInst_t *Inst, int adeqStepSize)
void | dpuRx2400BaudInit (dpuInst_t *inst, int frame, int rate)
void | dpuHSrxSetCdParms (dpuRxInst_t *RxInst, tuint isTraining)

Define Documentation

#define V21_TX_ST_INIT_MASK 0x01

Definition at line 46 of file vxxinit.h.

Referenced by vxx_tx_init().

Function Documentation

void dpu_rx_v21_init | ( | dpuInst_t * | inst,
 |  | int | frame,
 |  | int | rate
 | ) |  |

Definition at line 1485 of file vxxinit.c.

References dpuRxInst_t::copy_fcn, dpu_interp(), dpu_rx_common_init(), dpu_rx_copy(), DPU_ST_V21_RX, DPU_V21_RX_STNULL, dpuRxInst_t::intrp_fcn, dpuRxInst_t::procfn, dpuInst_s::RxInst, dpuRxInst_t::samp_per_baud, dpuRxInst_t::smfn, v21Rx(), v21RxStM(), and v21RxStNULLInit().

Referenced by dpuconfigRX().

Here is the call graph for this function:

void dpu_rx_v29_init | ( | dpuInst_t * | inst,
 |  | int | frame,
 |  | int | rate
 | ) |  |

Definition at line 1603 of file vxxinit.c.

References DPU_ST_V29_RX, DPU_V29_RX_ST1, dpuRx2400BaudInit(), and v29RxSt1Init().

Referenced by dpuconfigRX().

Here is the call graph for this function:

void dpu_rx_v27_init | ( | dpuInst_t * | inst,
 |  | int | frame,
 |  | int | rate
 | ) |  |

Definition at line 1623 of file vxxinit.c.

References dpu_rx_common_init(), dpuInst_s::RxInst, dpuRxInst_t::samp_per_baud, and v27RxSt1Init().

Referenced by dpuconfigRX().

Here is the call graph for this function:

void vxx_tx_init ( dpuInst_t * inst )

Definition at line 1652 of file vxxinit.c.

References dpuTxInst_t::baud_per_seg, dpuTxInst_t::bts_per_baud, dpuTxInst_t::cenc_fcn, dpuInst_s::cfg, compute_baud_per_seg(), compute_bts_per_baud(), dpuTxInst_t::copy_fcn, dpuTxInst_t::data_fcn, dpuTxInst_t::data_in_buf, dpuTxInst_t::denc_fcn, dpu_fsk_gen_init(), dpu_gain_cst, DPU_IN_WORD_SIZE, dpu_inman_init(), dpu_interp(), dpu_interp_init(), DPU_INTP_72_80_INDEX, DPU_INTP_96_80_INDEX, dpu_mod_init(), DPU_MOD_V17, DPU_MOD_V21, DPU_MOD_V27T, DPU_MOD_V29, DPU_MOD_V33, dpu_shaping(), dpu_tx_copy(), dpu_tx_extract(), dpu_tx_shaping_init(), dpu_un_modulate(), dpu_un_modulate_v17(), DPU_V17_TX_ST0, dpu_v21_freq_h_table, dpu_v21_fsk_gen(), DPU_V27_TX_ST0, DPU_V29_TX_ST0, dpuCfg_t::frame, FREQ_SCALE, dpuTxInst_t::fsk_gen_fcn, dpuTxInst_t::fsk_gen_inst, dpuTxInst_t::gain, dpuTxInst_t::inman_inst, INTERP_CONST_SCALE, dpuTxInst_t::interp_inst, dpuTxInst_t::intrp_fcn, dpuTxInst_t::mod_fcn, dpuTxInst_t::mod_inst, dpuCfg_t::mode, dpuTxInst_t::procfn, dpuCfg_t::rate, dpuTxInst_t::samp_per_baud, dpuTxInst_t::samp_per_seg, dpuTxInst_t::scr_fcn, dpuTxInst_t::shap_fcn, dpuTxInst_t::shap_inst, v17Table_sPtrs_t::shape_v17_pt, v27Table_sPtrs_t::shape_v27_24_pt, v27Table_sPtrs_t::shape_v27_48_pt, v29Table_sPtrs_t::shape_v29_pt, dpuTxInst_t::smap_fcn, dpuTxInst_t::smfn, dpuInst_s::TablePtr, dpuTxInst_t::tx_baud, dpuTxInst_t::tx_count, dpuCfg_t::tx_level, dpuTxInst_t::tx_rate, dpuTxInst_t::tx_state, dpuInst_s::TxInst, fmTablePtrs_t::v17TablePtrs, v17TxStM(), V21_TX_ST_INIT_MASK, v21TxStM(), fmTablePtrs_t::v27TablePtrs, v27TxStM(), fmTablePtrs_t::v29TablePtrs, v29TxStM(), and vHSTx().

Referenced by dpuConfig().

Here is the call graph for this function:

void v21RxStNULLInit ( dpuInst_t * Inst )

Definition at line 187 of file vxxinit.c.

References dpuRxInst_t::agc_fcn, dpuRxInst_t::agc_inst, dpu_cddet_t::alpha, dpuRxInst_t::bphilb_fcn, dpuRxInst_t::cddet_fcn, dpuRxInst_t::cddet_inst, dpuRxInst_t::change_det, dpu_cddet_t::count_false_req, dpu_cddet_t::count_true_req, dpuRxInst_t::data_fcn, dpuRxInst_t::data_out_buf, dpuRxInst_t::demod_fcn, dpu_cddet_t::division, dpu_agc_init(), dpu_cd_det_init(), dpu_cd_det_v21(), DPU_CD_FALSE, dpu_interp_init(), DPU_INTP_80_96_INDEX, DPU_OUT_WORD_SIZE, dpu_outman_init(), DPU_V21_RX_STNULL, FREQ_SCALE, INTERP_CONST_SCALE, dpuRxInst_t::interp_inst, dpuRxInst_t::outman_inst, Q15_SCALE, dpuRxInst_t::rx_count, dpuRxInst_t::rx_state, dpuInst_s::RxInst, dpuRxInst_t::samp_per_seg, and dpuRxInst_t::v21_fcn.

Referenced by dpu_rx_v21_init(), and v21RxStM().

Here is the call graph for this function:

void v21RxSt1Init ( dpuInst_t * Inst )

Definition at line 276 of file vxxinit.c.

References dpuRxInst_t::cddet_fcn, dpuRxInst_t::data_fcn, dpu_cd_det_v21(), dpu_v21_check(), DPU_V21_RX_ST1, dpuRxInst_t::rx_state, dpuInst_s::RxInst, dpuRxInst_t::v21_fcn, and v21RxCommonInit().

Referenced by v21RxStM().

Here is the call graph for this function:

void v21RxSt3Init ( dpuInst_t * Inst )

Definition at line 304 of file vxxinit.c.

References dpuRxInst_t::data_fcn, dpu_rx_packet(), dpu_v21_dec(), DPU_V21_RX_ST3, dpuRxInst_t::rx_count, dpuRxInst_t::rx_state, dpuInst_s::RxInst, and dpuRxInst_t::v21_fcn.

Referenced by v21RxStM().

Here is the call graph for this function:

void v29TxSt0Init ( dpuInst_t * Inst )

void v29TxSt1Init ( dpuInst_t * Inst )

Definition at line 327 of file vxxinit.c.

References dpu_dot(), dpu_dot_V29_72, dpu_dot_V29_96, dpu_mod_init(), dpu_smap_init(), dpu_tx_mod(), DPU_V29_TX_ST1, dpuTxInst_t::mod_fcn, dpuTxInst_t::mod_inst, dpuTxInst_t::smap_fcn, dpuTxInst_t::smap_inst, dpuTxInst_t::tx_count, dpuTxInst_t::tx_rate, dpuTxInst_t::tx_state, and dpuInst_s::TxInst.

Referenced by v29TxStM().

Here is the call graph for this function:

void v29TxSt2Init ( dpuInst_t * Inst )

Definition at line 360 of file vxxinit.c.

References dpu_PN_gen(), dpu_PN_table_v29_7200, dpu_PN_table_v29_9600, dpu_scr_init(), dpu_smap(), dpu_smap_init(), v29Table_sPtrs_t::dpu_smap_V29_72_pt, v29Table_sPtrs_t::dpu_smap_V29_96_pt, DPU_V29_TX_ST2, PN_GEN_INIT_PATTERN, PN_TAP1, PN_TAP2, dpuTxInst_t::scr_fcn, dpuTxInst_t::scr_inst, dpuTxInst_t::smap_fcn, dpuTxInst_t::smap_inst, dpuInst_s::TablePtr, dpuTxInst_t::tx_count, dpuTxInst_t::tx_rate, dpuTxInst_t::tx_state, dpuInst_s::TxInst, and fmTablePtrs_t::v29TablePtrs.

Referenced by v29TxStM().

Here is the call graph for this function:

void v29TxSt3Init ( dpuInst_t * Inst )

Definition at line 407 of file vxxinit.c.

References dpuTxInst_t::data_fcn, dpuTxInst_t::denc_fcn, dpuTxInst_t::denc_inst, dpu_denc_init(), dpu_denc_v29(), v29Table_sPtrs_t::dpu_denc_V29_9600_pt, dpu_gen_marks(), dpu_scr(), dpu_scr_init(), DPU_V29_TX_ST3, dpuTxInst_t::scr_fcn, dpuTxInst_t::scr_inst, dpuInst_s::TablePtr, dpuTxInst_t::tx_count, dpuTxInst_t::tx_rate, dpuTxInst_t::tx_state, dpuInst_s::TxInst, V29_TAP1, V29_TAP2, and fmTablePtrs_t::v29TablePtrs.

Referenced by v29TxStM().

Here is the call graph for this function:

void v29TxSt4Init ( dpuInst_t * Inst )

Definition at line 448 of file vxxinit.c.

References dpuTxInst_t::data_fcn, dpu_tx_extract(), DPU_V29_TX_ST4, dpuTxInst_t::tx_count, dpuTxInst_t::tx_state, and dpuInst_s::TxInst.

Referenced by v29TxStM().

Here is the call graph for this function:

void v27TxStNULLInit ( dpuInst_t * Inst )

void v27TxSt0Init ( dpuInst_t * Inst )

void v27TxSt1Init ( dpuInst_t * Inst )

Definition at line 472 of file vxxinit.c.

References DPU_V27_TX_ST1, dpuTxInst_t::mod_fcn, dpuTxInst_t::tx_count, dpuTxInst_t::tx_state, and dpuInst_s::TxInst.

Referenced by v27TxStM().

void v27TxSt2Init ( dpuInst_t * Inst )

Definition at line 494 of file vxxinit.c.

References dpu_dot(), dpu_dot_V27, dpu_smap_init(), dpu_tx_mod(), DPU_V27_TX_ST2, dpuTxInst_t::mod_fcn, dpuTxInst_t::smap_fcn, dpuTxInst_t::smap_inst, dpuTxInst_t::tx_count, dpuTxInst_t::tx_state, and dpuInst_s::TxInst.

Referenced by v27TxStM().

Here is the call graph for this function:

void v27TxSt3Init ( dpuInst_t * Inst )

Definition at line 521 of file vxxinit.c.

References dpuTxInst_t::data_fcn, dpu_gen_marks(), dpu_scr_init(), dpu_scr_v27(), dpu_v27_St3_smap(), DPU_V27_TX_ST3, dpuTxInst_t::scr_fcn, dpuTxInst_t::scr_inst, dpuTxInst_t::smap_fcn, dpuTxInst_t::tx_count, dpuTxInst_t::tx_state, dpuInst_s::TxInst, V27_SCR_INIT_PATTERN, V27_TAP1, and V27_TAP2.

Referenced by v27TxStM().

Here is the call graph for this function:

void v27TxSt4Init ( dpuInst_t * Inst )

Definition at line 554 of file vxxinit.c.

References dpuTxInst_t::denc_fcn, dpuTxInst_t::denc_inst, dpu_denc_init(), dpu_denc_v29(), v29Table_sPtrs_t::dpu_denc_V29_4800_pt, v29Table_sPtrs_t::dpu_denc_V29_9600_pt, dpu_scr_init(), dpu_smap(), dpu_smap_init(), v27Table_sPtrs_t::dpu_smap_V27_24_pt, v27Table_sPtrs_t::dpu_smap_V27_48_pt, DPU_V27_TX_ST4, dpu_scr_t::scr_delay, dpuTxInst_t::scr_inst, dpuTxInst_t::smap_fcn, dpuTxInst_t::smap_inst, dpuInst_s::TablePtr, dpuTxInst_t::tx_count, dpuTxInst_t::tx_rate, dpuTxInst_t::tx_state, dpuInst_s::TxInst, V27_TAP1, V27_TAP2, fmTablePtrs_t::v27TablePtrs, and fmTablePtrs_t::v29TablePtrs.

Referenced by v27TxStM().

Here is the call graph for this function:

void v27TxSt5Init ( dpuInst_t * Inst )

Definition at line 611 of file vxxinit.c.

References dpuTxInst_t::data_fcn, dpu_tx_extract(), DPU_V27_TX_ST5, dpuTxInst_t::tx_count, dpuTxInst_t::tx_state, and dpuInst_s::TxInst.

Referenced by v27TxStM().

Here is the call graph for this function:

void v27TxSt7Init ( dpuInst_t * Inst )

void v29RxSt1Init ( dpuInst_t * Inst )

Definition at line 679 of file vxxinit.c.

References v29Table_sPtrs_t::bp_hilb_v29_pt, v29Table_sPtrs_t::bp_rx_v29_pt, dpuRxInst_t::bphilb_inst, division_table, dpu_dotdet_t::dot_cnt_thr, dpuRxInst_t::dotdet_inst, dpu_bp_hilb_init(), dpu_dot_det_init(), dpu_interp_init(), DPU_INTP_80_96_INDEX, DPU_TREC_COEF_SCALE, dpu_trec_init(), DPU_TREC_LEN, DPU_V29_RX_ST1, dpu_dotdet_t::factor, HSrxCommonSt1Init(), INTERP_CONST_SCALE, dpuRxInst_t::interp_inst, dpuRxInst_t::rx_state, dpuInst_s::RxInst, dpuRxInst_t::samp_per_baud, dpuRxInst_t::smfn, dpuInst_s::TablePtr, dpu_dotdet_t::tepCoefs, V29_TREC_INDEX, v29RxStM(), and fmTablePtrs_t::v29TablePtrs.

Referenced by dpu_rx_v29_init(), and v29RxStM().

Here is the call graph for this function:

void v29RxSt2Init ( dpuInst_t * Inst )

Definition at line 752 of file vxxinit.c.

References DPU_V29_RX_ST2, dpuRxInst_t::rx_state, dpuInst_s::RxInst, rxLSinitInHS(), dpuRxInst_t::smfn, and v29RxStM().

Referenced by v29RxStM().

Here is the call graph for this function:

void v29RxSt3Init ( dpuInst_t * Inst )

Definition at line 771 of file vxxinit.c.

References dpuRxInst_t::adeq_fcn, dpuRxInst_t::change_det, dpuRxInst_t::crec_fcn, dpuRxInst_t::demod_fcn, dpuRxInst_t::dotdet_fcn, dpu_adeq(), dpu_crec_init(), dpu_no_crec(), dpu_pc_det(), DPU_PC_FALSE, dpu_phase_init(), dpu_rx_demod(), dpu_trec_interp(), DPU_V29_RX_ST3, FREQ_SCALE, INTERP_CONST_SCALE, dpu_crec_t::max_error, dpuRxInst_t::mod_inst, dpuRxInst_t::phase_inst, dpu_trec_t::rot_imag_est, dpu_trec_t::rot_real_est, dpuRxInst_t::rx_count, dpuRxInst_t::rx_rate, dpuRxInst_t::rx_state, dpuInst_s::RxInst, dpuRxInst_t::samp_per_baud, dpu_crec_t::scale, dpuRxInst_t::trec_fcn, dpuRxInst_t::trec_inst, V29_CSCALE_72, and V29_CSCALE_96.

Referenced by v29RxStM().

Here is the call graph for this function:

void v29RxSt34Init ( dpuInst_t * Inst )

Definition at line 834 of file vxxinit.c.

References dpuRxInst_t::adeq_inst, dpuRxInst_t::crec_fcn, dpu_phase_t::division_table, dpuRxInst_t::dotdet_fcn, dpu_adeq_init(), dpu_crec(), dpu_err_pha_v29_72(), dpu_err_pha_v29_96(), dpu_phase_init(), dpu_slic_invmod_V29_72, v29Table_sPtrs_t::dpu_slic_invmod_V29_96_pt, dpu_update_adeq(), DPU_V29_RX_ST34, dpuHSrxSetCdParms(), dpuRxInst_t::err_phase_fcn, fmHSrxSetCdParms(), dpuRxInst_t::phase_inst, dpu_trec_t::rot_imag, dpu_trec_t::rot_imag_est, dpu_trec_t::rot_real, dpu_trec_t::rot_real_est, dpuRxInst_t::rx_count, dpuRxInst_t::rx_rate, dpuRxInst_t::rx_state, dpuInst_s::RxInst, dpuInst_s::TablePtr, dpu_trec_t::trec_enable, dpuRxInst_t::trec_inst, dpuRxInst_t::update_adeq_fcn, V29_CSCALE_72, V29_CSCALE_96, and fmTablePtrs_t::v29TablePtrs.

Referenced by v29RxStM().

Here is the call graph for this function:

void v29RxSt4Init ( dpuInst_t * Inst )

Definition at line 898 of file vxxinit.c.

References dpu_err_pha_v29_72_1(), dpu_err_pha_v29_96_1(), dpu_PN_gen(), dpu_PN_table_v29_7200, dpu_PN_table_v29_9600, dpu_scr_init(), dpu_smap(), dpu_smap_init(), v29Table_sPtrs_t::dpu_smap_V29_72_pt, v29Table_sPtrs_t::dpu_smap_V29_96_pt, DPU_V29_RX_ST4, dpuRxInst_t::err_phase_fcn, PN_GEN_INIT_PATTERN, PN_TAP1, PN_TAP2, dpuRxInst_t::rx_count, dpuRxInst_t::rx_rate, dpuRxInst_t::rx_state, dpuInst_s::RxInst, dpuRxInst_t::scr_fcn, dpuRxInst_t::scr_inst, dpuRxInst_t::smap_fcn, dpuRxInst_t::smap_inst, dpuInst_s::TablePtr, and fmTablePtrs_t::v29TablePtrs.

Referenced by v29RxStM().

Here is the call graph for this function:

void v29RxSt5Init ( dpuInst_t * Inst )

Definition at line 946 of file vxxinit.c.

References dpuRxInst_t::adeq_inst, dpu_adeq_t::beta, DPU_V29_RX_ST5, dpuRxInst_t::rx_count, dpuRxInst_t::rx_state, and dpuInst_s::RxInst.

Referenced by v29RxStM().

void v29RxSt6Init ( dpuInst_t * Inst )

Definition at line 967 of file vxxinit.c.

References dpuRxInst_t::adeq_inst, dpu_adeq_t::beta, DPU_V29_RX_ST6, dpu_crec_t::k1, dpu_crec_t::k2, dpuRxInst_t::mod_inst, dpuRxInst_t::rx_count, dpuRxInst_t::rx_rate, dpuRxInst_t::rx_state, and dpuInst_s::RxInst.

Referenced by v29RxStM().

void v29RxSt7Init ( dpuInst_t * Inst )

Definition at line 990 of file vxxinit.c.

References dpuRxInst_t::adeq_inst, dpu_adeq_t::beta, dpu_slic_t::bits_table, dpuRxInst_t::ddec_fcn, dpuRxInst_t::ddec_inst, dpu_slic_t::decis_table, dpuRxInst_t::descr_fcn, dpuRxInst_t::descr_inst, dpu_ddec_init(), dpu_ddec_v29(), v29Table_sPtrs_t::dpu_ddec_V29_9600_pt, dpu_descr(), dpu_descr_init(), v29Table_sPtrs_t::dpu_slic_bits_V29_72_pt, v29Table_sPtrs_t::dpu_slic_bits_V29_96_pt, dpu_slic_init(), dpu_slic_invmod_V29_72, v29Table_sPtrs_t::dpu_slic_invmod_V29_96_pt, v29Table_sPtrs_t::dpu_slic_pt_V29_72_pt, v29Table_sPtrs_t::dpu_slic_pt_V29_96_pt, dpu_v27_v29_slicer(), DPU_V29_RX_ST7, dpuRxInst_t::err_phase_fcn, FREQ_SCALE, dpu_slic_t::invmod_mask, dpu_slic_t::invmod_table, dpu_crec_t::max_error, dpuRxInst_t::mod_inst, dpuRxInst_t::rx_count, dpuRxInst_t::rx_rate, dpuRxInst_t::rx_state, dpuInst_s::RxInst, dpuRxInst_t::scr_fcn, dpuRxInst_t::slic_fcn, dpuRxInst_t::slic_inst, dpuRxInst_t::smap_fcn, dpuInst_s::TablePtr, V29_TAP1, V29_TAP2, and fmTablePtrs_t::v29TablePtrs.

Referenced by v29RxStM().

Here is the call graph for this function:

void v29RxSt8Init ( dpuInst_t * Inst )

Definition at line 1051 of file vxxinit.c.

References dpuRxInst_t::cddet_inst, dpuRxInst_t::copy_fcn, dpuRxInst_t::data_fcn, dpu_cd_det_init(), dpu_rx_copy(), dpu_rx_packet(), DPU_V29_RX_ST8, dpuHSrxSetCdParms(), dpu_crec_t::k1, dpu_crec_t::k2, dpuRxInst_t::mod_inst, dpuRxInst_t::rx_count, dpuRxInst_t::rx_state, and dpuInst_s::RxInst.

Referenced by v29RxStM().

Here is the call graph for this function:

void v27RxSt1Init ( dpuInst_t * Inst )

Definition at line 1085 of file vxxinit.c.

References v27Table_sPtrs_t::bp_hilb_v27_48_pt, v27Table_sPtrs_t::bp_rx_v27_48_pt, dpuRxInst_t::bphilb_inst, division_table, dpu_dotdet_t::dot_cnt_thr, dpu_dotdet_t::dotCoefs, dpuRxInst_t::dotdet_inst, dpu_bp_hilb_init(), dpu_dot_det_init(), dpu_interp_init(), DPU_INTP_80_96_INDEX, DPU_TREC_COEF_SCALE, dpu_trec_init(), DPU_TREC_LEN, DPU_V27_RX_ST1, dpu_dotdet_t::factor, HSrxCommonSt1Init(), INTERP_CONST_SCALE, dpuRxInst_t::interp_inst, dpuRxInst_t::rx_rate, dpuRxInst_t::rx_state, dpuInst_s::RxInst, dpuRxInst_t::samp_per_baud, dpuRxInst_t::smfn, dpuInst_s::TablePtr, dpu_dotdet_t::tepCoefs, V27_24_TREC_INDEX, V27_48_TREC_INDEX, dpu_dotdet_t::v27_flag, v27RxStM(), and fmTablePtrs_t::v27TablePtrs.

Referenced by dpu_rx_v27_init(), and v27RxStM().

Here is the call graph for this function:

void v27RxSt3Init ( dpuInst_t * Inst )

Definition at line 1171 of file vxxinit.c.

References dpuRxInst_t::adeq_fcn, dpuRxInst_t::change_det, dpuRxInst_t::crec_fcn, dpuRxInst_t::demod_fcn, dpuRxInst_t::dotdet_fcn, dpu_adeq(), dpu_crec_init(), dpu_no_crec(), dpu_pc_det(), DPU_PC_FALSE, dpu_phase_init(), dpu_rx_demod(), dpu_trec_interp(), DPU_V27_RX_ST3, FREQ_SCALE, INTERP_CONST_SCALE, INVMOD_SCALE, dpu_crec_t::max_error, dpuRxInst_t::mod_inst, dpuRxInst_t::phase_inst, dpu_trec_t::rot_imag_est, dpu_trec_t::rot_real_est, dpuRxInst_t::rx_count, dpuRxInst_t::rx_rate, dpuRxInst_t::rx_state, dpuInst_s::RxInst, dpu_crec_t::scale, dpuRxInst_t::trec_fcn, dpuRxInst_t::trec_inst, V27_CSCALE_24, and V27_CSCALE_48.

Referenced by v27RxStM().

Here is the call graph for this function:

void v27RxSt34Init ( dpuInst_t * Inst )

Definition at line 1240 of file vxxinit.c.

References dpuRxInst_t::adeq_inst, dpuRxInst_t::crec_fcn, dpu_phase_t::division_table, dpuRxInst_t::dotdet_fcn, dpu_adeq_init(), dpu_crec(), dpu_err_pha_v27_trn(), dpu_phase_init(), dpu_slic_invmod_V27_24, dpu_slic_invmod_V27_48, dpu_update_adeq(), DPU_V27_RX_ST34, dpuHSrxSetCdParms(), dpuRxInst_t::err_phase_fcn, INVMOD_SCALE, dpuRxInst_t::phase_inst, dpu_trec_t::rot_imag, dpu_trec_t::rot_imag_est, dpu_trec_t::rot_real, dpu_trec_t::rot_real_est, dpuRxInst_t::rx_count, dpuRxInst_t::rx_rate, dpuRxInst_t::rx_state, dpuInst_s::RxInst, dpu_trec_t::trec_enable, dpuRxInst_t::trec_inst, dpuRxInst_t::update_adeq_fcn, V27_CSCALE_24, and V27_CSCALE_48.

Referenced by v27RxStM().

Here is the call graph for this function:

void v27RxSt4Init ( dpuInst_t * Inst )

Definition at line 1302 of file vxxinit.c.

References dpuRxInst_t::descr_fcn, dpuRxInst_t::descr_inst, dpu_descr_init(), dpu_descr_v27(), dpu_dot_V27_24, dpu_dot_V27_48, dpu_err_pha_trn_1(), dpu_scr_init(), dpu_scr_v27(), DPU_V27_RX_ST4, dpu_v27_St3_smap(), dpuRxInst_t::err_phase_fcn, dpuRxInst_t::rx_count, dpuRxInst_t::rx_rate, dpuRxInst_t::rx_state, dpuInst_s::RxInst, dpuRxInst_t::scr_fcn, dpuRxInst_t::scr_inst, dpuRxInst_t::smap_fcn, dpuRxInst_t::smap_inst, dpu_smap_t::smap_table, V27_SCR_INIT_PATTERN, V27_TAP1, and V27_TAP2.

Referenced by v27RxStM().

Here is the call graph for this function:

void v27RxSt5Init ( dpuInst_t * Inst )

Definition at line 1346 of file vxxinit.c.

References dpuRxInst_t::adeq_inst, dpu_adeq_t::beta, DPU_V27_RX_ST5, dpuRxInst_t::rx_count, dpuRxInst_t::rx_state, and dpuInst_s::RxInst.

Referenced by v27RxStM().

void v27RxSt6Init ( dpuInst_t * Inst )

Definition at line 1367 of file vxxinit.c.

References dpuRxInst_t::adeq_inst, dpu_adeq_t::beta, DPU_V27_RX_ST6, dpu_crec_t::k1, dpu_crec_t::k2, dpuRxInst_t::mod_inst, dpuRxInst_t::rx_count, dpuRxInst_t::rx_state, and dpuInst_s::RxInst.

Referenced by v27RxStM().

void v27RxSt7Init ( dpuInst_t * Inst )

Definition at line 1392 of file vxxinit.c.

References dpuRxInst_t::adeq_inst, dpu_adeq_t::beta, dpu_slic_t::bits_table, dpuRxInst_t::ddec_fcn, dpuRxInst_t::ddec_inst, dpu_slic_t::decis_table, dpuRxInst_t::descr_inst, dpu_ddec_init(), dpu_ddec_v29(), v29Table_sPtrs_t::dpu_ddec_V29_4800_pt, v29Table_sPtrs_t::dpu_ddec_V29_9600_pt, dpu_slic_bits_V27_24, v27Table_sPtrs_t::dpu_slic_bits_V27_48_pt, dpu_slic_init(), dpu_slic_invmod_V27_24, dpu_slic_invmod_V27_48, v27Table_sPtrs_t::dpu_slic_pt_V27_24_pt, v27Table_sPtrs_t::dpu_slic_pt_V27_48_pt, DPU_V27_RX_ST7, dpu_v27_v29_slicer(), FREQ_SCALE, dpu_slic_t::invmod_mask, dpu_slic_t::invmod_table, dpu_crec_t::k1, dpu_crec_t::k2, dpu_crec_t::max_error, dpuRxInst_t::mod_inst, dpu_descr_t::num_of_bits, dpuRxInst_t::rx_count, dpuRxInst_t::rx_rate, dpuRxInst_t::rx_state, dpuInst_s::RxInst, dpuRxInst_t::scr_fcn, dpuRxInst_t::slic_fcn, dpuRxInst_t::slic_inst, dpuRxInst_t::smap_fcn, dpuInst_s::TablePtr, fmTablePtrs_t::v27TablePtrs, and fmTablePtrs_t::v29TablePtrs.

Referenced by v27RxStM().

Here is the call graph for this function:

void v27RxSt8Init ( dpuInst_t * Inst )

Definition at line 1457 of file vxxinit.c.

References dpuRxInst_t::cddet_inst, dpuRxInst_t::copy_fcn, dpuRxInst_t::data_fcn, dpu_cd_det_init(), dpu_rx_copy(), dpu_rx_packet(), DPU_V27_RX_ST8, dpuHSrxSetCdParms(), dpuRxInst_t::err_phase_fcn, dpuRxInst_t::rx_count, dpuRxInst_t::rx_state, and dpuInst_s::RxInst.

Referenced by v27RxStM().

Here is the call graph for this function:

void v27RxSt2Init ( dpuInst_t * Inst )

Definition at line 1151 of file vxxinit.c.

References DPU_V27_RX_ST2, dpuRxInst_t::rx_state, dpuInst_s::RxInst, rxLSinitInHS(), dpuRxInst_t::smfn, and v27RxStM().

Referenced by v27RxStM().

Here is the call graph for this function:

void rxLSinitInHS ( dpuInst_t * Inst )

Definition at line 722 of file vxxinit.c.

References dpuRxInst_t::cddet_fcn, dpuRxInst_t::change_det, dpuRxInst_t::copy_fcn, dpuRxInst_t::data_fcn, dpu_v21_check_high(), DPU_V21_FALSE, dpuRxInst_t::procfn, dpuInst_s::RxInst, dpuRxInst_t::v21_fcn, v21Rx(), and v21RxCommonInit().

Referenced by v27RxSt2Init(), and v29RxSt2Init().

Here is the call graph for this function:

void HSrxCommonSt1Init | ( | dpuInst_t * | Inst,
 |  | int | adeqStepSize
 | ) |  |

Definition at line 634 of file vxxinit.c.

References dpuRxInst_t::adeq_fcn, dpuRxInst_t::adeq_inst, dpuRxInst_t::agc_fcn, dpuRxInst_t::agc_inst, dpuRxInst_t::bphilb_fcn, dpuRxInst_t::cddet_fcn, dpuRxInst_t::cdec_fcn, dpuRxInst_t::change_det, dpuRxInst_t::copy_fcn, dpuRxInst_t::crec_fcn, dpuRxInst_t::data_fcn, dpuRxInst_t::data_out_buf, dpuRxInst_t::ddec_fcn, dpuRxInst_t::demod_fcn, dpuRxInst_t::descr_fcn, dpuRxInst_t::dotdet_fcn, dpu_adeq(), dpu_adeq_init(), dpu_agc(), dpu_agc_init(), dpu_bp_hilb(), dpu_dot_det(), dpu_interp(), DPU_OUT_WORD_SIZE, dpu_outman_init(), DPU_P2_FALSE, dpu_rx_copy(), dpu_trec_interp(), dpuRxInst_t::err_phase_fcn, dpuRxInst_t::intrp_fcn, dpuRxInst_t::outman_inst, dpuRxInst_t::procfn, dpuRxInst_t::rx_count, dpuInst_s::RxInst, dpuRxInst_t::scr_fcn, dpuRxInst_t::slic_fcn, dpuRxInst_t::smap_fcn, dpuRxInst_t::trec_fcn, dpuRxInst_t::update_adeq_fcn, and vHSRx().

Referenced by v27RxSt1Init(), and v29RxSt1Init().

Here is the call graph for this function:

void dpuRx2400BaudInit | ( | dpuInst_t * | inst,
 |  | int | frame,
 |  | int | rate
 | ) |  |

Definition at line 1589 of file vxxinit.c.

References dpu_rx_common_init(), dpuInst_s::RxInst, and dpuRxInst_t::samp_per_baud.

Referenced by dpu_rx_v29_init().

Here is the call graph for this function:

void dpuHSrxSetCdParms | ( | dpuRxInst_t * | RxInst,
 |  | tuint | isTraining
 | ) |  |

Definition at line 150 of file vxxinit.c.

References dpu_cddet_t::alpha, dpuRxInst_t::cddet_fcn, dpuRxInst_t::cddet_inst, dpu_cddet_t::count_false_req, dpu_cddet_t::division, dpu_cd_det_hs(), dpu_cd_det_hs_pwrlatch(), Q15_SCALE, dpuRxInst_t::samp_per_baud, and dpu_cddet_t::sig_pow.

Referenced by v27RxSt34Init(), v27RxSt8Init(), v29RxSt34Init(), and v29RxSt8Init().

Here is the call graph for this function:


FM: vxxinit.h Source File

vxxinit.h

Go to the documentation of this file.
00001 #ifndef _VXXINIT_H
00002 #define _VXXINIT_H
00003 /******************************************************************************
00004  * FILE PURPOSE: Header file for vxx Initialization Routines
00005  ******************************************************************************
00006  * FILE NAME:   vxxInit.h
00007  *
00008  * DESCRIPTION: This file contains API and definitions for vxxInit.c
00009  *
00010  * REQUIRES:    types.h   (generic DSP ECO types)
00011  *
00012  * TABS: NONE
00013  *
00014  * $Id: VXXINIT.H 1.10 1999/03/24 14:39:30 sakhtar Exp $
00015  *
00016  * REVISION HISTORY:
00017  *
00018  * $Log: VXXINIT.H $
00019  * Revision 1.10  1999/03/24 14:39:30  sakhtar
00020  * Added API of initialization function for vxx TX
00021  * Revision 1.9  1999/03/18 09:49:23  sakhtar
00022  * Added vxx_rx_init function definitions
00023  * Revision 1.8  1999/03/13 19:08:10  sakhtar
00024  * Modified to change the API of functions in vxxinit.c
00025  * Revision 1.7  1999/03/11 11:33:38  sakhtar
00026  * - Moved  a #define from vxxinit.c to vxxinit.h
00027  * - Removed dpu_tx_v21_init(), dpu_tx_v27_init(), dpu_tx_v29_init()
00028  *   functions since the data is initialized by DPU.C
00029  * Revision 1.5  1998/08/28 01:18:28  ppatel
00030  *  Some unused functions removed to save program memory
00031  * Revision 1.4  1998/05/12 17:49:08  ppatel
00032  *  Optimization of code-space by code reuse and removal of phase_fcn
00033  * from the instance (since it was not used in procrx.c)
00034  * Revision 1.3  1997/05/18 12:44:11  Zoran
00035  *   Cleaned, updated code
00036  * Revision 1.1  1997/02/06 10:25:05  unknown
00037  * Initial revision
00038  *
00039  * (C) Copyright 1996, TELOGY Networks, Inc.
00040  *****************************************************************************/
00041
00042 /* System level header files */
00043 #include <ti/mas/types/types.h>
00044 #include "dpuloc.h"
00045
00046 #define V21_TX_ST_INIT_MASK   0x01
00047
00048 /* Function prototypes */
00049 void dpu_rx_v21_init(dpuInst_t *inst, int frame, int rate);
00050 void dpu_rx_v29_init(dpuInst_t *inst, int frame, int rate);
00051 void dpu_rx_v27_init(dpuInst_t *inst, int frame, int rate);
00052 void vxx_tx_init (dpuInst_t *inst);
00053 void v21RxStNULLInit(dpuInst_t *Inst);
00054 void v21RxSt1Init(dpuInst_t *Inst);
00055 void v21RxSt3Init(dpuInst_t *Inst);
00056 void v29TxSt0Init(dpuInst_t *Inst);
00057 void v29TxSt1Init(dpuInst_t *Inst);
00058 void v29TxSt2Init(dpuInst_t *Inst);
00059 void v29TxSt3Init(dpuInst_t *Inst);
00060 void v29TxSt4Init(dpuInst_t *Inst);
00061 void v27TxStNULLInit(dpuInst_t *Inst);
00062 void v27TxSt0Init(dpuInst_t *Inst);
00063 void v27TxSt1Init(dpuInst_t *Inst);
00064 void v27TxSt2Init(dpuInst_t *Inst);
00065 void v27TxSt3Init(dpuInst_t *Inst);
00066 void v27TxSt4Init(dpuInst_t *Inst);
00067 void v27TxSt5Init(dpuInst_t *Inst);
00068 void v27TxSt7Init(dpuInst_t *Inst);
00069 void v29RxSt1Init(dpuInst_t *Inst);
00070 void v29RxSt2Init(dpuInst_t *Inst);
00071 void v29RxSt3Init(dpuInst_t *Inst);
00072 void v29RxSt34Init(dpuInst_t *Inst);
00073 void v29RxSt4Init(dpuInst_t *Inst);
00074 void v29RxSt5Init(dpuInst_t *Inst);
00075 void v29RxSt6Init(dpuInst_t *Inst);
00076 void v29RxSt7Init(dpuInst_t *Inst);
00077 void v29RxSt8Init(dpuInst_t *Inst);
00078 void v27RxSt1Init(dpuInst_t *Inst);
00079 void v27RxSt3Init(dpuInst_t *Inst);
00080 void v27RxSt34Init(dpuInst_t *Inst);
00081 void v27RxSt4Init(dpuInst_t *Inst);
00082 void v27RxSt5Init(dpuInst_t *Inst);
00083 void v27RxSt6Init(dpuInst_t *Inst);
00084 void v27RxSt7Init(dpuInst_t *Inst);
00085 void v27RxSt8Init(dpuInst_t *Inst);
00086 void v27RxSt2Init(dpuInst_t *Inst);
00087 void rxLSinitInHS(dpuInst_t *Inst);
00088 void HSrxCommonSt1Init(dpuInst_t *Inst, int adeqStepSize);
00089 void dpuRx2400BaudInit(dpuInst_t *inst, int frame, int rate);
00090 void dpuHSrxSetCdParms( dpuRxInst_t *RxInst, tuint isTraining );
00091 #endif  /* _VXXINIT_H */
00092 /* nothing past this point */


FM: vxxproc.c File Reference

vxxproc.c File Reference

#include <ti/mas/types/types.h>
#include <stdlib.h>
#include "dpuloc.h"
#include "fmprag.h"

Include dependency graph for vxxproc.c:

Go to the source code of this file.

Defines

#define | V21_TEST 0

Functions

void | vHSTx (void *Inst, Fract *x_ideal, Fract *y_ideal, Fract *output, int index)
void | v21Rx (void *Inst, Fract *input, Fract *x_sym, Fract *y_sym, int index, tword *output_data)

Variables

int | ERROR_BTS = 0
int | PROC2_INDEX = 0

Define Documentation

#define V21_TEST 0

Definition at line 136 of file vxxproc.c.

Function Documentation

void vHSTx | ( | void * | Inst,
 |  | Fract * | x_ideal,
 |  | Fract * | y_ideal,
 |  | Fract * | output,
 |  | int | index
 | ) |  |

Definition at line 68 of file vxxproc.c.

References dpuTxInst_t::bts_per_baud, dpuTxInst_t::cenc_fcn, dpuTxInst_t::cenc_inst, dpuTxInst_t::data_fcn, dpuTxInst_t::data_in_buf, dpuTxInst_t::denc_fcn, dpuTxInst_t::denc_inst, dpuTxInst_t::fsk_gen_fcn, dpuTxInst_t::fsk_gen_inst, dpuTxInst_t::inman_inst, dpuTxInst_t::mod_fcn, dpuTxInst_t::mod_inst, dpuTxInst_t::samp_per_baud, dpuTxInst_t::scr_fcn, dpuTxInst_t::scr_inst, dpuTxInst_t::smap_fcn, dpuTxInst_t::smap_inst, dpuTxInst_t::tx_count, and dpuInst_s::TxInst.

Referenced by vxx_tx_init().

void v21Rx | ( | void * | Inst,
 |  | Fract * | input,
 |  | Fract * | x_sym,
 |  | Fract * | y_sym,
 |  | int | index,
 |  | tword * | output_data
 | ) |  |

Definition at line 146 of file vxxproc.c.

References dpuRxInst_t::agc_fcn, dpuRxInst_t::agc_inst, dpuRxInst_t::bphilb_fcn, dpuRxInst_t::bphilb_inst, dpuRxInst_t::cddet_fcn, dpuRxInst_t::cddet_inst, dpuRxInst_t::change_det, dpuRxInst_t::demod_fcn, DPU_CD_FALSE, DPU_TEP_TRUE, dpu_agc_t::gain, dpuRxInst_t::mod_inst, fmSigQStats_t::rx_level, dpuInst_s::RxInst, dpuRxInst_t::samp_per_baud, and dpuInst_s::sts.

Referenced by dpu_rx_v21_init(), and rxLSinitInHS().

Variable Documentation

int ERROR_BTS = 0

Definition at line 56 of file vxxproc.c.

int PROC2_INDEX = 0

Definition at line 57 of file vxxproc.c.


FM: vxxproc.c Source File

vxxproc.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: Main processing routines for different modulation modes
00003  ******************************************************************************
00004  * FILE NAME:   vxxProc.c
00005  *
00006  * DESCRIPTION: Processing routines for different modulation modes
00007  *
00008  * REQUIRES:    types.h (generic data types)
00009  *
00010  * TABS: NONE
00011  *
00012  * $Id: VXXPROC.C 1.19 2004/07/01 1:02:24 aravindbr Exp $
00013  *
00014  * REVISION HISTORY:
00015  *
00016  * $Log: VXXPROC.C $
00017  * Revision 1.19  2004/07/01 1:02:24  aravindbr
00018  * Fixed DCN non detection problem when one hdlc flag follows DCN.
00019  * Revision 1.18  2000/03/21 21:32:12  jwright
00020  * Clean up 3.50 compile warnings.
00021  * Revision 1.17  1999/03/20 17:15:04  sakhtar
00022  * Modified to use vHSTx for V.21 Tx. We removed v21Tx function
00023  * Revision 1.16  1999/03/15 10:52:07  sakhtar
00024  * Revert to Version 1.12 and changed API of data_fcn
00025  * Revision 1.12  1999/03/01 19:07:15  sakhtar
00026  * Modified the API of procrx(), copy_fcn(), and data_fcn() to oombine
00027  * the functionality of dpu_rx_copy() into dpu_rx_packet()
00028  * Revision 1.11  1999/02/24 17:17:23  sakhtar
00029  * Revert to earlier version since the change made was causing a
00030  * problem in V.21
00031  * Revision 1.9  1997/11/21 15:42:24  PPATEL
00032  *  Receiver routine moved to procrx.c for multi-channel build for GG 3.0
00033  * Revision 1.8  1997/10/28 23:00:29  PPATEL
00034  *  Merged latest version with changes made from old offshoot for v17
00035  * development
00036  * Revision 1.7  1997/09/13 19:45:48  PPATEL
00037  *  vHSTx has convolutional encoder function call
00038  * Revision 1.6  1997/09/05 20:54:57  PPATEL
00039  *    Inclusion of types.h
00040  * Revision 1.5  1997/05/25 16:27:24  Zoran
00041  *   Added call to quality estimation function
00042  * Revision 1.4  1997/05/18 12:15:54  Zoran
00043  *   Cleaned, updated, tuned up version
00044  * Revision 1.2  1997/02/19 22:20:33  H.T.Li
00045  *
00046  * (C) Copyright 1996, TELOGY Networks, Inc.
00047  *****************************************************************************/
00048
00049 #include <ti/mas/types/types.h>
00050 #include <stdlib.h>
00051 #include "dpuloc.h"
00052 #include "fmprag.h"
00053
00054
00055 /* Test variables */
00056 int ERROR_BTS=0;
00057 int PROC2_INDEX=0;
00058 /******************************************************************************
00059  * Subroutine:  V.xx High Speed TX Routine (used for V.27, V.29)
00060  ******************************************************************************
00061  * SUBROUTINE NAME: vHSTx
00062  *
00063  * DESCRIPTION: Processing routine for V.HS TX Mode
00064  *
00065  * API:         TxInst - transmit instance
00066  *****************************************************************************/
00067
00068 void vHSTx(void *Inst, Fract *x_ideal, Fract *y_ideal, Fract *output, int index)
00069 {
00070   dpuTxInst_t *TxInst;     /* TX Instance pointer */
00071   Fract input_bits;          /* To store locally input bits */
00072   Fract x_point;           /* To store locally const. point */
00073   Fract y_point;
00074
00075   dpuInst_t *Instl = Inst;  /* cast locally dpu Instance pointer */
00076
00077   TxInst = &Instl->TxInst;  /* Store locally TX instance pointer */
00078
00079   x_point = 0;
00080   y_point = 0;
00081
00082   /* input manipulation function */
00083   if (TxInst->data_fcn != NULL)
00084      (*TxInst->data_fcn) (&TxInst->inman_inst, &input_bits, TxInst->data_in_buf,
00085                           TxInst->bts_per_baud);
00086
00087   /* Scrambler function */
00088   if (TxInst->scr_fcn != NULL)
00089      (*TxInst->scr_fcn) (&TxInst->scr_inst, &input_bits);
00090
00091   /* store previous phase */
00092   /*TxInst->denc_inst.abs_phase = input_bits;*/
00093
00094   /* Differential Encoding Function */
00095   if (TxInst->denc_fcn != NULL)
00096      (*TxInst->denc_fcn) (&TxInst->denc_inst, &input_bits);
00097
00098   /* store previous phase */
00099   /*TxInst->denc_inst.abs_phase = input_bits;*/
00100
00101   /* Convolution  Encoding Function */
00102   if (TxInst->cenc_fcn != NULL)
00103    (*TxInst->cenc_fcn) (&TxInst->cenc_inst, &input_bits);
00104
00105   /* Symbol mapping Function */
00106   if (TxInst->smap_fcn != NULL)
00107      (*TxInst->smap_fcn) (&TxInst->smap_inst, &input_bits, &x_point,
00108                           &y_point,TxInst->tx_count );
00109
00110   /* modulation */
00111   if (TxInst->mod_fcn != NULL)
00112      (*TxInst->mod_fcn) (&TxInst->mod_inst, &x_point, &y_point);
00113
00114   /* FSK samples generation */
00115   if (TxInst->fsk_gen_fcn != NULL)
00116   (*TxInst->fsk_gen_fcn) (&TxInst->fsk_gen_inst, input_bits, TxInst->samp_per_baud,
00117                         output, index);
00118
00119   /* Transfer output */
00120   *x_ideal = x_point;
00121   *y_ideal = y_point;
00122   TxInst->tx_count++;
00123
00124   return;
00125 }
00126
00127 /******************************************************************************
00128  * Subroutine:  V21 RX Routine
00129  ******************************************************************************
00130  * SUBROUTINE NAME: v21Rx
00131  *
00132  * DESCRIPTION: Processing routine for V.21 RX Mode
00133  *
00134  * API:         RxInst - receive instance
00135  *****************************************************************************/
00136 #define V21_TEST 0
00137
00138 #if V21_TEST
00139 int TEST_FROFF[1024];
00140 int TEST_SINE[1024];
00141 int TEST_FROFF_PTR;
00142 int TEST_SINE_PTR;
00143 int j;
00144 #endif
00145
00146 void v21Rx(void *Inst, Fract *input, Fract *x_sym, Fract *y_sym, int index, tword *output_data)
00147 {
00148   dpuRxInst_t *RxInst;     /* RX Instance pointer */
00149   int input_bits = 0;          /* To store locally input bits */
00150   dpuInst_t *Instl = Inst;  /* cast locally dpu Instance pointer */
00151   int  cd_det=1, v21_det=0, output_det;
00152   Fract out_re[32], out_im[32];
00153   Fract output[8]={0,0,0,0,0,0,0,0}, n=0;
00154   tuint     bypassDataChangeDet= 0;
00155
00156   RxInst = &Instl->RxInst;  /* Store locally RX instance pointer */
00157
00158   RxInst->change_det = 0;
00159   /* CD detector */
00160   if (RxInst->cddet_fcn != NULL)
00161   {
00162       cd_det=(*RxInst->cddet_fcn)( &RxInst->cddet_inst, input,
00163                RxInst->samp_per_baud, index, &RxInst->agc_inst.gain,
00164                &Instl->sts.rx_level );
00165       RxInst->change_det=cd_det;
00166       /* Patch so that we can use CD detection for TEP - should be fixed */
00167       if(cd_det == DPU_TEP_TRUE)
00168         cd_det = DPU_CD_FALSE;
00169   }
00170   /*     AGC     */
00171   if (cd_det)
00172   {
00173     if (RxInst->agc_fcn != NULL)
00174     {
00175         (*RxInst->agc_fcn)( &RxInst->agc_inst, input,
00176                          RxInst->samp_per_baud, index);
00177     }
00178     /* TESTESTESTESTESTESTESTESTESTESTESTESTEST */
00179 #if V21_TEST
00180     for (j=0;j<RxInst->samp_per_baud ;j++ )
00181     {
00182        TEST_SINE[TEST_SINE_PTR] = input[j];
00183        TEST_SINE_PTR++;
00184        TEST_SINE_PTR &= 1023;
00185     }
00186 #endif
00187     /* TESTESTESTESTESTESTESTESTESTESTESTESTEST */
00188     /* BP Hilbert transformer */
00189     if (RxInst->bphilb_fcn != NULL)
00190     {
00191         (*RxInst->bphilb_fcn)( &RxInst->bphilb_inst, input, out_re,
00192                out_im, RxInst->samp_per_baud, index);
00193     }
00194     /* Demodulator */
00195     if (RxInst->demod_fcn != NULL)
00196     {
00197         (*RxInst->demod_fcn)( &RxInst->mod_inst, out_re, out_im);
00198     }
00199     /* TESTESTESTESTESTESTESTESTESTESTESTESTEST */
00200 #if V21_TEST
00201     for (j=0;j<RxInst->samp_per_baud ;j++ )
00202     {
00203        TEST_FROFF[TEST_FROFF_PTR] = out_re[j];
00204        TEST_FROFF_PTR++;
00205        TEST_FROFF_PTR &= 1023;
00206     }
00207 #endif
00208     /* TESTESTESTESTESTESTESTESTESTESTESTESTEST */
00209
00210     /* v21 data checker/decoder */
00211     if (RxInst->v21_fcn != NULL)
00212     {
00213         v21_det=(*RxInst->v21_fcn)( &RxInst->v21_dec_inst, out_re,
00214                                      (int)RxInst->samp_per_baud, output,&n);
00215         RxInst->change_det=v21_det;
00216     }
00217
00218     /* output data manipulation */
00219     if (RxInst->data_fcn != NULL)
00220     {
00221        if (RxInst->change_det == DPU_V21_FALSE)
00222        {
00223           bypassDataChangeDet = 1; /* bypass change_det flag set */
00224
00225            /* partial data, generate extra junk bits at end to */
00226            /* force complete reads at 8-bit boundaries */
00227            if  (RxInst->outman_inst.bit_index > 0)
00228            {
00229               n = RxInst->outman_inst.word_size - RxInst->outman_inst.bit_index;
00230            }
00231        }
00232
00233        output_det = (*RxInst->data_fcn)(&RxInst->outman_inst, output,
00234                                          RxInst->bts_per_baud, (int)n,output_data);
00235        if (!bypassDataChangeDet)
00236        {
00237             RxInst->change_det = output_det;
00238        }
00239     }
00240
00241     /* Transfer output */
00242     /* *input = input_bits; */
00243     RxInst->rx_count++;
00244     if (input_bits != 1)    /* 15, 7, 3 */
00245     {
00246       ERROR_BTS++;
00247     }
00248   }
00249   return;
00250 }
00251
00252 /* Nothing after this point */
00253


FM: vxxproc.h File Reference

vxxproc.h File Reference

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

Include dependency graph for vxxproc.h:

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

Go to the source code of this file.

Functions

void | vHSTx (void *Inst, Fract *x_ideal, Fract *y_ideal, Fract *output, int index)
void | v21Tx (void *Inst, Fract *x_ideal, Fract *y_ideal, Fract *output, int index)
void | v21Rx (void *Inst, Fract *input, Fract *x_ideal, Fract *y_ideal, int index, tword *output_data)

Function Documentation

void vHSTx | ( | void * | Inst,
 |  | Fract * | x_ideal,
 |  | Fract * | y_ideal,
 |  | Fract * | output,
 |  | int | index
 | ) |  |

Definition at line 68 of file vxxproc.c.

References dpuTxInst_t::bts_per_baud, dpuTxInst_t::cenc_fcn, dpuTxInst_t::cenc_inst, dpuTxInst_t::data_fcn, dpuTxInst_t::data_in_buf, dpuTxInst_t::denc_fcn, dpuTxInst_t::denc_inst, dpuTxInst_t::fsk_gen_fcn, dpuTxInst_t::fsk_gen_inst, dpuTxInst_t::inman_inst, dpuTxInst_t::mod_fcn, dpuTxInst_t::mod_inst, dpuTxInst_t::samp_per_baud, dpuTxInst_t::scr_fcn, dpuTxInst_t::scr_inst, dpuTxInst_t::smap_fcn, dpuTxInst_t::smap_inst, dpuTxInst_t::tx_count, and dpuInst_s::TxInst.

Referenced by vxx_tx_init().

void v21Tx | ( | void * | Inst,
 |  | Fract * | x_ideal,
 |  | Fract * | y_ideal,
 |  | Fract * | output,
 |  | int | index
 | ) |  |

void v21Rx | ( | void * | Inst,
 |  | Fract * | input,
 |  | Fract * | x_ideal,
 |  | Fract * | y_ideal,
 |  | int | index,
 |  | tword * | output_data
 | ) |  |

Definition at line 146 of file vxxproc.c.

References dpuRxInst_t::agc_fcn, dpuRxInst_t::agc_inst, dpuRxInst_t::bphilb_fcn, dpuRxInst_t::bphilb_inst, dpuRxInst_t::cddet_fcn, dpuRxInst_t::cddet_inst, dpuRxInst_t::change_det, dpuRxInst_t::demod_fcn, DPU_CD_FALSE, DPU_TEP_TRUE, dpu_agc_t::gain, dpuRxInst_t::mod_inst, fmSigQStats_t::rx_level, dpuInst_s::RxInst, dpuRxInst_t::samp_per_baud, and dpuInst_s::sts.

Referenced by dpu_rx_v21_init(), and rxLSinitInHS().


FM: vxxproc.h Source File

vxxproc.h

Go to the documentation of this file.
00001 #ifndef _VXXPROC_H
00002 #define _VXXPROC_H
00003 /******************************************************************************
00004  * FILE PURPOSE: Header file for vxx processing Routines
00005  ******************************************************************************
00006  * FILE NAME:   vxxProc.h
00007  *
00008  * DESCRIPTION: This file contains API and definitions for vxxProc.c
00009  *
00010  * REQUIRES:    types.h   (generic DSP ECO types)
00011  *
00012  * TABS: NONE
00013  *
00014  * $Id: VXXPROC.H 1.6 1999/03/01 19:07:23 sakhtar Exp $
00015  *
00016  * REVISION HISTORY:
00017  *
00018  * $Log: VXXPROC.H $
00019  * Revision 1.6  1999/03/01 19:07:23  sakhtar
00020  * Modified the API of procrx(), copy_fcn(), and data_fcn() to oombine
00021  * the functionality of dpu_rx_copy() into dpu_rx_packet()
00022  * Revision 1.5  1999/02/24 17:18:05  sakhtar
00023  * Revert to earlier version since the change made was causing a
00024  * problem in V.21
00025  * Revision 1.3  1997/11/21 15:43:01  PPATEL
00026  *  api change for multi-channel fax build for GG 3.0
00027  * Revision 1.2  1997/05/18 12:44:29  Zoran
00028  *   Cleaned, updated code
00029  * Revision 1.1  1997/02/06 10:27:28  unknown
00030  * Initial revision
00031  *
00032  * (C) Copyright 1997, TELOGY Networks, Inc.
00033  *****************************************************************************/
00034
00035 /* System level header files */
00036 #include <ti/mas/types/types.h>
00037
00038 /* Function prototypes */
00039 void vHSTx(void *Inst,
00040            Fract *x_ideal,
00041            Fract *y_ideal, Fract *output, int index);
00042 void v21Tx(void *Inst,
00043            Fract *x_ideal,
00044            Fract *y_ideal, Fract *output, int index);
00045 void v21Rx(void *Inst,
00046            Fract *input,
00047            Fract *x_ideal,
00048            Fract *y_ideal, int index, tword *output_data);
00049
00050 #endif  /* _VXXPROC_H */
00051 /* nothing past this point */


FM: vxxsm.c File Reference

vxxsm.c File Reference

#include <stdlib.h>
#include <ti/mas/types/types.h>
#include "dpu.h"
#include "dpuloc.h"
#include "vxxsm.h"
#include "fmport.h"
#include "fmprag.h"
#include "vxxinit.h"

Include dependency graph for vxxsm.c:

Go to the source code of this file.

Functions

void | v21TxStM (void *inst)
void | v21RxStM (void *inst)
void | v29TxStM (void *inst)
void | v27TxStM (void *inst)
void | v29RxStM (void *inst)
void | v27RxStM (void *inst)

Function Documentation

void v21TxStM ( void * inst )

Definition at line 76 of file vxxsm.c.

References dpuInst_s::ctrl, DPU_CTRL_CTS, DPU_ST_V21_TX, fmSigQStats_t::dpustatus, dpuInst_s::sts, fmSigQStats_t::tx_rate, dpuTxInst_t::tx_rate, and dpuInst_s::TxInst.

Referenced by vxx_tx_init().

void v21RxStM ( void * inst )

Definition at line 98 of file vxxsm.c.

References dpuRxInst_t::agc_inst, dpuRxInst_t::change_det, dpuInst_s::ctrl, dpuRxInst_t::data_out_buf, DPU_AGC_SCALE, DPU_CD_FALSE, DPU_CD_TRUE, DPU_CTRL_CDET, DPU_DATA_OVER, DPU_OUT_WORD_SIZE, dpu_outman_init(), DPU_ST_V21_RX, DPU_V21_FALSE, DPU_V21_RX_ST1, DPU_V21_RX_ST3, DPU_V21_RX_STNULL, DPU_V21_TRUE, fmSigQStats_t::dpustatus, dpu_agc_t::gain, dpuRxInst_t::outman_inst, fmSigQStats_t::rx_rate, dpuRxInst_t::rx_rate, dpuRxInst_t::rx_state, dpuInst_s::RxInst, dpuInst_s::sts, v21RxSt1Init(), v21RxSt3Init(), and v21RxStNULLInit().

Referenced by dpu_rx_v21_init().

Here is the call graph for this function:

void v29TxStM ( void * inst )

Definition at line 207 of file vxxsm.c.

References dpuInst_s::ctrl, DPU_CTRL_CTS, DPU_ST_V29_TX, DPU_V29_TX_ST0, DPU_V29_TX_ST1, DPU_V29_TX_ST2, DPU_V29_TX_ST3, DPU_V29_TX_ST4, fmSigQStats_t::dpustatus, dpuInst_s::sts, dpuTxInst_t::tx_count, fmSigQStats_t::tx_rate, dpuTxInst_t::tx_rate, dpuTxInst_t::tx_state, dpuInst_s::TxInst, v29TxSt1Init(), v29TxSt2Init(), v29TxSt3Init(), and v29TxSt4Init().

Referenced by vxx_tx_init().

Here is the call graph for this function:

void v27TxStM ( void * inst )

Definition at line 279 of file vxxsm.c.

References DPU_CTRL_CTS, DPU_ST_V27_TX, v27Table_sPtrs_t::dpu_v27_count_pt, DPU_V27_TX_ST0, DPU_V27_TX_ST1, DPU_V27_TX_ST2, DPU_V27_TX_ST3, DPU_V27_TX_ST4, fmSigQStats_t::dpustatus, dpuInst_s::sts, dpuInst_s::TablePtr, dpuTxInst_t::tx_count, dpuTxInst_t::tx_rate, fmSigQStats_t::tx_rate, dpuTxInst_t::tx_state, dpuInst_s::TxInst, fmTablePtrs_t::v27TablePtrs, v27TxSt1Init(), v27TxSt2Init(), v27TxSt3Init(), v27TxSt4Init(), and v27TxSt5Init().

Referenced by vxx_tx_init().

Here is the call graph for this function:

void v29RxStM ( void * inst )

Definition at line 334 of file vxxsm.c.

References dpuRxInst_t::change_det, dpuInst_s::ctrl, DPU_CD_FALSE, DPU_CTRL_CDET, DPU_CTRL_P2, DPU_CTRL_TEP, DPU_CTRL_V21, DPU_P2_FALSE, DPU_P2_TRUE, DPU_PHASE_LEN, DPU_ST_V29_RX, DPU_TEP_TRUE, DPU_V21_HS_TRUE, DPU_V21_TRUE, DPU_V29_RX_ST1, DPU_V29_RX_ST2, DPU_V29_RX_ST3, DPU_V29_RX_ST34, DPU_V29_RX_ST4, DPU_V29_RX_ST5, DPU_V29_RX_ST6, DPU_V29_RX_ST7, DPU_V29_RX_ST8, fmSigQStats_t::dpustatus, dpuRxInst_t::rx_count, fmSigQStats_t::rx_rate, dpuRxInst_t::rx_rate, dpuRxInst_t::rx_state, dpuInst_s::RxInst, dpuInst_s::sts, v29RxSt1Init(), v29RxSt2Init(), v29RxSt34Init(), v29RxSt3Init(), v29RxSt4Init(), v29RxSt5Init(), v29RxSt6Init(), v29RxSt7Init(), and v29RxSt8Init().

Referenced by v29RxSt1Init(), and v29RxSt2Init().

Here is the call graph for this function:

void v27RxStM ( void * inst )

Definition at line 519 of file vxxsm.c.

References dpuRxInst_t::change_det, dpuInst_s::ctrl, DPU_CD_FALSE, DPU_CTRL_CDET, DPU_CTRL_P2, DPU_CTRL_TEP, DPU_CTRL_V21, DPU_P2_FALSE, DPU_P2_TRUE, DPU_PHASE_LEN, DPU_ST_V27_RX, DPU_TEP_TRUE, DPU_V21_HS_TRUE, DPU_V21_TRUE, DPU_V27_RX_ST1, DPU_V27_RX_ST2, DPU_V27_RX_ST3, DPU_V27_RX_ST34, DPU_V27_RX_ST4, DPU_V27_RX_ST5, DPU_V27_RX_ST6, DPU_V27_RX_ST7, DPU_V27_RX_ST8, fmSigQStats_t::dpustatus, dpuRxInst_t::rx_count, fmSigQStats_t::rx_rate, dpuRxInst_t::rx_rate, dpuRxInst_t::rx_state, dpuInst_s::RxInst, dpuInst_s::sts, v27RxSt1Init(), v27RxSt2Init(), v27RxSt34Init(), v27RxSt3Init(), v27RxSt4Init(), v27RxSt5Init(), v27RxSt6Init(), v27RxSt7Init(), and v27RxSt8Init().

Referenced by v27RxSt1Init(), and v27RxSt2Init().

Here is the call graph for this function:


FM: vxxsm.c Source File

vxxsm.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: Initialization routines for different modulation modes
00003  ******************************************************************************
00004  * FILE NAME:   vxx_init.c
00005  *
00006  * DESCRIPTION: Initialization routines for different modulation modes
00007  *
00008  * REQUIRES:    types.h (generic data types)
00009  *              dpu.h (all the data structures required by DPU)
00010  *
00011  * TABS: NONE
00012  *
00013  * $Id: VXXSM.C 1.18 2000/03/21 21:38:04 jwright Exp $
00014  *
00015  * REVISION HISTORY:
00016  *
00017  * $Log: VXXSM.C $
00018  * Revision 1.18  2000/03/21 21:38:04  jwright
00019  * Clean up 3.50 compile warnings.
00020  * Revision 1.17  2000/02/25 15:42:08  ffruth
00021  * - Fixed v27 Rx state machine which caused the generation of
00022  *   and invalid '1' bit at the start of the demodulated bit stream.
00023  * Revision 1.16  1999/03/13 19:08:29  sakhtar
00024  * Modified to change the API of functions in vxxinit.c
00025  * Revision 1.15  1999/03/11 12:00:55  sakhtar
00026  * Revert back to version 1.9
00027  * - Removed V27Tx NULL, 6 and 7 states
00028  * - Removed TEP detection in V21Rx since it is never reported
00029  * - Removed V29TxNULL state
00030  * Revision 1.9  1997/12/21 16:30:30  PPATEL
00031  *   Enabled TEP and V.21 detection in V.27 state machine.
00032  * Revision 1.8  1997/10/31 14:12:14  PPATEL
00033  *  Removed a bug in the v27 rx state machine. Corresponding changes
00034  * made in vxxinit.c file also
00035  * Revision 1.7  1997/09/16 23:58:12  PPATEL
00036  *  Included debugging information (from clean customer build on sept 16)
00037  * Revision 1.6  1997/05/25 16:27:46  Zoran
00038  *   Added reporting of tx,rx status
00039  * Revision 1.5  1997/05/22 11:25:10  Zoran
00040  *   Disabled ST2 in V.27
00041  * Revision 1.4  1997/05/18 12:16:15  Zoran
00042  *   Cleaned , updated, tuned up version
00043  * Revision 1.2  1997/02/19 22:20:50  H.T.Li
00044  * Revision 1.1  1997/02/06 10:28:34  unknown
00045  * Initial revision
00046  *
00047  * (C) Copyright 1996, TELOGY Networks, Inc.
00048  *****************************************************************************/
00049 #include <stdlib.h>
00050 #include <ti/mas/types/types.h>
00051
00052 #include "dpu.h"
00053 #include "dpuloc.h"
00054 #include "vxxsm.h"
00055 #include "fmport.h"
00056 #include "fmprag.h"
00057 #include "vxxinit.h"
00058 #ifdef DPU_DBG
00059 #include "dpu_dbg.h"
00060 #endif
00061
00062 #if 0
00063 extern Fract dpu_rx_agc_table[DPU_AGC_TABLE_SIZE];
00064 #endif
00065
00066 /******************************************************************************
00067  * Subroutine:  V21 TX State Machine
00068  ******************************************************************************
00069  * SUBROUTINE NAME: v21TxStM
00070  *
00071  * DESCRIPTION: State Machine for V.21 TX Mode
00072  *
00073  * API:         Inst - DPU instance
00074  *****************************************************************************/
00075
00076 void v21TxStM(void *inst)
00077 {
00078   dpuInst_t *Inst=(dpuInst_t *) inst;
00079
00080   Inst->ctrl |= DPU_CTRL_CTS;
00081
00082   /* Status update */
00083   Inst->sts.dpustatus = DPU_ST_V21_TX;
00084   Inst->sts.tx_rate = Inst->TxInst.tx_rate;
00085
00086   return;
00087 }
00088
00089 /******************************************************************************
00090  * Subroutine:  V21 RX State Machine
00091  ******************************************************************************
00092  * SUBROUTINE NAME: v21RxStM
00093  *
00094  * DESCRIPTION: State Machine for V.21 RX Mode
00095  *
00096  * API:         Inst - DPU instance
00097  *****************************************************************************/
00098 void v21RxStM(void *inst)
00099 {
00100   dpuInst_t *Inst=(dpuInst_t *) inst;
00101   dpuRxInst_t *RxInst;
00102
00103   RxInst = &Inst->RxInst;         /* Store locally rx instance address */
00104
00105   /* Status update */
00106   Inst->sts.dpustatus = DPU_ST_V21_RX + RxInst->rx_state;
00107   Inst->sts.rx_rate = RxInst->rx_rate;
00108
00109   /* process any state */
00110   switch(RxInst->rx_state)
00111   {
00112     case DPU_V21_RX_STNULL:
00113       if (RxInst->change_det == DPU_CD_TRUE)
00114       {
00115 #if 0
00116         /* for AGC  */
00117         gain = RxInst->agc_inst.gain;
00118         if (gain<DPU_AGC_TABLE_SIZE )
00119           RxInst->agc_inst.gain = dpu_rx_agc_table[(int)gain];
00120         else
00121           RxInst->agc_inst.gain = (Fract) (1*DPU_AGC_SCALE);
00122 #endif
00123         v21RxSt1Init(Inst);
00124
00125 #ifdef DPU_DBG
00126
00127        dpu_dbg_insert_state_and_ctrl(DPU_ST_V21_RX + DPU_V21_RX_ST1, Inst);
00128
00129 #endif
00130       }
00131       else if (RxInst->change_det == DPU_CD_FALSE)
00132        Inst->ctrl &= ~DPU_CTRL_CDET;
00133       break;
00134     case DPU_V21_RX_ST1:
00135       if (RxInst->change_det == DPU_CD_FALSE)
00136       {
00137         Inst->ctrl &= ~DPU_CTRL_CDET;
00138         v21RxStNULLInit(Inst);
00139
00140 #ifdef DPU_DBG
00141
00142        dpu_dbg_insert_state_and_ctrl(DPU_ST_V21_RX + DPU_V21_RX_STNULL, Inst);
00143
00144 #endif
00145       }
00146       else if (RxInst->change_det == DPU_V21_TRUE)
00147       {
00148         /* set CD bit after DPU_V21_TRUE */
00149         Inst->ctrl |= DPU_CTRL_CDET;
00150         v21RxSt3Init(Inst);
00151
00152 #ifdef DPU_DBG
00153
00154        dpu_dbg_insert_state_and_ctrl(DPU_ST_V21_RX + DPU_V21_RX_ST3, Inst);
00155
00156 #endif
00157
00158       }
00159       break;
00160     case DPU_V21_RX_ST3:
00161       if (RxInst->change_det == DPU_CD_FALSE)
00162       {
00163         Inst->ctrl &= ~DPU_CTRL_CDET;
00164         v21RxStNULLInit(Inst);
00165
00166 #ifdef DPU_DBG
00167
00168        dpu_dbg_insert_state_and_ctrl(DPU_ST_V21_RX + DPU_V21_RX_STNULL, Inst);
00169
00170 #endif
00171
00172
00173       }
00174       else if (RxInst->change_det == DPU_DATA_OVER)
00175       {
00176         dpu_outman_init (&RxInst->outman_inst, RxInst->data_out_buf, DPU_OUT_WORD_SIZE);
00177       }
00178       else if (RxInst->change_det == DPU_V21_FALSE)
00179       {
00180
00181         Inst->ctrl &= ~DPU_CTRL_CDET;
00182         /* NOT V21 */
00183         v21RxSt1Init(Inst);
00184 #ifdef DPU_DBG
00185
00186        dpu_dbg_insert_state_and_ctrl(DPU_ST_V21_RX + DPU_V21_RX_ST1, Inst);
00187
00188 #endif
00189
00190
00191       }
00192       break;
00193   }
00194   return;
00195 }
00196
00197 /******************************************************************************
00198  * Subroutine:  V29 TX State Machine
00199  ******************************************************************************
00200  * SUBROUTINE NAME: v29TxStM
00201  *
00202  * DESCRIPTION: State Machine for V29 TX Mode
00203  *
00204  * API:         Inst - DPU instance
00205  *****************************************************************************/
00206
00207 void v29TxStM(void *inst)
00208 {
00209   dpuInst_t *Inst=(dpuInst_t *) inst;
00210   dpuTxInst_t *TxInst;
00211
00212   TxInst = &Inst->TxInst;         /* Store locally tx instance address */
00213   /* Status update */
00214   Inst->sts.dpustatus = DPU_ST_V29_TX + TxInst->tx_state;
00215   Inst->sts.tx_rate = TxInst->tx_rate;
00216   /* process any state */
00217   switch(TxInst->tx_state)
00218   {
00219     case DPU_V29_TX_ST0:
00220       if (TxInst->tx_count == 48)
00221       {
00222         v29TxSt1Init(Inst);
00223 #ifdef DPU_DBG
00224
00225        dpu_dbg_insert_state_and_ctrl(DPU_ST_V29_TX + DPU_V29_TX_ST1, Inst);
00226
00227 #endif
00228       }
00229       break;
00230     case DPU_V29_TX_ST1:
00231       if (TxInst->tx_count == 128)
00232       {
00233         v29TxSt2Init(Inst);
00234 #ifdef DPU_DBG
00235
00236        dpu_dbg_insert_state_and_ctrl(DPU_ST_V29_TX + DPU_V29_TX_ST2, Inst);
00237
00238 #endif
00239       }
00240      break;
00241     case DPU_V29_TX_ST2:
00242       if (TxInst->tx_count == 384)
00243       {
00244         v29TxSt3Init(Inst);
00245 #ifdef DPU_DBG
00246
00247        dpu_dbg_insert_state_and_ctrl(DPU_ST_V29_TX + DPU_V29_TX_ST3, Inst);
00248
00249 #endif
00250       }
00251       break;
00252     case DPU_V29_TX_ST3:
00253       if (TxInst->tx_count == 48)
00254       {
00255          Inst->ctrl |= DPU_CTRL_CTS;
00256          v29TxSt4Init(Inst);
00257 #ifdef DPU_DBG
00258
00259        dpu_dbg_insert_state_and_ctrl(DPU_ST_V29_TX + DPU_V29_TX_ST4, Inst);
00260
00261 #endif
00262       }
00263       break;
00264     default:
00265       break;
00266   }
00267 }
00268
00269 /******************************************************************************
00270  * Subroutine:  V27 TX State Machine
00271  ******************************************************************************
00272  * SUBROUTINE NAME: v27TxStM
00273  *
00274  * DESCRIPTION: State Machine for V27 TX Mode
00275  *
00276  * API:         Inst - DPU instance
00277  *****************************************************************************/
00278
00279 void v27TxStM(void *inst)
00280 {
00281   dpuInst_t *Inst=(dpuInst_t *) inst;
00282   dpuTxInst_t *TxInst;
00283   int rate, tmp1, tmp2;
00284
00285   TxInst = &Inst->TxInst;         /* Store locally tx instance address */
00286   rate = TxInst->tx_rate;
00287   tmp1=2;
00288   if (rate == 2400) tmp1=0;
00289   tmp2 = 2;
00290   /* Status update */
00291   Inst->sts.dpustatus = DPU_ST_V27_TX + TxInst->tx_state;
00292   Inst->sts.tx_rate = TxInst->tx_rate;
00293   /* process any state */
00294   switch(TxInst->tx_state)
00295   {
00296     case DPU_V27_TX_ST0:
00297       if (TxInst->tx_count == Inst->TablePtr->v27TablePtrs->dpu_v27_count_pt[tmp1])
00298         v27TxSt1Init(Inst);
00299       break;
00300     case DPU_V27_TX_ST1:
00301       if (TxInst->tx_count == Inst->TablePtr->v27TablePtrs->dpu_v27_count_pt[tmp1+1])
00302         v27TxSt2Init(Inst);
00303       break;
00304     case DPU_V27_TX_ST2:
00305       if (TxInst->tx_count == Inst->TablePtr->v27TablePtrs->dpu_v27_count_pt[tmp2+4])
00306         v27TxSt3Init(Inst);
00307       break;
00308     case DPU_V27_TX_ST3:
00309       if (TxInst->tx_count == Inst->TablePtr->v27TablePtrs->dpu_v27_count_pt[tmp2+5])
00310         v27TxSt4Init(Inst);
00311       break;
00312     case DPU_V27_TX_ST4:
00313       if (TxInst->tx_count == 8)
00314       {
00315         Inst->ctrl |= DPU_CTRL_CTS;
00316         v27TxSt5Init(Inst);
00317       }
00318       break;
00319   default:
00320     break;
00321   }
00322 }
00323
00324
00325 /******************************************************************************
00326  * Subroutine:  V29 RX State Machine
00327  ******************************************************************************
00328  * SUBROUTINE NAME: v29RxStM
00329  *
00330  * DESCRIPTION: State Machine for V29 RX Mode
00331  *
00332  * API:         Inst - DPU instance
00333  *****************************************************************************/
00334 void v29RxStM(void *inst)
00335 {
00336   dpuInst_t *Inst=(dpuInst_t *) inst;
00337   dpuRxInst_t *RxInst;
00338
00339   RxInst = &Inst->RxInst;         /* Store locally rx instance address */
00340
00341   /* Status update */
00342   Inst->sts.dpustatus = DPU_ST_V29_RX + RxInst->rx_state;
00343   Inst->sts.rx_rate = RxInst->rx_rate;
00344   /* process any state */
00345   switch(RxInst->rx_state)
00346   {
00347     case DPU_V29_RX_ST1:
00348       if (RxInst->change_det == DPU_P2_TRUE)
00349       {
00350         Inst->ctrl |= DPU_CTRL_P2;
00351         v29RxSt3Init(Inst);
00352
00353 #ifdef DPU_DBG
00354
00355        dpu_dbg_insert_state_and_ctrl(DPU_ST_V29_RX + DPU_V29_RX_ST3, Inst);
00356
00357 #endif
00358
00359       }
00360       else  if (RxInst->change_det == DPU_P2_FALSE)
00361       {
00362         Inst->ctrl &= ~DPU_CTRL_P2;
00363       }
00364       else if  (RxInst->change_det == DPU_V21_TRUE)
00365       {
00366         Inst->ctrl |= DPU_CTRL_V21;
00367       }
00368       else if  (RxInst->change_det == DPU_TEP_TRUE)
00369       {
00370         Inst->ctrl |= DPU_CTRL_TEP;
00371       }
00372       else if (RxInst->change_det == DPU_V21_HS_TRUE)
00373       {
00374        /*  Inst->ctrl |= DPU_CTRL_V21; */
00375         v29RxSt2Init(Inst);
00376
00377 #ifdef DPU_DBG
00378
00379        dpu_dbg_insert_state_and_ctrl(DPU_ST_V29_RX + DPU_V29_RX_ST2, Inst);
00380
00381 #endif
00382
00383
00384       }
00385       break;
00386     case DPU_V29_RX_ST2:
00387       if (RxInst->change_det == DPU_V21_TRUE)
00388       {
00389          Inst->ctrl |= DPU_CTRL_V21;
00390          v29RxSt1Init(Inst);
00391 #ifdef DPU_DBG
00392
00393        dpu_dbg_insert_state_and_ctrl(DPU_ST_V29_RX + DPU_V29_RX_ST1, Inst);
00394
00395 #endif
00396
00397       }
00398       if (RxInst->rx_count == 160)
00399       {
00400          v29RxSt1Init(Inst);
00401 #ifdef DPU_DBG
00402
00403        dpu_dbg_insert_state_and_ctrl(DPU_ST_V29_RX + DPU_V29_RX_ST1, Inst);
00404
00405 #endif
00406       }
00407       break;
00408     case DPU_V29_RX_ST3:
00409       if (RxInst->change_det && RxInst->rx_count > 60)
00410       {
00411          v29RxSt34Init(Inst);
00412 #ifdef DPU_DBG
00413
00414        dpu_dbg_insert_state_and_ctrl(DPU_ST_V29_RX + DPU_V29_RX_ST34, Inst);
00415
00416 #endif
00417
00418       }
00419       /***** not P2 data return to state 1 *****/
00420       if (RxInst->rx_count == 128)
00421       {
00422          v29RxSt1Init(Inst);
00423 #ifdef DPU_DBG
00424
00425        dpu_dbg_insert_state_and_ctrl(DPU_ST_V29_RX + DPU_V29_RX_ST1, Inst);
00426
00427 #endif
00428
00429
00430       }
00431       break;
00432     case DPU_V29_RX_ST34:
00433       if (RxInst->rx_count == (DPU_PHASE_LEN))
00434       {
00435          v29RxSt4Init(Inst);
00436 #ifdef DPU_DBG
00437
00438        dpu_dbg_insert_state_and_ctrl(DPU_ST_V29_RX + DPU_V29_RX_ST4, Inst);
00439
00440 #endif
00441
00442       }
00443       break;
00444     case DPU_V29_RX_ST4:
00445       if (RxInst->rx_count == 100)
00446       {
00447         v29RxSt5Init(Inst);
00448 #ifdef DPU_DBG
00449
00450        dpu_dbg_insert_state_and_ctrl(DPU_ST_V29_RX + DPU_V29_RX_ST5, Inst);
00451
00452 #endif
00453
00454       }
00455       break;
00456     case DPU_V29_RX_ST5:
00457       if (RxInst->rx_count == 100)
00458       {
00459         v29RxSt6Init(Inst);
00460 #ifdef DPU_DBG
00461
00462        dpu_dbg_insert_state_and_ctrl(DPU_ST_V29_RX + DPU_V29_RX_ST6, Inst);
00463
00464 #endif
00465      }
00466       break;
00467     case DPU_V29_RX_ST6:
00468       if (RxInst->rx_count == 184)
00469       {
00470         v29RxSt7Init(Inst);
00471 #ifdef DPU_DBG
00472
00473        dpu_dbg_insert_state_and_ctrl(DPU_ST_V29_RX + DPU_V29_RX_ST7, Inst);
00474
00475 #endif
00476
00477       }
00478       break;
00479     case DPU_V29_RX_ST7:
00480       if (RxInst->rx_count == 48)
00481       {
00482         /* set CD bit after B1 is over */
00483         Inst->ctrl |= DPU_CTRL_CDET;
00484         v29RxSt8Init(Inst);
00485 #ifdef DPU_DBG
00486
00487        dpu_dbg_insert_state_and_ctrl(DPU_ST_V29_RX + DPU_V29_RX_ST8, Inst);
00488
00489 #endif
00490
00491       }
00492       break;
00493     case DPU_V29_RX_ST8:
00494    if (RxInst->change_det == DPU_CD_FALSE)
00495       {
00496         Inst->ctrl &= ~DPU_CTRL_CDET;
00497         v29RxSt1Init(Inst);
00498 #ifdef DPU_DBG
00499
00500        dpu_dbg_insert_state_and_ctrl(DPU_ST_V29_RX + DPU_V29_RX_ST1, Inst);
00501
00502 #endif
00503
00504       }
00505       break;
00506   }
00507   return;
00508 }
00509
00510 /******************************************************************************
00511  * Subroutine:  V27 RX State Machine
00512  ******************************************************************************
00513  * SUBROUTINE NAME: v27RxStM
00514  *
00515  * DESCRIPTION: State Machine for V27 RX Mode
00516  *
00517  * API:         Inst - DPU instance
00518  *****************************************************************************/
00519 void v27RxStM(void *inst)
00520 {
00521   dpuInst_t *Inst=(dpuInst_t *) inst;
00522   dpuRxInst_t *RxInst;
00523
00524   RxInst = &Inst->RxInst;         /* Store locally rx instance address */
00525
00526   /* Status update */
00527   Inst->sts.dpustatus = DPU_ST_V27_RX + RxInst->rx_state;
00528   Inst->sts.rx_rate = RxInst->rx_rate;
00529    /* process any state */
00530   switch(RxInst->rx_state)
00531   {
00532     case DPU_V27_RX_ST1:
00533       if (RxInst->change_det == DPU_P2_TRUE)
00534       {
00535         Inst->ctrl |= DPU_CTRL_P2;
00536         v27RxSt3Init(Inst);
00537       }
00538       else if (RxInst->change_det == DPU_P2_FALSE)
00539       {
00540         Inst->ctrl &= ~DPU_CTRL_P2;
00541       }
00542       else if  (RxInst->change_det == DPU_V21_TRUE)
00543       {
00544         Inst->ctrl |= DPU_CTRL_V21;
00545       }
00546       else if  (RxInst->change_det == DPU_TEP_TRUE)
00547       {
00548         Inst->ctrl |= DPU_CTRL_TEP;
00549       }
00550       else if (RxInst->change_det == DPU_V21_HS_TRUE)
00551       {
00552         v27RxSt2Init(Inst);
00553       }
00554       break;
00555     case DPU_V27_RX_ST2:
00556       if (RxInst->change_det == DPU_V21_TRUE)
00557       {
00558          Inst->ctrl |= DPU_CTRL_V21;
00559          v27RxSt1Init(Inst);
00560       }
00561       if (RxInst->rx_count == 96)
00562          v27RxSt1Init(Inst);
00563       break;
00564     case DPU_V27_RX_ST3:
00565       if (RxInst->change_det /* && RxInst->rx_count > 40 */)
00566          v27RxSt34Init(Inst);
00567       /***** not P2 data return to state 1 *****/
00568       if (RxInst->rx_count == 48)
00569          v27RxSt1Init(Inst);
00570       break;
00571     case DPU_V27_RX_ST34:
00572       if (RxInst->rx_count == DPU_PHASE_LEN )
00573          v27RxSt4Init(Inst);
00574       break;
00575     case DPU_V27_RX_ST4:
00576       if (RxInst->rx_count == 100)
00577          v27RxSt5Init(Inst);
00578       break;
00579     case DPU_V27_RX_ST5:
00580       if (RxInst->rx_count == 400)
00581          v27RxSt6Init(Inst);
00582       break;
00583     case DPU_V27_RX_ST6:
00584       if (RxInst->rx_count == 560)
00585          v27RxSt7Init(Inst);
00586       break;
00587     case DPU_V27_RX_ST7:
00588       if (RxInst->rx_count == 22)
00589       {
00590         Inst->ctrl |= DPU_CTRL_CDET;
00591         v27RxSt8Init(Inst);
00592       }
00593       break;
00594     case DPU_V27_RX_ST8:
00595       if (RxInst->change_det == DPU_CD_FALSE)
00596       {
00597         Inst->ctrl &= ~DPU_CTRL_CDET;
00598         v27RxSt1Init(Inst);
00599       }
00600       break;
00601    }
00602    return;
00603  }
00604  /* Nothing after this point */
00605
00606


FM: vxxsm.h File Reference

vxxsm.h File Reference

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

Include dependency graph for vxxsm.h:

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

Go to the source code of this file.

Functions

void | v29TxStM (void *Inst)
void | v27TxStM (void *Inst)
void | v29RxStM (void *Inst)
void | v27RxStM (void *Inst)
void | v21TxStM (void *Inst)
void | v21RxStM (void *Inst)

Function Documentation

void v29TxStM ( void * Inst )

Definition at line 207 of file vxxsm.c.

References dpuInst_s::ctrl, DPU_CTRL_CTS, DPU_ST_V29_TX, DPU_V29_TX_ST0, DPU_V29_TX_ST1, DPU_V29_TX_ST2, DPU_V29_TX_ST3, DPU_V29_TX_ST4, fmSigQStats_t::dpustatus, dpuInst_s::sts, dpuTxInst_t::tx_count, dpuTxInst_t::tx_rate, fmSigQStats_t::tx_rate, dpuTxInst_t::tx_state, dpuInst_s::TxInst, v29TxSt1Init(), v29TxSt2Init(), v29TxSt3Init(), and v29TxSt4Init().

Referenced by vxx_tx_init().

Here is the call graph for this function:

void v27TxStM ( void * Inst )

Definition at line 279 of file vxxsm.c.

References DPU_CTRL_CTS, DPU_ST_V27_TX, v27Table_sPtrs_t::dpu_v27_count_pt, DPU_V27_TX_ST0, DPU_V27_TX_ST1, DPU_V27_TX_ST2, DPU_V27_TX_ST3, DPU_V27_TX_ST4, fmSigQStats_t::dpustatus, dpuInst_s::sts, dpuInst_s::TablePtr, dpuTxInst_t::tx_count, fmSigQStats_t::tx_rate, dpuTxInst_t::tx_rate, dpuTxInst_t::tx_state, dpuInst_s::TxInst, fmTablePtrs_t::v27TablePtrs, v27TxSt1Init(), v27TxSt2Init(), v27TxSt3Init(), v27TxSt4Init(), and v27TxSt5Init().

Referenced by vxx_tx_init().

Here is the call graph for this function:

void v29RxStM ( void * Inst )

Definition at line 334 of file vxxsm.c.

References dpuRxInst_t::change_det, dpuInst_s::ctrl, DPU_CD_FALSE, DPU_CTRL_CDET, DPU_CTRL_P2, DPU_CTRL_TEP, DPU_CTRL_V21, DPU_P2_FALSE, DPU_P2_TRUE, DPU_PHASE_LEN, DPU_ST_V29_RX, DPU_TEP_TRUE, DPU_V21_HS_TRUE, DPU_V21_TRUE, DPU_V29_RX_ST1, DPU_V29_RX_ST2, DPU_V29_RX_ST3, DPU_V29_RX_ST34, DPU_V29_RX_ST4, DPU_V29_RX_ST5, DPU_V29_RX_ST6, DPU_V29_RX_ST7, DPU_V29_RX_ST8, fmSigQStats_t::dpustatus, dpuRxInst_t::rx_count, dpuRxInst_t::rx_rate, fmSigQStats_t::rx_rate, dpuRxInst_t::rx_state, dpuInst_s::RxInst, dpuInst_s::sts, v29RxSt1Init(), v29RxSt2Init(), v29RxSt34Init(), v29RxSt3Init(), v29RxSt4Init(), v29RxSt5Init(), v29RxSt6Init(), v29RxSt7Init(), and v29RxSt8Init().

Referenced by v29RxSt1Init(), and v29RxSt2Init().

Here is the call graph for this function:

void v27RxStM ( void * Inst )

Definition at line 519 of file vxxsm.c.

References dpuRxInst_t::change_det, dpuInst_s::ctrl, DPU_CD_FALSE, DPU_CTRL_CDET, DPU_CTRL_P2, DPU_CTRL_TEP, DPU_CTRL_V21, DPU_P2_FALSE, DPU_P2_TRUE, DPU_PHASE_LEN, DPU_ST_V27_RX, DPU_TEP_TRUE, DPU_V21_HS_TRUE, DPU_V21_TRUE, DPU_V27_RX_ST1, DPU_V27_RX_ST2, DPU_V27_RX_ST3, DPU_V27_RX_ST34, DPU_V27_RX_ST4, DPU_V27_RX_ST5, DPU_V27_RX_ST6, DPU_V27_RX_ST7, DPU_V27_RX_ST8, fmSigQStats_t::dpustatus, dpuRxInst_t::rx_count, dpuRxInst_t::rx_rate, fmSigQStats_t::rx_rate, dpuRxInst_t::rx_state, dpuInst_s::RxInst, dpuInst_s::sts, v27RxSt1Init(), v27RxSt2Init(), v27RxSt34Init(), v27RxSt3Init(), v27RxSt4Init(), v27RxSt5Init(), v27RxSt6Init(), v27RxSt7Init(), and v27RxSt8Init().

Referenced by v27RxSt1Init(), and v27RxSt2Init().

Here is the call graph for this function:

void v21TxStM ( void * Inst )

Definition at line 76 of file vxxsm.c.

References dpuInst_s::ctrl, DPU_CTRL_CTS, DPU_ST_V21_TX, fmSigQStats_t::dpustatus, dpuInst_s::sts, dpuTxInst_t::tx_rate, fmSigQStats_t::tx_rate, and dpuInst_s::TxInst.

Referenced by vxx_tx_init().

void v21RxStM ( void * Inst )

Definition at line 98 of file vxxsm.c.

References dpuRxInst_t::agc_inst, dpuRxInst_t::change_det, dpuInst_s::ctrl, dpuRxInst_t::data_out_buf, DPU_AGC_SCALE, DPU_CD_FALSE, DPU_CD_TRUE, DPU_CTRL_CDET, DPU_DATA_OVER, DPU_OUT_WORD_SIZE, dpu_outman_init(), DPU_ST_V21_RX, DPU_V21_FALSE, DPU_V21_RX_ST1, DPU_V21_RX_ST3, DPU_V21_RX_STNULL, DPU_V21_TRUE, fmSigQStats_t::dpustatus, dpu_agc_t::gain, dpuRxInst_t::outman_inst, dpuRxInst_t::rx_rate, fmSigQStats_t::rx_rate, dpuRxInst_t::rx_state, dpuInst_s::RxInst, dpuInst_s::sts, v21RxSt1Init(), v21RxSt3Init(), and v21RxStNULLInit().

Referenced by dpu_rx_v21_init().

Here is the call graph for this function:


FM: vxxsm.h Source File

vxxsm.h

Go to the documentation of this file.
00001 #ifndef _VXXSM_H
00002 #define _VXXSM_H
00003 /******************************************************************************
00004  * FILE PURPOSE: Header file for vxx State Machine Routines
00005  ******************************************************************************
00006  * FILE NAME:   vxxsm.h
00007  *
00008  * DESCRIPTION: This file contains API and definitions for vxxsm.c
00009  *
00010  * REQUIRES:    types.h   (generic DSP ECO types)
00011  *
00012  * TABS: NONE
00013  *
00014  * $Id: VXXSM.H 1.5 1999/03/13 19:08:47 sakhtar Exp $
00015  *
00016  * REVISION HISTORY:
00017  *
00018  * $Log: VXXSM.H $
00019  * Revision 1.5  1999/03/13 19:08:47  sakhtar
00020  * Modified to change the API of functions in vxxinit.c
00021  * Revision 1.4  1998/08/28 01:18:28  ppatel
00022  *  Some unused functions removed to save program memory
00023  * Revision 1.3  1997/05/18 12:44:50  Zoran
00024  * Cleaned, updated code
00025  *
00026  * (C) Copyright 1996, TELOGY Networks, Inc.
00027  *****************************************************************************/
00028
00029 /* System level header files */
00030 #include <ti/mas/types/types.h>
00031 #include "dpuloc.h"
00032
00033 /* Function prototypes */
00034 void v29TxStM(void *Inst);
00035 void v27TxStM(void *Inst);
00036 void v29RxStM(void *Inst);
00037 void v27RxStM(void *Inst);
00038 void v21TxStM(void *Inst);
00039 void v21RxStM(void *Inst);
00040
00041 #endif  /* _VXXINIT_H */
00042 /* nothing past this point */


FM: Data Structures

  • Data Structures
  • Data Fields

FM Data Structures

Here are the data structures with brief descriptions:
siuInst_t


FM: Dependent Packages

FM Test Package

Dependent Packages

dependencies

  • ti.mas.types (Common data type defintions)
  • ti.mas.util (Common utilities)
  • ti.mas.fm (FM API)
  • ti.mas.swtools (to build software)


FM:

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.


FM: doxygen.h File Reference

doxygen.h File Reference

Go to the source code of this file.


FM: doxygen.h Source File

doxygen.h

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


FM: File Index

FM File List

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


FM: fmDebugTraceParser.c File Reference

fmDebugTraceParser.c File Reference

#include <string.h>
#include <stdio.h>
#include <ti/mas/types/types.h>
#include <ti/mas/fm/src/fmtrace.h>
#include <ti/mas/fm/src/fmloc.h>

Include dependency graph for fmDebugTraceParser.c:

Go to the source code of this file.

Enumerations

enum FxmMode_e {
FXM_MODE_OFF, FXM_MODE_RX, FXM_MODE_RX_HDLC, FXM_MODE_TX,
FXM_MODE_TX_HDLC, FXM_MODE_COUNT
}

Functions

void | fmDebugGetFMState (int msgData, char *string)
void | fmDebugGetModulation (int msgData, char *string)
void | fmDebugGetFMMode (int msgData, char *string)
int | fmDebugTraceParser (int msgId, int msgData, char *dstPtr)

Variables

char | msgString [40]

Enumeration Type Documentation

enum FxmMode_e

Enumerator:
FXM_MODE_OFF
FXM_MODE_RX
FXM_MODE_RX_HDLC
FXM_MODE_TX
FXM_MODE_TX_HDLC
FXM_MODE_COUNT

Definition at line 9 of file fmDebugTraceParser.c.

Function Documentation

void fmDebugGetFMState | ( | int | msgData,
 |  | char * | string
 | ) |  |

Definition at line 18 of file fmDebugTraceParser.c.

Referenced by fmDebugTraceParser().

void fmDebugGetModulation | ( | int | msgData,
 |  | char * | string
 | ) |  |

Definition at line 64 of file fmDebugTraceParser.c.

Referenced by fmDebugTraceParser().

void fmDebugGetFMMode | ( | int | msgData,
 |  | char * | string
 | ) |  |

Definition at line 130 of file fmDebugTraceParser.c.

References FXM_MODE_OFF, FXM_MODE_RX, FXM_MODE_RX_HDLC, FXM_MODE_TX, and FXM_MODE_TX_HDLC.

Referenced by fmDebugTraceParser().

int fmDebugTraceParser | ( | int | msgId,
 |  | int | msgData,
 |  | char * | dstPtr
 | ) |  |

Definition at line 156 of file fmDebugTraceParser.c.

References fmDebugGetFMMode(), fmDebugGetFMState(), fmDebugGetModulation(), and msgString.

Referenced by siuFmDebugInfo().

Here is the call graph for this function:

Variable Documentation

char msgString[40]

Definition at line 7 of file fmDebugTraceParser.c.

Referenced by fmDebugTraceParser().


FM: fmDebugTraceParser.c Source File

fmDebugTraceParser.c

Go to the documentation of this file.
00001 #include <string.h>
00002 #include <stdio.h>
00003 #include <ti/mas/types/types.h>
00004 #include <ti/mas/fm/src/fmtrace.h>
00005 #include <ti/mas/fm/src/fmloc.h>
00006
00007 char msgString[40];
00008
00009 typedef enum {
00010   FXM_MODE_OFF,           /* turn modem off */
00011   FXM_MODE_RX,            /* set modem to receive mode */
00012   FXM_MODE_RX_HDLC,       /* set modem to receive mode and do HDLC processing */
00013   FXM_MODE_TX,            /* set modem to transmit mode */
00014   FXM_MODE_TX_HDLC,       /* set modem to transmit mode and do HDLC processing */
00015   FXM_MODE_COUNT          /* number of FXM modes */
00016 } FxmMode_e;
00017
00018 void fmDebugGetFMState (int msgData, char *string)
00019 {
00020    switch (msgData)
00021    {
00022       case FM_OFFLINE_STATE:
00023          sprintf (string, "offline");
00024          break;
00025
00026       case FM_HS_RX_STATE:
00027          sprintf (string, "high speed rx");
00028          break;
00029
00030       case FM_LS_RX_STATE:
00031          sprintf (string, "low speed rx");
00032          break;
00033
00034       case FM_LS_TX_STATE_FLAG:
00035          sprintf (string, "low speed tx flag");
00036          break;
00037
00038       case FM_LS_TX_STATE_DATA:
00039          sprintf (string, "low speed tx data");
00040          break;
00041
00042       case FM_LS_TX_STATE_FCS:
00043          sprintf (string, "low speed tx fcs");
00044          break;
00045
00046       case FM_HS_TX_STATE_TRAINING:
00047          sprintf (string, "high speed tx training");
00048          break;
00049
00050       case FM_HS_TX_STATE_DATA:
00051          sprintf (string, "high speed tx data");
00052          break;
00053
00054       case FM_HS_TX_STATE_PRE_OFF:
00055          sprintf (string, "high speed tx preamble off");
00056          break;
00057
00058       case FM_HS_TX_STATE_ECM:
00059          sprintf (string, "high speed tx ecm");
00060          break;
00061    }
00062 } /* fmDebugGetFMState() */
00063
00064 void fmDebugGetModulation (int msgData, char *string)
00065 {
00066    switch (msgData)
00067    {
00068       case iffax_MODEM_MODE_V21:
00069          sprintf (string, "V.21 300bps");
00070          break;
00071
00072       case iffax_MODEM_MODE_V27_2400:
00073          sprintf (string, "V.27 2400bps");
00074          break;
00075
00076       case iffax_MODEM_MODE_V27_4800:
00077          sprintf (string, "V.27 4800bps");
00078          break;
00079
00080       case iffax_MODEM_MODE_V29_7200:
00081          sprintf (string, "V.29 7200bps");
00082          break;
00083
00084       case iffax_MODEM_MODE_V29_9600:
00085          sprintf (string, "V.29 9600bps");
00086          break;
00087
00088       case iffax_MODEM_MODE_V17_S_7200:
00089          sprintf (string, "V.17 7200bps - short training");
00090          break;
00091
00092       case iffax_MODEM_MODE_V17_S_9600:
00093          sprintf (string, "V.17 9600bps - short training");
00094          break;
00095
00096       case iffax_MODEM_MODE_V17_S_12000:
00097          sprintf (string, "V.17 12000bps - short training");
00098          break;
00099
00100       case iffax_MODEM_MODE_V17_S_14400:
00101          sprintf (string, "V.17 14400bps - short training");
00102          break;
00103
00104       case iffax_MODEM_MODE_V17_L_7200:
00105          sprintf (string, "V.17 7200bps - long training");
00106          break;
00107
00108       case iffax_MODEM_MODE_V17_L_9600:
00109          sprintf (string, "V.17 9600bps - long training");
00110          break;
00111
00112       case iffax_MODEM_MODE_V17_L_12000:
00113          sprintf (string, "V.17 12000bps - long training");
00114          break;
00115
00116       case iffax_MODEM_MODE_V17_L_14400:
00117          sprintf (string, "V.17 14400bps - long training");
00118          break;
00119
00120       case iffax_MODEM_MODE_V33_12000:
00121          sprintf (string, "V.33 12000bps");
00122          break;
00123
00124       case iffax_MODEM_MODE_V33_14400:
00125          sprintf (string, "V.33 14400bps");
00126          break;
00127    }
00128 } /* fmDebugGetModulation() */
00129
00130 void fmDebugGetFMMode (int msgData, char *string)
00131 {
00132    switch (msgData)
00133    {
00134       case FXM_MODE_OFF:
00135          sprintf (string, "off");
00136          break;
00137
00138       case FXM_MODE_RX:
00139          sprintf (string, "receive mode");
00140          break;
00141
00142       case FXM_MODE_RX_HDLC:
00143          sprintf (string, "receive mode and do HDLC processing");
00144          break;
00145
00146       case FXM_MODE_TX:
00147          sprintf (string, "transmit mode");
00148          break;
00149
00150       case FXM_MODE_TX_HDLC:
00151          sprintf (string, "transmit mode and do HDLC processing");
00152          break;
00153    }
00154 } /* fmDebugGetFMMode() */
00155
00156 int fmDebugTraceParser (int msgId, int msgData, char *dstPtr)
00157 {
00158    int returnVal = TRUE;
00159
00160    switch (msgId)
00161    {
00162 #ifndef FAX_DBG_LEVEL_1_ONLY_PARSER
00163       case FM_TRC_FIFO_FULL:
00164          sprintf (dstPtr, "The message FIFO of the FM instance is full and FM is not accepting any messages fmom fax protocol: msgId = %d",
00165                   msgData);
00166          break;
00167
00168       case FM_TRC_NEW_STATE:
00169          fmDebugGetFMState (msgData, msgString);
00170          sprintf (dstPtr, "State transition: %s", msgString);
00171          break;
00172
00173       case FM_TRC_MODE_MSG_ID:
00174          fmDebugGetFMMode (msgData, msgString);
00175          sprintf (dstPtr, "Mode change: %s", msgString);
00176          break;
00177
00178       case FM_TRC_NEW_MODULATION:
00179          fmDebugGetModulation (msgData, msgString);
00180          sprintf (dstPtr, "New modulation: %s", msgString);
00181          break;
00182
00183       case FM_TRC_CARRIER_LOSS:
00184          fmDebugGetFMState (msgData, msgString);
00185          sprintf (dstPtr, "Carrier loss detected in state: %s", msgString);
00186          break;
00187
00188       case FM_TRC_TEP_DETECT:
00189          fmDebugGetFMState (msgData, msgString);
00190          sprintf (dstPtr, "TEP detected in state: %s", msgString);
00191          break;
00192
00193       case FM_TRC_P2_DETECT:
00194          fmDebugGetFMState (msgData, msgString);
00195          sprintf (dstPtr, "P2 detected in state: %s", msgString);
00196          break;
00197
00198       case FM_TRC_PREAMBLE_DETECT:
00199          fmDebugGetFMState (msgData, msgString);
00200          sprintf (dstPtr, "Preamble detected in state: %s", msgString);
00201          break;
00202
00203       case FM_TRC_CARRIER_DETECT:
00204          fmDebugGetFMState (msgData, msgString);
00205          sprintf (dstPtr, "Carrier detected in state: %s", msgString);
00206          break;
00207
00208       case FM_TRC_DELAY_BEGIN:
00209          sprintf (dstPtr, "Beginning of the delay message processing: msgData = %x", msgData);
00210          break;
00211
00212       case FM_TRC_DELAY_END:
00213          sprintf (dstPtr, "End of the delay message processing");
00214          break;
00215
00216       case FM_TRC_FILL_PATTERN:
00217          sprintf (dstPtr, "Processed fill pattern message: fill byte = %x", msgData);
00218          break;
00219
00220       case FM_TRC_SYNC_ACK:
00221          sprintf (dstPtr, "Processed sync message");
00222          break;
00223
00224       case FM_TRC_INVALID_MSG:
00225          sprintf (dstPtr, "Invalid message received: msgId = %d", msgData);
00226          break;
00227
00228       case FM_TRC_CURRENT_STATE:
00229          fmDebugGetFMState (msgData, msgString);
00230          sprintf (dstPtr, "Current state of FM processing module: %s", msgString);
00231          break;
00232
00233       case FM_TRC_TX_UNDERRUN:
00234          sprintf (dstPtr, "Underrun during data transmission: number of bytes transmitted to modem = %d",
00235                   msgData);
00236          break;
00237
00238       case FM_TRC_DATA_BEGIN:
00239          sprintf (dstPtr, "Beginning of data RX or TX during transmission");
00240          break;
00241
00242       case FM_TRC_DATA_END:
00243          sprintf (dstPtr, "End of data RX or TX during transmission");
00244          break;
00245 #endif /* FAX_DBG_LEVEL_1_ONLY_PARSER */
00246
00247       case FM_TRC_GOOD_FRAME:
00248          sprintf (dstPtr, "TX or RX of a good HDLC frame: number of bytes in the frame = %d",
00249                   msgData);
00250          break;
00251
00252       case FM_TRC_BAD_FRAME:
00253          sprintf (dstPtr, "TX or RX of a bad HDLC frame: number of bytes in the frame = %d",
00254                   msgData);
00255          break;
00256
00257       default:
00258          returnVal = FALSE;
00259          break;
00260    }
00261
00262    return (returnVal);
00263
00264 } /* fmDebugTraceParser() */
00265
00266 /* nothing past this point */


FM: fmsim.c File Reference

fmsim.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <ti/mas/fm/src/fmloc.h>
#include <ti/mas/hdlc/hdlcTx.h>
#include <ti/mas/hdlc/hdlcRx.h>
#include <ti/mas/util/pkt.h>
#include "fmsim.h"

Include dependency graph for fmsim.c:

Go to the source code of this file.

Defines

#define | TESTDPUVECS TRUE
#define | CUSTPROB_DBG FALSE
#define | LINEAR_PCM FALSE
#define | ADD_NOISE FALSE
#define | CAPTURE_PCM_TX FALSE
#define | TEST_CDL FALSE
#define | V17_STRAIN_TST FALSE

Functions

void | ClearAllGlobalVariables (void)
void | dpuBerMeas (tword *data, int len)
int | PopulateTestDataBase (char *EcoTestDpuRoot, int LineCode)
void | wngInit (tint noise_level, tuint seed, tint *mean, tuint *rng_state)
void | UAExpand (tint len, tword *mulawPcm, Fract *out_pcm, const tint *table)
void | CaptureDataShort1 (int length, short *data, char *filename)
void | CaptureDataShort (int length, short *data, char *filename)
void | CaptureDataLFract (int length, int *data, char *filename)
tulong | siuGetTime (void)
void | siuPcmInterface_Ch1 (void *targetInst, void *PcmData)
void | siuPcmInterface_Ch2 (void *targetInst, void *PcmData)
void | siuFpInterface_Ch1 (void *targetInst, void *FmFpMessage)
void | siuFpInterface_Ch2 (void *targetInst, void *FmFpMessage)
void | siuToneDetectCtrl (void *siuInst, tuint ControlCode)
char * | GetDirectionString (int direction)
void | StatusPrintMonitor (char *dstPtr, int direction)
int | fmDebugTraceParser (int msgId, int msgData, char *dstPtr)
void | siuFmDebugInfo (void *moduleID, tuint msgType, tuint messageCode, tuint msgLength, tuint *supportingData)
void | siuFatalError (tuint id, char *str)
void | siu_init (tint chnum)
void | siu_init_lin_samples (tint chnum)
void | siu_init_fm_fp_messages (tint chnum)
void | siu_init_fp_fm_messages (iffaxModulationTypes_e HighSpeedModType)
void | siu_new_fm (tint chnum)
void | siu_open_fm (tint chnum)
void | siu_close_fm (tint chnum)
void | siu_delete_fm (tint chnum)
void | main (void)

Variables

int | rhrDataBufCnt = 1
siuInst_t | siuInst [SIU_NUMBER_OF_CHANNELS]
tulong | systemTime = 0
tbool | running = TRUE
char | siuDebugString = 0
char | siuFatalString = 0
tuint | siuTermCode = 0
fmStatsReport_t | siuFmStats [2]
fmTablePtrs_t | fmTablePtrs
const tuint | gg_pmst_init = 0x7fe0
const tuint | gg_swwsr_init = 0x2208
const tuint | gg_bscr_init = 0x0000
iffaxFmFpMsg_t | GlobalFmFpMsgOut [SIU_NUMBER_OF_CHANNELS][SIU_FM_FP_OUT_MSG_ARRAY_SIZE]
tuint | GlobalFmFpMsgOutIndex1 = 0
tuint | GlobalFmFpMsgOutIndex2 = 0
iffaxFpFmMsg_t | GlobalFpFmMsgIn [SIU_NUMBER_OF_CHANNELS][SIU_FP_FM_IN_MSG_ARRAY_SIZE]
tuint | GlobalFpFmMsgInIndex1 = 0
tuint | GlobalFpFmMsgInIndex2 = 0
tword | FpFmLsData [32]
tword | FpFmHsData [40]
tword | FpFmTestData [40]
Fract | GlobalLinSample [SIU_NUMBER_OF_CHANNELS][SIU_FM_LIN_SAMPLE_ARRAY_SIZE]
tulong | BerCount = 0
tulong | OnesCount = 0
tulong | limit_count = 0
tint | loop_flag = 1
iffaxModulationTypes_e | ModAssoc [125]
int | ByteBuf [30]
tword | bit_mask
char | TestFileNames [125][60]
volatile int | FirstTime1 = 1
volatile int | FirstTime = 1
int | FirstTime123 = 1
tuint | i = 0
tuint | TxCap = 0
tuint | RxCap = 0
int | gbindx = 0
fmContext_t | fmContext
tuint | CDLoss [10] = {0xdead,0xdead,0xdead,0xdead,0xdead,0xdead,0xdead,0xdead,0xdead,0xdead}
tuint | CDLossInd = 0
tulong | CDLossTime [10]
tuint | CDLossTimeInd = 0
tuint | ch1_msg_num = 0
tuint | ch2_msg_num = 0
tint | NOISELEVEL = -168
tint | MEAN = 0
tuint | SEED = 0
tuint | RNGSTATE = 0

Define Documentation

#define TESTDPUVECS TRUE

Definition at line 37 of file fmsim.c.

Referenced by main().

#define CUSTPROB_DBG FALSE

Definition at line 38 of file fmsim.c.

#define LINEAR_PCM FALSE

Definition at line 39 of file fmsim.c.

#define ADD_NOISE FALSE

Definition at line 40 of file fmsim.c.

#define CAPTURE_PCM_TX FALSE

Definition at line 41 of file fmsim.c.

#define TEST_CDL FALSE

Definition at line 42 of file fmsim.c.

#define V17_STRAIN_TST FALSE

Definition at line 43 of file fmsim.c.

Function Documentation

void ClearAllGlobalVariables ( void )

Referenced by main().

void dpuBerMeas | ( | tword * | data,
 |  | int | len
 | ) |  |

Definition at line 142 of file fmsim.c.

References i.

Referenced by siuFpInterface_Ch2().

int PopulateTestDataBase | ( | char * | EcoTestDpuRoot,
 |  | int | LineCode
 | ) |  |

Referenced by main().

void wngInit | ( | tint | noise_level,
 |  | tuint | seed,
 |  | tint * | mean,
 |  | tuint * | rng_state
 | ) |  |

Referenced by main().

void UAExpand | ( | tint | len,
 |  | tword * | mulawPcm,
 |  | Fract * | out_pcm,
 |  | const tint * | table
 | ) |  |

Definition at line 163 of file fmsim.c.

Referenced by main().

void CaptureDataShort1 | ( | int | length,
 |  | short * | data,
 |  | char * | filename
 | ) |  |

Definition at line 186 of file fmsim.c.

References i.

Referenced by main().

void CaptureDataShort | ( | int | length,
 |  | short * | data,
 |  | char * | filename
 | ) |  |

Definition at line 230 of file fmsim.c.

References i.

void CaptureDataLFract | ( | int | length,
 |  | int * | data,
 |  | char * | filename
 | ) |  |

Definition at line 273 of file fmsim.c.

References i.

tulong siuGetTime ( void )

Definition at line 331 of file fmsim.c.

References systemTime.

void siuPcmInterface_Ch1 | ( | void * | targetInst,
 |  | void * | PcmData
 | ) |  |

Definition at line 356 of file fmsim.c.

References i, and SIU_FM_LIN_SAMPLE_ARRAY_SIZE.

Referenced by siu_open_fm().

void siuPcmInterface_Ch2 | ( | void * | targetInst,
 |  | void * | PcmData
 | ) |  |

Definition at line 388 of file fmsim.c.

References i, and SIU_FM_LIN_SAMPLE_ARRAY_SIZE.

Referenced by siu_open_fm().

void siuFpInterface_Ch1 | ( | void * | targetInst,
 |  | void * | FmFpMessage
 | ) |  |

Definition at line 414 of file fmsim.c.

References SIU_FM_FP_OUT_MSG_ARRAY_SIZE.

Referenced by siu_open_fm().

void siuFpInterface_Ch2 | ( | void * | targetInst,
 |  | void * | FmFpMessage
 | ) |  |

Definition at line 437 of file fmsim.c.

References dpuBerMeas(), and SIU_FM_FP_OUT_MSG_ARRAY_SIZE.

Referenced by siu_open_fm().

Here is the call graph for this function:

void siuToneDetectCtrl | ( | void * | siuInst,
 |  | tuint | ControlCode
 | ) |  |

Definition at line 468 of file fmsim.c.

Referenced by siu_open_fm().

char* GetDirectionString ( int direction )

Definition at line 475 of file fmsim.c.

Referenced by StatusPrintMonitor().

void StatusPrintMonitor | ( | char * | dstPtr,
 |  | int | direction
 | ) |  |

Definition at line 486 of file fmsim.c.

References GetDirectionString().

Referenced by siuFmDebugInfo().

Here is the call graph for this function:

int fmDebugTraceParser | ( | int | msgId,
 |  | int | msgData,
 |  | char * | dstPtr
 | ) |  |

Definition at line 156 of file fmDebugTraceParser.c.

References fmDebugGetFMMode(), fmDebugGetFMState(), fmDebugGetModulation(), and msgString.

Referenced by siuFmDebugInfo().

Here is the call graph for this function:

void siuFmDebugInfo | ( | void * | moduleID,
 |  | tuint | msgType,
 |  | tuint | messageCode,
 |  | tuint | msgLength,
 |  | tuint * | supportingData
 | ) |  |

Definition at line 514 of file fmsim.c.

References fmDebugTraceParser(), SIU_EXCEPTION_FM_DBG_DEFAULT, SIU_EXCEPTION_FM_DBG_FATAL_ERROR, siuFatalError(), and StatusPrintMonitor().

Referenced by main().

Here is the call graph for this function:

void siuFatalError | ( | tuint | id,
 |  | char * | str
 | ) |  |

Definition at line 579 of file fmsim.c.

References siuFatalString.

Referenced by siu_new_fm(), siu_open_fm(), and siuFmDebugInfo().

void siu_init ( tint chnum )

Definition at line 601 of file fmsim.c.

References siuInst_t::aux_heap_size, siuInst_t::fm_heap_size, siuInst_t::fmBufs, siuInst_t::fmInst, siuInst_t::fmNbufs, siuInst_t::ID, SIU_SIU_ID, and siuInst.

Referenced by main().

void siu_init_lin_samples ( tint chnum )

Definition at line 626 of file fmsim.c.

References i, and SIU_FM_LIN_SAMPLE_ARRAY_SIZE.

Referenced by main().

void siu_init_fm_fp_messages ( tint chnum )

Definition at line 649 of file fmsim.c.

References i, and SIU_FM_FP_OUT_MSG_ARRAY_SIZE.

Referenced by main().

void siu_init_fp_fm_messages ( iffaxModulationTypes_e HighSpeedModType )

Definition at line 690 of file fmsim.c.

Referenced by main().

void siu_new_fm ( tint chnum )

Definition at line 750 of file fmsim.c.

References siuInst_t::aux_heap_size, siuInst_t::fm_heap_size, siuInst_t::fmBufs, siuInst_t::fmInst, siuInst_t::fmNbufs, i, SIU_EXCEPTION_FM_NEW_ERR, SIU_EXCEPTION_FM_SIZES_ERR, SIU_FM_ID, siuFatalError(), and siuInst.

Referenced by main().

Here is the call graph for this function:

void siu_open_fm ( tint chnum )

Definition at line 814 of file fmsim.c.

References siuInst_t::fmInst, fmTablePtrs, SIU_EXCEPTION_FM_OPEN_ERR, SIU_FM_ID, siuFatalError(), siuFpInterface_Ch1(), siuFpInterface_Ch2(), siuInst, siuPcmInterface_Ch1(), siuPcmInterface_Ch2(), and siuToneDetectCtrl().

Referenced by main().

Here is the call graph for this function:

void siu_close_fm ( tint chnum )

Definition at line 870 of file fmsim.c.

References siuInst_t::fmInst, and siuInst.

Referenced by main().

void siu_delete_fm ( tint chnum )

Definition at line 889 of file fmsim.c.

References siuInst_t::aux_heap_size, siuInst_t::fm_heap_size, siuInst_t::fmBufs, siuInst_t::fmInst, siuInst_t::fmNbufs, and siuInst.

Referenced by main().

void main ( void )

Definition at line 942 of file fmsim.c.

References CaptureDataShort1(), ClearAllGlobalVariables(), MEAN, modC1, NOC1FILES, ONES_LIMIT, PopulateTestDataBase(), RNGSTATE, running, RxCap, siu_close_fm(), siu_delete_fm(), siu_init(), siu_init_fm_fp_messages(), siu_init_fp_fm_messages(), siu_init_lin_samples(), siu_new_fm(), SIU_NUMBER_OF_CHANNELS, siu_open_fm(), siuFmDebugInfo(), siuFmStats, siuInst, systemTime, tblAlaw, tblUlaw, TESTDPUVECS, TestFileNamesC1, TxCap, UAExpand(), and wngInit().

Here is the call graph for this function:

Variable Documentation

int rhrDataBufCnt = 1

Definition at line 62 of file fmsim.c.

siuInst_t siuInst[SIU_NUMBER_OF_CHANNELS]

Definition at line 64 of file fmsim.c.

Referenced by main(), siu_close_fm(), siu_delete_fm(), siu_init(), siu_new_fm(), and siu_open_fm().

tulong systemTime = 0

Definition at line 67 of file fmsim.c.

Referenced by main(), and siuGetTime().

tbool running = TRUE

Definition at line 70 of file fmsim.c.

Referenced by main().

char siuDebugString = 0

Definition at line 73 of file fmsim.c.

char siuFatalString = 0

Definition at line 76 of file fmsim.c.

Referenced by siuFatalError().

tuint siuTermCode = 0

Definition at line 79 of file fmsim.c.

fmStatsReport_t siuFmStats[2]

Definition at line 82 of file fmsim.c.

Referenced by main().

fmTablePtrs_t fmTablePtrs

Initial value:

{
   (v29Table_sPtrs_t *)fm_TABLE1_START,
   (v27Table_sPtrs_t *)fm_TABLE2_START,
   (v17Table_sPtrs_t *)fm_TABLE3_START,
   (commonTable1_sPtrs_t *)fm_TABLE4_START,
   (Fract *)fm_TABLE5_START
}

Definition at line 84 of file fmsim.c.

Referenced by siu_open_fm().

const tuint gg_pmst_init = 0x7fe0

Definition at line 94 of file fmsim.c.

const tuint gg_swwsr_init = 0x2208

Definition at line 95 of file fmsim.c.

const tuint gg_bscr_init = 0x0000

Definition at line 96 of file fmsim.c.

iffaxFmFpMsg_t GlobalFmFpMsgOut[SIU_NUMBER_OF_CHANNELS][SIU_FM_FP_OUT_MSG_ARRAY_SIZE]

Definition at line 99 of file fmsim.c.

tuint GlobalFmFpMsgOutIndex1 = 0

Definition at line 100 of file fmsim.c.

tuint GlobalFmFpMsgOutIndex2 = 0

Definition at line 101 of file fmsim.c.

iffaxFpFmMsg_t GlobalFpFmMsgIn[SIU_NUMBER_OF_CHANNELS][SIU_FP_FM_IN_MSG_ARRAY_SIZE]

Definition at line 104 of file fmsim.c.

tuint GlobalFpFmMsgInIndex1 = 0

Definition at line 105 of file fmsim.c.

tuint GlobalFpFmMsgInIndex2 = 0

Definition at line 106 of file fmsim.c.

tword FpFmLsData[32]

Initial value:

 {0x00FF, 0x00C0, 0x004, 0x00b5,0x00FF, 0x00C0, 0x004, 0x00b5,
                            0x00FF, 0x00C0, 0x004, 0x00b5,0x00FF, 0x00C0, 0x004, 0x00b5,
                            0x00FF, 0x00C0, 0x004, 0x00b5,0x00FF, 0x00C0, 0x004, 0x00b5,
                            0x00FF, 0x00C0, 0x004, 0x00b5,0x00FF, 0x00C0, 0x004, 0x00b5}

Definition at line 108 of file fmsim.c.

tword FpFmHsData[40]

Initial value:

 {0X01,0X02,0X03,0X04,0X05,0X06,0X07,0X08,
              0X09,0X10,0X11,0x12,0X13,0X14,0X15,0X16,
              0X17,0X18,0X19,0X20,0X21,0X22,0X23,0X24,
              0X25,0X26,0X27,0X28,0X29,0X30,0X31,0X32,
              0X32,0X33,0X34,0X35,0X36,0X37,0X38,0X39}

Definition at line 112 of file fmsim.c.

tword FpFmTestData[40]

Initial value:

 {0xFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
              0xFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
              0xFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
              0xFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
              0xFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF}

Definition at line 118 of file fmsim.c.

Fract GlobalLinSample[SIU_NUMBER_OF_CHANNELS][SIU_FM_LIN_SAMPLE_ARRAY_SIZE]

Definition at line 124 of file fmsim.c.

tulong BerCount = 0

Definition at line 132 of file fmsim.c.

tulong OnesCount = 0

Definition at line 133 of file fmsim.c.

tulong limit_count = 0

Definition at line 134 of file fmsim.c.

tint loop_flag = 1

Definition at line 135 of file fmsim.c.

iffaxModulationTypes_e ModAssoc[125]

Definition at line 136 of file fmsim.c.

int ByteBuf[30]

Definition at line 137 of file fmsim.c.

tword bit_mask

Definition at line 138 of file fmsim.c.

char TestFileNames[125][60]

Definition at line 140 of file fmsim.c.

volatile int FirstTime1 = 1

Definition at line 184 of file fmsim.c.

volatile int FirstTime = 1

Definition at line 228 of file fmsim.c.

int FirstTime123 = 1

Definition at line 272 of file fmsim.c.

tuint i = 0

Definition at line 923 of file fmsim.c.

Referenced by CaptureDataLFract(), CaptureDataShort(), CaptureDataShort1(), dpuBerMeas(), siu_init_fm_fp_messages(), siu_init_lin_samples(), siu_new_fm(), siuPcmInterface_Ch1(), and siuPcmInterface_Ch2().

tuint TxCap = 0

Definition at line 923 of file fmsim.c.

Referenced by main().

tuint RxCap = 0

Definition at line 923 of file fmsim.c.

Referenced by main().

int gbindx = 0

Definition at line 924 of file fmsim.c.

fmContext_t fmContext

Initial value:

{
   siuFmDebugInfo,
   siuGetTime,
   NULL
}

Definition at line 925 of file fmsim.c.

tuint CDLoss[10] = {0xdead,0xdead,0xdead,0xdead,0xdead,0xdead,0xdead,0xdead,0xdead,0xdead}

Definition at line 932 of file fmsim.c.

tuint CDLossInd = 0

Definition at line 933 of file fmsim.c.

tulong CDLossTime[10]

Definition at line 935 of file fmsim.c.

tuint CDLossTimeInd = 0

Definition at line 936 of file fmsim.c.

tuint ch1_msg_num = 0

Definition at line 937 of file fmsim.c.

tuint ch2_msg_num = 0

Definition at line 938 of file fmsim.c.

tint NOISELEVEL = -168

Definition at line 939 of file fmsim.c.

tint MEAN = 0

Definition at line 939 of file fmsim.c.

Referenced by main().

tuint SEED = 0

Definition at line 940 of file fmsim.c.

tuint RNGSTATE = 0

Definition at line 940 of file fmsim.c.

Referenced by main().


FM: fmsim.c Source File

fmsim.c

Go to the documentation of this file.
00001 /******************************************************************************
00002  * FILE PURPOSE: Main routine for exercising FM API function calls.
00003  *
00004  ******************************************************************************
00005  * FILE NAME:    fmsim.c
00006  *
00007  * DESCRIPTION:  This file contains functions, variables and processing code
00008  *               designed to provide a simulation for Telogy's Fax Modem module.
00009  *               By implementing this simulation, system integrators can the
00010  *               FM module, and the manner in which the FM API is accessed.
00011  *
00012  *               Consult the Telogy FM Application Programmer's Interface
00013  *               (API) document for detailed instructions on how to use this
00014  *               code.
00015  *
00016  * FUNCTION                 DESCRIPTION
00017  * ========                 ===========
00018  * main                     Main processing routine for FM simulation
00019  * siu_init                 Initialize SIU
00020  * siu_init_fm_fp_messages  Initialize FM_FP message buffer
00021  * siu_init_fp_fm_messages  Initialize FP_FM message buffer
00022  * siu_new_fm               Create an instance of FM
00023  * siu_open_fm              Open an instance of FM
00024  * siu_close_fm             Close an instance of FM
00025  * siu_delete_fm            Delete an instance of FM
00026  *
00027  * (C) Copyright 2002, TELOGY Networks, Inc.
00028  *****************************************************************************/
00029 #include <stdio.h>
00030 #include <stdlib.h>
00031
00032 #include <ti/mas/fm/src/fmloc.h>
00033 #include <ti/mas/hdlc/hdlcTx.h>
00034 #include <ti/mas/hdlc/hdlcRx.h>
00035 #include <ti/mas/util/pkt.h>
00036
00037 #define  TESTDPUVECS    TRUE
00038 #define  CUSTPROB_DBG   FALSE
00039 #define  LINEAR_PCM     FALSE
00040 #define  ADD_NOISE      FALSE
00041 #define  CAPTURE_PCM_TX FALSE
00042 #define  TEST_CDL       FALSE
00043 #define  V17_STRAIN_TST FALSE
00044
00045 #include "fmsim.h"
00046
00047 #if      TESTDPUVECS
00048 #include <string.h>
00049 #include <ti/mas/util/utl.h>
00050 #define FILEIO
00051 #endif
00052
00053 #if      CUSTPROB_DBG
00054 #include <string.h>
00055 #include <ti/mas/util/util.h>
00056 #define FILEIO
00057 #endif
00058
00059 /******************************************************************************
00060  * GLOBAL VARIABLE DEFINITIONS
00061  *****************************************************************************/
00062 int rhrDataBufCnt = 1;
00063 /* Global SIU channel instance */
00064 siuInst_t siuInst[SIU_NUMBER_OF_CHANNELS];
00065
00066 /* Gobal system timer variable */
00067 tulong systemTime = 0;
00068
00069 /* Gobal boolean used to break out of main() processing loop */
00070 tbool running = TRUE;
00071
00072 /* Global char signifying entity calling siuFmDebug() function */
00073 char siuDebugString = 0;
00074
00075 /* Global char signifying entity calling siuFatalError() function */
00076 char siuFatalString = 0;
00077
00078 /* Global tuint designating reason for calling fmCleardown function */
00079 tuint siuTermCode = 0;
00080
00081 /* Global network and fax call statistics structures */
00082 fmStatsReport_t siuFmStats[2];
00083
00084 fmTablePtrs_t fmTablePtrs =
00085 {
00086    (v29Table_sPtrs_t *)fm_TABLE1_START,
00087    (v27Table_sPtrs_t *)fm_TABLE2_START,
00088    (v17Table_sPtrs_t *)fm_TABLE3_START,
00089    (commonTable1_sPtrs_t *)fm_TABLE4_START,
00090    (Fract *)fm_TABLE5_START
00091 };
00092
00093 /* Following work for C549 XDS platform */
00094 const tuint gg_pmst_init  = 0x7fe0;
00095 const tuint gg_swwsr_init = 0x2208;
00096 const tuint gg_bscr_init =  0x0000;
00097
00098 /* Gobal FM_FP message array with index. Used to store FM_FM_MSG output */
00099 iffaxFmFpMsg_t GlobalFmFpMsgOut [SIU_NUMBER_OF_CHANNELS] [SIU_FM_FP_OUT_MSG_ARRAY_SIZE];
00100 tuint          GlobalFmFpMsgOutIndex1 = 0;
00101 tuint          GlobalFmFpMsgOutIndex2 = 0;
00102
00103 /* Gobal FP_FM message array with index. Used to send input messages to FM */
00104 iffaxFpFmMsg_t GlobalFpFmMsgIn [SIU_NUMBER_OF_CHANNELS] [SIU_FP_FM_IN_MSG_ARRAY_SIZE];
00105 tuint          GlobalFpFmMsgInIndex1 = 0;
00106 tuint          GlobalFpFmMsgInIndex2 = 0;
00107 //tword      FpFmLsData[4]  = {0x0004, 0x0002, 0x0001, 0x0000};
00108 tword      FpFmLsData[32] = {0x00FF, 0x00C0, 0x004, 0x00b5,0x00FF, 0x00C0, 0x004, 0x00b5,
00109                             0x00FF, 0x00C0, 0x004, 0x00b5,0x00FF, 0x00C0, 0x004, 0x00b5,
00110                             0x00FF, 0x00C0, 0x004, 0x00b5,0x00FF, 0x00C0, 0x004, 0x00b5,
00111                             0x00FF, 0x00C0, 0x004, 0x00b5,0x00FF, 0x00C0, 0x004, 0x00b5};
00112 tword      FpFmHsData[40] = {0X01,0X02,0X03,0X04,0X05,0X06,0X07,0X08,
00113               0X09,0X10,0X11,0x12,0X13,0X14,0X15,0X16,
00114               0X17,0X18,0X19,0X20,0X21,0X22,0X23,0X24,
00115               0X25,0X26,0X27,0X28,0X29,0X30,0X31,0X32,
00116               0X32,0X33,0X34,0X35,0X36,0X37,0X38,0X39};
00117
00118 tword      FpFmTestData[40] = {0xFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
00119               0xFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
00120               0xFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
00121               0xFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,
00122               0xFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF};
00123 /* Global PCM data buffer to store output of FM's PCM interface */
00124 Fract GlobalLinSample [SIU_NUMBER_OF_CHANNELS] [SIU_FM_LIN_SAMPLE_ARRAY_SIZE];
00125
00126 /* Local Functions */
00127 void ClearAllGlobalVariables(void);
00128 void dpuBerMeas(tword *data, int len);
00129 int  PopulateTestDataBase(char *EcoTestDpuRoot,int LineCode);
00130 extern void wngInit (tint noise_level, tuint seed, tint *mean, tuint *rng_state);
00131
00132 tulong BerCount = 0;
00133 tulong OnesCount =0;
00134 tulong limit_count=0;
00135 tint   loop_flag = 1;
00136 iffaxModulationTypes_e ModAssoc[125];
00137 int ByteBuf[30];
00138 tword bit_mask;
00139 //extern LFract power_sat,sig_power,CDLPendingFlag;
00140 char TestFileNames[125][60];
00141
00142 void dpuBerMeas(tword *data, int len)
00143 {
00144  int i =0;
00145  tword *RxByteBuf;
00146  volatile tword tmp;
00147   RxByteBuf = data;
00148   for (i=0; i < len; i++) {
00149     ByteBuf[i] = pktRead8bits(RxByteBuf,i);
00150     for ( bit_mask = (tword)0x80; bit_mask != 0; bit_mask >>= 1 ) {
00151       tmp = bit_mask & ByteBuf[i];
00152        if (tmp == 0)
00153        {
00154           BerCount++;
00155        }
00156       OnesCount++;
00157       limit_count++;
00158     }
00159   }
00160
00161 } /* dpuBerMeas */
00162
00163 void UAExpand(tint len, tword *mulawPcm, Fract *out_pcm, const tint *table){
00164
00165   tint pcm_8th_bit,pcm_mask,PCM_MASK =0x7f;
00166   Fract ret_value;
00167   int j;
00168
00169   for (j=0; j<len;j++)
00170   {
00171     pcm_mask    = mulawPcm[j] & PCM_MASK;
00172     pcm_8th_bit = mulawPcm[j] & 0x080;
00173     ret_value   = (Fract)table[pcm_mask];
00174
00175     if (!pcm_8th_bit)
00176     {
00177       ret_value= ~ret_value;
00178       ret_value = ret_value +1;
00179     }
00180     out_pcm[j] = ret_value;
00181   }
00182 } /* UAExpand */
00183
00184 volatile int FirstTime1 =1;
00185
00186 void CaptureDataShort1(int length, short *data,char *filename)
00187 {
00188   int i,result;
00189   char OutFileName[30];
00190   FILE *OutHexFile;
00191
00192   strcpy(OutFileName,filename);
00193   if (FirstTime1) {
00194     /* Open for read (will fail if file "data" does not exist) */
00195     if( (OutHexFile = fopen(OutFileName,"w" )) == NULL ) {
00196       printf( "The OutBinFile not opened for write\n");
00197       getchar();
00198       exit(0);
00199     }
00200
00201     result = fseek(OutHexFile,0L,SEEK_SET);
00202   //  fprintf(OutHexFile,"1651 1 0 0 0\n");
00203     if( result ) {
00204       printf("Fseek failed" );
00205       getchar();
00206       exit(0);
00207     }
00208     for (i =0; i < length; i++) {
00209       fprintf(OutHexFile,"%d\n",data[i]);
00210     }
00211     FirstTime1 =0;
00212     i= fclose(OutHexFile);
00213   }
00214   else {
00215     /* Open for read (will fail if file "data" does not exist) */
00216     if( (OutHexFile = fopen(OutFileName,"a" )) == NULL ) {
00217       printf( "The OutBinFile not opened for append mode\n");
00218       getchar();
00219       exit(0);
00220     }
00221     for (i =0; i < length; i++) {
00222       fprintf(OutHexFile,"%d\n",data[i]);
00223     }
00224     i= fclose(OutHexFile);
00225   }
00226 } /* CaptureDataShort1 */
00227
00228 volatile int FirstTime =1;
00229
00230 void CaptureDataShort(int length, short *data,char *filename)
00231 {
00232   int i,result;
00233   char OutFileName[30];
00234   FILE *OutHexFile;
00235
00236   strcpy(OutFileName,filename);
00237   if (FirstTime) {
00238     /* Open for read (will fail if file "data" does not exist) */
00239     if( (OutHexFile = fopen(OutFileName,"w" )) == NULL ) {
00240       printf( "The OutBinFile not opened for write\n");
00241       getchar();
00242       exit(0);
00243     }
00244
00245     result = fseek(OutHexFile,0L,SEEK_SET);
00246   //  fprintf(OutHexFile,"1651 1 0 0 0\n");
00247     if( result ) {
00248       printf("Fseek failed" );
00249       getchar();
00250       exit(0);
00251     }
00252     for (i =0; i < length; i++) {
00253       fprintf(OutHexFile,"%d\n",data[i]);
00254     }
00255     FirstTime =0;
00256     i= fclose(OutHexFile);
00257   }
00258   else {
00259     /* Open for read (will fail if file "data" does not exist) */
00260     if( (OutHexFile = fopen(OutFileName,"a" )) == NULL ) {
00261       printf( "The OutBinFile not opened for append mode\n");
00262       getchar();
00263       exit(0);
00264     }
00265     for (i =0; i < length; i++) {
00266       fprintf(OutHexFile,"%d\n",data[i]);
00267     }
00268     i= fclose(OutHexFile);
00269   }
00270 } /* CaptureDataShort */
00271
00272 int FirstTime123 = 1;
00273 void CaptureDataLFract(int length, int *data,char *filename)
00274 {
00275   int i,result;
00276   char OutFileName[30];
00277   FILE *OutHexFile;
00278
00279   strcpy(OutFileName,filename);
00280   if (FirstTime123) {
00281     /* Open for read (will fail if file "data" does not exist) */
00282     if( (OutHexFile = fopen(OutFileName,"w" )) == NULL ) {
00283       printf( "The OutBinFile not opened for write\n");
00284       getchar();
00285       exit(0);
00286     }
00287
00288     result = fseek(OutHexFile,0L,SEEK_SET);
00289   //  fprintf(OutHexFile,"1651 3 1000 1 3\n");
00290     if( result ) {
00291       printf("Fseek failed" );
00292       getchar();
00293       exit(0);
00294     }
00295     for (i =0; i < length; i++) {
00296       fprintf(OutHexFile,"%d\n",data[i]);
00297     }
00298     FirstTime123 =0;
00299     i= fclose(OutHexFile);
00300   }
00301   else {
00302     /* Open for read (will fail if file "data" does not exist) */
00303     if( (OutHexFile = fopen(OutFileName,"a" )) == NULL ) {
00304       printf( "The OutBinFile not opened for append mode\n");
00305       getchar();
00306       exit(0);
00307     }
00308     for (i =0; i < length; i++) {
00309       fprintf(OutHexFile,"%d\n",data[i]);
00310     }
00311     i= fclose(OutHexFile);
00312   }
00313 } /* CaptureDataLFract */
00314
00315 /******************************************************************************
00316  * GLOBAL FUNCTION DEFINITIONS
00317  *****************************************************************************/
00318
00319 /******************************************************************************
00320  * FUNCTION PURPOSE: Gets SIU system time in milliseconds.
00321  ******************************************************************************
00322  * DESCRIPTION: Returns current value of system time (in milliseconds).
00323  *
00324  * CALLING FORMAT:
00325  *   siuGetTime ()
00326  *
00327  * RETURN VALUE:
00328  *   systemTime        - 32-bit indication of system time (in ms)
00329  *
00330  *****************************************************************************/
00331 tulong siuGetTime (void)
00332 {
00333   return (systemTime);
00334
00335 } /* siuGetTime */
00336
00337 /******************************************************************************
00338  * FUNCTION PURPOSE: Implements fmSendOut() API function, which sends network
00339  *                   packets to the network interface.
00340  ******************************************************************************
00341  * DESCRIPTION: Routine called by FM to send packet(s) toward the network.
00342  *              FM sends packets out (in the SendOut direction) to whatever
00343  *              packet processing module is tied to fmSendOut - in this case
00344  *              siuNetInterface, which accepts packets but does no processing.
00345  *              Return value signifies that there was not an error.
00346  *
00347  * CALLING FORMAT:
00348  *   siuPcmInterface (void *targetInst,    - ptr to packet processing module
00349  *                    tint PcmData,      - number of complete network pkts
00350  *                                           being sent to the network
00351  *
00352  * RETURN VALUE:
00353  *   None
00354  *
00355  *****************************************************************************/
00356 void siuPcmInterface_Ch1 (void *targetInst, void *PcmData)
00357 {
00358    tuint i;
00359    Fract *pcm = (Fract *) PcmData;
00360
00361
00362    for (i = 0; i < SIU_FM_LIN_SAMPLE_ARRAY_SIZE; i++)
00363    {
00364       GlobalLinSample [0] [i] = pcm[i];
00365    }
00366
00367 } /* siuPcmInterface__Ch1 */
00368
00369 /******************************************************************************
00370  * FUNCTION PURPOSE: Implements fmSendOut() API function, which sends network
00371  *                   packets to the network interface.
00372  ******************************************************************************
00373  * DESCRIPTION: Routine called by FM to send packet(s) toward the network.
00374  *              FM sends packets out (in the SendOut direction) to whatever
00375  *              packet processing module is tied to fmSendOut - in this case
00376  *              siuNetInterface, which accepts packets but does no processing.
00377  *              Return value signifies that there was not an error.
00378  *
00379  * CALLING FORMAT:
00380  *   siuPcmInterface (void *targetInst,    - ptr to packet processing module
00381  *                    tint PcmData,      - number of complete network pkts
00382  *                                           being sent to the network
00383  *
00384  * RETURN VALUE:
00385  *   None
00386  *
00387  *****************************************************************************/
00388 void siuPcmInterface_Ch2 (void *targetInst, void *PcmData)
00389 {
00390    tuint i;
00391    Fract *pcm = (Fract *) PcmData;
00392
00393
00394    for (i = 0; i < SIU_FM_LIN_SAMPLE_ARRAY_SIZE; i++)
00395    {
00396       GlobalLinSample [1] [i] = pcm[i];
00397    }
00398
00399 } /* siuPcmInterface_Ch2 */
00400
00401 /******************************************************************************
00402  * FUNCTION PURPOSE: Interface to the FP module (FIU or FaxTerm app)
00403  ******************************************************************************
00404  * DESCRIPTION:
00405  *
00406  * CALLING FORMAT:
00407  *   siuFpInterface  (void *targetInst,    - ptr to FM processing module
00408  *                    void *FpFmMessage)   - ptr to message for FM
00409  *
00410  * RETURN VALUE:
00411  *   None
00412  *
00413  *****************************************************************************/
00414 void siuFpInterface_Ch1 (void *targetInst, void *FmFpMessage)
00415 {
00416    iffaxFmFpMsg_t *localMsg = (iffaxFmFpMsg_t *)FmFpMessage;
00417
00418    GlobalFmFpMsgOut [0] [GlobalFmFpMsgOutIndex1 ++] = *(localMsg);
00419
00420    GlobalFmFpMsgOutIndex1 = GlobalFmFpMsgOutIndex1 % SIU_FM_FP_OUT_MSG_ARRAY_SIZE;
00421
00422 } /* siuFpInterface_Ch1 */
00423
00424 /******************************************************************************
00425  * FUNCTION PURPOSE: Interface to the FP module (FIU or FaxTerm app)
00426  ******************************************************************************
00427  * DESCRIPTION:
00428  *
00429  * CALLING FORMAT:
00430  *   siuFpInterface  (void *targetInst,    - ptr to FM processing module
00431  *                    void *FpFmMessage)   - ptr to message for FM
00432  *
00433  * RETURN VALUE:
00434  *   None
00435  *
00436  *****************************************************************************/
00437 void siuFpInterface_Ch2 (void *targetInst, void *FmFpMessage)
00438 {
00439    iffaxFmFpMsg_t *localMsg = (iffaxFmFpMsg_t *)FmFpMessage;
00440    tword *data;
00441    int len;
00442
00443    GlobalFmFpMsgOutIndex2 = GlobalFmFpMsgOutIndex2 % SIU_FM_FP_OUT_MSG_ARRAY_SIZE;
00444
00445    data = localMsg->MsgBody.DataPayload.DataAddress;
00446    len  = localMsg->MsgBody.DataPayload.numBytes;
00447    if (len > 0)
00448    {
00449      dpuBerMeas(data,len);
00450    }
00451
00452 } /* siuFpInterface_Ch2 */
00453
00454 #ifndef NO_TONESUPP
00455 /******************************************************************************
00456  * FUNCTION PURPOSE: Tone Detector Unit control processing
00457  ******************************************************************************
00458  * DESCRIPTION: Send a control command to the Tone Detector Unit.
00459  *              Currently we simply enable or disable the TDU.
00460  *
00461  *  void siuToneOn (
00462  *    void    *siuInst,     - pointer to channel instance
00463  *    tuint    ControlCode) - configuration of TDU:
00464  *                            0 = iffax_TONE_DETECT_CTRL_DISABLE,
00465  *                            1 = iffax_TONE_DETECT_CTRL_ENABLE
00466  *
00467  *****************************************************************************/
00468 void siuToneDetectCtrl (void *siuInst, tuint ControlCode)
00469 {
00470
00471 } /* siuToneDetectCtrl */
00472 #endif
00473
00474
00475 char* GetDirectionString(int  direction)
00476 {
00477    if (direction == 1)
00478       return "Ans";
00479    else if (direction == 0)
00480       return "Org";
00481    else
00482       return "";
00483
00484 } /* GetDirectionString */
00485
00486 void StatusPrintMonitor(char * dstPtr,int direction)
00487 {
00488    fprintf(stderr, "%20s%8s\n", dstPtr, GetDirectionString(direction));
00489
00490 } /* StatusPrintMonitor */
00491
00492 extern int fmDebugTraceParser (int msgId, int msgData, char *dstPtr);
00493
00494 /******************************************************************************
00495  * FUNCTION PURPOSE: Implements FM's debugInfo() API call.
00496  ******************************************************************************
00497  * DESCRIPTION: Handles FM API calls to debugInfo(). All INFORMATIONAL msgs
00498  *              are ignored; if the msgType is FATAL_ERROR or undefined,
00499  *              a call to siuFatalError() is made.
00500  *
00501  * CALLING FORMAT:
00502  *   siuFmDebugInfo (tuint moduleID,      - ID and channel of FM
00503  *                    tuint msgType,      - FATAL_ERROR (2) or
00504  *                                              INFORMATIONAL (0)
00505  *                    tuint messageCode,    - not used
00506  *                    tuint msgLength,      - not used
00507  *                    tuint *supportingData)  - not used
00508  *
00509  * RETURN VALUE:
00510  *   None
00511  *
00512  *****************************************************************************/
00513
00514 void   siuFmDebugInfo          (void * moduleID, tuint msgType, tuint messageCode,
00515                                 tuint msgLength,  tuint *supportingData)
00516 {
00517   char *string = NULL;
00518   char buffer[256];
00519   int fmRetVal,dir;
00520   int msgData;
00521   tuint mId= *((tuint *) moduleID);
00522
00523   msgData = supportingData[0];
00524
00525   if ((mId & 0xFF) == 1)
00526     dir = 0;
00527
00528   if ((mId & 0xFF) == 2)
00529   dir = 1;
00530
00531   switch (msgType)
00532   {
00533      case fm_INFOMATIONAL:
00534      fmRetVal = fmDebugTraceParser(messageCode, msgData, buffer);
00535       break;
00536
00537      case fm_EXCEPTION:
00538       *string = SIU_EXCEPTION_FM_DBG_FATAL_ERROR;
00539       siuFatalError (mId, string);
00540     break;
00541
00542      default:
00543       *string = SIU_EXCEPTION_FM_DBG_DEFAULT;
00544       siuFatalError (mId, string);
00545     break;
00546   }
00547
00548   if (fmRetVal == TRUE)
00549    {
00550      StatusPrintMonitor(buffer,dir);
00551    }
00552    else
00553    {
00554       printf ("Invalid trace: msgId = 0x%X, msgData = 0x%X\n", messageCode, *supportingData);
00555    }
00556
00557 } /* siuFmDebugInfo */
00558
00559 /******************************************************************************
00560  * FUNCTION PURPOSE: Generic function for handling FM and DPU exception calls.
00561  ******************************************************************************
00562  * DESCRIPTION: Handles exception and debug calls. Goes into and infinite loop,
00563  *              allowing for an eventual break and examintaaion of reason for
00564  *              calling a fata error. The global variable siuFatalString
00565  *              contains the reason for entry, as enumerated in the global
00566  *              enumeration siuFatalErrorChar_e of file main.h.
00567  *
00568  * CALLING FORMAT:
00569  *   siuFatalError   (tuint ID,       -  ID and channel of calling entity
00570  *                                         (either FM or DPU)
00571  *                    char* str)      -  Global ptr to char that holds the
00572  *                                         value of reason for entering
00573  *                                         this function
00574  *
00575  * RETURN VALUE:
00576  *   None
00577  *
00578  *****************************************************************************/
00579 void siuFatalError (tuint id, char *str)
00580 {
00581    siuFatalString = *str;
00582
00583    /* Infinite loop */
00584    while (1);
00585
00586 } /* siuFatalError */
00587
00588 /******************************************************************************
00589  * FUNCTION PURPOSE: Initializes/resets SIU instance parameters.
00590  ******************************************************************************
00591  * DESCRIPTION: Initializes siu instance parameters and structures to nominal
00592  *              values
00593  *
00594  * CALLING FORMAT:
00595  *   siu_init        (tint chnum)  -  channel number
00596  *
00597  * RETURN VALUE:
00598  *   None
00599  *
00600  *****************************************************************************/
00601 void siu_init (tint chnum)
00602 {
00603   siuInst_t *inst = &siuInst[chnum - 1];
00604
00605   inst->ID            = ((SIU_SIU_ID << 8) | chnum);
00606   inst->fmInst        = NULL;
00607   inst->fmBufs        = NULL;
00608   inst->fmNbufs       = 0;
00609   inst->fm_heap_size  = 0;
00610   inst->aux_heap_size = 0;
00611
00612 } /* siu_init */
00613
00614 /******************************************************************************
00615  * FUNCTION PURPOSE: Initialize linear samples buffer
00616  ******************************************************************************
00617  * DESCRIPTION:
00618  *
00619  * CALLING FORMAT:
00620  *   siu_init_lin_samples (tint chnum)  -  channel number
00621  *
00622  * RETURN VALUE:
00623  *   None
00624  *
00625  *****************************************************************************/
00626 void siu_init_lin_samples (tint chnum)
00627 {
00628   tuint i;
00629
00630   for (i = 0; i < SIU_FM_LIN_SAMPLE_ARRAY_SIZE; i ++)
00631   {
00632      GlobalLinSample [chnum - 1] [i] = (Fract) 0xBEEF;
00633   }
00634
00635 } /* siu_init_lin_samples */
00636
00637 /******************************************************************************
00638  * FUNCTION PURPOSE: Initialize FM_FP message buffer
00639  ******************************************************************************
00640  * DESCRIPTION:
00641  *
00642  * CALLING FORMAT:
00643  *   siu_init_fm_fp_messages (tint chnum)  -  channel number
00644  *
00645  * RETURN VALUE:
00646  *   None
00647  *
00648  *****************************************************************************/
00649 void siu_init_fm_fp_messages (tint chnum)
00650 {
00651   tuint i; /* loop counter */
00652
00653   for (i = 0; i < SIU_FM_FP_OUT_MSG_ARRAY_SIZE; i ++)
00654   {
00655      (GlobalFmFpMsgOut [chnum - 1] [i]).MsgId     =(iffaxFmFpMsgId_e) 0x0123;
00656      (GlobalFmFpMsgOut [chnum - 1] [i]).Timestamp = 0x4567;
00657      (GlobalFmFpMsgOut [chnum - 1] [i]).MsgBody.DataPayload.numBytes
00658                                         = (tint) 0x89AB;
00659      (GlobalFmFpMsgOut [chnum - 1] [i]).MsgBody.DataPayload.DataAddress =
00660                                        (tword *) 0xCDEF;
00661   }
00662
00663 } /* siu_init_fm_fp_messages */
00664
00665 /******************************************************************************
00666  * FUNCTION PURPOSE: Initialize FP_FM message buffer
00667  ******************************************************************************
00668  * DESCRIPTION: Formats FP-FM messages for sending to FM inorder to exercise
00669  *              FM in its various states:
00670  *
00671  *              Messages:
00672  *              ---------------------------------------------------------------
00673  *              struct FP_FM_MODE_S              Mode;
00674  *              struct FP_FM_DATA_S              DataPayload;
00675  *              struct FP_FM_FRAME_COMP_S        FrameComp;
00676  *              struct FP_FM_DELAY_S             Delay;
00677  *              struct FP_FM_TONE_GEN_ON_S       ToneOn;
00678  *              struct FP_FM_TONE_GEN_OFF_S      ToneOff (currently unused);
00679  *              struct FP_FM_TONE_DET_CTRL_S     ToneDetCtrl;
00680  *              struct FP_FM_FILL_PATTERN_S      FillPattern;
00681  *              ---------------------------------------------------------------
00682  *
00683  * CALLING FORMAT:
00684  *   siu_init_fp_fm_messages (tint chnum)  -  channel number
00685  *
00686  * RETURN VALUE:
00687  *   None
00688  *
00689  *****************************************************************************/
00690 void siu_init_fp_fm_messages (iffaxModulationTypes_e HighSpeedModType)
00691 {
00692
00693 /* ------------------------------------------------------------------*/
00694    /* Configure Ch 2 for HS receive */
00695   GlobalFpFmMsgIn[1] [0].MsgId                         = iffax_FP_FM_MODE;
00696   GlobalFpFmMsgIn[1] [0].MsgBody.Mode.HdlcEnable       = FALSE;
00697   GlobalFpFmMsgIn[1] [0].MsgBody.Mode.TEPEnable        = FALSE;
00698   GlobalFpFmMsgIn[1] [0].MsgBody.Mode.TrainLengthShort = FALSE;
00699   GlobalFpFmMsgIn[1] [0].MsgBody.Mode.Rx               = TRUE;
00700   GlobalFpFmMsgIn[1] [0].MsgBody.Mode.Tx               = FALSE;
00701   GlobalFpFmMsgIn[1] [0].MsgBody.Mode.Modulation     = HighSpeedModType;
00702   GlobalFpFmMsgInIndex2 ++;
00703
00704   /* Configure Ch 1 for HS transmit */
00705   GlobalFpFmMsgIn[0] [0].MsgId                         = iffax_FP_FM_MODE;
00706   GlobalFpFmMsgIn[0] [0].MsgBody.Mode.HdlcEnable       = FALSE;
00707   GlobalFpFmMsgIn[0] [0].MsgBody.Mode.TEPEnable        = FALSE;
00708   GlobalFpFmMsgIn[0] [0].MsgBody.Mode.TrainLengthShort = FALSE;
00709   GlobalFpFmMsgIn[0] [0].MsgBody.Mode.Rx               = FALSE;
00710   GlobalFpFmMsgIn[0] [0].MsgBody.Mode.Tx               = TRUE;
00711   GlobalFpFmMsgIn[0] [0].MsgBody.Mode.Modulation     = HighSpeedModType;
00712   GlobalFpFmMsgInIndex1 ++;
00713
00714   /* Send FM Ch1 Sync (should result in SYNC_ACK) */
00715   GlobalFpFmMsgIn[0] [1].MsgId                         = iffax_FP_FM_SYNC;
00716   GlobalFpFmMsgInIndex1 ++;
00717
00718   /* Send Ch 1 Modem HS data */
00719   {
00720      GlobalFpFmMsgIn[0] [2].MsgId                        = iffax_FP_FM_DATA;
00721      GlobalFpFmMsgIn[0] [2].MsgBody.DataPayload.numBytes = 40;
00722      GlobalFpFmMsgIn[0] [2].MsgBody.DataPayload.DataAddr = &FpFmHsData[0];
00723   GlobalFpFmMsgInIndex1 ++;
00724   }
00725
00726   /* Configure Ch 1 for Idle */
00727   GlobalFpFmMsgIn[0] [3].MsgId = iffax_FP_FM_MODE;
00728   GlobalFpFmMsgIn[0] [3].MsgBody.Mode.HdlcEnable       = FALSE;
00729   GlobalFpFmMsgIn[0] [3].MsgBody.Mode.TEPEnable        = FALSE;
00730   GlobalFpFmMsgIn[0] [3].MsgBody.Mode.TrainLengthShort = FALSE;
00731   GlobalFpFmMsgIn[0] [3].MsgBody.Mode.Rx               = FALSE;
00732   GlobalFpFmMsgIn[0] [3].MsgBody.Mode.Tx               = FALSE;
00733   GlobalFpFmMsgIn[0] [3].MsgBody.Mode.Modulation     = 0;
00734   GlobalFpFmMsgInIndex1 ++;
00735
00736 } /* siu_init_fp_fm_messages */
00737
00738 /******************************************************************************
00739  * FUNCTION PURPOSE: Create FM module.
00740  ******************************************************************************
00741  * DESCRIPTION: Creates an instance of FM.
00742  *
00743  * CALLING FORMAT:
00744  *   siu_new_fm  (tint chnum)  -  channel number
00745  *
00746  * RETURN VALUE:
00747  *   None
00748  *
00749  *****************************************************************************/
00750 void siu_new_fm (tint chnum)
00751 {
00752    tint                i, result, fmNbufs;
00753    char               *str = NULL;
00754    const ecomemBuffer_t   *bufs;
00755    ecomemBuffer_t        *fmLocalBufs;
00756    fmNewConfig_t       fmCfgNew;
00757    siuInst_t          *inst = &siuInst[chnum - 1];
00758
00759    /* FM get sizes */
00760    result = fmGetSizes (&fmNbufs, &bufs);
00761
00762    if (!(result == fm_NOERR))
00763    {
00764       *str = SIU_EXCEPTION_FM_SIZES_ERR;
00765       siuFatalError (SIU_FM_ID, str);
00766    }
00767
00768    /* Allocate FM memory buffer descriptors & increment auxiliary heap size */
00769    fmLocalBufs = (ecomemBuffer_t*) malloc (fmNbufs * sizeof(ecomemBuffer_t));
00770    inst->aux_heap_size += fmNbufs * sizeof(ecomemBuffer_t);
00771
00772    /* Allocate FM memory buffers & increment FM heap size. Data from the (global)
00773       variable fmBufs is copied into the (local) variable fmLocalBufs in order to
00774       correctly set fmLocalBufs' size parameter */
00775    for (i = 0; i < fmNbufs; i++)
00776    {
00777       fmLocalBufs[i]            = bufs[i];
00778       fmLocalBufs[i].mclass     = ecomem_CLASS_EXTERNAL;
00779       fmLocalBufs[i].log2align  = 0;
00780       fmLocalBufs[i].volat      = FALSE;
00781       fmLocalBufs[i].base       = malloc (bufs[i].size);
00782       inst->fm_heap_size        += bufs[i].size;
00783    }
00784
00785    /* Need these as a handle to delete this channel's FM someday */
00786    inst->fmNbufs = fmNbufs;
00787    inst->fmBufs  = &fmLocalBufs[0];
00788
00789    /* Fill out the FM new config structure, and call fmNew() */
00790    fmCfgNew.ID        = (SIU_FM_ID << 8) | chnum;
00791
00792    result = fmNew (&inst->fmInst, fmNbufs, fmLocalBufs, &fmCfgNew);
00793
00794    if (!(result == fm_NOERR))
00795    {
00796       *str = SIU_EXCEPTION_FM_NEW_ERR;
00797       siuFatalError (SIU_FM_ID, str);
00798    }
00799
00800 } /* siu_new_fm */
00801
00802 /******************************************************************************
00803  * FUNCTION PURPOSE: Open FM module
00804  ******************************************************************************
00805  * DESCRIPTION: Opens one instance of an FM module
00806  *
00807  * CALLING FORMAT:
00808  *   siu_open_fm    (tint chnum)     - channel number
00809  *
00810  * RETURN VALUE:
00811  *   None
00812  *
00813  *****************************************************************************/
00814 void siu_open_fm (tint chnum)
00815 {
00816   tint           result;
00817   char           *str = NULL;
00818   fmOpenConfig_t fmOpencfg;
00819   siuInst_t      *inst = &siuInst[chnum - 1];
00820
00821   /* Fill out the FM open config structure, and call fmOpen() */
00822   fmOpencfg.debugLvl                = 2;
00823   fmOpencfg.tx_level                = -10;
00824   fmOpencfg.rx_cd_thr_set           = 0;
00825   fmOpencfg.fBufferData             = FALSE;
00826   fmOpencfg.maxBytesToBuffer        = 1;
00827   fmOpencfg.tablePtr        = &fmTablePtrs;
00828
00829   if (chnum == 1)
00830   {
00831     fmOpencfg.RxOutSpec.fmReceiveOut  = siuPcmInterface_Ch1;
00832     fmOpencfg.SendOutSpec.fmSendOut   = siuFpInterface_Ch1;
00833   }
00834   else if (chnum == 2)
00835   {
00836     fmOpencfg.RxOutSpec.fmReceiveOut  = siuPcmInterface_Ch2;
00837     fmOpencfg.SendOutSpec.fmSendOut   = siuFpInterface_Ch2;
00838   }
00839
00840   fmOpencfg.RxOutSpec.TargetInst    = NULL;
00841   fmOpencfg.SendOutSpec.TargetInst  = NULL;
00842
00843 #ifndef NO_TONESUPP
00844   fmOpencfg.ToneDetCtrl.ToneDetCtrl = siuToneDetectCtrl;
00845   fmOpencfg.ToneDetCtrl.TargetInst  = inst;
00846 #endif
00847
00848   result = fmOpen (inst->fmInst, &fmOpencfg);
00849
00850   if (!(result == fm_NOERR))
00851   {
00852      *str = SIU_EXCEPTION_FM_OPEN_ERR;
00853      siuFatalError (SIU_FM_ID, str);
00854   }
00855
00856 } /* siu_open_fm */
00857
00858 /******************************************************************************
00859  * FUNCTION PURPOSE: Close FM module
00860  ******************************************************************************
00861  * DESCRIPTION: Closes one instance of a FM module
00862  *
00863  * CALLING FORMAT:
00864  *   siu_close_fm   (tint chnum)      - channel number
00865  *
00866  * RETURN VALUE:
00867  *   None
00868  *
00869  *****************************************************************************/
00870 void siu_close_fm (tint chnum)
00871 {
00872   siuInst_t *inst = &siuInst[chnum - 1];
00873   fmClose (inst->fmInst);
00874
00875 } /* siu_close_fm */
00876
00877 /******************************************************************************
00878  * FUNCTION PURPOSE: Delete FM module
00879  ******************************************************************************
00880  * DESCRIPTION: Deletes one instance of a FM module
00881  *
00882  * CALLING FORMAT:
00883  *   siu_delete_fm  (tint chnum)      - channel number
00884  *
00885  * RETURN VALUE:
00886  *   None
00887  *
00888  *****************************************************************************/
00889 void siu_delete_fm (tint chnum)
00890 {
00891   tint ii;
00892   siuInst_t *inst = &siuInst[chnum - 1];
00893
00894   fmDelete (&(inst->fmInst));
00895
00896   /* Free memory for FM buffer descriptors & adjust aux_heap_size */
00897   inst->aux_heap_size -= inst->fmNbufs * sizeof(ecomemBuffer_t);
00898   for (ii = 0; ii < inst->fmNbufs; ii++)
00899   {
00900    free(inst->fmBufs[ii].base);
00901    inst->fm_heap_size -= inst->fmBufs[ii].size;
00902
00903   }
00904
00905   /* Free memory for FM buffer descriptors & adjust aux_heap_size */
00906   free(inst->fmBufs);
00907   inst->fmNbufs = 0;
00908
00909 } /* siu_delete_fm */
00910
00911 /******************************************************************************
00912  * FUNCTION PURPOSE: Main SIU (system integration unit) processing routine
00913  ******************************************************************************
00914  * DESCRIPTION: This routine exercises the APIs for both the FM and DPU
00915  *              modules.
00916  *
00917  * CALLING FORMAT:
00918  *   void main (void)
00919  * RETURN VALUE:
00920  *   None
00921  *
00922  *****************************************************************************/
00923 tuint i=0,TxCap= 0,RxCap = 0;                         /* Loop counter */
00924 int   gbindx = 0;
00925 fmContext_t fmContext =
00926 {
00927    siuFmDebugInfo,
00928    siuGetTime,
00929    NULL
00930 };
00931
00932 tuint CDLoss[10] = {0xdead,0xdead,0xdead,0xdead,0xdead,0xdead,0xdead,0xdead,0xdead,0xdead};
00933 tuint CDLossInd = 0;
00934
00935 tulong CDLossTime[10];
00936 tuint  CDLossTimeInd = 0;
00937 tuint  ch1_msg_num   = 0;              /* Ch1 message counter */
00938 tuint  ch2_msg_num   = 0;              /* Ch2 message counter */
00939 tint   NOISELEVEL = -168,MEAN = 0;
00940 tuint  SEED = 0,RNGSTATE = 0;
00941
00942 void main (void)
00943 {
00944    tint chnum;                          /* Channel number for 1-channel sim */
00945 #ifndef FILEIO
00946    tbool running = TRUE;                 /* While loop condition */
00947 #endif
00948    tword mulawpcmIn[80];
00949 #if   LINEAR_PCM
00950    Fract pcmIn[80];
00951 #endif
00952 #if V17_STRAIN_TST
00953    tulong sessionCnt = 0;
00954 #endif
00955    char EcoTestDpuRoot[50] = {"..//..//vectors//input//"},temp1[50];
00956 #if CUSTPROB_DBG
00957   FILE *MuLawCustSampsIn;
00958 #endif
00959 #if V17_STRAIN_TST
00960   FILE *V17MuLawSampsIn;
00961   fmInst_t *fmInstance;
00962   int   NFiles,CarrierDetected=0;
00963 #endif
00964
00965 #if    TESTDPUVECS
00966   int   NumberOfFiles,LineCode = 1000;
00967 #endif
00968     FILE *MuLawSampsIn,*TestResultsOut;
00969    switch(LineCode)
00970    {
00971    case 0001:
00972      LineCode = 1;
00973      break;
00974    case 0010:
00975      LineCode = 2;
00976      break;
00977    case 0011:
00978      LineCode = 3;
00979      break;
00980    case 0100:
00981      LineCode = 4;
00982      break;
00983    case 0101:
00984       LineCode = 5;
00985      break;
00986    case 0110:
00987       LineCode = 6;
00988      break;
00989    case 0111:
00990       LineCode = 7;
00991      break;
00992    case 1000:
00993       LineCode = 8;
00994      break;
00995    case 1001:
00996       LineCode = 9;
00997      break;
00998    case 1010:
00999       LineCode = 10;
01000      break;
01001    case 1011:
01002       LineCode = 11;
01003      break;
01004    case 1100:
01005       LineCode = 12;
01006      break;
01007    case 1101:
01008       LineCode = 13;
01009      break;
01010    case 1110:
01011       LineCode = 14;
01012      break;
01013    case 1111:
01014       LineCode = 15;
01015      break;
01016    default:
01017       LineCode = 16;
01018      break;
01019    }
01020    NumberOfFiles  = PopulateTestDataBase(EcoTestDpuRoot,LineCode);
01021
01022    NumberOfFiles--;
01023    do
01024    {
01025 #if ADD_NOISE
01026    /* Initialize Noise Generator */
01027   wngInit(NOISELEVEL,SEED,&MEAN,&RNGSTATE);
01028 #endif
01029
01030 #if V17_STRAIN_TST
01031   NFiles = PopulateTestDataBase(EcoTestDpuRoot,16);
01032 #endif
01033
01034    /* Configure, initialize and open all FM instances */
01035    for (chnum = 1; chnum <= SIU_NUMBER_OF_CHANNELS; chnum ++)
01036    {
01037 #if   TESTDPUVECS
01038       ClearAllGlobalVariables();
01039 #endif
01040     siu_init                (chnum);
01041       siu_init_lin_samples    (chnum);
01042       siu_init_fm_fp_messages (chnum);
01043       siu_new_fm              (chnum);
01044       siu_open_fm             (chnum);
01045    }
01046
01047    /* Initialize the FP-FM messages array, configure Ch 1 for Tx and
01048       configure Ch 2 for Rx for a given Modulation and Rate */
01049 #if TESTDPUVECS
01050    siu_init_fp_fm_messages (ModAssoc[gbindx]);
01051 #else
01052 #if V17_STRAIN_TST
01053      siu_init_fp_fm_messages (iffax_MODEM_MODE_V17_L_14400);
01054 #else
01055      siu_init_fp_fm_messages (iffax_MODEM_MODE_V17_L_9600);
01056 #endif
01057 #endif
01058    if (fmReceiveIn (siuInst[0].fmInst, (void *) &(GlobalFpFmMsgIn[0] [ch1_msg_num++]))
01059        != iffax_FM_CMD_ACCEPTED)
01060    {
01061       siuFmDebugInfo ((void *)siuInst[0].ID, fm_EXCEPTION, 0, 0, 0);
01062    }
01063
01064    if (fmReceiveIn (siuInst[1].fmInst, (void *) &(GlobalFpFmMsgIn[1] [ch2_msg_num++]))
01065        != iffax_FM_CMD_ACCEPTED)
01066    {
01067       siuFmDebugInfo ((void *)siuInst[1].ID, fm_EXCEPTION, 0, 0, 0);
01068    }
01069
01070
01071 #if TESTDPUVECS
01072    if ( (MuLawSampsIn = fopen(TestFileNames[gbindx++], "rb")) != NULL)
01073    {
01074      /* file exists in the directory, Process it */
01075      BerCount = OnesCount= 0;
01076    }
01077    else
01078    {
01079      printf( " FILE OPEN ERR \n \n" );
01080      exit(1);
01081    }
01082 #endif
01083
01084 #if V17_STRAIN_TST
01085    if ( (V17MuLawSampsIn = fopen(TestFileNames[0], "rb")) != NULL)
01086    {
01087      /* file exists in the directory, Process it */
01088      BerCount = OnesCount= 0;
01089    }
01090    else
01091    {
01092      printf( " FILE OPEN ERR \n \n" );
01093      exit(1);
01094    }
01095 #endif
01096 #if  CUSTPROB_DBG
01097    strcpy(TestFileNames[0],"d:\\temp\\HermanTest11_SIL1.pcm");
01098    if ( (MuLawCustSampsIn = fopen(TestFileNames[0], "rb")) != NULL)
01099    {
01100      /* file exists in the directory, Process it */
01101      BerCount = OnesCount= 0;
01102    }
01103    else
01104    {
01105      printf( " FILE OPEN ERR \n \n" );
01106      exit(1);
01107    }
01108 #endif
01109
01110    /* Main loop for processing global FP-FM messages */
01111 #ifndef FILEIO
01112    while (running)
01113    {
01114 #if  V17_STRAIN_TST
01115      if (!loop_flag)
01116     running = FALSE;
01117 #else
01118      if (i++ >= 6000)
01119         running = FALSE;
01120 #endif
01121 #else
01122    while ((loop_flag) &&
01123         (limit_count < ONES_LIMIT) )
01124    {
01125 #endif
01126       /* Send message to Ch 1 FM */
01127       if ((i % 5) == 0)
01128       {
01129          if (ch1_msg_num < GlobalFpFmMsgInIndex1)
01130          {
01131             if (fmReceiveIn (siuInst[0].fmInst, (void *) &(GlobalFpFmMsgIn[0] [ch1_msg_num++]))
01132                 != iffax_FM_CMD_ACCEPTED)
01133             {
01134                 siuFmDebugInfo ((void *)siuInst[0].ID, fm_EXCEPTION, 0, 0, 0);
01135             }
01136          }
01137     }
01138
01139       /* Each FM module now processes PCM samples output from other channel */
01140       fmSendIn (siuInst[0].fmInst, (Fract *) &(GlobalLinSample[1] [0]));
01141
01142 #if TESTDPUVECS
01143     /* Overwrite the PCM samples output from Ch1 */
01144      if (fread((void *)mulawpcmIn, sizeof(char),80, MuLawSampsIn) != 80)
01145       loop_flag = 0;
01146 #if   !LINEAR_PCM
01147      if(loop_flag)
01148        UAExpand((tint)80,(tword *)mulawpcmIn,(Fract *) &GlobalLinSample[0][0],(const tint *)tblUlaw);
01149 #endif
01150
01151 #endif
01152
01153 #if V17_STRAIN_TST
01154     /* Overwrite the PCM samples output from Ch1 */
01155      if (fread((void *)mulawpcmIn, sizeof(char),80, V17MuLawSampsIn) != 80)
01156       loop_flag = 0;
01157      if(loop_flag)
01158        UAExpand((tint)80,(tword *)mulawpcmIn,(Fract *) &GlobalLinSample[0][0],(const tint *)tblUlaw);
01159 #endif
01160
01161 #if   CUSTPROB_DBG
01162     /* Overwrite the PCM samples output from Ch1 */
01163 #if   LINEAR_PCM
01164      if (fread((void *)pcmIn, sizeof(Fract),80, MuLawCustSampsIn) != 80)
01165       loop_flag = 0;
01166      for (index = 0; index < 80; index++)
01167     GlobalLinSample[0][index] = pcmIn[index];
01168 #else
01169      if (fread((void *)mulawpcmIn, sizeof(char),80, MuLawCustSampsIn) != 80)
01170       loop_flag = 0;
01171      if(loop_flag)
01172        UAExpand((tint)80,(tword *)mulawpcmIn,(Fract *) &GlobalLinSample[0][0],(const tint *)tblAlaw);
01173 #endif
01174
01175 #endif
01176
01177 #if   ADD_NOISE
01178     wngGenNoiseFrame(MEAN,&RNGSTATE,80,(Fract *) &GlobalLinSample[0][0]);
01179 #endif
01180
01181 #if   CAPTURE_PCM_TX
01182     /* Capture 80 samples starting from &GlobalLinSample[0][0] */
01183     CaptureDataShort1((int)80,(Fract *)&GlobalLinSample[0][0],"D:\\temp\\pcmtx.dat");
01184 #endif
01185
01186 #if   TEST_CDL
01187     ReadDataOntoMemory(80,&GlobalLinSample[0][0],"D:\\temp\\pcmtxV2724_36dbm.dat");
01188 #endif
01189       fmSendIn (siuInst[1].fmInst, (Fract *) &(GlobalLinSample[0] [0]));
01190
01191 #if V17_STRAIN_TST
01192
01193     fmInstance = (fmInst_t *)siuInst[1].fmInst;
01194     if (fmInstance->FmStatus & 0x01)
01195     {
01196       CarrierDetected = 1;
01197     }
01198     if (CarrierDetected)
01199     {
01200       if (!(fmInstance->FmStatus & 0x01))
01201       {
01202         CarrierDetected = 0;BerCount = OnesCount = 0;
01203         sessionCnt++;
01204
01205         if ((sessionCnt % 6) == 0)
01206         {
01207           fmInstance->Dpu.CtrlParam.Config &= ~FM_DPU_CONFIG_STRAIN;
01208           fmInstance->Dpu.CtrlParam.Config |= FM_DPU_CONFIG_SETUP;
01209         }
01210
01211         ch1_msg_num = ch2_msg_num = 0;
01212         GlobalFpFmMsgInIndex1 = GlobalFpFmMsgInIndex2 = 0;
01213         GlobalFmFpMsgOutIndex1 = GlobalFmFpMsgOutIndex2 = 0;
01214       }
01215     }
01216 #endif
01217
01218     systemTime += 80;
01219
01220    #ifndef NO_TONESUPP
01221       /* Generate CED tone */
01222       fmToneGenOn (siuInst[0].fmInst, iffax_TONE_CED);
01223
01224       /* Turn off tone generation */
01225       fmToneGenOff (siuInst[0].fmInst);
01226
01227       /* Generate CNG tone */
01228       fmToneGenOn (siuInst[0].fmInst, iffax_TONE_CNG);
01229
01230       /* Turn off tone generation */
01231       fmToneGenOff (siuInst[0].fmInst);
01232
01233       /* Control an external instance of TDU */
01234       fmToneDetCtrl (siuInst[0].fmInst, iffax_TONE_DETECT_CTRL_ENABLE);
01235       fmToneDetCtrl (siuInst[0].fmInst, iffax_TONE_DETECT_CTRL_DISABLE);
01236    #endif
01237
01238    } /* while (running) */
01239
01240 #if TESTDPUVECS
01241    fclose(MuLawSampsIn);
01242 #endif
01243 #if V17_STRAIN_TST
01244    fclose(V17MuLawSampsIn);
01245 #endif
01246 #if CUSTPROB_DBG
01247    fclose(MuLawCustSampsIn);
01248 #endif
01249    for (chnum = 1; chnum <= SIU_NUMBER_OF_CHANNELS; chnum ++)
01250    {
01251       /* Get updated net and fax stats */
01252       fmStats (siuInst[chnum-1].fmInst, 0, &siuFmStats[chnum-1]);
01253     /* Close all channels and delette the instances */
01254       siu_close_fm  (chnum);
01255       siu_delete_fm (chnum);
01256    }
01257 #if TESTDPUVECS
01258    strcpy(temp1,"..//..//vectors//output//testresults.txt");
01259    if ((TestResultsOut = fopen(temp1, "a+")) == NULL)
01260    {
01261      printf( " FILE OPEN ERR \n \n" );
01262      exit(1);
01263    }
01264
01265    fprintf(TestResultsOut,"SNR REPORTED in dB: %d\n",siuFmStats[1].fmSigQStats.snr);
01266    fprintf(TestResultsOut,"BER REPORTED:%ld\nONES TRANSMITTED:%ld\n",(unsigned long)BerCount,(unsigned long)OnesCount);
01267    fprintf(TestResultsOut,"RXLEVEL REPORTED: %3d\n",siuFmStats[1].fmSigQStats.rx_level);
01268    //fprintf(TestResultsOut,"POWER  LEVEL LATCHED in dB: %d\n",frctRoundF(utlLin2dBPower(power_sat),4,0));
01269    //fprintf(TestResultsOut,"SIGNAL POWER LEVEL REPORTED in dB : %d\n",frctRoundF(utlLin2dBPower(sig_power),4,0));
01270    //fprintf(TestResultsOut,"Carrier LOSS PENDING FLAG: %ld\n",CDLPendingFlag);
01271    fprintf(TestResultsOut,"FILE USED FOR TEST:%s\n",TestFileNames[gbindx-1]);
01272    fprintf(TestResultsOut,"=======================================================================================\n");
01273    //power_sat = sig_power = CDLPendingFlag = 0;
01274    fclose(TestResultsOut);
01275    } while(NumberOfFiles--);
01276 #endif
01277
01278    exit(0);
01279
01280 } /* main */
01281
01282 void ClearAllGlobalVariables(void)
01283 {
01284    i = TxCap = RxCap = 0;
01285    ch1_msg_num = ch2_msg_num = 0;
01286    GlobalFpFmMsgInIndex1 = GlobalFpFmMsgInIndex2 = 0;
01287    GlobalFmFpMsgOutIndex1 = GlobalFmFpMsgOutIndex2 = 0;
01288    loop_flag = 1;
01289    limit_count = 0;
01290
01291 } /* ClearAllGlobalVariables */
01292
01293 #if  TESTDPUVECS
01294 int CopyC1LineFiles(char *EcoTestDpuRoot,int Index)
01295 {
01296    int i,j = 0;
01297    char EcoTestC1[80];
01298
01299    strcpy(EcoTestC1,EcoTestDpuRoot);
01300 //   strcat(EcoTestC1,"\\c1\\");
01301
01302    for ( i= Index; i < (Index+NOC1FILES); i++,j++)
01303    {
01304       strcpy(&TestFileNames[i][0],EcoTestC1);
01305       strcat(&TestFileNames[i][0],TestFileNamesC1[j]);
01306       ModAssoc[i] = modC1[i];
01307    }
01308
01309    return(NOC1FILES);
01310
01311 } /* CopyC1LineFiles */
01312
01313 #endif /* TESTDPUVECS */
01314
01315 #if  V17_STRAIN_TST
01316 int CopyV17STrainFiles(char *EcoTestDpuRoot,int Index)
01317 {
01318    char temp[80];
01319    strcpy(temp,EcoTestDpuRoot);
01320    strcat(temp,"\\V17shortTraining\\");
01321
01322    for ( i= Index; i < (Index+1); i++)
01323    {
01324       strcpy(TestFileNames[i],temp);
01325       strcat(TestFileNames[i],"V17_14400_long_short_using_script_flat_NoNoise_10dBUp.pcm");
01326    }
01327    return(1);
01328
01329 } /* CopyV17STrainFiles */
01330 #endif
01331
01332 int PopulateTestDataBase(char *EcoTestDpuRoot,int LineCode)
01333 {
01334   int NumOfFiles = 0,IndexStart = 0;
01335
01336   if (LineCode & 0x8)
01337   {
01338 #if TESTDPUVECS
01339     NumOfFiles =  CopyC1LineFiles(EcoTestDpuRoot,IndexStart);
01340 #endif
01341     IndexStart  += NumOfFiles;
01342   }
01343
01344   if (LineCode & 0x10)
01345   {
01346 #if V17_STRAIN_TST
01347     NumOfFiles =  CopyV17STrainFiles(EcoTestDpuRoot,IndexStart);
01348 #endif
01349     IndexStart  += NumOfFiles;
01350   }
01351   return(IndexStart);
01352
01353 } /* PopulateTestDataBase */
01354
01355 /* nothing past this point */


FM: fmsim.h File Reference

fmsim.h File Reference

#include "string.h"
#include "stdlib.h"
#include <ti/mas/types/types.h>
#include <ti/mas/iface/iffax/iffax.h>
#include <ti/mas/util/ecomem.h>
#include <ti/mas/fm/fm.h>

Include dependency graph for fmsim.h:

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

Go to the source code of this file.

Data Structures

struct | siuInst_t

Defines

#define | NO_TONESUPP TRUE
#define | SIU_NUMBER_OF_CHANNELS 2
#define | SIU_SIU_ID 0x01
#define | SIU_DPU_ID 0x02
#define | SIU_FM_ID 0x03
#define | SIU_FM_FP_MSG_COUNT FM_FP_COUNT - 1
#define | SIU_FM_FP_OUT_MSG_ARRAY_SIZE 10
#define | SIU_FP_FM_MSG_COUNT FP_FM_COUNT - 1
#define | SIU_FP_FM_IN_MSG_ARRAY_SIZE 15
#define | SIU_FM_LIN_SAMPLE_ARRAY_SIZE 80
#define | ONES_LIMIT 100000
#define | NOC1FILES 8

Enumerations

enum siuFatalErrorChar_e {
SIU_EXCEPTION_FM_DBG_FATAL_ERROR, SIU_EXCEPTION_FM_DBG_DEFAULT, SIU_EXCEPTION_FM_SIZES_ERR, SIU_EXCEPTION_FM_BUFS_ERR,
SIU_EXCEPTION_FM_NEW_ERR, SIU_EXCEPTION_FM_OPEN_ERR
}

Functions

tulong | siuGetTime (void)
void | siuPcmInterface_Ch1 (void *targetInst, void *PcmData)
void | siuPcmInterface_Ch2 (void *targetInst, void *PcmData)
void | siuFpInterface_Ch1 (void *targetInst, void *FmFpMessage)
void | siuFpInterface_Ch2 (void *targetInst, void *FmFpMessage)
void | siuToneOffFax (void *TargetInst)
void | siuToneDetectCtrl (void *siuInst, tuint ControlCode)
void | siuFmDebugInfo (void *moduleID, tuint msgType, tuint messageCode, tuint msgLength, tuint *supportingData)
void | siuFatalError (tuint id, char *str)
void | siu_init (tint chnum)
void | siu_init_lin_samples (tint chnum)
void | siu_init_fm_fp_messages (tint chnum)
void | siu_init_fp_fm_messages (iffaxModulationTypes_e hsmod)
void | siu_new_fm (tint chnum)
void | siu_open_fm (tint chnum)
void | siu_close_fm (tint chnum)
void | siu_delete_fm (tint chnum)
void | UAExpand (tint sub_segment_size, tword *pcm_in, Fract *send_out_buf_ptr_ptr, const tint *pcm_expand_table)

Variables

const tint | tblUlaw [128]
const tint | tblAlaw [128]
char | TestFileNamesC1 [NOC1FILES][35]
iffaxModulationTypes_e | modC1 [NOC1FILES]

Define Documentation

#define NO_TONESUPP TRUE

Definition at line 23 of file fmsim.h.

#define SIU_NUMBER_OF_CHANNELS 2

Definition at line 26 of file fmsim.h.

Referenced by main().

#define SIU_SIU_ID 0x01

Definition at line 27 of file fmsim.h.

Referenced by siu_init().

#define SIU_DPU_ID 0x02

Definition at line 28 of file fmsim.h.

#define SIU_FM_ID 0x03

Definition at line 29 of file fmsim.h.

Referenced by siu_new_fm(), and siu_open_fm().

#define SIU_FM_FP_MSG_COUNT FM_FP_COUNT - 1

Definition at line 31 of file fmsim.h.

#define SIU_FM_FP_OUT_MSG_ARRAY_SIZE 10

Definition at line 32 of file fmsim.h.

Referenced by siu_init_fm_fp_messages(), siuFpInterface_Ch1(), and siuFpInterface_Ch2().

#define SIU_FP_FM_MSG_COUNT FP_FM_COUNT - 1

Definition at line 34 of file fmsim.h.

#define SIU_FP_FM_IN_MSG_ARRAY_SIZE 15

Definition at line 35 of file fmsim.h.

#define SIU_FM_LIN_SAMPLE_ARRAY_SIZE 80

Definition at line 37 of file fmsim.h.

Referenced by siu_init_lin_samples(), siuPcmInterface_Ch1(), and siuPcmInterface_Ch2().

#define ONES_LIMIT 100000

Definition at line 46 of file fmsim.h.

Referenced by main().

#define NOC1FILES 8

Definition at line 153 of file fmsim.h.

Referenced by main().

Enumeration Type Documentation

enum siuFatalErrorChar_e

Enumerator:
SIU_EXCEPTION_FM_DBG_FATAL_ERROR
SIU_EXCEPTION_FM_DBG_DEFAULT
SIU_EXCEPTION_FM_SIZES_ERR
SIU_EXCEPTION_FM_BUFS_ERR
SIU_EXCEPTION_FM_NEW_ERR
SIU_EXCEPTION_FM_OPEN_ERR

Definition at line 68 of file fmsim.h.

Function Documentation

tulong siuGetTime ( void )

Definition at line 331 of file fmsim.c.

References systemTime.

void siuPcmInterface_Ch1 | ( | void * | targetInst,
 |  | void * | PcmData
 | ) |  |

Definition at line 356 of file fmsim.c.

References i, and SIU_FM_LIN_SAMPLE_ARRAY_SIZE.

Referenced by siu_open_fm().

void siuPcmInterface_Ch2 | ( | void * | targetInst,
 |  | void * | PcmData
 | ) |  |

Definition at line 388 of file fmsim.c.

References i, and SIU_FM_LIN_SAMPLE_ARRAY_SIZE.

Referenced by siu_open_fm().

void siuFpInterface_Ch1 | ( | void * | targetInst,
 |  | void * | FmFpMessage
 | ) |  |

Definition at line 414 of file fmsim.c.

References SIU_FM_FP_OUT_MSG_ARRAY_SIZE.

Referenced by siu_open_fm().

void siuFpInterface_Ch2 | ( | void * | targetInst,
 |  | void * | FmFpMessage
 | ) |  |

Definition at line 437 of file fmsim.c.

References dpuBerMeas(), and SIU_FM_FP_OUT_MSG_ARRAY_SIZE.

Referenced by siu_open_fm().

Here is the call graph for this function:

void siuToneOffFax ( void * TargetInst )

void siuToneDetectCtrl | ( | void * | siuInst,
 |  | tuint | ControlCode
 | ) |  |

Definition at line 468 of file fmsim.c.

Referenced by siu_open_fm().

void siuFmDebugInfo | ( | void * | moduleID,
 |  | tuint | msgType,
 |  | tuint | messageCode,
 |  | tuint | msgLength,
 |  | tuint * | supportingData
 | ) |  |

Definition at line 514 of file fmsim.c.

References fmDebugTraceParser(), SIU_EXCEPTION_FM_DBG_DEFAULT, SIU_EXCEPTION_FM_DBG_FATAL_ERROR, siuFatalError(), and StatusPrintMonitor().

Referenced by main().

Here is the call graph for this function:

void siuFatalError | ( | tuint | id,
 |  | char * | str
 | ) |  |

Definition at line 579 of file fmsim.c.

References siuFatalString.

Referenced by siu_new_fm(), siu_open_fm(), and siuFmDebugInfo().

void siu_init ( tint chnum )

Definition at line 601 of file fmsim.c.

References siuInst_t::aux_heap_size, siuInst_t::fm_heap_size, siuInst_t::fmBufs, siuInst_t::fmInst, siuInst_t::fmNbufs, siuInst_t::ID, SIU_SIU_ID, and siuInst.

Referenced by main().

void siu_init_lin_samples ( tint chnum )

Definition at line 626 of file fmsim.c.

References i, and SIU_FM_LIN_SAMPLE_ARRAY_SIZE.

Referenced by main().

void siu_init_fm_fp_messages ( tint chnum )

Definition at line 649 of file fmsim.c.

References i, and SIU_FM_FP_OUT_MSG_ARRAY_SIZE.

Referenced by main().

void siu_init_fp_fm_messages ( iffaxModulationTypes_e hsmod )

Definition at line 690 of file fmsim.c.

Referenced by main().

void siu_new_fm ( tint chnum )

Definition at line 750 of file fmsim.c.

References siuInst_t::aux_heap_size, siuInst_t::fm_heap_size, siuInst_t::fmBufs, siuInst_t::fmInst, siuInst_t::fmNbufs, i, SIU_EXCEPTION_FM_NEW_ERR, SIU_EXCEPTION_FM_SIZES_ERR, SIU_FM_ID, siuFatalError(), and siuInst.

Referenced by main().

Here is the call graph for this function:

void siu_open_fm ( tint chnum )

Definition at line 814 of file fmsim.c.

References siuInst_t::fmInst, fmTablePtrs, SIU_EXCEPTION_FM_OPEN_ERR, SIU_FM_ID, siuFatalError(), siuFpInterface_Ch1(), siuFpInterface_Ch2(), siuInst, siuPcmInterface_Ch1(), siuPcmInterface_Ch2(), and siuToneDetectCtrl().

Referenced by main().

Here is the call graph for this function:

void siu_close_fm ( tint chnum )

Definition at line 870 of file fmsim.c.

References siuInst_t::fmInst, and siuInst.

Referenced by main().

void siu_delete_fm ( tint chnum )

Definition at line 889 of file fmsim.c.

References siuInst_t::aux_heap_size, siuInst_t::fm_heap_size, siuInst_t::fmBufs, siuInst_t::fmInst, siuInst_t::fmNbufs, and siuInst.

Referenced by main().

void UAExpand | ( | tint | sub_segment_size,
 |  | tword * | pcm_in,
 |  | Fract * | send_out_buf_ptr_ptr,
 |  | const tint * | pcm_expand_table
 | ) |  |

Definition at line 163 of file fmsim.c.

Referenced by main().

Variable Documentation

const tint tblUlaw[128]

Initial value:

 {
   32124,  31100,  30076,  29052,  28028,  27004,  25980,  24956,
   23932,  22908,  21884,  20860,  19836,  18812,  17788,  16764,
   15996,  15484,  14972,  14460,  13948,  13436,  12924,  12412,
   11900,  11388,  10876,  10364,   9852,   9340,   8828,   8316,
    7932,   7676,   7420,   7164,   6908,   6652,   6396,   6140,
    5884,   5628,   5372,   5116,   4860,   4604,   4348,   4092,
    3900,   3772,   3644,   3516,   3388,   3260,   3132,   3004,
    2876,   2748,   2620,   2492,   2364,   2236,   2108,   1980,
    1884,   1820,   1756,   1692,   1628,   1564,   1500,   1436,
    1372,   1308,   1244,   1180,   1116,   1052,    988,    924,
     876,    844,    812,    780,    748,    716,    684,    652,
     620,    588,    556,    524,    492,    460,    428,    396,
     372,    356,    340,    324,    308,    292,    276,    260,
     244,    228,    212,    196,    180,    164,    148,    132,
     120,    112,    104,     96,     88,     80,     72,     64,
      56,     48,     40,     32,     24,     16,      8,      0
}

Definition at line 107 of file fmsim.h.

Referenced by main().

const tint tblAlaw[128]

Initial value:

 {
    5504,   5248,   6016,   5760,   4480,   4224,   4992,   4736,
    7552,   7296,   8064,   7808,   6528,   6272,   7040,   6784,
    2752,   2624,   3008,   2880,   2240,   2112,   2496,   2368,
    3776,   3648,   4032,   3904,   3264,   3136,   3520,   3392,
   22016,  20992,  24064,  23040,  17920,  16896,  19968,  18944,
   30208,  29184,  32256,  31232,  26112,  25088,  28160,  27136,
   11008,  10496,  12032,  11520,   8960,   8448,   9984,   9472,
   15104,  14592,  16128,  15616,  13056,  12544,  14080,  13568,
     344,    328,    376,    360,    280,    264,    312,    296,
     472,    456,    504,    488,    408,    392,    440,    424,
      88,     72,    120,    104,     24,      8,     56,     40,
     216,    200,    248,    232,    152,    136,    184,    168,
    1376,   1312,   1504,   1440,   1120,   1056,   1248,   1184,
    1888,   1824,   2016,   1952,   1632,   1568,   1760,   1696,
     688,    656,    752,    720,    560,    528,    624,    592,
     944,    912,   1008,    976,    816,    784,    880,    848
}

Definition at line 134 of file fmsim.h.

Referenced by main().

char TestFileNamesC1[NOC1FILES][35]

Initial value:

{
        "V29_9600_c1_48dBrn.pcm",
        "V17_14400_c1_45dBrn.pcm",
        "V17_12000_c1_48dBrn.pcm",
        "V17_7200_c1_55dBrn.pcm",
        "V17_9600_c1_52dBrn.pcm",
        "V27_4800_c1_52dBrn.pcm",
        "V27_2400_c1_60dBrn.pcm" ,
        "V29_7200_c1_51dBrn.pcm"
}

Definition at line 154 of file fmsim.h.

Referenced by main().

iffaxModulationTypes_e modC1[NOC1FILES]

Initial value:

{
    iffax_MODEM_MODE_V29_9600,
    iffax_MODEM_MODE_V17_L_14400,
    iffax_MODEM_MODE_V17_L_12000,
    iffax_MODEM_MODE_V17_L_7200,
    iffax_MODEM_MODE_V17_L_9600,
    iffax_MODEM_MODE_V27_4800,
    iffax_MODEM_MODE_V27_2400,
    iffax_MODEM_MODE_V29_7200
}

Definition at line 166 of file fmsim.h.

Referenced by main().


FM: fmsim.h Source File

fmsim.h

Go to the documentation of this file.
00001 #ifndef _FMSIM_H
00002 #define _FMSIM_H
00003 /******************************************************************************
00004  * FILE PURPOSE: Common system-specific definitions for FM simulation
00005  ******************************************************************************
00006  * FILE NAME: fmsim.h
00007  *
00008  * DESCRIPTION: Contains common system-specific data definitions, and global
00009  *              definitions for FM simulation.
00010  *
00011  * (C) Copyright 2010  Texas Instruments Inc.
00012  *****************************************************************************/
00013 #include "string.h"
00014 #include "stdlib.h"
00015 #include <ti/mas/types/types.h>
00016 #include <ti/mas/iface/iffax/iffax.h>
00017 #include <ti/mas/util/ecomem.h>
00018 #include <ti/mas/fm/fm.h>
00019
00020 /******************************************************************************
00021  * GLOBAL PREPROCESSOR DIRECTIVES
00022  *****************************************************************************/
00023 #define NO_TONESUPP                    TRUE /* undefine if tone support is
00024                                                desired */
00025 #undef  NO_TONESUPP
00026 #define SIU_NUMBER_OF_CHANNELS         2
00027 #define SIU_SIU_ID                     0x01
00028 #define SIU_DPU_ID                     0x02
00029 #define SIU_FM_ID                      0x03
00030
00031 #define SIU_FM_FP_MSG_COUNT            FM_FP_COUNT - 1
00032 #define SIU_FM_FP_OUT_MSG_ARRAY_SIZE   10
00033
00034 #define SIU_FP_FM_MSG_COUNT            FP_FM_COUNT - 1
00035 #define SIU_FP_FM_IN_MSG_ARRAY_SIZE    15
00036
00037 #define SIU_FM_LIN_SAMPLE_ARRAY_SIZE   80
00038
00039 #ifdef  SIMC55X
00040 #define C55X 1
00041 #endif
00042
00043 /* TESTDPUVECS will test the dpu test vectors under the ecotest directory for   */
00044 /* specific number of bits to evaluate the BER, note that only dpu Rx is useful */
00045 /* if you do not require the BER Rate test, then undef the TESTDPUVECS          */
00046 #define ONES_LIMIT 100000
00047
00048 /******************************************************************************
00049  * GLOBAL STRUCTURE AND ENUMERATION DEFINITIONS
00050  *****************************************************************************/
00051
00052 /* Global SIU instance structure */
00053 typedef struct {
00054
00055     /* FM elements */
00056     tuint         ID;            /* ID of current SIU instance */
00057     void         *fmInst;        /* FM instance pointer */
00058     ecomemBuffer_t  *fmBufs;        /* Pointer to base of FM buffer space */
00059     tint          fmNbufs;       /* Number of allocated FM buffers */
00060     tint          fm_heap_size;  /* Heap allocation for FM */
00061
00062     /* Auxiliary elements */
00063     tint          aux_heap_size; /* Auxiliary heap allocation */
00064
00065 } siuInst_t;
00066
00067 /* Global exception char enumeration */
00068 typedef enum {
00069      SIU_EXCEPTION_FM_DBG_FATAL_ERROR,
00070      SIU_EXCEPTION_FM_DBG_DEFAULT,
00071      SIU_EXCEPTION_FM_SIZES_ERR,
00072      SIU_EXCEPTION_FM_BUFS_ERR,
00073      SIU_EXCEPTION_FM_NEW_ERR,
00074      SIU_EXCEPTION_FM_OPEN_ERR
00075 } siuFatalErrorChar_e;
00076
00077 /******************************************************************************
00078  * GLOBAL FUNCTION DECLARATIONS
00079  *****************************************************************************/
00080
00081 tulong siuGetTime              (void);
00082 void   siuPcmInterface_Ch1     (void *targetInst, void *PcmData);
00083 void   siuPcmInterface_Ch2     (void *targetInst, void *PcmData);
00084 void   siuFpInterface_Ch1      (void *targetInst, void *FmFpMessage);
00085 void   siuFpInterface_Ch2      (void *targetInst, void *FmFpMessage);
00086 void   siuToneOffFax           (void *TargetInst);
00087 void   siuToneDetectCtrl       (void *siuInst, tuint ControlCode);
00088 void   siuFmDebugInfo          (void * moduleID, tuint msgType, tuint messageCode,
00089                                 tuint msgLength,  tuint *supportingData);
00090 void   siuFatalError           (tuint id, char *str);
00091 void   siu_init                (tint chnum);
00092 void   siu_init_lin_samples    (tint chnum);
00093 void   siu_init_fm_fp_messages (tint chnum);
00094 void   siu_init_fp_fm_messages (iffaxModulationTypes_e hsmod);
00095 void   siu_new_fm              (tint chnum);
00096 void   siu_open_fm             (tint chnum);
00097 void   siu_close_fm            (tint chnum);
00098 void   siu_delete_fm           (tint chnum);
00099
00100 void   UAExpand(tint       sub_segment_size,       /* subsegment size */
00101                 tword      *pcm_in,                /* input data array */
00102                 Fract      *send_out_buf_ptr_ptr,  /* address of output buffer pointer */
00103                 const tint *pcm_expand_table);     /* pointer to the A_law or U_law table */
00104
00105
00106 /* Tables used in main.c file */
00107 const tint tblUlaw[128] = {
00108    32124,  31100,  30076,  29052,  28028,  27004,  25980,  24956,
00109    23932,  22908,  21884,  20860,  19836,  18812,  17788,  16764,
00110    15996,  15484,  14972,  14460,  13948,  13436,  12924,  12412,
00111    11900,  11388,  10876,  10364,   9852,   9340,   8828,   8316,
00112     7932,   7676,   7420,   7164,   6908,   6652,   6396,   6140,
00113     5884,   5628,   5372,   5116,   4860,   4604,   4348,   4092,
00114     3900,   3772,   3644,   3516,   3388,   3260,   3132,   3004,
00115     2876,   2748,   2620,   2492,   2364,   2236,   2108,   1980,
00116     1884,   1820,   1756,   1692,   1628,   1564,   1500,   1436,
00117     1372,   1308,   1244,   1180,   1116,   1052,    988,    924,
00118      876,    844,    812,    780,    748,    716,    684,    652,
00119      620,    588,    556,    524,    492,    460,    428,    396,
00120      372,    356,    340,    324,    308,    292,    276,    260,
00121      244,    228,    212,    196,    180,    164,    148,    132,
00122      120,    112,    104,     96,     88,     80,     72,     64,
00123       56,     48,     40,     32,     24,     16,      8,      0
00124 };
00125
00126 /******************************************************************************
00127  * DATA DEFINITION: A-law expansion table
00128  ******************************************************************************
00129  * DESCRIPTION: Converts an 8-bit A-law value to its corresponding 16-bit
00130  *              int value.
00131  *
00132  *****************************************************************************/
00133
00134 const tint tblAlaw[128] = {
00135     5504,   5248,   6016,   5760,   4480,   4224,   4992,   4736,
00136     7552,   7296,   8064,   7808,   6528,   6272,   7040,   6784,
00137     2752,   2624,   3008,   2880,   2240,   2112,   2496,   2368,
00138     3776,   3648,   4032,   3904,   3264,   3136,   3520,   3392,
00139    22016,  20992,  24064,  23040,  17920,  16896,  19968,  18944,
00140    30208,  29184,  32256,  31232,  26112,  25088,  28160,  27136,
00141    11008,  10496,  12032,  11520,   8960,   8448,   9984,   9472,
00142    15104,  14592,  16128,  15616,  13056,  12544,  14080,  13568,
00143      344,    328,    376,    360,    280,    264,    312,    296,
00144      472,    456,    504,    488,    408,    392,    440,    424,
00145       88,     72,    120,    104,     24,      8,     56,     40,
00146      216,    200,    248,    232,    152,    136,    184,    168,
00147     1376,   1312,   1504,   1440,   1120,   1056,   1248,   1184,
00148     1888,   1824,   2016,   1952,   1632,   1568,   1760,   1696,
00149      688,    656,    752,    720,    560,    528,    624,    592,
00150      944,    912,   1008,    976,    816,    784,    880,    848
00151 } ;
00152
00153 #define NOC1FILES 8
00154 char TestFileNamesC1 [NOC1FILES][35] =
00155 {
00156         "V29_9600_c1_48dBrn.pcm",
00157         "V17_14400_c1_45dBrn.pcm",
00158         "V17_12000_c1_48dBrn.pcm",
00159         "V17_7200_c1_55dBrn.pcm",
00160         "V17_9600_c1_52dBrn.pcm",
00161         "V27_4800_c1_52dBrn.pcm",
00162         "V27_2400_c1_60dBrn.pcm" ,
00163         "V29_7200_c1_51dBrn.pcm"
00164 };
00165
00166 iffaxModulationTypes_e modC1[NOC1FILES] =
00167 {
00168     iffax_MODEM_MODE_V29_9600,
00169     iffax_MODEM_MODE_V17_L_14400,
00170     iffax_MODEM_MODE_V17_L_12000,
00171     iffax_MODEM_MODE_V17_L_7200,
00172     iffax_MODEM_MODE_V17_L_9600,
00173     iffax_MODEM_MODE_V27_4800,
00174     iffax_MODEM_MODE_V27_2400,
00175     iffax_MODEM_MODE_V29_7200
00176 };
00177
00178 #endif /* _FMSIM_H */
00179 /* nothing past this point */


FM: 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:

  • aux_heap_size : siuInst_t
  • fm_heap_size : siuInst_t
  • fmBufs : siuInst_t
  • fmInst : siuInst_t
  • fmNbufs : siuInst_t
  • ID : siuInst_t


FM: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables

  • aux_heap_size : siuInst_t
  • fm_heap_size : siuInst_t
  • fmBufs : siuInst_t
  • fmInst : siuInst_t
  • fmNbufs : siuInst_t
  • ID : siuInst_t


FM: Data Fields

  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • Defines
  • a
  • b
  • c
  • d
  • f
  • g
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w

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

- a -

  • ADD_NOISE : fmsim.c

- b -

  • BerCount : fmsim.c
  • bit_mask : fmsim.c
  • ByteBuf : fmsim.c

- c -

  • CAPTURE_PCM_TX : fmsim.c
  • CaptureDataLFract() : fmsim.c
  • CaptureDataShort() : fmsim.c
  • CaptureDataShort1() : fmsim.c
  • CDLoss : fmsim.c
  • CDLossInd : fmsim.c
  • CDLossTime : fmsim.c
  • CDLossTimeInd : fmsim.c
  • ch1_msg_num : fmsim.c
  • ch2_msg_num : fmsim.c
  • ClearAllGlobalVariables() : fmsim.c
  • CUSTPROB_DBG : fmsim.c

- d -

  • dpuBerMeas() : fmsim.c

- f -

  • FirstTime : fmsim.c
  • FirstTime1 : fmsim.c
  • FirstTime123 : fmsim.c
  • fmContext : fmsim.c
  • fmDebugGetFMMode() : fmDebugTraceParser.c
  • fmDebugGetFMState() : fmDebugTraceParser.c
  • fmDebugGetModulation() : fmDebugTraceParser.c
  • fmDebugTraceParser() : fmsim.c , fmDebugTraceParser.c
  • fmTablePtrs : fmsim.c
  • FpFmHsData : fmsim.c
  • FpFmLsData : fmsim.c
  • FpFmTestData : fmsim.c
  • FXM_MODE_COUNT : fmDebugTraceParser.c
  • FXM_MODE_OFF : fmDebugTraceParser.c
  • FXM_MODE_RX : fmDebugTraceParser.c
  • FXM_MODE_RX_HDLC : fmDebugTraceParser.c
  • FXM_MODE_TX : fmDebugTraceParser.c
  • FXM_MODE_TX_HDLC : fmDebugTraceParser.c
  • FxmMode_e : fmDebugTraceParser.c

- g -

  • gbindx : fmsim.c
  • GetDirectionString() : fmsim.c
  • gg_bscr_init : fmsim.c
  • gg_pmst_init : fmsim.c
  • gg_swwsr_init : fmsim.c
  • GlobalFmFpMsgOut : fmsim.c
  • GlobalFmFpMsgOutIndex1 : fmsim.c
  • GlobalFmFpMsgOutIndex2 : fmsim.c
  • GlobalFpFmMsgIn : fmsim.c
  • GlobalFpFmMsgInIndex1 : fmsim.c
  • GlobalFpFmMsgInIndex2 : fmsim.c
  • GlobalLinSample : fmsim.c

- i -

  • i : fmsim.c

- l -

  • limit_count : fmsim.c
  • LINEAR_PCM : fmsim.c
  • loop_flag : fmsim.c

- m -

  • main() : fmsim.c
  • MEAN : fmsim.c
  • ModAssoc : fmsim.c
  • modC1 : fmsim.h
  • msgString : fmDebugTraceParser.c

- n -

  • NO_TONESUPP : fmsim.h
  • NOC1FILES : fmsim.h
  • NOISELEVEL : fmsim.c

- o -

  • ONES_LIMIT : fmsim.h
  • OnesCount : fmsim.c

- p -

  • PopulateTestDataBase() : fmsim.c

- r -

  • rhrDataBufCnt : fmsim.c
  • RNGSTATE : fmsim.c
  • running : fmsim.c
  • RxCap : fmsim.c

- s -

  • SEED : fmsim.c
  • siu_close_fm() : fmsim.c , fmsim.h
  • siu_delete_fm() : fmsim.c , fmsim.h
  • SIU_DPU_ID : fmsim.h
  • SIU_EXCEPTION_FM_BUFS_ERR : fmsim.h
  • SIU_EXCEPTION_FM_DBG_DEFAULT : fmsim.h
  • SIU_EXCEPTION_FM_DBG_FATAL_ERROR : fmsim.h
  • SIU_EXCEPTION_FM_NEW_ERR : fmsim.h
  • SIU_EXCEPTION_FM_OPEN_ERR : fmsim.h
  • SIU_EXCEPTION_FM_SIZES_ERR : fmsim.h
  • SIU_FM_FP_MSG_COUNT : fmsim.h
  • SIU_FM_FP_OUT_MSG_ARRAY_SIZE : fmsim.h
  • SIU_FM_ID : fmsim.h
  • SIU_FM_LIN_SAMPLE_ARRAY_SIZE : fmsim.h
  • SIU_FP_FM_IN_MSG_ARRAY_SIZE : fmsim.h
  • SIU_FP_FM_MSG_COUNT : fmsim.h
  • siu_init() : fmsim.c , fmsim.h
  • siu_init_fm_fp_messages() : fmsim.c , fmsim.h
  • siu_init_fp_fm_messages() : fmsim.c , fmsim.h
  • siu_init_lin_samples() : fmsim.c , fmsim.h
  • siu_new_fm() : fmsim.c , fmsim.h
  • SIU_NUMBER_OF_CHANNELS : fmsim.h
  • siu_open_fm() : fmsim.c , fmsim.h
  • SIU_SIU_ID : fmsim.h
  • siuDebugString : fmsim.c
  • siuFatalError() : fmsim.c , fmsim.h
  • siuFatalErrorChar_e : fmsim.h
  • siuFatalString : fmsim.c
  • siuFmDebugInfo() : fmsim.h , fmsim.c
  • siuFmStats : fmsim.c
  • siuFpInterface_Ch1() : fmsim.h , fmsim.c
  • siuFpInterface_Ch2() : fmsim.h , fmsim.c
  • siuGetTime() : fmsim.c , fmsim.h
  • siuInst : fmsim.c
  • siuPcmInterface_Ch1() : fmsim.c , fmsim.h
  • siuPcmInterface_Ch2() : fmsim.c , fmsim.h
  • siuTermCode : fmsim.c
  • siuToneDetectCtrl() : fmsim.h , fmsim.c
  • siuToneOffFax() : fmsim.h
  • StatusPrintMonitor() : fmsim.c
  • systemTime : fmsim.c

- t -

  • tblAlaw : fmsim.h
  • tblUlaw : fmsim.h
  • TEST_CDL : fmsim.c
  • TESTDPUVECS : fmsim.c
  • TestFileNames : fmsim.c
  • TestFileNamesC1 : fmsim.h
  • TxCap : fmsim.c

- u -

  • UAExpand() : fmsim.c , fmsim.h

- v -

  • V17_STRAIN_TST : fmsim.c

- w -

  • wngInit() : fmsim.c


FM: Data Fields

  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • Defines

  • ADD_NOISE : fmsim.c
  • CAPTURE_PCM_TX : fmsim.c
  • CUSTPROB_DBG : fmsim.c
  • LINEAR_PCM : fmsim.c
  • NO_TONESUPP : fmsim.h
  • NOC1FILES : fmsim.h
  • ONES_LIMIT : fmsim.h
  • SIU_DPU_ID : fmsim.h
  • SIU_FM_FP_MSG_COUNT : fmsim.h
  • SIU_FM_FP_OUT_MSG_ARRAY_SIZE : fmsim.h
  • SIU_FM_ID : fmsim.h
  • SIU_FM_LIN_SAMPLE_ARRAY_SIZE : fmsim.h
  • SIU_FP_FM_IN_MSG_ARRAY_SIZE : fmsim.h
  • SIU_FP_FM_MSG_COUNT : fmsim.h
  • SIU_NUMBER_OF_CHANNELS : fmsim.h
  • SIU_SIU_ID : fmsim.h
  • TEST_CDL : fmsim.c
  • TESTDPUVECS : fmsim.c
  • V17_STRAIN_TST : fmsim.c


FM: Data Fields

  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • Defines

  • FxmMode_e : fmDebugTraceParser.c
  • siuFatalErrorChar_e : fmsim.h


FM: Data Fields

  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • Defines

  • FXM_MODE_COUNT : fmDebugTraceParser.c
  • FXM_MODE_OFF : fmDebugTraceParser.c
  • FXM_MODE_RX : fmDebugTraceParser.c
  • FXM_MODE_RX_HDLC : fmDebugTraceParser.c
  • FXM_MODE_TX : fmDebugTraceParser.c
  • FXM_MODE_TX_HDLC : fmDebugTraceParser.c
  • SIU_EXCEPTION_FM_BUFS_ERR : fmsim.h
  • SIU_EXCEPTION_FM_DBG_DEFAULT : fmsim.h
  • SIU_EXCEPTION_FM_DBG_FATAL_ERROR : fmsim.h
  • SIU_EXCEPTION_FM_NEW_ERR : fmsim.h
  • SIU_EXCEPTION_FM_OPEN_ERR : fmsim.h
  • SIU_EXCEPTION_FM_SIZES_ERR : fmsim.h


FM: Data Fields

  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • Defines
  • c
  • d
  • f
  • g
  • m
  • p
  • s
  • u
  • w

- c -

  • CaptureDataLFract() : fmsim.c
  • CaptureDataShort() : fmsim.c
  • CaptureDataShort1() : fmsim.c
  • ClearAllGlobalVariables() : fmsim.c

- d -

  • dpuBerMeas() : fmsim.c

- f -

  • fmDebugGetFMMode() : fmDebugTraceParser.c
  • fmDebugGetFMState() : fmDebugTraceParser.c
  • fmDebugGetModulation() : fmDebugTraceParser.c
  • fmDebugTraceParser() : fmsim.c , fmDebugTraceParser.c

- g -

  • GetDirectionString() : fmsim.c

- m -

  • main() : fmsim.c

- p -

  • PopulateTestDataBase() : fmsim.c

- s -

  • siu_close_fm() : fmsim.c , fmsim.h
  • siu_delete_fm() : fmsim.c , fmsim.h
  • siu_init() : fmsim.c , fmsim.h
  • siu_init_fm_fp_messages() : fmsim.c , fmsim.h
  • siu_init_fp_fm_messages() : fmsim.c , fmsim.h
  • siu_init_lin_samples() : fmsim.c , fmsim.h
  • siu_new_fm() : fmsim.h , fmsim.c
  • siu_open_fm() : fmsim.h , fmsim.c
  • siuFatalError() : fmsim.c , fmsim.h
  • siuFmDebugInfo() : fmsim.c , fmsim.h
  • siuFpInterface_Ch1() : fmsim.c , fmsim.h
  • siuFpInterface_Ch2() : fmsim.c , fmsim.h
  • siuGetTime() : fmsim.c , fmsim.h
  • siuPcmInterface_Ch1() : fmsim.c , fmsim.h
  • siuPcmInterface_Ch2() : fmsim.c , fmsim.h
  • siuToneDetectCtrl() : fmsim.c , fmsim.h
  • siuToneOffFax() : fmsim.h
  • StatusPrintMonitor() : fmsim.c

- u -

  • UAExpand() : fmsim.c , fmsim.h

- w -

  • wngInit() : fmsim.c


FM: Data Fields

  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • Defines
  • b
  • c
  • f
  • g
  • i
  • l
  • m
  • n
  • o
  • r
  • s
  • t

- b -

  • BerCount : fmsim.c
  • bit_mask : fmsim.c
  • ByteBuf : fmsim.c

- c -

  • CDLoss : fmsim.c
  • CDLossInd : fmsim.c
  • CDLossTime : fmsim.c
  • CDLossTimeInd : fmsim.c
  • ch1_msg_num : fmsim.c
  • ch2_msg_num : fmsim.c

- f -

  • FirstTime : fmsim.c
  • FirstTime1 : fmsim.c
  • FirstTime123 : fmsim.c
  • fmContext : fmsim.c
  • fmTablePtrs : fmsim.c
  • FpFmHsData : fmsim.c
  • FpFmLsData : fmsim.c
  • FpFmTestData : fmsim.c

- g -

  • gbindx : fmsim.c
  • gg_bscr_init : fmsim.c
  • gg_pmst_init : fmsim.c
  • gg_swwsr_init : fmsim.c
  • GlobalFmFpMsgOut : fmsim.c
  • GlobalFmFpMsgOutIndex1 : fmsim.c
  • GlobalFmFpMsgOutIndex2 : fmsim.c
  • GlobalFpFmMsgIn : fmsim.c
  • GlobalFpFmMsgInIndex1 : fmsim.c
  • GlobalFpFmMsgInIndex2 : fmsim.c
  • GlobalLinSample : fmsim.c

- i -

  • i : fmsim.c

- l -

  • limit_count : fmsim.c
  • loop_flag : fmsim.c

- m -

  • MEAN : fmsim.c
  • ModAssoc : fmsim.c
  • modC1 : fmsim.h
  • msgString : fmDebugTraceParser.c

- n -

  • NOISELEVEL : fmsim.c

- o -

  • OnesCount : fmsim.c

- r -

  • rhrDataBufCnt : fmsim.c
  • RNGSTATE : fmsim.c
  • running : fmsim.c
  • RxCap : fmsim.c

- s -

  • SEED : fmsim.c
  • siuDebugString : fmsim.c
  • siuFatalString : fmsim.c
  • siuFmStats : fmsim.c
  • siuInst : fmsim.c
  • siuTermCode : fmsim.c
  • systemTime : fmsim.c

- t -

  • tblAlaw : fmsim.h
  • tblUlaw : fmsim.h
  • TestFileNames : fmsim.c
  • TestFileNamesC1 : fmsim.h
  • TxCap : fmsim.c


FM: FM Test Package

FM Test Package

Page Contents

  • Introduction
  • Unit Test Build Procedure
  • Unit Test Preparation
  • Profiling Output
  • Further Information

Introduction

This package contains a basic test for FM (Fax Modem) module. This is not a regression test, its purpose is to show how FM may be used in a system and to be able to play with the configuration, so that learning is easier.

Unit Test Build Procedure

  1. Follow the build procedure in the main FM doumentation.
  2. Change directory to fm/test
  3. Build test using the XDC commands provided in the main FM documentation

Note:
This procedure applies to source deliveries only.

Unit Test Preparation

  1. Follow the build procedure outlined above in Unit Test Build Procedure.
  2. Configure CCS for appropriate target simulator/emulator.
  3. Open CCS and locate the exectuable image for the target of interest. The image files are located in the ti\mas\fm\test\lnkr\c<rtarg> directories (see Table 1 below).
  4. Load executable *.x<rtarg> and go to main().
  5. Follow Test Procedure.

In the and <rtarg> represents the target platform using the RTSC naming convention (see Table 2 below).

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

Test Procedure

  1. Allow the target to run to completion. The simulation will cycle through the all tests.
  2. The output file showing Bit Error Rate will be created in "../vectors/output" directory.
  3. Compare the generated output file with the reference output file in the "../vectors/refout".
  4. The BER should be same for corresponding test vectors..

Profiling Output

Note:
See the MIPS and Memory section in the main FM documentation for current profiling results.

Further Information

  • Revision History
  • Dependent Packages


FM: Page Index

FM Related Pages

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


FM: Revision History

FM Test Package

Revision History

Revision History

Version | Comments
1.0.0.0 | Initial Version


FM: siuInst_t Struct Reference

  • Data Structures
  • Data Fields

siuInst_t Struct Reference

#include <fmsim.h>

Detailed Description

Definition at line 53 of file fmsim.h.

Data Fields

tuint | ID
void * | fmInst
ecomemBuffer_t * | fmBufs
tint | fmNbufs
tint | fm_heap_size
tint | aux_heap_size

Field Documentation

tuint siuInst_t::ID

Definition at line 56 of file fmsim.h.

Referenced by siu_init().

void* siuInst_t::fmInst

Definition at line 57 of file fmsim.h.

Referenced by siu_close_fm(), siu_delete_fm(), siu_init(), siu_new_fm(), and siu_open_fm().

ecomemBuffer_t* siuInst_t::fmBufs

Definition at line 58 of file fmsim.h.

Referenced by siu_delete_fm(), siu_init(), and siu_new_fm().

tint siuInst_t::fmNbufs

Definition at line 59 of file fmsim.h.

Referenced by siu_delete_fm(), siu_init(), and siu_new_fm().

tint siuInst_t::fm_heap_size

Definition at line 60 of file fmsim.h.

Referenced by siu_delete_fm(), siu_init(), and siu_new_fm().

tint siuInst_t::aux_heap_size

Definition at line 63 of file fmsim.h.

Referenced by siu_delete_fm(), siu_init(), and siu_new_fm().

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


HDLC: Version.h File Reference

Version.h File Reference

Go to the source code of this file.

Defines

#define | ti_mas_hdlc_Version__top__
#define | __extern extern
#define | ti_mas_hdlc_Version___VERS 150
#define | ti_mas_hdlc_Version_MAJOR (3)
#define | ti_mas_hdlc_Version_MINOR (0)
#define | ti_mas_hdlc_Version_XVERTICAL (0)
#define | ti_mas_hdlc_Version_PATCH (1)
#define | ti_mas_hdlc_Version_BUILD (2)
#define | ti_mas_hdlc_Version_QUALITY (3)
#define | ti_mas_hdlc_Version_BTYPE (0)
#define | ti_mas_hdlc_Version_WIDTH (0)
#define | Version_MAJOR ti_mas_hdlc_Version_MAJOR
#define | Version_MINOR ti_mas_hdlc_Version_MINOR
#define | Version_XVERTICAL ti_mas_hdlc_Version_XVERTICAL
#define | Version_PATCH ti_mas_hdlc_Version_PATCH
#define | Version_BUILD ti_mas_hdlc_Version_BUILD
#define | Version_QUALITY ti_mas_hdlc_Version_QUALITY
#define | Version_BTYPE ti_mas_hdlc_Version_BTYPE
#define | Version_WIDTH ti_mas_hdlc_Version_WIDTH

Define Documentation

#define ti_mas_hdlc_Version__top__

Definition at line 27 of file Version.h.

#define __extern extern

Definition at line 33 of file Version.h.

#define ti_mas_hdlc_Version___VERS 150

Definition at line 36 of file Version.h.

#define ti_mas_hdlc_Version_MAJOR (3)

Definition at line 50 of file Version.h.

#define ti_mas_hdlc_Version_MINOR (0)

Definition at line 53 of file Version.h.

#define ti_mas_hdlc_Version_XVERTICAL (0)

Definition at line 56 of file Version.h.

#define ti_mas_hdlc_Version_PATCH (1)

Definition at line 59 of file Version.h.

#define ti_mas_hdlc_Version_BUILD (2)

Definition at line 62 of file Version.h.

#define ti_mas_hdlc_Version_QUALITY (3)

Definition at line 65 of file Version.h.

#define ti_mas_hdlc_Version_BTYPE (0)

Definition at line 68 of file Version.h.

#define ti_mas_hdlc_Version_WIDTH (0)

Definition at line 71 of file Version.h.

#define Version_MAJOR ti_mas_hdlc_Version_MAJOR

Definition at line 90 of file Version.h.

#define Version_MINOR ti_mas_hdlc_Version_MINOR

Definition at line 91 of file Version.h.

#define Version_XVERTICAL ti_mas_hdlc_Version_XVERTICAL

Definition at line 92 of file Version.h.

#define Version_PATCH ti_mas_hdlc_Version_PATCH

Definition at line 93 of file Version.h.

#define Version_BUILD ti_mas_hdlc_Version_BUILD

Definition at line 94 of file Version.h.

#define Version_QUALITY ti_mas_hdlc_Version_QUALITY

Definition at line 95 of file Version.h.

#define Version_BTYPE ti_mas_hdlc_Version_BTYPE

Definition at line 96 of file Version.h.

#define Version_WIDTH ti_mas_hdlc_Version_WIDTH

Definition at line 97 of file Version.h.


HDLC: Version.h Source File

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_hdlc_Version__include
00023 #define ti_mas_hdlc_Version__include
00024
00025 #ifndef __nested__
00026 #define __nested__
00027 #define ti_mas_hdlc_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_hdlc_Version___VERS 150
00037
00038
00039 /*
00040  * ======== INCLUDES ========
00041  */
00042
00043
00044
00045 /*
00046  * ======== AUXILIARY DEFINITIONS ========
00047  */
00048
00049 /* MAJOR */
00050 #define ti_mas_hdlc_Version_MAJOR (3)
00051
00052 /* MINOR */
00053 #define ti_mas_hdlc_Version_MINOR (0)
00054
00055 /* XVERTICAL */
00056 #define ti_mas_hdlc_Version_XVERTICAL (0)
00057
00058 /* PATCH */
00059 #define ti_mas_hdlc_Version_PATCH (1)
00060
00061 /* BUILD */
00062 #define ti_mas_hdlc_Version_BUILD (2)
00063
00064 /* QUALITY */
00065 #define ti_mas_hdlc_Version_QUALITY (3)
00066
00067 /* BTYPE */
00068 #define ti_mas_hdlc_Version_BTYPE (0)
00069
00070 /* WIDTH */
00071 #define ti_mas_hdlc_Version_WIDTH (0)
00072
00073 /*
00074  * ======== EPILOGUE ========
00075  */
00076
00077 #ifdef ti_mas_hdlc_Version__top__
00078 #undef __nested__
00079 #endif
00080
00081 #endif /* ti_mas_hdlc_Version__include */
00082
00083 /*
00084  * ======== PREFIX ALIASES ========
00085  */
00086
00087 #if !defined(__nested__) && !defined(ti_mas_hdlc_Version__nolocalnames)
00088
00089 /* module prefix */
00090 #define Version_MAJOR      ti_mas_hdlc_Version_MAJOR
00091 #define Version_MINOR      ti_mas_hdlc_Version_MINOR
00092 #define Version_XVERTICAL  ti_mas_hdlc_Version_XVERTICAL
00093 #define Version_PATCH      ti_mas_hdlc_Version_PATCH
00094 #define Version_BUILD      ti_mas_hdlc_Version_BUILD
00095 #define Version_QUALITY    ti_mas_hdlc_Version_QUALITY
00096 #define Version_BTYPE      ti_mas_hdlc_Version_BTYPE
00097 #define Version_WIDTH      ti_mas_hdlc_Version_WIDTH
00098 #endif


HDLC: Data Structures

  • Data Structures
  • Data Fields

HDLC Data Structures

Here are the data structures with brief descriptions:
hdlcRxInit_t | HDLC RX initialization structure
hdlcRxInst_t | HDLC RX processing instance structure
hdlcTxInit_t | HDLC TX initialization structure
hdlcTxInst_t | HDLC TX processing instance structure


HDLC: C55x Data Sheet

C55x Data Sheet

Copyright 2010, Texas Instruments Incorporated


HDLC: C64x+ Data Sheet

C64x+ Data Sheet

Copyright 2010, Texas Instruments Incorporated


HDLC:

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.


HDLC: doxygen.h File Reference

doxygen.h File Reference

Go to the source code of this file.


HDLC: doxygen.h Source File

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


HDLC: HDLC External API

HDLC (High-level Data Link Control) Package

HDLC External API

The HDLC software is partitioned into transmitter and receiver modules.
  • HDLC Receiver
  • HDLC Transmitter


HDLC: File Index

HDLC File List

Here is a list of all files with brief descriptions:
doxygen.h [code]
hdlcfcs.c [code]
hdlcrx.c [code] | The HDLC RX module decodes HDLC data stream into data frames
hdlcrx.h [code] | This file declares function prototypes and the instance for the HDLC RX (decoding) processing routines
hdlctx.c [code] | The HDLC TX module encodes data stream to HDLC frames
hdlctx.h [code] | Declare Function Prototypes and Type definitions for HDLC Transmit processing


HDLC: Data Fields

  • Data Structures
  • Data Fields
  • All
  • Variables
  • c
  • d
  • e
  • f
  • m
  • o
  • s

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

- c -

  • currOctet : hdlcRxInst_t , hdlcTxInst_t
  • currOctetBitCnt : hdlcTxInst_t

- d -

  • dataBufBitCnt : hdlcRxInst_t
  • dataBufBitSize : hdlcRxInst_t
  • dataBufByteCnt : hdlcTxInst_t
  • dataBufByteSize : hdlcTxInst_t
  • dataBufCnt : hdlcTxInst_t , hdlcRxInst_t
  • dataBufCurr : hdlcTxInst_t , hdlcRxInst_t
  • dataByteCnt : hdlcRxInst_t
  • dataFcs : hdlcRxInst_t
  • dataRegister : hdlcRxInst_t
  • dataRegisterBitCnt : hdlcRxInst_t
  • decodedDataBigEndian : hdlcTxInit_t , hdlcRxInit_t
  • decodedDataBytePerWord : hdlcRxInst_t , hdlcTxInst_t , hdlcRxInit_t , hdlcTxInit_t

- e -

  • encodedDataBigEndian : hdlcRxInit_t , hdlcTxInit_t
  • encodedDataBytePerWord : hdlcRxInit_t , hdlcTxInit_t , hdlcTxInst_t
  • encodedDataSizeBits : hdlcRxInst_t

- f -

  • fcs : hdlcTxInst_t
  • flagsCnt : hdlcTxInst_t

- m -

  • minFlagsCnt : hdlcTxInit_t , hdlcTxInst_t

- o -

  • oneCnt : hdlcTxInst_t

- s -

  • state : hdlcRxInst_t
  • status : hdlcTxInst_t


HDLC: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables
  • c
  • d
  • e
  • f
  • m
  • o
  • s

- c -

  • currOctet : hdlcRxInst_t , hdlcTxInst_t
  • currOctetBitCnt : hdlcTxInst_t

- d -

  • dataBufBitCnt : hdlcRxInst_t
  • dataBufBitSize : hdlcRxInst_t
  • dataBufByteCnt : hdlcTxInst_t
  • dataBufByteSize : hdlcTxInst_t
  • dataBufCnt : hdlcTxInst_t , hdlcRxInst_t
  • dataBufCurr : hdlcTxInst_t , hdlcRxInst_t
  • dataByteCnt : hdlcRxInst_t
  • dataFcs : hdlcRxInst_t
  • dataRegister : hdlcRxInst_t
  • dataRegisterBitCnt : hdlcRxInst_t
  • decodedDataBigEndian : hdlcTxInit_t , hdlcRxInit_t
  • decodedDataBytePerWord : hdlcRxInst_t , hdlcTxInst_t , hdlcRxInit_t , hdlcTxInit_t

- e -

  • encodedDataBigEndian : hdlcRxInit_t , hdlcTxInit_t
  • encodedDataBytePerWord : hdlcRxInit_t , hdlcTxInit_t , hdlcTxInst_t
  • encodedDataSizeBits : hdlcRxInst_t

- f -

  • fcs : hdlcTxInst_t
  • flagsCnt : hdlcTxInst_t

- m -

  • minFlagsCnt : hdlcTxInit_t , hdlcTxInst_t

- o -

  • oneCnt : hdlcTxInst_t

- s -

  • state : hdlcRxInst_t
  • status : hdlcTxInst_t


HDLC: Data Fields

  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • Defines
  • _
  • h
  • t
  • v
  • w

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

- _ -

  • __extern : Version.h

- h -

  • hdlc_FLAG_PATTERN : hdlctx.h
  • hdlc_IDLE_PATTERN : hdlctx.h
  • HDLC_INIT_FCS : hdlcrx.c
  • hdlc_RX_BUFFER_END : hdlcrx.h
  • HDLC_RX_DEBUG : hdlcrx.c
  • hdlc_RX_FRAME_ABORT : hdlcrx.h
  • hdlc_RX_FRAME_BAD : hdlcrx.h
  • hdlc_RX_FRAME_DATA : hdlcrx.h
  • hdlc_RX_FRAME_END : hdlcrx.h
  • hdlc_RX_FRAME_FLAGS : hdlcrx.h
  • hdlc_RX_FRAME_GOOD : hdlcrx.h
  • hdlc_RX_FRAME_NONALIGN : hdlcrx.h
  • hdlc_RX_STATE_DATA : hdlcrx.h
  • hdlc_RX_STATE_IDLE : hdlcrx.h
  • hdlc_TX_ABORT_BYTE : hdlctx.c
  • hdlc_TX_BITSTUFF_CNT : hdlctx.c
  • hdlc_TX_BYTE_SIZE : hdlctx.c
  • hdlc_TX_CONTINUE : hdlctx.h
  • hdlc_TX_ERROR : hdlctx.h
  • hdlc_TX_FCS_INIT : hdlctx.c
  • hdlc_TX_FLAGS_BYTE : hdlctx.c
  • hdlc_TX_FRAME_DATA : hdlctx.h
  • hdlc_TX_FRAME_FCS : hdlctx.h
  • hdlc_TX_FRAME_FLAGS : hdlctx.h
  • hdlc_TX_LSB_MASK : hdlctx.c
  • hdlc_TX_MIN_FLAG_CNT : hdlctx.c
  • hdlc_TX_MSB_MASK : hdlctx.c
  • hdlcFcsTable : hdlctx.c , hdlcfcs.c , hdlcrx.c
  • hdlcRx() : hdlcrx.h , hdlcrx.c
  • hdlcRxConfig() : hdlcrx.h , hdlcrx.c
  • hdlcRxInit() : hdlcrx.h , hdlcrx.c
  • hdlcRxState_e : hdlcrx.h
  • hdlcTxAbort() : hdlctx.c , hdlctx.h
  • hdlcTxConfig() : hdlctx.h , hdlctx.c
  • hdlcTxData() : hdlctx.h , hdlctx.c
  • hdlcTxFcs() : hdlctx.c , hdlctx.h
  • hdlcTxFlags() : hdlctx.c , hdlctx.h
  • hdlcTxInit() : hdlctx.c , hdlctx.h

- t -

  • ti_mas_hdlc_Version___VERS : Version.h
  • ti_mas_hdlc_Version__top__ : Version.h
  • ti_mas_hdlc_Version_BTYPE : Version.h
  • ti_mas_hdlc_Version_BUILD : Version.h
  • ti_mas_hdlc_Version_MAJOR : Version.h
  • ti_mas_hdlc_Version_MINOR : Version.h
  • ti_mas_hdlc_Version_PATCH : Version.h
  • ti_mas_hdlc_Version_QUALITY : Version.h
  • ti_mas_hdlc_Version_WIDTH : Version.h
  • ti_mas_hdlc_Version_XVERTICAL : Version.h
  • TYP_WORD_SIZE_HDLC : hdlcrx.c

- 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

- w -

  • WORD_MASK : hdlcrx.c


HDLC: Data Fields

  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • Defines
  • _
  • h
  • t
  • v
  • w

- _ -

  • __extern : Version.h

- h -

  • hdlc_FLAG_PATTERN : hdlctx.h
  • hdlc_IDLE_PATTERN : hdlctx.h
  • HDLC_INIT_FCS : hdlcrx.c
  • hdlc_RX_BUFFER_END : hdlcrx.h
  • HDLC_RX_DEBUG : hdlcrx.c
  • hdlc_RX_FRAME_ABORT : hdlcrx.h
  • hdlc_RX_FRAME_BAD : hdlcrx.h
  • hdlc_RX_FRAME_DATA : hdlcrx.h
  • hdlc_RX_FRAME_END : hdlcrx.h
  • hdlc_RX_FRAME_FLAGS : hdlcrx.h
  • hdlc_RX_FRAME_GOOD : hdlcrx.h
  • hdlc_RX_FRAME_NONALIGN : hdlcrx.h
  • hdlc_TX_ABORT_BYTE : hdlctx.c
  • hdlc_TX_BITSTUFF_CNT : hdlctx.c
  • hdlc_TX_BYTE_SIZE : hdlctx.c
  • hdlc_TX_CONTINUE : hdlctx.h
  • hdlc_TX_ERROR : hdlctx.h
  • hdlc_TX_FCS_INIT : hdlctx.c
  • hdlc_TX_FLAGS_BYTE : hdlctx.c
  • hdlc_TX_FRAME_DATA : hdlctx.h
  • hdlc_TX_FRAME_FCS : hdlctx.h
  • hdlc_TX_FRAME_FLAGS : hdlctx.h
  • hdlc_TX_LSB_MASK : hdlctx.c
  • hdlc_TX_MIN_FLAG_CNT : hdlctx.c
  • hdlc_TX_MSB_MASK : hdlctx.c

- t -

  • ti_mas_hdlc_Version___VERS : Version.h
  • ti_mas_hdlc_Version__top__ : Version.h
  • ti_mas_hdlc_Version_BTYPE : Version.h
  • ti_mas_hdlc_Version_BUILD : Version.h
  • ti_mas_hdlc_Version_MAJOR : Version.h
  • ti_mas_hdlc_Version_MINOR : Version.h
  • ti_mas_hdlc_Version_PATCH : Version.h
  • ti_mas_hdlc_Version_QUALITY : Version.h
  • ti_mas_hdlc_Version_WIDTH : Version.h
  • ti_mas_hdlc_Version_XVERTICAL : Version.h
  • TYP_WORD_SIZE_HDLC : hdlcrx.c

- 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

- w -

  • WORD_MASK : hdlcrx.c


HDLC: Data Fields

  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • Defines

  • hdlcRxState_e : hdlcrx.h


HDLC: Data Fields

  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • Defines

  • hdlc_RX_STATE_DATA : hdlcrx.h
  • hdlc_RX_STATE_IDLE : hdlcrx.h


HDLC: Data Fields

  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • Defines

  • hdlcRx() : hdlcrx.h , hdlcrx.c
  • hdlcRxConfig() : hdlcrx.c , hdlcrx.h
  • hdlcRxInit() : hdlcrx.h , hdlcrx.c
  • hdlcTxAbort() : hdlctx.h , hdlctx.c
  • hdlcTxConfig() : hdlctx.h , hdlctx.c
  • hdlcTxData() : hdlctx.h , hdlctx.c
  • hdlcTxFcs() : hdlctx.c , hdlctx.h
  • hdlcTxFlags() : hdlctx.h , hdlctx.c
  • hdlcTxInit() : hdlctx.c , hdlctx.h


HDLC: Data Fields

  • All
  • Functions
  • Variables
  • Enumerations
  • Enumerator
  • Defines

  • hdlcFcsTable : hdlcfcs.c , hdlctx.c , hdlcrx.c


HDLC: HDLC Fill Pattern

HDLC Fill Pattern
[HDLC Transmitter]

Collaboration diagram for HDLC Fill Pattern:

Defines

#define | hdlc_FLAG_PATTERN 0x7E
hdlc flag sequence
#define | hdlc_IDLE_PATTERN 0xFF
hdlc idle sequence

Define Documentation

#define hdlc_FLAG_PATTERN 0x7E

hdlc flag sequence

Definition at line 74 of file hdlctx.h.

#define hdlc_IDLE_PATTERN 0xFF

hdlc idle sequence

Definition at line 79 of file hdlctx.h.


HDLC: HDLC Receiver

HDLC Receiver

Collaboration diagram for HDLC Receiver:

Detailed Description

The HDLC RX module decodes the HDLC data passed to it. The data is decoded using the following steps:
  1. The HDLC RX instance is initialized by calling the hdlcRxInit() function which initializes the HDLC RX module state and the some counters. The HDLC RX also configures the module to decode data packed in different formats (packed or unpacked). The HDLC RX can also be configured for the option of not computing the CRC.
  2. A pointer to the encoded data and the number of bytes of encoded data is passed to the HDLC RX module by calling the hdlcRxConfig() function. The pointer and the size of the data buffer are saved inside HDLC RX instance. The size of the data buffer is stored as one less then the number of bits of data in the buffer. For a 16 byte buffer. The buffer size will be (16 * 8) – 1 = 127.
  3. The hdlcRx() is called to decode the data passed to the HDLC RX module. The location of a buffer where the decoded data is to be saved in passed as a parameter. The processing performed for decoding is discussed in detail in the following sub-section. The hdlcRx() function returns a status when it detects one of the following conditions:
    • Detects an end of data frame. It also reports if the frame had a good CRC or a bad CRC, if a CRC option is used.
    • Detects a frame abort in the middle of a frame. A frame abort detected before one byte of data has been decoded is not reported.
    • All data passed to the HDLC RX module has been decoded.

HDLC RX Processing

The data processing is performed in one of the states listed below until all data passed to HDLC RX has been processed. The following sub-sections describe the implementation details and notes that are intended as a reference.

IDLE STATE

The HDLC RX processing is performed in IDLE state when an abort sequence is detected. The remaining data is searched for a flag. Once a flag is detected, the state is changed to DATA.

DATA STATE

The HDLC frame data is decoded in this state. The HDLC encoded data format requires a ‘0’ fill bit insertion after a five ‘1’ bits. A string of six ‘1’ bits can be a flag. A string of seven ‘1’ bits or more is the abort sequence. Thus while decoding data, we can process seven bits at one time and check them if there is any fill bit, or if it is a flag or an abort sequence. Instead of processing one bit at a time, which can be MIPS intensive, we first look at the data processed during the previous iteration and determine the number of ones in the last six bits as shown in the figure below:
The maximum number of ‘1’ bit count can be six. If we had more then six consecutive ‘1’ bits during last iteration that would be an abort condition resulting in change of state to IDLE. For example, if the number of ‘1’ bits is three, we can process the next three bits during this iteration.
Once we have the bits that are to be processed, we remove fill bits, if there are five consecutive ‘1’ bits. The data bits are shifted into a 32-bit register, which is used to save the current byte of data and the previous two bytes of data that have been decoded. The reason for saving the previous two bytes of data is that the last two bytes of each HDLC frame constitute the frame checksum. These last two bytes are not passed to the outside and are used to check for correct CRC only.
If a flag is detected, we check if we have received a complete byte. In other words, if we detect a flag and the frame data has some partial bits, it is considered a bad frame if it has more then two bytes of decoded data. If the frame has less then two bytes of decoded data, we ignore that frame since it has not been reported to the outside as if it was not detected.
If a flag is not detected and we decode a byte of data, we compute the CRC and continue accumulating the byte in the 32-bit register. When we have three bytes of data we start saving the data one byte at a time to the external buffer.

Modules

HDLC Rx status

Data Structures

struct | hdlcRxInit_t
HDLC RX initialization structure. More...
struct | hdlcRxInst_t
HDLC RX processing instance structure. More...

HDLC Rx API

void | hdlcRxInit (hdlcRxInst_t *inst, hdlcRxInit_t *init)
This function initializes an instance of the HDLC receiver module.
void | hdlcRxConfig (hdlcRxInst_t *inst, tword *data, tuint size)
This function configures HDLC receiver to process data from a buffer passed to it.
tuint | hdlcRx (hdlcRxInst_t *inst, tword *dst, tuint *dst_cnt, tuint max_size)
This function performs de-stuffing and FCS computation of the received data.

Enumerations

enum | hdlcRxState_e { hdlc_RX_STATE_DATA, hdlc_RX_STATE_IDLE }
HDLC RX state definitions. More...

Variables

tint | hdlcRxInit_t::decodedDataBytePerWord
tbool | hdlcRxInit_t::encodedDataBigEndian
tbool | hdlcRxInit_t::decodedDataBigEndian
tint | hdlcRxInst_t::dataBufBitCnt
tword * | hdlcRxInst_t::dataBufCurr
tword | hdlcRxInst_t::currOctet
tulong | hdlcRxInst_t::dataRegister
tuint | hdlcRxInst_t::state
tint | hdlcRxInst_t::dataRegisterBitCnt
tint | hdlcRxInst_t::dataByteCnt
tuint | hdlcRxInst_t::dataFcs
tint | hdlcRxInst_t::encodedDataSizeBits
tint | hdlcRxInst_t::decodedDataBytePerWord
tuint | hdlcRxInst_t::dataBufCnt

Enumeration Type Documentation

enum hdlcRxState_e

HDLC RX state definitions.

Enumerator:
hdlc_RX_STATE_DATA | decoding data and flags
hdlc_RX_STATE_IDLE | looking for start of a new data frame

Definition at line 95 of file hdlcrx.h.

Function Documentation

void hdlcRxInit | ( | hdlcRxInst_t * | inst,
 |  | hdlcRxInit_t * | init
 | ) |  |

This function initializes an instance of the HDLC receiver module.

Remarks:
It must be called before calling other HDLC receive processing routines.
Parameters:
[in] | init | Pointer to HDLC Rx init Structure.
[in,out] | inst | Pointer to HDLC Rx instance.

Definition at line 96 of file hdlcrx.c.

References hdlcRxInst_t::currOctet, hdlcRxInst_t::dataBufCnt, hdlcRxInst_t::decodedDataBytePerWord, hdlcRxInit_t::decodedDataBytePerWord, hdlcRxInit_t::encodedDataBytePerWord, hdlcRxInst_t::encodedDataSizeBits, hdlc_RX_STATE_IDLE, and hdlcRxInst_t::state.

void hdlcRxConfig | ( | hdlcRxInst_t * | inst,
 |  | tword * | data,
 |  | tuint | size
 | ) |  |

This function configures HDLC receiver to process data from a buffer passed to it.

Parameters:
[in] | size | The number of data bytes to be processed by the HDLC receiver
[in] | data | The address of the data buffer to be processed by the HDLC receiver
[in,out] | inst | Pointer to HDLC Rx instance.

Definition at line 113 of file hdlcrx.c.

References hdlcRxInst_t::dataBufBitCnt, hdlcRxInst_t::dataBufBitSize, hdlcRxInst_t::dataBufCnt, hdlcRxInst_t::dataBufCurr, and TYP_WORD_SIZE_HDLC.

tuint hdlcRx | ( | hdlcRxInst_t * | inst,
 |  | tword * | dst,
 |  | tuint * | dst_cnt,
 |  | tuint | max_size
 | ) |  |

This function performs de-stuffing and FCS computation of the received data.

The HDLC processing function provides the following functionality that is used to decode the HDLC data frames

  • De-formatting receive data
  • Flag detection
  • Zero-bit deletion
  • FCS checking
  • Abort detection

Parameters:
[in,out] | dst | The address of the data buffer where the decoded data will be saved
[in,out] | dst_cnt | The address of the variable which is incremented by one each time a byte is decoded and copied to the 'dst' buffer.
[in] | max_size | Maximum number of bytes that can be decoded.
[in,out] | inst | Pointer to HDLC Rx instance.
Return values:
Returns HDLC Rx status

Definition at line 142 of file hdlcrx.c.

References hdlcRxInst_t::currOctet, hdlcRxInst_t::dataBufBitCnt, hdlcRxInst_t::dataBufBitSize, hdlcRxInst_t::dataBufCnt, hdlcRxInst_t::dataBufCurr, hdlcRxInst_t::dataByteCnt, hdlcRxInst_t::dataFcs, hdlcRxInst_t::dataRegister, hdlcRxInst_t::dataRegisterBitCnt, HDLC_INIT_FCS, hdlc_RX_BUFFER_END, hdlc_RX_FRAME_ABORT, hdlc_RX_FRAME_BAD, hdlc_RX_FRAME_DATA, hdlc_RX_FRAME_END, hdlc_RX_FRAME_FLAGS, hdlc_RX_FRAME_GOOD, hdlc_RX_STATE_DATA, hdlc_RX_STATE_IDLE, hdlcFcsTable, hdlcRxInst_t::state, TYP_WORD_SIZE_HDLC, and WORD_MASK.

Variable Documentation

tint hdlcRxInit_t::decodedDataBytePerWord [inherited]

Size of the decoded data word (1 or 2 bytes per word

Definition at line 85 of file hdlcrx.h.

Referenced by hdlcRxInit().

tbool hdlcRxInit_t::encodedDataBigEndian [inherited]

TRUE for big-endian byte notation.
FALSE for little-endian byte notation.

Definition at line 86 of file hdlcrx.h.

tbool hdlcRxInit_t::decodedDataBigEndian [inherited]

TRUE for big-endian byte notation.
FALSE for little-endian byte notation.

Definition at line 88 of file hdlcrx.h.

tint hdlcRxInst_t::dataBufBitCnt [inherited]

number of bits decoded so far

Definition at line 113 of file hdlcrx.h.

Referenced by hdlcRx(), and hdlcRxConfig().

tword* hdlcRxInst_t::dataBufCurr [inherited]

pointer to the location in the buffer being decoded

Definition at line 115 of file hdlcrx.h.

Referenced by hdlcRx(), and hdlcRxConfig().

tword hdlcRxInst_t::currOctet [inherited]

contains the bits we are or have been processing recently

Definition at line 117 of file hdlcrx.h.

Referenced by hdlcRx(), and hdlcRxInit().

tulong hdlcRxInst_t::dataRegister [inherited]

32 bit register with the decoded data bytes

Definition at line 119 of file hdlcrx.h.

Referenced by hdlcRx().

tuint hdlcRxInst_t::state [inherited]

current receive processing state

Definition at line 121 of file hdlcrx.h.

Referenced by hdlcRx(), and hdlcRxInit().

tint hdlcRxInst_t::dataRegisterBitCnt [inherited]

counts the number of bits of data in the dataRegister

Definition at line 123 of file hdlcrx.h.

Referenced by hdlcRx().

tint hdlcRxInst_t::dataByteCnt [inherited]

counts the number of bytes decoded so far

Definition at line 125 of file hdlcrx.h.

Referenced by hdlcRx().

tuint hdlcRxInst_t::dataFcs [inherited]

records the fcs we have computed so far

Definition at line 127 of file hdlcrx.h.

Referenced by hdlcRx().

tint hdlcRxInst_t::encodedDataSizeBits [inherited]

size of the encoded data word

Definition at line 129 of file hdlcrx.h.

Referenced by hdlcRxInit().

tint hdlcRxInst_t::decodedDataBytePerWord [inherited]

size of the decoded data word

Definition at line 131 of file hdlcrx.h.

Referenced by hdlcRxInit().

tuint hdlcRxInst_t::dataBufCnt [inherited]

byte offset is now included in the instance

Definition at line 133 of file hdlcrx.h.

Referenced by hdlcRx(), hdlcRxConfig(), and hdlcRxInit().


HDLC: HDLC Transmitter

HDLC Transmitter

Collaboration diagram for HDLC Transmitter:

Detailed Description

The HDLCTX module encodes the given data passed to it and stores the encoded data in a location provided. The data is encoded using the following steps:
  1. The HDLC TX instance is initialized by calling the hdlcTxInit() function which initializes the HDLC TX module state and the some counters. It configures the module to encode data packed in different formats (packed or unpacked). The HDLC TX can also be configured for the option of not computing the CRC.
  2. A pointer to the location of buffer where the encoded data will be placed and the number of bytes of encoded data is passed to the HDLC TX module by calling the hdlcTxConfig() function. The pointer and the size of the data buffer are saved inside HDLC TX instance.
  3. The hdlcTxData() is called to encode the data and save it the the buffer provided during configuration. The location of a buffer, which has the data to be encoded is passed as a parameter. The processing performed for encoding is discussed in detail in the following sub-section. The hdlcTx() function returns a status when it detects one of the following conditions:
    • Encoded all data that was provided.
    • The data buffer provided for encoded data is full.
  4. The hdlcTxFcs() function is called to append a CRC to the encoded data buffer.
  5. The hdlcTxAbort() function is called to append the abort sequence to the encoded data buffer.

HDLC TX Processing

For HDLC TX processing, we go through a ‘while’ loop until we have completely filled the buffer provided for the encoded data.
The encoded data is kept in a 32-bit register, during each iteration, we first check if we have more then eight bits of data in the register. If yes, we extract one byte from the register and save it in the location provided, and then go back to the beginning of the loop again. Once we have less then eight bits, we begin encoding data. The encoding of the data is performed according to the state. In DATA state, we check if we have more data to encode and then encode (bit fill) the data into HDLC format, and shift the encoded data into the 32-bit data register. After encoding one byte of data, we go back to the beginning of the loop since we now have more then eight bits of data and we can copy that byte of data.
During each iteration, we bit fill the data and save it in a 32-bit iteration

Modules

HDLC Tx status
HDLC Fill Pattern

Data Structures

struct | hdlcTxInit_t
HDLC TX initialization structure. More...
struct | hdlcTxInst_t
HDLC TX processing instance structure. More...

HDLC Tx API

void | hdlcTxInit (hdlcTxInst_t *inst, hdlcTxInit_t *init)
This function initializes an instance of the HDLC transmitter module.
tuint | hdlcTxConfig (hdlcTxInst_t *inst, tword *dataBuffer, tuint size)
This function configures HDLC transmitter to process data from a buffer passed to it.
tuint | hdlcTxData (hdlcTxInst_t *inst, tword *src, tuint *src_idx, tuint size)
This function performs bit stuffing and stores the encoded data in the transmit buffer.
tuint | hdlcTxFcs (hdlcTxInst_t *inst, tbool good_frame)
This function generates the FCS bytes and one HDLC flag to mark end the current frame and stores them in the transmit buffer.
tuint | hdlcTxFlags (hdlcTxInst_t *inst, tint num_flags, tint fill_pattern)
This function generates the HDLC flags to fill the current transmit buffer.
tuint | hdlcTxAbort (hdlcTxInst_t *inst)
This function appends the abort sequence at the end of the data stream .

Function Documentation

void hdlcTxInit | ( | hdlcTxInst_t * | inst,
 |  | hdlcTxInit_t * | init
 | ) |  |

This function initializes an instance of the HDLC transmitter module.

Remarks:
It must be called before calling other HDLC transmitter processing routines.
Parameters:
[in] | init | Pointer to HDLC Tx init Structure.
[in,out] | inst | Pointer to HDLC Tx instance.

Definition at line 42 of file hdlctx.c.

References hdlcTxInst_t::currOctetBitCnt, hdlcTxInst_t::dataBufCnt, hdlcTxInst_t::decodedDataBytePerWord, hdlcTxInit_t::decodedDataBytePerWord, hdlcTxInst_t::encodedDataBytePerWord, hdlcTxInit_t::encodedDataBytePerWord, hdlcTxInst_t::fcs, hdlcTxInst_t::flagsCnt, hdlc_TX_FCS_INIT, hdlc_TX_FRAME_FLAGS, hdlcTxInst_t::minFlagsCnt, hdlcTxInit_t::minFlagsCnt, hdlcTxInst_t::oneCnt, and hdlcTxInst_t::status.

tuint hdlcTxConfig | ( | hdlcTxInst_t * | inst,
 |  | tword * | dataBuffer,
 |  | tuint | size
 | ) |  |

This function configures HDLC transmitter to process data from a buffer passed to it.

Parameters:
[in] | size | The size of the data buffer in bytes
[in] | dataBuffer | The address of the data buffer where the encoded data will be saved.
[in,out] | inst | Pointer to HDLC Tx instance.

Definition at line 64 of file hdlctx.c.

References hdlcTxInst_t::dataBufByteCnt, hdlcTxInst_t::dataBufByteSize, hdlcTxInst_t::dataBufCnt, hdlcTxInst_t::dataBufCurr, hdlc_TX_CONTINUE, and hdlcTxInst_t::status.

tuint hdlcTxData | ( | hdlcTxInst_t * | inst,
 |  | tword * | src,
 |  | tuint * | src_idx,
 |  | tuint | size
 | ) |  |

This function performs bit stuffing and stores the encoded data in the transmit buffer.

Parameters:
[in] | src | The address of the data buffer which has the data to be encoded
[in] | src_idx | The address of the variable, which indicates the location, from where the HDLC transmit will begin processing the data.
[in] | size | Maximum number of bytes that can be encoded.
[in,out] | inst | Pointer to HDLC Tx instance.
Return values:
Returns HDLC Tx status

Definition at line 84 of file hdlctx.c.

References hdlcTxInst_t::currOctet, hdlcTxInst_t::currOctetBitCnt, hdlcTxInst_t::dataBufByteCnt, hdlcTxInst_t::dataBufByteSize, hdlcTxInst_t::dataBufCnt, hdlcTxInst_t::dataBufCurr, hdlcTxInst_t::fcs, hdlc_TX_BITSTUFF_CNT, hdlc_TX_BYTE_SIZE, hdlc_TX_CONTINUE, hdlc_TX_FRAME_DATA, hdlc_TX_FRAME_FCS, hdlc_TX_LSB_MASK, hdlcFcsTable, hdlcTxInst_t::oneCnt, and hdlcTxInst_t::status.

Referenced by hdlcTxAbort(), hdlcTxFcs(), and hdlcTxFlags().

tuint hdlcTxFcs | ( | hdlcTxInst_t * | inst,
 |  | tbool | good_frame
 | ) |  |

This function generates the FCS bytes and one HDLC flag to mark end the current frame and stores them in the transmit buffer.

A bad or incorrect FCS is generated if the parameter good_frame is FALSE (0). Otherwise, a good FCS is generated

Remarks:
The function must be called after calling the hdlcTxData
Parameters:
[in] | good_frame | Number of data bytes to be encoded
[in,out] | inst | Pointer to HDLC Tx instance.
Return values:
Returns HDLC Tx status

Definition at line 257 of file hdlctx.c.

References hdlcTxInst_t::fcs, hdlcTxInst_t::flagsCnt, hdlc_TX_BYTE_SIZE, hdlc_TX_ERROR, hdlc_TX_FRAME_DATA, hdlc_TX_FRAME_FCS, hdlc_TX_FRAME_FLAGS, hdlc_TX_LSB_MASK, hdlcTxData(), and hdlcTxInst_t::status.

Here is the call graph for this function:

tuint hdlcTxFlags | ( | hdlcTxInst_t * | inst,
 |  | tint | num_flags,
 |  | tint | fill_pattern
 | ) |  |

This function generates the HDLC flags to fill the current transmit buffer.

The number of flags generated is given by the parameter num_flags. The minimum number of the HDLC flags generated is one regardless of the value of the parameter num_flags. The maximum number of the HDLC flags generated is determined by the parameter num_flags or if the transmit buffer gets full (which ever comes first).

Parameters:
[in] | num_flags | number of flags to be generated
[in] | fill_pattern | HDLC Fill Pattern
[in,out] | inst | Pointer to HDLC Tx instance.
Remarks:
The function must be called after calling the hdlcTxFcs since flags can only be generated between frames. The function returns a status value as defined before.
Return values:
Returns HDLC Tx status

Definition at line 300 of file hdlctx.c.

References hdlcTxInst_t::currOctet, hdlcTxInst_t::currOctetBitCnt, hdlcTxInst_t::fcs, hdlc_TX_BYTE_SIZE, hdlc_TX_CONTINUE, hdlc_TX_FCS_INIT, hdlcTxData(), and hdlcTxInst_t::oneCnt.

Here is the call graph for this function:

tuint hdlcTxAbort ( hdlcTxInst_t * inst )

This function appends the abort sequence at the end of the data stream .

Parameters:
[in,out] inst Pointer to HDLC Tx instance.
Return values:
Returns HDLC Tx status

Definition at line 329 of file hdlctx.c.

References hdlcTxInst_t::currOctet, hdlcTxInst_t::currOctetBitCnt, hdlcTxInst_t::fcs, hdlc_TX_ABORT_BYTE, hdlc_TX_BYTE_SIZE, hdlc_TX_FCS_INIT, hdlc_TX_FRAME_FLAGS, hdlcTxData(), and hdlcTxInst_t::status.

Here is the call graph for this function:


HDLC: HDLC Rx status

HDLC Rx status
[HDLC Receiver]

Collaboration diagram for HDLC Rx status:

Detailed Description

The HDLC RX function 'hdlcRx' function decodes the data provided and looks for the end-of-frame, flags, and abort sequence. When it finds any of those data sequences, it stops decoding any more data and reports the status back to the calling function. The calling function can then process the decoded data frames.

Defines

#define | hdlc_RX_FRAME_DATA 0x0001
#define | hdlc_RX_FRAME_END 0x0002
#define | hdlc_RX_FRAME_GOOD 0x0004
#define | hdlc_RX_FRAME_BAD 0x0008
#define | hdlc_RX_FRAME_ABORT 0x0010
#define | hdlc_RX_FRAME_FLAGS 0x0020
#define | hdlc_RX_BUFFER_END 0x0040
#define | hdlc_RX_FRAME_NONALIGN 0x0080

Define Documentation

#define hdlc_RX_FRAME_DATA 0x0001

Definition at line 62 of file hdlcrx.h.

Referenced by hdlcRx().

#define hdlc_RX_FRAME_END 0x0002

Definition at line 63 of file hdlcrx.h.

Referenced by hdlcRx().

#define hdlc_RX_FRAME_GOOD 0x0004

Definition at line 64 of file hdlcrx.h.

Referenced by hdlcRx().

#define hdlc_RX_FRAME_BAD 0x0008

Definition at line 65 of file hdlcrx.h.

Referenced by hdlcRx().

#define hdlc_RX_FRAME_ABORT 0x0010

Definition at line 66 of file hdlcrx.h.

Referenced by hdlcRx().

#define hdlc_RX_FRAME_FLAGS 0x0020

Definition at line 67 of file hdlcrx.h.

Referenced by hdlcRx().

#define hdlc_RX_BUFFER_END 0x0040

Definition at line 68 of file hdlcrx.h.

Referenced by hdlcRx().

#define hdlc_RX_FRAME_NONALIGN 0x0080

Definition at line 69 of file hdlcrx.h.


HDLC: HDLC Tx status

HDLC Tx status
[HDLC Transmitter]

Collaboration diagram for HDLC Tx status:

Detailed Description

The HDLC TX status is reported by HDLC TX functions to provide information to the user. It indicates to the user if the data buffer provided has been filled or if the user needs to continue calling the HDLC TX routines.

Defines

#define | hdlc_TX_CONTINUE 0x0001
#define | hdlc_TX_FRAME_DATA 0x0002
#define | hdlc_TX_FRAME_FCS 0x0004
#define | hdlc_TX_FRAME_FLAGS 0x0008
#define | hdlc_TX_ERROR 0x0010

Define Documentation

#define hdlc_TX_CONTINUE 0x0001

Definition at line 58 of file hdlctx.h.

Referenced by hdlcTxConfig(), hdlcTxData(), and hdlcTxFlags().

#define hdlc_TX_FRAME_DATA 0x0002

Definition at line 59 of file hdlctx.h.

Referenced by hdlcTxData(), and hdlcTxFcs().

#define hdlc_TX_FRAME_FCS 0x0004

Definition at line 60 of file hdlctx.h.

Referenced by hdlcTxData(), and hdlcTxFcs().

#define hdlc_TX_FRAME_FLAGS 0x0008

Definition at line 61 of file hdlctx.h.

Referenced by hdlcTxAbort(), hdlcTxFcs(), and hdlcTxInit().

#define hdlc_TX_ERROR 0x0010

Definition at line 62 of file hdlctx.h.

Referenced by hdlcTxFcs().


HDLC: hdlcfcs.c File Reference

hdlcfcs.c File Reference

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

Include dependency graph for hdlcfcs.c:

Go to the source code of this file.

Variables

const tuint hdlcFcsTable [256]

Variable Documentation

const tuint hdlcFcsTable[256]

Definition at line 25 of file hdlcfcs.c.

Referenced by hdlcRx(), and hdlcTxData().


HDLC: hdlcfcs.c Source File

hdlcfcs.c

Go to the documentation of this file.
00001 /******************************************************************************
00002 * FILE PURPOSE: HDLC Frame Check Sequence Computations
00003 *
00004 *******************************************************************************
00005 * FILE NAME: hdlcfcs.c
00006 *
00007 * DESCRIPTION: This file contains routines and data structures used to
00008 * generate and check the HDLC FCS sequence.  The HDLC FCS is a two-byte cyclic
00009 * redundancy check (CRC) value computed using the algorithm described in the
00010 * CCITT X.25 specification.  In HDLC chip documentation, this is usually
00011 * referred to as the "CCITT" algorithm.  Note that the "CCITT" algorithm is
00012 * very different from the "CRC-16" algorithm, another popular algorithm
00013 * frequently mentioned in chip documentation (which we don't support).
00014 *
00015 * REVISION HISTORY:
00016 *
00017 * $Log: HDLCFCS.C $
00018 * Revision 1.1  1999/12/06 10:28:14  sakhtar
00019 * Initial revision
00020 *
00021 * (C) Copyright 1999, Telogy Networks, Inc.
00022 ******************************************************************************/
00023 #include <ti/mas/types/types.h>
00024
00025 const tuint hdlcFcsTable [256] = {
00026 0x0000,0x2110,0x4220,0x6330,0x8440,0xA550,0xC660,0xE770,
00027 0x0881,0x2991,0x4AA1,0x6BB1,0x8CC1,0xADD1,0xCEE1,0xEFF1,
00028 0x3112,0x1002,0x7332,0x5222,0xB552,0x9442,0xF772,0xD662,
00029 0x3993,0x1883,0x7BB3,0x5AA3,0xBDD3,0x9CC3,0xFFF3,0xDEE3,
00030 0x6224,0x4334,0x2004,0x0114,0xE664,0xC774,0xA444,0x8554,
00031 0x6AA5,0x4BB5,0x2885,0x0995,0xEEE5,0xCFF5,0xACC5,0x8DD5,
00032 0x5336,0x7226,0x1116,0x3006,0xD776,0xF666,0x9556,0xB446,
00033 0x5BB7,0x7AA7,0x1997,0x3887,0xDFF7,0xFEE7,0x9DD7,0xBCC7,
00034 0xC448,0xE558,0x8668,0xA778,0x4008,0x6118,0x0228,0x2338,
00035 0xCCC9,0xEDD9,0x8EE9,0xAFF9,0x4889,0x6999,0x0AA9,0x2BB9,
00036 0xF55A,0xD44A,0xB77A,0x966A,0x711A,0x500A,0x333A,0x122A,
00037 0xFDDB,0xDCCB,0xBFFB,0x9EEB,0x799B,0x588B,0x3BBB,0x1AAB,
00038 0xA66C,0x877C,0xE44C,0xC55C,0x222C,0x033C,0x600C,0x411C,
00039 0xAEED,0x8FFD,0xECCD,0xCDDD,0x2AAD,0x0BBD,0x688D,0x499D,
00040 0x977E,0xB66E,0xD55E,0xF44E,0x133E,0x322E,0x511E,0x700E,
00041 0x9FFF,0xBEEF,0xDDDF,0xFCCF,0x1BBF,0x3AAF,0x599F,0x788F,
00042 0x8891,0xA981,0xCAB1,0xEBA1,0x0CD1,0x2DC1,0x4EF1,0x6FE1,
00043 0x8010,0xA100,0xC230,0xE320,0x0450,0x2540,0x4670,0x6760,
00044 0xB983,0x9893,0xFBA3,0xDAB3,0x3DC3,0x1CD3,0x7FE3,0x5EF3,
00045 0xB102,0x9012,0xF322,0xD232,0x3542,0x1452,0x7762,0x5672,
00046 0xEAB5,0xCBA5,0xA895,0x8985,0x6EF5,0x4FE5,0x2CD5,0x0DC5,
00047 0xE234,0xC324,0xA014,0x8104,0x6674,0x4764,0x2454,0x0544,
00048 0xDBA7,0xFAB7,0x9987,0xB897,0x5FE7,0x7EF7,0x1DC7,0x3CD7,
00049 0xD326,0xF236,0x9106,0xB016,0x5766,0x7676,0x1546,0x3456,
00050 0x4CD9,0x6DC9,0x0EF9,0x2FE9,0xC899,0xE989,0x8AB9,0xABA9,
00051 0x4458,0x6548,0x0678,0x2768,0xC018,0xE108,0x8238,0xA328,
00052 0x7DCB,0x5CDB,0x3FEB,0x1EFB,0xF98B,0xD89B,0xBBAB,0x9ABB,
00053 0x754A,0x545A,0x376A,0x167A,0xF10A,0xD01A,0xB32A,0x923A,
00054 0x2EFD,0x0FED,0x6CDD,0x4DCD,0xAABD,0x8BAD,0xE89D,0xC98D,
00055 0x267C,0x076C,0x645C,0x454C,0xA23C,0x832C,0xE01C,0xC10C,
00056 0x1FEF,0x3EFF,0x5DCF,0x7CDF,0x9BAF,0xBABF,0xD98F,0xF89F,
00057 0x176E,0x367E,0x554E,0x745E,0x932E,0xB23E,0xD10E,0xF01E };
00058
00059 /* This table is only used in c54x.
00060    TODO: It should be moved to c54x\hdlcrx.s. */
00061 #if (defined(ti_targets_C54) || defined(ti_targets_C54_far))
00062 const tuint hdlcRxInitTable [12] = {
00063 0X0000,0x0001,0x0002,0x0006,0x0007,0x0008,0x00FF,0x0010,
00064 0x007E,0x003E,0x003F,0x007F };
00065 #endif
00066
00067 /* nothing past this point */


HDLC: hdlcrx.c File Reference

hdlcrx.c File Reference

Detailed Description

The HDLC RX module decodes HDLC data stream into data frames.

path /dsps_gtmas/ti/mas/hdlc/src/hdlcrx.c

============================================================================ Copyright (c) Texas Instruments Incorporated 2002-2009

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

Definition in file hdlcrx.c.

#include <ti/mas/types/types.h>
#include <ti/mas/hdlc/hdlcrx.h>
#include <ti/mas/util/pkt.h>

Include dependency graph for hdlcrx.c:

Go to the source code of this file.

Defines

#define | TYP_WORD_SIZE_HDLC 8
#define | HDLC_INIT_FCS 0xFFFF
#define | WORD_MASK ( (1 << TYP_WORD_SIZE_HDLC) - 1)
#define | HDLC_RX_DEBUG 0

Functions

void | hdlcRxInit (hdlcRxInst_t *inst, hdlcRxInit_t *init)
This function initializes an instance of the HDLC receiver module.
void | hdlcRxConfig (hdlcRxInst_t *inst, tword *data, tuint size)
This function configures HDLC receiver to process data from a buffer passed to it.
tuint | hdlcRx (hdlcRxInst_t *inst, tword *dst, tuint *dst_cnt, tuint max_size)
This function performs de-stuffing and FCS computation of the received data.

Variables

const tuint | hdlcFcsTable []

Define Documentation

#define TYP_WORD_SIZE_HDLC 8

Definition at line 22 of file hdlcrx.c.

Referenced by hdlcRx(), and hdlcRxConfig().

#define HDLC_INIT_FCS 0xFFFF

Definition at line 29 of file hdlcrx.c.

Referenced by hdlcRx().

#define WORD_MASK ( (1 << TYP_WORD_SIZE_HDLC) - 1)

Definition at line 30 of file hdlcrx.c.

Referenced by hdlcRx().

#define HDLC_RX_DEBUG 0

Definition at line 39 of file hdlcrx.c.

Variable Documentation

const tuint hdlcFcsTable[]

Definition at line 25 of file hdlcfcs.c.


HDLC: hdlcrx.c Source File

hdlcrx.c

Go to the documentation of this file.
00001 /* ========================================================================== */
00017
00018 #include <ti/mas/types/types.h>
00019 #include <ti/mas/hdlc/hdlcrx.h>
00020 #include <ti/mas/util/pkt.h>
00021
00022 #define TYP_WORD_SIZE_HDLC 8
00023
00024 /******************************************************************************
00025 * DATA DEFINITION:  HDLC RX local definitions
00026 ******************************************************************************/
00027 extern const tuint hdlcFcsTable[]; /* used for FCS computation */
00028
00029 #define   HDLC_INIT_FCS    0xFFFF  /* initail value for FCS */
00030 #define   WORD_MASK        ( (1 << TYP_WORD_SIZE_HDLC) - 1)
00031
00032 /******************************************************************************
00033 * DATA DEFINITION:  HDLC RX debugging data defintion and function
00034 *
00035 * DESCRIPTION:      The following data variables are used for debugging
00036 *                   purposes only. These variables are commented out under
00037 *                   normal conditions
00038 ******************************************************************************/
00039 #define HDLC_RX_DEBUG 0
00040
00041 #if HDLC_RX_DEBUG
00042   #define HDLC_RX_BUF  20
00043
00044   typedef struct {
00045     hdlcRxInst_t instance;
00046     tint bit_cnt;
00047     tword temp_bit;
00048   } hdlcTemp_t;
00049
00050   hdlcTemp_t BefBuf[hdlc_RX_BUF];
00051
00052   tulong iteration_count = 0;
00053   tulong iteration_test = 0;
00054
00055   void hdlcRxDebug (hdlcRxInst_t *inst, tint bit_cnt, tword temp_bit)
00056   {
00057     tint i,j,*k,*l;
00058
00059     if (iteration_count == iteration_test)
00060     {
00061     asm ("   nop");
00062     asm ("   nop");
00063     asm ("   nop");
00064     asm ("   nop");
00065     asm ("   nop");
00066     }
00067
00068     iteration_count ++;
00069
00070    for (i = (hdlc_RX_BUF - 1); i > 0; i--)
00071    {
00072     k = (tuint *) &BefBuf[i - 1];
00073       l = (tuint *) &BefBuf[i];
00074
00075       for (j = 0; j < sizeof(hdlcTemp_t); j++) *l++ = *k++;
00076    }
00077
00078    BefBuf[0].instance = *inst;
00079    BefBuf[0].bit_cnt = bit_cnt;
00080    BefBuf[0].temp_bit = temp_bit;
00081   }
00082
00083 #endif
00084
00096 void hdlcRxInit (hdlcRxInst_t *inst, hdlcRxInit_t *init)
00097 {
00098   inst->state = hdlc_RX_STATE_IDLE;
00099   inst->currOctet = 0;
00100   inst->dataBufCnt = 0;
00101   inst->encodedDataSizeBits = init->encodedDataBytePerWord * 8;
00102   inst->decodedDataBytePerWord = init->decodedDataBytePerWord - 1;
00103 }
00113 void hdlcRxConfig (hdlcRxInst_t *inst, tword *data, tuint size)
00114 {
00115   inst->dataBufBitSize = (size * 8) - 1;
00116   inst->dataBufBitCnt  = TYP_WORD_SIZE_HDLC;
00117   inst->dataBufCurr    = data;
00118   inst->dataBufCnt = 0;
00119 }
00120
00142 tuint hdlcRx (hdlcRxInst_t *inst, tword *dst, tuint *dst_cnt, tuint max_size)
00143 {
00144   tuint retStatus, octet_size,fcs_idx;
00145   tword temp_octet;
00146   tint bit_cnt;
00147   tword temp_bit;
00148
00149   /* initialize the return status */
00150   retStatus  = 0;
00151   octet_size = TYP_WORD_SIZE_HDLC;
00152
00153   if (inst->state == hdlc_RX_STATE_DATA)
00154   {
00155     /* process all the bits */
00156     while (inst->dataBufBitSize >= 0)
00157     {
00158
00159     /* compute the maximum number of bits we can read. Since a zero is     */
00160     /* inserted after 5 '1's, we can read at most 6 bits at a time and     */
00161     /* then remove the last bit if it is a '0' after 5 '1' bits.           */
00162     /* The variable bit_cnt is initialized to '6' since that is the max.   */
00163     /* number of bits we can read at a time */
00164
00165     /* first we look to see how many '1' bits are left from the last time  */
00166     /* for each '1' bit left, we decrement 'bit_cnt' by 1 and stop when we */
00167     /* see a '0' bit */
00168     for (bit_cnt = 6,temp_octet = inst->currOctet;temp_octet & 0x0001;bit_cnt--)
00169       temp_octet >>= 1;
00170
00171       /* we have the maximum number of bits we can read during this iteration */
00172     /* but we must check if we have enough bits or not */
00173     if (inst->dataBufBitSize < bit_cnt)
00174       bit_cnt = inst->dataBufBitSize;
00175
00176     /* we process enough bits that will give a decoded byte which is used   */
00177     /* for FCS computation using the table. If 'bit_cnt' is greater then    */
00178     /* that, we reduce the bit_cnt */
00179     if (inst->dataRegisterBitCnt < bit_cnt)
00180       bit_cnt = inst->dataRegisterBitCnt;
00181
00182     /* we must read atleast one bit during an iteration, so if we are in a  */
00183     /* condition (like detecting flags or aborts) that has more then 5 '1'  */
00184     /* we will read at least one bit */
00185     if (bit_cnt == 0)
00186         bit_cnt = 1;
00187
00188       /* decrement the bit counters for the next iteration */
00189       inst->dataBufBitSize -= bit_cnt;
00190     inst->dataBufBitCnt  -= bit_cnt;
00191
00192     /* read 'bit_cnt' bits from the data buffer and add them to the         */
00193     /* 'inst->currOctet' shift register which is used later.                */
00194       temp_bit = (tword) pktReadnbits_m(inst->dataBufCurr,inst->dataBufCnt,inst->dataBufBitCnt);
00195
00196     /* need to use the next word this time, or set the pointer to the next */
00197     /* for the next time */
00198     if (inst->dataBufBitCnt <= 0)
00199     {
00200     tword temp_byte;
00201     inst->dataBufCnt++;
00202     inst->dataBufBitCnt += TYP_WORD_SIZE_HDLC;
00203     temp_byte = (tword )pktRead8bits_m(inst->dataBufCurr,inst->dataBufCnt);
00204     temp_bit |= temp_byte >> inst->dataBufBitCnt;
00205     }
00206
00207     /* 'temp_bit' has unwanted bits that must be masked out */
00208     temp_bit &= WORD_MASK >> (TYP_WORD_SIZE_HDLC - bit_cnt);
00209
00210     /* roll over the new bits into the 'inst->currOctet' register */
00211     inst->currOctet <<= bit_cnt;
00212     inst->currOctet |= temp_bit;
00213     inst->currOctet &= 0x007F;
00214
00215 #if HDLC_RX_DEBUG
00216     hdlcRxDebug (inst,bit_cnt,temp_bit);
00217 #endif
00218
00219     /* check for bit stuffing and remove the stuffed bit and move on to    */
00220     /* decode more bits */
00221     if (inst->currOctet == 0x003E)
00222     {
00223       inst->dataRegister <<= (bit_cnt - 1);
00224       inst->dataRegister |= (tulong) (temp_bit >> 1);
00225       inst->dataRegisterBitCnt -= (bit_cnt - 1);
00226       continue;
00227     }
00228
00229     /* insert the new bits into the 'inst->dataRegister' and update counter */
00230     inst->dataRegister <<= bit_cnt;
00231     inst->dataRegister |= (tulong) temp_bit;
00232     inst->dataRegisterBitCnt -= bit_cnt;
00233
00234     /* check for abort sequence and change state to IDLE and report an ABORT */
00235     /* to the calling function */
00236     if (inst->currOctet == 0x007F)
00237     {
00238             inst->state = hdlc_RX_STATE_IDLE;
00239           return (hdlc_RX_FRAME_ABORT);
00240     }
00241
00242     /* check for flag sequence, it may be the end of a frame, so we must check */
00243     /* for that and process the last data byte and check the FCS and report it */
00244     /* to the calling function */
00245     if (inst->currOctet == 0x007E)
00246     {
00247     retStatus = hdlc_RX_FRAME_FLAGS;
00248
00249       /* An HDLC frame must have a certain number of bytes and no bits, so if  */
00250         /* we have any partial bits left at the end, then the frame is invalid   */
00251     /* and we report a bad frame to the calling function */
00252     if (inst->dataRegisterBitCnt == 0)
00253       {
00254
00255           /* computing FCS for the last word */
00256       if (inst->dataByteCnt >= 2)
00257       {
00258         fcs_idx  = (tuint)((inst->dataRegister >> 16) & 0x00FF);
00259         fcs_idx ^= inst->dataFcs;
00260         inst->dataFcs = ((inst->dataFcs >> 8) & 0x00FF) ^ hdlcFcsTable[fcs_idx & 0x00FF];
00261
00262         fcs_idx  = (tuint)((inst->dataRegister >> 8) & 0x00FF);
00263         fcs_idx ^= inst->dataFcs;
00264         inst->dataFcs = ((inst->dataFcs >> 8) & 0x00FF) ^ hdlcFcsTable[fcs_idx & 0x00FF];
00265
00266         /* set the return status to good intially */
00267         retStatus |= (hdlc_RX_FRAME_GOOD | hdlc_RX_FRAME_END);
00268
00269         /* change it to bad if the frame has a bad CRC */
00270         if (inst->dataFcs != 0x0F1D)
00271         {
00272           retStatus ^= (hdlc_RX_FRAME_BAD | hdlc_RX_FRAME_GOOD);
00273         }
00274       }
00275
00276       /* initialize variables for the next frame */
00277       inst->dataByteCnt = 0;
00278       inst->dataRegisterBitCnt = TYP_WORD_SIZE_HDLC;
00279       inst->dataFcs = HDLC_INIT_FCS;
00280       return (retStatus);
00281       }
00282     /* if we have received at least 2 bytes (which are for FCS)   */
00283     /* and the frame has some partail bits, then it can't be a    */
00284     /* valid frame */
00285       else if (inst->dataByteCnt > 2)
00286       {
00287       retStatus |= (hdlc_RX_FRAME_BAD | hdlc_RX_FRAME_END);
00288         inst->dataByteCnt = 0;
00289         inst->dataRegisterBitCnt = TYP_WORD_SIZE_HDLC;
00290         inst->dataFcs = HDLC_INIT_FCS;
00291       return (retStatus);
00292       }
00293
00294     /* if the frame has less then 2 bytes of data, then we discard */
00295     /* it and do not report it to the user since it is not a valid */
00296     /* frame anyway and it is too small */
00297       inst->dataByteCnt = 0;
00298       inst->dataRegisterBitCnt = TYP_WORD_SIZE_HDLC;
00299       inst->dataFcs = HDLC_INIT_FCS;
00300     }
00301
00302     /* processing for data bytes. If we have reached here, then we must */
00303     /* have data bits, we check if we have a new decoded byte, if yes   */
00304     /* then we compute it's FCS and copy it to the 'dst' buffer         */
00305     if (inst->dataRegisterBitCnt == 0)
00306     {
00307       /* reset the counter and compute FCS */
00308     inst->dataRegisterBitCnt = TYP_WORD_SIZE_HDLC;
00309     retStatus = hdlc_RX_FRAME_DATA;
00310
00311     /* copy the data byte after the 2 bytes have benn decoded which are */
00312     /* for the FCS */
00313       if (inst->dataByteCnt >= 2)
00314       {
00315       tword temp_byte;
00316       temp_byte  = (inst->dataRegister >> 16) & (WORD_MASK);
00317       pktWrite8bits_m(dst,*dst_cnt,temp_byte);
00318       *dst_cnt = *dst_cnt + 1;
00319
00320       /* Compute the FCS */
00321       fcs_idx  = (((tuint) temp_byte) & 0x00FF) ^ inst->dataFcs;
00322           inst->dataFcs = ((inst->dataFcs >> 8) & 0x00FF) ^ hdlcFcsTable[fcs_idx & 0x00FF];
00323
00324       /* check if we have reached the last data byte if the buffer we are */
00325       /* writing to. If yes, then return               */
00326       if (*dst_cnt == max_size)
00327       {
00328       return(retStatus | hdlc_RX_FRAME_DATA);
00329       }
00330       }
00331
00332       inst->dataByteCnt ++;
00333     }
00334     }
00335   }
00336   else
00337   {
00338     /* process all the bits */
00339     while (inst->dataBufBitSize >= 0)
00340     {
00341     tword temp_byte;
00342
00343     /* decrement the buffer bit counter */
00344     inst->dataBufBitSize --;
00345
00346     /* check if need a new word */
00347     if (inst->dataBufBitCnt == 0)
00348     {
00349       inst->dataBufBitCnt = octet_size;
00350       inst->dataBufCnt++;
00351     }
00352
00353     /* decrement the word bit counter */
00354     inst->dataBufBitCnt --;
00355
00356     temp_byte = (tword) pktRead8bits_m(inst->dataBufCurr,inst->dataBufCnt);
00357     /* roll the data bits */
00358     temp_bit = (temp_byte >> inst->dataBufBitCnt) & 1;
00359
00360     /* shift the next bit into the 'inst->currOctet' register */
00361     inst->currOctet <<= 1;
00362     inst->currOctet |= temp_bit;
00363     inst->currOctet &= 0x00FF;
00364
00365 #if HDLC_RX_DEBUG
00366     hdlcRxDebug (inst,bit_cnt,temp_bit);
00367 #endif
00368
00369     /* check for a flag and change state to DATA state */
00370     if (inst->currOctet == 0x007E)
00371     {
00372       inst->dataRegisterBitCnt = TYP_WORD_SIZE_HDLC;
00373     inst->dataByteCnt = 0;
00374       inst->dataFcs = HDLC_INIT_FCS;
00375     inst->state = hdlc_RX_STATE_DATA;
00376     return (hdlc_RX_FRAME_FLAGS);
00377     }
00378     }
00379   }
00380
00381   /* we must have processed all data provided if have gotten here */
00382   /* report buffer_end to the outside */
00383   return (retStatus | hdlc_RX_BUFFER_END);
00384 }
00385
00386 /* nothing past this point */


HDLC: hdlcrx.h File Reference

hdlcrx.h File Reference

Detailed Description

This file declares function prototypes and the instance for the HDLC RX (decoding) processing routines.

path /dsps_gtmas/ti/mas/hdlc/hdlcrx.h

============================================================================ Copyright (c) Texas Instruments Incorporated 2002-2009

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

Definition in file hdlcrx.h.

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

Include dependency graph for hdlcrx.h:

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

Go to the source code of this file.

Data Structures

struct | hdlcRxInit_t
HDLC RX initialization structure. More...
struct | hdlcRxInst_t
HDLC RX processing instance structure. More...

Defines

#define | hdlc_RX_FRAME_DATA 0x0001
#define | hdlc_RX_FRAME_END 0x0002
#define | hdlc_RX_FRAME_GOOD 0x0004
#define | hdlc_RX_FRAME_BAD 0x0008
#define | hdlc_RX_FRAME_ABORT 0x0010
#define | hdlc_RX_FRAME_FLAGS 0x0020
#define | hdlc_RX_BUFFER_END 0x0040
#define | hdlc_RX_FRAME_NONALIGN 0x0080

Enumerations

enum | hdlcRxState_e { hdlc_RX_STATE_DATA, hdlc_RX_STATE_IDLE }
HDLC RX state definitions. More...

Functions

HDLC Rx API
void | hdlcRxInit (hdlcRxInst_t *inst, hdlcRxInit_t *init)
This function initializes an instance of the HDLC receiver module.
void | hdlcRxConfig (hdlcRxInst_t *inst, tword *data, tuint size)
This function configures HDLC receiver to process data from a buffer passed to it.
tuint | hdlcRx (hdlcRxInst_t *inst, tword *dst, tuint *dst_cnt, tuint max_size)
This function performs de-stuffing and FCS computation of the received data.


HDLC: hdlcrx.h Source File

hdlcrx.h

Go to the documentation of this file.
00001 #ifndef _HDLCRX_H_
00002 #define _HDLCRX_H_
00003
00004 /* ========================================================================== */
00044 /* @{ */
00045
00046 #include <ti/mas/types/types.h>
00047
00061 /* @{ */
00062 #define hdlc_RX_FRAME_DATA     0x0001
00063 #define hdlc_RX_FRAME_END      0x0002
00064 #define hdlc_RX_FRAME_GOOD     0x0004
00065 #define hdlc_RX_FRAME_BAD      0x0008
00066 #define hdlc_RX_FRAME_ABORT    0x0010
00067 #define hdlc_RX_FRAME_FLAGS    0x0020
00068 #define hdlc_RX_BUFFER_END     0x0040
00069 #define hdlc_RX_FRAME_NONALIGN 0x0080
00070 /* @} */
00071
00083 typedef struct {
00084   tint encodedDataBytePerWord;
00085   tint decodedDataBytePerWord;
00086   tbool encodedDataBigEndian;
00088   tbool decodedDataBigEndian;
00090 } hdlcRxInit_t;
00091
00095 typedef enum
00096 {
00097   hdlc_RX_STATE_DATA,
00098   hdlc_RX_STATE_IDLE
00099 } hdlcRxState_e;
00100
00109 typedef struct {
00110
00111   tint  dataBufBitSize;
00113   tint  dataBufBitCnt;
00115   tword *dataBufCurr;
00117   tword currOctet;
00119   tulong dataRegister;
00121   tuint state;
00123   tint  dataRegisterBitCnt;
00125   tint  dataByteCnt;
00127   tuint dataFcs;
00129   tint  encodedDataSizeBits;
00131   tint  decodedDataBytePerWord;
00133   tuint dataBufCnt;
00135 } hdlcRxInst_t;
00136
00152 void  hdlcRxInit (hdlcRxInst_t *inst, hdlcRxInit_t *init);
00153
00154
00164 void  hdlcRxConfig (hdlcRxInst_t *inst, tword *data, tuint size);
00165
00166
00188 tuint hdlcRx (hdlcRxInst_t *inst, tword *dst, tuint *dst_cnt, tuint max_size);  /* @name HDLC Rx API */
00190
00191 /* @} */ /* ingroup */
00192
00193 #endif


HDLC: hdlctx.c File Reference

hdlctx.c File Reference

Detailed Description

The HDLC TX module encodes data stream to HDLC frames.

path /dsps_gtmas/ti/mas/hdlc/src/hdlctx.c

============================================================================ Copyright (c) Texas Instruments Incorporated 2002-2009

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

Definition in file hdlctx.c.

#include <ti/mas/types/types.h>
#include <ti/mas/hdlc/hdlctx.h>
#include <ti/mas/util/pkt.h>

Include dependency graph for hdlctx.c:

Go to the source code of this file.

Defines

#define | hdlc_TX_FCS_INIT 0xFFFF
#define | hdlc_TX_FLAGS_BYTE 0x007E
#define | hdlc_TX_ABORT_BYTE 0x00FE
#define | hdlc_TX_BYTE_SIZE 8
#define | hdlc_TX_MSB_MASK 0xFF00
#define | hdlc_TX_LSB_MASK 0x00FF
#define | hdlc_TX_MIN_FLAG_CNT 1
#define | hdlc_TX_BITSTUFF_CNT 5

Functions

void | hdlcTxInit (hdlcTxInst_t *inst, hdlcTxInit_t *init)
This function initializes an instance of the HDLC transmitter module.
tuint | hdlcTxConfig (hdlcTxInst_t *inst, tword *dataBuffer, tuint size)
This function configures HDLC transmitter to process data from a buffer passed to it.
tuint | hdlcTxData (hdlcTxInst_t *inst, tword *src, tuint *src_idx, tuint size)
This function performs bit stuffing and stores the encoded data in the transmit buffer.
tuint | hdlcTxFcs (hdlcTxInst_t *inst, tbool good_frame)
This function generates the FCS bytes and one HDLC flag to mark end the current frame and stores them in the transmit buffer.
tuint | hdlcTxFlags (hdlcTxInst_t *inst, tint num_flags, tint fill_pattern)
This function generates the HDLC flags to fill the current transmit buffer.
tuint | hdlcTxAbort (hdlcTxInst_t *inst)
This function appends the abort sequence at the end of the data stream .

Variables

const tuint | hdlcFcsTable []

Define Documentation

#define hdlc_TX_FCS_INIT 0xFFFF

Definition at line 20 of file hdlctx.c.

Referenced by hdlcTxAbort(), hdlcTxFlags(), and hdlcTxInit().

#define hdlc_TX_FLAGS_BYTE 0x007E

Definition at line 21 of file hdlctx.c.

#define hdlc_TX_ABORT_BYTE 0x00FE

Definition at line 22 of file hdlctx.c.

Referenced by hdlcTxAbort().

#define hdlc_TX_BYTE_SIZE 8

Definition at line 23 of file hdlctx.c.

Referenced by hdlcTxAbort(), hdlcTxData(), hdlcTxFcs(), and hdlcTxFlags().

#define hdlc_TX_MSB_MASK 0xFF00

Definition at line 24 of file hdlctx.c.

#define hdlc_TX_LSB_MASK 0x00FF

Definition at line 25 of file hdlctx.c.

Referenced by hdlcTxData(), and hdlcTxFcs().

#define hdlc_TX_MIN_FLAG_CNT 1

Definition at line 26 of file hdlctx.c.

#define hdlc_TX_BITSTUFF_CNT 5

Definition at line 27 of file hdlctx.c.

Referenced by hdlcTxData().

Variable Documentation

const tuint hdlcFcsTable[]

Definition at line 25 of file hdlcfcs.c.

Referenced by hdlcRx(), and hdlcTxData().


HDLC: hdlctx.c Source File

hdlctx.c

Go to the documentation of this file.
00001 /* ========================================================================== */
00016 #include <ti/mas/types/types.h>
00017 #include <ti/mas/hdlc/hdlctx.h>
00018 #include <ti/mas/util/pkt.h>
00019
00020 #define    hdlc_TX_FCS_INIT       0xFFFF
00021 #define    hdlc_TX_FLAGS_BYTE     0x007E
00022 #define    hdlc_TX_ABORT_BYTE     0x00FE
00023 #define    hdlc_TX_BYTE_SIZE      8
00024 #define    hdlc_TX_MSB_MASK       0xFF00
00025 #define    hdlc_TX_LSB_MASK       0x00FF
00026 #define    hdlc_TX_MIN_FLAG_CNT   1
00027 #define    hdlc_TX_BITSTUFF_CNT   5
00028
00029 extern const tuint hdlcFcsTable[];
00030
00042 void hdlcTxInit (hdlcTxInst_t *inst, hdlcTxInit_t *init)
00043 {
00044   inst->status         = hdlc_TX_FRAME_FLAGS;
00045   inst->fcs            = hdlc_TX_FCS_INIT;
00046   inst->currOctetBitCnt = 0;
00047   inst->flagsCnt       = 0;
00048   inst->oneCnt         = 0;
00049   inst->minFlagsCnt    = init->minFlagsCnt;
00050   inst->dataBufCnt     = 0;
00051   inst->encodedDataBytePerWord = init->encodedDataBytePerWord - 1;
00052   inst->decodedDataBytePerWord = init->decodedDataBytePerWord - 1;
00053 }
00054
00064 tuint hdlcTxConfig (hdlcTxInst_t *inst, tword *dataBuffer, tuint size)
00065 {
00066   inst->dataBufByteSize = size;
00067   inst->dataBufByteCnt  = 0;
00068   inst->dataBufCurr     = dataBuffer;
00069   inst->dataBufCnt    = 0;
00070   return (inst->status | hdlc_TX_CONTINUE);
00071 }
00072
00084 tuint hdlcTxData (hdlcTxInst_t *inst, tword *src, tuint *src_idx, tuint size)
00085 {
00086   tword  temp_octet;
00087   tuint bit_mask,array_data,fcs_idx;
00088
00089   /* loop until we have filled the buffered passed by calling hdlcTxConfig() */
00090   while (inst->dataBufByteSize > 0)
00091   {
00092     /* check the register (currOctet) to see if have more then 8 bits. If   */
00093   /* yes, then remove the 8 bits and copy them into the encoded data      */
00094   /* buffer */
00095   if (inst->currOctetBitCnt >= hdlc_TX_BYTE_SIZE)
00096   {
00097     /* decrement the bit counter and copy the bits to temp_octet */
00098     inst->currOctetBitCnt -= hdlc_TX_BYTE_SIZE;
00099     temp_octet = (tword) (inst->currOctet >> inst->currOctetBitCnt);
00100     temp_octet &= hdlc_TX_LSB_MASK;
00101
00102     /* save the temp_octet in the buffer */
00103     pktWrite8bits_m(inst->dataBufCurr,inst->dataBufCnt,temp_octet);
00104     inst->dataBufCnt++;
00105
00106     /* update the counters */
00107     inst->dataBufByteSize--;
00108     inst->dataBufByteCnt++;
00109
00110     /* check if we can copy another byte to the buffer */
00111     continue;
00112   }
00113
00114   /* need to encode more data to fill the buffer */
00115   if (inst->status & hdlc_TX_FRAME_DATA)
00116   {
00117       /* check if we don't have any more data bytes. If so return */
00118     if (*src_idx == size)
00119     {
00120     inst->status |= hdlc_TX_CONTINUE;
00121     return (inst->status);
00122     }
00123
00124     /* check for double/single packed cases and read one byte of data */
00125     array_data = pktRead8bits_m(src,*src_idx);
00126
00127     /* increment the data counter and mask most significant 8 bits */
00128     *src_idx   = *src_idx + 1;
00129       array_data &= hdlc_TX_LSB_MASK;
00130
00131     /* compute the new FCS */
00132     fcs_idx = (inst->fcs ^ array_data) & hdlc_TX_LSB_MASK;
00133     inst->fcs = ((inst->fcs >> hdlc_TX_BYTE_SIZE) & hdlc_TX_LSB_MASK) ^ hdlcFcsTable[fcs_idx];
00134
00135     /* do bit stuffing, if needed (MIPS intensive) */
00136     for (bit_mask = 0x0080;bit_mask != 0;bit_mask >>= 1)
00137     {
00138         if (inst->oneCnt == hdlc_TX_BITSTUFF_CNT)
00139       {
00140       inst->oneCnt = 0;
00141       inst->currOctet = (inst->currOctet << 1);
00142       inst->currOctetBitCnt ++;
00143       }
00144
00145       inst->currOctet = (inst->currOctet << 1);
00146       inst->currOctetBitCnt ++;
00147
00148       if (bit_mask & array_data)
00149       {
00150         inst->oneCnt++;
00151       inst->currOctet |=  1;
00152       }
00153       else
00154       {
00155         inst->oneCnt = 0;
00156       }
00157     }
00158
00159     /* check for bit stuffing at the end again and add a '0' bit at the end */
00160     if (inst->oneCnt == hdlc_TX_BITSTUFF_CNT)
00161     {
00162       inst->currOctet <<= 1;
00163       inst->currOctetBitCnt ++;
00164     inst->oneCnt = 0;
00165     }
00166
00167     /* ready to copy the encoded data byte into the buffer */
00168     continue;
00169     }
00170
00171     /* we are in FCS state, perform the bitstuffing for the FCS */
00172   if (inst->status & hdlc_TX_FRAME_FCS)
00173   {
00174       /* bit stuffing of the 16 bit fcs */
00175     for (bit_mask = 0x8000;bit_mask != 0;bit_mask >>= 1)
00176     {
00177       if (inst->oneCnt == hdlc_TX_BITSTUFF_CNT)
00178       {
00179       inst->oneCnt = 0;
00180       inst->currOctet <<= 1;
00181       inst->currOctetBitCnt ++;
00182       }
00183
00184       inst->currOctet <<= 1;
00185       inst->currOctetBitCnt ++;
00186
00187       if (bit_mask & inst->fcs)
00188       {
00189         inst->oneCnt++;
00190       inst->currOctet |=  1;
00191       }
00192       else
00193       {
00194         inst->oneCnt = 0;
00195       }
00196     }
00197
00198     if (inst->oneCnt == hdlc_TX_BITSTUFF_CNT)
00199     {
00200       inst->currOctet <<= 1;
00201       inst->currOctetBitCnt ++;
00202     inst->oneCnt = 0;
00203     }
00204
00205     /* ready to copy the encoded data byte into the buffer */
00206     inst->status = inst->status ^ (hdlc_TX_FRAME_FLAGS | hdlc_TX_FRAME_FCS);
00207     continue;
00208   }
00209
00210   /* if we are not in data or FCS state, then assume we are in flags state */
00211   /* encode flags until you reach minFlagsCnt */
00212   if (inst->flagsCnt < inst->minFlagsCnt)
00213   {
00214     inst->oneCnt = 0;
00215     inst->currOctet <<= hdlc_TX_BYTE_SIZE;
00216     inst->currOctet |=  hdlc_TX_FLAGS_BYTE;
00217     inst->currOctetBitCnt += hdlc_TX_BYTE_SIZE;
00218     inst->fcs = hdlc_TX_FCS_INIT;
00219     inst->flagsCnt ++;
00220           continue;
00221   }
00222
00223   /* we are done with the present frame, either start the new frame or return */
00224   if (inst->flagsCnt == inst->minFlagsCnt)
00225   {
00226     inst->status = inst->status ^ (hdlc_TX_FRAME_DATA | hdlc_TX_FRAME_FLAGS);
00227
00228     if (*src_idx != size)
00229     {
00230     continue;
00231     }
00232
00233     inst->status |= hdlc_TX_CONTINUE;
00234     return (inst->status);
00235   }
00236   }
00237
00238   /* if we reach here, the buffer must be full. so no need to continue */
00239   inst->status &= (~hdlc_TX_CONTINUE);
00240   return (inst->status);
00241 }
00242
00257 tuint hdlcTxFcs (hdlcTxInst_t *inst, tbool good_frame)
00258 {
00259   tword temp_byte;
00260   tuint temp_val;
00261
00262   if (inst->status & hdlc_TX_FRAME_FLAGS)
00263   {
00264     return (hdlc_TX_ERROR);
00265   }
00266
00267   /* switch the bytes of the CRC */
00268   temp_byte = inst->fcs & hdlc_TX_LSB_MASK;
00269   inst->fcs = (unsigned) inst->fcs >> hdlc_TX_BYTE_SIZE;
00270   inst->fcs |= (temp_byte << hdlc_TX_BYTE_SIZE);
00271   inst->flagsCnt = 0;
00272   inst->status = inst->status ^ (hdlc_TX_FRAME_FCS | hdlc_TX_FRAME_DATA);
00273
00274   if (good_frame == TRUE)
00275   {
00276     inst->fcs = ~(inst->fcs);
00277   }
00278
00279   temp_byte = 0;
00280   temp_val  = 0;
00281
00282   return (hdlcTxData (inst,&temp_byte,&temp_val,0));
00283 }
00284
00300 tuint hdlcTxFlags (hdlcTxInst_t *inst, tint num_flags, tint fill_pattern)
00301 {
00302   tword temp_byte;
00303   tuint i, temp_val,ret_val;
00304
00305   temp_byte = 0;
00306   temp_val = 0;
00307   ret_val = hdlcTxData (inst,&temp_byte,&temp_val,0);
00308
00309   for (i = 0;((i < num_flags) && (ret_val & hdlc_TX_CONTINUE)); i++)
00310   {
00311   inst->oneCnt = 0;
00312   inst->fcs = hdlc_TX_FCS_INIT;
00313     inst->currOctet <<= hdlc_TX_BYTE_SIZE;
00314     inst->currOctet |= fill_pattern;
00315     inst->currOctetBitCnt += hdlc_TX_BYTE_SIZE;
00316     ret_val = hdlcTxData (inst,&temp_byte,&temp_val,0);
00317   }
00318
00319   return (ret_val);
00320 }
00321
00329 tuint hdlcTxAbort (hdlcTxInst_t *inst)
00330 {
00331   tword temp_byte;
00332   tuint temp_val;
00333
00334   temp_byte = 0;
00335   temp_val = 0;
00336
00337   inst->currOctet <<= hdlc_TX_BYTE_SIZE;
00338   inst->currOctet |= hdlc_TX_ABORT_BYTE;
00339   inst->currOctetBitCnt += hdlc_TX_BYTE_SIZE;
00340   inst->status = hdlc_TX_FRAME_FLAGS;
00341   inst->fcs = hdlc_TX_FCS_INIT;
00342
00343   return (hdlcTxData (inst,&temp_byte,&temp_val,0));
00344 }
00345
00346 /* nothing past this point */


HDLC: hdlctx.h File Reference

hdlctx.h File Reference

Detailed Description

Declare Function Prototypes and Type definitions for HDLC Transmit processing.

path /dsps_gtmas/ti/mas/hdlc/hdlctx.h

============================================================================ Copyright (c) Texas Instruments Incorporated 2002-2009

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

Definition in file hdlctx.h.

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

Include dependency graph for hdlctx.h:

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

Go to the source code of this file.

Data Structures

struct | hdlcTxInit_t
HDLC TX initialization structure. More...
struct | hdlcTxInst_t
HDLC TX processing instance structure. More...

Defines

#define | hdlc_TX_CONTINUE 0x0001
#define | hdlc_TX_FRAME_DATA 0x0002
#define | hdlc_TX_FRAME_FCS 0x0004
#define | hdlc_TX_FRAME_FLAGS 0x0008
#define | hdlc_TX_ERROR 0x0010
#define | hdlc_FLAG_PATTERN 0x7E
hdlc flag sequence
#define | hdlc_IDLE_PATTERN 0xFF
hdlc idle sequence

Functions

HDLC Tx API
void | hdlcTxInit (hdlcTxInst_t *inst, hdlcTxInit_t *init)
This function initializes an instance of the HDLC transmitter module.
tuint | hdlcTxConfig (hdlcTxInst_t *inst, tword *dataBuffer, tuint size)
This function configures HDLC transmitter to process data from a buffer passed to it.
tuint | hdlcTxData (hdlcTxInst_t *inst, tword *src, tuint *src_idx, tuint size)
This function performs bit stuffing and stores the encoded data in the transmit buffer.
tuint | hdlcTxFcs (hdlcTxInst_t *inst, tbool good_frame)
This function generates the FCS bytes and one HDLC flag to mark end the current frame and stores them in the transmit buffer.
tuint | hdlcTxFlags (hdlcTxInst_t *inst, tint num_flags, tint fill_pattern)
This function generates the HDLC flags to fill the current transmit buffer.
tuint | hdlcTxAbort (hdlcTxInst_t *inst)
This function appends the abort sequence at the end of the data stream .


HDLC: hdlctx.h Source File

hdlctx.h

Go to the documentation of this file.
00001 #ifndef _HDLCTX_H_
00002 #define _HDLCTX_H_
00003
00004 /* ========================================================================== */
00044 /* @{ */
00045 #include <ti/mas/types/types.h>
00046
00057 /* @{ */
00058 #define hdlc_TX_CONTINUE        0x0001
00059 #define hdlc_TX_FRAME_DATA        0x0002
00060 #define hdlc_TX_FRAME_FCS         0x0004
00061 #define hdlc_TX_FRAME_FLAGS       0x0008
00062 #define hdlc_TX_ERROR             0x0010
00063 /* @} */
00064
00070 /* @{ */
00074 #define hdlc_FLAG_PATTERN         0x7E
00075
00079 #define hdlc_IDLE_PATTERN         0xFF
00080
00081 /* @} */
00082
00094 typedef struct {
00095   tint minFlagsCnt;
00097   tint encodedDataBytePerWord;
00098   tint decodedDataBytePerWord;
00099   tbool encodedDataBigEndian;
00101   tbool decodedDataBigEndian;
00103 } hdlcTxInit_t;
00104
00113 typedef struct
00114 {
00115   tint      dataBufByteSize;
00117   tint      dataBufByteCnt;
00119   tword     *dataBufCurr;
00121   tuint     status;
00126   tulong     currOctet;
00130   tuint     currOctetBitCnt;
00132   tuint     fcs;
00134   tint      flagsCnt;
00136   tint      minFlagsCnt;
00138   tint      oneCnt;
00140   tint  encodedDataBytePerWord;
00142   tint  decodedDataBytePerWord;
00144   tuint      dataBufCnt;
00146 } hdlcTxInst_t;
00147
00163 void hdlcTxInit   (hdlcTxInst_t *inst,hdlcTxInit_t *init);
00164
00174 tuint hdlcTxConfig (hdlcTxInst_t *inst, tword *dataBuffer, tuint size);
00175
00187 tuint hdlcTxData   (hdlcTxInst_t *inst, tword *src, tuint *src_idx, tuint size);
00188
00203 tuint hdlcTxFcs    (hdlcTxInst_t *inst, tbool good_frame);
00204
00205
00206
00222 tuint hdlcTxFlags  (hdlcTxInst_t *inst, tint num_flags, tint fill_pattern);
00223
00231 tuint hdlcTxAbort  (hdlcTxInst_t *inst);
00232
00233  /* @name HDLC Tx API  */
00235
00236 /* @} */ /* ingroup */
00237
00238 #endif
00239


HDLC: HDLC (High-level Data Link Control) Package

HDLC (High-level Data Link Control) Package

Release 3.0.1.2

Page Contents

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

Description

HDLC is a protocol designed for transmitting data between two points. In HDLC, data is organized into a unit (called a frame) and sent across a network to a destination that verifies its successful arrival or if an error occurred during the transmission. The HDLC protocol also manages the flow or pacing at which data is sent. HDLC is used in what is Layer 2 of the OSI industry communication reference model. (Layer 1 is the detailed physical level that involves actually generating and receiving the electronic signals.

The flag is a sequence 01111110 which delimits the start of the frame. A technique known as "bit stuffing" is used to insert additional zeros into the data so that a flag sequence never appears anywhere but at the start and end of a frame. These extra bits are "unstuffed" again by the receiver. The address field is usually one byte, but may be more. The control field is one or more bytes. It contains information on the type of frame. The "payload" of the frame is the data field. Following the data field are two bytes comprising the Cyclic Redundancy Check (CRC). Finally, the frame is terminated by another flag character. The High-level Data Link Control (HDLC) processing software allows the user to perform HDLC formatting and de-formatting of transmit and receive data streams.

Integration

The HDLC component can be integrated into a system and provide reliable HDLC processing 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 HDLC 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: | HDLC External API
 | HDLC Integration

Default Configuration

None

Performance

For MIPS and memory information proceed to the links provided below

Additional links: HDLC Performance

Limitations

None

Standards Compliance

The HDLC frame format and the checksum algorithm is defined in the ITU X.25 LAPB specification [2]. The frame structure is also consistent with ISO Standard 4435:1979 [1].

Dependent Packages

The HDLC package depends on the following packages for build and/or integration. The specific versions and compatibility keys are provided in the HDLC release notes.

  1. ti.mas.types (Common data type defintions)
  2. ti.mas.util (Common utilities)
  3. ti.mas.swtools (Build tools)


HDLC: HDLC Integration

HDLC (High-level Data Link Control) Package

HDLC Integration

Page Contents

  • XDC Build Process
  • Make Build Process
  • Linking HDLC with System

XDC Build Process

Required Tools

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

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

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

Windows Configuration

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

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

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

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

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

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

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

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

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

    rem # End of file

Linux Configuration

TBD

Compilation

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

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

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

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

The XDC environment provides several build options.

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

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

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

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

Make Build Process

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

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

Procedure

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

Required Tools:

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

Procedure:

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

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

Linking HDLC with System

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

  <WORK>/ti/mas/asm
               /hdlc
               /swtools
               /types
               /util

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

Include Requirements

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

  1. #include <ti/mas/types/types.h>
  2. #include <ti/mas/hdlc/hdlcrx.h>
  3. #include <ti/mas/hdlc/hdlctx.h>

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

  1. -i <WORK>

Where WORK is the path to the working directory.

Compile Defines

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

  1. -Dti_targets_<xtarg>

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

Linking

The following libraries must be included in the final link:

  1. ti\mas\util\c<rtarg>\util_a.a<rtarg>
  2. ti\mas\util\c<rtarg>\util_c.a<rtarg>
  3. **ti\mas\hdlc\c<rtarg>\hdlc_a.a<rtarg>
  4. ti\mas\hdlc\c<rtarg>\hdlc_c.a<rtarg>
**Only required for C55x

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


HDLC: Module Index

HDLC Modules

Here is a list of all modules:
  • HDLC Receiver
    • HDLC Rx status
  • HDLC Transmitter
    • HDLC Tx status
    • HDLC Fill Pattern


HDLC: Page Index

HDLC Related Pages

Here is a list of all related documentation pages:
  • C55x Data Sheet
  • C64x+ Data Sheet
  • History
  • Disclaimer


HDLC: HDLC Performance

HDLC (High-level Data Link Control) Package

HDLC Performance

  • C55x Data Sheet
  • C64x+ Data Sheet


HDLC: History

History

Revision History

Version | Comments
1.0.0.0 | Initial Version


HDLC: hdlcRxInit_t Struct Reference

  • Data Structures
  • Data Fields

hdlcRxInit_t Struct Reference
[HDLC Receiver]

#include <hdlcrx.h>

Detailed Description

HDLC RX initialization structure.

The HDLC RX instance can be initialized into different modes as required. These modes allow the user to use big-endian or little-endian notation for the data that is being decoded or the decoded data. The user can also specify if encoded or decoded data bytes are packed or if they are unpacked (one byte of data per word).

Definition at line 83 of file hdlcrx.h.

Data Fields

tint | encodedDataBytePerWord
tint | decodedDataBytePerWord
tbool | encodedDataBigEndian
tbool | decodedDataBigEndian

Field Documentation

tint hdlcRxInit_t::encodedDataBytePerWord

Size of encoded data word (1 or 2 bytes per word)

Definition at line 84 of file hdlcrx.h.

Referenced by hdlcRxInit().

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


HDLC: hdlcRxInst_t Struct Reference

  • Data Structures
  • Data Fields

hdlcRxInst_t Struct Reference
[HDLC Receiver]

#include <hdlcrx.h>

Detailed Description

HDLC RX processing instance structure.

All variables for an HDLC channel receive processing are in the instance. The instance is passed to all HDLC RX functions for decoding the HDLC data.

Definition at line 109 of file hdlcrx.h.

Data Fields

tint | dataBufBitSize
tint | dataBufBitCnt
tword * | dataBufCurr
tword | currOctet
tulong | dataRegister
tuint | state
tint | dataRegisterBitCnt
tint | dataByteCnt
tuint | dataFcs
tint | encodedDataSizeBits
tint | decodedDataBytePerWord
tuint | dataBufCnt

Field Documentation

tint hdlcRxInst_t::dataBufBitSize

size of the buffer to be decoded in bits

Definition at line 111 of file hdlcrx.h.

Referenced by hdlcRx(), and hdlcRxConfig().

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


HDLC: hdlcTxInit_t Struct Reference

  • Data Structures
  • Data Fields

hdlcTxInit_t Struct Reference
[HDLC Transmitter]

#include <hdlctx.h>

Detailed Description

HDLC TX initialization structure.

The HDLC TX instance can be initialized into different modes as required. These modes allow the user to use big-endian or little-endian notation for the data that is being decoded or the decoded data. The user can also specify if encoded or decoded data bytes are packed or if they are unpacked (one byte of data per word).

Definition at line 94 of file hdlctx.h.

Data Fields

tint | minFlagsCnt
tint | encodedDataBytePerWord
tint | decodedDataBytePerWord
tbool | encodedDataBigEndian
tbool | decodedDataBigEndian

Field Documentation

tint hdlcTxInit_t::minFlagsCnt

minimum number of flags to be generated between frames

Definition at line 95 of file hdlctx.h.

Referenced by hdlcTxInit().

tint hdlcTxInit_t::encodedDataBytePerWord

Size of encoded data word (1 or 2 bytes per word)

Definition at line 97 of file hdlctx.h.

Referenced by hdlcTxInit().

tint hdlcTxInit_t::decodedDataBytePerWord

Size of the decoded data word (1 or 2 bytes per word)

Definition at line 98 of file hdlctx.h.

Referenced by hdlcTxInit().

tbool hdlcTxInit_t::encodedDataBigEndian

TRUE for big-endian byte notation.
FALSE for little-endian byte notation.

Definition at line 99 of file hdlctx.h.

tbool hdlcTxInit_t::decodedDataBigEndian

TRUE for big-endian byte notation.
FALSE for little-endian byte notation.

Definition at line 101 of file hdlctx.h.

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


HDLC: hdlcTxInst_t Struct Reference

  • Data Structures
  • Data Fields

hdlcTxInst_t Struct Reference
[HDLC Transmitter]

#include <hdlctx.h>

Detailed Description

HDLC TX processing instance structure.

All variables for an HDLC channel transmit processing are in the instance. The instance is passed to all HDLC TX functions for encoding the HDLC data.

Definition at line 113 of file hdlctx.h.

Data Fields

tint | dataBufByteSize
tint | dataBufByteCnt
tword * | dataBufCurr
tuint | status
tulong | currOctet
tuint | currOctetBitCnt
tuint | fcs
tint | flagsCnt
tint | minFlagsCnt
tint | oneCnt
tint | encodedDataBytePerWord
tint | decodedDataBytePerWord
tuint | dataBufCnt

Field Documentation

tint hdlcTxInst_t::dataBufByteSize

number of data bytes that are remaining to be encoded in the provided buffer for encoded data

Definition at line 115 of file hdlctx.h.

Referenced by hdlcTxConfig(), and hdlcTxData().

tint hdlcTxInst_t::dataBufByteCnt

number of bytes encoded so far in the buffer so far

Definition at line 117 of file hdlctx.h.

Referenced by hdlcTxConfig(), and hdlcTxData().

tword* hdlcTxInst_t::dataBufCurr

pointer to the current location of the word we are writing to

Definition at line 119 of file hdlctx.h.

Referenced by hdlcTxConfig(), and hdlcTxData().

tuint hdlcTxInst_t::status

Definition at line 121 of file hdlctx.h.

Referenced by hdlcTxAbort(), hdlcTxConfig(), hdlcTxData(), hdlcTxFcs(), and hdlcTxInit().

tulong hdlcTxInst_t::currOctet

The status variable is used to report to the calling function the current state of processing data of the HDLC TX software. It is also used as the state variable to determine how the data will be encoded shift register used for the encoded data, when copy data to the encoded data buffer when we have atleast one byte of data in the currOctet

Definition at line 126 of file hdlctx.h.

Referenced by hdlcTxAbort(), hdlcTxData(), and hdlcTxFlags().

tuint hdlcTxInst_t::currOctetBitCnt

number of encoded bits in the currOctet

Definition at line 130 of file hdlctx.h.

Referenced by hdlcTxAbort(), hdlcTxData(), hdlcTxFlags(), and hdlcTxInit().

tuint hdlcTxInst_t::fcs

current encoded FCS

Definition at line 132 of file hdlctx.h.

Referenced by hdlcTxAbort(), hdlcTxData(), hdlcTxFcs(), hdlcTxFlags(), and hdlcTxInit().

tint hdlcTxInst_t::flagsCnt

number of flags generated so far

Definition at line 134 of file hdlctx.h.

Referenced by hdlcTxFcs(), and hdlcTxInit().

tint hdlcTxInst_t::minFlagsCnt

minimum number of flags that must be generated between frames

Definition at line 136 of file hdlctx.h.

Referenced by hdlcTxInit().

tint hdlcTxInst_t::oneCnt

counter to count the number of one bits that have been encoded so far

Definition at line 138 of file hdlctx.h.

Referenced by hdlcTxData(), hdlcTxFlags(), and hdlcTxInit().

tint hdlcTxInst_t::encodedDataBytePerWord

size of the encoded data word

Definition at line 140 of file hdlctx.h.

Referenced by hdlcTxInit().

tint hdlcTxInst_t::decodedDataBytePerWord

size of the decoded data word

Definition at line 142 of file hdlctx.h.

Referenced by hdlcTxInit().

tuint hdlcTxInst_t::dataBufCnt

byte offset is now included in the instance

Definition at line 144 of file hdlctx.h.

Referenced by hdlcTxConfig(), hdlcTxData(), and hdlcTxInit().

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


HDLC Test: Data Structures

  • Data Structures
  • Data Fields

HDLC Test Data Structures

Here are the data structures with brief descriptions:
hdlcInst_t


HDLC Test: Dependent Packages

HDLC Test Package

Dependent Packages

dependencies

  • ti.mas.types (Common data type defintions)
  • ti.mas.util (Common utilities)
  • ti.mas.hdlc (HDLC API)
  • ti.mas.swtools (to build software)


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


HDLC Test: doxygen.h File Reference

doxygen.h File Reference

Go to the source code of this file.


HDLC Test: doxygen.h Source File

doxygen.h

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


HDLC Test: File Index

HDLC Test File List

Here is a list of all files with brief descriptions:
doxygen.h [code] |
hdlcsim.c [code] | Main routine for simulating HDLC processing


HDLC 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:

  • hdlcRxInst : hdlcInst_t
  • hdlcTxInst : hdlcInst_t


HDLC Test: Data Fields - Variables

  • Data Structures
  • Data Fields
  • All
  • Variables

  • hdlcRxInst : hdlcInst_t
  • hdlcTxInst : hdlcInst_t


HDLC Test: Data Fields

  • All
  • Functions
  • Variables
  • Defines
  • b
  • d
  • h
  • m
  • r
  • t

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

- b -

  • bytesRx : hdlcsim.c
  • bytesSent : hdlcsim.c

- d -

  • dataBuf : hdlcsim.c

- h -

  • hdlc_TEST_DEC_BYTES_PER_WORD : hdlcsim.c
  • hdlc_TEST_ENC_BYTES_PER_WORD : hdlcsim.c
  • hdlc_TEST_FCS_SIZE_BYTES : hdlcsim.c
  • hdlc_TEST_MAX_NBYTES : hdlcsim.c
  • hdlc_TEST_NUM_FRAMES : hdlcsim.c
  • hdlc_TEST_NUMOF_ABORT_FLAGS : hdlcsim.c
  • hdlc_TEST_NUMOF_OPENING_FLAGS : hdlcsim.c
  • hdlc_TEST_SIM_DATA_BYTE_CNT : hdlcsim.c
  • hdlc_TEST_SIM_FCS_BAD : hdlcsim.c
  • hdlc_TEST_SIM_FCS_GOOD : hdlcsim.c
  • hdlc_TEST_SIM_FCS_UNKNOWN : hdlcsim.c
  • hdlc_TEST_TX_ABORT_BYTE : hdlcsim.c
  • hdlc_TEST_TX_BITSTUFF_CNT : hdlcsim.c
  • hdlc_TEST_TX_BYTE_SIZE : hdlcsim.c
  • hdlc_TEST_TX_FCS_INIT : hdlcsim.c
  • hdlc_TEST_TX_FLAGS_BYTE : hdlcsim.c
  • hdlc_TEST_TX_LSB_MASK : hdlcsim.c
  • hdlc_TEST_TX_MIN_FLAG_CNT : hdlcsim.c
  • hdlc_TEST_TX_MSB_MASK : hdlcsim.c
  • hdlcDecData : hdlcsim.c
  • hdlcEncData : hdlcsim.c
  • hdlcFcsTable : hdlcsim.c
  • hdlcInst : hdlcsim.c
  • hdlcProcessRx() : hdlcsim.c
  • hdlcProcessTx() : hdlcsim.c
  • hdlcRxInitCfg() : hdlcsim.c
  • hdlcTxInitCfg() : hdlcsim.c

- m -

  • main() : hdlcsim.c

- r -

  • rxHDLCFcsStatus : hdlcsim.c

- t -

  • txHDLCFcs : hdlcsim.c


HDLC Test: Data Fields

  • All
  • Functions
  • Variables
  • Defines

  • hdlc_TEST_DEC_BYTES_PER_WORD : hdlcsim.c
  • hdlc_TEST_ENC_BYTES_PER_WORD : hdlcsim.c
  • hdlc_TEST_FCS_SIZE_BYTES : hdlcsim.c
  • hdlc_TEST_MAX_NBYTES : hdlcsim.c
  • hdlc_TEST_NUM_FRAMES : hdlcsim.c
  • hdlc_TEST_NUMOF_ABORT_FLAGS : hdlcsim.c
  • hdlc_TEST_NUMOF_OPENING_FLAGS : hdlcsim.c
  • hdlc_TEST_SIM_DATA_BYTE_CNT : hdlcsim.c
  • hdlc_TEST_SIM_FCS_BAD : hdlcsim.c
  • hdlc_TEST_SIM_FCS_GOOD : hdlcsim.c
  • hdlc_TEST_SIM_FCS_UNKNOWN : hdlcsim.c
  • hdlc_TEST_TX_ABORT_BYTE : hdlcsim.c
  • hdlc_TEST_TX_BITSTUFF_CNT : hdlcsim.c
  • hdlc_TEST_TX_BYTE_SIZE : hdlcsim.c
  • hdlc_TEST_TX_FCS_INIT : hdlcsim.c
  • hdlc_TEST_TX_FLAGS_BYTE : hdlcsim.c
  • hdlc_TEST_TX_LSB_MASK : hdlcsim.c
  • hdlc_TEST_TX_MIN_FLAG_CNT : hdlcsim.c
  • hdlc_TEST_TX_MSB_MASK : hdlcsim.c


HDLC Test: Data Fields

  • All
  • Functions
  • Variables
  • Defines

  • hdlcProcessRx() : hdlcsim.c
  • hdlcProcessTx() : hdlcsim.c
  • hdlcRxInitCfg() : hdlcsim.c
  • hdlcTxInitCfg() : hdlcsim.c
  • main() : hdlcsim.c


HDLC Test: Data Fields

  • All
  • Functions
  • Variables
  • Defines

  • bytesRx : hdlcsim.c
  • bytesSent : hdlcsim.c
  • dataBuf : hdlcsim.c
  • hdlcDecData : hdlcsim.c
  • hdlcEncData : hdlcsim.c
  • hdlcFcsTable : hdlcsim.c
  • hdlcInst : hdlcsim.c
  • rxHDLCFcsStatus : hdlcsim.c
  • txHDLCFcs : hdlcsim.c


HDLC Test: HDLCTEST

HDLCTEST

Detailed Description

Data Structures

struct | hdlcInst_t

Defines

#define | hdlc_TEST_MAX_NBYTES 64
#define | hdlc_TEST_SIM_DATA_BYTE_CNT 64
#define | hdlc_TEST_NUM_FRAMES (hdlc_TEST_SIM_DATA_BYTE_CNT/hdlc_TEST_N_BYTES)
#define | hdlc_TEST_NUMOF_OPENING_FLAGS 3
#define | hdlc_TEST_NUMOF_ABORT_FLAGS 4
#define | hdlc_TEST_ENC_BYTES_PER_WORD 1
#define | hdlc_TEST_DEC_BYTES_PER_WORD 1
#define | hdlc_TEST_FCS_SIZE_BYTES 2
#define | hdlc_TEST_TX_FCS_INIT 0xFFFF
#define | hdlc_TEST_TX_FLAGS_BYTE 0x007E
#define | hdlc_TEST_TX_ABORT_BYTE 0x00FE
#define | hdlc_TEST_TX_BYTE_SIZE 8
#define | hdlc_TEST_TX_MSB_MASK 0xFF00
#define | hdlc_TEST_TX_LSB_MASK 0x00FF
#define | hdlc_TEST_TX_MIN_FLAG_CNT 1
#define | hdlc_TEST_TX_BITSTUFF_CNT 5
#define | hdlc_TEST_SIM_FCS_UNKNOWN -1
#define | hdlc_TEST_SIM_FCS_GOOD 0
#define | hdlc_TEST_SIM_FCS_BAD 1

Functions

void | hdlcTxInitCfg (hdlcTxInit_t *init)
void | hdlcRxInitCfg (hdlcRxInit_t *init)
tuint | hdlcProcessTx (hdlcInst_t *inst, tword *srcBuf, tword *dstBuf)
tuint | hdlcProcessRx (hdlcInst_t *inst, tword *encBuf, tword *rawDataBuf, tint len)
void | main (void)

Variables

tword | dataBuf [hdlc_TEST_MAX_NBYTES]
tuint | txHDLCFcs = 0
tint | rxHDLCFcsStatus = hdlc_TEST_SIM_FCS_UNKNOWN
hdlcInst_t hdlcInst
const tuint | hdlcFcsTable []
tword | hdlcEncData [2 *hdlc_TEST_MAX_NBYTES]
tword | hdlcDecData [2 *hdlc_TEST_MAX_NBYTES]
tuint | bytesSent
tuint | bytesRx

Define Documentation

#define hdlc_TEST_MAX_NBYTES 64

Definition at line 24 of file hdlcsim.c.

Referenced by hdlcProcessRx(), hdlcProcessTx(), and main().

#define hdlc_TEST_SIM_DATA_BYTE_CNT 64

Definition at line 25 of file hdlcsim.c.

#define hdlc_TEST_NUM_FRAMES (hdlc_TEST_SIM_DATA_BYTE_CNT/hdlc_TEST_N_BYTES)

Definition at line 26 of file hdlcsim.c.

#define hdlc_TEST_NUMOF_OPENING_FLAGS 3

Definition at line 28 of file hdlcsim.c.

Referenced by hdlcTxInitCfg().

#define hdlc_TEST_NUMOF_ABORT_FLAGS 4

Definition at line 29 of file hdlcsim.c.

Referenced by hdlcProcessTx().

#define hdlc_TEST_ENC_BYTES_PER_WORD 1

Definition at line 30 of file hdlcsim.c.

Referenced by hdlcRxInitCfg(), and hdlcTxInitCfg().

#define hdlc_TEST_DEC_BYTES_PER_WORD 1

Definition at line 31 of file hdlcsim.c.

Referenced by hdlcRxInitCfg(), and hdlcTxInitCfg().

#define hdlc_TEST_FCS_SIZE_BYTES 2

Definition at line 33 of file hdlcsim.c.

Referenced by hdlcProcessTx().

#define hdlc_TEST_TX_FCS_INIT 0xFFFF

Definition at line 36 of file hdlcsim.c.

#define hdlc_TEST_TX_FLAGS_BYTE 0x007E

Definition at line 37 of file hdlcsim.c.

#define hdlc_TEST_TX_ABORT_BYTE 0x00FE

Definition at line 38 of file hdlcsim.c.

#define hdlc_TEST_TX_BYTE_SIZE 8

Definition at line 39 of file hdlcsim.c.

#define hdlc_TEST_TX_MSB_MASK 0xFF00

Definition at line 40 of file hdlcsim.c.

#define hdlc_TEST_TX_LSB_MASK 0x00FF

Definition at line 41 of file hdlcsim.c.

#define hdlc_TEST_TX_MIN_FLAG_CNT 1

Definition at line 42 of file hdlcsim.c.

#define hdlc_TEST_TX_BITSTUFF_CNT 5

Definition at line 43 of file hdlcsim.c.

#define hdlc_TEST_SIM_FCS_UNKNOWN -1

Definition at line 45 of file hdlcsim.c.

#define hdlc_TEST_SIM_FCS_GOOD 0

Definition at line 46 of file hdlcsim.c.

Referenced by hdlcProcessRx(), and main().

#define hdlc_TEST_SIM_FCS_BAD 1

Definition at line 47 of file hdlcsim.c.

Referenced by hdlcProcessRx(), and main().

Function Documentation

void hdlcTxInitCfg ( hdlcTxInit_t * init )

Definition at line 66 of file hdlcsim.c.

References hdlc_TEST_DEC_BYTES_PER_WORD, hdlc_TEST_ENC_BYTES_PER_WORD, hdlc_TEST_NUMOF_OPENING_FLAGS, hdlcInst, and hdlcInst_t::hdlcTxInst.

Referenced by main().

void hdlcRxInitCfg ( hdlcRxInit_t * init )

Definition at line 86 of file hdlcsim.c.

References hdlc_TEST_DEC_BYTES_PER_WORD, hdlc_TEST_ENC_BYTES_PER_WORD, hdlcInst, and hdlcInst_t::hdlcRxInst.

Referenced by main().

tuint hdlcProcessTx | ( | hdlcInst_t * | inst,
 |  | tword * | srcBuf,
 |  | tword * | dstBuf
 | ) |  |

Definition at line 97 of file hdlcsim.c.

References bytesSent, dataBuf, hdlc_TEST_FCS_SIZE_BYTES, hdlc_TEST_MAX_NBYTES, hdlc_TEST_NUMOF_ABORT_FLAGS, hdlcInst_t::hdlcTxInst, and txHDLCFcs.

Referenced by main().

tuint hdlcProcessRx | ( | hdlcInst_t * | inst,
 |  | tword * | encBuf,
 |  | tword * | rawDataBuf,
 |  | tint | len
 | ) |  |

Definition at line 146 of file hdlcsim.c.

References hdlc_TEST_MAX_NBYTES, hdlc_TEST_SIM_FCS_BAD, hdlc_TEST_SIM_FCS_GOOD, hdlcInst_t::hdlcRxInst, and rxHDLCFcsStatus.

Referenced by main().

void main ( void )

Definition at line 179 of file hdlcsim.c.

References bytesRx, bytesSent, dataBuf, hdlc_TEST_MAX_NBYTES, hdlc_TEST_SIM_FCS_BAD, hdlc_TEST_SIM_FCS_GOOD, hdlcDecData, hdlcEncData, hdlcInst, hdlcProcessRx(), hdlcProcessTx(), hdlcRxInitCfg(), hdlcTxInitCfg(), and rxHDLCFcsStatus.

Here is the call graph for this function:

Variable Documentation

tword dataBuf[hdlc_TEST_MAX_NBYTES]

Definition at line 56 of file hdlcsim.c.

Referenced by hdlcProcessTx(), and main().

tuint txHDLCFcs = 0

Definition at line 58 of file hdlcsim.c.

Referenced by hdlcProcessTx().

tint rxHDLCFcsStatus = hdlc_TEST_SIM_FCS_UNKNOWN

Definition at line 59 of file hdlcsim.c.

Referenced by hdlcProcessRx(), and main().

hdlcInst_t hdlcInst

Definition at line 61 of file hdlcsim.c.

Referenced by hdlcRxInitCfg(), hdlcTxInitCfg(), and main().

const tuint hdlcFcsTable[]

tword hdlcEncData[2 *hdlc_TEST_MAX_NBYTES]

Definition at line 177 of file hdlcsim.c.

Referenced by main().

tword hdlcDecData[2 *hdlc_TEST_MAX_NBYTES]

Definition at line 177 of file hdlcsim.c.

Referenced by main().

tuint bytesSent

Definition at line 178 of file hdlcsim.c.

Referenced by hdlcProcessTx(), and main().

tuint bytesRx

Definition at line 178 of file hdlcsim.c.

Referenced by main().


HDLC Test: hdlcsim.c File Reference

hdlcsim.c File Reference

Detailed Description

Main routine for simulating HDLC processing.

Remarks:
This source file contains functions, variables, and processing code designed to provide a simulation of the HDLC software.
(C) Copyright 2009, Texas Instruments, Inc.

Definition in file hdlcsim.c.

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ti/mas/hdlc/hdlctx.h>
#include <ti/mas/hdlc/hdlcrx.h>
#include <ti/mas/util/pkt.h>
#include <ti/mas/util/utl.h>

Include dependency graph for hdlcsim.c:

Go to the source code of this file.

Data Structures

struct | hdlcInst_t

Defines

#define | hdlc_TEST_MAX_NBYTES 64
#define | hdlc_TEST_SIM_DATA_BYTE_CNT 64
#define | hdlc_TEST_NUM_FRAMES (hdlc_TEST_SIM_DATA_BYTE_CNT/hdlc_TEST_N_BYTES)
#define | hdlc_TEST_NUMOF_OPENING_FLAGS 3
#define | hdlc_TEST_NUMOF_ABORT_FLAGS 4
#define | hdlc_TEST_ENC_BYTES_PER_WORD 1
#define | hdlc_TEST_DEC_BYTES_PER_WORD 1
#define | hdlc_TEST_FCS_SIZE_BYTES 2
#define | hdlc_TEST_TX_FCS_INIT 0xFFFF
#define | hdlc_TEST_TX_FLAGS_BYTE 0x007E
#define | hdlc_TEST_TX_ABORT_BYTE 0x00FE
#define | hdlc_TEST_TX_BYTE_SIZE 8
#define | hdlc_TEST_TX_MSB_MASK 0xFF00
#define | hdlc_TEST_TX_LSB_MASK 0x00FF
#define | hdlc_TEST_TX_MIN_FLAG_CNT 1
#define | hdlc_TEST_TX_BITSTUFF_CNT 5
#define | hdlc_TEST_SIM_FCS_UNKNOWN -1
#define | hdlc_TEST_SIM_FCS_GOOD 0
#define | hdlc_TEST_SIM_FCS_BAD 1

Functions

void | hdlcTxInitCfg (hdlcTxInit_t *init)
void | hdlcRxInitCfg (hdlcRxInit_t *init)
tuint | hdlcProcessTx (hdlcInst_t *inst, tword *srcBuf, tword *dstBuf)
tuint | hdlcProcessRx (hdlcInst_t *inst, tword *encBuf, tword *rawDataBuf, tint len)
void | main (void)

Variables

tword | dataBuf [hdlc_TEST_MAX_NBYTES]
tuint | txHDLCFcs = 0
tint | rxHDLCFcsStatus = hdlc_TEST_SIM_FCS_UNKNOWN
hdlcInst_t hdlcInst
const tuint | hdlcFcsTable []
tword | hdlcEncData [2 *hdlc_TEST_MAX_NBYTES]
tword | hdlcDecData [2 *hdlc_TEST_MAX_NBYTES]
tuint | bytesSent
tuint | bytesRx


HDLC Test: hdlcsim.c Source File

hdlcsim.c

Go to the documentation of this file.
00001
00013 /* @{ */
00014
00015 #include <stdio.h>
00016 #include <stdlib.h>
00017 #include <string.h>
00018 #include <ti/mas/hdlc/hdlctx.h>
00019 #include <ti/mas/hdlc/hdlcrx.h>
00020 #include <ti/mas/util/pkt.h>
00021 #include <ti/mas/util/utl.h>
00022
00023 #undef  hdlc_TEST_MAX_NBYTES
00024 #define hdlc_TEST_MAX_NBYTES            64
00025 #define hdlc_TEST_SIM_DATA_BYTE_CNT     64
00026 #define hdlc_TEST_NUM_FRAMES          (hdlc_TEST_SIM_DATA_BYTE_CNT/hdlc_TEST_N_BYTES)
00027 #undef  hdlc_TEST_NUMOF_OPENING_FLAGS
00028 #define hdlc_TEST_NUMOF_OPENING_FLAGS 3
00029 #define hdlc_TEST_NUMOF_ABORT_FLAGS   4
00030 #define hdlc_TEST_ENC_BYTES_PER_WORD  1
00031 #define hdlc_TEST_DEC_BYTES_PER_WORD  1
00032 #undef  hdlc_TEST_FCS_SIZE_BYTES
00033 #define hdlc_TEST_FCS_SIZE_BYTES      2
00034
00035 /* Do not Change the Following Definitions */
00036 #define hdlc_TEST_TX_FCS_INIT       0xFFFF
00037 #define hdlc_TEST_TX_FLAGS_BYTE     0x007E
00038 #define hdlc_TEST_TX_ABORT_BYTE     0x00FE
00039 #define hdlc_TEST_TX_BYTE_SIZE      8
00040 #define hdlc_TEST_TX_MSB_MASK       0xFF00
00041 #define hdlc_TEST_TX_LSB_MASK       0x00FF
00042 #define hdlc_TEST_TX_MIN_FLAG_CNT   1
00043 #define hdlc_TEST_TX_BITSTUFF_CNT   5
00044
00045 #define hdlc_TEST_SIM_FCS_UNKNOWN -1
00046 #define hdlc_TEST_SIM_FCS_GOOD     0
00047 #define hdlc_TEST_SIM_FCS_BAD      1
00048
00049 /* global variables */
00050 typedef struct {
00051    hdlcRxInst_t hdlcRxInst;
00052    hdlcTxInst_t hdlcTxInst;
00053 } hdlcInst_t;
00054
00055 /* data passed to the HDLC */
00056 tword dataBuf[hdlc_TEST_MAX_NBYTES];
00057
00058 tuint txHDLCFcs = 0;
00059 tint  rxHDLCFcsStatus = hdlc_TEST_SIM_FCS_UNKNOWN;
00060
00061 hdlcInst_t hdlcInst;
00062
00063 extern const tuint hdlcFcsTable[];
00064
00065  /* HDLC Tx init configuration  */
00066 void hdlcTxInitCfg(hdlcTxInit_t *init)
00067 {
00068    tbool BIND_MASK = TRUE;
00069
00070    /* Minimum 2 flags must be generated in order to
00071       play last byte when nothing to play */
00072    init->minFlagsCnt = hdlc_TEST_NUMOF_OPENING_FLAGS;
00073
00074    init->encodedDataBytePerWord = hdlc_TEST_ENC_BYTES_PER_WORD; /* # of encoded bytes per word */
00075    init->decodedDataBytePerWord = hdlc_TEST_DEC_BYTES_PER_WORD; /* # of decoded bytes per word */
00076
00077    init->encodedDataBigEndian = BIND_MASK;
00078    init->decodedDataBigEndian = BIND_MASK;
00079
00080    /* Initialize Tx part of HDLC */
00081    hdlcTxInit(&hdlcInst.hdlcTxInst, init);
00082
00083 } /* hdlcTxInitCfg */
00084
00085 /* HDLC Rx init configuration */
00086 void hdlcRxInitCfg(hdlcRxInit_t *init)
00087 {
00088    /* RX initialization */
00089    init->encodedDataBytePerWord = hdlc_TEST_ENC_BYTES_PER_WORD; /* # of encoded bytes per word */
00090    init->decodedDataBytePerWord = hdlc_TEST_DEC_BYTES_PER_WORD; /* # of decoded bytes per word */
00091
00092    /* Initialize Rx part of HDLC */
00093    hdlcRxInit(&hdlcInst.hdlcRxInst, init);
00094
00095 } /* hdlcRxInitCfg */
00096
00097 tuint hdlcProcessTx(hdlcInst_t *inst, tword *srcBuf, tword *dstBuf)
00098 {
00099    tuint hdlc_stat = 0, bytesSent = 0;
00100    tuint fillWord_idx = 0;
00101    tuint bytesCnt;
00102    tword temp[2*hdlc_TEST_MAX_NBYTES];
00103
00104    hdlc_stat  |= hdlcTxConfig (&inst->hdlcTxInst, &temp[0], (tuint)hdlc_TEST_NUMOF_ABORT_FLAGS);
00105    hdlcTxAbort(&inst->hdlcTxInst);
00106   /* Copy and unpack to Destination buffer */
00107    pktUnpackWordsIntoBytes(&temp[0],&dstBuf[bytesSent],hdlc_TEST_NUMOF_ABORT_FLAGS,0);
00108
00109    bytesSent = hdlc_TEST_NUMOF_ABORT_FLAGS;
00110
00111
00112    bytesCnt = sizeof(dataBuf);
00113    hdlc_stat |= hdlcTxConfig (&inst->hdlcTxInst, &temp[0],2*bytesCnt);
00114
00115    while(hdlc_stat & hdlc_TX_CONTINUE)
00116    {
00117     hdlc_stat = hdlcTxData (&inst->hdlcTxInst, srcBuf, &fillWord_idx, hdlc_TEST_MAX_NBYTES);
00118    /* Copy and unpack to Destination buffer */
00119     pktUnpackWordsIntoBytes(&temp[0],&dstBuf[bytesSent],inst->hdlcTxInst.dataBufByteCnt,0);
00120     bytesSent += inst->hdlcTxInst.dataBufByteCnt;
00121   if(fillWord_idx==bytesCnt)
00122    break;
00123    }
00124
00125
00126    printf("\n");
00127    printf("fillWord_idx : %d \n",fillWord_idx);
00128
00129    txHDLCFcs = inst->hdlcTxInst.fcs;
00130
00131    bytesCnt = hdlc_TEST_FCS_SIZE_BYTES + hdlc_TEST_NUMOF_ABORT_FLAGS;
00132    bytesCnt += (inst->hdlcTxInst.currOctetBitCnt + 7) >> 3;
00133    hdlc_stat |= hdlcTxConfig (&inst->hdlcTxInst, &temp[0], (tuint)bytesCnt);
00134    hdlcTxFcs (&inst->hdlcTxInst, TRUE);
00135    /* Copy and unpack to Destination buffer */
00136    pktUnpackWordsIntoBytes(&temp[0],&dstBuf[bytesSent],bytesCnt,0);
00137    bytesSent += bytesCnt;
00138
00139    /* Pack the dst buffer at the end */
00140   pktPackBytesIntoWords (dstBuf, dstBuf, bytesSent, 0);
00141
00142   return (bytesSent);
00143
00144 } /* hdlcProcessTx */
00145
00146 tuint hdlcProcessRx(hdlcInst_t *inst, tword *encBuf, tword *rawDataBuf, tint len)
00147 {
00148    tuint        bytesCnt = (tuint)len;
00149    tuint        status;
00150    tuint        TempBufCnt;
00151
00152    hdlcRxConfig (&inst->hdlcRxInst, encBuf, bytesCnt);
00153
00154
00155    bytesCnt = 0;
00156    do
00157    {
00158       TempBufCnt = 0 ;
00159       status = hdlcRx (&inst->hdlcRxInst, &rawDataBuf[bytesCnt], &TempBufCnt,hdlc_TEST_MAX_NBYTES);
00160     bytesCnt+=TempBufCnt;
00161
00162       /* check for end of frame and process it */
00163       if (status & (hdlc_RX_FRAME_ABORT | hdlc_RX_FRAME_END))
00164       {
00165          if (status & hdlc_RX_FRAME_GOOD)
00166             rxHDLCFcsStatus = hdlc_TEST_SIM_FCS_GOOD;
00167          else
00168             rxHDLCFcsStatus = hdlc_TEST_SIM_FCS_BAD;
00169
00170       }
00171
00172    } while ((status & hdlc_RX_BUFFER_END) == 0);
00173    return (bytesCnt);
00174
00175 } /* hdlcProcessRx */
00176
00177 tword        hdlcEncData[2*hdlc_TEST_MAX_NBYTES], hdlcDecData[2*hdlc_TEST_MAX_NBYTES];
00178 tuint        bytesSent, bytesRx;
00179 void main(void)
00180 {
00181    tint i;
00182    hdlcTxInit_t txInitCfg;
00183    hdlcRxInit_t rxInitCfg;
00184
00185    srand(1);
00186  /* Initialize the data for encoding */
00187    for(i=0;i<hdlc_TEST_MAX_NBYTES;i++)
00188    {
00189      dataBuf[i]=rand()%0xFF;
00190    }
00191
00192    /* Zero out Encoder and Decoder  Buffers*/
00193    memset ((void *)hdlcEncData, 0, sizeof(hdlcEncData));
00194    memset ((void *)hdlcDecData, 0, sizeof(hdlcDecData));
00195
00196    /* HDLC Tx Initialization */
00197    hdlcTxInitCfg (&txInitCfg);
00198
00199    pktPackBytesIntoWords (dataBuf, dataBuf, sizeof(dataBuf), 0);
00200
00201    /* Encode data in HDLC frame */
00202    bytesSent = hdlcProcessTx (&hdlcInst, dataBuf, hdlcEncData);
00203
00204
00205    /* HDLC Rx Initialization */
00206    hdlcRxInitCfg (&rxInitCfg);
00207
00208    /* Decode HDLC frame */
00209    bytesRx = hdlcProcessRx (&hdlcInst, hdlcEncData, hdlcDecData, bytesSent);
00210
00211    /* Display the results */
00212    printf ("Input data:");
00213    for (i = 0; i < utlNbytes2NtwordsCeil(sizeof(dataBuf)); i++)
00214    {
00215       if ((i & 0xF) == 0)
00216          printf("\n");
00217       printf (" %02X", dataBuf[i]);
00218    }
00219
00220    printf ("\n\nDecoded HDLC data:");
00221    for (i = 0; i < utlNbytes2NtwordsCeil(bytesRx); i++)
00222    {
00223        if ((i & 0xF) == 0)
00224          printf("\n");
00225       printf (" %02X", hdlcDecData[i]);
00226    }
00227
00228    if (rxHDLCFcsStatus == hdlc_TEST_SIM_FCS_GOOD)
00229       printf ("\n\nResult:\n Good CRC is received.\n");
00230    else if (rxHDLCFcsStatus == hdlc_TEST_SIM_FCS_BAD)
00231       printf ("\n\nResult:\n Bad CRC is received!\n");
00232    else
00233       printf ("\n\nResult:\n HDLC processing failed!\n");
00234
00235 } /* main */
00236 /* @} */
00237 /* nothing past this point */


HDLC Test: HDLC Test Package

HDLC Test Package

Page Contents

  • Introduction
  • Unit Test Build Procedure
  • Unit Test Preparation
  • Test Procedure
  • Profiling Output
  • Further Information

Introduction

This package contains a basic test for HDLC (High-level Data Link Control) module. This is not a regression test, its purpose is to show how HDLC may be used in a system and to be able to play with the configuration, so that learning is easier.

Unit Test Build Procedure

  1. Follow the build procedure in the main HDLC doumentation.
  2. Change directory to hdlc/test
  3. Build test using the XDC commands provided in the main HDLC documentation

Note:
This procedure applies to source deliveries only.

Unit Test Preparation

  1. Follow the build procedure outlined above in Unit Test Build Procedure.
  2. Configure CCS for appropriate target simulator/emulator.
  3. Open CCS and locate the exectuable image for the target of interest. The image files are located in the ti\mas\hdlc\test\lnkr\c<rtarg> directories (see Table 1 below).
  4. Load executable *.x<rtarg> and go to main().
  5. Follow Test Procedure.

In the and <rtarg> represents the target platform using the RTSC naming convention (see Table 2 below).

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

Test Procedure

  1. Allow the target to run to completion. The simulation will cycle through the all tests.

  2. The passed or failed result will be printed on the screen.

Profiling Output

Note:
See the MIPS and Memory section in the main HDLC documentation for current profiling results.

Further Information

  • Revision History
  • Dependent Packages


HDLC Test: Module Index

HDLC Test Modules

Here is a list of all modules:
  • HDLCTEST


HDLC Test: Page Index

HDLC Test Related Pages

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


HDLC Test: Revision History

HDLC Test Package

Revision History

Revision History

Version | Comments
1.0.0.0 | Initial Version


HDLC Test: hdlcInst_t Struct Reference

  • Data Structures
  • Data Fields

hdlcInst_t Struct Reference
[HDLCTEST]

Detailed Description

Definition at line 50 of file hdlcsim.c.

Data Fields

hdlcRxInst_t | hdlcRxInst
hdlcTxInst_t | hdlcTxInst

Field Documentation

hdlcRxInst_t hdlcInst_t::hdlcRxInst

Definition at line 51 of file hdlcsim.c.

Referenced by hdlcProcessRx(), and hdlcRxInitCfg().

hdlcTxInst_t hdlcInst_t::hdlcTxInst

Definition at line 52 of file hdlcsim.c.

Referenced by hdlcProcessTx(), and hdlcTxInitCfg().

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