diff --git a/spinn_front_end_common/interface/abstract_spinnaker_base.py b/spinn_front_end_common/interface/abstract_spinnaker_base.py index ea097941c5..390199b165 100644 --- a/spinn_front_end_common/interface/abstract_spinnaker_base.py +++ b/spinn_front_end_common/interface/abstract_spinnaker_base.py @@ -2270,11 +2270,8 @@ def __recover_from_error(self, exception): if not unsuccessful_cores: for executable_type, core_subsets in \ self._data_writer.get_executable_types().items(): - failed_cores = transceiver.get_cpu_infos( + unsuccessful_cores = transceiver.get_cpu_infos( core_subsets, executable_type.end_state, False) - for (x, y, p) in failed_cores: - unsuccessful_cores.add_processor( - x, y, p, failed_cores.get_cpu_info(x, y, p)) # Print the details of error cores logger.error(unsuccessful_cores.get_status_string()) diff --git a/spinn_front_end_common/interface/provenance/provides_provenance_data_from_machine_impl.py b/spinn_front_end_common/interface/provenance/provides_provenance_data_from_machine_impl.py index da285349ad..2ef302c149 100644 --- a/spinn_front_end_common/interface/provenance/provides_provenance_data_from_machine_impl.py +++ b/spinn_front_end_common/interface/provenance/provides_provenance_data_from_machine_impl.py @@ -118,8 +118,8 @@ def _get_provenance_region_address(self, transceiver, placement): :rtype: int """ # Get the App Data for the core - region_table_address = transceiver.get_cpu_information_from_core( - placement.x, placement.y, placement.p).user[0] + region_table_address = transceiver.get_region_base_address( + placement.x, placement.y, placement.p) # Get the provenance region base address prov_region_entry_address = get_region_base_address_offset( diff --git a/spinn_front_end_common/utilities/emergency_recovery.py b/spinn_front_end_common/utilities/emergency_recovery.py index 22b4eb40d1..7b717800af 100644 --- a/spinn_front_end_common/utilities/emergency_recovery.py +++ b/spinn_front_end_common/utilities/emergency_recovery.py @@ -49,11 +49,9 @@ def _emergency_state_check(): for chip in machine.chips: for p in chip.processors: try: - info = txrx.get_cpu_information_from_core( - chip.x, chip.y, p) - if info.state in ( - CPUState.RUN_TIME_EXCEPTION, CPUState.WATCHDOG): - infos.add_processor(chip.x, chip.y, p, info) + txrx.add_cpu_information_from_core( + chip.x, chip.y, p, + [CPUState.RUN_TIME_EXCEPTION, CPUState.WATCHDOG]) except Exception: errors.append((chip.x, chip.y, p)) if len(infos): diff --git a/spinn_front_end_common/utilities/helpful_functions.py b/spinn_front_end_common/utilities/helpful_functions.py index 6f92084e7a..5dff8da70a 100644 --- a/spinn_front_end_common/utilities/helpful_functions.py +++ b/spinn_front_end_common/utilities/helpful_functions.py @@ -84,8 +84,8 @@ def locate_memory_region_for_placement(placement, region): :rtype: int """ transceiver = FecDataView.get_transceiver() - regions_base_address = transceiver.get_cpu_information_from_core( - placement.x, placement.y, placement.p).user[0] + regions_base_address = transceiver.get_region_base_address( + placement.x, placement.y, placement.p) # Get the position of the region in the pointer table element_addr = get_region_base_address_offset(regions_base_address, region) diff --git a/spinn_front_end_common/utility_models/data_speed_up_packet_gatherer_machine_vertex.py b/spinn_front_end_common/utility_models/data_speed_up_packet_gatherer_machine_vertex.py index 84623a8842..1cd3902e41 100644 --- a/spinn_front_end_common/utility_models/data_speed_up_packet_gatherer_machine_vertex.py +++ b/spinn_front_end_common/utility_models/data_speed_up_packet_gatherer_machine_vertex.py @@ -1471,8 +1471,8 @@ def _print_packet_num_being_sent(packet_count, n_packets): def get_provenance_data_from_machine(self, placement): # Get the App Data for the core transceiver = FecDataView.get_transceiver() - region_table_address = transceiver.get_cpu_information_from_core( - placement.x, placement.y, placement.p).user[0] + region_table_address = transceiver.get_region_base_address( + placement.x, placement.y, placement.p) # Get the provenance region base address prov_region_entry_address = get_region_base_address_offset( diff --git a/spinn_front_end_common/utility_models/extra_monitor_support_machine_vertex.py b/spinn_front_end_common/utility_models/extra_monitor_support_machine_vertex.py index 8f7b59601f..25050f2887 100644 --- a/spinn_front_end_common/utility_models/extra_monitor_support_machine_vertex.py +++ b/spinn_front_end_common/utility_models/extra_monitor_support_machine_vertex.py @@ -351,8 +351,8 @@ def __get_provenance_region_address(self, txrx, place): :rtype: int """ if self._prov_region is None: - region_table_addr = txrx.get_cpu_information_from_core( - place.x, place.y, place.p).user[0] + region_table_addr = txrx.get_region_base_address( + place.x, place.y, place.p) region_entry_addr = get_region_base_address_offset( region_table_addr, _DSG_REGIONS.PROVENANCE_AREA) self._prov_region, = _ONE_WORD.unpack(txrx.read_memory( diff --git a/unittests/interface/interface_functions/test_front_end_common_app_finisher.py b/unittests/interface/interface_functions/test_front_end_common_app_finisher.py index 7a1930c38c..cdf93797a0 100644 --- a/unittests/interface/interface_functions/test_front_end_common_app_finisher.py +++ b/unittests/interface/interface_functions/test_front_end_common_app_finisher.py @@ -20,8 +20,8 @@ from spinn_front_end_common.interface.config_setup import unittest_setup from spinn_front_end_common.interface.interface_functions import ( application_finisher) -from spinnman.model.cpu_infos import CPUInfos from spinnman.transceiver.version5transceiver import Version5Transceiver +from spinnman.model import CPUInfo, CPUInfos class _MockTransceiver(Version5Transceiver): @@ -55,9 +55,11 @@ def get_cpu_infos( if (x, y, p) in core_states: if hasattr(states, "__iter__"): if core_states[x, y, p] in states: - cores_in_state.add_processor(x, y, p, None) + cores_in_state.add_info(CPUInfo.mock_info( + x, y, p, p, core_states[x, y, p])) elif core_states[x, y, p] == states: - cores_in_state.add_processor(x, y, p, None) + cores_in_state.add_info(CPUInfo.mock_info( + x, y, p, p, core_states[x, y, p])) self._current_state += 1 return cores_in_state