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 | |
Michael Schaffner | 7b0807d | 2020-10-27 19:54:52 -0700 | [diff] [blame^] | 18 | // This is the clock data structure of the design. |
Timothy Chen | f56c1b5 | 2020-04-28 17:00:43 -0700 | [diff] [blame] | 19 | // The hier path refers to the clock reference path (struct / port) |
| 20 | // - The top/ext desgination follows the same scheme as inter-module |
Timothy Chen | 0550d69 | 2020-04-20 17:19:35 -0700 | [diff] [blame] | 21 | // The src key indicates the raw clock sources in the design |
| 22 | // The groups key indicates the various clock groupings in the design |
| 23 | clocks: { |
| 24 | |
Timothy Chen | f56c1b5 | 2020-04-28 17:00:43 -0700 | [diff] [blame] | 25 | hier_paths: { |
| 26 | top: "clkmgr_clocks.", // top level is a struct |
| 27 | ext: "", // ext is a port of the clock name |
| 28 | }, |
| 29 | |
Timothy Chen | 33b3b9d | 2020-05-08 10:14:17 -0700 | [diff] [blame] | 30 | // Clock Source attributes |
| 31 | // name: Name of group. |
| 32 | // aon: Whether the clock is free running all the time. |
| 33 | // If it is, the clock is not hanlded by clkmgr. |
| 34 | // freq: Absolute frequency of clk in Hz |
Timothy Chen | 0550d69 | 2020-04-20 17:19:35 -0700 | [diff] [blame] | 35 | srcs: [ |
Timothy Chen | 33b3b9d | 2020-05-08 10:14:17 -0700 | [diff] [blame] | 36 | { name: "main", aon: "no", freq: "100000000" } |
Timothy Chen | ced60b2 | 2020-08-20 10:35:00 -0700 | [diff] [blame] | 37 | { name: "io", aon: "no", freq: "96000000" } |
Timothy Chen | 33b3b9d | 2020-05-08 10:14:17 -0700 | [diff] [blame] | 38 | { name: "usb", aon: "no", freq: "48000000" } |
| 39 | { name: "aon", aon: "yes", freq: "200000" } |
Timothy Chen | 0550d69 | 2020-04-20 17:19:35 -0700 | [diff] [blame] | 40 | ], |
| 41 | |
Timothy Chen | 79972ad | 2020-06-30 17:13:49 -0700 | [diff] [blame] | 42 | // Derived clock source attributes |
| 43 | // name: Name of group. |
| 44 | // aon: Whether the clock is free running all the time. |
| 45 | // If it is, the clock is not hanlded by clkmgr. |
| 46 | // freq: Absolute frequency of clk in Hz |
| 47 | // src: From which clock source is the clock derived |
| 48 | // div: Ratio between derived clock and source clock |
| 49 | derived_srcs: [ |
Timothy Chen | ced60b2 | 2020-08-20 10:35:00 -0700 | [diff] [blame] | 50 | { name: "io_div2", aon: "no", div: 2, src: "io", freq: "48000000" } |
| 51 | { name: "io_div4", aon: "no", div: 4, src: "io", freq: "24000000" } |
Timothy Chen | 79972ad | 2020-06-30 17:13:49 -0700 | [diff] [blame] | 52 | ], |
| 53 | |
Timothy Chen | 0550d69 | 2020-04-20 17:19:35 -0700 | [diff] [blame] | 54 | // Clock Group attributes |
| 55 | // name: name of group. |
| 56 | // |
Timothy Chen | f56c1b5 | 2020-04-28 17:00:43 -0700 | [diff] [blame] | 57 | // src: The hierarchical source of the clock |
| 58 | // "ext" - clock is supplied from a port of the top module |
| 59 | // "top" - clock is supplied from a net inside the top module |
| 60 | // |
Rupert Swarbrick | cba33a2 | 2020-07-02 16:46:38 +0100 | [diff] [blame] | 61 | // sw_cg: whether software is allowed to gate the clock |
Timothy Chen | 0550d69 | 2020-04-20 17:19:35 -0700 | [diff] [blame] | 62 | // "no" - software is not allowed to gate clocks |
| 63 | // "yes" - software is allowed to gate clocks |
| 64 | // "hint" - software can provide a hint, and hw controls the rest |
| 65 | // |
| 66 | // unique: whether each module in the group can be separately gated |
Rupert Swarbrick | cba33a2 | 2020-07-02 16:46:38 +0100 | [diff] [blame] | 67 | // if sw_cg is "no", this field has no meaning |
Timothy Chen | 0550d69 | 2020-04-20 17:19:35 -0700 | [diff] [blame] | 68 | // "yes" - each clock is individually controlled |
| 69 | // "no" - the group is controlled as one single unit |
| 70 | // |
| 71 | // The powerup and proc groups are unique. |
Timothy Chen | 33b3b9d | 2020-05-08 10:14:17 -0700 | [diff] [blame] | 72 | // The powerup group of clocks do not feed through the clock |
Timothy Chen | 0550d69 | 2020-04-20 17:19:35 -0700 | [diff] [blame] | 73 | // controller as they manage clock controller behavior |
| 74 | // The proc group is not peripheral, and direclty hardwired |
| 75 | |
| 76 | groups: [ |
Timothy Chen | 79972ad | 2020-06-30 17:13:49 -0700 | [diff] [blame] | 77 | // the powerup group is used exclusively by clk/pwr/rstmgr |
| 78 | { name: "powerup", src:"top", sw_cg: "no" } |
Timothy Chen | f56c1b5 | 2020-04-28 17:00:43 -0700 | [diff] [blame] | 79 | { name: "trans", src:"top", sw_cg: "hint", unique: "yes", } |
| 80 | { name: "infra", src:"top", sw_cg: "no", } |
| 81 | { name: "secure", src:"top", sw_cg: "no" } |
| 82 | { name: "peri", src:"top", sw_cg: "yes", unique: "no" } |
| 83 | { name: "timers", src:"top", sw_cg: "no" } |
Timothy Chen | 0550d69 | 2020-04-20 17:19:35 -0700 | [diff] [blame] | 84 | { name: "proc", |
Timothy Chen | c623393 | 2020-08-19 15:34:07 -0700 | [diff] [blame] | 85 | src: "no", |
| 86 | sw_cg: "no", |
| 87 | unique: "no", |
Timothy Chen | 0550d69 | 2020-04-20 17:19:35 -0700 | [diff] [blame] | 88 | clocks: { |
| 89 | clk_proc_main: main |
| 90 | } |
| 91 | } |
| 92 | ], |
Timothy Chen | c623393 | 2020-08-19 15:34:07 -0700 | [diff] [blame] | 93 | }, |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 94 | |
Timothy Chen | c623393 | 2020-08-19 15:34:07 -0700 | [diff] [blame] | 95 | // This is the reset data strcture of the design. |
| 96 | // The hier path refers to the reset reference path (struct / port) |
| 97 | // - The top/ext desgination follows the same scheme as inter-module |
| 98 | // The node key represents all the known resets in the design |
| 99 | resets: { |
| 100 | |
| 101 | hier_paths: { |
| 102 | top: "rstmgr_resets.", // top level is a struct |
| 103 | ext: "", // ext is a port of the clock name |
| 104 | }, |
| 105 | |
| 106 | // Reset node attributes |
| 107 | // name: name of reset. |
| 108 | // |
| 109 | // gen: whether the reset is generated |
| 110 | // true: it is a generated reset inside rstmgr |
| 111 | // false: it is a hardwired design reset inside rstmgr (roots and por) |
| 112 | // |
| 113 | // type: the reset type [ext, top] |
| 114 | // ext: the reset is coming in from the ports, external to earlgrey |
| 115 | // int: the reset is only used inside rstmgr |
| 116 | // top: the reset is output from rstmgr to top level struct |
| 117 | // |
| 118 | // parent: The parent reset |
| 119 | // If type is "ext", there is no root, since it is external |
| 120 | // |
| 121 | // domain: The power domain |
| 122 | // If no domain, it means there is no choice, just inherits from root. |
| 123 | // Otherwise, selects the domain to which it is related |
| 124 | // 0 is defaulted for always on. |
| 125 | // TBD: This should eventually be changed to a name->index project wide lookup |
| 126 | // |
| 127 | // clk: related clock domain for synchronous release |
| 128 | // If type is "por", there is not related clock, since it is |
| 129 | // likely external or generated from a voltage comparator |
| 130 | // |
| 131 | nodes: [ |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 132 | { name: "rst_ni", gen: false, type: "ext" } |
Timothy Chen | c623393 | 2020-08-19 15:34:07 -0700 | [diff] [blame] | 133 | { name: "por_aon", gen: false, type: "top", parent: "rst_ni", clk: "aon" } |
| 134 | { name: "lc_src", gen: false, type: "int", parent: "por", clk: "io_div2" } |
| 135 | { name: "sys_src", gen: false, type: "int", parent: "por", clk: "io_div2" } |
| 136 | { name: "por", gen: true, type: "top", parent: "por_aon", clk: "main" } |
| 137 | { name: "por_io", gen: true, type: "top", parent: "por_aon", clk: "io" } |
| 138 | { name: "por_io_div2", gen: true, type: "top", parent: "por_aon", clk: "io_div2" } |
Timothy Chen | ced60b2 | 2020-08-20 10:35:00 -0700 | [diff] [blame] | 139 | { name: "por_io_div4", gen: true , type: "top", parent: "por_aon", clk: "io_div4" } |
Timothy Chen | c623393 | 2020-08-19 15:34:07 -0700 | [diff] [blame] | 140 | { name: "por_usb", gen: true, type: "top", parent: "por_aon", clk: "usb" } |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 141 | { name: "lc", gen: true, type: "top", domain: "0", parent: "lc_src", clk: "main" } |
| 142 | { name: "lc_io", gen: true, type: "top", domain: "0", parent: "lc_src", clk: "io_div4" } |
Timothy Chen | c623393 | 2020-08-19 15:34:07 -0700 | [diff] [blame] | 143 | { name: "sys", gen: true, type: "top", domain: "0", parent: "sys_src", clk: "main" } |
| 144 | { name: "sys_io", gen: true, type: "top", domain: "0", parent: "sys_src", clk: "io_div2" } |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 145 | { name: "sys_io_div4", gen: true, type: "top", domain: "0", parent: "sys_src", clk: "io_div4" } |
Timothy Chen | c623393 | 2020-08-19 15:34:07 -0700 | [diff] [blame] | 146 | { name: "sys_aon", gen: true, type: "top", domain: "0", parent: "sys_src", clk: "aon" } |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 147 | { name: "spi_device", gen: true, type: "top", domain: "0", parent: "sys_src", clk: "io_div2", sw: 1 } |
| 148 | { name: "usb", gen: true, type: "top", domain: "0", parent: "sys_src", clk: "usb", sw: 1 } |
Timothy Chen | c623393 | 2020-08-19 15:34:07 -0700 | [diff] [blame] | 149 | ] |
| 150 | } |
Timothy Chen | 3193b00 | 2019-10-04 16:56:05 -0700 | [diff] [blame] | 151 | |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 152 | // Number of cores: used in rv_plic and timer |
| 153 | num_cores: "1", |
| 154 | |
| 155 | // `module` defines the peripherals. |
| 156 | // Details are coming from each modules' config file `ip.hjson` |
| 157 | // TODO: Define parameter here |
Timothy Chen | dde6805 | 2020-08-05 16:29:35 -0700 | [diff] [blame] | 158 | // generated: A module is templated and generated as part of topgen |
| 159 | // 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] | 160 | module: [ |
| 161 | { name: "uart", // instance name |
| 162 | type: "uart", // Must be matched to the ip name in `ip.hson` (_reg, _cfg permitted) |
| 163 | // and `hw/ip/{type}` |
Timothy Chen | 3193b00 | 2019-10-04 16:56:05 -0700 | [diff] [blame] | 164 | |
Timothy Chen | 80bd8aa | 2019-10-04 15:57:11 -0700 | [diff] [blame] | 165 | // clock connections defines the port to top level clock connection |
| 166 | // the ip.hjson will declare the clock port names |
| 167 | // 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] | 168 | clock_srcs: {clk_i: "io_div4"}, |
Timothy Chen | 3193b00 | 2019-10-04 16:56:05 -0700 | [diff] [blame] | 169 | |
| 170 | // reset connections defines the port to top level reset connection |
| 171 | // the ip.hjson will declare the reset port names |
Timothy Chen | 80bd8aa | 2019-10-04 15:57:11 -0700 | [diff] [blame] | 172 | // 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] | 173 | reset_connections: {rst_ni: "sys_io_div4"}, |
Timothy Chen | 80bd8aa | 2019-10-04 15:57:11 -0700 | [diff] [blame] | 174 | |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 175 | base_addr: "0x40000000", |
| 176 | }, |
| 177 | { name: "gpio", |
| 178 | type: "gpio", |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 179 | clock_srcs: {clk_i: "io_div4"}, |
Timothy Chen | 0550d69 | 2020-04-20 17:19:35 -0700 | [diff] [blame] | 180 | clock_group: "peri", |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 181 | reset_connections: {rst_ni: "sys_io_div4"}, |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 182 | base_addr: "0x40010000", |
| 183 | } |
| 184 | |
| 185 | { name: "spi_device", |
| 186 | type: "spi_device", |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 187 | clock_srcs: {clk_i: "io_div4"}, |
Timothy Chen | 0550d69 | 2020-04-20 17:19:35 -0700 | [diff] [blame] | 188 | clock_group: "peri", |
Timothy Chen | 3193b00 | 2019-10-04 16:56:05 -0700 | [diff] [blame] | 189 | reset_connections: {rst_ni: "spi_device"}, |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 190 | base_addr: "0x40020000", |
| 191 | }, |
| 192 | { name: "flash_ctrl", |
| 193 | type: "flash_ctrl", |
Timothy Chen | 0550d69 | 2020-04-20 17:19:35 -0700 | [diff] [blame] | 194 | clock_srcs: {clk_i: "main"}, |
| 195 | clock_group: "infra", |
Timothy Chen | 3193b00 | 2019-10-04 16:56:05 -0700 | [diff] [blame] | 196 | reset_connections: {rst_ni: "lc"}, |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 197 | base_addr: "0x40030000", |
Timothy Chen | 1daf582 | 2020-10-26 17:28:15 -0700 | [diff] [blame] | 198 | generated: "true" // Indicate this module is generated in the topgen |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 199 | }, |
| 200 | { name: "rv_timer", |
| 201 | type: "rv_timer", |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 202 | clock_srcs: {clk_i: "io_div4"}, |
Timothy Chen | 0550d69 | 2020-04-20 17:19:35 -0700 | [diff] [blame] | 203 | clock_group: "timers", |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 204 | reset_connections: {rst_ni: "sys_io_div4"}, |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 205 | base_addr: "0x40080000", |
| 206 | }, |
Pirmin Vogel | d453438 | 2019-10-17 13:18:31 +0100 | [diff] [blame] | 207 | { name: "aes", |
| 208 | type: "aes", |
Timothy Chen | 0550d69 | 2020-04-20 17:19:35 -0700 | [diff] [blame] | 209 | clock_srcs: {clk_i: "main"}, |
| 210 | clock_group: "trans", |
Pirmin Vogel | d453438 | 2019-10-17 13:18:31 +0100 | [diff] [blame] | 211 | reset_connections: {rst_ni: "sys"}, |
| 212 | base_addr: "0x40110000", |
| 213 | }, |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 214 | { name: "hmac", |
| 215 | type: "hmac", |
Timothy Chen | 0550d69 | 2020-04-20 17:19:35 -0700 | [diff] [blame] | 216 | clock_srcs: {clk_i: "main"}, |
| 217 | clock_group: "trans", |
Timothy Chen | 3193b00 | 2019-10-04 16:56:05 -0700 | [diff] [blame] | 218 | reset_connections: {rst_ni: "sys"}, |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 219 | base_addr: "0x40120000", |
| 220 | }, |
| 221 | { name: "rv_plic", |
| 222 | type: "rv_plic", |
Timothy Chen | 0550d69 | 2020-04-20 17:19:35 -0700 | [diff] [blame] | 223 | clock_srcs: {clk_i: "main"}, |
| 224 | clock_group: "secure", |
Timothy Chen | 3193b00 | 2019-10-04 16:56:05 -0700 | [diff] [blame] | 225 | reset_connections: {rst_ni: "sys"}, |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 226 | base_addr: "0x40090000", |
| 227 | generated: "true" // Indicate this module is generated in the topgen |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 228 | } |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 229 | // pinmux is currently allocated to main fabric, |
| 230 | // however this should probably be moved to peri fabric |
Eunchan Kim | 436d224 | 2019-10-29 17:25:51 -0700 | [diff] [blame] | 231 | { name: "pinmux", |
| 232 | type: "pinmux", |
| 233 | clock: "main", |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 234 | clock_srcs: {clk_i: "main", clk_aon_i: "aon"}, |
Timothy Chen | 0550d69 | 2020-04-20 17:19:35 -0700 | [diff] [blame] | 235 | clock_group: "secure", |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 236 | reset_connections: {rst_ni: "sys", rst_aon_ni: "sys_aon"}, |
Eunchan Kim | 436d224 | 2019-10-29 17:25:51 -0700 | [diff] [blame] | 237 | base_addr: "0x40070000", |
| 238 | generated: "true" |
Michael Schaffner | 666dde1 | 2019-10-25 11:57:54 -0700 | [diff] [blame] | 239 | }, |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 240 | // see comment regarding pinmux above |
Michael Schaffner | 6015796 | 2020-05-01 19:11:28 -0700 | [diff] [blame] | 241 | { name: "padctrl", |
| 242 | type: "padctrl", |
| 243 | clock: "main", |
| 244 | clock_srcs: {clk_i: "main"}, |
| 245 | clock_group: "secure", |
| 246 | reset_connections: {rst_ni: "sys"}, |
| 247 | base_addr: "0x40160000", |
| 248 | generated: "true" |
| 249 | }, |
Michael Schaffner | 666dde1 | 2019-10-25 11:57:54 -0700 | [diff] [blame] | 250 | { name: "alert_handler", |
| 251 | type: "alert_handler", |
Timothy Chen | 0550d69 | 2020-04-20 17:19:35 -0700 | [diff] [blame] | 252 | clock_srcs: {clk_i: "main"}, |
| 253 | clock_group: "secure", |
Michael Schaffner | 666dde1 | 2019-10-25 11:57:54 -0700 | [diff] [blame] | 254 | reset_connections: {rst_ni: "sys"}, |
| 255 | base_addr: "0x40130000", |
| 256 | generated: "true" // Indicate this module is generated in the topgen |
| 257 | localparam: { |
| 258 | EscCntDw: 32, |
| 259 | AccuCntDw: 16, |
| 260 | LfsrSeed: "0x7FFFFFFF" |
| 261 | } |
| 262 | } |
Timothy Chen | 163050b | 2020-04-13 23:29:29 -0700 | [diff] [blame] | 263 | { name: "pwrmgr", |
| 264 | type: "pwrmgr", |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 265 | clock_srcs: {clk_i: "io_div4", clk_slow_i: "aon"}, |
Timothy Chen | 0550d69 | 2020-04-20 17:19:35 -0700 | [diff] [blame] | 266 | clock_group: "powerup", |
Timothy Chen | a4cc10d | 2020-05-08 16:06:20 -0700 | [diff] [blame] | 267 | reset_connections: {rst_ni: "por", rst_slow_ni: "por_aon"}, |
Timothy Chen | 163050b | 2020-04-13 23:29:29 -0700 | [diff] [blame] | 268 | base_addr: "0x400A0000", |
Timothy Chen | 4ba2531 | 2020-06-17 13:08:57 -0700 | [diff] [blame] | 269 | generated: "true" // Indicate this module is generated in the topgen |
Timothy Chen | f56c1b5 | 2020-04-28 17:00:43 -0700 | [diff] [blame] | 270 | |
Timothy Chen | 163050b | 2020-04-13 23:29:29 -0700 | [diff] [blame] | 271 | }, |
Timothy Chen | c59f701 | 2020-04-16 19:11:42 -0700 | [diff] [blame] | 272 | { name: "rstmgr", |
| 273 | type: "rstmgr", |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 274 | 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] | 275 | clk_io_div2_i: "io_div2", clk_io_div4_i: "io_div4"}, |
Timothy Chen | c59f701 | 2020-04-16 19:11:42 -0700 | [diff] [blame] | 276 | clock_group: "powerup", |
| 277 | reset_connections: {rst_ni: "rst_ni"}, |
| 278 | base_addr: "0x400B0000", |
Timothy Chen | 0f3c175 | 2020-08-26 12:47:17 -0700 | [diff] [blame] | 279 | generated: "true" // Indicate this module is generated in the topgen |
Timothy Chen | f56c1b5 | 2020-04-28 17:00:43 -0700 | [diff] [blame] | 280 | }, |
| 281 | { name: "clkmgr", |
| 282 | type: "clkmgr", |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 283 | clock_srcs: {clk_i: "io_div4"}, |
Timothy Chen | f56c1b5 | 2020-04-28 17:00:43 -0700 | [diff] [blame] | 284 | clock_group: "powerup", |
Timothy Chen | 79972ad | 2020-06-30 17:13:49 -0700 | [diff] [blame] | 285 | reset_connections: {rst_ni: "por_io", 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] | 286 | rst_io_div2_ni: "por_io_div2", rst_io_div4_ni: "por_io_div4"}, |
Timothy Chen | f56c1b5 | 2020-04-28 17:00:43 -0700 | [diff] [blame] | 287 | base_addr: "0x400C0000", |
Timothy Chen | c59f701 | 2020-04-16 19:11:42 -0700 | [diff] [blame] | 288 | generated: "true" |
| 289 | }, |
Michael Schaffner | 666dde1 | 2019-10-25 11:57:54 -0700 | [diff] [blame] | 290 | // dummy module to capture the alert handler escalation signals |
| 291 | // and test them by converting them into IRQs |
| 292 | { name: "nmi_gen", |
| 293 | type: "nmi_gen", |
Timothy Chen | 0550d69 | 2020-04-20 17:19:35 -0700 | [diff] [blame] | 294 | clock_srcs: {clk_i: "main"}, |
| 295 | clock_group: "secure", |
Michael Schaffner | 666dde1 | 2019-10-25 11:57:54 -0700 | [diff] [blame] | 296 | reset_connections: {rst_ni: "sys"}, |
| 297 | base_addr: "0x40140000", |
Eunchan Kim | 436d224 | 2019-10-29 17:25:51 -0700 | [diff] [blame] | 298 | } |
Pirmin Vogel | ea91b30 | 2020-01-14 18:53:01 +0000 | [diff] [blame] | 299 | { name: "usbdev", |
| 300 | type: "usbdev", |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 301 | clock_srcs: {clk_i: "io_div4", clk_usb_48mhz_i: "usb"}, |
Timothy Chen | 0550d69 | 2020-04-20 17:19:35 -0700 | [diff] [blame] | 302 | clock_group: "peri", |
Timothy Chen | 4c8905e | 2020-08-26 10:34:33 -0700 | [diff] [blame] | 303 | clock_reset_export: ["ast"], |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 304 | reset_connections: {rst_ni: "sys_io_div4", rst_usb_48mhz_ni: "usb"}, |
Pirmin Vogel | ea91b30 | 2020-01-14 18:53:01 +0000 | [diff] [blame] | 305 | base_addr: "0x40150000", |
| 306 | }, |
Timothy Chen | dde6805 | 2020-08-05 16:29:35 -0700 | [diff] [blame] | 307 | { name: "sensor_ctrl", |
| 308 | type: "sensor_ctrl", |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 309 | clock_srcs: {clk_i: "io_div4"}, |
Timothy Chen | dde6805 | 2020-08-05 16:29:35 -0700 | [diff] [blame] | 310 | clock_group: "secure", |
Timothy Chen | 4c8905e | 2020-08-26 10:34:33 -0700 | [diff] [blame] | 311 | clock_reset_export: ["ast"], |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 312 | reset_connections: {rst_ni: "sys_io_div4"}, |
Timothy Chen | dde6805 | 2020-08-05 16:29:35 -0700 | [diff] [blame] | 313 | base_addr: "0x40170000", |
| 314 | top_only: "true" |
| 315 | }, |
Timothy Chen | 3c3f348 | 2020-09-09 18:45:41 -0700 | [diff] [blame] | 316 | { name: "keymgr", |
| 317 | type: "keymgr", |
| 318 | clock_srcs: {clk_i: "main"}, |
| 319 | clock_group: "secure", |
| 320 | reset_connections: {rst_ni: "sys"}, |
| 321 | base_addr: "0x401a0000", |
| 322 | }, |
Michael Schaffner | 5ae4a23 | 2020-10-06 19:03:43 -0700 | [diff] [blame] | 323 | { name: "otp_ctrl", |
| 324 | type: "otp_ctrl", |
| 325 | clock_srcs: {clk_i: "io_div4"}, |
| 326 | clock_group: "timers", |
Michael Schaffner | b2a66dd | 2020-10-26 10:33:12 -0700 | [diff] [blame] | 327 | reset_connections: {rst_ni: "lc_io"}, |
Michael Schaffner | 5ae4a23 | 2020-10-06 19:03:43 -0700 | [diff] [blame] | 328 | base_addr: "0x401b0000", |
| 329 | }, |
Philipp Wagner | a4a9e40 | 2020-06-22 12:06:56 +0100 | [diff] [blame] | 330 | { name: "otbn", |
| 331 | type: "otbn", |
| 332 | clock_srcs: {clk_i: "main"}, |
| 333 | clock_group: "trans", |
| 334 | reset_connections: {rst_ni: "sys"}, |
| 335 | base_addr: "0x50000000", |
| 336 | }, |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 337 | ] |
| 338 | |
| 339 | // Memories (ROM, RAM, eFlash) are defined at the top. |
| 340 | // It utilizes the primitive cells but configurable |
| 341 | memory: [ |
Timothy Chen | 80bd8aa | 2019-10-04 15:57:11 -0700 | [diff] [blame] | 342 | { name: "rom", |
Timothy Chen | 0550d69 | 2020-04-20 17:19:35 -0700 | [diff] [blame] | 343 | clock_srcs: {clk_i: "main"}, |
| 344 | clock_group: "infra", |
Timothy Chen | 80bd8aa | 2019-10-04 15:57:11 -0700 | [diff] [blame] | 345 | reset_connections: {rst_ni: "sys"}, |
| 346 | type: "rom", |
| 347 | base_addr: "0x00008000", |
Weicai Yang | 55b2cdf | 2020-04-10 15:40:30 -0700 | [diff] [blame] | 348 | swaccess: "ro", |
Timothy Chen | da2e344 | 2020-02-24 21:37:47 -0800 | [diff] [blame] | 349 | size: "0x4000" |
Eunchan Kim | e0d37fe | 2020-08-03 12:05:21 -0700 | [diff] [blame] | 350 | inter_signal_list: [ |
| 351 | { struct: "tl" |
| 352 | package: "tlul_pkg" |
| 353 | type: "req_rsp" |
| 354 | act: "rsp" |
| 355 | name: "tl" |
| 356 | } |
| 357 | ] |
Timothy Chen | 80bd8aa | 2019-10-04 15:57:11 -0700 | [diff] [blame] | 358 | }, |
| 359 | { name: "ram_main", |
Timothy Chen | 0550d69 | 2020-04-20 17:19:35 -0700 | [diff] [blame] | 360 | clock_srcs: {clk_i: "main"}, |
| 361 | clock_group: "infra", |
Timothy Chen | 80bd8aa | 2019-10-04 15:57:11 -0700 | [diff] [blame] | 362 | reset_connections: {rst_ni: "sys"}, |
| 363 | type: "ram_1p", |
| 364 | base_addr: "0x10000000", |
Eunchan Kim | e0d37fe | 2020-08-03 12:05:21 -0700 | [diff] [blame] | 365 | size: "0x10000" |
| 366 | inter_signal_list: [ |
| 367 | { struct: "tl" |
| 368 | package: "tlul_pkg" |
| 369 | type: "req_rsp" |
| 370 | act: "rsp" |
| 371 | name: "tl" |
| 372 | } |
| 373 | ] |
| 374 | }, |
Timothy Chen | 2c9e1a9 | 2020-06-29 15:03:25 -0700 | [diff] [blame] | 375 | { name: "ram_ret", |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 376 | clock_srcs: {clk_i: "io_div4"}, |
Timothy Chen | 2c9e1a9 | 2020-06-29 15:03:25 -0700 | [diff] [blame] | 377 | clock_group: "infra", |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 378 | reset_connections: {rst_ni: "sys_io_div4"}, |
Timothy Chen | 2c9e1a9 | 2020-06-29 15:03:25 -0700 | [diff] [blame] | 379 | type: "ram_1p", |
| 380 | base_addr: "0x18000000", |
Eunchan Kim | e0d37fe | 2020-08-03 12:05:21 -0700 | [diff] [blame] | 381 | size: "0x1000" |
| 382 | inter_signal_list: [ |
| 383 | { struct: "tl" |
| 384 | package: "tlul_pkg" |
| 385 | type: "req_rsp" |
| 386 | act: "rsp" |
| 387 | name: "tl" |
| 388 | } |
| 389 | ] |
| 390 | }, |
Timothy Chen | 80bd8aa | 2019-10-04 15:57:11 -0700 | [diff] [blame] | 391 | { name: "eflash", |
Timothy Chen | 0550d69 | 2020-04-20 17:19:35 -0700 | [diff] [blame] | 392 | clock_srcs: {clk_i: "main"}, |
| 393 | clock_group: "infra", |
Timothy Chen | 80bd8aa | 2019-10-04 15:57:11 -0700 | [diff] [blame] | 394 | reset_connections: {rst_ni: "lc"}, |
| 395 | type: "eflash", |
| 396 | base_addr: "0x20000000", |
Timothy Chen | 1daf582 | 2020-10-26 17:28:15 -0700 | [diff] [blame] | 397 | banks: 2, |
| 398 | pages_per_bank: 256, |
Weicai Yang | 55b2cdf | 2020-04-10 15:40:30 -0700 | [diff] [blame] | 399 | swaccess: "ro", |
Eunchan Kim | e4a8507 | 2020-02-05 16:00:00 -0800 | [diff] [blame] | 400 | inter_signal_list: [ |
| 401 | { struct: "flash", // flash_req_t, flash_rsp_t |
| 402 | type: "req_rsp", |
| 403 | name: "flash_ctrl", // flash_ctrl_i (req), flash_ctrl_o (rsp) |
Eunchan Kim | 40098a9 | 2020-04-17 12:22:36 -0700 | [diff] [blame] | 404 | act: "rsp", |
Timothy Chen | ac62065 | 2020-06-25 13:48:50 -0700 | [diff] [blame] | 405 | }, |
Eunchan Kim | e0d37fe | 2020-08-03 12:05:21 -0700 | [diff] [blame] | 406 | { struct: "tl" |
| 407 | package: "tlul_pkg" |
| 408 | type: "req_rsp" |
| 409 | act: "rsp" |
| 410 | name: "tl" |
| 411 | } |
Eunchan Kim | e4a8507 | 2020-02-05 16:00:00 -0800 | [diff] [blame] | 412 | ], |
| 413 | }, |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 414 | ], |
| 415 | |
Eunchan Kim | e4a8507 | 2020-02-05 16:00:00 -0800 | [diff] [blame] | 416 | // Inter-module Connection. |
| 417 | // format: |
| 418 | // requester: [ resp1, resp2, ... ], |
| 419 | // |
Eunchan Kim | 40098a9 | 2020-04-17 12:22:36 -0700 | [diff] [blame] | 420 | // the field and value should be module_inst.port_name |
Eunchan Kim | e4a8507 | 2020-02-05 16:00:00 -0800 | [diff] [blame] | 421 | // e.g flash_ctrl0.flash: [flash_phy0.flash_ctrl] |
| 422 | inter_module: { |
Eunchan Kim | 40098a9 | 2020-04-17 12:22:36 -0700 | [diff] [blame] | 423 | 'connect': { |
Timothy Chen | 9b6f242 | 2020-09-18 16:09:07 -0700 | [diff] [blame] | 424 | 'flash_ctrl.flash' : ['eflash.flash_ctrl'], |
| 425 | 'pwrmgr.pwr_flash' : ['flash_ctrl.pwrmgr'], |
| 426 | 'pwrmgr.pwr_rst' : ['rstmgr.pwr'], |
| 427 | 'pwrmgr.pwr_clk' : ['clkmgr.pwr'], |
Michael Schaffner | b2a66dd | 2020-10-26 10:33:12 -0700 | [diff] [blame] | 428 | 'pwrmgr.pwr_otp' : ['otp_ctrl.pwr_otp'], |
Timothy Chen | 75350ca | 2020-09-22 20:55:55 -0700 | [diff] [blame] | 429 | 'flash_ctrl.keymgr': ['keymgr.flash'], |
Timothy Chen | c8f3004 | 2020-09-25 16:59:47 -0700 | [diff] [blame] | 430 | 'alert_handler.crashdump': ['rstmgr.alert_dump'], |
Timothy Chen | 455afcb | 2020-10-01 11:46:35 -0700 | [diff] [blame] | 431 | // The idle connection is automatically connected through topgen. |
| 432 | // The user does not need to explicitly declare anything other than |
| 433 | // an empty list. |
Timothy Chen | c8f3004 | 2020-09-25 16:59:47 -0700 | [diff] [blame] | 434 | 'clkmgr.idle' : [], |
Eunchan Kim | 40098a9 | 2020-04-17 12:22:36 -0700 | [diff] [blame] | 435 | } |
| 436 | |
| 437 | // top is to connect to top net/struct. |
| 438 | // It defines the signal in the top and connect from the module, |
| 439 | // use of the signal is up to top template |
Eunchan Kim | e0d37fe | 2020-08-03 12:05:21 -0700 | [diff] [blame] | 440 | 'top': [ |
| 441 | 'rstmgr.resets', 'rstmgr.cpu', 'pwrmgr.pwr_cpu', 'clkmgr.clocks', |
Eunchan Kim | e0d37fe | 2020-08-03 12:05:21 -0700 | [diff] [blame] | 442 | |
| 443 | // Xbars |
| 444 | 'main.tl_corei', 'main.tl_cored', 'main.tl_dm_sba', 'main.tl_debug_mem' |
Timothy Chen | eba7f49 | 2020-08-26 17:12:08 -0700 | [diff] [blame] | 445 | |
Eunchan Kim | e0d37fe | 2020-08-03 12:05:21 -0700 | [diff] [blame] | 446 | ], |
Eunchan Kim | 40098a9 | 2020-04-17 12:22:36 -0700 | [diff] [blame] | 447 | |
| 448 | // ext is to create port in the top. |
Eunchan Kim | 57071c0 | 2020-08-07 13:59:05 -0700 | [diff] [blame] | 449 | 'external': { |
Timothy Chen | 0f3c175 | 2020-08-26 12:47:17 -0700 | [diff] [blame] | 450 | 'clkmgr.clk_main': 'clk_main', // clock inputs |
| 451 | 'clkmgr.clk_io': 'clk_io', // clock inputs |
| 452 | 'clkmgr.clk_usb': 'clk_usb', // clock inputs |
| 453 | 'clkmgr.clk_aon': 'clk_aon', // clock inputs |
| 454 | 'rstmgr.ast': '', // ast reset input |
Timothy Chen | dde6805 | 2020-08-05 16:29:35 -0700 | [diff] [blame] | 455 | 'pwrmgr.pwr_ast': '', |
| 456 | 'sensor_ctrl.ast_alert': '', |
| 457 | 'sensor_ctrl.ast_status': '', |
| 458 | 'usbdev.usb_ref_val': '', |
| 459 | 'usbdev.usb_ref_pulse': '', |
Michael Schaffner | 5ae4a23 | 2020-10-06 19:03:43 -0700 | [diff] [blame] | 460 | 'peri.tl_ast_wrapper': 'ast_tl', |
| 461 | 'otp_ctrl.otp_ast_pwr_seq': '', |
| 462 | 'otp_ctrl.otp_ast_pwr_seq_h': '', |
Eunchan Kim | 57071c0 | 2020-08-07 13:59:05 -0700 | [diff] [blame] | 463 | }, |
Eunchan Kim | e4a8507 | 2020-02-05 16:00:00 -0800 | [diff] [blame] | 464 | }, |
| 465 | |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 466 | debug_mem_base_addr: "0x1A110000", |
| 467 | |
| 468 | // Crossbars: having a top level crossbar |
| 469 | // This version assumes all crossbars are instantiated at the top. |
| 470 | // Assume xbar.hjson is located in the same directory of top.hjson |
| 471 | xbar: [ |
| 472 | { name: "main", |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 473 | clock_srcs: {clk_main_i: "main", clk_fixed_i: "io_div4"}, |
Timothy Chen | 0550d69 | 2020-04-20 17:19:35 -0700 | [diff] [blame] | 474 | clock_group: "infra", |
Timothy Chen | 3193b00 | 2019-10-04 16:56:05 -0700 | [diff] [blame] | 475 | reset: "sys", |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 476 | reset_connections: {rst_main_ni: "sys", rst_fixed_ni: "sys_io_div4"} |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 477 | }, |
Eunchan Kim | 0523f6b | 2019-12-17 13:53:11 -0800 | [diff] [blame] | 478 | { name: "peri", |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 479 | clock_srcs: {clk_peri_i: "io_div4"}, |
Timothy Chen | 0550d69 | 2020-04-20 17:19:35 -0700 | [diff] [blame] | 480 | clock_group: "infra", |
Timothy Chen | 6b70fd2 | 2020-08-20 14:01:26 -0700 | [diff] [blame] | 481 | reset: "sys_io_div4", |
| 482 | reset_connections: {rst_peri_ni: "sys_io_div4"}, |
Eunchan Kim | 0523f6b | 2019-12-17 13:53:11 -0800 | [diff] [blame] | 483 | } |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 484 | ], |
| 485 | |
| 486 | // ===== INTERRUPT CTRL ===================================================== |
| 487 | // `rv_plic` will be instantiate (need to be defined in `module` field |
| 488 | // If interrupt is not defined, it uses the order from the module list |
| 489 | // and include every modules. |
| 490 | // first item goes to LSB of the interrupt source |
Michael Schaffner | 666dde1 | 2019-10-25 11:57:54 -0700 | [diff] [blame] | 491 | interrupt_module: ["gpio", "uart", "spi_device", "flash_ctrl", |
Philipp Wagner | a4a9e40 | 2020-06-22 12:06:56 +0100 | [diff] [blame] | 492 | "hmac", "alert_handler", "nmi_gen", "usbdev", "pwrmgr", |
Timothy Chen | 3c3f348 | 2020-09-09 18:45:41 -0700 | [diff] [blame] | 493 | "otbn", "keymgr" ] |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 494 | |
| 495 | // RV_PLIC has two searching algorithm internally to pick the most highest priority interrupt |
| 496 | // source. "sequential" is smaller but slower, "matrix" is larger but faster. |
| 497 | // Choose depends on the criteria. Currently it is set to "matrix" to meet FPGA timing @ 50MHz |
| 498 | |
| 499 | // generated: |
| 500 | interrupt: [ |
| 501 | ] |
| 502 | |
Michael Schaffner | 666dde1 | 2019-10-25 11:57:54 -0700 | [diff] [blame] | 503 | // ===== ALERT HANDLER ====================================================== |
| 504 | // list all modules that expose alerts |
Philipp Wagner | a4a9e40 | 2020-06-22 12:06:56 +0100 | [diff] [blame] | 505 | // first item goes to LSB of the alert source |
Cindy Chen | dae0c65 | 2020-10-09 10:00:51 -0700 | [diff] [blame] | 506 | alert_module: [ "aes", "otbn", "sensor_ctrl", "keymgr", "otp_ctrl" ] |
Michael Schaffner | 666dde1 | 2019-10-25 11:57:54 -0700 | [diff] [blame] | 507 | |
| 508 | // generated list of alerts: |
| 509 | alert: [ |
| 510 | ] |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 511 | |
| 512 | // TODO: PINMUX |
Eunchan Kim | 632c6f7 | 2019-09-30 11:11:51 -0700 | [diff] [blame] | 513 | pinmux: { |
| 514 | |
Eunchan Kim | 436d224 | 2019-10-29 17:25:51 -0700 | [diff] [blame] | 515 | // Total number of Multiplexed I/O |
| 516 | // All the input/outputs from IPs are muxed in pinmux, and it has # of I/O |
| 517 | // talks to the outside of top_earlgrey. |
| 518 | // This field will be replaced to the length of PAD if padctrl is defined |
| 519 | num_mio: 32 |
| 520 | |
Eunchan Kim | 632c6f7 | 2019-09-30 11:11:51 -0700 | [diff] [blame] | 521 | // Dedicated IO modules. The in/out ports of the modules below are connected |
| 522 | // to TOP IO port through PADS directly. It bypasses PINMUX multiplexers |
| 523 | dio_modules: [ |
| 524 | { name: "spi_device", pad: ["ChB[0..3]"] }, |
Eunchan Kim | 436d224 | 2019-10-29 17:25:51 -0700 | [diff] [blame] | 525 | //{ name: "uart.tx", pad: ["ChA[0]"]}, |
| 526 | { name: "uart", pad: ["ChA[0..1]"]}, |
Eunchan Kim | 632c6f7 | 2019-09-30 11:11:51 -0700 | [diff] [blame] | 527 | // { name: "dio_module.signal_input", pad: ["ChA[31]"] } |
Pirmin Vogel | fe6863b | 2020-05-11 17:30:54 +0200 | [diff] [blame] | 528 | { name: "usbdev", pad: ["ChC[0..8]"]}, |
Eunchan Kim | 632c6f7 | 2019-09-30 11:11:51 -0700 | [diff] [blame] | 529 | ], |
| 530 | |
| 531 | // Multiplexing IO modules. The in/out ports of the modules below are |
| 532 | // connected through PINMUX, which gives controllability of the connection |
| 533 | // between the modules and the IO PADS. |
| 534 | // If `mio_modules` aren't defined, it uses all remaining modules from |
| 535 | // module list except defined in `dio_modules`. |
| 536 | mio_modules: ["uart", "gpio"] |
| 537 | |
| 538 | // If any module isn't defined in above two lists, its inputs will be tied |
| 539 | // to 0, and the output/OE signals will be floating (or connected to |
| 540 | // unused signal). `rv_plic` is special module, shouldn't be defined here. |
| 541 | nc_modules: ["rv_timer", "hmac"] |
| 542 | |
Michael Schaffner | 57c490d | 2020-04-29 15:08:55 -0700 | [diff] [blame] | 543 | // Number of wakeup detectors to instantiate, and bitwidth for the wakeup |
| 544 | // counters. Note that all MIO pad inputs are connected to the wakeup detectors, |
| 545 | // and there is no way to disable this. DIO inputs on the other hand are by |
| 546 | // default not connected. |
| 547 | // TODO: need to add mechanism to mark them as wakeup pins. |
| 548 | num_wkup_detect: 8 |
| 549 | wkup_cnt_width: 8 |
| 550 | |
Eunchan Kim | 632c6f7 | 2019-09-30 11:11:51 -0700 | [diff] [blame] | 551 | // Below fields are generated. |
| 552 | // inputs: [ |
| 553 | // { name: "xxx", width: xx }, |
| 554 | // ] |
| 555 | // outputs: [ |
| 556 | // { name: "xxx", width: xx }, |
| 557 | // ] |
| 558 | // inouts: [ |
| 559 | // { name: "xxx", width: xx }, |
| 560 | // ] |
| 561 | } |
| 562 | |
| 563 | // PADS instantiation |
| 564 | // Number of in/outs and the numer of PAD instances doesn't have to be |
| 565 | // same. The number given below excludes clock/reset and other necessary |
| 566 | // PADS but only defines GPIO pads. |
| 567 | padctrl: { |
| 568 | attr_default: ["STRONG"], |
| 569 | pads: [ |
| 570 | { name: "ChA" type: "IO_33V", count: 32 }, // Accessing as ChA[0] .. ChA[31] |
| 571 | { name: "ChB" type: "IO_33V", count: 4, attr: ["KEEP", "WEAK"]}, |
Pirmin Vogel | ea91b30 | 2020-01-14 18:53:01 +0000 | [diff] [blame] | 572 | { name: "ChC" type: "IO_33V", count: 4, attr: ["KEEP", "STRONG"]}, |
Eunchan Kim | 632c6f7 | 2019-09-30 11:11:51 -0700 | [diff] [blame] | 573 | ] |
| 574 | } |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 575 | |
| 576 | } |