📄 firlpf3000.s
字号:
; ..............................................................................
; File firLPF3000.s
; ..............................................................................
.equ firLPF3000NumTaps, 61
; ..............................................................................
; Allocate and initialize filter taps
.section .firLPF3000const, "x"
.align 128
firLPF3000Taps:
.hword 0xFFED, 0xFFFE, 0x0026, 0xFFBA, 0x0050, 0xFFCF, 0xFFED, 0x006A, 0xFF56
.hword 0x00AC, 0xFFA9, 0xFFBE, 0x00EE, 0xFEA7, 0x013F, 0xFF7F, 0xFF51, 0x01E7
.hword 0xFD71, 0x0231, 0xFF59, 0xFE51, 0x0401, 0xFACD, 0x0449, 0xFF3F, 0xFADE
.hword 0x0C5D, 0xECA9, 0x1865, 0x64F8, 0x1865, 0xECA9, 0x0C5D, 0xFADE, 0xFF3F
.hword 0x0449, 0xFACD, 0x0401, 0xFE51, 0xFF59, 0x0231, 0xFD71, 0x01E7, 0xFF51
.hword 0xFF7F, 0x013F, 0xFEA7, 0x00EE, 0xFFBE, 0xFFA9, 0x00AC, 0xFF56, 0x006A
.hword 0xFFED, 0xFFCF, 0x0050, 0xFFBA, 0x0026, 0xFFFE, 0xFFED
; ..............................................................................
; Allocate delay line in (uninitialized) Y data space
.section .ybss, "b"
.align 128
firLPF3000Delay:
.space firLPF3000NumTaps*2
; ..............................................................................
; Allocate and intialize filter structure
.section .data
.global _firLPF3000Filter
_firLPF3000Filter:
.hword firLPF3000NumTaps
.hword psvoffset(firLPF3000Taps)
.hword psvoffset(firLPF3000Taps)+firLPF3000NumTaps*2-1
.hword psvpage(firLPF3000Taps)
.hword firLPF3000Delay
.hword firLPF3000Delay+firLPF3000NumTaps*2-1
.hword firLPF3000Delay
; ..............................................................................
; ..............................................................................
; Sample assembly language calling program
; The following declarations can be cut and pasted as needed into a program
; .extern _FIRFilterInit
; .extern _BlockFIRFilter
; .extern _firLPF3000Filter
;
; .section .bss
;
; The input and output buffers can be made any desired size
; the value 40 is just an example - however, one must ensure
; that the output buffer is at least as long as the number of samples
; to be filtered (parameter 4)
;input: .space 40
;output: .space 40
; .text
;
;
; This code can be copied and pasted as needed into a program
;
;
; Set up pointers to access input samples, filter taps, delay line and
; output samples.
; mov #_firLPF3000Filter, W0 ; Initalize W0 to filter structure
; call _FIRFilterInit ; call this function once
;
; The next 4 instructions are required prior to each subroutine call
; to _BlockFIRFilter
; mov #_firLPF3000Filter, W0 ; Initalize W0 to filter structure
; mov #input, W1 ; Initalize W1 to input buffer
; mov #output, W2 ; Initalize W2 to output buffer
; mov #20, W3 ; Initialize W3 with number of required output samples
; call _BlockFIRFilter ; call as many times as needed
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -