|
The ADSP-21xxx Applications Handbook File Area contains ADSP-21020 source code, utilities, and test data for various DSP algorithms. These code examples were written using pre-VisualDSPTM tools, and they are optimized for the ADSP-21020 architecture. To port the examples to the more recent SHARC platforms (ADSP-2106x, ADSP-2116x) it is necessary to create a VisualDSP project and make the appropriate changes. The application areas are divided into the files listed below and zipped using PKZIP version 2.04g. Most files contain REAME or .doc files with information on building and running the code. |
|
|
|
|
| DFT.ZIP | |
The file DFT.ZIP contains the following files which are an example of a Discrete Fourier Transform for use with the ADSP-21020 Development Software. A detailed discussion of these operations can be found in the "ADSP-21020 Development Software Tutorial". DFT.ASM: ADSP-21020 source for an example 64 point DFT GENERIC.ACH: Architecture file (system description) for DFT example MAKEWAVE.C: C source for waveform generation utility MAKEWAVE.EXE: Waveform generation utility (created TEST64 and SIN64) PLOTCPLX.M: PC-MATLAB script for plotting DFT results README.DFT: Read first SIN64.DAT: Sine (and shifted Cosine) table for DFT example TEST64.DAT: Input data (all real) for DFT example |
|
| back to top | |
|
|
|
| FFTCMPLX.ZIP | |
The file FFTCMPLX.ZIP contains the following files which are code and utilities for running and testing a radix-2 FFT and a radix-4 FFT on the ADSP-21020. A PC-MATLAB script file PLOTLOG.M is included for ploting and comparison of FFT results. DEF21020.H: Definitions for bits in the ADSP-21020's system regs DOIT.BAT: DOS batch file to assemble, link, and start simulator FFT.ACH: Architecture file for FFT FFT.DOC: ADSP-21020 FFT user notes FFTRAD2.ASM: ADSP-21020 assembly code for radix-2 FFT FFTRAD4.ASM: ADSP-21020 assembly code for radix-4 FFT INIMAG.DAT: Imaginary input array INREAL.DAT: Real input array MAKEWAVE.C: Source for FFT test waveform generation program MAKEWAVE.EXE: Executable for above PLOTLOG.M: PC-MATLAB script for plotting FFT results README.FT2: Read first README.FT4: Read first TC2.DAT: Real twiddle factors from TWIDRAD2 program TC4.DAT: Real twiddle factors from TWIDRAD4 program TS2.DAT: Imaginary twiddle factors from TWIDRAD2 program TS4.DAT: Imaginary twiddle factors from TWIDRAD4 program TWIDRAD2.C: Source for FFT twiddle factor generation program TWIDRAD2.EXE: Executable for above TWIDRAD4.C: Source for FFT twiddle factor generation program TWIDRAD4.EXE: Executable for above |
|
| back to top | |
|
|
|
| FFTFIR.ZIP | |
The file FFTFIR.ZIP contains the following code and utilities for running and testing a fast FIR filter on the ADSP-21020. COEFF.DAT: Coefficient file DEF21020.H: Definitions for bits in the ADSP-21020's system regs EZLAB21K.ACH: 21020 EZ-LAB board architecture file FCOEF.DAT: Filter coefficients FFIR.ASM: Demonstrates the use of FFTs to implement fast FIR filters FFIR.EXE: Fast FIR executable file FFIR.H: Contains preprocessor variable definitions FFIRCOEF.C: Converts FIR taps into coefficients for FFIR FFIRCOEF.EXE: Executable for above IMPULSE.DAT: Impulse data IMTRANS.DAT: Imaginary transfer function data generated by ffircoef.c RETRANS.DAT: Real transfer function data generated by ffircoef.c TC.DAT: Real twiddle factors from TWIDRAD4 program TS.DAT: Imaginary twiddle factors from TWIDRAD4 program TWIDRAD4.C: Source for FFT twiddle factor generation program TWIDRAD4.EXE: Executable for above _FFTRAD4.ASM: Assembly code for the radix-4 FFT |
|
| back to top | |
|
|
|
| FFTREAL.ZIP | |
The file FFTREAL.ZIP contains the following code and utilities for running the real FFT programs:rfft2.asm a real radix-2 FFT rfft4.asm a real radix-4 FFT irfft2.asm an inverse real radix-2 program irfft4.asm an inverse real radix-4 program DEF21020.H: Definitions for bits in the ADSP-21020's system regs DOIT.BAT: DOS batch file to assemble, link, and start simulator EVREAL.DAT: Real even-indexed time domain input data FFT.ACH: Architecture file for FFT FFT.DOC: ADSP-21020 FFT user notes INIMFFT.DAT: Imaginary frequency domain input data INREAL.DAT: Real time domain input data INREFFT.DAT: Real frequency domain input data IRF2TBL.C: Table generation program for irfft2.asm IRF2TBL.EXE: Executable for above IRF4TBL.C: Table generation program for irfft4.asm IRF4TBL.EXE: Executable for above IRFFT2.ASM: Inverse real radix-2 FFT routine IRFFT4.ASM: Inverse real radix-4 FFT routine MAKESPLT.C: Source for a waveform gen. program that will split the even indexed data into one file and the odd indexed data into another. Used for rfft4.asm. MAKESPLT.EXE: Executable for above MAKEWAVE.C: Source for FFT test waveform generation program MAKEWAVE.EXE: Executable for above ODREAL.DAT: Real odd-indexed time domain input data PLOTREAL.M: PC-MATLAB script for plotting FFT results of rfft2.asm README: Read first RFFT2.ASM: Real radix-2 FFT RFFT2TBL.C: Table generation program for rfft2.asm RFFT2TBL.EXE: Executable for above RFFT4.ASM: Real radix-4 FFT RFFT4TBL.C: Table generation program for rfft4.asm RFFT4TBL.EXE: Executable for above TC2.DAT: Real twiddle factors for radix 2 routines TC4.DAT: Real twiddle factors for radix 4 routines THC.DAT: Half cosine table for conversion stage (FFT) THS.DAT: Half sine table for conversion stage (FFT) TNC.DAT: (1/N) cosine table for conversion stage (IFFT) TNS.DAT: (1/N) sine table for conversion stage (IFFT) TS2.DAT: Imaginary twiddle factors for radix 2 routines TS4.DAT: Imaginary twiddle factors for radix 4 routines |
|
| back to top | |
|
|
|
| FILTER.ZIP | |
The file FILTER.ZIP holds all the files required for an ADSP-21020 programming example. A complete description of two such examples is given in a section of the "ADSP-21020 User's Manual" called "Assembly Programmer's Tutorial". Refer to that for details. Both examples ("IIRMEM" and "IIRIRQ") filter data using infinite impulse response (IIR) filters. The examples consist of a main calling program and called subroutines. Technical information on the filters themselves is also presented in the user's manual. CASCADE.ASM: Cascaded biquad filter subroutine (called by main program) DEF21020.H: Bit position definitions for ADSP-21020 system registers FIR.ASM: FIR Subroutine FIRCOEFS.DAT: Coefficient file FIRTEST.ASM: Example calling routine GENERIC.ACH: Example architecture file IIRCOEFS.DAT: Filter coefficients IRIRQ.ACH: Architecture description file IIRIRQ.ASM: Main assembly program IIRMEM.ASM: Main assembly program INPUT.DAT: Example port emulation file... the input data MAKEFILE.FIR: Builds the example MAKEFILE.IRQ: "Make" file used to create the executable main program MAKEFILE.MEM: "Make" file used to create the executable main program OUT300.DAT: Example output port result data README.FIR: Readme file for the FIR filter routine README.IRQ: Readme file for the IIRIRQ filter routine README.MEM: Readme file for the IIRMEM filter routine |
|
| back to top | |
|
|
|
| FUNCTION.ZIP | |
The file FUNCTION.ZIP contains the following code and utilities to perform mathematical funtions (sin,cos,tan,exp,sqrt,divide etc..) on the ADSP-21020. 21K.ACH: Architecture file ACOMPRES.ASM: A-Law compression routine AEXPAND.ASM: A-Law expansion routine ASM_GLOB.H: Assembly library include file ATAN.ASM: Computes arctangent value of a floating point input DEF21020.H: Bit definitions DIVIDE.ASM: Floating point divide routine DIVSGL.ASM: Divide routine to single precision accuracy EXP.ASM: Exponential routine ISQRT.ASM: Inverse square root routine ISQRTSGL.ASM: Inverse square root to single precison accuracy LOGS.ASM: Logarithm routine MAKESIN.BAT: Builds the example code and calls up the simulator POW.ASM: Computes X raised to the Y power of 2 floating point inputs POW.H: Include file used by power routine README: Info file RECIP.ASM: Reciprocal of its floating point input SIN.ASM: Sine routine SINTEST.ASM: Example calling routine SQRT.ASM: Square root routine SQRTSGL.ASM: Square root to single precision accuracy TAN.ASM: Tangent routine UCOMPRES.ASM: Mu-Law compression routine UEXPAND.ASM: Mu-Law expansion routine |
|
| back to top | |
|
|
|
| GRAPHICS.ZIP | |
The file GRAPHICS.ZIP contains the following code and utilities to perform graphics funtions on the ADSP-21020. 21K.ACH: Architecture file ACCREJ.ASM: Graphics trivial line accept/reject ACCREJ.H: Include file for accrej.asm BEZIER.ASM: Cubic Bezier polynomial evaluation BITBLT.ASM: Bit block transfer BRESEN.ASM: Bresenham line drawing BSPLINE.ASM: Cubic bspline polynomial evaluation ILLUM3D.ASM: 3-D graphics illumination MUL44X41.ASM: Multiply 4x4 by 4x1 matrices POLYEVAL.ASM: N-order polynomial evaluation of two values README: Graphics & imaging benchmarks TBLLKUP.ASM: Table lookup with interpolation TRANSF.ASM: 3-D graphics translation, rotation and scaling XPROD.ASM: Vector cross product |
|
| back to top | |
|
|
|
| IMAGING.ZIP | |
The file IMAGING.ZIP contains the following sample imaging applications. Each application is a subroutine call whose arguments and return values are described in detail in the source file FILENAME.asm. CONV3X3.ASM: 3x3 Convolution on an NxN array HISTO.ASM: Histogram Evaluation MED3X3.ASM: Median Filtering (3x3) |
|
| back to top | |
|
|
|
| JTAG.ZIP | |
The file JTAG.ZIP contains the following programs that read spl21k stacked-format output files, and write Motorola Exorciser-format S-records for burning EPROMs for the EPROM-based 21020 JTAG Downloader Board. This board is described in an Analog Devices' DSP Division Application Note entitled "A JTAG Boot Downloader for the ADSP-21020". B2B.C: Reads bytes created by code2bytes.c C2B.C: Translates object code structure to EPROM bytes PUB21K.C: Reads spl21k stacked-format output files PUB21K.EXE: Executable file PUB21K.H: Include file for pub21k.c README: Info file S2C.C: Reads splitter stacked format file, creates code structure STOX.C: Converts hexadecimal string to integer |
|
| back to top | |
|
|
|
| LMS_RLS.ZIP | |
The file LMS_RLS.ZIP contains the following code and utilities for running and testing the Least Mean Squares (LMS) algorithm, its modified versions, and the Recursive Least Squares (RLS) algorithm. DESIRED.DAT: Desired data ERR.DAT: Data file ERR1.DAT: Data file ERR2.DAT: Data file ERR3.DAT: Data file ERR4.DAT: Data file ERR5.DAT: Data file ERR6.DAT: Data file ERR7.DAT: Data file ERR8.DAT: Data file GENERIC.ACH: Contains architecture description LATLMS.ASM: Performs the LMS algorithm realized with a lattice FIR filter structure with Joint Process Estimation LLMS.ASM: Performs the leaky LMS algorithm implemented with a transversal FIR filter structure LMS.ASM: Performs the LMS algorithm implemented with a transversal FIR filter structure MACROS.H: Contains different macros, especially the DIVIDE macro used in the RLS and the normalized LMS algorithms NLMS.ASM: Performs the normalized LMS algorithm implemented with a transversal FIR filter structure README.LMS: Read first RLS.ASM: Performs the RLS algorithm implemented with a transversal FIR filter structure SDLMS.ASM: Performs the sign-data LMS algorithm implemented with a transversal FIR filter structure SELMS.ASM: Performs the sign-error LMS algorithm implemented with a transversal FIR filter structure SSLMS.ASM: Performs the sign-sign LMS algorithm implemented with a transversal FIR filter structure SYLMS.ASM: Performs the LMS algorithm realized with a symmetric transversal FIR filter structure TESTAFA.ASM: Testing shell for the various adaptive algorithms |
|
| back to top | |
|
|
|
| MATRIX.ZIP | |
The file MATRIX.ZIP contains some example matrix multiply routines which operate on matrices of arbitrary dimension on the ADSP-21020. GENERIC.ACH: ADSP-21020 generic achitecure decription file MACROS.H: General purpose macros MATINV.ASM: Inverts a square matrix MAT_A.DAT: Example input data file for mxnxnxo.asm and mxnxnx1.asm MAT_A1.DAT: Example input data file MAT_B.DAT: Example input data file for mxnxnxo.asm MAT_BB.DAT: Example input data file for mxnxnx1.asm MXNXNX0.ASM: Matrix times a matrix source code MXNXNX1.ASM: Matrix times a vector source code README.MAT: Info file |
|
| back to top | |
|
|
|
| MULTRATE.ZIP | |
The file MULTRATE.ZIP contains the following code and utilities for running and testing multirate filters using the ADSP-21020. DEC2STG.EXE: Multirate time-based two-stage decimator DECIMATE.EXE: Multirate time-based decimator INTERPOL.EXE: Multirate time-based interpolator INTSTG.EXE: Multirate time-based 2-stage interpolator RATIOBUF.EXE: Multirate time-based rational rate changer RAT_2INT.EXE: Multirate interrupt-based rational rate changer Note: All of the files in this directory are self-extracting compressed files. |
|
| back to top | |
|
|
|
| RAD2FIR.ZIP | |
The file RAD2FIR.ZIP contains the following code and utilities for running and testing a radix-2 FIR filter on the ADSP-21020. COEFF.DAT: Coefficient file DEF21020.H: Definitions for bits in the ADSP-21020's system regs EZLAB21K.ACH: 21020 EZ-LAB board architecture file FCOEF.DAT: Filter coefficients GENERIC.ACH: Architecture file MKR2COEF.C: Converts direct form FIR coefficients into radix-2 FIR coefficients MKR2COEF.EXE: Executable for above R2FIR.ASM: ADSP-21020 radix-2 FIR filter R2FIREZ.ASM: ADSP-21020 radix-2 FIR filter EZ-LAB example README: Info file |
|
| back to top |
© 1995 - Analog Devices, Inc. All Rights Reserved