implementation of the neuron.h interface.
More...
Go to the source code of this file.
implementation of the neuron.h interface.
Definition in file neuron.c.
◆ neuron_core_parameters
struct neuron_core_parameters |
parameters that reside in the neuron_parameter_data_region
Definition at line 69 of file neuron.c.
Data Fields |
uint32_t |
has_key |
|
uint32_t |
n_neurons_to_simulate |
|
uint32_t |
n_neurons_peak |
|
uint32_t |
n_colour_bits |
|
uint32_t |
n_synapse_types |
|
uint32_t |
ring_buffer_shifts[] |
|
◆ neuron_load_neuron_parameters()
static bool neuron_load_neuron_parameters |
( |
uint32_t |
time | ) |
|
|
static |
does the memory copy for the neuron parameters
- Parameters
-
[in] | time | the current time step |
- Returns
- true if the memory copies worked, false otherwise
Definition at line 83 of file neuron.c.
◆ neuron_resume()
bool neuron_resume |
( |
uint32_t |
time | ) |
|
Prepare to resume simulation of the neurons.
- Parameters
-
[in] | time | The time of the resume |
- Returns
- bool which is true if the resume was successful or not
Definition at line 93 of file neuron.c.
◆ neuron_initialise()
bool neuron_initialise |
( |
void * |
core_params_address, |
|
|
void * |
neuron_params_address, |
|
|
void * |
current_sources_address, |
|
|
void * |
recording_address, |
|
|
void * |
initial_values_address, |
|
|
uint32_t * |
n_rec_regions_used |
|
) |
| |
translate the data stored in the NEURON_PARAMS data region in SDRAM and convert it into c based objects for use.
- Parameters
-
[in] | core_params_address | the absolute address in SDRAM for the start of the core parameters data region in SDRAM |
[in] | neuron_params_address | The absolute address in SDRAM for the start of the neuron parameters data region in SDRAM |
[in] | current_sources_address | The absolute address in SDRAM for the start of the current sources data region in SDRAM |
[in] | recording_address | the recording parameters in SDRAM (contains which regions are active and how big they are) |
[in] | initial_values_address | The address where initial values can be written to for later reading. |
[out] | n_rec_regions_used | The number of regions used by neuron recording |
- Returns
- True if the translation was successful, otherwise False
Definition at line 105 of file neuron.c.
◆ neuron_pause()
void neuron_pause |
( |
void |
| ) |
|
Perform steps needed before pausing a simulation.
Stores neuron parameters back into SDRAM.
Definition at line 184 of file neuron.c.
◆ neuron_do_timestep_update()
void neuron_do_timestep_update |
( |
timer_t |
time, |
|
|
uint |
timer_count |
|
) |
| |
executes all the updates to neural parameters when a given timer period has occurred.
- Parameters
-
[in] | time | the timer tick value currently being executed |
[in] | timer_count | used for detecting a wrapping timer |
Definition at line 190 of file neuron.c.
◆ neuron_transfer()
void neuron_transfer |
( |
weight_t * |
syns | ) |
|
Add inputs to the neurons.
- Parameters
-
[in] | syns | The inputs to be added; this is an array of size n_synapse_types * 2^ceil(log_2(n_neurons)). |
Definition at line 204 of file neuron.c.
◆ neuron_print_inputs()
void neuron_print_inputs |
( |
void |
| ) |
|
Print the inputs to the neurons.
Only available in debug mode.
Definition at line 230 of file neuron.c.
◆ neuron_print_synapse_parameters()
void neuron_print_synapse_parameters |
( |
void |
| ) |
|
Print the neurons' synapse parameters.
Only available in debug mode.
Definition at line 234 of file neuron.c.
◆ neuron_get_synapse_type_char()
const char * neuron_get_synapse_type_char |
( |
uint32_t |
synapse_type | ) |
|
Get the synapse type description character.
Only available in debug mode.
- Parameters
-
[in] | synapse_type | The synapse type. |
- Returns
- a single character that describes the synapse.
Definition at line 238 of file neuron.c.
◆ neuron_keys
The keys to be used by the neurons (one per neuron)
Keys for each neuron.
Definition at line 29 of file neuron.c.
◆ use_key
Whether to use key from neuron.c.
A checker that says if this model should be transmitting. If set to false by the data region, then this model should not have a key.
Definition at line 33 of file neuron.c.
◆ latest_send_time
uint32_t latest_send_time = 0xFFFFFFFF |
Latest time in a timestep that any neuron has sent a spike.
Latest time from neuron.c.
Definition at line 36 of file neuron.c.
◆ earliest_send_time
uint32_t earliest_send_time = 0 |
Earliest time in a timestep that any neuron has sent a spike.
Earliest time from neuron.c.
Definition at line 39 of file neuron.c.
◆ colour
The colour of the time step to handle delayed spikes.
The time step colour to account for delay.
Definition at line 42 of file neuron.c.
◆ n_neurons
The number of neurons on the core.
Definition at line 45 of file neuron.c.
◆ n_neurons_peak
The closest power of 2 >= n_neurons.
Definition at line 48 of file neuron.c.
◆ n_synapse_types
The number of synapse types.
Definition at line 51 of file neuron.c.
◆ colour_mask
The mask of the colour.
Definition at line 54 of file neuron.c.
◆ ring_buffer_to_input_left_shifts
uint32_t* ring_buffer_to_input_left_shifts |
|
static |
Amount to left shift the ring buffer by to make it an input.
Definition at line 57 of file neuron.c.
◆ saved_neuron_params_address
void* saved_neuron_params_address |
|
static |
The address where the actual neuron parameters start.
Definition at line 60 of file neuron.c.
◆ current_source_address
void* current_source_address |
|
static |
The address for the current source parameters.
Definition at line 63 of file neuron.c.
◆ saved_initial_values_address
void* saved_initial_values_address |
|
static |
The address to save initial values to.
Definition at line 66 of file neuron.c.