COMMUNICATIONS WITH THE MULTI- CHANNEL HOST P RT INTERFACE

Similar documents
Configuring Code Composer Studio for OMAP Debugging

A DSP/BIOS AIC23 Codec Device Driver for the TMS320C5510 DSK

TFP101, TFP201, TFP401, TFP401A 2Pix/Clk Output Mode

DSP/BIOS LINK. Configurable TSK and SWI approach LNK 207 DES. Version <1.00>

A DSP/BIOS AIC23 Codec Device Driver for the TMS320C6416 DSK

Using the TMS320C5509 USB Bootloader

DSP/BIOS Link. Platform Guide Published on 20 th JUNE Copyright 2009 Texas Instruments Incorporated.

TMS470R1x External Clock Prescale (ECP) Reference Guide

DSP/BIOS LINK. Pool LNK 082 DES. Version 1.30

Increase Current Drive Using LVDS

Debugging Shared Memory Systems

This document describes the features of the GUI program used to control Power Line Modem with E-Meter Platform.

TMS320C6000 DSP Software-Programmable Phase-Locked Loop (PLL) Controller Reference Guide

Programming the TMS320VC5509 RTC Peripheral

INVENTORY HISTORY REPORT EXTENSION. User Guide. User Guide Page 1

CUSTOM GOOGLE SEARCH. User Guide. User Guide Page 1

TMS320C64x DSP Peripheral Component Interconnect (PCI) Performance

IndoTraq Development Kit 1: Command Reference

The TMS320 DSP Algorithm Standard

C Fast RTS Library User Guide (Rev 1.0)

TMS320VC5409A Digital Signal Processor Silicon Errata

I2C and the TAS3001C. Introduction. The I2C Protocol. Digital Audio Group ABSTRACT

A Technical Overview of expressdsp-compliant Algorithms for DSP Software Producers

INVENTORY REPORT EXTENSION. User Guide. User Guide Page 1

Using the TMS320 DSP Algorithm Standard in a Dynamic DSP System

ADD RELATED PRODUCTS TO CART. User Guide. User Guide Page 1

Application Report. 1 System Requirements. 2 Using the DM643x Pin Multiplexing Utility. Bernard Thompson...

Techniques for Profiling on ROM-Based Applications

TMS320UC5409/TMS320VC5409 Digital Signal Processors Silicon Errata

Interfacing the ADS8320/ADS8325 to The TMS320C6711 DSP

Stereo Dac Motherboard application information

SavvyCube Ecommerce Analytics Connector by MageWorx. User Guide

TMS320C6000 DSP Interrupt Selector Reference Guide

DSP/BIOS LINK RING IO LNK 129 DES. Version 0.91

Using Endianess Conversion in the OMAP5910 Device

Table 1. Proper Termination of Unused (Port) Pins in a Single-Port PSE System

Memory Allocation Techniques in System with Dynamic Swapping of Application Codes

TLK10081 EVM Quick Start Guide Texas Instruments Communications Interface Products

Application Report. 1 Introduction. MSP430 Applications. Keith Quiring... ABSTRACT

Wolverine - based microcontrollers. Slashing all MCU power consumption in half

UCD3138 Responding to Multiple PMBus Slave Addresses

NO P.O. BOXES ALLOWED AT CHECKOUT. User Guide. User Guide Page 1

Stacking the REF50xx for High-Voltage References

HSKT TM Technology Specifications

IMPORT/EXPORT Newsletter Subscribers. User Guide. User Guide Page 1

PROGRAMMING THE MSC1210

Protecting the TPS25810 from High Voltage DFPs

Application Report. 1 Hardware Description. John Fahrenbruch... MSP430 Applications

FlashBurn: A DSK Flash Memory Programmer

XIO1100 NAND-Tree Test

A DSP/BIOS EDMA McBSP Device Driver for TMS320C6x1x DSPs

DS25BR204 Evaluation Kit

PMC to PCI Express Adapter with JN4 Connector Breakout

Hardware UART for the TMS320C3x

TMS320C6000 DSP 32-Bit Timer Reference Guide

OMAP SW. Release Notes. OMAP Software Tools OST version 2.5 Release. 16xx/1710/242x platforms. Document Revision: 2.5 Release

October 2002 PMP Portable Power SLVU074

PCIxx12 Single Socket CardBus Controller with Integrated 1394a-2000 OHCI Two-Port PHY/Link-Layer Controller

AC Induction Motor (ACIM) Control Board

Maximizing Endurance of MSC1210 Flash Memory

TMS320C620x/C670x DSP Boot Modes and Configuration Reference Guide

Calibration Routines and Register Value Generation for the ADS1216, ADS1217 and ADS1218

SN65DSI86 SW Examples

WL1271 ini File Description and Parameters User's Guide

The photograph below shows the PMP9730 Rev E prototype assembly. This circuit was built on a PMP9730 Rev D PCB.

The examples in this application report require the Flash API Modules (SPRC236) within the "Tools & Software" folder.

1 Photo. 7/15/2014 PMP10283 Rev A Test Results

xdais-dm (Digital Media) User Guide

GUEST CHECKOUT TO REGISTERED CUSTOMERS. User Guide. User Guide Page 1

External Programming of the TMS320C64x EDMA for Low Overhead Data Transfers

February 2003 PMP EVMs SLVU081

SN5446A, 47A, 48, SN54LS47, LS48, LS49 SN7446A, 47A, 48, SN74LS47, LS48, LS49 BCD-TO-SEVEN-SEGMENT DECODERS/DRIVERS

TIDA V Stepper Motor Controller with Integrated Current Sense Reference Design

TMS320C672x DSP Software-Programmable Phase-Locked Loop (PLL) Controller. Reference Guide

IMPORT/EXPORT CUSTOMERS FOR MAGENTO 2. User Guide. User Guide Page 1

System-on-Chip Battery Board User s Guide

Texas Instruments Voltage-Level-Translation Devices

DSP/BIOS LINK OMAP2530 EVM LNK 172 USR. Version 1.64 NOV 13, 2009

EV Software Rev Evaluation System User Guide. Introduction. Contents. Hardware and Software Setup. Software Installation

SN5476, SN54LS76A SN7476, SN74LS76A DUAL J-K FLIP-FLOPS WITH PRESET AND CLEAR

TMS320C6000 DSP General-Purpose Input/Output (GPIO) Reference Guide

Power Line Modem with E-Meter Platform Quick Start Guide

TMS320C5x Memory Paging (Expanding its Address Reach)

TMS320C6414T/15T/16T Power Consumption Summary

GUEST CHECKOUT TO REGISTERED CUSTOMERS

Writing TMS320C8x PP Code Under the Multitasking Executive

Choosing the Appropriate Simulator Configuration in Code Composer Studio IDE

IMPORT/EXPORT WISH LIST ITEMS FOR MAGENTO 2. User Guide. User Guide Page 1

Single Cell Battery Power Solution

WM8805_6152_DS28_EV1_REV3 Schematic and Layout. WM8805_6152_DS28_EV1_REV3 Schematic and Layout. Customer Information 1 of 18 June 2007, Rev 3.

HV Solar MPPT DC-DC GUI Overview. Getting Started Guide

Board Layout Adjustments Between the TNETE2201B and TLK2201/TLK1201

TMS470R1x Serial Communication Interface (SCI) Reference Guide

C Routines for Setting Up the AIC on the TMS320C5x EVM

TMS470R1VF334E TMS470 Microcontrollers Silicon Errata

UCC3917 Floating Hot Swap Power Manager Evaluation Board

1. Installation Instructions

PCI Express XMC to PCI Express Adapter with J16 Connector Breakout DESCRIPTION

DSP/BIOS LINK MESSAGING COMPONENT LNK 031 DES. Version 1.30

File Downloads User Guide

Transcription:

Multiple Channels COMMUNICATIONS WITH THE MULTI- CHANNEL HOST P RT INTERFACE With the HPI and McHPI, applications can create a single physical channel and multiple virtual channels to provide communications among applications running on different processors By Stanford Hudson In some embedded systems, the need frequently arises for communication among applications executing on different processors. Designers typically resort to using a single-channel message distributor for that capability. However, because the message distributor must have knowledge of the applications, as well as of some of the information within the message, a new application can t be added; that is, the communications system lacks scalability a decided disadvantage. A more generic and scalable approach is to allow each application to create its own virtual communications channel or channels. The application then becomes both the distributor and the handler of messages. When a new application is installed on a processor, it may choose to add a channel so that other applications on other processors can communicate Figure 1: The scalable channel model enables applications to use their own virtual communications channels between the host processor and a DSP. The single physical channel provides a generic communications medium for the virtual channels. with it. This technique, known as multichannel communications, gives the communications system scalability (see Figure 1). A scalable channel model promotes data hiding and object orientation, since each channel is private within the system. The Multichannel Host Port Interface Model In multiprocessor systems using (at least) one member of the TMS320 DSP family, the Host Port Interface (HPI) peripheral is employed as a single physical communications channel between the host and the DSP processor. If used correctly, the HPI port can provide a generic way for applications residing on the host or the DSP to communicate with each other. Using the HPI port as a single physical channel for multiple virtual channels is made possible in turn by the Multi-Channel Host Port Interface (McHPI) channel model (see Figure 2). Various types of data transfers can be realized with this model, since each application can create multiple channels at run time. This capability can be useful in systems that require one channel for streaming data and another for command and status information. All HPI transmit and receive buffering is stored on the DSP, and each application owns its buffers. A device driver model is used for the application programming interface (API), which enables applications to manage channels at run time, as follows: extern void McHPI_Init(void); extern Uns McHPI_Open(MCHPI_CONFIG_T *cfg, Uns *channel); extern Uns McHPI_Close(Uns channel); extern Uns McHPI_Ioctl(Uns channel, Uns cmd, void *arg); extern Uns McHPI_Read(Uns channel, Uns *data, Uns *size); extern Uns McHPI_Write(Uns channel, Uns *data, Uns size); The McHPI_Init() call is issued once, at start-up, to initialize the internal structures of the McHPI subsystem. The McHPI_Open() call is issued for every virtual channel that the application requires. Each channel is assigned a unique integer that can be referenced in future calls to McHPI. A corresponding call to McHPI_Close() may be issued to close a channel. The McHPI_Ioctl() function is an optional implementation and can be used to reconfigure or to inquire about the status of the channel. The McHPI_Read() and McHPI_Write() functions enable an application to read from and write to the receive and transmit pipes. The message distributor, or application software interrupt (SWI), usually issues the McHPI_Read() call, and the main application thread issues calls to McHPI_Write() to send messages, thus: status = McHPI_Read(my_channel, (Uns *)&msg, &size); status = McHPI_Write(my_channel, (Uns *)msg, length); For a practical implementation of the McHPI model on a TMS320 DSP, you should use the DSP/BIOS realtime kernel as the operating system, since DSP/BIOS provides the necessary pipe and tasking structures to implement the model. To create a channel, each application must set up HPI transmit and receive buffers, memory flow control flags, and transmit and receive pipes. The configuration information that McHPI_Open() supplies to McHPI allows the application to specify all necessary information to open a virtual communications channel, thus: typedef struct { SWI_Obj swi; /* Application message distributor SWI */ PIP_Obj *txpipe; /* transmit pipe to host application */ 8 October 2002 Embedded Edge Embedded Edge October 2002 9

Multiple Channels Figure 2: The Multi-Channel Host Port Interface (McHPI) model enables an application to create multiple virtual channels. A device driver API is provided by the McHPI that enables the application to manage its channels at run time. DSP s transmit and receive HPI buffer and flag register are fixed at link time and are known to the corresponding host processor applications. Therefore, a similar implementation of McHPI can be achieved on the host, but with HPI flag and buffering contained on the DSP. If the host is a DSP with HPI capability, the local DSP transmit flag and buffers can be located on the host. Similarly, the host s transmit flag and buffers can be located on the local DSP. The primary thread of the McHPI implementation is the DSP/BIOS HPI hardware interrupt (HWI) handler (see the listing, page 14). The HWI is triggered by an HPI interrupt from both the host and the DSP in the case of a transmission when the transmit pipe is empty. It handles all channel pipe transfers between HPI transmit and receive buffers. One application well-suited to McHPI is a DSP-based image-processing system. Application Examples One application that s well suited to the use of McHPI is a DSP-based video image-processing system that combines both high-speed digital video data transmissions and command and status messaging to and from a host processor. The system employs two processors: a DSP that handles the math-intensive image-processing algorithms and a general-purpose processor (GPP) that manages the capture and display of digital video data as well as user input. The GPP can be an HPIenabled DSP, simplifying the architecture. In this example application, a streaming transmit and receive channel is used to transfer raw digital video data between the GPP and the DSP. Another channel is used to communicate control and status information. Control information includes image dimension configuration data, the types of image-pro- PIP_Obj *rxpipe; /* receive pipe from host application */ Ptr *txlen; /* DSP-to-host message length */ Ptr *txfr; /* DSP-to-host message available */ Ptr *rxlen; /* host-to-dsp message length */ Ptr *rxfr; /* host-to-dsp message available */ Ptr *rxbuf; /* host-to-dsp message storage buffer */ Ptr *txbuf; /* DSP-to-host message storage buffer */ Uns inuse; /* internal use only */ } MCHPI_CONFIG_T; The transmit and receive pipes must be unique for each channel that an application opens, as must be the storage areas for transmit and receive buffers and control flags. Their uniqueness is what gives the McHPI model its privacy feature and its scalability. Transmit and receive pipes allow data to move between McHPI and the application and its message distributor. They provide a queuing mechanism for the application, thus enabling multiple messages to be queued up for servicing by the single-channel physical implementation of the HPI. The physical layer of McHPI communicates via the transmit and receive buffers and uses flag registers to indicate when data is available. The host sets the RXLEN register to the number of words to be read from the receive buffer (RXBUF). A value of 1 in the receive flag register (RXFR) indicates that the host has placed data in the RXBUF. The setting of the RXFR is performed in conjunction with an HPI interrupt to the DSP from the host. When the DSP has read the data and placed it in the receive pipe, the RXFR is set to 0 and an interrupt is sent back to the host. The HPI physical layer enables both the host and DSP to read the same areas of memory. Consequently, the host may either poll the RXFR or wait for an interrupt from the DSP to determine if more data can be sent. A similar flow control process occurs for DSP-tohost transmission. The TXLEN register is set to the number of words stored in the transmit buffer (TXBUF), and the transmit flag register (TXFR) is set The transmit and receive pipes must be unique for each channel that opens. to 1 by the DSP when data is available in the TXBUF. An interrupt accompanies the setting of this flag and is followed by a host read of the TXBUF. The host is then responsible for clearing the TXFR and interrupting the DSP. As with the receive case, the DSP and host can operate in either poll or interrupt mode to transmit data. For each application channel, the addresses of the 0.5-5.0 V Faster load time through QuickLOAD technology Programmable JTAG clock High Performance USB Emulator...from the leaders in TI DSP Development Tools We also offer: ARM 28x 54x 55x 62x 64x 67x OMAP... PCI emulators with optional onboard EVM s FleXDS FleXDS 560+ TIGER DSP Development boards VIPER DSP Resource boards Design Services DSP Research, Inc. www.dspr.com information@dspr.com Phone: (408)773-1042 12 October 2002 Embedded Edge Embedded Edge October 2002 13

cessing algorithms to perform on the data, and any text to be imposed on the video image. Status information might include the number of frames processed, the coordinates that define a region of interest (movement detected), or other analytical data. Changing the Channels One channel is established for the streaming video data. Sufficient space for the HPI transmit and receive buffers is allocated so that they can store an entire video frame of data. A second channel, with small receive and transmit buffers, is established for the control and status messages. Two software interrupts (SWIs) are created on the DSP processor, one for receiving raw image data from the host and another for receiving and processing control messages. Messages and data are received via a call to McHPI_Read(). A main application task on the Various voice channels reside within the TDM frame, and each frame contains one sample of the voice signal. DSP is used to process the raw image information and calls McHPI_Write() to send the data back to the host for display. Communications processing systems also are well suited to the McHPI model. An example system involves the detection of DTMF signals in a time-division multiplexing (TDM) voice data stream that the host sends to the DSP. Various voice channels reside within the TDM frame, and each frame contains one sample of the voice signal for each channel. One McHPI virtual communications channel is set up for the streaming TDM voice data, and another channel for messages indicating what DTMF tone has been detected on each voice channel. Stanford Hudson (shudson@tekgenix.com) is a member of the technical staff at Tekgenix Corporation, a consulting and design firm located in Richardson,Texas, that specializes in DSP-based hardware and software design, analysis, and rapid prototyping. He has more than 11 years experience in real-time embedded systems architectures. (Note: Hudson is now with Paragon Innovations.) 14 October 2002 Embedded Edge

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 2002, Texas Instruments Incorporated