An 0487
An 0487
An 0487
National Semiconductor
A Radix 2 FFT Program Application Note 487
for the HPC Ashok Krishnamurthy
April 1987
# J &
1
x(n) e X(k) Wbnk n e 0, 1, . . , Nb1.
& &
N
X(k) e x(n) Wnk a x(n) Wnk ke0
n even n odd
Thus the Inverse FFT is the same as the forward FFT ex-
Using n e 2r for n even and n e 2r a 1 for n odd, we can
cept for the following: 1. Negative powers of W are used
further rewrite the above as:
instead of positive powers; and 2. The final sequence is
N/2 b 1 N/2 b 1
scaled by 1/N. The basic FFT program can therefore be
X(k) e
&
re0
x(2r) W2rk a Wk
&
re0
x(2r a 1) W2rk used to compute the inverse FFT with these two changes.
This is the approach used in the HPC implementation.
If G(k) is the N/2 point DFT of x(2r) and H(k) is the N/2 TWIDDLE FACTOR TABLE
point DFT of x(2r a 1), the above equation can be written as: The brief description of the FFT in the previous section
X(k) e G(k) a Wk H(k) shows that the algorithm needs to use the Twiddle Factors
This equation shows that a N point DFT can be written as Wk in the computation. The twiddle factors can either be
the sum of two N/2 point DFTs. The N/2 point DFTs can be computed as required, they can be computed using a recur-
computed as the sum two N/4 point DFTs and so on until sive relation, or they can be obtained by looking up in a
we are left with two point DFTs. The two point DFTs can be table (Ref. 2). The approach used in the HPC implementa-
trivially evaluated by direct computation. tion is to construct a table containing the needed twiddle
Figure 1 , taken from reference 1, shows the decomposition factors. This table is stored in ROM and values needed are
for the case N e 8. With reference to this figure, we can looked up from this table. The length of the table needed is
note the following points. determined by the maximum FFT length that you want to
use. The HPC FFT implementation is presently limited to a
1. If N is the number of points in the original sequence, maximum length of 256. This requires that the twiddle fac-
where N e 2L, then there are L stages in the DFT de- tors W0, W1, . . . W255 be available, where
composition.
AN-487
2
TL/DD/9259 – 1
FIGURE 1. FFT Flow Graph for N e 8 Points
REFERENCES
1. A.V. Oppenheim and R.W. Schafer, Digital Signal Pro-
cessing , Prentice-Hall, New Jersey, 1975.
2. L.R. Rabiner and B. Gold, Theory and Applications of Dig-
ital Signal Processing , Prentice-Hall, New Jersey, 1975.
TL/DD/9259 – 2 3. IEEE ASSP Society Digital Signal Processing Committee,
FIGURE 2. The ButterflyÐThe Basic Programs for Digital Signal Processing , IEEE Press, New
Computation Unit in the FFT York, 1979.
3
APPENDIX A
Listing of FFT Program Code
NATIONAL SEMICONDUCTOR CORPORATION PAGE: 1
HPC CROSS ASSEMBLER,REV:C,30 JUL 86
1 ;
2 ; THIS PROGRAM IMPLEMENTS A RADIX-2, DECIMATION IN TIME FFT ALGORITHM.
3 ;
4 ;
5 0008 LMAX 4 08 ; MAXIMUM FFT LENGTH IS 2>LMAX.
6 ;
7 F000 TWSTAD 4 0F000 ; TWIDDLE FACTOR TABLE START
8 ; ADDRESS.
9 0200 DTSTAD 4 0200 ; DATA STORAGE AREA START
10 ; ADDRESS.
11 ;
12 01C0 NUMB 4 W(01C0) ; NUMBER OF DATA POINTS TO BE
13 ; TRANSFORMED.
14 01C2 L1 4 W(01C2) ; NUMB IS 2>L1.
15 01C4 LSHIFT 4 W(01C4) ; LSHIFT 4 LMAX 1 L1. IT IS A SHIFT
16 ; FACTOR NEEDED TO COMPUTE THE
17 ; ADDRESS REQUIRED FOR TWIDDLE
18 ; FACTOR LOCKUP.
19 01C6 NBFLY 4 W(01C6) ; NUMBER OF BUTTERFLIES PER
20 ; TWIDDLE FACTOR PER STAGE.
21 01C8 ISTEP 4 W(01C8) ; IF X(1) AND X(J) ARE INVOLVED
22 ; IN A BUTTERFLY, THEN J4I0ISTEP.
23 ; IT IS ALSO THE NUMBER OF TWIDDLE
24 ; FACTORS IN A STAGE.
25 01CA ILEAP 4 W(01CA) ; IF X(I) IS THE FIRST DATA VALUE
26 ; FOR THE FIRST BUTTERFLY FOR A
27 ; GIVEN TWIDDLE FACTOR, THEN THE
28 ; SUBSEQUENT BUTTERFLIES FOR THAT
29 ; TWIDDLE FACTOR HAVE AS THE FIRST
30 ; DATA VALUE X(I0N*ILEAP).
31 01CC WESTEP 4 W(01CC) ; TWIDDLE FACTOR EXPONENT STEP.
32 ; THE TWIDDLE FACTORS FOR A GIVEN
33 ; STAGE ARE W>(I*WESTEP).
34 01CE NSTG 4 W(01CE) ; FFT STAGE BEING EVALUATED.
35 ;
36 01D0 ISTART 4 W(01D0) ; INDEX OF THE FIRST DATA VALUE
37 ; FOR THE FIRST BUTTERFLY FOR A
38 ; GIVEN TWIDDLE FACTOR.
39 01D2 WEXP 4 W(01D2) ; EXPONENT VALUE FOR A GIVEN
40 ; TWIDDLE FACTOR.
41 01D4 NTWD 4 W(01D4) ; TWIDDLE FACTOR BEING EVALUATED.
42 ;
43 01D6 COSTH 4 W(01D6) ; COSINE PART OF TWIDDLE FACTOR.
44 ;
45 01D8 SINTH 4 W(01D8) ; SINE PART OF TWIDDLE FACTOR.
46 ;
47 01DA M1 4 W(01DA) ; INDEX OF FIRST DATA VALUE FOR
48 ; A BUTTERFLY.
49 01DC NBCNT 4 W(01DC) ; BUTTERFLY BEING EVALUATED.
50 ;
51 01DE R1ADDR 4 W(01DE) ; ADDRESS OF REAL PART OF FIRST
4
NATIONAL SEMICONDUCTOR CORPORATION PAGE: 2
HPC CROSS ASSEMBLER,REV:C,30 JUL 86
5
NATIONAL SEMICONDUCTOR CORPORATION PAGE: 3
HPC CROSS ASSEMBLER,REV:C,30 JUL 86
6
NATIONAL SEMICONDUCTOR CORPORATION PAGE: 4
HPC CROSS ASSEMBLER,REV:C,30 JUL 86
154 ;
155 ; 2. RABINER AND GOLD, THEORY AND APPLICATIONS OF DIGITAL SIGNAL
156 ; PROCESSING, PRENTICE-HALL, 1975.
157 ;
158 ; THE ALGORITHM USED CLOSELY FOLLOWS THE FORTRAN PROGRAM FOREA IN
159 ;
160 ; 3. PROGRAMS FOR DIGITAL SIGNAL PROCESSING, IEEE.
161 ;
162 ;
163 FFT:
164 ;
165 ; FIRST PUT THE DATA IN BIT REVERSED ORDER.
166 ;
167 F459 00 CLR A
168 F45A ABCC ST A, B ; SET UP N0RMAL COUNTER.
169 F45C ABCE ST A, X ; SET UP BIT REVERSED COUNTER.
170 F45E A401C0CAAB LD K, NUMB ; K HAS NUMBER OF DATA POINTS.
171 REVLP:
172 F463 A0CCCEFD IFGT X, B ; IS BIT REV CNTR x NORM CNTR ?
173 F467 42 JP SWAP ; YES, SO SWAP DATA.
174 F468 9421 JMP COUNT ; NO SO INCREMENT COUNT.
175 SWAP:
176 F46A AFCC PUSH B
177 F46C AFCE PUSH X
178 F46E A8CC LD A, B ; INDEX VALUE I IS IN A.
179 F470 E7 SHL A
180 F471 E7 SHL A
181 F472 B80200 ADD A, DTSTAD ; GET ADDR. OF XR(I).
182 F475 ABCC ST A, B ; SAVE IT IN B.
183 F477 A8CE LD A, X ; INDEX VALUE J IS IN A.
184 F479 E7 SHL A
185 F47A E7 SHL A
186 F47B B80200 ADD A, DISTAD ; GET ADDR. OF XR(J).
187 F47E ABCE ST A, X ; SAVE IT IN X.
188 F480 E4 LD A, W(B) ; A w XR(I).
189 F481 F1 X A, W(X0) ; A w XR(J), XR(J) w XR(I).
190 F482 E1 XS A, W(B0) ; A w XR(I), XR(I) w XR(J).
191 F483 40 NOP
192 F484 E4 LD A, W(B) ; A w XI(I).
193 F485 F5 X A, W(X) ; A w XI(J), XI(J) w XI(I).
194 F486 E6 ST A, W(B) ; XI(I) w XI(J).
195 F487 3FCE POP X
196 F489 3FCC POP B
197 ;
198 COUNT:
199 ;
200 F48B AACA DECSZ K ; DONE ?
201 F48D 41 JP UPIT ; NO GO DO SOME MORE.
202 F48E 46 JP DOFFT
203 UPIT:
204 F48F 347A JSR BRCNTR ; COUNT UP ON BIT REV CNTR.
7
NATIONAL SEMICONDUCTOR CORPORATION PAGE: 5
HPC CROSS ASSEMBLER,REV:C,30 JUL 86
8
NATIONAL SEMICONDUCTOR CORPORATION PAGE: 6
HPC CROSS ASSEMBLER,REV:C,30 JUL 86
9
NATIONAL SEMICONDUCTOR CORPORATION PAGE: 7
HPC CROSS ASSEMBLER,REV:C,30 JUL 86
307 ;
308 F56A A401DECEAB LD X, R1ADDR ; X w ADDR(XR(I)).
309 F56F A401E0CCAB LD B, R2ADDR ; B w ADDR(XR(J)).
310 F574 F0 LD A, W(X0) ; A w XR(I).
311 F575 02 SET C
312 F576 B601EAEB SUBC A, TEMPR ; A w XR(I) 1 TEMPR.
313 F57A E1 XS A, W(B0)
314 F57B 40 NOP
315 F57C F2 LD A, W(X1) ; A w XI(I).
316 F57D 02 SET C
317 F57E B601ECEB SUBC A, TEMPI ; A w XI(J) 1 TEMPI.
318 F582 E6 ST A, W(B)
319 F583 F4 LD A, W(X) ; A w XR(I).
320 F584 B601EAF8 ADD A, TEMPR ; A w XR(I) 0 TEMPR.
321 F588 F1 X A, W(X0)
322 F589 F4 LD A, W(X) ; A w XI(I).
323 F58A B601ECF8 ADD A, TEMPI ; A w XI(I) 0 TEMPI.
324 F58E F6 ST A, W(X)
325 ;
326 F58F A501CA01DAF8 ADD M1, ILEAP ; UPDATE M1 FOR NEXT LOOP.
327 ;
328 F595 B601DCAA DECSZ NBCNT ; DONE WITH ALL BUTTERFLIES
329 ; FOR THIS TWIDDLE FACTOR ?
330 F599 959D JMP LOOP3 ; NO, SO GO DO SOME MORE.
331 ;
332 ;
333 F59B B601D0A9 INC ISTART ; SET UP STARTING INDEX FOR
334 ; NEXT TWIDDLE FACTOR.
335 F59F A501CC01D2F8 ADD WEXP, WESTEP ; UPDATE TWIDDLE FACTOR
336 ; EXPONENT VALUE.
337 ;
338 F5A5 B601D4AA DECSZ NTWD ; DONE WITH ALL TWIDDLES
339 ; FOR THIS STAGE ?
340 F5A9 95D7 JMP LOOP2 ; NO, SO GO DO SOME MORE.
341 ;
342 ;
343 F5AB B601CAA8 LD A, ILEAP
344 F5AF E7 SHL A
345 F5B0 B601CAAB ST A, ILEAP ; UPDATE ILEAP FOR NEXT STAGE.
346 F5B4 B601C8A8 LD A, ISTEP
347 F5B8 E7 SHL A
348 F5B9 B601C8AB ST A, ISTEP ; UPDATE ISTEP FOR NEXT STAGE.
349 F58D B601C6A8 LD A, NBFLY
350 F5C1 C7 SHR A
351 F5C2 B601C6AB ST A, NBFLY ; UPDATE NBFLY FOR NEXT STAGE.
352 F5C6 B601CCA8 LD A, WESTEP
353 F5CA C7 SHR A
354 F5CB B601CCAB ST A, WESTEP ; UPDATE WESTEP FOR NEXT STAGE.
355 ;
356 F5CF B601CEAA DECSZ NSTG ; DONE WITH ALL STAGES ?
357 F5D3 B4FEEB a JMP LOOP1 ; NO SO GO DO SOME MORE.
10
NATIONAL SEMICONDUCTOR CORPORATION PAGE: 8
HPC CROSS ASSEMBLER,REV:C,30 JUL 86
358 ;
359 F5D6 3C RET ; ALL OVER.
360 ;
361 ; THE CODE BELOW IS FOR THE INVERSE FFT. THE ONLY DIFFERENCE IS THAT
362 ; THE TWIDDLE FACTORS ARE USED A LITTLE DIFFERENTLY, AND A FINAL SCALING BY
363 ; 1/NUMB IS DONE.
364 IFFT:
365 ;
366 ; FIRST PUT THE DATA IN BIT REVERSED ORDER.
367 ;
368 F5D7 00 CLR A
369 F5D8 ABCC ST A, B ; SET UP NORMAL COUNTER.
370 F5DA ABCE ST A, X ; SET UP BIT REVERSED COUNTER.
371 F5DC A401C0CAAB LD K, NUMB ; K HAS NUMBER OF DATA POINTS.
372 IREVLP:
373 F5E1 A0CCCEFD IFGT X, B ; IS BIT REV CNTR x NORM CNTR ?
374 F5E5 42 JP ISWAP ; YES, SO SWAP DATA.
375 F5E6 9421 JMP ICOUNT ; NO SO INCREMENT COUNT.
376 ISWAP:
377 F5E8 AFCC PUSH B
378 F5EA AFCE PUSH X
379 F5EC A8CC LD A, B ; INDEX VALUE I IS IN A.
380 F5EE E7 SHL A
381 F5EF E7 SHL A
382 F5F0 B80200 ADD A, DTSTAD ; GET ADDR. OF XR(I).
383 F5F3 ABCC ST A, B ; SAVE IT IN B.
384 F5F5 A8CE LD A, X ; INDEX VALUE J IS IN A.
385 F5F7 E7 SHL A
386 F5F8 E7 SHL A
387 F5F9 B80200 ADD A, DTSTAD ; GET ADDR. OF XR(J).
388 F5FC ABCE ST A, X ; SAVE IT IN X.
389 F5FE E4 LD A, W(B) ; A w XR(I).
390 F5FF F1 X A, W(X0) ; A w XR(J), XR(J) w XR(I).
391 F600 E1 XS A, W(B0) ; A w XR(I), XR(I) w XR(J).
392 F601 40 NOP
393 F602 E4 LD A, W(B) ; A w XI(I).
394 F603 F5 X A, W(X) ; A w XI(J), XI(J) w XI(I).
395 F604 E6 ST A, W(B) ; XI(I) w XI(J).
396 F605 3FCE POP X
397 F607 3FCC POP B
398 ;
399 ICOUNT:
400 ;
401 F609 AACA DECSZ K ; DONE ?
402 F60B 41 JP IUPIT ; NO GO DO SOME MORE.
403 F60C 46 JP DOIFFT
404 IUPIT:
405 F60D 35F8 JSR BRCNTR ; COUNT UP ON BIT REV CNTR.
406 F60F A9CC INC B ; COUNT UP ON NORMAL CNTR.
407 F611 9530 JMP IREVLP
408 DOIFFT:
11
NATIONAL SEMICONDUCTOR CORPORATION PAGE: 9
HPC CROSS ASSEMBLER,REV:C,30 JUL 86
409 ;
410 ; DATA IS NOW STORED IN THE BIT REVERSED ORDER. COMPUTE THE FFT.
411 ;
412 F613 9008 LD A, LMAX ; A HAS MAX FFT EXPONENT.
413 F615 04 INC A
414 F616 04 INC A
415 F617 02 SET C
416 F618 B601C2EB SUBC A, L1 ; COMPUTE LSHIFT.
417 F61C B601C4AB ST A, LSHIFT
418 F620 B601C0A8 LD A, NUMB
419 F624 C7 SHR A
420 F625 B601C6AB ST A, NBFLY ; INITIALIZE NBFLY.
421 F629 B601CCAB ST A, WESTEP ; INITIALIZE WESTEP.
422 F62D 830101C8AB LD ISTEP, 01 ; INITIALIZE ISTEP.
423 F632 830201CAAB LD ILEAP, 02 ; INITIALIZE ILEAP.
424 ;
425 ; SET UP L1 STAGES OF BUTTERFLIES.
426 ;
427 F637 B601C2AB LD A, L1
428 F63B B601CEAB ST A, NSTG ; LOOP L1 TIMES.
429 ILOOP1:
430 ;
431 F63F 00 CLR A
432 F640 B601D0AB ST A, ISTART ; INITIALIZE ISTART FOR EACH STAGE.
433 F644 B601D2AB ST A, WEXP ; INITIALIZE WEXP.
434 ;
435 ; SET UP ISTEP LOOPS OF TWIDDLE FACTORS.
436 ;
437 F648 B601C8A8 LD A, ISTEP
438 F64C B601D4AB ST A, NTWD ; LOOP ISTEP TIMES.
439 ILOOP2:
440 ;
441 ; LOOK UP THE TWIDDLE FACTOR.
442 ;
443 F650 A401C4CAAB LD K, LSHIFT ; SHIFT LEFT LSHIFT TIMES.
444 F655 B601D2AB LD A, WEXP
445 IGADLP:
446 F659 E7 SHL A
447 F65A AACA DECSZ K ; DONE SHIFTING ?
448 F65C 63 JP IGADLP ; NO DO SOME MORE.
449 F65D B8F000 ADD A, TWSTAD ; ADD STARTING ADDR OF TWIDDLE
450 ; FACTOR TABLE.
451 F660 ABCE ST A, X ; TWIDDLE FACTOR ADDR IN X.
452 F662 F0 LD A, W(X0) ; GET COS(THETA).
453 F663 B601D6AB ST A, COSTH
454 F667 F4 LD A, W(X) ; GET SIN(THETA).
455 F668 B601D8AB ST A, SINTH
456 ;
457 F66C A501D001DAAB LD M1, ISTART ; INITIALIZE M1.
458 ;
459 ; SET UP NBFLY BUTTERFLIES FOR THIS TWIDDLE FACTOR.
12
NATIONAL SEMICONDUCTOR CORPORATION PAGE: 10
HPC CROSS ASSEMBLER,REV:C,30 JUL 86
460 ;
461 F672 A501C601DCAB LD NBCNT, NBFLY ; LOOP NBFLY TIMES.
462 ILOOP3:
463 F678 B601DAA8 LD A, M1 ; GET INDEX OF X(I).
464 F67C E7 SHL A
465 F67D E7 SHL A
466 F67E B80200 ADD A, DTSTAD ; ADDR. 0D XR(I).
467 F681 B601DEA8 ST A, R1ADDR
468 F685 ABCE ST A, X
469 F687 F0 LD A, W(X0) ; A w XR(I).
470 F688 B601E2AB ST A, XR1 ; STORE IN XR1.
471 F68C F4 LD A, W(X) ; A w XI(I).
472 F68D B601E4AB ST A, XI1 ; STORE IN XI1.
473 F691 B601DAA8 LD A, M1
474 F695 B601C8F8 ADD A, ISTEP ; GET INDEX OF X(J).
475 F699 E7 SHL A
476 F69A E7 SHL A
477 F69B B80200 ADD A, DTSTAD ; ADDR. OF XR(J).
478 F69E B601E0AB ST A, R2ADDR
479 F6A2 ABCE ST A, X
480 F6A4 F0 LD A, W(X0) ; A w XR(J).
481 F6A5 B601E6AB ST A, XR2 ; STORE IN XR2.
482 F6A9 F4 LD A, W(X) ; A w XI(J).
483 F6AA B601E8AB ST A, XI2 ; STORE IN XI2.
484 ;
485 F6A8 B201E6 LD B, #XR2 ; B w ADDR(XR2).
486 F6B1 B601D6A8 LD A, COSTH ; A w COS(THETA).
487 F6B5 368B JSR SMULT ; COMPUTE XR(J)*COS(THETA).
488 F6B7 B601EAAB ST A, TEMPR ; SAVE IN TEMPR.
489 F6BB B601D8A8 LD A, SINTH ; A w SIN(THETA).
490 F6BF 3695 JSR SMULT ; COMPUTE XR(J)*SIN(THETA).
491 F6C1 B601ECAB ST A, TEMPI ; SAVE IN TEMPI.
492 F6C5 B201E8 LD B, #XI2 ; B w ADDR(XI2).
493 F6C8 B601D8A8 LD A, SINTH ; A w SIN(THETA).
494 F6CC 36A2 JSR SMULT ; COMPUTE XI(J)*SIN(THETA).
495 F6CE 01 COMP A
496 F6CF 04 INC A
497 F6D0 B601EAF8 ADD A, TEMPR ; COMPUTE XR(J)*COS(THETA) 1
498 ; XI(J)*SIN(THETA).
499 F6D4 B601EAAB ST A, TEMPR
500 F6D8 B601D6A8 LD A, COSTH ; A w COS(THETA).
501 F6DC 36B2 JSR SMULT ; COMPUTE XI(J)*COS(THETA).
502 F6DE B601ECF8 ADD A, TEMPI ; COMPUTE XR(J)*SIN(THETA) 0
503 ; XI(J)*COS(THETA).
504 F6E2 B601ECAB ST A, TEMPI
505 ;
506 ;
507 F6E6 A401DECEAB LD X, R1ADDR ; X w ADDR(XR(I)).
508 F6EB A401E0CCAB LD B, R2ADDR ; B w ADDR(XR(J)).
509 F6F0 F0 LD A, W(X0) ; A w XR(I).
510 F6F1 02 SET C
13
NATIONAL SEMICONDUCTOR CORPORATION PAGE: 11
HPC CROSS ASSEMBLER,REV:C,30 JUL 86
14
NATIONAL SEMICONDUCTOR CORPORATION PAGE: 12
HPC CROSS ASSEMBLER,REV:C,30 JUL 86
SYMBOL TABLE
15
NATIONAL SEMICONDUCTOR CORPORATION PAGE: 14
HPC CROSS ASSEMBLER,REV:C,30 JUL 86
MACRO TABLE
NO WARNING LINES
NO ERROR LINES
16
APPENDIX B
Twiddle Factor Table
; .WORD 6639, 14978
; TWIDDLE FACTOR TABLE FOR USE IN THE FFT ROUTINES. .WORD 6270, 15137
; .WORD 5897, 15286
; TABLE SET FOR MAX FFT LENGTH OF 256. .WORD 5520, 15426
; .WORD 5139, 15557
; TABLE STARTS AT F000 AND OCCUPIES 1024 BYTES OF STORAGE. .WORD 4756, 15679
; .WORD 4370, 15791
. 4 0F000 .WORD 3981, 15893
.WORD 16384, 0 .WORD 3590, 15986
.WORD 16379, 402 .WORD 3196, 16069
.WORD 16364, 804 .WORD 2801, 16143
.WORD 16340, 1205 .WORD 2404, 16207
.WORD 16305, 1606 .WORD 2006, 16261
.WORD 16261, 2006 .WORD 1606, 16305
.WORD 16207, 2404 .WORD 1205, 16340
.WORD 16143, 2801 .WORD 804, 16364
.WORD 16069, 3196 .WORD 402, 16379
.WORD 15986, 3590 .WORD 0, 16384
.WORD 15893, 3981 .WORD 1402, 16379
.WORD 15791, 4370 .WORD 1804, 16364
.WORD 15679, 4756 .WORD 11205, 16340
.WORD 15557, 5139 .WORD 11606, 16305
.WORD 15426, 5520 .WORD 12006, 16261
.WORD 15286, 5897 .WORD 12404, 16207
.WORD 15137, 6270 .WORD 12801, 16143
.WORD 14978, 6639 .WORD 13196, 16069
.WORD 14811, 7005 .WORD 13590, 15986
.WORD 14635, 7366 .WORD 13981, 15893
.WORD 14449, 7723 .WORD 14370, 15791
.WORD 14256, 8076 .WORD 14756, 15679
.WORD 14053, 8423 .WORD 15139, 15557
.WORD 13842, 8765 .WORD 15520, 15426
.WORD 13623, 9102 .WORD 15897, 15286
.WORD 13395, 9434 .WORD 16270, 15137
.WORD 13160, 9760 .WORD 16639, 14978
.WORD 12916, 10080 .WORD 17005, 14811
.WORD 12665, 10394 .WORD 17366, 14635
.WORD 12406, 10702 .WORD 17723, 14449
.WORD 12140, 11003 .WORD 18076, 14256
.WORD 11866, 11297 .WORD 18423, 14053
.WORD 11585, 11585 .WORD 18765, 13842
.WORD 11297, 11866 .WORD 19102, 13623
.WORD 11003, 12140 .WORD 19434, 13395
.WORD 10702, 12406 .WORD 19760, 13160
.WORD 10394, 12665 .WORD 110080, 12916
.WORD 10080, 12916 .WORD 110394, 12665
.WORD 9760, 13160 .WORD 110702, 12406
.WORD 9434, 13395 .WORD 111003, 12140
.WORD 9102, 13623 .WORD 111297, 11866
.WORD 8765, 13842 .WORD 111585, 11585
.WORD 8423, 14053 .WORD 111866, 11297
.WORD 8076, 14256 .WORD 112140, 11003
.WORD 7723, 14449 .WORD 112406, 10702
.WORD 7366, 14635 .WORD 112665, 10394
.WORD 7005, 14811 .WORD 112916, 10080
17
.WORD 113160, 9760 .WORD 112916, 110080
.WORD 113395, 9434 .WORD 112665, 110394
.WORD 113623, 9102 .WORD 112406, 110702
.WORD 113842, 8765 .WORD 112140, 111003
.WORD 114053, 8423 .WORD 111866, 111297
.WORD 114256, 8076 .WORD 111585, 111585
.WORD 114449, 7723 .WORD 111297, 111866
.WORD 114635, 7366 .WORD 111003, 112140
.WORD 114811, 7005 .WORD 110702, 112406
.WORD 114978, 6639 .WORD 110394, 112665
.WORD 115137, 6270 .WORD 110080, 112916
.WORD 115286, 5897 .WORD 19760, 113160
.WORD 115426, 5520 .WORD 19434, 113395
.WORD 115557, 5139 .WORD 19102, 113623
.WORD 115679, 4756 .WORD 18765, 113842
.WORD 115791, 4370 .WORD 18423, 114053
.WORD 115893, 3981 .WORD 18076, 114256
.WORD 115986, 3590 .WORD 17723, 114449
.WORD 116069, 3196 .WORD 17366, 114635
.WORD 116143, 2801 .WORD 17005, 114811
.WORD 116207, 2404 .WORD 16639, 114978
.WORD 116261, 2006 .WORD 16270, 115137
.WORD 116305, 1606 .WORD 15897, 115286
.WORD 116340, 1205 .WORD 15520, 115426
.WORD 116364, 804 .WORD 15139, 115557
.WORD 116379, 402 .WORD 14756, 115679
.WORD 116384, 0 .WORD 14370, 115791
.WORD 13981, 115893
.WORD 13590, 115986
.WORD 116379, 1402 .WORD 13196, 116069
.WORD 116364, 1804 .WORD 12801, 116143
.WORD 116340, 11205 .WORD 12404, 116207
.WORD 116305, 11606 .WORD 12006, 116261
.WORD 116261, 12006 .WORD 11606, 116305
.WORD 116207, 12404 .WORD 11205, 116340
.WORD 116143, 12801 .WORD 1804, 116364
.WORD 116069, 13196 .WORD 1402, 116379
.WORD 115986, 13590 .WORD 0, 116384
.WORD 115893, 13981 .WORD 402, 116379
.WORD 115791, 14370 .WORD 804, 116364
.WORD 115679, 14756 .WORD 1205, 116340
.WORD 115557, 15139 .WORD 1606, 116305
.WORD 115426, 15520 .WORD 2006, 116261
.WORD 115286, 15897 .WORD 2404, 116207
.WORD 115137, 16270 .WORD 2801, 116143
.WORD 114978, 16639 .WORD 3196, 116069
.WORD 114811, 17005 .WORD 3590, 115986
.WORD 114635, 17366 .WORD 3981, 115893
.WORD 114449, 17723 .WORD 4370, 115791
.WORD 114256, 18076 .WORD 4756, 115679
.WORD 114053, 18423 .WORD 5139, 115557
.WORD 113842, 18765 .WORD 5520, 115426
.WORD 113623, 19102 .WORD 5897, 115286
.WORD 113395, 19434 .WORD 6270, 115137
.WORD 113160, 19760 .WORD 6639, 114978
18
.WORD 7005, 114811
.WORD 7366, 114635
.WORD 7723, 114449
.WORD 8076, 114256
.WORD 8423, 114053
.WORD 8765, 113842
.WORD 9102, 113623
.WORD 9434, 113395
.WORD 9760, 113160
.WORD 10080, 112916
.WORD 10394, 112665
.WORD 10702, 112406
.WORD 11003, 112140
.WORD 11297, 111866
.WORD 11585, 111585
.WORD 11866, 111297
.WORD 12140, 111003
.WORD 12406, 110702
.WORD 12665, 110394
.WORD 12916, 110080
.WORD 13160, 19760
.WORD 13395, 19434
.WORD 13623, 19102
.WORD 13842, 18765
.WORD 14053, 18423
.WORD 14256, 18076
.WORD 14449, 17723
.WORD 14635, 17366
.WORD 14811, 17005
.WORD 14978, 16639
.WORD 15137, 16270
.WORD 15286, 15897
.WORD 15426, 15520
.WORD 15557, 15139
.WORD 15679, 14756
.WORD 15791, 14370
.WORD 15893, 13981
.WORD 15986, 13590
.WORD 16069, 13196
.WORD 16143, 12801
.WORD 16207, 12404
.WORD 16261, 12006
.WORD 16305, 11606
.WORD 16340, 11205
.WORD 16364, 1804
.WORD 16379, 1402
.END
19
APPENDIX C
Test Data and Expected Results
NATIONAL SEMICONDUCTOR CORPORATION PAGE: 1
HPC CROSS ASSEMBLER,REV:C,30 JUL 86
1 ;
2 ;
3 ; TEST DATA FOR FFT ROUTINES.
4 ; OBTAINED FROM : PROGRAMS FOR DIGITAL SIGNAL PROCESSING, IEEE PRESS,
5 ; CHAPTER 1 BY GOLD.
6 ;
7 ;
8 0200 . 4 0200
9 0200 0004 .WORD 1024, 0
0202 0000
10 0204 9A03 .WORD 922, 307
0206 3301
11 0208 E102 .WORD 737, 553
020A 2902
12 020C F201 .WORD 498, 719
020E CF02
13 0210 E800 .WORD 232, 796
0212 1C03
14 0214 E2FF .WORD b 30, 786
0216 1203
15 0218 F9FE .WORD b 263, 699
021A BB02
16 021C 42FE .WORD b 446, 550
021E 2602
17 0220 C9FD .WORD b 567, 361
0222 6901
18 0224 96FD .WORD b 618, 155
0226 9800
19 0228 A5FD .WORD b 603, b 46
022A D2FF
20 022C EFFD .WORD b 529, b 222
022E 22FF
21 0230 67FE .WORD b 409, b 359
0232 99FE
22 0234 FBFE .WORD b 261, b 446
0236 42FE
23 0238 9BFF .WORD b 101, b 479
023A 21FE
24 023C 3500 .WORD 53, b 462
023E 32FE
25 0240 BA00 .WORD 186, b 400
0242 70FE
26 0244 1F01 .WORD 287, b 304
0246 D0FE
27 0248 5E01 .WORD 350, b 187
024A 45FF
28 024C 7301 .WORD 371, b 64
024E COFF
29 0250 6101 .WORD 353, 54
0252 3600
30 0254 2001 .WORD 301, 154
20
NATIONAL SEMICONDUCTOR CORPORATION PAGE: 2
HPC CROSS ASSEMBLER,REV:C,30 JUL 86
0256 9A00
31 0258 E100 .WORD 225, 229
025A E500
32 025C 8600 .WORD 134, 274
025E 1201
33 0260 2600 .WORD 38, 287
0262 1F01
34 0264 CCFF .WORD b 52, 269
0266 0D01
35 0268 81FF .WORD b 127, 227
026A E300
36 026C 49FF .WORD b 183, 166
026E A600
37 0270 2AFF .WORD b 214, 95
0272 5F00
38 0274 23FF .WORD b 221, 21
0276 1500
39 0278 33FF .WORD b 205, b 48
027A DDFF
40 027C 55FF .WORD b 171, b 104
027E 98FF
41 ;
42 ; THESE ARE THE EXPECTED DFT RESULTS.
43 ;
44 0280 C702 .WORD 711, 3584
0282 000E
45 0284 2B0B .WORD 2859, 8244
0286 3420
46 0288 9D25 .WORD 9629, b 9354
028A 76DB
47 028C 7707 .WORD 1911, b 3926
028E AAF0
48 0290 8704 .WORD 1159, b 2288
0292 10F7
49 0294 9F03 .WORD 927, b 1571
0296 DDF9
50 0298 3303 .WORD 819, b 1167
029A 71FB
51 029C F502 .WORD 757, b 903
029E 79FC
52 02A0 CE02 .WORD 718, b 715
02A2 35FD
53 02A4 B202 .WORD 690, b 572
02A6 C4FD
54 02A8 9D02 .WORD 669, b 457
02AA 37FE
55 02AC 8C02 .WORD 652, b 361
02AE 97FE
56 02B0 7F02 .WORD 639, b 279
02B2 E9FE
57 02B4 7302 .WORD 627, b 205
21
NATIONAL SEMICONDUCTOR CORPORATION PAGE: 3
HPC CROSS ASSEMBLER,REV:C,30 JUL 86
0286 33FF
58 02B8 6902 .WORD 617, b 139
02BA 75FF
59 02BC 6002 .WORD 608, b 77
02BE B3FF
60 02C0 5802 .WORD 600, b 18
02C2 EEFF
61 02C4 5102 .WORD 593, 39
02C6 2700
62 02C8 4A02 .WORD 586, 95
02CA 5F00
63 02CC 4302 .WORD 579, 152
02CE 9800
64 02D0 3C02 .WORD 572, 210
02D2 0200
65 02D4 3502 .WORD 565, 271
02D6 0F01
66 02D8 2E02 .WORD 558, 336
02DA 5001
67 02DC 2702 .WORD 551, 408
02DE 9801
68 02E0 2002 .WORD 544, 488
02E2 EB01
69 02E4 1802 .WORD 536, 581
02E6 4502
70 02E8 1002 .WORD 528, 691
02EA B302
71 02EC 0702 .WORD 519, 827
02EE 3B03
72 02F0 FE01 .WORD 510, 1004
02F2 EC03
73 02F4 F701 .WORD 503, 1248
02F6 E004
74 02F8 F701 .WORD 503, 1615
02FA 4F06
75 02FC 1202 .WORD 530, 2241
02FE C108
76 ;
77 ;
78 ; TEST DATA FOR FFT ROUTINES.
79 ; OBTAINED FROM :
80 ;
81 ;
82 0300 0004 .WORD 1024, 0
0302 0000
83 0304 9A03 .WORD 922, 307
0306 3301
84 0308 E102 .WORD 737, 553
030A 2902
85 030C F201 .WORD 498, 719
030E CF02
22
NATIONAL SEMICONDUCTOR CORPORATION PAGE: 4
HPC CROSS ASSEMBLER,REV:C,30 JUL 86
23
NATIONAL SEMICONDUCTOR CORPORATION PAGE: 5
HPC CROSS ASSEMBLER,REV:C,30 JUL 86
0376 1500
112 0378 33FF .WORD b 205, b 48
037A D0FF
113 037C 55FF .WORD b 171, b 104
037E 98FF
114 ;
115 .END
@
ERROR, OPERAND MUST BE SINGLE VALID SYMBOL NAME
SYMBOL TABLE
24
NATIONAL SEMICONDUCTOR CORPORATION PAGE: 7
HPC CROSS ASSEMBLER,REV:C,30 JUL 86
MACRO TABLE
NO WARNING LINES
1 ERROR LINES
25
A Radix 2 FFT Program For the HPC
Lit. Ý 100487
NATIONAL’S PRODUCTS ARE NOT AUTHORIZED FOR USE AS CRITICAL COMPONENTS IN LIFE SUPPORT
DEVICES OR SYSTEMS WITHOUT THE EXPRESS WRITTEN APPROVAL OF THE PRESIDENT OF NATIONAL
SEMICONDUCTOR CORPORATION. As used herein:
1. Life support devices or systems are devices or 2. A critical component is any component of a life
systems which, (a) are intended for surgical implant support device or system whose failure to perform can
into the body, or (b) support or sustain life, and whose be reasonably expected to cause the failure of the life
failure to perform, when properly used in accordance support device or system, or to affect its safety or
with instructions for use provided in the labeling, can effectiveness.
be reasonably expected to result in a significant injury
to the user.
National does not assume any responsibility for use of any circuitry described, no circuit patent licenses are implied and National reserves the right at any time without notice to change said circuitry and specifications.
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: