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: { |
Timothy Chen | 92b526e | 2021-02-01 21:23:42 -0800 | [diff] [blame] | 37 | top: "clkmgr_aon_clocks.", // top level is a struct |
| 38 | ext: "", // ext is a port of the clock name |
Timothy Chen | f56c1b5 | 2020-04-28 17:00:43 -0700 | [diff] [blame] | 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: { |
Timothy Chen | 92b526e | 2021-02-01 21:23:42 -0800 | [diff] [blame] | 113 | top: "rstmgr_aon_resets.", // top level is a struct |
| 114 | ext: "", // ext is a port of the clock name |
Timothy Chen | c623393 | 2020-08-19 15:34:07 -0700 | [diff] [blame] | 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" } |
Timothy Chen | c2b279a | 2021-01-14 18:53:34 -0800 | [diff] [blame] | 156 | { name: "sys_aon", gen: true, type: "top", domains: ["Aon", "0"], parent: "sys_src", clk: "aon" } |
Timothy Chen | 7f8cc8e | 2020-11-11 13:15:57 -0800 | [diff] [blame] | 157 | { name: "spi_device", gen: true, type: "top", domains: [ "0"], parent: "sys_src", clk: "io_div2", sw: 1 } |
Michael Schaffner | dbd087e | 2021-02-12 17:58:30 -0800 | [diff] [blame] | 158 | { name: "spi_host0", gen: true, type: "top", domains: [ "0"], parent: "sys_src", clk: "io_div2", sw: 1 } |
| 159 | { name: "spi_host1", gen: true, type: "top", domains: [ "0"], parent: "sys_src", clk: "io_div2", sw: 1 } |
Timothy Chen | c2b279a | 2021-01-14 18:53:34 -0800 | [diff] [blame] | 160 | { name: "usb", gen: true, type: "top", domains: [ "0"], parent: "sys_src", clk: "usb", sw: 1 } |
Timothy Chen | b0f5577 | 2021-02-01 15:43:47 -0800 | [diff] [blame] | 161 | { name: "i2c0", gen: true, type: "top", domains: [ "0"], parent: "sys_src", clk: "io_div2", sw: 1 }, |
| 162 | { name: "i2c1", gen: true, type: "top", domains: [ "0"], parent: "sys_src", clk: "io_div2", sw: 1 }, |
| 163 | { name: "i2c2", gen: true, type: "top", domains: [ "0"], parent: "sys_src", clk: "io_div2", sw: 1 }, |
Timothy Chen | c623393 | 2020-08-19 15:34:07 -0700 | [diff] [blame] | 164 | ] |
| 165 | } |
Timothy Chen | 3193b00 | 2019-10-04 16:56:05 -0700 | [diff] [blame] | 166 | |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 167 | // Number of cores: used in rv_plic and timer |
| 168 | num_cores: "1", |
| 169 | |
Timothy Chen | e4e857d | 2020-12-16 18:00:01 -0800 | [diff] [blame] | 170 | |
| 171 | // `host` defines the host only components in the system (such as processor) |
| 172 | // This should eventually be used to cover more functionality, but for now, |
| 173 | // it is a temporary solution for top level connectivity |
| 174 | host: [ |
| 175 | { name: "rv_core_ibex", |
| 176 | type: "rv_core_ibex", |
| 177 | inter_signal_list: [ |
| 178 | { struct: "esc_tx", |
| 179 | type: "uni", |
| 180 | name: "esc_nmi_tx", |
| 181 | act: "rcv", |
| 182 | package: "prim_esc_pkg", |
| 183 | }, |
| 184 | |
| 185 | { struct: "esc_rx", |
| 186 | type: "uni", |
| 187 | name: "esc_nmi_rx", |
| 188 | act: "req", |
| 189 | package: "prim_esc_pkg", |
| 190 | }, |
Timothy Chen | f524c21 | 2020-12-17 14:08:45 -0800 | [diff] [blame] | 191 | |
| 192 | { struct: "crashdump", |
| 193 | type: "uni", |
| 194 | name: "crashdump", |
| 195 | act: "req", |
| 196 | package: "rv_core_ibex_pkg", |
| 197 | }, |
Timothy Chen | e4e857d | 2020-12-16 18:00:01 -0800 | [diff] [blame] | 198 | ], |
| 199 | } |
| 200 | |
| 201 | ] |
| 202 | |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 203 | // `module` defines the peripherals. |
| 204 | // Details are coming from each modules' config file `ip.hjson` |
| 205 | // TODO: Define parameter here |
Timothy Chen | dde6805 | 2020-08-05 16:29:35 -0700 | [diff] [blame] | 206 | // generated: A module is templated and generated as part of topgen |
| 207 | // 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] | 208 | module: [ |
Timothy Chen | 2971a1e | 2021-01-21 16:00:01 -0800 | [diff] [blame] | 209 | { name: "uart0", // instance name |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 210 | type: "uart", // Must be matched to the ip name in `ip.hson` (_reg, _cfg permitted) |
| 211 | // and `hw/ip/{type}` |
Timothy Chen | 3193b00 | 2019-10-04 16:56:05 -0700 | [diff] [blame] | 212 | |
Timothy Chen | 80bd8aa | 2019-10-04 15:57:11 -0700 | [diff] [blame] | 213 | // clock connections defines the port to top level clock connection |
| 214 | // the ip.hjson will declare the clock port names |
| 215 | // 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] | 216 | clock_srcs: {clk_i: "io_div4"}, |
Timothy Chen | 3193b00 | 2019-10-04 16:56:05 -0700 | [diff] [blame] | 217 | |
| 218 | // reset connections defines the port to top level reset connection |
| 219 | // the ip.hjson will declare the reset port names |
Timothy Chen | 80bd8aa | 2019-10-04 15:57:11 -0700 | [diff] [blame] | 220 | // 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] | 221 | reset_connections: {rst_ni: "sys_io_div4"}, |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 222 | base_addr: "0x40000000", |
| 223 | }, |
Timothy Chen | 2971a1e | 2021-01-21 16:00:01 -0800 | [diff] [blame] | 224 | { name: "uart1", // instance name |
| 225 | type: "uart", // Must be matched to the ip name in `ip.hson` (_reg, _cfg permitted) |
| 226 | // and `hw/ip/{type}` |
| 227 | |
| 228 | // clock connections defines the port to top level clock connection |
| 229 | // the ip.hjson will declare the clock port names |
| 230 | // If none are defined at ip.hjson, clk_i is used by default |
| 231 | clock_srcs: {clk_i: "io_div4"}, |
| 232 | |
| 233 | // reset connections defines the port to top level reset connection |
| 234 | // the ip.hjson will declare the reset port names |
| 235 | // If none are defined at ip.hjson, rst_ni is used by default |
| 236 | reset_connections: {rst_ni: "sys_io_div4"}, |
| 237 | base_addr: "0x40010000", |
| 238 | }, |
| 239 | { name: "uart2", // instance name |
| 240 | type: "uart", // Must be matched to the ip name in `ip.hson` (_reg, _cfg permitted) |
| 241 | // and `hw/ip/{type}` |
| 242 | |
| 243 | // clock connections defines the port to top level clock connection |
| 244 | // the ip.hjson will declare the clock port names |
| 245 | // If none are defined at ip.hjson, clk_i is used by default |
| 246 | clock_srcs: {clk_i: "io_div4"}, |
| 247 | |
| 248 | // reset connections defines the port to top level reset connection |
| 249 | // the ip.hjson will declare the reset port names |
| 250 | // If none are defined at ip.hjson, rst_ni is used by default |
| 251 | reset_connections: {rst_ni: "sys_io_div4"}, |
| 252 | base_addr: "0x40020000", |
| 253 | }, |
| 254 | { name: "uart3", // instance name |
| 255 | type: "uart", // Must be matched to the ip name in `ip.hson` (_reg, _cfg permitted) |
| 256 | // and `hw/ip/{type}` |
| 257 | |
| 258 | // clock connections defines the port to top level clock connection |
| 259 | // the ip.hjson will declare the clock port names |
| 260 | // If none are defined at ip.hjson, clk_i is used by default |
| 261 | clock_srcs: {clk_i: "io_div4"}, |
| 262 | |
| 263 | // reset connections defines the port to top level reset connection |
| 264 | // the ip.hjson will declare the reset port names |
| 265 | // If none are defined at ip.hjson, rst_ni is used by default |
| 266 | reset_connections: {rst_ni: "sys_io_div4"}, |
| 267 | base_addr: "0x40030000", |
| 268 | }, |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 269 | { name: "gpio", |
| 270 | type: "gpio", |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 271 | clock_srcs: {clk_i: "io_div4"}, |
Timothy Chen | 0550d69 | 2020-04-20 17:19:35 -0700 | [diff] [blame] | 272 | clock_group: "peri", |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 273 | reset_connections: {rst_ni: "sys_io_div4"}, |
Martin Lueker-Boden | d5a1e4b | 2020-11-11 19:46:33 -0800 | [diff] [blame] | 274 | base_addr: "0x40040000", |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 275 | } |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 276 | { name: "spi_device", |
| 277 | type: "spi_device", |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 278 | clock_srcs: {clk_i: "io_div4"}, |
Timothy Chen | 0550d69 | 2020-04-20 17:19:35 -0700 | [diff] [blame] | 279 | clock_group: "peri", |
Timothy Chen | 3193b00 | 2019-10-04 16:56:05 -0700 | [diff] [blame] | 280 | reset_connections: {rst_ni: "spi_device"}, |
Martin Lueker-Boden | d5a1e4b | 2020-11-11 19:46:33 -0800 | [diff] [blame] | 281 | base_addr: "0x40050000", |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 282 | }, |
Michael Schaffner | dbd087e | 2021-02-12 17:58:30 -0800 | [diff] [blame] | 283 | { name: "spi_host0", |
| 284 | type: "spi_host", |
| 285 | clock_srcs: {clk_i: "io_div4"}, |
| 286 | clock_group: "peri", |
| 287 | reset_connections: {rst_ni: "spi_host0"}, |
| 288 | base_addr: "0x40060000", |
| 289 | }, |
| 290 | { name: "spi_host1", |
| 291 | type: "spi_host", |
| 292 | clock_srcs: {clk_i: "io_div4"}, |
| 293 | clock_group: "peri", |
| 294 | reset_connections: {rst_ni: "spi_host1"}, |
| 295 | base_addr: "0x40070000", |
| 296 | }, |
Timothy Chen | b0f5577 | 2021-02-01 15:43:47 -0800 | [diff] [blame] | 297 | { name: "i2c0", |
| 298 | type: "i2c", |
| 299 | clock_srcs: {clk_i: "io_div4"}, |
| 300 | clock_group: "peri", |
| 301 | reset_connections: {rst_ni: "i2c0"}, |
| 302 | base_addr: "0x40080000", |
| 303 | }, |
| 304 | { name: "i2c1", |
| 305 | type: "i2c", |
| 306 | clock_srcs: {clk_i: "io_div4"}, |
| 307 | clock_group: "peri", |
| 308 | reset_connections: {rst_ni: "i2c1"}, |
| 309 | base_addr: "0x40090000", |
| 310 | }, |
| 311 | { name: "i2c2", |
| 312 | type: "i2c", |
| 313 | clock_srcs: {clk_i: "io_div4"}, |
| 314 | clock_group: "peri", |
| 315 | reset_connections: {rst_ni: "i2c2"}, |
| 316 | base_addr: "0x400A0000", |
| 317 | }, |
| 318 | { name: "pattgen", |
| 319 | type: "pattgen", |
| 320 | clock_srcs: {clk_i: "io_div4"}, |
| 321 | clock_group: "peri", |
| 322 | reset_connections: {rst_ni: "sys_io_div4"}, |
| 323 | base_addr: "0x400E0000", |
| 324 | }, |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 325 | { name: "rv_timer", |
| 326 | type: "rv_timer", |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 327 | clock_srcs: {clk_i: "io_div4"}, |
Timothy Chen | 0550d69 | 2020-04-20 17:19:35 -0700 | [diff] [blame] | 328 | clock_group: "timers", |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 329 | reset_connections: {rst_ni: "sys_io_div4"}, |
Martin Lueker-Boden | d5a1e4b | 2020-11-11 19:46:33 -0800 | [diff] [blame] | 330 | base_addr: "0x40100000", |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 331 | }, |
Timothy Chen | 92b526e | 2021-02-01 21:23:42 -0800 | [diff] [blame] | 332 | { name: "usbdev", |
| 333 | type: "usbdev", |
| 334 | clock_srcs: {clk_i: "io_div4", clk_aon_i: "aon", clk_usb_48mhz_i: "usb"}, |
| 335 | clock_group: "peri", |
Martin Lueker-Boden | d5a1e4b | 2020-11-11 19:46:33 -0800 | [diff] [blame] | 336 | clock_reset_export: ["ast"], |
Timothy Chen | 92b526e | 2021-02-01 21:23:42 -0800 | [diff] [blame] | 337 | reset_connections: {rst_ni: "sys_io_div4", rst_aon_ni: "sys_aon", rst_usb_48mhz_ni: "usb"}, |
Pirmin Vogel | d453438 | 2019-10-17 13:18:31 +0100 | [diff] [blame] | 338 | base_addr: "0x40110000", |
| 339 | }, |
Martin Lueker-Boden | d5a1e4b | 2020-11-11 19:46:33 -0800 | [diff] [blame] | 340 | { name: "otp_ctrl", |
| 341 | type: "otp_ctrl", |
Michael Schaffner | 3c7892d | 2020-12-28 16:25:46 -0800 | [diff] [blame] | 342 | clock_srcs: {clk_i: "io_div4", clk_edn_i: "main"}, |
Martin Lueker-Boden | d5a1e4b | 2020-11-11 19:46:33 -0800 | [diff] [blame] | 343 | clock_group: "timers", |
Michael Schaffner | 3c7892d | 2020-12-28 16:25:46 -0800 | [diff] [blame] | 344 | reset_connections: {rst_ni: "lc_io_div4", rst_edn_ni: "sys"}, |
Martin Lueker-Boden | d5a1e4b | 2020-11-11 19:46:33 -0800 | [diff] [blame] | 345 | base_addr: "0x40130000", |
Timothy Chen | 65e1667 | 2020-12-05 09:17:14 -0800 | [diff] [blame] | 346 | }, |
Michael Schaffner | 60aa10e | 2020-12-07 19:39:08 -0800 | [diff] [blame] | 347 | { name: "lc_ctrl", |
| 348 | type: "lc_ctrl", |
| 349 | clock_srcs: {clk_i: "io_div4"}, |
| 350 | clock_group: "timers", |
| 351 | reset_connections: {rst_ni: "lc_io_div4"}, |
| 352 | base_addr: "0x40140000", |
| 353 | }, |
Michael Schaffner | be5cb9c | 2020-11-19 19:53:47 -0800 | [diff] [blame] | 354 | { name: "alert_handler", |
| 355 | type: "alert_handler", |
Timothy Chen | f1006bd | 2021-02-05 13:05:43 -0800 | [diff] [blame] | 356 | clock_srcs: {clk_i: "io_div4", clk_edn_i: "main"}, |
Michael Schaffner | be5cb9c | 2020-11-19 19:53:47 -0800 | [diff] [blame] | 357 | clock_group: "timers", |
Timothy Chen | f1006bd | 2021-02-05 13:05:43 -0800 | [diff] [blame] | 358 | reset_connections: {rst_ni: "sys_io_div4", rst_edn_ni: "sys"}, |
Michael Schaffner | be5cb9c | 2020-11-19 19:53:47 -0800 | [diff] [blame] | 359 | base_addr: "0x40150000", |
| 360 | generated: "true" // Indicate this module is generated in the topgen |
| 361 | localparam: { |
| 362 | EscCntDw: 32, |
| 363 | AccuCntDw: 16, |
| 364 | LfsrSeed: "0x7FFFFFFF" |
| 365 | } |
| 366 | }, |
| 367 | // dummy module to capture the alert handler escalation signals |
| 368 | // and test them by converting them into IRQs |
| 369 | { name: "nmi_gen", |
| 370 | type: "nmi_gen", |
| 371 | clock_srcs: {clk_i: "io_div4"}, |
| 372 | clock_group: "timers", |
| 373 | reset_connections: {rst_ni: "sys_io_div4"}, |
| 374 | base_addr: "0x40160000", |
| 375 | } |
Timothy Chen | 92b526e | 2021-02-01 21:23:42 -0800 | [diff] [blame] | 376 | { name: "pwrmgr_aon", |
Timothy Chen | 163050b | 2020-04-13 23:29:29 -0700 | [diff] [blame] | 377 | type: "pwrmgr", |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 378 | clock_srcs: {clk_i: "io_div4", clk_slow_i: "aon"}, |
Timothy Chen | 0550d69 | 2020-04-20 17:19:35 -0700 | [diff] [blame] | 379 | clock_group: "powerup", |
Timothy Chen | a4cc10d | 2020-05-08 16:06:20 -0700 | [diff] [blame] | 380 | reset_connections: {rst_ni: "por", rst_slow_ni: "por_aon"}, |
Timothy Chen | 7f8cc8e | 2020-11-11 13:15:57 -0800 | [diff] [blame] | 381 | domain: "Aon", |
Martin Lueker-Boden | d5a1e4b | 2020-11-11 19:46:33 -0800 | [diff] [blame] | 382 | base_addr: "0x40400000", |
Timothy Chen | 4ba2531 | 2020-06-17 13:08:57 -0700 | [diff] [blame] | 383 | generated: "true" // Indicate this module is generated in the topgen |
Timothy Chen | f56c1b5 | 2020-04-28 17:00:43 -0700 | [diff] [blame] | 384 | |
Timothy Chen | 163050b | 2020-04-13 23:29:29 -0700 | [diff] [blame] | 385 | }, |
Timothy Chen | 92b526e | 2021-02-01 21:23:42 -0800 | [diff] [blame] | 386 | { name: "rstmgr_aon", |
Timothy Chen | c59f701 | 2020-04-16 19:11:42 -0700 | [diff] [blame] | 387 | type: "rstmgr", |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 388 | 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] | 389 | clk_io_div2_i: "io_div2", clk_io_div4_i: "io_div4"}, |
Timothy Chen | c59f701 | 2020-04-16 19:11:42 -0700 | [diff] [blame] | 390 | clock_group: "powerup", |
| 391 | reset_connections: {rst_ni: "rst_ni"}, |
Timothy Chen | 7f8cc8e | 2020-11-11 13:15:57 -0800 | [diff] [blame] | 392 | domain: "Aon", |
Martin Lueker-Boden | d5a1e4b | 2020-11-11 19:46:33 -0800 | [diff] [blame] | 393 | base_addr: "0x40410000", |
Timothy Chen | 0f3c175 | 2020-08-26 12:47:17 -0700 | [diff] [blame] | 394 | generated: "true" // Indicate this module is generated in the topgen |
Timothy Chen | f56c1b5 | 2020-04-28 17:00:43 -0700 | [diff] [blame] | 395 | }, |
Timothy Chen | 92b526e | 2021-02-01 21:23:42 -0800 | [diff] [blame] | 396 | { name: "clkmgr_aon", |
Timothy Chen | f56c1b5 | 2020-04-28 17:00:43 -0700 | [diff] [blame] | 397 | type: "clkmgr", |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 398 | clock_srcs: {clk_i: "io_div4"}, |
Timothy Chen | f56c1b5 | 2020-04-28 17:00:43 -0700 | [diff] [blame] | 399 | clock_group: "powerup", |
Timothy Chen | 7f8cc8e | 2020-11-11 13:15:57 -0800 | [diff] [blame] | 400 | 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] | 401 | 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] | 402 | domain: "Aon", |
Martin Lueker-Boden | d5a1e4b | 2020-11-11 19:46:33 -0800 | [diff] [blame] | 403 | base_addr: "0x40420000", |
Timothy Chen | c59f701 | 2020-04-16 19:11:42 -0700 | [diff] [blame] | 404 | generated: "true" |
| 405 | }, |
Timothy Chen | 92b526e | 2021-02-01 21:23:42 -0800 | [diff] [blame] | 406 | { name: "pinmux_aon", |
Martin Lueker-Boden | d5a1e4b | 2020-11-11 19:46:33 -0800 | [diff] [blame] | 407 | type: "pinmux", |
| 408 | clock: "main", |
Timothy Chen | 92b526e | 2021-02-01 21:23:42 -0800 | [diff] [blame] | 409 | clock_srcs: {clk_i: "io_div4", clk_aon_i: "aon"}, |
Martin Lueker-Boden | d5a1e4b | 2020-11-11 19:46:33 -0800 | [diff] [blame] | 410 | clock_group: "secure", |
Timothy Chen | 92b526e | 2021-02-01 21:23:42 -0800 | [diff] [blame] | 411 | reset_connections: {rst_ni: "sys_io_div4", rst_aon_ni: "sys_aon"}, |
Martin Lueker-Boden | d5a1e4b | 2020-11-11 19:46:33 -0800 | [diff] [blame] | 412 | domain: "Aon", |
| 413 | base_addr: "0x40460000", |
| 414 | generated: "true" |
| 415 | }, |
Timothy Chen | 92b526e | 2021-02-01 21:23:42 -0800 | [diff] [blame] | 416 | { name: "sensor_ctrl_aon", |
| 417 | type: "sensor_ctrl", |
| 418 | clock_srcs: {clk_i: "io_div4"}, |
| 419 | clock_group: "secure", |
Timothy Chen | 4c8905e | 2020-08-26 10:34:33 -0700 | [diff] [blame] | 420 | clock_reset_export: ["ast"], |
Timothy Chen | 92b526e | 2021-02-01 21:23:42 -0800 | [diff] [blame] | 421 | reset_connections: {rst_ni: "sys_io_div4"}, |
| 422 | domain: "Aon", |
Martin Lueker-Boden | d5a1e4b | 2020-11-11 19:46:33 -0800 | [diff] [blame] | 423 | base_addr: "0x40500000", |
Timothy Chen | 92b526e | 2021-02-01 21:23:42 -0800 | [diff] [blame] | 424 | top_only: "true" |
Pirmin Vogel | ea91b30 | 2020-01-14 18:53:01 +0000 | [diff] [blame] | 425 | }, |
Timothy Chen | 92b526e | 2021-02-01 21:23:42 -0800 | [diff] [blame] | 426 | { name: "sram_ctrl_ret_aon", |
Michael Schaffner | bd9a354 | 2020-12-21 13:08:32 -0800 | [diff] [blame] | 427 | type: "sram_ctrl", |
| 428 | clock_srcs: {clk_i: "io_div4", clk_otp_i: "io_div4"}, |
| 429 | clock_group: "peri", |
| 430 | reset_connections: {rst_ni: "sys_io_div4", rst_otp_ni: "lc_io_div4"}, |
| 431 | domain: "Aon", |
| 432 | base_addr: "0x40510000" |
| 433 | }, |
Martin Lueker-Boden | d5a1e4b | 2020-11-11 19:46:33 -0800 | [diff] [blame] | 434 | { name: "flash_ctrl", |
| 435 | type: "flash_ctrl", |
Timothy Chen | f52a461 | 2020-12-04 20:37:49 -0800 | [diff] [blame] | 436 | clock_srcs: {clk_i: "main", clk_otp_i: "io_div4"}, |
Martin Lueker-Boden | d5a1e4b | 2020-11-11 19:46:33 -0800 | [diff] [blame] | 437 | clock_group: "infra", |
Timothy Chen | f52a461 | 2020-12-04 20:37:49 -0800 | [diff] [blame] | 438 | reset_connections: {rst_ni: "lc", rst_otp_ni: "lc_io_div4"}, |
Martin Lueker-Boden | d5a1e4b | 2020-11-11 19:46:33 -0800 | [diff] [blame] | 439 | base_addr: "0x41000000", |
| 440 | generated: "true" // Indicate this module is generated in the topgen |
| 441 | }, |
| 442 | { name: "rv_plic", |
| 443 | type: "rv_plic", |
| 444 | clock_srcs: {clk_i: "main"}, |
Timothy Chen | dde6805 | 2020-08-05 16:29:35 -0700 | [diff] [blame] | 445 | clock_group: "secure", |
Martin Lueker-Boden | d5a1e4b | 2020-11-11 19:46:33 -0800 | [diff] [blame] | 446 | reset_connections: {rst_ni: "sys"}, |
| 447 | base_addr: "0x41010000", |
| 448 | generated: "true" // Indicate this module is generated in the topgen |
| 449 | }, |
| 450 | { name: "aes", |
| 451 | type: "aes", |
| 452 | clock_srcs: {clk_i: "main"}, |
| 453 | clock_group: "trans", |
| 454 | reset_connections: {rst_ni: "sys"}, |
| 455 | base_addr: "0x41100000", |
| 456 | }, |
| 457 | { name: "hmac", |
| 458 | type: "hmac", |
| 459 | clock_srcs: {clk_i: "main"}, |
| 460 | clock_group: "trans", |
| 461 | reset_connections: {rst_ni: "sys"}, |
| 462 | base_addr: "0x41110000", |
| 463 | }, |
| 464 | { name: "kmac" |
| 465 | type: "kmac" |
Eunchan Kim | 6baeda4 | 2021-01-07 12:32:16 -0800 | [diff] [blame] | 466 | clock_srcs: {clk_i: "main", clk_edn_i: "main"} |
Martin Lueker-Boden | d5a1e4b | 2020-11-11 19:46:33 -0800 | [diff] [blame] | 467 | clock_group: "trans" |
Eunchan Kim | 6baeda4 | 2021-01-07 12:32:16 -0800 | [diff] [blame] | 468 | reset_connections: {rst_ni: "sys", rst_edn_ni: "sys"} |
Martin Lueker-Boden | d5a1e4b | 2020-11-11 19:46:33 -0800 | [diff] [blame] | 469 | base_addr: "0x41120000" |
Timothy Chen | dde6805 | 2020-08-05 16:29:35 -0700 | [diff] [blame] | 470 | }, |
Timothy Chen | 3c3f348 | 2020-09-09 18:45:41 -0700 | [diff] [blame] | 471 | { name: "keymgr", |
| 472 | type: "keymgr", |
Timothy Chen | d5820b0 | 2020-12-05 17:19:06 -0800 | [diff] [blame] | 473 | clock_srcs: {clk_i: "main", clk_edn_i: "main"}, |
Timothy Chen | 3c3f348 | 2020-09-09 18:45:41 -0700 | [diff] [blame] | 474 | clock_group: "secure", |
Timothy Chen | d5820b0 | 2020-12-05 17:19:06 -0800 | [diff] [blame] | 475 | reset_connections: {rst_ni: "sys", rst_edn_ni: "sys"}, |
Martin Lueker-Boden | d5a1e4b | 2020-11-11 19:46:33 -0800 | [diff] [blame] | 476 | base_addr: "0x41130000", |
Michael Schaffner | 5ae4a23 | 2020-10-06 19:03:43 -0700 | [diff] [blame] | 477 | }, |
Mark Branstad | ff80736 | 2020-11-16 07:56:15 -0800 | [diff] [blame] | 478 | { name: "csrng", |
| 479 | type: "csrng", |
| 480 | clock_srcs: {clk_i: "main"}, |
| 481 | clock_group: "secure", |
| 482 | reset_connections: {rst_ni: "sys"}, |
| 483 | base_addr: "0x41150000", |
| 484 | }, |
| 485 | { name: "entropy_src", |
| 486 | type: "entropy_src", |
| 487 | clock_srcs: {clk_i: "main"}, |
| 488 | clock_group: "secure", |
| 489 | reset_connections: {rst_ni: "sys"}, |
Timothy Chen | ea59ad3 | 2021-02-03 17:51:38 -0800 | [diff] [blame] | 490 | clock_reset_export: ["ast"], |
Mark Branstad | ff80736 | 2020-11-16 07:56:15 -0800 | [diff] [blame] | 491 | base_addr: "0x41160000", |
| 492 | }, |
| 493 | { name: "edn0", |
| 494 | type: "edn", |
| 495 | clock_srcs: {clk_i: "main"}, |
| 496 | clock_group: "secure", |
| 497 | reset_connections: {rst_ni: "sys"}, |
Timothy Chen | ea59ad3 | 2021-02-03 17:51:38 -0800 | [diff] [blame] | 498 | clock_reset_export: ["ast"], |
Mark Branstad | ff80736 | 2020-11-16 07:56:15 -0800 | [diff] [blame] | 499 | base_addr: "0x41170000", |
| 500 | }, |
| 501 | { name: "edn1", |
| 502 | type: "edn", |
| 503 | clock_srcs: {clk_i: "main"}, |
| 504 | clock_group: "secure", |
| 505 | reset_connections: {rst_ni: "sys"}, |
| 506 | base_addr: "0x41180000", |
| 507 | }, |
Michael Schaffner | bd9a354 | 2020-12-21 13:08:32 -0800 | [diff] [blame] | 508 | { name: "sram_ctrl_main", |
| 509 | type: "sram_ctrl", |
| 510 | clock_srcs: {clk_i: "main", clk_otp_i: "io_div4"}, |
| 511 | clock_group: "secure", |
| 512 | reset_connections: {rst_ni: "sys", rst_otp_ni: "lc_io_div4"}, |
| 513 | base_addr: "0x411C0000", |
| 514 | }, |
Philipp Wagner | a4a9e40 | 2020-06-22 12:06:56 +0100 | [diff] [blame] | 515 | { name: "otbn", |
| 516 | type: "otbn", |
| 517 | clock_srcs: {clk_i: "main"}, |
| 518 | clock_group: "trans", |
| 519 | reset_connections: {rst_ni: "sys"}, |
Michael Schaffner | bd9a354 | 2020-12-21 13:08:32 -0800 | [diff] [blame] | 520 | base_addr: "0x411D0000", |
Philipp Wagner | a4a9e40 | 2020-06-22 12:06:56 +0100 | [diff] [blame] | 521 | }, |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 522 | ] |
| 523 | |
| 524 | // Memories (ROM, RAM, eFlash) are defined at the top. |
| 525 | // It utilizes the primitive cells but configurable |
| 526 | memory: [ |
Timothy Chen | 80bd8aa | 2019-10-04 15:57:11 -0700 | [diff] [blame] | 527 | { name: "rom", |
Timothy Chen | 0550d69 | 2020-04-20 17:19:35 -0700 | [diff] [blame] | 528 | clock_srcs: {clk_i: "main"}, |
| 529 | clock_group: "infra", |
Timothy Chen | 80bd8aa | 2019-10-04 15:57:11 -0700 | [diff] [blame] | 530 | reset_connections: {rst_ni: "sys"}, |
| 531 | type: "rom", |
| 532 | base_addr: "0x00008000", |
Weicai Yang | 55b2cdf | 2020-04-10 15:40:30 -0700 | [diff] [blame] | 533 | swaccess: "ro", |
Timothy Chen | da2e344 | 2020-02-24 21:37:47 -0800 | [diff] [blame] | 534 | size: "0x4000" |
Eunchan Kim | e0d37fe | 2020-08-03 12:05:21 -0700 | [diff] [blame] | 535 | inter_signal_list: [ |
| 536 | { struct: "tl" |
| 537 | package: "tlul_pkg" |
| 538 | type: "req_rsp" |
| 539 | act: "rsp" |
| 540 | name: "tl" |
| 541 | } |
| 542 | ] |
Timothy Chen | 80bd8aa | 2019-10-04 15:57:11 -0700 | [diff] [blame] | 543 | }, |
| 544 | { name: "ram_main", |
Timothy Chen | 0550d69 | 2020-04-20 17:19:35 -0700 | [diff] [blame] | 545 | clock_srcs: {clk_i: "main"}, |
| 546 | clock_group: "infra", |
Timothy Chen | 80bd8aa | 2019-10-04 15:57:11 -0700 | [diff] [blame] | 547 | reset_connections: {rst_ni: "sys"}, |
Michael Schaffner | bd9a354 | 2020-12-21 13:08:32 -0800 | [diff] [blame] | 548 | type: "ram_1p_scr", |
Timothy Chen | 80bd8aa | 2019-10-04 15:57:11 -0700 | [diff] [blame] | 549 | base_addr: "0x10000000", |
Timothy Chen | 15d98b7 | 2021-02-10 20:58:34 -0800 | [diff] [blame] | 550 | size: "0x20000", |
Weicai Yang | 2ac0dee | 2020-12-08 12:19:18 -0800 | [diff] [blame] | 551 | byte_write: "true", |
Timothy Chen | 15d98b7 | 2021-02-10 20:58:34 -0800 | [diff] [blame] | 552 | exec: "1", |
Eunchan Kim | e0d37fe | 2020-08-03 12:05:21 -0700 | [diff] [blame] | 553 | inter_signal_list: [ |
| 554 | { struct: "tl" |
| 555 | package: "tlul_pkg" |
| 556 | type: "req_rsp" |
| 557 | act: "rsp" |
| 558 | name: "tl" |
Michael Schaffner | bd9a354 | 2020-12-21 13:08:32 -0800 | [diff] [blame] | 559 | }, |
| 560 | // Interface to SRAM controller |
| 561 | { struct: "sram_scr", |
| 562 | package: "sram_ctrl_pkg" |
| 563 | type: "req_rsp", |
| 564 | name: "sram_scr", |
| 565 | act: "rsp", |
Timothy Chen | 15d98b7 | 2021-02-10 20:58:34 -0800 | [diff] [blame] | 566 | }, |
| 567 | { struct: "tl_instr_en", |
| 568 | package: "tlul_pkg" |
| 569 | type: "uni", |
| 570 | name: "en_ifetch", |
| 571 | act: "rcv", |
| 572 | }, |
Eunchan Kim | e0d37fe | 2020-08-03 12:05:21 -0700 | [diff] [blame] | 573 | ] |
| 574 | }, |
Timothy Chen | 92b526e | 2021-02-01 21:23:42 -0800 | [diff] [blame] | 575 | { name: "ram_ret_aon", |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 576 | clock_srcs: {clk_i: "io_div4"}, |
Timothy Chen | 2c9e1a9 | 2020-06-29 15:03:25 -0700 | [diff] [blame] | 577 | clock_group: "infra", |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 578 | reset_connections: {rst_ni: "sys_io_div4"}, |
Timothy Chen | 7f8cc8e | 2020-11-11 13:15:57 -0800 | [diff] [blame] | 579 | domain: "Aon", |
Michael Schaffner | bd9a354 | 2020-12-21 13:08:32 -0800 | [diff] [blame] | 580 | type: "ram_1p_scr", |
Silvestrs Timofejevs | af2b5c2 | 2021-02-05 10:33:18 +0000 | [diff] [blame] | 581 | base_addr: "0x40600000", |
Timothy Chen | 7f8cc8e | 2020-11-11 13:15:57 -0800 | [diff] [blame] | 582 | size: "0x1000", |
Weicai Yang | 2ac0dee | 2020-12-08 12:19:18 -0800 | [diff] [blame] | 583 | byte_write: "true", |
Timothy Chen | 15d98b7 | 2021-02-10 20:58:34 -0800 | [diff] [blame] | 584 | exec: "0", |
Eunchan Kim | e0d37fe | 2020-08-03 12:05:21 -0700 | [diff] [blame] | 585 | inter_signal_list: [ |
| 586 | { struct: "tl" |
| 587 | package: "tlul_pkg" |
| 588 | type: "req_rsp" |
| 589 | act: "rsp" |
| 590 | name: "tl" |
Michael Schaffner | bd9a354 | 2020-12-21 13:08:32 -0800 | [diff] [blame] | 591 | }, |
| 592 | // Interface to SRAM controller |
| 593 | { struct: "sram_scr", |
| 594 | package: "sram_ctrl_pkg" |
| 595 | type: "req_rsp", |
| 596 | name: "sram_scr", |
| 597 | act: "rsp", |
Timothy Chen | 15d98b7 | 2021-02-10 20:58:34 -0800 | [diff] [blame] | 598 | }, |
| 599 | { struct: "tl_instr_en", |
| 600 | package: "tlul_pkg" |
| 601 | type: "uni", |
| 602 | name: "en_ifetch", |
| 603 | act: "rcv", |
| 604 | }, |
Eunchan Kim | e0d37fe | 2020-08-03 12:05:21 -0700 | [diff] [blame] | 605 | ] |
| 606 | }, |
Timothy Chen | 80bd8aa | 2019-10-04 15:57:11 -0700 | [diff] [blame] | 607 | { name: "eflash", |
Timothy Chen | 0550d69 | 2020-04-20 17:19:35 -0700 | [diff] [blame] | 608 | clock_srcs: {clk_i: "main"}, |
| 609 | clock_group: "infra", |
Timothy Chen | 80bd8aa | 2019-10-04 15:57:11 -0700 | [diff] [blame] | 610 | reset_connections: {rst_ni: "lc"}, |
| 611 | type: "eflash", |
| 612 | base_addr: "0x20000000", |
Timothy Chen | 1daf582 | 2020-10-26 17:28:15 -0700 | [diff] [blame] | 613 | banks: 2, |
Timothy Chen | 4367c48 | 2021-01-22 00:18:45 -0800 | [diff] [blame] | 614 | pages_per_bank: 256, |
Timothy Chen | e97e0b8 | 2020-12-11 17:18:43 -0800 | [diff] [blame] | 615 | 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] | 616 | swaccess: "ro", |
Eunchan Kim | e4a8507 | 2020-02-05 16:00:00 -0800 | [diff] [blame] | 617 | inter_signal_list: [ |
| 618 | { struct: "flash", // flash_req_t, flash_rsp_t |
| 619 | type: "req_rsp", |
| 620 | name: "flash_ctrl", // flash_ctrl_i (req), flash_ctrl_o (rsp) |
Eunchan Kim | 40098a9 | 2020-04-17 12:22:36 -0700 | [diff] [blame] | 621 | act: "rsp", |
Timothy Chen | ac62065 | 2020-06-25 13:48:50 -0700 | [diff] [blame] | 622 | }, |
Eunchan Kim | e0d37fe | 2020-08-03 12:05:21 -0700 | [diff] [blame] | 623 | { struct: "tl" |
| 624 | package: "tlul_pkg" |
| 625 | type: "req_rsp" |
| 626 | act: "rsp" |
| 627 | name: "tl" |
Timothy Chen | d2c9ff4 | 2020-11-19 16:03:54 -0800 | [diff] [blame] | 628 | }, |
Michael Schaffner | 60aa10e | 2020-12-07 19:39:08 -0800 | [diff] [blame] | 629 | { struct: "lc_tx", |
| 630 | package: "lc_ctrl_pkg", |
| 631 | type: "uni" |
| 632 | act: "rcv" |
Timothy Chen | b1ba59b | 2021-01-07 12:18:11 -0800 | [diff] [blame] | 633 | name: "lc_nvm_debug_en" |
| 634 | }, |
Timothy Chen | 1674110 | 2021-01-15 17:32:13 -0800 | [diff] [blame] | 635 | { struct: "lc_tx" |
| 636 | package: "lc_ctrl_pkg" |
Timothy Chen | b1ba59b | 2021-01-07 12:18:11 -0800 | [diff] [blame] | 637 | type: "uni" |
| 638 | act: "rcv" |
| 639 | name: "flash_bist_enable" |
Michael Schaffner | 60aa10e | 2020-12-07 19:39:08 -0800 | [diff] [blame] | 640 | }, |
Timothy Chen | d2c9ff4 | 2020-11-19 16:03:54 -0800 | [diff] [blame] | 641 | { struct: "logic" |
| 642 | package: "" |
| 643 | type: "uni" |
| 644 | act: "rcv" |
| 645 | name: "flash_power_down_h" |
| 646 | }, |
| 647 | { struct: "logic" |
| 648 | package: "" |
| 649 | type: "uni" |
| 650 | act: "rcv" |
| 651 | name: "flash_power_ready_h" |
| 652 | }, |
| 653 | { struct: "logic", |
| 654 | package: "", |
Michael Schaffner | 9c3d6a8 | 2021-02-02 17:05:31 -0800 | [diff] [blame] | 655 | width: "4", |
Timothy Chen | d2c9ff4 | 2020-11-19 16:03:54 -0800 | [diff] [blame] | 656 | type: "uni" |
| 657 | act: "rcv" |
| 658 | name: "flash_test_mode_a" |
| 659 | }, |
| 660 | { struct: "logic", |
| 661 | package: "", |
| 662 | type: "uni" |
| 663 | act: "rcv" |
| 664 | name: "flash_test_voltage_h" |
| 665 | }, |
Eunchan Kim | e4a8507 | 2020-02-05 16:00:00 -0800 | [diff] [blame] | 666 | ], |
| 667 | }, |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 668 | ], |
| 669 | |
Timothy Chen | 075ed37 | 2021-02-04 14:42:29 -0800 | [diff] [blame] | 670 | // The port data structure is not something that should be used liberally. |
| 671 | // It is used specifically to assign special attributes to specific ports. |
| 672 | // For example, this allows us to designate a port as part of inter-module |
| 673 | // connections. |
| 674 | port: [ |
| 675 | { name: "ast_edn", |
| 676 | inter_signal_list: [ |
| 677 | { struct: "edn", |
| 678 | type: "req_rsp", |
| 679 | name: "edn", |
| 680 | // The activity direction for a port inter-signal is "opposite" of |
| 681 | // what the external module actually needs. |
| 682 | act: "rsp", |
| 683 | package: "edn_pkg", |
| 684 | }, |
| 685 | ] |
| 686 | }, |
| 687 | ] |
| 688 | |
Eunchan Kim | e4a8507 | 2020-02-05 16:00:00 -0800 | [diff] [blame] | 689 | // Inter-module Connection. |
| 690 | // format: |
| 691 | // requester: [ resp1, resp2, ... ], |
| 692 | // |
Eunchan Kim | 40098a9 | 2020-04-17 12:22:36 -0700 | [diff] [blame] | 693 | // the field and value should be module_inst.port_name |
Eunchan Kim | e4a8507 | 2020-02-05 16:00:00 -0800 | [diff] [blame] | 694 | // e.g flash_ctrl0.flash: [flash_phy0.flash_ctrl] |
| 695 | inter_module: { |
Eunchan Kim | 40098a9 | 2020-04-17 12:22:36 -0700 | [diff] [blame] | 696 | 'connect': { |
Timothy Chen | 92b526e | 2021-02-01 21:23:42 -0800 | [diff] [blame] | 697 | 'alert_handler.crashdump' : ['rstmgr_aon.alert_dump'], |
Timothy Chen | e4e857d | 2020-12-16 18:00:01 -0800 | [diff] [blame] | 698 | 'alert_handler.esc_rx' : ['rv_core_ibex.esc_nmi_rx', |
| 699 | 'lc_ctrl.esc_wipe_secrets_rx', |
| 700 | 'lc_ctrl.esc_scrap_state_rx' |
Timothy Chen | 92b526e | 2021-02-01 21:23:42 -0800 | [diff] [blame] | 701 | 'pwrmgr_aon.esc_rst_rx'], |
Timothy Chen | e4e857d | 2020-12-16 18:00:01 -0800 | [diff] [blame] | 702 | 'alert_handler.esc_tx' : ['rv_core_ibex.esc_nmi_tx', |
| 703 | 'lc_ctrl.esc_wipe_secrets_tx', |
| 704 | 'lc_ctrl.esc_scrap_state_tx', |
Timothy Chen | 92b526e | 2021-02-01 21:23:42 -0800 | [diff] [blame] | 705 | 'pwrmgr_aon.esc_rst_tx'], |
Timothy Chen | e4e857d | 2020-12-16 18:00:01 -0800 | [diff] [blame] | 706 | 'csrng.csrng_cmd' : ['edn0.csrng_cmd', 'edn1.csrng_cmd'], |
Timothy Chen | f52a461 | 2020-12-04 20:37:49 -0800 | [diff] [blame] | 707 | 'csrng.entropy_src_hw_if' : ['entropy_src.entropy_src_hw_if'], |
Timothy Chen | d39402a | 2020-12-15 20:34:09 -0800 | [diff] [blame] | 708 | 'flash_ctrl.flash' : ['eflash.flash_ctrl'], |
| 709 | 'flash_ctrl.keymgr' : ['keymgr.flash'], |
| 710 | 'flash_ctrl.otp' : ['otp_ctrl.flash_otp_key'], |
| 711 | 'flash_ctrl.rma_req' : ['lc_ctrl.lc_flash_rma_req'], |
| 712 | 'flash_ctrl.rma_ack' : ['lc_ctrl.lc_flash_rma_ack'], |
| 713 | 'flash_ctrl.rma_seed' : ['lc_ctrl.lc_flash_rma_seed'], |
Michael Schaffner | bd9a354 | 2020-12-21 13:08:32 -0800 | [diff] [blame] | 714 | 'sram_ctrl_main.sram_scr' : ['ram_main.sram_scr'], |
Timothy Chen | 92b526e | 2021-02-01 21:23:42 -0800 | [diff] [blame] | 715 | 'sram_ctrl_ret_aon.sram_scr' : ['ram_ret_aon.sram_scr'], |
Timothy Chen | 15d98b7 | 2021-02-10 20:58:34 -0800 | [diff] [blame] | 716 | 'sram_ctrl_main.en_ifetch' : ['ram_main.en_ifetch'] |
| 717 | 'sram_ctrl_ret_aon.en_ifetch' : ['ram_ret_aon.en_ifetch'] |
Michael Schaffner | bd9a354 | 2020-12-21 13:08:32 -0800 | [diff] [blame] | 718 | 'otp_ctrl.sram_otp_key' : ['sram_ctrl_main.sram_otp_key', |
Timothy Chen | 92b526e | 2021-02-01 21:23:42 -0800 | [diff] [blame] | 719 | 'sram_ctrl_ret_aon.sram_otp_key'] |
| 720 | 'pwrmgr_aon.pwr_flash' : ['flash_ctrl.pwrmgr'], |
| 721 | 'pwrmgr_aon.pwr_rst' : ['rstmgr_aon.pwr'], |
| 722 | 'pwrmgr_aon.pwr_clk' : ['clkmgr_aon.pwr'], |
| 723 | 'pwrmgr_aon.pwr_otp' : ['otp_ctrl.pwr_otp'], |
| 724 | 'pwrmgr_aon.pwr_lc' : ['lc_ctrl.pwr_lc'], |
Timothy Chen | d39402a | 2020-12-15 20:34:09 -0800 | [diff] [blame] | 725 | 'flash_ctrl.keymgr' : ['keymgr.flash'], |
Timothy Chen | 92b526e | 2021-02-01 21:23:42 -0800 | [diff] [blame] | 726 | 'alert_handler.crashdump' : ['rstmgr_aon.alert_dump'], |
| 727 | 'rv_core_ibex.crashdump' : ['rstmgr_aon.cpu_dump'], |
Mark Branstad | ff80736 | 2020-11-16 07:56:15 -0800 | [diff] [blame] | 728 | 'csrng.entropy_src_hw_if' : ['entropy_src.entropy_src_hw_if'], |
Timothy Chen | c2b279a | 2021-01-14 18:53:34 -0800 | [diff] [blame] | 729 | |
| 730 | // usbdev connection to pinmux |
Timothy Chen | 92b526e | 2021-02-01 21:23:42 -0800 | [diff] [blame] | 731 | 'usbdev.usb_out_of_rst' : ['pinmux_aon.usb_out_of_rst'], |
| 732 | 'usbdev.usb_aon_wake_en' : ['pinmux_aon.usb_aon_wake_en'], |
| 733 | 'usbdev.usb_aon_wake_ack' : ['pinmux_aon.usb_aon_wake_ack'], |
| 734 | 'usbdev.usb_suspend' : ['pinmux_aon.usb_suspend'], |
| 735 | 'pinmux_aon.usb_state_debug' : ['usbdev.usb_state_debug'], |
Timothy Chen | c2b279a | 2021-01-14 18:53:34 -0800 | [diff] [blame] | 736 | |
Timothy Chen | d5820b0 | 2020-12-05 17:19:06 -0800 | [diff] [blame] | 737 | // TODO see #4447 |
Timothy Chen | f1006bd | 2021-02-05 13:05:43 -0800 | [diff] [blame] | 738 | 'edn0.edn' : ['keymgr.edn', 'otp_ctrl.edn', 'ast_edn.edn', 'kmac.entropy'], |
| 739 | 'edn1.edn' : ['alert_handler.edn'], |
Timothy Chen | d5820b0 | 2020-12-05 17:19:06 -0800 | [diff] [blame] | 740 | |
Eunchan Kim | 97be1d0 | 2020-11-03 14:33:52 -0800 | [diff] [blame] | 741 | // KeyMgr Sideload & KDF function |
Timothy Chen | 92b526e | 2021-02-01 21:23:42 -0800 | [diff] [blame] | 742 | 'otp_ctrl.otp_keymgr_key' : ['keymgr.otp_key'], |
| 743 | 'keymgr.kmac_key' : ['kmac.keymgr_key'] |
| 744 | 'keymgr.kmac_data' : ['kmac.keymgr_kdf'] |
Timothy Chen | 455afcb | 2020-10-01 11:46:35 -0700 | [diff] [blame] | 745 | // The idle connection is automatically connected through topgen. |
| 746 | // The user does not need to explicitly declare anything other than |
| 747 | // an empty list. |
Timothy Chen | 92b526e | 2021-02-01 21:23:42 -0800 | [diff] [blame] | 748 | 'clkmgr_aon.idle' : [], |
Michael Schaffner | 60aa10e | 2020-12-07 19:39:08 -0800 | [diff] [blame] | 749 | |
| 750 | // OTP LC interface |
| 751 | 'otp_ctrl.otp_lc_data' : ['lc_ctrl.otp_lc_data'], |
| 752 | 'lc_ctrl.lc_otp_program' : ['otp_ctrl.lc_otp_program'], |
| 753 | 'lc_ctrl.lc_otp_token' : ['otp_ctrl.lc_otp_token'], |
| 754 | |
| 755 | // HW_CFG broadcast |
Timothy Chen | 15d98b7 | 2021-02-10 20:58:34 -0800 | [diff] [blame] | 756 | 'otp_ctrl.otp_hw_cfg' : ['lc_ctrl.otp_hw_cfg', 'keymgr.otp_hw_cfg', |
| 757 | 'sram_ctrl_main.otp_hw_cfg', 'sram_ctrl_ret_aon.otp_hw_cfg'], |
Michael Schaffner | 60aa10e | 2020-12-07 19:39:08 -0800 | [diff] [blame] | 758 | |
| 759 | // Diversification constant coming from life cycle |
Timothy Chen | 0a12094 | 2020-12-14 17:20:51 -0800 | [diff] [blame] | 760 | 'lc_ctrl.lc_keymgr_div' : ['keymgr.lc_keymgr_div'], |
Michael Schaffner | 60aa10e | 2020-12-07 19:39:08 -0800 | [diff] [blame] | 761 | |
| 762 | // LC function control signal broadcast |
| 763 | // TODO(#3920): connect all these signals once top-level sim and FPGA can backload LC state |
Timothy Chen | b1ba59b | 2021-01-07 12:18:11 -0800 | [diff] [blame] | 764 | 'lc_ctrl.lc_dft_en' : ['otp_ctrl.lc_dft_en'], |
| 765 | 'lc_ctrl.lc_nvm_debug_en' : ['eflash.lc_nvm_debug_en'], |
Timothy Chen | 15d98b7 | 2021-02-10 20:58:34 -0800 | [diff] [blame] | 766 | 'lc_ctrl.lc_hw_debug_en' : ['sram_ctrl_main.lc_hw_debug_en', |
| 767 | 'sram_ctrl_ret_aon.lc_hw_debug_en'], |
Michael Schaffner | 60aa10e | 2020-12-07 19:39:08 -0800 | [diff] [blame] | 768 | 'lc_ctrl.lc_cpu_en' : [], |
Timothy Chen | 0a12094 | 2020-12-14 17:20:51 -0800 | [diff] [blame] | 769 | //'lc_ctrl.lc_keymgr_en' : ['keymgr.lc_keymgr_en'], |
Michael Schaffner | bd9a354 | 2020-12-21 13:08:32 -0800 | [diff] [blame] | 770 | 'lc_ctrl.lc_escalate_en' : ['otp_ctrl.lc_escalate_en', |
| 771 | 'sram_ctrl_main.lc_escalate_en', |
Timothy Chen | 92b526e | 2021-02-01 21:23:42 -0800 | [diff] [blame] | 772 | 'sram_ctrl_ret_aon.lc_escalate_en'], |
Michael Schaffner | 60aa10e | 2020-12-07 19:39:08 -0800 | [diff] [blame] | 773 | |
Michael Schaffner | c506dc5 | 2020-12-22 21:07:17 -0800 | [diff] [blame] | 774 | 'lc_ctrl.lc_check_byp_en' : ['otp_ctrl.lc_check_byp_en'], |
Michael Schaffner | 60aa10e | 2020-12-07 19:39:08 -0800 | [diff] [blame] | 775 | // TODO: OTP Clock bypass signal going from LC to AST/clkmgr |
Timothy Chen | 92b526e | 2021-02-01 21:23:42 -0800 | [diff] [blame] | 776 | 'lc_ctrl.lc_clk_byp_ack' : ['clkmgr_aon.lc_clk_bypass_ack'], |
Michael Schaffner | 60aa10e | 2020-12-07 19:39:08 -0800 | [diff] [blame] | 777 | |
Michael Schaffner | 60aa10e | 2020-12-07 19:39:08 -0800 | [diff] [blame] | 778 | // LC access control signal broadcast |
| 779 | '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] | 780 | 'flash_ctrl.lc_creator_seed_sw_rw_en'], |
Michael Schaffner | 60aa10e | 2020-12-07 19:39:08 -0800 | [diff] [blame] | 781 | 'lc_ctrl.lc_owner_seed_sw_rw_en' : ['flash_ctrl.lc_owner_seed_sw_rw_en'], |
| 782 | 'lc_ctrl.lc_iso_part_sw_rd_en' : ['flash_ctrl.lc_iso_part_sw_rd_en'], |
| 783 | 'lc_ctrl.lc_iso_part_sw_wr_en' : ['flash_ctrl.lc_iso_part_sw_wr_en'], |
| 784 | 'lc_ctrl.lc_seed_hw_rd_en' : ['otp_ctrl.lc_seed_hw_rd_en', |
| 785 | 'flash_ctrl.lc_seed_hw_rd_en'], |
Eunchan Kim | 40098a9 | 2020-04-17 12:22:36 -0700 | [diff] [blame] | 786 | } |
| 787 | |
| 788 | // top is to connect to top net/struct. |
| 789 | // It defines the signal in the top and connect from the module, |
| 790 | // use of the signal is up to top template |
Eunchan Kim | e0d37fe | 2020-08-03 12:05:21 -0700 | [diff] [blame] | 791 | 'top': [ |
Timothy Chen | 92b526e | 2021-02-01 21:23:42 -0800 | [diff] [blame] | 792 | 'rstmgr_aon.resets', 'rstmgr_aon.cpu', 'pwrmgr_aon.pwr_cpu', 'clkmgr_aon.clocks', |
Eunchan Kim | e0d37fe | 2020-08-03 12:05:21 -0700 | [diff] [blame] | 793 | |
| 794 | // Xbars |
| 795 | 'main.tl_corei', 'main.tl_cored', 'main.tl_dm_sba', 'main.tl_debug_mem' |
| 796 | ], |
Eunchan Kim | 40098a9 | 2020-04-17 12:22:36 -0700 | [diff] [blame] | 797 | |
| 798 | // ext is to create port in the top. |
Eunchan Kim | 57071c0 | 2020-08-07 13:59:05 -0700 | [diff] [blame] | 799 | 'external': { |
Timothy Chen | 5649c2a | 2021-02-08 18:32:22 -0800 | [diff] [blame] | 800 | 'clkmgr_aon.clk_main' : 'clk_main', // clock inputs |
Timothy Chen | ea59ad3 | 2021-02-03 17:51:38 -0800 | [diff] [blame] | 801 | 'clkmgr_aon.clk_io' : 'clk_io', // clock inputs |
| 802 | 'clkmgr_aon.clk_usb' : 'clk_usb', // clock inputs |
| 803 | 'clkmgr_aon.clk_aon' : 'clk_aon', // clock inputs |
Timothy Chen | 5649c2a | 2021-02-08 18:32:22 -0800 | [diff] [blame] | 804 | 'clkmgr_aon.jitter_en' : 'clk_main_jitter_en', |
Timothy Chen | ea59ad3 | 2021-02-03 17:51:38 -0800 | [diff] [blame] | 805 | 'rstmgr_aon.ast' : 'rstmgr_ast', |
| 806 | 'pwrmgr_aon.pwr_ast' : 'pwrmgr_ast', |
| 807 | 'sensor_ctrl_aon.ast_alert' : 'sensor_ctrl_ast_alert', |
| 808 | 'sensor_ctrl_aon.ast_status' : 'sensor_ctrl_ast_status', |
| 809 | 'usbdev.usb_ref_val' : '', |
| 810 | 'usbdev.usb_ref_pulse' : '', |
| 811 | 'peri.tl_ast_wrapper' : 'ast_tl', |
| 812 | 'otp_ctrl.otp_ast_pwr_seq' : '', |
| 813 | 'otp_ctrl.otp_ast_pwr_seq_h' : '', |
| 814 | 'eflash.flash_bist_enable' : 'flash_bist_enable', |
| 815 | 'eflash.flash_power_down_h' : 'flash_power_down_h', |
| 816 | 'eflash.flash_power_ready_h' : 'flash_power_ready_h', |
| 817 | 'eflash.flash_test_mode_a' : 'flash_test_mode_a', |
| 818 | 'eflash.flash_test_voltage_h' : 'flash_test_voltage_h', |
| 819 | 'entropy_src.entropy_src_rng' : 'es_rng', |
| 820 | 'lc_ctrl.lc_clk_byp_req' : 'lc_clk_byp_req', |
| 821 | 'clkmgr_aon.ast_clk_bypass_ack': 'lc_clk_byp_ack', |
| 822 | 'ast_edn.edn' : '' |
Eunchan Kim | 57071c0 | 2020-08-07 13:59:05 -0700 | [diff] [blame] | 823 | }, |
Eunchan Kim | e4a8507 | 2020-02-05 16:00:00 -0800 | [diff] [blame] | 824 | }, |
| 825 | |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 826 | debug_mem_base_addr: "0x1A110000", |
| 827 | |
| 828 | // Crossbars: having a top level crossbar |
| 829 | // This version assumes all crossbars are instantiated at the top. |
| 830 | // Assume xbar.hjson is located in the same directory of top.hjson |
| 831 | xbar: [ |
| 832 | { name: "main", |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 833 | clock_srcs: {clk_main_i: "main", clk_fixed_i: "io_div4"}, |
Timothy Chen | 0550d69 | 2020-04-20 17:19:35 -0700 | [diff] [blame] | 834 | clock_group: "infra", |
Timothy Chen | 3193b00 | 2019-10-04 16:56:05 -0700 | [diff] [blame] | 835 | reset: "sys", |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 836 | reset_connections: {rst_main_ni: "sys", rst_fixed_ni: "sys_io_div4"} |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 837 | }, |
Eunchan Kim | 0523f6b | 2019-12-17 13:53:11 -0800 | [diff] [blame] | 838 | { name: "peri", |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 839 | clock_srcs: {clk_peri_i: "io_div4"}, |
Timothy Chen | 0550d69 | 2020-04-20 17:19:35 -0700 | [diff] [blame] | 840 | clock_group: "infra", |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 841 | reset: "sys_io_div4", |
| 842 | reset_connections: {rst_peri_ni: "sys_io_div4"}, |
Eunchan Kim | 0523f6b | 2019-12-17 13:53:11 -0800 | [diff] [blame] | 843 | } |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 844 | ], |
| 845 | |
| 846 | // ===== INTERRUPT CTRL ===================================================== |
| 847 | // `rv_plic` will be instantiate (need to be defined in `module` field |
| 848 | // If interrupt is not defined, it uses the order from the module list |
| 849 | // and include every modules. |
| 850 | // first item goes to LSB of the interrupt source |
Timothy Chen | 2971a1e | 2021-01-21 16:00:01 -0800 | [diff] [blame] | 851 | interrupt_module: ["uart0", "uart1", "uart2", "uart3", |
Timothy Chen | b0f5577 | 2021-02-01 15:43:47 -0800 | [diff] [blame] | 852 | "gpio", "spi_device", "i2c0", "i2c1", "i2c2", "pattgen", |
Timothy Chen | 92b526e | 2021-02-01 21:23:42 -0800 | [diff] [blame] | 853 | "flash_ctrl", "hmac", "alert_handler", "nmi_gen", "usbdev", "pwrmgr_aon", |
Timothy Chen | 5e71793 | 2020-12-17 18:49:52 -0800 | [diff] [blame] | 854 | "otbn", "keymgr", "kmac", "otp_ctrl", "csrng", "edn0", "edn1", |
| 855 | "entropy_src"] |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 856 | |
| 857 | // RV_PLIC has two searching algorithm internally to pick the most highest priority interrupt |
| 858 | // source. "sequential" is smaller but slower, "matrix" is larger but faster. |
| 859 | // Choose depends on the criteria. Currently it is set to "matrix" to meet FPGA timing @ 50MHz |
| 860 | |
| 861 | // generated: |
| 862 | interrupt: [ |
| 863 | ] |
| 864 | |
Michael Schaffner | 666dde1 | 2019-10-25 11:57:54 -0700 | [diff] [blame] | 865 | // ===== ALERT HANDLER ====================================================== |
| 866 | // list all modules that expose alerts |
Philipp Wagner | a4a9e40 | 2020-06-22 12:06:56 +0100 | [diff] [blame] | 867 | // first item goes to LSB of the alert source |
Timothy Chen | 92b526e | 2021-02-01 21:23:42 -0800 | [diff] [blame] | 868 | alert_module: [ "aes", "otbn", "sensor_ctrl_aon", "keymgr", "otp_ctrl", "lc_ctrl", |
Michael Schaffner | b5b8eba | 2021-02-09 20:07:04 -0800 | [diff] [blame^] | 869 | "entropy_src","csrng", |
Mark Branstad | d65d139 | 2021-02-10 13:15:39 -0800 | [diff] [blame] | 870 | "sram_ctrl_main", "sram_ctrl_ret_aon", "flash_ctrl"] |
Michael Schaffner | 666dde1 | 2019-10-25 11:57:54 -0700 | [diff] [blame] | 871 | |
| 872 | // generated list of alerts: |
| 873 | alert: [ |
| 874 | ] |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 875 | |
Michael Schaffner | 43ce8d5 | 2021-02-10 17:04:57 -0800 | [diff] [blame] | 876 | // TODO: need to overhaul this datastructure. |
Eunchan Kim | 632c6f7 | 2019-09-30 11:11:51 -0700 | [diff] [blame] | 877 | pinmux: { |
| 878 | |
Eunchan Kim | 436d224 | 2019-10-29 17:25:51 -0700 | [diff] [blame] | 879 | // Total number of Multiplexed I/O |
| 880 | // All the input/outputs from IPs are muxed in pinmux, and it has # of I/O |
| 881 | // talks to the outside of top_earlgrey. |
| 882 | // This field will be replaced to the length of PAD if padctrl is defined |
Michael Schaffner | b5b8eba | 2021-02-09 20:07:04 -0800 | [diff] [blame^] | 883 | num_mio: 44 |
Eunchan Kim | 436d224 | 2019-10-29 17:25:51 -0700 | [diff] [blame] | 884 | |
Eunchan Kim | 632c6f7 | 2019-09-30 11:11:51 -0700 | [diff] [blame] | 885 | // Dedicated IO modules. The in/out ports of the modules below are connected |
| 886 | // to TOP IO port through PADS directly. It bypasses PINMUX multiplexers |
| 887 | dio_modules: [ |
Michael Schaffner | dbd087e | 2021-02-12 17:58:30 -0800 | [diff] [blame] | 888 | { name: "spi_device", pad: ["ChC[0..5]"] }, |
| 889 | { name: "spi_host0", pad: ["ChB[0..5]"] }, |
| 890 | { name: "usbdev", pad: ["ChA[0..8]"] }, |
Eunchan Kim | 632c6f7 | 2019-09-30 11:11:51 -0700 | [diff] [blame] | 891 | ], |
| 892 | |
| 893 | // Multiplexing IO modules. The in/out ports of the modules below are |
| 894 | // connected through PINMUX, which gives controllability of the connection |
| 895 | // between the modules and the IO PADS. |
| 896 | // If `mio_modules` aren't defined, it uses all remaining modules from |
| 897 | // module list except defined in `dio_modules`. |
Michael Schaffner | dbd087e | 2021-02-12 17:58:30 -0800 | [diff] [blame] | 898 | mio_modules: ["gpio", "uart0", "uart1", "uart2", "uart3", |
| 899 | "i2c0", "i2c1", "i2c2", "pattgen", "spi_host1"] |
Eunchan Kim | 632c6f7 | 2019-09-30 11:11:51 -0700 | [diff] [blame] | 900 | |
| 901 | // If any module isn't defined in above two lists, its inputs will be tied |
| 902 | // to 0, and the output/OE signals will be floating (or connected to |
| 903 | // unused signal). `rv_plic` is special module, shouldn't be defined here. |
| 904 | nc_modules: ["rv_timer", "hmac"] |
| 905 | |
Michael Schaffner | 57c490d | 2020-04-29 15:08:55 -0700 | [diff] [blame] | 906 | // Number of wakeup detectors to instantiate, and bitwidth for the wakeup |
| 907 | // counters. Note that all MIO pad inputs are connected to the wakeup detectors, |
| 908 | // and there is no way to disable this. DIO inputs on the other hand are by |
| 909 | // default not connected. |
| 910 | // TODO: need to add mechanism to mark them as wakeup pins. |
| 911 | num_wkup_detect: 8 |
| 912 | wkup_cnt_width: 8 |
| 913 | |
Eunchan Kim | 632c6f7 | 2019-09-30 11:11:51 -0700 | [diff] [blame] | 914 | // Below fields are generated. |
| 915 | // inputs: [ |
| 916 | // { name: "xxx", width: xx }, |
| 917 | // ] |
| 918 | // outputs: [ |
| 919 | // { name: "xxx", width: xx }, |
| 920 | // ] |
| 921 | // inouts: [ |
| 922 | // { name: "xxx", width: xx }, |
| 923 | // ] |
| 924 | } |
| 925 | |
Michael Schaffner | 43ce8d5 | 2021-02-10 17:04:57 -0800 | [diff] [blame] | 926 | // TODO: need to overhaul this datastructure. |
Eunchan Kim | 632c6f7 | 2019-09-30 11:11:51 -0700 | [diff] [blame] | 927 | // PADS instantiation |
| 928 | // Number of in/outs and the numer of PAD instances doesn't have to be |
| 929 | // same. The number given below excludes clock/reset and other necessary |
| 930 | // PADS but only defines GPIO pads. |
| 931 | padctrl: { |
| 932 | attr_default: ["STRONG"], |
| 933 | pads: [ |
| 934 | { name: "ChA" type: "IO_33V", count: 32 }, // Accessing as ChA[0] .. ChA[31] |
| 935 | { name: "ChB" type: "IO_33V", count: 4, attr: ["KEEP", "WEAK"]}, |
Pirmin Vogel | ea91b30 | 2020-01-14 18:53:01 +0000 | [diff] [blame] | 936 | { name: "ChC" type: "IO_33V", count: 4, attr: ["KEEP", "STRONG"]}, |
Eunchan Kim | 632c6f7 | 2019-09-30 11:11:51 -0700 | [diff] [blame] | 937 | ] |
| 938 | } |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 939 | |
| 940 | } |