sPyNNaker neural_modelling
7.3.1
Loading...
Searching...
No Matches
src
neuron
plasticity
stdp
stdp_typedefs.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2014 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
21
#ifndef _STDP_TYPEDEFS_H_
22
#define _STDP_TYPEDEFS_H_
23
24
//---------------------------------------
25
// Macros
26
//---------------------------------------
27
// Fixed-point number system used STDP
29
#define STDP_FIXED_POINT 11
31
#define STDP_FIXED_POINT_ONE (1 << STDP_FIXED_POINT)
32
33
// Helper macros for 16-bit fixed-point multiplication
38
#define STDP_FIXED_MUL_16X16(a, b) maths_fixed_mul16(a, b, STDP_FIXED_POINT)
39
42
#define S1615_TO_STDP_RIGHT_SHIFT 4
43
45
static
inline
accum
mul_accum_fixed
(accum a, int32_t stdp_fixed) {
46
return
a * kbits(stdp_fixed <<
S1615_TO_STDP_RIGHT_SHIFT
);
47
}
48
49
#endif
// _STDP_TYPEDEFS_H_
mul_accum_fixed
static accum mul_accum_fixed(accum a, int32_t stdp_fixed)
Multiply an accum by an STDP fixed point and return an accum.
Definition
stdp_typedefs.h:45
S1615_TO_STDP_RIGHT_SHIFT
#define S1615_TO_STDP_RIGHT_SHIFT
Definition
stdp_typedefs.h:42
Generated on Fri Dec 6 2024 14:12:37 for sPyNNaker neural_modelling by
1.9.8