Skip to content

Commit

Permalink
Spit xbar into two levels
Browse files Browse the repository at this point in the history
Attempt to reduce the depth of xbar logic on critical timing paths
to/from the HyperRAM/SRAM by moving most peripherals
from the main cross-bar to a new "peri" (peripheral) sub-crossbar.
Keeps addresses the same, but some few devices have increased
access latency due to being moved to xbar_peri or to improve QoR.

Blocks with increased access latency: timer, system_info, & hw_rev.

Blocks with decreased access latency: plic.
  • Loading branch information
elliotb-lowrisc committed Nov 4, 2024
1 parent d962657 commit f5b35a4
Show file tree
Hide file tree
Showing 16 changed files with 782 additions and 523 deletions.
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
2 changes: 0 additions & 2 deletions data/top_config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ 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" }

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

[[blocks]]
name = "i2c"
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_board",
type: "device",
Expand Down Expand Up @@ -173,8 +104,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.name in ["i2c", "spi"]:
% for i in range(block.instances):
{ name: "${f"{block.name}{i}"}",
type: "device",
Expand Down Expand Up @@ -206,34 +141,25 @@
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_board",
"spi_lcd",
"spi_ethmac",
% for block in config.blocks:
% if not block.name == "gpio":
% if block.name in ["i2c", "spi"]:
% 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

0 comments on commit f5b35a4

Please sign in to comment.