# pacman.model.routing_tables package¶

## Module contents¶

class pacman.model.routing_tables.AbstractMulticastRoutingTable[source]

Bases: object

multicast_routing_entries

The multicast routing entries in the table

Returns: an iterable of multicast routing entries iterable(spinn_machine.MulticastRoutingEntry) None – does not raise any known exceptions
number_of_defaultable_entries

The number of multi-cast routing entries that are set to be defaultable within this multicast routing table

Returns: int
number_of_entries

The number of multi-cast routing entries there are in the multicast routing table

Returns: int
x

The x-coordinate of the chip of this table

Returns: The x-coordinate int
y

The y-coordinate of the chip of this table

Returns: The y-coordinate int
class pacman.model.routing_tables.CompressedMulticastRoutingTable(x, y, multicast_routing_entries=None)[source]

Bases: pacman.model.routing_tables.abstract_multicast_routing_table.AbstractMulticastRoutingTable

Represents a compressed routing table for a chip.

Parameters: x (int) – The x-coordinate of the chip for which this is the routing table y (int) – The y-coordinate of the chip for which this is the routing tables multicast_routing_entries (iterable(MulticastRoutingEntry)) – The routing entries to add to the table pacman.exceptions.PacmanAlreadyExistsException – If any two routing entries contain the same key-mask combination
add_multicast_routing_entry(multicast_routing_entry)[source]

Adds a routing entry to this table

multicast_routing_entries

The multicast routing entries in the table

Returns: an iterable of multicast routing entries iterable(spinn_machine.MulticastRoutingEntry) None – does not raise any known exceptions
number_of_defaultable_entries

The number of multi-cast routing entries that are set to be defaultable within this multicast routing table

Returns: int
number_of_entries

The number of multi-cast routing entries there are in the multicast routing table

Returns: int
x

The x-coordinate of the chip of this table

Returns: The x-coordinate int
y

The y-coordinate of the chip of this table

Returns: The y-coordinate int
class pacman.model.routing_tables.MulticastRoutingTables(routing_tables=None)[source]

Bases: object

Represents the multicast routing tables for a number of chips.

Parameters: routing_tables (iterable(MulticastRoutingTable)) – The routing tables to add PacmanAlreadyExistsException – If any two routing tables are for the same chip
add_routing_table(routing_table)[source]

Parameters: routing_table (MulticastRoutingTable) – a routing table to add None PacmanAlreadyExistsException – If a routing table already exists for the chip
get_routing_table_for_chip(x, y)[source]

Get a routing table for a particular chip

Parameters: x (int) – The x-coordinate of the chip y (int) – The y-coordinate of the chip The routing table, or None if no such table exists MulticastRoutingTable or None None – No known exceptions are raised
routing_tables

The routing tables stored within

Returns: an iterable of routing tables iterable(MulticastRoutingTable) None – does not raise any known exceptions
class pacman.model.routing_tables.UnCompressedMulticastRoutingTable(x, y, multicast_routing_entries=None)[source]

Bases: pacman.model.routing_tables.abstract_multicast_routing_table.AbstractMulticastRoutingTable

Represents a uncompressed routing table for a chip.

Parameters: x (int) – The x-coordinate of the chip for which this is the routing table y (int) – The y-coordinate of the chip for which this is the routing tables multicast_routing_entries (iterable(MulticastRoutingEntry)) – The routing entries to add to the table PacmanAlreadyExistsException – If any two routing entries contain the same key-mask combination
add_multicast_routing_entry(multicast_routing_entry)[source]

Adds a routing entry to this table

get_entry_by_routing_entry_key(routing_entry_key)[source]

Get the routing entry associated with the specified key or None if the routing table does not match the key

Parameters: routing_entry_key (int) – the routing key to be searched the routing entry associated with the routing key_combo or None if no such entry exists MulticastRoutingEntry or None
get_multicast_routing_entry_by_routing_entry_key(routing_entry_key, mask)[source]

Get the routing entry associated with the specified key_combo-mask combination or None if the routing table does not match the key_combo

Parameters: routing_entry_key (int) – the routing key to be searched mask (int) – the routing mask to be searched the routing entry associated with the routing key_combo or None if no such entry exists
multicast_routing_entries

The multicast routing entries in the table

Returns: an iterable of multicast routing entries None – does not raise any known exceptions The multicast routing entries in the table None – does not raise any known exceptions iterable(MulticastRoutingEntry)
number_of_defaultable_entries

The number of multi-cast routing entries that are set to be defaultable within this multicast routing table

Returns: int The number of multicast routing entries that are set to be defaultable within this multicast routing table int
number_of_entries

The number of multi-cast routing entries there are in the multicast routing table

Returns: int The number of multicast routing entries there are in the multicast routing table int
x

The x-coordinate of the chip of this table

Returns: The x-coordinate int The x-coordinate of the chip of this table int
y

The y-coordinate of the chip of this table

Returns: The y-coordinate int The y-coordinate of the chip of this table int