Routing Reference¶
AddrRange
¶
Bases: BaseModel
Address range class.
Attributes:
| Name | Type | Description |
|---|---|---|
start |
int
|
Absolute start address of the range. |
end |
int
|
Absolute end address of the range. |
size |
int
|
Size of the address range. |
base |
Optional[int]
|
Base address used for calculating ranges in endpoint arrays. |
en_collective |
bool
|
If true, marks this range as a multicast/collective destination. |
CollectiveCfg
¶
Bases: BaseModel
User-facing collective operation configuration.
The five high-level knobs map to collective_cfg_t in floo_pkg.
Attributes:
| Name | Type | Description |
|---|---|---|
en_narrow_multicast |
bool
|
Enables multicast on the narrow link ( |
en_wide_multicast |
bool
|
Enables multicast on the wide link ( |
en_barrier |
bool
|
Enables barrier synchronization ( |
en_narrow_reduction |
Optional[NarrowReductionCfg]
|
Configuration for integer ALU reduction operations available on the narrow router ( |
en_wide_reduction |
Optional[WideReductionCfg]
|
Configuration for floating-point reduction operations available on the wide router ( |
Reduction Configuration Options
For en_narrow_reduction and en_wide_reduction, the following YAML values are supported:
false/ omitted: Disabled (default)true: All operations enabled, default hardware configuration[Add, Mul, ...]: Only the listed operations enabled, default hardware configuration{ops: [...], rd_pipeline_depth: N, cut_offload_intf: true}: Full per-channel control
en_collective
property
¶
True when any collective feature is enabled (multicast, barrier, or reduction).
get_collective_cfg
property
¶
Return a dict representing collective_cfg_t for sv_struct_render.
render_reduction_typedefs(cfg_n, cfg_w)
¶
Render offload reduction channel/link typedefs for enabled channels.
Coord
¶
NarrowReductionCfg
¶
Bases: ReductionCfg
Reduction configuration for the narrow link.
get_reduction_cfg()
¶
Return a dict representing reduction_cfg_t for sv_struct_render.
ReductionCfg
¶
Bases: BaseModel
Base reduction hardware configuration shared by narrow and wide channels.
get_reduction_cfg()
¶
Return a dict representing reduction_cfg_t for sv_struct_render.
RouteAlgo
¶
Bases: Enum
Routing algorithm enum.
Attributes:
| Name | Type | Description |
|---|---|---|
XY |
Dimension-ordered XY routing algorithm. |
|
YX |
Dimension-ordered YX routing algorithm. |
|
ID |
Routing algorithm based on router ID tables. |
|
SRC |
Source-based routing algorithm. |
RouteMap
¶
Bases: BaseModel
Route Map class, which can represent the system address map (SAM), or a routing table of a router.
check_no_overlapping_ranges()
¶
Check if there are no overlapping ranges.
pprint()
¶
Pretty print the routing table.
render(aw=None)
¶
Render the SystemVerilog routing table.
render_rdl(rdl_as_mem=False, rdl_memwidth=8)
¶
Render the SystemRDL addrmap internals.
render_rdl_inc()
¶
Render the SystemRDL include header.
rule_type()
¶
Return the type of the rules.
trim()
¶
Optimize the routing table.
RouteMapRule
¶
RouteMapRuleCollective
¶
Bases: RouteMapRule
Routing rule class for collective operations (multicast, reduction, barrier).
RouteRule
¶
RouteTable
¶
Routing
¶
Bases: BaseModel
The class that holds essentially all the routing information needed.
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 |
rob_idx_bits |
int
|
The number of bits to allocate for the |
collective |
CollectiveCfg
|
Collective operation configuration (multicast, barrier, reduction). |
addr_offset_bits = None
class-attribute
instance-attribute
¶
The number of bits to decode the X and Y coordinates from the address. Only used if use_id_table is False and route_algo is XY.
addr_width = None
class-attribute
instance-attribute
¶
The width of the address bus.
collective_sam = None
class-attribute
instance-attribute
¶
The collective system address map. Only used if collective is enabled.
en_collective
property
¶
True when any collective feature is enabled (multicast, barrier, or reduction).
num_endpoints = None
class-attribute
instance-attribute
¶
The number of endpoints in the network.
num_id_bits = None
class-attribute
instance-attribute
¶
The number of bits to represent the ID. Only used if route_algo is ID or SRC.
num_route_bits = None
class-attribute
instance-attribute
¶
The number of bits to represent the route. Only used if route_algo is SRC.
num_x_bits = None
class-attribute
instance-attribute
¶
The number of bits to represent the X coordinate. Only used if route_algo is XY.
num_y_bits = None
class-attribute
instance-attribute
¶
The number of bits to represent the Y coordinate. Only used if route_algo is XY.
port_id_bits = 1
class-attribute
instance-attribute
¶
The number of bits to represent the local port ID.
sam = None
class-attribute
instance-attribute
¶
The system address map.
table = None
class-attribute
instance-attribute
¶
The routing table of the router.
xy_id_offset = None
class-attribute
instance-attribute
¶
A constant offset to add to the X and Y coordinates. Only used if route_algo is XY.
render_hdr_typedef(network_type)
¶
Render the SystemVerilog flit header.
render_param_decl()
¶
Render the SystemVerilog parameter declaration.
render_route_cfg(name)
¶
Render the SystemVerilog routing configuration.
render_typedefs()
¶
Render the SystemVerilog typedefs.
render_vc_impl()
¶
Render WideRwDecouple and VcImpl localparam declarations.
validate_collective_route_algo()
¶
Collective operations are supported with XY routing only.
validate_decouple_rw(v)
classmethod
¶
Accept bool (False→NONE) or string/enum name.
validate_route_algo(v)
classmethod
¶
Validate the routing algorithm.
validate_vc_impl(v)
classmethod
¶
Accept both enum members and string names.
SimpleId
¶
VcImpl
¶
Bases: Enum
Virtual channel implementation enum (mirrors vc_impl_e in floo_pkg).
Only relevant when decouple_rw == WideRwDecouple.VC.
WideReductionCfg
¶
Bases: ReductionCfg
Reduction configuration for the wide link.
get_reduction_cfg()
¶
Return a dict representing reduction_cfg_t for sv_struct_render.