Commit b2fccdfa authored by Nick Ho's avatar Nick Ho

NB_Phy_procedures_TX & solve some warnings

parent d1d5029f
...@@ -19,8 +19,8 @@ ...@@ -19,8 +19,8 @@
* contact@openairinterface.org * contact@openairinterface.org
*/ */
#ifndef __INIT_DEFS__H__ #ifndef __INIT_DEFS_NB_IoT__H__
#define __INIT_DEFS__H__ #define __INIT_DEFSJ_NB_IoT__H__
#include "PHY/defs.h" #include "PHY/defs.h"
...@@ -338,16 +338,17 @@ void NB_phy_config_mib_eNB(int Mod_id, ...@@ -338,16 +338,17 @@ void NB_phy_config_mib_eNB(int Mod_id,
int Ncp, int Ncp,
int p_eNB, int p_eNB,
uint32_t dl_CarrierFreq, uint32_t dl_CarrierFreq,
uint32_t ul_CarrierFreq, uint32_t ul_CarrierFreq
struct MasterInformationBlock_NB__operationModeInfo_r13_u operationModeInfo); //struct MasterInformationBlock_NB__operationModeInfo_r13 operationModeInfo
);
/*NB_phy_config_sib1_eNB is not needed since NB-IoT use only FDD mode*/ /*NB_phy_config_sib1_eNB is not needed since NB-IoT use only FDD mode*/
/*brief Configure LTE_DL_FRAME_PARMS with components of SIB2-NB (at eNB).*/ /*brief Configure LTE_DL_FRAME_PARMS with components of SIB2-NB (at eNB).*/
void NB_phy_config_sib2_eNB(module_id_t Mod_id, void NB_phy_config_sib2_eNB(module_id_t Mod_id,
int CC_id, int CC_id,
RadioResourceConfigCommonSIB_NB_r13 *radioResourceConfigCommon, RadioResourceConfigCommonSIB_NB_r13_t *radioResourceConfigCommon,
ARFCN_ValueEUTRA_r9_t *ul_CArrierFreq,, ARFCN_ValueEUTRA_r9_t *ul_CArrierFreq
); );
void NB_phy_config_dedicated_eNB(module_id_t Mod_id, void NB_phy_config_dedicated_eNB(module_id_t Mod_id,
......
...@@ -36,7 +36,6 @@ ...@@ -36,7 +36,6 @@
//NB-IoT //NB-IoT
#include "defs_nb_iot.h" #include "defs_nb_iot.h"
#include "RadioResourceConfigCommonSIB-NB-r13.h" #include "RadioResourceConfigCommonSIB-NB-r13.h"
#include "PHY/impl_defs_lte_nb_iot.h"
#include "RadioResourceConfigDedicated-NB-r13.h" #include "RadioResourceConfigDedicated-NB-r13.h"
extern uint16_t prach_root_sequence_map0_3[838]; extern uint16_t prach_root_sequence_map0_3[838];
......
...@@ -119,6 +119,7 @@ static inline void* malloc16_clear( size_t size ) ...@@ -119,6 +119,7 @@ static inline void* malloc16_clear( size_t size )
#include "impl_defs_top.h" #include "impl_defs_top.h"
#include "impl_defs_lte.h" #include "impl_defs_lte.h"
#include "impl_defs_lte_nb_iot.h"
#include "PHY/TOOLS/time_meas.h" #include "PHY/TOOLS/time_meas.h"
#include "PHY/CODING/defs.h" #include "PHY/CODING/defs.h"
......
...@@ -714,6 +714,7 @@ void NB_phy_procedures_eNB_TX(PHY_VARS_eNB *eNB, ...@@ -714,6 +714,7 @@ void NB_phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
int8_t UE_id = 0; int8_t UE_id = 0;
uint8_t ul_subframe; uint8_t ul_subframe;
uint32_t ul_frame; uint32_t ul_frame;
//uint8_t num_npdcch_symbols = 0;
//for NB-IoT //for NB-IoT
...@@ -743,7 +744,7 @@ void NB_phy_procedures_eNB_TX(PHY_VARS_eNB *eNB, ...@@ -743,7 +744,7 @@ void NB_phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
//ignore the PMCH part only do the generate PSS/SSS, note: Seperate MIB from here //ignore the PMCH part only do the generate PSS/SSS, note: Seperate MIB from here
common_signal_procedures(eNB,proc); //common_signal_procedures(eNB,proc);
while(!oai_exit) while(!oai_exit)
{ {
...@@ -756,7 +757,7 @@ void NB_phy_procedures_eNB_TX(PHY_VARS_eNB *eNB, ...@@ -756,7 +757,7 @@ void NB_phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
/*Take the structures from the shared structures*/ /*Take the structures from the shared structures*/
//Sched_Rsp = ; //Sched_Rsp = ;
/*If there is a DCI, packed it after this procedure, we'll have a DCI PDU*/ /*If there is a DCI, packed it ,after this procedure, we'll have a DCI PDU*/
if(Sched_Rsp.DCI_Content) if(Sched_Rsp.DCI_Content)
{ {
...@@ -798,6 +799,8 @@ void NB_phy_procedures_eNB_TX(PHY_VARS_eNB *eNB, ...@@ -798,6 +799,8 @@ void NB_phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
/*remove the part save old HARQ information for PHICH generation*/ /*remove the part save old HARQ information for PHICH generation*/
//num_npdcch_symbols = DCI_PDU->num_npdcch_symbols;
/*Loop over all the dci to generate DLSCH allocation, there is only 1 DCI for NB-IoT in the same time*/ /*Loop over all the dci to generate DLSCH allocation, there is only 1 DCI for NB-IoT in the same time*/
dci_alloc = &DCI_pdu->dci_alloc[i]; dci_alloc = &DCI_pdu->dci_alloc[i];
if ((dci_alloc->rnti<= P_RNTI) && (dci_alloc->ra_flag!=1)) if ((dci_alloc->rnti<= P_RNTI) && (dci_alloc->ra_flag!=1))
...@@ -807,21 +810,30 @@ void NB_phy_procedures_eNB_TX(PHY_VARS_eNB *eNB, ...@@ -807,21 +810,30 @@ void NB_phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
else else
UE_id=0; UE_id=0;
generate_eNB_dlsch_params(eNB,proc,dci_alloc,UE_id); //generate_eNB_dlsch_params(eNB,proc,dci_alloc,UE_id);
// Apply physicalConfigDedicated if needed, don't know if needed in NB-IoT or not /* Apply physicalConfigDedicated if needed, don't know if needed in NB-IoT or not
// This is for UEs that have received this IE, which changes these DL and UL configuration, we apply after a delay for the eNodeB UL parameters This is for UEs that have received this IE, which changes these DL and UL configuration, we apply after a delay for the eNodeB UL parameters
//phy_config_dedicated_eNB_step2(eNB); phy_config_dedicated_eNB_step2(eNB);*/
dci_alloc = &DCI_pdu->dci_alloc[i]; dci_alloc = &DCI_pdu->dci_alloc[i];
if (dci_alloc->format == DCIFormatN0) // this is a ULSCH allocation if (dci_alloc->format == DCIFormatN0) // this is a ULSCH allocation
{ {
UE_id = find_ue((int16_t)dci_alloc->rnti,eNB); UE_id = find_ue((int16_t)dci_alloc->rnti,eNB);
generate_eNB_ulsch_params(eNB,proc,dci_alloc,UE_id); //generate_eNB_ulsch_params(eNB,proc,dci_alloc,UE_id);
} }
/*If we have DCI to generate do it now TODO : have a generate dci top for NB_IoT */
//num_npdcch_symbols = NB_generate_dci_top();
if(Sched_Rsp.pdu_payload)
{
/*TODO: MPDSCH procedures for NB-IoT*/
//npdsch_procedures();
} }
if (do_meas==1)
stop_meas(&eNB->phy_proc_tx);
}
} }
\ No newline at end of file
...@@ -416,7 +416,8 @@ typedef struct { ...@@ -416,7 +416,8 @@ typedef struct {
} __attribute__((__packed__))POWER_HEADROOM_CMD_NB; } __attribute__((__packed__))POWER_HEADROOM_CMD_NB;
typedef struct { typedef struct {
//delete the count for the DCI numbers and symbols,NUM_DCI_MAX should set to 1 //delete the count for the DCI numbers,NUM_DCI_MAX should set to 1
uint32_t num_npdcch_symbols;
DCI_ALLOC_t dci_alloc[NUM_DCI_MAX] ; DCI_ALLOC_t dci_alloc[NUM_DCI_MAX] ;
} DCI_PDU_NB; } DCI_PDU_NB;
typedef struct { typedef struct {
......
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