blob: b8904f409b70f08732dfea7d18f69b0612450382 [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
Timothy Chen0550d692020-04-20 17:19:35 -070028 srcs: [
Timothy Chen33b3b9d2020-05-08 10:14:17 -070029 { name: "main", aon: "no", freq: "100000000" }
30 { name: "io", aon: "no", freq: "100000000" }
31 { name: "usb", aon: "no", freq: "48000000" }
32 { name: "aon", aon: "yes", freq: "200000" }
Timothy Chen0550d692020-04-20 17:19:35 -070033 ],
34
Timothy Chen79972ad2020-06-30 17:13:49 -070035 // Derived clock source attributes
36 // name: Name of group.
37 // aon: Whether the clock is free running all the time.
38 // If it is, the clock is not hanlded by clkmgr.
39 // freq: Absolute frequency of clk in Hz
40 // src: From which clock source is the clock derived
41 // div: Ratio between derived clock and source clock
42 derived_srcs: [
43 { name: "io_div2", aon: "no", div: 2, src: "io", freq: "50000000" }
44 ],
45
Timothy Chen0550d692020-04-20 17:19:35 -070046 // Clock Group attributes
47 // name: name of group.
48 //
Timothy Chenf56c1b52020-04-28 17:00:43 -070049 // src: The hierarchical source of the clock
50 // "ext" - clock is supplied from a port of the top module
51 // "top" - clock is supplied from a net inside the top module
52 //
Rupert Swarbrickcba33a22020-07-02 16:46:38 +010053 // sw_cg: whether software is allowed to gate the clock
Timothy Chen0550d692020-04-20 17:19:35 -070054 // "no" - software is not allowed to gate clocks
55 // "yes" - software is allowed to gate clocks
56 // "hint" - software can provide a hint, and hw controls the rest
57 //
58 // unique: whether each module in the group can be separately gated
Rupert Swarbrickcba33a22020-07-02 16:46:38 +010059 // if sw_cg is "no", this field has no meaning
Timothy Chen0550d692020-04-20 17:19:35 -070060 // "yes" - each clock is individually controlled
61 // "no" - the group is controlled as one single unit
62 //
63 // The powerup and proc groups are unique.
Timothy Chen33b3b9d2020-05-08 10:14:17 -070064 // The powerup group of clocks do not feed through the clock
Timothy Chen0550d692020-04-20 17:19:35 -070065 // controller as they manage clock controller behavior
66 // The proc group is not peripheral, and direclty hardwired
67
68 groups: [
Timothy Chen79972ad2020-06-30 17:13:49 -070069 // the powerup group is used exclusively by clk/pwr/rstmgr
70 { name: "powerup", src:"top", sw_cg: "no" }
Timothy Chenf56c1b52020-04-28 17:00:43 -070071 { name: "trans", src:"top", sw_cg: "hint", unique: "yes", }
72 { name: "infra", src:"top", sw_cg: "no", }
73 { name: "secure", src:"top", sw_cg: "no" }
74 { name: "peri", src:"top", sw_cg: "yes", unique: "no" }
75 { name: "timers", src:"top", sw_cg: "no" }
Timothy Chen0550d692020-04-20 17:19:35 -070076 { name: "proc",
Timothy Chenf56c1b52020-04-28 17:00:43 -070077 src: "no"
Timothy Chen0550d692020-04-20 17:19:35 -070078 sw_cg: "no"
79 unique: "no"
80 clocks: {
81 clk_proc_main: main
82 }
83 }
84 ],
85 }
lowRISC Contributors802543a2019-08-31 12:12:56 +010086
Timothy Chen3193b002019-10-04 16:56:05 -070087 // Reset attributes
Timothy Chene8cb3bd2020-04-14 16:12:26 -070088 // name: name of reset.
Timothy Chene8cb3bd2020-04-14 16:12:26 -070089 //
Timothy Chena4cc10d2020-05-08 16:06:20 -070090 // type: the reset type [ext, top]
91 // ext: the reset is coming in from the ports, external to earlgrey
92 // top: the reset is coming from top level, the rstmgr output struct
93 //
94 // root: The parent reset
95 // If type is "ext", there is no root, since it is external
Timothy Chene8cb3bd2020-04-14 16:12:26 -070096 //
Timothy Chen3193b002019-10-04 16:56:05 -070097 // clk: related clock domain for synchronous release
Timothy Chene8cb3bd2020-04-14 16:12:26 -070098 // If type is "por", there is not related clock, since it is
99 // likely external or generated from a voltage comparator
100 //
Timothy Chen3193b002019-10-04 16:56:05 -0700101 resets: [
Timothy Chena4cc10d2020-05-08 16:06:20 -0700102 { name: "rst_ni", type: "ext" }
103 { name: "por_aon", type: "top", root: "rst_ni", clk: "aon" }
104 { name: "por", type: "top", root: "por_aon", clk: "main" }
105 { name: "por_io", type: "top", root: "por_aon", clk: "io" }
Timothy Chen79972ad2020-06-30 17:13:49 -0700106 { name: "por_io_div2",type: "top", root: "por_aon", clk: "io_div2" }
Timothy Chena4cc10d2020-05-08 16:06:20 -0700107 { name: "por_usb", type: "top", root: "por_aon", clk: "usb" }
108 { name: "lc", type: "top", root: "lc", clk: "io" }
109 { name: "sys", type: "top", root: "sys", clk: "main" }
Timothy Chen79972ad2020-06-30 17:13:49 -0700110 { name: "sys_io", type: "top", root: "sys", clk: "io_div2" }
111 { name: "sys_aon", type: "top", root: "sys", clk: "io_div2" }
112 { name: "spi_device", type: "top", root: "sys", clk: "io_div2", sw: 1 }
Timothy Chena4cc10d2020-05-08 16:06:20 -0700113 { name: "usb", type: "top", root: "sys", clk: "usb", sw: 1 }
Timothy Chen3193b002019-10-04 16:56:05 -0700114 ]
115
lowRISC Contributors802543a2019-08-31 12:12:56 +0100116 // Number of cores: used in rv_plic and timer
117 num_cores: "1",
118
119 // `module` defines the peripherals.
120 // Details are coming from each modules' config file `ip.hjson`
121 // TODO: Define parameter here
Timothy Chendde68052020-08-05 16:29:35 -0700122 // generated: A module is templated and generated as part of topgen
123 // top_only: A module is not templated but is specific to 'top_*' instead of 'ip'
lowRISC Contributors802543a2019-08-31 12:12:56 +0100124 module: [
125 { name: "uart", // instance name
126 type: "uart", // Must be matched to the ip name in `ip.hson` (_reg, _cfg permitted)
127 // and `hw/ip/{type}`
Timothy Chen3193b002019-10-04 16:56:05 -0700128
Timothy Chen80bd8aa2019-10-04 15:57:11 -0700129 // clock connections defines the port to top level clock connection
130 // the ip.hjson will declare the clock port names
131 // If none are defined at ip.hjson, clk_i is used by default
Timothy Chen33b3b9d2020-05-08 10:14:17 -0700132 clock_srcs: {clk_i: "io"},
Timothy Chen3193b002019-10-04 16:56:05 -0700133
134 // reset connections defines the port to top level reset connection
135 // the ip.hjson will declare the reset port names
Timothy Chen80bd8aa2019-10-04 15:57:11 -0700136 // If none are defined at ip.hjson, rst_ni is used by default
Timothy Chen33b3b9d2020-05-08 10:14:17 -0700137 reset_connections: {rst_ni: "sys_io"},
Timothy Chen80bd8aa2019-10-04 15:57:11 -0700138
lowRISC Contributors802543a2019-08-31 12:12:56 +0100139 base_addr: "0x40000000",
140 },
141 { name: "gpio",
142 type: "gpio",
Timothy Chen33b3b9d2020-05-08 10:14:17 -0700143 clock_srcs: {clk_i: "io"},
Timothy Chen0550d692020-04-20 17:19:35 -0700144 clock_group: "peri",
Timothy Chen33b3b9d2020-05-08 10:14:17 -0700145 reset_connections: {rst_ni: "sys_io"},
lowRISC Contributors802543a2019-08-31 12:12:56 +0100146 base_addr: "0x40010000",
147 }
148
149 { name: "spi_device",
150 type: "spi_device",
Timothy Chen33b3b9d2020-05-08 10:14:17 -0700151 clock_srcs: {clk_i: "io"},
Timothy Chen0550d692020-04-20 17:19:35 -0700152 clock_group: "peri",
Timothy Chen3193b002019-10-04 16:56:05 -0700153 reset_connections: {rst_ni: "spi_device"},
lowRISC Contributors802543a2019-08-31 12:12:56 +0100154 base_addr: "0x40020000",
155 },
156 { name: "flash_ctrl",
157 type: "flash_ctrl",
Timothy Chen0550d692020-04-20 17:19:35 -0700158 clock_srcs: {clk_i: "main"},
159 clock_group: "infra",
Timothy Chen3193b002019-10-04 16:56:05 -0700160 reset_connections: {rst_ni: "lc"},
lowRISC Contributors802543a2019-08-31 12:12:56 +0100161 base_addr: "0x40030000",
162 },
163 { name: "rv_timer",
164 type: "rv_timer",
Timothy Chen33b3b9d2020-05-08 10:14:17 -0700165 clock_srcs: {clk_i: "io"},
Timothy Chen0550d692020-04-20 17:19:35 -0700166 clock_group: "timers",
Timothy Chen33b3b9d2020-05-08 10:14:17 -0700167 reset_connections: {rst_ni: "sys_io"},
lowRISC Contributors802543a2019-08-31 12:12:56 +0100168 base_addr: "0x40080000",
169 },
Pirmin Vogeld4534382019-10-17 13:18:31 +0100170 { name: "aes",
171 type: "aes",
Timothy Chen0550d692020-04-20 17:19:35 -0700172 clock_srcs: {clk_i: "main"},
173 clock_group: "trans",
Pirmin Vogeld4534382019-10-17 13:18:31 +0100174 reset_connections: {rst_ni: "sys"},
175 base_addr: "0x40110000",
176 },
lowRISC Contributors802543a2019-08-31 12:12:56 +0100177 { name: "hmac",
178 type: "hmac",
Timothy Chen0550d692020-04-20 17:19:35 -0700179 clock_srcs: {clk_i: "main"},
180 clock_group: "trans",
Timothy Chen3193b002019-10-04 16:56:05 -0700181 reset_connections: {rst_ni: "sys"},
lowRISC Contributors802543a2019-08-31 12:12:56 +0100182 base_addr: "0x40120000",
183 },
184 { name: "rv_plic",
185 type: "rv_plic",
Timothy Chen0550d692020-04-20 17:19:35 -0700186 clock_srcs: {clk_i: "main"},
187 clock_group: "secure",
Timothy Chen3193b002019-10-04 16:56:05 -0700188 reset_connections: {rst_ni: "sys"},
lowRISC Contributors802543a2019-08-31 12:12:56 +0100189 base_addr: "0x40090000",
190 generated: "true" // Indicate this module is generated in the topgen
lowRISC Contributors802543a2019-08-31 12:12:56 +0100191 }
Eunchan Kim436d2242019-10-29 17:25:51 -0700192 { name: "pinmux",
193 type: "pinmux",
194 clock: "main",
Timothy Chen1faeb3c2020-05-11 22:06:32 -0700195 clock_srcs: {clk_i: "main", clk_aon_i: "io"},
Timothy Chen0550d692020-04-20 17:19:35 -0700196 clock_group: "secure",
Timothy Chen1faeb3c2020-05-11 22:06:32 -0700197 reset_connections: {rst_ni: "sys", rst_aon_ni: "sys_io"},
Eunchan Kim436d2242019-10-29 17:25:51 -0700198 base_addr: "0x40070000",
199 generated: "true"
Michael Schaffner666dde12019-10-25 11:57:54 -0700200 },
Michael Schaffner60157962020-05-01 19:11:28 -0700201 { name: "padctrl",
202 type: "padctrl",
203 clock: "main",
204 clock_srcs: {clk_i: "main"},
205 clock_group: "secure",
206 reset_connections: {rst_ni: "sys"},
207 base_addr: "0x40160000",
208 generated: "true"
209 },
Michael Schaffner666dde12019-10-25 11:57:54 -0700210 { name: "alert_handler",
211 type: "alert_handler",
Timothy Chen0550d692020-04-20 17:19:35 -0700212 clock_srcs: {clk_i: "main"},
213 clock_group: "secure",
Michael Schaffner666dde12019-10-25 11:57:54 -0700214 reset_connections: {rst_ni: "sys"},
215 base_addr: "0x40130000",
216 generated: "true" // Indicate this module is generated in the topgen
217 localparam: {
218 EscCntDw: 32,
219 AccuCntDw: 16,
220 LfsrSeed: "0x7FFFFFFF"
221 }
222 }
Timothy Chen163050b2020-04-13 23:29:29 -0700223 { name: "pwrmgr",
224 type: "pwrmgr",
Timothy Chena4cc10d2020-05-08 16:06:20 -0700225 clock_srcs: {clk_i: "io", clk_slow_i: "aon"},
Timothy Chen0550d692020-04-20 17:19:35 -0700226 clock_group: "powerup",
Timothy Chena4cc10d2020-05-08 16:06:20 -0700227 reset_connections: {rst_ni: "por", rst_slow_ni: "por_aon"},
Timothy Chen163050b2020-04-13 23:29:29 -0700228 base_addr: "0x400A0000",
Timothy Chen4ba25312020-06-17 13:08:57 -0700229 generated: "true" // Indicate this module is generated in the topgen
Timothy Chenf56c1b52020-04-28 17:00:43 -0700230
Timothy Chen163050b2020-04-13 23:29:29 -0700231 },
Timothy Chenc59f7012020-04-16 19:11:42 -0700232 { name: "rstmgr",
233 type: "rstmgr",
Timothy Chen79972ad2020-06-30 17:13:49 -0700234 clock_srcs: {clk_i: "io", clk_aon_i: "aon", clk_main_i: "main", clk_io_i: "io", clk_usb_i: "usb",
235 clk_io_div2_i: "io_div2"},
Timothy Chenc59f7012020-04-16 19:11:42 -0700236 clock_group: "powerup",
237 reset_connections: {rst_ni: "rst_ni"},
238 base_addr: "0x400B0000",
Timothy Chenf56c1b52020-04-28 17:00:43 -0700239 },
240 { name: "clkmgr",
241 type: "clkmgr",
Timothy Chen79972ad2020-06-30 17:13:49 -0700242 //clock_srcs: {clk_i: "io", clk_main_i: "main", clk_io_i: "io", clk_usb_i: "usb", clk_aon_i: "aon"},
243 clock_srcs: {clk_i: "io"},
Timothy Chenf56c1b52020-04-28 17:00:43 -0700244 clock_group: "powerup",
Timothy Chen79972ad2020-06-30 17:13:49 -0700245 reset_connections: {rst_ni: "por_io", rst_main_ni: "por", rst_io_ni: "por_io", rst_usb_ni: "por_usb"
246 rst_io_div2_ni: "por_io_div2", },
Timothy Chenf56c1b52020-04-28 17:00:43 -0700247 base_addr: "0x400C0000",
Timothy Chenc59f7012020-04-16 19:11:42 -0700248 generated: "true"
249 },
Michael Schaffner666dde12019-10-25 11:57:54 -0700250 // dummy module to capture the alert handler escalation signals
251 // and test them by converting them into IRQs
252 { name: "nmi_gen",
253 type: "nmi_gen",
Timothy Chen0550d692020-04-20 17:19:35 -0700254 clock_srcs: {clk_i: "main"},
255 clock_group: "secure",
Michael Schaffner666dde12019-10-25 11:57:54 -0700256 reset_connections: {rst_ni: "sys"},
257 base_addr: "0x40140000",
Eunchan Kim436d2242019-10-29 17:25:51 -0700258 }
Pirmin Vogelea91b302020-01-14 18:53:01 +0000259 { name: "usbdev",
260 type: "usbdev",
Timothy Chen33b3b9d2020-05-08 10:14:17 -0700261 clock_srcs: {clk_i: "io", clk_usb_48mhz_i: "usb"},
Timothy Chen0550d692020-04-20 17:19:35 -0700262 clock_group: "peri",
Timothy Chen33b3b9d2020-05-08 10:14:17 -0700263 reset_connections: {rst_ni: "sys_io", rst_usb_48mhz_ni: "usb"},
Pirmin Vogelea91b302020-01-14 18:53:01 +0000264 base_addr: "0x40150000",
265 },
Timothy Chendde68052020-08-05 16:29:35 -0700266 { name: "sensor_ctrl",
267 type: "sensor_ctrl",
268 clock_srcs: {clk_i: "io"},
269 clock_group: "secure",
270 reset_connections: {rst_ni: "sys_io"},
271 base_addr: "0x40170000",
272 top_only: "true"
273 },
Philipp Wagnera4a9e402020-06-22 12:06:56 +0100274 { name: "otbn",
275 type: "otbn",
276 clock_srcs: {clk_i: "main"},
277 clock_group: "trans",
278 reset_connections: {rst_ni: "sys"},
279 base_addr: "0x50000000",
280 },
lowRISC Contributors802543a2019-08-31 12:12:56 +0100281 ]
282
283 // Memories (ROM, RAM, eFlash) are defined at the top.
284 // It utilizes the primitive cells but configurable
285 memory: [
Timothy Chen80bd8aa2019-10-04 15:57:11 -0700286 { name: "rom",
Timothy Chen0550d692020-04-20 17:19:35 -0700287 clock_srcs: {clk_i: "main"},
288 clock_group: "infra",
Timothy Chen80bd8aa2019-10-04 15:57:11 -0700289 reset_connections: {rst_ni: "sys"},
290 type: "rom",
291 base_addr: "0x00008000",
Weicai Yang55b2cdf2020-04-10 15:40:30 -0700292 swaccess: "ro",
Timothy Chenda2e3442020-02-24 21:37:47 -0800293 size: "0x4000"
Eunchan Kime0d37fe2020-08-03 12:05:21 -0700294 inter_signal_list: [
295 { struct: "tl"
296 package: "tlul_pkg"
297 type: "req_rsp"
298 act: "rsp"
299 name: "tl"
300 }
301 ]
Timothy Chen80bd8aa2019-10-04 15:57:11 -0700302 },
303 { name: "ram_main",
Timothy Chen0550d692020-04-20 17:19:35 -0700304 clock_srcs: {clk_i: "main"},
305 clock_group: "infra",
Timothy Chen80bd8aa2019-10-04 15:57:11 -0700306 reset_connections: {rst_ni: "sys"},
307 type: "ram_1p",
308 base_addr: "0x10000000",
Eunchan Kime0d37fe2020-08-03 12:05:21 -0700309 size: "0x10000"
310 inter_signal_list: [
311 { struct: "tl"
312 package: "tlul_pkg"
313 type: "req_rsp"
314 act: "rsp"
315 name: "tl"
316 }
317 ]
318 },
Timothy Chen2c9e1a92020-06-29 15:03:25 -0700319 { name: "ram_ret",
320 clock_srcs: {clk_i: "io"},
321 clock_group: "infra",
322 reset_connections: {rst_ni: "sys_io"},
323 type: "ram_1p",
324 base_addr: "0x18000000",
Eunchan Kime0d37fe2020-08-03 12:05:21 -0700325 size: "0x1000"
326 inter_signal_list: [
327 { struct: "tl"
328 package: "tlul_pkg"
329 type: "req_rsp"
330 act: "rsp"
331 name: "tl"
332 }
333 ]
334 },
Timothy Chen80bd8aa2019-10-04 15:57:11 -0700335 { name: "eflash",
Timothy Chen0550d692020-04-20 17:19:35 -0700336 clock_srcs: {clk_i: "main"},
337 clock_group: "infra",
Timothy Chen80bd8aa2019-10-04 15:57:11 -0700338 reset_connections: {rst_ni: "lc"},
339 type: "eflash",
340 base_addr: "0x20000000",
Weicai Yang55b2cdf2020-04-10 15:40:30 -0700341 swaccess: "ro",
Eunchan Kime4a85072020-02-05 16:00:00 -0800342 size: "0x80000",
343 inter_signal_list: [
344 { struct: "flash", // flash_req_t, flash_rsp_t
345 type: "req_rsp",
346 name: "flash_ctrl", // flash_ctrl_i (req), flash_ctrl_o (rsp)
Eunchan Kim40098a92020-04-17 12:22:36 -0700347 act: "rsp",
Timothy Chenac620652020-06-25 13:48:50 -0700348 },
Eunchan Kime0d37fe2020-08-03 12:05:21 -0700349 { struct: "tl"
350 package: "tlul_pkg"
351 type: "req_rsp"
352 act: "rsp"
353 name: "tl"
354 }
Eunchan Kime4a85072020-02-05 16:00:00 -0800355 ],
356 },
lowRISC Contributors802543a2019-08-31 12:12:56 +0100357 ],
358
Eunchan Kime4a85072020-02-05 16:00:00 -0800359 // Inter-module Connection.
360 // format:
361 // requester: [ resp1, resp2, ... ],
362 //
Eunchan Kim40098a92020-04-17 12:22:36 -0700363 // the field and value should be module_inst.port_name
Eunchan Kime4a85072020-02-05 16:00:00 -0800364 // e.g flash_ctrl0.flash: [flash_phy0.flash_ctrl]
365 inter_module: {
Eunchan Kim40098a92020-04-17 12:22:36 -0700366 'connect': {
367 'flash_ctrl.flash': ['eflash.flash_ctrl']
Timothy Chenc59f7012020-04-16 19:11:42 -0700368 'pwrmgr.pwr_rst' : ['rstmgr.pwr'],
Timothy Chenf56c1b52020-04-28 17:00:43 -0700369 'pwrmgr.pwr_clk' : ['clkmgr.pwr'],
Eunchan Kim40098a92020-04-17 12:22:36 -0700370 }
371
372 // top is to connect to top net/struct.
373 // It defines the signal in the top and connect from the module,
374 // use of the signal is up to top template
Eunchan Kime0d37fe2020-08-03 12:05:21 -0700375 'top': [
376 'rstmgr.resets', 'rstmgr.cpu', 'pwrmgr.pwr_cpu', 'clkmgr.clocks',
377 'aes.idle', 'clkmgr.status',
378
379 // Xbars
380 'main.tl_corei', 'main.tl_cored', 'main.tl_dm_sba', 'main.tl_debug_mem'
381 ],
Eunchan Kim40098a92020-04-17 12:22:36 -0700382
383 // ext is to create port in the top.
Eunchan Kim57071c02020-08-07 13:59:05 -0700384 'external': {
385 'clkmgr.clk_main': 'clk_main',
386 'clkmgr.clk_io': 'clk_io',
387 'clkmgr.clk_usb': 'clk_usb',
388 'clkmgr.clk_aon': 'clk_aon'
Timothy Chendde68052020-08-05 16:29:35 -0700389 'rstmgr.ast': '',
390 'pwrmgr.pwr_ast': '',
391 'sensor_ctrl.ast_alert': '',
392 'sensor_ctrl.ast_status': '',
393 'usbdev.usb_ref_val': '',
394 'usbdev.usb_ref_pulse': '',
Eunchan Kim57071c02020-08-07 13:59:05 -0700395 },
Eunchan Kime4a85072020-02-05 16:00:00 -0800396 },
397
lowRISC Contributors802543a2019-08-31 12:12:56 +0100398 debug_mem_base_addr: "0x1A110000",
399
400 // Crossbars: having a top level crossbar
401 // This version assumes all crossbars are instantiated at the top.
402 // Assume xbar.hjson is located in the same directory of top.hjson
403 xbar: [
404 { name: "main",
Timothy Chen33b3b9d2020-05-08 10:14:17 -0700405 clock_srcs: {clk_main_i: "main", clk_fixed_i: "io"},
Timothy Chen0550d692020-04-20 17:19:35 -0700406 clock_group: "infra",
Timothy Chen3193b002019-10-04 16:56:05 -0700407 reset: "sys",
Timothy Chen33b3b9d2020-05-08 10:14:17 -0700408 reset_connections: {rst_main_ni: "sys", rst_fixed_ni: "sys_io"}
lowRISC Contributors802543a2019-08-31 12:12:56 +0100409 },
Eunchan Kim0523f6b2019-12-17 13:53:11 -0800410 { name: "peri",
Timothy Chen33b3b9d2020-05-08 10:14:17 -0700411 clock_srcs: {clk_peri_i: "io"},
Timothy Chen0550d692020-04-20 17:19:35 -0700412 clock_group: "infra",
Timothy Chen33b3b9d2020-05-08 10:14:17 -0700413 reset: "sys_io",
414 reset_connections: {rst_peri_ni: "sys_io"},
Eunchan Kim0523f6b2019-12-17 13:53:11 -0800415 }
lowRISC Contributors802543a2019-08-31 12:12:56 +0100416 ],
417
418 // ===== INTERRUPT CTRL =====================================================
419 // `rv_plic` will be instantiate (need to be defined in `module` field
420 // If interrupt is not defined, it uses the order from the module list
421 // and include every modules.
422 // first item goes to LSB of the interrupt source
Michael Schaffner666dde12019-10-25 11:57:54 -0700423 interrupt_module: ["gpio", "uart", "spi_device", "flash_ctrl",
Philipp Wagnera4a9e402020-06-22 12:06:56 +0100424 "hmac", "alert_handler", "nmi_gen", "usbdev", "pwrmgr",
425 "otbn" ]
lowRISC Contributors802543a2019-08-31 12:12:56 +0100426
427 // RV_PLIC has two searching algorithm internally to pick the most highest priority interrupt
428 // source. "sequential" is smaller but slower, "matrix" is larger but faster.
429 // Choose depends on the criteria. Currently it is set to "matrix" to meet FPGA timing @ 50MHz
430
431 // generated:
432 interrupt: [
433 ]
434
Michael Schaffner666dde12019-10-25 11:57:54 -0700435 // ===== ALERT HANDLER ======================================================
436 // list all modules that expose alerts
Philipp Wagnera4a9e402020-06-22 12:06:56 +0100437 // first item goes to LSB of the alert source
Timothy Chendde68052020-08-05 16:29:35 -0700438 alert_module: [ "aes", "hmac", "otbn", "sensor_ctrl" ]
Michael Schaffner666dde12019-10-25 11:57:54 -0700439
440 // generated list of alerts:
441 alert: [
442 ]
lowRISC Contributors802543a2019-08-31 12:12:56 +0100443
444 // TODO: PINMUX
Eunchan Kim632c6f72019-09-30 11:11:51 -0700445 pinmux: {
446
Eunchan Kim436d2242019-10-29 17:25:51 -0700447 // Total number of Multiplexed I/O
448 // All the input/outputs from IPs are muxed in pinmux, and it has # of I/O
449 // talks to the outside of top_earlgrey.
450 // This field will be replaced to the length of PAD if padctrl is defined
451 num_mio: 32
452
Eunchan Kim632c6f72019-09-30 11:11:51 -0700453 // Dedicated IO modules. The in/out ports of the modules below are connected
454 // to TOP IO port through PADS directly. It bypasses PINMUX multiplexers
455 dio_modules: [
456 { name: "spi_device", pad: ["ChB[0..3]"] },
Eunchan Kim436d2242019-10-29 17:25:51 -0700457 //{ name: "uart.tx", pad: ["ChA[0]"]},
458 { name: "uart", pad: ["ChA[0..1]"]},
Eunchan Kim632c6f72019-09-30 11:11:51 -0700459 // { name: "dio_module.signal_input", pad: ["ChA[31]"] }
Pirmin Vogelfe6863b2020-05-11 17:30:54 +0200460 { name: "usbdev", pad: ["ChC[0..8]"]},
Eunchan Kim632c6f72019-09-30 11:11:51 -0700461 ],
462
463 // Multiplexing IO modules. The in/out ports of the modules below are
464 // connected through PINMUX, which gives controllability of the connection
465 // between the modules and the IO PADS.
466 // If `mio_modules` aren't defined, it uses all remaining modules from
467 // module list except defined in `dio_modules`.
468 mio_modules: ["uart", "gpio"]
469
470 // If any module isn't defined in above two lists, its inputs will be tied
471 // to 0, and the output/OE signals will be floating (or connected to
472 // unused signal). `rv_plic` is special module, shouldn't be defined here.
473 nc_modules: ["rv_timer", "hmac"]
474
Michael Schaffner57c490d2020-04-29 15:08:55 -0700475 // Number of wakeup detectors to instantiate, and bitwidth for the wakeup
476 // counters. Note that all MIO pad inputs are connected to the wakeup detectors,
477 // and there is no way to disable this. DIO inputs on the other hand are by
478 // default not connected.
479 // TODO: need to add mechanism to mark them as wakeup pins.
480 num_wkup_detect: 8
481 wkup_cnt_width: 8
482
Eunchan Kim632c6f72019-09-30 11:11:51 -0700483 // Below fields are generated.
484 // inputs: [
485 // { name: "xxx", width: xx },
486 // ]
487 // outputs: [
488 // { name: "xxx", width: xx },
489 // ]
490 // inouts: [
491 // { name: "xxx", width: xx },
492 // ]
493 }
494
495 // PADS instantiation
496 // Number of in/outs and the numer of PAD instances doesn't have to be
497 // same. The number given below excludes clock/reset and other necessary
498 // PADS but only defines GPIO pads.
499 padctrl: {
500 attr_default: ["STRONG"],
501 pads: [
502 { name: "ChA" type: "IO_33V", count: 32 }, // Accessing as ChA[0] .. ChA[31]
503 { name: "ChB" type: "IO_33V", count: 4, attr: ["KEEP", "WEAK"]},
Pirmin Vogelea91b302020-01-14 18:53:01 +0000504 { name: "ChC" type: "IO_33V", count: 4, attr: ["KEEP", "STRONG"]},
Eunchan Kim632c6f72019-09-30 11:11:51 -0700505 ]
506 }
lowRISC Contributors802543a2019-08-31 12:12:56 +0100507
508}