Engineer-to-Engineer Note EE-243
a
Technical notes on using Analog Devices DSPs, processors and development tools
Contact our technical support at dsp.support@analog.com and at dsptools.support@analog.com
Or vi sit our o n-li ne r esou rces htt p:/ /www.analog.com/ee-notes and http://www.analog.com/processors
Using the Expert DAI for ADSP-2126x and ADSP-2136x SHARC®
Processors
Contributed by Jagadeesh Rayala and Srinivas K Rev 1 – October 11, 2004
Introduction
This EE-Note explains how you use the Expert DAI plug-in in VisualDSP++® 3.5 to configure the signal
routing unit (SRU) in ADSP-2126x and ADSP-2136x SHARC® processors. The Expert DAI plug-in
simplifies the task of generating the C and/or assembly code that is used to program the SRU.
Digital Audio Interface and SRU
The digital audio interface (DAI) in ADSP-2126x and ADSP-2136x SHARC processor derivatives
comprises a group of peripherals and the SRU. The peripheral's inputs and the outputs do not connect to
the 20 external DAI pins (DAI_P20-1) directly. Instead, the SRU establishes these connections, based on a
set of configuration registers. This feature allows you to interconnect the peripherals to suit a wide variety
of systems. It also allows ADSP-2126x and ADSP-2136x processors to include an arbitrary number and
variety of peripherals while retaining high levels of compatibility without increasing pin count.
The SRU contains six groups of registers (named A through F). Each group routes a unique set of signals
with a specific purpose. For example, group A routes clock signals, group B routes frame sync signals,
and group C routes serial data signals. Together, the SRU’s six groups include all of the DAI peripherals'
inputs and outputs, additional signals from the core, and all the connections to the DAI pins. For
additional information on the DAI and SRU, refer to the processor's Peripherals Manual [1] and [2].
Programming the SRU requires an in-depth understanding of the SRU registers, bit field positions
corresponding to different destination signals in all the registers, the number of bits allocated for each bit
field in all the registers, and the values that correspond to different source signals in all of the registers.
VisualDSP++ 3.5 includes a macro (
sru.h) for programming the SRU registers. This macro requires that
you have background knowledge about all of the SRU signals and registers. The Expert DAI plug-in,
however, provides an easy method of generating the code necessary to configure the SRU registers. The
Expert DAI tool's graphical user interface allows you to generate the code without having to worry about
the internal details.
Copyright 2004, Analog Devices, Inc. All rights reserved. Analog Devices assumes no responsibility for customer product design or the use or application of
customers’ products or for any infringements of patents or rights of others which may result from Analog Devices assistance. All trademarks and logos are property
of their respective holders. Information furnished by Analog Devices applications and development tools engineers is believed to be accurate and reliable, however
no responsibility is assumed by Analog Devices regarding technical accuracy and topicality of the content provided in Analog Devices’ Engineer-to-Engineer Notes.
a
Installing Expert DAI
To install the Expert DAI plug-in in the VisualDSP++ environment:
1. Extract the file (AdvancedExpertDAI.dll) from the attached ZIP file (EE243v01.zip) and place it in
the VisualDSP++ System directory. If VisualDSP++ is installed on your C drive, copy the attached
file into the following directory:
C:\Program Files\Analog Devices\VisualDSP 3.5 32-Bit\System
2. Register the AdvancedExpertDAI.dll file by typing the following command line:
regsvr32.exe AdvancedExpertDAI.dll
Note: Run regsvr32.exe from the ..\System directory, not from the root directory
The Expert DAI tool now appears in the
Expert DAI from the Tools => Plugins menu. Figure 1 shows the default state of the Expert DAI
window.
Settings => Preferences => Plugins menu. You can access
Figure 1. Expert DAI Window
Using the Expert DAI for ADSP-2126x and ADSP-2136x SHARC® Processors (EE-243) Page 2 of 8
a
Using Expert DAI
To generate code:
1. In Processor, select the processor for which you want to generate code.
2. Under User Inputs, configure connections between the source and destination signals by selecting
the signals from the respective Source and Destination list boxes and clicking Add.
When you select a signal in the Source box, the signals that appear in the Destination box are
updated with valid destinations that correspond to the selected source signal. If you try to route two
source signals to the same destination signal, the Expert DAI tool will signal an error. Similarly, the
tool will generate an error if you select a DAI pin as a source of one connection and try to select the
same DAI pin as a destination in a subsequent connection (and vice versa).
As you add connections, the System Configuration box and the DAI pin routing diagram update
appropriately.
3. Select the appropriate check boxes to invert various signal (logic level of DAI pin 19, DAI pin 20, Ext
Misc A4, and Ext Misc A5).
4. Select the appropriate check boxes and click Generate Code to generate the C and/or assembly code.
If the processor type is changed after you have added the connections, data in the DAI pin routing diagram
and in the System Configuration is cleared automatically. At the same time, the signals that appear in
the Source and Destination boxes are refreshed and updated for the selected processor.
To remove a connection, select the connection in the System Configuration box and click Delete. The
DAI pin routing diagram refreshes automatically, and the System Configuration box is updated.
The Expert DAI plug-in also provides these features:
Save Configuration: Saves the information about the selected processor , the added connections, and
the state of each check box. Clicking Save Configuration stores the information in an output file
with a .CFG extension.
Load Configuration: Loads a saved configuration (.CFG file). Clicking Load Configuration prompts
you to select a .CFG file. After selecting the .CFG file, the Expert DAI window refreshes, presenting
the contents in the
design and then create the code to configure the SRU.
.CFG file. At this point, you can add/delete/modify the connections per your new
Using the Expert DAI for ADSP-2126x and ADSP-2136x SHARC® Processors (EE-243) Page 3 of 8