diff --git a/gfe_examples/sync_test/sync_test_vertex.py b/gfe_examples/sync_test/sync_test_vertex.py index 4025bc6e..e7d41603 100644 --- a/gfe_examples/sync_test/sync_test_vertex.py +++ b/gfe_examples/sync_test/sync_test_vertex.py @@ -14,27 +14,22 @@ from enum import IntEnum import logging - from spinn_utilities.log import FormatAdapter from spinn_utilities.overrides import overrides - from spinnman.model.enums import ExecutableType - -from pacman.model.graphs.application.abstract import ( - AbstractOneAppOneMachineVertex) from pacman.model.graphs.machine import MachineVertex from pacman.model.placements import Placement from pacman.model.resources import ConstantSDRAM - from spinn_front_end_common.data import FecDataView from spinn_front_end_common.interface.ds import DataSpecificationGenerator from spinn_front_end_common.utilities.constants import ( SYSTEM_BYTES_REQUIREMENT, BYTES_PER_WORD) from spinn_front_end_common.abstract_models import ( AbstractGeneratesDataSpecification, AbstractHasAssociatedBinary) - from spinnaker_graph_front_end.utilities.data_utils import ( - generate_system_data_region, SimulatorVertex) + generate_system_data_region) +from pacman.model.graphs.application.abstract import ( + AbstractOneAppOneMachineVertex) logger = FormatAdapter(logging.getLogger(__name__)) @@ -54,7 +49,7 @@ def __init__(self, lead, label=None): label, n_atoms=1) -class SyncTestMachineVertex(SimulatorVertex, +class SyncTestMachineVertex(MachineVertex, AbstractHasAssociatedBinary, AbstractGeneratesDataSpecification): def __init__(self, lead, app_vertex, label=None): super().__init__(label, app_vertex) @@ -89,7 +84,7 @@ def generate_data_specification( routing_info = FecDataView.get_routing_infos() key = routing_info.get_first_key_from_pre_vertex( self, SEND_PARTITION) - assert (key is not None) + assert key is not None spec.write_value(key) # End-of-Spec: diff --git a/spinnaker_graph_front_end/utilities/data_utils.py b/spinnaker_graph_front_end/utilities/data_utils.py index e6b73f30..aa4c7945 100644 --- a/spinnaker_graph_front_end/utilities/data_utils.py +++ b/spinnaker_graph_front_end/utilities/data_utils.py @@ -13,6 +13,8 @@ # limitations under the License. from typing import TYPE_CHECKING +from spinn_front_end_common.abstract_models import ( + AbstractHasAssociatedBinary) from spinn_front_end_common.utilities.constants import SIMULATION_N_BYTES from spinn_front_end_common.interface.ds import DataSpecificationGenerator from spinn_front_end_common.interface.simulation.simulation_utilities import ( @@ -23,7 +25,7 @@ def generate_system_data_region( spec: DataSpecificationGenerator, region_id: int, - machine_vertex: 'SimulatorVertex'): + machine_vertex: AbstractHasAssociatedBinary): """ Generate a system data region for time-based simulations.