|
@@ -292,6 +292,12 @@ module motor_engine #(
|
|
|
wire [15:0] bank_telemetry_word;
|
|
wire [15:0] bank_telemetry_word;
|
|
|
wire [15:0] queue_depth_word={2'd0,depth_r[telemetry_axis],8'd0};
|
|
wire [15:0] queue_depth_word={2'd0,depth_r[telemetry_axis],8'd0};
|
|
|
wire [15:0] queue_pause_word=queue_paused_r[telemetry_axis] ? (16'd1<<`MR_AXIS_FLAG_QUEUE_PAUSED_BIT) : 16'd0;
|
|
wire [15:0] queue_pause_word=queue_paused_r[telemetry_axis] ? (16'd1<<`MR_AXIS_FLAG_QUEUE_PAUSED_BIT) : 16'd0;
|
|
|
|
|
+ // Declare the memory before all addressed uses so the TD HDL front end
|
|
|
|
|
+ // sees an unpacked memory at the first read, rather than a forward net.
|
|
|
|
|
+ reg [159:0] limit_record [0:AXIS_COUNT-1];
|
|
|
|
|
+ reg [AXIS_COUNT-1:0] limit_history_valid;
|
|
|
|
|
+ integer ev_select,ev_scan,ev_i;
|
|
|
|
|
+ reg select_limit,reset_pending;
|
|
|
// One physical read address serves retained history and event dispatch.
|
|
// One physical read address serves retained history and event dispatch.
|
|
|
// The history scanner pauses for one dispatch cycle, then resumes at
|
|
// The history scanner pauses for one dispatch cycle, then resumes at
|
|
|
// its own axis, so event traffic cannot skip a status axis indefinitely.
|
|
// its own axis, so event traffic cannot skip a status axis indefinitely.
|
|
@@ -449,11 +455,6 @@ module motor_engine #(
|
|
|
reg [127:0] pending_record [0:AXIS_COUNT-1];
|
|
reg [127:0] pending_record [0:AXIS_COUNT-1];
|
|
|
// Persistent last-limit history doubles as the pending event record.
|
|
// Persistent last-limit history doubles as the pending event record.
|
|
|
// Clearing a pending bit or the host ring never destroys this history.
|
|
// Clearing a pending bit or the host ring never destroys this history.
|
|
|
- reg [159:0] limit_record [0:AXIS_COUNT-1];
|
|
|
|
|
- reg [AXIS_COUNT-1:0] limit_history_valid;
|
|
|
|
|
- reg reset_pending;
|
|
|
|
|
- integer ev_select,ev_scan,ev_i;
|
|
|
|
|
- reg select_limit;
|
|
|
|
|
reg [8:0] pending_losses;
|
|
reg [8:0] pending_losses;
|
|
|
wire [127:0] selected_record=select_limit ? limit_read_record[127:0] : pending_record[ev_select];
|
|
wire [127:0] selected_record=select_limit ? limit_read_record[127:0] : pending_record[ev_select];
|
|
|
integer done_write_axis,limit_write_axis,record_axis;
|
|
integer done_write_axis,limit_write_axis,record_axis;
|