summaryrefslogtreecommitdiffstats
path: root/main.v
diff options
context:
space:
mode:
authorRaptor Engineering Development Team <support@raptorengineering.com>2018-01-17 16:56:28 -0600
committerRaptor Engineering Development Team <support@raptorengineering.com>2018-01-17 16:56:28 -0600
commit945865df6ea0cb0acb62e03acbfa008b7df27cf3 (patch)
treec4193e36c4119c71569cda21eded10ada1a5d86e /main.v
parent1ea8951b542ffebb30a44b898d4d13117cbe5e37 (diff)
downloadblackbird-system-fpga-945865df6ea0cb0acb62e03acbfa008b7df27cf3.tar.gz
blackbird-system-fpga-945865df6ea0cb0acb62e03acbfa008b7df27cf3.zip
Indicate BMC boot phase as follows:
1.) Initial power-on / U-Boot: KR pattern 2.) Kernel / userspace booting: fading pattern
Diffstat (limited to 'main.v')
-rw-r--r--main.v54
1 files changed, 48 insertions, 6 deletions
diff --git a/main.v b/main.v
index 2ffb23a..2caa6c8 100644
--- a/main.v
+++ b/main.v
@@ -76,7 +76,7 @@ module system_fpga_top
output reg window_open_n,
// BMC system reset signalling
- output reg bmc_system_reset_request_n,
+ inout bmc_system_reset_request_n,
// Component disable lines
output reg pmc_disable_n,
@@ -172,6 +172,21 @@ module system_fpga_top
.D_OUT_0(1'b1)
);
+ // The chassis reset request line serves two purposes
+ // 1.) While the BMC is offline, it indicates U-Boot / Kernel boot phase (1 / 0, respectively)
+ // 2.) When the BMC goes online, it serves as the active low chassis reset request line
+ reg chassis_reset_request = 1'b0;
+ wire bmc_boot_phase_in;
+ SB_IO #(
+ .PIN_TYPE(6'b101001),
+ .PULLUP(1'b1)
+ ) bmc_system_reset_request_n_io (
+ .PACKAGE_PIN(bmc_system_reset_request_n),
+ .OUTPUT_ENABLE(~bmc_boot_complete_n),
+ .D_OUT_0(~chassis_reset_request),
+ .D_IN_0(bmc_boot_phase_in)
+ );
+
// I2C pin control lines
wire i2c_scl_in;
wire i2c_scl_out;
@@ -386,6 +401,23 @@ module system_fpga_top
end
end
+ // Determine BMC boot phase
+ reg [1:0] bmc_boot_phase = 0;
+ always @(posedge clk_in) begin
+ if (!bmc_rst || (bmc_boot_complete_n && (bmc_boot_phase == 2))) begin
+ bmc_boot_phase = 0;
+ end else begin
+ if (bmc_boot_phase == 0) begin
+ if (!bmc_boot_phase_in) begin
+ bmc_boot_phase = 1;
+ end
+ end
+ if (!bmc_boot_complete_n) begin
+ bmc_boot_phase = 2;
+ end
+ end
+ end
+
assign i2c_rst = 1'b0;
// Handle I2C
// 2 8-bit registers with PGOOD state on error
@@ -833,21 +865,31 @@ module system_fpga_top
// Assign front panel indicators according to BMC status
always @(posedge clk_in) begin
- if (!bmc_boot_complete_n) begin
+ if (bmc_boot_phase == 0) begin
+ // U-Boot phase
+ panel_nic1_led_cathode = bmc_startup_kr[0];
+ panel_nic2_led_cathode = bmc_startup_kr[1];
+ panel_uid_led = bmc_startup_kr[2];
+ end else if (bmc_boot_phase == 1) begin
+ // Kernel phase
+ panel_nic1_led_cathode = bmc_startup_fader[0];
+ panel_nic2_led_cathode = bmc_startup_fader[1];
+ panel_uid_led = bmc_startup_fader[2];
+ end else if (bmc_boot_phase == 2) begin
panel_nic1_led_cathode = panel_nic1_led_cathode_std;
panel_nic2_led_cathode = panel_nic2_led_cathode_std;
panel_uid_led = panel_uid_led_std;
end else begin
- panel_nic1_led_cathode = bmc_startup_fader[0];
- panel_nic2_led_cathode = bmc_startup_fader[1];
- panel_uid_led = bmc_startup_fader[2];
+ panel_nic1_led_cathode = 1'b1;
+ panel_nic2_led_cathode = 1'b1;
+ panel_uid_led = panel_uid_led_std;
end
end
// Generate master reset request signals
always @(posedge clk_in) begin
master_reset_reqest = ~(panel_reset_in_l & flexver_reset_in_l);
- bmc_system_reset_request_n = ~master_reset_reqest;
+ chassis_reset_request = master_reset_reqest;
end
endmodule
OpenPOWER on IntegriCloud