PBCH working
This commit is contained in:
@@ -478,7 +478,7 @@ void nr_phy_config_request(NR_PHY_Config_t *phy_config) {
|
||||
uint64_t ul_bw_khz = (12*gNB_config->carrier_config.ul_grid_size[gNB_config->ssb_config.scs_common.value].value)*(15<<gNB_config->ssb_config.scs_common.value);
|
||||
fp->ul_CarrierFreq = ((ul_bw_khz>>1) + gNB_config->carrier_config.uplink_frequency.value)*1000 ;
|
||||
|
||||
printf("\n%d\t%d\t%d\n", fp->ul_CarrierFreq, fp->dl_CarrierFreq, dlul_offset );
|
||||
//printf("\n%d\t%d\t%d\n", fp->ul_CarrierFreq, fp->dl_CarrierFreq, dlul_offset );
|
||||
AssertFatal(fp->ul_CarrierFreq==(fp->dl_CarrierFreq+dlul_offset), "Disagreement in uplink frequency for band %d\n", fp->nr_band);
|
||||
|
||||
fp->threequarter_fs = openair0_cfg[0].threequarter_fs;
|
||||
|
||||
@@ -333,180 +333,7 @@ uint8_t nr_generate_dci_top(PHY_VARS_gNB *gNB,
|
||||
} // for (int d=0;d<pdcch_pdu_rel15->numDlDci;d++)
|
||||
return 0;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
uint8_t nr_generate_dci_top(nfapi_nr_dl_tti_pdcch_pdu *pdcch_pdu,
|
||||
nfapi_nr_ul_dci_request_pdus_t *ul_dci_pdu,
|
||||
uint32_t **gold_pdcch_dmrs,
|
||||
int32_t *txdataF,
|
||||
int16_t amp,
|
||||
NR_DL_FRAME_PARMS frame_parms) {
|
||||
|
||||
int16_t mod_dmrs[NR_MAX_CSET_DURATION][NR_MAX_PDCCH_DMRS_LENGTH>>1]; // 3 for the max coreset duration
|
||||
uint16_t cset_start_sc;
|
||||
uint8_t cset_start_symb, cset_nsymb;
|
||||
int k,l,k_prime,dci_idx, dmrs_idx;
|
||||
/*First iteration: single DCI*/
|
||||
|
||||
nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_pdu_rel15=NULL;
|
||||
nfapi_nr_dl_tti_pdcch_pdu_rel15_t *temp;
|
||||
temp = (nfapi_nr_dl_tti_pdcch_pdu_rel15_t *)malloc(sizeof(nfapi_nr_dl_tti_pdcch_pdu_rel15_t));
|
||||
int s = sizeof(nfapi_nr_dl_tti_pdcch_pdu_rel15_t);
|
||||
|
||||
// find coreset descriptor
|
||||
|
||||
int rb_offset;
|
||||
int n_rb;
|
||||
|
||||
AssertFatal(pdcch_pdu!=NULL || ul_dci_pdu!=NULL,"At least one pointer has to be !NULL\n");
|
||||
AssertFatal(pdcch_pdu==NULL || ul_dci_pdu==NULL,"Can't handle both DL and UL DCI in same slot\n");
|
||||
|
||||
|
||||
if (pdcch_pdu) pdcch_pdu_rel15 = &pdcch_pdu->pdcch_pdu_rel15;
|
||||
else if (ul_dci_pdu) pdcch_pdu_rel15 = &ul_dci_pdu->pdcch_pdu.pdcch_pdu_rel15;
|
||||
|
||||
get_coreset_rballoc(pdcch_pdu_rel15->FreqDomainResource,&n_rb,&rb_offset);
|
||||
|
||||
// compute rb_offset and n_prb based on frequency allocation
|
||||
|
||||
if (pdcch_pdu_rel15->CoreSetType == NFAPI_NR_CSET_CONFIG_MIB_SIB1) {
|
||||
cset_start_sc = frame_parms.first_carrier_offset + (frame_parms.ssb_start_subcarrier/NR_NB_SC_PER_RB +
|
||||
rb_offset)*NR_NB_SC_PER_RB;
|
||||
} else
|
||||
cset_start_sc = frame_parms.first_carrier_offset + rb_offset*NR_NB_SC_PER_RB;
|
||||
|
||||
memcpy(temp, pdcch_pdu_rel15,sizeof(nfapi_nr_dl_tti_pdcch_pdu_rel15_t));
|
||||
for (volatile int d=0;d < temp->numDlDci;d++) {
|
||||
/*The coreset is initialised
|
||||
* in frequency: the first subcarrier is obtained by adding the first CRB overlapping the SSB and the rb_offset for coreset 0
|
||||
* or the rb_offset for other coresets
|
||||
* in time: by its first slot and its first symbol*/
|
||||
|
||||
cset_start_symb = temp->StartSymbolIndex;
|
||||
cset_nsymb = temp->DurationSymbols;
|
||||
dci_idx = 0;
|
||||
LOG_D(PHY, "Coreset rb_offset %d, nb_rb %d\n",rb_offset,n_rb);
|
||||
LOG_D(PHY, "Coreset starting subcarrier %d on symbol %d (%d symbols)\n", cset_start_sc, cset_start_symb, cset_nsymb);
|
||||
// DMRS length is per OFDM symbol
|
||||
AssertFatal(temp->CceRegMappingType == NFAPI_NR_CCE_REG_MAPPING_NON_INTERLEAVED,
|
||||
"Interleaved CCE REG MAPPING not supported\n");
|
||||
uint32_t dmrs_length = (temp->CceRegMappingType == NFAPI_NR_CCE_REG_MAPPING_NON_INTERLEAVED)?
|
||||
(n_rb*6) : (temp->AggregationLevel[d]*36/cset_nsymb); //2(QPSK)*3(per RB)*6(REG per CCE)
|
||||
uint32_t encoded_length = temp->AggregationLevel[d]*108; //2(QPSK)*9(per RB)*6(REG per CCE)
|
||||
LOG_D(PHY, "DMRS length per symbol %d\t DCI encoded length %d (precoder_granularity %d,reg_mapping %d)\n", dmrs_length, encoded_length,temp->precoderGranularity,temp->CceRegMappingType);
|
||||
dmrs_length += rb_offset*6; // To accommodate more DMRS symbols in case of rb offset
|
||||
|
||||
/// DMRS QPSK modulation
|
||||
for (int symb=cset_start_symb; symb<cset_start_symb + temp->DurationSymbols; symb++) {
|
||||
|
||||
nr_modulation(gold_pdcch_dmrs[symb], dmrs_length, DMRS_MOD_ORDER, mod_dmrs[symb]); //Qm = 2 as DMRS is QPSK modulated
|
||||
|
||||
#ifdef DEBUG_PDCCH_DMRS
|
||||
|
||||
for (int i=0; i<dmrs_length>>1; i++)
|
||||
printf("symb %d i %d gold seq 0x%08x mod_dmrs %d %d\n", symb, i,
|
||||
gold_pdcch_dmrs[symb][i>>5], mod_dmrs[symb][i<<1], mod_dmrs[symb][(i<<1)+1] );
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
/// DCI payload processing
|
||||
// CRC attachment + Scrambling + Channel coding + Rate matching
|
||||
uint32_t encoder_output[NR_MAX_DCI_SIZE_DWORD];
|
||||
uint16_t n_RNTI = temp->RNTI[d];
|
||||
uint16_t Nid = temp->ScramblingId[d];
|
||||
|
||||
t_nrPolar_params *currentPtr = nr_polar_params(NR_POLAR_DCI_MESSAGE_TYPE,
|
||||
temp->PayloadSizeBits[d],
|
||||
temp->AggregationLevel[d],
|
||||
0,NULL);
|
||||
polar_encoder_fast((uint64_t*)temp->Payload[d], encoder_output, n_RNTI,1,currentPtr);
|
||||
#ifdef DEBUG_CHANNEL_CODING
|
||||
printf("polar rnti %x,length %d, L %d\n",n_RNTI, temp->PayloadSizeBits[d],temp->AggregationLevel[d]);
|
||||
printf("DCI PDU: [0]->0x%lx \t [1]->0x%lx\n",
|
||||
((uint64_t*)temp->Payload[d])[0], ((uint64_t*)temp->Payload[d])[1]);
|
||||
printf("Encoded Payload (length:%d dwords):\n", encoded_length>>5);
|
||||
|
||||
for (int i=0; i<encoded_length>>5; i++)
|
||||
printf("[%d]->0x%08x \t", i,encoder_output[i]);
|
||||
|
||||
printf("\n");
|
||||
#endif
|
||||
/// Scrambling
|
||||
uint32_t scrambled_output[NR_MAX_DCI_SIZE_DWORD]= {0};
|
||||
nr_pdcch_scrambling(encoder_output, encoded_length, Nid, n_RNTI, scrambled_output);
|
||||
#ifdef DEBUG_CHANNEL_CODING
|
||||
printf("scrambled output: [0]->0x%08x \t [1]->0x%08x \t [2]->0x%08x \t [3]->0x%08x\t [4]->0x%08x\t [5]->0x%08x\t \
|
||||
[6]->0x%08x \t [7]->0x%08x \t [8]->0x%08x \t [9]->0x%08x\t [10]->0x%08x\t [11]->0x%08x\n",
|
||||
scrambled_output[0], scrambled_output[1], scrambled_output[2], scrambled_output[3], scrambled_output[4],scrambled_output[5],
|
||||
scrambled_output[6], scrambled_output[7], scrambled_output[8], scrambled_output[9], scrambled_output[10],scrambled_output[11] );
|
||||
#endif
|
||||
/// QPSK modulation
|
||||
int16_t mod_dci[NR_MAX_DCI_SIZE>>1];
|
||||
nr_modulation(scrambled_output, encoded_length, DMRS_MOD_ORDER, mod_dci); //Qm = 2 as DMRS is QPSK modulated
|
||||
#ifdef DEBUG_DCI
|
||||
|
||||
for (int i=0; i<encoded_length>>1; i++)
|
||||
printf("i %d mod_dci %d %d\n", i, mod_dci[i<<1], mod_dci[(i<<1)+1] );
|
||||
|
||||
#endif
|
||||
|
||||
/// Resource mapping
|
||||
|
||||
if (cset_start_sc >= frame_parms.ofdm_symbol_size)
|
||||
cset_start_sc -= frame_parms.ofdm_symbol_size;
|
||||
|
||||
/*Reorder REG list for a freq first mapping*/
|
||||
uint8_t nb_regs = temp->AggregationLevel[d]*NR_NB_REG_PER_CCE;
|
||||
uint8_t reg_idx0 = temp->CceIndex[d]*NR_NB_REG_PER_CCE;
|
||||
|
||||
/*Mapping the encoded DCI along with the DMRS */
|
||||
for (int reg_idx=reg_idx0; reg_idx<(nb_regs+reg_idx0); reg_idx++) {
|
||||
k = cset_start_sc + (12*reg_idx/cset_nsymb);
|
||||
|
||||
if (k >= frame_parms.ofdm_symbol_size)
|
||||
k -= frame_parms.ofdm_symbol_size;
|
||||
|
||||
l = cset_start_symb + ((reg_idx/cset_nsymb)%cset_nsymb);
|
||||
|
||||
// dmrs index depends on reference point for k according to 38.211 7.4.1.3.2
|
||||
if (temp->CoreSetType == NFAPI_NR_CSET_CONFIG_PDCCH_CONFIG)
|
||||
dmrs_idx = (reg_idx/cset_nsymb)*3;
|
||||
else
|
||||
dmrs_idx = ((reg_idx/cset_nsymb)+rb_offset)*3;
|
||||
|
||||
k_prime = 0;
|
||||
|
||||
for (int m=0; m<NR_NB_SC_PER_RB; m++) {
|
||||
if ( m == (k_prime<<2)+1) { // DMRS if not already mapped
|
||||
if (temp->CceRegMappingType == NFAPI_NR_CCE_REG_MAPPING_NON_INTERLEAVED) {
|
||||
((int16_t *)txdataF)[(l*frame_parms.ofdm_symbol_size + k)<<1] = (2*amp * mod_dmrs[l][dmrs_idx<<1]) >> 15;
|
||||
((int16_t *)txdataF)[((l*frame_parms.ofdm_symbol_size + k)<<1) + 1] = (2*amp * mod_dmrs[l][(dmrs_idx<<1) + 1]) >> 15;
|
||||
#ifdef DEBUG_PDCCH_DMRS
|
||||
printf("PDCCH DMRS: l %d position %d => (%d,%d)\n",l,k,((int16_t *)txdataF)[(l*frame_parms.ofdm_symbol_size + k)<<1],
|
||||
((int16_t *)txdataF)[((l*frame_parms.ofdm_symbol_size + k)<<1)+1]);
|
||||
#endif
|
||||
dmrs_idx++;
|
||||
}
|
||||
|
||||
k_prime++;
|
||||
} else { // DCI payload
|
||||
((int16_t *)txdataF)[(l*frame_parms.ofdm_symbol_size + k)<<1] = (amp * mod_dci[dci_idx<<1]) >> 15;
|
||||
((int16_t *)txdataF)[((l*frame_parms.ofdm_symbol_size + k)<<1) + 1] = (amp * mod_dci[(dci_idx<<1) + 1]) >> 15;
|
||||
#ifdef DEBUG_DCI
|
||||
printf("PDCCH: l %d position %d => (%d,%d)\n",l,k,((int16_t *)txdataF)[(l*frame_parms.ofdm_symbol_size + k)<<1],
|
||||
((int16_t *)txdataF)[((l*frame_parms.ofdm_symbol_size + k)<<1)+1]);
|
||||
#endif
|
||||
dci_idx++;
|
||||
}
|
||||
|
||||
k++;
|
||||
|
||||
if (k >= frame_parms.ofdm_symbol_size)
|
||||
k -= frame_parms.ofdm_symbol_size;
|
||||
} // m
|
||||
} // reg_idx
|
||||
} // for (int d=0;d<temp->numDlDci;d++)
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -203,7 +203,8 @@ void nr_fill_cce_list(PHY_VARS_gNB *gNB, uint8_t m, nfapi_nr_dl_tti_pdcch_pdu_r
|
||||
return ret;
|
||||
}*/
|
||||
int16_t find_nr_pdcch(int frame,int slot, PHY_VARS_gNB *gNB,find_type_t type) {
|
||||
|
||||
// if(slot==2)
|
||||
//LOG_I(PHY,"\nFRAME %d SLOT %d gNB pdcch pdu frame %d,slot %d",frame,slot,gNB->pdcch_pdu[0].frame,gNB->pdcch_pdu[0].slot);
|
||||
uint16_t i;
|
||||
int16_t first_free_index=-1;
|
||||
|
||||
@@ -227,11 +228,14 @@ void nr_fill_dci(PHY_VARS_gNB *gNB,
|
||||
|
||||
nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_pdu_rel15 = &pdcch_pdu->pdcch_pdu_rel15;
|
||||
NR_gNB_DLSCH_t *dlsch;
|
||||
|
||||
for(int i=0;i<NUMBER_OF_NR_PDCCH_MAX;i++)
|
||||
{
|
||||
gNB->pdcch_pdu[i].frame=-1;
|
||||
}
|
||||
int pdcch_id = find_nr_pdcch(frame,slot,gNB,SEARCH_EXIST_OR_FREE);
|
||||
AssertFatal(pdcch_id>=0 && pdcch_id<NUMBER_OF_NR_PDCCH_MAX,"Cannot find space for PDCCH, exiting\n");
|
||||
memcpy((void*)&gNB->pdcch_pdu[pdcch_id].pdcch_pdu,(void*)pdcch_pdu,sizeof(*pdcch_pdu));
|
||||
gNB->pdcch_pdu[pdcch_id].frame = frame;
|
||||
gNB->pdcch_pdu[pdcch_id].frame = frame+2;
|
||||
gNB->pdcch_pdu[pdcch_id].slot = slot;
|
||||
|
||||
for (int i=0;i<pdcch_pdu_rel15->numDlDci;i++) {
|
||||
|
||||
@@ -285,7 +285,7 @@ void nr_fill_dlsch(PHY_VARS_gNB *gNB,
|
||||
|
||||
nfapi_nr_dl_tti_pdsch_pdu_rel15_t *rel15 = &pdsch_pdu->pdsch_pdu_rel15;
|
||||
|
||||
int dlsch_id = find_nr_dlsch(rel15->rnti,gNB,SEARCH_EXIST);
|
||||
int dlsch_id = find_nr_dlsch(pdsch_pdu->pdsch_pdu_rel15.rnti,gNB,SEARCH_EXIST);
|
||||
AssertFatal( (dlsch_id>=0) && (dlsch_id<NUMBER_OF_NR_DLSCH_MAX),
|
||||
"illegal or no dlsch_id found!!! rnti %04x dlsch_id %d\n",rel15->rnti,dlsch_id);
|
||||
NR_gNB_DLSCH_t *dlsch = gNB->dlsch[dlsch_id][0];
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
int oai_nfapi_nr_dl_config_req(nfapi_nr_dl_tti_request_t *dl_config_req);
|
||||
int oai_nfapi_tx_data_req(nfapi_nr_tx_data_request_t *tx_data_req);
|
||||
int oai_nfapi_ul_dci_req(nfapi_nr_ul_dci_request_t *ul_dci_req);
|
||||
int oai_nfapi_ul_tti_req(nfapi_nr_ul_tti_request_t *ul_tti_req);
|
||||
|
||||
|
||||
extern uint8_t nfapi_mode;
|
||||
@@ -49,7 +50,7 @@ void handle_nr_nfapi_ssb_pdu(PHY_VARS_gNB *gNB,int frame,int slot,
|
||||
AssertFatal(dl_tti_pdu->ssb_pdu.ssb_pdu_rel15.bchPayloadFlag== 1, "bchPayloadFlat %d != 1\n",
|
||||
dl_tti_pdu->ssb_pdu.ssb_pdu_rel15.bchPayloadFlag);
|
||||
|
||||
LOG_D(PHY,"%d.%d : pbch_pdu: %x\n",frame,slot,dl_tti_pdu->ssb_pdu.ssb_pdu_rel15.bchPayload);
|
||||
LOG_I(PHY,"%d.%d : pbch_pdu: %x\n",frame,slot,dl_tti_pdu->ssb_pdu.ssb_pdu_rel15.bchPayload);
|
||||
memcpy((void*)&gNB->ssb_pdu,&dl_tti_pdu->ssb_pdu,sizeof(dl_tti_pdu->ssb_pdu));
|
||||
}
|
||||
|
||||
@@ -142,7 +143,8 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO){
|
||||
frame_t frame = Sched_INFO->frame;
|
||||
sub_frame_t slot = Sched_INFO->slot;
|
||||
|
||||
|
||||
//LOG_I(PHY,"NFAPI: Sched_INFO:SFN/SLOT:%04d/%d\n",frame,slot);
|
||||
|
||||
|
||||
AssertFatal(RC.gNB!=NULL,"RC.gNB is null\n");
|
||||
AssertFatal(RC.gNB[Mod_id]!=NULL,"RC.gNB[%d] is null\n",Mod_id);
|
||||
@@ -171,7 +173,7 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO){
|
||||
gNB->pbch_configured=0;
|
||||
|
||||
for (int i=0;i<number_dl_pdu;i++) {
|
||||
nfapi_nr_dl_tti_request_pdu_t *dl_tti_pdu = &DL_req->dl_tti_pdu_list[i];
|
||||
volatile nfapi_nr_dl_tti_request_pdu_t *dl_tti_pdu = &DL_req->dl_tti_pdu_list[i];
|
||||
LOG_D(PHY,"NFAPI: dl_pdu %d : type %d\n",i,dl_tti_pdu->PDUType);
|
||||
switch (dl_tti_pdu->PDUType) {
|
||||
case NFAPI_NR_DL_TTI_SSB_PDU_TYPE:
|
||||
@@ -208,31 +210,53 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO){
|
||||
}
|
||||
|
||||
// if (UL_tti_req!=NULL) memcpy(&gNB->UL_tti_req,UL_tti_req,sizeof(nfapi_nr_ul_tti_request_t));
|
||||
|
||||
if(nfapi_mode != 2)
|
||||
for (int i=0;i<number_ul_dci_pdu;i++) {
|
||||
if(nfapi_mode != 2)
|
||||
for (int i=0;i<number_ul_dci_pdu;i++) {
|
||||
handle_nfapi_nr_ul_dci_pdu(gNB, frame, slot, &UL_dci_req->ul_dci_pdu_list[i]);
|
||||
}
|
||||
if (nfapi_mode != 0 )
|
||||
{
|
||||
if (Sched_INFO->TX_req->Number_of_PDUs > 0)
|
||||
{
|
||||
Sched_INFO->TX_req->SFN = frame;
|
||||
Sched_INFO->TX_req->Slot = slot;
|
||||
oai_nfapi_tx_data_req(Sched_INFO->TX_req);
|
||||
|
||||
if(nfapi_mode != 2)
|
||||
for (int i = 0; i < number_ul_tti_pdu; i++) {
|
||||
switch (UL_tti_req->pdus_list[i].pdu_type) {
|
||||
case NFAPI_NR_UL_CONFIG_PUSCH_PDU_TYPE:
|
||||
LOG_D(PHY,"frame %d, slot %d, Got NFAPI_NR_UL_TTI_PUSCH_PDU_TYPE for %d.%d\n", frame, slot, UL_tti_req->SFN, UL_tti_req->Slot);
|
||||
nr_fill_ulsch(gNB,UL_tti_req->SFN, UL_tti_req->Slot, &UL_tti_req->pdus_list[i].pusch_pdu);
|
||||
break;
|
||||
case NFAPI_NR_UL_CONFIG_PUCCH_PDU_TYPE:
|
||||
LOG_D(PHY,"frame %d, slot %d, Got NFAPI_NR_UL_TTI_PUCCH_PDU_TYPE for %d.%d\n", frame, slot, UL_tti_req->SFN, UL_tti_req->Slot);
|
||||
nr_fill_pucch(gNB,UL_tti_req->SFN, UL_tti_req->Slot, &UL_tti_req->pdus_list[i].pucch_pdu);
|
||||
break;
|
||||
case NFAPI_NR_UL_CONFIG_PRACH_PDU_TYPE:
|
||||
LOG_D(PHY,"frame %d, slot %d, Got NFAPI_NR_UL_TTI_PRACH_PDU_TYPE for %d.%d\n", frame, slot, UL_tti_req->SFN, UL_tti_req->Slot);
|
||||
nfapi_nr_prach_pdu_t *prach_pdu = &UL_tti_req->pdus_list[i].prach_pdu;
|
||||
nr_fill_prach(gNB, UL_tti_req->SFN, UL_tti_req->Slot, prach_pdu);
|
||||
if (gNB->RU_list[0]->if_south == LOCAL_RF) nr_fill_prach_ru(gNB->RU_list[0], UL_tti_req->SFN, UL_tti_req->Slot, prach_pdu);
|
||||
break;
|
||||
}
|
||||
//if(Sched_INFO->DL_req->nPDUs > 0)
|
||||
{
|
||||
}
|
||||
|
||||
// if(nfapi_mode != 0 && number_ul_tti_pdu>0)
|
||||
// {
|
||||
// oai_nfapi_ul_tti_req(UL_tti_req);
|
||||
// } Test only DL
|
||||
|
||||
|
||||
if (nfapi_mode != 0)
|
||||
{ if(Sched_INFO->DL_req->nPDUs > 0)
|
||||
{
|
||||
Sched_INFO->DL_req->SFN = frame;
|
||||
Sched_INFO->DL_req->Slot = slot;
|
||||
oai_nfapi_nr_dl_config_req(Sched_INFO->DL_req);
|
||||
}
|
||||
if (Sched_INFO->TX_req->Number_of_PDUs > 0)
|
||||
{
|
||||
oai_nfapi_tx_data_req(Sched_INFO->TX_req);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (nfapi_mode != 0 && Sched_INFO->UL_dci_req->numPdus!=0)
|
||||
{
|
||||
Sched_INFO->UL_dci_req->SFN=frame;
|
||||
Sched_INFO->UL_dci_req->Slot=slot;
|
||||
oai_nfapi_ul_dci_req(Sched_INFO->UL_dci_req);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,6 +130,9 @@ void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame, int slot) {
|
||||
void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
|
||||
int frame,int slot,
|
||||
int do_meas) {
|
||||
// struct timespec time;
|
||||
// clock_gettime(CLOCK_MONOTONIC, &time);
|
||||
// LOG_I(PHY,"\nphy_procedures_gNB_TX frame tx %d slot tx %d time %d.%d\n",frame,slot,time.tv_sec,time.tv_nsec);
|
||||
int aa;
|
||||
NR_DL_FRAME_PARMS *fp=&gNB->frame_parms;
|
||||
nfapi_nr_config_request_scf_t *cfg = &gNB->gNB_config;
|
||||
@@ -168,7 +171,7 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
|
||||
gNB->Mod_id,frame,slot,pdcch_pdu_id,ul_pdcch_pdu_id);
|
||||
|
||||
if (pdcch_pdu_id >= 0 || ul_pdcch_pdu_id >= 0) {
|
||||
LOG_D(PHY, "[gNB %d] Frame %d slot %d Calling nr_generate_dci_top (number of UL/DL DCI %d/%d)\n",
|
||||
LOG_I(PHY, "[gNB %d] Frame %d slot %d Calling nr_generate_dci_top (number of UL/DL DCI %d/%d)\n",
|
||||
gNB->Mod_id, frame, slot,
|
||||
gNB->ul_pdcch_pdu[ul_pdcch_pdu_id].pdcch_pdu.pdcch_pdu.pdcch_pdu_rel15.numDlDci,
|
||||
gNB->pdcch_pdu[pdcch_pdu_id].pdcch_pdu.pdcch_pdu_rel15.numDlDci);
|
||||
@@ -193,7 +196,7 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
|
||||
|
||||
for (int i=0; i<gNB->num_pdsch_rnti[slot]; i++) {
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GENERATE_DLSCH,1);
|
||||
LOG_D(PHY, "PDSCH generation started (%d) in frame %d.%d\n", gNB->num_pdsch_rnti[slot],frame,slot);
|
||||
LOG_I(PHY, "PDSCH generation started (%d) in frame %d.%d\n", gNB->num_pdsch_rnti[slot],frame,slot);
|
||||
nr_generate_pdsch(gNB,frame, slot);
|
||||
if ((frame&127) == 0) dump_pdsch_stats(gNB);
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GENERATE_DLSCH,0);
|
||||
|
||||
@@ -3870,7 +3870,9 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
|
||||
uint8_t eNB_id,
|
||||
uint8_t do_pdcch_flag,
|
||||
runmode_t mode)
|
||||
{
|
||||
{ struct timespec curr_time;
|
||||
clock_gettime(CLOCK_MONOTONIC,&curr_time);
|
||||
//printf("Current time: %d.%d",curr_time.tv_sec,curr_time.tv_nsec);
|
||||
int frame_rx = proc->frame_rx;
|
||||
int nr_tti_rx = proc->nr_tti_rx;
|
||||
int slot_pbch;
|
||||
@@ -3974,7 +3976,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]][eNB_id][0]->active == 1){
|
||||
|
||||
Reference in New Issue
Block a user