vcd_signal_dumper.h 15.3 KB
Newer Older
1
/*******************************************************************************
nikaeinn's avatar
nikaeinn committed
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
    OpenAirInterface
    Copyright(c) 1999 - 2014 Eurecom

    OpenAirInterface is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.


    OpenAirInterface is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with OpenAirInterface.The full GNU General Public License is
    included in this distribution in the file called "COPYING". If not,
    see <http://www.gnu.org/licenses/>.

  Contact Information
  OpenAirInterface Admin: openair_admin@eurecom.fr
  OpenAirInterface Tech : openair_tech@eurecom.fr
24
  OpenAirInterface Dev  : openair4g-devel@lists.eurecom.fr
nikaeinn's avatar
nikaeinn committed
25

ghaddab's avatar
ghaddab committed
26
  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
nikaeinn's avatar
nikaeinn committed
27 28

*******************************************************************************/
29 30 31 32

/*! \file vcd_signal_dumper.h
 * \brief Output functions call to VCD file which is readable by gtkwave.
 * \author ROUX Sebastien
nikaeinn's avatar
nikaeinn committed
33 34
 * \author S. Roux
 * \maintainer: navid nikaein
35
 * \date 2012 - 2104
36
 * \version 0.1
nikaeinn's avatar
nikaeinn committed
37 38
 * \company Eurecom
 * \email: navid.nikaein@eurecom.fr
39 40 41 42 43 44 45 46 47 48
 * \note
 * \warning
 */

#ifndef VCD_SIGNAL_DUMPER_H_
#define VCD_SIGNAL_DUMPER_H_

//#define ENABLE_USE_CPU_EXECUTION_TIME

/* WARNING: if you edit the enums below, update also string definitions in vcd_signal_dumper.c */
49 50 51
typedef enum {
  VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX_ENB = 0,
  VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX_ENB,
52 53
  VCD_SIGNAL_DUMPER_VARIABLES_RUNTIME_TX_ENB,
  VCD_SIGNAL_DUMPER_VARIABLES_RUNTIME_RX_ENB,
54 55 56 57 58 59
  VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX_UE,
  VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX_UE,
  VCD_SIGNAL_DUMPER_VARIABLES_SLOT_NUMBER_TX_UE,
  VCD_SIGNAL_DUMPER_VARIABLES_SLOT_NUMBER_RX_UE,
  VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_TX_UE,
  VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_RX_UE,
60
  VCD_SIGNAL_DUMPER_VARIABLES_MISSED_SLOTS_ENB,
61 62 63 64 65 66
  VCD_SIGNAL_DUMPER_VARIABLES_DAQ_MBOX,
  VCD_SIGNAL_DUMPER_VARIABLES_UE_OFFSET_MBOX,
  VCD_SIGNAL_DUMPER_VARIABLES_UE_RX_OFFSET,
  VCD_SIGNAL_DUMPER_VARIABLES_DIFF,
  VCD_SIGNAL_DUMPER_VARIABLES_HW_SUBFRAME,
  VCD_SIGNAL_DUMPER_VARIABLES_HW_FRAME,
navid's avatar
navid committed
67 68
  VCD_SIGNAL_DUMPER_VARIABLES_HW_SUBFRAME_RX,
  VCD_SIGNAL_DUMPER_VARIABLES_HW_FRAME_RX,
69 70 71 72
  VCD_SIGNAL_DUMPER_VARIABLES_TXCNT,
  VCD_SIGNAL_DUMPER_VARIABLES_RXCNT,
  VCD_SIGNAL_DUMPER_VARIABLES_TRX_TS,
  VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST,
73 74 75 76 77 78 79
  VCD_SIGNAL_DUMPER_VARIABLES_TX_TS,
  VCD_SIGNAL_DUMPER_VARIABLES_RX_TS,
  VCD_SIGNAL_DUMPER_VARIABLES_RX_HWCNT,
  VCD_SIGNAL_DUMPER_VARIABLES_RX_LHWCNT,
  VCD_SIGNAL_DUMPER_VARIABLES_TX_HWCNT,
  VCD_SIGNAL_DUMPER_VARIABLES_TX_LHWCNT,
  VCD_SIGNAL_DUMPER_VARIABLES_RX_PCK,
navid's avatar
navid committed
80
  VCD_SIGNAL_DUMPER_VARIABLES_TX_PCK,
81 82 83
  VCD_SIGNAL_DUMPER_VARIABLES_RX_SEQ_NUM,
  VCD_SIGNAL_DUMPER_VARIABLES_RX_SEQ_NUM_PRV,
  VCD_SIGNAL_DUMPER_VARIABLES_TX_SEQ_NUM,
navid's avatar
navid committed
84
  VCD_SIGNAL_DUMPER_VARIABLES_CNT,
85
  VCD_SIGNAL_DUMPER_VARIABLES_DUMMY_DUMP,
86 87 88 89 90 91
  VCD_SIGNAL_DUMPER_VARIABLE_ITTI_SEND_MSG,
  VCD_SIGNAL_DUMPER_VARIABLE_ITTI_POLL_MSG,
  VCD_SIGNAL_DUMPER_VARIABLE_ITTI_RECV_MSG,
  VCD_SIGNAL_DUMPER_VARIABLE_ITTI_ALLOC_MSG,
  VCD_SIGNAL_DUMPER_VARIABLE_MP_ALLOC,
  VCD_SIGNAL_DUMPER_VARIABLE_MP_FREE,
92 93
  VCD_SIGNAL_DUMPER_VARIABLES_UE_INST_CNT_RX,
  VCD_SIGNAL_DUMPER_VARIABLES_UE_INST_CNT_TX,
94
  VCD_SIGNAL_DUMPER_VARIABLES_DCI_INFO,
95 96 97
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_BSR,
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_BO,
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_SCHEDULED,
98
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_TIMING_ADVANCE,
99 100
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_SR_ENERGY,
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_SR_THRES,
101 102 103 104 105 106 107 108
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_RSSI0,
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_RSSI1,
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_RSSI2,
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_RSSI3,
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_RSSI4,
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_RSSI5,
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_RSSI6,
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_RSSI7,
109 110 111 112 113 114 115 116
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_RES0,
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_RES1,
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_RES2,
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_RES3,
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_RES4,
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_RES5,
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_RES6,
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_RES7,
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_MCS0,
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_MCS1,
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_MCS2,
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_MCS3,
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_MCS4,
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_MCS5,
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_MCS6,
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_MCS7,
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_RB0,
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_RB1,
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_RB2,
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_RB3,
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_RB4,
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_RB5,
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_RB6,
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_RB7,
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_ROUND0,
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_ROUND1,
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_ROUND2,
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_ROUND3,
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_ROUND4,
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_ROUND5,
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_ROUND6,
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_ROUND7,
141 142 143 144 145 146 147 148
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_SFN0,
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_SFN1,
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_SFN2,
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_SFN3,
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_SFN4,
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_SFN5,
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_SFN6,
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_SFN7,
149 150
  VCD_SIGNAL_DUMPER_VARIABLES_LAST,
  VCD_SIGNAL_DUMPER_VARIABLES_END = VCD_SIGNAL_DUMPER_VARIABLES_LAST,
151 152
} vcd_signal_dump_variables;

153
typedef enum {
154
  /* softmodem signals  */
155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177
  VCD_SIGNAL_DUMPER_FUNCTIONS_RT_SLEEP=0,
  VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ,
  VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE,
  VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_TX0,
  VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RX0,
  VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_TX1,
  VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RX1,
  VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_TX2,
  VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RX2,
  VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_TX3,
  VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RX3,
  VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_TX4,
  VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RX4,
  VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_TX5,
  VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RX5,
  VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_TX6,
  VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RX6,
  VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_TX7,
  VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RX7,
  VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_TX8,
  VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RX8,
  VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_TX9,
  VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RX9,
178 179
  VCD_SIGNAL_DUMPER_FUNCTIONS_UE_THREAD_TX,
  VCD_SIGNAL_DUMPER_FUNCTIONS_UE_THREAD_RX,
180

navid's avatar
navid committed
181
  /* RRH signals  */ 
182 183 184 185 186 187 188
  VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_TX,
  VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_RX,
  VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_TRX,
  VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_TM,
  VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_RX_SLEEP,
  VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_TX_SLEEP,
  VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_SLEEP,
navid's avatar
navid committed
189 190
  VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ_RF,
  VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE_RF,
191

192
  /* PHY signals  */
193
  VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SYNCH,
knopp's avatar
 
knopp committed
194 195 196 197
  VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP,
  VCD_SIGNAL_DUMPER_FUNCTIONS_UE_RRC_MEASUREMENTS,
  VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GAIN_CONTROL,
  VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ADJUST_SYNCH,
198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225
  VCD_SIGNAL_DUMPER_FUNCTIONS_UE_MEASUREMENT_PROCEDURES,
  VCD_SIGNAL_DUMPER_FUNCTIONS_UE_PDCCH_PROCEDURES,
  VCD_SIGNAL_DUMPER_FUNCTIONS_UE_PBCH_PROCEDURES,
  VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_TX,
  VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX,
  VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX,
  VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_RX,
  VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_LTE,
  VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_LTE,
  VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_THREAD,
  VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_THREAD0,
  VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_THREAD1,
  VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_THREAD2,
  VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_THREAD3,
  VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_THREAD4,
  VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_THREAD5,
  VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_THREAD6,
  VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_THREAD7,
  VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DECODING0,
  VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DECODING1,
  VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DECODING2,
  VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DECODING3,
  VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DECODING4,
  VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DECODING5,
  VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DECODING6,
  VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DECODING7,
  VCD_SIGNAL_DUMPER_FUNCTIONS_RX_PDCCH,
  VCD_SIGNAL_DUMPER_FUNCTIONS_DCI_DECODING,
knopp's avatar
 
knopp committed
226
  VCD_SIGNAL_DUMPER_FUNCTIONS_RX_PHICH,
227 228 229 230 231
  VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_UE_CONFIG_SIB2,
  VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_CONFIG_SIB1_ENB,
  VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_CONFIG_SIB2_ENB,
  VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_CONFIG_DEDICATED_ENB,
  VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_UE_COMPUTE_PRACH,
232
  VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_ULSCH_MSG3,
233 234 235 236 237 238 239 240
  VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_ULSCH_DECODING0,
  VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_ULSCH_DECODING1,
  VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_ULSCH_DECODING2,
  VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_ULSCH_DECODING3,
  VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_ULSCH_DECODING4,
  VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_ULSCH_DECODING5,
  VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_ULSCH_DECODING6,
  VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_ULSCH_DECODING7,
241 242 243 244
  VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_SFGEN,
  VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_PRACH_RX,
  VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_PDCCH_TX,
  VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_RS_TX,
245
  VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GENERATE_PRACH,
246 247 248 249 250 251
  VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ULSCH_MODULATION,
  VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ULSCH_ENCODING,
  VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ULSCH_SCRAMBLING,
  VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_MODULATION,
  VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ENCODING,
  VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_SCRAMBLING,
252 253

  /* MAC signals  */
254
  VCD_SIGNAL_DUMPER_FUNCTIONS_MACPHY_INIT,
255
  VCD_SIGNAL_DUMPER_FUNCTIONS_MACPHY_EXIT,
256 257 258 259 260 261 262 263 264 265
  VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ULSCH_SCHEDULER,
  VCD_SIGNAL_DUMPER_FUNCTIONS_FILL_RAR,
  VCD_SIGNAL_DUMPER_FUNCTIONS_TERMINATE_RA_PROC,
  VCD_SIGNAL_DUMPER_FUNCTIONS_INITIATE_RA_PROC,
  VCD_SIGNAL_DUMPER_FUNCTIONS_CANCEL_RA_PROC,
  VCD_SIGNAL_DUMPER_FUNCTIONS_GET_DCI_SDU,
  VCD_SIGNAL_DUMPER_FUNCTIONS_GET_DLSCH_SDU,
  VCD_SIGNAL_DUMPER_FUNCTIONS_RX_SDU,
  VCD_SIGNAL_DUMPER_FUNCTIONS_MRBCH_PHY_SYNC_FAILURE,
  VCD_SIGNAL_DUMPER_FUNCTIONS_SR_INDICATION,
266
  VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_PREPROCESSOR,
267 268
  VCD_SIGNAL_DUMPER_FUNCTIONS_SCHEDULE_DLSCH, // schedule_ue_spec
  VCD_SIGNAL_DUMPER_FUNCTIONS_FILL_DLSCH_DCI,
269

270 271 272 273 274 275 276 277 278 279 280
  VCD_SIGNAL_DUMPER_FUNCTIONS_OUT_OF_SYNC_IND,
  VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_SI,
  VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_CCCH,
  VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_BCCH,
  VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SEND_SDU,
  VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GET_SDU,
  VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GET_RACH,
  VCD_SIGNAL_DUMPER_FUNCTIONS_UE_PROCESS_RAR,
  VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SCHEDULER,
  VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GET_SR,
  VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SEND_MCH_SDU,
281 282

  /* RLC signals  */
283 284
  VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,
  // VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_IND,
285
  VCD_SIGNAL_DUMPER_FUNCTIONS_MAC_RLC_STATUS_IND,
286 287
  VCD_SIGNAL_DUMPER_FUNCTIONS_MAC_RLC_DATA_REQ,
  VCD_SIGNAL_DUMPER_FUNCTIONS_MAC_RLC_DATA_IND,
gauthier's avatar
 
gauthier committed
288 289 290
  VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_UM_TRY_REASSEMBLY,
  VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_UM_CHECK_TIMER_DAR_TIME_OUT,
  VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_UM_RECEIVE_PROCESS_DAR,
291

292
  /* PDCP signals  */
293 294 295 296 297
  VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_RUN,
  VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_DATA_REQ,
  VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_DATA_IND,
  VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_APPLY_SECURITY,
  VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_VALIDATE_SECURITY,
298 299

  /* RRC signals  */
300
  VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_RX_TX,
301 302 303 304
  VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_MAC_CONFIG,
  VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_UE_DECODE_SIB1,
  VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_UE_DECODE_SI,

gauthier's avatar
 
gauthier committed
305 306
  /* GTPV1U signals */
  VCD_SIGNAL_DUMPER_FUNCTIONS_GTPV1U_ENB_TASK,
gauthier's avatar
gauthier committed
307 308
  VCD_SIGNAL_DUMPER_FUNCTIONS_GTPV1U_PROCESS_UDP_REQ,
  VCD_SIGNAL_DUMPER_FUNCTIONS_GTPV1U_PROCESS_TUNNEL_DATA_REQ,
gauthier's avatar
 
gauthier committed
309 310 311 312

  /* UDP signals */
  VCD_SIGNAL_DUMPER_FUNCTIONS_UDP_ENB_TASK,

313
  /* MISC signals  */
314 315 316 317 318 319 320 321 322
  VCD_SIGNAL_DUMPER_FUNCTIONS_EMU_TRANSPORT,
  VCD_SIGNAL_DUMPER_FUNCTIONS_LOG_RECORD,
  VCD_SIGNAL_DUMPER_FUNCTIONS_ITTI_ENQUEUE_MESSAGE,
  VCD_SIGNAL_DUMPER_FUNCTIONS_ITTI_DUMP_ENQUEUE_MESSAGE,
  VCD_SIGNAL_DUMPER_FUNCTIONS_ITTI_DUMP_ENQUEUE_MESSAGE_MALLOC,
  VCD_SIGNAL_DUMPER_FUNCTIONS_ITTI_RELAY_THREAD,
  VCD_SIGNAL_DUMPER_FUNCTIONS_TEST,
  VCD_SIGNAL_DUMPER_FUNCTIONS_LAST,
  VCD_SIGNAL_DUMPER_FUNCTIONS_END = VCD_SIGNAL_DUMPER_FUNCTIONS_LAST,
323 324
} vcd_signal_dump_functions;

325 326
typedef enum {
  VCD_SIGNAL_DUMPER_MODULE_FREE = 0,
327

328 329 330 331 332
  VCD_SIGNAL_DUMPER_MODULE_VARIABLES,
  VCD_SIGNAL_DUMPER_MODULE_FUNCTIONS,
  //     VCD_SIGNAL_DUMPER_MODULE_UE_PROCEDURES_FUNCTIONS,
  VCD_SIGNAL_DUMPER_MODULE_LAST,
  VCD_SIGNAL_DUMPER_MODULE_END = VCD_SIGNAL_DUMPER_MODULE_LAST,
333 334
} vcd_signal_dumper_modules;

335 336 337 338
typedef enum {
  VCD_FUNCTION_OUT,
  VCD_FUNCTION_IN,
  VCD_FUNCTION_LAST,
339 340 341
} vcd_signal_dump_in_out;

typedef enum {
342 343
  VCD_REAL, // REAL = variable
  VCD_WIRE, // WIRE = Function
344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366
} vcd_signal_type;

/*!
 * \brief Init function for the vcd dumper.
 * @param None
 */
void vcd_signal_dumper_init(char* filename);
/*!
 * \brief Close file descriptor.
 * @param None
 */
void vcd_signal_dumper_close(void);
/*!
 * \brief Create header for VCD file.
 * @param None
 */
void vcd_signal_dumper_create_header(void);
/*!
 * \brief Dump state of a variable
 * @param Name of the variable to dump (see the corresponding enum)
 * @param Value of the variable to dump (type: unsigned long)
 */
void vcd_signal_dumper_dump_variable_by_name(vcd_signal_dump_variables variable_name,
367
    unsigned long             value);
368 369 370 371 372 373
/*!
 * \brief Dump function usage
 * @param Name Function name to dump (see the corresponding enum)
 * @param State: either VCD_FUNCTION_START or VCD_FUNCTION_END
 */
void vcd_signal_dumper_dump_function_by_name(vcd_signal_dump_functions  function_name,
374
    vcd_signal_dump_in_out     function_in_out);
375 376 377

extern int ouput_vcd;

gauthier's avatar
gauthier committed
378 379 380 381 382 383 384 385 386 387 388 389 390 391
#if defined(ENABLE_VCD)
   #define VCD_SIGNAL_DUMPER_INIT(aRgUmEnT)                   vcd_signal_dumper_init(aRgUmEnT)
   #define VCD_SIGNAL_DUMPER_CLOSE()                          vcd_signal_dumper_close()
   #define VCD_SIGNAL_DUMPER_CREATE_HEADER()                  vcd_signal_dumper_create_header()
   #define VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(vAr1,vAr2) vcd_signal_dumper_dump_variable_by_name(vAr1,vAr2)
   #define VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(vAr1,vAr2) vcd_signal_dumper_dump_function_by_name(vAr1,vAr2)
#else
   #define VCD_SIGNAL_DUMPER_INIT(aRgUmEnT)
   #define VCD_SIGNAL_DUMPER_CLOSE()
   #define VCD_SIGNAL_DUMPER_CREATE_HEADER()
   #define VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(vAr1,vAr2)
   #define VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(vAr1,vAr2)
#endif

392 393
#endif /* !defined (VCD_SIGNAL_DUMPER_H_) */