|
|
@@ -4,6 +4,8 @@
|
|
|
// Single-owner controller. Host and PID values are connector-side duties.
|
|
|
// Safety is an independent applied-output layer; board polarity is external.
|
|
|
module thermal_control_core #(
|
|
|
+ // 6400 production is permanently manual; PID code is disabled at elaboration.
|
|
|
+ parameter integer ENABLE_PID = 0,
|
|
|
parameter integer WATCHDOG_TICKS_OVERRIDE = 0,
|
|
|
parameter signed [15:0] CHANNEL_LIMIT = `FB_TEMP_CHANNEL_CLAMP,
|
|
|
parameter signed [15:0] HARD_LIMIT = `FB_TEMP_LANE_HARD,
|
|
|
@@ -163,7 +165,7 @@ module thermal_control_core #(
|
|
|
|
|
|
assign bmc_rd_index = work_index;
|
|
|
assign watchdog_active = control_state == OWNER_SAFE || control_state == OWNER_MANUAL;
|
|
|
- assign pid_running = control_state == OWNER_PID && complete_valid_bmc;
|
|
|
+ assign pid_running = 1'b0;
|
|
|
assign manual_mode = control_state == OWNER_MANUAL;
|
|
|
assign hard_protect = |lane_fault_mask;
|
|
|
`ifdef FORMAL
|
|
|
@@ -186,12 +188,16 @@ module thermal_control_core #(
|
|
|
.read_address(work_index), .read_data(manual_data)
|
|
|
);
|
|
|
|
|
|
+`ifdef ENABLE_LEGACY_PID_STATE
|
|
|
ef2_bram_dp #(.DATA_WIDTH(32), .ADDR_WIDTH(5), .DATA_DEPTH(32)) u_pi_state (
|
|
|
.clk(clk), .a_en(1'b1), .a_we(1'b0), .a_addr(work_index),
|
|
|
.a_wdata(32'd0), .a_rdata(pi_state_read_data),
|
|
|
.b_en(1'b1), .b_we(pi_state_write), .b_addr(pi_state_write_addr),
|
|
|
.b_wdata(pi_state_write_data), .b_rdata(pi_state_unused_read_data)
|
|
|
);
|
|
|
+`else
|
|
|
+ assign pi_state_read_data = 32'd0;
|
|
|
+`endif
|
|
|
|
|
|
thermal_output_banks u_output_banks (
|
|
|
.clk(clk), .active_bank(active_output_bank),
|
|
|
@@ -209,7 +215,7 @@ module thermal_control_core #(
|
|
|
if (!rst_n) begin
|
|
|
active_output_bank <= 0;
|
|
|
control_state <= OWNER_SAFE;
|
|
|
- current_target_celsius <= `DEFAULT_PID_TARGET_C;
|
|
|
+ current_target_celsius <= 8'd0;
|
|
|
control_epoch <= 0;
|
|
|
safety_override_mask <= 0;
|
|
|
lane_fault_mask <= 0;
|
|
|
@@ -248,7 +254,7 @@ module thermal_control_core #(
|
|
|
output_control_write <= 0;
|
|
|
pi_state_write <= 0;
|
|
|
|
|
|
- if (pid_target_commit)
|
|
|
+ if (ENABLE_PID && pid_target_commit)
|
|
|
current_target_celsius <= pid_target_celsius;
|
|
|
if (manual_commit_applied) begin
|
|
|
manual_pending <= 1;
|
|
|
@@ -307,7 +313,7 @@ module thermal_control_core #(
|
|
|
work_index <= 0;
|
|
|
commit_kind <= COMMIT_SAFE;
|
|
|
work_state <= W_SAFE_FILL;
|
|
|
- end else if (control_state == OWNER_PID && bmc_stale && !stale_hold_committed) begin
|
|
|
+ end else if (ENABLE_PID && control_state == OWNER_PID && bmc_stale && !stale_hold_committed) begin
|
|
|
global_fault <= 1;
|
|
|
work_index <= 0;
|
|
|
commit_kind <= COMMIT_SAFE;
|
|
|
@@ -348,7 +354,7 @@ module thermal_control_core #(
|
|
|
end
|
|
|
work_index <= 0;
|
|
|
if (|newly_hard_mask) begin
|
|
|
- control_state <= OWNER_PID;
|
|
|
+ control_state <= OWNER_SAFE;
|
|
|
if (manual_pending) begin
|
|
|
manual_pending <= 0;
|
|
|
manual_commit_done <= 1;
|
|
|
@@ -356,9 +362,9 @@ module thermal_control_core #(
|
|
|
end
|
|
|
commit_kind <= COMMIT_SAFE;
|
|
|
work_state <= W_SAFE_FILL;
|
|
|
- end else if (control_state == OWNER_PID && complete_valid_bmc) begin
|
|
|
+ end else if (ENABLE_PID && control_state == OWNER_PID && complete_valid_bmc) begin
|
|
|
work_state <= W_PID_PREFETCH;
|
|
|
- end else if (control_state == OWNER_PID) begin
|
|
|
+ end else if (ENABLE_PID && control_state == OWNER_PID) begin
|
|
|
commit_kind <= COMMIT_SAFE;
|
|
|
work_state <= W_SAFE_FILL;
|
|
|
end else if (control_state == OWNER_MANUAL) begin
|
|
|
@@ -477,7 +483,7 @@ module thermal_control_core #(
|
|
|
lane_fault_mask[output_lane] ? 8'd100 : output_control_requested};
|
|
|
if (work_index == 31) begin
|
|
|
work_index <= 0;
|
|
|
- commit_kind <= (control_state == OWNER_PID) ? COMMIT_PID : COMMIT_NONE;
|
|
|
+ commit_kind <= COMMIT_NONE;
|
|
|
work_state <= W_COMMIT_WAIT;
|
|
|
end else begin
|
|
|
work_index <= work_index + 1'b1;
|
|
|
@@ -514,11 +520,11 @@ module thermal_control_core #(
|
|
|
safe_pending <= 0;
|
|
|
stale_hold_committed <= 0;
|
|
|
end else if (commit_kind == COMMIT_SAFE) begin
|
|
|
- control_state <= OWNER_PID;
|
|
|
+ control_state <= OWNER_SAFE;
|
|
|
watchdog_remaining <= 0;
|
|
|
stale_hold_committed <= 1;
|
|
|
end else if (commit_kind == COMMIT_PID) begin
|
|
|
- control_state <= OWNER_PID;
|
|
|
+ control_state <= OWNER_SAFE;
|
|
|
stale_hold_committed <= 0;
|
|
|
end
|
|
|
commit_kind <= COMMIT_NONE;
|