spinn_front_end_common.data package

Module contents

class spinn_front_end_common.data.FecDataView

Bases: pacman.data.pacman_data_view.PacmanDataView, spinnman.data.spinnman_data_view.SpiNNManDataView

Adds the extra Methods to the View for spinn_front_end_commom level.

See UtilsDataView for a more detailed description.

This class is designed to only be used directly within none PyNN repositories as all methods are available to subclasses

classmethod add_database_socket_address(database_socket_address)[source]

Adds a socket address to the list of known addresses

Parameters:database_socket_address (SocketAddress) –
Raises:TypeError – if database_socket_address is not a SocketAddress
classmethod add_database_socket_addresses(database_socket_addresses)[source]

Adds all socket addresses to the list of known addresses

Parameters:database_socket_addresses (iterable(SocketAddress)) –
Raises:TypeError – if database_socket_address is not a iterable(SocketAddress)
classmethod add_live_output_vertex(vertex, partition_id)[source]

Add a vertex that is to be output live, and so wants its atom IDs recorded in the database.

Parameters:
  • vertex (ApplicationVertex) – The vertex to add
  • partition_id (str) – The partition to get the IDs of
classmethod add_live_packet_gatherer_parameters(live_packet_gatherer_params, vertex_to_record_from, partition_ids)[source]

Adds parameters for a new LPG if needed, or adds to the tracker for parameters.

Note If the Application Graph is used the vertex must be an Application Vertex if not it must be a MachineVertex
Parameters:
  • live_packet_gatherer_params (LivePacketGatherParameters) – params to look for a LPG
  • vertex_to_record_from (AbstractVertex) – the vertex that needs to send to a given LPG
  • partition_ids (iterable(str)) – the IDs of the partitions to connect from the vertex
classmethod get_app_provenance_dir_path()[source]

Returns the path to the directory that holds all app provenance files

This will be the path used by the last run call or to be used by the next run if it has not yet been called.

..note: In unittest mode this returns a tempdir shared by all path methods

Rtpye:str
Raises:SimulatorNotSetupException – If the simulator has not been setup
classmethod get_buffer_manager()[source]

Returns the buffer manager if known

Return type:BufferManager
Raises:SpiNNUtilsException – If the buffer manager unavailable
classmethod get_current_run_time_ms()[source]

The end of this or the previous do__run loop time in ms.

Semantic sugar for current_run_timesteps * simulation_time_step_ms

Will be zero if not yet run and not yet in the do_run_loop

Will be zero if in run forever mode

Rtpye:float
classmethod get_current_run_timesteps()[source]

The end of this or the previous do__run loop time in steps.

Will be zero if not yet run and not yet in the do_run_loop

Will be None if in run forever mode

Rtpye:int or None
classmethod get_data_in_multicast_key_to_chip_map()[source]

Retreive the data_in_multicast_key_to_chip_map if known

Return type:dict
Raises:SpiNNUtilsException – If the data_in_multicast_key_to_chip_map is currently unavailable
classmethod get_data_in_multicast_routing_tables()[source]

Retreive the data_in_multicast_routing_tables if known

Return type:MulticastRoutingTables
Raises:SpiNNUtilsException – If the data_in_multicast_routing_tables is currently unavailable
classmethod get_database_file_path()[source]

Will return the database_file_path if set or None if not set or set to None

Return type:str or None
classmethod get_dsg_targets()[source]

data Spec targets database

Return type:DsSqlliteDatabase
Raises:SpiNNUtilsException – If the dsg_targets is currently unavailable
classmethod get_executable_targets()[source]

binaries to be executed.

Return type:ExecutableTargets
Raises:SpiNNUtilsException – If the executable_targets is currently unavailable
classmethod get_executable_types()[source]

Gets the _executable_types if they have been created

Return type:dict( ExecutableType, CoreSubsets)
Raises:SpiNNUtilsException – If the executable_types is currently unavailable
classmethod get_first_machine_time_step()[source]

The start of this or the next do_run loop time in steps

Will be None if in run forever mode

Rtpye:int or None
classmethod get_fixed_routes()[source]

Gets the fixed routes if they have been created

Return type:dict(tuple(int,int), FixedRouteEntry)
Raises:SpiNNUtilsException – If the fixed_routes is currently unavailable
classmethod get_gatherer_by_xy(x, y)[source]

DataSpeedUpPacketGatherMachineVertex for core x, y

Return type:

DataSpeedUpPacketGatherMachineVertex

Raises:
classmethod get_hardware_time_step_ms()[source]

The hardware timestep, in milliseconds

Semantic sugar for simulation_time_step_ms * time_scale_factor

Return type:float
Raises:SpiNNUtilsException – If the hardware_time_step is currently unavailable
classmethod get_hardware_time_step_us()[source]

The hardware timestep, in microseconds

Semantic sugar for simulation_time_step_us * time_scale_factor

Return type:int
Raises:SpiNNUtilsException – If the hardware_time_step is currently unavailable
classmethod get_ipaddress()[source]

Gets the ipaddress of the board with chip 0,0 if it has been set

Return type:str
Raises:SpiNNUtilsException – If the ipaddress is currently unavailable
classmethod get_java_caller()[source]

Gets the Java_caller

Return type:str
Raises:SpiNNUtilsException – If the java_caller is currently unavailable
classmethod get_json_dir_path()[source]

Returns the path to the directory that holds all json files

This will be the path used by the last run call or to be used by the next run if it has not yet been called.

..note: In unittest mode this returns a tempdir shared by all path methods

Rtpye:str
Raises:SpiNNUtilsException – If the simulation_time_step is currently unavailable
classmethod get_live_packet_recorder_params()[source]

Mapping of live_packet_gatherer_params to a list of tuples (vertex and list of ids))

Return type:dict(live_packet_gatherer_params, (vertex, list(str))
Raises:SpiNNUtilsException – If the _live_packet_recorder_params is currently unavailable
classmethod get_max_run_time_steps()[source]

Returns the calculated longest time this or a future run loop could be

Mainly ued to indicate the number of timesteps the vertex can and therefore should reserve memry for

Guaranteed to be positive int if available

Return type:int
Raises:SpiNNUtilsException – If the max run time is currently unavailable
classmethod get_monitor_by_xy(x, y)[source]

ExtraMonitorSupportMachineVertex for core x, y

Return type:

ExtraMonitorSupportMachineVertex

Raises:
classmethod get_n_boards_required()[source]

Gets the number of boards requested by the user during setup if known.

Guaranteed to be positive

Return type:int
Raises:SpiNNUtilsException – If the n_boards_required is currently unavailable
classmethod get_n_chips_needed()[source]

Gets the number of chips needed if set

This will be the number of chips requested by the user during setup, even if this is less that what the partitioner reported.

If the partitioner has run and the user has not specified a number, this will be what the partitioner requested.

Guaranteed to be positive if set

Return type:int
Raises:SpiNNUtilsException – If data for n_chips_needed is not available
classmethod get_n_database_socket_addresses()[source]

Number of registered database_socket_addresses

Return type:int
classmethod get_n_gathers()[source]

Number of DataSpeedUpPacketGatherMachineVertex(s)

Return type:int
Raises:SpiNNUtilsException – If the gathers are currently unavailable
classmethod get_n_monitors()[source]

Number of ExtraMonitorSupportMachineVertexs

Return type:int
Raises:SpiNNUtilsException – If the monitors are currently unavailable
classmethod get_next_none_labelled_edge_number()[source]

Returns an unused number for a none_labelled_edge

Rtpye int:
classmethod get_next_sync_signal()[source]

Returns alteratively Signal.SYNC0 and Signal.SYNC1

Rtpye ~spinnman.messages.scp.enums.signal.Signal:
 
classmethod get_notification_protocol()[source]

binaries to be executed.

Return type:NotificationProtocol
Raises:SpiNNUtilsException – If the notification_protocol is currently unavailable
classmethod get_provenance_dir_path()[source]

Returns the path to the directory that holds all provenance files

This will be the path used by the last run call or to be used by the next run if it has not yet been called.

..note: In unittest mode this returns a tempdir shared by all path methods

Rtpye:str
Raises:SpiNNUtilsException – If the simulation_time_step is currently unavailable
classmethod get_run_number()[source]

Get the number of this or the next run.

Run numbers start at 1

Returns:
Raises:SpiNNUtilsException – If the run_number is currently unavailable
classmethod get_run_step()[source]

Get the auto pause and resume step currently running if any.

If and only if currently in an auto pause and resume loop this will report the number of the step. Starting at 1

In most cases this will return None, including when running without steps.

Return type:None or int
classmethod get_simulation_time_step_ms()[source]

The simulation time step, in milliseconds

Semantic sugar for simulation_time_step_us / 1000.

Return type:float
Raises:SpiNNUtilsException – If the simulation_time_step_ms is currently unavailable
classmethod get_simulation_time_step_per_ms()[source]

The number of simulation time steps in a millisecond

Semantic sugar for 1000 / simulation_time_step_us

Return type:float
Raises:SpiNNUtilsExceptionn – If the simulation_time_step is currently unavailable
classmethod get_simulation_time_step_per_s()[source]

The number of simulation time steps in a seconds

Semantic sugar for 1,000,000 / simulation_time_step_us

Return type:float
Raises:SpiNNUtilsException – If the simulation_time_step is currently unavailable
classmethod get_simulation_time_step_s()[source]

The simulation timestep, in seconds

Semantic sugar for simulation_time_step() / 1,000,000.

Return type:float
Raises:SpiNNUtilsException – If the simulation_time_step_ms is currently unavailable
classmethod get_simulation_time_step_us()[source]

The simulation timestep, in microseconds

Previously know as “machine_time_step”

Return type:int
Raises:SpiNNUtilsException – If the simulation_time_step_us is currently unavailable
classmethod get_system_multicast_router_timeout_keys()[source]

Retreive the system_multicast_router_timeout_keys if known

Return type:dict
Raises:SpiNNUtilsException – If the system_multicast_router_timeout_keys is currently unavailable
classmethod get_system_provenance_dir_path()[source]

Returns the path to the directory that holds all provenance files

This will be the path used by the last run call or to be used by the next run if it has not yet been called.

..note: In unittest mode this returns a tempdir shared by all path methods

Rtpye:str
Raises:SpiNNUtilsException – If the simulation_time_step is currently unavailable
classmethod get_time_scale_factor()[source]
Return type:

int or float

Raises:
  • SpiNNUtilsException – If the time_scale_factor is currently unavailable
  • SpiNNUtilsException – If the time_scale_factor is currently unavailable
classmethod get_timestamp_dir_path()[source]

Returns path to existing timestamped director in the reports directory

..note: In unittest mode this returns a tempdir shared by all path methods

Rtpye:str
Raises:SpiNNUtilsException – If the simulation_time_step is currently unavailable
classmethod has_buffer_manager()[source]

Reports if a BufferManager object has already been set

Returns:True if and only if a Buffermanager has been added and not reset
Return type:bool
classmethod has_ipaddress()[source]

Detects if the ipaddress of the board with chip 0,0 if known

Returns:
classmethod has_java_caller()[source]

Reports if there is a Java called that can be used.

Equivellent to get_config_bool(“Java”, “use_java”) as the writer will have created the caller during setup

The behaviour when Mocked is currently to always return False.

Return type:bool
classmethod has_live_packet_recorder_params()[source]

Reports if there are live_packet_recorder_params

If True the live_packet_recorder_params not be empty

:rtype bool

classmethod has_max_run_time_steps()[source]

Indicates if max_run_time_steps is currently available

Return type:bool
classmethod has_monitors()[source]

Detect is ExtraMonitorSupportMachineVertex(s) have been created

Return type:bool
classmethod has_n_boards_required()[source]

Reports if a user has sets the number of boards requested during setup

Return type:bool
Raises:SpiNNUtilsException – If n_boards_required is not set or set to None
classmethod has_n_chips_needed()[source]

Detects if the number of chips needed has been set.

This will be the number of chips requested by the use during setup or what the partitioner requested.

Return type:bool
classmethod has_time_scale_factor()[source]
Return type:bool
classmethod has_time_step()[source]

Check if any/all of the time_step values are known

True When all simulation/hardware_time_step methods are known False when none of the simulation/hardware_time_step values are known. There is never a case when some are known and others not

Return type:bool
classmethod iterate_database_socket_addresses()[source]

Iterates over the registered database_socket_addresses

Return type:iterable(SocketAddress)
classmethod iterate_gather_items()[source]

Iterates over the (X,y) and DataSpeedUpPacketGatherMachineVertex

get_n_gathers returns the number of items this iterable will provide

Return type:iterable(tuple(tuple(int,int), DataSpeedUpPacketGatherMachineVertex))
Raises:SpiNNUtilsException – If the gathers are currently unavailable
classmethod iterate_gathers()[source]

Iterates over the DataSpeedUpPacketGatherMachineVertex(s)

Return type:iterable(DataSpeedUpPacketGatherMachineVertex)
Raises:SpiNNUtilsException – If the gathers are currently unavailable
classmethod iterate_live_output_vertices()[source]

Get an iterator over the live output vertices and partition ids

Return type:set((ApplicationVertex, str))
classmethod iterate_monitor_items()[source]

Iterates over the (X,y) and ExtraMonitorSupportMachineVertex

get_n_monitors returns the number of items this iterable will provide

Return type:iterable(tuple(tuple(int,int), ExtraMonitorSupportMachineVertex))
Raises:SpiNNUtilsException – If the monitors are currently unavailable
classmethod iterate_monitors()[source]

Iterates over the ExtraMonitorSupportMachineVertex(s)

Return type:iterable(ExtraMonitorSupportMachineVertex)
Raises:SpiNNUtilsException – If the monitors are currently unavailable