Commit 30cc9c1c authored by WANG Tsu-Han's avatar WANG Tsu-Han

adding half fill mechanism into accelorated modulation

parent f1e041ad
...@@ -165,10 +165,19 @@ int allocate_REs_in_RB_no_pilots_QPSK_siso(PHY_VARS_eNB* phy_vars_eNB, ...@@ -165,10 +165,19 @@ int allocate_REs_in_RB_no_pilots_QPSK_siso(PHY_VARS_eNB* phy_vars_eNB,
uint32_t tti_offset; uint32_t tti_offset;
uint8_t re; uint8_t re;
uint8_t *x0p; uint8_t *x0p;
uint8_t first_re,last_re;
last_re=12;
first_re=0;
if (skip_half==1)
last_re=6;
else if (skip_half==2)
first_re=6;
re=first_re;
if (skip_dc == 0) { if (skip_dc == 0) {
for (x0p=&x0[*jj],tti_offset=symbol_offset+re_offset,re=0; for (x0p=&x0[*jj],tti_offset=symbol_offset+re_offset+re;
re<12; re<last_re;
re++,x0p+=2,tti_offset++) { re++,x0p+=2,tti_offset++) {
qpsk_table_offset_re=x0p[0]; qpsk_table_offset_re=x0p[0];
...@@ -199,8 +208,16 @@ int allocate_REs_in_RB_no_pilots_QPSK_siso(PHY_VARS_eNB* phy_vars_eNB, ...@@ -199,8 +208,16 @@ int allocate_REs_in_RB_no_pilots_QPSK_siso(PHY_VARS_eNB* phy_vars_eNB,
((int16_t *)&txdataF[0][tti_offset])[1]=qam_table_s0[qpsk_table_offset_im]; ((int16_t *)&txdataF[0][tti_offset])[1]=qam_table_s0[qpsk_table_offset_im];
} }
} }
*re_allocated = *re_allocated + 12; if(skip_half!=0)
*jj=*jj + 24; {
*re_allocated = *re_allocated + 6;
*jj=*jj + 12;
}
else
{
*re_allocated = *re_allocated + 12;
*jj=*jj + 24;
}
return(0); return(0);
} }
...@@ -238,12 +255,20 @@ int allocate_REs_in_RB_pilots_QPSK_siso(PHY_VARS_eNB* phy_vars_eNB, ...@@ -238,12 +255,20 @@ int allocate_REs_in_RB_pilots_QPSK_siso(PHY_VARS_eNB* phy_vars_eNB,
uint32_t tti_offset; uint32_t tti_offset;
uint8_t re; uint8_t re;
uint8_t *x0p; uint8_t *x0p;
uint8_t first_re,last_re;
last_re=12;
first_re=0;
if (skip_half==1)
last_re=6;
else if (skip_half==2)
first_re=6;
re=first_re+P1_SHIFT[0];
if (skip_dc == 0) { if (skip_dc == 0) {
// printf("pilots: P1_SHIFT[0] %d\n",P1_SHIFT[0]); // printf("pilots: P1_SHIFT[0] %d\n",P1_SHIFT[0]);
for (x0p=&x0[*jj],tti_offset=symbol_offset+re_offset+P1_SHIFT[0],re=P1_SHIFT[0]; for (x0p=&x0[*jj],tti_offset=symbol_offset+re_offset+re;
re<12; re<last_re;
x0p+=2) { x0p+=2) {
qpsk_table_offset_re=x0p[0]; qpsk_table_offset_re=x0p[0];
...@@ -280,8 +305,16 @@ int allocate_REs_in_RB_pilots_QPSK_siso(PHY_VARS_eNB* phy_vars_eNB, ...@@ -280,8 +305,16 @@ int allocate_REs_in_RB_pilots_QPSK_siso(PHY_VARS_eNB* phy_vars_eNB,
re+=P1_SHIFT[re+1]; re+=P1_SHIFT[re+1];
} }
} }
*re_allocated = *re_allocated + 10; if(skip_half!=0)
*jj=*jj + 20; {
*re_allocated = *re_allocated + 5;
*jj=*jj + 10;
}
else
{
*re_allocated = *re_allocated + 10;
*jj=*jj + 20;
}
return(0); return(0);
} }
...@@ -317,10 +350,19 @@ int allocate_REs_in_RB_no_pilots_16QAM_siso(PHY_VARS_eNB* phy_vars_eNB, ...@@ -317,10 +350,19 @@ int allocate_REs_in_RB_no_pilots_16QAM_siso(PHY_VARS_eNB* phy_vars_eNB,
uint32_t tti_offset; uint32_t tti_offset;
uint8_t re; uint8_t re;
uint8_t *x0p; uint8_t *x0p;
uint8_t first_re,last_re;
last_re=12;
first_re=0;
if (skip_half==1)
last_re=6;
else if (skip_half==2)
first_re=6;
re=first_re;
if (skip_dc == 0) { if (skip_dc == 0) {
for (x0p=&x0[*jj],tti_offset=symbol_offset+re_offset,re=0; for (x0p=&x0[*jj],tti_offset=symbol_offset+re_offset+re;
re<12; re<last_re;
re++,x0p+=4,tti_offset++) { re++,x0p+=4,tti_offset++) {
qam16_table_offset_re=TWO[x0p[0]]; qam16_table_offset_re=TWO[x0p[0]];
...@@ -357,8 +399,16 @@ int allocate_REs_in_RB_no_pilots_16QAM_siso(PHY_VARS_eNB* phy_vars_eNB, ...@@ -357,8 +399,16 @@ int allocate_REs_in_RB_no_pilots_16QAM_siso(PHY_VARS_eNB* phy_vars_eNB,
((int16_t *)&txdataF[0][tti_offset])[1]=qam_table_s0[qam16_table_offset_im]; ((int16_t *)&txdataF[0][tti_offset])[1]=qam_table_s0[qam16_table_offset_im];
} }
} }
*re_allocated = *re_allocated + 12; if(skip_half!=0)
*jj=*jj + 48; {
*re_allocated = *re_allocated + 6;
*jj=*jj + 24;
}
else
{
*re_allocated = *re_allocated + 12;
*jj=*jj + 48;
}
return(0); return(0);
} }
...@@ -396,12 +446,21 @@ int allocate_REs_in_RB_pilots_16QAM_siso(PHY_VARS_eNB* phy_vars_eNB, ...@@ -396,12 +446,21 @@ int allocate_REs_in_RB_pilots_16QAM_siso(PHY_VARS_eNB* phy_vars_eNB,
uint32_t tti_offset; uint32_t tti_offset;
uint8_t re; uint8_t re;
uint8_t *x0p; uint8_t *x0p;
uint8_t first_re,last_re;
last_re=12;
first_re=0;
if (skip_half==1)
last_re=6;
else if (skip_half==2)
first_re=6;
re=first_re+P1_SHIFT[0];
if (skip_dc == 0) { if (skip_dc == 0) {
// LOG_I(PHY,"pilots: P1_SHIFT[0] %d\n",P1_SHIFT[0]); // LOG_I(PHY,"pilots: P1_SHIFT[0] %d\n",P1_SHIFT[0]);
for (x0p=&x0[*jj],tti_offset=symbol_offset+re_offset+P1_SHIFT[0],re=P1_SHIFT[0]; for (x0p=&x0[*jj],tti_offset=symbol_offset+re_offset+re;
re<12; re<last_re;
x0p+=4) { x0p+=4) {
qam16_table_offset_re=TWO[x0p[0]]; qam16_table_offset_re=TWO[x0p[0]];
...@@ -444,8 +503,16 @@ int allocate_REs_in_RB_pilots_16QAM_siso(PHY_VARS_eNB* phy_vars_eNB, ...@@ -444,8 +503,16 @@ int allocate_REs_in_RB_pilots_16QAM_siso(PHY_VARS_eNB* phy_vars_eNB,
re+=P1_SHIFT[re+1]; re+=P1_SHIFT[re+1];
} }
} }
*re_allocated = *re_allocated + 10; if(skip_half!=0)
*jj=*jj + 40; {
*re_allocated = *re_allocated + 5;
*jj=*jj + 20;
}
else
{
*re_allocated = *re_allocated + 10;
*jj=*jj + 40;
}
return(0); return(0);
} }
...@@ -482,10 +549,19 @@ int allocate_REs_in_RB_no_pilots_64QAM_siso(PHY_VARS_eNB* phy_vars_eNB, ...@@ -482,10 +549,19 @@ int allocate_REs_in_RB_no_pilots_64QAM_siso(PHY_VARS_eNB* phy_vars_eNB,
uint32_t tti_offset; uint32_t tti_offset;
uint8_t re; uint8_t re;
uint8_t *x0p; uint8_t *x0p;
uint8_t first_re,last_re;
last_re=12;
first_re=0;
if (skip_half==1)
last_re=6;
else if (skip_half==2)
first_re=6;
re=first_re;
if (skip_dc == 0) { if (skip_dc == 0) {
x0p=&x0[*jj],tti_offset=symbol_offset+re_offset; x0p=&x0[*jj],tti_offset=symbol_offset+re_offset+re;
/* for (x0p=&x0[*jj],tti_offset=symbol_offset+re_offset,re=0; /* for (x0p=&x0[*jj],tti_offset=symbol_offset+re_offset,re=0;
re<12; re<12;
...@@ -521,36 +597,38 @@ int allocate_REs_in_RB_no_pilots_64QAM_siso(PHY_VARS_eNB* phy_vars_eNB, ...@@ -521,36 +597,38 @@ int allocate_REs_in_RB_no_pilots_64QAM_siso(PHY_VARS_eNB* phy_vars_eNB,
((int16_t *)&txdataF[0][tti_offset])[10]=qam_table_s0[qam64_table_offset_re]; ((int16_t *)&txdataF[0][tti_offset])[10]=qam_table_s0[qam64_table_offset_re];
((int16_t *)&txdataF[0][tti_offset])[11]=qam_table_s0[qam64_table_offset_im]; ((int16_t *)&txdataF[0][tti_offset])[11]=qam_table_s0[qam64_table_offset_im];
qam64_table_offset_re=(x0p[36]<<2)|(x0p[38]<<1)|x0p[40]; if(skip_half==0)
qam64_table_offset_im=(x0p[37]<<2)|(x0p[39]<<1)|x0p[41]; {
((int16_t *)&txdataF[0][tti_offset])[12]=qam_table_s0[qam64_table_offset_re]; qam64_table_offset_re=(x0p[36]<<2)|(x0p[38]<<1)|x0p[40];
((int16_t *)&txdataF[0][tti_offset])[13]=qam_table_s0[qam64_table_offset_im]; qam64_table_offset_im=(x0p[37]<<2)|(x0p[39]<<1)|x0p[41];
((int16_t *)&txdataF[0][tti_offset])[12]=qam_table_s0[qam64_table_offset_re];
qam64_table_offset_re=(x0p[42]<<2)|(x0p[44]<<1)|x0p[46]; ((int16_t *)&txdataF[0][tti_offset])[13]=qam_table_s0[qam64_table_offset_im];
qam64_table_offset_im=(x0p[43]<<2)|(x0p[45]<<1)|x0p[47];
((int16_t *)&txdataF[0][tti_offset])[14]=qam_table_s0[qam64_table_offset_re]; qam64_table_offset_re=(x0p[42]<<2)|(x0p[44]<<1)|x0p[46];
((int16_t *)&txdataF[0][tti_offset])[15]=qam_table_s0[qam64_table_offset_im]; qam64_table_offset_im=(x0p[43]<<2)|(x0p[45]<<1)|x0p[47];
((int16_t *)&txdataF[0][tti_offset])[14]=qam_table_s0[qam64_table_offset_re];
qam64_table_offset_re=(x0p[48]<<2)|(x0p[50]<<1)|x0p[52]; ((int16_t *)&txdataF[0][tti_offset])[15]=qam_table_s0[qam64_table_offset_im];
qam64_table_offset_im=(x0p[49]<<2)|(x0p[51]<<1)|x0p[53];
((int16_t *)&txdataF[0][tti_offset])[16]=qam_table_s0[qam64_table_offset_re]; qam64_table_offset_re=(x0p[48]<<2)|(x0p[50]<<1)|x0p[52];
((int16_t *)&txdataF[0][tti_offset])[17]=qam_table_s0[qam64_table_offset_im]; qam64_table_offset_im=(x0p[49]<<2)|(x0p[51]<<1)|x0p[53];
((int16_t *)&txdataF[0][tti_offset])[16]=qam_table_s0[qam64_table_offset_re];
qam64_table_offset_re=(x0p[54]<<2)|(x0p[56]<<1)|x0p[58]; ((int16_t *)&txdataF[0][tti_offset])[17]=qam_table_s0[qam64_table_offset_im];
qam64_table_offset_im=(x0p[55]<<2)|(x0p[57]<<1)|x0p[59];
((int16_t *)&txdataF[0][tti_offset])[18]=qam_table_s0[qam64_table_offset_re]; qam64_table_offset_re=(x0p[54]<<2)|(x0p[56]<<1)|x0p[58];
((int16_t *)&txdataF[0][tti_offset])[19]=qam_table_s0[qam64_table_offset_im]; qam64_table_offset_im=(x0p[55]<<2)|(x0p[57]<<1)|x0p[59];
((int16_t *)&txdataF[0][tti_offset])[18]=qam_table_s0[qam64_table_offset_re];
qam64_table_offset_re=(x0p[60]<<2)|(x0p[62]<<1)|x0p[64]; ((int16_t *)&txdataF[0][tti_offset])[19]=qam_table_s0[qam64_table_offset_im];
qam64_table_offset_im=(x0p[61]<<2)|(x0p[63]<<1)|x0p[65];
((int16_t *)&txdataF[0][tti_offset])[20]=qam_table_s0[qam64_table_offset_re]; qam64_table_offset_re=(x0p[60]<<2)|(x0p[62]<<1)|x0p[64];
((int16_t *)&txdataF[0][tti_offset])[21]=qam_table_s0[qam64_table_offset_im]; qam64_table_offset_im=(x0p[61]<<2)|(x0p[63]<<1)|x0p[65];
((int16_t *)&txdataF[0][tti_offset])[20]=qam_table_s0[qam64_table_offset_re];
qam64_table_offset_re=(x0p[66]<<2)|(x0p[68]<<1)|x0p[70]; ((int16_t *)&txdataF[0][tti_offset])[21]=qam_table_s0[qam64_table_offset_im];
qam64_table_offset_im=(x0p[67]<<2)|(x0p[69]<<1)|x0p[71];
((int16_t *)&txdataF[0][tti_offset])[22]=qam_table_s0[qam64_table_offset_re]; qam64_table_offset_re=(x0p[66]<<2)|(x0p[68]<<1)|x0p[70];
((int16_t *)&txdataF[0][tti_offset])[23]=qam_table_s0[qam64_table_offset_im]; qam64_table_offset_im=(x0p[67]<<2)|(x0p[69]<<1)|x0p[71];
((int16_t *)&txdataF[0][tti_offset])[22]=qam_table_s0[qam64_table_offset_re];
((int16_t *)&txdataF[0][tti_offset])[23]=qam_table_s0[qam64_table_offset_im];
}
// } // }
} }
...@@ -584,8 +662,16 @@ int allocate_REs_in_RB_no_pilots_64QAM_siso(PHY_VARS_eNB* phy_vars_eNB, ...@@ -584,8 +662,16 @@ int allocate_REs_in_RB_no_pilots_64QAM_siso(PHY_VARS_eNB* phy_vars_eNB,
} }
} }
*re_allocated = *re_allocated + 12; if(skip_half!=0)
*jj=*jj + 72; {
*re_allocated = *re_allocated + 6;
*jj=*jj + 36;
}
else
{
*re_allocated = *re_allocated + 12;
*jj=*jj + 72;
}
return(0); return(0);
} }
...@@ -623,12 +709,21 @@ int allocate_REs_in_RB_pilots_64QAM_siso(PHY_VARS_eNB* phy_vars_eNB, ...@@ -623,12 +709,21 @@ int allocate_REs_in_RB_pilots_64QAM_siso(PHY_VARS_eNB* phy_vars_eNB,
uint32_t tti_offset; uint32_t tti_offset;
uint8_t re; uint8_t re;
uint8_t *x0p; uint8_t *x0p;
uint8_t first_re,last_re;
last_re=12;
first_re=0;
if (skip_half==1)
last_re=6;
else if (skip_half==2)
first_re=6;
re=first_re+P1_SHIFT[0];
if (skip_dc == 0) { if (skip_dc == 0) {
// LOG_I(PHY,"pilots: P1_SHIFT[0] %d\n",P1_SHIFT[0]); // LOG_I(PHY,"pilots: P1_SHIFT[0] %d\n",P1_SHIFT[0]);
for (x0p=&x0[*jj],tti_offset=symbol_offset+re_offset+P1_SHIFT[0],re=P1_SHIFT[0]; for (x0p=&x0[*jj],tti_offset=symbol_offset+re_offset+re;
re<12; re<last_re;
x0p+=6) { x0p+=6) {
qam64_table_offset_re=FOUR[x0p[0]]; qam64_table_offset_re=FOUR[x0p[0]];
...@@ -677,8 +772,16 @@ int allocate_REs_in_RB_pilots_64QAM_siso(PHY_VARS_eNB* phy_vars_eNB, ...@@ -677,8 +772,16 @@ int allocate_REs_in_RB_pilots_64QAM_siso(PHY_VARS_eNB* phy_vars_eNB,
re+=P1_SHIFT[re+1]; re+=P1_SHIFT[re+1];
} }
} }
*re_allocated = *re_allocated + 10; if(skip_half!=0)
*jj=*jj + 60; {
*re_allocated = *re_allocated + 5;
*jj=*jj + 30;
}
else
{
*re_allocated = *re_allocated + 10;
*jj=*jj + 60;
}
return(0); return(0);
} }
...@@ -2485,9 +2588,9 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB, ...@@ -2485,9 +2588,9 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
skip_half = check_skiphalf(rb,subframe_offset,frame_parms,l,nsymb); skip_half = check_skiphalf(rb,subframe_offset,frame_parms,l,nsymb);
skip_dc = check_skip_dc(rb,frame_parms); skip_dc = check_skip_dc(rb,frame_parms);
if(skip_half>0) /*if(skip_half>0)
allocate_REs = allocate_REs_in_RB; allocate_REs = allocate_REs_in_RB;
*/
if (dlsch0) { if (dlsch0) {
if (dlsch0_harq->Nlayers>1) { if (dlsch0_harq->Nlayers>1) {
......
...@@ -71,7 +71,7 @@ schedule_ue_spec_phy_test( ...@@ -71,7 +71,7 @@ schedule_ue_spec_phy_test(
uint16_t rnti = 0x1235; uint16_t rnti = 0x1235;
uint32_t rb_alloc = 0x1FFFFF; uint32_t rb_alloc = 0x1FFFFF;
int32_t tpc = 1; int32_t tpc = 1;
int32_t mcs = 28; int32_t mcs = 10;
int32_t cqi = 15; int32_t cqi = 15;
int32_t ndi = (frameP*10+subframeP)/8; int32_t ndi = (frameP*10+subframeP)/8;
int32_t dai = 0; int32_t dai = 0;
...@@ -202,7 +202,7 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s ...@@ -202,7 +202,7 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s
int32_t normalized_rx_power; int32_t normalized_rx_power;
int32_t target_rx_power= 178; int32_t target_rx_power= 178;
int CC_id = 0; int CC_id = 0;
int nb_rb; int nb_rb = 24;
int N_RB_UL; int N_RB_UL;
eNB_MAC_INST *mac = RC.mac[module_idP]; eNB_MAC_INST *mac = RC.mac[module_idP];
COMMON_channels_t *cc = &mac->common_channels[0]; COMMON_channels_t *cc = &mac->common_channels[0];
...@@ -319,7 +319,7 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s ...@@ -319,7 +319,7 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s
hi_dci0_req_body->number_of_dci++; hi_dci0_req_body->number_of_dci++;
ul_req_index = 0; ul_req_index = 0;
dlsch_flag = 0; dlsch_flag = 0;
for(ul_req_index = 0;ul_req_index < ul_req->number_of_pdus;ul_req_index++){ for(ul_req_index = 0;ul_req_index < ul_req->number_of_pdus;ul_req_index++){
if(ul_req->ul_config_pdu_list[ul_req_index].pdu_type == NFAPI_UL_CONFIG_UCI_HARQ_PDU_TYPE){ if(ul_req->ul_config_pdu_list[ul_req_index].pdu_type == NFAPI_UL_CONFIG_UCI_HARQ_PDU_TYPE){
dlsch_flag = 1; dlsch_flag = 1;
......
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