Commit 5506e79f authored by Nick Ho's avatar Nick Ho

Sync the PHY structure that IF-Modules intends to write, also the filter of LTE preamble tested

parent 410da556
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
void add_dci_NB_IoT(DCI_PDU_NB_IoT *DCI_pdu,void *pdu,rnti_t rnti,unsigned char dci_size_bytes,unsigned char aggregation,unsigned char dci_size_bits,unsigned char dci_fmt, uint8_t npdcch_start_symbol) void add_dci_NB_IoT(DCI_PDU_NB_IoT *DCI_pdu,void *pdu,rnti_t rnti,unsigned char dci_size_bytes,unsigned char aggregation,unsigned char dci_size_bits,unsigned char dci_fmt, uint8_t npdcch_start_symbol)
{ {
//put the pdu //put the pdu
memcpy(&DCI_pdu->dci_alloc[0].dci_pdu[0],pdu,dci_size_bytes); memcpy(&DCI_pdu->dci_alloc[DCI_pdu->Num_dci].dci_pdu[0],pdu,dci_size_bytes);
//configure the dci alloc //configure the dci alloc
DCI_pdu->dci_alloc[DCI_pdu->Num_dci].dci_length = dci_size_bits; DCI_pdu->dci_alloc[DCI_pdu->Num_dci].dci_length = dci_size_bits;
DCI_pdu->dci_alloc[DCI_pdu->Num_dci].L = aggregation; DCI_pdu->dci_alloc[DCI_pdu->Num_dci].L = aggregation;
...@@ -68,7 +68,7 @@ void add_dci_NB_IoT(DCI_PDU_NB_IoT *DCI_pdu,void *pdu,rnti_t rnti,unsigned char ...@@ -68,7 +68,7 @@ void add_dci_NB_IoT(DCI_PDU_NB_IoT *DCI_pdu,void *pdu,rnti_t rnti,unsigned char
} }
int generate_eNB_ulsch_params_from_dci_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB, int generate_eNB_ulsch_params_from_dci_NB_IoT(PHY_VARS_eNB *eNB,
eNB_rxtx_proc_t *proc, eNB_rxtx_proc_t *proc,
DCI_CONTENT *DCI_Content, DCI_CONTENT *DCI_Content,
uint16_t rnti, uint16_t rnti,
...@@ -144,14 +144,14 @@ int generate_eNB_ulsch_params_from_dci_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB, ...@@ -144,14 +144,14 @@ int generate_eNB_ulsch_params_from_dci_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,
//map the Isf (DCI param) to the number of subframes (Nsf) //map the Isf (DCI param) to the number of subframes (Nsf)
int resource_to_subframe[8] = {1,2,3,4,5,6,8,10}; int resource_to_subframe[8] = {1,2,3,4,5,6,8,10};
int generate_eNB_dlsch_params_from_dci_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB, int generate_eNB_dlsch_params_from_dci_NB_IoT(PHY_VARS_eNB *eNB,
int frame, int frame,
uint8_t subframe, uint8_t subframe,
DCI_CONTENT *DCI_Content, DCI_CONTENT *DCI_Content,
uint16_t rnti, uint16_t rnti,
DCI_format_NB_IoT_t dci_format, DCI_format_NB_IoT_t dci_format,
NB_IoT_eNB_NPDCCH_t *ndlcch, NB_IoT_eNB_NPDCCH_t *ndlcch,
NB_IoT_DL_FRAME_PARMS *frame_parms, LTE_DL_FRAME_PARMS *frame_parms,
uint8_t aggregation, //////????? maybe add the ncce index ?????????? uint8_t aggregation, //////????? maybe add the ncce index ??????????
uint8_t npdcch_start_symbol) uint8_t npdcch_start_symbol)
{ {
......
...@@ -80,7 +80,7 @@ uint8_t NPRACH_detection_NB_IoT(int16_t *input_buffer,uint32_t input_length){ ...@@ -80,7 +80,7 @@ uint8_t NPRACH_detection_NB_IoT(int16_t *input_buffer,uint32_t input_length){
} }
//printf("energies = %ld %ld\n",energy_signal,energy_noise); //printf("energies = %ld %ld\n",energy_signal,energy_noise);
if ((uint64_t)(((uint64_t) energy_signal))<(uint64_t)energy_noise>>2){ if ((uint64_t)(((uint64_t) energy_signal))<(uint64_t)energy_noise>>4){
return 1; return 1;
}else{ }else{
......
...@@ -189,7 +189,7 @@ void add_dci_NB_IoT(DCI_PDU_NB_IoT *DCI_pdu, ...@@ -189,7 +189,7 @@ void add_dci_NB_IoT(DCI_PDU_NB_IoT *DCI_pdu,
/*Use the UL DCI Information to configure PHY and also Pack the DCI*/ /*Use the UL DCI Information to configure PHY and also Pack the DCI*/
int generate_eNB_ulsch_params_from_dci_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB, int generate_eNB_ulsch_params_from_dci_NB_IoT(PHY_VARS_eNB *eNB,
eNB_rxtx_proc_t *proc, eNB_rxtx_proc_t *proc,
DCI_CONTENT *DCI_Content, DCI_CONTENT *DCI_Content,
uint16_t rnti, uint16_t rnti,
...@@ -200,14 +200,14 @@ int generate_eNB_ulsch_params_from_dci_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB, ...@@ -200,14 +200,14 @@ int generate_eNB_ulsch_params_from_dci_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,
/*Use the DL DCI Information to configure PHY and also Pack the DCI*/ /*Use the DL DCI Information to configure PHY and also Pack the DCI*/
int generate_eNB_dlsch_params_from_dci_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB, int generate_eNB_dlsch_params_from_dci_NB_IoT(PHY_VARS_eNB *eNB,
int frame, int frame,
uint8_t subframe, uint8_t subframe,
DCI_CONTENT *DCI_Content, DCI_CONTENT *DCI_Content,
uint16_t rnti, uint16_t rnti,
DCI_format_NB_IoT_t dci_format, DCI_format_NB_IoT_t dci_format,
NB_IoT_eNB_NPDCCH_t *ndlcch, NB_IoT_eNB_NPDCCH_t *ndlcch,
NB_IoT_DL_FRAME_PARMS *frame_parms, LTE_DL_FRAME_PARMS *frame_parms,
uint8_t aggregation, uint8_t aggregation,
uint8_t npdcch_start_symbol); uint8_t npdcch_start_symbol);
......
...@@ -515,6 +515,7 @@ NB_IoT_eNB_NULSCH_t *nulsch[NUMBER_OF_UE_MAX+1]; //nulsch[0] contains the ...@@ -515,6 +515,7 @@ NB_IoT_eNB_NULSCH_t *nulsch[NUMBER_OF_UE_MAX+1]; //nulsch[0] contains the
NB_IoT_eNB_NDLSCH_t *ndlsch_SIB1; NB_IoT_eNB_NDLSCH_t *ndlsch_SIB1;
NB_IoT_eNB_NDLSCH_t *ndlsch_SIB23; NB_IoT_eNB_NDLSCH_t *ndlsch_SIB23;
NB_IoT_eNB_NDLSCH_t *ndlsch_RAR; NB_IoT_eNB_NDLSCH_t *ndlsch_RAR;
NB_IoT_eNB_NPDCCH_t *npdcch[NUMBER_OF_UE_MAX_NB_IoT];
//NB_IoT_eNB_NDLSCH_t ndlsch_rar; //NB_IoT_eNB_NDLSCH_t ndlsch_rar;
NB_IoT_eNB_NPDCCH_t npdcch_DCI; NB_IoT_eNB_NPDCCH_t npdcch_DCI;
...@@ -529,6 +530,7 @@ pthread_mutex_t UL_INFO_mutex; ...@@ -529,6 +530,7 @@ pthread_mutex_t UL_INFO_mutex;
//nfapi_preamble_pdu_t preamble_list_NB_IoT[4]; //nfapi_preamble_pdu_t preamble_list_NB_IoT[4];
uint8_t msg3_pdu[6]; uint8_t msg3_pdu[6];
DCI_PDU_NB_IoT *DCI_pdu;
//////////////////// END ///////////////////////////////// //////////////////// END /////////////////////////////////
} PHY_VARS_eNB; } PHY_VARS_eNB;
......
...@@ -28,15 +28,15 @@ void phy_procedures_eNB_uespec_RX_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc ...@@ -28,15 +28,15 @@ void phy_procedures_eNB_uespec_RX_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc
void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc); void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc);
/*Generate the ulsch params and do the mapping for the FAPI style parameters to OAI, and then do the packing*/ /*Generate the ulsch params and do the mapping for the FAPI style parameters to OAI, and then do the packing*/
void generate_eNB_ulsch_params_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,eNB_rxtx_proc_t *proc,nfapi_hi_dci0_request_pdu_t *hi_dci0_pdu); void generate_eNB_ulsch_params_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,nfapi_hi_dci0_request_pdu_t *hi_dci0_pdu);
/*Generate the dlsch params and do the mapping for the FAPI style parameters to OAI, and then do the packing*/ /*Generate the dlsch params and do the mapping for the FAPI style parameters to OAI, and then do the packing*/
void generate_eNB_dlsch_params_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,eNB_rxtx_proc_t * proc,nfapi_dl_config_request_pdu_t *dl_config_pdu); void generate_eNB_dlsch_params_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t * proc,nfapi_dl_config_request_pdu_t *dl_config_pdu);
/*Process all the scheduling result from MAC and also common signals.*/ /*Process all the scheduling result from MAC and also common signals.*/
void phy_procedures_eNB_TX_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,eNB_rxtx_proc_t *proc,int do_meas); void phy_procedures_eNB_TX_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,eNB_rxtx_proc_t *proc,int do_meas);
int8_t find_ue_NB_IoT(uint16_t rnti, PHY_VARS_eNB_NB_IoT *eNB); int8_t find_ue_NB_IoT(uint16_t rnti, PHY_VARS_eNB *eNB);
NB_IoT_DL_FRAME_PARMS *get_NB_IoT_frame_parms(module_id_t Mod_id, uint8_t CC_id); NB_IoT_DL_FRAME_PARMS *get_NB_IoT_frame_parms(module_id_t Mod_id, uint8_t CC_id);
......
...@@ -1094,7 +1094,7 @@ int8_t find_ue(uint16_t rnti, PHY_VARS_eNB *eNB) ...@@ -1094,7 +1094,7 @@ int8_t find_ue(uint16_t rnti, PHY_VARS_eNB *eNB)
return(-1); return(-1);
} }
*/ */
int8_t find_ue_NB_IoT(uint16_t rnti, PHY_VARS_eNB_NB_IoT *eNB) int8_t find_ue_NB_IoT(uint16_t rnti, PHY_VARS_eNB *eNB)
{ {
uint8_t i; uint8_t i;
......
...@@ -712,10 +712,10 @@ void phy_procedures_eNB_uespec_RX_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc ...@@ -712,10 +712,10 @@ void phy_procedures_eNB_uespec_RX_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc
/////Generate eNB ndlsch params for NB-IoT from the NPDCCH PDU of the DCI, modify the input to the Sched Rsp variable//// /////Generate eNB ndlsch params for NB-IoT from the NPDCCH PDU of the DCI, modify the input to the Sched Rsp variable////
*/ */
void generate_eNB_dlsch_params_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,eNB_rxtx_proc_t * proc,nfapi_dl_config_request_pdu_t *dl_config_pdu) void generate_eNB_dlsch_params_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t * proc,nfapi_dl_config_request_pdu_t *dl_config_pdu)
{ {
int UE_id = -1; int UE_id = -1;
NB_IoT_DL_FRAME_PARMS *fp = &eNB->frame_parms_NB_IoT; LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms;
int frame = proc->frame_tx; int frame = proc->frame_tx;
int subframe = proc->subframe_tx; int subframe = proc->subframe_tx;
DCI_CONTENT *DCI_Content; DCI_CONTENT *DCI_Content;
...@@ -754,7 +754,7 @@ void generate_eNB_dlsch_params_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,eNB_rxtx_proc_t * ...@@ -754,7 +754,7 @@ void generate_eNB_dlsch_params_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,eNB_rxtx_proc_t *
// fill the dlsch_ra_NB structure for RAR, and packed the DCI PDU // fill the dlsch_ra_NB structure for RAR, and packed the DCI PDU
ndlsch = PHY_vars_eNB_g[0][0]->ndlsch_RAR; ndlsch = eNB->ndlsch_RAR;
ndlsch->ndlsch_type = RAR; ndlsch->ndlsch_type = RAR;
//LOG_I(PHY,"Generating dlsch params for RA_RNTI and packing DCI\n"); //LOG_I(PHY,"Generating dlsch params for RA_RNTI and packing DCI\n");
...@@ -846,7 +846,7 @@ void generate_eNB_dlsch_params_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,eNB_rxtx_proc_t * ...@@ -846,7 +846,7 @@ void generate_eNB_dlsch_params_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,eNB_rxtx_proc_t *
void generate_eNB_ulsch_params_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,eNB_rxtx_proc_t *proc,nfapi_hi_dci0_request_pdu_t *hi_dci0_pdu) { void generate_eNB_ulsch_params_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,nfapi_hi_dci0_request_pdu_t *hi_dci0_pdu) {
int UE_id = -1; int UE_id = -1;
//int harq_pid = 0; //int harq_pid = 0;
......
...@@ -78,7 +78,7 @@ void UL_indication_NB_IoT(UL_IND_NB_IoT_t *UL_INFO) ...@@ -78,7 +78,7 @@ void UL_indication_NB_IoT(UL_IND_NB_IoT_t *UL_INFO)
if(UL_INFO->hypersfn==1 && UL_INFO->frame==0) if(UL_INFO->hypersfn==1 && UL_INFO->frame==0)
{ {
LOG_I(MAC,"IF L2 hypersfn:%d frame: %d ,subframe: %d \n",UL_INFO->hypersfn,UL_INFO->frame,UL_INFO->subframe); LOG_D(MAC,"IF L2 hypersfn:%d frame: %d ,subframe: %d \n",UL_INFO->hypersfn,UL_INFO->frame,UL_INFO->subframe);
} }
abs_subframe = UL_INFO->hypersfn*10240+UL_INFO->frame*10+UL_INFO->subframe +4; abs_subframe = UL_INFO->hypersfn*10240+UL_INFO->frame*10+UL_INFO->subframe +4;
......
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