Minimal Example¶
To get you started quickly, here is a complete configuration file for a common use case: a 4x4 Mesh topology using XY routing.
In this system, we have a 2D array of "clusters" (endpoints), where each cluster acts as both a manager (initiating requests) and a subordinate (responding to requests).
The Configuration File¶
Save the following content as axi_mesh.yaml:
name: axi_mesh
description: "AXI mesh with XY routing"
network_type: "axi"
# 1. Routing Configuration
routing:
route_algo: "XY"
use_id_table: true
# 2. Protocol Definitions
protocols:
- name: "axi_in"
protocol: "AXI4"
data_width: 64
addr_width: 48
id_width: 4
user_width: 1
- name: "axi_out"
protocol: "AXI4"
data_width: 64
addr_width: 48
id_width: 2
user_width: 1
# 3. Endpoint Definitions
endpoints:
- name: "cluster"
array: [4, 4]
addr_range:
base: 0x0000_0000_0000
size: 0x0000_0001_0000
mgr_port_protocol:
- "axi_in"
sbr_port_protocol:
- "axi_out"
# 4. Router Definitions
routers:
- name: "router"
array: [4, 4]
degree: 5
# 5. Connectivity
connections:
- src: "cluster"
dst: "router"
src_range:
- [0, 3]
- [0, 3]
dst_range:
- [0, 3]
- [0, 3]
dst_dir: "Eject"
Breakdown¶
Here is what is happening in each section of the configuration:
-
System & Routing: We define the global System Configuration (name, description) and select
XYas the Routing algorithm.use_id_table: truetells FlooGen to generate a lookup table for address translation, which simplifies the address map logic. -
Protocols: We define two AXI4 Protocols:
axi_in(for incoming requests to the NoC) andaxi_out(for outgoing requests from the NoC). Note that they have different ID widths to account for ID bits consumed by the routing logic. -
Endpoints: We instantiate a 4x4 array of Endpoints named
cluster.- Addressing: Each cluster is assigned a chunk of the global address map starting at
basewith a stride ofsize. - Interfaces: Each cluster has a manager port (using
axi_in) and a subordinate port (usingaxi_out).
- Addressing: Each cluster is assigned a chunk of the global address map starting at
-
Routers: We instantiate a corresponding 4x4 array of Routers. The
degree: 5indicates 5 ports (North, East, South, West, and Local/Eject). -
Connections: The Connections section wires the endpoints to the routers.
- We connect the
clusterarray to therouterarray 1-to-1. dst_dir: "Eject"specifies that the clusters are connected to the "Local" (or Eject) port of the routers.- Note: The inter-router connections (North, East, South, West) are automatically inferred by FlooGen because we are using a Mesh topology with XY routing.
- We connect the
Run It¶
1. Visualize the Topology Before generating code, verify the graph looks correct:
2. Generate the RTL Generate the SystemVerilog package and top-level module:
You will find the generated files floo_axi_mesh_noc.sv and floo_axi_mesh_noc_pkg.sv in the out/ directory.