Implementation of non-inlined API in spike_processing.h.
More...
Go to the source code of this file.
|
| static void | do_dma_read (spike_t spike, pop_table_lookup_result_t *result) |
| | Perform a DMA read of a synaptic row. More...
|
| |
| static bool | is_something_to_do (spike_t *spike, pop_table_lookup_result_t *result, uint32_t *n_rewire, uint32_t *n_process_spike) |
| | Check if there is anything to do. If not, DMA is not busy. More...
|
| |
| static bool | setup_synaptic_dma_read (dma_buffer *current_buffer, uint32_t *n_rewires, uint32_t *n_synapse_processes) |
| | Set up a new synaptic DMA read. More...
|
| |
| static void | setup_synaptic_dma_write (uint32_t dma_buffer_index, bool plastic_only) |
| | Set up a DMA write of synaptic data. More...
|
| |
|
static void | start_dma_loop (void) |
| | Start the DMA processing loop if not already running.
|
| |
| static void | multicast_packet_received_callback (uint key, uint unused) |
| | Called when a multicast packet is received. More...
|
| |
| static void | multicast_packet_pl_received_callback (uint key, uint payload) |
| | Called when a multicast packet is received. More...
|
| |
| static void | dma_complete_callback (uint unused, uint tag) |
| | Called when a DMA completes. More...
|
| |
| void | user_event_callback (uint unused0, uint unused1) |
| | Called when a user event is received. More...
|
| |
| void | spike_processing_clear_input_buffer (timer_t time) |
| | clears the input buffer of packets More...
|
| |
| bool | spike_processing_initialise (size_t row_max_n_words, uint mc_packet_callback_priority, uint user_event_priority, uint incoming_spike_buffer_size, bool clear_input_buffers_of_late_packets_init, uint32_t packets_per_timestep_region) |
| | Initialise the spike processing system. More...
|
| |
| void | spike_processing_store_provenance (struct spike_processing_provenance *prov) |
| | Get provenance data for Spike processing. More...
|
| |
| bool | spike_processing_do_rewiring (int number_of_rewires) |
| | Set the number of times spike_processing has to attempt rewiring. More...
|
| |
Implementation of non-inlined API in spike_processing.h.
Definition in file spike_processing.c.
◆ spike_processing_dma_tags
DMA tags.
| Enumerator |
|---|
| DMA_TAG_READ_SYNAPTIC_ROW | Tag of a DMA read of a full synaptic row.
|
| DMA_TAG_WRITE_PLASTIC_REGION | Tag of a DMA write of the plastic region of a synaptic row.
|
Definition at line 56 of file spike_processing.c.
◆ do_dma_read()
Perform a DMA read of a synaptic row.
- Parameters
-
| [in] | spike | The spike that triggered this read |
| [in] | result | The result of the lookup |
Definition at line 125 of file spike_processing.c.
◆ is_something_to_do()
Check if there is anything to do. If not, DMA is not busy.
- Parameters
-
| [out] | spike | The spike being processed |
| [out] | result | The result of the pop table lookup |
| [in,out] | n_rewire | Accumulator of number of rewires |
| [in,out] | n_process_spike | Accumulator of number of processed spikes |
- Returns
- True if there's something to do
Definition at line 153 of file spike_processing.c.
◆ setup_synaptic_dma_read()
| static bool setup_synaptic_dma_read |
( |
dma_buffer * |
current_buffer, |
|
|
uint32_t * |
n_rewires, |
|
|
uint32_t * |
n_synapse_processes |
|
) |
| |
|
static |
Set up a new synaptic DMA read.
If a current_buffer is passed in, any spike found that matches the originating spike of the buffer will increment a count, and the DMA of that row will be skipped. The number of times a row should be rewired and the number of times synaptic processing should be done on a row is returned.
Calls is_something_to_do(), do_direct_row() and do_dma_read()
- Parameters
-
| [in] | current_buffer | The current buffer, if any. |
| [in,out] | n_rewires | Accumulator of number of rewires |
| [in,out] | n_synapse_processes | Accumulator of number of synapses processed |
- Returns
- Whether an actual DMA was set up or not
Definition at line 220 of file spike_processing.c.
◆ setup_synaptic_dma_write()
| static void setup_synaptic_dma_write |
( |
uint32_t |
dma_buffer_index, |
|
|
bool |
plastic_only |
|
) |
| |
|
inlinestatic |
Set up a DMA write of synaptic data.
- Parameters
-
| [in] | dma_buffer_index | Index of DMA buffer to use |
| [in] | plastic_only | If false, write the whole synaptic row. If true, only write the plastic data region of the synaptic row. |
Definition at line 260 of file spike_processing.c.
◆ multicast_packet_received_callback()
| static void multicast_packet_received_callback |
( |
uint |
key, |
|
|
uint |
unused |
|
) |
| |
|
static |
Called when a multicast packet is received.
- Parameters
-
| [in] | key | The key of the packet. The spike. |
| [in] | unused | Only specified to match API |
Definition at line 301 of file spike_processing.c.
◆ multicast_packet_pl_received_callback()
| static void multicast_packet_pl_received_callback |
( |
uint |
key, |
|
|
uint |
payload |
|
) |
| |
|
static |
Called when a multicast packet is received.
- Parameters
-
| [in] | key | The key of the packet. The spike. |
| [in] | payload | the payload of the packet. The count. |
Definition at line 311 of file spike_processing.c.
◆ dma_complete_callback()
| static void dma_complete_callback |
( |
uint |
unused, |
|
|
uint |
tag |
|
) |
| |
|
static |
Called when a DMA completes.
- Parameters
-
| unused | unused |
| [in] | tag | What sort of DMA has finished? |
Definition at line 327 of file spike_processing.c.
◆ user_event_callback()
| void user_event_callback |
( |
uint |
unused0, |
|
|
uint |
unused1 |
|
) |
| |
Called when a user event is received.
- Parameters
-
| unused0 | unused |
| unused1 | unused |
Definition at line 396 of file spike_processing.c.
◆ spike_processing_clear_input_buffer()
| void spike_processing_clear_input_buffer |
( |
timer_t |
time | ) |
|
clears the input buffer of packets
- Parameters
-
| [in] | time | The current timestep |
Definition at line 413 of file spike_processing.c.
◆ spike_processing_initialise()
| bool spike_processing_initialise |
( |
size_t |
row_max_n_bytes, |
|
|
uint |
mc_packet_callback_priority, |
|
|
uint |
user_event_priority, |
|
|
uint |
incoming_spike_buffer_size, |
|
|
bool |
clear_input_buffers_of_late_packets_init, |
|
|
uint32_t |
packets_per_timestep_region |
|
) |
| |
Initialise the spike processing system.
- Parameters
-
| [in] | row_max_n_bytes | The maximum size of a synaptic row |
| [in] | mc_packet_callback_priority | Multicast packet receive interrupt priority |
| [in] | user_event_priority | User event interrupt priority |
| [in] | incoming_spike_buffer_size | Size of buffer for receiving spikes |
| [in] | clear_input_buffers_of_late_packets_init | Whether packets that are left at the end of a time step are wiped |
| [in] | packets_per_timestep_region | The recording region to use for the packets per timestep |
- Returns
- True if initialisation succeeded
Definition at line 430 of file spike_processing.c.
◆ spike_processing_store_provenance()
Get provenance data for Spike processing.
- Parameters
-
| [in] | prov | The structure to store the provenance data in |
Definition at line 467 of file spike_processing.c.
◆ spike_processing_do_rewiring()
| bool spike_processing_do_rewiring |
( |
int |
number_of_rewires | ) |
|
Set the number of times spike_processing has to attempt rewiring.
- Parameters
-
| [in] | number_of_rewires | The number of rewires to perform |
- Returns
- currently always true
Definition at line 476 of file spike_processing.c.
◆ time
The current timer tick value.
Declare that time exists.
Definition at line 94 of file c_main.c.
◆ dma_n_rewires
The number of rewires to do when the DMA completes.
When a DMA is first set up, only this or dma_n_spikes can be 1 with the other being 0.
Definition at line 84 of file spike_processing.c.
◆ dma_n_spikes
The number of spikes to do when the DMA completes.
When a DMA is first set up, only this or dma_n_rewires can be 1 with the other being 0.
Definition at line 89 of file spike_processing.c.