Commit f272070c authored by Wang Tsu-Han's avatar Wang Tsu-Han

bug fix for phy-test DL

parent a66d14d8
......@@ -550,7 +550,7 @@ int dlsch_encoding_2threads(PHY_VARS_eNB *eNB,
// Fill in the "e"-sequence from 36-212, V8.6 2009-03, p. 16-17 (for each "e") and concatenate the
// outputs for each code segment, see Section 5.1.5 p.20
start_meas(rm_stats);
for (r=0,r_offset=0; r<dlsch->harq_processes[harq_pid]->C; r++) {
// get information for E for the segments that are handled by the worker thread
......@@ -566,7 +566,7 @@ int dlsch_encoding_2threads(PHY_VARS_eNB *eNB,
r_offset += Nl*Qm * ((GpmodC==0?0:1) + (Gp/C));
}
else {
start_meas(rm_stats);
//start_meas(rm_stats);
r_offset += lte_rate_matching_turbo(dlsch->harq_processes[harq_pid]->RTC[r],
G, //G
dlsch->harq_processes[harq_pid]->w[r],
......@@ -581,9 +581,10 @@ int dlsch_encoding_2threads(PHY_VARS_eNB *eNB,
r,
nb_rb);
// m); // r
stop_meas(rm_stats);
//stop_meas(rm_stats);
}
}
stop_meas(rm_stats);
stop_meas(te_main_stats);
start_meas(te_wait_stats);
......@@ -645,6 +646,7 @@ int dlsch_encoding_all(PHY_VARS_eNB *eNB,
C = C+1;
}
}
//LOG_I(PHY,"segmentation number C = %d\n", C);////////////********added
if(C >= 8 && get_nprocs()>=16 && codingw)//one main three worker
{
......
......@@ -167,7 +167,7 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_pr
#endif
harq_pid = dlsch0->harq_ids[subframe];
LOG_I(PHY,"handle_nfapi_dlsch_pdu subframe = %d harq_ids = [%d:%d:%d:%d:%d:%d:%d:%d:%d:%d]\n", subframe,dlsch0->harq_ids[0],
/*LOG_I(PHY,"handle_nfapi_dlsch_pdu subframe = %d harq_ids = [%d:%d:%d:%d:%d:%d:%d:%d:%d:%d]\n", subframe,dlsch0->harq_ids[0],
dlsch0->harq_ids[1],
dlsch0->harq_ids[2],
dlsch0->harq_ids[3],
......@@ -176,7 +176,7 @@ LOG_I(PHY,"handle_nfapi_dlsch_pdu subframe = %d harq_ids = [%d:%d:%d:%d:%d:%d:%d
dlsch0->harq_ids[6],
dlsch0->harq_ids[7],
dlsch0->harq_ids[8],
dlsch0->harq_ids[9]);/////////////*********added
dlsch0->harq_ids[9]);*/////////////*********added
AssertFatal((harq_pid>=0) && (harq_pid<8),"harq_pid %d not in 0...7 frame:%d subframe:%d subframe(TX):%d rnti:%x UE_id:%d dlsch0[harq_ids:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d]\n",
harq_pid,
frame,subframe,
......@@ -681,7 +681,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO)
LOG_D(PHY,"NFAPI: Clearing dci allocations for potential UL subframe %d\n",ul_subframe);
harq_pid = subframe2harq_pid(fp,ul_frame,ul_subframe);
LOG_I(PHY,"schedule_response %d.%d UL %d.%d harq_pid = %d\n", frame, subframe, ul_frame, ul_subframe, harq_pid);/////////////*********added
//LOG_I(PHY,"schedule_response %d.%d UL %d.%d harq_pid = %d\n", frame, subframe, ul_frame, ul_subframe, harq_pid);/////////////*********added
// clear DCI allocation maps for new subframe
......@@ -695,7 +695,7 @@ LOG_I(PHY,"schedule_response %d.%d UL %d.%d harq_pid = %d\n", frame, subframe, u
}
for (i=0;i<number_dl_pdu;i++) {
dl_config_pdu = &DL_req->dl_config_request_body.dl_config_pdu_list[i];
LOG_I(PHY,"NFAPI: dl_pdu %d : type %d\n",i,dl_config_pdu->pdu_type);/////////////*********LOG_D with mark out
//LOG_I(PHY,"NFAPI: dl_pdu %d : type %d\n",i,dl_config_pdu->pdu_type);/////////////*********LOG_D with mark out
switch (dl_config_pdu->pdu_type) {
case NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE:
//LOG_I(PHY,"NFAPI: dl_pdu %d : type %d executing handle_nfapi_dci_dl_pdu()\n",i,dl_config_pdu->pdu_type);/////////////*********added
......@@ -748,7 +748,7 @@ LOG_I(PHY,"schedule_response %d.%d UL %d.%d harq_pid = %d\n", frame, subframe, u
dlsch_pdu_rel8->transport_blocks);
if (sdu != NULL)
{
LOG_I(PHY,"NFAPI: executing handle_nfapi_dlsch_pdu()\n");/////////////*********added
//LOG_I(PHY,"NFAPI: executing handle_nfapi_dlsch_pdu()\n");/////////////*********added
handle_nfapi_dlsch_pdu(eNB,NFAPI_SFNSF2SFN(DL_req->sfn_sf),NFAPI_SFNSF2SF(DL_req->sfn_sf),proc,dl_config_pdu, dlsch_pdu_rel8->transport_blocks-1, sdu);
}
else
......
......@@ -470,7 +470,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
if (ul_subframe < 10) { // This means that there is a potential UL subframe that will be scheduled here
for (i=0; i<NUMBER_OF_UE_MAX; i++) {
harq_pid = subframe2harq_pid(fp,ul_frame,ul_subframe);
LOG_I(PHY,"phy_procedures_eNB_TX %d.%d UL %d.%d harq_pid == %d \n", frame, subframe, ul_frame, ul_subframe, harq_pid);////////////********added
//LOG_I(PHY,"phy_procedures_eNB_TX %d.%d UL %d.%d harq_pid == %d \n", frame, subframe, ul_frame, ul_subframe, harq_pid);////////////********added
if (eNB->ulsch[i]) {
ulsch_harq = eNB->ulsch[i]->harq_processes[harq_pid];
......@@ -536,7 +536,7 @@ LOG_I(PHY,"phy_procedures_eNB_TX %d.%d UL %d.%d harq_pid == %d \n", frame, subfr
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GENERATE_DLSCH,1);
// Now scan UE specific DLSCH
LTE_eNB_DLSCH_t *dlsch0,*dlsch1;
LOG_I(PHY,"phy_procedures_eNB_TX before dlsch0 %d.%d UL %d.%d harq_pid == %d \n", frame, subframe, ul_frame, ul_subframe, harq_pid);////////////********added
//LOG_I(PHY,"phy_procedures_eNB_TX before dlsch0 %d.%d UL %d.%d harq_pid == %d \n", frame, subframe, ul_frame, ul_subframe, harq_pid);////////////********added
for (UE_id=0; UE_id<NUMBER_OF_UE_MAX; UE_id++)
{
dlsch0 = eNB->dlsch[(uint8_t)UE_id][0];
......@@ -1410,7 +1410,7 @@ void init_te_thread(PHY_VARS_eNB *eNB) {
pthread_cond_init( &proc->tep[i].cond_te, NULL);
pthread_attr_init( &proc->tep[i].attr_te);
printf("Creating te_thread 0\n");
LOG_I(PHY,"Creating te_thread %d\n",i);
pthread_create(&proc->tep[i].pthread_te, &proc->tep[i].attr_te, te_thread, (void*)&proc->tep[i]);
}
}
......
......@@ -666,7 +666,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP,
}
else{
schedule_ulsch_phy_test(module_idP,frameP,subframeP);
LOG_I(MAC,"frameP = %d .subframeP = %d\n", frameP, subframeP);/////////////*********added
//LOG_I(MAC,"frameP = %d .subframeP = %d\n", frameP, subframeP);/////////////*********added
schedule_ue_spec_phy_test(module_idP,frameP,subframeP,mbsfn_status);
}
......
......@@ -69,11 +69,11 @@ schedule_ue_spec_phy_test(
unsigned char harq_pid = (frameP*10+subframeP)%8;
uint16_t rnti = 0x1235;
uint32_t rb_alloc = 0x1FFFFFFF;
uint32_t rb_alloc = 0x1FFFFF;
int32_t tpc = 1;
int32_t mcs = 28;
int32_t cqi = 15;
int32_t ndi = 1;//(frameP*10+subframeP)/8;
int32_t ndi = (frameP*10+subframeP)/8;
int32_t dai = 0;
eNB_MAC_INST *eNB = RC.mac[module_idP];
......@@ -94,7 +94,7 @@ schedule_ue_spec_phy_test(
nb_rb = conv_nprb(0,rb_alloc,N_RB_DL);
TBS = get_TBS_DL(mcs,nb_rb);
LOG_I(MAC,"schedule_ue_spec_phy_test: subframe %d/%d: nb_rb=%d, TBS=%d, mcs=%d harq_pid=%d (rb_alloc=%x, N_RB_DL=%d) pdu_number = %d \n", frameP, subframeP, nb_rb, TBS, mcs, harq_pid, rb_alloc, N_RB_DL, dl_req->number_pdu);////////////********change into LOG_I
/*LOG_I(MAC,"schedule_ue_spec_phy_test: subframe %d/%d: nb_rb=%d, TBS=%d, mcs=%d harq_pid=%d (rb_alloc=%x, N_RB_DL=%d) pdu_number = %d \n", frameP, subframeP, nb_rb, TBS, mcs, harq_pid, rb_alloc, N_RB_DL, dl_req->number_pdu);*////////////********LOG_D to LOG_I
dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
memset((void*)dl_config_pdu,0,sizeof(nfapi_dl_config_request_pdu_t));
......@@ -124,8 +124,8 @@ schedule_ue_spec_phy_test(
LOG_D(MAC,"[eNB %d] Initial transmission CC_id %d : harq_pid %d, dai %d, mcs %d\n",
module_idP,CC_id,harq_pid,dai,mcs);
} else {
LOG_I(MAC,"[eNB %d] Initial transmission CC_id %d : harq_pid %d, mcs %d\n",
module_idP,CC_id,harq_pid,mcs);
/*LOG_I(MAC,"[eNB %d] Initial transmission CC_id %d : harq_pid %d, mcs %d\n",
module_idP,CC_id,harq_pid,mcs);*////////////********added
}
LOG_D(MAC,"Checking feasibility pdu %d (new sdu)\n",dl_req->number_pdu);
......@@ -135,7 +135,7 @@ schedule_ue_spec_phy_test(
//ue_sched_ctl->round[CC_id][harq_pid] = 0;
dl_req->number_dci++;
dl_req->number_pdu++;
LOG_I(MAC,"phy-test DL number of dci = %d pdu = %d \n", dl_req->number_dci, dl_req->number_pdu);////////////********added
//LOG_I(MAC,"phy-test DL number of dci = %d pdu = %d \n", dl_req->number_dci, dl_req->number_pdu);////////////********added
eNB->DL_req[CC_id].sfn_sf = frameP<<4 | subframeP;
//eNB->DL_req[CC_id].header.message_id = NFAPI_DL_CONFIG_REQUEST;
......@@ -151,7 +151,7 @@ LOG_I(MAC,"phy-test DL number of dci = %d pdu = %d \n", dl_req->number_dci, dl_r
AssertFatal(UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated!=NULL,"physicalConfigDedicated is NULL\n");
AssertFatal(UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->pdsch_ConfigDedicated!=NULL,"physicalConfigDedicated->pdsch_ConfigDedicated is NULL\n");
*/
LOG_I(MAC,"pdu_index = %d \n", eNB->pdu_index[CC_id]);////////////********added
//LOG_I(MAC,"pdu_index = %d \n", eNB->pdu_index[CC_id]);////////////********added
fill_nfapi_dlsch_config(eNB,
......@@ -237,7 +237,7 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s
UE_sched_ctrl = &UE_list->UE_sched_ctrl[UE_id];
harq_pid = subframe2harqpid(&cc[CC_id],sched_frame,sched_subframe);
LOG_I(MAC,"Scheduling for frame %d, subframe %d => harq_pid %d\n",sched_frame,sched_subframe,harq_pid);
//LOG_I(MAC,"Scheduling for frame %d, subframe %d => harq_pid %d\n",sched_frame,sched_subframe,harq_pid);////////////********added
RC.eNB[module_idP][CC_id]->pusch_stats_BO[UE_id][(frameP*10)+subframeP] = UE_template->TBS_UL[harq_pid];
......
......@@ -217,7 +217,7 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam
wakeup_prach_eNB_br(eNB,NULL,proc->frame_rx,proc->subframe_rx);
#endif
}
LOG_I(PHY,"eNB_uespec_RX proc RX %d.%d TX %d.%d \n", proc->frame_rx, proc->subframe_rx, proc->frame_tx, proc->subframe_tx);/////////////*********added
//LOG_I(PHY,"eNB_uespec_RX proc RX %d.%d TX %d.%d \n", proc->frame_rx, proc->subframe_rx, proc->frame_tx, proc->subframe_tx);/////////////*********added
// UE-specific RX processing for subframe n
if (nfapi_mode == 0 || nfapi_mode == 1) {
phy_procedures_eNB_uespec_RX(eNB, proc, no_relay );
......@@ -238,7 +238,7 @@ LOG_I(PHY,"eNB_uespec_RX proc RX %d.%d TX %d.%d \n", proc->frame_rx, proc->subfr
eNB->UL_INFO.subframe = proc->subframe_rx;
eNB->UL_INFO.module_id = eNB->Mod_id;
eNB->UL_INFO.CC_id = eNB->CC_id;
LOG_I(PHY,"UL_INFO %d.%d \n", eNB->UL_INFO.frame, eNB->UL_INFO.subframe);/////////////*********added
//LOG_I(PHY,"UL_INFO %d.%d \n", eNB->UL_INFO.frame, eNB->UL_INFO.subframe);/////////////*********added
eNB->if_inst->UL_indication(&eNB->UL_INFO);
......@@ -328,7 +328,7 @@ static void* tx_thread(void* param) {
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX1_ENB,proc->frame_tx);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX1_ENB,proc->frame_rx);
LOG_I(PHY,"tx thread proc RX %d.%d TX %d.%d \n", proc->frame_rx, proc->subframe_rx, proc->frame_tx, proc->subframe_tx);/////////////*********added
//LOG_I(PHY,"tx thread proc RX %d.%d TX %d.%d \n", proc->frame_rx, proc->subframe_rx, proc->frame_tx, proc->subframe_tx);/////////////*********added
phy_procedures_eNB_TX(eNB, proc, no_relay, NULL, 1);
if (release_thread(&proc->mutex_rxtx,&proc->instance_cnt_rxtx,thread_name)<0) break;
......@@ -874,6 +874,9 @@ static void* process_stats_thread(void* param) {
print_meas(&eNB->dlsch_encoding_stats,"dlsch_encoding",NULL,NULL);
print_meas(&eNB->dlsch_turbo_encoding_signal_stats,"coding_signal",NULL,NULL);
print_meas(&eNB->dlsch_turbo_encoding_main_stats,"coding_main",NULL,NULL);
print_meas(&eNB->dlsch_turbo_encoding_stats,"turbo_encoding",NULL,NULL);
print_meas(&eNB->dlsch_interleaving_stats,"turbo_interleaving",NULL,NULL);
print_meas(&eNB->dlsch_rate_matching_stats,"turbo_rate_matching",NULL,NULL);
print_meas(&eNB->dlsch_turbo_encoding_waiting_stats,"coding_wait",NULL,NULL);
print_meas(&eNB->dlsch_turbo_encoding_wakeup_stats0,"coding_worker_0",NULL,NULL);
print_meas(&eNB->dlsch_turbo_encoding_wakeup_stats1,"coding_worker_1",NULL,NULL);
......
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