|
@@ -170,13 +170,15 @@ module command_controller #(
|
|
|
end
|
|
end
|
|
|
end
|
|
end
|
|
|
ST_WRITE_PTC: begin
|
|
ST_WRITE_PTC: begin
|
|
|
|
|
+ // Each chamber PTC duty is duplicated to a physical pair:
|
|
|
|
|
+ // chamber i -> channels {2*i, 2*i+1}.
|
|
|
target_wr_en <= 1'b1;
|
|
target_wr_en <= 1'b1;
|
|
|
target_wr_data <= ptc_values[write_index];
|
|
target_wr_data <= ptc_values[write_index];
|
|
|
if (ptc_write_phase == 2'd0) begin
|
|
if (ptc_write_phase == 2'd0) begin
|
|
|
- target_wr_addr <= {1'b0, write_index, 1'b0};
|
|
|
|
|
|
|
+ target_wr_addr <= {1'b0, write_index[1:0], 1'b0};
|
|
|
ptc_write_phase <= 2'd1;
|
|
ptc_write_phase <= 2'd1;
|
|
|
end else begin
|
|
end else begin
|
|
|
- target_wr_addr <= {1'b0, write_index, 1'b1};
|
|
|
|
|
|
|
+ target_wr_addr <= {1'b0, write_index[1:0], 1'b1};
|
|
|
ptc_write_phase <= 2'd0;
|
|
ptc_write_phase <= 2'd0;
|
|
|
if (write_index == CHAMBER_PTC_COUNT - 1) begin
|
|
if (write_index == CHAMBER_PTC_COUNT - 1) begin
|
|
|
state <= ST_COMMIT;
|
|
state <= ST_COMMIT;
|