spinn_front_end_common.interface.buffer_management.buffer_models package

Module contents

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

Bases: object

Indicates that this object can receive buffers.

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(int)
get_recording_region_base_address(txrx, placement)[source]

Get the recording region base address

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

the base address of the recording region

Return type:

int

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.

Return type:bool
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(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:Whether there are no keys to send for the region
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:

Whether there are more keys to send for the parameters

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:Whether there is more data
Return type:bool
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 AbstractReceiveBuffersToHost which uses an existing set of buffers for the details.

buffering_input()[source]
Return type:bool
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_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
Return type:dict(int,BufferedSendingRegion)