sPyNNaker neural_modelling 7.1.1
Loading...
Searching...
No Matches
Data Structures | Enumerations | Functions | Variables
neuron_impl_external_devices.h File Reference

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

#include "neuron_impl.h"
#include <neuron/models/neuron_model_lif_impl.h>
#include <neuron/synapse_types/synapse_types_exponential_impl.h>
#include <neuron/input_types/input_type_current.h>
#include <neuron/current_sources/current_source_impl.h>
#include <neuron/current_sources/current_source.h>
#include <debug.h>
#include <neuron/neuron_recording.h>

Go to the source code of this file.

Data Structures

struct  packet_firing_data_t
 The definition of the threshold. More...
 

Enumerations

enum  send_type {
  SEND_TYPE_INT = 0 , SEND_TYPE_UINT , SEND_TYPE_ACCUM , SEND_TYPE_UACCUM ,
  SEND_TYPE_FRACT , SEND_TYPE_UFRACT
}
 What sort of message payload should we send? More...
 
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 { PACKET_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)
 
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 packet_firing_data_tpacket_firing_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_external_devices.h.


Data Structure Documentation

◆ packet_firing_data_t

struct packet_firing_data_t

The definition of the threshold.

Definition at line 48 of file neuron_impl_external_devices.h.

Data Fields
uint32_t key The key to send to update the value.
uint32_t value_as_payload

A scaling factor (>0) if the value is to be sent as payload, False (0) if just the key

accum min_value

The minimum allowed value to send as the payload. Values below are clipped to this value

accum max_value

The maximum allowed value to send as the payload. Values above are clipped to this value

uint32_t timesteps_between_sending The time between sending the value.
uint32_t time_until_next_send The time until the next sending of the value (initially 0)
enum send_type type Send type.

Enumeration Type Documentation

◆ send_type

enum send_type

What sort of message payload should we send?

Enumerator
SEND_TYPE_INT 

Message payload is an int32_t

SEND_TYPE_UINT 

Message payload is an uint32_t

SEND_TYPE_ACCUM 

Message payload is an accum

SEND_TYPE_UACCUM 

Message payload is an unsigned accum

SEND_TYPE_FRACT 

Message payload is a fract

SEND_TYPE_UFRACT 

Message payload is an unsigned fract

Definition at line 25 of file neuron_impl_external_devices.h.

◆ 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 69 of file neuron_impl_external_devices.h.

◆ bitfield_recording_indices

Indices for recording of bitfields.

Enumerator
PACKET_RECORDING_BITFIELD 

Spike event recording index.

N_BITFIELD_VARS 

Number of recorded bitfields.

Definition at line 81 of file neuron_impl_external_devices.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 144 of file neuron_impl_external_devices.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 179 of file neuron_impl_external_devices.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 191 of file neuron_impl_external_devices.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

Definition at line 196 of file neuron_impl_external_devices.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 257 of file neuron_impl_external_devices.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 361 of file neuron_impl_external_devices.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 387 of file neuron_impl_external_devices.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 417 of file neuron_impl_external_devices.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 427 of file neuron_impl_external_devices.h.

Variable Documentation

◆ neuron_array

neuron_t* neuron_array
static

Array of neuron states.

Definition at line 92 of file neuron_impl_external_devices.h.

◆ packet_firing_array

packet_firing_data_t* packet_firing_array
static

Threshold states array.

Definition at line 95 of file neuron_impl_external_devices.h.

◆ synapse_types_array

synapse_types_t* synapse_types_array
static

The synapse shaping parameters.

Definition at line 98 of file neuron_impl_external_devices.h.

◆ n_steps_per_timestep

uint n_steps_per_timestep
static

The number of steps to run per timestep.

Definition at line 101 of file neuron_impl_external_devices.h.