blob: 52899668f81c6e4adaa39f1ee5e36d9d99c5d2f7 [file] [log] [blame]
// Copyright lowRISC contributors.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
//
// TOP English Breakfast configuration
{ name: "englishbreakfast",
type: "top",
/////////////////////////////////////////////////////////////
// Seed for compile-time random constants //
// NOTE: REPLACE THIS WITH A NEW VALUE BEFORE THE TAPEOUT //
/////////////////////////////////////////////////////////////
rnd_cnst_seed: 4881560218908238235
// 32-bit datawidth
datawidth: "32",
// Power information for the design
power: {
// Power domains supported by the design
// Aon represents domain aon
// 0 represents domain 0
domains: ["Aon", "0"],
// Default power domain used for the design
default: "0"
},
// This is the clock data structure of the design.
// The hier path refers to the clock reference path (struct / port)
// - The top/ext desgination follows the same scheme as inter-module
// The src key indicates the raw clock sources in the design
// The groups key indicates the various clock groupings in the design
clocks: {
hier_paths: {
top: "clkmgr_aon_clocks.", // top level is a struct
ext: "", // ext is a port of the clock name
lpg: "clkmgr_aon_cg_en.", // top level struct for alert lpg reset enables
},
// Clock Source attributes
// name: Name of group.
// aon: Whether the clock is free running all the time.
// If it is, the clock is not hanlded by clkmgr.
// freq: Absolute frequency of clk in Hz
srcs: [
{ name: "main", aon: "no", freq: "100000000" }
{ name: "io", aon: "no", freq: "96000000" }
{ name: "usb", aon: "no", freq: "48000000" }
{ name: "aon", aon: "yes", freq: "200000" }
],
// Derived clock source attributes
// name: Name of group.
// aon: Whether the clock is free running all the time.
// If it is, the clock is not hanlded by clkmgr.
// freq: Absolute frequency of clk in Hz
// src: From which clock source is the clock derived
// div: Ratio between derived clock and source clock
derived_srcs: [
{ name: "io_div2", aon: "no", div: 2, src: "io", freq: "48000000" }
{ name: "io_div4", aon: "no", div: 4, src: "io", freq: "24000000" }
],
// Clock Group attributes
// name: name of group.
//
// src: The hierarchical source of the clock
// "ext" - clock is supplied from a port of the top module
// "top" - clock is supplied from a net inside the top module
//
// sw_cg: whether software is allowed to gate the clock
// "no" - software is not allowed to gate clocks
// "yes" - software is allowed to gate clocks
// "hint" - software can provide a hint, and hw controls the rest
//
// unique: whether each module in the group can be separately gated
// if sw_cg is "no", this field has no meaning
// "yes" - each clock is individually controlled
// "no" - the group is controlled as one single unit
//
// The powerup and proc groups are unique.
// The powerup group of clocks do not feed through the clock
// controller as they manage clock controller behavior
// The proc group is not peripheral, and directly hardwired
groups: [
// the ast group is used to represent input clocks to the top
{ name: "ast", src:"ext", sw_cg: "no" }
// the powerup group is used exclusively by clk/pwr/rstmgr/pinmux
{ name: "ast", src:"ext", sw_cg: "no" }
{ name: "powerup", src:"top", sw_cg: "no" }
{ name: "trans", src:"top", sw_cg: "hint", unique: "yes", }
{ name: "infra", src:"top", sw_cg: "no", }
{ name: "secure", src:"top", sw_cg: "no" }
{ name: "peri", src:"top", sw_cg: "yes", unique: "no" }
{ name: "timers", src:"top", sw_cg: "no" }
{ name: "proc",
src: "no",
sw_cg: "no",
unique: "no",
clocks: {
clk_proc_main: main
}
}
],
},
// This is the reset data structure of the design.
// The hier path refers to the reset reference path (struct / port)
// - The top/ext desgination follows the same scheme as inter-module
// The node key represents all the known resets in the design
resets: {
hier_paths: {
top: "rstmgr_aon_resets.", // top level is a struct
ext: "", // ext is a port of the clock name
lpg: "rstmgr_aon_rst_en.", // top level struct for alert lpg reset enables
},
// Reset node attributes
// name: name of reset.
//
// gen: whether the reset is generated
// true: it is a generated reset inside rstmgr
// false: it is a hardwired design reset inside rstmgr (roots and por)
// For non-generated resets, the parent / domain definitions have no meaning.
//
// type: the reset type [ext, top]
// ext: the reset is coming in from the ports, external to englishbreakfast
// int: the reset is only used inside rstmgr
// top: the reset is output from rstmgr to top level struct
//
// parent: The parent reset
// If type is "ext", there is no root, since it is external
//
// domains: The power domains of a particular reset
// This is a list of of the supported power domains.
// Valid values are Aon and (power domain)0 ~ (power domain)1.
// If no value is supplied, the default is only the Aon version.
//
// clk: related clock domain for synchronous release
// If type is "por", there is not related clock, since it is
// likely external or generated from a voltage comparator
//
nodes: [
{ name: "por_aon", gen: false, type: "top", clk: "aon" }
{ name: "lc_src", gen: false, type: "int", clk: "io_div4" }
{ name: "sys_src", gen: false, type: "int", clk: "io_div4" }
{ name: "por", gen: true, type: "top", parent: "por_aon", clk: "main" }
{ name: "por_io", gen: true, type: "top", parent: "por_aon", clk: "io" }
{ name: "por_io_div2", gen: true, type: "top", parent: "por_aon", clk: "io_div2" }
{ name: "por_io_div4", gen: true , type: "top", parent: "por_aon", clk: "io_div4" }
{ name: "por_usb", gen: true, type: "top", parent: "por_aon", clk: "usb" }
{ name: "lc", gen: true, type: "top", parent: "lc_src", clk: "main" }
{ name: "lc_io_div4", gen: true, type: "top", parent: "lc_src", clk: "io_div4" }
{ name: "sys", gen: true, type: "top", parent: "sys_src", clk: "main" }
{ name: "sys_io_div4", gen: true, type: "top", parent: "sys_src", clk: "io_div4" }
{ name: "sys_aon", gen: true, type: "top", parent: "sys_src", clk: "aon" }
{ name: "spi_device", gen: true, type: "top", parent: "sys_src", clk: "io_div2", sw: true }
{ name: "spi_host0", gen: true, type: "top", parent: "sys_src", clk: "io", sw: true }
{ name: "usb", gen: true, type: "top", parent: "sys_src", clk: "usb", sw: true }
]
}
// Number of cores: used in rv_plic and timer
num_cores: "1",
// `module` defines the peripherals.
// Details are coming from each modules' config file `ip.hjson`
// TODO: Define parameter here
// attr: There are a few types of modules supported
// normal(default): Normal, non-templated modules that will be instantiated
// templated: These modules are templated and must be run through topgen
// reggen_top: These modules are not templated, but need to have reggen run
// because they live exclusively in hw/top_* instead of hw/ip_*.
// These modules are also instantiated in the top level.
// reggen_only: Similar to reggen_top, but are not instantiated in the top level.
module: [
{ name: "uart0", // instance name
type: "uart", // Must be matched to the ip name in `ip.hson` (_reg, _cfg permitted)
// and `hw/ip/{type}`
// clock connections defines the port to top level clock connection
// the ip.hjson will declare the clock port names
// If none are defined at ip.hjson, clk_i is used by default
clock_srcs: {clk_i: "io_div4"},
// reset connections defines the port to top level reset connection
// the ip.hjson will declare the reset port names
// If none are defined at ip.hjson, rst_ni is used by default
reset_connections: {rst_ni: "sys_io_div4"},
base_addr: "0x40000000",
},
{ name: "gpio",
type: "gpio",
clock_srcs: {clk_i: "io_div4"},
clock_group: "peri",
reset_connections: {rst_ni: "sys_io_div4"},
base_addr: "0x40040000",
param_decl: {
GpioAsyncOn: "1"
}
}
{ name: "spi_device",
type: "spi_device",
clock_srcs: {clk_i: "io_div4", scan_clk_i: "io_div2"},
clock_group: "peri",
reset_connections: {rst_ni: "spi_device"},
base_addr: "0x40050000",
},
{ name: "spi_host0",
type: "spi_host",
clock_srcs: {clk_i: "io"},
clock_group: "peri",
reset_connections: {rst_ni: "spi_host0"},
base_addr: "0x40060000",
},
{ name: "rv_timer",
type: "rv_timer",
clock_srcs: {clk_i: "io_div4"},
clock_group: "timers",
reset_connections: {rst_ni: "sys_io_div4"},
base_addr: "0x40100000",
},
{ name: "usbdev",
type: "usbdev",
clock_srcs: {clk_i: "usb", clk_aon_i: "aon"},
clock_group: "peri",
reset_connections: {rst_ni: "usb", rst_aon_ni: "sys_aon"},
base_addr: "0x40320000",
},
{ name: "pwrmgr_aon",
type: "pwrmgr",
clock_srcs: {clk_i: "io_div4", clk_slow_i: "aon", clk_lc_i: "io_div4", clk_esc_i: "io_div4"},
clock_group: "powerup",
reset_connections: {
rst_ni: "por_io_div4",
rst_lc_ni: "lc_io_div4",
rst_esc_ni: "lc_io_div4",
rst_main_ni: "por_aon",
rst_slow_ni: "por_aon"
},
domain: ["Aon"],
base_addr: "0x40400000",
attr: "templated",
},
{ name: "rstmgr_aon",
type: "rstmgr",
clock_srcs: {clk_i: "io_div4", clk_por_i: "io_div4", clk_aon_i: "aon", clk_main_i: "main", clk_io_i: "io", clk_usb_i: "usb",
clk_io_div2_i: "io_div2", clk_io_div4_i: "io_div4"},
clock_group: "powerup",
reset_connections: {rst_ni: "lc_io_div4", rst_por_ni: "por_io_div4"},
domain: ["Aon"],
base_addr: "0x40410000",
param_decl: {
SecCheck: "0",
}
attr: "templated",
},
{ name: "clkmgr_aon",
type: "clkmgr",
clock_srcs: {
clk_i: "io_div4",
clk_main_i: {
group: "ast",
clock: "main"
},
clk_io_i: {
group: "ast",
clock: "io"
},
clk_usb_i: {
group: "ast",
clock: "usb"
},
clk_aon_i: {
group: "ast",
clock: "aon"
}
},
clock_group: "powerup",
reset_connections: {rst_ni: "por_io_div4",
rst_aon_ni: "por_aon",
rst_io_ni: "por_io",
rst_io_div2_ni: "por_io_div2",
rst_io_div4_ni: "por_io_div4",
rst_main_ni: "por",
rst_usb_ni: "por_usb",
rst_root_ni: "por_io_div4",
rst_root_io_ni: "por_io",
rst_root_io_div2_ni: "por_io_div2",
rst_root_io_div4_ni: "por_io_div4",
rst_root_main_ni: "por",
rst_root_usb_ni: "por_usb",
},
domain: ["Aon"],
base_addr: "0x40420000",
attr: "templated",
},
{ name: "pinmux_aon",
type: "pinmux",
clock_srcs: {clk_i: "io_div4", clk_aon_i: "aon"},
clock_group: "powerup",
reset_connections: {rst_ni: "lc_io_div4",
rst_aon_ni: "sys_aon",
rst_sys_ni: "sys_io_div4"
},
domain: ["Aon"],
base_addr: "0x40460000",
attr: "templated",
},
{ name: "aon_timer_aon",
type: "aon_timer",
clock_srcs: {clk_i: "io_div4", clk_aon_i: "aon"},
clock_group: "timers",
reset_connections: {rst_ni: "sys_io_div4", rst_aon_ni: "sys_aon"},
domain: ["Aon"],
base_addr: "0x40470000",
attr: "templated",
},
{ name: "ast",
type: "ast",
clock_srcs: {
clk_ast_tlul_i: "io_div4",
clk_ast_adc_i: "aon",
clk_ast_alert_i: "io_div4",
clk_ast_es_i: "main",
clk_ast_rng_i: "main",
clk_ast_usb_i: {
clock: "usb",
group: "peri"
}
},
clock_group: "secure",
reset_connections: {
rst_ast_tlul_ni: "lc_io_div4",
rst_ast_adc_ni: "sys_aon",
rst_ast_alert_ni: "lc_io_div4",
rst_ast_es_ni: "sys",
rst_ast_rng_ni: "sys",
rst_ast_usb_ni: "usb"
},
base_addr: "0x40480000",
attr: "reggen_only",
},
{ name: "sram_ctrl_ret_aon",
type: "sram_ctrl",
clock_srcs: {clk_i: "io_div4", clk_otp_i: "io_div4"},
clock_group: "infra",
reset_connections: {rst_ni: "sys_io_div4", rst_otp_ni: "lc_io_div4"},
domain: ["Aon"],
param_decl: {
InstrExec: "0",
}
base_addrs: {regs: "0x40500000", ram: "0x40600000"},
// Memory regions must be associated with a dedicated
// TL-UL device interface.
memory: {
ram: {
label: "ram_ret_aon",
swaccess: "rw",
exec: "True",
byte_write: "True",
size: "0x1000"
}
}
},
{ name: "flash_ctrl",
type: "flash_ctrl",
clock_srcs: {clk_i: "main", clk_otp_i: "io_div4"},
clock_group: "infra",
reset_connections: {rst_ni: "lc", rst_otp_ni: "lc_io_div4"},
base_addrs: {core: "0x41000000", prim: "0x41008000", mem: "0x20000000"}
param_decl: {
SecScrambleEn: "0"
}
memory: {
mem: {
label: "eflash",
swaccess: "ro",
exec: "True",
byte_write: "False",
config: {
type: "flash",
banks: 2,
pages_per_bank: 16,
program_resolution: 8, // maximum number of flash words allowed to program at one time
}
}
}
attr: "templated",
},
{ name: "rv_dm",
type: "rv_dm",
clock_srcs: {clk_i: "main"},
clock_group: "infra",
reset_connections: {rst_ni: "lc"},
// Note that this module also contains a bus host.
base_addrs: {mem: "0x00010000", regs: "0x41200000"}
},
{ name: "rv_plic",
type: "rv_plic",
clock_srcs: {clk_i: "main"},
clock_group: "secure",
reset_connections: {rst_ni: "sys"},
base_addr: "0x48000000",
attr: "ipgen",
},
{ name: "aes",
type: "aes",
clock_srcs: {clk_i: "main", clk_edn_i: "main"},
clock_group: "trans",
reset_connections: {rst_ni: "sys", rst_edn_ni: "sys"},
param_decl: {
SecMasking: "1",
SecSBoxImpl: "aes_pkg::SBoxImplDom"
}
base_addr: "0x41100000",
},
{ name: "hmac",
type: "hmac",
clock_srcs: {clk_i: "main"},
clock_group: "trans",
reset_connections: {rst_ni: "sys"},
base_addr: "0x41110000",
},
{ name: "sram_ctrl_main",
type: "sram_ctrl",
clock_srcs: {clk_i: "main", clk_otp_i: "io_div4"},
clock_group: "secure",
reset_connections: {rst_ni: "sys", rst_otp_ni: "lc_io_div4"},
param_decl: {
InstrExec: "1",
}
base_addrs: {regs: "0x411C0000", ram: "0x10000000"},
// Memory regions must be associated with a dedicated
// TL-UL device interface.
memory: {
ram: {
label: "ram_main",
swaccess: "rw",
exec: "True",
byte_write: "True",
size: "0x20000"
}
}
},
{ name: "rom_ctrl",
type: "rom_ctrl",
clock_srcs: {clk_i: "main"},
clock_group: "infra",
reset_connections: {rst_ni: "sys"},
base_addrs: {rom: "0x00008000", regs: "0x411e0000"}
memory: {
rom: {
label: "rom",
swaccess: "ro",
exec: "True",
byte_write: "False",
size: "0x8000"
}
},
param_decl: {
SecDisableScrambling: "1'b1"
}
},
{ name: "rv_core_ibex",
type: "rv_core_ibex",
param_decl: {PMPEnable: "0",
PMPGranularity: "0",
PMPNumRegions: "16",
MHPMCounterNum: "0",
MHPMCounterWidth: "32",
RV32E: "0",
RV32M: "ibex_pkg::RV32MSingleCycle",
RV32B: "ibex_pkg::RV32BNone",
RegFile: "ibex_pkg::RegFileFF",
BranchTargetALU: "1",
WritebackStage: "1",
ICache: "0",
ICacheECC: "0",
BranchPredictor: "0",
DbgTriggerEn: "1",
SecureIbex: "0",
DmHaltAddr: "tl_main_pkg::ADDR_SPACE_RV_DM__MEM + dm::HaltAddress[31:0]",
DmExceptionAddr: "tl_main_pkg::ADDR_SPACE_RV_DM__MEM + dm::ExceptionAddress[31:0]",
PipeLine: "0"
}
clock_srcs: {clk_i: "main",
clk_edn_i: "main",
clk_esc_i: "io_div4",
clk_otp_i: "io_div4"},
clock_group: "infra",
reset_connections: {rst_ni: "sys",
rst_edn_ni: "sys",
rst_esc_ni: "lc_io_div4",
rst_otp_ni: "lc_io_div4"},
base_addr: "0x411F0000",
},
]
// All memories wrapped up in relevant controllers
memory: [],
// The port data structure is not something that should be used liberally.
// It is used specifically to assign special attributes to specific ports.
// For example, this allows us to designate a port as part of inter-module
// connections.
port: [
{ name: "ast",
inter_signal_list: [
{ struct: "edn",
type: "req_rsp",
name: "edn",
// The activity direction for a port inter-signal is "opposite" of
// what the external module actually needs.
act: "rsp",
package: "edn_pkg",
},
{ struct: "lc_tx",
type: "uni",
name: "lc_dft_en",
// The activity direction for a port inter-signal is "opposite" of
// what the external module actually needs.
act: "req",
package: "lc_ctrl_pkg",
},
{ struct: "ram_1p_cfg",
package: "prim_ram_1p_pkg",
type: "uni",
name: "ram_1p_cfg",
// The activity direction for a port inter-signal is "opposite" of
// what the external module actually needs.
act: "rcv"
},
{ struct: "ram_2p_cfg",
package: "prim_ram_2p_pkg",
type: "uni",
name: "ram_2p_cfg",
// The activity direction for a port inter-signal is "opposite" of
// what the external module actually needs.
act: "rcv"
},
{ struct: "rom_cfg",
package: "prim_rom_pkg",
type: "uni",
name: "rom_cfg",
// The activity direction for a port inter-signal is "opposite" of
// what the external module actually needs.
act: "rcv"
},
]
},
]
// Inter-module Connection.
// format:
// requester: [ resp1, resp2, ... ],
//
// the field and value should be module_inst.port_name
// e.g flash_ctrl0.flash: [flash_phy0.flash_ctrl]
inter_module: {
'connect': {
'pwrmgr_aon.pwr_flash' : ['flash_ctrl.pwrmgr'],
'pwrmgr_aon.pwr_rst' : ['rstmgr_aon.pwr'],
'pwrmgr_aon.pwr_clk' : ['clkmgr_aon.pwr'],
'pwrmgr_aon.strap' : ['pinmux_aon.strap_en'],
'pwrmgr_aon.low_power' : ['pinmux_aon.sleep_en',
'aon_timer_aon.sleep_mode'],
'pwrmgr_aon.fetch_en' : ['rv_core_ibex.pwrmgr_cpu_en'],
// usbdev connection to pinmux
'usbdev.usb_dp_pullup' : ['pinmux_aon.usbdev_dppullup_en'],
'usbdev.usb_dn_pullup' : ['pinmux_aon.usbdev_dnpullup_en'],
'usbdev.usb_aon_suspend_req': ['pinmux_aon.usbdev_suspend_req'],
'usbdev.usb_aon_wake_ack' : ['pinmux_aon.usbdev_wake_ack'],
'usbdev.usb_aon_bus_reset' : ['pinmux_aon.usbdev_bus_reset'],
'usbdev.usb_aon_sense_lost' : ['pinmux_aon.usbdev_sense_lost'],
'pinmux_aon.usbdev_wake_detect_active' : ['usbdev.usb_aon_wake_detect_active'],
// The idle connection is automatically connected through topgen.
// The user does not need to explicitly declare anything other than
// an empty list.
'clkmgr_aon.idle' : [],
// Pinmux JTAG signals
'pinmux_aon.rv_jtag' : ['rv_dm.jtag'],
// rv_plic connections
'rv_plic.msip' : ['rv_core_ibex.irq_software'],
'rv_plic.irq' : ['rv_core_ibex.irq_external'],
// rv_dm connections
'rv_dm.debug_req': ['rv_core_ibex.debug_req'],
// rv_timer connections
// rv core ibex connections
'rv_core_ibex.crash_dump' : ['rstmgr_aon.cpu_dump'],
'rv_core_ibex.pwrmgr' : ['pwrmgr_aon.pwr_cpu'],
// spi passthrough connection
'spi_device.passthrough' : ['spi_host0.passthrough']
// Reset manager software reset request to pwrmgr
'rstmgr_aon.sw_rst_req' : ['pwrmgr_aon.sw_rst_req'],
}
// top is to connect to top net/struct.
// It defines the signal in the top and connect from the module,
// use of the signal is up to top template
'top': [
// top level net for clocks
'clkmgr_aon.clocks',
// top level clock gating indications for alert subsystem
'clkmgr_aon.cg_en',
// top level net for reset
'rstmgr_aon.resets',
// top level reset asserted indications for alert subsystem
'rstmgr_aon.rst_en',
// dedicated timer interrupt
'rv_core_ibex.irq_timer',
// hardwired connections
'rv_core_ibex.hart_id', 'rv_core_ibex.boot_addr',
// lc_ctrl.lc_cpu_en - always enabled for English Breakfast
'rv_core_ibex.lc_cpu_en'
// Xbars
// Pinmux JTAG signals for the tool-inserted DFT TAP
'pinmux_aon.dft_jtag',
// OTP HW_CFG Broadcast signals.
// TODO(#6713): The actual struct breakout and mapping currently needs to
// be performed by hand in the toplevel template.
'sram_ctrl_main.otp_en_sram_ifetch',
'sram_ctrl_ret_aon.otp_en_sram_ifetch'
],
// ext is to create port in the top.
'external': {
# 'adc_ctrl_aon.adc' : 'adc'
'ast.edn' : '',
'ast.lc_dft_en' : '',
'ast.ram_1p_cfg' : 'ram_1p_cfg',
'ast.ram_2p_cfg' : 'ram_2p_cfg',
'ast.rom_cfg' : 'rom_cfg',
'clkmgr_aon.jitter_en' : 'clk_main_jitter_en',
'clkmgr_aon.hi_speed_sel' : 'hi_speed_sel',
'clkmgr_aon.div_step_down_req' : 'div_step_down_req',
'clkmgr_aon.all_clk_byp_req' : 'all_clk_byp_req',
'clkmgr_aon.all_clk_byp_ack' : 'all_clk_byp_ack',
'clkmgr_aon.io_clk_byp_req' : 'io_clk_byp_req',
'clkmgr_aon.io_clk_byp_ack' : 'io_clk_byp_ack',
'flash_ctrl.flash_bist_enable' : 'flash_bist_enable',
'flash_ctrl.flash_power_down_h' : 'flash_power_down_h',
'flash_ctrl.flash_power_ready_h' : 'flash_power_ready_h',
'flash_ctrl.obs_ctrl' : 'obs_ctrl',
'flash_ctrl.fla_obs' : 'flash_obs',
# 'entropy_src.entropy_src_rng' : '',
# 'entropy_src.rng_fips' : '',
'peri.tl_ast' : 'ast_tl',
'pinmux_aon.dft_strap_test' : 'dft_strap_test'
'pinmux_aon.dft_hold_tap_sel' : 'dft_hold_tap_sel',
'pinmux_aon.usb_dppullup_en' : 'usb_dp_pullup_en',
'pinmux_aon.usb_dnpullup_en' : 'usb_dn_pullup_en',
'pwrmgr_aon.pwr_ast' : 'pwrmgr_ast',
# 'otp_ctrl.otp_ast_pwr_seq' : '',
# 'otp_ctrl.otp_ast_pwr_seq_h' : '',
# 'otp_ctrl.otp_alert' : 'otp_alert',
'rstmgr_aon.por_n' : 'por_n'
'rv_core_ibex.fpga_info' : 'fpga_info'
'usbdev.usb_rx_d' : '',
'usbdev.usb_tx_d' : '',
'usbdev.usb_tx_se0' : '',
'usbdev.usb_tx_use_d_se0' : '',
'usbdev.usb_rx_enable' : '',
'usbdev.usb_ref_val' : '',
'usbdev.usb_ref_pulse' : '',
'spi_device.sck_monitor' : 'sck_monitor',
},
},
// Crossbars: having a top level crossbar
// This version assumes all crossbars are instantiated at the top.
// Assume xbar.hjson is located in the same directory of top.hjson
xbar: [
{ name: "main",
clock_srcs: {clk_main_i: "main", clk_fixed_i: "io_div4"},
clock_group: "infra",
reset: "sys",
reset_connections: {rst_main_ni: "sys", rst_fixed_ni: "sys_io_div4"}
},
{ name: "peri",
clock_srcs: {clk_peri_i: "io_div4", clk_spi_host0_i: "io", clk_usb_i: "usb"},
clock_group: "infra",
reset: "sys_io_div4",
reset_connections: {rst_peri_ni: "sys_io_div4", rst_spi_host0_ni: "spi_host0", rst_usb_ni: "usb"},
}
],
// Modules whose interrupts are connected to RV_PLIC.
interrupt_module: [
"uart0",
"gpio",
"spi_device",
"spi_host0",
// "rv_timer", connected to a dedicated interrupt input in rv_core_ibex.
"usbdev",
"pwrmgr_aon",
"aon_timer_aon",
"flash_ctrl",
"hmac",
]
// ===== PINMUX & PINOUT ======================================================
pinout: {
// IO power bank declaration.
// This list defines the IO bank power domains on the ASIC.
// Each individual pad must be in one of the declared power domains.
banks: ['VCC', 'AVCC', 'VIOA', 'VIOB'],
// Pad declaration.
// Each entry must have the following four keys:
//
// - name: Name of the pad (this will be exposed at the chiplevel).
//
// - type: Pad type (this maps to the pad types defined in prim_pad_wrapper_pkg.sv)
//
// - bank: Specifies in which of the IO power banks this pad lives.
//
// - connection: Can have either of the following values:
//
// 1) 'direct': This is a dedicated IO Pad that is directly connected to a peripheral.
//
// 2) 'manual': This is a dedicated IO signal that is not directly connected to a
// peripheral. It needs to be manually wired up in the template.
//
// 3) 'muxed': This is a muxed IO pad that will be connected to the pinmux.
//
// Optionally, each pad can also have a 'desc' field for further description.
pads: [
// Special manually connected pads
{ name: 'POR_N' , type: 'InputStd', bank: 'VCC' , connection: 'manual', desc: 'System reset'},
{ name: 'USB_P' , type: 'BidirTol', bank: 'VCC' , connection: 'manual', desc: 'USB P signal'},
{ name: 'USB_N' , type: 'BidirTol', bank: 'VCC' , connection: 'manual', desc: 'USB N signal'},
{ name: 'CC1' , type: 'InputStd', bank: 'AVCC', connection: 'manual', desc: 'ADC input 1'},
{ name: 'CC2' , type: 'InputStd', bank: 'AVCC', connection: 'manual', desc: 'ADC input 2'},
{ name: 'FLASH_TEST_VOLT' , type: 'AnalogIn0',bank: 'VCC' , connection: 'manual', desc: 'Flash test voltage input'},
{ name: 'FLASH_TEST_MODE0', type: 'InputStd', bank: 'VCC' , connection: 'manual', desc: 'Flash test mode signal'},
{ name: 'FLASH_TEST_MODE1', type: 'InputStd', bank: 'VCC' , connection: 'manual', desc: 'Flash test mode signal'},
// Dedicated IOs
{ name: 'SPI_HOST_D0' , type: 'BidirStd', bank: 'VIOA', connection: 'direct', desc: 'SPI host data'},
{ name: 'SPI_HOST_D1' , type: 'BidirStd', bank: 'VIOA', connection: 'direct', desc: 'SPI host data'},
{ name: 'SPI_HOST_D2' , type: 'BidirStd', bank: 'VIOA', connection: 'direct', desc: 'SPI host data'},
{ name: 'SPI_HOST_D3' , type: 'BidirStd', bank: 'VIOA', connection: 'direct', desc: 'SPI host data'},
{ name: 'SPI_HOST_CLK' , type: 'BidirStd', bank: 'VIOA', connection: 'direct', desc: 'SPI host clock'},
{ name: 'SPI_HOST_CS_L' , type: 'BidirStd', bank: 'VIOA', connection: 'direct', desc: 'SPI host chip select'},
{ name: 'SPI_DEV_D0' , type: 'BidirStd', bank: 'VIOA', connection: 'direct', desc: 'SPI device data'},
{ name: 'SPI_DEV_D1' , type: 'BidirStd', bank: 'VIOA', connection: 'direct', desc: 'SPI device data'},
{ name: 'SPI_DEV_D2' , type: 'BidirStd', bank: 'VIOA', connection: 'direct', desc: 'SPI device data'},
{ name: 'SPI_DEV_D3' , type: 'BidirStd', bank: 'VIOA', connection: 'direct', desc: 'SPI device data'},
{ name: 'SPI_DEV_CLK' , type: 'InputStd', bank: 'VIOA', connection: 'direct', desc: 'SPI device clock'},
{ name: 'SPI_DEV_CS_L' , type: 'InputStd', bank: 'VIOA', connection: 'direct', desc: 'SPI device chip select'},
// IOA
{ name: 'IOA0' , type: 'BidirStd', bank: 'VIOA', connection: 'muxed' , desc: 'Muxed IO pad'},
{ name: 'IOA1' , type: 'BidirStd', bank: 'VIOA', connection: 'muxed' , desc: 'Muxed IO pad'},
{ name: 'IOA2' , type: 'BidirStd', bank: 'VIOA', connection: 'muxed' , desc: 'Muxed IO pad'},
{ name: 'IOA3' , type: 'BidirStd', bank: 'VIOA', connection: 'muxed' , desc: 'Muxed IO pad'},
{ name: 'IOA4' , type: 'BidirStd', bank: 'VIOA', connection: 'muxed' , desc: 'Muxed IO pad'},
{ name: 'IOA5' , type: 'BidirStd', bank: 'VIOA', connection: 'muxed' , desc: 'Muxed IO pad'},
{ name: 'IOA6' , type: 'BidirOd', bank: 'VIOA', connection: 'muxed' , desc: 'Muxed IO pad'},
{ name: 'IOA7' , type: 'BidirOd', bank: 'VIOA', connection: 'muxed' , desc: 'Muxed IO pad'},
{ name: 'IOA8' , type: 'BidirOd', bank: 'VIOA', connection: 'muxed' , desc: 'Muxed IO pad'},
// IOB
{ name: 'IOB0' , type: 'BidirStd', bank: 'VIOB', connection: 'muxed' , desc: 'Muxed IO pad'},
{ name: 'IOB1' , type: 'BidirStd', bank: 'VIOB', connection: 'muxed' , desc: 'Muxed IO pad'},
{ name: 'IOB2' , type: 'BidirStd', bank: 'VIOB', connection: 'muxed' , desc: 'Muxed IO pad'},
{ name: 'IOB3' , type: 'BidirStd', bank: 'VIOB', connection: 'muxed' , desc: 'Muxed IO pad'},
{ name: 'IOB4' , type: 'BidirStd', bank: 'VIOB', connection: 'muxed' , desc: 'Muxed IO pad'},
{ name: 'IOB5' , type: 'BidirStd', bank: 'VIOB', connection: 'muxed' , desc: 'Muxed IO pad'},
{ name: 'IOB6' , type: 'BidirStd', bank: 'VIOB', connection: 'muxed' , desc: 'Muxed IO pad'},
{ name: 'IOB7' , type: 'BidirStd', bank: 'VIOB', connection: 'muxed' , desc: 'Muxed IO pad'},
{ name: 'IOB8' , type: 'BidirStd', bank: 'VIOB', connection: 'muxed' , desc: 'Muxed IO pad'},
{ name: 'IOB9' , type: 'BidirOd' , bank: 'VIOB', connection: 'muxed' , desc: 'Muxed IO pad'},
{ name: 'IOB10' , type: 'BidirOd' , bank: 'VIOB', connection: 'muxed' , desc: 'Muxed IO pad'},
{ name: 'IOB11' , type: 'BidirOd' , bank: 'VIOB', connection: 'muxed' , desc: 'Muxed IO pad'},
{ name: 'IOB12' , type: 'BidirOd' , bank: 'VIOB', connection: 'muxed' , desc: 'Muxed IO pad'},
// IOC
{ name: 'IOC0' , type: 'BidirStd', bank: 'VCC' , connection: 'muxed' , desc: 'Muxed IO pad'},
{ name: 'IOC1' , type: 'BidirStd', bank: 'VCC' , connection: 'muxed' , desc: 'Muxed IO pad'},
{ name: 'IOC2' , type: 'BidirStd', bank: 'VCC' , connection: 'muxed' , desc: 'Muxed IO pad'},
{ name: 'IOC3' , type: 'BidirStd', bank: 'VCC' , connection: 'muxed' , desc: 'Muxed IO pad'},
{ name: 'IOC4' , type: 'BidirStd', bank: 'VCC' , connection: 'muxed' , desc: 'Muxed IO pad'},
{ name: 'IOC5' , type: 'BidirStd', bank: 'VCC' , connection: 'muxed' , desc: 'Muxed IO pad'},
{ name: 'IOC6' , type: 'BidirStd', bank: 'VCC' , connection: 'muxed' , desc: 'Muxed IO pad'},
{ name: 'IOC7' , type: 'BidirStd', bank: 'VCC' , connection: 'muxed' , desc: 'Muxed IO pad'},
{ name: 'IOC8' , type: 'BidirStd', bank: 'VCC' , connection: 'muxed' , desc: 'Muxed IO pad'},
{ name: 'IOC9' , type: 'BidirStd', bank: 'VCC' , connection: 'muxed' , desc: 'Muxed IO pad'},
{ name: 'IOC10' , type: 'BidirOd' , bank: 'VCC' , connection: 'muxed' , desc: 'Muxed IO pad'},
{ name: 'IOC11' , type: 'BidirOd' , bank: 'VCC' , connection: 'muxed' , desc: 'Muxed IO pad'},
{ name: 'IOC12' , type: 'BidirOd' , bank: 'VCC' , connection: 'muxed' , desc: 'Muxed IO pad'},
// IOR
{ name: 'IOR0' , type: 'BidirStd', bank: 'VCC' , connection: 'muxed' , desc: 'Muxed IO pad'},
{ name: 'IOR1' , type: 'BidirStd', bank: 'VCC' , connection: 'muxed' , desc: 'Muxed IO pad'},
{ name: 'IOR2' , type: 'BidirStd', bank: 'VCC' , connection: 'muxed' , desc: 'Muxed IO pad'},
{ name: 'IOR3' , type: 'BidirStd', bank: 'VCC' , connection: 'muxed' , desc: 'Muxed IO pad'},
{ name: 'IOR4' , type: 'BidirStd', bank: 'VCC' , connection: 'muxed' , desc: 'Muxed IO pad'},
{ name: 'IOR5' , type: 'BidirStd', bank: 'VCC' , connection: 'muxed' , desc: 'Muxed IO pad'},
{ name: 'IOR6' , type: 'BidirStd', bank: 'VCC' , connection: 'muxed' , desc: 'Muxed IO pad'},
{ name: 'IOR7' , type: 'BidirStd', bank: 'VCC' , connection: 'muxed' , desc: 'Muxed IO pad'},
{ name: 'IOR10' , type: 'BidirOd' , bank: 'VCC' , connection: 'muxed' , desc: 'Muxed IO pad'},
{ name: 'IOR11' , type: 'BidirOd' , bank: 'VCC' , connection: 'muxed' , desc: 'Muxed IO pad'},
{ name: 'IOR12' , type: 'BidirOd' , bank: 'VCC' , connection: 'muxed' , desc: 'Muxed IO pad'},
{ name: 'IOR13' , type: 'BidirOd' , bank: 'VCC' , connection: 'muxed' , desc: 'Muxed IO pad'},
]
}
pinmux: {
// Signal to pinmux/pad mapping.
// Each entry in the list below must have the following two mandatory keys:
//
// - instance: This is the comportable IO instance name where the IO signal comes from.
//
// - connection: This key is similar to the connection key in the pinout/pad configuration and
// can have either of the following values:
//
// 1) 'direct': This is a dedicated IO signal that is directly connected to a pad.
// Such an IO signal must also specify the 'port' and 'pad' keys
// (see further below).
//
// 2) 'manual': This is a dedicated IO signal that is not directly connected to a pad.
// It needs to be manually wired up in the template.
// Such an IO signal may have a 'port' key, but no 'pad' key.
//
// 3) 'muxed': This is a muxed IO signal that will be connected to the pinmux.
// Such an IO signal may have a 'port' key, but no 'pad' key.
//
// Depending on the connection type specified, each entry may have the following optional keys:
//
// - port: Name of the available IO signal of the instance.
// This is required for 'direct' connections, but optional for the others.
// Individual signals of a bus IO signal must be indexed with square brackets, e.g. mybus[1].
// Not specifying this key or setting it to an empty string acts as a wild card
// and includes all available IOs of this instance.
//
// - pad: Name of the pad the 'direct' connection should connect to.
// This is not required for 'muxed' and 'manual' connections.
//
// - desc: Optional description field.
//
// - attr: Manual direct IOs may specify an additional pad attr field.
// This is used to create the correct pad attribute CSR for that DIO channel (since the
// DIO is manual, there is no way to automatically infer the corresponding pad type).
//
signals: [
// SPI Host0
{ instance: 'spi_host0', port: 'sck', connection: 'direct', pad: 'SPI_HOST_CLK' , desc: ''},
{ instance: 'spi_host0', port: 'csb', connection: 'direct', pad: 'SPI_HOST_CS_L', desc: ''},
{ instance: 'spi_host0', port: 'sd[0]', connection: 'direct', pad: 'SPI_HOST_D0' , desc: ''},
{ instance: 'spi_host0', port: 'sd[1]', connection: 'direct', pad: 'SPI_HOST_D1' , desc: ''},
{ instance: 'spi_host0', port: 'sd[2]', connection: 'direct', pad: 'SPI_HOST_D2' , desc: ''},
{ instance: 'spi_host0', port: 'sd[3]', connection: 'direct', pad: 'SPI_HOST_D3' , desc: ''},
// SPI Device
{ instance: 'spi_device', port: 'sck', connection: 'direct', pad: 'SPI_DEV_CLK' , desc: ''},
{ instance: 'spi_device', port: 'csb', connection: 'direct', pad: 'SPI_DEV_CS_L' , desc: ''},
{ instance: 'spi_device', port: 'sd[0]', connection: 'direct', pad: 'SPI_DEV_D0' , desc: ''},
{ instance: 'spi_device', port: 'sd[1]', connection: 'direct', pad: 'SPI_DEV_D1' , desc: ''},
{ instance: 'spi_device', port: 'sd[2]', connection: 'direct', pad: 'SPI_DEV_D2' , desc: ''},
{ instance: 'spi_device', port: 'sd[3]', connection: 'direct', pad: 'SPI_DEV_D3' , desc: ''},
// USBDEV
{ instance: 'usbdev', port: 'usb_dp', connection: 'manual', pad: '' , desc: ''},
{ instance: 'usbdev', port: 'usb_dn', connection: 'manual', pad: '' , desc: ''},
// MIOs
{ instance: "gpio", port: '', connection: 'muxed' , pad: '' , desc: ''},
{ instance: "uart0", port: '', connection: 'muxed' , pad: '' , desc: ''},
{ instance: "flash_ctrl", port: '', connection: 'muxed' , pad: '' , desc: ''},
{ instance: 'usbdev', port: 'sense', connection: 'muxed' , pad: '' , desc: ''},
],
// Number of wakeup detectors to instantiate, and bitwidth for the wakeup counters.
num_wkup_detect: 8
wkup_cnt_width: 8
}
// Implementation targets.
// This defines the configuration of the target-specific chip-levels to
// generate from the shared template. Each target uses the same base
// configuration for the pinmux and pinout as defined above, and the
// generated software constants for the pinmux DIF do not change among the
// implementation targets. However, in order to accommodate slight
// differences among the ASIC, FPGA emulation and simulation environments,
// it is possible to make very limited pinout changes below. In particular,
// it is possible to remove and tie-off specific pads, or add more 'manual'
// pads that need to be manually connected in the template. It is also possible
// to override the JTAG and strap locations indices, since the testing and DFT
// setups may differ among the targets.
targets: [
{ name: 'cw305',
pinout: {
remove_ports: [],
remove_pads: [
'CC1', 'CC2',
'SPI_DEV_D2', 'SPI_DEV_D3'
'SPI_HOST_CLK', 'SPI_HOST_CS_L',
'SPI_HOST_D0', 'SPI_HOST_D1', 'SPI_HOST_D2', 'SPI_HOST_D3',
'FLASH_TEST_VOLT',
'FLASH_TEST_MODE0', 'FLASH_TEST_MODE1',
'IOB7', 'IOB8', 'IOB9', 'IOB10', 'IOB11', 'IOB12',
'IOC6', 'IOC7', 'IOC9', 'IOC10', 'IOC11', 'IOC12',
'IOR0', 'IOR1', 'IOR2', 'IOR3', 'IOR5', 'IOR6', 'IOR7', 'IOR10', 'IOR11', 'IOR12', 'IOR13'
],
add_pads: [
// Additional infrastucture pads
{ name: 'IO_CLK', type: 'InputStd', bank: 'VCC', connection: 'manual', desc: 'Extra clock input for FPGA target'}
{ name: 'POR_BUTTON_N', type: 'InputStd', bank: 'VCC', connection: 'manual', desc: 'POR from the push-button'}
// Custom USB pads
{ name: 'IO_USB_SENSE0', type: 'BidirStd', bank: 'VCC', connection: 'manual', desc: 'Manual USB signal for FPGA target'}
{ name: 'IO_USB_DNPULLUP0', type: 'BidirStd', bank: 'VCC', connection: 'manual', desc: 'Manual USB signal for FPGA target'}
{ name: 'IO_USB_DPPULLUP0', type: 'BidirStd', bank: 'VCC', connection: 'manual', desc: 'Manual USB signal for FPGA target'}
// ChipWhisperer IO
{ name: 'IO_CLKOUT', type: 'BidirStd', bank: 'VCC', connection: 'manual', desc: 'Manual clock output for SCA setup'}
{ name: 'IO_TRIGGER', type: 'BidirStd', bank: 'VCC', connection: 'manual', desc: 'Manual trigger output for SCA setup'}
{ name: 'IO_UTX_DEBUG', type: 'BidirStd', bank: 'VCC', connection: 'manual', desc: 'Manual UART TX debug output'}
],
}
pinmux: {
special_signals: [
// Straps
{ name: 'tap0', pad: 'IOC8', desc: 'TAP strap signal.' },
{ name: 'tap1', pad: 'IOC5', desc: 'TAP strap signal.' },
{ name: 'dft0', pad: 'IOC3', desc: 'DFT strap signal.' },
{ name: 'dft1', pad: 'IOC4', desc: 'DFT strap signal.' },
// JTAG
{ name: 'tck', pad: 'SPI_DEV_CLK' , desc: 'JTAG tck signal, overlaid on SPI_DEV.' },
{ name: 'tms', pad: 'SPI_DEV_CS_L', desc: 'JTAG tms signal, overlaid on SPI_DEV.' },
{ name: 'trst_n', pad: 'IOR4', desc: 'JTAG trst_n signal.' },
{ name: 'tdi', pad: 'SPI_DEV_D0' , desc: 'JTAG tdi signal, overlaid on SPI_DEV.' },
{ name: 'tdo', pad: 'SPI_DEV_D1' , desc: 'JTAG tdo signal, overlaid on SPI_DEV.' },
],
}
}
]
}