?? svgen_mf.lst
字號:
C:\TIC2XX\C2000\CGTOOLS\BIN\DSPA.EXE -q -v2xx -gs svgen_mf.asm -o ..\obj\svgen_mf.obj -l ..\temp\svgen_mf.lst
TMS320C1x/C2x/C2xx/C5x COFF Assembler Version 7.00 Tue May 6 12:41:11 2003
Copyright (c) 1987-1999 Texas Instruments Incorporated
svgen_mf.asm PAGE 1
1 ;=====================================================================================
2 ; File name: SVGEN_MF.ASM
3 ;
4 ; Originator: Digital Control Systems Group
5 ; Texas Instruments
6 ;
7 ; Description:
8 ; This file contains source for the Space Vector generation routine.
9 ;=====================================================================================
10 ; History:
11 ;-------------------------------------------------------------------------------------
12 ; 9-15-2000 Release Rev 1.0
13 ;================================================================================
14 ; Applicability: F240,F241,C242,F243,F24xx. (Peripheral Independant).
15 ;
16 ;
17 ;================================================================================
18 ; Routine Name: Space Vector Function Generator. Routine Type: C Callable
19 ;
20 ; Description:
21 ;
22 ; C prototype : int Space_Vector_Gen (SVGEN *p)
23 ;================================================================================
24 ; History Created Dec 29, 1999.
25 ;
26 ; Definition of SVGENMF:
27 ;
28 ; typedef struct SVGENMF { int gain;
29 ; int freq;
30 ; int freq_max;
31 ; int alpha;
32 ; int sector_ptr
33 ; int va;
34 ; int vb;
35 ; int vc;
36 ; (int (*)(int))Space_Vector_Gen_MF
37 ; };
38 ;
39 ; Frame Usage Details:
40 ; | a | b | c d
41 ;____________|_____________|____________________________|_______________________
42 ; FR0 | step_angle | |
43 ; FR1 | entry_old | (sector_routine_ address) |
44 ; FR2 | entry_new | |
45 ; FR3 | dy | |
46 ; FR4 | dx | |
47
48 ;================================================================================
49
50 .def _svgenmf_calc
51 ;================================================================================
52 0000 _svgenmf_calc:
53
54 0005 __SVGEN_framesize .set 0005h
TMS320C1x/C2x/C2xx/C5x COFF Assembler Version 7.00 Tue May 6 12:41:11 2003
Copyright (c) 1987-1999 Texas Instruments Incorporated
svgen_mf.asm PAGE 2
55 ;================================================================================
56 0000 8aa0 POPD *+
57 0001 80a0 SAR AR0,*+
58 0002 8180 SAR AR1,*
59 0003 b005 LARK AR0,__SVGEN_framesize
60 0004 00e8 LAR AR0,*0+,AR0
61 ;--------------------------------------------------------------------------------
62 0005 bf01 SPM 1 ; set product mode to shift left one bit.
63 0006 be47 SETC SXM
64 ;================================================================================
65 0007 7c03 SBRK #3 ; Point AR0 to the first argument.
66 ; This is a pointer to the SVGEN_DATA.
67 ;--------------------------------------------------------------------------------
68 0008 0280 LAR AR2,* ; get the pointer in AR2.
69 ;--------------------------------------------------------------------------------
70 0009 7803 ADRK #3 ; point AR0 back to FR0
71 ;--------------------------------------------------------------------------------
72 000a 8b8a MAR *,AR2 ; ARP=AR2. AR0->FR0 and AR2->gain.
73 ;--------------------------------------------------------------------------------
74 000b 7801 ADRK #1 ; point AR2 to freq.
75 ; ARP=AR2. AR0->FR0 and AR2->freq.
76 ;--------------------------------------------------------------------------------
77 000c 73a0 LT *+ ; get freq
78 ; also incr AR2 to point to freq_max
79 ; ARP=AR2. AR0->FR0 and AR2->freq_max.
80 ;--------------------------------------------------------------------------------
81 000d 54a8 MPY *+,AR0 ; product reg = freq*freq_max
82 ; P = Q0 x Q15 = Q15 in 32 bits.
83 ; also incr AR2 to point to alpha
84 ; ARP=AR0. AR0->FR0 and AR2->alpha.
85 ;--------------------------------------------------------------------------------
86 000e be03 PAC ; get product in ACC.
87 ; ARP=AR2. AR0->FR1 and AR2->alpha.
88 ;--------------------------------------------------------------------------------
89 000f 98aa SACH *+,AR2 ; store the product = step_angle in FR0.
90 ; Also incr AR0 to point to FR1.
91 ; ARP=AR2. AR0->FR1 and AR2->alpha.
92 ;--------------------------------------------------------------------------------
93 0010 1888 LACC *,8,AR0 ; create entry_old from alpha_previous.
94 ; ARP=AR0. AR0->FR1 and AR2->alpha.
95 0011 be81 AND #00ffh,16
0012 00ff
96 ;--------------------------------------------------------------------------------
97 0013 9890 SACH *- ; store the entry_old in FR1.
98 ; also decrement AR0 to point to FR0.
99 ; ARP=AR0. AR0->FR0 and AR2->alpha.
100 ;--------------------------------------------------------------------------------
101 0014 108a LACC *,AR2 ; get step_angle
102 ; ARP=AR2. AR0->FR0 and AR2->alpha.
103 ; Alpha still previous value.
104 ;--------------------------------------------------------------------------------
105 0015 2080 ADD * ; add to get new alpha.
106 0016 9080 SACL * ; store to alpha.
107 ; ARP=AR2. AR0->FR0 and AR2->alpha (new value).
TMS320C1x/C2x/C2xx/C5x COFF Assembler Version 7.00 Tue May 6 12:41:11 2003
Copyright (c) 1987-1999 Texas Instruments Incorporated
svgen_mf.asm PAGE 3
108 ;--------------------------------------------------------------------------------
109 0017 18a8 LACC *+,8,AR0 ; create entry_new from alpha_new.
110 ; increment AR2 to point to sector_ptr.
111 ; ARP=AR0. AR0->FR0 and AR2->sector_ptr.
112 0018 be81 AND #00ffh,16
0019 00ff
113 ;--------------------------------------------------------------------------------
114 001a 7802 ADRK #2 ; increment AR0 to point to FR2.
115 ; ARP=AR0. AR0->FR2 and AR2->sector_ptr.
116 ;--------------------------------------------------------------------------------
117 001b 9880 SACH * ; store entry_new.
118 ; ARP=AR0. AR0->FR2 and AR2->sector_ptr.
119 ;--------------------------------------------------------------------------------
120 001c bf80 LACC #_SINE_TABLE_60
001d 00c6'
121 001e 20a0 ADD *+ ; get base+offset to sine table for dy.
122 ; also incr AR0 to point to FR3.
123 ; ARP=AR0. AR0->FR3 and AR2->sector_ptr.
124 ;--------------------------------------------------------------------------------
125 001f a690 TBLR *- ; get dy in FR3. dy=sin(ALPHA)
126 ; also decrement AR0 to point back to entry_new.
127 ; ARP=AR0. AR0->FR2 and AR2->sector_ptr.
128 ;--------------------------------------------------------------------------------
129 0020 bf80 LACC #0ffh ; get end of table offset.
0021 00ff
130 ;--------------------------------------------------------------------------------
131 0022 3080 SUB * ; get ACC = 0ffh - entry_new
132 ; AR0 still pts to entry_new.
133
134 ; ARP=AR0. AR0->FR2 and AR2->sector_ptr.
135 ;--------------------------------------------------------------------------------
136 0023 bf90 ADD #_SINE_TABLE_60
0024 00c6'
137 ; add the base of the table.
138 ; ARP=AR0. AR0->FR2 and AR2->sector_ptr.
139 ;--------------------------------------------------------------------------------
140 0025 7802 ADRK #2 ; incr AR0 to point to FR4
141 ; ARP=AR0. AR0->FR4 and AR2->sector_ptr.
142 ;--------------------------------------------------------------------------------
143 0026 a680 TBLR * ; get dx in FR4. dx=sin(60-ALPHA).
144 ; ARP=AR0. AR0->FR4 and AR2->sector_ptr.
145 ;--------------------------------------------------------------------------------
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -