|
|
@@ -11,7 +11,8 @@ module uart_rs232_j6_host_sensor_real_fan_ptc_debug921_top #(
|
|
|
parameter integer PTC_PWM_PERIOD_TICKS = 2500000,
|
|
|
parameter integer FAN_PWM_PERIOD_TICKS = 1000,
|
|
|
parameter integer HEARTBEAT_TOGGLE_TICKS = 12500000,
|
|
|
- parameter integer ACTIVITY_HOLD_TICKS = 2500000
|
|
|
+ parameter integer ACTIVITY_HOLD_TICKS = 2500000,
|
|
|
+ parameter integer PIN_PROFILE = 0
|
|
|
) (
|
|
|
input wire sys_clk,
|
|
|
input wire sys_rst_n,
|
|
|
@@ -421,50 +422,6 @@ module uart_rs232_j6_host_sensor_real_fan_ptc_debug921_top #(
|
|
|
end
|
|
|
endfunction
|
|
|
|
|
|
- function [7:0] dec3_at;
|
|
|
- input [6:0] value;
|
|
|
- input [1:0] index;
|
|
|
- reg [6:0] below_hundred;
|
|
|
- reg [3:0] tens;
|
|
|
- reg [3:0] ones;
|
|
|
- begin
|
|
|
- below_hundred = (value >= 7'd100) ? 7'd0 : value;
|
|
|
- if (below_hundred >= 7'd90) begin tens = 4'd9; ones = below_hundred - 7'd90; end
|
|
|
- else if (below_hundred >= 7'd80) begin tens = 4'd8; ones = below_hundred - 7'd80; end
|
|
|
- else if (below_hundred >= 7'd70) begin tens = 4'd7; ones = below_hundred - 7'd70; end
|
|
|
- else if (below_hundred >= 7'd60) begin tens = 4'd6; ones = below_hundred - 7'd60; end
|
|
|
- else if (below_hundred >= 7'd50) begin tens = 4'd5; ones = below_hundred - 7'd50; end
|
|
|
- else if (below_hundred >= 7'd40) begin tens = 4'd4; ones = below_hundred - 7'd40; end
|
|
|
- else if (below_hundred >= 7'd30) begin tens = 4'd3; ones = below_hundred - 7'd30; end
|
|
|
- else if (below_hundred >= 7'd20) begin tens = 4'd2; ones = below_hundred - 7'd20; end
|
|
|
- else if (below_hundred >= 7'd10) begin tens = 4'd1; ones = below_hundred - 7'd10; end
|
|
|
- else begin tens = 4'd0; ones = below_hundred[3:0]; end
|
|
|
- case (index)
|
|
|
- 2'd0: dec3_at = (value >= 7'd100) ? "1" : "0";
|
|
|
- 2'd1: dec3_at = 8'h30 + {4'd0, tens};
|
|
|
- default: dec3_at = 8'h30 + {4'd0, ones};
|
|
|
- endcase
|
|
|
- end
|
|
|
- endfunction
|
|
|
-
|
|
|
- function [7:0] dec2_at;
|
|
|
- input [5:0] value;
|
|
|
- input index;
|
|
|
- reg [5:0] below_hundred;
|
|
|
- reg [3:0] tens;
|
|
|
- reg [3:0] ones;
|
|
|
- begin
|
|
|
- below_hundred = (value >= 6'd60) ? 6'd0 : value;
|
|
|
- if (below_hundred >= 6'd50) begin tens = 4'd5; ones = below_hundred - 6'd50; end
|
|
|
- else if (below_hundred >= 6'd40) begin tens = 4'd4; ones = below_hundred - 6'd40; end
|
|
|
- else if (below_hundred >= 6'd30) begin tens = 4'd3; ones = below_hundred - 6'd30; end
|
|
|
- else if (below_hundred >= 6'd20) begin tens = 4'd2; ones = below_hundred - 6'd20; end
|
|
|
- else if (below_hundred >= 6'd10) begin tens = 4'd1; ones = below_hundred - 6'd10; end
|
|
|
- else begin tens = 4'd0; ones = below_hundred[3:0]; end
|
|
|
- dec2_at = index ? (8'h30 + {4'd0, ones}) : (8'h30 + {4'd0, tens});
|
|
|
- end
|
|
|
- endfunction
|
|
|
-
|
|
|
function [6:0] dimm_temp_value;
|
|
|
input [7:0] int_byte;
|
|
|
input [7:0] frac_byte;
|
|
|
@@ -913,13 +870,13 @@ module uart_rs232_j6_host_sensor_real_fan_ptc_debug921_top #(
|
|
|
begin
|
|
|
case (kind)
|
|
|
FRAME_RAW: frame_length = 8'd55 + {2'd0, raw_len, 1'b0};
|
|
|
- FRAME_EVT: frame_length = 8'd44;
|
|
|
- FRAME_PWM: frame_length = 8'd72;
|
|
|
- FRAME_MOD: frame_length = 8'd30;
|
|
|
+ FRAME_EVT: frame_length = 8'd17;
|
|
|
+ FRAME_PWM: frame_length = 8'd38;
|
|
|
+ FRAME_MOD: frame_length = 8'd19;
|
|
|
FRAME_STAT: frame_length = 8'd56;
|
|
|
- FRAME_MAP: frame_length = 8'd66;
|
|
|
+ FRAME_MAP: frame_length = 8'd11;
|
|
|
FRAME_CMD: frame_length = 8'd36;
|
|
|
- FRAME_TEMP: frame_length = 8'd42;
|
|
|
+ FRAME_TEMP: frame_length = 8'd30;
|
|
|
default: frame_length = 8'd0;
|
|
|
endcase
|
|
|
end
|
|
|
@@ -964,19 +921,7 @@ module uart_rs232_j6_host_sensor_real_fan_ptc_debug921_top #(
|
|
|
8'd14: mod_frame_byte_compact = "t";
|
|
|
8'd15: mod_frame_byte_compact = "=";
|
|
|
8'd16: mod_frame_byte_compact = "0";
|
|
|
- 8'd17: mod_frame_byte_compact = " ";
|
|
|
- 8'd18: mod_frame_byte_compact = "s";
|
|
|
- 8'd19: mod_frame_byte_compact = "r";
|
|
|
- 8'd20: mod_frame_byte_compact = "c";
|
|
|
- 8'd21: mod_frame_byte_compact = "=";
|
|
|
- 8'd22: mod_frame_byte_compact = "h";
|
|
|
- 8'd23: mod_frame_byte_compact = "m";
|
|
|
- 8'd24: mod_frame_byte_compact = " ";
|
|
|
- 8'd25: mod_frame_byte_compact = "t";
|
|
|
- 8'd26: mod_frame_byte_compact = "s";
|
|
|
- 8'd27: mod_frame_byte_compact = "=";
|
|
|
- 8'd28: mod_frame_byte_compact = "5";
|
|
|
- 8'd29: mod_frame_byte_compact = 8'h0d;
|
|
|
+ 8'd17: mod_frame_byte_compact = 8'h0d;
|
|
|
default: mod_frame_byte_compact = 8'h0a;
|
|
|
endcase
|
|
|
end
|
|
|
@@ -1057,64 +1002,9 @@ module uart_rs232_j6_host_sensor_real_fan_ptc_debug921_top #(
|
|
|
8'd4: map_frame_byte_compact = "P";
|
|
|
8'd5: map_frame_byte_compact = " ";
|
|
|
8'd6: map_frame_byte_compact = "p";
|
|
|
- 8'd7: map_frame_byte_compact = "r";
|
|
|
- 8'd8: map_frame_byte_compact = "o";
|
|
|
- 8'd9: map_frame_byte_compact = "f";
|
|
|
- 8'd10: map_frame_byte_compact = "i";
|
|
|
- 8'd11: map_frame_byte_compact = "l";
|
|
|
- 8'd12: map_frame_byte_compact = "e";
|
|
|
- 8'd13: map_frame_byte_compact = "=";
|
|
|
- 8'd14: map_frame_byte_compact = "p";
|
|
|
- 8'd15: map_frame_byte_compact = "r";
|
|
|
- 8'd16: map_frame_byte_compact = "i";
|
|
|
- 8'd17: map_frame_byte_compact = "m";
|
|
|
- 8'd18: map_frame_byte_compact = "a";
|
|
|
- 8'd19: map_frame_byte_compact = "r";
|
|
|
- 8'd20: map_frame_byte_compact = "y";
|
|
|
- 8'd21: map_frame_byte_compact = " ";
|
|
|
- 8'd22: map_frame_byte_compact = "p";
|
|
|
- 8'd23: map_frame_byte_compact = "t";
|
|
|
- 8'd24: map_frame_byte_compact = "c";
|
|
|
- 8'd25: map_frame_byte_compact = "=";
|
|
|
- 8'd26: map_frame_byte_compact = "2";
|
|
|
- 8'd27: map_frame_byte_compact = "4";
|
|
|
- 8'd28: map_frame_byte_compact = " ";
|
|
|
- 8'd29: map_frame_byte_compact = "h";
|
|
|
- 8'd30: map_frame_byte_compact = "e";
|
|
|
- 8'd31: map_frame_byte_compact = "a";
|
|
|
- 8'd32: map_frame_byte_compact = "t";
|
|
|
- 8'd33: map_frame_byte_compact = "=";
|
|
|
- 8'd34: map_frame_byte_compact = "2";
|
|
|
- 8'd35: map_frame_byte_compact = "4";
|
|
|
- 8'd36: map_frame_byte_compact = " ";
|
|
|
- 8'd37: map_frame_byte_compact = "f";
|
|
|
- 8'd38: map_frame_byte_compact = "p";
|
|
|
- 8'd39: map_frame_byte_compact = "w";
|
|
|
- 8'd40: map_frame_byte_compact = "m";
|
|
|
- 8'd41: map_frame_byte_compact = "=";
|
|
|
- 8'd42: map_frame_byte_compact = "4";
|
|
|
- 8'd43: map_frame_byte_compact = " ";
|
|
|
- 8'd44: map_frame_byte_compact = "f";
|
|
|
- 8'd45: map_frame_byte_compact = "g";
|
|
|
- 8'd46: map_frame_byte_compact = "=";
|
|
|
- 8'd47: map_frame_byte_compact = "8";
|
|
|
- 8'd48: map_frame_byte_compact = " ";
|
|
|
- 8'd49: map_frame_byte_compact = "i";
|
|
|
- 8'd50: map_frame_byte_compact = "n";
|
|
|
- 8'd51: map_frame_byte_compact = "s";
|
|
|
- 8'd52: map_frame_byte_compact = "t";
|
|
|
- 8'd53: map_frame_byte_compact = "=";
|
|
|
- 8'd54: map_frame_byte_compact = "4";
|
|
|
- 8'd55: map_frame_byte_compact = " ";
|
|
|
- 8'd56: map_frame_byte_compact = "n";
|
|
|
- 8'd57: map_frame_byte_compact = "e";
|
|
|
- 8'd58: map_frame_byte_compact = "t";
|
|
|
- 8'd59: map_frame_byte_compact = "=";
|
|
|
- 8'd60: map_frame_byte_compact = "r";
|
|
|
- 8'd61: map_frame_byte_compact = "e";
|
|
|
- 8'd62: map_frame_byte_compact = "a";
|
|
|
- 8'd63: map_frame_byte_compact = "l";
|
|
|
- 8'd64: map_frame_byte_compact = 8'h0d;
|
|
|
+ 8'd7: map_frame_byte_compact = "=";
|
|
|
+ 8'd8: map_frame_byte_compact = (PIN_PROFILE == 1) ? "f" : "t";
|
|
|
+ 8'd9: map_frame_byte_compact = 8'h0d;
|
|
|
default: map_frame_byte_compact = 8'h0a;
|
|
|
endcase
|
|
|
end
|
|
|
@@ -1132,39 +1022,27 @@ module uart_rs232_j6_host_sensor_real_fan_ptc_debug921_top #(
|
|
|
8'd5: temp_frame_byte_compact = "P";
|
|
|
8'd6: temp_frame_byte_compact = " ";
|
|
|
8'd7: temp_frame_byte_compact = "s";
|
|
|
- 8'd8: temp_frame_byte_compact = "e";
|
|
|
- 8'd9: temp_frame_byte_compact = "q";
|
|
|
- 8'd10: temp_frame_byte_compact = "=";
|
|
|
- 8'd11: temp_frame_byte_compact = hex32_at({16'd0, snap_report_seq}, 3'd0);
|
|
|
- 8'd12: temp_frame_byte_compact = hex32_at({16'd0, snap_report_seq}, 3'd1);
|
|
|
- 8'd13: temp_frame_byte_compact = hex32_at({16'd0, snap_report_seq}, 3'd2);
|
|
|
- 8'd14: temp_frame_byte_compact = hex32_at({16'd0, snap_report_seq}, 3'd3);
|
|
|
- 8'd15: temp_frame_byte_compact = hex32_at({16'd0, snap_report_seq}, 3'd4);
|
|
|
- 8'd16: temp_frame_byte_compact = hex32_at({16'd0, snap_report_seq}, 3'd5);
|
|
|
- 8'd17: temp_frame_byte_compact = hex32_at({16'd0, snap_report_seq}, 3'd6);
|
|
|
- 8'd18: temp_frame_byte_compact = hex32_at({16'd0, snap_report_seq}, 3'd7);
|
|
|
- 8'd19: temp_frame_byte_compact = " ";
|
|
|
- 8'd20: temp_frame_byte_compact = "s";
|
|
|
- 8'd21: temp_frame_byte_compact = "t";
|
|
|
- 8'd22: temp_frame_byte_compact = "=";
|
|
|
- 8'd23: temp_frame_byte_compact = snap_report_all_ff ? "a" : "v";
|
|
|
- 8'd24: temp_frame_byte_compact = " ";
|
|
|
- 8'd25: temp_frame_byte_compact = "v";
|
|
|
+ 8'd8: temp_frame_byte_compact = "=";
|
|
|
+ 8'd9: temp_frame_byte_compact = hex16_at(snap_report_seq, 2'd0);
|
|
|
+ 8'd10: temp_frame_byte_compact = hex16_at(snap_report_seq, 2'd1);
|
|
|
+ 8'd11: temp_frame_byte_compact = hex16_at(snap_report_seq, 2'd2);
|
|
|
+ 8'd12: temp_frame_byte_compact = hex16_at(snap_report_seq, 2'd3);
|
|
|
+ 8'd13: temp_frame_byte_compact = " ";
|
|
|
+ 8'd14: temp_frame_byte_compact = "v";
|
|
|
+ 8'd15: temp_frame_byte_compact = "=";
|
|
|
+ 8'd16: temp_frame_byte_compact = hex8_at({2'd0, snap_report_valid_count}, 1'b0);
|
|
|
+ 8'd17: temp_frame_byte_compact = hex8_at({2'd0, snap_report_valid_count}, 1'b1);
|
|
|
+ 8'd18: temp_frame_byte_compact = " ";
|
|
|
+ 8'd19: temp_frame_byte_compact = "m";
|
|
|
+ 8'd20: temp_frame_byte_compact = "=";
|
|
|
+ 8'd21: temp_frame_byte_compact = hex8_at({2'd0, snap_report_missing_count}, 1'b0);
|
|
|
+ 8'd22: temp_frame_byte_compact = hex8_at({2'd0, snap_report_missing_count}, 1'b1);
|
|
|
+ 8'd23: temp_frame_byte_compact = " ";
|
|
|
+ 8'd24: temp_frame_byte_compact = "h";
|
|
|
+ 8'd25: temp_frame_byte_compact = "d";
|
|
|
8'd26: temp_frame_byte_compact = "=";
|
|
|
- 8'd27: temp_frame_byte_compact = hex8_at({2'd0, snap_report_valid_count}, 1'b0);
|
|
|
- 8'd28: temp_frame_byte_compact = hex8_at({2'd0, snap_report_valid_count}, 1'b1);
|
|
|
- 8'd29: temp_frame_byte_compact = " ";
|
|
|
- 8'd30: temp_frame_byte_compact = "m";
|
|
|
- 8'd31: temp_frame_byte_compact = "=";
|
|
|
- 8'd32: temp_frame_byte_compact = hex8_at({2'd0, snap_report_missing_count}, 1'b0);
|
|
|
- 8'd33: temp_frame_byte_compact = hex8_at({2'd0, snap_report_missing_count}, 1'b1);
|
|
|
- 8'd34: temp_frame_byte_compact = " ";
|
|
|
- 8'd35: temp_frame_byte_compact = "h";
|
|
|
- 8'd36: temp_frame_byte_compact = "d";
|
|
|
- 8'd37: temp_frame_byte_compact = "=";
|
|
|
- 8'd38: temp_frame_byte_compact = hex8_at(host_report_drop, 1'b0);
|
|
|
- 8'd39: temp_frame_byte_compact = hex8_at(host_report_drop, 1'b1);
|
|
|
- 8'd40: temp_frame_byte_compact = 8'h0d;
|
|
|
+ 8'd27: temp_frame_byte_compact = hex8_at(host_report_drop, 1'b0);
|
|
|
+ 8'd28: temp_frame_byte_compact = 8'h0d;
|
|
|
default: temp_frame_byte_compact = 8'h0a;
|
|
|
endcase
|
|
|
end
|
|
|
@@ -1252,43 +1130,16 @@ module uart_rs232_j6_host_sensor_real_fan_ptc_debug921_top #(
|
|
|
8'd3: evt_frame_byte = "V";
|
|
|
8'd4: evt_frame_byte = "T";
|
|
|
8'd5: evt_frame_byte = " ";
|
|
|
- 8'd6: evt_frame_byte = "s";
|
|
|
- 8'd7: evt_frame_byte = "e";
|
|
|
- 8'd8: evt_frame_byte = "q";
|
|
|
- 8'd9: evt_frame_byte = "=";
|
|
|
- 8'd10: evt_frame_byte = hex32_at({24'd0, snap_host_seq}, 3'd0);
|
|
|
- 8'd11: evt_frame_byte = hex32_at({24'd0, snap_host_seq}, 3'd1);
|
|
|
- 8'd12: evt_frame_byte = hex32_at({24'd0, snap_host_seq}, 3'd2);
|
|
|
- 8'd13: evt_frame_byte = hex32_at({24'd0, snap_host_seq}, 3'd3);
|
|
|
- 8'd14: evt_frame_byte = hex32_at({24'd0, snap_host_seq}, 3'd4);
|
|
|
- 8'd15: evt_frame_byte = hex32_at({24'd0, snap_host_seq}, 3'd5);
|
|
|
- 8'd16: evt_frame_byte = hex32_at({24'd0, snap_host_seq}, 3'd6);
|
|
|
- 8'd17: evt_frame_byte = hex32_at({24'd0, snap_host_seq}, 3'd7);
|
|
|
- 8'd18: evt_frame_byte = " ";
|
|
|
- 8'd19: evt_frame_byte = "o";
|
|
|
- 8'd20: evt_frame_byte = "k";
|
|
|
- 8'd21: evt_frame_byte = "=";
|
|
|
- 8'd22: evt_frame_byte = (snap_resp_code == RESP_OK) ? "1" : "0";
|
|
|
- 8'd23: evt_frame_byte = " ";
|
|
|
- 8'd24: evt_frame_byte = "e";
|
|
|
- 8'd25: evt_frame_byte = "=";
|
|
|
- 8'd26: evt_frame_byte = hex8_at({5'd0, snap_resp_code}, 1'b0);
|
|
|
- 8'd27: evt_frame_byte = hex8_at({5'd0, snap_resp_code}, 1'b1);
|
|
|
- 8'd28: evt_frame_byte = " ";
|
|
|
- 8'd29: evt_frame_byte = "t";
|
|
|
- 8'd30: evt_frame_byte = "=";
|
|
|
- 8'd31: evt_frame_byte = hex8_at({5'd0, snap_cmd_type}, 1'b0);
|
|
|
- 8'd32: evt_frame_byte = hex8_at({5'd0, snap_cmd_type}, 1'b1);
|
|
|
- 8'd33: evt_frame_byte = " ";
|
|
|
- 8'd34: evt_frame_byte = "p";
|
|
|
- 8'd35: evt_frame_byte = "=";
|
|
|
- 8'd36: evt_frame_byte = hex8_at({1'b0, snap_cmd_pct}, 1'b0);
|
|
|
- 8'd37: evt_frame_byte = hex8_at({1'b0, snap_cmd_pct}, 1'b1);
|
|
|
- 8'd38: evt_frame_byte = " ";
|
|
|
- 8'd39: evt_frame_byte = "t";
|
|
|
- 8'd40: evt_frame_byte = "=";
|
|
|
- 8'd41: evt_frame_byte = snap_timeout_active ? "1" : "0";
|
|
|
- 8'd42: evt_frame_byte = 8'h0d;
|
|
|
+ 8'd6: evt_frame_byte = "o";
|
|
|
+ 8'd7: evt_frame_byte = "k";
|
|
|
+ 8'd8: evt_frame_byte = "=";
|
|
|
+ 8'd9: evt_frame_byte = (snap_resp_code == RESP_OK) ? "1" : "0";
|
|
|
+ 8'd10: evt_frame_byte = " ";
|
|
|
+ 8'd11: evt_frame_byte = "e";
|
|
|
+ 8'd12: evt_frame_byte = "=";
|
|
|
+ 8'd13: evt_frame_byte = hex8_at({5'd0, snap_resp_code}, 1'b0);
|
|
|
+ 8'd14: evt_frame_byte = hex8_at({5'd0, snap_resp_code}, 1'b1);
|
|
|
+ 8'd15: evt_frame_byte = 8'h0d;
|
|
|
default: evt_frame_byte = 8'h0a;
|
|
|
endcase
|
|
|
end
|
|
|
@@ -1304,71 +1155,37 @@ module uart_rs232_j6_host_sensor_real_fan_ptc_debug921_top #(
|
|
|
8'd3: pwm_frame_byte = "W";
|
|
|
8'd4: pwm_frame_byte = "M";
|
|
|
8'd5: pwm_frame_byte = " ";
|
|
|
- 8'd6: pwm_frame_byte = "s";
|
|
|
- 8'd7: pwm_frame_byte = "e";
|
|
|
- 8'd8: pwm_frame_byte = "q";
|
|
|
- 8'd9: pwm_frame_byte = "=";
|
|
|
- 8'd10: pwm_frame_byte = hex32_at({24'd0, snap_host_seq}, 3'd0);
|
|
|
- 8'd11: pwm_frame_byte = hex32_at({24'd0, snap_host_seq}, 3'd1);
|
|
|
- 8'd12: pwm_frame_byte = hex32_at({24'd0, snap_host_seq}, 3'd2);
|
|
|
- 8'd13: pwm_frame_byte = hex32_at({24'd0, snap_host_seq}, 3'd3);
|
|
|
- 8'd14: pwm_frame_byte = hex32_at({24'd0, snap_host_seq}, 3'd4);
|
|
|
- 8'd15: pwm_frame_byte = hex32_at({24'd0, snap_host_seq}, 3'd5);
|
|
|
- 8'd16: pwm_frame_byte = hex32_at({24'd0, snap_host_seq}, 3'd6);
|
|
|
- 8'd17: pwm_frame_byte = hex32_at({24'd0, snap_host_seq}, 3'd7);
|
|
|
- 8'd18: pwm_frame_byte = " ";
|
|
|
- 8'd19: pwm_frame_byte = "s";
|
|
|
- 8'd20: pwm_frame_byte = "r";
|
|
|
- 8'd21: pwm_frame_byte = "c";
|
|
|
- 8'd22: pwm_frame_byte = "=";
|
|
|
- 8'd23: pwm_frame_byte = "h";
|
|
|
- 8'd24: pwm_frame_byte = "m";
|
|
|
- 8'd25: pwm_frame_byte = " ";
|
|
|
- 8'd26: pwm_frame_byte = "p";
|
|
|
- 8'd27: pwm_frame_byte = "i";
|
|
|
- 8'd28: pwm_frame_byte = "d";
|
|
|
- 8'd29: pwm_frame_byte = "=";
|
|
|
- 8'd30: pwm_frame_byte = "0";
|
|
|
- 8'd31: pwm_frame_byte = " ";
|
|
|
- 8'd32: pwm_frame_byte = "t";
|
|
|
- 8'd33: pwm_frame_byte = "o";
|
|
|
- 8'd34: pwm_frame_byte = "=";
|
|
|
- 8'd35: pwm_frame_byte = snap_timeout_active ? "1" : "0";
|
|
|
- 8'd36: pwm_frame_byte = " ";
|
|
|
- 8'd37: pwm_frame_byte = "p";
|
|
|
- 8'd38: pwm_frame_byte = "0";
|
|
|
- 8'd39: pwm_frame_byte = "=";
|
|
|
- 8'd40: pwm_frame_byte = hex8_at({1'b0, snap_ptc0}, 1'b0);
|
|
|
- 8'd41: pwm_frame_byte = hex8_at({1'b0, snap_ptc0}, 1'b1);
|
|
|
- 8'd42: pwm_frame_byte = " ";
|
|
|
- 8'd43: pwm_frame_byte = "f";
|
|
|
- 8'd44: pwm_frame_byte = "0";
|
|
|
- 8'd45: pwm_frame_byte = "=";
|
|
|
- 8'd46: pwm_frame_byte = hex8_at({1'b0, snap_fan0}, 1'b0);
|
|
|
- 8'd47: pwm_frame_byte = hex8_at({1'b0, snap_fan0}, 1'b1);
|
|
|
- 8'd48: pwm_frame_byte = " ";
|
|
|
- 8'd49: pwm_frame_byte = "p";
|
|
|
- 8'd50: pwm_frame_byte = "2";
|
|
|
- 8'd51: pwm_frame_byte = "3";
|
|
|
- 8'd52: pwm_frame_byte = "=";
|
|
|
- 8'd53: pwm_frame_byte = hex8_at({1'b0, snap_ptc23}, 1'b0);
|
|
|
- 8'd54: pwm_frame_byte = hex8_at({1'b0, snap_ptc23}, 1'b1);
|
|
|
- 8'd55: pwm_frame_byte = " ";
|
|
|
- 8'd56: pwm_frame_byte = "f";
|
|
|
- 8'd57: pwm_frame_byte = "3";
|
|
|
- 8'd58: pwm_frame_byte = "=";
|
|
|
- 8'd59: pwm_frame_byte = hex8_at({1'b0, snap_fan3}, 1'b0);
|
|
|
- 8'd60: pwm_frame_byte = hex8_at({1'b0, snap_fan3}, 1'b1);
|
|
|
- 8'd61: pwm_frame_byte = " ";
|
|
|
- 8'd62: pwm_frame_byte = "i";
|
|
|
- 8'd63: pwm_frame_byte = "=";
|
|
|
- 8'd64: pwm_frame_byte = hex8_at({4'd0, snap_fan_install}, 1'b0);
|
|
|
- 8'd65: pwm_frame_byte = hex8_at({4'd0, snap_fan_install}, 1'b1);
|
|
|
- 8'd66: pwm_frame_byte = " ";
|
|
|
- 8'd67: pwm_frame_byte = "g";
|
|
|
- 8'd68: pwm_frame_byte = "=";
|
|
|
- 8'd69: pwm_frame_byte = (snap_fg0_edges != 16'd0 || snap_fg7_edges != 16'd0) ? "1" : "0";
|
|
|
- 8'd70: pwm_frame_byte = 8'h0d;
|
|
|
+ 8'd6: pwm_frame_byte = "t";
|
|
|
+ 8'd7: pwm_frame_byte = "o";
|
|
|
+ 8'd8: pwm_frame_byte = "=";
|
|
|
+ 8'd9: pwm_frame_byte = snap_timeout_active ? "1" : "0";
|
|
|
+ 8'd10: pwm_frame_byte = " ";
|
|
|
+ 8'd11: pwm_frame_byte = "p";
|
|
|
+ 8'd12: pwm_frame_byte = "0";
|
|
|
+ 8'd13: pwm_frame_byte = "=";
|
|
|
+ 8'd14: pwm_frame_byte = hex8_at({1'b0, snap_ptc0}, 1'b0);
|
|
|
+ 8'd15: pwm_frame_byte = hex8_at({1'b0, snap_ptc0}, 1'b1);
|
|
|
+ 8'd16: pwm_frame_byte = " ";
|
|
|
+ 8'd17: pwm_frame_byte = "p";
|
|
|
+ 8'd18: pwm_frame_byte = "2";
|
|
|
+ 8'd19: pwm_frame_byte = "3";
|
|
|
+ 8'd20: pwm_frame_byte = "=";
|
|
|
+ 8'd21: pwm_frame_byte = hex8_at({1'b0, snap_ptc23}, 1'b0);
|
|
|
+ 8'd22: pwm_frame_byte = hex8_at({1'b0, snap_ptc23}, 1'b1);
|
|
|
+ 8'd23: pwm_frame_byte = " ";
|
|
|
+ 8'd24: pwm_frame_byte = "f";
|
|
|
+ 8'd25: pwm_frame_byte = "0";
|
|
|
+ 8'd26: pwm_frame_byte = "=";
|
|
|
+ 8'd27: pwm_frame_byte = hex8_at({1'b0, snap_fan0}, 1'b0);
|
|
|
+ 8'd28: pwm_frame_byte = hex8_at({1'b0, snap_fan0}, 1'b1);
|
|
|
+ 8'd29: pwm_frame_byte = " ";
|
|
|
+ 8'd30: pwm_frame_byte = "f";
|
|
|
+ 8'd31: pwm_frame_byte = "3";
|
|
|
+ 8'd32: pwm_frame_byte = "=";
|
|
|
+ 8'd33: pwm_frame_byte = hex8_at({1'b0, snap_fan3}, 1'b0);
|
|
|
+ 8'd34: pwm_frame_byte = hex8_at({1'b0, snap_fan3}, 1'b1);
|
|
|
+ 8'd35: pwm_frame_byte = " ";
|
|
|
+ 8'd36: pwm_frame_byte = 8'h0d;
|
|
|
default: pwm_frame_byte = 8'h0a;
|
|
|
endcase
|
|
|
end
|
|
|
@@ -1422,9 +1239,9 @@ module uart_rs232_j6_host_sensor_real_fan_ptc_debug921_top #(
|
|
|
input [5:0] line;
|
|
|
begin
|
|
|
if (line == 6'd0) begin
|
|
|
- host_report_line_length = 8'd61;
|
|
|
+ host_report_line_length = 8'd28;
|
|
|
end else if (line <= 6'd24) begin
|
|
|
- host_report_line_length = 8'd47;
|
|
|
+ host_report_line_length = 8'd34;
|
|
|
end else begin
|
|
|
host_report_line_length = 8'd0;
|
|
|
end
|
|
|
@@ -1441,61 +1258,28 @@ module uart_rs232_j6_host_sensor_real_fan_ptc_debug921_top #(
|
|
|
8'd3: sens_report_byte = "S";
|
|
|
8'd4: sens_report_byte = " ";
|
|
|
8'd5: sens_report_byte = "s";
|
|
|
- 8'd6: sens_report_byte = "e";
|
|
|
- 8'd7: sens_report_byte = "q";
|
|
|
- 8'd8: sens_report_byte = "=";
|
|
|
- 8'd9: sens_report_byte = hex32_at({16'd0, snap_report_seq}, 3'd0);
|
|
|
- 8'd10: sens_report_byte = hex32_at({16'd0, snap_report_seq}, 3'd1);
|
|
|
- 8'd11: sens_report_byte = hex32_at({16'd0, snap_report_seq}, 3'd2);
|
|
|
- 8'd12: sens_report_byte = hex32_at({16'd0, snap_report_seq}, 3'd3);
|
|
|
- 8'd13: sens_report_byte = hex32_at({16'd0, snap_report_seq}, 3'd4);
|
|
|
- 8'd14: sens_report_byte = hex32_at({16'd0, snap_report_seq}, 3'd5);
|
|
|
- 8'd15: sens_report_byte = hex32_at({16'd0, snap_report_seq}, 3'd6);
|
|
|
- 8'd16: sens_report_byte = hex32_at({16'd0, snap_report_seq}, 3'd7);
|
|
|
- 8'd17: sens_report_byte = " ";
|
|
|
- 8'd18: sens_report_byte = "s";
|
|
|
- 8'd19: sens_report_byte = "t";
|
|
|
- 8'd20: sens_report_byte = "a";
|
|
|
- 8'd21: sens_report_byte = "t";
|
|
|
- 8'd22: sens_report_byte = "u";
|
|
|
- 8'd23: sens_report_byte = "s";
|
|
|
- 8'd24: sens_report_byte = "=";
|
|
|
- 8'd25: sens_report_byte = snap_report_all_ff ? "a" : "v";
|
|
|
- 8'd26: sens_report_byte = snap_report_all_ff ? "l" : "a";
|
|
|
- 8'd27: sens_report_byte = snap_report_all_ff ? "l" : "l";
|
|
|
- 8'd28: sens_report_byte = snap_report_all_ff ? "_" : "i";
|
|
|
- 8'd29: sens_report_byte = snap_report_all_ff ? "f" : "d";
|
|
|
- 8'd30: sens_report_byte = snap_report_all_ff ? "f" : " ";
|
|
|
- 8'd31: sens_report_byte = " ";
|
|
|
- 8'd32: sens_report_byte = "v";
|
|
|
- 8'd33: sens_report_byte = "a";
|
|
|
- 8'd34: sens_report_byte = "l";
|
|
|
- 8'd35: sens_report_byte = "i";
|
|
|
- 8'd36: sens_report_byte = "d";
|
|
|
- 8'd37: sens_report_byte = "=";
|
|
|
- 8'd38: sens_report_byte = dec2_at(snap_report_valid_count, 1'b0);
|
|
|
- 8'd39: sens_report_byte = dec2_at(snap_report_valid_count, 1'b1);
|
|
|
- 8'd40: sens_report_byte = " ";
|
|
|
- 8'd41: sens_report_byte = "m";
|
|
|
- 8'd42: sens_report_byte = "i";
|
|
|
- 8'd43: sens_report_byte = "s";
|
|
|
- 8'd44: sens_report_byte = "s";
|
|
|
- 8'd45: sens_report_byte = "i";
|
|
|
- 8'd46: sens_report_byte = "n";
|
|
|
- 8'd47: sens_report_byte = "g";
|
|
|
- 8'd48: sens_report_byte = "=";
|
|
|
- 8'd49: sens_report_byte = dec2_at(snap_report_missing_count, 1'b0);
|
|
|
- 8'd50: sens_report_byte = dec2_at(snap_report_missing_count, 1'b1);
|
|
|
- 8'd51: sens_report_byte = " ";
|
|
|
- 8'd52: sens_report_byte = "f";
|
|
|
- 8'd53: sens_report_byte = "a";
|
|
|
- 8'd54: sens_report_byte = "u";
|
|
|
- 8'd55: sens_report_byte = "l";
|
|
|
- 8'd56: sens_report_byte = "t";
|
|
|
- 8'd57: sens_report_byte = "=";
|
|
|
- 8'd58: sens_report_byte = "0";
|
|
|
- 8'd59: sens_report_byte = 8'h0d;
|
|
|
- 8'd60: sens_report_byte = 8'h0a;
|
|
|
+ 8'd6: sens_report_byte = "=";
|
|
|
+ 8'd7: sens_report_byte = hex16_at(snap_report_seq, 2'd0);
|
|
|
+ 8'd8: sens_report_byte = hex16_at(snap_report_seq, 2'd1);
|
|
|
+ 8'd9: sens_report_byte = hex16_at(snap_report_seq, 2'd2);
|
|
|
+ 8'd10: sens_report_byte = hex16_at(snap_report_seq, 2'd3);
|
|
|
+ 8'd11: sens_report_byte = " ";
|
|
|
+ 8'd12: sens_report_byte = "s";
|
|
|
+ 8'd13: sens_report_byte = "t";
|
|
|
+ 8'd14: sens_report_byte = "=";
|
|
|
+ 8'd15: sens_report_byte = snap_report_all_ff ? "a" : "v";
|
|
|
+ 8'd16: sens_report_byte = " ";
|
|
|
+ 8'd17: sens_report_byte = "v";
|
|
|
+ 8'd18: sens_report_byte = "=";
|
|
|
+ 8'd19: sens_report_byte = hex8_at({2'd0, snap_report_valid_count}, 1'b0);
|
|
|
+ 8'd20: sens_report_byte = hex8_at({2'd0, snap_report_valid_count}, 1'b1);
|
|
|
+ 8'd21: sens_report_byte = " ";
|
|
|
+ 8'd22: sens_report_byte = "m";
|
|
|
+ 8'd23: sens_report_byte = "=";
|
|
|
+ 8'd24: sens_report_byte = hex8_at({2'd0, snap_report_missing_count}, 1'b0);
|
|
|
+ 8'd25: sens_report_byte = hex8_at({2'd0, snap_report_missing_count}, 1'b1);
|
|
|
+ 8'd26: sens_report_byte = 8'h0d;
|
|
|
+ 8'd27: sens_report_byte = 8'h0a;
|
|
|
default: sens_report_byte = 8'h0a;
|
|
|
endcase
|
|
|
end
|
|
|
@@ -1511,46 +1295,34 @@ module uart_rs232_j6_host_sensor_real_fan_ptc_debug921_top #(
|
|
|
8'd3: dimm_report_byte = "M";
|
|
|
8'd4: dimm_report_byte = " ";
|
|
|
8'd5: dimm_report_byte = "s";
|
|
|
- 8'd6: dimm_report_byte = "e";
|
|
|
- 8'd7: dimm_report_byte = "q";
|
|
|
- 8'd8: dimm_report_byte = "=";
|
|
|
- 8'd9: dimm_report_byte = hex32_at({16'd0, snap_report_seq}, 3'd0);
|
|
|
- 8'd10: dimm_report_byte = hex32_at({16'd0, snap_report_seq}, 3'd1);
|
|
|
- 8'd11: dimm_report_byte = hex32_at({16'd0, snap_report_seq}, 3'd2);
|
|
|
- 8'd12: dimm_report_byte = hex32_at({16'd0, snap_report_seq}, 3'd3);
|
|
|
- 8'd13: dimm_report_byte = hex32_at({16'd0, snap_report_seq}, 3'd4);
|
|
|
- 8'd14: dimm_report_byte = hex32_at({16'd0, snap_report_seq}, 3'd5);
|
|
|
- 8'd15: dimm_report_byte = hex32_at({16'd0, snap_report_seq}, 3'd6);
|
|
|
- 8'd16: dimm_report_byte = hex32_at({16'd0, snap_report_seq}, 3'd7);
|
|
|
+ 8'd6: dimm_report_byte = "=";
|
|
|
+ 8'd7: dimm_report_byte = hex16_at(snap_report_seq, 2'd0);
|
|
|
+ 8'd8: dimm_report_byte = hex16_at(snap_report_seq, 2'd1);
|
|
|
+ 8'd9: dimm_report_byte = hex16_at(snap_report_seq, 2'd2);
|
|
|
+ 8'd10: dimm_report_byte = hex16_at(snap_report_seq, 2'd3);
|
|
|
+ 8'd11: dimm_report_byte = " ";
|
|
|
+ 8'd12: dimm_report_byte = "i";
|
|
|
+ 8'd13: dimm_report_byte = "d";
|
|
|
+ 8'd14: dimm_report_byte = "=";
|
|
|
+ 8'd15: dimm_report_byte = hex8_at({3'd0, snap_dimm_id}, 1'b0);
|
|
|
+ 8'd16: dimm_report_byte = hex8_at({3'd0, snap_dimm_id}, 1'b1);
|
|
|
8'd17: dimm_report_byte = " ";
|
|
|
- 8'd18: dimm_report_byte = "i";
|
|
|
- 8'd19: dimm_report_byte = "d";
|
|
|
+ 8'd18: dimm_report_byte = "t";
|
|
|
+ 8'd19: dimm_report_byte = "p";
|
|
|
8'd20: dimm_report_byte = "=";
|
|
|
- 8'd21: dimm_report_byte = hex8_at({3'd0, snap_dimm_id}, 1'b0);
|
|
|
- 8'd22: dimm_report_byte = hex8_at({3'd0, snap_dimm_id}, 1'b1);
|
|
|
+ 8'd21: dimm_report_byte = hex8_at({1'b0, snap_dimm_temp}, 1'b0);
|
|
|
+ 8'd22: dimm_report_byte = hex8_at({1'b0, snap_dimm_temp}, 1'b1);
|
|
|
8'd23: dimm_report_byte = " ";
|
|
|
- 8'd24: dimm_report_byte = "t";
|
|
|
- 8'd25: dimm_report_byte = "e";
|
|
|
- 8'd26: dimm_report_byte = "m";
|
|
|
- 8'd27: dimm_report_byte = "p";
|
|
|
- 8'd28: dimm_report_byte = "=";
|
|
|
- 8'd29: dimm_report_byte = "0";
|
|
|
- 8'd30: dimm_report_byte = "x";
|
|
|
- 8'd31: dimm_report_byte = hex8_at({1'b0, snap_dimm_temp}, 1'b0);
|
|
|
- 8'd32: dimm_report_byte = hex8_at({1'b0, snap_dimm_temp}, 1'b1);
|
|
|
- 8'd33: dimm_report_byte = " ";
|
|
|
- 8'd34: dimm_report_byte = "m";
|
|
|
- 8'd35: dimm_report_byte = "i";
|
|
|
- 8'd36: dimm_report_byte = "s";
|
|
|
- 8'd37: dimm_report_byte = "s";
|
|
|
- 8'd38: dimm_report_byte = "=";
|
|
|
- 8'd39: dimm_report_byte = snap_dimm_missing ? "1" : "0";
|
|
|
- 8'd40: dimm_report_byte = " ";
|
|
|
- 8'd41: dimm_report_byte = "s";
|
|
|
- 8'd42: dimm_report_byte = "t";
|
|
|
- 8'd43: dimm_report_byte = "=";
|
|
|
- 8'd44: dimm_report_byte = snap_dimm_missing ? "m" : "v";
|
|
|
- 8'd45: dimm_report_byte = 8'h0d;
|
|
|
+ 8'd24: dimm_report_byte = "m";
|
|
|
+ 8'd25: dimm_report_byte = "=";
|
|
|
+ 8'd26: dimm_report_byte = snap_dimm_missing ? "1" : "0";
|
|
|
+ 8'd27: dimm_report_byte = " ";
|
|
|
+ 8'd28: dimm_report_byte = "s";
|
|
|
+ 8'd29: dimm_report_byte = "t";
|
|
|
+ 8'd30: dimm_report_byte = "=";
|
|
|
+ 8'd31: dimm_report_byte = snap_dimm_missing ? "m" : "v";
|
|
|
+ 8'd32: dimm_report_byte = 8'h0d;
|
|
|
+ 8'd33: dimm_report_byte = 8'h0a;
|
|
|
default: dimm_report_byte = 8'h0a;
|
|
|
endcase
|
|
|
end
|