⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme_c_passthrough.txt

📁 visual dsp++环境下
💻 TXT
字号:
****************************************************************************

       ADSP-TS201S EZ-Kit Audio Passthrough routine in C

Sets up a DMA audio driver and performs audio pass through on both channels

Analog Devices, Inc.
DSP Division
Three Technology Way
P.O. Box 9106
Norwood, MA 02062

JULY-2002 BL
MARCH-2004 PPG - ported code to TS201 EZ-Kit and VisualDSP++ 3.5

This directory contains an example ADSP-TS201S, subroutine that 
implements audio pass through. The code is entirely in C.


Files contained in this directory:

ADSP-TS201_C_MP.ldf				Linker description file 
AudioPassThrough.dpj			VisualDSP project file
AudioPassThrough.mak			VisualDSP Make file
MainA.c							Source file for DSPA
MainB.c							Source file for DSPB
Audio.c							Source file containing audio interrupt routine for the TigerSHARC EZ-Kit
InitA.c							Source file containing one-time initialization code
Variablesa.c					Source file containing variable declarations
PassThroughDef.h				This project specific header file
TSEZKitDef.h					TS201S EZ-Kit header file
cache_macros.h					cache enable and benchmarking macros
README_C_PASSTHROUGH.txt		This README file
 _________________________________________________________________

CONTENTS

I.    AUDIO DRIVER DESCRIPTION
II.   PASSTHROUGH DESCRIPTION
         

I. AUDIO DRIVER DESCRIPTION

The Audio driver is initialized in InitA.c.

The hardware of the ADSP-TS201 EZ-Kit is setup so that the serial port
is mapped to external address selected by MS0, i.e. at 0x38000000.
DMAR0 is generated once for the stereo pair of audio samples. The first 
read after DMAR0 from that address reads left channel, the second
read reads right channel. Similarly, The first write after DMAR0 from 
that address writes left channel, the second write writes right channel.
InitA.asm sets up the audio driver as the chained sequence of DMAs
(all channel 0).

       --> RxLeft --> TxLeft --> RxRight --> TxRight --
      |                                                |
       ------------------------------------------------

RxLeft is setup to read CODEC's external address (0x38000000) into
internal memory location _ReadDataLeft.
RxRight is setup to read CODEC's external address (0x38000000) into
internal memory location _ReadDataRight.
TxLeft is setup to write variable WriteDataLeft to CODEC's
external address (0x38000000).
TxRight is setup to write variable WriteDataRight to CODEC's
external address (0x38000000).

Additionally, RxLeft is setup to be controlled via DMAR0 and completion
of TxRight will generate an interrupt to the DSP. The DMA0 ISR is
initialized to audio_int using call to interruptf(SIGDMA0, audio_int).
The audio processing can then be done inside the interrupt routine and
will only involve the variables ReadDataLeft, ReadDataRight, WriteDataLeft,
WriteDataRight that can be read and written in any order.

II.   PASSTHROUGH DESCRIPTION

Audio.c contains the audio interrupt service routine audio_int. Data
is simply being copied from ReadDataLeft to WriteDataLeft and from
ReadDataRight to WriteDataRight. The Audio driver described in
section I takes care of the rest.


cache_macros.h
================
After powerup/reset, the TS201 cache and BTB are not enabled

At the beginning of the program the cache must be enabled. The procedure is 
contained in the cache_enable macro that uses the refresh rate as input 
parameter
      -if CCLK=500MHz, refresh_rate=750
      -if CCLK=400MHz, refresh_rate=600
      -if CCLK=300MHz, refresh_rate=450
      -if CCLK=250MHz, refresh_rate=375

cache_macros.h performs the following:

-cache_enable(refresh_rate):
  -sets a new refresh rate
  -if the cache is enabled, it leaves it enabled.
  -if the cache is not enabled, it enables it in the correct way accounting for cache coherency
  -at the end enables the BTB if it was not already enabled
  -this macro should be used as the first line of code in every program

This header file also contains additional benchmarking macros which may be 
useful. Please see the header file source code and comments for additional 
information.
 

Project options: 
================
Please refer to the VisualDSP++ release notes and the 
TS201S anomaly listing for full details of the following switch usage, 
operation and silicon revision requirements

Assembler/Compiler/Linker switches to be used in the assembler, linker,
and compiler property pages' Additional Options fields

'-si-revision 0.1'		Required for TS201S Rev 0.1 silicon. 
						Use in compiler AND Assembler AND linker property 
						page 'Additional Options' field.

If any example code projects are built/rebuilt for the above mentioned 
silicon revisions, these switches must be used. The same holds true for 
user created code sets.


For C language projects, the current working directory must also be specified. 
This is accomplished by placing a period (.) inside the "Additional Include 
Directories" field under Project Options | Compile | Category: Preprocessor. 
This project option will avoid the following warning: 
"[Warning pp0084] Include file not found in path; opening in connected directory."
which is incurred when using a statement similar to this: 
	asm("#include <cache_macros.h>"); 
where file 'cache_macro' resides in the current working project directory

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -