Navigation

  • index
  • modules |
  • next |
  • previous |
  • Rig 2.4.1 documentation »
  • rig.place_and_route: Place applications, allocate on-chip resources, create routing tables »

rig.links.Links: Chip-to-chip link data structure¶

class rig.links.Links[source]¶

Enumeration of links from a SpiNNaker chip.

Note that the numbers chosen have two useful properties:

  • The integer values assigned are chosen to match the numbers used to identify the links in the low-level software API and hardware registers.
  • The links are ordered consecutively in anticlockwise order meaning the opposite link is (link+3)%6.

Note

In early versions of Rig this object was called rig.machine.Links.

Attributes:
east = 0
north_east = 1
north = 2
west = 3
south_west = 4
south = 5
classmethod from_vector(vector)[source]¶

Given a vector from one node to a neighbour, get the link direction.

Note that any vector whose magnitude in any given dimension is greater than 1 will be assumed to use a machine’s wrap-around links.

Note that this method assumes a system larger than 2x2. If a 2x2, 2xN or Nx2 (for N > 2) system is provided the link selected will arbitrarily favour either wrap-around or non-wrap-around links. This function is not meaningful for 1x1 systems.

Parameters:
vector : (x, y)

The vector from one node to its logical neighbour.

Returns:
:py:class:`~rig.links.Links`

The link direction to travel in the direction indicated by the vector.

to_vector()[source]¶

Given a link direction, return the equivalent vector.

opposite¶

Get the opposite link to the one given.

__eq__ = <method-wrapper '__eq__' of type object at 0x904b40>¶
__ge__ = <method-wrapper '__ge__' of type object at 0x904b40>¶
__gt__ = <method-wrapper '__gt__' of type object at 0x904b40>¶
__hash__() <==> hash(x)¶
__le__ = <method-wrapper '__le__' of type object at 0x904b40>¶
__lt__ = <method-wrapper '__lt__' of type object at 0x904b40>¶
__ne__ = <method-wrapper '__ne__' of type object at 0x904b40>¶

Previous topic

Machine etc.: Machine resource availability P&R data structure

Next topic

rig.netlist.Net: Net data structure

This Page

  • Show Source

Quick search

Navigation

  • index
  • modules |
  • next |
  • previous |
  • Rig 2.4.1 documentation »
  • rig.place_and_route: Place applications, allocate on-chip resources, create routing tables »
© Copyright 2015, the Rig Project. Created using Sphinx 1.6.5.