eNB_scheduler.c 33.5 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
/*
 * 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
 * the OAI Public License, Version 1.0  (the "License"); you may not use this file
 * 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
 */
21 22

/*! \file eNB_scheduler.c
23
 * \brief eNB scheduler top level function operates on per subframe basis
24 25
 * \author  Navid Nikaein and Raymond Knopp
 * \date 2010 - 2014
26
 * \email: navid.nikaein@eurecom.fr
27 28
 * \version 0.5
 * @ingroup _mac
29

30
 */
31

32
#include "assertions.h"
33 34 35 36 37 38 39 40
#include "PHY/defs.h"
#include "PHY/extern.h"

#include "SCHED/defs.h"
#include "SCHED/extern.h"

#include "LAYER2/MAC/defs.h"
#include "LAYER2/MAC/extern.h"
41

42 43 44 45 46 47
#include "LAYER2/MAC/proto.h"
#include "UTIL/LOG/log.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "UTIL/OPT/opt.h"
#include "OCG.h"
#include "OCG_extern.h"
48

49 50
#include "RRC/LITE/extern.h"
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
51

52 53
//#include "LAYER2/MAC/pre_processor.c"
#include "pdcp.h"
54

55
#if defined(FLEXRAN_AGENT_SB_IF)
56
//Agent-related headers
57 58 59
#include "flexran_agent_extern.h"
#include "flexran_agent_mac.h"
#include "flexran_agent_mac_proto.h"
60
#endif
61

62 63
#if defined(ENABLE_ITTI)
# include "intertask_interface.h"
64 65
#endif

66 67
#define ENABLE_MAC_PAYLOAD_DEBUG
#define DEBUG_eNB_SCHEDULER 1
68
//efine ENABLE_ENB_AGENT_DL_SCHEDULER
69
//#define DISABLE_SF_TRIGGER
70
//#define DISABLE_CONT_STATS
71

72 73
//#define DEBUG_HEADER_PARSING 1
//#define DEBUG_PACKET_TRACE 1
74

75 76 77 78 79
/*
  #ifndef USER_MODE
  #define msg debug_msg
  #endif
 */
80 81 82



83

84 85 86



87 88
void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag, frame_t frameP, sub_frame_t subframeP)  //, int calibration_flag) {
{
89

Raymond Knopp's avatar
 
Raymond Knopp committed
90
  int mbsfn_status[MAX_NUM_CCs];
91
  protocol_ctxt_t   ctxt;
92
#ifdef EXMIMO
Cedric Roux's avatar
Cedric Roux committed
93
  //int ret;
94
#endif
95
#if defined(ENABLE_ITTI)
96
  MessageDef   *msg_p;
97
  const char         *msg_name;
98 99
  instance_t    instance;
  int           result;
100
#endif
Raymond Knopp's avatar
 
Raymond Knopp committed
101
  DCI_PDU *DCI_pdu[MAX_NUM_CCs];
102
  int CC_id,i; //,next_i;
Raymond Knopp's avatar
 
Raymond Knopp committed
103
  UE_list_t *UE_list=&eNB_mac_inst[module_idP].UE_list;
104
  rnti_t rnti;
105
  void         *DLSCH_dci=NULL;
106
  int size_bits=0,size_bytes=0;
107

108
#if defined(FLEXRAN_AGENT_SB_IF)
109
  Protocol__FlexranMessage *msg;
110
#endif
111

112
  LOG_D(MAC,"[eNB %d] Frame %d, Subframe %d, entering MAC scheduler (UE_list->head %d)\n",module_idP, frameP, subframeP,UE_list->head);
113

114
  start_meas(&eNB_mac_inst[module_idP].eNB_scheduler);
115
  VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ULSCH_SCHEDULER,VCD_FUNCTION_IN);
116

117
  for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
Raymond Knopp's avatar
 
Raymond Knopp committed
118 119
    DCI_pdu[CC_id] = &eNB_mac_inst[module_idP].common_channels[CC_id].DCI_pdu;
    mbsfn_status[CC_id]=0;
120 121
    // clear vrb_map
    memset(eNB_mac_inst[module_idP].common_channels[CC_id].vrb_map,0,100);
Raymond Knopp's avatar
 
Raymond Knopp committed
122
  }
123

124 125 126 127 128 129 130 131 132 133 134
  // clear DCI and BCCH contents before scheduling
  for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
    DCI_pdu[CC_id]->Num_common_dci  = 0;
    DCI_pdu[CC_id]->Num_ue_spec_dci = 0;
#ifdef Rel10
    eNB_mac_inst[module_idP].common_channels[CC_id].mcch_active =0;
#endif
    eNB_mac_inst[module_idP].frame    = frameP;
    eNB_mac_inst[module_idP].subframe = subframeP;
  }

Raymond Knopp's avatar
 
Raymond Knopp committed
135
  // refresh UE list based on UEs dropped by PHY in previous subframe
136 137
  for (i = 0; i < NUMBER_OF_UE_MAX; i++) {
    if (UE_list->active[i] != TRUE) continue;
138

139 140
    rnti = UE_RNTI(module_idP, i);
    CC_id = UE_PCCID(module_idP, i);
141
    if ((frameP==0)&&(subframeP==0))
142 143 144
      LOG_I(MAC,"UE  rnti %x : %s, PHR %d dB\n", rnti, 
	    UE_list->UE_sched_ctrl[i].ul_out_of_sync==0 ? "in synch" : "out of sync",
	    UE_list->UE_template[CC_id][i].phr_info);
145

146 147 148
    PHY_vars_eNB_g[module_idP][CC_id]->pusch_stats_bsr[i][(frameP*10)+subframeP]=-63;
    if (i==UE_list->head)
      VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_UE0_BSR,PHY_vars_eNB_g[module_idP][CC_id]->pusch_stats_bsr[i][(frameP*10)+subframeP]); 
149 150
    // increment this, it is cleared when we receive an sdu
    eNB_mac_inst[module_idP].UE_list.UE_sched_ctrl[i].ul_inactivity_timer++;
151 152

    eNB_mac_inst[module_idP].UE_list.UE_sched_ctrl[i].cqi_req_timer++;
153
    
154

155
    if (mac_xface->get_eNB_UE_stats(module_idP, CC_id, rnti)==NULL) {
156
	//mac_remove_ue(module_idP, i, frameP, subframeP);
157
      //Inform the controller about the UE deactivation. Should be moved to RRC agent in the future
158
#if defined(FLEXRAN_AGENT_SB_IF)
159
      if (mac_agent_registered[module_idP]) {
160 161 162
	agent_mac_xface[module_idP]->flexran_agent_notify_ue_state_change(module_idP,
									  rnti,
									  PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_DEACTIVATED);
163
      }
164
#endif
165
    }
166 167
    else {
      // check uplink failure
kaltenbe's avatar
kaltenbe committed
168 169 170 171 172 173 174
      if ((UE_list->UE_sched_ctrl[i].ul_failure_timer>0)&&
	  (UE_list->UE_sched_ctrl[i].ul_out_of_sync==0)) {
	LOG_D(MAC,"UE %d rnti %x: UL Failure timer %d \n",i,rnti,UE_list->UE_sched_ctrl[i].ul_failure_timer);
	if (UE_list->UE_sched_ctrl[i].ra_pdcch_order_sent==0) {
	  UE_list->UE_sched_ctrl[i].ra_pdcch_order_sent=1;
	  
	  // add a format 1A dci for this UE to request an RA procedure (only one UE per subframe)
175
	  LOG_D(MAC,"UE %d rnti %x: sending PDCCH order for RAPROC (failure timer %d) \n",i,rnti,UE_list->UE_sched_ctrl[i].ul_failure_timer);	    
kaltenbe's avatar
kaltenbe committed
176 177
	  DLSCH_dci = (void *)UE_list->UE_template[CC_id][i].DLSCH_DCI[0];
	  *(uint32_t*)DLSCH_dci = 0;
178 179
	  if (PHY_vars_eNB_g[module_idP][CC_id]->frame_parms.frame_type == TDD) {
	    switch (PHY_vars_eNB_g[module_idP][CC_id]->frame_parms.N_RB_DL) {
kaltenbe's avatar
kaltenbe committed
180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203
	    case 6:
	      ((DCI1A_1_5MHz_TDD_1_6_t*)DLSCH_dci)->type = 1;
	      ((DCI1A_1_5MHz_TDD_1_6_t*)DLSCH_dci)->rballoc = 31;
	      size_bytes = sizeof(DCI1A_1_5MHz_TDD_1_6_t);
	      size_bits  = sizeof_DCI1A_1_5MHz_TDD_1_6_t;
	      break;
	    case 25:
	      ((DCI1A_5MHz_TDD_1_6_t*)DLSCH_dci)->type = 1;
	      ((DCI1A_5MHz_TDD_1_6_t*)DLSCH_dci)->rballoc = 511;
	      size_bytes = sizeof(DCI1A_5MHz_TDD_1_6_t);
	      size_bits  = sizeof_DCI1A_5MHz_TDD_1_6_t;
	      break;
	    case 50:
	      ((DCI1A_10MHz_TDD_1_6_t*)DLSCH_dci)->type = 1;
	      ((DCI1A_10MHz_TDD_1_6_t*)DLSCH_dci)->rballoc = 2047;
	      size_bytes = sizeof(DCI1A_10MHz_TDD_1_6_t);
	      size_bits  = sizeof_DCI1A_10MHz_TDD_1_6_t;
	      break;
	    case 100:
	      ((DCI1A_20MHz_TDD_1_6_t*)DLSCH_dci)->type = 1;
	      ((DCI1A_20MHz_TDD_1_6_t*)DLSCH_dci)->rballoc = 8191;
	      size_bytes = sizeof(DCI1A_20MHz_TDD_1_6_t);
	      size_bits  = sizeof_DCI1A_20MHz_TDD_1_6_t;
	      break;
204
	    }
kaltenbe's avatar
kaltenbe committed
205 206
	  }
	  else { // FDD
207
	    switch (PHY_vars_eNB_g[module_idP][CC_id]->frame_parms.N_RB_DL) {
kaltenbe's avatar
kaltenbe committed
208 209 210 211 212 213
	    case 6:
	      ((DCI1A_1_5MHz_FDD_t*)DLSCH_dci)->type = 1;
	      ((DCI1A_1_5MHz_FDD_t*)DLSCH_dci)->rballoc = 31;
	      size_bytes = sizeof(DCI1A_1_5MHz_FDD_t);
	      size_bits  = sizeof_DCI1A_1_5MHz_FDD_t;
	      break;
214 215 216 217 218 219
	    case 15:/*
	      ((DCI1A_2_5MHz_FDD_t*)DLSCH_dci)->type = 1;
	      ((DCI1A_2_5MHz_FDD_t*)DLSCH_dci)->rballoc = 31;
	      size_bytes = sizeof(DCI1A_1_5MHz_FDD_t);
	      size_bits  = sizeof_DCI1A_1_5MHz_FDD_t;*/
	      break;
kaltenbe's avatar
kaltenbe committed
220 221 222 223 224 225 226 227 228 229 230
	    case 25:
	      ((DCI1A_5MHz_FDD_t*)DLSCH_dci)->type = 1;
	      ((DCI1A_5MHz_FDD_t*)DLSCH_dci)->rballoc = 511;
	      size_bytes = sizeof(DCI1A_5MHz_FDD_t);
	      size_bits  = sizeof_DCI1A_5MHz_FDD_t;
	      break;
	    case 50:
	      ((DCI1A_10MHz_FDD_t*)DLSCH_dci)->type = 1;
	      ((DCI1A_10MHz_FDD_t*)DLSCH_dci)->rballoc = 2047;
	      size_bytes = sizeof(DCI1A_10MHz_FDD_t);
	      size_bits  = sizeof_DCI1A_10MHz_FDD_t;
231
		break;
232 233 234 235 236 237
	    case 75:
	      /*	      ((DCI1A_15MHz_FDD_t*)DLSCH_dci)->type = 1;
	      ((DCI1A_15MHz_FDD_t*)DLSCH_dci)->rballoc = 2047;
	      size_bytes = sizeof(DCI1A_10MHz_FDD_t);
	      size_bits  = sizeof_DCI1A_10MHz_FDD_t;*/
		break;
kaltenbe's avatar
kaltenbe committed
238 239 240 241 242 243
	    case 100:
	      ((DCI1A_20MHz_FDD_t*)DLSCH_dci)->type = 1;
	      ((DCI1A_20MHz_FDD_t*)DLSCH_dci)->rballoc = 8191;
	      size_bytes = sizeof(DCI1A_20MHz_FDD_t);
	      size_bits  = sizeof_DCI1A_20MHz_FDD_t;
	      break;
244 245
	    }
	  }
kaltenbe's avatar
kaltenbe committed
246 247 248 249 250 251 252 253 254
	  
	  add_ue_spec_dci(DCI_pdu[CC_id],
			  DLSCH_dci,
			  rnti,
			    size_bytes,
			  process_ue_cqi (module_idP,i),//aggregation,
			  size_bits,
			  format1A,
			  0);
255
	}
kaltenbe's avatar
kaltenbe committed
256
	else { // ra_pdcch_sent==1
257
	  LOG_D(MAC,"UE %d rnti %x: sent PDCCH order for RAPROC waiting (failure timer %d) \n",i,rnti,UE_list->UE_sched_ctrl[i].ul_failure_timer);	    	    
kaltenbe's avatar
kaltenbe committed
258 259
	  if ((UE_list->UE_sched_ctrl[i].ul_failure_timer % 40) == 0)
	    UE_list->UE_sched_ctrl[i].ra_pdcch_order_sent=0; // resend every 4 frames	      
260
	}
261 262 263 264 265
      
	UE_list->UE_sched_ctrl[i].ul_failure_timer++;
	// check threshold
	if (UE_list->UE_sched_ctrl[i].ul_failure_timer > 200) {
	  // inform RRC of failure and clear timer
Cedric Roux's avatar
Cedric Roux committed
266
	  LOG_I(MAC,"UE %d rnti %x: UL Failure after repeated PDCCH orders: Triggering RRC \n",i,rnti);
267 268 269 270
	  mac_eNB_rrc_ul_failure(module_idP,CC_id,frameP,subframeP,rnti);
	  UE_list->UE_sched_ctrl[i].ul_failure_timer=0;
	  UE_list->UE_sched_ctrl[i].ul_out_of_sync=1;
	}
kaltenbe's avatar
kaltenbe committed
271 272
      }
    } // ul_failure_timer>0
Raymond Knopp's avatar
 
Raymond Knopp committed
273
  }
274

275
#if defined(ENABLE_ITTI)
276

277
  do {
278 279
    // Checks if a message has been sent to MAC sub-task
    itti_poll_msg (TASK_MAC_ENB, &msg_p);
280

281 282 283
    if (msg_p != NULL) {
      msg_name = ITTI_MSG_NAME (msg_p);
      instance = ITTI_MSG_INSTANCE (msg_p);
284

285 286 287 288
      switch (ITTI_MSG_ID(msg_p)) {
      case MESSAGE_TEST:
        LOG_D(MAC, "Received %s\n", ITTI_MSG_NAME(msg_p));
        break;
289

290 291 292 293
      case RRC_MAC_BCCH_DATA_REQ:
        LOG_D(MAC, "Received %s from %s: instance %d, frameP %d, eNB_index %d\n",
              msg_name, ITTI_MSG_ORIGIN_NAME(msg_p), instance,
              RRC_MAC_BCCH_DATA_REQ (msg_p).frame, RRC_MAC_BCCH_DATA_REQ (msg_p).enb_index);
294

295 296
        // TODO process BCCH data req.
        break;
297

298 299 300 301
      case RRC_MAC_CCCH_DATA_REQ:
        LOG_D(MAC, "Received %s from %s: instance %d, frameP %d, eNB_index %d\n",
              msg_name, ITTI_MSG_ORIGIN_NAME(msg_p), instance,
              RRC_MAC_CCCH_DATA_REQ (msg_p).frame, RRC_MAC_CCCH_DATA_REQ (msg_p).enb_index);
302

303 304
        // TODO process CCCH data req.
        break;
305 306 307

#ifdef Rel10

308 309 310 311
      case RRC_MAC_MCCH_DATA_REQ:
        LOG_D(MAC, "Received %s from %s: instance %d, frameP %d, eNB_index %d, mbsfn_sync_area %d\n",
              msg_name, ITTI_MSG_ORIGIN_NAME(msg_p), instance,
              RRC_MAC_MCCH_DATA_REQ (msg_p).frame, RRC_MAC_MCCH_DATA_REQ (msg_p).enb_index, RRC_MAC_MCCH_DATA_REQ (msg_p).mbsfn_sync_area);
312

313 314 315
        // TODO process MCCH data req.
        break;
#endif
316

317 318 319
      default:
        LOG_E(MAC, "Received unexpected message %s\n", msg_name);
        break;
320
      }
321 322 323 324

      result = itti_free (ITTI_MSG_ORIGIN_ID(msg_p), msg_p);
      AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result);
    }
325
  } while(msg_p != NULL);
326

327 328
#endif

329 330 331
/* #ifndef DISABLE_SF_TRIGGER */
/*   //Send subframe trigger to the controller */
/*   if (mac_agent_registered[module_idP]) { */
332
/*     agent_mac_xface[module_idP]->flexran_agent_send_sf_trigger(module_idP); */
333 334
/*   } */
/* #endif */
335
  
336
  //if (subframeP%5 == 0)
Raymond Knopp's avatar
 
Raymond Knopp committed
337
  //#ifdef EXMIMO
338
  PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_idP, ENB_FLAG_YES, NOT_A_RNTI, frameP, subframeP,module_idP);
339
  pdcp_run(&ctxt);
Raymond Knopp's avatar
 
Raymond Knopp committed
340
  //#endif
341

342
  // check HO
343 344
  rrc_rx_tx(&ctxt,
            0, // eNB index, unused in eNB
345
            CC_id);
346 347

#ifdef Rel10
348 349

  for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
350 351 352 353
    if (eNB_mac_inst[module_idP].common_channels[CC_id].MBMS_flag >0) {
      start_meas(&eNB_mac_inst[module_idP].schedule_mch);
      mbsfn_status[CC_id] = schedule_MBMS(module_idP,CC_id,frameP,subframeP);
      stop_meas(&eNB_mac_inst[module_idP].schedule_mch);
Raymond Knopp's avatar
 
Raymond Knopp committed
354
    }
355
  }
356

357
#endif
Raymond Knopp's avatar
 
Raymond Knopp committed
358
  // refresh UE list based on UEs dropped by PHY in previous subframe
359
  /*
Raymond Knopp's avatar
 
Raymond Knopp committed
360 361 362
  i=UE_list->head;
  while (i>=0) {
    next_i = UE_list->next[i];
363
    LOG_T(MAC,"UE %d : rnti %x, stats %p\n",i,UE_RNTI(module_idP,i),mac_xface->get_eNB_UE_stats(module_idP,0,UE_RNTI(module_idP,i)));
Raymond Knopp's avatar
 
Raymond Knopp committed
364
    if (mac_xface->get_eNB_UE_stats(module_idP,0,UE_RNTI(module_idP,i))==NULL) {
Raymond Knopp's avatar
 
Raymond Knopp committed
365
      mac_remove_ue(module_idP,i,frameP);
Raymond Knopp's avatar
 
Raymond Knopp committed
366 367 368
    }
    i=next_i;
  }
369
  */
370

371
  switch (subframeP) {
372
  case 0:
373

374
    // FDD/TDD Schedule Downlink RA transmissions (RA response, Msg4 Contention resolution)
375
    // Schedule ULSCH for FDD or subframeP 4 (TDD config 0,3,6)
376
    // Schedule Normal DLSCH
377

Raymond Knopp's avatar
Raymond Knopp committed
378

379 380
    schedule_RA(module_idP,frameP,subframeP,2);

381

382
    if (mac_xface->frame_parms->frame_type == FDD) {  //FDD
383
      schedule_ulsch(module_idP,frameP,cooperation_flag,0,4);//,calibration_flag);
384 385 386
    } else if  ((mac_xface->frame_parms->tdd_config == TDD) || //TDD
                (mac_xface->frame_parms->tdd_config == 3) ||
                (mac_xface->frame_parms->tdd_config == 6)) {
387
      //schedule_ulsch(module_idP,frameP,cooperation_flag,subframeP,4);//,calibration_flag);
Florian Kaltenberger's avatar
Florian Kaltenberger committed
388
    }
389
#ifndef FLEXRAN_AGENT_SB_IF
390 391
    schedule_ue_spec(module_idP,frameP,subframeP,mbsfn_status);
    fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_status);
392 393
#else
    if (mac_agent_registered[module_idP]) {                                  
394 395 396 397 398 399
	  agent_mac_xface[module_idP]->flexran_agent_schedule_ue_spec(
								      module_idP,
								      frameP,                  
								      subframeP,
								      mbsfn_status,
								      &msg);
400
	  
401 402 403 404 405 406
	  flexran_apply_dl_scheduling_decisions(module_idP,
						frameP,
						subframeP,
						mbsfn_status,
						msg);
	  flexran_agent_mac_destroy_dl_config(msg);
407 408
	}
#endif
409 410 411
    break;

  case 1:
412

413
    // TDD, schedule UL for subframeP 7 (TDD config 0,1) / subframeP 8 (TDD Config 6)
414
    // FDD, schedule normal UL/DLSCH
415 416
    if (mac_xface->frame_parms->frame_type == TDD) { // TDD
      switch (mac_xface->frame_parms->tdd_config) {
417 418
      case 0:
      case 1:
419
        schedule_ulsch(module_idP,frameP,cooperation_flag,subframeP,7);
420
#ifndef FLEXRAN_AGENT_SB_IF
421
        fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_status);
422
#endif
423 424 425
        break;

      case 6:
426
        schedule_ulsch(module_idP,frameP,cooperation_flag,subframeP,8);
427
#ifndef FLEXRAN_AGENT_SB_IF
428
        fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_status);
429
#endif
430 431 432 433 434 435
        break;

      default:
        break;
      }
    } else { //FDD
436
      schedule_ulsch(module_idP,frameP,cooperation_flag,1,5);
437
#ifndef FLEXRAN_AGENT_SB_IF
438
      schedule_ue_spec(module_idP,frameP,subframeP,mbsfn_status);
439
      fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_status);
440 441
#else
      if (mac_agent_registered[module_idP]) {                                  
442 443 444 445 446 447
	  agent_mac_xface[module_idP]->flexran_agent_schedule_ue_spec(
								      module_idP,
								      frameP,                  
								      subframeP,
								      mbsfn_status,
								      &msg);
448
	  
449 450 451 452 453 454
	  flexran_apply_dl_scheduling_decisions(module_idP,
						frameP,
						subframeP,
						mbsfn_status,
						msg);
	  flexran_agent_mac_destroy_dl_config(msg);
455 456
	}
#endif
457
    }
458

459
    break;
460 461

  case 2:
462

463
    // TDD, nothing
464
    // FDD, normal UL/DLSCH
465
    if (mac_xface->frame_parms->frame_type == FDD) {  //FDD
466
      schedule_ulsch(module_idP,frameP,cooperation_flag,2,6);
467
#ifndef FLEXRAN_AGENT_SB_IF
468
      schedule_ue_spec(module_idP,frameP,subframeP,mbsfn_status);
469
      fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_status);
470 471
#else
      if (mac_agent_registered[module_idP]) {                                  
472 473 474 475 476 477
	  agent_mac_xface[module_idP]->flexran_agent_schedule_ue_spec(
								      module_idP,
								      frameP,                  
								      subframeP,
								      mbsfn_status,
								      &msg);
478
	  
479 480 481 482 483 484
	  flexran_apply_dl_scheduling_decisions(module_idP,
						frameP,
						subframeP,
						mbsfn_status,
						msg);
	  flexran_agent_mac_destroy_dl_config(msg);
485 486
	}
#endif
487
    }
488

489 490 491
    break;

  case 3:
492

493
    // TDD Config 2, ULSCH for subframeP 7
494 495
    // TDD Config 2/5 normal DLSCH
    // FDD, normal UL/DLSCH
496 497
    if (mac_xface->frame_parms->frame_type == TDD) {
      switch (mac_xface->frame_parms->tdd_config) {
498
      case 2:
499
        schedule_ulsch(module_idP,frameP,cooperation_flag,subframeP,7);
500 501 502

        // no break here!
      case 5:
503
#ifndef FLEXRAN_AGENT_SB_IF
504 505
        schedule_ue_spec(module_idP,frameP,subframeP,mbsfn_status);
        fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_status);
506 507
#else
	if (mac_agent_registered[module_idP]) {                                  
508 509 510 511 512 513
	  agent_mac_xface[module_idP]->flexran_agent_schedule_ue_spec(
								      module_idP,
								      frameP,                  
								      subframeP,
								      mbsfn_status,
								      &msg);
514
	  
515 516 517 518 519 520
	  flexran_apply_dl_scheduling_decisions(module_idP,
						frameP,
						subframeP,
						mbsfn_status,
						msg);
	  flexran_agent_mac_destroy_dl_config(msg);
521 522
	}
#endif
523 524 525 526 527 528
        break;

      default:
        break;
      }
    } else { //FDD
529

530
      schedule_ulsch(module_idP,frameP,cooperation_flag,3,7);
531
#ifndef FLEXRAN_AGENT_SB_IF
532
      schedule_ue_spec(module_idP,frameP,subframeP,mbsfn_status);
533
      fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_status);
534 535
#else
      if (mac_agent_registered[module_idP]) {                                  
536 537 538 539 540 541
	  agent_mac_xface[module_idP]->flexran_agent_schedule_ue_spec(
								      module_idP,
								      frameP,                  
								      subframeP,
								      mbsfn_status,
								      &msg);
542
	  
543 544 545 546 547 548 549
	  flexran_apply_dl_scheduling_decisions(module_idP,
						frameP,
						subframeP,
						mbsfn_status,
						msg);
	  flexran_agent_mac_destroy_dl_config(msg);
      }
550
#endif
551
    }
552

553
    break;
554 555

  case 4:
556

557
    // TDD Config 1, ULSCH for subframeP 8
558 559
    // TDD Config 1/2/4/5 DLSCH
    // FDD UL/DLSCH
560 561
    if (mac_xface->frame_parms->frame_type == 1) { // TDD
      switch (mac_xface->frame_parms->tdd_config) {
562
      case 1:
563
        //        schedule_RA(module_idP,frameP,subframeP);
564
        schedule_ulsch(module_idP,frameP,cooperation_flag,subframeP,8);
565 566 567 568 569 570 571 572 573

        // no break here!
      case 2:

        // no break here!
      case 4:

        // no break here!
      case 5:
574
#ifndef FLEXRAN_AGENT_SB_IF
575
        schedule_ue_spec(module_idP,frameP,subframeP,mbsfn_status);
576 577 578
	fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_status);
#else
	if (mac_agent_registered[module_idP]) {                                  
579 580 581 582 583 584
	  agent_mac_xface[module_idP]->flexran_agent_schedule_ue_spec(
								      module_idP,
								      frameP,                  
								      subframeP,
								      mbsfn_status,
								      &msg);
585
	  
586 587 588 589 590 591
	  flexran_apply_dl_scheduling_decisions(module_idP,
					       frameP,
					       subframeP,
					       mbsfn_status,
					       msg);
	  flexran_agent_mac_destroy_dl_config(msg);
592 593
	}
#endif	
594 595 596 597 598 599
        break;

      default:
        break;
      }
    } else {
600
      if (mac_xface->frame_parms->frame_type == FDD) {  //FDD
601

602
	schedule_ulsch(module_idP, frameP, cooperation_flag, 4, 8);
603
#ifndef FLEXRAN_AGENT_SB_IF
604
	schedule_ue_spec(module_idP, frameP, subframeP,  mbsfn_status);
605
        fill_DLSCH_dci(module_idP, frameP, subframeP,   mbsfn_status);
606 607
#else
	if (mac_agent_registered[module_idP]) {                                  
608 609 610 611 612 613
	  agent_mac_xface[module_idP]->flexran_agent_schedule_ue_spec(
								      module_idP,
								      frameP,                  
								      subframeP,
								      mbsfn_status,
								      &msg);
614
	  
615 616 617 618 619 620
	  flexran_apply_dl_scheduling_decisions(module_idP,
						frameP,
						subframeP,
						mbsfn_status,
						msg);
	  flexran_agent_mac_destroy_dl_config(msg);
621 622
	}     
#endif
623
      }
624
    }
625

626 627 628 629 630 631 632
    break;

  case 5:
    // TDD/FDD Schedule SI
    // TDD Config 0,6 ULSCH for subframes 9,3 resp.
    // TDD normal DLSCH
    // FDD normal UL/DLSCH
633
    schedule_SI(module_idP,frameP,subframeP);
634

635
    //schedule_RA(module_idP,frameP,subframeP,5);
636
    if (mac_xface->frame_parms->frame_type == FDD) {
637 638
      schedule_RA(module_idP,frameP,subframeP,1);
      schedule_ulsch(module_idP,frameP,cooperation_flag,5,9);
639
#ifndef FLEXRAN_AGENT_SB_IF
640 641
      schedule_ue_spec(module_idP, frameP, subframeP,  mbsfn_status);
      fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_status);
642 643
#else
      if (mac_agent_registered[module_idP]) {                                  
644 645 646 647 648 649
	  agent_mac_xface[module_idP]->flexran_agent_schedule_ue_spec(
								      module_idP,
								      frameP,                  
								      subframeP,
								      mbsfn_status,
								      &msg);
650
	  
651 652 653 654 655 656
	  flexran_apply_dl_scheduling_decisions(module_idP,
					  frameP,
					  subframeP,
					  mbsfn_status,
					  msg);
	  flexran_agent_mac_destroy_dl_config(msg);
657 658
	}
#endif
659 660
    } else if ((mac_xface->frame_parms->tdd_config == 0) || // TDD Config 0
               (mac_xface->frame_parms->tdd_config == 6)) { // TDD Config 6
661
      //schedule_ulsch(module_idP,cooperation_flag,subframeP);
662
#ifndef FLEXRAN_AGENT_SB_IF
663
      fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_status);
664
#endif
665
    } else {
666
#ifndef FLEXRAN_AGENT_SB_IF
667 668
      schedule_ue_spec(module_idP,frameP,subframeP,mbsfn_status);
      fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_status);
669 670
#else
      if (mac_agent_registered[module_idP]) {                                  
671 672 673 674 675 676
	  agent_mac_xface[module_idP]->flexran_agent_schedule_ue_spec(
								      module_idP,
								      frameP,                  
								      subframeP,
								      mbsfn_status,
								      &msg);
677
	  
678 679 680 681 682 683
	  flexran_apply_dl_scheduling_decisions(module_idP,
						frameP,
						subframeP,
						mbsfn_status,
						msg);
	  flexran_agent_mac_destroy_dl_config(msg);
684 685
	}
#endif
686
    }
687

688 689 690
    break;

  case 6:
691

692 693 694
    // TDD Config 0,1,6 ULSCH for subframes 2,3
    // TDD Config 3,4,5 Normal DLSCH
    // FDD normal ULSCH/DLSCH
695 696
    if (mac_xface->frame_parms->frame_type == TDD) { // TDD
      switch (mac_xface->frame_parms->tdd_config) {
697 698 699 700
      case 0:
        break;

      case 1:
701
        schedule_ulsch(module_idP,frameP,cooperation_flag,subframeP,2);
702
        //  schedule_ue_spec(module_idP,frameP,subframeP,mbsfn_status);
703
#ifndef FLEXRAN_AGENT_SB_IF
704
        fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_status);
705
#endif
706 707 708
        break;

      case 6:
709
        schedule_ulsch(module_idP,frameP,cooperation_flag,subframeP,3);
710
        //  schedule_ue_spec(module_idP,frameP,subframeP,mbsfn_status);
711
#ifndef FLEXRAN_AGENT_SB_IF
712
        fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_status);
713
#endif
714 715 716
        break;

      case 5:
717
        schedule_RA(module_idP,frameP,subframeP,2);
718
#ifndef FLEXRAN_AGENT_SB_IF
719 720
        schedule_ue_spec(module_idP,frameP,subframeP,mbsfn_status);
        fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_status);
721 722
#else
	if (mac_agent_registered[module_idP]) {                                  
723 724 725 726 727 728
	  agent_mac_xface[module_idP]->flexran_agent_schedule_ue_spec(
								      module_idP,
								      frameP,                  
								      subframeP,
								      mbsfn_status,
								      &msg);
729
	  
730 731 732 733 734 735
	  flexran_apply_dl_scheduling_decisions(module_idP,
						frameP,
						subframeP,
						mbsfn_status,
						msg);
	  flexran_agent_mac_destroy_dl_config(msg);
736 737
	}
#endif
738 739 740 741
        break;

      case 3:
      case 4:
742
#ifndef FLEXRAN_AGENT_SB_IF
743 744
        schedule_ue_spec(module_idP,frameP,subframeP,mbsfn_status);
        fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_status);
745 746
#else
	if (mac_agent_registered[module_idP]) {                                  
747 748 749 750 751 752
	  agent_mac_xface[module_idP]->flexran_agent_schedule_ue_spec(
								      module_idP,
								      frameP,                  
								      subframeP,
								      mbsfn_status,
								      &msg);
753
	  
754 755 756 757 758 759
	  flexran_apply_dl_scheduling_decisions(module_idP,
						frameP,
						subframeP,
						mbsfn_status,
						msg);
	  flexran_agent_mac_destroy_dl_config(msg);
760 761
	}
#endif
762 763 764 765 766 767
        break;

      default:
        break;
      }
    } else { //FDD
768
      schedule_ulsch(module_idP,frameP,cooperation_flag,6,0);
769
#ifndef FLEXRAN_AGENT_SB_IF
770
      schedule_ue_spec(module_idP,frameP,subframeP,mbsfn_status);
771
      fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_status);
772 773
#else
      if (mac_agent_registered[module_idP]) {                                  
774 775 776 777 778 779
	  agent_mac_xface[module_idP]->flexran_agent_schedule_ue_spec(
								      module_idP,
								      frameP,                  
								      subframeP,
								      mbsfn_status,
								      &msg);
780
	  
781 782 783 784 785 786
	  flexran_apply_dl_scheduling_decisions(module_idP,
						frameP,
						subframeP,
						mbsfn_status,
						msg);
	  flexran_agent_mac_destroy_dl_config(msg);
787 788
	}
#endif
789
    }
790

791
    break;
792

793
  case 7:
794

795 796
    // TDD Config 3,4,5 Normal DLSCH
    // FDD Normal UL/DLSCH
797 798
    if (mac_xface->frame_parms->frame_type == TDD) { // TDD
      switch (mac_xface->frame_parms->tdd_config) {
799 800
      case 3:
      case 4:
801
        schedule_RA(module_idP,frameP,subframeP,3);  // 3 = Msg3 subframeP, not
802
#ifndef FLEXRAN_AGENT_SB_IF
803 804
        schedule_ue_spec(module_idP,frameP,subframeP,mbsfn_status);
        fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_status);
805 806
#else
	if (mac_agent_registered[module_idP]) {                                  
807 808 809 810 811 812
	  agent_mac_xface[module_idP]->flexran_agent_schedule_ue_spec(
								      module_idP,
								      frameP,                  
								      subframeP,
								      mbsfn_status,
								      &msg);
813
	  
814 815 816 817 818 819
	  flexran_apply_dl_scheduling_decisions(module_idP,
						frameP,
						subframeP,
						mbsfn_status,
						msg);
	  flexran_agent_mac_destroy_dl_config(msg);
820 821
	}
#endif
822 823 824
        break;

      case 5:
825
#ifndef FLEXRAN_AGENT_SB_IF
826 827
        schedule_ue_spec(module_idP,frameP,subframeP,mbsfn_status);
        fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_status);
828 829
#else
	if (mac_agent_registered[module_idP]) {                                  
830 831 832 833 834 835
	  agent_mac_xface[module_idP]->flexran_agent_schedule_ue_spec(
								      module_idP,
								      frameP,                  
								      subframeP,
								      mbsfn_status,
								      &msg);
836
	  
837 838 839 840 841 842
	  flexran_apply_dl_scheduling_decisions(module_idP,
						frameP,
						subframeP,
						mbsfn_status,
						msg);
	  flexran_agent_mac_destroy_dl_config(msg);
843 844
	}
#endif
845 846 847 848 849 850
        break;

      default:
        break;
      }
    } else { //FDD
851
      schedule_ulsch(module_idP,frameP,cooperation_flag,7,1);
852
#ifndef FLEXRAN_AGENT_SB_IF
853
      schedule_ue_spec(module_idP,frameP,subframeP,mbsfn_status);
854
      fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_status);
855 856
#else
      if (mac_agent_registered[module_idP]) {                                  
857 858 859 860 861 862
	  agent_mac_xface[module_idP]->flexran_agent_schedule_ue_spec(
								      module_idP,
								      frameP,                  
								      subframeP,
								      mbsfn_status,
								      &msg);
863
	  
864 865 866 867 868 869
	  flexran_apply_dl_scheduling_decisions(module_idP,
						frameP,
						subframeP,
						mbsfn_status,
						msg);
	  flexran_agent_mac_destroy_dl_config(msg);
870 871
	}
#endif
872
    }
873

874 875 876
    break;

  case 8:
877

878
    // TDD Config 2,3,4,5 ULSCH for subframeP 2
879 880
    //
    // FDD Normal UL/DLSCH
881 882
    if (mac_xface->frame_parms->frame_type == TDD) { // TDD
      switch (mac_xface->frame_parms->tdd_config) {
883 884 885 886 887
      case 2:
      case 3:
      case 4:
      case 5:

888
        //  schedule_RA(module_idP,subframeP);
889
        schedule_ulsch(module_idP,frameP,cooperation_flag,subframeP,2);
890
#ifndef FLEXRAN_AGENT_SB_IF
891 892
        schedule_ue_spec(module_idP,frameP,subframeP,mbsfn_status);
        fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_status);
893 894
#else
	if (mac_agent_registered[module_idP]) {                                  
895 896 897 898 899 900
	  agent_mac_xface[module_idP]->flexran_agent_schedule_ue_spec(
								      module_idP,
								      frameP,                  
								      subframeP,
								      mbsfn_status,
								      &msg);
901
	  
902 903 904 905 906 907
	  flexran_apply_dl_scheduling_decisions(module_idP,
						frameP,
						subframeP,
						mbsfn_status,
						msg);
	  flexran_agent_mac_destroy_dl_config(msg);
908 909
	}
#endif
910 911 912 913 914 915
        break;

      default:
        break;
      }
    } else { //FDD
916
      schedule_ulsch(module_idP,frameP,cooperation_flag,8,2);
917
#ifndef FLEXRAN_AGENT_SB_IF
918
      schedule_ue_spec(module_idP,frameP,subframeP,mbsfn_status);
919
      fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_status);
920 921
#else
      if (mac_agent_registered[module_idP]) {                                  
922 923 924 925 926 927
	  agent_mac_xface[module_idP]->flexran_agent_schedule_ue_spec(
								      module_idP,
								      frameP,                  
								      subframeP,
								      mbsfn_status,
								      &msg);
928
	  
929 930 931 932 933 934
	  flexran_apply_dl_scheduling_decisions(module_idP,
						frameP,
						subframeP,
						mbsfn_status,
						msg);
	  flexran_agent_mac_destroy_dl_config(msg);
935 936
	}
#endif
937
    }
938

939 940 941
    break;

  case 9:
942

943
    // TDD Config 1,3,4,6 ULSCH for subframes 3,3,3,4
944 945
    if (mac_xface->frame_parms->frame_type == TDD) {
      switch (mac_xface->frame_parms->tdd_config) {
946
      case 1:
947
        schedule_ulsch(module_idP,frameP,cooperation_flag,subframeP,3);
948
        schedule_RA(module_idP,frameP,subframeP,7);  // 7 = Msg3 subframeP, not
949
#ifndef FLEXRAN_AGENT_SB_IF
950 951
        schedule_ue_spec(module_idP,frameP,subframeP,mbsfn_status);
        fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_status);
952 953
#else
	if (mac_agent_registered[module_idP]) {                                  
954 955 956 957 958 959
	  agent_mac_xface[module_idP]->flexran_agent_schedule_ue_spec(
								      module_idP,
								      frameP,                  
								      subframeP,
								      mbsfn_status,
								      &msg);
960
	  
961 962 963 964 965 966
	  flexran_apply_dl_scheduling_decisions(module_idP,
						frameP,
						subframeP,
						mbsfn_status,
						msg);
	  flexran_agent_mac_destroy_dl_config(msg);
967 968
	}
#endif
969 970 971 972
        break;

      case 3:
      case 4:
973
        schedule_ulsch(module_idP,frameP,cooperation_flag,subframeP,3);
974
#ifndef FLEXRAN_AGENT_SB_IF
975 976
        schedule_ue_spec(module_idP,frameP,subframeP,mbsfn_status);
        fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_status);
977 978
#else
	if (mac_agent_registered[module_idP]) {                                  
979 980 981 982 983 984
	  agent_mac_xface[module_idP]->flexran_agent_schedule_ue_spec(
								      module_idP,
								      frameP,                  
								      subframeP,
								      mbsfn_status,
								      &msg);
985
	  
986 987 988 989 990 991
	  flexran_apply_dl_scheduling_decisions(module_idP,
						frameP,
						subframeP,
						mbsfn_status,
						msg);
	  flexran_agent_mac_destroy_dl_config(msg);
992 993
	}
#endif
994 995 996
        break;

      case 6:
997
        schedule_ulsch(module_idP,frameP,cooperation_flag,subframeP,4);
998
        //schedule_RA(module_idP,frameP,subframeP);
999
#ifndef FLEXRAN_AGENT_SB_IF
1000 1001
        schedule_ue_spec(module_idP,frameP,subframeP,mbsfn_status);
        fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_status);
1002 1003
#else
	if (mac_agent_registered[module_idP]) {                                  
1004 1005 1006 1007 1008 1009
	  agent_mac_xface[module_idP]->flexran_agent_schedule_ue_spec(
								      module_idP,
								      frameP,                  
								      subframeP,
								      mbsfn_status,
								      &msg);
1010
	  
1011 1012 1013 1014 1015 1016
	  flexran_apply_dl_scheduling_decisions(module_idP,
						frameP,
						subframeP,
						mbsfn_status,
						msg);
	  flexran_agent_mac_destroy_dl_config(msg);
1017 1018
	}
#endif
1019 1020 1021 1022
        break;

      case 2:
      case 5:
1023
        //schedule_RA(module_idP,frameP,subframeP);
1024
#ifndef FLEXRAN_AGENT_SB_IF
1025 1026
        schedule_ue_spec(module_idP,frameP,subframeP,mbsfn_status);
        fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_status);
1027 1028
#else
	if (mac_agent_registered[module_idP]) {                                  
1029 1030 1031 1032 1033 1034
	  agent_mac_xface[module_idP]->flexran_agent_schedule_ue_spec(
								      module_idP,
								      frameP,                  
								      subframeP,
								      mbsfn_status,
								      &msg);
1035
	  
1036 1037 1038 1039 1040 1041
	  flexran_apply_dl_scheduling_decisions(module_idP,
						frameP,
						subframeP,
						mbsfn_status,
						msg);
	  flexran_agent_mac_destroy_dl_config(msg);
1042 1043
	}
#endif
1044 1045 1046 1047 1048 1049
        break;

      default:
        break;
      }
    } else { //FDD
1050
      schedule_ulsch(module_idP,frameP,cooperation_flag,9,3);
1051
#ifndef FLEXRAN_AGENT_SB_IF
1052
      schedule_ue_spec(module_idP,frameP,subframeP,mbsfn_status);
1053
      fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_status);
1054 1055
#else
      if (mac_agent_registered[module_idP]) {                                  
1056 1057 1058 1059 1060 1061
	  agent_mac_xface[module_idP]->flexran_agent_schedule_ue_spec(
								      module_idP,
								      frameP,                  
								      subframeP,
								      mbsfn_status,
								      &msg);
1062
	  
1063 1064 1065 1066 1067 1068
	  flexran_apply_dl_scheduling_decisions(module_idP,
						frameP,
						subframeP,
						mbsfn_status,
						msg);
	  flexran_agent_mac_destroy_dl_config(msg);
1069 1070
      }
#endif
1071
    }
1072

1073
    break;
1074

1075
  }
1076

1077
  LOG_D(MAC,"FrameP %d, subframeP %d : Scheduling CCEs\n",frameP,subframeP);
1078

1079
  // Allocate CCEs for good after scheduling is done
1080 1081
  for (CC_id=0;CC_id<MAX_NUM_CCs;CC_id++)
    allocate_CCEs(module_idP,CC_id,subframeP,0);
1082

1083
#if defined(FLEXRAN_AGENT_SB_IF)
1084 1085 1086
#ifndef DISABLE_CONT_STATS
  //Send subframe trigger to the controller
  if (mac_agent_registered[module_idP]) {
1087
    agent_mac_xface[module_idP]->flexran_agent_send_update_mac_stats(module_idP);
1088
  }
1089
#endif
1090 1091
#endif

Raymond Knopp's avatar
Raymond Knopp committed
1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109
  /*
  int dummy=0;
  for (i=0;
       i<DCI_pdu[CC_id]->Num_common_dci+DCI_pdu[CC_id]->Num_ue_spec_dci;
       i++)
    if (DCI_pdu[CC_id]->dci_alloc[i].rnti==2)
      dummy=1;
	
  if (dummy==1)
    for (i=0;
	 i<DCI_pdu[CC_id]->Num_common_dci+DCI_pdu[CC_id]->Num_ue_spec_dci;
	 i++)
      LOG_I(MAC,"Frame %d, subframe %d: DCI %d/%d, format %d, rnti %x, NCCE %d(num_pdcch_symb %d)\n",
	    frameP,subframeP,i,DCI_pdu[CC_id]->Num_common_dci+DCI_pdu[CC_id]->Num_ue_spec_dci,
	    DCI_pdu[CC_id]->dci_alloc[i].format,
	    DCI_pdu[CC_id]->dci_alloc[i].rnti,
	    DCI_pdu[CC_id]->dci_alloc[i].firstCCE,
	    DCI_pdu[CC_id]->num_pdcch_symbols);
1110

1111
  LOG_D(MAC,"frameP %d, subframeP %d\n",frameP,subframeP);
Raymond Knopp's avatar
Raymond Knopp committed
1112
  */
1113

1114
  stop_meas(&eNB_mac_inst[module_idP].eNB_scheduler);
1115
  VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ULSCH_SCHEDULER,VCD_FUNCTION_OUT);
1116

1117
}
1118 1119 1120