sPyNNaker neural_modelling  7.4.2
input_type.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 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 _INPUT_TYPE_H_
22 #define _INPUT_TYPE_H_
23 
24 #ifndef NUM_EXCITATORY_RECEPTORS
28 #define NUM_EXCITATORY_RECEPTORS 1
29 #error NUM_EXCITATORY_RECEPTORS was undefined. It should be defined by a synapse\
30  shaping include
31 #endif
32 
33 #ifndef NUM_INHIBITORY_RECEPTORS
37 #define NUM_INHIBITORY_RECEPTORS 1
38 #error NUM_INHIBITORY_RECEPTORS was undefined. It should be defined by a synapse\
39  shaping include
40 #endif
41 
42 #include <common/neuron-typedefs.h>
43 
44 // Forward declaration of the input type parameters
45 struct input_type_params_t;
47 
48 // Forward declaration of the input type structure
49 struct input_type_t;
50 typedef struct input_type_t input_type_t;
51 
57  uint32_t n_steps_per_timestep);
58 
64 
74  input_t *restrict value, input_type_t *input_type,
75  uint16_t num_receptors);
76 
84  input_t *restrict exc_input, const input_type_t *input_type,
85  state_t membrane_voltage);
86 
94  input_t *restrict inh_input, const input_type_t *input_type,
95  state_t membrane_voltage);
96 
97 #endif // _INPUT_TYPE_H_
static void input_type_convert_inhibitory_input_to_current(input_t *restrict inh_input, const input_type_t *input_type, state_t membrane_voltage)
Converts an inhibitory input into an inhibitory current.
static void input_type_initialise(input_type_t *state, input_type_params_t *params, uint32_t n_steps_per_timestep)
initialise the structure from the parameters
static input_t * input_type_get_input_value(input_t *restrict value, input_type_t *input_type, uint16_t num_receptors)
Gets the actual input value. This allows any scaling to take place.
static void input_type_save_state(input_type_t *state, input_type_params_t *params)
save parameters and state back to SDRAM for reading by host and recovery on restart
static void input_type_convert_excitatory_input_to_current(input_t *restrict exc_input, const input_type_t *input_type, state_t membrane_voltage)
Converts an excitatory input into an excitatory current.
Conductance input parameters.
Conductance state.
Data type definitions for SpiNNaker Neuron-modelling.
REAL state_t
The type of a state variable.
REAL input_t
The type of an input.
static uint n_steps_per_timestep
The number of steps to run per timestep.
static stdp_params params
Configuration parameters.