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

📄 example 5-11.asm

📁 基于DSP开发平台《TI DSP在音频处理中的应用》程序代码
💻 ASM
字号:

; Example 5 - 11. FIR Filter Implementation ASM Listing for the TMS320C3x DSP

	LDI	@ADDXN, AR1				; AR1points to x[n-L+1]
	LDI	@ADDBI, AR0				; AR0 points to b[L-1]
	LDI	L, BK						; circular buffer size=L
	LDI	L-2	, RC					; L-2→repeat counter
	LDF	@XN	, R2					; x[n]→R2
	STF	R2, AR1++(1)%				; store x[n] in buffer and
									; update pointer AR1
	STL	AR1, @ADDXN				; save new address of x[n-L+1]
	CALL	FIR_filter				; call FIR_filter routine to compute y[n]

FIR_filter:
	MPYF3	*AR0++(1)%, *AR1++(1)%, R1		; b[0]*x[0]
	NOP
	LDF	0.0, R2
	RPTS	RC					; repeat next parallel instructions L-1 times
	MOY3	*AR0++(1)%, *AR1++(1)%, R1		; b[i]*x[n-i]
||	ADDF3	R1, R2, R2					; sum of products b[i]*x[n-i]
	ADDF3	R1, R2, R2					; sum the last product
	RETS

⌨️ 快捷键说明

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