📄 firlpf1500.s
字号:
; ..............................................................................
; File firLPF1500.s
; ..............................................................................
.equ firLPF1500NumTaps, 61
; ..............................................................................
; Allocate and initialize filter taps
.section .firLPF1500const, "x"
.align 128
firLPF1500Taps:
.hword 0x0024, 0x0014, 0xFFD4, 0xFFC6, 0x001E, 0x0069, 0x0014, 0xFF7A, 0xFF96
.hword 0x0079, 0x00D5, 0xFFDD, 0xFED4, 0xFF83, 0x013F, 0x015A, 0xFF2C, 0xFDC7
.hword 0xFFCD, 0x02C6, 0x01DE, 0xFD6E, 0xFBFF, 0x0122, 0x0651, 0x023F, 0xF79D
.hword 0xF66C, 0x09D5, 0x2726, 0x3553, 0x2726, 0x09D5, 0xF66C, 0xF79D, 0x023F
.hword 0x0651, 0x0122, 0xFBFF, 0xFD6E, 0x01DE, 0x02C6, 0xFFCD, 0xFDC7, 0xFF2C
.hword 0x015A, 0x013F, 0xFF83, 0xFED4, 0xFFDD, 0x00D5, 0x0079, 0xFF96, 0xFF7A
.hword 0x0014, 0x0069, 0x001E, 0xFFC6, 0xFFD4, 0x0014, 0x0024
; ..............................................................................
; Allocate delay line in (uninitialized) Y data space
.section .ybss, "b"
.align 128
firLPF1500Delay:
.space firLPF1500NumTaps*2
; ..............................................................................
; Allocate and intialize filter structure
.section .data
.global _firLPF1500Filter
_firLPF1500Filter:
.hword firLPF1500NumTaps
.hword psvoffset(firLPF1500Taps)
.hword psvoffset(firLPF1500Taps)+firLPF1500NumTaps*2-1
.hword psvpage(firLPF1500Taps)
.hword firLPF1500Delay
.hword firLPF1500Delay+firLPF1500NumTaps*2-1
.hword firLPF1500Delay
; ..............................................................................
; ..............................................................................
; Sample assembly language calling program
; The following declarations can be cut and pasted as needed into a program
; .extern _FIRFilterInit
; .extern _BlockFIRFilter
; .extern _firLPF1500Filter
;
; .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 #_firLPF1500Filter, 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 #_firLPF1500Filter, 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 + -