pucch power control and handling of missed reception using confidence level
This commit is contained in:
@@ -192,7 +192,8 @@ int main(int argc, char **argv)
|
||||
int cyclic_prefix_type = NFAPI_CP_NORMAL;
|
||||
int run_initial_sync=0;
|
||||
int do_pdcch_flag=1;
|
||||
|
||||
int pusch_tgt_snrx10 = 200;
|
||||
int pucch_tgt_snrx10 = 200;
|
||||
int loglvl=OAILOG_INFO;
|
||||
|
||||
float target_error_rate = 0.01;
|
||||
@@ -529,9 +530,9 @@ int main(int argc, char **argv)
|
||||
AssertFatal((gNB->if_inst = NR_IF_Module_init(0))!=NULL,"Cannot register interface");
|
||||
gNB->if_inst->NR_PHY_config_req = nr_phy_config_request;
|
||||
// common configuration
|
||||
rrc_mac_config_req_gNB(0,0,1,scc,0,0,NULL);
|
||||
rrc_mac_config_req_gNB(0,0,1,pusch_tgt_snrx10,pucch_tgt_snrx10,scc,0,0,NULL);
|
||||
// UE dedicated configuration
|
||||
rrc_mac_config_req_gNB(0,0,1,NULL,1,secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity,secondaryCellGroup);
|
||||
rrc_mac_config_req_gNB(0,0,1,pusch_tgt_snrx10,pucch_tgt_snrx10,NULL,1,secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity,secondaryCellGroup);
|
||||
phy_init_nr_gNB(gNB,0,0);
|
||||
N_RB_DL = gNB->frame_parms.N_RB_DL;
|
||||
// stub to configure frame_parms
|
||||
|
||||
@@ -81,7 +81,7 @@ int main(int argc, char **argv)
|
||||
//int freq_offset;
|
||||
//int subframe_offset;
|
||||
//char fname[40], vname[40];
|
||||
int trial,n_trials=100,n_errors=0,ack_nack_errors=0;
|
||||
int trial,n_trials=100,n_errors=0,ack_nack_errors=0,sr_errors=0;
|
||||
uint8_t transmission_mode = 1,n_tx=1,n_rx=1;
|
||||
uint16_t Nid_cell=0;
|
||||
uint64_t SSB_positions=0x01;
|
||||
@@ -494,6 +494,7 @@ int main(int argc, char **argv)
|
||||
|
||||
for(SNR=snr0;SNR<=snr1;SNR=SNR+1){
|
||||
ack_nack_errors=0;
|
||||
sr_errors=0;
|
||||
n_errors = 0;
|
||||
for (trial=0; trial<n_trials; trial++) {
|
||||
bzero(txdataF[aa],frame_parms->ofdm_symbol_size*sizeof(int));
|
||||
@@ -548,15 +549,23 @@ int main(int argc, char **argv)
|
||||
pucch_pdu.start_symbol_index = startingSymbolIndex;
|
||||
pucch_pdu.prb_start = startingPRB;
|
||||
nr_decode_pucch0(gNB,nr_tti_tx,&uci_pdu,&pucch_pdu);
|
||||
if(nr_bit==1)
|
||||
ack_nack_errors+=(actual_payload^uci_pdu.harq->harq_list[0].harq_value);
|
||||
else
|
||||
ack_nack_errors+=(((actual_payload&1)^uci_pdu.harq->harq_list[0].harq_value)+((actual_payload>>1)^uci_pdu.harq->harq_list[1].harq_value));
|
||||
free(uci_pdu.harq->harq_list);
|
||||
if(sr_flag==1){
|
||||
if (uci_pdu.sr->sr_indication == 0 || uci_pdu.sr->sr_confidence_level == 1)
|
||||
sr_errors+=1;
|
||||
}
|
||||
if(nr_bit>0){
|
||||
if(nr_bit==1)
|
||||
ack_nack_errors+=(actual_payload^uci_pdu.harq->harq_list[0].harq_value);
|
||||
else
|
||||
ack_nack_errors+=(((actual_payload&1)^uci_pdu.harq->harq_list[0].harq_value)+((actual_payload>>1)^uci_pdu.harq->harq_list[1].harq_value));
|
||||
free(uci_pdu.harq->harq_list);
|
||||
}
|
||||
}
|
||||
else if (format==1) {
|
||||
|
||||
nr_decode_pucch1(rxdataF,PUCCH_GroupHopping,hopping_id,&(payload_received),frame_parms,amp,nr_tti_tx,m0,nrofSymbols,startingSymbolIndex,startingPRB,startingPRB_intraSlotHopping,timeDomainOCC,nr_bit);
|
||||
nr_decode_pucch1(rxdataF,PUCCH_GroupHopping,hopping_id,
|
||||
&(payload_received),frame_parms,amp,nr_tti_tx,
|
||||
m0,nrofSymbols,startingSymbolIndex,startingPRB,
|
||||
startingPRB_intraSlotHopping,timeDomainOCC,nr_bit);
|
||||
if(nr_bit==1)
|
||||
ack_nack_errors+=((actual_payload^payload_received)&1);
|
||||
else
|
||||
@@ -595,8 +604,11 @@ int main(int argc, char **argv)
|
||||
}
|
||||
n_errors=((actual_payload^payload_received)&1)+(((actual_payload^payload_received)&2)>>1)+(((actual_payload^payload_received)&4)>>2)+n_errors;
|
||||
}
|
||||
printf("SNR=%f, n_trials=%d, n_bit_errors=%d\n",SNR,n_trials,ack_nack_errors);
|
||||
if((float)ack_nack_errors/(float)(n_trials)<=target_error_rate){
|
||||
if (sr_flag == 1)
|
||||
printf("SR: SNR=%f, n_trials=%d, n_bit_errors=%d\n",SNR,n_trials,sr_errors);
|
||||
if(nr_bit > 0)
|
||||
printf("ACK/NACK: SNR=%f, n_trials=%d, n_bit_errors=%d\n",SNR,n_trials,ack_nack_errors);
|
||||
if((float)(ack_nack_errors+sr_errors)/(float)(n_trials)<=target_error_rate){
|
||||
printf("PUCCH test OK\n");
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -171,7 +171,8 @@ int main(int argc, char **argv)
|
||||
FILE *scg_fd=NULL;
|
||||
|
||||
double DS_TDL = .03;
|
||||
|
||||
int pusch_tgt_snrx10 = 200;
|
||||
int pucch_tgt_snrx10 = 200;
|
||||
int ibwps=24;
|
||||
int ibwp_rboffset=41;
|
||||
if ( load_configmodule(argc,argv,CONFIG_ENABLECMDLINEONLY) == 0 ) {
|
||||
@@ -508,9 +509,9 @@ int main(int argc, char **argv)
|
||||
|
||||
gNB->if_inst->NR_PHY_config_req = nr_phy_config_request;
|
||||
// common configuration
|
||||
rrc_mac_config_req_gNB(0,0,1,200,scc,0,0,NULL);
|
||||
rrc_mac_config_req_gNB(0,0,1,pusch_tgt_snrx10,pucch_tgt_snrx10,scc,0,0,NULL);
|
||||
// UE dedicated configuration
|
||||
rrc_mac_config_req_gNB(0,0,1,200,NULL,1,secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity,secondaryCellGroup);
|
||||
rrc_mac_config_req_gNB(0,0,1,pusch_tgt_snrx10,pucch_tgt_snrx10,NULL,1,secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity,secondaryCellGroup);
|
||||
phy_init_nr_gNB(gNB,0,0);
|
||||
N_RB_DL = gNB->frame_parms.N_RB_DL;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user