?? firlpf200.s
字號:
; ..............................................................................
; File firLPF200.s
; ..............................................................................
.equ firLPF200NumTaps, 37
; ..............................................................................
; Allocate and initialize filter taps
.section .firLPF200const, "x"
.align 128
firLPF200Taps:
.hword 0xFE20, 0xFE4E, 0xFE9C, 0xFF09, 0xFF94, 0x003B, 0x00FA, 0x01CE, 0x02B0
.hword 0x0399, 0x0484, 0x0569, 0x0641, 0x0705, 0x07AF, 0x0839, 0x089F, 0x08DE
.hword 0x08F3, 0x08DE, 0x089F, 0x0839, 0x07AF, 0x0705, 0x0641, 0x0569, 0x0484
.hword 0x0399, 0x02B0, 0x01CE, 0x00FA, 0x003B, 0xFF94, 0xFF09, 0xFE9C, 0xFE4E
.hword 0xFE20
; ..............................................................................
; Allocate delay line in (uninitialized) Y data space
.section .ybss, "b"
.align 128
firLPF200Delay:
.space firLPF200NumTaps*2
; ..............................................................................
; Allocate and intialize filter structure
.section .data
.global _firLPF200Filter
_firLPF200Filter:
.hword firLPF200NumTaps
.hword psvoffset(firLPF200Taps)
.hword psvoffset(firLPF200Taps)+firLPF200NumTaps*2-1
.hword psvpage(firLPF200Taps)
.hword firLPF200Delay
.hword firLPF200Delay+firLPF200NumTaps*2-1
.hword firLPF200Delay
; ..............................................................................
; ..............................................................................
; Sample assembly language calling program
; The following declarations can be cut and pasted as needed into a program
; .extern _FIRFilterInit
; .extern _BlockFIRFilter
; .extern _firLPF200Filter
;
; .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 #_firLPF200Filter, 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 #_firLPF200Filter, 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 + -