sPyNNaker neural_modelling 7.3.1
Loading...
Searching...
No Matches
timing_recurrent_pre_stochastic_impl.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2017 The University of Manchester
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * https://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
19#ifndef _TIMING_RECURRENT_PRE_STOCHASTIC_IMPL_H_
20#define _TIMING_RECURRENT_PRE_STOCHASTIC_IMPL_H_
21
22typedef struct post_trace_t {
24
25typedef struct pre_trace_t {
27
29typedef struct {
31 int32_t accumulator_depression_plus_one;
33 int32_t accumulator_potentiation_minus_one;
35
36#define _STRUCTURE_PATH(file) <neuron/plasticity/stdp/synapse_structure/file>
37#include _STRUCTURE_PATH(synapse_structure_weight_state_accumulator_window_impl.h)
39
45 uint32_t time_since_last_event, update_state_t previous_state) {
46 return time_since_last_event < previous_state.window_length;
47}
48
54 uint32_t time_since_last_event, update_state_t previous_state) {
55 return time_since_last_event < previous_state.window_length;
56}
57
62 update_state_t previous_state) {
64
65 // Pick random number and use to draw from exponential distribution
66 int32_t random = mars_kiss_fixed_point();
68 log_debug("\t\tRandom=%d, Exp dist=%u",
69 random, previous_state.window_length);
70
71 return previous_state;
72}
73
78 update_state_t previous_state) {
80
81 // Pick random number and use to draw from exponential distribution
82 int32_t random = mars_kiss_fixed_point();
84 log_debug("\t\tRandom=%d, Exp dist=%u",
85 random, previous_state.window_length);
86
87 return previous_state;
88}
89
90#endif // _TIMING_RECURRENT_PRE_STOCHASTIC_IMPL_H_
void log_debug(const char *message,...)
#define random
#define STDP_FIXED_POINT_ONE
The number 1.0 in the fixed point math used by STDP.
Common code for recurrent timing rules.
uint16_t pre_exp_dist_lookup[STDP_FIXED_POINT_ONE]
Lookup table for picking exponentially distributed random value for pre-traces.
uint16_t post_exp_dist_lookup[STDP_FIXED_POINT_ONE]
Lookup table for picking exponentially distributed random value for post-traces.
static update_state_t timing_recurrent_calculate_post_window(update_state_t previous_state)
Update the state with the post-window information.
static update_state_t timing_recurrent_calculate_pre_window(update_state_t previous_state)
Update the state with the pre-window information.
static bool timing_recurrent_in_pre_window(uint32_t time_since_last_event, update_state_t previous_state)
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)
Check if there was an event in the post-window.
The type of post-spike traces.
The type of pre-spike traces.
Configuration information about plasticity traces.