19#ifndef _TIMING_PAIR_IMPL_H_
20#define _TIMING_PAIR_IMPL_H_
71 int16_t decayed_o1_trace = timing_decay_post(
time,
last_time, last_trace);
101 log_debug(
"\tdelta_time=%u, r1=%d\n", delta_time, new_r1_trace);
119 uint32_t time, UNUSED
pre_trace_t trace, UNUSED uint32_t last_pre_time,
120 UNUSED
pre_trace_t last_pre_trace, uint32_t last_post_time,
125 uint32_t time_since_last_post =
time - last_post_time;
129 log_debug(
"\t\t\ttime_since_last_post_event=%u, decayed_o1=%d\n",
130 time_since_last_post, decayed_o1);
147 uint32_t time, UNUSED
post_trace_t trace, uint32_t last_pre_time,
148 pre_trace_t last_pre_trace, UNUSED uint32_t last_post_time,
153 uint32_t time_since_last_pre =
time - last_pre_time;
154 if (time_since_last_pre > 0) {
158 log_debug(
"\t\t\ttime_since_last_pre_event=%u, decayed_r1=%d\n",
159 time_since_last_pre, decayed_r1);
164 return previous_state;
uint32_t time
The current timer tick value.
void log_debug(const char *message,...)
uint32_t last_time
The time of the most recently-considered spike.
Support functions for STDP.
static int32_t maths_lut_exponential_decay(uint32_t time, const int16_lut *lut)
Get value from lookup table.
Lookup Table of 16-bit integers.
Basic definitions for STDP.
#define STDP_FIXED_POINT_ONE
The number 1.0 in the fixed point math used by STDP.
#define STDP_FIXED_MUL_16X16(a, b)
Multiply two STDP fixed point numbers.
Synapses just hold weight.
int16_lut * tau_minus_lookup
Lookup table for τ- exponential decay.
int16_lut * tau_plus_lookup
Lookup table for τ+ exponential decay.
static post_trace_t timing_add_post_spike(uint32_t time, uint32_t last_time, post_trace_t last_trace)
Add a post spike to the post trace.
static update_state_t timing_apply_pre_spike(uint32_t time, pre_trace_t trace, uint32_t last_pre_time, pre_trace_t last_pre_trace, uint32_t last_post_time, post_trace_t last_post_trace, update_state_t previous_state)
Apply a pre-spike timing rule state update.
static pre_trace_t timing_add_pre_spike(uint32_t time, uint32_t last_time, pre_trace_t last_trace)
Add a pre spike to the pre trace.
int16_t post_trace_t
The type of post-spike traces.
int16_t pre_trace_t
The type of pre-spike traces.
static update_state_t timing_apply_post_spike(uint32_t time, post_trace_t trace, uint32_t last_pre_time, pre_trace_t last_pre_trace, uint32_t last_post_time, post_trace_t last_post_trace, update_state_t previous_state)
Apply a post-spike timing rule state update.
static post_trace_t timing_get_initial_post_trace(void)
Get an initial post-synaptic timing trace.
The type of post-spike traces.
The type of pre-spike traces.
static weight_state_t weight_one_term_apply_depression(weight_state_t state, int32_t a2_minus)
Apply the depression rule to the weight state.
static weight_state_t weight_one_term_apply_potentiation(weight_state_t state, int32_t a2_plus)
Apply the potentiation rule to the weight state.
API for single-term weight dependence rules.