Commit bdf57bdc authored by Nick Ho's avatar Nick Ho

Modifiy the DCI_PDU structure in MAC, add the DCI_ALLOC_NB for NB-IoT

parent 9e228a74
/*
* 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
*/
/*! \file PHY/LTE_TRANSPORT/defs.h
* \brief data structures for PDSCH/DLSCH/PUSCH/ULSCH physical and transport channel descriptors (TX/RX)
* \author R. Knopp
* \date 2011
* \version 0.1
* \company Eurecom
* \email: raymond.knopp@eurecom.fr, florian.kaltenberger@eurecom.fr, oscar.tonelli@yahoo.it
* \note
* \warning
*/
#ifndef __LTE_TRANSPORT_DEFS_NB_IOT__H__
#define __LTE_TRANSPORT_DEFS_NB_IOT__H__
#include "PHY/defs.h"
#include "dci_nb_iot.h"
#ifndef STANDALONE_COMPILE
#include "UTIL/LISTS/list.h"
#endif
typedef struct {
/// Length of DCI in bits
uint8_t dci_length;
/// Aggregation level only 0,1 in NB-IoT
uint8_t L;
/// Position of first CCE of the dci
int firstCCE;
/// flag to indicate that this is a RA response
boolean_t ra_flag;
/// rnti
rnti_t rnti;
/// Format
DCI_format_t format;
/// DCI pdu
uint8_t dci_pdu[8];
} DCI_ALLOC_NB_t;
/**@}*/
#endif
...@@ -32,11 +32,11 @@ ...@@ -32,11 +32,11 @@
//NB-IoT test //NB-IoT test
#include "openair2/PHY_INTERFACE/IF_Module_nb_iot.h" #include "openair2/PHY_INTERFACE/IF_Module_nb_iot.h"
#include "PHY/defs.h" #include "PHY/defs.h"
#include "PHY/extern.h" #include "PHY/extern.h"
#include "SCHED/defs.h" #include "SCHED/defs.h"
#include "SCHED/extern.h" #include "SCHED/extern.h"
#include "PHY/LTE_TRANSPORT/if4_tools.h" #include "PHY/LTE_TRANSPORT/if4_tools.h"
#include "PHY/LTE_TRANSPORT/if5_tools.h" #include "PHY/LTE_TRANSPORT/if5_tools.h"
...@@ -694,12 +694,84 @@ void NB_phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,con ...@@ -694,12 +694,84 @@ void NB_phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,con
#undef DEBUG_PHY_PROC #undef DEBUG_PHY_PROC
/*
r_type, rn is only used in PMCH procedure so I remove it.
*/
void NB_phy_procedures_eNB_TX(PHY_VARS_eNB *eNB, void NB_phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
eNB_rxtx_proc_t *proc, eNB_rxtx_proc_t *proc,
PHY_VARS_RN *rn,
int do_meas) int do_meas)
{ {
int frame = proc->frame_tx;
int subframe = proc->subframe_tx;
uint32_t i,j,aa;
DCI_PDU_NB *DCI_pdu;
DCI_PDU_NB DCI_pdu_tmp;
LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms;
DCI_ALLOC_t *dci_alloc = (DCI_ALLOC_t *)NULL;
int oai_exit = 0;
//for NB-IoT
Sched_Rsp_t Sched_Rsp;
if(do_meas == 1)
start_meas(&eNB->phy_proc_tx);
for(i = 0;i<NUMBER_OF_UE_MAX;i++)
{
if((frame==0)&&(subframe==0))
{
if(eNB->UE_stats[i].crnti > 0)
LOG_I(PHY,"UE%d : rnti %x\n",i,eNB->UE_stats[i].crnti);
}
}
// Original scheduler
// clear the transmit data array for the current subframe
for (aa=0; aa<fp->nb_antenna_ports_eNB; aa++)
{
memset(&eNB->common_vars.txdataF[0][aa][subframe*fp->ofdm_symbol_size*(fp->symbols_per_tti)],
0,fp->ofdm_symbol_size*(fp->symbols_per_tti)*sizeof(int32_t));
}
//ignore the PMCH part only do the generate PSS/SSS, note: Seperate MIB from here
common_signal_procedures(eNB,proc);
while(!oai_exit)
{
/* Not test
if(wait_on_condition(&proc->mutex_l2,&proc->cond_l2,&proc->instance_cnt_l2,"eNB_L2_thread") < 0)
break;*/
/*Take the structures from the shared structures*/
//Sched_Rsp = ;
/*DCI part*/
if(!Sched_Rsp.pdu_payload)
{
switch(Sched_Rsp.DCI_Format)
{
case DCIFormatN0:
case DCIFormatN1:
case DCIFormatN1_RAR:
case DCIFormatN2_Ind:
case DCIFormatN2_Pag:
default:
break;
}
}
/*UE specific DLSCH*/
}
} }
\ No newline at end of file
...@@ -6,9 +6,7 @@ ...@@ -6,9 +6,7 @@
* *
*/ */
#include "openair1/PHY/LTE_TRANSPORT/defs_nb_iot.h"
#include "platform_types.h"
#include "openair1/PHY/LTE_TRANSPORT/dci_nb_iot.h"
...@@ -78,10 +76,8 @@ typedef struct{ ...@@ -78,10 +76,8 @@ typedef struct{
/*Downlink data*/ /*Downlink data*/
//TB size for Downlink data //TB size for Downlink data
uint8_t TBindex; uint8_t TBindex;
//PDU for MIB,SIBs //PDU for Downlink
uint8_t *BCCH_pdu_payload; uint8_t *pdu_payload;
//PDU for DL-SCH
uint8_t *DLSCH_pdu_payload;
/*DCI start*/ /*DCI start*/
// Format of DCI // Format of DCI
......
...@@ -62,3 +62,11 @@ Parameters: Sched_Rsp for Interface Module ...@@ -62,3 +62,11 @@ Parameters: Sched_Rsp for Interface Module
Comment: 15 warnings fixed Comment: 15 warnings fixed
5/23
Add: openair1/PHY/LTE_TRANSPORT/defs_nb_iot.h
Modified: openair2/PHY_INTERFACE/IF_Module_nb_iot.h
Modified: openair2/LAYER2/MAC/phy_procedures_lte_eNB_nb_iot.c
Comment: merge with RRC branch, start the TX part implementation
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment