lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 1 | // Copyright lowRISC contributors. |
| 2 | // Licensed under the Apache License, Version 2.0, see LICENSE for details. |
| 3 | // SPDX-License-Identifier: Apache-2.0 |
| 4 | // |
| 5 | // TOP Earlgrey configuration |
| 6 | { name: "earlgrey", |
| 7 | type: "top", |
| 8 | |
Michael Schaffner | 7b0807d | 2020-10-27 19:54:52 -0700 | [diff] [blame] | 9 | ///////////////////////////////////////////////////////////// |
| 10 | // Seed for compile-time random constants // |
| 11 | // NOTE: REPLACE THIS WITH A NEW VALUE BEFORE THE TAPEOUT // |
| 12 | ///////////////////////////////////////////////////////////// |
| 13 | rnd_cnst_seed: 4881560218908238235 |
| 14 | |
| 15 | // 32-bit datawidth |
Timothy Chen | c623393 | 2020-08-19 15:34:07 -0700 | [diff] [blame] | 16 | datawidth: "32", |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 17 | |
Timothy Chen | 7f8cc8e | 2020-11-11 13:15:57 -0800 | [diff] [blame] | 18 | // Power information for the design |
| 19 | power: { |
| 20 | // Power domains supported by the design |
| 21 | // Aon represents domain aon |
| 22 | // 0 represents domain 0 |
| 23 | domains: ["Aon", "0"], |
| 24 | |
| 25 | // Default power domain used for the design |
| 26 | default: "0" |
| 27 | }, |
| 28 | |
Michael Schaffner | 7b0807d | 2020-10-27 19:54:52 -0700 | [diff] [blame] | 29 | // This is the clock data structure of the design. |
Timothy Chen | f56c1b5 | 2020-04-28 17:00:43 -0700 | [diff] [blame] | 30 | // The hier path refers to the clock reference path (struct / port) |
| 31 | // - The top/ext desgination follows the same scheme as inter-module |
Timothy Chen | 0550d69 | 2020-04-20 17:19:35 -0700 | [diff] [blame] | 32 | // The src key indicates the raw clock sources in the design |
| 33 | // The groups key indicates the various clock groupings in the design |
| 34 | clocks: { |
| 35 | |
Timothy Chen | f56c1b5 | 2020-04-28 17:00:43 -0700 | [diff] [blame] | 36 | hier_paths: { |
| 37 | top: "clkmgr_clocks.", // top level is a struct |
| 38 | ext: "", // ext is a port of the clock name |
| 39 | }, |
| 40 | |
Timothy Chen | 33b3b9d | 2020-05-08 10:14:17 -0700 | [diff] [blame] | 41 | // Clock Source attributes |
| 42 | // name: Name of group. |
| 43 | // aon: Whether the clock is free running all the time. |
| 44 | // If it is, the clock is not hanlded by clkmgr. |
| 45 | // freq: Absolute frequency of clk in Hz |
Timothy Chen | 0550d69 | 2020-04-20 17:19:35 -0700 | [diff] [blame] | 46 | srcs: [ |
Timothy Chen | 33b3b9d | 2020-05-08 10:14:17 -0700 | [diff] [blame] | 47 | { name: "main", aon: "no", freq: "100000000" } |
Timothy Chen | ced60b2 | 2020-08-20 10:35:00 -0700 | [diff] [blame] | 48 | { name: "io", aon: "no", freq: "96000000" } |
Timothy Chen | 33b3b9d | 2020-05-08 10:14:17 -0700 | [diff] [blame] | 49 | { name: "usb", aon: "no", freq: "48000000" } |
| 50 | { name: "aon", aon: "yes", freq: "200000" } |
Timothy Chen | 0550d69 | 2020-04-20 17:19:35 -0700 | [diff] [blame] | 51 | ], |
| 52 | |
Timothy Chen | 79972ad | 2020-06-30 17:13:49 -0700 | [diff] [blame] | 53 | // Derived clock source attributes |
| 54 | // name: Name of group. |
| 55 | // aon: Whether the clock is free running all the time. |
| 56 | // If it is, the clock is not hanlded by clkmgr. |
| 57 | // freq: Absolute frequency of clk in Hz |
| 58 | // src: From which clock source is the clock derived |
| 59 | // div: Ratio between derived clock and source clock |
| 60 | derived_srcs: [ |
Timothy Chen | ced60b2 | 2020-08-20 10:35:00 -0700 | [diff] [blame] | 61 | { name: "io_div2", aon: "no", div: 2, src: "io", freq: "48000000" } |
| 62 | { name: "io_div4", aon: "no", div: 4, src: "io", freq: "24000000" } |
Timothy Chen | 79972ad | 2020-06-30 17:13:49 -0700 | [diff] [blame] | 63 | ], |
| 64 | |
Timothy Chen | 0550d69 | 2020-04-20 17:19:35 -0700 | [diff] [blame] | 65 | // Clock Group attributes |
| 66 | // name: name of group. |
| 67 | // |
Timothy Chen | f56c1b5 | 2020-04-28 17:00:43 -0700 | [diff] [blame] | 68 | // src: The hierarchical source of the clock |
| 69 | // "ext" - clock is supplied from a port of the top module |
| 70 | // "top" - clock is supplied from a net inside the top module |
| 71 | // |
Rupert Swarbrick | cba33a2 | 2020-07-02 16:46:38 +0100 | [diff] [blame] | 72 | // sw_cg: whether software is allowed to gate the clock |
Timothy Chen | 0550d69 | 2020-04-20 17:19:35 -0700 | [diff] [blame] | 73 | // "no" - software is not allowed to gate clocks |
| 74 | // "yes" - software is allowed to gate clocks |
| 75 | // "hint" - software can provide a hint, and hw controls the rest |
| 76 | // |
| 77 | // unique: whether each module in the group can be separately gated |
Rupert Swarbrick | cba33a2 | 2020-07-02 16:46:38 +0100 | [diff] [blame] | 78 | // if sw_cg is "no", this field has no meaning |
Timothy Chen | 0550d69 | 2020-04-20 17:19:35 -0700 | [diff] [blame] | 79 | // "yes" - each clock is individually controlled |
| 80 | // "no" - the group is controlled as one single unit |
| 81 | // |
| 82 | // The powerup and proc groups are unique. |
Timothy Chen | 33b3b9d | 2020-05-08 10:14:17 -0700 | [diff] [blame] | 83 | // The powerup group of clocks do not feed through the clock |
Timothy Chen | 0550d69 | 2020-04-20 17:19:35 -0700 | [diff] [blame] | 84 | // controller as they manage clock controller behavior |
Michael Schaffner | be5cb9c | 2020-11-19 19:53:47 -0800 | [diff] [blame] | 85 | // The proc group is not peripheral, and directly hardwired |
Timothy Chen | 0550d69 | 2020-04-20 17:19:35 -0700 | [diff] [blame] | 86 | |
| 87 | groups: [ |
Timothy Chen | 79972ad | 2020-06-30 17:13:49 -0700 | [diff] [blame] | 88 | // the powerup group is used exclusively by clk/pwr/rstmgr |
| 89 | { name: "powerup", src:"top", sw_cg: "no" } |
Timothy Chen | f56c1b5 | 2020-04-28 17:00:43 -0700 | [diff] [blame] | 90 | { name: "trans", src:"top", sw_cg: "hint", unique: "yes", } |
| 91 | { name: "infra", src:"top", sw_cg: "no", } |
| 92 | { name: "secure", src:"top", sw_cg: "no" } |
| 93 | { name: "peri", src:"top", sw_cg: "yes", unique: "no" } |
| 94 | { name: "timers", src:"top", sw_cg: "no" } |
Timothy Chen | 0550d69 | 2020-04-20 17:19:35 -0700 | [diff] [blame] | 95 | { name: "proc", |
Timothy Chen | c623393 | 2020-08-19 15:34:07 -0700 | [diff] [blame] | 96 | src: "no", |
| 97 | sw_cg: "no", |
| 98 | unique: "no", |
Timothy Chen | 0550d69 | 2020-04-20 17:19:35 -0700 | [diff] [blame] | 99 | clocks: { |
| 100 | clk_proc_main: main |
| 101 | } |
| 102 | } |
| 103 | ], |
Timothy Chen | c623393 | 2020-08-19 15:34:07 -0700 | [diff] [blame] | 104 | }, |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 105 | |
Timothy Chen | c623393 | 2020-08-19 15:34:07 -0700 | [diff] [blame] | 106 | // This is the reset data strcture of the design. |
| 107 | // The hier path refers to the reset reference path (struct / port) |
| 108 | // - The top/ext desgination follows the same scheme as inter-module |
| 109 | // The node key represents all the known resets in the design |
| 110 | resets: { |
| 111 | |
| 112 | hier_paths: { |
| 113 | top: "rstmgr_resets.", // top level is a struct |
| 114 | ext: "", // ext is a port of the clock name |
| 115 | }, |
| 116 | |
| 117 | // Reset node attributes |
| 118 | // name: name of reset. |
| 119 | // |
| 120 | // gen: whether the reset is generated |
| 121 | // true: it is a generated reset inside rstmgr |
| 122 | // false: it is a hardwired design reset inside rstmgr (roots and por) |
Timothy Chen | 7f8cc8e | 2020-11-11 13:15:57 -0800 | [diff] [blame] | 123 | // For non-generated resets, the parent / domain definitions have no meaning. |
Timothy Chen | c623393 | 2020-08-19 15:34:07 -0700 | [diff] [blame] | 124 | // |
| 125 | // type: the reset type [ext, top] |
| 126 | // ext: the reset is coming in from the ports, external to earlgrey |
| 127 | // int: the reset is only used inside rstmgr |
| 128 | // top: the reset is output from rstmgr to top level struct |
| 129 | // |
| 130 | // parent: The parent reset |
| 131 | // If type is "ext", there is no root, since it is external |
| 132 | // |
Timothy Chen | 7f8cc8e | 2020-11-11 13:15:57 -0800 | [diff] [blame] | 133 | // domains: The power domains of a particular reset |
| 134 | // This is a list of of the supported power domains. |
| 135 | // Valid values are Aon and (power domain)0 ~ (power domain)1. |
| 136 | // If no value is supplied, the default is only the Aon version. |
Timothy Chen | c623393 | 2020-08-19 15:34:07 -0700 | [diff] [blame] | 137 | // |
| 138 | // clk: related clock domain for synchronous release |
| 139 | // If type is "por", there is not related clock, since it is |
| 140 | // likely external or generated from a voltage comparator |
| 141 | // |
| 142 | nodes: [ |
Timothy Chen | 7f8cc8e | 2020-11-11 13:15:57 -0800 | [diff] [blame] | 143 | { name: "rst_ni", gen: false, type: "ext", } |
| 144 | { name: "por_aon", gen: false, type: "top", domains: ["Aon" ], clk: "aon" } |
| 145 | { name: "lc_src", gen: false, type: "int", domains: ["Aon", "0"], clk: "io_div4" } |
| 146 | { name: "sys_src", gen: false, type: "int", domains: ["Aon", "0"], clk: "io_div4" } |
| 147 | { name: "por", gen: true, type: "top", domains: ["Aon" ], parent: "por_aon", clk: "main" } |
| 148 | { name: "por_io", gen: true, type: "top", domains: ["Aon", ], parent: "por_aon", clk: "io" } |
| 149 | { name: "por_io_div2", gen: true, type: "top", domains: ["Aon", ], parent: "por_aon", clk: "io_div2" } |
| 150 | { name: "por_io_div4", gen: true , type: "top", domains: ["Aon", ], parent: "por_aon", clk: "io_div4" } |
| 151 | { name: "por_usb", gen: true, type: "top", domains: ["Aon", ], parent: "por_aon", clk: "usb" } |
| 152 | { name: "lc", gen: true, type: "top", domains: [ "0"], parent: "lc_src", clk: "main" } |
| 153 | { name: "lc_io_div4", gen: true, type: "top", domains: [ "0"], parent: "lc_src", clk: "io_div4" } |
| 154 | { name: "sys", gen: true, type: "top", domains: ["Aon", "0"], parent: "sys_src", clk: "main" } |
| 155 | { name: "sys_io_div4", gen: true, type: "top", domains: ["Aon", "0"], parent: "sys_src", clk: "io_div4" } |
| 156 | { name: "sys_aon", gen: true, type: "top", domains: ["Aon", ], parent: "sys_src", clk: "aon" } |
| 157 | { name: "spi_device", gen: true, type: "top", domains: [ "0"], parent: "sys_src", clk: "io_div2", sw: 1 } |
| 158 | { name: "usb", gen: true, type: "top", domains: ["Aon", ], parent: "sys_src", clk: "usb", sw: 1 } |
Timothy Chen | c623393 | 2020-08-19 15:34:07 -0700 | [diff] [blame] | 159 | ] |
| 160 | } |
Timothy Chen | 3193b00 | 2019-10-04 16:56:05 -0700 | [diff] [blame] | 161 | |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 162 | // Number of cores: used in rv_plic and timer |
| 163 | num_cores: "1", |
| 164 | |
Timothy Chen | e4e857d | 2020-12-16 18:00:01 -0800 | [diff] [blame] | 165 | |
| 166 | // `host` defines the host only components in the system (such as processor) |
| 167 | // This should eventually be used to cover more functionality, but for now, |
| 168 | // it is a temporary solution for top level connectivity |
| 169 | host: [ |
| 170 | { name: "rv_core_ibex", |
| 171 | type: "rv_core_ibex", |
| 172 | inter_signal_list: [ |
| 173 | { struct: "esc_tx", |
| 174 | type: "uni", |
| 175 | name: "esc_nmi_tx", |
| 176 | act: "rcv", |
| 177 | package: "prim_esc_pkg", |
| 178 | }, |
| 179 | |
| 180 | { struct: "esc_rx", |
| 181 | type: "uni", |
| 182 | name: "esc_nmi_rx", |
| 183 | act: "req", |
| 184 | package: "prim_esc_pkg", |
| 185 | }, |
Timothy Chen | f524c21 | 2020-12-17 14:08:45 -0800 | [diff] [blame] | 186 | |
| 187 | { struct: "crashdump", |
| 188 | type: "uni", |
| 189 | name: "crashdump", |
| 190 | act: "req", |
| 191 | package: "rv_core_ibex_pkg", |
| 192 | }, |
Timothy Chen | e4e857d | 2020-12-16 18:00:01 -0800 | [diff] [blame] | 193 | ], |
| 194 | } |
| 195 | |
| 196 | ] |
| 197 | |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 198 | // `module` defines the peripherals. |
| 199 | // Details are coming from each modules' config file `ip.hjson` |
| 200 | // TODO: Define parameter here |
Timothy Chen | dde6805 | 2020-08-05 16:29:35 -0700 | [diff] [blame] | 201 | // generated: A module is templated and generated as part of topgen |
| 202 | // top_only: A module is not templated but is specific to 'top_*' instead of 'ip' |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 203 | module: [ |
| 204 | { name: "uart", // instance name |
| 205 | type: "uart", // Must be matched to the ip name in `ip.hson` (_reg, _cfg permitted) |
| 206 | // and `hw/ip/{type}` |
Timothy Chen | 3193b00 | 2019-10-04 16:56:05 -0700 | [diff] [blame] | 207 | |
Timothy Chen | 80bd8aa | 2019-10-04 15:57:11 -0700 | [diff] [blame] | 208 | // clock connections defines the port to top level clock connection |
| 209 | // the ip.hjson will declare the clock port names |
| 210 | // If none are defined at ip.hjson, clk_i is used by default |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 211 | clock_srcs: {clk_i: "io_div4"}, |
Timothy Chen | 3193b00 | 2019-10-04 16:56:05 -0700 | [diff] [blame] | 212 | |
| 213 | // reset connections defines the port to top level reset connection |
| 214 | // the ip.hjson will declare the reset port names |
Timothy Chen | 80bd8aa | 2019-10-04 15:57:11 -0700 | [diff] [blame] | 215 | // If none are defined at ip.hjson, rst_ni is used by default |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 216 | reset_connections: {rst_ni: "sys_io_div4"}, |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 217 | base_addr: "0x40000000", |
| 218 | }, |
| 219 | { name: "gpio", |
| 220 | type: "gpio", |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 221 | clock_srcs: {clk_i: "io_div4"}, |
Timothy Chen | 0550d69 | 2020-04-20 17:19:35 -0700 | [diff] [blame] | 222 | clock_group: "peri", |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 223 | reset_connections: {rst_ni: "sys_io_div4"}, |
Martin Lueker-Boden | d5a1e4b | 2020-11-11 19:46:33 -0800 | [diff] [blame] | 224 | base_addr: "0x40040000", |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 225 | } |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 226 | { name: "spi_device", |
| 227 | type: "spi_device", |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 228 | clock_srcs: {clk_i: "io_div4"}, |
Timothy Chen | 0550d69 | 2020-04-20 17:19:35 -0700 | [diff] [blame] | 229 | clock_group: "peri", |
Timothy Chen | 3193b00 | 2019-10-04 16:56:05 -0700 | [diff] [blame] | 230 | reset_connections: {rst_ni: "spi_device"}, |
Martin Lueker-Boden | d5a1e4b | 2020-11-11 19:46:33 -0800 | [diff] [blame] | 231 | base_addr: "0x40050000", |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 232 | }, |
| 233 | { name: "rv_timer", |
| 234 | type: "rv_timer", |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 235 | clock_srcs: {clk_i: "io_div4"}, |
Timothy Chen | 0550d69 | 2020-04-20 17:19:35 -0700 | [diff] [blame] | 236 | clock_group: "timers", |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 237 | reset_connections: {rst_ni: "sys_io_div4"}, |
Martin Lueker-Boden | d5a1e4b | 2020-11-11 19:46:33 -0800 | [diff] [blame] | 238 | base_addr: "0x40100000", |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 239 | }, |
Martin Lueker-Boden | d5a1e4b | 2020-11-11 19:46:33 -0800 | [diff] [blame] | 240 | { name: "sensor_ctrl", |
| 241 | type: "sensor_ctrl", |
| 242 | clock_srcs: {clk_i: "io_div4"}, |
| 243 | clock_group: "secure", |
| 244 | clock_reset_export: ["ast"], |
| 245 | reset_connections: {rst_ni: "sys_io_div4"}, |
| 246 | domain: "Aon", |
Pirmin Vogel | d453438 | 2019-10-17 13:18:31 +0100 | [diff] [blame] | 247 | base_addr: "0x40110000", |
Martin Lueker-Boden | d5a1e4b | 2020-11-11 19:46:33 -0800 | [diff] [blame] | 248 | top_only: "true" |
Pirmin Vogel | d453438 | 2019-10-17 13:18:31 +0100 | [diff] [blame] | 249 | }, |
Martin Lueker-Boden | d5a1e4b | 2020-11-11 19:46:33 -0800 | [diff] [blame] | 250 | { name: "otp_ctrl", |
| 251 | type: "otp_ctrl", |
| 252 | clock_srcs: {clk_i: "io_div4"}, |
| 253 | clock_group: "timers", |
| 254 | reset_connections: {rst_ni: "lc_io_div4"}, |
| 255 | base_addr: "0x40130000", |
Timothy Chen | 65e1667 | 2020-12-05 09:17:14 -0800 | [diff] [blame] | 256 | }, |
Michael Schaffner | 60aa10e | 2020-12-07 19:39:08 -0800 | [diff] [blame] | 257 | { name: "lc_ctrl", |
| 258 | type: "lc_ctrl", |
| 259 | clock_srcs: {clk_i: "io_div4"}, |
| 260 | clock_group: "timers", |
| 261 | reset_connections: {rst_ni: "lc_io_div4"}, |
| 262 | base_addr: "0x40140000", |
| 263 | }, |
Michael Schaffner | be5cb9c | 2020-11-19 19:53:47 -0800 | [diff] [blame] | 264 | { name: "alert_handler", |
| 265 | type: "alert_handler", |
| 266 | clock_srcs: {clk_i: "io_div4"}, |
| 267 | clock_group: "timers", |
| 268 | reset_connections: {rst_ni: "sys_io_div4"}, |
| 269 | base_addr: "0x40150000", |
| 270 | generated: "true" // Indicate this module is generated in the topgen |
| 271 | localparam: { |
| 272 | EscCntDw: 32, |
| 273 | AccuCntDw: 16, |
| 274 | LfsrSeed: "0x7FFFFFFF" |
| 275 | } |
| 276 | }, |
| 277 | // dummy module to capture the alert handler escalation signals |
| 278 | // and test them by converting them into IRQs |
| 279 | { name: "nmi_gen", |
| 280 | type: "nmi_gen", |
| 281 | clock_srcs: {clk_i: "io_div4"}, |
| 282 | clock_group: "timers", |
| 283 | reset_connections: {rst_ni: "sys_io_div4"}, |
| 284 | base_addr: "0x40160000", |
| 285 | } |
Timothy Chen | 163050b | 2020-04-13 23:29:29 -0700 | [diff] [blame] | 286 | { name: "pwrmgr", |
| 287 | type: "pwrmgr", |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 288 | clock_srcs: {clk_i: "io_div4", clk_slow_i: "aon"}, |
Timothy Chen | 0550d69 | 2020-04-20 17:19:35 -0700 | [diff] [blame] | 289 | clock_group: "powerup", |
Timothy Chen | a4cc10d | 2020-05-08 16:06:20 -0700 | [diff] [blame] | 290 | reset_connections: {rst_ni: "por", rst_slow_ni: "por_aon"}, |
Timothy Chen | 7f8cc8e | 2020-11-11 13:15:57 -0800 | [diff] [blame] | 291 | domain: "Aon", |
Martin Lueker-Boden | d5a1e4b | 2020-11-11 19:46:33 -0800 | [diff] [blame] | 292 | base_addr: "0x40400000", |
Timothy Chen | 4ba2531 | 2020-06-17 13:08:57 -0700 | [diff] [blame] | 293 | generated: "true" // Indicate this module is generated in the topgen |
Timothy Chen | f56c1b5 | 2020-04-28 17:00:43 -0700 | [diff] [blame] | 294 | |
Timothy Chen | 163050b | 2020-04-13 23:29:29 -0700 | [diff] [blame] | 295 | }, |
Timothy Chen | c59f701 | 2020-04-16 19:11:42 -0700 | [diff] [blame] | 296 | { name: "rstmgr", |
| 297 | type: "rstmgr", |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 298 | clock_srcs: {clk_i: "io_div4", clk_aon_i: "aon", clk_main_i: "main", clk_io_i: "io", clk_usb_i: "usb", |
Timothy Chen | 0f3c175 | 2020-08-26 12:47:17 -0700 | [diff] [blame] | 299 | clk_io_div2_i: "io_div2", clk_io_div4_i: "io_div4"}, |
Timothy Chen | c59f701 | 2020-04-16 19:11:42 -0700 | [diff] [blame] | 300 | clock_group: "powerup", |
| 301 | reset_connections: {rst_ni: "rst_ni"}, |
Timothy Chen | 7f8cc8e | 2020-11-11 13:15:57 -0800 | [diff] [blame] | 302 | domain: "Aon", |
Martin Lueker-Boden | d5a1e4b | 2020-11-11 19:46:33 -0800 | [diff] [blame] | 303 | base_addr: "0x40410000", |
Timothy Chen | 0f3c175 | 2020-08-26 12:47:17 -0700 | [diff] [blame] | 304 | generated: "true" // Indicate this module is generated in the topgen |
Timothy Chen | f56c1b5 | 2020-04-28 17:00:43 -0700 | [diff] [blame] | 305 | }, |
| 306 | { name: "clkmgr", |
| 307 | type: "clkmgr", |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 308 | clock_srcs: {clk_i: "io_div4"}, |
Timothy Chen | f56c1b5 | 2020-04-28 17:00:43 -0700 | [diff] [blame] | 309 | clock_group: "powerup", |
Timothy Chen | 7f8cc8e | 2020-11-11 13:15:57 -0800 | [diff] [blame] | 310 | reset_connections: {rst_ni: "por_io_div4", rst_main_ni: "por", rst_io_ni: "por_io", rst_usb_ni: "por_usb" |
Timothy Chen | ced60b2 | 2020-08-20 10:35:00 -0700 | [diff] [blame] | 311 | rst_io_div2_ni: "por_io_div2", rst_io_div4_ni: "por_io_div4"}, |
Timothy Chen | 7f8cc8e | 2020-11-11 13:15:57 -0800 | [diff] [blame] | 312 | domain: "Aon", |
Martin Lueker-Boden | d5a1e4b | 2020-11-11 19:46:33 -0800 | [diff] [blame] | 313 | base_addr: "0x40420000", |
Timothy Chen | c59f701 | 2020-04-16 19:11:42 -0700 | [diff] [blame] | 314 | generated: "true" |
| 315 | }, |
Martin Lueker-Boden | d5a1e4b | 2020-11-11 19:46:33 -0800 | [diff] [blame] | 316 | // pinmux is currently allocated to main fabric, |
| 317 | // however this should probably be moved to peri fabric |
| 318 | { name: "pinmux", |
| 319 | type: "pinmux", |
| 320 | clock: "main", |
| 321 | clock_srcs: {clk_i: "main", clk_aon_i: "aon"}, |
| 322 | clock_group: "secure", |
| 323 | reset_connections: {rst_ni: "sys", rst_aon_ni: "sys_aon"}, |
| 324 | domain: "Aon", |
| 325 | base_addr: "0x40460000", |
| 326 | generated: "true" |
| 327 | }, |
| 328 | // see comment regarding pinmux above |
| 329 | { name: "padctrl", |
| 330 | type: "padctrl", |
| 331 | clock: "main", |
Timothy Chen | 0550d69 | 2020-04-20 17:19:35 -0700 | [diff] [blame] | 332 | clock_srcs: {clk_i: "main"}, |
| 333 | clock_group: "secure", |
Michael Schaffner | 666dde1 | 2019-10-25 11:57:54 -0700 | [diff] [blame] | 334 | reset_connections: {rst_ni: "sys"}, |
Martin Lueker-Boden | d5a1e4b | 2020-11-11 19:46:33 -0800 | [diff] [blame] | 335 | domain: "Aon", |
| 336 | base_addr: "0x40470000", |
| 337 | generated: "true" |
| 338 | }, |
Pirmin Vogel | ea91b30 | 2020-01-14 18:53:01 +0000 | [diff] [blame] | 339 | { name: "usbdev", |
| 340 | type: "usbdev", |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 341 | clock_srcs: {clk_i: "io_div4", clk_usb_48mhz_i: "usb"}, |
Timothy Chen | 0550d69 | 2020-04-20 17:19:35 -0700 | [diff] [blame] | 342 | clock_group: "peri", |
Timothy Chen | 4c8905e | 2020-08-26 10:34:33 -0700 | [diff] [blame] | 343 | clock_reset_export: ["ast"], |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 344 | reset_connections: {rst_ni: "sys_io_div4", rst_usb_48mhz_ni: "usb"}, |
Timothy Chen | 7f8cc8e | 2020-11-11 13:15:57 -0800 | [diff] [blame] | 345 | domain: "Aon", |
Martin Lueker-Boden | d5a1e4b | 2020-11-11 19:46:33 -0800 | [diff] [blame] | 346 | base_addr: "0x40500000", |
Pirmin Vogel | ea91b30 | 2020-01-14 18:53:01 +0000 | [diff] [blame] | 347 | }, |
Michael Schaffner | bd9a354 | 2020-12-21 13:08:32 -0800 | [diff] [blame] | 348 | { name: "sram_ctrl_ret", |
| 349 | type: "sram_ctrl", |
| 350 | clock_srcs: {clk_i: "io_div4", clk_otp_i: "io_div4"}, |
| 351 | clock_group: "peri", |
| 352 | reset_connections: {rst_ni: "sys_io_div4", rst_otp_ni: "lc_io_div4"}, |
| 353 | domain: "Aon", |
| 354 | base_addr: "0x40510000" |
| 355 | }, |
Martin Lueker-Boden | d5a1e4b | 2020-11-11 19:46:33 -0800 | [diff] [blame] | 356 | { name: "flash_ctrl", |
| 357 | type: "flash_ctrl", |
Timothy Chen | f52a461 | 2020-12-04 20:37:49 -0800 | [diff] [blame] | 358 | clock_srcs: {clk_i: "main", clk_otp_i: "io_div4"}, |
Martin Lueker-Boden | d5a1e4b | 2020-11-11 19:46:33 -0800 | [diff] [blame] | 359 | clock_group: "infra", |
Timothy Chen | f52a461 | 2020-12-04 20:37:49 -0800 | [diff] [blame] | 360 | reset_connections: {rst_ni: "lc", rst_otp_ni: "lc_io_div4"}, |
Martin Lueker-Boden | d5a1e4b | 2020-11-11 19:46:33 -0800 | [diff] [blame] | 361 | base_addr: "0x41000000", |
| 362 | generated: "true" // Indicate this module is generated in the topgen |
| 363 | }, |
| 364 | { name: "rv_plic", |
| 365 | type: "rv_plic", |
| 366 | clock_srcs: {clk_i: "main"}, |
Timothy Chen | dde6805 | 2020-08-05 16:29:35 -0700 | [diff] [blame] | 367 | clock_group: "secure", |
Martin Lueker-Boden | d5a1e4b | 2020-11-11 19:46:33 -0800 | [diff] [blame] | 368 | reset_connections: {rst_ni: "sys"}, |
| 369 | base_addr: "0x41010000", |
| 370 | generated: "true" // Indicate this module is generated in the topgen |
| 371 | }, |
| 372 | { name: "aes", |
| 373 | type: "aes", |
| 374 | clock_srcs: {clk_i: "main"}, |
| 375 | clock_group: "trans", |
| 376 | reset_connections: {rst_ni: "sys"}, |
| 377 | base_addr: "0x41100000", |
| 378 | }, |
| 379 | { name: "hmac", |
| 380 | type: "hmac", |
| 381 | clock_srcs: {clk_i: "main"}, |
| 382 | clock_group: "trans", |
| 383 | reset_connections: {rst_ni: "sys"}, |
| 384 | base_addr: "0x41110000", |
| 385 | }, |
| 386 | { name: "kmac" |
| 387 | type: "kmac" |
| 388 | clock_srcs: {clk_i: "main"} |
| 389 | clock_group: "trans" |
| 390 | reset_connections: {rst_ni: "sys"} |
| 391 | base_addr: "0x41120000" |
Timothy Chen | dde6805 | 2020-08-05 16:29:35 -0700 | [diff] [blame] | 392 | }, |
Timothy Chen | 3c3f348 | 2020-09-09 18:45:41 -0700 | [diff] [blame] | 393 | { name: "keymgr", |
| 394 | type: "keymgr", |
Timothy Chen | d5820b0 | 2020-12-05 17:19:06 -0800 | [diff] [blame] | 395 | clock_srcs: {clk_i: "main", clk_edn_i: "main"}, |
Timothy Chen | 3c3f348 | 2020-09-09 18:45:41 -0700 | [diff] [blame] | 396 | clock_group: "secure", |
Timothy Chen | d5820b0 | 2020-12-05 17:19:06 -0800 | [diff] [blame] | 397 | reset_connections: {rst_ni: "sys", rst_edn_ni: "sys"}, |
Martin Lueker-Boden | d5a1e4b | 2020-11-11 19:46:33 -0800 | [diff] [blame] | 398 | base_addr: "0x41130000", |
Michael Schaffner | 5ae4a23 | 2020-10-06 19:03:43 -0700 | [diff] [blame] | 399 | }, |
Mark Branstad | ff80736 | 2020-11-16 07:56:15 -0800 | [diff] [blame] | 400 | { name: "csrng", |
| 401 | type: "csrng", |
| 402 | clock_srcs: {clk_i: "main"}, |
| 403 | clock_group: "secure", |
| 404 | reset_connections: {rst_ni: "sys"}, |
| 405 | base_addr: "0x41150000", |
| 406 | }, |
| 407 | { name: "entropy_src", |
| 408 | type: "entropy_src", |
| 409 | clock_srcs: {clk_i: "main"}, |
| 410 | clock_group: "secure", |
| 411 | reset_connections: {rst_ni: "sys"}, |
| 412 | base_addr: "0x41160000", |
| 413 | }, |
| 414 | { name: "edn0", |
| 415 | type: "edn", |
| 416 | clock_srcs: {clk_i: "main"}, |
| 417 | clock_group: "secure", |
| 418 | reset_connections: {rst_ni: "sys"}, |
| 419 | base_addr: "0x41170000", |
| 420 | }, |
| 421 | { name: "edn1", |
| 422 | type: "edn", |
| 423 | clock_srcs: {clk_i: "main"}, |
| 424 | clock_group: "secure", |
| 425 | reset_connections: {rst_ni: "sys"}, |
| 426 | base_addr: "0x41180000", |
| 427 | }, |
Michael Schaffner | bd9a354 | 2020-12-21 13:08:32 -0800 | [diff] [blame] | 428 | { name: "sram_ctrl_main", |
| 429 | type: "sram_ctrl", |
| 430 | clock_srcs: {clk_i: "main", clk_otp_i: "io_div4"}, |
| 431 | clock_group: "secure", |
| 432 | reset_connections: {rst_ni: "sys", rst_otp_ni: "lc_io_div4"}, |
| 433 | base_addr: "0x411C0000", |
| 434 | }, |
Philipp Wagner | a4a9e40 | 2020-06-22 12:06:56 +0100 | [diff] [blame] | 435 | { name: "otbn", |
| 436 | type: "otbn", |
| 437 | clock_srcs: {clk_i: "main"}, |
| 438 | clock_group: "trans", |
| 439 | reset_connections: {rst_ni: "sys"}, |
Michael Schaffner | bd9a354 | 2020-12-21 13:08:32 -0800 | [diff] [blame] | 440 | base_addr: "0x411D0000", |
Philipp Wagner | a4a9e40 | 2020-06-22 12:06:56 +0100 | [diff] [blame] | 441 | }, |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 442 | ] |
| 443 | |
| 444 | // Memories (ROM, RAM, eFlash) are defined at the top. |
| 445 | // It utilizes the primitive cells but configurable |
| 446 | memory: [ |
Timothy Chen | 80bd8aa | 2019-10-04 15:57:11 -0700 | [diff] [blame] | 447 | { name: "rom", |
Timothy Chen | 0550d69 | 2020-04-20 17:19:35 -0700 | [diff] [blame] | 448 | clock_srcs: {clk_i: "main"}, |
| 449 | clock_group: "infra", |
Timothy Chen | 80bd8aa | 2019-10-04 15:57:11 -0700 | [diff] [blame] | 450 | reset_connections: {rst_ni: "sys"}, |
| 451 | type: "rom", |
| 452 | base_addr: "0x00008000", |
Weicai Yang | 55b2cdf | 2020-04-10 15:40:30 -0700 | [diff] [blame] | 453 | swaccess: "ro", |
Timothy Chen | da2e344 | 2020-02-24 21:37:47 -0800 | [diff] [blame] | 454 | size: "0x4000" |
Eunchan Kim | e0d37fe | 2020-08-03 12:05:21 -0700 | [diff] [blame] | 455 | inter_signal_list: [ |
| 456 | { struct: "tl" |
| 457 | package: "tlul_pkg" |
| 458 | type: "req_rsp" |
| 459 | act: "rsp" |
| 460 | name: "tl" |
| 461 | } |
| 462 | ] |
Timothy Chen | 80bd8aa | 2019-10-04 15:57:11 -0700 | [diff] [blame] | 463 | }, |
| 464 | { name: "ram_main", |
Timothy Chen | 0550d69 | 2020-04-20 17:19:35 -0700 | [diff] [blame] | 465 | clock_srcs: {clk_i: "main"}, |
| 466 | clock_group: "infra", |
Timothy Chen | 80bd8aa | 2019-10-04 15:57:11 -0700 | [diff] [blame] | 467 | reset_connections: {rst_ni: "sys"}, |
Michael Schaffner | bd9a354 | 2020-12-21 13:08:32 -0800 | [diff] [blame] | 468 | type: "ram_1p_scr", |
Timothy Chen | 80bd8aa | 2019-10-04 15:57:11 -0700 | [diff] [blame] | 469 | base_addr: "0x10000000", |
Eunchan Kim | e0d37fe | 2020-08-03 12:05:21 -0700 | [diff] [blame] | 470 | size: "0x10000" |
Weicai Yang | 2ac0dee | 2020-12-08 12:19:18 -0800 | [diff] [blame] | 471 | byte_write: "true", |
Eunchan Kim | e0d37fe | 2020-08-03 12:05:21 -0700 | [diff] [blame] | 472 | inter_signal_list: [ |
| 473 | { struct: "tl" |
| 474 | package: "tlul_pkg" |
| 475 | type: "req_rsp" |
| 476 | act: "rsp" |
| 477 | name: "tl" |
Michael Schaffner | bd9a354 | 2020-12-21 13:08:32 -0800 | [diff] [blame] | 478 | }, |
| 479 | // Interface to SRAM controller |
| 480 | { struct: "sram_scr", |
| 481 | package: "sram_ctrl_pkg" |
| 482 | type: "req_rsp", |
| 483 | name: "sram_scr", |
| 484 | act: "rsp", |
Eunchan Kim | e0d37fe | 2020-08-03 12:05:21 -0700 | [diff] [blame] | 485 | } |
| 486 | ] |
| 487 | }, |
Timothy Chen | 2c9e1a9 | 2020-06-29 15:03:25 -0700 | [diff] [blame] | 488 | { name: "ram_ret", |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 489 | clock_srcs: {clk_i: "io_div4"}, |
Timothy Chen | 2c9e1a9 | 2020-06-29 15:03:25 -0700 | [diff] [blame] | 490 | clock_group: "infra", |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 491 | reset_connections: {rst_ni: "sys_io_div4"}, |
Timothy Chen | 7f8cc8e | 2020-11-11 13:15:57 -0800 | [diff] [blame] | 492 | domain: "Aon", |
Michael Schaffner | bd9a354 | 2020-12-21 13:08:32 -0800 | [diff] [blame] | 493 | type: "ram_1p_scr", |
Timothy Chen | 2c9e1a9 | 2020-06-29 15:03:25 -0700 | [diff] [blame] | 494 | base_addr: "0x18000000", |
Timothy Chen | 7f8cc8e | 2020-11-11 13:15:57 -0800 | [diff] [blame] | 495 | size: "0x1000", |
Weicai Yang | 2ac0dee | 2020-12-08 12:19:18 -0800 | [diff] [blame] | 496 | byte_write: "true", |
Eunchan Kim | e0d37fe | 2020-08-03 12:05:21 -0700 | [diff] [blame] | 497 | inter_signal_list: [ |
| 498 | { struct: "tl" |
| 499 | package: "tlul_pkg" |
| 500 | type: "req_rsp" |
| 501 | act: "rsp" |
| 502 | name: "tl" |
Michael Schaffner | bd9a354 | 2020-12-21 13:08:32 -0800 | [diff] [blame] | 503 | }, |
| 504 | // Interface to SRAM controller |
| 505 | { struct: "sram_scr", |
| 506 | package: "sram_ctrl_pkg" |
| 507 | type: "req_rsp", |
| 508 | name: "sram_scr", |
| 509 | act: "rsp", |
Eunchan Kim | e0d37fe | 2020-08-03 12:05:21 -0700 | [diff] [blame] | 510 | } |
| 511 | ] |
| 512 | }, |
Timothy Chen | 80bd8aa | 2019-10-04 15:57:11 -0700 | [diff] [blame] | 513 | { name: "eflash", |
Timothy Chen | 0550d69 | 2020-04-20 17:19:35 -0700 | [diff] [blame] | 514 | clock_srcs: {clk_i: "main"}, |
| 515 | clock_group: "infra", |
Timothy Chen | 80bd8aa | 2019-10-04 15:57:11 -0700 | [diff] [blame] | 516 | reset_connections: {rst_ni: "lc"}, |
| 517 | type: "eflash", |
| 518 | base_addr: "0x20000000", |
Timothy Chen | 1daf582 | 2020-10-26 17:28:15 -0700 | [diff] [blame] | 519 | banks: 2, |
Timothy Chen | e97e0b8 | 2020-12-11 17:18:43 -0800 | [diff] [blame] | 520 | pages_per_bank: 128, |
| 521 | program_resolution: 8, // maximum number of flash words allowed to program at one time |
Weicai Yang | 55b2cdf | 2020-04-10 15:40:30 -0700 | [diff] [blame] | 522 | swaccess: "ro", |
Eunchan Kim | e4a8507 | 2020-02-05 16:00:00 -0800 | [diff] [blame] | 523 | inter_signal_list: [ |
| 524 | { struct: "flash", // flash_req_t, flash_rsp_t |
| 525 | type: "req_rsp", |
| 526 | name: "flash_ctrl", // flash_ctrl_i (req), flash_ctrl_o (rsp) |
Eunchan Kim | 40098a9 | 2020-04-17 12:22:36 -0700 | [diff] [blame] | 527 | act: "rsp", |
Timothy Chen | ac62065 | 2020-06-25 13:48:50 -0700 | [diff] [blame] | 528 | }, |
Eunchan Kim | e0d37fe | 2020-08-03 12:05:21 -0700 | [diff] [blame] | 529 | { struct: "tl" |
| 530 | package: "tlul_pkg" |
| 531 | type: "req_rsp" |
| 532 | act: "rsp" |
| 533 | name: "tl" |
Timothy Chen | d2c9ff4 | 2020-11-19 16:03:54 -0800 | [diff] [blame] | 534 | }, |
Michael Schaffner | 60aa10e | 2020-12-07 19:39:08 -0800 | [diff] [blame] | 535 | { struct: "lc_tx", |
| 536 | package: "lc_ctrl_pkg", |
| 537 | type: "uni" |
| 538 | act: "rcv" |
| 539 | name: "lc_dft_en" |
| 540 | }, |
Timothy Chen | d2c9ff4 | 2020-11-19 16:03:54 -0800 | [diff] [blame] | 541 | { struct: "logic" |
| 542 | package: "" |
| 543 | type: "uni" |
| 544 | act: "rcv" |
| 545 | name: "flash_power_down_h" |
| 546 | }, |
| 547 | { struct: "logic" |
| 548 | package: "" |
| 549 | type: "uni" |
| 550 | act: "rcv" |
| 551 | name: "flash_power_ready_h" |
| 552 | }, |
| 553 | { struct: "logic", |
| 554 | package: "", |
| 555 | width: "2", |
| 556 | type: "uni" |
| 557 | act: "rcv" |
| 558 | name: "flash_test_mode_a" |
| 559 | }, |
| 560 | { struct: "logic", |
| 561 | package: "", |
| 562 | type: "uni" |
| 563 | act: "rcv" |
| 564 | name: "flash_test_voltage_h" |
| 565 | }, |
Eunchan Kim | e4a8507 | 2020-02-05 16:00:00 -0800 | [diff] [blame] | 566 | ], |
| 567 | }, |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 568 | ], |
| 569 | |
Eunchan Kim | e4a8507 | 2020-02-05 16:00:00 -0800 | [diff] [blame] | 570 | // Inter-module Connection. |
| 571 | // format: |
| 572 | // requester: [ resp1, resp2, ... ], |
| 573 | // |
Eunchan Kim | 40098a9 | 2020-04-17 12:22:36 -0700 | [diff] [blame] | 574 | // the field and value should be module_inst.port_name |
Eunchan Kim | e4a8507 | 2020-02-05 16:00:00 -0800 | [diff] [blame] | 575 | // e.g flash_ctrl0.flash: [flash_phy0.flash_ctrl] |
| 576 | inter_module: { |
Eunchan Kim | 40098a9 | 2020-04-17 12:22:36 -0700 | [diff] [blame] | 577 | 'connect': { |
Timothy Chen | e4e857d | 2020-12-16 18:00:01 -0800 | [diff] [blame] | 578 | 'alert_handler.crashdump' : ['rstmgr.alert_dump'], |
| 579 | 'alert_handler.esc_rx' : ['rv_core_ibex.esc_nmi_rx', |
| 580 | 'lc_ctrl.esc_wipe_secrets_rx', |
| 581 | 'lc_ctrl.esc_scrap_state_rx' |
| 582 | 'pwrmgr.esc_rst_rx'], |
| 583 | 'alert_handler.esc_tx' : ['rv_core_ibex.esc_nmi_tx', |
| 584 | 'lc_ctrl.esc_wipe_secrets_tx', |
| 585 | 'lc_ctrl.esc_scrap_state_tx', |
| 586 | 'pwrmgr.esc_rst_tx'], |
| 587 | 'csrng.csrng_cmd' : ['edn0.csrng_cmd', 'edn1.csrng_cmd'], |
Timothy Chen | f52a461 | 2020-12-04 20:37:49 -0800 | [diff] [blame] | 588 | 'csrng.entropy_src_hw_if' : ['entropy_src.entropy_src_hw_if'], |
Timothy Chen | d39402a | 2020-12-15 20:34:09 -0800 | [diff] [blame] | 589 | 'flash_ctrl.flash' : ['eflash.flash_ctrl'], |
| 590 | 'flash_ctrl.keymgr' : ['keymgr.flash'], |
| 591 | 'flash_ctrl.otp' : ['otp_ctrl.flash_otp_key'], |
| 592 | 'flash_ctrl.rma_req' : ['lc_ctrl.lc_flash_rma_req'], |
| 593 | 'flash_ctrl.rma_ack' : ['lc_ctrl.lc_flash_rma_ack'], |
| 594 | 'flash_ctrl.rma_seed' : ['lc_ctrl.lc_flash_rma_seed'], |
Michael Schaffner | bd9a354 | 2020-12-21 13:08:32 -0800 | [diff] [blame] | 595 | 'sram_ctrl_main.sram_scr' : ['ram_main.sram_scr'], |
| 596 | 'sram_ctrl_ret.sram_scr' : ['ram_ret.sram_scr'], |
| 597 | 'otp_ctrl.sram_otp_key' : ['sram_ctrl_main.sram_otp_key', |
| 598 | 'sram_ctrl_ret.sram_otp_key'] |
Timothy Chen | d39402a | 2020-12-15 20:34:09 -0800 | [diff] [blame] | 599 | 'pwrmgr.pwr_flash' : ['flash_ctrl.pwrmgr'], |
| 600 | 'pwrmgr.pwr_rst' : ['rstmgr.pwr'], |
| 601 | 'pwrmgr.pwr_clk' : ['clkmgr.pwr'], |
| 602 | 'pwrmgr.pwr_otp' : ['otp_ctrl.pwr_otp'], |
| 603 | 'pwrmgr.pwr_lc' : ['lc_ctrl.pwr_lc'], |
| 604 | 'flash_ctrl.keymgr' : ['keymgr.flash'], |
| 605 | 'alert_handler.crashdump' : ['rstmgr.alert_dump'], |
Timothy Chen | f524c21 | 2020-12-17 14:08:45 -0800 | [diff] [blame] | 606 | 'rv_core_ibex.crashdump' : ['rstmgr.cpu_dump'], |
Mark Branstad | ff80736 | 2020-11-16 07:56:15 -0800 | [diff] [blame] | 607 | 'csrng.entropy_src_hw_if' : ['entropy_src.entropy_src_hw_if'], |
Timothy Chen | d5820b0 | 2020-12-05 17:19:06 -0800 | [diff] [blame] | 608 | // TODO see #4447 |
Timothy Chen | d39402a | 2020-12-15 20:34:09 -0800 | [diff] [blame] | 609 | //'edn0.edn' : ['keymgr.edn'], |
Timothy Chen | d5820b0 | 2020-12-05 17:19:06 -0800 | [diff] [blame] | 610 | |
Eunchan Kim | 97be1d0 | 2020-11-03 14:33:52 -0800 | [diff] [blame] | 611 | // KeyMgr Sideload & KDF function |
Timothy Chen | 65e1667 | 2020-12-05 09:17:14 -0800 | [diff] [blame] | 612 | 'otp_ctrl.otp_keymgr_key': ['keymgr.otp_key'], |
Eunchan Kim | 97be1d0 | 2020-11-03 14:33:52 -0800 | [diff] [blame] | 613 | 'keymgr.kmac_key' : ['kmac.keymgr_key'] |
| 614 | 'keymgr.kmac_data': ['kmac.keymgr_kdf'] |
Timothy Chen | 455afcb | 2020-10-01 11:46:35 -0700 | [diff] [blame] | 615 | // The idle connection is automatically connected through topgen. |
| 616 | // The user does not need to explicitly declare anything other than |
| 617 | // an empty list. |
Timothy Chen | c8f3004 | 2020-09-25 16:59:47 -0700 | [diff] [blame] | 618 | 'clkmgr.idle' : [], |
Michael Schaffner | 60aa10e | 2020-12-07 19:39:08 -0800 | [diff] [blame] | 619 | |
| 620 | // OTP LC interface |
| 621 | 'otp_ctrl.otp_lc_data' : ['lc_ctrl.otp_lc_data'], |
| 622 | 'lc_ctrl.lc_otp_program' : ['otp_ctrl.lc_otp_program'], |
| 623 | 'lc_ctrl.lc_otp_token' : ['otp_ctrl.lc_otp_token'], |
| 624 | |
| 625 | // HW_CFG broadcast |
Timothy Chen | 0a12094 | 2020-12-14 17:20:51 -0800 | [diff] [blame] | 626 | 'otp_ctrl.otp_hw_cfg' : ['lc_ctrl.otp_hw_cfg', 'keymgr.otp_hw_cfg'], |
Michael Schaffner | 60aa10e | 2020-12-07 19:39:08 -0800 | [diff] [blame] | 627 | |
| 628 | // Diversification constant coming from life cycle |
Timothy Chen | 0a12094 | 2020-12-14 17:20:51 -0800 | [diff] [blame] | 629 | 'lc_ctrl.lc_keymgr_div' : ['keymgr.lc_keymgr_div'], |
Michael Schaffner | 60aa10e | 2020-12-07 19:39:08 -0800 | [diff] [blame] | 630 | |
| 631 | // LC function control signal broadcast |
| 632 | // TODO(#3920): connect all these signals once top-level sim and FPGA can backload LC state |
| 633 | 'lc_ctrl.lc_dft_en' : ['otp_ctrl.lc_dft_en', 'eflash.lc_dft_en'], |
| 634 | 'lc_ctrl.lc_nvm_debug_en' : [], |
| 635 | 'lc_ctrl.lc_hw_debug_en' : [], |
| 636 | 'lc_ctrl.lc_cpu_en' : [], |
Timothy Chen | 0a12094 | 2020-12-14 17:20:51 -0800 | [diff] [blame] | 637 | //'lc_ctrl.lc_keymgr_en' : ['keymgr.lc_keymgr_en'], |
Michael Schaffner | bd9a354 | 2020-12-21 13:08:32 -0800 | [diff] [blame] | 638 | 'lc_ctrl.lc_escalate_en' : ['otp_ctrl.lc_escalate_en', |
| 639 | 'sram_ctrl_main.lc_escalate_en', |
| 640 | 'sram_ctrl_ret.lc_escalate_en'], |
Michael Schaffner | 60aa10e | 2020-12-07 19:39:08 -0800 | [diff] [blame] | 641 | |
| 642 | // TODO: OTP Clock bypass signal going from LC to AST/clkmgr |
| 643 | 'lc_ctrl.lc_clk_byp_req' : [], |
| 644 | //'lc_ctrl.lc_clk_byp_ack' : [], |
| 645 | |
Michael Schaffner | 60aa10e | 2020-12-07 19:39:08 -0800 | [diff] [blame] | 646 | // LC access control signal broadcast |
| 647 | 'lc_ctrl.lc_creator_seed_sw_rw_en' : ['otp_ctrl.lc_creator_seed_sw_rw_en', |
Timothy Chen | 0a12094 | 2020-12-14 17:20:51 -0800 | [diff] [blame] | 648 | 'flash_ctrl.lc_creator_seed_sw_rw_en'], |
Michael Schaffner | 60aa10e | 2020-12-07 19:39:08 -0800 | [diff] [blame] | 649 | 'lc_ctrl.lc_owner_seed_sw_rw_en' : ['flash_ctrl.lc_owner_seed_sw_rw_en'], |
| 650 | 'lc_ctrl.lc_iso_part_sw_rd_en' : ['flash_ctrl.lc_iso_part_sw_rd_en'], |
| 651 | 'lc_ctrl.lc_iso_part_sw_wr_en' : ['flash_ctrl.lc_iso_part_sw_wr_en'], |
| 652 | 'lc_ctrl.lc_seed_hw_rd_en' : ['otp_ctrl.lc_seed_hw_rd_en', |
| 653 | 'flash_ctrl.lc_seed_hw_rd_en'], |
Eunchan Kim | 40098a9 | 2020-04-17 12:22:36 -0700 | [diff] [blame] | 654 | } |
| 655 | |
| 656 | // top is to connect to top net/struct. |
| 657 | // It defines the signal in the top and connect from the module, |
| 658 | // use of the signal is up to top template |
Eunchan Kim | e0d37fe | 2020-08-03 12:05:21 -0700 | [diff] [blame] | 659 | 'top': [ |
| 660 | 'rstmgr.resets', 'rstmgr.cpu', 'pwrmgr.pwr_cpu', 'clkmgr.clocks', |
Eunchan Kim | e0d37fe | 2020-08-03 12:05:21 -0700 | [diff] [blame] | 661 | |
| 662 | // Xbars |
| 663 | 'main.tl_corei', 'main.tl_cored', 'main.tl_dm_sba', 'main.tl_debug_mem' |
| 664 | ], |
Eunchan Kim | 40098a9 | 2020-04-17 12:22:36 -0700 | [diff] [blame] | 665 | |
| 666 | // ext is to create port in the top. |
Eunchan Kim | 57071c0 | 2020-08-07 13:59:05 -0700 | [diff] [blame] | 667 | 'external': { |
Timothy Chen | 0f3c175 | 2020-08-26 12:47:17 -0700 | [diff] [blame] | 668 | 'clkmgr.clk_main': 'clk_main', // clock inputs |
| 669 | 'clkmgr.clk_io': 'clk_io', // clock inputs |
| 670 | 'clkmgr.clk_usb': 'clk_usb', // clock inputs |
| 671 | 'clkmgr.clk_aon': 'clk_aon', // clock inputs |
| 672 | 'rstmgr.ast': '', // ast reset input |
Timothy Chen | dde6805 | 2020-08-05 16:29:35 -0700 | [diff] [blame] | 673 | 'pwrmgr.pwr_ast': '', |
| 674 | 'sensor_ctrl.ast_alert': '', |
| 675 | 'sensor_ctrl.ast_status': '', |
| 676 | 'usbdev.usb_ref_val': '', |
| 677 | 'usbdev.usb_ref_pulse': '', |
Michael Schaffner | 5ae4a23 | 2020-10-06 19:03:43 -0700 | [diff] [blame] | 678 | 'peri.tl_ast_wrapper': 'ast_tl', |
| 679 | 'otp_ctrl.otp_ast_pwr_seq': '', |
| 680 | 'otp_ctrl.otp_ast_pwr_seq_h': '', |
Timothy Chen | d2c9ff4 | 2020-11-19 16:03:54 -0800 | [diff] [blame] | 681 | 'eflash.flash_power_down_h': 'flash_power_down_h', |
| 682 | 'eflash.flash_power_ready_h': 'flash_power_ready_h', |
| 683 | 'eflash.flash_test_mode_a': 'flash_test_mode_a', |
| 684 | 'eflash.flash_test_voltage_h': 'flash_test_voltage_h', |
Eunchan Kim | 57071c0 | 2020-08-07 13:59:05 -0700 | [diff] [blame] | 685 | }, |
Eunchan Kim | e4a8507 | 2020-02-05 16:00:00 -0800 | [diff] [blame] | 686 | }, |
| 687 | |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 688 | debug_mem_base_addr: "0x1A110000", |
| 689 | |
| 690 | // Crossbars: having a top level crossbar |
| 691 | // This version assumes all crossbars are instantiated at the top. |
| 692 | // Assume xbar.hjson is located in the same directory of top.hjson |
| 693 | xbar: [ |
| 694 | { name: "main", |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 695 | clock_srcs: {clk_main_i: "main", clk_fixed_i: "io_div4"}, |
Timothy Chen | 0550d69 | 2020-04-20 17:19:35 -0700 | [diff] [blame] | 696 | clock_group: "infra", |
Timothy Chen | 3193b00 | 2019-10-04 16:56:05 -0700 | [diff] [blame] | 697 | reset: "sys", |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 698 | reset_connections: {rst_main_ni: "sys", rst_fixed_ni: "sys_io_div4"} |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 699 | }, |
Eunchan Kim | 0523f6b | 2019-12-17 13:53:11 -0800 | [diff] [blame] | 700 | { name: "peri", |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 701 | clock_srcs: {clk_peri_i: "io_div4"}, |
Timothy Chen | 0550d69 | 2020-04-20 17:19:35 -0700 | [diff] [blame] | 702 | clock_group: "infra", |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 703 | reset: "sys_io_div4", |
| 704 | reset_connections: {rst_peri_ni: "sys_io_div4"}, |
Eunchan Kim | 0523f6b | 2019-12-17 13:53:11 -0800 | [diff] [blame] | 705 | } |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 706 | ], |
| 707 | |
| 708 | // ===== INTERRUPT CTRL ===================================================== |
| 709 | // `rv_plic` will be instantiate (need to be defined in `module` field |
| 710 | // If interrupt is not defined, it uses the order from the module list |
| 711 | // and include every modules. |
| 712 | // first item goes to LSB of the interrupt source |
Michael Schaffner | 666dde1 | 2019-10-25 11:57:54 -0700 | [diff] [blame] | 713 | interrupt_module: ["gpio", "uart", "spi_device", "flash_ctrl", |
Philipp Wagner | a4a9e40 | 2020-06-22 12:06:56 +0100 | [diff] [blame] | 714 | "hmac", "alert_handler", "nmi_gen", "usbdev", "pwrmgr", |
Timothy Chen | 5e71793 | 2020-12-17 18:49:52 -0800 | [diff] [blame] | 715 | "otbn", "keymgr", "kmac", "otp_ctrl", "csrng", "edn0", "edn1", |
| 716 | "entropy_src"] |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 717 | |
| 718 | // RV_PLIC has two searching algorithm internally to pick the most highest priority interrupt |
| 719 | // source. "sequential" is smaller but slower, "matrix" is larger but faster. |
| 720 | // Choose depends on the criteria. Currently it is set to "matrix" to meet FPGA timing @ 50MHz |
| 721 | |
| 722 | // generated: |
| 723 | interrupt: [ |
| 724 | ] |
| 725 | |
Michael Schaffner | 666dde1 | 2019-10-25 11:57:54 -0700 | [diff] [blame] | 726 | // ===== ALERT HANDLER ====================================================== |
| 727 | // list all modules that expose alerts |
Philipp Wagner | a4a9e40 | 2020-06-22 12:06:56 +0100 | [diff] [blame] | 728 | // first item goes to LSB of the alert source |
Michael Schaffner | bd9a354 | 2020-12-21 13:08:32 -0800 | [diff] [blame] | 729 | alert_module: [ "aes", "otbn", "sensor_ctrl", "keymgr", "otp_ctrl", "lc_ctrl", |
| 730 | "entropy_src", "sram_ctrl_main", "sram_ctrl_ret"] |
Michael Schaffner | 666dde1 | 2019-10-25 11:57:54 -0700 | [diff] [blame] | 731 | |
| 732 | // generated list of alerts: |
| 733 | alert: [ |
| 734 | ] |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 735 | |
| 736 | // TODO: PINMUX |
Eunchan Kim | 632c6f7 | 2019-09-30 11:11:51 -0700 | [diff] [blame] | 737 | pinmux: { |
| 738 | |
Eunchan Kim | 436d224 | 2019-10-29 17:25:51 -0700 | [diff] [blame] | 739 | // Total number of Multiplexed I/O |
| 740 | // All the input/outputs from IPs are muxed in pinmux, and it has # of I/O |
| 741 | // talks to the outside of top_earlgrey. |
| 742 | // This field will be replaced to the length of PAD if padctrl is defined |
| 743 | num_mio: 32 |
| 744 | |
Eunchan Kim | 632c6f7 | 2019-09-30 11:11:51 -0700 | [diff] [blame] | 745 | // Dedicated IO modules. The in/out ports of the modules below are connected |
| 746 | // to TOP IO port through PADS directly. It bypasses PINMUX multiplexers |
| 747 | dio_modules: [ |
| 748 | { name: "spi_device", pad: ["ChB[0..3]"] }, |
Eunchan Kim | 436d224 | 2019-10-29 17:25:51 -0700 | [diff] [blame] | 749 | //{ name: "uart.tx", pad: ["ChA[0]"]}, |
| 750 | { name: "uart", pad: ["ChA[0..1]"]}, |
Eunchan Kim | 632c6f7 | 2019-09-30 11:11:51 -0700 | [diff] [blame] | 751 | // { name: "dio_module.signal_input", pad: ["ChA[31]"] } |
Pirmin Vogel | fe6863b | 2020-05-11 17:30:54 +0200 | [diff] [blame] | 752 | { name: "usbdev", pad: ["ChC[0..8]"]}, |
Eunchan Kim | 632c6f7 | 2019-09-30 11:11:51 -0700 | [diff] [blame] | 753 | ], |
| 754 | |
| 755 | // Multiplexing IO modules. The in/out ports of the modules below are |
| 756 | // connected through PINMUX, which gives controllability of the connection |
| 757 | // between the modules and the IO PADS. |
| 758 | // If `mio_modules` aren't defined, it uses all remaining modules from |
| 759 | // module list except defined in `dio_modules`. |
Philipp Wagner | 9ac69c6 | 2020-12-14 19:22:38 +0000 | [diff] [blame] | 760 | mio_modules: ["uart", "gpio"] |
Eunchan Kim | 632c6f7 | 2019-09-30 11:11:51 -0700 | [diff] [blame] | 761 | |
| 762 | // If any module isn't defined in above two lists, its inputs will be tied |
| 763 | // to 0, and the output/OE signals will be floating (or connected to |
| 764 | // unused signal). `rv_plic` is special module, shouldn't be defined here. |
| 765 | nc_modules: ["rv_timer", "hmac"] |
| 766 | |
Michael Schaffner | 57c490d | 2020-04-29 15:08:55 -0700 | [diff] [blame] | 767 | // Number of wakeup detectors to instantiate, and bitwidth for the wakeup |
| 768 | // counters. Note that all MIO pad inputs are connected to the wakeup detectors, |
| 769 | // and there is no way to disable this. DIO inputs on the other hand are by |
| 770 | // default not connected. |
| 771 | // TODO: need to add mechanism to mark them as wakeup pins. |
| 772 | num_wkup_detect: 8 |
| 773 | wkup_cnt_width: 8 |
| 774 | |
Eunchan Kim | 632c6f7 | 2019-09-30 11:11:51 -0700 | [diff] [blame] | 775 | // Below fields are generated. |
| 776 | // inputs: [ |
| 777 | // { name: "xxx", width: xx }, |
| 778 | // ] |
| 779 | // outputs: [ |
| 780 | // { name: "xxx", width: xx }, |
| 781 | // ] |
| 782 | // inouts: [ |
| 783 | // { name: "xxx", width: xx }, |
| 784 | // ] |
| 785 | } |
| 786 | |
| 787 | // PADS instantiation |
| 788 | // Number of in/outs and the numer of PAD instances doesn't have to be |
| 789 | // same. The number given below excludes clock/reset and other necessary |
| 790 | // PADS but only defines GPIO pads. |
| 791 | padctrl: { |
| 792 | attr_default: ["STRONG"], |
| 793 | pads: [ |
| 794 | { name: "ChA" type: "IO_33V", count: 32 }, // Accessing as ChA[0] .. ChA[31] |
| 795 | { name: "ChB" type: "IO_33V", count: 4, attr: ["KEEP", "WEAK"]}, |
Pirmin Vogel | ea91b30 | 2020-01-14 18:53:01 +0000 | [diff] [blame] | 796 | { name: "ChC" type: "IO_33V", count: 4, attr: ["KEEP", "STRONG"]}, |
Eunchan Kim | 632c6f7 | 2019-09-30 11:11:51 -0700 | [diff] [blame] | 797 | ] |
| 798 | } |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 799 | |
| 800 | } |