|
sPyNNaker neural_modelling 7.4.2
|
Recording of the state of a neuron (spiking, voltage, etc.) More...
#include <common/neuron-typedefs.h>#include <bit_field.h>#include <recording.h>#include <wfi.h>#include <stddef.h>Go to the source code of this file.
Data Structures | |
| struct | recording_values_t |
| A struct of the different types of recorded data. More... | |
| struct | bitfield_values_t |
| A struct for bitfield data. More... | |
| struct | recording_info_t |
| A struct for information for a non-bitfield recording. More... | |
| struct | bitfield_info_t |
| A struct for information on a bitfield recording. More... | |
| struct | neuron_recording_header_t |
| The heading of the neuron recording region. More... | |
Macros | |
| #define | FLOOR_TO_2 0xFFFFFFFE |
| When bitwise anded with a number will floor to the nearest multiple of 2. | |
| #define | CEIL_TO_2 1 |
| Add to a number before applying floor to 2 to turn it into a ceil operation. | |
Functions | |
| static void | neuron_recording_record_value (uint32_t var_index, uint32_t neuron_index, void *value) |
| stores a recording of a value of any type, except bitfield; use the functions below for common types as these will be faster. | |
| static void | neuron_recording_record_accum (uint32_t var_index, uint32_t neuron_index, accum value) |
| stores a recording of an accum variable only; this is faster than neuron_recording_record_value for this type | |
| static void | neuron_recording_record_double (uint32_t var_index, uint32_t neuron_index, double value) |
| stores a recording of a double variable only; this is faster than neuron_recording_record_value for this type | |
| static void | neuron_recording_record_float (uint32_t var_index, uint32_t neuron_index, float value) |
| stores a recording of a float variable only; this is faster than neuron_recording_record_value for this type | |
| static void | neuron_recording_record_int32 (uint32_t var_index, uint32_t neuron_index, int32_t value) |
| stores a recording of an int32_t variable only; this is faster than neuron_recording_record_value for this type | |
| static void | neuron_recording_record_bit (uint32_t var_index, uint32_t neuron_index) |
| stores a recording of a set bit; this is the only way to set a bit in a bitfield; neuron_recording_record_value doesn't work for this! | |
| static void | neuron_recording_record (uint32_t time) |
| does the recording process of handing over to basic recording | |
| static void | neuron_recording_setup_for_next_recording (void) |
| sets up state for next recording. | |
| static void | reset_record_counter (void) |
| resets all states back to start state. | |
| static uint32_t | bitfield_data_size (uint32_t n_neurons) |
| the number of bytes used in bitfield recording for n_neurons | |
| static bool | neuron_recording_read_in_elements (void *recording_address, uint32_t n_neurons) |
| reads recording data from SDRAM | |
| bool | neuron_recording_reset (uint32_t n_neurons) |
| reads recording data from sdram on reset. | |
| static bool | allocate_word_dtcm (uint32_t n_neurons) |
| handles all the DTCM allocations for recording words | |
| static bool | allocate_bitfield_dtcm (uint32_t n_neurons) |
| handles all the DTCM allocations for recording bitfields | |
| bool | neuron_recording_initialise (void *recording_address, uint32_t n_neurons, uint32_t *n_rec_regions_used) |
| sets up the recording stuff | |
Variables | |
| static uint16_t ** | neuron_recording_indexes |
| The index to record each variable to for each neuron. | |
| static uint16_t ** | bitfield_recording_indexes |
| The index to record each bitfield variable to for each neuron. | |
| static recording_info_t * | recording_info |
| An array of recording information structures. | |
| static bitfield_info_t * | bitfield_info |
| An array of bitfield information structures. | |
| static uint8_t ** | recording_values |
| An array of spaces into which recording values can be written. | |
| static uint32_t ** | bitfield_values |
| An array of spaces into which bitfields can be written. | |
| static volatile uint32_t | n_recordings_outstanding = 0 |
| The number of recordings outstanding. | |
| static void * | reset_address |
| The address of the recording region to read on reset. | |
Recording of the state of a neuron (spiking, voltage, etc.)
Definition in file neuron_recording.h.
| struct recording_values_t |
A struct of the different types of recorded data.
Definition at line 31 of file neuron_recording.h.
| Data Fields | ||
|---|---|---|
| uint32_t | time | |
| uint8_t | data[] | |
| struct bitfield_values_t |
A struct for bitfield data.
Definition at line 37 of file neuron_recording.h.
| Data Fields | ||
|---|---|---|
| uint32_t | time | |
| uint32_t | bits[] | |
| struct recording_info_t |
A struct for information for a non-bitfield recording.
Definition at line 43 of file neuron_recording.h.
| Data Fields | ||
|---|---|---|
| uint32_t | element_size | |
| uint32_t | rate | |
| uint32_t | count | |
| uint32_t | increment | |
| uint32_t | size | |
| recording_values_t * | values | |
| struct bitfield_info_t |
A struct for information on a bitfield recording.
Definition at line 53 of file neuron_recording.h.
| Data Fields | ||
|---|---|---|
| uint32_t | rate | |
| uint32_t | count | |
| uint32_t | increment | |
| uint32_t | size | |
| uint32_t | n_words | |
| bitfield_values_t * | values | |
| struct neuron_recording_header_t |
The heading of the neuron recording region.
Definition at line 440 of file neuron_recording.h.
| Data Fields | ||
|---|---|---|
| uint32_t | n_recorded_vars | The number of word-sized variables to record. |
| uint32_t | n_bitfield_vars | The number of bitfield variables to record. |
| #define FLOOR_TO_2 0xFFFFFFFE |
When bitwise anded with a number will floor to the nearest multiple of 2.
Definition at line 87 of file neuron_recording.h.
| #define CEIL_TO_2 1 |
Add to a number before applying floor to 2 to turn it into a ceil operation.
Definition at line 90 of file neuron_recording.h.
|
inlinestatic |
stores a recording of a value of any type, except bitfield; use the functions below for common types as these will be faster.
| [in] | var_index | which recording variable to write this is |
| [in] | neuron_index | the neuron id for this recorded data |
| [in] | value | pointer to the value to record for this neuron. |
Definition at line 97 of file neuron_recording.h.
|
inlinestatic |
stores a recording of an accum variable only; this is faster than neuron_recording_record_value for this type
| [in] | var_index | which recording variable to write this is |
| [in] | neuron_index | the neuron id for this recorded data |
| [in] | value | the results to record for this neuron. |
Definition at line 110 of file neuron_recording.h.
|
inlinestatic |
stores a recording of a double variable only; this is faster than neuron_recording_record_value for this type
| [in] | var_index | which recording variable to write this is |
| [in] | neuron_index | the neuron id for this recorded data |
| [in] | value | the results to record for this neuron. |
Definition at line 122 of file neuron_recording.h.
|
inlinestatic |
stores a recording of a float variable only; this is faster than neuron_recording_record_value for this type
| [in] | var_index | which recording variable to write this is |
| [in] | neuron_index | the neuron id for this recorded data |
| [in] | value | the results to record for this neuron. |
Definition at line 134 of file neuron_recording.h.
|
inlinestatic |
stores a recording of an int32_t variable only; this is faster than neuron_recording_record_value for this type
| [in] | var_index | which recording variable to write this is |
| [in] | neuron_index | the neuron id for this recorded data |
| [in] | value | the results to record for this neuron. |
Definition at line 146 of file neuron_recording.h.
|
inlinestatic |
stores a recording of a set bit; this is the only way to set a bit in a bitfield; neuron_recording_record_value doesn't work for this!
| [in] | var_index | which bitfield recording variable to write this is |
| [in] | neuron_index | which neuron to set the bit for |
Definition at line 157 of file neuron_recording.h.
|
inlinestatic |
does the recording process of handing over to basic recording
| [in] | time | the time to put into the recording stamps. |
Definition at line 166 of file neuron_recording.h.
|
inlinestatic |
sets up state for next recording.
Definition at line 207 of file neuron_recording.h.
|
static |
resets all states back to start state.
Definition at line 218 of file neuron_recording.h.
|
inlinestatic |
the number of bytes used in bitfield recording for n_neurons
| [in] | n_neurons | The number of neurons to create a bitfield for |
Definition at line 258 of file neuron_recording.h.
|
static |
reads recording data from SDRAM
| [in] | recording_address | SDRAM location for the recording data |
| [in] | n_neurons | the number of neurons to setup for |
Definition at line 266 of file neuron_recording.h.
| bool neuron_recording_reset | ( | uint32_t | n_neurons | ) |
reads recording data from sdram on reset.
| [in] | n_neurons | the number of neurons to setup for |
Definition at line 350 of file neuron_recording.h.
|
inlinestatic |
handles all the DTCM allocations for recording words
| [in] | n_neurons | how many neurons to set DTCM for |
Definition at line 361 of file neuron_recording.h.
|
inlinestatic |
handles all the DTCM allocations for recording bitfields
| [in] | n_neurons | how many neurons to set DTCM for |
Definition at line 401 of file neuron_recording.h.
| bool neuron_recording_initialise | ( | void * | recording_address, |
| uint32_t | n_neurons, | ||
| uint32_t * | n_rec_regions_used | ||
| ) |
sets up the recording stuff
| [in] | recording_address | sdram location for the recording data |
| [in] | n_neurons | the number of neurons to setup for |
| [out] | n_rec_regions_used | Output the number of regions used by neuron recording |
Definition at line 453 of file neuron_recording.h.
|
static |
The index to record each variable to for each neuron.
Definition at line 63 of file neuron_recording.h.
|
static |
The index to record each bitfield variable to for each neuron.
Definition at line 66 of file neuron_recording.h.
|
static |
An array of recording information structures.
Definition at line 69 of file neuron_recording.h.
|
static |
An array of bitfield information structures.
Definition at line 72 of file neuron_recording.h.
|
static |
An array of spaces into which recording values can be written.
Definition at line 75 of file neuron_recording.h.
|
static |
An array of spaces into which bitfields can be written.
Definition at line 78 of file neuron_recording.h.
|
static |
The number of recordings outstanding.
Definition at line 81 of file neuron_recording.h.
|
static |
The address of the recording region to read on reset.
Definition at line 84 of file neuron_recording.h.