Skip to content

Routing

The second aspect of the network is how the routing is performed in FlooNoC, which is where FlooGen comes into play. A lot of of the routing information is quite cumbersome to define and error-prone to do by hand. FlooGen allows you to define the routing in a high-level way, and it will generate the low-level routing information for you. The basic information you need to provide is:

routing:
  route_algo: "XY"
  use_id_table: true

The routing section of a configuration file.

This holds only what a configuration declares. The widths and address maps that Network.gen_routing_info() derives from the elaborated graph live on Routing, which extends this class, so that a configuration cannot set them and the two are not confused for one another.

Attributes:

Name Type Description
route_algo RouteAlgo

This determines the routing algorithm to use. You can find more information about the different routing algorithms in the routing algorithms documentation.

use_id_table bool

A boolean flag indicating that if set to true, a system address table will be generated in the package which is used to translate system addresses to endpoint IDs or coordinates. This is always used in table-based routing and can be used in XYRouting to translate system addresses to XY-coordinates. If XYRouting is used and this field is set to false, the XY coordinates are automatically derived as address offsets. This is much simpler but requires that all endpoint addresses are contiguous and of the same size.

rob_idx_bits int

The number of bits to allocate for the rob_idx field in the packet header. This is only relevant if reordering buffers are used in the network.

collective CollectiveCfg

Collective operation configuration (multicast, barrier, reduction).

Reference

Beyond what you configure above, FlooGen derives a great deal more from the elaborated network: the system address map (sam), the coordinate and route widths, the endpoint count, and so on. Those live on Routing, which extends RoutingDesc and is built by Network.gen_routing_info(). They are not configuration and cannot be set in a configuration file.

A RoutingDesc together with everything Network.gen_routing_info() derives.

Constructed once the graph is elaborated, so sam, addr_width and the endpoint counts are always present. The remaining widths stay optional because which of them exists is decided by route_algo; render_* raises if one is read that the configured algorithm never produces.

The full API reference of the routing model, including methods and other routing-related classes (e.g., RouteMap, RouteTable), can be found in the Routing Reference.