📄 aci_se.lst
字号:
C:\TIC2XX\C2000\CGTOOLS\BIN\DSPA.EXE -q -v2xx -gs aci_se.asm -o ..\obj\aci_se.obj -l ..\temp\aci_se.lst
TMS320C1x/C2x/C2xx/C5x COFF Assembler Version 7.00 Tue May 6 12:41:24 2003
Copyright (c) 1987-1999 Texas Instruments Incorporated
aci_se.asm PAGE 1
1 ;=====================================================================================
2 ; File name: ACI_SE.ASM
3 ;
4 ; Originator: Digital Control Systems Group
5 ; Texas Instruments
6 ;
7 ; Description: Open-Loop Speed Estimator of Induction Motor
8 ;
9 ;=====================================================================================
10 ; History:
11 ;-------------------------------------------------------------------------------------
12 ; 02-08-2001 Release Rev 1.0
13 ;================================================================================
14 ; Applicability: F240,F241,C242,F243,F24xx. (Peripheral Independent).
15 ;================================================================================
16 ; Routine Name: aci_se_calc Type: C Call
17 ;
18 ; C prototype : void aci_se_calc(struct ACISE *p);
19 ;
20 ; The struct object is defined in the header file "aci_se.h" as follows:
21 ;
22 ; typedef struct { int i_qs_se; /* Input: Stationary q-axis stator current (Q15) */
23 ; int psi_dr_se; /* Input: Stationary d-axis rotor flux (Q15) */
24 ; int i_ds_se; /* Input: Stationary d-axis stator current (Q15) */
25 ; int psi_qr_se; /* Input: Stationary q-axis rotor flux (Q15) */
26 ; int K1_se; /* Parameter: Constant using in speed computation (Q15)
27 ; int psi_r_2; /* Variable: Squared rotor flux (Q15) */
28 ; int theta_r_se; /* Input: Rotor flux angle (Q15) */
29 ; int K2_se; /* Parameter: Constant using in differentiator (Q6) */
30 ; int theta_r_old; /* Variable: Previous rotor flux angle (Q15) */
31 ; int K3_se; /* Parameter: Constant using in low-pass filter (Q15) */
32 ; int wr_psi_r; /* Variable: Synchronous rotor flux speed in per-unit (Q
33 ; int K4_se; /* Parameter: Constant using in low-pass filter (Q15) */
34 ; int wr_hat_se; /* Output: Estimated speed in per unit (Q15) */
35 ; int base_rpm_se; /* Parameter: Base rpm speed (Q0) */
36 ; int wr_hat_rpm_se; /* Output: Estimated speed in rpm (Q0) */
37 ; int (*calc)(); /* Pointer to calculation function */
38 ; } ACISE;
39 ;
40 ; Frame Usage Details:
41 ; step | a | b | c | d
42 ;____________|_____________|______________|______________|_____________
43 ; AR0 | tmp1_se | | |
44 ; AR1 | w_sl | | |
45 ;
46 ;================================================================================
47 .def _aci_se_calc
48 ;================================================================================
49 7333 DIFF_MAX_LIMIT .set 7333h ; Maximum limit to differentiate angle (Q15)
50 0ccd DIFF_MIN_LIMIT .set 0CCDh ; Minimum limit to differentiate angle (Q15)
51
52 ; Important!! Note that the default DIFF_LIMIT are shown, if it is neccessary
53 ; to be changed, the module library (e.g., clib_011.lib) must be rebuilt to take the effect.
54 ;================================================================================
TMS320C1x/C2x/C2xx/C5x COFF Assembler Version 7.00 Tue May 6 12:41:24 2003
Copyright (c) 1987-1999 Texas Instruments Incorporated
aci_se.asm PAGE 2
55 0002 __aci_se_calc_framesize .set 0002h
56 ;================================================================================
57 0000 _aci_se_calc:
58 ; Assume
59 0000 8aa0 POPD *+ ; Keep return address
60 0001 80a0 SAR AR0,*+ ; Keep old frame pointer (FP)
61 0002 8180 SAR AR1,* ; Keep old stack pointer (SP)
62 0003 b002 LARK AR0,__aci_se_calc_framesize ; Load AR0 with frame size
63 0004 00e8 LAR AR0,*0+,AR0 ; AR0->FP0 (new FP), ARP=AR0
64
65 ;================================================================================
66 0005 7c03 SBRK #3 ; ARP=AR0, AR0->FR0-3 (1st argument)
67 ;----------------------------------------------------------------------------------
68 0006 0280 LAR AR2,* ; ARP=AR0, AR0->i_qs_se, AR2->i_qs_se
69 ;----------------------------------------------------------------------------------
70 0007 7803 ADRK #3 ; ARP=AR0, AR0->FR0, AR2->i_qs_se
71 ;----------------------------------------------------------------------------------
72 0008 8b8a MAR *,AR2 ; ARP=AR2, AR0->FR0, AR2->i_qs_se
73 ;----------------------------------------------------------------------------------
74 0009 be47 SETC SXM ; Turn sign extension mode on
75 ; ARP=AR2, AR0->FR0, AR2->i_qs_se
76 ;----------------------------------------------------------------------------------
77 000a be43 SETC OVM ; Set overflow mode
78 ; ARP=AR2, AR0->FR0, AR2->i_qs_se
79 ;----------------------------------------------------------------------------------
80 000b bf00 SPM 0 ; Reset product mode
81 ; ARP=AR2, AR0->FR0, AR2->i_qs_se
82 ;----------------------------------------------------------------------------------
83 000c 73a0 LT *+ ; TREG = i_qs_se (Q15)
84 ; ARP=AR2, AR0->FR0, AR2->psi_dr_se
85 ;----------------------------------------------------------------------------------
86 000d 54a0 MPY *+ ; PREG = psi_dr_se*i_qs_se (Q30)
87 ; ARP=AR2, AR0->FR0, AR2->i_ds_se
88 ;----------------------------------------------------------------------------------
89 000e be03 PAC ; ACC = psi_dr_se*i_qs_se (Q30)
90 ; ARP=AR2, AR0->FR0, AR2->i_ds_se
91 ;----------------------------------------------------------------------------------
92 000f 73a0 LT *+ ; TREG = i_ds_se (Q15)
93 ; ARP=AR2, AR0->FR0, AR2->psi_qr_se
94 ;----------------------------------------------------------------------------------
95 0010 54a8 MPY *+,AR0 ; PREG = psi_qr_se*i_ds_se (Q30)
96 ; ARP=AR2, AR0->FR0, AR2->K1_se, ARP=AR0
97 ;----------------------------------------------------------------------------------
98 0011 be05 SPAC ; ACC = psi_dr_se*i_qs_se-psi_qr_se*i_ds_se (Q30)
99 ; ARP=AR0, AR0->FR0, AR2->K1_se
100 ;----------------------------------------------------------------------------------
101 0012 998a SACH *,1,AR2 ; FR0 = tmp1_se = psi_dr_se*i_qs_se-psi_qr_se*i_ds_se (Q15)
102 ; ARP=AR0, AR0->FR0, AR2->K1_se, ARP=AR2
103 ;----------------------------------------------------------------------------------
104 0013 7398 LT *-,AR0 ; TREG = K1_se (Q15)
105 ; ARP=AR2, AR0->FR0, AR2->psi_qr_se, ARP=AR0
106 ;----------------------------------------------------------------------------------
107 0014 5480 MPY * ; PREG = K1_se*(psi_dr_se*i_qs_se-psi_qr_se*i_ds_se) (Q30)
108 ; ARP=AR0, AR0->FR0, AR2->psi_qr_se
TMS320C1x/C2x/C2xx/C5x COFF Assembler Version 7.00 Tue May 6 12:41:24 2003
Copyright (c) 1987-1999 Texas Instruments Incorporated
aci_se.asm PAGE 3
109 ;----------------------------------------------------------------------------------
110 0015 be03 PAC ; ACC = K1_se*(psi_dr_se*i_qs_se-psi_qr_se*i_ds_se) (Q30)
111 ; ARP=AR0, AR0->FR0, AR2->psi_qr_se
112 ;----------------------------------------------------------------------------------
113 0016 99aa SACH *+,1,AR2 ; FR0 = tmp1_se = K1_se*(psi_dr_se*i_qs_se-psi_qr_se*i_ds_se) (Q15)
114 ; ARP=AR0, AR0->FR1, AR2->psi_qr_se, ARP=AR2
115 ;----------------------------------------------------------------------------------
116 0017 7380 LT * ; TREG = psi_qr_se (Q15)
117 ; ARP=AR2, AR0->FR1, AR2->psi_qr_se
118 ;----------------------------------------------------------------------------------
119 0018 5480 MPY * ; PREG = psi_qr_se*psi_qr_se (Q30)
120 ; ARP=AR2, AR0->FR1, AR2->psi_qr_se
121 ;----------------------------------------------------------------------------------
122 0019 be03 PAC ; ACC = psi_qr_se*psi_qr_se (Q30)
123 ; ARP=AR2, AR0->FR1, AR2->psi_qr_se
124 ;----------------------------------------------------------------------------------
125 001a 7c02 SBRK #2 ; ARP=AR2, AR0->FR1, AR2->psi_dr_se
126 ;----------------------------------------------------------------------------------
127 001b 7380 LT * ; TREG = psi_dr_se (Q15)
128 ; ARP=AR2, AR0->FR1, AR2->psi_dr_se
129 ;----------------------------------------------------------------------------------
130 001c 5480 MPY * ; PREG = psi_dr_se*psi_dr_se (Q30)
131 ; ARP=AR2, AR0->FR1, AR2->psi_dr_se
132 ;----------------------------------------------------------------------------------
133 001d be04 APAC ; ACC = psi_qr_se^2 + psi_dr_se^2 (Q30)
134 ; ARP=AR2, AR0->FR1, AR2->psi_dr_se
135 ;----------------------------------------------------------------------------------
136 001e 7804 ADRK #4 ; ARP=AR2, AR0->FR1, AR2->psi_r_2
137 ;----------------------------------------------------------------------------------
138 001f 99a8 SACH *+,1,AR0 ; psi_r_2 = psi_qr_se^2 + psi_dr_se^2 (Q15)
139 ; ARP=AR2, AR0->FR0, AR2->theta_r_se, ARP=AR0
140 ;----------------------------------------------------------------------------------
141 0020 1fa0 LACC *+,15 ; ACC = FR0 = tmp1_se left shifted by 15 (w_sl=Q15)
142 ; ARP=AR0, AR0->FR1, AR2->theta_r_se
143 ;----------------------------------------------------------------------------------
144 0021 bb0f RPT #15 ; Repeat SUBC 16 times
145 ; ARP=AR0, AR0->FR1, AR2->theta_r_se
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -