[util/sw] update pwrmgr wakeup info params for dif/unittest
Signed-off-by: Timothy Chen <timothytim@google.com>
[sw/util] change param naming slightly
Signed-off-by: Timothy Chen <timothytim@google.com>
[pinmux] add usb wake connection
Signed-off-by: Timothy Chen <timothytim@google.com>
[top] Auto generate files
Signed-off-by: Timothy Chen <timothytim@google.com>
diff --git a/hw/ip/pinmux/data/pinmux.hjson b/hw/ip/pinmux/data/pinmux.hjson
index 236c5c2..8b124e1 100644
--- a/hw/ip/pinmux/data/pinmux.hjson
+++ b/hw/ip/pinmux/data/pinmux.hjson
@@ -31,7 +31,10 @@
wakeup_list: [
{ name: "aon_wkup_req",
desc: "pin wake request"
- }
+ },
+ { name: "usb_wkup_req",
+ desc: "usb wake request"
+ },
],
inter_signal_list: [
diff --git a/hw/ip/pinmux/data/pinmux.hjson.tpl b/hw/ip/pinmux/data/pinmux.hjson.tpl
index c6ff78e..7dfbfb5 100644
--- a/hw/ip/pinmux/data/pinmux.hjson.tpl
+++ b/hw/ip/pinmux/data/pinmux.hjson.tpl
@@ -31,7 +31,10 @@
wakeup_list: [
{ name: "aon_wkup_req",
desc: "pin wake request"
- }
+ },
+ { name: "usb_wkup_req",
+ desc: "usb wake request"
+ },
],
inter_signal_list: [
diff --git a/hw/ip/pwrmgr/data/pwrmgr.hjson.tpl b/hw/ip/pwrmgr/data/pwrmgr.hjson.tpl
index 717280d..8d4cd6b 100644
--- a/hw/ip/pwrmgr/data/pwrmgr.hjson.tpl
+++ b/hw/ip/pwrmgr/data/pwrmgr.hjson.tpl
@@ -101,6 +101,17 @@
default: "${NumWkups}",
local: "true"
},
+
+ % for wkup in Wkups:
+ { name: "${wkup['name'].upper()}_IDX",
+ desc: "Vector index for ${wkup['name']}, applies for WAKEUP_EN, WAKE_STATUS and WAKE_INFO",
+ type: "int",
+ default: "${loop.index}",
+ local: "true"
+ },
+
+ % endfor
+
{ name: "NumRstReqs",
desc: "Number of reset requets",
type: "int",
diff --git a/hw/top_earlgrey/data/autogen/top_earlgrey.gen.hjson b/hw/top_earlgrey/data/autogen/top_earlgrey.gen.hjson
index 27054da..2ec58a9 100644
--- a/hw/top_earlgrey/data/autogen/top_earlgrey.gen.hjson
+++ b/hw/top_earlgrey/data/autogen/top_earlgrey.gen.hjson
@@ -3851,14 +3851,14 @@
}
{
struct: logic
- width: 1
+ width: 2
type: uni
name: wakeups
act: rcv
package: ""
inst_name: pwrmgr_aon
default: ""
- top_type: broadcast
+ top_type: one-to-N
top_signame: pwrmgr_aon_wakeups
index: -1
}
@@ -4249,6 +4249,10 @@
name: aon_wkup_req
width: "1"
}
+ {
+ name: usb_wkup_req
+ width: "1"
+ }
]
reset_request_list: []
scan: "false"
@@ -4305,7 +4309,7 @@
inst_name: pinmux_aon
width: 1
top_signame: pwrmgr_aon_wakeups
- index: -1
+ index: 0
}
{
struct: logic
@@ -4315,7 +4319,9 @@
package: ""
default: 1'b0
inst_name: pinmux_aon
- index: -1
+ width: 1
+ top_signame: pwrmgr_aon_wakeups
+ index: 1
}
{
name: usb_out_of_rst
@@ -7201,6 +7207,7 @@
pwrmgr_aon.wakeups:
[
pinmux_aon.aon_wkup_req
+ pinmux_aon.usb_wkup_req
]
pwrmgr_aon.rstreqs:
[
@@ -11491,6 +11498,11 @@
width: "1"
module: pinmux_aon
}
+ {
+ name: usb_wkup_req
+ width: "1"
+ module: pinmux_aon
+ }
]
reset_requests:
[
@@ -12560,14 +12572,14 @@
}
{
struct: logic
- width: 1
+ width: 2
type: uni
name: wakeups
act: rcv
package: ""
inst_name: pwrmgr_aon
default: ""
- top_type: broadcast
+ top_type: one-to-N
top_signame: pwrmgr_aon_wakeups
index: -1
}
@@ -12879,7 +12891,7 @@
inst_name: pinmux_aon
width: 1
top_signame: pwrmgr_aon_wakeups
- index: -1
+ index: 0
}
{
struct: logic
@@ -12889,7 +12901,9 @@
package: ""
default: 1'b0
inst_name: pinmux_aon
- index: -1
+ width: 1
+ top_signame: pwrmgr_aon_wakeups
+ index: 1
}
{
name: usb_out_of_rst
@@ -15194,7 +15208,7 @@
package: ""
struct: logic
signame: pwrmgr_aon_wakeups
- width: 1
+ width: 2
type: uni
default: ""
}
diff --git a/hw/top_earlgrey/ip/pinmux/data/autogen/pinmux.hjson b/hw/top_earlgrey/ip/pinmux/data/autogen/pinmux.hjson
index cbb855b..324441a 100644
--- a/hw/top_earlgrey/ip/pinmux/data/autogen/pinmux.hjson
+++ b/hw/top_earlgrey/ip/pinmux/data/autogen/pinmux.hjson
@@ -39,7 +39,10 @@
wakeup_list: [
{ name: "aon_wkup_req",
desc: "pin wake request"
- }
+ },
+ { name: "usb_wkup_req",
+ desc: "usb wake request"
+ },
],
inter_signal_list: [
diff --git a/hw/top_earlgrey/ip/pwrmgr/data/autogen/pwrmgr.hjson b/hw/top_earlgrey/ip/pwrmgr/data/autogen/pwrmgr.hjson
index a0d51ed..d1c4482 100644
--- a/hw/top_earlgrey/ip/pwrmgr/data/autogen/pwrmgr.hjson
+++ b/hw/top_earlgrey/ip/pwrmgr/data/autogen/pwrmgr.hjson
@@ -83,7 +83,7 @@
},
{ struct: "logic",
- width: 1,
+ width: 2,
type: "uni",
name: "wakeups",
act: "rcv",
@@ -104,9 +104,25 @@
{ name: "NumWkups",
desc: "Number of wakeups",
type: "int",
+ default: "2",
+ local: "true"
+ },
+
+ { name: "AON_WKUP_REQ_IDX",
+ desc: "Vector index for aon_wkup_req, applies for WAKEUP_EN, WAKE_STATUS and WAKE_INFO",
+ type: "int",
+ default: "0",
+ local: "true"
+ },
+
+ { name: "USB_WKUP_REQ_IDX",
+ desc: "Vector index for usb_wkup_req, applies for WAKEUP_EN, WAKE_STATUS and WAKE_INFO",
+ type: "int",
default: "1",
local: "true"
},
+
+
{ name: "NumRstReqs",
desc: "Number of reset requets",
type: "int",
@@ -481,11 +497,11 @@
hwqe: "true",
resval: "0"
fields: [
- { bits: "0:0",
+ { bits: "1:0",
name: "REASONS",
desc: "Various peripheral wake reasons"
},
- { bits: "1",
+ { bits: "2",
name: "FALL_THROUGH",
desc: '''
The fall through wakeup reason indicates that despite setting a WFI and providing a low power
@@ -494,7 +510,7 @@
The power manager detects this condition, halts low power entry and reports as a wakeup reason
''',
},
- { bits: "2",
+ { bits: "3",
name: "ABORT",
desc: '''
The abort wakeup reason indicates that despite setting a WFI and providing a low power
diff --git a/hw/top_earlgrey/ip/pwrmgr/rtl/autogen/pwrmgr_reg_pkg.sv b/hw/top_earlgrey/ip/pwrmgr/rtl/autogen/pwrmgr_reg_pkg.sv
index d9ab7e5..7ae51db 100644
--- a/hw/top_earlgrey/ip/pwrmgr/rtl/autogen/pwrmgr_reg_pkg.sv
+++ b/hw/top_earlgrey/ip/pwrmgr/rtl/autogen/pwrmgr_reg_pkg.sv
@@ -7,7 +7,9 @@
package pwrmgr_reg_pkg;
// Param list
- parameter int NumWkups = 1;
+ parameter int NumWkups = 2;
+ parameter int AON_WKUP_REQ_IDX = 0;
+ parameter int USB_WKUP_REQ_IDX = 1;
parameter int NumRstReqs = 1;
// Address width within the block
@@ -69,7 +71,7 @@
typedef struct packed {
struct packed {
- logic q;
+ logic [1:0] q;
logic qe;
} reasons;
struct packed {
@@ -121,7 +123,7 @@
typedef struct packed {
struct packed {
- logic d;
+ logic [1:0] d;
} reasons;
struct packed {
logic d;
@@ -136,29 +138,29 @@
// Register to internal design logic //
///////////////////////////////////////
typedef struct packed {
- pwrmgr_reg2hw_intr_state_reg_t intr_state; // [20:20]
- pwrmgr_reg2hw_intr_enable_reg_t intr_enable; // [19:19]
- pwrmgr_reg2hw_intr_test_reg_t intr_test; // [18:17]
- pwrmgr_reg2hw_control_reg_t control; // [16:11]
- pwrmgr_reg2hw_cfg_cdc_sync_reg_t cfg_cdc_sync; // [10:9]
- pwrmgr_reg2hw_wakeup_en_mreg_t [0:0] wakeup_en; // [8:8]
- pwrmgr_reg2hw_reset_en_mreg_t [0:0] reset_en; // [7:7]
- pwrmgr_reg2hw_wake_info_capture_dis_reg_t wake_info_capture_dis; // [6:6]
- pwrmgr_reg2hw_wake_info_reg_t wake_info; // [5:0]
+ pwrmgr_reg2hw_intr_state_reg_t intr_state; // [22:22]
+ pwrmgr_reg2hw_intr_enable_reg_t intr_enable; // [21:21]
+ pwrmgr_reg2hw_intr_test_reg_t intr_test; // [20:19]
+ pwrmgr_reg2hw_control_reg_t control; // [18:13]
+ pwrmgr_reg2hw_cfg_cdc_sync_reg_t cfg_cdc_sync; // [12:11]
+ pwrmgr_reg2hw_wakeup_en_mreg_t [1:0] wakeup_en; // [10:9]
+ pwrmgr_reg2hw_reset_en_mreg_t [0:0] reset_en; // [8:8]
+ pwrmgr_reg2hw_wake_info_capture_dis_reg_t wake_info_capture_dis; // [7:7]
+ pwrmgr_reg2hw_wake_info_reg_t wake_info; // [6:0]
} pwrmgr_reg2hw_t;
///////////////////////////////////////
// Internal design logic to register //
///////////////////////////////////////
typedef struct packed {
- pwrmgr_hw2reg_intr_state_reg_t intr_state; // [15:14]
- pwrmgr_hw2reg_ctrl_cfg_regwen_reg_t ctrl_cfg_regwen; // [13:13]
- pwrmgr_hw2reg_control_reg_t control; // [12:11]
- pwrmgr_hw2reg_cfg_cdc_sync_reg_t cfg_cdc_sync; // [10:9]
- pwrmgr_hw2reg_wake_status_mreg_t [0:0] wake_status; // [8:7]
- pwrmgr_hw2reg_reset_status_mreg_t [0:0] reset_status; // [6:5]
- pwrmgr_hw2reg_escalate_reset_status_reg_t escalate_reset_status; // [4:3]
- pwrmgr_hw2reg_wake_info_reg_t wake_info; // [2:0]
+ pwrmgr_hw2reg_intr_state_reg_t intr_state; // [18:17]
+ pwrmgr_hw2reg_ctrl_cfg_regwen_reg_t ctrl_cfg_regwen; // [16:16]
+ pwrmgr_hw2reg_control_reg_t control; // [15:14]
+ pwrmgr_hw2reg_cfg_cdc_sync_reg_t cfg_cdc_sync; // [13:12]
+ pwrmgr_hw2reg_wake_status_mreg_t [1:0] wake_status; // [11:8]
+ pwrmgr_hw2reg_reset_status_mreg_t [0:0] reset_status; // [7:6]
+ pwrmgr_hw2reg_escalate_reset_status_reg_t escalate_reset_status; // [5:4]
+ pwrmgr_hw2reg_wake_info_reg_t wake_info; // [3:0]
} pwrmgr_hw2reg_t;
// Register Address
diff --git a/hw/top_earlgrey/ip/pwrmgr/rtl/autogen/pwrmgr_reg_top.sv b/hw/top_earlgrey/ip/pwrmgr/rtl/autogen/pwrmgr_reg_top.sv
index 77c0553..677f9fb 100644
--- a/hw/top_earlgrey/ip/pwrmgr/rtl/autogen/pwrmgr_reg_top.sv
+++ b/hw/top_earlgrey/ip/pwrmgr/rtl/autogen/pwrmgr_reg_top.sv
@@ -105,10 +105,14 @@
logic wakeup_en_regwen_qs;
logic wakeup_en_regwen_wd;
logic wakeup_en_regwen_we;
- logic wakeup_en_qs;
- logic wakeup_en_wd;
- logic wakeup_en_we;
- logic wake_status_qs;
+ logic wakeup_en_en_0_qs;
+ logic wakeup_en_en_0_wd;
+ logic wakeup_en_en_0_we;
+ logic wakeup_en_en_1_qs;
+ logic wakeup_en_en_1_wd;
+ logic wakeup_en_en_1_we;
+ logic wake_status_val_0_qs;
+ logic wake_status_val_1_qs;
logic reset_en_regwen_qs;
logic reset_en_regwen_wd;
logic reset_en_regwen_we;
@@ -120,8 +124,8 @@
logic wake_info_capture_dis_qs;
logic wake_info_capture_dis_wd;
logic wake_info_capture_dis_we;
- logic wake_info_reasons_qs;
- logic wake_info_reasons_wd;
+ logic [1:0] wake_info_reasons_qs;
+ logic [1:0] wake_info_reasons_wd;
logic wake_info_reasons_we;
logic wake_info_reasons_re;
logic wake_info_fall_through_qs;
@@ -436,17 +440,18 @@
// Subregister 0 of Multireg wakeup_en
// R[wakeup_en]: V(False)
+ // F[en_0]: 0:0
prim_subreg #(
.DW (1),
.SWACCESS("RW"),
.RESVAL (1'h0)
- ) u_wakeup_en (
+ ) u_wakeup_en_en_0 (
.clk_i (clk_i ),
.rst_ni (rst_ni ),
// from register interface (qualified with register enable)
- .we (wakeup_en_we & wakeup_en_regwen_qs),
- .wd (wakeup_en_wd),
+ .we (wakeup_en_en_0_we & wakeup_en_regwen_qs),
+ .wd (wakeup_en_en_0_wd),
// from internal hardware
.de (1'b0),
@@ -457,19 +462,47 @@
.q (reg2hw.wakeup_en[0].q ),
// to register interface (read)
- .qs (wakeup_en_qs)
+ .qs (wakeup_en_en_0_qs)
);
+ // F[en_1]: 1:1
+ prim_subreg #(
+ .DW (1),
+ .SWACCESS("RW"),
+ .RESVAL (1'h0)
+ ) u_wakeup_en_en_1 (
+ .clk_i (clk_i ),
+ .rst_ni (rst_ni ),
+
+ // from register interface (qualified with register enable)
+ .we (wakeup_en_en_1_we & wakeup_en_regwen_qs),
+ .wd (wakeup_en_en_1_wd),
+
+ // from internal hardware
+ .de (1'b0),
+ .d ('0 ),
+
+ // to internal hardware
+ .qe (),
+ .q (reg2hw.wakeup_en[1].q ),
+
+ // to register interface (read)
+ .qs (wakeup_en_en_1_qs)
+ );
+
+
+
// Subregister 0 of Multireg wake_status
// R[wake_status]: V(False)
+ // F[val_0]: 0:0
prim_subreg #(
.DW (1),
.SWACCESS("RO"),
.RESVAL (1'h0)
- ) u_wake_status (
+ ) u_wake_status_val_0 (
.clk_i (clk_i ),
.rst_ni (rst_ni ),
@@ -485,10 +518,36 @@
.q (),
// to register interface (read)
- .qs (wake_status_qs)
+ .qs (wake_status_val_0_qs)
);
+ // F[val_1]: 1:1
+ prim_subreg #(
+ .DW (1),
+ .SWACCESS("RO"),
+ .RESVAL (1'h0)
+ ) u_wake_status_val_1 (
+ .clk_i (clk_i ),
+ .rst_ni (rst_ni ),
+
+ .we (1'b0),
+ .wd ('0 ),
+
+ // from internal hardware
+ .de (hw2reg.wake_status[1].de),
+ .d (hw2reg.wake_status[1].d ),
+
+ // to internal hardware
+ .qe (),
+ .q (),
+
+ // to register interface (read)
+ .qs (wake_status_val_1_qs)
+ );
+
+
+
// R[reset_en_regwen]: V(False)
prim_subreg #(
@@ -628,9 +687,9 @@
// R[wake_info]: V(True)
- // F[reasons]: 0:0
+ // F[reasons]: 1:0
prim_subreg_ext #(
- .DW (1)
+ .DW (2)
) u_wake_info_reasons (
.re (wake_info_reasons_re),
.we (wake_info_reasons_we),
@@ -643,7 +702,7 @@
);
- // F[fall_through]: 1:1
+ // F[fall_through]: 2:2
prim_subreg_ext #(
.DW (1)
) u_wake_info_fall_through (
@@ -658,7 +717,7 @@
);
- // F[abort]: 2:2
+ // F[abort]: 3:3
prim_subreg_ext #(
.DW (1)
) u_wake_info_abort (
@@ -752,8 +811,12 @@
assign wakeup_en_regwen_we = addr_hit[6] & reg_we & ~wr_err;
assign wakeup_en_regwen_wd = reg_wdata[0];
- assign wakeup_en_we = addr_hit[7] & reg_we & ~wr_err;
- assign wakeup_en_wd = reg_wdata[0];
+ assign wakeup_en_en_0_we = addr_hit[7] & reg_we & ~wr_err;
+ assign wakeup_en_en_0_wd = reg_wdata[0];
+
+ assign wakeup_en_en_1_we = addr_hit[7] & reg_we & ~wr_err;
+ assign wakeup_en_en_1_wd = reg_wdata[1];
+
assign reset_en_regwen_we = addr_hit[9] & reg_we & ~wr_err;
@@ -768,15 +831,15 @@
assign wake_info_capture_dis_wd = reg_wdata[0];
assign wake_info_reasons_we = addr_hit[14] & reg_we & ~wr_err;
- assign wake_info_reasons_wd = reg_wdata[0];
+ assign wake_info_reasons_wd = reg_wdata[1:0];
assign wake_info_reasons_re = addr_hit[14] && reg_re;
assign wake_info_fall_through_we = addr_hit[14] & reg_we & ~wr_err;
- assign wake_info_fall_through_wd = reg_wdata[1];
+ assign wake_info_fall_through_wd = reg_wdata[2];
assign wake_info_fall_through_re = addr_hit[14] && reg_re;
assign wake_info_abort_we = addr_hit[14] & reg_we & ~wr_err;
- assign wake_info_abort_wd = reg_wdata[2];
+ assign wake_info_abort_wd = reg_wdata[3];
assign wake_info_abort_re = addr_hit[14] && reg_re;
// Read data return
@@ -817,11 +880,13 @@
end
addr_hit[7]: begin
- reg_rdata_next[0] = wakeup_en_qs;
+ reg_rdata_next[0] = wakeup_en_en_0_qs;
+ reg_rdata_next[1] = wakeup_en_en_1_qs;
end
addr_hit[8]: begin
- reg_rdata_next[0] = wake_status_qs;
+ reg_rdata_next[0] = wake_status_val_0_qs;
+ reg_rdata_next[1] = wake_status_val_1_qs;
end
addr_hit[9]: begin
@@ -845,9 +910,9 @@
end
addr_hit[14]: begin
- reg_rdata_next[0] = wake_info_reasons_qs;
- reg_rdata_next[1] = wake_info_fall_through_qs;
- reg_rdata_next[2] = wake_info_abort_qs;
+ reg_rdata_next[1:0] = wake_info_reasons_qs;
+ reg_rdata_next[2] = wake_info_fall_through_qs;
+ reg_rdata_next[3] = wake_info_abort_qs;
end
default: begin
diff --git a/hw/top_earlgrey/rtl/autogen/top_earlgrey.sv b/hw/top_earlgrey/rtl/autogen/top_earlgrey.sv
index b982134..273038a 100644
--- a/hw/top_earlgrey/rtl/autogen/top_earlgrey.sv
+++ b/hw/top_earlgrey/rtl/autogen/top_earlgrey.sv
@@ -432,7 +432,7 @@
lc_ctrl_pkg::lc_tx_t lc_ctrl_lc_iso_part_sw_rd_en;
lc_ctrl_pkg::lc_tx_t lc_ctrl_lc_iso_part_sw_wr_en;
lc_ctrl_pkg::lc_tx_t lc_ctrl_lc_seed_hw_rd_en;
- logic pwrmgr_aon_wakeups;
+ logic [1:0] pwrmgr_aon_wakeups;
logic pwrmgr_aon_rstreqs;
tlul_pkg::tl_h2d_t rom_tl_req;
tlul_pkg::tl_d2h_t rom_tl_rsp;
@@ -1505,8 +1505,8 @@
.dft_strap_test_o(),
.io_pok_i({pinmux_pkg::NIOPokSignals{1'b1}}),
.sleep_en_i(1'b0),
- .aon_wkup_req_o(pwrmgr_aon_wakeups),
- .usb_wkup_req_o(),
+ .aon_wkup_req_o(pwrmgr_aon_wakeups[0]),
+ .usb_wkup_req_o(pwrmgr_aon_wakeups[1]),
.usb_out_of_rst_i(usbdev_usb_out_of_rst),
.usb_aon_wake_en_i(usbdev_usb_aon_wake_en),
.usb_aon_wake_ack_i(usbdev_usb_aon_wake_ack),
diff --git a/hw/top_earlgrey/sw/autogen/top_earlgrey.h b/hw/top_earlgrey/sw/autogen/top_earlgrey.h
index c918e74..b341e1a 100644
--- a/hw/top_earlgrey/sw/autogen/top_earlgrey.h
+++ b/hw/top_earlgrey/sw/autogen/top_earlgrey.h
@@ -1193,7 +1193,8 @@
*/
typedef enum top_earlgrey_power_manager_wake_ups {
kTopEarlgreyPowerManagerWakeUpsPinmuxAonAonWkupReq = 0, /**< */
- kTopEarlgreyPowerManagerWakeUpsLast = 0, /**< \internal Last valid pwrmgr wakeup signal */
+ kTopEarlgreyPowerManagerWakeUpsPinmuxAonUsbWkupReq = 1, /**< */
+ kTopEarlgreyPowerManagerWakeUpsLast = 1, /**< \internal Last valid pwrmgr wakeup signal */
} top_earlgrey_power_manager_wake_ups_t;
/**
diff --git a/sw/device/lib/dif/dif_pwrmgr.c b/sw/device/lib/dif/dif_pwrmgr.c
index 76e175c..230fa6e 100644
--- a/sw/device/lib/dif/dif_pwrmgr.c
+++ b/sw/device/lib/dif/dif_pwrmgr.c
@@ -67,7 +67,10 @@
(1u << PWRMGR_WAKEUP_EN_EN_0_BIT),
"Layout of WAKEUP_EN register changed.");
_Static_assert(kDifPwrmgrWakeupRequestSourceOne ==
- (1u << PWRMGR_WAKE_INFO_REASONS_BIT),
+ (1u << PWRMGR_PARAM_AON_WKUP_REQ_IDX),
+ "Layout of WAKE_INFO register changed.");
+_Static_assert(kDifPwrmgrWakeupRequestSourceTwo ==
+ (1u << PWRMGR_PARAM_USB_WKUP_REQ_IDX),
"Layout of WAKE_INFO register changed.");
/**
diff --git a/sw/device/lib/dif/dif_pwrmgr.h b/sw/device/lib/dif/dif_pwrmgr.h
index 6d4176b..8838121 100644
--- a/sw/device/lib/dif/dif_pwrmgr.h
+++ b/sw/device/lib/dif/dif_pwrmgr.h
@@ -127,6 +127,7 @@
*/
typedef enum dif_pwrmgr_wakeup_request_source {
kDifPwrmgrWakeupRequestSourceOne = (1u << 0),
+ kDifPwrmgrWakeupRequestSourceTwo = (1u << 1),
} dif_pwrmgr_wakeup_request_source_t;
/**
diff --git a/sw/device/tests/dif/dif_pwrmgr_unittest.cc b/sw/device/tests/dif/dif_pwrmgr_unittest.cc
index 3bbef81..83a1ecb 100644
--- a/sw/device/tests/dif/dif_pwrmgr_unittest.cc
+++ b/sw/device/tests/dif/dif_pwrmgr_unittest.cc
@@ -624,7 +624,11 @@
.value = 1,
},
{
- .offset = PWRMGR_WAKE_INFO_REASONS_BIT,
+ .offset = PWRMGR_PARAM_USB_WKUP_REQ_IDX,
+ .value = 1,
+ },
+ {
+ .offset = PWRMGR_PARAM_AON_WKUP_REQ_IDX,
.value = 1,
}},
.exp_output =
@@ -662,7 +666,7 @@
// Only requests from peripherals.
{
.read_val = {{
- .offset = PWRMGR_WAKE_INFO_REASONS_BIT,
+ .offset = PWRMGR_PARAM_AON_WKUP_REQ_IDX,
.value = 1,
}},
.exp_output =
diff --git a/util/topgen.py b/util/topgen.py
index 810f7c7..25ea189 100755
--- a/util/topgen.py
+++ b/util/topgen.py
@@ -666,7 +666,9 @@
with hjson_tpl_path.open(mode='r', encoding='UTF-8') as fin:
hjson_tpl = Template(fin.read())
try:
- out = hjson_tpl.render(NumWkups=n_wkups, NumRstReqs=n_rstreqs)
+ out = hjson_tpl.render(NumWkups=n_wkups,
+ Wkups=top["wakeups"],
+ NumRstReqs=n_rstreqs)
except: # noqa: E722
log.error(exceptions.text_error_template().render())