spinn_front_end_common.utilities package¶
Subpackages¶
- spinn_front_end_common.utilities.connections package
- spinn_front_end_common.utilities.database package
- spinn_front_end_common.utilities.notification_protocol package
- spinn_front_end_common.utilities.report_functions package
- Submodules
- spinn_front_end_common.utilities.report_functions.energy_report module
- spinn_front_end_common.utilities.report_functions.memory_map_on_chip_report module
- spinn_front_end_common.utilities.report_functions.memory_map_on_host_chip_report module
- spinn_front_end_common.utilities.report_functions.memory_map_on_host_report module
- spinn_front_end_common.utilities.report_functions.routing_table_from_machine_report module
- Module contents
- spinn_front_end_common.utilities.scp package
- spinn_front_end_common.utilities.utility_objs package
- Submodules
- spinn_front_end_common.utilities.utility_objs.executable_finder module
- spinn_front_end_common.utilities.utility_objs.executable_start_type module
- spinn_front_end_common.utilities.utility_objs.live_packet_gather_parameters module
- spinn_front_end_common.utilities.utility_objs.provenance_data_item module
- Module contents
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
spinn_front_end_common.utilities.constants.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
[source]¶ Bases:
spinn_front_end_common.utilities.exceptions.SpinnFrontEndException
Raised when an executable has not entered the expected state during start up
-
exception
spinn_front_end_common.utilities.exceptions.
ExecutableFailedToStopException
[source]¶ Bases:
spinn_front_end_common.utilities.exceptions.SpinnFrontEndException
Raised when an executable has not entered the expected state during execution
-
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
spinn_front_end_common.utilities.failed_state module¶
-
class
spinn_front_end_common.utilities.failed_state.
FailedState
[source]¶ Bases:
spinn_front_end_common.utilities.simulator_interface.SimulatorInterface
-
buffer_manager
¶
-
config
¶
-
graph_mapper
¶
-
has_ran
¶
-
increment_none_labelled_vertex_count
¶
-
machine
¶
-
machine_time_step
¶
-
no_machine_time_steps
¶
-
none_labelled_vertex_count
¶
-
placements
¶
-
transceiver
¶
-
use_virtual_board
¶
-
spinn_front_end_common.utilities.function_list module¶
spinn_front_end_common.utilities.globals_variables module¶
spinn_front_end_common.utilities.helpful_functions module¶
-
spinn_front_end_common.utilities.helpful_functions.
convert_string_into_chip_and_core_subset
(cores)[source]¶ Translate a string list of cores into a core subset
Parameters: cores (str or None) – string representing down cores formatted as x,y,p[:x,y,p]*
-
spinn_front_end_common.utilities.helpful_functions.
convert_time_diff_to_total_milliseconds
(sample)[source]¶ converts between a time diff and total milliseconds
Returns: total milliseconds
-
spinn_front_end_common.utilities.helpful_functions.
generate_unique_folder_name
(folder, filename, extension)[source]¶ Generate a unique file name with a given extension in a given folder
Parameters: - folder – where to put this unique file
- filename – the name of the first part of the file without extension
- extension – extension of the file
Returns: file path with a unique addition
-
spinn_front_end_common.utilities.helpful_functions.
get_ethernet_chip
(machine, board_address)[source]¶ locate the chip with the given board IP address
Parameters: - machine – the spinnaker machine
- board_address – the board address to locate the chip of.
Returns: The chip that supports that board address
Raises: ConfigurationException – when that board address has no chip associated with it
-
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) – 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, 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
- 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, 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
- 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.
sort_out_downed_chips_cores_links
(downed_chips, downed_cores, downed_links)[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 formatted as x,y,p[:x,y,p]*
- downed_chips (str or None) – string representing down chips formatted as x,y[:x,y]*
- downed_links – string representing down links formatted as x,y,link[:x,y,link]*
Returns: a tuple of ( set of (x, y) of down chips, set of (x, y, p) of down cores, set of ((x, y), link id) of down links)
Return type: ({(int, int,), }, {(int, int, int), }, {((int, int), int), })
-
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.math_constants module¶
random math constants
spinn_front_end_common.utilities.simulator_interface module¶
-
class
spinn_front_end_common.utilities.simulator_interface.
SimulatorInterface
[source]¶ Bases:
object
-
buffer_manager
¶
-
config
¶
-
graph_mapper
¶
-
has_ran
¶
-
increment_none_labelled_vertex_count
¶
-
machine
¶
-
machine_time_step
¶
-
no_machine_time_steps
¶
-
none_labelled_vertex_count
¶
-
placements
¶
-
run
¶
-
transceiver
¶
-
use_virtual_board
¶
-
Module contents¶
-
class
spinn_front_end_common.utilities.
FailedState
[source]¶ Bases:
spinn_front_end_common.utilities.simulator_interface.SimulatorInterface
-
buffer_manager
¶
-
config
¶
-
graph_mapper
¶
-
has_ran
¶
-
increment_none_labelled_vertex_count
¶
-
machine
¶
-
machine_time_step
¶
-
no_machine_time_steps
¶
-
none_labelled_vertex_count
¶
-
placements
¶
-
transceiver
¶
-
use_virtual_board
¶
-