merge develop and fix one double free bug in nr_dlschsim
This commit is contained in:
@@ -618,7 +618,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
}*/
|
||||
|
||||
free(test_input);
|
||||
//free(test_input); it must not be free as it is in DLSCH_struct -> free_gNB_dlsch () -> free(harq->pdu) with no checks or control
|
||||
|
||||
free_channel_desc_scm(gNB2UE);
|
||||
|
||||
|
||||
@@ -961,10 +961,10 @@ int main(int argc, char **argv)
|
||||
nr_gold_pdcch(UE, frame_parms->Nid_cell);
|
||||
|
||||
// compute the scrambling IDs for PDSCH DMRS
|
||||
for (int i = 0; i < 2; i++)
|
||||
UE->scramblingID[i] = frame_parms->Nid_cell;
|
||||
|
||||
nr_gold_pdsch(UE, UE->scramblingID);
|
||||
for (int i = 0; i < 2; i++) {
|
||||
UE->scramblingID_dlsch[i] = frame_parms->Nid_cell;
|
||||
nr_gold_pdsch(UE, i, UE->scramblingID_dlsch[i]);
|
||||
}
|
||||
|
||||
nr_l2_init_ue(NULL);
|
||||
UE_mac = get_mac_inst(0);
|
||||
@@ -1003,6 +1003,8 @@ int main(int argc, char **argv)
|
||||
|
||||
nr_dcireq_t dcireq;
|
||||
nr_scheduled_response_t scheduled_response;
|
||||
NR_UE_PDCCH_CONFIG phy_pdcch_config={0};
|
||||
|
||||
memset((void*)&dcireq,0,sizeof(dcireq));
|
||||
memset((void*)&scheduled_response,0,sizeof(scheduled_response));
|
||||
dcireq.module_id = 0;
|
||||
@@ -1017,6 +1019,7 @@ int main(int argc, char **argv)
|
||||
scheduled_response.frame = frame;
|
||||
scheduled_response.slot = slot;
|
||||
scheduled_response.thread_id = 0;
|
||||
scheduled_response.phy_data = &phy_pdcch_config;
|
||||
|
||||
nr_ue_phy_config_request(&UE_mac->phy_config);
|
||||
//NR_COMMON_channels_t *cc = RC.nrmac[0]->common_channels;
|
||||
@@ -1259,6 +1262,7 @@ int main(int argc, char **argv)
|
||||
&UE_proc,
|
||||
0,
|
||||
dlsch_threads,
|
||||
&phy_pdcch_config,
|
||||
NULL);
|
||||
|
||||
//printf("dlsim round %d ends\n",round);
|
||||
@@ -1407,8 +1411,6 @@ int main(int argc, char **argv)
|
||||
LOG_M("chestF0.m","chF0",&UE->pdsch_vars[0][0]->dl_ch_estimates_ext[0][0],g_rbSize*12*14,1,1);
|
||||
write_output("rxF_comp.m","rxFc",&UE->pdsch_vars[0][0]->rxdataF_comp0[0][0],N_RB_DL*12*14,1,1);
|
||||
LOG_M("rxF_llr.m","rxFllr",UE->pdsch_vars[UE_proc.thread_id][0]->llr[0],available_bits,1,0);
|
||||
LOG_M("pdcch_rxFcomp.m","pdcch_rxFcomp",&UE->pdcch_vars[0][0]->rxdataF_comp[0][0],96*12,1,1);
|
||||
LOG_M("pdcch_rxFllr.m","pdcch_rxFllr",UE->pdcch_vars[0][0]->llr,96*12,1,1);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,8 @@ void nr_fill_dl_indication(nr_downlink_indication_t *dl_ind,
|
||||
fapi_nr_rx_indication_t *rx_ind,
|
||||
UE_nr_rxtx_proc_t *proc,
|
||||
PHY_VARS_NR_UE *ue,
|
||||
uint8_t gNB_id) {}
|
||||
uint8_t gNB_id,
|
||||
void *phy_data) {}
|
||||
void nr_fill_rx_indication(fapi_nr_rx_indication_t *rx_ind,
|
||||
uint8_t pdu_type,
|
||||
uint8_t gNB_id,
|
||||
|
||||
@@ -74,7 +74,10 @@ void init_downlink_harq_status(NR_DL_UE_HARQ_t *dl_harq) {}
|
||||
int nr_ue_pdcch_procedures(uint8_t gNB_id,
|
||||
PHY_VARS_NR_UE *ue,
|
||||
UE_nr_rxtx_proc_t *proc,
|
||||
int n_ss) {
|
||||
int32_t pdcch_est_size,
|
||||
int32_t pdcch_dl_ch_estimates[][pdcch_est_size],
|
||||
NR_UE_PDCCH_CONFIG *phy_pdcch_config,
|
||||
int n_ss) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -722,6 +725,8 @@ int main(int argc, char **argv)
|
||||
}
|
||||
else {
|
||||
UE_nr_rxtx_proc_t proc={0};
|
||||
NR_UE_PDCCH_CONFIG phy_pdcch_config={0};
|
||||
|
||||
UE->rx_offset=0;
|
||||
uint8_t ssb_index = 0;
|
||||
const int estimateSz=7*2*sizeof(int)*frame_parms->ofdm_symbol_size;
|
||||
@@ -750,7 +755,8 @@ int main(int argc, char **argv)
|
||||
0,
|
||||
ssb_index%8,
|
||||
SISO,
|
||||
&result);
|
||||
&phy_pdcch_config,
|
||||
&result);
|
||||
|
||||
if (ret==0) {
|
||||
//UE->rx_ind.rx_indication_body->mib_pdu.ssb_index; //not yet detected automatically
|
||||
|
||||
@@ -782,10 +782,10 @@ int main(int argc, char **argv)
|
||||
|
||||
init_nr_ue_transport(UE);
|
||||
|
||||
// initialize the pusch dmrs
|
||||
uint16_t N_n_scid[2] = {frame_parms->Nid_cell,frame_parms->Nid_cell};
|
||||
int n_scid = 0; // This quantity is indicated by higher layer parameter dmrs-SeqInitialization
|
||||
nr_init_pusch_dmrs(UE, N_n_scid, n_scid);
|
||||
for(int n_scid = 0; n_scid<2; n_scid++) {
|
||||
UE->scramblingID_ulsch[n_scid] = frame_parms->Nid_cell;
|
||||
nr_init_pusch_dmrs(UE, frame_parms->Nid_cell, n_scid);
|
||||
}
|
||||
|
||||
//Configure UE
|
||||
NR_UE_RRC_INST_t rrcue;
|
||||
|
||||
Reference in New Issue
Block a user