|
@@ -211,7 +211,7 @@ module motor_engine #(
|
|
|
reg [2:0] fx_state;
|
|
reg [2:0] fx_state;
|
|
|
reg [AXIS_INDEX_BITS-1:0] fx_axis;
|
|
reg [AXIS_INDEX_BITS-1:0] fx_axis;
|
|
|
reg [AXIS_INDEX_BITS-1:0] fx_round;
|
|
reg [AXIS_INDEX_BITS-1:0] fx_round;
|
|
|
- wire [7:0] fx_candidate=fx_round;
|
|
|
|
|
|
|
+ integer fx_k,fx_candidate;
|
|
|
reg fx_from_urgent;
|
|
reg fx_from_urgent;
|
|
|
reg [127:0] fx_seg;
|
|
reg [127:0] fx_seg;
|
|
|
|
|
|
|
@@ -687,14 +687,9 @@ module motor_engine #(
|
|
|
// ---- execution fetch: idle axis takes urgent, else head ----
|
|
// ---- execution fetch: idle axis takes urgent, else head ----
|
|
|
case (fx_state)
|
|
case (fx_state)
|
|
|
FX_IDLE: begin
|
|
FX_IDLE: begin
|
|
|
- // One shared candidate per idle clock. Queue lookup may
|
|
|
|
|
- // wait at most AXIS_COUNT candidate clocks; the independent
|
|
|
|
|
- // fast STEP/limit scan never waits for descriptor selection.
|
|
|
|
|
- begin
|
|
|
|
|
- if(!ctl_valid && qc_state==QC_IDLE && !qw_submit &&
|
|
|
|
|
- su_axis>=AXIS_COUNT && !startup_seek &&
|
|
|
|
|
- (cs_state==0 || cs_state==3 || seek_context))
|
|
|
|
|
- fx_round<=fx_round==AXIS_COUNT-1 ? 0 : fx_round+1'b1;
|
|
|
|
|
|
|
+ for (fx_k = AXIS_COUNT - 1; fx_k >= 0; fx_k = fx_k - 1) begin
|
|
|
|
|
+ fx_candidate=fx_round+fx_k;
|
|
|
|
|
+ if(fx_candidate>=AXIS_COUNT)fx_candidate=fx_candidate-AXIS_COUNT;
|
|
|
if (ax_load_ready[fx_candidate] && !ax_seg_load[fx_candidate] && !queue_paused_r[fx_candidate] && !ctl_valid &&
|
|
if (ax_load_ready[fx_candidate] && !ax_seg_load[fx_candidate] && !queue_paused_r[fx_candidate] && !ctl_valid &&
|
|
|
(cs_state==0 || (cs_state==3 && cs_start_mask[fx_candidate]) || (seek_context && cs_mask[fx_candidate])) && qc_state==QC_IDLE && !qw_submit &&
|
|
(cs_state==0 || (cs_state==3 && cs_start_mask[fx_candidate]) || (seek_context && cs_mask[fx_candidate])) && qc_state==QC_IDLE && !qw_submit &&
|
|
|
su_axis>=AXIS_COUNT && !startup_seek) begin
|
|
su_axis>=AXIS_COUNT && !startup_seek) begin
|