Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spit xbar into two levels #301

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
data/xbar_main_generated.hjson linguist-generated=true
data/xbar_peri_generated.hjson linguist-generated=true
doc/ip/pinmux/README.md linguist-generated=true
rtl/bus/sonata_xbar_main.sv linguist-generated=true
rtl/bus/tl_main_pkg.sv linguist-generated=true
rtl/bus/tl_peri_pkg.sv linguist-generated=true
rtl/bus/tl_ifetch_pkg.sv linguist-generated=true
rtl/bus/xbar_main.sv linguist-generated=true
rtl/bus/xbar_peri.sv linguist-generated=true
rtl/bus/xbar_ifetch.sv linguist-generated=true
rtl/system/pinmux.sv linguist-generated=true
rtl/system/sonata_pkg.sv linguist-generated=true
Expand Down
7 changes: 5 additions & 2 deletions data/top_config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@ ios = [
]
memory_start = 0x80000040
memory_size = 0x00000040
which_xbar = "peri"

[[blocks]]
name = "pwm"
instances = 1
ios = [{ name = "out", type = "output", length = 7 }]
memory_start = 0x80001000
memory_size = 0x00001000
xbar = { pipeline = "true", req_fifo_pass = "false", rsp_fifo_pass = "false" }
which_xbar = "peri"

[[blocks]]
name = "uart"
Expand All @@ -29,7 +30,7 @@ ios = [
]
memory_start = 0x80100000
memory_size = 0x00001000
xbar = { pipeline = "true", req_fifo_pass = "false", rsp_fifo_pass = "false" }
which_xbar = "peri"

[[blocks]]
name = "i2c"
Expand All @@ -41,6 +42,7 @@ ios = [
memory_start = 0x80200000
memory_size = 0x00001000
xbar = { pipeline = "true", req_fifo_pass = "false", rsp_fifo_pass = "false" }
which_xbar = "main"

[[blocks]]
name = "spi"
Expand All @@ -53,6 +55,7 @@ ios = [
]
memory_start = 0x80302000
memory_size = 0x00001000
which_xbar = "main"

# UARTS
[[pins]]
Expand Down
92 changes: 9 additions & 83 deletions data/xbar_main.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -61,87 +61,18 @@
size_byte: "0x00004000",
}],
},
{ name: "gpio", // General purpose input and output
{ name: "peri",
type: "device",
clock: "clk_sys_i",
reset: "rst_sys_ni",
req_fifo_pass: false,
rsp_fifo_pass: false,
xbar: false,
addr_range: [{
base_addr: "0x80000000",
size_byte: "0x00001000",
}],
pipeline: true,
},
{ name: "pinmux", // Pin multiplexer
type: "device",
clock: "clk_sys_i",
reset: "rst_sys_ni",
req_fifo_pass: false,
rsp_fifo_pass: false,
xbar: false,
addr_range: [{
base_addr: "0x80005000",
size_byte: "0x00001000",
}],
pipeline: true,
},
{ name: "rgbled_ctrl", // RGB LED Controller
type: "device",
clock: "clk_sys_i",
reset: "rst_sys_ni",
req_fifo_pass: false,
rsp_fifo_pass: false,
xbar: false,
addr_range: [{
base_addr: "0x80009000",
size_byte: "0x00001000",
size_byte: "0x00200000",
}],
pipeline: true,
},
{ name: "hw_rev", // Hardware revoker control register
type: "device",
clock: "clk_sys_i",
reset: "rst_sys_ni",
xbar: false,
addr_range: [{
base_addr: "0x8000A000",
size_byte: "0x00001000",
}],
},
{ name: "xadc", // XADC
type: "device",
clock: "clk_sys_i",
reset: "rst_sys_ni",
req_fifo_pass: false,
rsp_fifo_pass: false,
xbar: false,
addr_range: [{
base_addr: "0x8000B000",
size_byte: "0x00001000",
}],
pipeline: true,
},
{ name: "system_info", // System information
type: "device",
clock: "clk_sys_i",
reset: "rst_sys_ni",
xbar: false,
addr_range: [{
base_addr: "0x8000C000",
size_byte: "0x00001000",
}],
},
{ name: "timer", // Interrupt timer
type: "device",
clock: "clk_sys_i",
reset: "rst_sys_ni",
xbar: false,
addr_range: [{
base_addr: "0x80040000",
size_byte: "0x00010000",
}],
},
{ name: "spi_lcd",
type: "device",
Expand All @@ -163,8 +94,12 @@
size_byte: "0x00001000",
}],
},
// I^2C devices included here instead of in peri only because
// address range sizes must be a power of two.
// We can easily tolerate an extra cycle of access latency to them,
// so add pipelining to allow them to be placed further away physically.
% for block in config.blocks:
% if not block.name == "gpio":
% if block.which_xbar == "main":
% for i in range(block.instances):
{ name: "${f"{block.name}{i}"}",
type: "device",
Expand Down Expand Up @@ -196,33 +131,24 @@
type: "device",
clock: "clk_sys_i",
reset: "rst_sys_ni",
req_fifo_pass: false,
rsp_fifo_pass: false,
xbar: false,
addr_range: [{
// This block is overaligned to 0x0800_0000 bytes since OpenTitan RV_PLIC block expects it.
base_addr: "0x88000000",
size_byte: "0x04000000",
}],
pipeline: true,
},
],
connections: {
ibex_lsu: [
"sram",
"hyperram",
"rev_tag",
"gpio",
"pinmux",
"system_info",
"rgbled_ctrl",
"hw_rev",
"xadc",
"timer",
"peri",
"spi_lcd",
"spi_ethmac",
% for block in config.blocks:
% if not block.name == "gpio":
% if block.which_xbar == "main":
% for i in range(block.instances):
"${f"{block.name}{i}"}",
% endfor
Expand Down
144 changes: 7 additions & 137 deletions data/xbar_main_generated.hjson

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading