blob: 18f71fd159bc9a6777632e6f1bd1ac542f07a25d [file] [log] [blame]
lowRISC Contributors802543a2019-08-31 12:12:56 +01001// 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
9 datawidth: "32", # 32-bit datawidth
10
Timothy Chen0550d692020-04-20 17:19:35 -070011 // This is the clock data strcture of the design.
Timothy Chenf56c1b52020-04-28 17:00:43 -070012 // The hier path refers to the clock reference path (struct / port)
13 // - The top/ext desgination follows the same scheme as inter-module
Timothy Chen0550d692020-04-20 17:19:35 -070014 // The src key indicates the raw clock sources in the design
15 // The groups key indicates the various clock groupings in the design
16 clocks: {
17
Timothy Chenf56c1b52020-04-28 17:00:43 -070018 hier_paths: {
19 top: "clkmgr_clocks.", // top level is a struct
20 ext: "", // ext is a port of the clock name
21 },
22
Timothy Chen33b3b9d2020-05-08 10:14:17 -070023 // Clock Source attributes
24 // name: Name of group.
25 // aon: Whether the clock is free running all the time.
26 // If it is, the clock is not hanlded by clkmgr.
27 // freq: Absolute frequency of clk in Hz
28
Timothy Chen0550d692020-04-20 17:19:35 -070029 srcs: [
Timothy Chen33b3b9d2020-05-08 10:14:17 -070030 { name: "main", aon: "no", freq: "100000000" }
31 { name: "io", aon: "no", freq: "100000000" }
32 { name: "usb", aon: "no", freq: "48000000" }
33 { name: "aon", aon: "yes", freq: "200000" }
Timothy Chen0550d692020-04-20 17:19:35 -070034 ],
35
36 // Clock Group attributes
37 // name: name of group.
38 //
Timothy Chenf56c1b52020-04-28 17:00:43 -070039 // src: The hierarchical source of the clock
40 // "ext" - clock is supplied from a port of the top module
41 // "top" - clock is supplied from a net inside the top module
42 //
Rupert Swarbrickcba33a22020-07-02 16:46:38 +010043 // sw_cg: whether software is allowed to gate the clock
Timothy Chen0550d692020-04-20 17:19:35 -070044 // "no" - software is not allowed to gate clocks
45 // "yes" - software is allowed to gate clocks
46 // "hint" - software can provide a hint, and hw controls the rest
47 //
48 // unique: whether each module in the group can be separately gated
Rupert Swarbrickcba33a22020-07-02 16:46:38 +010049 // if sw_cg is "no", this field has no meaning
Timothy Chen0550d692020-04-20 17:19:35 -070050 // "yes" - each clock is individually controlled
51 // "no" - the group is controlled as one single unit
52 //
53 // The powerup and proc groups are unique.
Timothy Chen33b3b9d2020-05-08 10:14:17 -070054 // The powerup group of clocks do not feed through the clock
Timothy Chen0550d692020-04-20 17:19:35 -070055 // controller as they manage clock controller behavior
56 // The proc group is not peripheral, and direclty hardwired
57
58 groups: [
Timothy Chenf56c1b52020-04-28 17:00:43 -070059 { name: "powerup", src:"ext", sw_cg: "no" }
60 { name: "trans", src:"top", sw_cg: "hint", unique: "yes", }
61 { name: "infra", src:"top", sw_cg: "no", }
62 { name: "secure", src:"top", sw_cg: "no" }
63 { name: "peri", src:"top", sw_cg: "yes", unique: "no" }
64 { name: "timers", src:"top", sw_cg: "no" }
Timothy Chen0550d692020-04-20 17:19:35 -070065 { name: "proc",
Timothy Chenf56c1b52020-04-28 17:00:43 -070066 src: "no"
Timothy Chen0550d692020-04-20 17:19:35 -070067 sw_cg: "no"
68 unique: "no"
69 clocks: {
70 clk_proc_main: main
71 }
72 }
73 ],
74 }
lowRISC Contributors802543a2019-08-31 12:12:56 +010075
Timothy Chen3193b002019-10-04 16:56:05 -070076 // Reset attributes
Timothy Chene8cb3bd2020-04-14 16:12:26 -070077 // name: name of reset.
Timothy Chene8cb3bd2020-04-14 16:12:26 -070078 //
Timothy Chena4cc10d2020-05-08 16:06:20 -070079 // type: the reset type [ext, top]
80 // ext: the reset is coming in from the ports, external to earlgrey
81 // top: the reset is coming from top level, the rstmgr output struct
82 //
83 // root: The parent reset
84 // If type is "ext", there is no root, since it is external
Timothy Chene8cb3bd2020-04-14 16:12:26 -070085 //
Timothy Chen3193b002019-10-04 16:56:05 -070086 // clk: related clock domain for synchronous release
Timothy Chene8cb3bd2020-04-14 16:12:26 -070087 // If type is "por", there is not related clock, since it is
88 // likely external or generated from a voltage comparator
89 //
Timothy Chen3193b002019-10-04 16:56:05 -070090 resets: [
Timothy Chena4cc10d2020-05-08 16:06:20 -070091 { name: "rst_ni", type: "ext" }
92 { name: "por_aon", type: "top", root: "rst_ni", clk: "aon" }
93 { name: "por", type: "top", root: "por_aon", clk: "main" }
94 { name: "por_io", type: "top", root: "por_aon", clk: "io" }
95 { name: "por_usb", type: "top", root: "por_aon", clk: "usb" }
96 { name: "lc", type: "top", root: "lc", clk: "io" }
97 { name: "sys", type: "top", root: "sys", clk: "main" }
98 { name: "sys_io", type: "top", root: "sys", clk: "io" }
99 { name: "sys_aon", type: "top", root: "sys", clk: "io" }
100 { name: "spi_device", type: "top", root: "sys", clk: "io", sw: 1 }
101 { name: "usb", type: "top", root: "sys", clk: "usb", sw: 1 }
Timothy Chen3193b002019-10-04 16:56:05 -0700102 ]
103
lowRISC Contributors802543a2019-08-31 12:12:56 +0100104 // Number of cores: used in rv_plic and timer
105 num_cores: "1",
106
107 // `module` defines the peripherals.
108 // Details are coming from each modules' config file `ip.hjson`
109 // TODO: Define parameter here
110 module: [
111 { name: "uart", // instance name
112 type: "uart", // Must be matched to the ip name in `ip.hson` (_reg, _cfg permitted)
113 // and `hw/ip/{type}`
Timothy Chen3193b002019-10-04 16:56:05 -0700114
Timothy Chen80bd8aa2019-10-04 15:57:11 -0700115 // clock connections defines the port to top level clock connection
116 // the ip.hjson will declare the clock port names
117 // If none are defined at ip.hjson, clk_i is used by default
Timothy Chen33b3b9d2020-05-08 10:14:17 -0700118 clock_srcs: {clk_i: "io"},
Timothy Chen3193b002019-10-04 16:56:05 -0700119
120 // reset connections defines the port to top level reset connection
121 // the ip.hjson will declare the reset port names
Timothy Chen80bd8aa2019-10-04 15:57:11 -0700122 // If none are defined at ip.hjson, rst_ni is used by default
Timothy Chen33b3b9d2020-05-08 10:14:17 -0700123 reset_connections: {rst_ni: "sys_io"},
Timothy Chen80bd8aa2019-10-04 15:57:11 -0700124
lowRISC Contributors802543a2019-08-31 12:12:56 +0100125 base_addr: "0x40000000",
126 },
127 { name: "gpio",
128 type: "gpio",
Timothy Chen33b3b9d2020-05-08 10:14:17 -0700129 clock_srcs: {clk_i: "io"},
Timothy Chen0550d692020-04-20 17:19:35 -0700130 clock_group: "peri",
Timothy Chen33b3b9d2020-05-08 10:14:17 -0700131 reset_connections: {rst_ni: "sys_io"},
lowRISC Contributors802543a2019-08-31 12:12:56 +0100132 base_addr: "0x40010000",
133 }
134
135 { name: "spi_device",
136 type: "spi_device",
Timothy Chen33b3b9d2020-05-08 10:14:17 -0700137 clock_srcs: {clk_i: "io"},
Timothy Chen0550d692020-04-20 17:19:35 -0700138 clock_group: "peri",
Timothy Chen3193b002019-10-04 16:56:05 -0700139 reset_connections: {rst_ni: "spi_device"},
lowRISC Contributors802543a2019-08-31 12:12:56 +0100140 base_addr: "0x40020000",
141 },
142 { name: "flash_ctrl",
143 type: "flash_ctrl",
Timothy Chen0550d692020-04-20 17:19:35 -0700144 clock_srcs: {clk_i: "main"},
145 clock_group: "infra",
Timothy Chen3193b002019-10-04 16:56:05 -0700146 reset_connections: {rst_ni: "lc"},
lowRISC Contributors802543a2019-08-31 12:12:56 +0100147 base_addr: "0x40030000",
148 },
149 { name: "rv_timer",
150 type: "rv_timer",
Timothy Chen33b3b9d2020-05-08 10:14:17 -0700151 clock_srcs: {clk_i: "io"},
Timothy Chen0550d692020-04-20 17:19:35 -0700152 clock_group: "timers",
Timothy Chen33b3b9d2020-05-08 10:14:17 -0700153 reset_connections: {rst_ni: "sys_io"},
lowRISC Contributors802543a2019-08-31 12:12:56 +0100154 base_addr: "0x40080000",
155 },
Pirmin Vogeld4534382019-10-17 13:18:31 +0100156 { name: "aes",
157 type: "aes",
Timothy Chen0550d692020-04-20 17:19:35 -0700158 clock_srcs: {clk_i: "main"},
159 clock_group: "trans",
Pirmin Vogeld4534382019-10-17 13:18:31 +0100160 reset_connections: {rst_ni: "sys"},
161 base_addr: "0x40110000",
162 },
lowRISC Contributors802543a2019-08-31 12:12:56 +0100163 { name: "hmac",
164 type: "hmac",
Timothy Chen0550d692020-04-20 17:19:35 -0700165 clock_srcs: {clk_i: "main"},
166 clock_group: "trans",
Timothy Chen3193b002019-10-04 16:56:05 -0700167 reset_connections: {rst_ni: "sys"},
lowRISC Contributors802543a2019-08-31 12:12:56 +0100168 base_addr: "0x40120000",
169 },
170 { name: "rv_plic",
171 type: "rv_plic",
Timothy Chen0550d692020-04-20 17:19:35 -0700172 clock_srcs: {clk_i: "main"},
173 clock_group: "secure",
Timothy Chen3193b002019-10-04 16:56:05 -0700174 reset_connections: {rst_ni: "sys"},
lowRISC Contributors802543a2019-08-31 12:12:56 +0100175 base_addr: "0x40090000",
176 generated: "true" // Indicate this module is generated in the topgen
lowRISC Contributors802543a2019-08-31 12:12:56 +0100177 }
Eunchan Kim436d2242019-10-29 17:25:51 -0700178 { name: "pinmux",
179 type: "pinmux",
180 clock: "main",
Timothy Chen1faeb3c2020-05-11 22:06:32 -0700181 clock_srcs: {clk_i: "main", clk_aon_i: "io"},
Timothy Chen0550d692020-04-20 17:19:35 -0700182 clock_group: "secure",
Timothy Chen1faeb3c2020-05-11 22:06:32 -0700183 reset_connections: {rst_ni: "sys", rst_aon_ni: "sys_io"},
Eunchan Kim436d2242019-10-29 17:25:51 -0700184 base_addr: "0x40070000",
185 generated: "true"
Michael Schaffner666dde12019-10-25 11:57:54 -0700186 },
Michael Schaffner60157962020-05-01 19:11:28 -0700187 { name: "padctrl",
188 type: "padctrl",
189 clock: "main",
190 clock_srcs: {clk_i: "main"},
191 clock_group: "secure",
192 reset_connections: {rst_ni: "sys"},
193 base_addr: "0x40160000",
194 generated: "true"
195 },
Michael Schaffner666dde12019-10-25 11:57:54 -0700196 { name: "alert_handler",
197 type: "alert_handler",
Timothy Chen0550d692020-04-20 17:19:35 -0700198 clock_srcs: {clk_i: "main"},
199 clock_group: "secure",
Michael Schaffner666dde12019-10-25 11:57:54 -0700200 reset_connections: {rst_ni: "sys"},
201 base_addr: "0x40130000",
202 generated: "true" // Indicate this module is generated in the topgen
203 localparam: {
204 EscCntDw: 32,
205 AccuCntDw: 16,
206 LfsrSeed: "0x7FFFFFFF"
207 }
208 }
Timothy Chen163050b2020-04-13 23:29:29 -0700209 { name: "pwrmgr",
210 type: "pwrmgr",
Timothy Chena4cc10d2020-05-08 16:06:20 -0700211 clock_srcs: {clk_i: "io", clk_slow_i: "aon"},
Timothy Chen0550d692020-04-20 17:19:35 -0700212 clock_group: "powerup",
Timothy Chena4cc10d2020-05-08 16:06:20 -0700213 reset_connections: {rst_ni: "por", rst_slow_ni: "por_aon"},
Timothy Chen163050b2020-04-13 23:29:29 -0700214 base_addr: "0x400A0000",
Timothy Chen4ba25312020-06-17 13:08:57 -0700215 generated: "true" // Indicate this module is generated in the topgen
Timothy Chenf56c1b52020-04-28 17:00:43 -0700216
Timothy Chen163050b2020-04-13 23:29:29 -0700217 },
Timothy Chenc59f7012020-04-16 19:11:42 -0700218 { name: "rstmgr",
219 type: "rstmgr",
Timothy Chena4cc10d2020-05-08 16:06:20 -0700220 clock_srcs: {clk_i: "io", clk_aon_i: "aon", clk_main_i: "main", clk_io_i: "io", clk_usb_i: "usb"},
Timothy Chenc59f7012020-04-16 19:11:42 -0700221 clock_group: "powerup",
222 reset_connections: {rst_ni: "rst_ni"},
223 base_addr: "0x400B0000",
Timothy Chenf56c1b52020-04-28 17:00:43 -0700224 },
225 { name: "clkmgr",
226 type: "clkmgr",
Timothy Chen33b3b9d2020-05-08 10:14:17 -0700227 clock_srcs: {clk_i: "io", clk_main_i: "main", clk_io_i: "io", clk_usb_i: "usb", clk_aon_i: "aon"},
Timothy Chenf56c1b52020-04-28 17:00:43 -0700228 clock_group: "powerup",
Timothy Chena4cc10d2020-05-08 16:06:20 -0700229 reset_connections: {rst_ni: "por_io", rst_main_ni: "por", rst_io_ni: "por_io", rst_usb_ni: "por_usb"},
Timothy Chenf56c1b52020-04-28 17:00:43 -0700230 base_addr: "0x400C0000",
Timothy Chenc59f7012020-04-16 19:11:42 -0700231 generated: "true"
232 },
Michael Schaffner666dde12019-10-25 11:57:54 -0700233 // dummy module to capture the alert handler escalation signals
234 // and test them by converting them into IRQs
235 { name: "nmi_gen",
236 type: "nmi_gen",
Timothy Chen0550d692020-04-20 17:19:35 -0700237 clock_srcs: {clk_i: "main"},
238 clock_group: "secure",
Michael Schaffner666dde12019-10-25 11:57:54 -0700239 reset_connections: {rst_ni: "sys"},
240 base_addr: "0x40140000",
Eunchan Kim436d2242019-10-29 17:25:51 -0700241 }
Pirmin Vogelea91b302020-01-14 18:53:01 +0000242 { name: "usbdev",
243 type: "usbdev",
Timothy Chen33b3b9d2020-05-08 10:14:17 -0700244 clock_srcs: {clk_i: "io", clk_usb_48mhz_i: "usb"},
Timothy Chen0550d692020-04-20 17:19:35 -0700245 clock_group: "peri",
Timothy Chen33b3b9d2020-05-08 10:14:17 -0700246 reset_connections: {rst_ni: "sys_io", rst_usb_48mhz_ni: "usb"},
Pirmin Vogelea91b302020-01-14 18:53:01 +0000247 base_addr: "0x40150000",
248 },
lowRISC Contributors802543a2019-08-31 12:12:56 +0100249 ]
250
251 // Memories (ROM, RAM, eFlash) are defined at the top.
252 // It utilizes the primitive cells but configurable
253 memory: [
Timothy Chen80bd8aa2019-10-04 15:57:11 -0700254 { name: "rom",
Timothy Chen0550d692020-04-20 17:19:35 -0700255 clock_srcs: {clk_i: "main"},
256 clock_group: "infra",
Timothy Chen80bd8aa2019-10-04 15:57:11 -0700257 reset_connections: {rst_ni: "sys"},
258 type: "rom",
259 base_addr: "0x00008000",
Weicai Yang55b2cdf2020-04-10 15:40:30 -0700260 swaccess: "ro",
Timothy Chenda2e3442020-02-24 21:37:47 -0800261 size: "0x4000"
Timothy Chen80bd8aa2019-10-04 15:57:11 -0700262 },
263 { name: "ram_main",
Timothy Chen0550d692020-04-20 17:19:35 -0700264 clock_srcs: {clk_i: "main"},
265 clock_group: "infra",
Timothy Chen80bd8aa2019-10-04 15:57:11 -0700266 reset_connections: {rst_ni: "sys"},
267 type: "ram_1p",
268 base_addr: "0x10000000",
269 size: "0x10000" },
Timothy Chen2c9e1a92020-06-29 15:03:25 -0700270
271 { name: "ram_ret",
272 clock_srcs: {clk_i: "io"},
273 clock_group: "infra",
274 reset_connections: {rst_ni: "sys_io"},
275 type: "ram_1p",
276 base_addr: "0x18000000",
277 size: "0x1000" },
Timothy Chen80bd8aa2019-10-04 15:57:11 -0700278 { name: "eflash",
Timothy Chen0550d692020-04-20 17:19:35 -0700279 clock_srcs: {clk_i: "main"},
280 clock_group: "infra",
Timothy Chen80bd8aa2019-10-04 15:57:11 -0700281 reset_connections: {rst_ni: "lc"},
282 type: "eflash",
283 base_addr: "0x20000000",
Weicai Yang55b2cdf2020-04-10 15:40:30 -0700284 swaccess: "ro",
Eunchan Kime4a85072020-02-05 16:00:00 -0800285 size: "0x80000",
286 inter_signal_list: [
287 { struct: "flash", // flash_req_t, flash_rsp_t
288 type: "req_rsp",
289 name: "flash_ctrl", // flash_ctrl_i (req), flash_ctrl_o (rsp)
Eunchan Kim40098a92020-04-17 12:22:36 -0700290 act: "rsp",
Eunchan Kime4a85072020-02-05 16:00:00 -0800291 }
292 ],
293 },
lowRISC Contributors802543a2019-08-31 12:12:56 +0100294 ],
295
Eunchan Kime4a85072020-02-05 16:00:00 -0800296 // Inter-module Connection.
297 // format:
298 // requester: [ resp1, resp2, ... ],
299 //
Eunchan Kim40098a92020-04-17 12:22:36 -0700300 // the field and value should be module_inst.port_name
Eunchan Kime4a85072020-02-05 16:00:00 -0800301 // e.g flash_ctrl0.flash: [flash_phy0.flash_ctrl]
302 inter_module: {
Eunchan Kim40098a92020-04-17 12:22:36 -0700303 'connect': {
304 'flash_ctrl.flash': ['eflash.flash_ctrl']
Timothy Chenc59f7012020-04-16 19:11:42 -0700305 'pwrmgr.pwr_rst' : ['rstmgr.pwr'],
Timothy Chenf56c1b52020-04-28 17:00:43 -0700306 'pwrmgr.pwr_clk' : ['clkmgr.pwr'],
Eunchan Kim40098a92020-04-17 12:22:36 -0700307 }
308
309 // top is to connect to top net/struct.
310 // It defines the signal in the top and connect from the module,
311 // use of the signal is up to top template
Timothy Chenf56c1b52020-04-28 17:00:43 -0700312 'top': ['rstmgr.resets', 'rstmgr.cpu', 'pwrmgr.pwr_cpu', 'clkmgr.clocks'],
Eunchan Kim40098a92020-04-17 12:22:36 -0700313
314 // ext is to create port in the top.
Eunchan Kim1d5bbcc2020-04-27 20:51:38 -0700315 'external': [],
Eunchan Kime4a85072020-02-05 16:00:00 -0800316 },
317
lowRISC Contributors802543a2019-08-31 12:12:56 +0100318 debug_mem_base_addr: "0x1A110000",
319
320 // Crossbars: having a top level crossbar
321 // This version assumes all crossbars are instantiated at the top.
322 // Assume xbar.hjson is located in the same directory of top.hjson
323 xbar: [
324 { name: "main",
Timothy Chen33b3b9d2020-05-08 10:14:17 -0700325 clock_srcs: {clk_main_i: "main", clk_fixed_i: "io"},
Timothy Chen0550d692020-04-20 17:19:35 -0700326 clock_group: "infra",
Timothy Chen3193b002019-10-04 16:56:05 -0700327 reset: "sys",
Timothy Chen33b3b9d2020-05-08 10:14:17 -0700328 reset_connections: {rst_main_ni: "sys", rst_fixed_ni: "sys_io"}
lowRISC Contributors802543a2019-08-31 12:12:56 +0100329 },
Eunchan Kim0523f6b2019-12-17 13:53:11 -0800330 { name: "peri",
Timothy Chen33b3b9d2020-05-08 10:14:17 -0700331 clock_srcs: {clk_peri_i: "io"},
Timothy Chen0550d692020-04-20 17:19:35 -0700332 clock_group: "infra",
Timothy Chen33b3b9d2020-05-08 10:14:17 -0700333 reset: "sys_io",
334 reset_connections: {rst_peri_ni: "sys_io"},
Eunchan Kim0523f6b2019-12-17 13:53:11 -0800335 }
lowRISC Contributors802543a2019-08-31 12:12:56 +0100336 ],
337
338 // ===== INTERRUPT CTRL =====================================================
339 // `rv_plic` will be instantiate (need to be defined in `module` field
340 // If interrupt is not defined, it uses the order from the module list
341 // and include every modules.
342 // first item goes to LSB of the interrupt source
Michael Schaffner666dde12019-10-25 11:57:54 -0700343 interrupt_module: ["gpio", "uart", "spi_device", "flash_ctrl",
Timothy Chen163050b2020-04-13 23:29:29 -0700344 "hmac", "alert_handler", "nmi_gen", "usbdev", "pwrmgr" ]
lowRISC Contributors802543a2019-08-31 12:12:56 +0100345
346 // RV_PLIC has two searching algorithm internally to pick the most highest priority interrupt
347 // source. "sequential" is smaller but slower, "matrix" is larger but faster.
348 // Choose depends on the criteria. Currently it is set to "matrix" to meet FPGA timing @ 50MHz
349
350 // generated:
351 interrupt: [
352 ]
353
Michael Schaffner666dde12019-10-25 11:57:54 -0700354 // ===== ALERT HANDLER ======================================================
355 // list all modules that expose alerts
356 // first item goes to LSB of the interrupt source
357 alert_module: [ "hmac" ]
358
359 // generated list of alerts:
360 alert: [
361 ]
lowRISC Contributors802543a2019-08-31 12:12:56 +0100362
363 // TODO: PINMUX
Eunchan Kim632c6f72019-09-30 11:11:51 -0700364 pinmux: {
365
Eunchan Kim436d2242019-10-29 17:25:51 -0700366 // Total number of Multiplexed I/O
367 // All the input/outputs from IPs are muxed in pinmux, and it has # of I/O
368 // talks to the outside of top_earlgrey.
369 // This field will be replaced to the length of PAD if padctrl is defined
370 num_mio: 32
371
Eunchan Kim632c6f72019-09-30 11:11:51 -0700372 // Dedicated IO modules. The in/out ports of the modules below are connected
373 // to TOP IO port through PADS directly. It bypasses PINMUX multiplexers
374 dio_modules: [
375 { name: "spi_device", pad: ["ChB[0..3]"] },
Eunchan Kim436d2242019-10-29 17:25:51 -0700376 //{ name: "uart.tx", pad: ["ChA[0]"]},
377 { name: "uart", pad: ["ChA[0..1]"]},
Eunchan Kim632c6f72019-09-30 11:11:51 -0700378 // { name: "dio_module.signal_input", pad: ["ChA[31]"] }
Pirmin Vogelfe6863b2020-05-11 17:30:54 +0200379 { name: "usbdev", pad: ["ChC[0..8]"]},
Eunchan Kim632c6f72019-09-30 11:11:51 -0700380 ],
381
382 // Multiplexing IO modules. The in/out ports of the modules below are
383 // connected through PINMUX, which gives controllability of the connection
384 // between the modules and the IO PADS.
385 // If `mio_modules` aren't defined, it uses all remaining modules from
386 // module list except defined in `dio_modules`.
387 mio_modules: ["uart", "gpio"]
388
389 // If any module isn't defined in above two lists, its inputs will be tied
390 // to 0, and the output/OE signals will be floating (or connected to
391 // unused signal). `rv_plic` is special module, shouldn't be defined here.
392 nc_modules: ["rv_timer", "hmac"]
393
Michael Schaffner57c490d2020-04-29 15:08:55 -0700394 // Number of wakeup detectors to instantiate, and bitwidth for the wakeup
395 // counters. Note that all MIO pad inputs are connected to the wakeup detectors,
396 // and there is no way to disable this. DIO inputs on the other hand are by
397 // default not connected.
398 // TODO: need to add mechanism to mark them as wakeup pins.
399 num_wkup_detect: 8
400 wkup_cnt_width: 8
401
Eunchan Kim632c6f72019-09-30 11:11:51 -0700402 // Below fields are generated.
403 // inputs: [
404 // { name: "xxx", width: xx },
405 // ]
406 // outputs: [
407 // { name: "xxx", width: xx },
408 // ]
409 // inouts: [
410 // { name: "xxx", width: xx },
411 // ]
412 }
413
414 // PADS instantiation
415 // Number of in/outs and the numer of PAD instances doesn't have to be
416 // same. The number given below excludes clock/reset and other necessary
417 // PADS but only defines GPIO pads.
418 padctrl: {
419 attr_default: ["STRONG"],
420 pads: [
421 { name: "ChA" type: "IO_33V", count: 32 }, // Accessing as ChA[0] .. ChA[31]
422 { name: "ChB" type: "IO_33V", count: 4, attr: ["KEEP", "WEAK"]},
Pirmin Vogelea91b302020-01-14 18:53:01 +0000423 { name: "ChC" type: "IO_33V", count: 4, attr: ["KEEP", "STRONG"]},
Eunchan Kim632c6f72019-09-30 11:11:51 -0700424 ]
425 }
lowRISC Contributors802543a2019-08-31 12:12:56 +0100426
427}