sPyNNaker neural_modelling 7.3.1
|
Functions for immediate handling of incoming spikes. More...
Go to the source code of this file.
Functions | |
static bool | in_spikes_initialize_spike_buffer (uint32_t size) |
This function initialises the input spike buffer. | |
static bool | in_spikes_add_spike (spike_t spike) |
Adds a spike to the input spike buffer. | |
static bool | in_spikes_get_next_spike (spike_t *spike) |
Retrieves a spike from the input spike buffer. | |
static bool | in_spikes_is_next_spike_equal (spike_t spike) |
Skips the next spike in the buffer if it is equal to an existing spike. | |
static counter_t | in_spikes_get_n_buffer_overflows (void) |
Get the number of times that the input spike buffer overflowed. | |
static counter_t | in_spikes_get_n_buffer_underflows (void) |
Get the number of times that the input spike buffer underflowed. | |
static void | in_spikes_print_buffer (void) |
Print the input spike buffer. | |
static uint32_t | in_spikes_input_index (void) |
Get the index in the buffer of the point where the next insertion goes. | |
static uint32_t | in_spikes_output_index (void) |
Get the index in the buffer of the point where the next removal comes from. | |
static uint32_t | in_spikes_real_size (void) |
Get the size of the input spike buffer. | |
static uint32_t | in_spikes_size (void) |
get the size of the input spike buffer | |
static void | in_spikes_clear (void) |
clears the input spike buffer. | |
static spike_t | in_spikes_value_at_index (uint32_t index) |
Get the spike at a specific index of the input spike buffer. | |
Variables | |
static circular_buffer | buffer |
Buffer for quickly taking spikes received by a fast interrupt and queueing them for later processing by less critical code. | |
Functions for immediate handling of incoming spikes.
Definition in file in_spikes.h.
|
inlinestatic |
This function initialises the input spike buffer.
It configures:
If underflows is ever non-zero, then there is a problem with this code.
[in] | size | The number of spikes we expect to handle in the buffer; this should be a power of 2 (and will be increased to the next one up if it isn't). |
Definition at line 51 of file in_spikes.h.
|
inlinestatic |
Adds a spike to the input spike buffer.
[in] | spike | The spike to add |
Definition at line 59 of file in_spikes.h.
|
inlinestatic |
Retrieves a spike from the input spike buffer.
[out] | spike | The spike that was retrieved. |
Definition at line 66 of file in_spikes.h.
|
inlinestatic |
Skips the next spike in the buffer if it is equal to an existing spike.
[in] | spike | The spike to compare against. |
Definition at line 74 of file in_spikes.h.
|
inlinestatic |
Get the number of times that the input spike buffer overflowed.
Definition at line 80 of file in_spikes.h.
|
inlinestatic |
Get the number of times that the input spike buffer underflowed.
Definition at line 86 of file in_spikes.h.
|
inlinestatic |
Print the input spike buffer.
Expected to be mainly for debugging.
Definition at line 92 of file in_spikes.h.
|
inlinestatic |
Get the index in the buffer of the point where the next insertion goes.
Definition at line 102 of file in_spikes.h.
|
inlinestatic |
Get the index in the buffer of the point where the next removal comes from.
Definition at line 109 of file in_spikes.h.
|
inlinestatic |
Get the size of the input spike buffer.
Definition at line 115 of file in_spikes.h.
|
inlinestatic |
get the size of the input spike buffer
Definition at line 121 of file in_spikes.h.
|
inlinestatic |
clears the input spike buffer.
Definition at line 126 of file in_spikes.h.
|
inlinestatic |
Get the spike at a specific index of the input spike buffer.
[in] | index | The index to retrieve from. Will be wrapped within the buffer. |
Definition at line 135 of file in_spikes.h.
|
static |
Buffer for quickly taking spikes received by a fast interrupt and queueing them for later processing by less critical code.
Definition at line 28 of file in_spikes.h.