19#ifndef _WEIGHT_ADDITIVE_TWO_TERM_IMPL_H_
20#define _WEIGHT_ADDITIVE_TWO_TERM_IMPL_H_
33typedef struct plasticity_weight_region_data_two_term_t {
64 weight_t weight,
index_t synapse_type) {
68 accum s1615_weight = kbits(weight <<
weight_shift[synapse_type]);
71 .weight = s1615_weight,
#define decay(x, d)
This is a type-generic decay "function".
Support functions for STDP.
#define MIN(X, Y)
Minimum. Evaluates arguments twice.
#define MAX(X, Y)
Maximum. Evaluates arguments twice.
Basic definitions for STDP.
static accum mul_accum_fixed(accum a, int32_t stdp_fixed)
Multiply an accum by an STDP fixed point and return an accum.
implementation for handling the processing of synapse rows.
uint32_t * weight_shift
Plasticity multiply shift array, in DTCM.
plasticity_weight_region_data_t * plasticity_weight_region_data
Global plasticity parameter data.
static weight_state_t weight_get_initial(weight_t weight, index_t synapse_type)
Gets the initial weight state.
static weight_state_t weight_two_term_apply_depression(weight_state_t state, int32_t a2_minus, int32_t a3_minus)
Apply the depression rule to the weight state.
static weight_state_t weight_two_term_apply_potentiation(weight_state_t state, int32_t a2_plus, int32_t a3_plus)
Apply the potentiation rule to the weight state.
static weight_t weight_get_final(weight_state_t state)
Gets the final weight.
const plasticity_weight_region_data_t * weight_region
Reference to the configuration data.
accum a3_plus
Scaling factor for weight delta on potentiation.
accum a2_plus
Scaling factor for weight delta on potentiation.
accum min_weight
Minimum weight.
accum a3_minus
Scaling factor for weight delta on depression.
accum max_weight
Maximum weight.
accum a2_minus
Scaling factor for weight delta on depression.
accum weight
The starting weight.
uint32_t weight_shift
Weight shift to S1615 version.
The configuration of the rule.
The current state data for the rule.
API for dual-term weight dependence rules.