pacman.model.routing_tables package¶
Submodules¶
pacman.model.routing_tables.multicast_routing_table module¶
-
class
pacman.model.routing_tables.multicast_routing_table.
MulticastRoutingTable
(x, y, multicast_routing_entries=None)[source]¶ Bases:
object
Represents a 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 of
spinn_machine.MulticastRoutingEntry
) – An iterable of routing entries to add to the table
Raises: 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
Parameters: multicast_routing_entry ( spinn_machine.MulticastRoutingEntry
) – The route to addReturn type: None Raises: pacman.exceptions.PacmanAlreadyExistsException – If a routing entry with the same key-mask combination already exists
-
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
Returns: the routing entry associated with the routing key_combo or None if no such entry exists
Return type:
-
multicast_routing_entries
¶ The multicast routing entries in the table
Returns: an iterable of multicast routing entries Return type: iterable of spinn_machine.MulticastRoutingEntry
Raises: 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
-
x
¶ The x-coordinate of the chip of this table
Returns: The x-coordinate Return type: int
-
y
¶ The y-coordinate of the chip of this table
Returns: The y-coordinate Return type: int
pacman.model.routing_tables.multicast_routing_tables module¶
-
class
pacman.model.routing_tables.multicast_routing_tables.
MulticastRoutingTables
(routing_tables=None)[source]¶ Bases:
object
Represents the multicast routing tables for a number of chips
Parameters: routing_tables (iterable of pacman.model.routing_tables.MulticastRoutingTable
) – The routing tables to addRaises: pacman.exceptions.PacmanAlreadyExistsException – If any two routing tables are for the same chip -
add_routing_table
(routing_table)[source]¶ Add a routing table
Parameters: routing_table ( pacman.model.routing_tables.MulticastRoutingTable
) – a routing table to addReturn type: None Raises: pacman.exceptions.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
Returns: The routing table, or None if no such table exists
Return type: Raises: None – No known exceptions are raised
-
routing_tables
¶ The routing tables stored within
Returns: an iterable of routing tables Return type: iterable of pacman.model.routing_tables.MulticastRoutingTable
Raises: None – does not raise any known exceptions
-
Module contents¶
-
class
pacman.model.routing_tables.
MulticastRoutingTable
(x, y, multicast_routing_entries=None)[source]¶ Bases:
object
Represents a 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 of
spinn_machine.MulticastRoutingEntry
) – An iterable of routing entries to add to the table
Raises: 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
Parameters: multicast_routing_entry ( spinn_machine.MulticastRoutingEntry
) – The route to addReturn type: None Raises: pacman.exceptions.PacmanAlreadyExistsException – If a routing entry with the same key-mask combination already exists
-
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
Returns: the routing entry associated with the routing key_combo or None if no such entry exists
Return type:
-
multicast_routing_entries
¶ The multicast routing entries in the table
Returns: an iterable of multicast routing entries Return type: iterable of spinn_machine.MulticastRoutingEntry
Raises: 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
-
x
¶ The x-coordinate of the chip of this table
Returns: The x-coordinate Return type: int
-
y
¶ The y-coordinate of the chip of this table
Returns: The y-coordinate Return type: 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 of pacman.model.routing_tables.MulticastRoutingTable
) – The routing tables to addRaises: pacman.exceptions.PacmanAlreadyExistsException – If any two routing tables are for the same chip -
add_routing_table
(routing_table)[source]¶ Add a routing table
Parameters: routing_table ( pacman.model.routing_tables.MulticastRoutingTable
) – a routing table to addReturn type: None Raises: pacman.exceptions.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
Returns: The routing table, or None if no such table exists
Return type: Raises: None – No known exceptions are raised
-
routing_tables
¶ The routing tables stored within
Returns: an iterable of routing tables Return type: iterable of pacman.model.routing_tables.MulticastRoutingTable
Raises: None – does not raise any known exceptions
-