forked from acco/chti23
Step_DFT - fini et testé avec signal test de k=5, A=1/2, M=64
This commit is contained in:
parent
e6a35c8006
commit
017d1129dc
4 changed files with 129 additions and 78 deletions
|
@ -23,18 +23,20 @@
|
|||
DFT_ModuleAuCarre proc
|
||||
push {lr}
|
||||
;partie reelle
|
||||
;push {r0}
|
||||
push {r0}
|
||||
ldr r2,=TabCos
|
||||
bl DFT_Partie
|
||||
;mov r3 ,r0
|
||||
mov r3 ,r0
|
||||
;partie imaginaire
|
||||
;pop {r0}
|
||||
;ldr r2,=TabSin
|
||||
;bl DFT_Partie
|
||||
pop {r0}
|
||||
ldr r2,=TabSin
|
||||
bl DFT_Partie
|
||||
; calcul dft
|
||||
;mul r0, r0
|
||||
;mul r3, r3
|
||||
;add r0, r3
|
||||
asr r0, #16 ; 7.9
|
||||
mul r0, r0 ; 14.18
|
||||
asr r3, #16 ; 7.9
|
||||
mul r3, r3 ; 14.18
|
||||
add r0, r3 ; 13.19
|
||||
pop {pc}
|
||||
endp
|
||||
|
||||
|
|
|
@ -1,68 +1,68 @@
|
|||
AREA Signal, DATA, READONLY
|
||||
export LeSignal
|
||||
LeSignal
|
||||
DCW 0x0fff ; 0 4095 0.99976
|
||||
DCW 0x0ff6 ; 1 4086 0.99756
|
||||
DCW 0x0fd9 ; 2 4057 0.99048
|
||||
DCW 0x0fa8 ; 3 4008 0.97852
|
||||
DCW 0x0f64 ; 4 3940 0.96191
|
||||
DCW 0x0f0e ; 5 3854 0.94092
|
||||
DCW 0x0ea7 ; 6 3751 0.91577
|
||||
DCW 0x0e2f ; 7 3631 0.88647
|
||||
DCW 0x0800 ; 0 2048 0.50000
|
||||
DCW 0x043b ; 1 1083 0.26440
|
||||
DCW 0x0159 ; 2 345 0.08423
|
||||
DCW 0x000a ; 3 10 0.00244
|
||||
DCW 0x009c ; 4 156 0.03809
|
||||
DCW 0x02ed ; 5 749 0.18286
|
||||
DCW 0x0670 ; 6 1648 0.40234
|
||||
DCW 0x0a53 ; 7 2643 0.64526
|
||||
DCW 0x0da8 ; 8 3496 0.85352
|
||||
DCW 0x0d13 ; 9 3347 0.81714
|
||||
DCW 0x0c72 ; 10 3186 0.77783
|
||||
DCW 0x0bc5 ; 11 3013 0.73560
|
||||
DCW 0x0fa8 ; 9 4008 0.97852
|
||||
DCW 0x0fd9 ; 10 4057 0.99048
|
||||
DCW 0x0e2f ; 11 3631 0.88647
|
||||
DCW 0x0b10 ; 12 2832 0.69141
|
||||
DCW 0x0a53 ; 13 2643 0.64526
|
||||
DCW 0x0990 ; 14 2448 0.59766
|
||||
DCW 0x08c9 ; 15 2249 0.54907
|
||||
DCW 0x0800 ; 16 2048 0.50000
|
||||
DCW 0x0737 ; 17 1847 0.45093
|
||||
DCW 0x0670 ; 18 1648 0.40234
|
||||
DCW 0x05ad ; 19 1453 0.35474
|
||||
DCW 0x04f0 ; 20 1264 0.30859
|
||||
DCW 0x043b ; 21 1083 0.26440
|
||||
DCW 0x038e ; 22 910 0.22217
|
||||
DCW 0x02ed ; 23 749 0.18286
|
||||
DCW 0x0258 ; 24 600 0.14648
|
||||
DCW 0x01d1 ; 25 465 0.11353
|
||||
DCW 0x0159 ; 26 345 0.08423
|
||||
DCW 0x00f2 ; 27 242 0.05908
|
||||
DCW 0x0737 ; 13 1847 0.45093
|
||||
DCW 0x038e ; 14 910 0.22217
|
||||
DCW 0x00f2 ; 15 242 0.05908
|
||||
DCW 0x0000 ; 16 0 0.00000
|
||||
DCW 0x00f2 ; 17 242 0.05908
|
||||
DCW 0x038e ; 18 910 0.22217
|
||||
DCW 0x0737 ; 19 1847 0.45093
|
||||
DCW 0x0b10 ; 20 2832 0.69141
|
||||
DCW 0x0e2f ; 21 3631 0.88647
|
||||
DCW 0x0fd9 ; 22 4057 0.99048
|
||||
DCW 0x0fa8 ; 23 4008 0.97852
|
||||
DCW 0x0da8 ; 24 3496 0.85352
|
||||
DCW 0x0a53 ; 25 2643 0.64526
|
||||
DCW 0x0670 ; 26 1648 0.40234
|
||||
DCW 0x02ed ; 27 749 0.18286
|
||||
DCW 0x009c ; 28 156 0.03809
|
||||
DCW 0x0058 ; 29 88 0.02148
|
||||
DCW 0x0027 ; 30 39 0.00952
|
||||
DCW 0x000a ; 31 10 0.00244
|
||||
DCW 0x0000 ; 32 0 0.00000
|
||||
DCW 0x000a ; 33 10 0.00244
|
||||
DCW 0x0027 ; 34 39 0.00952
|
||||
DCW 0x0058 ; 35 88 0.02148
|
||||
DCW 0x009c ; 36 156 0.03809
|
||||
DCW 0x00f2 ; 37 242 0.05908
|
||||
DCW 0x0159 ; 38 345 0.08423
|
||||
DCW 0x01d1 ; 39 465 0.11353
|
||||
DCW 0x000a ; 29 10 0.00244
|
||||
DCW 0x0159 ; 30 345 0.08423
|
||||
DCW 0x043b ; 31 1083 0.26440
|
||||
DCW 0x0800 ; 32 2048 0.50000
|
||||
DCW 0x0bc5 ; 33 3013 0.73560
|
||||
DCW 0x0ea7 ; 34 3751 0.91577
|
||||
DCW 0x0ff6 ; 35 4086 0.99756
|
||||
DCW 0x0f64 ; 36 3940 0.96191
|
||||
DCW 0x0d13 ; 37 3347 0.81714
|
||||
DCW 0x0990 ; 38 2448 0.59766
|
||||
DCW 0x05ad ; 39 1453 0.35474
|
||||
DCW 0x0258 ; 40 600 0.14648
|
||||
DCW 0x02ed ; 41 749 0.18286
|
||||
DCW 0x038e ; 42 910 0.22217
|
||||
DCW 0x043b ; 43 1083 0.26440
|
||||
DCW 0x0058 ; 41 88 0.02148
|
||||
DCW 0x0027 ; 42 39 0.00952
|
||||
DCW 0x01d1 ; 43 465 0.11353
|
||||
DCW 0x04f0 ; 44 1264 0.30859
|
||||
DCW 0x05ad ; 45 1453 0.35474
|
||||
DCW 0x0670 ; 46 1648 0.40234
|
||||
DCW 0x0737 ; 47 1847 0.45093
|
||||
DCW 0x0800 ; 48 2048 0.50000
|
||||
DCW 0x08c9 ; 49 2249 0.54907
|
||||
DCW 0x0990 ; 50 2448 0.59766
|
||||
DCW 0x0a53 ; 51 2643 0.64526
|
||||
DCW 0x0b10 ; 52 2832 0.69141
|
||||
DCW 0x0bc5 ; 53 3013 0.73560
|
||||
DCW 0x0c72 ; 54 3186 0.77783
|
||||
DCW 0x0d13 ; 55 3347 0.81714
|
||||
DCW 0x0da8 ; 56 3496 0.85352
|
||||
DCW 0x0e2f ; 57 3631 0.88647
|
||||
DCW 0x0ea7 ; 58 3751 0.91577
|
||||
DCW 0x0f0e ; 59 3854 0.94092
|
||||
DCW 0x08c9 ; 45 2249 0.54907
|
||||
DCW 0x0c72 ; 46 3186 0.77783
|
||||
DCW 0x0f0e ; 47 3854 0.94092
|
||||
DCW 0x0fff ; 48 4095 0.99976
|
||||
DCW 0x0f0e ; 49 3854 0.94092
|
||||
DCW 0x0c72 ; 50 3186 0.77783
|
||||
DCW 0x08c9 ; 51 2249 0.54907
|
||||
DCW 0x04f0 ; 52 1264 0.30859
|
||||
DCW 0x01d1 ; 53 465 0.11353
|
||||
DCW 0x0027 ; 54 39 0.00952
|
||||
DCW 0x0058 ; 55 88 0.02148
|
||||
DCW 0x0258 ; 56 600 0.14648
|
||||
DCW 0x05ad ; 57 1453 0.35474
|
||||
DCW 0x0990 ; 58 2448 0.59766
|
||||
DCW 0x0d13 ; 59 3347 0.81714
|
||||
DCW 0x0f64 ; 60 3940 0.96191
|
||||
DCW 0x0fa8 ; 61 4008 0.97852
|
||||
DCW 0x0fd9 ; 62 4057 0.99048
|
||||
DCW 0x0ff6 ; 63 4086 0.99756
|
||||
DCW 0x0ff6 ; 61 4086 0.99756
|
||||
DCW 0x0ea7 ; 62 3751 0.91577
|
||||
DCW 0x0bc5 ; 63 3013 0.73560
|
||||
END
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
|
||||
|
||||
#define MSURDEUX 32
|
||||
#include "DriverJeuLaser.h"
|
||||
#include <stdio.h>
|
||||
|
||||
int DFT_ModuleAuCarre( short int * Signal64ech, char k);
|
||||
|
||||
extern short int LeSignal;
|
||||
|
||||
int tab [64];
|
||||
int tab [MSURDEUX];
|
||||
|
||||
int main(void)
|
||||
{
|
||||
|
@ -20,10 +21,11 @@ int main(void)
|
|||
|
||||
//============================================================================
|
||||
|
||||
for (int i=0;i<64;i++)
|
||||
for (int i=0;i<MSURDEUX-1;i++)
|
||||
{
|
||||
char k = (char)i;
|
||||
char k = (char)i+1;
|
||||
tab[i]= DFT_ModuleAuCarre( &LeSignal, k);
|
||||
//printf("k=%d : %d \n",i,tab[i]);
|
||||
}
|
||||
|
||||
while (1)
|
||||
|
|
|
@ -157,9 +157,9 @@
|
|||
<Bp>
|
||||
<Number>0</Number>
|
||||
<Type>0</Type>
|
||||
<LineNumber>29</LineNumber>
|
||||
<LineNumber>31</LineNumber>
|
||||
<EnabledFlag>1</EnabledFlag>
|
||||
<Address>134218158</Address>
|
||||
<Address>134218160</Address>
|
||||
<ByteObject>0</ByteObject>
|
||||
<HtxType>0</HtxType>
|
||||
<ManyObjects>0</ManyObjects>
|
||||
|
@ -168,7 +168,39 @@
|
|||
<BreakIfRCount>1</BreakIfRCount>
|
||||
<Filename>.\Src\principal.c</Filename>
|
||||
<ExecCommand></ExecCommand>
|
||||
<Expression>\\\Src/principal.c\29</Expression>
|
||||
<Expression>\\\Src/principal.c\31</Expression>
|
||||
</Bp>
|
||||
<Bp>
|
||||
<Number>1</Number>
|
||||
<Type>0</Type>
|
||||
<LineNumber>24</LineNumber>
|
||||
<EnabledFlag>1</EnabledFlag>
|
||||
<Address>134218172</Address>
|
||||
<ByteObject>0</ByteObject>
|
||||
<HtxType>0</HtxType>
|
||||
<ManyObjects>0</ManyObjects>
|
||||
<SizeOfObject>0</SizeOfObject>
|
||||
<BreakByAccess>0</BreakByAccess>
|
||||
<BreakIfRCount>1</BreakIfRCount>
|
||||
<Filename>.\Src\DFT.s</Filename>
|
||||
<ExecCommand></ExecCommand>
|
||||
<Expression>\\StepDFT\Src/DFT.s\24</Expression>
|
||||
</Bp>
|
||||
<Bp>
|
||||
<Number>2</Number>
|
||||
<Type>0</Type>
|
||||
<LineNumber>28</LineNumber>
|
||||
<EnabledFlag>1</EnabledFlag>
|
||||
<Address>0</Address>
|
||||
<ByteObject>0</ByteObject>
|
||||
<HtxType>0</HtxType>
|
||||
<ManyObjects>0</ManyObjects>
|
||||
<SizeOfObject>0</SizeOfObject>
|
||||
<BreakByAccess>0</BreakByAccess>
|
||||
<BreakIfRCount>0</BreakIfRCount>
|
||||
<Filename>.\Src\principal.c</Filename>
|
||||
<ExecCommand></ExecCommand>
|
||||
<Expression></Expression>
|
||||
</Bp>
|
||||
</Breakpoint>
|
||||
<WatchWindow1>
|
||||
|
@ -185,24 +217,39 @@
|
|||
<Ww>
|
||||
<count>2</count>
|
||||
<WinNumber>1</WinNumber>
|
||||
<ItemText>r0,0x0A</ItemText>
|
||||
<ItemText>r0,0x10</ItemText>
|
||||
</Ww>
|
||||
<Ww>
|
||||
<count>3</count>
|
||||
<WinNumber>1</WinNumber>
|
||||
<ItemText>i,0x0A</ItemText>
|
||||
<ItemText>r3,0x0A</ItemText>
|
||||
</Ww>
|
||||
<Ww>
|
||||
<count>4</count>
|
||||
<WinNumber>1</WinNumber>
|
||||
<ItemText>k,0x0A</ItemText>
|
||||
<ItemText>r5,0x0A</ItemText>
|
||||
</Ww>
|
||||
<Ww>
|
||||
<count>5</count>
|
||||
<WinNumber>1</WinNumber>
|
||||
<ItemText>signal[0]</ItemText>
|
||||
</Ww>
|
||||
<Ww>
|
||||
<count>6</count>
|
||||
<WinNumber>1</WinNumber>
|
||||
<ItemText>tab[0]</ItemText>
|
||||
</Ww>
|
||||
<Ww>
|
||||
<count>7</count>
|
||||
<WinNumber>1</WinNumber>
|
||||
<ItemText>tab[1]</ItemText>
|
||||
</Ww>
|
||||
</WatchWindow1>
|
||||
<MemoryWindow1>
|
||||
<Mm>
|
||||
<WinNumber>1</WinNumber>
|
||||
<SubType>0</SubType>
|
||||
<ItemText>tab</ItemText>
|
||||
<ItemText>r0</ItemText>
|
||||
<AccSizeX>0</AccSizeX>
|
||||
</Mm>
|
||||
</MemoryWindow1>
|
||||
|
@ -226,7 +273,7 @@
|
|||
<AscS3>0</AscS3>
|
||||
<aSer3>0</aSer3>
|
||||
<eProf>0</eProf>
|
||||
<aLa>1</aLa>
|
||||
<aLa>0</aLa>
|
||||
<aPa1>0</aPa1>
|
||||
<AscS4>0</AscS4>
|
||||
<aSer4>0</aSer4>
|
||||
|
|
Loading…
Reference in a new issue