Engineer-to-Engineer Note EE-232
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
Configuring the Signal Routing Unit of ADSP-2126x SHARC® DSPs
Contributed by K. Malsky Rev 1 – February 12, 2004
Introduction
The ADSP-2126x family of SHARC® DSPs is
capable of interfacing with a wide variety of
peripherals. Much of this versatility comes from
the processor’s “soft” connections between the
I/O ports and the physical package pins. When
most processors are designed into real-world
systems, many device pins are tied high or low,
pulled up, pulled down, or left unconnected. A
complex system often has many input pins with
fixed or default values that must be hard-wired
and unused outputs pins. The Signal Routing
Unit (SRU) on an ADSP-2126x DSP is a
software-controlled matrix that can eliminate the
need for pins that do not serve any true I/O
purpose.
The SRU provides maximum flexibility by
allowing you to define the function of the 20 pins
of the digital audio interface (DAI). However,
this flexibility brings complexity that can be
overwhelming when beginning a new design.
This document provides guidance for engineers
who are starting their first project using the SRU
and the DAI pins. It offers helpful hints and
tricks that may assist experienced users.
Getting Started
The SRU, which is documented in the ADSP2126x SHARC DSP Peripherals Manual [1], can
be somewhat difficult to approach. By its nature,
any connection matrix requires a clear
understanding of what is being connected. The
naming convention for these endpoints is very
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.
consistent, but frequently counterintuitive. In an
attempt to make the nomenclature more intuitive,
we’ll begin by using familiar terms and focusing
on the outside of the processor.
Step 1: Take Inventory of the Unique Signals
As mentioned above, only signals that actually
provide information to and from peripherals need
to be connected to the SHARC DSP. Since there
is a means of routing within the DSP, signals
need only to be connected to a single pin,
regardless of the number of internal places the
signal is used. You do not have to connect the
same signal to two or more DAI external pins.
Identify the peripherals that you are trying to
connect to the SHARC DSP, and count the
unique signals. If the same clock or frame sync is
connected to multiple devices, it counts as one
signal. When a serial data stream drives multiple
output devices, it also counts as a single signal.
List the unique I/O signals and look carefully to
see what else you may be able to eliminate.
For example, if you find two signals are
identical, but of opposite polarity (inverted),
count them as one signal, as the SRU can
generate either from the other. If a clock signal is
a phase-aligned, integer sub-multiple of another
clock signal, group them together. The Precision
Clock Generator (PCG) is a peripheral within the
DAI that may allow you to connect only the
fastest clock. For example, if there is a clock at
frequency f and another at f/8, it is likely that
only the faster clock needs a DAI pin. Read
a
about the PCG in the ADSP-2126x SHARC DSP
Peripherals Manual [1] for details.
Step 2: Note the Direction of Signal Flow
Next to each signal in your list, indicate whether
it should be an input to the pin buffer, an output
from the pin buffer, or bidirectional.
The external connection to the SHARC
!
DSP DAI pins (the wire lead or ball) is
part of a peripheral known as a pin
buffer. Pin buffers will be explained in
detail in the next section. For now, just
think of them as I/O pins on the SHARC
with programmable behavior.
Most pin buffers are used only in one direction in
a given design. Note that many peripherals have
pins that are capable of being bidirectional, but
are only used in one direction in the system.
When a pin buffer is unidirectional,
programming the SRU is dramatically simplified.
Once the SRU is configured correctly (one or
more routing patterns depending on your
application), most of this will become
transparent.
Programming the SRU
Think of each physical DAI as a 3-terminal
peripheral with logical connections for an input,
an output, and an enable that activates the pin
buffer amplifier.
PBxx_O
Interface
to SRU
PBxx_I
PBENxx_I
IN
BUFFER
ENABLE
PIN
OUT
PBxx_O
External
Package
Connection
Pin
In cases where the pin is bidirectional, determine
what causes the direction to change. Is it the state
of another pin? Is it the state of a processor-level
control register? Is it the software configuration
of a port? Think about what may be controlling
when the SHARC is driving a logic value onto
the bidirectional pin and when the pin is just
reading a logic input.
Step 3: Allocate the DAI Pins
At this point, it is likely that you will have
reduced your list to 20 or fewer signals. If you
have a few extra, don’t panic. There are
additional pins that may be designated as various
types of GPIO, including FLAGS, IRQ, and
device selects.
Build a “cheat sheet” that lists the DAI pin
numbers (1-20), the signal to which you are
connecting each pin, and whether it is an output,
input, or bi-directional (from the perspective of
the SHARC DSP). Even if the schematics are
easy to read, a clean version of this table will be
invaluable until your system is up and running.
Figure 1. A Pin Buffer
A pin buffer is like a small buffer amplifier that
can source enough current to drive the pin and a
trace on the circuit board. When switched on
(i.e., when its enable input is logic high), the
logic value at the pin buffer input is driven onto
the pin buffer output. When switched off (i.e.,
when its enable input is logic low), the buffer
amplifier is high impedance, and the logic level
of the pin buffer output is easily controlled by an
external source. Pin buffers are the logical
gateway for the physical IC package leads
associated with the DAI.
Step 4: Program the Inputs to the SHARC DSP
Understanding the nomenclature is, arguably, the
most difficult part of using the SRU.
Programming is very simple. Ensure that you
understand the next paragraph before continuing.
Since a pin buffer is an on-chip peripheral, the
signal you connect to the physical package is
Configuring the Signal Routing Unit of ADSP-2126x SHARC® DSPs (EE-232) Page 2 of 6