sPyNNaker neural_modelling 7.2.2
Loading...
Searching...
No Matches
Enumerations | Functions
timing_recurrent_common.h File Reference

Common code for recurrent timing rules. More...

#include "timing.h"
#include <neuron/plasticity/stdp/weight_dependence/weight_one_term.h>
#include <debug.h>
#include <neuron/plasticity/stdp/maths.h>
#include <neuron/plasticity/stdp/stdp_typedefs.h>
#include "random_util.h"

Go to the source code of this file.

Enumerations

enum  recurrent_state_machine_state_t { STATE_IDLE , STATE_PRE_OPEN , STATE_POST_OPEN }
 Synapse states. More...
 

Functions

static bool timing_recurrent_in_pre_window (uint32_t time_since_last_event, update_state_t previous_state)
 API: Check if there was an event in the pre-window.
 
static bool timing_recurrent_in_post_window (uint32_t time_since_last_event, update_state_t previous_state)
 API: Check if there was an event in the post-window.
 
static update_state_t timing_recurrent_calculate_pre_window (update_state_t previous_state)
 API: Update the state with the pre-window information.
 
static update_state_t timing_recurrent_calculate_post_window (update_state_t previous_state)
 API: Update the state with the post-window information.
 
static post_trace_t timing_get_initial_post_trace (void)
 Get an initial post-synaptic timing trace.
 
static post_trace_t timing_decay_post (uint32_t time, uint32_t last_time, post_trace_t last_trace)
 
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 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_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 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.
 

Detailed Description

Common code for recurrent timing rules.

Recurrent timing rules use a small state machine to decide how to react to spike events rather than a simple accumulator.

Definition in file timing_recurrent_common.h.

Enumeration Type Documentation

◆ recurrent_state_machine_state_t

Synapse states.

Enumerator
STATE_IDLE 

Initial state; neither window is open.

STATE_PRE_OPEN 

Pre-window is open.

STATE_POST_OPEN 

Post-window is open.

Definition at line 64 of file timing_recurrent_common.h.

Function Documentation

◆ timing_recurrent_in_pre_window()

static bool timing_recurrent_in_pre_window ( uint32_t  time_since_last_event,
update_state_t  previous_state 
)
static

API: Check if there was an event in the pre-window.

Parameters
[in]time_since_last_eventLength of time since last event
[in]previous_stateThe state we're in right now
Returns
True if an event is there.

◆ timing_recurrent_in_post_window()

static bool timing_recurrent_in_post_window ( uint32_t  time_since_last_event,
update_state_t  previous_state 
)
static

API: Check if there was an event in the post-window.

Parameters
[in]time_since_last_eventLength of time since last event
[in]previous_stateThe state we're in right now
Returns
True if an event is there.

◆ timing_recurrent_calculate_pre_window()

static update_state_t timing_recurrent_calculate_pre_window ( update_state_t  previous_state)
static

API: Update the state with the pre-window information.

Parameters
[in]previous_stateThe state we're in right now
Returns
The new state.

◆ timing_recurrent_calculate_post_window()

static update_state_t timing_recurrent_calculate_post_window ( update_state_t  previous_state)
static

API: Update the state with the post-window information.

Parameters
[in]previous_stateThe state we're in right now
Returns
The new state.

◆ timing_get_initial_post_trace()

static post_trace_t timing_get_initial_post_trace ( void  )
inlinestatic

Get an initial post-synaptic timing trace.

Returns
the post trace

Definition at line 79 of file timing_recurrent_common.h.

◆ timing_decay_post()

static post_trace_t timing_decay_post ( uint32_t  time,
uint32_t  last_time,
post_trace_t  last_trace 
)
inlinestatic

Definition at line 83 of file timing_recurrent_common.h.

◆ timing_add_post_spike()

static post_trace_t timing_add_post_spike ( uint32_t  time,
uint32_t  last_time,
post_trace_t  last_trace 
)
inlinestatic

Add a post spike to the post trace.

Parameters
[in]timethe time of the spike
[in]last_timethe time of the previous spike update
[in]last_tracethe post trace to update
Returns
the updated post trace

Definition at line 95 of file timing_recurrent_common.h.

◆ timing_add_pre_spike()

static pre_trace_t timing_add_pre_spike ( uint32_t  time,
uint32_t  last_time,
pre_trace_t  last_trace 
)
inlinestatic

Add a pre spike to the pre trace.

Parameters
[in]timethe time of the spike
[in]last_timethe time of the previous spike update
[in]last_tracethe pre trace to update
Returns
the updated pre trace

Definition at line 108 of file timing_recurrent_common.h.

◆ timing_apply_pre_spike()

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 
)
inlinestatic

Apply a pre-spike timing rule state update.

Parameters
[in]timethe current time
[in]tracethe current pre-spike trace
[in]last_pre_timethe time of the last pre-spike
[in]last_pre_tracethe trace of the last pre-spike
[in]last_post_timethe time of the last post-spike
[in]last_post_tracethe trace of the last post-spike
[in]previous_statethe state to update
Returns
the updated state

Definition at line 124 of file timing_recurrent_common.h.

◆ timing_apply_post_spike()

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 
)
inlinestatic

Apply a post-spike timing rule state update.

Parameters
[in]timethe current time
[in]tracethe current post-spike trace
[in]last_pre_timethe time of the last pre-spike
[in]last_pre_tracethe trace of the last pre-spike
[in]last_post_timethe time of the last post-spike
[in]last_post_tracethe trace of the last post-spike
[in]previous_statethe state to update
Returns
the updated state

Definition at line 206 of file timing_recurrent_common.h.