CARLsim  6.1.0
CARLsim: a GPU-accelerated SNN simulator
error_code.h
Go to the documentation of this file.
1 /* * Copyright (c) 2016 Regents of the University of California. All rights reserved.
2 *
3 * Redistribution and use in source and binary forms, with or without
4 * modification, are permitted provided that the following conditions
5 * are met:
6 *
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 *
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 *
14 * 3. The names of its contributors may not be used to endorse or promote
15 * products derived from this software without specific prior written
16 * permission.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
22 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
25 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
26 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 *
30 * *********************************************************************************************** *
31 * CARLsim
32 * created by: (MDR) Micah Richert, (JN) Jayram M. Nageswaran
33 * maintained by:
34 * (MA) Mike Avery <averym@uci.edu>
35 * (MB) Michael Beyeler <mbeyeler@uci.edu>,
36 * (KDC) Kristofor Carlson <kdcarlso@uci.edu>
37 * (TSC) Ting-Shuo Chou <tingshuc@uci.edu>
38 * (HK) Hirak J Kashyap <kashyaph@uci.edu>
39 *
40 * CARLsim v1.0: JM, MDR
41 * CARLsim v2.0/v2.1/v2.2: JM, MDR, MA, MB, KDC
42 * CARLsim3: MB, KDC, TSC
43 * CARLsim4: TSC, HK
44 * CARLsim5: HK, JX, KC
45 * CARLsim6: LN, JX, KC, KW
46 *
47 * CARLsim available from http://socsci.uci.edu/~jkrichma/CARLsim/
48 * Ver 12/31/2016
49 */
50 
51 #ifndef __ERROR_CODE_H__
52 #define __ERROR_CODE_H__
53 
54 #define NO_KERNEL_ERRORS 0xc00d
55 
56 #define NEW_FIRE_UPDATE_OVERFLOW_ERROR1 0x61
57 #define NEW_FIRE_UPDATE_OVERFLOW_ERROR2 0x62
58 
59 #define STORE_FIRING_ERROR_0 0x54
60 
61 #define ERROR_FIRING_0 0xd0d0
62 #define ERROR_FIRING_1 0xd0d1
63 #define ERROR_FIRING_2 0xd0d2
64 #define ERROR_FIRING_3 0xd0d3
65 
66 #define GLOBAL_STATE_ERROR_0 0xf0f0
67 
68 #define GLOBAL_CONDUCTANCE_ERROR_0 0xfff0
69 #define GLOBAL_CONDUCTANCE_ERROR_1 0xfff1
70 
71 #define STP_ERROR 0xf000
72 
73 #define UPDATE_WEIGHTS_ERROR1 0x80
74 
75 #define CURRENT_UPDATE_ERROR1 0x51
76 #define CURRENT_UPDATE_ERROR2 0x52
77 #define CURRENT_UPDATE_ERROR3 0x53
78 #define CURRENT_UPDATE_ERROR4 0x54
79 
80 #define KERNEL_CURRENT_ERROR0 0x90
81 #define KERNEL_CURRENT_ERROR1 0x91
82 #define KERNEL_CURRENT_ERROR2 0x92
83 
84 #define ICURRENT_UPDATE_ERROR1 0x51
85 #define ICURRENT_UPDATE_ERROR2 0x52
86 #define ICURRENT_UPDATE_ERROR3 0x53
87 #define ICURRENT_UPDATE_ERROR4 0x54
88 #define ICURRENT_UPDATE_ERROR5 0x55
89 
90 #define KERNEL_INIT_ERROR0 0x71
91 #define KERNEL_INIT_ERROR1 0x72
92 
93 #define POISSON_COUNT_ERROR_0 0x99
94 
95 #define UNKNOWN_LOGGER_ERROR 0x8001
96 #define NO_LOGGER_DIR_ERROR 0x8002
97 
98 #define ID_OVERFLOW_ERROR 0x8003
99 
100 
101 
102 // \todo review by Jinwei
103 
104 // -1 ERRORS
105 
106 //KERNEL_ERROR("Invalid connection type (should be 'random', 'full', 'one-to-one', 'full-no-direct', or 'gaussian')");
107 #define KERNEL_ERROR_INVALID_CONN 0xFF001
108 
109 //KERNEL_ERROR("STDP requires plastic connection");
110 #define KERNEL_ERROR_STDP_SYN_PLASIC 0xFF002
111 
112 //KERNEL_ERROR("Invalid connection type( should be 'random', 'full', 'full-no-direct', or 'one-to-one')");
113 #define KERNEL_ERROR_INVALID_CONN2 0xFF003
114 
115 //KERNEL_ERROR("Invalid connection type( should be 'random', 'full', 'full-no-direct', or 'one-to-one')");
116 #define KERNEL_ERROR_INVALID_CONN3 0xFF004
117 
118 //KERNEL_ERROR("Can't find catagory for the group [%d] ", grpIt->gGrpId);
119 #define KERNEL_ERROR_NO_CATAGORY 0xFF005
120 
121 //KERNEL_ERROR("Unkown simulation mode");
122 #define KERNEL_ERROR_UNKNOWN_SIM_MODE 0xFF006
123 
124 //KERNEL_ERROR("Can't assign the group [%d] to any partition", grpIt->second.gGrpId);
125 #define KERNEL_ERROR_NO_PARTION_ASSIGNED 0xFF007
126 
127 //KERNEL_ERROR("loadSimulation: Unknown file signature. This does not seem to be a "
128 #define KERNEL_ERROR_UNKNOWN_FILE_SIGNATURE 0xFF008
129 
130 // KERNEL_ERROR("loadSimulation: Unsupported version number (%f)",tmpFloat);
131 #define KERNEL_ERROR_UNSUPPORTED_VERSION 0xFF009
132 
133 // KERNEL_ERROR("loadSimulation: Number of neurons in file (%d) and simulation (%d) don't match.",
134 #define KERNEL_ERROR_NEURON_MISMATCH 0xFF010
135 
136 //KERNEL_ERROR("loadSimulation: Number of groups in file (%d) and simulation (%d) don't match.",
137 #define KERNEL_ERROR_GROUP_MISMATCH 0xFF011
138 
139 //fprintf(stderr,"loadSimulation: Error while reading file header"); // \todo Jinwei: why fprintf instead of KERNEL_ERROR
140 #define KERNEL_ERROR_INVALID_HEADER 0xFF012
141 
142 //KERNEL_ERROR("loadSimulation: StartN in file (%d) and grpInfo (%d) for group %d don't match.",
143 #define KERNEL_ERROR_INVALID_START 0xFF013
144 
145 //KERNEL_ERROR("loadSimulation: EndN in file (%d) and grpInfo (%d) for group %d don't match.",
146 #define KERNEL_ERROR_INVALID_END 0xFF014
147 
148 //KERNEL_ERROR("loadSimulation: numX in file (%d) and grpInfo (%d) for group %d don't match.",
149 #define KERNEL_ERROR_NUMX 0xFF015
150 
151 //KERNEL_ERROR("loadSimulation: numY in file (%d) and grpInfo (%d) for group %d don't match.",
152 #define KERNEL_ERROR_NUMY 0xFF016
153 
154 //KERNEL_ERROR("loadSimulation: numZ in file (%d) and grpInfo (%d) for group %d don't match.",
155 #define KERNEL_ERROR_NUMZ 0xFF017
156 
157 //KERNEL_ERROR("loadSimulation: Group names in file (%s) and grpInfo (%s) don't match.", name,
158 #define KERNEL_ERROR_GROUP_NAMES_MISMATCH 0xFF018
159 
160 //KERNEL_ERROR("loadSimulation: Error while reading group info");
161 #define KERNEL_ERROR_INVALID_GROUP_INFO 0xFF019
162 
163 //KERNEL_ERROR("loadSimulation: source group in file (%d) and in simulation (%d) for connection %d don't match.",
164 #define KERNEL_ERROR_SRC_GRP_CONN 0xFF020
165 
166 //KERNEL_ERROR("loadSimulation: dest group in file (%d) and in simulation (%d) for connection %d don't match.",
167 #define KERNEL_ERROR_DEST_GRP_CONN 0xFF021
168 
169 //KERNEL_ERROR("setNeuronParameters must be called for group %s (G:%d,L:%d)",groupConfigMap[gGrpId].grpName.c_str(), gGrpId, lGrpId);
170 #define KERNEL_ERROR_IZH_PARAMS_NOT_SET 0xFF022
171 
172 //KERNEL_ERROR("setNeuronParametersLIF must be called for group %s (G:%d,L:%d)",groupConfigMap[gGrpId].grpName.c_str(), gGrpId, lGrpId);
173 #define KERNEL_ERROR_LIF_PARAMS_NOT_SET 0xFF023
174 
175 //KERNEL_ERROR("IcalcType is unknwon in group [%d] ", gGrpId);
176 #define KERNEL_ERROR_UNKNOWN_ICALC 0xFF024
177 
178 
179 // 1 ERRORS
180 
181 //KERNEL_ERROR("Wrong Host-Device copy direction");
182 #define KERNEL_ERROR_GPU_WRONG_COPY 0xFE001
183 
184 //KERNEL_ERROR("GPU Memory already allocated...");
185 #define KERNEL_ERROR_GPU_REALLOC 0xFE002
186 
187 //case UNKNOWN_INTEGRATION:
188 #define KERNEL_ERROR_UNKNOWN_INTEG 0xFE003
189 
190 //KERNEL_ERROR("Invalid type using createGroup... Cannot create poisson generators here.");
191 #define KERNEL_ERROR_POISSON_1 0xFE004
192 
193 //KERNEL_ERROR("Invalid type using createGroup... Cannot create poisson generators here.");
194 #define KERNEL_ERROR_POISSON_2 0xFE005
195 
196 //KERNEL_ERROR("No connection found from group %d(%s) to group %d(%s)", preGrpId, getGroupName(preGrpId).c_str(),
197 #define KERNEL_ERROR_CONN_MISSING 0xFE006
198 
199 //KERNEL_ERROR("No connection found from group %d(%s) to group %d(%s)", preGrpId, getGroupName(preGrpId).c_str(),
200 #define KERNEL_ERROR_CONN_MISSING2 0xFE007
201 
202 //KERNEL_ERROR("No connection found from group %d(%s) to group %d(%s)", preGrpId, getGroupName(preGrpId).c_str(),
203 #define KERNEL_ERROR_CONN_MISSING3 0xFE008
204 
205 //KERNEL_ERROR("setGroupMonitor has already been called on Group %d (%s).", gGrpId, groupConfigMap[gGrpId].grpName.c_str());
206 #define KERNEL_ERROR_GROUPMON_SET 0xFE009
207 
208 //KERNEL_ERROR("No connection found from group %d(%s) to group %d(%s)", grpIdPre, getGroupName(grpIdPre).c_str(),
209 #define KERNEL_ERROR_CONN_MISSING4 0xFE010
210 
211 //KERNEL_ERROR("setConnectionMonitor has already been called on Connection %d (MonitorId=%d)", connId, connectConfigMap[connId].connectionMonitorId);
212 #define KERNEL_ERROR_CONNMON_SET 0xFE011
213 
214 //KERNEL_ERROR("Connection ID was not found. Quitting.");
215 #define KERNEL_ERROR_CONN_MISSING5 0xFE012
216 
217 //KERNEL_ERROR("Group %s(%d) exceeds max number of allowed compartmental connections (%d).",
218 #define KERNEL_ERROR_COMP_CONNS_EXCEEDED 0xFE013
219 
220 //KERNEL_ERROR("Group %s(%d) exceeds max number of allowed compartmental connections (%d).",
221 #define KERNEL_ERROR_COMP_CONNS_EXCEEDED2 0xFE014
222 
223 //KERNEL_ERROR("STP with delays > 1 ms is currently not supported.");
224 #define KERNEL_ERROR_MAX_STP_DELAY 0xFE015
225 
226 //KERNEL_ERROR("You are using a synaptic delay (%d) greater than MAX_SYN_DELAY defined in config.h", glbNetworkConfig.maxDelay);
227 #define KERNEL_ERROR_MAX_SYN_DELAY 0xFE016
228 
229 //KERNEL_ERROR("Group %s(%d) is not compartmentally enabled, cannot be part of a compartmental connection.",
230 #define KERNEL_ERROR_COMPARTMENT_DISABLED 0xFE017
231 
232 //KERNEL_ERROR("Group %s(%d) is not compartmentally enabled, cannot be part of a compartmental connection.",
233 #define KERNEL_ERROR_COMPARTMENT_DISABLED2 0xFE018
234 
235 //KERNEL_ERROR("If STDP on group %d (%s) is set, group must have some incoming plastic connections.",
236 #define KERNEL_ERROR_STDP_NO_IN_PLASTIC 0xFE019
237 
238 //KERNEL_ERROR("If homeostasis is enabled on group %d (%s), then STDP must be enabled, too.",
239 #define KERNEL_ERROR_STDP_HOMEO_INCONSIST 0xFE020
240 
241 
242 
243 #endif