vcd_signal_dumper.h 18.9 KB
Newer Older
1 2 3 4 5
/*
 * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The OpenAirInterface Software Alliance licenses this file to You under
Cedric Roux's avatar
Cedric Roux committed
6
 * the OAI Public License, Version 1.1  (the "License"); you may not use this file
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
 * except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.openairinterface.org/?page_id=698
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *-------------------------------------------------------------------------------
 * For more information about the OpenAirInterface (OAI) Software Alliance:
 *      contact@openairinterface.org
 */

22 23 24
/*! \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
25 26
 * \author S. Roux
 * \maintainer: navid nikaein
27
 * \date 2012 - 2104
28
 * \version 0.1
nikaeinn's avatar
nikaeinn committed
29 30
 * \company Eurecom
 * \email: navid.nikaein@eurecom.fr
31 32 33 34 35 36 37 38 39 40
 * \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 */
41
typedef enum {
42
  VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_ENB=0,
43 44 45 46 47 48 49
  VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX1_ENB,
  VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX0_ENB,
  VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX1_ENB,
  VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_TX0_ENB,
  VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_TX1_ENB,
  VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_RX0_ENB,
  VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_RX1_ENB,
50 51 52 53
  VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_RU,
  VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX1_RU,
  VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX0_RU,
  VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX1_RU,
54 55 56 57
  VCD_SIGNAL_DUMPER_VARIABLES_TTI_NUMBER_TX0_RU,
  VCD_SIGNAL_DUMPER_VARIABLES_TTI_NUMBER_TX1_RU,
  VCD_SIGNAL_DUMPER_VARIABLES_TTI_NUMBER_RX0_RU,
  VCD_SIGNAL_DUMPER_VARIABLES_TTI_NUMBER_RX1_RU,
58 59
  VCD_SIGNAL_DUMPER_VARIABLES_RUNTIME_TX_ENB,
  VCD_SIGNAL_DUMPER_VARIABLES_RUNTIME_RX_ENB,
60 61 62 63 64 65 66 67
  VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_UE,
  VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX1_UE,
  VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX0_UE,
  VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX1_UE,
  VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_TX0_UE,
  VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_TX1_UE,
  VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_RX0_UE,
  VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_RX1_UE,
68 69 70 71
  VCD_SIGNAL_DUMPER_VARIABLES_UE_RX_OFFSET,
  VCD_SIGNAL_DUMPER_VARIABLES_DIFF,
  VCD_SIGNAL_DUMPER_VARIABLES_HW_SUBFRAME,
  VCD_SIGNAL_DUMPER_VARIABLES_HW_FRAME,
72 73
  VCD_SIGNAL_DUMPER_VARIABLES_HW_SUBFRAME_RX,
  VCD_SIGNAL_DUMPER_VARIABLES_HW_FRAME_RX,
74 75 76 77
  VCD_SIGNAL_DUMPER_VARIABLES_TXCNT,
  VCD_SIGNAL_DUMPER_VARIABLES_RXCNT,
  VCD_SIGNAL_DUMPER_VARIABLES_TRX_TS,
  VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST,
78 79
  VCD_SIGNAL_DUMPER_VARIABLES_TRX_TS_UE,
  VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST_UE,
knopp's avatar
knopp committed
80
  VCD_SIGNAL_DUMPER_VARIABLES_TRX_WRITE_FLAGS,
81 82 83 84 85 86 87
  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,
88
  VCD_SIGNAL_DUMPER_VARIABLES_TX_PCK,
89 90 91
  VCD_SIGNAL_DUMPER_VARIABLES_RX_SEQ_NUM,
  VCD_SIGNAL_DUMPER_VARIABLES_RX_SEQ_NUM_PRV,
  VCD_SIGNAL_DUMPER_VARIABLES_TX_SEQ_NUM,
92
  VCD_SIGNAL_DUMPER_VARIABLES_CNT,
93
  VCD_SIGNAL_DUMPER_VARIABLES_DUMMY_DUMP,
94 95 96 97 98 99
  VCD_SIGNAL_DUMPER_VARIABLES_ITTI_SEND_MSG,
  VCD_SIGNAL_DUMPER_VARIABLES_ITTI_POLL_MSG,
  VCD_SIGNAL_DUMPER_VARIABLES_ITTI_RECV_MSG,
  VCD_SIGNAL_DUMPER_VARIABLES_ITTI_ALLOC_MSG,
  VCD_SIGNAL_DUMPER_VARIABLES_MP_ALLOC,
  VCD_SIGNAL_DUMPER_VARIABLES_MP_FREE,
100 101
  VCD_SIGNAL_DUMPER_VARIABLES_UE_INST_CNT_RX,
  VCD_SIGNAL_DUMPER_VARIABLES_UE_INST_CNT_TX,
102
  VCD_SIGNAL_DUMPER_VARIABLES_DCI_INFO,
103 104 105
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_BSR,
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_BO,
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_SCHEDULED,
106
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_TIMING_ADVANCE,
107 108
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_SR_ENERGY,
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_SR_THRES,
109 110 111 112 113 114 115 116
  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,
117 118 119 120 121 122 123 124
  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,
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148
  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,
149 150 151 152 153 154 155 156
  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,
157 158 159 160
  VCD_SIGNAL_DUMPER_VARIABLES_SEND_IF4_SYMBOL,
  VCD_SIGNAL_DUMPER_VARIABLES_RECV_IF4_SYMBOL,
  VCD_SIGNAL_DUMPER_VARIABLES_SEND_IF5_PKT_ID,  
  VCD_SIGNAL_DUMPER_VARIABLES_RECV_IF5_PKT_ID,
161 162
  VCD_SIGNAL_DUMPER_VARIABLES_UE_PDCP_FLUSH_SIZE,
  VCD_SIGNAL_DUMPER_VARIABLES_UE_PDCP_FLUSH_ERR,
163 164
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_TRX_READ_NS,
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_TRX_WRITE_NS,
165 166
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_TRX_READ_NS_MISSING,
  VCD_SIGNAL_DUMPER_VARIABLES_UE0_TRX_WRITE_NS_MISSING,
167 168 169
  VCD_SIGNAL_DUMPER_VARIABLES_CPUID_ENB_THREAD_RXTX,
  VCD_SIGNAL_DUMPER_VARIABLES_CPUID_RU_THREAD,
  VCD_SIGNAL_DUMPER_VARIABLES_CPUID_RU_THREAD_TX,
Wang Tsu-Han's avatar
Wang Tsu-Han committed
170 171 172 173 174 175

  /*signal for NR*/
  VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_GNB,
  VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX1_GNB,
  VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX0_GNB,
  VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX1_GNB,
176 177 178 179
  VCD_SIGNAL_DUMPER_VARIABLES_SLOT_NUMBER_TX0_GNB,
  VCD_SIGNAL_DUMPER_VARIABLES_SLOT_NUMBER_TX1_GNB,
  VCD_SIGNAL_DUMPER_VARIABLES_SLOT_NUMBER_RX0_GNB,
  VCD_SIGNAL_DUMPER_VARIABLES_SLOT_NUMBER_RX1_GNB,
Wang Tsu-Han's avatar
Wang Tsu-Han committed
180

Cedric Roux's avatar
Cedric Roux committed
181
  VCD_SIGNAL_DUMPER_VARIABLES_END
182 183
} vcd_signal_dump_variables;

184
typedef enum {
185
  /* softmodem signals  */
186 187 188
  VCD_SIGNAL_DUMPER_FUNCTIONS_RT_SLEEP=0,
  VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ,
  VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE,
189 190
  VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ_UE,
  VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE_UE,
191 192
  VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ_IF,
  VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE_IF,
knopp's avatar
knopp committed
193 194
  VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RXTX0,
  VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RXTX1,
195 196 197
  VCD_SIGNAL_DUMPER_FUNCTIONS_UE_THREAD_SYNCH,
  VCD_SIGNAL_DUMPER_FUNCTIONS_UE_THREAD_RXTX0,
  VCD_SIGNAL_DUMPER_FUNCTIONS_UE_THREAD_RXTX1,
198 199
  VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ_SF9,
  VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE_SF9,
200 201
  VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SIGNAL_COND_RXTX0,
  VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SIGNAL_COND_RXTX1,
202 203 204 205 206 207 208 209
  VCD_SIGNAL_DUMPER_FUNCTIONS_UE_WAIT_COND_RXTX0,
  VCD_SIGNAL_DUMPER_FUNCTIONS_UE_WAIT_COND_RXTX1,
  VCD_SIGNAL_DUMPER_FUNCTIONS_UE_LOCK_MUTEX_RXTX_FOR_COND_WAIT0,
  VCD_SIGNAL_DUMPER_FUNCTIONS_UE_LOCK_MUTEX_RXTX_FOR_COND_WAIT1,
  VCD_SIGNAL_DUMPER_FUNCTIONS_UE_LOCK_MUTEX_RXTX_FOR_CNT_DECREMENT0,
  VCD_SIGNAL_DUMPER_FUNCTIONS_UE_LOCK_MUTEX_RXTX_FOR_CNT_DECREMENT1,
  VCD_SIGNAL_DUMPER_FUNCTIONS_UE_LOCK_MUTEX_RXTX_FOR_CNT_INCREMENT0,
  VCD_SIGNAL_DUMPER_FUNCTIONS_UE_LOCK_MUTEX_RXTX_FOR_CNT_INCREMENT1,
knopp's avatar
knopp committed
210 211 212 213
  /* SIMULATION signals */ 
  VCD_SIGNAL_DUMPER_FUNCTIONS_SIM_DO_DL_SIGNAL,
  VCD_SIGNAL_DUMPER_FUNCTIONS_SIM_DO_UL_SIGNAL,
  VCD_SIGNAL_DUMPER_FUNCTIONS_SIM_UE_TRX_READ,
214
  /* RRH signals  */ 
215 216 217 218 219 220 221
  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,
222 223
  VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ_RF,
  VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE_RF,
224

225
  /* PHY signals  */
226
  VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SYNCH,
227 228 229 230
  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,
231 232 233 234
  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,
235
  VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_TX1,
236 237
  VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPRX,
  VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPRX1,
238 239 240 241
  VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_OFDM,
  VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_OFDM1,
  VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_PREC,
  VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_PREC1,
knopp's avatar
knopp committed
242
  VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX_UESPEC,
243
  VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX_UESPEC1,
244 245
  VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX,
  VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_RX,
246 247 248 249 250
  VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX_ULSCH_UESPEC,
  VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX_PUCCH,
  VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX_ULSCH_COMMON,
  VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX_PRACH,
  VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX_ULSCH_RAR,
251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271
  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,
272
  VCD_SIGNAL_DUMPER_FUNCTIONS_RX_PHICH,
273 274 275 276
  VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC,
  VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_SI,
  VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_P,
  VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_RA,
277 278 279 280 281
  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,
282
  VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_ULSCH_MSG3,
283 284 285 286 287 288 289 290
  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,
291 292
  VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_SFGEN,
  VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_PRACH_RX,
293
  VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_RU_PRACH_RX,
294 295
  VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_PDCCH_TX,
  VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_RS_TX,
296
  VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GENERATE_PRACH,
297 298
  VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ULSCH_MODULATION,
  VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ULSCH_ENCODING,
299 300 301
#if 1 // add for debugging losing PDSCH immediately before and after reporting CQI
  VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ULSCH_ENCODING_FILL_CQI,
#endif
302 303 304
  VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ULSCH_SCRAMBLING,
  VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_MODULATION,
  VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ENCODING,
305
  VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ENCODING_W,
306
  VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_SCRAMBLING,
307 308
  VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_BEAM_PRECODING,
  VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_OFDM_MODULATION,
309 310

  /* MAC signals  */
311
  VCD_SIGNAL_DUMPER_FUNCTIONS_MACPHY_INIT,
312
  VCD_SIGNAL_DUMPER_FUNCTIONS_MACPHY_EXIT,
313 314 315 316 317 318 319 320 321 322
  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,
323
  VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_PREPROCESSOR,
324 325
  VCD_SIGNAL_DUMPER_FUNCTIONS_SCHEDULE_DLSCH, // schedule_ue_spec
  VCD_SIGNAL_DUMPER_FUNCTIONS_FILL_DLSCH_DCI,
326

327 328
  VCD_SIGNAL_DUMPER_FUNCTIONS_OUT_OF_SYNC_IND,
  VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_SI,
329
  VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_PCCH,
330 331 332 333 334 335 336 337 338
  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,
339 340

  /* RLC signals  */
341 342
  VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,
  // VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_IND,
343
  VCD_SIGNAL_DUMPER_FUNCTIONS_MAC_RLC_STATUS_IND,
344 345
  VCD_SIGNAL_DUMPER_FUNCTIONS_MAC_RLC_DATA_REQ,
  VCD_SIGNAL_DUMPER_FUNCTIONS_MAC_RLC_DATA_IND,
346 347 348
  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,
349

350
  /* PDCP signals  */
351 352 353 354 355
  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,
356 357 358 359
  VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_FIFO_READ,
  VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_FIFO_READ_BUFFER,
  VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_FIFO_FLUSH,
  VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_FIFO_FLUSH_BUFFER,
360 361

  /* RRC signals  */
362
  VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_RX_TX,
363 364 365 366
  VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_MAC_CONFIG,
  VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_UE_DECODE_SIB1,
  VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_UE_DECODE_SI,

367 368
  /* GTPV1U signals */
  VCD_SIGNAL_DUMPER_FUNCTIONS_GTPV1U_ENB_TASK,
gauthier's avatar
gauthier committed
369 370
  VCD_SIGNAL_DUMPER_FUNCTIONS_GTPV1U_PROCESS_UDP_REQ,
  VCD_SIGNAL_DUMPER_FUNCTIONS_GTPV1U_PROCESS_TUNNEL_DATA_REQ,
371 372 373 374

  /* UDP signals */
  VCD_SIGNAL_DUMPER_FUNCTIONS_UDP_ENB_TASK,

375
  /* MISC signals  */
376 377 378 379 380 381 382
  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,
383
  
384
  /* IF4/IF5 signals */
385 386
  VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF4,
  VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF4,
387 388 389
  VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF5,
  VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF5,

390 391 392
  VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_COMPR_IF,
  VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_DECOMPR_IF,

393 394 395 396 397 398 399 400 401 402
  VCD_SIGNAL_DUMPER_FUNCTIONS_NFAPI,
  VCD_SIGNAL_DUMPER_FUNCTIONS_GENERATE_PCFICH,
  VCD_SIGNAL_DUMPER_FUNCTIONS_GENERATE_DCI0,
  VCD_SIGNAL_DUMPER_FUNCTIONS_GENERATE_DLSCH,
  VCD_SIGNAL_DUMPER_FUNCTIONS_GENERATE_PHICH,
  VCD_SIGNAL_DUMPER_FUNCTIONS_PDCCH_SCRAMBLING,
  VCD_SIGNAL_DUMPER_FUNCTIONS_PDCCH_MODULATION,
  VCD_SIGNAL_DUMPER_FUNCTIONS_PDCCH_INTERLEAVING,
  VCD_SIGNAL_DUMPER_FUNCTIONS_PDCCH_TX,

Wang Tsu-Han's avatar
Wang Tsu-Han committed
403 404 405 406
  /*NR softmodem signal*/
  VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PROC_RXTX0,
  VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PROC_RXTX1,

Cedric Roux's avatar
Cedric Roux committed
407
  VCD_SIGNAL_DUMPER_FUNCTIONS_END
408 409
} vcd_signal_dump_functions;

410 411
typedef enum {
  VCD_SIGNAL_DUMPER_MODULE_FREE = 0,
412

413 414 415
  VCD_SIGNAL_DUMPER_MODULE_VARIABLES,
  VCD_SIGNAL_DUMPER_MODULE_FUNCTIONS,
  //     VCD_SIGNAL_DUMPER_MODULE_UE_PROCEDURES_FUNCTIONS,
416 417
} vcd_signal_dumper_modules;

418 419 420 421
typedef enum {
  VCD_FUNCTION_OUT,
  VCD_FUNCTION_IN,
  VCD_FUNCTION_LAST,
422 423 424
} vcd_signal_dump_in_out;

typedef enum {
425 426
  VCD_REAL, // REAL = variable
  VCD_WIRE, // WIRE = Function
427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449
} 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,
450
    unsigned long             value);
451 452 453 454 455 456
/*!
 * \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,
457
    vcd_signal_dump_in_out     function_in_out);
458 459 460

extern int ouput_vcd;

Cedric Roux's avatar
Cedric Roux committed
461 462
#if T_TRACER

463 464
#include "T.h"

Cedric Roux's avatar
Cedric Roux committed
465 466
#define VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(var, val) T_VCD_VARIABLE(var, val)
#define VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(var, val) T_VCD_FUNCTION(var, val)
gauthier's avatar
gauthier committed
467 468
#else

469 470 471
#define VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(var, val)
#define VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(var, val)
 
Cedric Roux's avatar
Cedric Roux committed
472 473
#endif /* T_TRACER */

474 475
#endif /* !defined (VCD_SIGNAL_DUMPER_H_) */