|
@@ -122,9 +122,16 @@ module door_axis_controller #(
|
|
|
(open_snap_accept && (current_position != {CNT_W{1'b0}}));
|
|
(open_snap_accept && (current_position != {CNT_W{1'b0}}));
|
|
|
|
|
|
|
|
// Combinational endpoint-effective coordinate for same-cycle planner decisions.
|
|
// Combinational endpoint-effective coordinate for same-cycle planner decisions.
|
|
|
|
|
+ // Use held source limit (not only one-shot snap): departure may consume arm
|
|
|
|
|
+ // without snapping, so a later mid accept while close_limit stays high must
|
|
|
|
|
+ // still treat the axis as at travel (never MOVE_CLOSE into the close limit).
|
|
|
|
|
+ wire close_source_hold =
|
|
|
|
|
+ calibrated_r && !in_calibration && close_limit && !departing_close_source;
|
|
|
|
|
+ wire open_source_hold =
|
|
|
|
|
+ calibrated_r && !in_calibration && open_limit && !departing_open_source;
|
|
|
wire [CNT_W-1:0] effective_current_position =
|
|
wire [CNT_W-1:0] effective_current_position =
|
|
|
- close_snap_accept ? travel_steps :
|
|
|
|
|
- open_snap_accept ? {CNT_W{1'b0}} :
|
|
|
|
|
|
|
+ close_source_hold ? travel_steps :
|
|
|
|
|
+ open_source_hold ? {CNT_W{1'b0}} :
|
|
|
current_position;
|
|
current_position;
|
|
|
|
|
|
|
|
// Distinguish request bookkeeping from material replan preempt.
|
|
// Distinguish request bookkeeping from material replan preempt.
|