../src/lowrisc_ip_rstmgr_pkg_0.1/rtl/rstmgr_pkg.sv Cov: 100%
1: package rstmgr_pkg;
2:
3: // global constants
4: parameter int ALWAYS_ON_SEL = pwrmgr_pkg::ALWAYS_ON_DOMAIN;
5:
6: // params that reference pwrmgr, should be replaced once pwrmgr is merged
7: localparam int PowerDomains = pwrmgr_pkg::PowerDomains;
8: localparam int ExtResetReasons = pwrmgr_pkg::HwRstReqs;
9:
10: // calculated domains
11: localparam int OffDomains = PowerDomains-1;
12:
13: // low power exit + external reasons + ndm_reset_req
14: localparam int ResetReasons = 1 + ExtResetReasons + 1;
15:
16: // ast interface
17: typedef struct packed {
18: logic vcc_pok;
19: logic alw_pok;
20: } rstmgr_ast_t;
21:
22: // default value for rstmgr_ast_rsp_t (for dangling ports)
23: parameter rstmgr_ast_t RSTMGR_AST_DEFAULT = '{
24: vcc_pok: 1'b1,
25: alw_pok: 1'b1
26: };
27:
28: // resets generated and broadcast
29: // This should be templatized and generated
30: typedef struct packed {
31: logic rst_por_aon_n;
32: logic rst_por_n;
33: logic rst_por_io_n;
34: logic rst_por_usb_n;
35: logic rst_lc_n;
36: logic rst_sys_io_n;
37: logic rst_sys_n;
38: logic rst_spi_device_n;
39: logic rst_usb_n;
40: } rstmgr_out_t;
41:
42: // peripherals reset requests
43: typedef struct packed {
44: logic rst_cpu_n;
45: logic ndmreset_req;
46: } rstmgr_cpu_t;
47:
48: // default value for rstmgr_ast_rsp_t (for dangling ports)
49: parameter rstmgr_cpu_t RSTMGR_CPU_DEFAULT = '{
50: rst_cpu_n: 1'b1,
51: ndmreset_req: '0
52: };
53:
54: // peripherals reset requests
55: typedef struct packed {
56: logic [ExtResetReasons-1:0] rst_reqs;
57: } rstmgr_peri_t;
58:
59: // default value for rstmgr_ast_rsp_t (for dangling ports)
60: parameter rstmgr_peri_t RSTMGR_PERI_DEFAULT = '{
61: rst_reqs: '0
62: };
63:
64:
65: endpackage // rstmgr_pkg
66: