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.board_chip_report module
- spinn_front_end_common.utilities.report_functions.energy_report module
- spinn_front_end_common.utilities.report_functions.fixed_route_from_machine_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
- Subpackages
- spinn_front_end_common.utilities.utility_objs.extra_monitor_scp_messages package
- Submodules
- spinn_front_end_common.utilities.utility_objs.extra_monitor_scp_messages.clear_reinjection_queue_message module
- spinn_front_end_common.utilities.utility_objs.extra_monitor_scp_messages.get_reinjection_status_message module
- spinn_front_end_common.utilities.utility_objs.extra_monitor_scp_messages.load_application_mc_routes_message module
- spinn_front_end_common.utilities.utility_objs.extra_monitor_scp_messages.load_system_mc_routes_message module
- spinn_front_end_common.utilities.utility_objs.extra_monitor_scp_messages.reinjector_scp_commands module
- spinn_front_end_common.utilities.utility_objs.extra_monitor_scp_messages.reset_counters_message module
- spinn_front_end_common.utilities.utility_objs.extra_monitor_scp_messages.set_reinjection_packet_types_message module
- spinn_front_end_common.utilities.utility_objs.extra_monitor_scp_messages.set_router_emergency_timeout_message module
- spinn_front_end_common.utilities.utility_objs.extra_monitor_scp_messages.set_router_timeout_message module
- spinn_front_end_common.utilities.utility_objs.extra_monitor_scp_messages.speedup_in_scp_commands module
- Module contents
- spinn_front_end_common.utilities.utility_objs.extra_monitor_scp_processes package
- Submodules
- spinn_front_end_common.utilities.utility_objs.extra_monitor_scp_processes.clear_queue_process module
- spinn_front_end_common.utilities.utility_objs.extra_monitor_scp_processes.load_application_mc_routes_process module
- spinn_front_end_common.utilities.utility_objs.extra_monitor_scp_processes.load_system_mc_routes_process module
- spinn_front_end_common.utilities.utility_objs.extra_monitor_scp_processes.read_status_process module
- spinn_front_end_common.utilities.utility_objs.extra_monitor_scp_processes.reset_counters_process module
- spinn_front_end_common.utilities.utility_objs.extra_monitor_scp_processes.set_packet_types_process module
- spinn_front_end_common.utilities.utility_objs.extra_monitor_scp_processes.set_router_emergency_timeout_process module
- spinn_front_end_common.utilities.utility_objs.extra_monitor_scp_processes.set_router_timeout_process module
- Module contents
- spinn_front_end_common.utilities.utility_objs.extra_monitor_scp_messages package
- Submodules
- spinn_front_end_common.utilities.utility_objs.data_written module
- spinn_front_end_common.utilities.utility_objs.dpri_flags module
- spinn_front_end_common.utilities.utility_objs.executable_finder module
- spinn_front_end_common.utilities.utility_objs.executable_targets module
- spinn_front_end_common.utilities.utility_objs.executable_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
- spinn_front_end_common.utilities.utility_objs.reinjection_status module
- Module contents
- 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
-
EXTRA_MONITOR_CORE_DATA_IN_SPEED_UP
= 6¶
-
EXTRA_MONITOR_CORE_DATA_SPEED_UP
= 5¶
-
EXTRA_MONITOR_CORE_REINJECTION
= 4¶
-
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 parameter 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
¶
-
time_scale_factor
¶
-
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]¶ Convert between a time diff and total milliseconds.
Returns: total milliseconds Return type: float
-
spinn_front_end_common.utilities.helpful_functions.
convert_vertices_to_core_subset
(vertices, placements)[source]¶ Converts vertices into core subsets.
Parameters: - extra_monitor_cores_to_set – the vertices to convert to core subsets
- placements – the placements object
Returns: the CoreSubSets of the vertices
-
spinn_front_end_common.utilities.helpful_functions.
determine_flow_states
(executable_types, no_sync_changes)[source]¶ Get the start and end states for these executable types.
Parameters: - executable_types (dict(
ExecutableType
-> any)) – the execute types to locate start and end states from - no_sync_changes (int) – the number of times sync signals been sent
Returns: dict of executable type to states.
Return type: 2-tuple
- executable_types (dict(
-
spinn_front_end_common.utilities.helpful_functions.
emergency_recover_state_from_failure
(txrx, app_id, vertex, placement)[source]¶ Used to get at least some information out of a core when something goes badly wrong. Not a replacement for what abstract spinnaker base does.
Parameters: - txrx – The transceiver.
- app_id – The ID of the application.
- vertex (
spinn_front_end_common.abstract_models.AbstractHasAssociatedBinary
) – The vertex to retrieve the IOBUF from if it is suspected as being dead - placement – Where the vertex is located.
-
spinn_front_end_common.utilities.helpful_functions.
emergency_recover_states_from_failure
(txrx, app_id, executable_targets)[source]¶ Used to get at least some information out of a core when something goes badly wrong. Not a replacement for what abstract spinnaker base does.
Parameters: - txrx – The transceiver.
- app_id – The ID of the application.
- executable_targets – The what/where mapping
-
spinn_front_end_common.utilities.helpful_functions.
flood_fill_binary_to_spinnaker
(executable_targets, binary, txrx, app_id)[source]¶ flood fills a binary to spinnaker on a given app_id given the executable targets and binary.
Parameters: - executable_targets – the executable targets object
- binary – the binary to flood fill
- txrx (
Tranceiver
) – spinnman instance - app_id – the app id to load it on
Returns: the number of cores it was loaded onto
-
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_extra_monitor_mc_receiver
(machine, placement_x, placement_y, packet_gather_cores_to_ethernet_connection_map)[source]¶
-
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 (
Placement
) – the placement object to get the region address of - transceiver (
Transceiver
) – 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.
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: tuple(set(tuple(int, int)), set(tuple(int, int, int)), set(tuple(tuple(int, int), int)))
-
spinn_front_end_common.utilities.helpful_functions.
write_address_to_user0
(txrx, x, y, p, address)[source]¶ Writes the given address into the user_0 register of the given core.
Parameters: - txrx – The transceiver.
- x – Chip coordinate.
- y – Chip coordinate.
- p – Core ID on chip.
- address – Value to write (32-bit integer)
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
¶
-
time_scale_factor
¶
-
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
¶
-
time_scale_factor
¶
-
transceiver
¶
-
use_virtual_board
¶
-
-
class
spinn_front_end_common.utilities.
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
¶
-
time_scale_factor
¶
-
transceiver
¶
-
use_virtual_board
¶
-