Skip to content

Routing Reference

AddrRange

Bases: BaseModel

Address range class.

set_arr(arr_idx, arr_dim)

Update the address range with the given index.

validate_input()

Validate the address range.

validate_output()

Validate the address range.

Coord

Bases: BaseModel

2D coordinate class.

from_dict(coord_dict) staticmethod

Create a Coord object from a dictionary.

get_dir(node, neighbor) staticmethod

Get the direction from node to neighbor.

render(as_index=False)

Render the SystemVerilog coordinate.

RouteAlgo

Bases: Enum

Routing algorithm enum.

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

Bases: BaseModel

Routing rule class.

get_rdl(instance_name, rdl_as_mem=False, rdl_memwidth=8)

Render the SystemRDL routing rule.

render(aw=None)

Render the SystemVerilog routing rule.

render_desc()

Render the description of the routing rule.

RouteMapRuleMcast

Bases: RouteMapRule

Routing rule class for multicast information.

get_rdl(instance_name, rdl_as_mem=False, rdl_memwidth=8)

Render the SystemRDL routing rule.

render(aw=None)

Render the SystemVerilog routing rule.

render_desc()

Render the description of the routing rule.

RouteRule

Bases: BaseModel

Routing rule class.

render(num_route_bits)

Render the SystemVerilog route.

RouteTable

Bases: BaseModel

Route Table class, which can hold the route entries to each destination

render(num_route_bits, no_decl=False)

Render the SystemVerilog route table.

sort_and_pad()

Sort by destination and fill in missing entries.

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 use_id_table is False and route_algo is XY.

xy_id_offset Union[SimpleId, Coord]

A constant offset to add to the X and Y coordinates. Only used if route_algo is XY.

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 route_algo is ID or SRC.

num_x_bits int

The number of bits to represent the X coordinate. Only used if route_algo is XY.

num_y_bits int

The number of bits to represent the Y coordinate. Only used if route_algo is XY.

num_route_bits int

The number of bits to represent the route. Only used if route_algo is SRC.

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.

en_multicast bool

Whether to enable multicast support. Only supported with XY routing.

multicast_sam RouteMap

The multicast system address map. Only used if en_multicast is True.

en_parallel_reduction bool

Whether to enable parallel reduction support (Experimental)

en_narrow_offload_reduction bool

Whether to enable narrow offload reduction support (Experimental)

en_wide_offload_reduction bool

Whether to enable wide offload reduction support

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.

validate_collective()

Reduction can be supported with multicast only.

validate_multicast_route_algo()

Multicast is supported with XY routing only

validate_route_algo(v) classmethod

Validate the routing algorithm.

SimpleId

Bases: BaseModel

ID class.

__add__(other)

Add the ID.

__lt__(other)

Less than comparison.

__sub__(other)

Subtract the ID.

render(as_index=False)

Render the SystemVerilog ID.

validate_id(v) classmethod

Validate the ID.

XYDirections

Bases: Enum

XY directions enum.

reverse(direction) classmethod

Reverse the direction.

to_coords(direction) classmethod

Convert the direction to coordinates.