spinn_front_end_common.utilities package

Subpackages

Submodules

spinn_front_end_common.utilities.constants module

class spinn_front_end_common.utilities.constants.BUFFERING_OPERATIONS

Bases: enum.Enum

BUFFER_READ = 0
BUFFER_WRITE = 1
class spinn_front_end_common.utilities.constants.SDP_PORTS

Bases: enum.Enum

INPUT_BUFFERING_SDP_PORT = 1
OUTPUT_BUFFERING_SDP_PORT = 2
RUNNING_COMMAND_SDP_PORT = 3
spinn_front_end_common.utilities.constants.SDP_RUNNING_MESSAGE_CODES

alias of SDP_RUNNING_MESSAGE_ID_CODES

spinn_front_end_common.utilities.exceptions module

exception spinn_front_end_common.utilities.exceptions.BufferableRegionTooSmall[source]

Bases: spinn_front_end_common.utilities.exceptions.SpinnFrontEndException

Raised when the SDRAM space of the region for buffered packets is too small to contain any packet at all

exception spinn_front_end_common.utilities.exceptions.BufferedRegionNotPresent[source]

Bases: spinn_front_end_common.utilities.exceptions.SpinnFrontEndException

Raised when trying to issue buffered packets for a region not managed

exception spinn_front_end_common.utilities.exceptions.ConfigurationException[source]

Bases: spinn_front_end_common.utilities.exceptions.SpinnFrontEndException

Raised when the front end determines a input param is invalid

exception spinn_front_end_common.utilities.exceptions.ExecutableFailedToStartException(output_string, failed_core_subsets)[source]

Bases: spinn_front_end_common.utilities.exceptions.SpinnFrontEndException

Raised when an executable has not entered the expected state during start up

failed_core_subsets

The subset of cores in the incorrect state

exception spinn_front_end_common.utilities.exceptions.ExecutableFailedToStopException(output_string, failed_core_subsets, is_rte)[source]

Bases: spinn_front_end_common.utilities.exceptions.SpinnFrontEndException

Raised when an executable has not entered the expected state during execution

failed_core_subsets

The failed cores

is_rte

True if the failure was an RTE

exception spinn_front_end_common.utilities.exceptions.ExecutableNotFoundException[source]

Bases: spinn_front_end_common.utilities.exceptions.SpinnFrontEndException

Raised when a specified executable could not be found

exception spinn_front_end_common.utilities.exceptions.RallocException[source]

Bases: spinn_front_end_common.utilities.exceptions.SpinnFrontEndException

Raised when there are not enough routing table entries

exception spinn_front_end_common.utilities.exceptions.SpinnFrontEndException[source]

Bases: exceptions.Exception

Raised when the front end detects an error

spinn_front_end_common.utilities.helpful_functions module

spinn_front_end_common.utilities.helpful_functions.convert_string_info_chip_and_core_subsets(downed_chips, downed_cores)[source]

Translate the down cores and down chips string into a form that spinnman can understand

Parameters:
  • downed_cores (str or None) – string representing down cores
  • downed_chips (str or None) – string representing down chips
Returns:

a list of down cores and down chips in processor and core subset format

spinn_front_end_common.utilities.helpful_functions.get_core_status_string(core_infos)[source]

Get a string indicating the status of the given cores

spinn_front_end_common.utilities.helpful_functions.get_core_subsets(core_infos)[source]

Convert core information from get_cores_in_state to core_subset objects

spinn_front_end_common.utilities.helpful_functions.get_cores_in_state(all_core_subsets, states, txrx)[source]
Parameters:
  • all_core_subsets
  • states
  • txrx
spinn_front_end_common.utilities.helpful_functions.get_cores_not_in_state(all_core_subsets, states, txrx)[source]
Parameters:
  • all_core_subsets
  • states
  • txrx
spinn_front_end_common.utilities.helpful_functions.get_executables_by_run_type(executable_targets, placements, graph_mapper, type_to_find)[source]

Get executables by the type of the vertices

spinn_front_end_common.utilities.helpful_functions.get_front_end_common_pacman_xml_paths()[source]

Get the XML path for the front end common interface functions

spinn_front_end_common.utilities.helpful_functions.get_valid_components(module, terminator)[source]

Get possible components

Parameters:
  • module
  • terminator
Return type:

dict

spinn_front_end_common.utilities.helpful_functions.locate_memory_region_for_placement(placement, region, transceiver)[source]

Get the address of a region for a placement

Parameters:
  • region (int) – the region to locate the base address of
  • placement (pacman.model.placements.placement.Placement) – the placement object to get the region address of
  • transceiver (spiNNMan.transciever.Transciever) – the python interface to the spinnaker machine
spinn_front_end_common.utilities.helpful_functions.read_config(config, section, item)[source]

Get the string value of a config item, returning None if the value is “None”

spinn_front_end_common.utilities.helpful_functions.read_config_boolean(config, section, item)[source]

Get the boolean value of a config item, returning None if the value is “None”

spinn_front_end_common.utilities.helpful_functions.read_config_int(config, section, item)[source]

Get the integer value of a config item, returning None if the value is “None”

spinn_front_end_common.utilities.helpful_functions.read_data(x, y, address, length, data_format, transceiver)[source]

Reads and converts a single data item from memory

Parameters:
  • x – chip x
  • y – chip y
  • address – base address of the SDRAM chip to read
  • length – length to read
  • data_format – the format to read memory
  • transceiver – the SpinnMan interface
spinn_front_end_common.utilities.helpful_functions.set_up_output_application_data_specifics(where_to_write_application_data_files, max_application_binaries_kept, app_id, n_calls_to_run, this_run_time_string)[source]
Parameters:
  • where_to_write_application_data_files – the location where all app data is by default written to
  • max_application_binaries_kept – The max number of report folders to keep active at any one time
  • app_id – the id used for identifying the simulation on the SpiNNaker machine
  • n_calls_to_run – the counter of how many times run has been called.
  • this_run_time_string – the time stamp string for this run
Returns:

the run folder for this simulation to hold app data

spinn_front_end_common.utilities.helpful_functions.set_up_report_specifics(default_report_file_path, max_reports_kept, app_id, n_calls_to_run, this_run_time_string=None)[source]
Parameters:
  • default_report_file_path – The location where all reports reside
  • max_reports_kept – The max number of report folders to keep active at any one time
  • app_id – the id used for identifying the simulation on the SpiNNaker machine
  • n_calls_to_run – the counter of how many times run has been called.
  • this_run_time_string – holder for the timestamp for future runs
Returns:

The folder for this run, the time_stamp

spinn_front_end_common.utilities.helpful_functions.translate_iobuf_extraction_elements(hard_coded_cores, hard_coded_model_binary, executable_targets, executable_finder)[source]
Parameters:
  • hard_coded_cores – list of cores to read iobuf from
  • hard_coded_model_binary – list of binary names to read iobuf from
  • executable_targets – the targets of cores and executable binaries
  • executable_finder – where to find binaries paths from binary names
Returns:

core subsets for the cores to read iobuf from

spinn_front_end_common.utilities.helpful_functions.wait_for_cores_to_be_ready(executable_targets, app_id, txrx, sync_state)[source]
Parameters:
  • executable_targets – the mapping between cores and binaries
  • app_id – the app id that being used by the simulation
  • txrx – the python interface to the spinnaker machine
  • sync_state – The expected state once the applications are ready
Return type:

None

spinn_front_end_common.utilities.helpful_functions.write_finished_file(app_data_runtime_folder, report_default_directory)[source]

spinn_front_end_common.utilities.math_constants module

random math constants

Module contents