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

floogen: Add support for single-AXI networks #69

Merged
merged 14 commits into from
Sep 17, 2024
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/floogen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
examples: ["single_cluster", "occamy_mesh", "occamy_tree", "occamy_mesh_src", "terapool"]
examples: ["single_cluster", "occamy_mesh_xy", "occamy_tree", "occamy_mesh_src", "terapool"]
steps:
- uses: actions/checkout@v4
- name: Set up Python
Expand Down
2 changes: 2 additions & 0 deletions Bender.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ sources:
- hw/floo_axi_chimney.sv
- hw/floo_nw_chimney.sv
- hw/floo_router.sv
# Level 3 (Wrappers)
- hw/floo_axi_router.sv
- hw/floo_nw_router.sv

- target: vc_router
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- The `RouteCfg` describes all the necessary routing information parameters required by the chimneys.
- The `ChimneyCfg` describes all other parameters for the data path of the chimney (e.g. Mgr/Sbr port enable, number of oustanding transactions, RoB types & sizes, etc.)
- The `floo_test_pkg` now defines default configurations for all the new configuration structs that are used by the testbenches.
- Add `floo_axi_router` module, which is a wrapper similar to the `floo_nw_router` but for single-AXI configurations, and can be used in conjunction with `floo_axi_chimney`.

#### FlooGen
- The `data_width` and `user_width` fields for `protocols` are now also validated to be compatible with each other.
- All the various `*Cfg`'s is now rendered by _FlooGen_, either in the `*_noc_pkg` or in the `*_noc` module itself.
- Added support for single-AXI configuration networks.

### Changed

Expand All @@ -42,6 +44,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- The `direction` field in the `protocol` schema is no longer required, since the direction is determined when specifying `mgr_port_protocol` and `sbr_port_protocol`.
- The `name` field must be unique now, since it is used by `mgr_port_protocol` and `sbr_port_protocol` to reference the exact protocol.
- All examples were adapted to reflect those changes.
- A FlooGen configuration file now requires a `network_type` field, to determine the type of network to generate. The options are `axi` for single-AXI networks and `narrow-wide` for the narrow-wide AXI configurations.

### Fixed

Expand Down
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,16 +162,14 @@ The following example shows the configuration for a simple mesh topology with 4x
use_id_table: true

protocols:
- name: "example_axi"
- name: "axi_in"
type: "AXI4"
direction: "manager"
data_width: 64
addr_width: 32
id_width: 3
user_width: 1
- name: "example_axi"
- name: "axi_out"
type: "AXI4"
direction: "subordinate"
data_width: 64
addr_width: 32
id_width: 3
Expand All @@ -184,9 +182,9 @@ The following example shows the configuration for a simple mesh topology with 4x
base: 0x1000_0000
size: 0x0004_0000
mgr_port_protocol:
- "example_axi"
- "axi_in"
sbr_port_protocol:
- "example_axi"
- "axi_out"

routers:
- name: "router"
Expand Down
13 changes: 4 additions & 9 deletions docs/floogen.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,14 @@ The following is an example of a configuration file for a 4x4 mesh network:
use_id_table: true

protocols:
- name: "example_axi"
- name: "axi_in"
type: "AXI4"
direction: "manager"
data_width: 64
addr_width: 32
id_width: 3
user_width: 1
- name: "example_axi"
- name: "axi_out"
type: "AXI4"
direction: "subordinate"
data_width: 64
addr_width: 32
id_width: 3
Expand All @@ -38,9 +36,9 @@ The following is an example of a configuration file for a 4x4 mesh network:
base: 0x1000_0000
size: 0x0004_0000
mgr_port_protocol:
- "example_axi"
- "axi_in"
sbr_port_protocol:
- "example_axi"
- "axi_out"

routers:
- name: "router"
Expand Down Expand Up @@ -86,7 +84,6 @@ The protocols section describes the protocols used in the network. It is compose

- `name`: name of the protocol. This will be used as a reference in the framework and in the generated RTL code to name the protocol module and the protocol signals. If the narrow-wide channels are used, they need to be named `narrow` and `wide` respectively.
- `type`: Currently only `AXI4` is supported
- `direction`: the direction of the protocol. It can be either `manager` or `subordinate`. If an endpoint is both manager and subordinate, two protocols need to be defined.
- `data_width`: the data width of the protocol
- `addr_width`: the address width of the protocol
- `id_width`: the ID width of the protocol. Endpoints with different ID widths for the `manager` and `subordinate` protocols are supported.
Expand Down Expand Up @@ -159,7 +156,5 @@ where `<config_file>` is the configuration file and `<output_dir>` is the output
Apart from the configuration file, `floogen` supports additional options to customize the generated RTL code. The following options are supported:

- `--outdir`: the output directory where the generated RTL code will be placed. This is equivalent to the `-o` option. If it is not specified, the output is printed to stdout.
- `--only-pkg`: only generate the package. This is useful if you want to test single IPs without generating a whole network.
- `--pkg-outdir`: the output directory where the generated package will be placed. By default, the package in the `hw` folder is overwitten, since it is also the once that is used by `bender` for compiling the IPs. If you want to keep the original package, you can specify a different output directory here.
- `--no-format`: do not format the generated RTL code. By default, the generated RTL code is formatted with verible format, for which the `verible-verilog-format` binary needs to be installed. If this option is set, the generated RTL code is not formatted.
- `--visualize`: visualize the generated network. It will create a plot of the graph of the network. If the `--outdir` option is specified, the plot is saved in the output directory. Otherwise, it is shown in a window. This is mainly intended for a quick check of the generated network, not a tool for debugging.
81 changes: 81 additions & 0 deletions floogen/examples/axi_mesh_id.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Copyright 2023 ETH Zurich and University of Bologna.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0

name: axi_mesh
description: "AXI mesh configuration for FlooGen"
network_type: "axi"

routing:
route_algo: "ID"
use_id_table: true

protocols:
- name: "axi_in"
protocol: "AXI4"
data_width: 64
addr_width: 48
id_width: 4
user_width: 1
type_prefix: # prevents `axi_axi` prefix
- name: "axi_out"
protocol: "AXI4"
data_width: 64
addr_width: 48
id_width: 2
user_width: 1
type_prefix: # prevents `axi_axi` prefix

endpoints:
- name: "cluster"
array: [4, 4]
addr_range:
base: 0x0000_1000_0000
size: 0x0000_0004_0000
mgr_port_protocol:
- "axi_in"
sbr_port_protocol:
- "axi_out"
- name: "hbm"
array: [4]
addr_range:
base: 0x0000_8000_0000
size: 0x0000_4000_0000
sbr_port_protocol:
- "axi_out"
- name: "peripherals"
addr_range:
start: 0x0000_0000_0000
end: 0x0000_0fff_ffff
mgr_port_protocol:
- "axi_in"
sbr_port_protocol:
- "axi_out"

routers:
- name: "router"
array: [4, 4]
degree: 5

connections:
- src: "cluster"
dst: "router"
src_range:
- [0, 3]
- [0, 3]
dst_range:
- [0, 3]
- [0, 3]
dst_dir: "Eject"
- src: "hbm"
dst: "router"
src_range:
- [0, 3]
dst_range:
- [0, 0]
- [0, 3]
dst_dir: "West"
- src: "peripherals"
dst: "router"
dst_idx: [1, 3]
dst_dir: "North"
81 changes: 81 additions & 0 deletions floogen/examples/axi_mesh_src.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Copyright 2023 ETH Zurich and University of Bologna.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0

name: axi_mesh
description: "AXI mesh configuration for FlooGen"
network_type: "axi"

routing:
route_algo: "SRC"
use_id_table: true

protocols:
- name: "axi_in"
protocol: "AXI4"
data_width: 64
addr_width: 48
id_width: 4
user_width: 1
type_prefix: # prevents `axi_axi` prefix
- name: "axi_out"
protocol: "AXI4"
data_width: 64
addr_width: 48
id_width: 2
user_width: 1
type_prefix: # prevents `axi_axi` prefix

endpoints:
- name: "cluster"
array: [4, 4]
addr_range:
base: 0x0000_1000_0000
size: 0x0000_0004_0000
mgr_port_protocol:
- "axi_in"
sbr_port_protocol:
- "axi_out"
- name: "hbm"
array: [4]
addr_range:
base: 0x0000_8000_0000
size: 0x0000_4000_0000
sbr_port_protocol:
- "axi_out"
- name: "peripherals"
addr_range:
start: 0x0000_0000_0000
end: 0x0000_0fff_ffff
mgr_port_protocol:
- "axi_in"
sbr_port_protocol:
- "axi_out"

routers:
- name: "router"
array: [4, 4]
degree: 5

connections:
- src: "cluster"
dst: "router"
src_range:
- [0, 3]
- [0, 3]
dst_range:
- [0, 3]
- [0, 3]
dst_dir: "Eject"
- src: "hbm"
dst: "router"
src_range:
- [0, 3]
dst_range:
- [0, 0]
- [0, 3]
dst_dir: "West"
- src: "peripherals"
dst: "router"
dst_idx: [1, 3]
dst_dir: "North"
81 changes: 81 additions & 0 deletions floogen/examples/axi_mesh_xy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Copyright 2023 ETH Zurich and University of Bologna.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0

name: axi_mesh
description: "AXI mesh configuration for FlooGen"
network_type: "axi"

routing:
route_algo: "XY"
use_id_table: true

protocols:
- name: "axi_in"
protocol: "AXI4"
data_width: 64
addr_width: 48
id_width: 4
user_width: 1
type_prefix: # prevents `axi_axi` prefix
- name: "axi_out"
protocol: "AXI4"
data_width: 64
addr_width: 48
id_width: 2
user_width: 1
type_prefix: # prevents `axi_axi` prefix

endpoints:
- name: "cluster"
array: [4, 4]
addr_range:
base: 0x0000_1000_0000
size: 0x0000_0004_0000
mgr_port_protocol:
- "axi_in"
sbr_port_protocol:
- "axi_out"
- name: "hbm"
array: [4]
addr_range:
base: 0x0000_8000_0000
size: 0x0000_4000_0000
sbr_port_protocol:
- "axi_out"
- name: "peripherals"
addr_range:
start: 0x0000_0000_0000
end: 0x0000_0fff_ffff
mgr_port_protocol:
- "axi_in"
sbr_port_protocol:
- "axi_out"

routers:
- name: "router"
array: [4, 4]
degree: 5

connections:
- src: "cluster"
dst: "router"
src_range:
- [0, 3]
- [0, 3]
dst_range:
- [0, 3]
- [0, 3]
dst_dir: "Eject"
- src: "hbm"
dst: "router"
src_range:
- [0, 3]
dst_range:
- [0, 0]
- [0, 3]
dst_dir: "West"
- src: "peripherals"
dst: "router"
dst_idx: [1, 3]
dst_dir: "North"
1 change: 1 addition & 0 deletions floogen/examples/occamy_mesh_src.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

name: occamy_mesh_src
description: "Occamy mesh configuration for FlooGen with source-based routing"
network_type: "narrow-wide"

routing:
route_algo: "SRC"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0

name: occamy_mesh
name: occamy_mesh_xy
description: "Occamy mesh configuration for FlooGen"
network_type: "narrow-wide"

routing:
route_algo: "XY"
Expand Down
1 change: 1 addition & 0 deletions floogen/examples/occamy_tree.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

name: occamy_tree
description: "Occamy configuration for FlooGen"
network_type: "narrow-wide"

routing:
route_algo: "ID"
Expand Down
1 change: 1 addition & 0 deletions floogen/examples/single_cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

name: single_cluster
description: "Single Cluster Configuration for FlooGen"
network_type: "narrow-wide"

routing:
route_algo: "ID"
Expand Down
Loading
Loading