pacman.operations.router_algorithms package

Submodules

pacman.operations.router_algorithms.basic_dijkstra_routing module

class pacman.operations.router_algorithms.basic_dijkstra_routing.BasicDijkstraRouting[source]

Bases: object

An routing algorithm that can find routes for edges between vertices in a machine graph that have been placed on a machine by the use of a Dijkstra shortest path algorithm.

BW_PER_ROUTE_ENTRY = 0.01
MAX_BW = 250

pacman.operations.router_algorithms.ner_route module

Neighbour Exploring Routing (NER) algorithm from J. Navaridas et al.

Algorithm refrence: J. Navaridas et al. SpiNNaker: Enhanced multicast routing, Parallel Computing (2014).

http://dx.doi.org/10.1016/j.parco.2015.01.002

Based on https://github.com/project-rig/rig/blob/master/rig/place_and_route/route/ner.py https://github.com/project-rig/rig/blob/master/rig/geometry.py https://github.com/project-rig/rig/blob/master/rig/place_and_route/route/utils.py

class pacman.operations.router_algorithms.ner_route.NerRoute[source]

Bases: object

Performs routing using rig algorithm

pacman.operations.router_algorithms.routing_tree module

An explicit representation of a routing tree in a machine.

This representation of a route explicitly describes a tree-structure and the complete path taken by a route. This is used during place and route in preference to a set of RoutingTableEntry tuples since it is more easily verified and more accurately represents the problem at hand.

Based on https://github.com/project-rig/rig/blob/master/rig/place_and_route/routing_tree.py

class pacman.operations.router_algorithms.routing_tree.RoutingTree(chip)[source]

Bases: object

Explicitly defines a multicast route through a SpiNNaker machine.

Each instance represents a single hop in a route and recursively refers to following steps.

Parameters:chip (tuple(int,int)) – The chip the route is currently passing through.
append_child(child)[source]
children

A iterable of the next steps in the route represented by a (route, object) tuple.

Note

Up until Rig 1.5.1, this structure used sets to store children. This was changed to lists since sets incur a large memory overhead and in practice the set-like behaviour of the list of children is not useful.

The object indicates the intended destination of this step in the route. It may be one of:

  • RoutingTree representing the continuation of the routing tree after following a given link.
  • A vertex (i.e. some other Python object) when the route terminates at the supplied vertex. Note that the direction may be None and so additional logic may be required to determine what core to target to reach the vertex.
Return type:iterable
chip

The chip the route is currently passing through.

Return type:tuple(int,int)
remove_child(child)[source]
traverse()[source]

Traverse the tree yielding the direction taken to a node, the coordinates of that node and the directions leading from the Node.

Returns:(direction, (x, y), set(route)) Direction taken to reach a Node in the tree, the (x, y) coordinate of that Node and routes leading to children of the Node.

Module contents

class pacman.operations.router_algorithms.BasicDijkstraRouting[source]

Bases: object

An routing algorithm that can find routes for edges between vertices in a machine graph that have been placed on a machine by the use of a Dijkstra shortest path algorithm.

BW_PER_ROUTE_ENTRY = 0.01
MAX_BW = 250
class pacman.operations.router_algorithms.NerRoute[source]

Bases: object

Performs routing using rig algorithm