Commit 72a1b227 authored by Daniel0326's avatar Daniel0326

debug on NAS identify req to PHY (ongoing)

parent be28badc
...@@ -222,10 +222,12 @@ int generate_NDLSCH_NB_IoT(PHY_VARS_eNB *eNB, ...@@ -222,10 +222,12 @@ int generate_NDLSCH_NB_IoT(PHY_VARS_eNB *eNB,
int RB_IoT_ID, int RB_IoT_ID,
uint8_t release_v13_5_0) uint8_t release_v13_5_0)
{ {
int done = 0; int done = 0;
if( RAR->active == 1 ) if( RAR->active == 1 )
{ {
printf("data : %p********(In RAR->active=1)\n", RAR);
uint8_t *RAR_pdu = RAR->harq_process->pdu; uint8_t *RAR_pdu = RAR->harq_process->pdu;
if(RAR->active_msg2 == 1 && RAR_pdu!=NULL) if(RAR->active_msg2 == 1 && RAR_pdu!=NULL)
...@@ -249,11 +251,16 @@ int generate_NDLSCH_NB_IoT(PHY_VARS_eNB *eNB, ...@@ -249,11 +251,16 @@ int generate_NDLSCH_NB_IoT(PHY_VARS_eNB *eNB,
if( (counter_rep == rep) && (counter_sf_rep == 0) && (pointer_to_sf == 0) ) if( (counter_rep == rep) && (counter_sf_rep == 0) && (pointer_to_sf == 0) )
{ {
printf("Going to do dlsch_encoding_NB_IoT() & dlsch_scrambling_Gen_NB_IoT() in generate_NDLSCH_NB_IoT*************************************\n");
printf("RAR_pdu : %u********\n", RAR_pdu);
printf("RAR flag : %p********\n", RAR);
printf("number_of_subframes_for_resource_assignment(NSF) : %d********\n", Nsf);
printf("G : %d********\n", G);
dlsch_encoding_NB_IoT(RAR_pdu, dlsch_encoding_NB_IoT(RAR_pdu,
RAR, RAR,
Nsf, ///// number_of_subframes_required Nsf, ///// number_of_subframes_required
G); //// this vallue is fixed, should take into account in future the case of stand-alone & guard-band G); //// this vallue is fixed, should take into account in future the case of stand-alone & guard-band
printf("Finish doing generate_NDLSCH_NB_IoT() !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
dlsch_scrambling_Gen_NB_IoT(frame_parms, dlsch_scrambling_Gen_NB_IoT(frame_parms,
RAR, RAR,
...@@ -263,10 +270,13 @@ int generate_NDLSCH_NB_IoT(PHY_VARS_eNB *eNB, ...@@ -263,10 +270,13 @@ int generate_NDLSCH_NB_IoT(PHY_VARS_eNB *eNB,
RAR->rnti, RAR->rnti,
release_v13_5_0, release_v13_5_0,
0); 0);
printf("Finish doing dlsch_encoding_NB_IoT() & dlsch_scrambling_Gen_NB_IoT()\n");
} }
if( (counter_rep != rep) && (counter_sf_rep == 0) && (pointer_to_sf == 0) ) if( (counter_rep != rep) && (counter_sf_rep == 0) && (pointer_to_sf == 0) )
{ {
printf("Do dlsch_scrambling_Gen_NB_IoT when (counter_rep != rep) && (counter_sf_rep == 0) && (pointer_to_sf == 0)\n");
dlsch_scrambling_Gen_NB_IoT(frame_parms, dlsch_scrambling_Gen_NB_IoT(frame_parms,
RAR, RAR,
Nsf*G, Nsf*G,
...@@ -311,6 +321,7 @@ int generate_NDLSCH_NB_IoT(PHY_VARS_eNB *eNB, ...@@ -311,6 +321,7 @@ int generate_NDLSCH_NB_IoT(PHY_VARS_eNB *eNB,
} }
} }
printf("The value after done generate_NDLSCH_NB_IoT in if : %d\n*********************",done);
} else { } else {
...@@ -340,9 +351,9 @@ int generate_NDLSCH_NB_IoT(PHY_VARS_eNB *eNB, ...@@ -340,9 +351,9 @@ int generate_NDLSCH_NB_IoT(PHY_VARS_eNB *eNB,
} }
} }
printf("The value after done generate_NDLSCH_NB_IoT in else : %d\n*********************",done);
} }
} }
return(done); return(done);
} }
......
...@@ -142,6 +142,7 @@ int dlsch_encoding_NB_IoT(unsigned char *a, ...@@ -142,6 +142,7 @@ int dlsch_encoding_NB_IoT(unsigned char *a,
uint8_t Nsf, // number of subframes required for npdsch pdu transmission calculated from Isf (3GPP spec table) uint8_t Nsf, // number of subframes required for npdsch pdu transmission calculated from Isf (3GPP spec table)
unsigned int G) // G (number of available RE) is implicitly multiplied by 2 (since only QPSK modulation) unsigned int G) // G (number of available RE) is implicitly multiplied by 2 (since only QPSK modulation)
{ {
//printf("Get into dlsch_encoding_NB_IoT() ***********************************\n");
uint32_t crc = 1; uint32_t crc = 1;
//unsigned char harq_pid = dlsch->current_harq_pid; // to check during implementation if harq_pid is required in the NB_IoT_eNB_DLSCH_t structure in defs_NB_IoT.h //unsigned char harq_pid = dlsch->current_harq_pid; // to check during implementation if harq_pid is required in the NB_IoT_eNB_DLSCH_t structure in defs_NB_IoT.h
//uint8_t option1,option2,option3,option4; //uint8_t option1,option2,option3,option4;
......
...@@ -256,6 +256,7 @@ void handle_nfapi_dlsch_pdu_NB_IoT(PHY_VARS_eNB *eNB, ...@@ -256,6 +256,7 @@ void handle_nfapi_dlsch_pdu_NB_IoT(PHY_VARS_eNB *eNB,
ndlsch_harq->TBS = rel13->length; ndlsch_harq->TBS = rel13->length;
ndlsch_harq->pdu = sdu; ndlsch_harq->pdu = sdu;
printf("sdu after handling MSG4 or ue-spec data : %u********\n", sdu);
} }
} }
...@@ -344,13 +345,16 @@ void schedule_response_NB_IoT(Sched_Rsp_NB_IoT_t *Sched_INFO) ...@@ -344,13 +345,16 @@ void schedule_response_NB_IoT(Sched_Rsp_NB_IoT_t *Sched_INFO)
//LOG_I(PHY, "number_dl_pdu: %d ,dl_config_pdu type: %d\n",number_dl_pdu,dl_config_pdu->pdu_type); //LOG_I(PHY, "number_dl_pdu: %d ,dl_config_pdu type: %d\n",number_dl_pdu,dl_config_pdu->pdu_type);
switch (dl_config_pdu->pdu_type) switch (dl_config_pdu->pdu_type)
{ {
printf("In case schedule_response_NB_IoT****************************************in schedule_response_NB_IoT\n");
case NFAPI_DL_CONFIG_NPDCCH_PDU_TYPE: case NFAPI_DL_CONFIG_NPDCCH_PDU_TYPE:
//printf("NFAPI_DL_CONFIG_NPDCCH_PDU_TYPE***********************\n");
//Remember: there is no DCI for SI information //Remember: there is no DCI for SI information
//LOG_D(PHY,"Generate DL DCI PDU information from scheduler\n"); //LOG_D(PHY,"Generate DL DCI PDU information from scheduler\n");
//TODO: separate the ndlsch structure configuration from the DCI (here we will encode only the DCI) //TODO: separate the ndlsch structure configuration from the DCI (here we will encode only the DCI)
generate_eNB_dlsch_params_NB_IoT(eNB,proc,dl_config_pdu); generate_eNB_dlsch_params_NB_IoT(eNB,proc,dl_config_pdu);
break; break;
case NFAPI_DL_CONFIG_NBCH_PDU_TYPE: case NFAPI_DL_CONFIG_NBCH_PDU_TYPE:
//printf("NFAPI_DL_CONFIG_NBCH_PDU_TYPE***********************\n");
// for the moment we don't care about the n-bch pdu content since we need only the sdu if tx.request // for the moment we don't care about the n-bch pdu content since we need only the sdu if tx.request
npbch = &eNB->npbch; //in the main of the lte-softmodem they should allocate this memory of PHY_vars npbch = &eNB->npbch; //in the main of the lte-softmodem they should allocate this memory of PHY_vars
...@@ -366,6 +370,7 @@ void schedule_response_NB_IoT(Sched_Rsp_NB_IoT_t *Sched_INFO) ...@@ -366,6 +370,7 @@ void schedule_response_NB_IoT(Sched_Rsp_NB_IoT_t *Sched_INFO)
break; break;
case NFAPI_DL_CONFIG_NDLSCH_PDU_TYPE: case NFAPI_DL_CONFIG_NDLSCH_PDU_TYPE:
//printf("NFAPI_DL_CONFIG_NDLSCH_PDU_TYPE***********************\n");
//we can have three types of NDLSCH based on our assumptions: SIB1, SI, Data, RAR //we can have three types of NDLSCH based on our assumptions: SIB1, SI, Data, RAR
//remember that SI messages have no DCI in NB-IoT therefore this is the only way to configure the ndlsch_SI/ndlsch_SIB1 structures ndlsch->active = 1; //remember that SI messages have no DCI in NB-IoT therefore this is the only way to configure the ndlsch_SI/ndlsch_SIB1 structures ndlsch->active = 1;
...@@ -377,11 +382,14 @@ void schedule_response_NB_IoT(Sched_Rsp_NB_IoT_t *Sched_INFO) ...@@ -377,11 +382,14 @@ void schedule_response_NB_IoT(Sched_Rsp_NB_IoT_t *Sched_INFO)
* -for this reason the activation of the ndslch structure is done only when we receive the NDLSCH pdu (here) such the in the TX procedure only 1 ue-specific pdu * -for this reason the activation of the ndslch structure is done only when we receive the NDLSCH pdu (here) such the in the TX procedure only 1 ue-specific pdu
* result active from the loop before calling the ndlsch_procedure * result active from the loop before calling the ndlsch_procedure
*/ */
//if(TX_req->tx_request_body.tx_pdu_list[dl_config_pdu->nbch_pdu.nbch_pdu_rel13.pdu_index].segments[0].segment_data != NULL){
dl_config_pdu->ndlsch_pdu.ndlsch_pdu_rel13.pdu_index = 1; dl_config_pdu->ndlsch_pdu.ndlsch_pdu_rel13.pdu_index = 1;
handle_nfapi_dlsch_pdu_NB_IoT(eNB, proc,dl_config_pdu,TX_req->tx_request_body.tx_pdu_list[dl_config_pdu->ndlsch_pdu.ndlsch_pdu_rel13.pdu_index].segments[0].segment_data); handle_nfapi_dlsch_pdu_NB_IoT(eNB, proc,dl_config_pdu,TX_req->tx_request_body.tx_pdu_list[dl_config_pdu->ndlsch_pdu.ndlsch_pdu_rel13.pdu_index].segments[0].segment_data);
//}
break; break;
default: default:
//printf("default***********************\n");
LOG_D(PHY, "dl_config_pdu type not for NB_IoT\n"); LOG_D(PHY, "dl_config_pdu type not for NB_IoT\n");
break; break;
} }
......
...@@ -366,6 +366,7 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) ...@@ -366,6 +366,7 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
release_v13_5_0); release_v13_5_0);
} else if(eNB->ndlsch[0] != NULL) { } else if(eNB->ndlsch[0] != NULL) {
//printf("Going to generate_NDLSCH_NB_IoT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
generate_NDLSCH_NB_IoT(eNB, generate_NDLSCH_NB_IoT(eNB,
data, data,
txdataF, txdataF,
...@@ -375,6 +376,7 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) ...@@ -375,6 +376,7 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
subframe, subframe,
RB_IoT_ID, RB_IoT_ID,
release_v13_5_0); release_v13_5_0);
//printf("Finish doing generate_NDLSCH_NB_IoT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
} }
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
} }
...@@ -812,7 +814,7 @@ void generate_eNB_dlsch_params_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t * proc,n ...@@ -812,7 +814,7 @@ void generate_eNB_dlsch_params_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t * proc,n
npdcch = eNB->npdcch_DCI; npdcch = eNB->npdcch_DCI;
LOG_D(PHY,"Generating pdcch params for DCIN1 RAR and packing DCI\n"); LOG_I(PHY,"Generating pdcch params for DCIN1 RAR and packing DCI\n");
//LOG_I(PHY,"Rep of DCI is : %d\n",DCI_Content->DCIN1_RAR.RepNum); //LOG_I(PHY,"Rep of DCI is : %d\n",DCI_Content->DCIN1_RAR.RepNum);
//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");
......
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