Motorola MSC8101 ADS User's Guide Page 192

  • Download
  • Add to my manuals
  • Print
  • Page
    / 346
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 191
9-16 MSC8101 User’s Guide
Enhanced Filter Coprocessor (EFCOP)
dosetup0 empty doen0 #NSAMP
loopstart0
empty move.w M_FSTR,d4
bmtstc #$0040,d4.l
jt empty ;Wait until out not empty
move.2l (r3),d2:d3
move.2l d2:d3,(r1)+ ;Read output
move.2l d0:d1,(r2)
move.2l (r0)+,d0:d1 ;Write input
loopend0
endempty
move.w M_FSTR,d4
bmtstc #$0040,d4.l
jt endempty ;Wait until out not empty
move.2l (r3),d2:d3
move.2l d2:d3,(r1) ;Read last output
Before this code can run, the SC140 core must initialize the coefficient buffer because
EFCOP coefficient initialization is disabled for this example. Example 9-2 shows an easy
way to do this. Here the coefficients are positioned, with org and dcl directives, at the
location of the FCM (which is memory location 0x79000 as described earlier). For each
complex coefficient, the real and imaginary parts are stored in memory separately with the
real part first. The coefficients are stored in reverse order so that the coefficient with the
largest index is stored first and the coefficient with the smallest index is stored last.
Example 9-2. Coefficient Initialization
org P:$00079000 ;Init coefficients
dcl [Re H(FCNT-1)]
dcl [Im H(FCNT-1)]
.
.
.
dcl [Im H(0)]
dcl [Im H(0)]
Code such as shown in Example 9-1 and Example 9-2 may not appear in an actual
application, but this code shows how the EFCOP works in a very simple way. The next
example shows a more sophisticated way to use the EFCOP.
9.6.2 Adaptive Filter With Interrupts
The code in Example 9-3 shows how to program the EFCOP to implement a real FIR
filter using interrupts as the transfer method. In Real mode, each filter operation begins by
writing one 32-bit data sample to the FDIR register using a move.l instruction. This code
Page view 191
1 2 ... 187 188 189 190 191 192 193 194 195 196 197 ... 345 346

Comments to this Manuals

No comments