Commit 0de2c468 authored by lfq's avatar lfq

dl is ok with rfsim

parent d682c173
......@@ -393,7 +393,7 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB,
LOG_D(PHY,"%02x\n",a[i]);
LOG_D(PHY,"\n");
*/
log_dump(PHY, a, 8, LOG_DUMP_CHAR,"gNB pdsch tx frame %d %d: ", frame, slot);
if (A > 3824) {
// Add 24-bit crc (polynomial A) to payload
crc = crc24a(a,A)>>8;
......
......@@ -748,7 +748,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
#endif
}
log_dump(PHY, harq_process->b, 8, LOG_DUMP_CHAR,"nrue pdsch rx frame %d %d: ", frame, nr_tti_rx );
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_COMBINE_SEG, VCD_FUNCTION_OUT);
dlsch->last_iteration_cnt = ret;
......
......@@ -433,7 +433,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
if (beamforming_mode==0){
if (dlsch0_harq->mimo_mode<NR_DUALSTREAM) {
write_output("ch_estext_first.m","ch_estext",&pdsch_vars[eNB_id]->dl_ch_estimates_ext[0][1*16*12],5*16*12,1,13);
//write_output("ch_estext_first.m","ch_estext",&pdsch_vars[eNB_id]->dl_ch_estimates_ext[0][1*16*12],5*16*12,1,13);
nr_dlsch_channel_level(pdsch_vars[eNB_id]->dl_ch_estimates_ext,
frame_parms,
avg,
......
......@@ -1752,7 +1752,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
if (dci_cnt > 0) {
LOG_D(PHY,"[UE %d] Frame %d, nr_tti_rx %d: found %d DCIs\n", ue->Mod_id, frame_rx, nr_tti_rx, dci_cnt);
LOG_I(PHY,"[UE %d] Frame %d, nr_tti_rx %d: found %d DCIs\n", ue->Mod_id, frame_rx, nr_tti_rx, dci_cnt);
NR_UE_DLSCH_t *dlsch = NULL;
if (ue->dlsch[ue->current_thread_id[nr_tti_rx]][gNB_id][0]->active == 1){
......
......@@ -287,7 +287,7 @@ void ue_dci_configuration(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_request_t *dl
if (ss->searchSpaceType->choice.ue_Specific){
if(ss->searchSpaceType->choice.ue_Specific->dci_Formats == NR_SearchSpace__searchSpaceType__ue_Specific__dci_Formats_formats0_1_And_1_1){
// Monitors DCI 01 and 11 scrambled with C-RNTI, or CS-RNTI(s), or SP-CSI-RNTI
if (get_softmodem_params()->phy_test == 1 && mac->crnti > 0) {
if (mac->ra_state == RA_SUCCEEDED && mac->crnti > 0) {
LOG_D(MAC, "[DCI_CONFIG] Configure monitoring of PDCCH candidates in the user specific search space\n");
rel15->num_dci_options = 2;
rel15->dci_format_options[0] = NR_DL_DCI_FORMAT_1_1;
......@@ -326,5 +326,46 @@ void ue_dci_configuration(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_request_t *dl
AssertFatal(1 == 0, "[DCI_CONFIG] Unrecognized search space type...");
break;
}
if (dl_config->number_pdus > 0)
{
#if 0 // LOG_PDCCH_PARAMES
static int log_first = 0;
if(log_first == 0)
{
//log_first =1;
LOG_I(MAC, "UE PDCCH PARAMS: frame %d %d, pdus %d, rnti %d, BWPSize %d, BWPStart %d, SubcarrierSpacing %d, CCE %d %d %d %d, L %d dci_length %d / %d, dci_format %d / %d, canditats %d\n",
frame,
slot,dl_config->number_pdus,
rel15->rnti,
rel15->BWPSize,
rel15->BWPStart,
rel15->SubcarrierSpacing,
rel15->CCE[0],rel15->CCE[1],rel15->CCE[2],rel15->CCE[3],
rel15->L[0],
rel15->dci_length_options[0],rel15->dci_length_options[1],
rel15->dci_format_options[0], rel15->dci_format_options[1],
rel15->number_of_candidates);
LOG_I(MAC, "UE PDCCH PARAMS: coreset:frequency_domain_resource %d %d %d %d %d %d\n", rel15->coreset.frequency_domain_resource[0],
rel15->coreset.frequency_domain_resource[1],
rel15->coreset.frequency_domain_resource[2],
rel15->coreset.frequency_domain_resource[3],
rel15->coreset.frequency_domain_resource[4],
rel15->coreset.frequency_domain_resource[5]);
LOG_I(MAC, "UE PDCCH PARAMS: coreset:StartSymbolIndex %d duration %d CceRegMappingType %d RegBundleSize %d InterleaverSize %d ShiftIndex %d CoreSetType %d precoder_granularity %d, pdcch_dmrs_scrambling_id %d, scrambling_rnti %d\n",
rel15->coreset.StartSymbolIndex,
rel15->coreset.duration,
rel15->coreset.CceRegMappingType,
rel15->coreset.RegBundleSize,
rel15->coreset.InterleaverSize,
rel15->coreset.ShiftIndex,
rel15->coreset.CoreSetType,
rel15->coreset.precoder_granularity,
rel15->coreset.pdcch_dmrs_scrambling_id,
rel15->coreset.scrambling_rnti);
}
#endif
}
}
}
......@@ -499,6 +499,7 @@ void nr_simple_dlsch_preprocessor(module_id_t module_id,
lcid,
0,
0);
sched_ctrl->rlc_status[lcid].bytes_in_buffer = 500;
LOG_I(MAC,
"%d.%d, DTCH%d->DLSCH, RLC status %d bytes\n",
frame,
......@@ -750,6 +751,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
unsigned char sdu_lcids[NB_RB_MAX] = {0};
const int lcid = DL_SCH_LCID_DTCH;
if (sched_ctrl->num_total_bytes > 0) {
#if 0
LOG_D(MAC,
"[gNB %d][USER-PLANE DEFAULT DRB] Frame %d : DTCH->DLSCH, Requesting "
"%d bytes from RLC (lcid %d total hdr len %d), TBS: %d \n \n",
......@@ -784,6 +786,18 @@ void nr_schedule_ue_spec(module_id_t module_id,
header_length_total += header_length_last;
num_sdus++;
#else
LOG_D(MAC, "Configuring DL_TX in %d.%d: random data\n", frame, slot);
// fill dlsch_buffer with random data
for (int i = 0; i < TBS; i++)
mac_sdus[i] = (unsigned char) (lrand48()&0xff);
sdu_lcids[0] = 0x3f; // DRB
sdu_lengths[0] = TBS - ta_len - 3;
header_length_total += 2 + (sdu_lengths[0] >= 128);
sdu_length_total += sdu_lengths[0];
num_sdus +=1;
#endif
//ue_sched_ctl->uplane_inactivity_timer = 0;
}
......
......@@ -642,6 +642,84 @@ void nr_fill_nfapi_dl_pdu(int Mod_idP,
TBS);
dl_req->nPDUs += 2;
#if 1 // LOG_PDCCH_PARAMES
static int log_first = 0;
if(log_first == 0)
{
//log_first =1;
LOG_I(MAC, "NB PDCCH PARAMS: rnti %d, BWPSize %d, BWPStart %d, SubcarrierSpacing %d, CCE %d, L %d dci_length %d dci_format %d dci index %d\n",
pdcch_pdu_rel15->dci_pdu.RNTI[0],
pdcch_pdu_rel15->BWPSize,
pdcch_pdu_rel15->BWPStart,
pdcch_pdu_rel15->SubcarrierSpacing,
pdcch_pdu_rel15->dci_pdu.CceIndex[pdcch_pdu_rel15->numDlDci-1],
pdcch_pdu_rel15->dci_pdu.AggregationLevel[pdcch_pdu_rel15->numDlDci-1],
pdcch_pdu_rel15->dci_pdu.PayloadSizeBits[pdcch_pdu_rel15->numDlDci-1],
dci_formats[0], pdcch_pdu_rel15->numDlDci-1);
LOG_I(MAC, "NB PDCCH PARAMS: coreset:frequency_domain_resource %d %d %d %d %d %d\n", pdcch_pdu_rel15->FreqDomainResource[0],
pdcch_pdu_rel15->FreqDomainResource[1],
pdcch_pdu_rel15->FreqDomainResource[2],
pdcch_pdu_rel15->FreqDomainResource[3],
pdcch_pdu_rel15->FreqDomainResource[4],
pdcch_pdu_rel15->FreqDomainResource[5]);
LOG_I(MAC, "NB PDCCH PARAMS: coreset:StartSymbolIndex %d duration %d CceRegMappingType %d RegBundleSize %d InterleaverSize %d ShiftIndex %d CoreSetType %d precoder_granularity %d, pdcch_dmrs_scrambling_id %d,scrambling_rnti %d\n",
pdcch_pdu_rel15->StartSymbolIndex,
pdcch_pdu_rel15->DurationSymbols,
pdcch_pdu_rel15->CceRegMappingType,
pdcch_pdu_rel15->RegBundleSize,
pdcch_pdu_rel15->InterleaverSize,
pdcch_pdu_rel15->ShiftIndex,
pdcch_pdu_rel15->CoreSetType,
pdcch_pdu_rel15->precoderGranularity,
pdcch_pdu_rel15->dci_pdu.ScramblingId[0],
pdcch_pdu_rel15->dci_pdu.ScramblingRNTI[0]);
}
#endif
#if 1 // LOG_PDSCH_PARAMES
static int log_first_pdsch = 0;
if (log_first_pdsch == 0)
{
//log_first_pdsch = 1;
LOG_I(MAC, "NB PDSCH PARAMS: rnti %d, bwp (%d, %d), scs %d, codewords %d, coderate %d, mod %d, mcs (%d, %d), rv %d, dataScramId %d, layers %d, tm %d, refPoint %d \n ",
pdsch_pdu_rel15->rnti,
pdsch_pdu_rel15->BWPSize,
pdsch_pdu_rel15->BWPStart,
pdsch_pdu_rel15->SubcarrierSpacing,
pdsch_pdu_rel15->NrOfCodewords,
pdsch_pdu_rel15->targetCodeRate[0],
pdsch_pdu_rel15->qamModOrder[0],
pdsch_pdu_rel15->mcsIndex[0],
pdsch_pdu_rel15->mcsTable[0],
pdsch_pdu_rel15->rvIndex[0],
pdsch_pdu_rel15->dataScramblingId,
pdsch_pdu_rel15->nrOfLayers,
pdsch_pdu_rel15->transmissionScheme,
pdsch_pdu_rel15->refPoint
);
LOG_I(MAC, "NB PDSCH PARAMS: dlDmrsScramblingId %d, scid %d, numDmrsCdmGrpsNoData %d, dmrsPorts %d, resourceAlloc %d, rb (%d, %d), symb (%d, %d), dmrsType %d, dmrsPos %d, vrb2prb %d\n",
pdsch_pdu_rel15->dlDmrsScramblingId,
pdsch_pdu_rel15->SCID,
pdsch_pdu_rel15->numDmrsCdmGrpsNoData,
pdsch_pdu_rel15->dmrsPorts,
pdsch_pdu_rel15->resourceAlloc,
pdsch_pdu_rel15->rbStart,
pdsch_pdu_rel15->rbSize,
pdsch_pdu_rel15->StartSymbolIndex,
pdsch_pdu_rel15->NrOfSymbols,
pdsch_pdu_rel15->dmrsConfigType,
pdsch_pdu_rel15->dlDmrsSymbPos,
pdsch_pdu_rel15->VRBtoPRBMapping
);
}
#endif
}
void nr_configure_pdcch(gNB_MAC_INST *nr_mac,
......
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