|
|
@@ -46,6 +46,7 @@ module motor_axis_core #(
|
|
|
reg [AXIS_COUNT-1:0] seen;
|
|
|
reg [1:0] state[0:AXIS_COUNT-1];
|
|
|
reg [2:0] r_mode[0:AXIS_COUNT-1];
|
|
|
+ // Diagnostic aliases only; production datapaths use the selected state word.
|
|
|
wire [31:0] r_half_us[0:AXIS_COUNT-1],r_remaining[0:AXIS_COUNT-1],r_executed[0:AXIS_COUNT-1];
|
|
|
wire [31:0] r_position[0:AXIS_COUNT-1],r_total[0:AXIS_COUNT-1],r_last[0:AXIS_COUNT-1];
|
|
|
wire [31:0] r_lhits[0:AXIS_COUNT-1],r_uhits[0:AXIS_COUNT-1];
|
|
|
@@ -301,7 +302,6 @@ module motor_axis_core #(
|
|
|
seen<=0;
|
|
|
end
|
|
|
// All wide arithmetic and state transitions use this single selected axis.
|
|
|
-
|
|
|
if(rise_pending[scan_axis]) begin
|
|
|
if(total_sum[32])r_wrap[scan_axis][0]<=1;
|
|
|
if(exec_sum[32])r_wrap[scan_axis][1]<=1;
|
|
|
@@ -330,7 +330,6 @@ module motor_axis_core #(
|
|
|
end else if((load_pending[scan_axis] || seg_load[scan_axis]) && state[scan_axis]==IDLE) begin
|
|
|
seg_consumed[scan_axis]<=1;
|
|
|
load_pending[scan_axis]<=0;r_mode[scan_axis]<=selected_load[10:8];r_dir_upper[scan_axis]<=selected_upper;
|
|
|
-
|
|
|
r_unlimited[scan_axis]<=selected_load[63:32]==0 && (selected_load[10:8]==1 || selected_load[10:8]==2 || selected_load[10:8]==3);
|
|
|
state[scan_axis]<=selected_load[18] ? ARMED : RUN;scheduled_step[scan_axis]<=0;
|
|
|
if(selected_moving)dir_out[scan_axis]<=selected_dir;
|