ソースを参照

fix(rtl): use held source limit for planner DIR

Departure can consume the one-shot limit arm without snapping, so a later
mid accept while close_limit stays high must still treat position as travel
and never choose MOVE_CLOSE into the close limit.

Co-authored-by: Cursor <cursoragent@cursor.com>
root 3 ヶ月 前
親
コミット
216a031d6a
1 ファイル変更、9 行追加、2 行削除
  1. 9 2
      src/modules/door_axis_controller.v

+ 9 - 2
src/modules/door_axis_controller.v

@@ -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.