CARLsim  6.1.0
CARLsim: a GPU-accelerated SNN simulator
print_snn_info.cpp
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 #include <snn.h>
53 #include <group_monitor_core.h>
54 
55 void SNN::printStatusConnectionMonitor(int connId) {
56  for (int monId=0; monId<numConnectionMonitor; monId++) {
57  if (connId==ALL || connMonCoreList[monId]->getConnectId()==connId) {
58  // print connection weights (sparse representation: show only actually connected synapses)
59  // show the first hundred connections: (pre=>post) weight
60  connMonCoreList[monId]->printSparse(ALL, 100, 4, false);
61  }
62  }
63 }
64 
65 void SNN::printStatusSpikeMonitor(int gGrpId) {
66  if (gGrpId==ALL) {
67  for (int g = 0; g < numGroups; g++) {
68  printStatusSpikeMonitor(g);
69  }
70  } else {
71  int netId = groupConfigMDMap[gGrpId].netId;
72  int lGrpId = groupConfigMDMap[gGrpId].lGrpId;
73  int monitorId = groupConfigMDMap[gGrpId].spikeMonitorId;
74 
75  if (monitorId == -1) return;
76 
77  // copy data to the manager runtime
78  fetchNeuronSpikeCount(gGrpId);
79 
80  // \TODO nSpikeCnt should really be a member of the SpikeMonitor object that gets populated if
81  // printRunSummary is true or mode==COUNT.....
82  // so then we can use spkMonObj->print(false); // showSpikeTimes==false
83  int grpSpk = 0;
84  for (int gNId = groupConfigMDMap[gGrpId].gStartN; gNId <= groupConfigMDMap[gGrpId].gEndN; gNId++)
85  grpSpk += managerRuntimeData.nSpikeCnt[gNId]; // add up all neuronal spike counts
86 
87  // infer run duration by measuring how much time has passed since the last run summary was printed
88  int runDurationMs = simTime - simTimeLastRunSummary;
89 
90  if (simTime <= simTimeLastRunSummary) {
91  KERNEL_INFO("(t=%.3fs) SpikeMonitor for group %s(%d) has %d spikes in %dms (%.2f +/- %.2f Hz)",
92  (float)(simTime / 1000.0f),
93  groupConfigMap[gGrpId].grpName.c_str(),
94  gGrpId,
95  0,
96  0,
97  0.0f,
98  0.0f);
99  } else {
100  // if some time has passed since last print
101  float meanRate = grpSpk * 1000.0f / runDurationMs / groupConfigMap[gGrpId].numN;
102  float std = 0.0f;
103  if (groupConfigMap[gGrpId].numN > 1) {
104  for (int gNId = groupConfigMDMap[gGrpId].gStartN; gNId <= groupConfigMDMap[gGrpId].gEndN; gNId++) {
105  float neurRate = managerRuntimeData.nSpikeCnt[gNId] * 1000.0f / runDurationMs;
106  std += (neurRate - meanRate) * (neurRate - meanRate);
107  }
108  std = sqrt(std / (groupConfigs[netId][lGrpId].numN - 1.0));
109  }
110 
111  KERNEL_INFO("(t=%.3fs) SpikeMonitor for group %s(%d) has %d spikes in %ums (%.2f +/- %.2f Hz)",
112  simTime / 1000.0f,
113  groupConfigMap[gGrpId].grpName.c_str(),
114  gGrpId,
115  grpSpk,
116  runDurationMs,
117  meanRate,
118  std);
119  }
120  }
121 }
122 
123 void SNN::printStatusGroupMonitor(int gGrpId) {
124  if (gGrpId == ALL) {
125  for (int g = 0; g < numGroups; g++) {
126  printStatusGroupMonitor(g);
127  }
128  } else {
129  int netId = groupConfigMDMap[gGrpId].netId;
130  int lGrpId = groupConfigMDMap[gGrpId].lGrpId;
131  int monitorId = groupConfigMDMap[gGrpId].groupMonitorId;
132 
133  if (monitorId == -1) return;
134 
135  std::vector<int> peakTimeVector = groupMonCoreList[monitorId]->getPeakTimeVector();
136  int numPeaks = peakTimeVector.size();
137 
138  // infer run duration by measuring how much time has passed since the last run summary was printed
139  int runDurationMs = simTime - simTimeLastRunSummary;
140 
141  if (simTime <= simTimeLastRunSummary) {
142  KERNEL_INFO("(t=%.3fs) GroupMonitor for group %s(%d) has %d peak(s) in %dms",
143  simTime / 1000.0f,
144  groupConfigMap[gGrpId].grpName.c_str(),
145  gGrpId,
146  0,
147  0);
148  } else {
149  // if some time has passed since last print
150  KERNEL_INFO("(t=%.3fs) GroupMonitor for group %s(%d) has %d peak(s) in %ums",
151  simTime / 1000.0f,
152  groupConfigMap[gGrpId].grpName.c_str(),
153  gGrpId,
154  numPeaks,
155  runDurationMs);
156  }
157  }
158 }
159 
160 // new print connection info, akin to printGroupInfo
161 void SNN::printConnectionInfo(short int connId) {
162  ConnectConfig connConfig = connectConfigMap[connId];
163 
164  KERNEL_INFO("Connection ID %d: %s(%d) => %s(%d)", connId, groupConfigMap[connConfig.grpSrc].grpName.c_str(),
165  connConfig.grpSrc, groupConfigMap[connConfig.grpDest].grpName.c_str(), connConfig.grpDest);
166  KERNEL_INFO(" - Type = %s", GET_FIXED_PLASTIC(connConfig.connProp)==SYN_PLASTIC?" PLASTIC":" FIXED")
167  KERNEL_INFO(" - Min weight = %8.5f", 0.0f); // \TODO
168  KERNEL_INFO(" - Max weight = %8.5f", fabs(connConfig.maxWt));
169  KERNEL_INFO(" - Initial weight = %8.5f", fabs(connConfig.initWt));
170  KERNEL_INFO(" - Min delay = %8d", connConfig.minDelay);
171  KERNEL_INFO(" - Max delay = %8d", connConfig.maxDelay);
172  KERNEL_INFO(" - Radius X = %8.2f", connConfig.connRadius.radX);
173  KERNEL_INFO(" - Radius Y = %8.2f", connConfig.connRadius.radY);
174  KERNEL_INFO(" - Radius Z = %8.2f", connConfig.connRadius.radZ);
175  KERNEL_INFO(" - Num of synapses = %d", connConfig.numberOfConnections);
176  float avgPostM = ((float)connConfig.numberOfConnections)/groupConfigMap[connConfig.grpSrc].numN;
177  float avgPreM = ((float)connConfig.numberOfConnections)/groupConfigMap[connConfig.grpDest].numN;
178  KERNEL_INFO(" - Avg numPreSynapses = %8.2f", avgPreM );
179  KERNEL_INFO(" - Avg numPostSynapses = %8.2f", avgPostM );
180 
181  if(connConfig.stdpConfig.WithSTDP) {
182  KERNEL_INFO(" - STDP:")
183  KERNEL_INFO(" - E-STDP TYPE = %s", stdpType_string[connConfig.stdpConfig.WithESTDPtype]);
184  KERNEL_INFO(" - I-STDP TYPE = %s", stdpType_string[connConfig.stdpConfig.WithISTDPtype]);
185  KERNEL_INFO(" - ALPHA_PLUS_EXC = %8.5f", connConfig.stdpConfig.ALPHA_PLUS_EXC);
186  KERNEL_INFO(" - ALPHA_MINUS_EXC = %8.5f", connConfig.stdpConfig.ALPHA_MINUS_EXC);
187  KERNEL_INFO(" - TAU_PLUS_INV_EXC = %8.5f", connConfig.stdpConfig.TAU_PLUS_INV_EXC);
188  KERNEL_INFO(" - TAU_MINUS_INV_EXC = %8.5f", connConfig.stdpConfig.TAU_MINUS_INV_EXC);
189  KERNEL_INFO(" - BETA_LTP = %8.5f", connConfig.stdpConfig.BETA_LTP);
190  KERNEL_INFO(" - BETA_LTD = %8.5f", connConfig.stdpConfig.BETA_LTD);
191  KERNEL_INFO(" - LAMBDA = %8.5f", connConfig.stdpConfig.LAMBDA);
192  KERNEL_INFO(" - DELTA = %8.5f", connConfig.stdpConfig.DELTA);
193  }
194 }
195 
196 // print connection info, akin to printGroupInfo
197 void SNN::printConnectionInfo(int netId, std::list<ConnectConfig>::iterator connIt) {
198 
199  KERNEL_INFO(" |-+ %s Connection Id %d: %s(%d) => %s(%d)", netId == groupConfigMDMap[connIt->grpDest].netId ? "Local" : "External", connIt->connId,
200  groupConfigMap[connIt->grpSrc].grpName.c_str(), connIt->grpSrc,
201  groupConfigMap[connIt->grpDest].grpName.c_str(), connIt->grpDest);
202  KERNEL_INFO(" |- Type = %s", GET_FIXED_PLASTIC(connIt->connProp)==SYN_PLASTIC?" PLASTIC":" FIXED")
203  KERNEL_INFO(" |- Min weight = %8.5f", 0.0f); // \TODO
204  KERNEL_INFO(" |- Max weight = %8.5f", fabs(connIt->maxWt));
205  KERNEL_INFO(" |- Initial weight = %8.5f", fabs(connIt->initWt));
206  KERNEL_INFO(" |- Min delay = %8d", connIt->minDelay);
207  KERNEL_INFO(" |- Max delay = %8d", connIt->maxDelay);
208  KERNEL_INFO(" |- Radius X = %8.2f", connIt->connRadius.radX);
209  KERNEL_INFO(" |- Radius Y = %8.2f", connIt->connRadius.radY);
210  KERNEL_INFO(" |- Radius Z = %8.2f", connIt->connRadius.radZ);
211  KERNEL_INFO(" |- Num of synapses = %d", connIt->numberOfConnections);
212  float avgPostM = ((float)connIt->numberOfConnections)/groupConfigMap[connIt->grpSrc].numN;
213  float avgPreM = ((float)connIt->numberOfConnections)/groupConfigMap[connIt->grpDest].numN;
214  KERNEL_INFO(" |- Avg numPreSynapses = %8.2f", avgPreM );
215  KERNEL_INFO(" |- Avg numPostSynapses = %8.2f", avgPostM );
216 
217  ConnectConfig connConfig = connectConfigMap[connIt->connId];
218  if(connConfig.stdpConfig.WithSTDP) {
219  KERNEL_INFO(" |-+ STDP:")
220  KERNEL_INFO(" |- E-STDP TYPE = %s", stdpType_string[connConfig.stdpConfig.WithESTDPtype]);
221  KERNEL_INFO(" |- I-STDP TYPE = %s", stdpType_string[connConfig.stdpConfig.WithISTDPtype]);
222  KERNEL_INFO(" |- ALPHA_PLUS_EXC = %8.5f", connConfig.stdpConfig.ALPHA_PLUS_EXC);
223  KERNEL_INFO(" |- ALPHA_MINUS_EXC = %8.5f", connConfig.stdpConfig.ALPHA_MINUS_EXC);
224  KERNEL_INFO(" |- TAU_PLUS_INV_EXC = %8.5f", connConfig.stdpConfig.TAU_PLUS_INV_EXC);
225  KERNEL_INFO(" |- TAU_MINUS_INV_EXC = %8.5f", connConfig.stdpConfig.TAU_MINUS_INV_EXC);
226  KERNEL_INFO(" |- BETA_LTP = %8.5f", connConfig.stdpConfig.BETA_LTP);
227  KERNEL_INFO(" |- BETA_LTD = %8.5f", connConfig.stdpConfig.BETA_LTD);
228  KERNEL_INFO(" |- LAMBDA = %8.5f", connConfig.stdpConfig.LAMBDA);
229  KERNEL_INFO(" |- DELTA = %8.5f", connConfig.stdpConfig.DELTA);
230 #ifdef LN_I_CALC_TYPES
231  KERNEL_INFO(" |- NM_PKA = %8d", connConfig.stdpConfig.NM_PKA);
232  KERNEL_INFO(" |- NM_PLC = %8d", connConfig.stdpConfig.NM_PLC);
233  KERNEL_INFO(" |- W_PKA = %8.5f", connConfig.stdpConfig.W_PKA);
234  KERNEL_INFO(" |- W_PLC = %8.5f", connConfig.stdpConfig.W_PLC);
235 #endif
236  }
237 }
238 
239 void SNN::printGroupInfo(int gGrpId) {
240  KERNEL_INFO("Group %s(%d): ", groupConfigMap[gGrpId].grpName.c_str(), gGrpId);
241 //{BUG: a DOPMINERIC group is also EXCIT, see datastruct header for details (same issue applies to POISSON)
242 // KERNEL_INFO(" - Type = %s", isExcitatoryGroup(gGrpId) ? " EXCIT" :
243 // (isInhibitoryGroup(gGrpId) ? " INHIB" : (isPoissonGroup(gGrpId)?" POISSON" :
244 // (isDopaminergicGroup(gGrpId) ? " DOPAM" : " UNKNOWN"))) );
245 // FIX: LN20201002
246  KERNEL_INFO(" - Type = %s%s",
247  isDopaminergicGroup(gGrpId) ? " DOPAM" :
248  isExcitatoryGroup(gGrpId) ? " EXCIT" :
249  isInhibitoryGroup(gGrpId) ? " INHIB" : " UNKNOWN",
250  isPoissonGroup(gGrpId) ? "_POISSON" : "" );
251 //}
252  KERNEL_INFO(" - Size = %8d", groupConfigMap[gGrpId].numN);
253  KERNEL_INFO(" - Start Id = %8d", groupConfigMDMap[gGrpId].gStartN);
254  KERNEL_INFO(" - End Id = %8d", groupConfigMDMap[gGrpId].gEndN);
255  KERNEL_INFO(" - numPostSynapses = %8d", groupConfigMDMap[gGrpId].numPostSynapses);
256  KERNEL_INFO(" - numPreSynapses = %8d", groupConfigMDMap[gGrpId].numPreSynapses);
257 
258  if (snnState == EXECUTABLE_SNN) {
259  KERNEL_INFO(" - Avg post connections = %8.5f", ((float)groupConfigMDMap[gGrpId].numPostSynapses)/groupConfigMap[gGrpId].numN);
260  KERNEL_INFO(" - Avg pre connections = %8.5f", ((float)groupConfigMDMap[gGrpId].numPreSynapses )/groupConfigMap[gGrpId].numN);
261  }
262 
263  if(groupConfigMap[gGrpId].type & POISSON_NEURON) {
264  KERNEL_INFO(" - Refractory period = %8.5f", groupConfigMDMap[gGrpId].refractPeriod);
265  }
266 
267  if (groupConfigMap[gGrpId].stpConfig.WithSTP) {
268 #ifdef LN_I_CALC_TYPES
269  auto &stp = groupConfigMap[gGrpId].stpConfig;
270  auto &nm4 = groupConfigMap[gGrpId].nm4StpConfig;
271  KERNEL_INFO(" - STP%s:", nm4.WithNM4STP?"(modulated)":"");
272  KERNEL_INFO(" - STP_A = %8.5f", stp.STP_A);
273  KERNEL_INFO(" - STP_U = %8.5f", stp.STP_U);
274  if(nm4.WithNM4STP)
275  KERNEL_INFO(" (%1.1f% 2.1f% 2.1f% 2.1f |% 2.1f || %1.1f)",
276  nm4.w_STP_U[0], nm4.w_STP_U[1], nm4.w_STP_U[2], nm4.w_STP_U[3],
277  nm4.w_STP_U[4], nm4.w_STP_U[5]);
278  KERNEL_INFO(" - STP_tau_u = %8d", (int)(1.0f / stp.STP_tau_u_inv));
279  if(nm4.WithNM4STP)
280  KERNEL_INFO(" (%1.1f %1.1f %1.1f %1.1f | %1.1f || %1.1f)",
281  nm4.w_STP_tau_u[0], nm4.w_STP_tau_u[1], nm4.w_STP_tau_u[2], nm4.w_STP_tau_u[3],
282  nm4.w_STP_tau_u[4], nm4.w_STP_tau_u[5]);
283  KERNEL_INFO(" - STP_tau_x = %8d", (int)(1.0f / stp.STP_tau_x_inv));
284  if(nm4.WithNM4STP)
285  KERNEL_INFO(" (%1.1f %1.1f %1.1f %1.1f | %1.1f || %1.1f)",
286  nm4.w_STP_tau_x[0], nm4.w_STP_tau_x[1], nm4.w_STP_tau_x[2], nm4.w_STP_tau_x[3],
287  nm4.w_STP_tau_x[4], nm4.w_STP_tau_x[5]);
288 #else
289  KERNEL_INFO(" - STP:");
290  KERNEL_INFO(" - STP_A = %8.5f", groupConfigMap[gGrpId].stpConfig.STP_A);
291  KERNEL_INFO(" - STP_U = %8.5f", groupConfigMap[gGrpId].stpConfig.STP_U);
292  KERNEL_INFO(" - STP_tau_u = %8d", (int) (1.0f/groupConfigMap[gGrpId].stpConfig.STP_tau_u_inv));
293  KERNEL_INFO(" - STP_tau_x = %8d", (int) (1.0f/groupConfigMap[gGrpId].stpConfig.STP_tau_x_inv));
294 #endif
295  }
296 
297  // if(groupConfigMap[gGrpId].stdpConfig.WithSTDP) {
298  // KERNEL_INFO(" - STDP:")
299  // KERNEL_INFO(" - E-STDP TYPE = %s", groupConfigMap[gGrpId].stdpConfig.WithESTDPtype == STANDARD ? "STANDARD" :
300  // (groupConfigMap[gGrpId].stdpConfig.WithESTDPtype == DA_MOD ? " DA_MOD" : " UNKNOWN"));
301  // KERNEL_INFO(" - I-STDP TYPE = %s", groupConfigMap[gGrpId].stdpConfig.WithISTDPtype == STANDARD ? "STANDARD" :
302  // (groupConfigMap[gGrpId].stdpConfig.WithISTDPtype == DA_MOD?" DA_MOD":" UNKNOWN"));
303  // KERNEL_INFO(" - ALPHA_PLUS_EXC = %8.5f", groupConfigMap[gGrpId].stdpConfig.ALPHA_PLUS_EXC);
304  // KERNEL_INFO(" - ALPHA_MINUS_EXC = %8.5f", groupConfigMap[gGrpId].stdpConfig.ALPHA_MINUS_EXC);
305  // KERNEL_INFO(" - TAU_PLUS_INV_EXC = %8.5f", groupConfigMap[gGrpId].stdpConfig.TAU_PLUS_INV_EXC);
306  // KERNEL_INFO(" - TAU_MINUS_INV_EXC = %8.5f", groupConfigMap[gGrpId].stdpConfig.TAU_MINUS_INV_EXC);
307  // KERNEL_INFO(" - BETA_LTP = %8.5f", groupConfigMap[gGrpId].stdpConfig.BETA_LTP);
308  // KERNEL_INFO(" - BETA_LTD = %8.5f", groupConfigMap[gGrpId].stdpConfig.BETA_LTD);
309  // KERNEL_INFO(" - LAMBDA = %8.5f", groupConfigMap[gGrpId].stdpConfig.LAMBDA);
310  // KERNEL_INFO(" - DELTA = %8.5f", groupConfigMap[gGrpId].stdpConfig.DELTA);
311  // }
312 }
313 
314 void SNN::printGroupInfo(int netId, std::list<GroupConfigMD>::iterator grpIt) {
315  int gGrpId = grpIt->gGrpId;
316  KERNEL_INFO(" |-+ %s Group %s(G:%d,L:%d): ", netId == grpIt->netId ? "Local" : "External", groupConfigMap[grpIt->gGrpId].grpName.c_str(), grpIt->gGrpId, grpIt->lGrpId);
317 //{BUG: a DOPMINERIC group is also EXCIT, see datastruct header for details (same issue applies to POISSON)
318 // KERNEL_INFO(" |- Type = %s", isExcitatoryGroup(grpIt->gGrpId) ? " EXCIT" :
319 // (isInhibitoryGroup(grpIt->gGrpId) ? " INHIB" : (isPoissonGroup(grpIt->gGrpId)?" POISSON" :
320 // (isDopaminergicGroup(grpIt->gGrpId) ? " DOPAM" : " UNKNOWN"))) );
321 // FIX: LN20201002
322  KERNEL_INFO(" |- Type = %s%s",
323  isDopaminergicGroup(gGrpId) ? " DOPAM" :
324  isExcitatoryGroup(gGrpId) ? " EXCIT" :
325  isInhibitoryGroup(gGrpId) ? " INHIB" : " UNKNOWN",
326  isPoissonGroup(gGrpId) ? "_POISSON" : "" );
327 //}
328  KERNEL_INFO(" |- Num of Neurons = %8d", groupConfigMap[grpIt->gGrpId].numN);
329  KERNEL_INFO(" |- Start Id = (G:%d,L:%d)", grpIt->gStartN, grpIt->lStartN);
330  KERNEL_INFO(" |- End Id = (G:%d,L:%d)", grpIt->gEndN, grpIt->lEndN);
331  KERNEL_INFO(" |- numPostSynapses = %8d", grpIt->numPostSynapses);
332  KERNEL_INFO(" |- numPreSynapses = %8d", grpIt->numPreSynapses);
333 
334  if (snnState == EXECUTABLE_SNN) {
335  KERNEL_INFO(" |- Avg post connections = %8.5f", ((float)grpIt->numPostSynapses) / groupConfigMap[gGrpId].numN);
336  KERNEL_INFO(" |- Avg pre connections = %8.5f", ((float)grpIt->numPreSynapses) / groupConfigMap[gGrpId].numN);
337  }
338 
339  if (groupConfigMap[gGrpId].type & POISSON_NEURON) {
340  KERNEL_INFO(" |- Refractory period = %8.5f", grpIt->refractPeriod);
341  }
342 
343  if (groupConfigMap[gGrpId].stpConfig.WithSTP) {
344 #ifdef LN_I_CALC_TYPES
345  auto& stp = groupConfigMap[gGrpId].stpConfig;
346  auto& nm4 = groupConfigMap[gGrpId].nm4StpConfig;
347  KERNEL_INFO(" |-+ STP%s:", nm4.WithNM4STP ? "(modulated)" : "");
348  KERNEL_INFO(" |- STP_A = %8.5f", groupConfigMap[gGrpId].stpConfig.STP_A);
349  KERNEL_INFO(" |- STP_U = %8.5f", groupConfigMap[gGrpId].stpConfig.STP_U);
350  if(nm4.WithNM4STP)
351  KERNEL_INFO(" | (%1.1f% 2.1f% 2.1f% 2.1f |% 2.1f ) % 2.5f",
352  nm4.w_STP_U[0], nm4.w_STP_U[1], nm4.w_STP_U[2], nm4.w_STP_U[3],
353  nm4.w_STP_U[4], nm4.w_STP_U[5]);
354  KERNEL_INFO(" |- STP_tau_u = %8d", (int)(1.0f / groupConfigMap[gGrpId].stpConfig.STP_tau_u_inv));
355  if(nm4.WithNM4STP)
356  KERNEL_INFO(" | (%1.1f %1.1f %1.1f %1.1f | %1.1f ) % 8.0f",
357  nm4.w_STP_tau_u[0], nm4.w_STP_tau_u[1], nm4.w_STP_tau_u[2], nm4.w_STP_tau_u[3],
358  nm4.w_STP_tau_u[4], nm4.w_STP_tau_u[5]);
359  KERNEL_INFO(" |- STP_tau_x = %8d", (int)(1.0f / groupConfigMap[gGrpId].stpConfig.STP_tau_x_inv));
360  if(nm4.WithNM4STP)
361  KERNEL_INFO(" | (%1.1f %1.1f %1.1f %1.1f | %1.1f ) % 8.0f",
362  nm4.w_STP_tau_x[0], nm4.w_STP_tau_x[1], nm4.w_STP_tau_x[2], nm4.w_STP_tau_x[3],
363  nm4.w_STP_tau_x[4], nm4.w_STP_tau_x[5]);
364 #else
365  KERNEL_INFO(" |-+ STP:");
366  KERNEL_INFO(" |- STP_A = %8.5f", groupConfigMap[gGrpId].stpConfig.STP_A);
367  KERNEL_INFO(" |- STP_U = %8.5f", groupConfigMap[gGrpId].stpConfig.STP_U);
368  KERNEL_INFO(" |- STP_tau_u = %8d", (int)(1.0f / groupConfigMap[gGrpId].stpConfig.STP_tau_u_inv));
369  KERNEL_INFO(" |- STP_tau_x = %8d", (int)(1.0f / groupConfigMap[gGrpId].stpConfig.STP_tau_x_inv));
370 #endif
371  }
372 
373  // if (groupConfigMap[gGrpId].stdpConfig.WithSTDP) {
374  // KERNEL_INFO(" |-+ STDP:")
375  // KERNEL_INFO(" |- E-STDP TYPE = %s", groupConfigMap[gGrpId].stdpConfig.WithESTDPtype == STANDARD ? "STANDARD" :
376  // (groupConfigMap[gGrpId].stdpConfig.WithESTDPtype == DA_MOD ? " DA_MOD" : " UNKNOWN"));
377  // KERNEL_INFO(" |- I-STDP TYPE = %s", groupConfigMap[gGrpId].stdpConfig.WithISTDPtype == STANDARD ? "STANDARD" :
378  // (groupConfigMap[gGrpId].stdpConfig.WithISTDPtype == DA_MOD ? " DA_MOD" : " UNKNOWN"));
379  // KERNEL_INFO(" |- ALPHA_PLUS_EXC = %8.5f", groupConfigMap[gGrpId].stdpConfig.ALPHA_PLUS_EXC);
380  // KERNEL_INFO(" |- ALPHA_MINUS_EXC = %8.5f", groupConfigMap[gGrpId].stdpConfig.ALPHA_MINUS_EXC);
381  // KERNEL_INFO(" |- TAU_PLUS_INV_EXC = %8.5f", groupConfigMap[gGrpId].stdpConfig.TAU_PLUS_INV_EXC);
382  // KERNEL_INFO(" |- TAU_MINUS_INV_EXC = %8.5f", groupConfigMap[gGrpId].stdpConfig.TAU_MINUS_INV_EXC);
383  // KERNEL_INFO(" |- BETA_LTP = %8.5f", groupConfigMap[gGrpId].stdpConfig.BETA_LTP);
384  // KERNEL_INFO(" |- BETA_LTD = %8.5f", groupConfigMap[gGrpId].stdpConfig.BETA_LTD);
385  // KERNEL_INFO(" |- LAMBDA = %8.5f", groupConfigMap[gGrpId].stdpConfig.LAMBDA);
386  // KERNEL_INFO(" |- DELTA = %8.5f", groupConfigMap[gGrpId].stdpConfig.DELTA);
387  // }
388 }
389 
390 void SNN::printSikeRoutingInfo() {
391  if (!spikeRoutingTable.empty()) {
392  KERNEL_INFO("***************** Spike Routing Table *************************");
393  for (std::list<RoutingTableEntry>::iterator rteItr = spikeRoutingTable.begin(); rteItr != spikeRoutingTable.end(); rteItr++)
394  KERNEL_INFO(" |-Source net:[%d] -> Destination net[%d]", rteItr->srcNetId, rteItr->destNetId);
395  }
396 }
397 
bool isPoissonGroup(int gGrpId)
Definition: snn.h:709
#define ALL
CARLsim common definitions.
int * nSpikeCnt
homeostatic plasticity variables
#define STDP(t, a, b)
bool isExcitatoryGroup(int gGrpId)
Definition: snn.h:707
The configuration of a connection.
short int getConnectId(int grpIdPre, int grpIdPost)
find connection ID based on pre-post group pair, O(N)
#define KERNEL_INFO(formatc,...)
#define GET_FIXED_PLASTIC(a)
#define SYN_PLASTIC
static const char * stdpType_string[]
void printSparse(int neurPostId=ALL, int maxConn=100, int connPerLine=4, bool storeNewSnapshot=true)
Contains all of CARLsim&#39;s core functionality.
Definition: snn.h:138
std::vector< int > getPeakTimeVector()
get the timestamps for peak values
bool isInhibitoryGroup(int gGrpId)
Definition: snn.h:708
bool isDopaminergicGroup(int gGrpId)
Definition: snn.h:710