sPyNNaker neural_modelling 7.3.1
Loading...
Searching...
No Matches
Enumerations | Functions | Variables
neuron_impl_standard.h File Reference

Inlined neuron implementation following standard component model. More...

#include "neuron_impl.h"
#include <neuron/models/neuron_model.h>
#include <neuron/input_types/input_type.h>
#include <neuron/additional_inputs/additional_input.h>
#include <neuron/threshold_types/threshold_type.h>
#include <neuron/synapse_types/synapse_types.h>
#include <neuron/current_sources/current_source.h>
#include <debug.h>
#include <bit_field.h>
#include <recording.h>
#include <neuron/neuron_recording.h>

Go to the source code of this file.

Enumerations

enum  word_recording_indices { V_RECORDING_INDEX = 0 , GSYN_EXC_RECORDING_INDEX = 1 , GSYN_INH_RECORDING_INDEX = 2 , N_RECORDED_VARS = 3 }
 Indices for recording of words. More...
 
enum  bitfield_recording_indices { SPIKE_RECORDING_BITFIELD = 0 , N_BITFIELD_VARS = 1 }
 Indices for recording of bitfields. More...
 

Functions

static bool neuron_impl_initialise (uint32_t n_neurons)
 Initialise the particular implementation of the data.
 
static void neuron_impl_add_inputs (index_t synapse_type_index, index_t neuron_index, input_t weights_this_timestep)
 Add inputs to the neuron.
 
static uint32_t n_words_needed (size_t size)
 The number of words required to hold an object of given size.
 
static void neuron_impl_load_neuron_parameters (address_t address, uint32_t next, uint32_t n_neurons, address_t save_initial_state)
 Load in the neuron parameters.
 
static void neuron_impl_do_timestep_update (uint32_t timer_count, uint32_t time, uint32_t n_neurons)
 Do the timestep update for the particular implementation.
 
static void neuron_impl_store_neuron_parameters (address_t address, uint32_t next, uint32_t n_neurons)
 Stores neuron parameters back into SDRAM.
 
void neuron_impl_print_inputs (uint32_t n_neurons)
 Print the inputs to the neurons.
 
void neuron_impl_print_synapse_parameters (uint32_t n_neurons)
 Print the synapse parameters of the neurons.
 
const char * neuron_impl_get_synapse_type_char (uint32_t synapse_type)
 Get the synapse type character for a synapse type.
 

Variables

static neuron_tneuron_array
 Array of neuron states.
 
static input_type_tinput_type_array
 Input states array.
 
static additional_input_tadditional_input_array
 Additional input array.
 
static threshold_type_tthreshold_type_array
 Threshold states array.
 
static synapse_types_tsynapse_types_array
 The synapse shaping parameters.
 
static uint n_steps_per_timestep
 The number of steps to run per timestep.
 

Detailed Description

Inlined neuron implementation following standard component model.

Definition in file neuron_impl_standard.h.

Enumeration Type Documentation

◆ word_recording_indices

Indices for recording of words.

Enumerator
V_RECORDING_INDEX 

V (somatic potential) recording index.

GSYN_EXC_RECORDING_INDEX 

Gsyn_exc (excitatory synaptic conductance/current) recording index.

GSYN_INH_RECORDING_INDEX 

Gsyn_inh (excitatory synaptic conductance/current) recording index.

N_RECORDED_VARS 

Number of recorded word-sized state variables.

Definition at line 39 of file neuron_impl_standard.h.

◆ bitfield_recording_indices

Indices for recording of bitfields.

Enumerator
SPIKE_RECORDING_BITFIELD 

Spike event recording index.

N_BITFIELD_VARS 

Number of recorded bitfields.

Definition at line 51 of file neuron_impl_standard.h.

Function Documentation

◆ neuron_impl_initialise()

static bool neuron_impl_initialise ( uint32_t  n_neurons)
static

Initialise the particular implementation of the data.

Parameters
[in]n_neuronsThe number of neurons
Returns
True if successful

Definition at line 83 of file neuron_impl_standard.h.

◆ neuron_impl_add_inputs()

static void neuron_impl_add_inputs ( index_t  synapse_type_index,
index_t  neuron_index,
input_t  weights_this_timestep 
)
static

Add inputs to the neuron.

Parameters
[in]synapse_type_indexthe synapse type (e.g. exc. or inh.)
[in]neuron_indexthe index of the neuron
[in]weights_this_timestepweight inputs to be added

Definition at line 142 of file neuron_impl_standard.h.

◆ n_words_needed()

static uint32_t n_words_needed ( size_t  size)
static

The number of words required to hold an object of given size.

Parameters
[in]sizeThe size of object
Returns
Number of words needed to hold the object (not bytes!)

Definition at line 154 of file neuron_impl_standard.h.

◆ neuron_impl_load_neuron_parameters()

static void neuron_impl_load_neuron_parameters ( address_t  address,
uint32_t  next,
uint32_t  n_neurons,
address_t  save_initial_state 
)
static

Load in the neuron parameters.

Parameters
[in]addressSDRAM block to read parameters from
[in]nextOffset of next address in store
[in]n_neuronsnumber of neurons
[in]save_initial_stateIf not 0, SDRAM block to copy parameters to

Definition at line 164 of file neuron_impl_standard.h.

◆ neuron_impl_do_timestep_update()

static void neuron_impl_do_timestep_update ( uint32_t  timer_count,
uint32_t  time,
uint32_t  n_neurons 
)
static

Do the timestep update for the particular implementation.

Parameters
[in]timer_countThe timer count, used for TDMA packet spreading
[in]timeThe time step of the update
[in]n_neuronsThe number of neurons

Definition at line 239 of file neuron_impl_standard.h.

◆ neuron_impl_store_neuron_parameters()

static void neuron_impl_store_neuron_parameters ( address_t  address,
uint32_t  next,
uint32_t  n_neurons 
)
static

Stores neuron parameters back into SDRAM.

Parameters
[out]addressthe address in SDRAM to start the store
[in]nextOffset of next address in store
[in]n_neuronsnumber of neurons

Definition at line 351 of file neuron_impl_standard.h.

◆ neuron_impl_print_inputs()

void neuron_impl_print_inputs ( uint32_t  n_neurons)

Print the inputs to the neurons.

Parameters
[in]n_neuronsThe number of neurons

Definition at line 402 of file neuron_impl_standard.h.

◆ neuron_impl_print_synapse_parameters()

void neuron_impl_print_synapse_parameters ( uint32_t  n_neurons)

Print the synapse parameters of the neurons.

Parameters
[in]n_neuronsThe number of neurons

Definition at line 433 of file neuron_impl_standard.h.

◆ neuron_impl_get_synapse_type_char()

const char * neuron_impl_get_synapse_type_char ( uint32_t  synapse_type)

Get the synapse type character for a synapse type.

Parameters
[in]synapse_typeThe synapse type
Returns
The descriptor character (sometimes two characters)

Definition at line 443 of file neuron_impl_standard.h.

Variable Documentation

◆ neuron_array

neuron_t* neuron_array
static

Array of neuron states.

Definition at line 62 of file neuron_impl_standard.h.

◆ input_type_array

input_type_t* input_type_array
static

Input states array.

Definition at line 65 of file neuron_impl_standard.h.

◆ additional_input_array

additional_input_t* additional_input_array
static

Additional input array.

Definition at line 68 of file neuron_impl_standard.h.

◆ threshold_type_array

threshold_type_t* threshold_type_array
static

Threshold states array.

Definition at line 71 of file neuron_impl_standard.h.

◆ synapse_types_array

synapse_types_t* synapse_types_array
static

The synapse shaping parameters.

Definition at line 74 of file neuron_impl_standard.h.

◆ n_steps_per_timestep

uint n_steps_per_timestep
static

The number of steps to run per timestep.

Definition at line 77 of file neuron_impl_standard.h.