GeNN  3.3.0
GPU enhanced Neuronal Networks (GeNN)
extra_neurons.h
Go to the documentation of this file.
1 
2 
3  // Add new neuron type - LIntF:
4  n.varNames.clear();
5  n.varTypes.clear();
6 
7  n.varNames.push_back("V");
8  n.varTypes.push_back("float");
9  n.varNames.push_back("V_NB");
10  n.varTypes.push_back("float");
11  n.varNames.push_back("tSpike_NB");
12  n.varTypes.push_back("float");
13  n.varNames.push_back("__regime_val");
14  n.varTypes.push_back("int");
15  n.pNames.clear();
16 
17  n.pNames.push_back("VReset_NB");
18  n.pNames.push_back("VThresh_NB");
19  n.pNames.push_back("tRefrac_NB");
20  n.pNames.push_back("VRest_NB");
21  n.pNames.push_back("TAUm_NB");
22  n.pNames.push_back("Cm_NB");
23  n.dpNames.clear();
24 
25  n.simCode = " \
26  $(V) = -1000000; \
27  if ($(__regime_val)==1) { \n \
28 $(V_NB) += (Isyn_NB/$(Cm_NB)+($(VRest_NB)-$(V_NB))/$(TAUm_NB))*DT; \n \
29  if ($(V_NB)>$(VThresh_NB)) { \n \
30 $(V_NB) = $(VReset_NB); \n \
31 $(tSpike_NB) = t; \n \
32  $(V) = 100000; \
33 $(__regime_val) = 2; \n \
34 } \n \
35 } \n \
36 if ($(__regime_val)==2) { \n \
37 if (t-$(tSpike_NB) > $(tRefrac_NB)) { \n \
38 $(__regime_val) = 1; \n \
39 } \n \
40 } \n \
41 ";
42 
43  nModels.push_back(n);
44 
45 
46 
47  // Add new neuron type - regular spike:
48  n.varNames.clear();
49  n.varTypes.clear();
50 
51  n.varNames.push_back("V");
52  n.varTypes.push_back("float");
53  n.varNames.push_back("count_t_NB");
54  n.varTypes.push_back("float");
55  n.varNames.push_back("__regime_val");
56  n.varTypes.push_back("int");
57  n.pNames.clear();
58 
59  n.pNames.push_back("max_t_NB");
60  n.dpNames.clear();
61 
62  n.simCode = " \
63  $(V) = -1000000; \
64  if ($(__regime_val)==1) { \n \
65 $(count_t_NB) += (1)*DT; \n \
66  if ($(count_t_NB) > $(max_t_NB)-0.0001) { \n \
67 $(count_t_NB) = 0; \n \
68  $(V) = 100000; \
69 $(__regime_val) = 1; \n \
70 } \n \
71 } \n \
72 ";
73 
74  nModels.push_back(n);
75 
76 
77 
78  // Add new neuron type - LInt:
79  n.varNames.clear();
80  n.varTypes.clear();
81 
82  n.varNames.push_back("V");
83  n.varTypes.push_back("float");
84  n.varNames.push_back("V_NB");
85  n.varTypes.push_back("float");
86  n.varNames.push_back("tSpike_NB");
87  n.varTypes.push_back("float");
88  n.varNames.push_back("__regime_val");
89  n.varTypes.push_back("int");
90  n.pNames.clear();
91 
92  n.pNames.push_back("VReset_NB");
93  n.pNames.push_back("VThresh_NB");
94  n.pNames.push_back("tRefrac_NB");
95  n.pNames.push_back("VRest_NB");
96  n.pNames.push_back("TAUm_NB");
97  n.pNames.push_back("Cm_NB");
98  n.dpNames.clear();
99 
100  n.simCode = " \
101  $(V) = -1000000; \
102  if ($(__regime_val)==1) { \n \
103 $(V_NB) += (Isyn_NB/$(Cm_NB)+($(VRest_NB)-$(V_NB))/$(TAUm_NB))*DT; \n \
104  if ($(V_NB)>$(VThresh_NB)) { \n \
105 $(V_NB) = $(VReset_NB); \n \
106 $(tSpike_NB) = t; \n \
107  $(V) = 100000; \
108 $(__regime_val) = 2; \n \
109 } \n \
110 } \n \
111 if ($(__regime_val)==2) { \n \
112 if (t-$(tSpike_NB) > $(tRefrac_NB)) { \n \
113 $(__regime_val) = 1; \n \
114 } \n \
115 } \n \
116 ";
117 
118  nModels.push_back(n);
119 
vector< neuronModel > nModels
Global C++ vector containing all neuron model descriptions.
Definition: neuronModels.cc:28