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

class spinn_front_end_common.interface.buffer_management.buffer_models.abstract_receive_buffers_to_host.AbstractReceiveBuffersToHost[source]

Bases: object

Indicates that this object can receive buffers

get_minimum_buffer_sdram_usage()[source]

Get the minimum amount of SDRAM to reserve for buffers

get_n_timesteps_in_buffer_space(buffer_space, machine_time_step)[source]

Get the number of timesteps that can be stored fully in the given buffer space in bytes

Parameters:
  • buffer_space – The buffer space in bytes
  • machine_time_step – The size of each time step
Returns:

The number of time steps that can be stored in the buffer

Return type:

int

get_recorded_region_ids()[source]

Get the recording region ids that have been recorded using buffering

Returns:The region numbers that have active recording
Return type:iterable of int
get_recording_region_base_address(txrx, placement)[source]

Get the recording region base address

Parameters:
  • txrx – the SpiNNMan instance
  • placement – the placement object of the core to find the address of
Returns:

the base address of the recording region

spinn_front_end_common.interface.buffer_management.buffer_models.abstract_sends_buffers_from_host module

class spinn_front_end_common.interface.buffer_management.buffer_models.abstract_sends_buffers_from_host.AbstractSendsBuffersFromHost[source]

Bases: object

Interface to an object that sends buffers of keys to be transmitted at given timestamps in the simulation

buffering_input()[source]

Return True if the input of this vertex is to be buffered

get_max_buffer_size_possible(region)[source]

Gets the max possible size of a buffered region

Parameters:region (int) – the region to find the max possible size of
Returns:the max possible size of the buffered region
Return type:int
get_next_key(region)[source]

Get the next key in the given region

Parameters:region (int) – The region to get the next key from
Returns:The next key, or None if there are no more keys
Return type:int
get_next_timestamp(region)[source]

Get the next timestamp at which there are still keys to be sent for the given region

Parameters:region (int) – The region to get the timestamp for
Returns:The timestamp of the next available keys
Return type:int
get_region_buffer_size(region)[source]

Get the size of the buffer to be used in SDRAM on the machine for the region in bytes

Parameters:region (int) – The region to get the buffer size of
Returns:The size of the buffer space in bytes
Return type:int
get_regions()[source]

Get the set of regions for which there are keys to be sent

Returns:Iterable of region ids
Return type:iterable of int
is_empty(region)[source]

Return true if there are no spikes to be buffered for the specified region

Parameters:region (int) – The region to get the next key from
Returns:True if there are no keys to send for the region, False otherwise
Return type:bool
is_next_key(region, timestamp)[source]

Determine if there are still keys to be sent at the given timestamp for the given region

Parameters:
  • region (int) – The region to determine if there are keys for
  • timestamp (int) – The timestamp to determine if there are more keys for
Returns:

True if there are more keys to send for the parameters, False otherwise

Return type:

bool

is_next_timestamp(region)[source]

Determine if there is another timestamp with data to be sent

Parameters:region (int) – The region to determine if there is more data for
Returns:True if there is more data, False otherwise
Return type:int
rewind(region)[source]
Rewinds the internal buffer in preparation of re-sending
the spikes
Parameters:region (int) – The region to rewind

spinn_front_end_common.interface.buffer_management.buffer_models.sends_buffers_from_host_pre_buffered_impl module

class spinn_front_end_common.interface.buffer_management.buffer_models.sends_buffers_from_host_pre_buffered_impl.SendsBuffersFromHostPreBufferedImpl[source]

Bases: spinn_front_end_common.interface.buffer_management.buffer_models.abstract_sends_buffers_from_host.AbstractSendsBuffersFromHost

Implementation of the AbstractSendsBuffersFromHost which uses an existing set of buffers for the details

buffering_input()[source]
get_max_buffer_size_possible(region)[source]

Return the max possible size of a buffered region

Parameters:region – the region to find the max possible size of
Returns:the max possible size of the buffered region
get_next_key(region)[source]

Get the next key for a given region

Parameters:region – the region to get the next key from
get_next_timestamp(region)[source]

Return the next time stamp available in the buffered region

Parameters:region – the region id which is being asked
Returns:the next time stamp
get_region_buffer_size(region)[source]

Return the size of a given regions buffer

Parameters:region – the region to find the size of
Returns:the size of the buffer
get_regions()[source]

Return the regions which has buffers to send

is_empty(region)[source]

Check if a region is empty

Parameters:region – the region id to check
Returns:bool
is_next_key(region, timestamp)[source]

Check if there is more keys to transmit for a given region in a given timestamp

Parameters:
  • region – the region id to check
  • timestamp – the timestamp to check
Returns:

bool

is_next_timestamp(region)[source]

Check if there are more time stamps which need transmitting

Parameters:region – the region to check
Returns:boolean
rewind(region)[source]

Rewinds the internal buffer in preparation of re-sending the spikes

Parameters:region (int) – The region to rewind
send_buffers

Module contents

class spinn_front_end_common.interface.buffer_management.buffer_models.AbstractReceiveBuffersToHost[source]

Bases: object

Indicates that this object can receive buffers

get_minimum_buffer_sdram_usage()[source]

Get the minimum amount of SDRAM to reserve for buffers

get_n_timesteps_in_buffer_space(buffer_space, machine_time_step)[source]

Get the number of timesteps that can be stored fully in the given buffer space in bytes

Parameters:
  • buffer_space – The buffer space in bytes
  • machine_time_step – The size of each time step
Returns:

The number of time steps that can be stored in the buffer

Return type:

int

get_recorded_region_ids()[source]

Get the recording region ids that have been recorded using buffering

Returns:The region numbers that have active recording
Return type:iterable of int
get_recording_region_base_address(txrx, placement)[source]

Get the recording region base address

Parameters:
  • txrx – the SpiNNMan instance
  • placement – the placement object of the core to find the address of
Returns:

the base address of the recording region

class spinn_front_end_common.interface.buffer_management.buffer_models.AbstractSendsBuffersFromHost[source]

Bases: object

Interface to an object that sends buffers of keys to be transmitted at given timestamps in the simulation

buffering_input()[source]

Return True if the input of this vertex is to be buffered

get_max_buffer_size_possible(region)[source]

Gets the max possible size of a buffered region

Parameters:region (int) – the region to find the max possible size of
Returns:the max possible size of the buffered region
Return type:int
get_next_key(region)[source]

Get the next key in the given region

Parameters:region (int) – The region to get the next key from
Returns:The next key, or None if there are no more keys
Return type:int
get_next_timestamp(region)[source]

Get the next timestamp at which there are still keys to be sent for the given region

Parameters:region (int) – The region to get the timestamp for
Returns:The timestamp of the next available keys
Return type:int
get_region_buffer_size(region)[source]

Get the size of the buffer to be used in SDRAM on the machine for the region in bytes

Parameters:region (int) – The region to get the buffer size of
Returns:The size of the buffer space in bytes
Return type:int
get_regions()[source]

Get the set of regions for which there are keys to be sent

Returns:Iterable of region ids
Return type:iterable of int
is_empty(region)[source]

Return true if there are no spikes to be buffered for the specified region

Parameters:region (int) – The region to get the next key from
Returns:True if there are no keys to send for the region, False otherwise
Return type:bool
is_next_key(region, timestamp)[source]

Determine if there are still keys to be sent at the given timestamp for the given region

Parameters:
  • region (int) – The region to determine if there are keys for
  • timestamp (int) – The timestamp to determine if there are more keys for
Returns:

True if there are more keys to send for the parameters, False otherwise

Return type:

bool

is_next_timestamp(region)[source]

Determine if there is another timestamp with data to be sent

Parameters:region (int) – The region to determine if there is more data for
Returns:True if there is more data, False otherwise
Return type:int
rewind(region)[source]
Rewinds the internal buffer in preparation of re-sending
the spikes
Parameters:region (int) – The region to rewind
class spinn_front_end_common.interface.buffer_management.buffer_models.SendsBuffersFromHostPreBufferedImpl[source]

Bases: spinn_front_end_common.interface.buffer_management.buffer_models.abstract_sends_buffers_from_host.AbstractSendsBuffersFromHost

Implementation of the AbstractSendsBuffersFromHost which uses an existing set of buffers for the details

buffering_input()[source]
get_max_buffer_size_possible(region)[source]

Return the max possible size of a buffered region

Parameters:region – the region to find the max possible size of
Returns:the max possible size of the buffered region
get_next_key(region)[source]

Get the next key for a given region

Parameters:region – the region to get the next key from
get_next_timestamp(region)[source]

Return the next time stamp available in the buffered region

Parameters:region – the region id which is being asked
Returns:the next time stamp
get_region_buffer_size(region)[source]

Return the size of a given regions buffer

Parameters:region – the region to find the size of
Returns:the size of the buffer
get_regions()[source]

Return the regions which has buffers to send

is_empty(region)[source]

Check if a region is empty

Parameters:region – the region id to check
Returns:bool
is_next_key(region, timestamp)[source]

Check if there is more keys to transmit for a given region in a given timestamp

Parameters:
  • region – the region id to check
  • timestamp – the timestamp to check
Returns:

bool

is_next_timestamp(region)[source]

Check if there are more time stamps which need transmitting

Parameters:region – the region to check
Returns:boolean
rewind(region)[source]

Rewinds the internal buffer in preparation of re-sending the spikes

Parameters:region (int) – The region to rewind
send_buffers