Skip to content

Commit

Permalink
replace FixedRoueEntry with Shared RoutingEntry class
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian-B committed Mar 27, 2024
1 parent c54b76b commit ae1ced8
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions pacman/operations/fixed_route_router/fixed_route_router.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,22 @@

from typing import Dict, List, Tuple, Type
from spinn_utilities.progress_bar import ProgressBar
from spinn_machine import Chip, FixedRouteEntry
from spinn_machine import Chip, RoutingEntry
from pacman.data import PacmanDataView
from pacman.exceptions import (
PacmanAlreadyExistsException, PacmanConfigurationException,
PacmanRoutingException)


def fixed_route_router(
destination_class: Type) -> Dict[Tuple[int, int], FixedRouteEntry]:
destination_class: Type) -> Dict[Tuple[int, int], RoutingEntry]:
"""
Runs the fixed route generator for all boards on machine.
:param destination_class: the destination class to route packets to
:type destination_class: type
:return: router tables for fixed route paths
:rtype: dict((int, int)), ~spinn_machine.FixedRouteEntry)
:rtype: dict((int, int)), ~spinn_machine.RoutingEntry)
:raises PacmanConfigurationException: if no placement processor found
:raises PacmanRoutingException:
:raises PacmanAlreadyExistsException:
Expand All @@ -56,15 +56,15 @@ def __init__(self, destination_class: Type):
"""
self._machine = PacmanDataView.get_machine()
self._destination_class = destination_class
self._fixed_route_tables: Dict[Tuple[int, int], FixedRouteEntry] = \
self._fixed_route_tables: Dict[Tuple[int, int], RoutingEntry] = \
dict()

def build_fixed_routes(self) -> Dict[Tuple[int, int], FixedRouteEntry]:
def build_fixed_routes(self) -> Dict[Tuple[int, int], RoutingEntry]:
"""
Runs the fixed route generator for all boards on machine.
:return: router tables for fixed route paths
:rtype: dict((int, int), ~spinn_machine.FixedRouteEntry)
:rtype: dict((int, int), ~spinn_machine.RoutingEntry)
:raises PacmanConfigurationException: if no placement processor found
:raises PacmanRoutingException:
:raises PacmanAlreadyExistsException:
Expand Down Expand Up @@ -136,7 +136,7 @@ def __add_fixed_route_entry(self, key: Tuple[int, int],
if key in self._fixed_route_tables:
raise PacmanAlreadyExistsException(
"fixed route entry", str(key))
self._fixed_route_tables[key] = FixedRouteEntry(
self._fixed_route_tables[key] = RoutingEntry(
link_ids=link_ids, processor_ids=processor_ids)

def __locate_destination(self, chip: Chip) -> int:
Expand Down

0 comments on commit ae1ced8

Please sign in to comment.