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

📄 amf_delayallpassoffchip1s_render.asm

📁 ADI SHARC DSP 音频算法标准模块库
💻 ASM
字号:

// Copyright(c) 2005 Analog Devices, Inc. All Rights Reserved. ADI Confidential.

//    Module Name     : AMF_DelayAllpassOffChip1s_Render.asm 
//    DSP Processor   : ADSP21367,368,369 (LX3)
//    Description     : Delay-based Allpass, off chip, audio module ASM file.
//    Owner           : Analog Devices
//    Original Author : Tim Stilson	
//    Date 			  : 10/4/05
//    Revision        : Min Guo
//                    : 01/11/06   Change from 4-coefficient to 1-coefficient topology
//====================================================================================
// Processor resources used:
//  words pmem INTERNAL
//  cycles (off-chip delay buf, 21369 (TickSize=64) ( + *tickSize)
// (SIMD used)
//====================================================================================

//====================================================================================
// This version does everything in a single loop, and thus can get down to a 
//   single sample of delay in the allpass.  This will break synchronous transfers
//   to/from external memory, however, and so the transfers will take more cycles.
//====================================================================================

#if 1

#include "processor.h"
#include "asm_sprt.h"

#include "AudioProcessing.h"
.import "AMF_DelayAllpassOffChip1s.h";

// global routines
.global	_AMF_DelayAllpassOffChip1s_Render;			;

.segment /pm SEG_MOD_FAST_CODE;

_AMF_DelayAllpassOffChip1s_Render:
    
 // push context on stack
    r0=i2; puts=r0;
    r0=i0; puts=r0;
    puts=r3;

	i4=r8;					// i4->*buffers
	
 // initialize input and output samples pointers
	s9=dm(0,i4);			// buffers[0], input
	s10=dm(1,i4);			// buffers[1], output

	i4=r4;					//i4->testModuleInstance[0]
	   
 // initialize delay buffer pointer
	l12=dm(OFFSETOF(AMF_DelayAllpassOffChip1s,delay),i4);           		// length of delay buffer in samples
	l13=l12;
	f2=dm(OFFSETOF(AMF_DelayAllpassOffChip1s,coef),i4);                     // coef
	b12=dm(OFFSETOF(AMF_DelayAllpassOffChip1s,delayBuffer),i4);              // buffer base
	b13=b12;
	i12=dm(OFFSETOF(AMF_DelayAllpassOffChip1s,delayWritePtr),i4); 	        // current delay pointer
	i13=i12;   // i13 is used to load, while i12 is used to store

    i0 = s9;  // in[]
    i2 = s10; // out[]

    // process delay line
        f0 = dm(i0,m6);     // f0 = in[]        
        f8 = f0*f2, f1 = pm(i13,m14);         // f8 = coef*in[], f1 = tmpbuf[]
        f8 = f1+f8;         // f8 = tmp = tmpbuf[]+coef*in[]   
    lcntr=r12, do AMF_DelayAllpassOffChip1s_Loop until lce;
        f1 = f2*f8, dm(i2,m6) = f8;     // store tmp to out[];       // f1 = coef*tmp
        f3 = f0-f1, f0 = dm(i0,m6);         // f3 = in[] - coef*tmp, f0 = in[] 
        f8 = f0*f2, f1 = pm(i13,m14);         // f8 = coef*in[], f1 = tmpbuf[]
AMF_DelayAllpassOffChip1s_Loop:
        f8 = f1+f8, pm(i12,m14) = f3;     // store f3 to tmpbuf[];     // f8 = tmp = tmpbuf[]+coef*in[]   
    
	r0=i12;
	dm(OFFSETOF(AMF_DelayAllpassOffChip1s,delayWritePtr),i4)=r0; 	        // store away current delay pointer

	l12 = 0;
	l13 = 0;

 // pop context off stack
    r3=gets(1);
    i0=gets(2);
    i2=gets(3);
    alter(3);

//------------------------------------------------------------------------------------
_AMF_DelayAllpassOffChip1s_Render.END:
	leaf_exit; // C-rth requires this instead of rts
//------------------------------------------------------------------------------------
    
.endseg;
#endif

⌨️ 快捷键说明

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