sPyNNaker neural_modelling 7.1.1
Loading...
Searching...
No Matches
Data Structures | Macros | Functions
sp_structs.h File Reference

Miscellaneous structures. More...

#include <neuron/plasticity/synapse_dynamics.h>
#include <neuron/synapse_row.h>
#include <debug.h>
#include <random.h>

Go to the source code of this file.

Data Structures

struct  post_to_pre_entry
 Entry of map from post-connection to pre-connection neural indices. More...
 
struct  key_atom_info_t
 information per atom More...
 
struct  pre_info_t
 individual pre-synaptic sub-population information More...
 
struct  pre_pop_info_table_t
 table of individual pre-synaptic information More...
 
struct  rewiring_data_t
 parameters of the synaptic rewiring model More...
 
struct  current_state_t
 struct representing the current state of rewiring More...
 

Macros

#define IS_CONNECTION_LAT   1
 Flag: Is connection lateral?
 

Functions

static uint32_t rand_int (uint32_t max, mars_kiss64_seed_t seed)
 
static bool sp_structs_find_by_spike (const pre_pop_info_table_t *pre_pop_info_table, spike_t spike, uint32_t *restrict neuron_id, uint32_t *restrict population_id, uint32_t *restrict sub_population_id, uint32_t *restrict m_pop_index)
 unpack the spike into key and identifying information for the neuron; Identify pop, sub-population and low and high atoms
 
static bool sp_structs_get_sub_pop_info (const pre_pop_info_table_t *pre_pop_info_table, uint32_t population_id, uint32_t pop_neuron_id, uint32_t *restrict sub_population_id, uint32_t *restrict sub_pop_neuron_id, uint32_t *restrict spike)
 Get the sub-population id and sub-population-based neuron id given the population id and the population-based neuron id.
 
static bool sp_structs_remove_synapse (current_state_t *restrict current_state, synaptic_row_t restrict row)
 Removes a synapse from the relevant structures.
 
static bool sp_structs_add_synapse (current_state_t *restrict current_state, synaptic_row_t restrict row)
 Adds a synapse to the relevant structures.
 
static uint8_t * sp_structs_read_in_common (address_t sdram_sp_address, rewiring_data_t *rewiring_data, pre_pop_info_table_t *pre_info, post_to_pre_entry **post_to_pre_table)
 Common code for structural plasticity initialisation.
 

Detailed Description

Miscellaneous structures.

Definition in file sp_structs.h.


Data Structure Documentation

◆ post_to_pre_entry

struct post_to_pre_entry

Entry of map from post-connection to pre-connection neural indices.

Definition at line 41 of file sp_structs.h.

Data Fields
uint8_t pop_index
uint8_t sub_pop_index
uint16_t neuron_index

◆ key_atom_info_t

struct key_atom_info_t

information per atom

Definition at line 48 of file sp_structs.h.

Data Fields
uint32_t key
uint32_t mask
uint32_t n_colour_bits
uint32_t n_atoms
uint32_t lo_atom
uint32_t m_pop_index

◆ pre_info_t

struct pre_info_t

individual pre-synaptic sub-population information

Definition at line 58 of file sp_structs.h.

Data Fields
uint16_t no_pre_vertices
uint16_t sp_control
uint16_t delay_lo
uint16_t delay_hi
uint32_t weight
uint32_t connection_type
uint32_t total_no_atoms
key_atom_info_t key_atom_info[]

◆ pre_pop_info_table_t

struct pre_pop_info_table_t

table of individual pre-synaptic information

Definition at line 70 of file sp_structs.h.

Data Fields
uint32_t no_pre_pops
pre_info_t ** prepop_info

◆ rewiring_data_t

struct rewiring_data_t

parameters of the synaptic rewiring model

Definition at line 76 of file sp_structs.h.

Data Fields
uint32_t fast
uint32_t p_rew
uint32_t s_max
uint32_t app_no_atoms
uint32_t machine_no_atoms
uint32_t low_atom
uint32_t high_atom
uint32_t with_replacement
mars_kiss64_seed_t shared_seed
mars_kiss64_seed_t local_seed
uint32_t no_pre_pops

◆ current_state_t

struct current_state_t

struct representing the current state of rewiring

Definition at line 92 of file sp_structs.h.

Data Fields
mars_kiss64_seed_t * local_seed Seed referenced from rewiring data.
uint32_t post_low_atom Low atom copied from rewiring data.
uint32_t with_replacement
uint32_t pre_syn_id
uint32_t post_syn_id
uint32_t element_exists does the connection already exist
post_to_pre_entry * post_to_pre_table_entry
pre_info_t * pre_population_info
key_atom_info_t * key_atom_info
post_to_pre_entry post_to_pre
uint32_t offset offset in synaptic row (if exists)
uint16_t delay current delay (if exists)
uint16_t weight current weight (if exists)
uint32_t synapse_type synapse type

Macro Definition Documentation

◆ IS_CONNECTION_LAT

#define IS_CONNECTION_LAT   1

Flag: Is connection lateral?

Definition at line 34 of file sp_structs.h.

Function Documentation

◆ rand_int()

static uint32_t rand_int ( uint32_t  max,
mars_kiss64_seed_t  seed 
)
inlinestatic

Get a random unsigned integer up to (but not including) a given maximum

Parameters
[in]maxThe maximum value allowed
[in]seedThe random seed to use
Returns
The generated value

Definition at line 123 of file sp_structs.h.

◆ sp_structs_find_by_spike()

static bool sp_structs_find_by_spike ( const pre_pop_info_table_t pre_pop_info_table,
spike_t  spike,
uint32_t *restrict  neuron_id,
uint32_t *restrict  population_id,
uint32_t *restrict  sub_population_id,
uint32_t *restrict  m_pop_index 
)
inlinestatic

unpack the spike into key and identifying information for the neuron; Identify pop, sub-population and low and high atoms

Parameters
[in]pre_pop_info_tableThe prepopulation information table
[in]spikeThe spike to look up the information from
[out]neuron_idThe ID of the neuron within its population
[out]population_idThe population ID
[out]sub_population_idThe ID of the sub-population
[out]m_pop_indexThe master population table index
Returns
True if the information was found.

Definition at line 136 of file sp_structs.h.

◆ sp_structs_get_sub_pop_info()

static bool sp_structs_get_sub_pop_info ( const pre_pop_info_table_t pre_pop_info_table,
uint32_t  population_id,
uint32_t  pop_neuron_id,
uint32_t *restrict  sub_population_id,
uint32_t *restrict  sub_pop_neuron_id,
uint32_t *restrict  spike 
)
inlinestatic

Get the sub-population id and sub-population-based neuron id given the population id and the population-based neuron id.

Parameters
[in]pre_pop_info_tableThe prepopulation information table
[in]population_idThe population ID
[in]pop_neuron_idThe ID of the neuron within the population
[out]sub_population_idThe ID of the sub-population
[out]sub_pop_neuron_idThe ID of the neuron within the sub-population
[out]spikeThe spike associated with communication from that neuron
Returns
True if the information was found.

Definition at line 171 of file sp_structs.h.

◆ sp_structs_remove_synapse()

static bool sp_structs_remove_synapse ( current_state_t *restrict  current_state,
synaptic_row_t restrict  row 
)
inlinestatic

Removes a synapse from the relevant structures.

Parameters
[in,out]current_stateDescribes what is to be done
[in,out]rowThe row of the synaptic matrix to be updated
Returns
True if the synapse was removed

Definition at line 196 of file sp_structs.h.

◆ sp_structs_add_synapse()

static bool sp_structs_add_synapse ( current_state_t *restrict  current_state,
synaptic_row_t restrict  row 
)
inlinestatic

Adds a synapse to the relevant structures.

Parameters
[in,out]current_stateDescribes what is to be done
[in,out]rowThe row of the synaptic matrix to be updated
Returns
True if the synapse was added

Definition at line 210 of file sp_structs.h.

◆ sp_structs_read_in_common()

static uint8_t * sp_structs_read_in_common ( address_t  sdram_sp_address,
rewiring_data_t rewiring_data,
pre_pop_info_table_t pre_info,
post_to_pre_entry **  post_to_pre_table 
)
inlinestatic

Common code for structural plasticity initialisation.

Parameters
[in]sdram_sp_addressAddress of the configuration region.
[in,out]rewiring_dataAddress of the rewiring information structure to fill out.
[in,out]pre_infoThe pre-population information structure to fill out.
[out]post_to_pre_tableVariable to receive the address of the post-population-to-pre-population mapping table that this function discovers in the configuration region.
Returns
pointer to the next piece of memory after the common section of the configuration region.

Definition at line 246 of file sp_structs.h.