[top] auto-generate top level files
Signed-off-by: Timothy Chen <timothytim@google.com>
diff --git a/hw/top_earlgrey/data/autogen/top_earlgrey.gen.hjson b/hw/top_earlgrey/data/autogen/top_earlgrey.gen.hjson
index 53a9821..43d0303 100644
--- a/hw/top_earlgrey/data/autogen/top_earlgrey.gen.hjson
+++ b/hw/top_earlgrey/data/autogen/top_earlgrey.gen.hjson
@@ -2519,7 +2519,7 @@
alert_list:
[
{
- name: err
+ name: fault_err
width: 1
bits: "0"
bitinfo:
@@ -2531,6 +2531,19 @@
type: alert
async: 0
}
+ {
+ name: operation_err
+ width: 1
+ bits: "1"
+ bitinfo:
+ [
+ 2
+ 1
+ 1
+ ]
+ type: alert
+ async: 0
+ }
]
wakeup_list: []
reset_request_list: []
@@ -5180,7 +5193,7 @@
module_name: sensor_ctrl
}
{
- name: keymgr_err
+ name: keymgr_fault_err
width: 1
bits: "0"
bitinfo:
@@ -5194,6 +5207,20 @@
module_name: keymgr
}
{
+ name: keymgr_operation_err
+ width: 1
+ bits: "1"
+ bitinfo:
+ [
+ 2
+ 1
+ 1
+ ]
+ type: alert
+ async: 0
+ module_name: keymgr
+ }
+ {
name: otp_ctrl_otp_macro_failure
width: 1
bits: "0"
diff --git a/hw/top_earlgrey/dv/autogen/tb__alert_handler_connect.sv b/hw/top_earlgrey/dv/autogen/tb__alert_handler_connect.sv
index 4379d42..7abbf1f 100644
--- a/hw/top_earlgrey/dv/autogen/tb__alert_handler_connect.sv
+++ b/hw/top_earlgrey/dv/autogen/tb__alert_handler_connect.sv
@@ -11,5 +11,6 @@
assign alert_if[4].alert_tx = `CHIP_HIER.u_otbn.alert_tx_o[2];
assign alert_if[5].alert_tx = `CHIP_HIER.u_sensor_ctrl.alert_tx_o[0];
assign alert_if[6].alert_tx = `CHIP_HIER.u_keymgr.alert_tx_o[0];
-assign alert_if[7].alert_tx = `CHIP_HIER.u_otp_ctrl.alert_tx_o[0];
-assign alert_if[8].alert_tx = `CHIP_HIER.u_otp_ctrl.alert_tx_o[1];
+assign alert_if[7].alert_tx = `CHIP_HIER.u_keymgr.alert_tx_o[1];
+assign alert_if[8].alert_tx = `CHIP_HIER.u_otp_ctrl.alert_tx_o[0];
+assign alert_if[9].alert_tx = `CHIP_HIER.u_otp_ctrl.alert_tx_o[1];
diff --git a/hw/top_earlgrey/dv/env/autogen/alert_handler_env_pkg__params.sv b/hw/top_earlgrey/dv/env/autogen/alert_handler_env_pkg__params.sv
index bb4639f..913a561 100644
--- a/hw/top_earlgrey/dv/env/autogen/alert_handler_env_pkg__params.sv
+++ b/hw/top_earlgrey/dv/env/autogen/alert_handler_env_pkg__params.sv
@@ -11,9 +11,10 @@
"otbn_dmem_uncorrectable",
"otbn_reg_uncorrectable",
"sensor_ctrl_ast_alerts",
- "keymgr_err",
+ "keymgr_fault_err",
+ "keymgr_operation_err",
"otp_ctrl_otp_macro_failure",
"otp_ctrl_otp_check_failure"
};
-parameter uint NUM_ALERTS = 9;
+parameter uint NUM_ALERTS = 10;
diff --git a/hw/top_earlgrey/ip/alert_handler/data/autogen/alert_handler.hjson b/hw/top_earlgrey/ip/alert_handler/data/autogen/alert_handler.hjson
index 55185b1..d254c61 100644
--- a/hw/top_earlgrey/ip/alert_handler/data/autogen/alert_handler.hjson
+++ b/hw/top_earlgrey/ip/alert_handler/data/autogen/alert_handler.hjson
@@ -29,7 +29,7 @@
{ name: "NAlerts",
desc: "Number of peripheral inputs",
type: "int",
- default: "15",
+ default: "16",
local: "true"
},
{ name: "EscCntDw",
@@ -47,7 +47,7 @@
{ name: "AsyncOn",
desc: "Number of peripheral outputs",
type: "logic [NAlerts-1:0]",
- default: "15'b110111111100000",
+ default: "16'b1100111111100000",
local: "true"
},
{ name: "N_CLASSES",
diff --git a/hw/top_earlgrey/ip/alert_handler/dv/alert_handler_env_pkg__params.sv b/hw/top_earlgrey/ip/alert_handler/dv/alert_handler_env_pkg__params.sv
index e2eab0a..8e87f00 100644
--- a/hw/top_earlgrey/ip/alert_handler/dv/alert_handler_env_pkg__params.sv
+++ b/hw/top_earlgrey/ip/alert_handler/dv/alert_handler_env_pkg__params.sv
@@ -10,5 +10,5 @@
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
-parameter uint NUM_ALERTS = 15;
-parameter bit [NUM_ALERTS-1:0] ASYNC_ON = 15'b110111111100000;
+parameter uint NUM_ALERTS = 16;
+parameter bit [NUM_ALERTS-1:0] ASYNC_ON = 16'b1100111111100000;
diff --git a/hw/top_earlgrey/ip/alert_handler/rtl/autogen/alert_handler_reg_pkg.sv b/hw/top_earlgrey/ip/alert_handler/rtl/autogen/alert_handler_reg_pkg.sv
index e02fa9a..04fdc21 100644
--- a/hw/top_earlgrey/ip/alert_handler/rtl/autogen/alert_handler_reg_pkg.sv
+++ b/hw/top_earlgrey/ip/alert_handler/rtl/autogen/alert_handler_reg_pkg.sv
@@ -7,10 +7,10 @@
package alert_handler_reg_pkg;
// Param list
- parameter int NAlerts = 15;
+ parameter int NAlerts = 16;
parameter int EscCntDw = 32;
parameter int AccuCntDw = 16;
- parameter logic [NAlerts-1:0] AsyncOn = 15'b110111111100000;
+ parameter logic [NAlerts-1:0] AsyncOn = 16'b1100111111100000;
parameter int N_CLASSES = 4;
parameter int N_ESC_SEV = 4;
parameter int N_PHASES = 4;
@@ -454,14 +454,14 @@
// Register to internal design logic //
///////////////////////////////////////
typedef struct packed {
- alert_handler_reg2hw_intr_state_reg_t intr_state; // [884:881]
- alert_handler_reg2hw_intr_enable_reg_t intr_enable; // [880:877]
- alert_handler_reg2hw_intr_test_reg_t intr_test; // [876:869]
- alert_handler_reg2hw_regen_reg_t regen; // [868:868]
- alert_handler_reg2hw_ping_timeout_cyc_reg_t ping_timeout_cyc; // [867:844]
- alert_handler_reg2hw_alert_en_mreg_t [14:0] alert_en; // [843:829]
- alert_handler_reg2hw_alert_class_mreg_t [14:0] alert_class; // [828:799]
- alert_handler_reg2hw_alert_cause_mreg_t [14:0] alert_cause; // [798:784]
+ alert_handler_reg2hw_intr_state_reg_t intr_state; // [888:885]
+ alert_handler_reg2hw_intr_enable_reg_t intr_enable; // [884:881]
+ alert_handler_reg2hw_intr_test_reg_t intr_test; // [880:873]
+ alert_handler_reg2hw_regen_reg_t regen; // [872:872]
+ alert_handler_reg2hw_ping_timeout_cyc_reg_t ping_timeout_cyc; // [871:848]
+ alert_handler_reg2hw_alert_en_mreg_t [15:0] alert_en; // [847:832]
+ alert_handler_reg2hw_alert_class_mreg_t [15:0] alert_class; // [831:800]
+ alert_handler_reg2hw_alert_cause_mreg_t [15:0] alert_cause; // [799:784]
alert_handler_reg2hw_loc_alert_en_mreg_t [3:0] loc_alert_en; // [783:780]
alert_handler_reg2hw_loc_alert_class_mreg_t [3:0] loc_alert_class; // [779:772]
alert_handler_reg2hw_loc_alert_cause_mreg_t [3:0] loc_alert_cause; // [771:768]
@@ -503,8 +503,8 @@
// Internal design logic to register //
///////////////////////////////////////
typedef struct packed {
- alert_handler_hw2reg_intr_state_reg_t intr_state; // [257:254]
- alert_handler_hw2reg_alert_cause_mreg_t [14:0] alert_cause; // [253:224]
+ alert_handler_hw2reg_intr_state_reg_t intr_state; // [259:256]
+ alert_handler_hw2reg_alert_cause_mreg_t [15:0] alert_cause; // [255:224]
alert_handler_hw2reg_loc_alert_cause_mreg_t [3:0] loc_alert_cause; // [223:216]
alert_handler_hw2reg_classa_clren_reg_t classa_clren; // [215:216]
alert_handler_hw2reg_classa_accum_cnt_reg_t classa_accum_cnt; // [215:216]
diff --git a/hw/top_earlgrey/ip/alert_handler/rtl/autogen/alert_handler_reg_top.sv b/hw/top_earlgrey/ip/alert_handler/rtl/autogen/alert_handler_reg_top.sv
index 416951f..dbef3a6 100644
--- a/hw/top_earlgrey/ip/alert_handler/rtl/autogen/alert_handler_reg_top.sv
+++ b/hw/top_earlgrey/ip/alert_handler/rtl/autogen/alert_handler_reg_top.sv
@@ -154,6 +154,9 @@
logic alert_en_en_a_14_qs;
logic alert_en_en_a_14_wd;
logic alert_en_en_a_14_we;
+ logic alert_en_en_a_15_qs;
+ logic alert_en_en_a_15_wd;
+ logic alert_en_en_a_15_we;
logic [1:0] alert_class_class_a_0_qs;
logic [1:0] alert_class_class_a_0_wd;
logic alert_class_class_a_0_we;
@@ -199,6 +202,9 @@
logic [1:0] alert_class_class_a_14_qs;
logic [1:0] alert_class_class_a_14_wd;
logic alert_class_class_a_14_we;
+ logic [1:0] alert_class_class_a_15_qs;
+ logic [1:0] alert_class_class_a_15_wd;
+ logic alert_class_class_a_15_we;
logic alert_cause_a_0_qs;
logic alert_cause_a_0_wd;
logic alert_cause_a_0_we;
@@ -244,6 +250,9 @@
logic alert_cause_a_14_qs;
logic alert_cause_a_14_wd;
logic alert_cause_a_14_we;
+ logic alert_cause_a_15_qs;
+ logic alert_cause_a_15_wd;
+ logic alert_cause_a_15_we;
logic loc_alert_en_en_la_0_qs;
logic loc_alert_en_en_la_0_wd;
logic loc_alert_en_en_la_0_we;
@@ -1240,6 +1249,32 @@
);
+ // F[en_a_15]: 15:15
+ prim_subreg #(
+ .DW (1),
+ .SWACCESS("RW"),
+ .RESVAL (1'h0)
+ ) u_alert_en_en_a_15 (
+ .clk_i (clk_i ),
+ .rst_ni (rst_ni ),
+
+ // from register interface (qualified with register enable)
+ .we (alert_en_en_a_15_we & regen_qs),
+ .wd (alert_en_en_a_15_wd),
+
+ // from internal hardware
+ .de (1'b0),
+ .d ('0 ),
+
+ // to internal hardware
+ .qe (),
+ .q (reg2hw.alert_en[15].q ),
+
+ // to register interface (read)
+ .qs (alert_en_en_a_15_qs)
+ );
+
+
// Subregister 0 of Multireg alert_class
@@ -1635,6 +1670,32 @@
);
+ // F[class_a_15]: 31:30
+ prim_subreg #(
+ .DW (2),
+ .SWACCESS("RW"),
+ .RESVAL (2'h0)
+ ) u_alert_class_class_a_15 (
+ .clk_i (clk_i ),
+ .rst_ni (rst_ni ),
+
+ // from register interface (qualified with register enable)
+ .we (alert_class_class_a_15_we & regen_qs),
+ .wd (alert_class_class_a_15_wd),
+
+ // from internal hardware
+ .de (1'b0),
+ .d ('0 ),
+
+ // to internal hardware
+ .qe (),
+ .q (reg2hw.alert_class[15].q ),
+
+ // to register interface (read)
+ .qs (alert_class_class_a_15_qs)
+ );
+
+
// Subregister 0 of Multireg alert_cause
@@ -2030,6 +2091,32 @@
);
+ // F[a_15]: 15:15
+ prim_subreg #(
+ .DW (1),
+ .SWACCESS("W1C"),
+ .RESVAL (1'h0)
+ ) u_alert_cause_a_15 (
+ .clk_i (clk_i ),
+ .rst_ni (rst_ni ),
+
+ // from register interface
+ .we (alert_cause_a_15_we),
+ .wd (alert_cause_a_15_wd),
+
+ // from internal hardware
+ .de (hw2reg.alert_cause[15].de),
+ .d (hw2reg.alert_cause[15].d ),
+
+ // to internal hardware
+ .qe (),
+ .q (reg2hw.alert_cause[15].q ),
+
+ // to register interface (read)
+ .qs (alert_cause_a_15_qs)
+ );
+
+
// Subregister 0 of Multireg loc_alert_en
@@ -4677,6 +4764,9 @@
assign alert_en_en_a_14_we = addr_hit[5] & reg_we & ~wr_err;
assign alert_en_en_a_14_wd = reg_wdata[14];
+ assign alert_en_en_a_15_we = addr_hit[5] & reg_we & ~wr_err;
+ assign alert_en_en_a_15_wd = reg_wdata[15];
+
assign alert_class_class_a_0_we = addr_hit[6] & reg_we & ~wr_err;
assign alert_class_class_a_0_wd = reg_wdata[1:0];
@@ -4722,6 +4812,9 @@
assign alert_class_class_a_14_we = addr_hit[6] & reg_we & ~wr_err;
assign alert_class_class_a_14_wd = reg_wdata[29:28];
+ assign alert_class_class_a_15_we = addr_hit[6] & reg_we & ~wr_err;
+ assign alert_class_class_a_15_wd = reg_wdata[31:30];
+
assign alert_cause_a_0_we = addr_hit[7] & reg_we & ~wr_err;
assign alert_cause_a_0_wd = reg_wdata[0];
@@ -4767,6 +4860,9 @@
assign alert_cause_a_14_we = addr_hit[7] & reg_we & ~wr_err;
assign alert_cause_a_14_wd = reg_wdata[14];
+ assign alert_cause_a_15_we = addr_hit[7] & reg_we & ~wr_err;
+ assign alert_cause_a_15_wd = reg_wdata[15];
+
assign loc_alert_en_en_la_0_we = addr_hit[8] & reg_we & ~wr_err;
assign loc_alert_en_en_la_0_wd = reg_wdata[0];
@@ -5092,6 +5188,7 @@
reg_rdata_next[12] = alert_en_en_a_12_qs;
reg_rdata_next[13] = alert_en_en_a_13_qs;
reg_rdata_next[14] = alert_en_en_a_14_qs;
+ reg_rdata_next[15] = alert_en_en_a_15_qs;
end
addr_hit[6]: begin
@@ -5110,6 +5207,7 @@
reg_rdata_next[25:24] = alert_class_class_a_12_qs;
reg_rdata_next[27:26] = alert_class_class_a_13_qs;
reg_rdata_next[29:28] = alert_class_class_a_14_qs;
+ reg_rdata_next[31:30] = alert_class_class_a_15_qs;
end
addr_hit[7]: begin
@@ -5128,6 +5226,7 @@
reg_rdata_next[12] = alert_cause_a_12_qs;
reg_rdata_next[13] = alert_cause_a_13_qs;
reg_rdata_next[14] = alert_cause_a_14_qs;
+ reg_rdata_next[15] = alert_cause_a_15_qs;
end
addr_hit[8]: begin
diff --git a/hw/top_earlgrey/rtl/autogen/top_earlgrey.sv b/hw/top_earlgrey/rtl/autogen/top_earlgrey.sv
index d25c020..e396100 100644
--- a/hw/top_earlgrey/rtl/autogen/top_earlgrey.sv
+++ b/hw/top_earlgrey/rtl/autogen/top_earlgrey.sv
@@ -990,9 +990,10 @@
.intr_op_done_o (intr_keymgr_op_done),
.intr_err_o (intr_keymgr_err),
- // [9]: err
- .alert_tx_o ( alert_tx[9:9] ),
- .alert_rx_i ( alert_rx[9:9] ),
+ // [9]: fault_err
+ // [10]: operation_err
+ .alert_tx_o ( alert_tx[10:9] ),
+ .alert_rx_i ( alert_rx[10:9] ),
// Inter-module signals
.aes_key_o(),
@@ -1015,10 +1016,10 @@
.intr_otp_operation_done_o (intr_otp_ctrl_otp_operation_done),
.intr_otp_error_o (intr_otp_ctrl_otp_error),
- // [10]: otp_macro_failure
- // [11]: otp_check_failure
- .alert_tx_o ( alert_tx[11:10] ),
- .alert_rx_i ( alert_rx[11:10] ),
+ // [11]: otp_macro_failure
+ // [12]: otp_check_failure
+ .alert_tx_o ( alert_tx[12:11] ),
+ .alert_rx_i ( alert_rx[12:11] ),
// Inter-module signals
.otp_ast_pwr_seq_o(otp_ctrl_otp_ast_pwr_seq_o),
@@ -1057,11 +1058,11 @@
.intr_done_o (intr_otbn_done),
.intr_err_o (intr_otbn_err),
- // [12]: imem_uncorrectable
- // [13]: dmem_uncorrectable
- // [14]: reg_uncorrectable
- .alert_tx_o ( alert_tx[14:12] ),
- .alert_rx_i ( alert_rx[14:12] ),
+ // [13]: imem_uncorrectable
+ // [14]: dmem_uncorrectable
+ // [15]: reg_uncorrectable
+ .alert_tx_o ( alert_tx[15:13] ),
+ .alert_rx_i ( alert_rx[15:13] ),
// Inter-module signals
.idle_o(clkmgr_idle[2]),
diff --git a/hw/top_earlgrey/sw/autogen/top_earlgrey.c b/hw/top_earlgrey/sw/autogen/top_earlgrey.c
index 6f62acb..becafff 100644
--- a/hw/top_earlgrey/sw/autogen/top_earlgrey.c
+++ b/hw/top_earlgrey/sw/autogen/top_earlgrey.c
@@ -106,7 +106,7 @@
* `top_earlgrey_alert_peripheral_t`.
*/
const top_earlgrey_alert_peripheral_t
- top_earlgrey_alert_for_peripheral[15] = {
+ top_earlgrey_alert_for_peripheral[16] = {
[kTopEarlgreyAlertIdAesCtrlErrUpdate] = kTopEarlgreyAlertPeripheralAes,
[kTopEarlgreyAlertIdAesCtrlErrStorage] = kTopEarlgreyAlertPeripheralAes,
[kTopEarlgreyAlertIdOtbnImemUncorrectable] = kTopEarlgreyAlertPeripheralOtbn,
@@ -119,7 +119,8 @@
[kTopEarlgreyAlertIdSensorCtrlAstAlerts4] = kTopEarlgreyAlertPeripheralSensorCtrl,
[kTopEarlgreyAlertIdSensorCtrlAstAlerts5] = kTopEarlgreyAlertPeripheralSensorCtrl,
[kTopEarlgreyAlertIdSensorCtrlAstAlerts6] = kTopEarlgreyAlertPeripheralSensorCtrl,
- [kTopEarlgreyAlertIdKeymgrErr] = kTopEarlgreyAlertPeripheralKeymgr,
+ [kTopEarlgreyAlertIdKeymgrFaultErr] = kTopEarlgreyAlertPeripheralKeymgr,
+ [kTopEarlgreyAlertIdKeymgrOperationErr] = kTopEarlgreyAlertPeripheralKeymgr,
[kTopEarlgreyAlertIdOtpCtrlOtpMacroFailure] = kTopEarlgreyAlertPeripheralOtpCtrl,
[kTopEarlgreyAlertIdOtpCtrlOtpCheckFailure] = kTopEarlgreyAlertPeripheralOtpCtrl,
};
diff --git a/hw/top_earlgrey/sw/autogen/top_earlgrey.h b/hw/top_earlgrey/sw/autogen/top_earlgrey.h
index c911b8f..0fd66fa 100644
--- a/hw/top_earlgrey/sw/autogen/top_earlgrey.h
+++ b/hw/top_earlgrey/sw/autogen/top_earlgrey.h
@@ -597,10 +597,11 @@
kTopEarlgreyAlertIdSensorCtrlAstAlerts4 = 9, /**< sensor_ctrl_ast_alerts 4 */
kTopEarlgreyAlertIdSensorCtrlAstAlerts5 = 10, /**< sensor_ctrl_ast_alerts 5 */
kTopEarlgreyAlertIdSensorCtrlAstAlerts6 = 11, /**< sensor_ctrl_ast_alerts 6 */
- kTopEarlgreyAlertIdKeymgrErr = 12, /**< keymgr_err */
- kTopEarlgreyAlertIdOtpCtrlOtpMacroFailure = 13, /**< otp_ctrl_otp_macro_failure */
- kTopEarlgreyAlertIdOtpCtrlOtpCheckFailure = 14, /**< otp_ctrl_otp_check_failure */
- kTopEarlgreyAlertIdLast = 14, /**< \internal The Last Valid Alert ID. */
+ kTopEarlgreyAlertIdKeymgrFaultErr = 12, /**< keymgr_fault_err */
+ kTopEarlgreyAlertIdKeymgrOperationErr = 13, /**< keymgr_operation_err */
+ kTopEarlgreyAlertIdOtpCtrlOtpMacroFailure = 14, /**< otp_ctrl_otp_macro_failure */
+ kTopEarlgreyAlertIdOtpCtrlOtpCheckFailure = 15, /**< otp_ctrl_otp_check_failure */
+ kTopEarlgreyAlertIdLast = 15, /**< \internal The Last Valid Alert ID. */
} top_earlgrey_alert_id_t;
/**
@@ -610,7 +611,7 @@
* `top_earlgrey_alert_peripheral_t`.
*/
extern const top_earlgrey_alert_peripheral_t
- top_earlgrey_alert_for_peripheral[15];
+ top_earlgrey_alert_for_peripheral[16];
#define PINMUX_PERIPH_INSEL_IDX_OFFSET 2