sPyNNaker neural_modelling 7.2.2
|
Implements the "local-only" handling of synapses, that is the processing of spikes without the use of transfers from SDRAM. More...
#include "local_only.h"
#include "local_only/local_only_impl.h"
#include <debug.h>
#include <circular_buffer.h>
#include <recording.h>
#include <spin1_api.h>
Go to the source code of this file.
Data Structures | |
struct | local_only_config |
Functions | |
static void | run_next_process_loop (void) |
Start the process loop. | |
static void | update_max_input_buffer (void) |
Update the maximum size of the input buffer. | |
void | mc_rcv_callback (uint key, uint unused) |
Multicast packet without payload received callback. | |
void | mc_rcv_payload_callback (uint key, uint n_spikes) |
Multicast packet with payload received callback. | |
void | process_callback (uint time, uint unused1) |
User callback; performs spike processing loop. | |
bool | local_only_initialise (void *local_only_addr, void *local_only_params_addr, uint32_t n_rec_regions_used, uint16_t **ring_buffers_ptr) |
Set up local-only processing of spikes. | |
void | local_only_clear_input (uint32_t time) |
Clear the spikes for the last time step. | |
void | local_only_store_provenance (struct local_only_provenance *prov) |
Store provenance gathered during run. | |
Variables | ||
static struct local_only_config | config | |
A local copy of the configuration. | ||
static circular_buffer | input_buffer | |
The input buffer for spikes received. | ||
static uint16_t * | ring_buffers | |
Ring buffers to add weights to on spike processing. | ||
static volatile bool | process_loop_running = false | |
static uint32_t | n_spikes_received = 0 | |
The number of spikes received in total in the last time step. | ||
static uint32_t | max_spikes_received = 0 | |
The maximum number of spikes received in any time step. | ||
static uint32_t | n_spikes_dropped = 0 | |
The number of spikes discarded in total during the run. | ||
static uint32_t | max_input_buffer_size = 0 | |
The maximum size of the input buffer during the run. | ||
static uint32_t | local_time | |
The local time step counter. | ||
uint32_t | synapse_delay_mask | |
The mask to get the synaptic delay from a "synapse". | ||
uint32_t | synapse_type_index_bits | |
The number of bits used by the synapse type and post-neuron index. | ||
uint32_t | synapse_index_bits | |
The number of bits used by just the post-neuron index. | ||
uint32_t | p_per_ts_region | |
The region where packets-per-timestep are stored. | ||
struct { | ||
uint32_t | time | |
uint32_t | packets_this_time_step | |
} | p_per_ts_struct | |
The number of packets received this time step for recording. | ||
Implements the "local-only" handling of synapses, that is the processing of spikes without the use of transfers from SDRAM.
Definition in file local_only.c.
struct local_only_config |
Definition at line 29 of file local_only.c.
|
inlinestatic |
Start the process loop.
Definition at line 90 of file local_only.c.
|
inlinestatic |
Update the maximum size of the input buffer.
Definition at line 97 of file local_only.c.
Multicast packet without payload received callback.
[in] | key | The key received |
[in] | unused | Should be 0 |
Definition at line 107 of file local_only.c.
Multicast packet with payload received callback.
[in] | key | The key received |
[in] | n_spikes | The payload; the number of times to repeat the key |
Definition at line 124 of file local_only.c.
User callback; performs spike processing loop.
Definition at line 145 of file local_only.c.
bool local_only_initialise | ( | void * | local_only_addr, |
void * | local_only_params_addr, | ||
uint32_t | n_rec_regions_used, | ||
uint16_t ** | ring_buffers | ||
) |
Set up local-only processing of spikes.
[in] | local_only_addr | The address from which to read common data |
[in] | local_only_params_addr | The address from which to read implementation-specific data |
[in] | n_rec_regions_used | The number of recording regions used before here |
[out] | ring_buffers | Pointer to the ring buffers that hold future inputs |
Definition at line 164 of file local_only.c.
void local_only_clear_input | ( | uint32_t | time | ) |
Clear the spikes for the last time step.
[in] | time | The time step at which the request is asked |
Definition at line 218 of file local_only.c.
void local_only_store_provenance | ( | struct local_only_provenance * | prov | ) |
Store provenance gathered during run.
[out] | prov | Pointer to the struct to store the provenance in |
Definition at line 234 of file local_only.c.
|
static |
A local copy of the configuration.
Definition at line 43 of file local_only.c.
|
static |
The input buffer for spikes received.
Definition at line 46 of file local_only.c.
|
static |
Ring buffers to add weights to on spike processing.
Definition at line 49 of file local_only.c.
|
static |
Whether the loop of processing is currently running (if not, it needs to be restarted on the next spike received)
Definition at line 53 of file local_only.c.
|
static |
The number of spikes received in total in the last time step.
Definition at line 56 of file local_only.c.
|
static |
The maximum number of spikes received in any time step.
Definition at line 59 of file local_only.c.
|
static |
The number of spikes discarded in total during the run.
Definition at line 62 of file local_only.c.
|
static |
The maximum size of the input buffer during the run.
Definition at line 65 of file local_only.c.
|
static |
The local time step counter.
Definition at line 68 of file local_only.c.
uint32_t synapse_delay_mask |
The mask to get the synaptic delay from a "synapse".
Mask to pick out the delay.
Definition at line 71 of file local_only.c.
uint32_t synapse_type_index_bits |
The number of bits used by the synapse type and post-neuron index.
Number of bits needed for the synapse type and index.
Definition at line 74 of file local_only.c.
uint32_t synapse_index_bits |
The number of bits used by just the post-neuron index.
Number of bits in the synapse index.
Definition at line 77 of file local_only.c.
uint32_t p_per_ts_region |
The region where packets-per-timestep are stored.
Definition at line 80 of file local_only.c.