19#ifndef _TIMING_NEAREST_PAIR_IMPL_H_
20#define _TIMING_NEAREST_PAIR_IMPL_H_
66 UNUSED uint32_t time, UNUSED uint32_t
last_time,
95 uint32_t time, UNUSED
pre_trace_t trace, UNUSED uint32_t last_pre_time,
96 UNUSED
pre_trace_t last_pre_trace, uint32_t last_post_time,
101 uint32_t time_since_last_post =
time - last_post_time;
105 log_debug(
"\t\t\ttime_since_last_post=%u, decayed_o1=%d\n",
106 time_since_last_post, decayed_o1);
123 uint32_t time, UNUSED
post_trace_t trace, uint32_t last_pre_time,
124 UNUSED
pre_trace_t last_pre_trace, uint32_t last_post_time,
129 uint32_t time_since_last_pre =
time - last_pre_time;
130 uint32_t time_since_last_post =
time - last_post_time;
132 if (time_since_last_pre > 0) {
136 log_debug(
"\t\t\ttime_since_last_pre=%u, decayed_r1=%d\n",
137 time_since_last_pre, decayed_r1);
139 if (time_since_last_post < time_since_last_pre) {
140 log_debug(
"\t\t\tSetting trace to zero as not first pre-post pairing");
147 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.
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.
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.