sPyNNaker neural_modelling 7.3.1
Loading...
Searching...
No Matches
Data Structures | Functions | Variables
matrix_generator_neuromodulation.h File Reference

Neuromodulation synaptic matrix implementation. More...

#include <stdbool.h>
#include <debug.h>
#include <delay_extension/delay_extension.h>
#include "matrix_generator_common.h"
#include <synapse_expander/generator_types.h>
#include <utils.h>

Go to the source code of this file.

Data Structures

struct  matrix_generator_neuromodulation
 
struct  row_nm_plastic_t
 The layout of the initial plastic synapse part of the row. More...
 
struct  row_nm_fixed_t
 The layout of the fixed synapse region of the row; the fixed-fixed region is empty. More...
 
union  matrix_generator_neuromodulation.__unnamed19__
 

Functions

static row_nm_plastic_tget_nm_row (uint32_t *synaptic_matrix, uint32_t max_row_n_words, uint32_t pre_index)
 Get a synaptic row for a given neuron.
 
static row_nm_fixed_tget_nm_fixed_row (row_nm_plastic_t *plastic_row)
 Get the fixed part of a row that comes after the plastic part.
 
static void setup_nm_rows (uint32_t *matrix, uint32_t n_rows, uint32_t max_row_n_words, uint32_t is_reward, uint32_t synapse_type)
 Set up the rows so that they are ready for writing to.
 
void * matrix_generator_neuromodulation_initialize (void **region, void *synaptic_matrix)
 Initialise the Neuromodulation synaptic matrix generator.
 
void matrix_generator_neuromodulation_free (void *generator)
 Free any data for the STDP synaptic matrix generator.
 
static bool matrix_generator_neuromodulation_write_synapse (void *generator, uint32_t pre_index, uint16_t post_index, accum weight, uint16_t delay, unsigned long accum weight_scale)
 

Variables

static const unsigned long accum WEIGHT_SCALE = 2048.0ulk
 

Detailed Description

Neuromodulation synaptic matrix implementation.

Definition in file matrix_generator_neuromodulation.h.


Data Structure Documentation

◆ matrix_generator_neuromodulation

struct matrix_generator_neuromodulation

Definition at line 29 of file matrix_generator_neuromodulation.h.

Data Fields
union matrix_generator_neuromodulation.__unnamed19__ __unnamed__
uint32_t max_row_n_words
uint32_t max_row_n_synapses
uint32_t n_pre_neurons
uint32_t is_reward
uint32_t synapse_type

◆ row_nm_plastic_t

struct row_nm_plastic_t

The layout of the initial plastic synapse part of the row.

Definition at line 44 of file matrix_generator_neuromodulation.h.

Data Fields
uint32_t plastic_plastic_size the plastic-plastic size within the row
uint32_t synapse_type:30 the synapse type of the row
uint32_t is_reward:1 is the row reward
uint32_t is_neuromodulation:1 is the row neuromodulation

◆ row_nm_fixed_t

struct row_nm_fixed_t

The layout of the fixed synapse region of the row; the fixed-fixed region is empty.

Definition at line 52 of file matrix_generator_neuromodulation.h.

Data Fields
uint32_t fixed_fixed_size the fixed-fixed size within the fixed region
uint32_t fixed_plastic_size the fixed-plastic size within the fixed region
uint32_t fixed_plastic_data[] the fixed-plastic data within the fixed region

◆ matrix_generator_neuromodulation.__unnamed19__

union matrix_generator_neuromodulation.__unnamed19__

Definition at line 30 of file matrix_generator_neuromodulation.h.

Data Fields
uint32_t * synaptic_matrix The address of the synaptic matrix (once initialised)
uint32_t synaptic_matrix_offset The offset of the synaptic matrix (as read from SDRAM)

Function Documentation

◆ get_nm_row()

static row_nm_plastic_t * get_nm_row ( uint32_t *  synaptic_matrix,
uint32_t  max_row_n_words,
uint32_t  pre_index 
)
static

Get a synaptic row for a given neuron.

Parameters
[in]synaptic_matrixthe address of the synaptic matrix
[in]max_row_n_wordsthe maximum number of words (excluding headers) in each row of the table
[in]pre_indexthe index of the pre-neuron relative to the start of the matrix
Returns
A pointer to the row of the matrix to write to

Definition at line 71 of file matrix_generator_neuromodulation.h.

◆ get_nm_fixed_row()

static row_nm_fixed_t * get_nm_fixed_row ( row_nm_plastic_t plastic_row)
static

Get the fixed part of a row that comes after the plastic part.

Parameters
[in]plastic_rowA pointer to the row to find the fixed part of
Returns
A pointer to the fixed part of the matrix to write to

Definition at line 82 of file matrix_generator_neuromodulation.h.

◆ setup_nm_rows()

static void setup_nm_rows ( uint32_t *  matrix,
uint32_t  n_rows,
uint32_t  max_row_n_words,
uint32_t  is_reward,
uint32_t  synapse_type 
)
static

Set up the rows so that they are ready for writing to.

Parameters
[in]matrixThe base address of the matrix to set up
[in]n_rowsThe number of rows in the matrix
[in]max_row_n_wordsThe maximum number of words used by a row

Definition at line 92 of file matrix_generator_neuromodulation.h.

◆ matrix_generator_neuromodulation_initialize()

void * matrix_generator_neuromodulation_initialize ( void **  region,
void *  synaptic_matrix 
)

Initialise the Neuromodulation synaptic matrix generator.

Parameters
[in,out]regionRegion to read parameters from. Should be updated to position just after parameters after calling.
[in]synaptic_matrixThe base address of the synaptic matrix
Returns
A data item to be passed in to other functions later on

Definition at line 115 of file matrix_generator_neuromodulation.h.

◆ matrix_generator_neuromodulation_free()

void matrix_generator_neuromodulation_free ( void *  generator)

Free any data for the STDP synaptic matrix generator.

Parameters
[in]generatorThe generator to free

Definition at line 139 of file matrix_generator_neuromodulation.h.

◆ matrix_generator_neuromodulation_write_synapse()

static bool matrix_generator_neuromodulation_write_synapse ( void *  generator,
uint32_t  pre_index,
uint16_t  post_index,
accum  weight,
uint16_t  delay,
unsigned long accum  weight_scale 
)
static

Definition at line 143 of file matrix_generator_neuromodulation.h.

Variable Documentation

◆ WEIGHT_SCALE

const unsigned long accum WEIGHT_SCALE = 2048.0ulk
static

Definition at line 60 of file matrix_generator_neuromodulation.h.