Commit 2f5a8c86 authored by root's avatar root

re-adding original TBS table for UL.

parent f3dc7963
This diff is collapsed.
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
* contact@openairinterface.org * contact@openairinterface.org
*/ */
extern unsigned int dlsch_tbs25[27][25],TBStable[27][110],TBStable1C[32]; extern unsigned int dlsch_tbs25[27][25],TBStable[27][110],TBStable1C[32],TBStableUL[27][110];
extern unsigned short lte_cqi_eff1024[16]; extern unsigned short lte_cqi_eff1024[16];
extern char lte_cqi_snr_dB[15]; extern char lte_cqi_snr_dB[15];
extern short conjugate[8],conjugate2[8]; extern short conjugate[8],conjugate2[8];
......
...@@ -127,7 +127,7 @@ uint32_t get_TBS_UL(uint8_t mcs, uint16_t nb_rb) ...@@ -127,7 +127,7 @@ uint32_t get_TBS_UL(uint8_t mcs, uint16_t nb_rb)
uint32_t TBS = 0; uint32_t TBS = 0;
if ((nb_rb > 0) && (mcs < 29)) { if ((nb_rb > 0) && (mcs < 29)) {
TBS = TBStable[get_I_TBS_UL(mcs)][nb_rb-1]; TBS = TBStableUL[get_I_TBS_UL(mcs)][nb_rb-1];
TBS = TBS>>3; TBS = TBS>>3;
return(TBS); return(TBS);
} else { } else {
......
...@@ -540,8 +540,8 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP, sub_frame ...@@ -540,8 +540,8 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP, sub_frame
schedule_ue_spec(module_idP,frameP,subframeP,mbsfn_status); schedule_ue_spec(module_idP,frameP,subframeP,mbsfn_status);
} }
else { else {
if (subframeP==0) schedule_ulsch_phy_test(module_idP,frameP,subframeP); /*if (subframeP==0)*/ schedule_ulsch_phy_test(module_idP,frameP,subframeP);
//if (subframeP!=5) schedule_ue_spec_phy_test(module_idP,frameP,subframeP,mbsfn_status); if (subframeP!=5) schedule_ue_spec_phy_test(module_idP,frameP,subframeP,mbsfn_status);
} }
// Allocate CCEs for good after scheduling is done // Allocate CCEs for good after scheduling is done
......
...@@ -178,6 +178,9 @@ schedule_ue_spec_phy_test( ...@@ -178,6 +178,9 @@ schedule_ue_spec_phy_test(
0 // number of beamforming vectors, not used here 0 // number of beamforming vectors, not used here
); );
//program_dlsch_acknak(module_idP,CC_id,UE_id,frameP,subframeP,dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.cce_idx);
eNB->TX_req[CC_id].sfn_sf = fill_nfapi_tx_req(&eNB->TX_req[CC_id].tx_request_body, eNB->TX_req[CC_id].sfn_sf = fill_nfapi_tx_req(&eNB->TX_req[CC_id].tx_request_body,
(frameP*10)+subframeP, (frameP*10)+subframeP,
TBS, TBS,
...@@ -203,7 +206,6 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s ...@@ -203,7 +206,6 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s
int32_t target_rx_power= 178; int32_t target_rx_power= 178;
int n; int n;
int CC_id = 0; int CC_id = 0;
int N_RB_UL; //total number of RB
int nb_rb=4; //allocated number of RB int nb_rb=4; //allocated number of RB
eNB_MAC_INST *eNB = RC.mac[module_idP]; eNB_MAC_INST *eNB = RC.mac[module_idP];
COMMON_channels_t *cc = eNB->common_channels; COMMON_channels_t *cc = eNB->common_channels;
...@@ -222,17 +224,16 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s ...@@ -222,17 +224,16 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s
nfapi_ul_config_request_body_t *ul_req = &eNB->UL_req[CC_id].ul_config_request_body; nfapi_ul_config_request_body_t *ul_req = &eNB->UL_req[CC_id].ul_config_request_body;
ul_config_pdu = &ul_req->ul_config_pdu_list[0]; ul_config_pdu = &ul_req->ul_config_pdu_list[0];
//ul_config_pdu->ulsch_harq_pdu.harq_information.harq_information_rel10.harq_size=1;
eNB->UL_req[CC_id].sfn_sf = (sched_frame<<4) + sched_subframe; eNB->UL_req[CC_id].sfn_sf = (sched_frame<<4) + sched_subframe;
eNB->HI_DCI0_req[CC_id].sfn_sf = (frameP<<4)+subframeP; eNB->HI_DCI0_req[CC_id].sfn_sf = (frameP<<4)+subframeP;
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) { for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
//rnti = UE_RNTI(module_idP,UE_id); //rnti = UE_RNTI(module_idP,UE_id);
N_RB_UL = to_prb(cc[CC_id].ul_Bandwidth);
//printf("////////////////////////////////////*************************N_RB_UL = %d\n",N_RB_UL);
//leave out first RB for PUCCH //leave out first RB for PUCCH
first_rb[CC_id] = 1; first_rb[CC_id] = 1;
// loop over all active UEs //loop over all active UEs
// if (eNB_UE_stats->mode == PUSCH) { // ue has a ulsch channel // if (eNB_UE_stats->mode == PUSCH) { // ue has a ulsch channel
...@@ -267,16 +268,16 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s ...@@ -267,16 +268,16 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s
UE_template->TBS_UL[harq_pid] = get_TBS_UL(UE_template->mcs_UL[harq_pid],N_RB_UL-1); UE_template->TBS_UL[harq_pid] = get_TBS_UL(UE_template->mcs_UL[harq_pid],nb_rb);
UE_list->eNB_UE_stats[CC_id][UE_id].total_rbs_used_rx+=N_RB_UL-1; UE_list->eNB_UE_stats[CC_id][UE_id].total_rbs_used_rx+=nb_rb;
UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_TBS = get_TBS_UL(mcs,N_RB_UL-1); UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_TBS = get_TBS_UL(mcs,nb_rb);
// buffer_occupancy -= TBS; // buffer_occupancy -= TBS;
// bad indices : 20 (40 PRB), 21 (45 PRB), 22 (48 PRB) // bad indices : 20 (40 PRB), 21 (45 PRB), 22 (48 PRB)
//store for possible retransmission //store for possible retransmission
UE_template->nb_rb_ul[harq_pid] = N_RB_UL-1; UE_template->nb_rb_ul[harq_pid] = nb_rb;
UE_template->first_rb_ul[harq_pid] = first_rb[CC_id]; UE_template->first_rb_ul[harq_pid] = first_rb[CC_id];
UE_sched_ctrl->ul_scheduled |= (1<<harq_pid); UE_sched_ctrl->ul_scheduled |= (1<<harq_pid);
...@@ -314,7 +315,7 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s ...@@ -314,7 +315,7 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s
fill_nfapi_ulsch_config_request_rel8(&ul_req->ul_config_pdu_list[ul_req->number_of_pdus], fill_nfapi_ulsch_config_request_rel8(&ul_req->ul_config_pdu_list[ul_req->number_of_pdus],
cqi_req, cqi_req,
cc, cc,
0,//UE_template->physicalConfigDedicated, UE_template->physicalConfigDedicated,
get_tmode(module_idP,CC_id,UE_id), get_tmode(module_idP,CC_id,UE_id),
eNB->ul_handle, eNB->ul_handle,
rnti, rnti,
...@@ -330,7 +331,7 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s ...@@ -330,7 +331,7 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s
0, // ul_tx_mode 0, // ul_tx_mode
0, // current_tx_nb 0, // current_tx_nb
0, // n_srs 0, // n_srs
get_TBS_UL(mcs,N_RB_UL-1) get_TBS_UL(mcs,nb_rb)
); );
#ifdef Rel14 #ifdef Rel14
if (UE_template->rach_resource_type>0) { // This is a BL/CE UE allocation if (UE_template->rach_resource_type>0) { // This is a BL/CE UE allocation
...@@ -353,7 +354,7 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s ...@@ -353,7 +354,7 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s
S_UL_SCHEDULED); S_UL_SCHEDULED);
// increment first rb for next UE allocation // increment first rb for next UE allocation
first_rb[CC_id]+= N_RB_UL -1; first_rb[CC_id]+= nb_rb;
} // loop of CC_id } // loop of CC_id
......
...@@ -924,7 +924,8 @@ void program_dlsch_acknak(module_id_t module_idP, int CC_idP,int UE_idP, frame_t ...@@ -924,7 +924,8 @@ void program_dlsch_acknak(module_id_t module_idP, int CC_idP,int UE_idP, frame_t
#if defined(Rel10) || defined(Rel14) #if defined(Rel10) || defined(Rel14)
if ((UE_list->UE_template[CC_idP][UE_idP].physicalConfigDedicated->ext2) && if ((UE_list->UE_template[CC_idP][UE_idP].physicalConfigDedicated) &&
(UE_list->UE_template[CC_idP][UE_idP].physicalConfigDedicated->ext2) &&
(UE_list->UE_template[CC_idP][UE_idP].physicalConfigDedicated->ext2->pucch_ConfigDedicated_v1020) && (UE_list->UE_template[CC_idP][UE_idP].physicalConfigDedicated->ext2->pucch_ConfigDedicated_v1020) &&
(UE_list->UE_template[CC_idP][UE_idP].physicalConfigDedicated->ext2->pucch_ConfigDedicated_v1020->simultaneousPUCCH_PUSCH_r10) && (UE_list->UE_template[CC_idP][UE_idP].physicalConfigDedicated->ext2->pucch_ConfigDedicated_v1020->simultaneousPUCCH_PUSCH_r10) &&
(*UE_list->UE_template[CC_idP][UE_idP].physicalConfigDedicated->ext2->pucch_ConfigDedicated_v1020->simultaneousPUCCH_PUSCH_r10 == (*UE_list->UE_template[CC_idP][UE_idP].physicalConfigDedicated->ext2->pucch_ConfigDedicated_v1020->simultaneousPUCCH_PUSCH_r10 ==
...@@ -1373,6 +1374,7 @@ void fill_nfapi_ulsch_config_request_rel8(nfapi_ul_config_request_pdu_t *ul_con ...@@ -1373,6 +1374,7 @@ void fill_nfapi_ulsch_config_request_rel8(nfapi_ul_config_request_pdu_t *ul_con
else if (cc->p_eNB==4) else if (cc->p_eNB==4)
ul_config_pdu->ulsch_cqi_ri_pdu.cqi_ri_information.cqi_ri_information_rel9.aperiodic_cqi_pmi_ri_report.cc[0].ri_size = 2; ul_config_pdu->ulsch_cqi_ri_pdu.cqi_ri_information.cqi_ri_information_rel9.aperiodic_cqi_pmi_ri_report.cc[0].ri_size = 2;
AssertFatal(physicalConfigDedicated!=NULL,"physicalConfigDedicated is null!\n");
AssertFatal(physicalConfigDedicated->cqi_ReportConfig!=NULL,"physicalConfigDedicated->cqi_ReportConfig is null!\n"); AssertFatal(physicalConfigDedicated->cqi_ReportConfig!=NULL,"physicalConfigDedicated->cqi_ReportConfig is null!\n");
AssertFatal(physicalConfigDedicated->cqi_ReportConfig->cqi_ReportModeAperiodic!=NULL,"physicalConfigDedicated->cqi_ReportModeAperiodic is null!\n"); AssertFatal(physicalConfigDedicated->cqi_ReportConfig->cqi_ReportModeAperiodic!=NULL,"physicalConfigDedicated->cqi_ReportModeAperiodic is null!\n");
AssertFatal(physicalConfigDedicated->pusch_ConfigDedicated!=NULL,"physicalConfigDedicated->puschConfigDedicated is null!\n"); AssertFatal(physicalConfigDedicated->pusch_ConfigDedicated!=NULL,"physicalConfigDedicated->puschConfigDedicated is null!\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