Main Page | Namespace List | Alphabetical List | Class List | Directories | File List | Class Members | File Members

Debug.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   SpikeStream Simulation                                                *
00003  *   Copyright (C) 2007 by David Gamez                                     *
00004  *   david@davidgamez.eu                                                   *
00005  *   Version 0.1                                                           *
00006  *                                                                         *
00007  *   This program is free software; you can redistribute it and/or modify  *
00008  *   it under the terms of the GNU General Public License as published by  *
00009  *   the Free Software Foundation; either version 2 of the License, or     *
00010  *   (at your option) any later version.                                   *
00011  *                                                                         *
00012  *   This program is distributed in the hope that it will be useful,       *
00013  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00014  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00015  *   GNU General Public License for more details.                          *
00016  *                                                                         *
00017  *   You should have received a copy of the GNU General Public License     *
00018  *   along with this program; if not, write to the                         *
00019  *   Free Software Foundation, Inc.,                                       *
00020  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00021  ***************************************************************************/
00022  
00023 //-------------------------------- Debug -----------------------------------
00024 /*! Header file containing definitions of debug variables that are used to 
00025         show different kinds of debugging information. Debugging of a particular
00026         type is switched on by uncommenting the define. */
00027 //--------------------------------------------------------------------------
00028 
00029 #ifndef DEBUG_H
00030 #define DEBUG_H
00031 
00032 //Outputs information about the dynamic loading of classes
00033 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00034 //#define CLASSLOADER_DEBUG
00035 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00036 
00037 
00038 //Outputs the command line parameters loaded by this task
00039 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00040 //#define COMMAND_LINE_PARAMETERS_DEBUG
00041 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00042 
00043 
00044 //General debugging information about a device
00045 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00046 //#define DEVICE_DEBUG
00047 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00048 
00049 
00050 //Outputs the firing mode set in the device manager
00051 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00052 //#define DEVICE_FIRING_MODE_DEBUG
00053 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00054 
00055 
00056 // Used for debugging firing neurons 
00057 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00058 //#define FIRE_NEURON_DEBUG
00059 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00060 
00061 
00062 // Ouputs information about the live behaviour of the synapse
00063 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00064 //#define FIRE_SYNAPSE_DEBUG
00065 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00066 
00067 
00068 /* Used for debugging neurons that fire in response to a message from the 
00069         simulation manager or elsewhere */
00070 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00071 //#define FIRING_NEURONS_EXTERNAL_DEBUG
00072 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00073 
00074 
00075 //Outputs the global parameters when they are set or changed
00076 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00077 //#define GLOBAL_PARAMETERS_DEBUG
00078 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00079 
00080 
00081 /* Outputs information when noise is injected into the network */
00082 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00083 //#define INJECT_NOISE_DEBUG
00084 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00085 
00086 
00087 // Outputs weight changes whilst learning 
00088 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00089 //#define LEARNING_DEBUG
00090 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00091 
00092 
00093 //Outputs information about loaded neurons
00094 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00095 //#define LOAD_NEURON_DEBUG
00096 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00097 
00098 
00099 // Outputs information about loaded synapses
00100 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00101 //#define LOAD_SYNAPSE_DEBUG
00102 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00103 
00104 
00105 //Outputs a message when the destructor of the class is invoked
00106 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00107 //#define MEMORY_DEBUG
00108 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00109 
00110 
00111 //Outputs messages received and when messages are saved
00112 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00113 //#define MESSAGE_DEBUG
00114 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00115 
00116 
00117 /* Outputs information about the sending of lists of firing neurons
00118         to other tasks. */
00119 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00120 //#define NEURON_TASK_DEBUG
00121 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00122 
00123 
00124 /* Does more careful checks and outputs information about the neuron model
00125         USE THIS WITH CAUTION SINCE IT CRASHES SIMULATION WHEN RUNNING FAST PROBABLY
00126         BECAUSE TWO THREADS ARE ATTEMPTING TO ACCESS COUT AT THE SAME TIME OR SOMETHING
00127         SIMILAR */
00128 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00129 //#define NEURON_MODEL_DEBUG
00130 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00131 
00132 
00133 // Outputs the neuron parameters when they are set or changed
00134 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00135 //#define NEURON_PARAMETERS_DEBUG
00136 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00137 
00138 
00139 // Outputs information about injected or continuous noise
00140 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00141 //#define NOISE_DEBUG
00142 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00143 
00144 
00145 //Outputs debug information to do with patterns
00146 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00147 //#define PATTERN_DEBUG
00148 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00149 
00150 
00151 /* Outputs information about the creation and deletion of pvm buffers. */
00152 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00153 //#define PVM_BUFFER_DEBUG
00154 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00155 
00156 
00157 /* Does more comprehensive PVM error checks and outputs error messages.
00158         These are not sent back to the main application because if PVM is 
00159         broken they will not reach their destination. */
00160 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00161 //#define PVM_DEBUG
00162 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00163 
00164 
00165 /* Outputs debugging information connected with the receiving of messages from
00166         an external device. */
00167 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00168 //#define RECEIVE_DEVICE_DATA_DEBUG
00169 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00170 
00171 
00172 // Ouputs information about saving synapses.
00173 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00174 //#define RELOAD_WEIGHTS_DEBUG
00175 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00176 
00177 
00178 // Ouputs information about saving synapses.
00179 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00180 //#define SAVE_WEIGHTS_DEBUG
00181 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00182 
00183 
00184 /* Ouputs debugging information about the sending 
00185         of messages to an external device. */
00186 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00187 //#define SEND_DEVICE_DATA_DEBUG
00188 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00189 
00190 
00191 // Outputs information about simulation
00192 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00193 //#define SIMULATION_DEBUG
00194 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00195 
00196 
00197 //Outputs information related to the transmission and reception of spikes
00198 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00199 //#define SPIKE_DEBUG
00200 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00201 
00202 
00203 /* Does more careful checks and outputs information about the synapse model
00204         USE THIS WITH CAUTION SINCE IT CRASHES SIMULATION WHEN RUNNING FAST PROBABLY
00205         BECAUSE TWO THREADS ARE ATTEMPTING TO ACCESS COUT AT THE SAME TIME OR SOMETHING
00206         SIMILAR */
00207 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00208 //#define SYNAPSE_MODEL_DEBUG
00209 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00210 
00211 
00212 // Outputs the synapse parameters when they are set or changed
00213 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00214 //#define SYNAPSE_PARAMETERS_DEBUG
00215 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00216 
00217 
00218 // Outputs information about tasks that this task connects to
00219 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00220 //#define TASK_DEBUG
00221 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00222 
00223 
00224 #endif //DEBUG_H
00225 
00226 

Generated on Mon Sep 3 22:24:34 2007 for SpikeStream Simulation by  doxygen 1.4.4