Skip to content

Router reference

AxiRouter

Bases: Router

Router class to describe a single-AXI router

Check if the number of links is correct.

render(**kwargs)

Declare the router in the generated code.

NarrowWideRouter

Bases: Router

Router class to describe a narrow-wide router

Check if the number of links is correct.

render(**kwargs)

Declare the router in the generated code.

Router

Bases: BaseModel, ABC

Abstract router class of an actual router

Check if the number of links is correct.

render() abstractmethod

Declare the router in the generated code.

RouterDesc

Bases: BaseModel

Router class to describe (arrays of) a router

Attributes:

Name Type Description
name str

Unique identifier for the router. Used in connection definitions.

array Optional[Union[Tuple[int], Tuple[int, int]]]

Defines a grid of routers (1D or 2D). E.g., [4, 4] creates a 4x4 mesh of routers.

tree Optional[List[int]]

Defines a tree topology structure. The list specifies the branching factor at each level.

degree Optional[int]

Override the number of input/output ports on the router.

auto_connect Optional[bool]

If true and array is specified, FlooGen automatically generates mesh connections (North, East, South, West) between the routers.

xy_id_offset Optional[Union[SimpleId, Coord]]

Offsets for XY coordinates or IDs, used to manually adjust the logical position of the routers in the network.

array_int_to_tuple(v) classmethod

Convert array to tuple if it is an int

dict_to_coord_obj(v) classmethod

Convert dict to Coord object.

tree_int_to_tuple(v) classmethod

Convert tree to tuple if it is an int