Routing Reference¶
AddrRange
¶
CollectiveCfg
¶
Bases: BaseModel
User-facing collective operation configuration.
The five high-level knobs map to collective_cfg_t in floo_pkg:
+-----------------------+--------------------------------------------+ | YAML field | floo_pkg bits set | +=======================+============================================+ | en_narrow_multicast | OpCfg.EnNarrowMulticast | | en_wide_multicast | OpCfg.EnWideMulticast | | en_barrier | OpCfg.EnLsbAnd | | en_narrow_reduction | OpCfg.EnA_{Add,Mul,MinS,MinU,MaxS,MaxU} | | en_wide_reduction | OpCfg.EnF_{Add,Mul,Min,Max} | +-----------------------+--------------------------------------------+
For en_narrow_reduction / en_wide_reduction:
- false / omitted → disabled (default)
- true → all ops enabled, default hw config
- [Add, Mul, ...] → only the listed ops, default hw config
- {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.
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
|
The routing algorithm to use. See RouteAlgo enum for the options. |
use_id_table |
bool
|
Whether to use a table to decode the destination ID. |
sam |
RouteMap
|
The system address map. |
table |
RouteMap
|
The routing table of the router. |
addr_offset_bits |
int
|
The number of bits to decode the X and Y coordinates from the address. Only used if |
xy_id_offset |
Union[SimpleId, Coord]
|
A constant offset to add to the X and Y coordinates. Only used if |
num_endpoints |
int
|
The number of endpoints in the network. |
num_id_bits |
int
|
The number of bits to represent the ID. Only used if |
num_x_bits |
int
|
The number of bits to represent the X coordinate. Only used if |
num_y_bits |
int
|
The number of bits to represent the Y coordinate. Only used if |
num_route_bits |
int
|
The number of bits to represent the route. Only used if |
addr_width |
int
|
The width of the address bus. |
rob_idx_bits |
int
|
The number of bits to represent the reorder buffer index. |
port_id_bits |
int
|
The number of bits to represent the local port ID. |
collective |
CollectiveCfg
|
Collective operation configuration (multicast, barrier, reduction). |
collective_sam |
RouteMap
|
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).
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.