spinn_front_end_common.interface.buffer_management package¶
Subpackages¶
- spinn_front_end_common.interface.buffer_management.buffer_models package
- Submodules
- spinn_front_end_common.interface.buffer_management.buffer_models.abstract_receive_buffers_to_host module
- spinn_front_end_common.interface.buffer_management.buffer_models.abstract_sends_buffers_from_host module
- spinn_front_end_common.interface.buffer_management.buffer_models.sends_buffers_from_host_pre_buffered_impl module
- Module contents
- spinn_front_end_common.interface.buffer_management.storage_objects package
- Submodules
- spinn_front_end_common.interface.buffer_management.storage_objects.abstract_database module
- spinn_front_end_common.interface.buffer_management.storage_objects.buffered_receiving_data module
- spinn_front_end_common.interface.buffer_management.storage_objects.buffered_sending_region module
- spinn_front_end_common.interface.buffer_management.storage_objects.buffers_sent_deque module
- spinn_front_end_common.interface.buffer_management.storage_objects.channel_buffer_state module
- spinn_front_end_common.interface.buffer_management.storage_objects.end_buffering_state module
- spinn_front_end_common.interface.buffer_management.storage_objects.sqllite_database module
- Module contents
Submodules¶
spinn_front_end_common.interface.buffer_management.buffer_manager module¶
-
class
spinn_front_end_common.interface.buffer_management.buffer_manager.
BufferManager
(placements, tags, transceiver, extra_monitor_cores, packet_gather_cores_to_ethernet_connection_map, extra_monitor_to_chip_mapping, machine, fixed_routes, uses_advanced_monitors, report_folder, java_caller=None)[source]¶ Bases:
object
Manager of send buffers.
Parameters: - placements (
Placements
) – The placements of the vertices - tags (
Tags
) – The tags assigned to the vertices - transceiver (
Transceiver
) – The transceiver to use for sending and receiving information - packet_gather_cores_to_ethernet_connection_map – mapping of cores to
- report_folder (str) – The directory for reports which includes the file to use as an SQL database.
- java_caller (
JavaCaller
) – Support class to call Java or None to use python
-
add_receiving_vertex
(vertex)[source]¶ Add a vertex into the managed list for vertices which require buffers to be received from them during runtime.
Parameters: vertex – the vertex to be managed
-
add_sender_vertex
(vertex)[source]¶ Add a vertex into the managed list for vertices which require buffers to be sent to them during runtime.
Parameters: vertex ( AbstractSendsBuffersFromHost
) – the vertex to be managed
-
clear_recorded_data
(x, y, p, recording_region_id)[source]¶ Removes the recorded data stored in memory.
Parameters: - x (int) – placement x coordinate
- y (int) – placement y coordinate
- p (int) – placement p coordinate
- recording_region_id (int) – the recording region ID
-
get_data_by_placement
(placement, recording_region_id)[source]¶ Get the data container for all the data retrieved during the simulation from a specific region area of a core.
Parameters: - placement (
Placement
) – the placement to get the data from - recording_region_id (int) – desired recording data region
Returns: an array contained all the data received during the simulation, and a flag indicating if any data was missing
Return type: (bytearray, bool)
- placement (
-
get_data_for_vertex
(placement, recording_region_id)[source]¶ It is no longer possible to get access to the data pointer.
Use get_data_by_vertex instead which returns the data that pointer.read_all() used to return the missing flag as before
-
reset
()[source]¶ Resets the buffered regions to start transmitting from the beginning of its expected regions and clears the buffered out data files.
-
sender_vertices
¶ The vertices which are buffered.
- placements (
spinn_front_end_common.interface.buffer_management.recording_utilities module¶
-
spinn_front_end_common.interface.buffer_management.recording_utilities.
get_last_sequence_number
(placement, transceiver, recording_data_address)[source]¶ Read the last sequence number from the data
Parameters: - placement – The placement from which to read the sequence number
- transceiver – The transceiver to use to read the sequence number
- recording_data_address – The address of the recording data from which to read the number
Return type: int
-
spinn_front_end_common.interface.buffer_management.recording_utilities.
get_recording_data_constant_size
(n_recorded_regions)[source]¶ Get the size of the recorded data to be reserved that doesn’t
Parameters: n_recorded_regions – The number of regions to be recorded Return type: int
-
spinn_front_end_common.interface.buffer_management.recording_utilities.
get_recording_header_array
(recorded_region_sizes, time_between_triggers=0, buffer_size_before_request=None, ip_tags=None, buffering_tag=None)[source]¶ Get data to be written for the recording header
Parameters: - recorded_region_sizes – A list of sizes of each region to be recorded. A size of 0 is acceptable.
- time_between_triggers – The minimum time between requesting reads of any region
- buffer_size_before_request – The amount of buffer to fill before a read request is sent
- ip_tags – A list of IP tags to extract the buffer tag from
- buffering_tag – The tag to use for buffering requests
Returns: An array of values to be written as the header
Return type: list(int)
-
spinn_front_end_common.interface.buffer_management.recording_utilities.
get_recording_header_size
(n_recorded_regions)[source]¶ Get the size of the data to be written for the recording header
Parameters: n_recorded_regions – The number of regions to be recorded
-
spinn_front_end_common.interface.buffer_management.recording_utilities.
get_region_pointer
(placement, transceiver, recording_data_address, region)[source]¶ Get a pointer to a recording region
Parameters: - placement – The placement from which to read the pointer
- transceiver – The transceiver to use to read the pointer
- recording_data_address – The address of the recording data from which to read the pointer
- region – The index of the region to get the pointer of
Return type: int
Module contents¶
-
class
spinn_front_end_common.interface.buffer_management.
BufferManager
(placements, tags, transceiver, extra_monitor_cores, packet_gather_cores_to_ethernet_connection_map, extra_monitor_to_chip_mapping, machine, fixed_routes, uses_advanced_monitors, report_folder, java_caller=None)[source]¶ Bases:
object
Manager of send buffers.
Parameters: - placements (
Placements
) – The placements of the vertices - tags (
Tags
) – The tags assigned to the vertices - transceiver (
Transceiver
) – The transceiver to use for sending and receiving information - packet_gather_cores_to_ethernet_connection_map – mapping of cores to
- report_folder (str) – The directory for reports which includes the file to use as an SQL database.
- java_caller (
JavaCaller
) – Support class to call Java or None to use python
-
add_receiving_vertex
(vertex)[source]¶ Add a vertex into the managed list for vertices which require buffers to be received from them during runtime.
Parameters: vertex – the vertex to be managed
-
add_sender_vertex
(vertex)[source]¶ Add a vertex into the managed list for vertices which require buffers to be sent to them during runtime.
Parameters: vertex ( AbstractSendsBuffersFromHost
) – the vertex to be managed
-
clear_recorded_data
(x, y, p, recording_region_id)[source]¶ Removes the recorded data stored in memory.
Parameters: - x (int) – placement x coordinate
- y (int) – placement y coordinate
- p (int) – placement p coordinate
- recording_region_id (int) – the recording region ID
-
get_data_by_placement
(placement, recording_region_id)[source]¶ Get the data container for all the data retrieved during the simulation from a specific region area of a core.
Parameters: - placement (
Placement
) – the placement to get the data from - recording_region_id (int) – desired recording data region
Returns: an array contained all the data received during the simulation, and a flag indicating if any data was missing
Return type: (bytearray, bool)
- placement (
-
get_data_for_vertex
(placement, recording_region_id)[source]¶ It is no longer possible to get access to the data pointer.
Use get_data_by_vertex instead which returns the data that pointer.read_all() used to return the missing flag as before
-
reset
()[source]¶ Resets the buffered regions to start transmitting from the beginning of its expected regions and clears the buffered out data files.
-
sender_vertices
¶ The vertices which are buffered.
- placements (