spinn_front_end_common.interface.buffer_management package

Subpackages

Submodules

spinn_front_end_common.interface.buffer_management.recording_utilities module

spinn_front_end_common.interface.buffer_management.recording_utilities.get_recording_data_constant_size(n_recording_regions: int) int[source]

Get the size of the headers that are stored in the SDRAM spaces allocated during recording_initialise, and so do not need to be reserved with DSG (but need to be accounted for in SDRAM calculations).

Parameters:

n_recording_regions (int) – The number of regions that can be recorded

Return type:

int

spinn_front_end_common.interface.buffer_management.recording_utilities.get_recording_header_array(recorded_region_sizes: Sequence[int]) List[int][source]

Get data to be written for the recording header.

Parameters:

recorded_region_sizes (list(int)) – A list of sizes of each region to be recorded. A size of 0 is acceptable.

Return type:

list(int)

spinn_front_end_common.interface.buffer_management.recording_utilities.get_recording_header_size(n_recording_regions: int) int[source]

Get the size of the data to be written for the recording header.

This is the data that sets up how recording will be done, and indicates the sizes of the regions to be stored.

Parameters:

n_recording_regions (int) – The number of regions that can be recorded

Return type:

int

Module contents

class spinn_front_end_common.interface.buffer_management.BufferManager

Bases: object

Manager of send buffers.

clear_recorded_data(x: int, y: int, p: int, recording_region_id: int)[source]

Removes the recorded data stored in memory.

Parameters:
  • x (int) – placement X coordinate

  • y (int) – placement Y coordinate

  • p (int) – placement processor ID

  • recording_region_id (int) – the recording region ID

get_data_by_placement(placement: Placement, recording_region_id: int) Tuple[bytes, bool][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:

tuple(bytearray, bool)

get_placement_data() None[source]

Retrieve the data from placed vertices.

load_initial_buffers() None[source]

Load the initial buffers for the senders using memory writes.

reset() None[source]

Resets the buffered regions to start transmitting from the beginning of its expected regions and clears the buffered out data files.

resume() None[source]

Resets any data structures needed before starting running again.

property sender_vertices: Iterable[AbstractSendsBuffersFromHost]

The vertices which are buffered.

Return type:

iterable(AbstractSendsBuffersFromHost)