Merge remote-tracking branch 'origin/integration_2021_wk41' into integration_2021_wk41_bwt-abs
# Conflicts: # ci-scripts/xml_files/fr1_sa_quectel.xml # openair1/SCHED_NR/fapi_nr_l1.c # openair1/SCHED_NR/phy_procedures_nr_gNB.c # openair2/GNB_APP/gnb_paramdef.h
This commit is contained in:
@@ -426,7 +426,9 @@ int main(int argc, char **argv)
|
||||
UE->dlsch_SI[0] = new_nr_ue_dlsch(1, 1, Nsoft, 5, N_RB_DL, 0);
|
||||
UE->dlsch_ra[0] = new_nr_ue_dlsch(1, 1, Nsoft, 5, N_RB_DL, 0);
|
||||
unsigned char harq_pid = 0; //dlsch->harq_ids[subframe];
|
||||
NR_gNB_DLSCH_t *dlsch = gNB->dlsch[0][0];
|
||||
processingData_L1tx_t msgDataTx;
|
||||
init_DLSCH_struct(gNB, &msgDataTx);
|
||||
NR_gNB_DLSCH_t *dlsch = msgDataTx.dlsch[0][0];
|
||||
nfapi_nr_dl_tti_pdsch_pdu_rel15_t *rel15 = &dlsch->harq_process.pdsch_pdu.pdsch_pdu_rel15;
|
||||
//time_stats_t *rm_stats, *te_stats, *i_stats;
|
||||
uint8_t is_crnti = 0, llr8_flag = 0;
|
||||
@@ -634,7 +636,7 @@ int main(int argc, char **argv)
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
printf("gNB %d\n", i);
|
||||
free_gNB_dlsch(&(gNB->dlsch[0][i]),N_RB_DL);
|
||||
free_gNB_dlsch(&(msgDataTx.dlsch[0][i]),N_RB_DL);
|
||||
printf("UE %d\n", i);
|
||||
free_nr_ue_dlsch(&(UE->dlsch[0][0][i]),N_RB_DL);
|
||||
}
|
||||
|
||||
@@ -933,8 +933,6 @@ int main(int argc, char **argv)
|
||||
// generate signal
|
||||
AssertFatal(input_fd==NULL,"Not ready for input signal file\n");
|
||||
gNB->pbch_configured = 1;
|
||||
gNB->ssb[0].ssb_pdu.ssb_pdu_rel15.bchPayload=0x001234;
|
||||
gNB->ssb[0].ssb_pdu.ssb_pdu_rel15.SsbBlockIndex = 0;
|
||||
|
||||
//Configure UE
|
||||
rrc.carrier.MIB = (uint8_t*) malloc(4);
|
||||
@@ -964,11 +962,25 @@ int main(int argc, char **argv)
|
||||
//NR_COMMON_channels_t *cc = RC.nrmac[0]->common_channels;
|
||||
snrRun = 0;
|
||||
|
||||
gNB->threadPool = (tpool_t*)malloc(sizeof(tpool_t));
|
||||
char tp_param[] = "n";
|
||||
initTpool(tp_param, gNB->threadPool, true);
|
||||
gNB->resp_L1_tx = (notifiedFIFO_t*) malloc(sizeof(notifiedFIFO_t));
|
||||
initNotifiedFIFO(gNB->resp_L1_tx);
|
||||
// we create 2 threads for L1 tx processing
|
||||
notifiedFIFO_elt_t *msgL1Tx = newNotifiedFIFO_elt(sizeof(processingData_L1tx_t),0,gNB->resp_L1_tx,processSlotTX);
|
||||
processingData_L1tx_t *msgDataTx = (processingData_L1tx_t *)NotifiedFifoData(msgL1Tx);
|
||||
init_DLSCH_struct(gNB, msgDataTx);
|
||||
msgDataTx->slot = slot;
|
||||
msgDataTx->frame = frame;
|
||||
memset(msgDataTx->ssb, 0, 64*sizeof(NR_gNB_SSB_t));
|
||||
reset_meas(&msgDataTx->phy_proc_tx);
|
||||
gNB->phy_proc_tx_0 = &msgDataTx->phy_proc_tx;
|
||||
pushTpool(gNB->threadPool,msgL1Tx);
|
||||
|
||||
for (SNR = snr0; SNR < snr1; SNR += .2) {
|
||||
|
||||
varArray_t *table_tx=initVarArray(1000,sizeof(double));
|
||||
reset_meas(&gNB->phy_proc_tx); // total gNB tx
|
||||
reset_meas(&gNB->dlsch_scrambling_stats);
|
||||
reset_meas(&gNB->dlsch_interleaving_stats);
|
||||
reset_meas(&gNB->dlsch_rate_matching_stats);
|
||||
@@ -1009,7 +1021,7 @@ int main(int argc, char **argv)
|
||||
int harq_pid = slot;
|
||||
NR_DL_UE_HARQ_t *UE_harq_process = dlsch0->harq_processes[harq_pid];
|
||||
|
||||
NR_gNB_DLSCH_t *gNB_dlsch = gNB->dlsch[0][0];
|
||||
NR_gNB_DLSCH_t *gNB_dlsch = msgDataTx->dlsch[0][0];
|
||||
nfapi_nr_dl_tti_pdsch_pdu_rel15_t *rel15 = &gNB_dlsch->harq_process.pdsch_pdu.pdsch_pdu_rel15;
|
||||
|
||||
UE_harq_process->ack = 0;
|
||||
@@ -1060,10 +1072,14 @@ int main(int argc, char **argv)
|
||||
ptrsRePerSymb = ((rel15->rbSize + rel15->PTRSFreqDensity - 1)/rel15->PTRSFreqDensity);
|
||||
printf("[DLSIM] PTRS Symbols in a slot: %2u, RE per Symbol: %3u, RE in a slot %4d\n", ptrsSymbPerSlot,ptrsRePerSymb, ptrsSymbPerSlot*ptrsRePerSymb );
|
||||
}
|
||||
|
||||
msgDataTx->ssb[0].ssb_pdu.ssb_pdu_rel15.bchPayload=0x001234;
|
||||
msgDataTx->ssb[0].ssb_pdu.ssb_pdu_rel15.SsbBlockIndex = 0;
|
||||
msgDataTx->gNB = gNB;
|
||||
if (run_initial_sync)
|
||||
nr_common_signal_procedures(gNB,frame,slot,gNB->ssb[0].ssb_pdu);
|
||||
nr_common_signal_procedures(gNB,frame,slot,msgDataTx->ssb[0].ssb_pdu);
|
||||
else
|
||||
phy_procedures_gNB_TX(gNB,frame,slot,1);
|
||||
phy_procedures_gNB_TX(msgDataTx,frame,slot,1);
|
||||
|
||||
int txdataF_offset = (slot%2) * frame_parms->samples_per_slot_wCP;
|
||||
|
||||
@@ -1272,10 +1288,10 @@ int main(int argc, char **argv)
|
||||
if (print_perf==1) {
|
||||
printf("\ngNB TX function statistics (per %d us slot, NPRB %d, mcs %d, TBS %d, Kr %d (Zc %d))\n",
|
||||
1000>>*scc->ssbSubcarrierSpacing, g_rbSize, g_mcsIndex,
|
||||
gNB->dlsch[0][0]->harq_process.pdsch_pdu.pdsch_pdu_rel15.TBSize[0]<<3,
|
||||
gNB->dlsch[0][0]->harq_process.K,
|
||||
gNB->dlsch[0][0]->harq_process.K/((gNB->dlsch[0][0]->harq_process.pdsch_pdu.pdsch_pdu_rel15.TBSize[0]<<3)>3824?22:10));
|
||||
printDistribution(&gNB->phy_proc_tx,table_tx,"PHY proc tx");
|
||||
msgDataTx->dlsch[0][0]->harq_process.pdsch_pdu.pdsch_pdu_rel15.TBSize[0]<<3,
|
||||
msgDataTx->dlsch[0][0]->harq_process.K,
|
||||
msgDataTx->dlsch[0][0]->harq_process.K/((msgDataTx->dlsch[0][0]->harq_process.pdsch_pdu.pdsch_pdu_rel15.TBSize[0]<<3)>3824?22:10));
|
||||
printDistribution(gNB->phy_proc_tx_0,table_tx,"PHY proc tx");
|
||||
printStatIndent2(&gNB->dlsch_encoding_stats,"DLSCH encoding time");
|
||||
printStatIndent3(&gNB->dlsch_segmentation_stats,"DLSCH segmentation time");
|
||||
printStatIndent3(&gNB->tinput,"DLSCH LDPC input processing time");
|
||||
|
||||
@@ -565,14 +565,15 @@ int main(int argc, char **argv)
|
||||
|
||||
nr_gold_pbch(UE);
|
||||
|
||||
processingData_L1tx_t msgDataTx;
|
||||
// generate signal
|
||||
if (input_fd==NULL) {
|
||||
|
||||
for (i=0; i<frame_parms->Lmax; i++) {
|
||||
if((SSB_positions >> i) & 0x01) {
|
||||
|
||||
gNB->ssb[i].ssb_pdu.ssb_pdu_rel15.bchPayload = 0x55dd33;
|
||||
gNB->ssb[i].ssb_pdu.ssb_pdu_rel15.SsbBlockIndex = i;
|
||||
msgDataTx.ssb[i].ssb_pdu.ssb_pdu_rel15.bchPayload = 0x55dd33;
|
||||
msgDataTx.ssb[i].ssb_pdu.ssb_pdu_rel15.SsbBlockIndex = i;
|
||||
|
||||
start_symbol = nr_get_ssb_start_symbol(frame_parms,i);
|
||||
int slot = start_symbol/14;
|
||||
@@ -580,7 +581,7 @@ int main(int argc, char **argv)
|
||||
for (aa=0; aa<gNB->frame_parms.nb_antennas_tx; aa++)
|
||||
memset(gNB->common_vars.txdataF[aa],0,frame_parms->samples_per_slot_wCP*sizeof(int32_t));
|
||||
|
||||
nr_common_signal_procedures (gNB,frame,slot,gNB->ssb[i].ssb_pdu);
|
||||
nr_common_signal_procedures (gNB,frame,slot,msgDataTx.ssb[i].ssb_pdu);
|
||||
|
||||
for (aa=0; aa<gNB->frame_parms.nb_antennas_tx; aa++) {
|
||||
if (cyclic_prefix_type == 1) {
|
||||
@@ -750,7 +751,7 @@ int main(int argc, char **argv)
|
||||
|
||||
payload_ret = (UE->pbch_vars[0]->xtra_byte == gNB_xtra_byte);
|
||||
for (i=0;i<3;i++){
|
||||
payload_ret += (UE->pbch_vars[0]->decoded_output[i] == ((gNB->ssb[ssb_index].ssb_pdu.ssb_pdu_rel15.bchPayload>>(8*i)) & 0xff));
|
||||
payload_ret += (UE->pbch_vars[0]->decoded_output[i] == ((msgDataTx.ssb[ssb_index].ssb_pdu.ssb_pdu_rel15.bchPayload>>(8*i)) & 0xff));
|
||||
}
|
||||
//printf("xtra byte gNB: 0x%02x UE: 0x%02x\n",gNB_xtra_byte, UE->pbch_vars[0]->xtra_byte);
|
||||
//printf("ret %d\n", payload_ret);
|
||||
|
||||
@@ -665,6 +665,13 @@ int main(int argc, char **argv)
|
||||
char tp_param[] = "n";
|
||||
initTpool(tp_param, gNB->threadPool, false);
|
||||
initNotifiedFIFO(gNB->respDecode);
|
||||
gNB->resp_L1_tx = (notifiedFIFO_t*) malloc(sizeof(notifiedFIFO_t));
|
||||
initNotifiedFIFO(gNB->resp_L1_tx);
|
||||
notifiedFIFO_elt_t *msgL1Tx = newNotifiedFIFO_elt(sizeof(processingData_L1tx_t),0,gNB->resp_L1_tx,NULL);
|
||||
processingData_L1tx_t *msgDataTx = (processingData_L1tx_t *)NotifiedFifoData(msgL1Tx);
|
||||
msgDataTx->slot = -1;
|
||||
gNB->phy_proc_tx_0 = &msgDataTx->phy_proc_tx;
|
||||
pushNotifiedFIFO(gNB->resp_L1_tx,msgL1Tx); // to unblock the process in the beginning
|
||||
//gNB_config = &gNB->gNB_config;
|
||||
|
||||
//memset((void *)&gNB->UL_INFO,0,sizeof(gNB->UL_INFO));
|
||||
|
||||
Reference in New Issue
Block a user