Skip to content

Commit 3c4f7b0

Browse files
SDA USRsdausr
authored andcommitted
Squashed 'motor_control' changes from f1ca2b2..3ec6431 (#914)
3ec6431 Updating main by next-2: fixing coding style 0add76f Updating main by next 5f8b514 create main branch from next branch Co-authored-by: sdausr <sdausr@xilinx.com>
1 parent 2e6c66f commit 3c4f7b0

13 files changed

Lines changed: 104 additions & 75 deletions

File tree

motor_control/Jenkinsfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
@Library('pipeline-library')_
2-
VitisLibPipeline (branch: 'next', libname: 'xf_motorcontrol', TARGETS: 'hls_csim:hls_csynth:hls_cosim:vitis_sw_emu:vitis_hw_emu:vitis_hw_build',
2+
VitisLibPipeline (branch: 'main', libname: 'xf_motorcontrol', TARGETS: 'hls_csim:hls_csynth:hls_cosim:vitis_sw_emu:vitis_hw_emu:vitis_hw_build',
33
upstream_dependencies: '',
4-
devtest: 'RunDeploy.sh', TOOLVERSION: '2023.1_stable_latest', 'os_types' : 'centos7:rhel7')
4+
devtest: 'RunDeploy.sh', TOOLVERSION: '2023.1_released', 'os_types' : 'centos7:rhel7')

motor_control/L1/include/hw/clarke_2p.hpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,8 @@ void Clarke_Inverse_2p_ap_fixed(T_IO& va_out,
6060
T_MID Valpha = valpha_in;
6161
T_MID Vbeta = vbeta_in;
6262
va_out = Valpha;
63-
#pragma HLS BIND_OP variable = vb_out op = mul impl = dsp
64-
#pragma HLS BIND_OP variable = vc_out op = mul impl = dsp
6563
vb_out = (0 - Valpha + Vbeta * sqrt3) / 2;
6664
vc_out = (0 - Valpha - Vbeta * sqrt3) / 2;
6765
};
6866

69-
#endif
67+
#endif

motor_control/L1/include/hw/common.hpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ from Advanced Micro Devices, Inc.
6363

6464
#define COMM_MOTOR_PARA_TL_TH (0)
6565

66-
#define COMM_MOTOR_PARA_DT_SIM (0.0000001)
66+
#define COMM_MOTOR_PARA_DT_SIM (0.0000005)
6767

6868
#define COMM_MOTOR_PARA_UMAX (24) // to be uniformed with MAX_VAL_PWM
6969

@@ -87,6 +87,9 @@ typedef ap_uint<32> t_glb_speed_theta;
8787
/// Data Type for the data buffer in calculation.
8888
typedef ap_fixed<32, 16> t_glb_q15q16;
8989

90+
/// Data Type for the smo discrete sample time
91+
typedef ap_fixed<32, 1> t_glb_smo_time;
92+
9093
template <class T>
9194
struct RangeDef {
9295
T min;

motor_control/L1/include/hw/field_weakening.hpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,6 @@ static float Sqrt2(float x) {
9090
#pragma HLS INLINE
9191

9292
float xhalf, res, x2, x3, x4;
93-
#pragma HLS BIND_OP variable = xhalf op = fmul impl = dsp
94-
#pragma HLS BIND_OP variable = x2 op = fmul impl = dsp
95-
#pragma HLS BIND_OP variable = x3 op = fmul impl = dsp
96-
#pragma HLS BIND_OP variable = x4 op = sub impl = dsp
97-
#pragma HLS BIND_OP variable = res op = frecip impl = dsp
9893

9994
xhalf = 0.5f * x;
10095
int i = *(int*)&x; // get bits for floating VALUE
@@ -142,7 +137,6 @@ void Field_Weakening_T(
142137

143138
ap_fixed<48, 32> squareSum = Vd_decoup * Vd_decoup + Vq_decoup * Vq_decoup;
144139
float temp;
145-
#pragma HLS BIND_OP variable = temp op = fsqrt impl = dsp
146140
temp = std::sqrt(squareSum.to_float());
147141
Modulation = temp;
148142

@@ -167,4 +161,4 @@ void Field_Weakening_T(
167161
// pid has move outside
168162
}
169163

170-
#endif // _FIELD_WEAKENING_HPP_
164+
#endif // _FIELD_WEAKENING_HPP_

motor_control/L1/include/hw/foc.hpp

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,9 @@ enum FOC_Mode {
347347
MOD_MANUAL_TORQUE_FLUX_FIXED_SPEED,
348348
MOD_MANUAL_TORQUE_FLUX,
349349
MOD_MANUAL_TORQUE,
350-
MOD_MANUAL_FLUX
350+
MOD_MANUAL_FLUX,
351+
MOD_MANUAL_TORQUE_FLUX_FIXED_ANGLE,
352+
MOD_TOTAL_NUM
351353
};
352354

353355
} // namespace xf
@@ -424,6 +426,12 @@ void Control_foc_ap_fixed(T_IO& Vd,
424426
cos_out = cos_gen_angle; // Generated angle cos
425427
sin_out = sin_gen_angle; // Generated angle sin
426428
break;
429+
case MOD_MANUAL_TORQUE_FLUX_FIXED_ANGLE:
430+
Vd = args_vd; // Sorce Vd from register
431+
Vq = args_vq; // Sorce Vq from register
432+
cos_out = cos_in; // angle cos from aix register
433+
sin_out = sin_in; // angle sin from aix register
434+
break;
427435
case MOD_MANUAL_FLUX:
428436
Vd = args_vd;
429437
Vq = Torque_out;
@@ -498,7 +506,8 @@ void foc_core_ap_fixed(
498506
volatile int& angle_stts,
499507
volatile int& Ialpha_stts,
500508
volatile int& Ibeta_stts,
501-
volatile int& Ihomopolar_stts) {
509+
volatile int& Ihomopolar_stts,
510+
volatile int& fixed_angle_args) {
502511
#pragma HLS INLINE off
503512
#pragma HLS BIND_STORAGE variable = sin_table type = RAM_2P impl = BRAM
504513
#pragma HLS BIND_STORAGE variable = cos_table type = RAM_2P impl = BRAM
@@ -583,6 +592,9 @@ void foc_core_ap_fixed(
583592
apx_fw_kp_args(31, 0) = fw_kp_args;
584593
t_glb_q15q16 apx_fw_ki_args;
585594
apx_fw_ki_args(31, 0) = fw_ki_args;
595+
t_glb_q15q16 apx_fixed_angle_args;
596+
apx_fixed_angle_args(31, 0) = fixed_angle_args;
597+
short fixed_angle_args_short = apx_fixed_angle_args;
586598
// clang-format on
587599

588600
// static T_Vabc SVM_inv_index = MAX_LIM >> 1;
@@ -659,7 +671,10 @@ void foc_core_ap_fixed(
659671
// t_sincos sin_gen_angle; sin_gen_angle(15, 0) = sin_table[gen_angle];
660672

661673
t_angle Theta = Angle - angle_sh_args; // Apply angle correction
662-
Theta = (FOC_mode == MOD_MANUAL_TORQUE_FLUX_FIXED_SPEED) ? gen_angle : Theta;
674+
// Theta = (FOC_mode == MOD_MANUAL_TORQUE_FLUX_FIXED_SPEED) ? gen_angle : Theta;
675+
Theta = (FOC_mode == MOD_MANUAL_TORQUE_FLUX_FIXED_SPEED)
676+
? gen_angle
677+
: (FOC_mode == MOD_MANUAL_TORQUE_FLUX_FIXED_ANGLE) ? fixed_angle_args_short : Theta;
663678
Theta = (Theta < 0) ? (short)(Theta + VALUE_CPR) : Theta; // Correct negative angle
664679
Theta = (Theta >= VALUE_CPR) ? (short)(Theta - VALUE_CPR) : Theta; // Correct angle overload to (0, CPR)
665680
t_angle Q = (Theta / cpr_div_ppr); // Correct angle overload round to (0. cpr_div_ppr)
@@ -907,7 +922,7 @@ void foc_core_ap_fixed(
907922
t_glb_q15q16 apx_speed_Ihomopolar_stts = Ihomopolar;
908923

909924
t_glb_q15q16 apx_speed_stts = RPM;
910-
t_glb_q15q16 apx_angle_stts = Theta;
925+
t_glb_q15q16 apx_angle_stts = Angle;
911926

912927
speed_stts = apx_speed_stts.range(31, 0);
913928
angle_stts = apx_angle_stts.range(31, 0);
@@ -989,6 +1004,7 @@ void foc_core_ap_fixed(
9891004
* @param Ialpha_stts Output status to monitor Ialpha (output of Clarke_Direct)
9901005
* @param Ibeta_stts Output status to monitor Ibeta (output of Clarke_Direct)
9911006
* @param Ihomopolar_stts Output status to monitor Ihomopolar (output of Clarke_Direct)
1007+
* @param fixed_angle_args Input Args for MOD_MANUAL_TORQUE_FLUX_FIXED_ANGLE
9921008
* @param trip_cnt Input Args to set the trip count of foc loop
9931009
*/
9941010
// clang-format on
@@ -1044,6 +1060,7 @@ void hls_foc_strm_ap_fixed(
10441060
volatile int& Ialpha_stts,
10451061
volatile int& Ibeta_stts,
10461062
volatile int& Ihomopolar_stts,
1063+
volatile int& fixed_angle_args,
10471064
volatile long& trip_cnt) {
10481065
short cpr_div_ppr = VALUE_CPR / ppr_args;
10491066
unsigned int tab_map_factor = ((COMM_MACRO_TLB_LENTH * (unsigned int)ppr_args) << 16) / VALUE_CPR;
@@ -1082,7 +1099,7 @@ void hls_foc_strm_ap_fixed(
10821099
//
10831100
id_stts, flux_acc_stts, flux_err_stts, flux_out_stts, iq_stts, torque_acc_stts, torque_err_stts,
10841101
torque_out_stts, speed_stts, speed_acc_stts, speed_err_stts, speed_out_stts, angle_stts, Ialpha_stts,
1085-
Ibeta_stts, Ihomopolar_stts);
1102+
Ibeta_stts, Ihomopolar_stts, fixed_angle_args);
10861103

10871104
T_IO va = Va_out;
10881105
T_IO vb = Vb_out;
@@ -1154,6 +1171,7 @@ void hls_foc_strm_int(
11541171
volatile int& Ialpha_stts,
11551172
volatile int& Ibeta_stts,
11561173
volatile int& Ihomopolar_stts,
1174+
volatile int& fixed_angle_args,
11571175
volatile long& trip_cnt) {
11581176
short cpr_div_ppr = VALUE_CPR / ppr_args;
11591177
unsigned int tab_map_factor = ((COMM_MACRO_TLB_LENTH * (unsigned int)ppr_args) << 16) / VALUE_CPR;
@@ -1201,7 +1219,7 @@ void hls_foc_strm_int(
12011219
//
12021220
id_stts, flux_acc_stts, flux_err_stts, flux_out_stts, iq_stts, torque_acc_stts, torque_err_stts,
12031221
torque_out_stts, speed_stts, speed_acc_stts, speed_err_stts, speed_out_stts, angle_stts, Ialpha_stts,
1204-
Ibeta_stts, Ihomopolar_stts);
1222+
Ibeta_stts, Ihomopolar_stts, fixed_angle_args);
12051223

12061224
t_glb_q15q16 apx_va = Va_out;
12071225
t_glb_q15q16 apx_vb = Vb_out;

motor_control/L1/include/hw/park.hpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,6 @@ void Park_Direct_ap_fixed(
5858
T_MID cos_theta = (T_MID)cos_theta_in;
5959
T_MID sin_theta = (T_MID)sin_theta_in;
6060
T_MID Ia_cos, Ib_sin, Ib_cos, Ia_sin, Id, Iq;
61-
#pragma HLS BIND_OP variable = Ia_cos op = mul impl = dsp
62-
#pragma HLS BIND_OP variable = Ib_sin op = mul impl = dsp
63-
#pragma HLS BIND_OP variable = Ib_cos op = mul impl = dsp
64-
#pragma HLS BIND_OP variable = Ia_sin op = mul impl = dsp
65-
#pragma HLS BIND_OP variable = Id op = add impl = dsp
66-
#pragma HLS BIND_OP variable = Iq op = sub impl = dsp
6761

6862
Ia_cos = (T_MID)Ialpha * cos_theta;
6963
Ib_sin = (T_MID)Ibeta * sin_theta;
@@ -92,12 +86,6 @@ void Park_Inverse_ap_fixed(
9286
T_MID cos_theta = (T_MID)cos_theta_in;
9387
T_MID sin_theta = (T_MID)sin_theta_in;
9488
T_MID Vd_cos, Vq_sin, Vq_cos, Vd_sin, va_inv, vb_inv;
95-
#pragma HLS BIND_OP variable = Vd_cos op = mul impl = dsp
96-
#pragma HLS BIND_OP variable = Vq_sin op = mul impl = dsp
97-
#pragma HLS BIND_OP variable = Vq_cos op = mul impl = dsp
98-
#pragma HLS BIND_OP variable = Vd_sin op = mul impl = dsp
99-
#pragma HLS BIND_OP variable = va_inv op = sub impl = dsp
100-
#pragma HLS BIND_OP variable = vb_inv op = add impl = dsp
10189
Vd_cos = (T_MID)Vd * cos_theta;
10290
Vq_sin = (T_MID)Vq * sin_theta;
10391
Vq_cos = (T_MID)Vq * cos_theta;

motor_control/L1/include/hw/pid_control.hpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,35 +67,28 @@ void PID_Control_ap_fixed(T_IO& Res_out,
6767
bool mode_change) {
6868
#pragma HLS INLINE
6969
T_ERR err;
70-
#pragma HLS BIND_OP variable = err op = add impl = dsp
7170
err = Sp - in_Measured;
7271

7372
T_ACC acc;
74-
#pragma HLS BIND_OP variable = acc op = add impl = dsp
7573
// acc = mode_change==true ? (T_ACC)0 : I_err_prev + err;
7674
if (mode_change == true)
7775
acc = 0;
7876
else
7977
acc = I_err_prev + err;
8078

8179
T_ERR diff;
82-
#pragma HLS BIND_OP variable = diff op = add impl = dsp
8380
diff = err - Error_prev;
8481

8582
T_ERR P;
86-
#pragma HLS BIND_OP variable = P op = mul impl = dsp
8783
P = Kp * err;
8884

8985
T_ERR I;
90-
#pragma HLS BIND_OP variable = I op = mul impl = dsp
9186
I = Ki * acc;
9287

9388
T_ERR D;
94-
#pragma HLS BIND_OP variable = D op = mul impl = dsp
9589
D = Kd * diff;
9690

9791
T_ACC sum;
98-
#pragma HLS BIND_OP variable = sum op = add impl = dsp
9992
sum = (P + I + D);
10093
Res_out = (T_IO)sum;
10194
Error_prev = err;

motor_control/L1/include/hw/qei.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -430,10 +430,10 @@ void calcCounter(hls::stream<QEI_EdgeInfo>& strm_cntEdge,
430430
#endif
431431
tmp_rpm = tmp_rpm / div;
432432

433-
if (dir)
434-
speed_rpm = tmp_rpm; //-tmp_rpm;
433+
if (dir == Dirction_QEI::clockwise_p)
434+
speed_rpm = tmp_rpm; // clockwise_p
435435
else
436-
speed_rpm = tmp_rpm;
436+
speed_rpm = -tmp_rpm; // clockwise_n
437437
ap_uint<32> tmp;
438438
tmp.range(15, 0) = speed_rpm;
439439
tmp.range(31, 16) = counter >> 2; // 4X mode : using any type of edges of A or B

motor_control/L1/tests/IP_FOC/src/foc_demo.hpp

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,16 +103,16 @@ void foc_demo(
103103
// Inout for parameters
104104
int args[FOC_ARGS_SIZE]);
105105
// clang-format off
106-
static const char* string_FOC_Mode[MOD_MANUAL_FLUX + 1] = {
106+
static const char* string_FOC_Mode[MOD_TOTAL_NUM] = {
107107
"MOD_STOPPED ",
108108
"MOD_SPEED_WITH_TORQUE ",
109109
"MOD_TORQUE_WITHOUT_SPEED ",
110110
"MOD_FLUX ",
111-
// expert modes
112111
"MOD_MANUAL_TORQUE_FLUX_FIXED_SPEED",
113112
"MOD_MANUAL_TORQUE_FLUX ",
114113
"MOD_MANUAL_TORQUE ",
115-
"MOD_MANUAL_FLUX "};
114+
"MOD_MANUAL_FLUX ",
115+
"MOD_MANUAL_TORQUE_FLUX_FIXED_ANGLE"};
116116

117117
static const char* string_FOC_PARA[FOC_ARGS_SIZE] = {
118118
"PPR ",
@@ -208,6 +208,7 @@ struct FocAxiParameters {
208208
T Ialpha_stts;
209209
T Ibeta_stts;
210210
T Ihomopolar_stts;
211+
T fixed_angle_args;
211212
long trip_cnt;
212213
FocAxiParameters() { Init(); }
213214
void Init() {
@@ -216,6 +217,7 @@ struct FocAxiParameters {
216217
sample_interval_minus1_args = 0;
217218
control_mode_args = FOC_Mode::MOD_STOPPED;
218219
control_fixperiod_args = 0;
220+
fixed_angle_args = 0;
219221
flux_sp_args = 0;
220222
flux_kp_args = 0;
221223
flux_ki_args = 0;
@@ -296,6 +298,7 @@ struct FocAxiParameters {
296298
fprintf(fp, "\tIbeta");
297299
fprintf(fp, "\tIhomopolar");
298300
fprintf(fp, "\trip_cnt");
301+
fprintf(fp, "\tfixed_angle_args");
299302
}
300303
void printParameters(FILE* fp) {
301304
assert(fp);
@@ -344,6 +347,7 @@ struct FocAxiParameters {
344347
fprintf(fp, "\t%5.6f", Ibeta_stts.to_float());
345348
fprintf(fp, "\t%5.6f", Ihomopolar_stts.to_float());
346349
fprintf(fp, "\t%d", trip_cnt);
350+
fprintf(fp, "\t%d", fixed_angle_args);
347351
}
348352
void sprintParameters(char* strm, int idx) {
349353
assert(strm);
@@ -467,7 +471,8 @@ struct FocAxiParameters {
467471
fout << Va_cmd_stts << ' ';
468472
fout << Vb_cmd_stts << ' ';
469473
fout << Vc_cmd_stts << ' ';
470-
fout << trip_cnt << ' ' << std::endl;
474+
fout << trip_cnt << ' ';
475+
fout << fixed_angle_args << ' ' << std::endl;
471476
fout.close();
472477
}
473478

@@ -519,6 +524,7 @@ struct FocAxiParameters {
519524
istr >> Vb_cmd_stts;
520525
istr >> Vc_cmd_stts;
521526
istr >> trip_cnt;
527+
istr >> fixed_angle_args;
522528
fin.close();
523529
}
524530
void printPIDs(const char* head) {

motor_control/L1/tests/IP_FOC/src/ip_foc.cpp

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ void hls_foc_periodic_ap_fixed(
7979
volatile int& Vc_cmd_stts,
8080
volatile int& Ialpha_stts,
8181
volatile int& Ibeta_stts,
82-
volatile int& Ihomopolar_stts) {
82+
volatile int& Ihomopolar_stts,
83+
volatile int& fixed_angle_args) {
8384
#pragma HLS interface axis port = Ia
8485
#pragma HLS interface axis port = Ib
8586
#pragma HLS interface axis port = Ic
@@ -127,6 +128,7 @@ void hls_foc_periodic_ap_fixed(
127128
#pragma HLS interface s_axilite port = Ialpha_stts bundle = foc_args
128129
#pragma HLS interface s_axilite port = Ibeta_stts bundle = foc_args
129130
#pragma HLS interface s_axilite port = Ihomopolar_stts bundle = foc_args
131+
#pragma HLS interface s_axilite port = fixed_angle_args bundle = foc_args
130132

131133
#pragma HLS interface s_axilite port = return bundle = foc_args
132134
long trip_cnt = 0x7fffffffffffffffL;
@@ -141,7 +143,7 @@ void hls_foc_periodic_ap_fixed(
141143
//
142144
id_stts, flux_acc_stts, flux_err_stts, flux_out_stts, iq_stts, torque_acc_stts, torque_err_stts,
143145
torque_out_stts, speed_stts, speed_acc_stts, speed_err_stts, speed_out_stts, angle_stts,
144-
Va_cmd_stts, Vb_cmd_stts, Vc_cmd_stts, Ialpha_stts, Ibeta_stts, Ihomopolar_stts, trip_cnt);
146+
Va_cmd_stts, Vb_cmd_stts, Vc_cmd_stts, Ialpha_stts, Ibeta_stts, Ihomopolar_stts, fixed_angle_args, trip_cnt);
145147
}
146148
// clang-format on
147149

@@ -195,7 +197,8 @@ void hls_foc_periodic_int( // used for testing synthesizability of hls_foc_strm_
195197
volatile int& Vc_cmd_stts,
196198
volatile int& Ialpha_stts,
197199
volatile int& Ibeta_stts,
198-
volatile int& Ihomopolar_stts) {
200+
volatile int& Ihomopolar_stts,
201+
volatile int& fixed_angle_args) {
199202
#pragma HLS interface axis port = Ia
200203
#pragma HLS interface axis port = Ib
201204
#pragma HLS interface axis port = Ic
@@ -244,6 +247,7 @@ void hls_foc_periodic_int( // used for testing synthesizability of hls_foc_strm_
244247
#pragma HLS interface s_axilite port = Ialpha_stts bundle = foc_args
245248
#pragma HLS interface s_axilite port = Ibeta_stts bundle = foc_args
246249
#pragma HLS interface s_axilite port = Ihomopolar_stts bundle = foc_args
250+
#pragma HLS interface s_axilite port = fixed_angle_args bundle = foc_args
247251

248252
#pragma HLS interface s_axilite port = return bundle = foc_args
249253

@@ -259,7 +263,7 @@ void hls_foc_periodic_int( // used for testing synthesizability of hls_foc_strm_
259263
//
260264
id_stts, flux_acc_stts, flux_err_stts, flux_out_stts, iq_stts, torque_acc_stts, torque_err_stts,
261265
torque_out_stts, speed_stts, speed_acc_stts, speed_err_stts, speed_out_stts, angle_stts, Va_cmd_stts,
262-
Vb_cmd_stts, Vc_cmd_stts, Ialpha_stts, Ibeta_stts, Ihomopolar_stts, trip_cnt);
266+
Vb_cmd_stts, Vc_cmd_stts, Ialpha_stts, Ibeta_stts, Ihomopolar_stts, fixed_angle_args, trip_cnt);
263267
}
264268

265269
// hls_foc_oneSample_ap_fixed is mainly used for generating testing files for cosim
@@ -313,7 +317,8 @@ void hls_foc_oneSample_ap_fixed(
313317
volatile int& Vc_cmd_stts,
314318
volatile int& Ialpha_stts,
315319
volatile int& Ibeta_stts,
316-
volatile int& Ihomopolar_stts) {
320+
volatile int& Ihomopolar_stts,
321+
volatile int& fixed_angle_args) {
317322
#pragma HLS interface axis port = Ia
318323
#pragma HLS interface axis port = Ib
319324
#pragma HLS interface axis port = Ic
@@ -361,6 +366,7 @@ void hls_foc_oneSample_ap_fixed(
361366
#pragma HLS interface s_axilite port = Ialpha_stts bundle = foc_args
362367
#pragma HLS interface s_axilite port = Ibeta_stts bundle = foc_args
363368
#pragma HLS interface s_axilite port = Ihomopolar_stts bundle = foc_args
369+
#pragma HLS interface s_axilite port = fixed_angle_args bundle = foc_args
364370

365371
// #pragma HLS interface ap_none port = ppr_args
366372
// #pragma HLS interface ap_none port = control_mode_args
@@ -413,5 +419,5 @@ void hls_foc_oneSample_ap_fixed(
413419
//
414420
id_stts, flux_acc_stts, flux_err_stts, flux_out_stts, iq_stts, torque_acc_stts, torque_err_stts,
415421
torque_out_stts, speed_stts, speed_acc_stts, speed_err_stts, speed_out_stts, angle_stts, Va_cmd_stts,
416-
Vb_cmd_stts, Vc_cmd_stts, Ialpha_stts, Ibeta_stts, Ihomopolar_stts, trip_cnt);
422+
Vb_cmd_stts, Vc_cmd_stts, Ialpha_stts, Ibeta_stts, Ihomopolar_stts, fixed_angle_args, trip_cnt);
417423
}

0 commit comments

Comments
 (0)