Commit 3fd3fdfe authored by liuxu's avatar liuxu

splitPHY_test231007

parent d04a45c8
......@@ -111,7 +111,7 @@ time_stats_t softmodem_stats_rx_sf; // total rx time
void tx_func(void *param) {
LOG_I(PHY,"Enter %s\n",__FUNCTION__);
processingData_L1tx_t *info = (processingData_L1tx_t *) param;
int frame_tx = info->frame;
int slot_tx = info->slot;
......@@ -455,6 +455,7 @@ void init_gNB_Tpool(int inst) {
pushNotifiedFIFO(gNB->L1_tx_free,msgL1Tx); // to unblock the process in the beginning
}
LOG_I(PHY,"get_softmodem_params()->emulate_l1 %d\n",get_softmodem_params()->emulate_l1);
if (!get_softmodem_params()->emulate_l1)
threadCreate(&proc->L1_stats_thread,nrL1_stats_thread,(void*)gNB,"L1_stats",-1,OAI_PRIORITY_RT_LOW);
......
......@@ -799,10 +799,14 @@ void processSlotRX(void *arg) {
proc);
}
LOG_D(PHY, "Sending Uplink data \n");
LOG_I(PHY, "Sending Uplink data \n");
nr_ue_pusch_common_procedures(UE,
proc->nr_slot_tx,
&UE->frame_parms,1);
// LOG_I(PHY,"frame %d slot %d\n", proc->frame_tx, proc->nr_slot_tx);
// if(proc->nr_slot_tx==19&&proc->frame_tx%100==0)
// exit(1);
}
if (UE->UE_mode[gNB_id] > NOT_SYNCHED && UE->UE_mode[gNB_id] < PUSCH) {
......
......@@ -175,7 +175,7 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
}
uint32_t Nid_pusch[2] = {cfg->cell_config.phy_cell_id.value,cfg->cell_config.phy_cell_id.value};
LOG_D(PHY,"Initializing PUSCH DMRS Gold sequence with (%x,%x)\n",Nid_pusch[0],Nid_pusch[1]);
LOG_I(PHY,"Initializing PUSCH DMRS Gold sequence with (%x,%x)\n",Nid_pusch[0],Nid_pusch[1]);
nr_gold_pusch(gNB, &Nid_pusch[0]);
//CSI RS init
......@@ -527,7 +527,14 @@ void nr_phy_config_request(NR_PHY_Config_t *phy_config) {
// for(fd_occasion = 0; fd_occasion <= prach_config->num_prach_fd_occasions.value ; fd_occasion) { // TODO Need to handle for msg1-fdm > 1
num_sequences = prach_config->num_prach_fd_occasions_list[fd_occasion].num_root_sequences.value;
rootSequenceIndex = prach_config->num_prach_fd_occasions_list[fd_occasion].prach_root_sequence_index.value;
LOG_I(PHY,"threequarter_fs %d\n",fp->threequarter_fs);
LOG_I(PHY,"gNB_config->carrier_config.dl_frequency.value %d\n",gNB_config->carrier_config.dl_frequency.value);
LOG_I(PHY,"gNB_config->carrier_config.uplink_frequency.value %d\n",gNB_config->carrier_config.uplink_frequency.value);
LOG_I(PHY,"gNB_config->cell_config.phy_cell_id.value %d\n",gNB_config->cell_config.phy_cell_id.value);
LOG_I(PHY,"prach_config->prach_sequence_length.value %d\n",prach_config->prach_sequence_length.value);
LOG_I(PHY,"prach_config->num_prach_fd_occasions_list[fd_occasion].num_root_sequences.value %d\n",prach_config->num_prach_fd_occasions_list[fd_occasion].num_root_sequences.value);
LOG_I(PHY,"prach_config->num_prach_fd_occasions_list[fd_occasion].prach_root_sequence_index.value %d\n",prach_config->num_prach_fd_occasions_list[fd_occasion].prach_root_sequence_index.value);
LOG_I(PHY,"RC.gNB[Mod_id]->ofdm_offset_divisor %d\n",RC.gNB[Mod_id]->ofdm_offset_divisor);
compute_nr_prach_seq(short_sequence, num_sequences, rootSequenceIndex, RC.gNB[Mod_id]->X_u);
// }
RC.gNB[Mod_id]->configured = 1;
......
......@@ -252,6 +252,16 @@ int nr_init_frame_parms(nfapi_nr_config_request_scf_t* cfg,
LOG_I(PHY,"Initializing frame parms for mu %d, N_RB %d, Ncp %d\n",mu, fp->N_RB_DL, Ncp);
LOG_I(PHY,"cfg->cell_config.frame_duplex_type.value %d\n",cfg->cell_config.frame_duplex_type.value);
LOG_I(PHY,"cfg->ssb_table.ssb_mask_list[0].ssb_mask.value %d\n",cfg->ssb_table.ssb_mask_list[0].ssb_mask.value);
LOG_I(PHY,"cfg->ssb_table.ssb_mask_list[1].ssb_mask.value %d\n",cfg->ssb_table.ssb_mask_list[1].ssb_mask.value);
LOG_I(PHY,"cfg->ssb_config.scs_common.value %d\n",cfg->ssb_config.scs_common.value);
LOG_I(PHY,"cfg->carrier_config.dl_grid_size[cfg->ssb_config.scs_common.value].value %d\n",cfg->carrier_config.dl_grid_size[cfg->ssb_config.scs_common.value].value);
LOG_I(PHY,"cfg->carrier_config.ul_grid_size[cfg->ssb_config.scs_common.value].value %d\n",cfg->carrier_config.ul_grid_size[cfg->ssb_config.scs_common.value].value);
LOG_I(PHY,"cfg->ssb_config.scs_common.value %d\n",cfg->ssb_config.scs_common.value);
LOG_I(PHY,"cfg->carrier_config.num_rx_ant.value %d\n",cfg->carrier_config.num_rx_ant.value);
LOG_I(PHY,"cfg->carrier_config.num_tx_ant.value %d\n",cfg->carrier_config.num_tx_ant.value);
if (Ncp == NFAPI_CP_EXTENDED)
......
......@@ -708,7 +708,9 @@ void init_symbol_rotation(NR_DL_FRAME_PARMS *fp) {
double exp_im = sin(-poff);
symbol_rotation[0] = (int16_t)floor(exp_re * 32767);
symbol_rotation[1] = (int16_t)floor(exp_im * 32767);
LOG_I(PHY, "Doing symbol rotation calculation for gNB TX/RX, f0 %f Hz, Nsymb %d\n", f0, nsymb);
LOG_I(PHY, "Doing symbol rotation calculation for gNB TX/RX, f0 %f Hz, Nsymb %d dl_CarrierFreq %lu ul_CarrierFreq %lu numerology_index %d \
symbols_per_slot %d slots_per_frame %d (frame_parms->samples_per_subframe %d \n", f0, nsymb,dl_CarrierFreq,ul_CarrierFreq,fp->numerology_index, \
fp->symbols_per_slot,fp->slots_per_frame,fp->samples_per_subframe);
LOG_I(PHY, "Symbol rotation %d/%d => (%d,%d)\n",
0,
nsymb,
......
......@@ -37,7 +37,7 @@ This section deals with basic functions for OFDM Modulation.
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "modulation_common.h"
#include "PHY/LTE_TRANSPORT/transport_common_proto.h"
//#define DEBUG_OFDM_MOD
// #define DEBUG_OFDM_MOD
void normal_prefix_mod(int32_t *txdataF,int32_t *txdata,uint8_t nsymb,LTE_DL_FRAME_PARMS *frame_parms)
......@@ -201,14 +201,22 @@ void PHY_ofdm_mod(int *input, /// pointer to complex input
#ifdef DEBUG_OFDM_MOD
printf("[PHY] symbol %d/%d offset %d (%p,%p -> %p)\n",i,nb_symbols,i*fftsize+(i*nb_prefix_samples),input,&input[i*fftsize],&output[(i*fftsize) + ((i)*nb_prefix_samples)]);
// if(nb_symbols==1) for(int i = 0; i < 2048; i++) printf("%d x:%d,y:%d\n",i,input[i],output[i]);
#endif
// char fname[100];
// snprintf(fname,100,"/home/witcomm/work/liuxu/DiscretePHY/PUSCH/test/ofdm_input_%d_%d.m", i,nb_symbols);
// LOG_M(fname,"input",&input[i*fftsize],fftsize,1,1);
// printf("input:\n");
// for (int i = 0; i < 2048<<1;i+=2) printf("%d + j*(%d)\t",((short *)input)[i],((short *)input)[i+1]);
// printf("\n");
#ifndef __AVX2__
// printf("Don't use avx2!\n");
// handle 128-bit alignment for 128-bit SIMD (SSE4,NEON,AltiVEC)
idft(idftsize,(int16_t *)&input[i*fftsize],
(fftsize==128) ? (int16_t *)temp : (int16_t *)&output[(i*fftsize) + ((1+i)*nb_prefix_samples)],
1);
#else
// printf("Do use avx2!\n");
// on AVX2 need 256-bit alignment
idft(idftsize,(int16_t *)&input[i*fftsize],
(int16_t *)temp,
......@@ -234,6 +242,8 @@ void PHY_ofdm_mod(int *input, /// pointer to complex input
memcpy((void*)output_ptr,(void*)temp_ptr,fftsize<<2);
}
memcpy((void*)&output_ptr[-nb_prefix_samples],(void*)&output_ptr[fftsize-nb_prefix_samples],nb_prefix_samples<<2);
// snprintf(fname,100,"/home/witcomm/work/liuxu/DiscretePHY/PUSCH/test/ofdm_output_%d_%d.m", i,nb_symbols);
// LOG_M(fname,"output",&temp,fftsize,1,1);
break;
case CYCLIC_SUFFIX:
......
......@@ -126,7 +126,7 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue,
//#ifdef DEBUG_FEP
// if (ue->frame <100)
LOG_D(PHY,"slot_fep: slot %d, symbol %d, nb_prefix_samples %u, nb_prefix_samples0 %u, rx_offset %u energy %d\n",
LOG_I(PHY,"slot_fep: slot %d, symbol %d, nb_prefix_samples %u, nb_prefix_samples0 %u, rx_offset %u energy %d\n",
Ns, symbol, nb_prefix_samples, nb_prefix_samples0, rx_offset, dB_fixed(signal_energy(&common_vars->rxdata[0][rx_offset],frame_parms->ofdm_symbol_size)));
//#endif
......@@ -301,7 +301,9 @@ int nr_slot_fep_ul(NR_DL_FRAME_PARMS *frame_parms,
unsigned char Ns,
int sample_offset)
{
unsigned int nb_prefix_samples = frame_parms->nb_prefix_samples;
//LOG_I(PHY,"frame_parms->ofdm_offset_divisor:%lu\n",frame_parms->ofdm_offset_divisor);
unsigned int nb_prefix_samples = frame_parms->nb_prefix_samples;
unsigned int nb_prefix_samples0 = frame_parms->nb_prefix_samples0;
dft_size_idx_t dftsize = get_dft_size_idx(frame_parms->ofdm_symbol_size);
......@@ -363,7 +365,8 @@ void apply_nr_rotation_ul(NR_DL_FRAME_PARMS *frame_parms,
int nsymb,
int length) {
LOG_D(PHY,"frame_parms->timeshift_symbol_rotation:%d\n",frame_parms->timeshift_symbol_rotation);
int symb_offset = (slot%frame_parms->slots_per_subframe)*frame_parms->symbols_per_slot;
int soffset = (slot&3)*frame_parms->symbols_per_slot*frame_parms->ofdm_symbol_size;
......
......@@ -136,6 +136,7 @@ void gNB_I0_measurements(PHY_VARS_gNB *gNB,int slot, int first_symb,int num_symb
}
} //rb
} // symb
// LOG_M("/home/witcomm/work/liuxu/DiscretePHY/PUSCH/test/common_vars->rxdataF[aarx][offset].m","common_vars->rxdataF",(int16_t *)ul_ch ,len*frame_parms->N_RB_UL*sizeof(int16_t),1,1);
int nb_rb=0;
int32_t n0_subband_tot=0;
int32_t n0_subband_tot_perPRB=0;
......@@ -195,7 +196,7 @@ void nr_gnb_measurements(PHY_VARS_gNB *gNB, uint8_t ulsch_id, unsigned char harq
for (int aatx = 0; aatx < nrOfLayers; aatx++){
meas->rx_spatial_power[ulsch_id][aatx][aarx] = (signal_energy_nodc(&gNB->pusch_vars[ulsch_id]->ul_ch_estimates[aatx*fp->nb_antennas_rx+aarx][ch_offset], N_RB_UL * NR_NB_SC_PER_RB));
// LOG_M("/home/witcomm/work/liuxu/DiscretePHY/PUSCH/test/rx_sptial_power.m","rx_sptial_power",(int16_t *)&gNB->pusch_vars[ulsch_id]->ul_ch_estimates[aatx*fp->nb_antennas_rx+aarx][ch_offset],N_RB_UL * NR_NB_SC_PER_RB*sizeof(int16_t),1,1);
if (meas->rx_spatial_power[ulsch_id][aatx][aarx] < 0) {
meas->rx_spatial_power[ulsch_id][aatx][aarx] = 0;
}
......@@ -204,7 +205,7 @@ void nr_gnb_measurements(PHY_VARS_gNB *gNB, uint8_t ulsch_id, unsigned char harq
rx_power[ulsch_id][aarx] += meas->rx_spatial_power[ulsch_id][aatx][aarx];
}
LOG_D(PHY, "[ULSCH ID %d] RX power in antenna %d = %d\n", ulsch_id, aarx, rx_power[ulsch_id][aarx]);
LOG_I(PHY, "[ULSCH ID %d] RX power in antenna %d = %d\n", ulsch_id, aarx, rx_power[ulsch_id][aarx]);
rx_power_tot[ulsch_id] += rx_power[ulsch_id][aarx];
......@@ -216,7 +217,7 @@ void nr_gnb_measurements(PHY_VARS_gNB *gNB, uint8_t ulsch_id, unsigned char harq
meas->wideband_cqi_tot[ulsch_id] = dB_fixed2(rx_power_tot[ulsch_id], meas->n0_power_tot);
meas->rx_rssi_dBm[ulsch_id] = rx_power_avg_dB[ulsch_id] + 30 - 10 * log10(pow(2, 30)) - (rx_gain - rx_gain_offset) - dB_fixed(fp->ofdm_symbol_size);
LOG_D(PHY, "[ULSCH %d] RSSI %d dBm/RE, RSSI (digital) %d dB (N_RB_UL %d), WBand CQI tot %d dB, N0 Power tot %d, RX Power tot %d\n",
LOG_I(PHY, "[ULSCH %d] RSSI %d dBm/RE, RSSI (digital) %d dB (N_RB_UL %d), WBand CQI tot %d dB, N0 Power tot %d, RX Power tot %d\n",
ulsch_id,
meas->rx_rssi_dBm[ulsch_id],
rx_power_avg_dB[ulsch_id],
......
......@@ -35,7 +35,7 @@
//#define DEBUG_CH
//#define DEBUG_PUSCH
// #define DEBUG_PUSCH
//#define SRS_DEBUG
#define NO_INTERP 1
......@@ -115,9 +115,15 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
k = bwp_start_subcarrier;
int re_offset;
LOG_I(PHY,"nushift %d pusch_pdu->rb_size %d pusch_pdu->dmrs_config_type %d\n",nushift,pusch_pdu->rb_size, pusch_pdu->dmrs_config_type);
LOG_I(PHY,"pusch_pdu->bwp_start %d pusch_pdu->rb_start %d gNB->prb_interpolation %d\n",pusch_pdu->bwp_start,pusch_pdu->rb_start, gNB->prb_interpolation);
LOG_I(PHY,"pusch_pdu->dfts_ofdm.low_papr_group_number %d pusch_pdu->dfts_ofdm.low_papr_sequence_number %d\n",pusch_pdu->dfts_ofdm.low_papr_group_number,\
pusch_pdu->dfts_ofdm.low_papr_sequence_number);
LOG_I(PHY,"pusch_pdu->transform_precoding %d\n",pusch_pdu->transform_precoding);
uint16_t nb_rb_pusch = pusch_pdu->rb_size;
LOG_D(PHY, "In %s: ch_offset %d, soffset %d, symbol_offset %d OFDM size %d, Ns = %d, k = %d symbol %d\n",
LOG_I(PHY, "In %s: ch_offset %d, soffset %d, symbol_offset %d OFDM size %d, Ns = %d, k = %d symbol %d\n",
__FUNCTION__,
ch_offset, soffset,
symbol_offset,
......@@ -457,6 +463,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
8);
}
}
// LOG_M("/home/witcomm/work/liuxu/DiscretePHY/PUSCH/test/ul_ch_estimates.m","ul_ch",&ul_ch_estimates[p*gNB->frame_parms.nb_antennas_rx+0][ch_offset],gNB->frame_parms.ofdm_symbol_size,1,1);
#ifdef DEBUG_PUSCH
ul_ch = (int16_t *)&ul_ch_estimates[p*gNB->frame_parms.nb_antennas_rx+aarx][ch_offset];
for(uint16_t idxP=0; idxP<ceil((float)nb_rb_pusch*12/8); idxP++) {
......
......@@ -178,6 +178,7 @@ void nr_generate_dci(nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_pdu_rel15,
if(cce_list[d][p2].reg_list[0].reg_idx == p * NR_NB_REG_PER_CCE) {
reg_list_order[reg_list_index] = p2;
reg_list_index++;
LOG_D(PHY,"p %d p2 %d reg_list_index %d\n",p,p2,reg_list_index);
break;
}
}
......@@ -207,6 +208,8 @@ void nr_generate_dci(nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_pdu_rel15,
k_prime = 0;
for (int m = 0; m < NR_NB_SC_PER_RB; m++) {
LOG_D(PHY,"symbol_idx %d cce_idx %d cce_count %d k %d l %d dmrs_idx %d k_prime %d m %d duration %d reg_in_cce_idx %d reg_idx %d\n",
symbol_idx,cce_idx,cce_count,k,l,dmrs_idx,k_prime,m,pdcch_pdu_rel15->DurationSymbols,reg_in_cce_idx,cce_list[d][cce_idx].reg_list[reg_in_cce_idx].reg_idx);
if (m == (k_prime << 2) + 1) { // DMRS if not already mapped
((int16_t *) txdataF)[(l * frame_parms->ofdm_symbol_size + k) << 1] =
(amp * mod_dmrs[l][dmrs_idx << 1]) >> 15;
......
......@@ -87,6 +87,33 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
uint8_t dmrs_Type = rel15->dmrsConfigType;
int nb_re_dmrs;
uint16_t n_dmrs;
LOG_I(PHY,"frame.slot %d.%d\n",frame,slot);
LOG_I(PHY,"dlsch_id %d\n",dlsch_id);
LOG_I(PHY,"rel15->dmrsConfigType %d\n",rel15->dmrsConfigType);
LOG_I(PHY,"rel15->numDmrsCdmGrpsNoData %d\n",rel15->numDmrsCdmGrpsNoData);
LOG_I(PHY,"rel15->dlDmrsSymbPos %d\n",rel15->dlDmrsSymbPos);
LOG_I(PHY,"rel15->BWPStart %d\n",rel15->BWPStart);
LOG_I(PHY,"rel15->rbStart %d\n",rel15->rbStart);
LOG_I(PHY,"rel15->rbSize %d\n",rel15->rbSize);
LOG_I(PHY,"rel15->nrOfLayers %d\n",rel15->nrOfLayers);
LOG_I(PHY,"rel15->qamModOrder[0] %d\n",rel15->qamModOrder[0]);
LOG_I(PHY,"rel15->pduBitmap %d\n",rel15->pduBitmap);
LOG_I(PHY,"rel15->NrOfSymbols %d\n",rel15->NrOfSymbols);
LOG_I(PHY,"rel15->StartSymbolIndex %d\n",rel15->StartSymbolIndex);
LOG_I(PHY,"rel15->PTRSTimeDensity %d\n",rel15->PTRSTimeDensity);
LOG_I(PHY,"rel15->PTRSFreqDensity %d\n",rel15->PTRSFreqDensity);
LOG_I(PHY,"rel15->NrOfCodewords %d\n",rel15->NrOfCodewords);
LOG_I(PHY,"rel15->dataScramblingId %d\n",rel15->dataScramblingId);
LOG_I(PHY,"rel15->rnti %x\n",rel15->rnti);
LOG_I(PHY,"frame_parms->first_carrier_offset %d\n",frame_parms->first_carrier_offset);
LOG_I(PHY,"frame_parms->ofdm_symbol_size %d\n",frame_parms->ofdm_symbol_size);
LOG_I(PHY,"rel15->PTRSReOffset %d\n",rel15->PTRSReOffset);
LOG_I(PHY,"frame_parms->nb_antennas_tx %d\n",frame_parms->nb_antennas_tx);
LOG_I(PHY,"rel15->precodingAndBeamforming.prg_size %d\n",rel15->precodingAndBeamforming.prg_size);
LOG_I(PHY,"gNB->common_vars.beam_id[0][slot*frame_parms->symbols_per_slot] %d\n",\
gNB->common_vars.beam_id[0][slot*frame_parms->symbols_per_slot]);
LOG_I(PHY,"rel15->precodingAndBeamforming.prgs_list[0].dig_bf_interface_list[0].beam_idx %d\n",\
rel15->precodingAndBeamforming.prgs_list[0].dig_bf_interface_list[0].beam_idx);
if (rel15->dmrsConfigType==NFAPI_NR_DMRS_TYPE1) {
nb_re_dmrs = 6*rel15->numDmrsCdmGrpsNoData;
}
......@@ -449,8 +476,12 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
for (int rb=0; rb<rel15->rbSize; rb++) {
//get pmi info
uint8_t pmi;
if (rel15->precodingAndBeamforming.prg_size > 0)
if (rel15->precodingAndBeamforming.prg_size > 0){
pmi = rel15->precodingAndBeamforming.prgs_list[(int)rb/rel15->precodingAndBeamforming.prg_size].pm_idx;
LOG_I(PHY,"rel15->precodingAndBeamforming.prgs_list[(int)rb/rel15->precodingAndBeamforming.prg_size].pm_idx %d\n",\
rel15->precodingAndBeamforming.prgs_list[(int)rb/rel15->precodingAndBeamforming.prg_size].pm_idx);
}
else
pmi = 0;//no precoding
......@@ -533,6 +564,36 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
else {
LOG_D(PHY,"beam index for PDSCH allocation already taken\n");
}
#if 0
char fname_a[100],fname_b[100], fname_c0[100], fname_d0[100],fname_e[100], fname_output[100];
char fname_scramble[100], fname_mod[100],fname_layer[100], fname_txF[100];
snprintf(fname_a,100, "/home/witcomm/work/liuxu/DiscretePHY/PDSCH/test/dlsch_a.m");
snprintf(fname_b,100, "/home/witcomm/work/liuxu/DiscretePHY/PDSCH/test/dlsch_b.m");
// snprintf(fname_c0,100, "/home/witcomm/work/liuxu/DiscretePHY/PDSCH/test/dlsch_id_%d_%d_%d_c0.m", frame, slot,dlsch_id);
// snprintf(fname_d0,100, "/home/witcomm/work/liuxu/DiscretePHY/PDSCH/test/dlsch_id_%d_%d_%d_d0.m", frame, slot,dlsch_id);
// snprintf(fname_e,100, "/home/witcomm/work/liuxu/DiscretePHY/PDSCH/test/dlsch_id_%d_%d_%d_e.m", frame, slot,dlsch_id);
snprintf(fname_output,100, "/home/witcomm/work/liuxu/DiscretePHY/PDSCH/test/dlsch_id_output.m", frame, slot,dlsch_id);
snprintf(fname_scramble,100, "/home/witcomm/work/liuxu/DiscretePHY/PDSCH/test/scramble.m", frame, slot,dlsch_id);
snprintf(fname_mod,100, "/home/witcomm/work/liuxu/DiscretePHY/PDSCH/test/modulation.m", frame, slot,dlsch_id);
snprintf(fname_layer,100, "/home/witcomm/work/liuxu/DiscretePHY/PDSCH/test/layerMapping.m", frame, slot,dlsch_id);
snprintf(fname_txF,100, "/home/witcomm/work/liuxu/DiscretePHY/PDSCH/test/txdataF.m", frame, slot,dlsch_id);
if (frame%100==0 && slot==1){
LOG_M(fname_c0, "ldpc_c0",harq->c[0],harq->K,1,9);
LOG_M(fname_d0, "ldpc_d0",harq->d[0],harq->Z*10,1,9);
LOG_M(fname_e, "ldpc_e",harq->e,1380,1,9);
#endif
LOG_M("/home/witcomm/work/liuxu/DiscretePHY/PDSCH/test/dlsch_b.m", "ldpc_b",harq->b,harq->B,1,9);
LOG_M("/home/witcomm/work/liuxu/DiscretePHY/PDSCH/test/dlsch_id_output.m", "ldpc_output",output,encoded_length,1,9);
LOG_M("/home/witcomm/work/liuxu/DiscretePHY/PDSCH/test/dlsch_a.m", "ldpc_a",harq->pdu,rel15->TBSize[0],1,9);
LOG_M("/home/witcomm/work/liuxu/DiscretePHY/PDSCH/test/scramble.m", "scramble",scrambled_output[0],encoded_length,1,9);
LOG_M("/home/witcomm/work/liuxu/DiscretePHY/PDSCH/test/modulation.m", "modulation",mod_symbs[0],encoded_length*sizeof(int16_t),1,1);
LOG_M("/home/witcomm/work/liuxu/DiscretePHY/PDSCH/test/layerMapping.m", "layer_mapping",(int16_t *)tx_layers[0],encoded_length*sizeof(int16_t),1,1);
LOG_M("/home/witcomm/work/liuxu/DiscretePHY/PDSCH/test/txdataF.m", "txdataF",txdataF[0],frame_parms->ofdm_symbol_size*14,1,1);
LOG_I(PHY, "(frame %d slot %d dlsch_id %d)%s data already saved in /home/witcomm/work/liuxu/DiscretePHY/PDSCH/test/\n",
frame, slot, dlsch_id, __FUNCTION__);
// exit(EXIT_SUCCESS);
// }
}// dlsch loop
}
......
......@@ -198,7 +198,7 @@ void ldpc8blocks( void *p) {
nb_re_dmrs = 4*rel15->numDmrsCdmGrpsNoData;
unsigned int G = nr_get_G(nb_rb, nb_symb_sch, nb_re_dmrs, length_dmrs,mod_order,rel15->nrOfLayers);
LOG_D(PHY,"dlsch coding A %d Kr %d G %d (nb_rb %d, nb_symb_sch %d, nb_re_dmrs %d, length_dmrs %d, mod_order %d)\n",
LOG_I(PHY,"dlsch coding A %d Kr %d G %d (nb_rb %d, nb_symb_sch %d, nb_re_dmrs %d, length_dmrs %d, mod_order %d)\n",
A,impp->K,G, nb_rb,nb_symb_sch,nb_re_dmrs,length_dmrs,(int)mod_order);
// nrLDPC_encoder output is in "d"
// let's make this interface happy!
......@@ -293,6 +293,10 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB,
float Coderate = 0.0;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_DLSCH_ENCODING, VCD_FUNCTION_IN);
uint32_t A = rel15->TBSize[0]<<3;
LOG_I(PHY,"rel15->TBSize[0] %d\n");
LOG_I(PHY,"gNB->dlsch_stats[i].rnti %x\n");
LOG_I(PHY,"rel15->nrOfLayers %d\n");
LOG_I(PHY,"rel15->qamModOrder[0] %d\n");
if ( rel15->rnti != SI_RNTI)
trace_NRpdu(DIRECTION_DOWNLINK, a, rel15->TBSize[0], 0, WS_C_RNTI, rel15->rnti, frame, slot,0, 0);
......@@ -365,6 +369,7 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB,
start_meas(dlsch_segmentation_stats);
impp.Kb = nr_segmentation(harq->b, harq->c, harq->B, &impp.n_segments, &impp.K, impp.Zc, &impp.F, impp.BG);
stop_meas(dlsch_segmentation_stats);
LOG_I(PHY,"immp.K %d\n",impp.K);
for (int r=0; r<impp.n_segments; r++) {
//d_tmp[r] = &harq->d[r][0];
......
......@@ -46,6 +46,7 @@
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "common/utils/LOG/log.h"
#include <syscall.h>
#include <dlfcn.h>
//#define DEBUG_ULSCH_DECODING
//#define gNB_DEBUG_TRACE
......@@ -262,6 +263,7 @@ void nr_processULSegment(void* arg) {
uint32_t Tbslbrm = rdata->Tbslbrm;
short* ulsch_llr = rdata->ulsch_llr;
int max_ldpc_iterations = p_decoderParms->numMaxIter;
LOG_I(PHY, "p_decoderParms->numMaxIter %d, ulsch_harq->new_rx %d\n", p_decoderParms->numMaxIter, ulsch_harq->new_rx);
int8_t llrProcBuf[OAI_UL_LDPC_MAX_NUM_LLR] __attribute__ ((aligned(32)));
int16_t z [68*384 + 16] __attribute__ ((aligned(16)));
......@@ -379,6 +381,17 @@ void nr_processULSegment(void* arg) {
////////////////////////////////// pl =====> llrProcBuf //////////////////////////////////
// void *handle = dlopen("/home/witcomm/work/liuxu/revise-slot-ran/ran/cmake_targets/ran_build/build/libldpc.so", RTLD_LAZY|RTLD_NODELETE|RTLD_GLOBAL);
// if(!handle){
// printf("open libldpc.so error!\n");
// return -1;
// }
// int32_t (*nrLDPC_decode_gpu_ran)(t_nrLDPC_dec_params* p_decParams, int8_t* p_llr, int8_t* p_out, t_nrLDPC_procBuf* p_procBuf, t_nrLDPC_time_stats* p_profiler);
// nrLDPC_decode_gpu_ran = dlsym(handle, "nrLDPC_decod");
no_iteration_ldpc = nrLDPC_decoder(p_decoderParms,
(int8_t*)&pl[0],
llrProcBuf,
......@@ -400,6 +413,7 @@ void nr_processULSegment(void* arg) {
for (int m=0; m < Kr>>3; m ++) {
ulsch_harq->c[r][m]= (uint8_t) llrProcBuf[m];
printf("ulsch_harq->d[%d][%d] = %d ulsch_harq->c[%d][%d] = %d\n", r, m, ulsch_harq->d[r][m], r, m, ulsch_harq->c[r][m]);
}
//stop_meas(&phy_vars_gNB->ulsch_ldpc_decoding_stats);
......@@ -454,6 +468,19 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
uint16_t R = pusch_pdu->target_code_rate;
uint8_t mcs = pusch_pdu->mcs_index;
uint8_t n_layers = pusch_pdu->nrOfLayers;
LOG_I(PHY, "qam_mod_order %d\n", pusch_pdu->qam_mod_order);
LOG_I(PHY,"target_code_rate %d\n", pusch_pdu->target_code_rate);
LOG_I(PHY,"mcs_index %d\n", pusch_pdu->mcs_index);
LOG_I(PHY,"nrOfLayers %d\n", pusch_pdu->nrOfLayers);
LOG_I(PHY, "pusch_pdu->pusch_data.rv_index %d\n", pusch_pdu->pusch_data.rv_index);
LOG_I(PHY, "pusch_pdu->pusch_data.new_data_indicator %d\n", pusch_pdu->pusch_data.new_data_indicator);
LOG_I(PHY, "harq_process->ndi %d\n", harq_process->ndi);
LOG_I(PHY, "phy_vars_gNB->ulsch_stats[0].rnti %x\n", phy_vars_gNB->ulsch_stats[0].rnti);
LOG_I(PHY, "ulsch->max_ldpc_iterations %d\n", ulsch->max_ldpc_iterations);
LOG_I(PHY, "pusch_pdu->rb_size %d\n", pusch_pdu->rb_size);
LOG_I(PHY, "");
LOG_I(PHY, "");
// ------------------------------------------------------------------
if (!ulsch_llr) {
......@@ -480,7 +507,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
A = (harq_process->TBS)<<3;
LOG_D(NR_PHY, "ULSCH Decoding, harq_pid %d TBS %d G %d mcs %d Nl %d nb_rb %d, Qm %d, n_layers %d, Coderate %d\n", harq_pid, A, G, mcs, n_layers, nb_rb, Qm, n_layers, R);
LOG_I(NR_PHY, "ULSCH Decoding, harq_pid %d TBS %d G %d mcs %d Nl %d nb_rb %d, Qm %d, n_layers %d, Coderate %d\n", harq_pid, A, G, mcs, n_layers, nb_rb, Qm, n_layers, R);
if (R<1024)
Coderate = (float) R /(float) 1024;
......
......@@ -10,7 +10,7 @@
#include "common/utils/nr/nr_common.h"
//#define DEBUG_CH_COMP
//#define DEBUG_RB_EXT
// #define DEBUG_RB_EXT
//#define DEBUG_CH_MAG
#define INVALID_VALUE 255
......@@ -1186,8 +1186,22 @@ int nr_rx_pusch(PHY_VARS_gNB *gNB,
gNB->pusch_vars[ulsch_id]->cl_done = 0;
bwp_start_subcarrier = ((rel15_ul->rb_start + rel15_ul->bwp_start)*NR_NB_SC_PER_RB + frame_parms->first_carrier_offset) % frame_parms->ofdm_symbol_size;
LOG_D(PHY,"pusch %d.%d : bwp_start_subcarrier %d, rb_start %d, first_carrier_offset %d\n", frame,slot,bwp_start_subcarrier, rel15_ul->rb_start, frame_parms->first_carrier_offset);
LOG_D(PHY,"pusch %d.%d : ul_dmrs_symb_pos %x\n",frame,slot,rel15_ul->ul_dmrs_symb_pos);
LOG_I(PHY,"pusch %d.%d : bwp_start_subcarrier %d, rb_start %d, first_carrier_offset %d\n", frame,slot,bwp_start_subcarrier, rel15_ul->rb_start, frame_parms->first_carrier_offset);
LOG_I(PHY,"pusch %d.%d : ul_dmrs_symb_pos %d\n",frame,slot,rel15_ul->ul_dmrs_symb_pos);
LOG_I(PHY,"ulsch_id %d harq_pid %d nb_antennas_rx %d nrOfLayers %d\n",ulsch_id,harq_pid,frame_parms->nb_antennas_rx,rel15_ul->nrOfLayers);
LOG_I(PHY,"start_symbol_index %d nr_of_symbols %d\n",rel15_ul->start_symbol_index,rel15_ul->nr_of_symbols);
LOG_I(PHY,"ul_dmrs_symb_pos %d dmrs_ports %d\n",rel15_ul->ul_dmrs_symb_pos,rel15_ul->dmrs_ports);
LOG_I(PHY,"ulsch_id %d harq_pid %d\n",ulsch_id,harq_pid);
LOG_I(PHY,"rel15_ul->pdu_bit_map %d\n",rel15_ul->pdu_bit_map);
LOG_I(PHY,"rel15_ul->pusch_ptrs.ptrs_time_density %d\n",rel15_ul->pusch_ptrs.ptrs_time_density);
LOG_I(PHY,"rel15_ul->pusch_ptrs.ptrs_freq_density %d\n",rel15_ul->pusch_ptrs.ptrs_freq_density);
LOG_I(PHY,"gNB->pusch_vars[ulsch_id]->ptrs_symbols %d\n",gNB->pusch_vars[ulsch_id]->ptrs_symbols);
LOG_I(PHY,"gNB->pusch_vars[ulsch_id]->ptrs_symbol_index %d\n",gNB->pusch_vars[ulsch_id]->ptrs_symbol_index);
LOG_I(PHY,"rel15_ul->dmrs_config_type %d\n",rel15_ul->dmrs_config_type);
// LOG_I(PHY,"rel15_ul->pusch_ptrs.ptrs_ports_list[0].ptrs_re_offset %d\n",rel15_ul->pusch_ptrs.ptrs_ports_list[0].ptrs_re_offset);
LOG_I(PHY,"gNB->pusch_vars[ulsch_id]->ptrs_phase_per_slot[0] %d\n",gNB->pusch_vars[ulsch_id]->ptrs_phase_per_slot[0]);
LOG_I(PHY,"gNB->pusch_vars[ulsch_id]->ptrs_re_per_slot %d\n",gNB->pusch_vars[ulsch_id]->ptrs_re_per_slot);
LOG_I(PHY,"rel15_ul->qam_mod_order %d\n",rel15_ul->qam_mod_order);
//----------------------------------------------------------
//--------------------- Channel estimation ---------------------
......@@ -1195,7 +1209,7 @@ int nr_rx_pusch(PHY_VARS_gNB *gNB,
start_meas(&gNB->ulsch_channel_estimation_stats);
for(uint8_t symbol = rel15_ul->start_symbol_index; symbol < (rel15_ul->start_symbol_index + rel15_ul->nr_of_symbols); symbol++) {
uint8_t dmrs_symbol_flag = (rel15_ul->ul_dmrs_symb_pos >> symbol) & 0x01;
LOG_D(PHY, "symbol %d, dmrs_symbol_flag :%d\n", symbol, dmrs_symbol_flag);
LOG_I(PHY, "symbol %d, dmrs_symbol_flag :%d\n", symbol, dmrs_symbol_flag);
if (dmrs_symbol_flag == 1) {
if (gNB->pusch_vars[ulsch_id]->dmrs_symbol == INVALID_VALUE)
gNB->pusch_vars[ulsch_id]->dmrs_symbol = symbol;
......@@ -1210,7 +1224,7 @@ int nr_rx_pusch(PHY_VARS_gNB *gNB,
rel15_ul);
nr_gnb_measurements(gNB, ulsch_id, harq_pid, symbol,rel15_ul->nrOfLayers);
for (aarx = 0; aarx < frame_parms->nb_antennas_rx; aarx++) {
if (symbol == rel15_ul->start_symbol_index) {
gNB->pusch_vars[ulsch_id]->ulsch_power[aarx] = 0;
......@@ -1227,8 +1241,11 @@ int nr_rx_pusch(PHY_VARS_gNB *gNB,
}
}
}
LOG_I(PHY,"gNB->pusch_vars[ulsch_id]->ulsch_power[aarx] %d gNB->pusch_vars[ulsch_id]->ulsch_noise_power[aarx] %d\n", \
gNB->pusch_vars[ulsch_id]->ulsch_power[0],gNB->pusch_vars[ulsch_id]->ulsch_noise_power[0]);
stop_meas(&gNB->ulsch_channel_estimation_stats);
// if(frame%200==0&&slot==19) exit(1);
#ifdef __AVX2__
int off = ((rel15_ul->rb_size&1) == 1)? 4:0;
#else
......@@ -1257,7 +1274,8 @@ int nr_rx_pusch(PHY_VARS_gNB *gNB,
}
gNB->pusch_vars[ulsch_id]->ul_valid_re_per_slot[symbol] = nb_re_pusch;
LOG_D(PHY,"symbol %d: nb_re_pusch %d, DMRS symbl used for Chest :%d \n", symbol, nb_re_pusch, gNB->pusch_vars[ulsch_id]->dmrs_symbol);
LOG_I(PHY,"symbol %d: nb_re_pusch %d, DMRS symbl used for Chest :%d num_dmrs_cdm_grps_no_data %d\n", symbol, nb_re_pusch, \
gNB->pusch_vars[ulsch_id]->dmrs_symbol,rel15_ul->num_dmrs_cdm_grps_no_data);
//----------------------------------------------------------
//--------------------- RBs extraction ---------------------
......@@ -1308,7 +1326,7 @@ int nr_rx_pusch(PHY_VARS_gNB *gNB,
//--------------------- Channel Compensation ---------------
//----------------------------------------------------------
start_meas(&gNB->ulsch_channel_compensation_stats);
LOG_D(PHY,"Doing channel compensations log2_maxh %d, avgs %d (%d,%d)\n",gNB->pusch_vars[ulsch_id]->log2_maxh,avgs,avg[0],avg[1]);
LOG_I(PHY,"Doing channel compensations log2_maxh %d, avgs %d (%d,%d)\n",gNB->pusch_vars[ulsch_id]->log2_maxh,avgs,avg[0],avg[1]);
nr_ulsch_channel_compensation(gNB->pusch_vars[ulsch_id]->rxdataF_ext,
gNB->pusch_vars[ulsch_id]->ul_ch_estimates_ext,
gNB->pusch_vars[ulsch_id]->ul_ch_mag0,
......@@ -1324,6 +1342,7 @@ int nr_rx_pusch(PHY_VARS_gNB *gNB,
gNB->pusch_vars[ulsch_id]->log2_maxh);
stop_meas(&gNB->ulsch_channel_compensation_stats);
start_meas(&gNB->ulsch_mrc_stats);
nr_ulsch_detection_mrc(frame_parms,
gNB->pusch_vars[ulsch_id]->rxdataF_comp,
......@@ -1382,7 +1401,6 @@ int nr_rx_pusch(PHY_VARS_gNB *gNB,
rel15_ul->qam_mod_order);
stop_meas(&gNB->ulsch_llr_stats);
rxdataF_ext_offset += gNB->pusch_vars[ulsch_id]->ul_valid_re_per_slot[symbol];
if (symbol == (rel15_ul->start_symbol_index + rel15_ul->nr_of_symbols - 1)) {
static int cnt = 0;
......
......@@ -152,12 +152,12 @@ void nr_pdcch_demapping_deinterleaving(uint32_t *llr,
c++;
}
bundle_j = (c * coreset_interleaver_size_R) + r;
f_bundle_j = ((r * coreset_C) + c + n_shift) % (coreset_nbr_rb / reg_bundle_size_L);
bundle_j = (c * coreset_interleaver_size_R) + r;//CCE index
f_bundle_j = ((r * coreset_C) + c + n_shift) % (coreset_nbr_rb / reg_bundle_size_L);//reg_bundle index
if (coreset_interleaved == 0) f_bundle_j = bundle_j;
f_bundle_j_list[reg / 6] = f_bundle_j;
f_bundle_j_list[reg / 6] = f_bundle_j;//every reg which attaches reg_bun
}
if ((reg % reg_bundle_size_L) == 0) r++;
......@@ -171,10 +171,12 @@ void nr_pdcch_demapping_deinterleaving(uint32_t *llr,
for (int p = 0; p < NR_MAX_PDCCH_AGG_LEVEL; p++) {
for (int p2 = CCE[c_id]; p2 < CCE[c_id] + L[c_id]; p2++) {
AssertFatal(p2<2*NR_MAX_PDCCH_AGG_LEVEL,"number_of_candidates %d : p2 %d, CCE[%d] %d, L[%d] %d\n",number_of_candidates,p2,c_id,CCE[c_id],c_id,L[c_id]);
LOG_DDD("number_of_candidates %d : p %d p2 %d, CCE[%d] %d, L[%d] %d\n",number_of_candidates,p2,c_id,CCE[c_id],c_id,L[c_id]);
if (f_bundle_j_list[p2] == p) {
AssertFatal(f_bundle_j_list_id < 2*NR_MAX_PDCCH_AGG_LEVEL,"f_bundle_j_list_id %d\n",f_bundle_j_list_id);
f_bundle_j_list_ord[f_bundle_j_list_id] = p;
f_bundle_j_list_id++;
LOG_DDD("f_bundle_j_list_id %d p %d\n",f_bundle_j_list_id,p);
break;
}
}
......@@ -371,6 +373,7 @@ void nr_pdcch_extract_rbs_single(int32_t **rxdataF,
//uint8_t rb_count_bit;
uint8_t i, j, aarx;
int32_t *dl_ch0, *dl_ch0_ext, *rxF, *rxF_ext;
// #define DEBUG_DCI_DECODING
#ifdef DEBUG_DCI_DECODING
uint8_t symbol_mod = (symbol >= (7 - frame_parms->Ncp)) ? symbol - (7 - frame_parms->Ncp) : symbol;
......@@ -415,6 +418,8 @@ void nr_pdcch_extract_rbs_single(int32_t **rxdataF,
while ((coreset_freq_dom[c_rb_by6>>3] & (1<<(7-(c_rb_by6&7)))) == 0) {
c_rb+=6;
c_rb_by6 = c_rb/6;
//printf("c_rb %d, c_rb_by6 %d, coreset_freq_dom[c_rb_by6>>3] %d, 7-(c_rb_by6&7) %d,1<<(7-(c_rb_by6&7))) %d\n",
// c_rb,c_rb_by6,coreset_freq_dom[c_rb_by6>>3],7-(c_rb_by6&7),1<<(7-(c_rb_by6&7)));
}
rxF=NULL;
......@@ -444,7 +449,7 @@ void nr_pdcch_extract_rbs_single(int32_t **rxdataF,
//if RB to be treated is lower than middle system bandwidth then rxdataF pointed at (offset + c_br + symbol * ofdm_symbol_size): odd case
rxF = &rxdataF[aarx][(frame_parms->first_carrier_offset + 12 * c_rb + (symbol * (frame_parms->ofdm_symbol_size)))+n_BWP_start*12];
#ifdef NR_PDCCH_DCI_DEBUG
LOG_D(PHY,"in odd case c_rb (%d) is lower or equal than half N_RB_DL -> rxF = &rxdataF[aarx = (%d)][(frame_parms->first_carrier_offset + 12 * c_rb + (symbol * (frame_parms->ofdm_symbol_size))) = (%d)]\n",
LOG_I(PHY,"in odd case c_rb (%d) is lower or equal than half N_RB_DL -> rxF = &rxdataF[aarx = (%d)][(frame_parms->first_carrier_offset + 12 * c_rb + (symbol * (frame_parms->ofdm_symbol_size))) = (%d)]\n",
c_rb,aarx,(frame_parms->first_carrier_offset + 12 * c_rb + (symbol * (frame_parms->ofdm_symbol_size))));
#endif
}
......@@ -454,7 +459,7 @@ void nr_pdcch_extract_rbs_single(int32_t **rxdataF,
// if these conditions are true the pointer has to be situated at the 1st part of the rxdataF just after the first IQ symbols of the RB containing DC
rxF = &rxdataF[aarx][(12*(c_rb - (frame_parms->N_RB_DL>>1)) - 6 + (symbol * (frame_parms->ofdm_symbol_size)))+n_BWP_start*12]; // we point at the 1st part of the rxdataF in symbol
#ifdef NR_PDCCH_DCI_DEBUG
LOG_D(PHY,"in odd case c_rb (%d) is higher than half N_RB_DL (not DC) -> rxF = &rxdataF[aarx = (%d)][(12*(c_rb - frame_parms->N_RB_DL) - 5 + (symbol * (frame_parms->ofdm_symbol_size))) = (%d)]\n",
LOG_I(PHY,"in odd case c_rb (%d) is higher than half N_RB_DL (not DC) -> rxF = &rxdataF[aarx = (%d)][(12*(c_rb - frame_parms->N_RB_DL) - 5 + (symbol * (frame_parms->ofdm_symbol_size))) = (%d)]\n",
c_rb,aarx,(12*(c_rb - (frame_parms->N_RB_DL>>1)) - 6 + (symbol * (frame_parms->ofdm_symbol_size))));
#endif
}
......@@ -464,7 +469,7 @@ void nr_pdcch_extract_rbs_single(int32_t **rxdataF,
// we have to treat the RB in two parts: first part from i=0 to 5, the data is at the end of rxdataF (pointing at the end of the table)
rxF = &rxdataF[aarx][(frame_parms->first_carrier_offset + 12 * c_rb + (symbol * (frame_parms->ofdm_symbol_size)))+n_BWP_start*12];
#ifdef NR_PDCCH_DCI_DEBUG
LOG_D(PHY,"in odd case c_rb (%d) is half N_RB_DL + 1 we treat DC case -> rxF = &rxdataF[aarx = (%d)][(frame_parms->first_carrier_offset + 12 * c_rb + (symbol * (frame_parms->ofdm_symbol_size))) = (%d)]\n",
LOG_I(PHY,"in odd case c_rb (%d) is half N_RB_DL + 1 we treat DC case -> rxF = &rxdataF[aarx = (%d)][(frame_parms->first_carrier_offset + 12 * c_rb + (symbol * (frame_parms->ofdm_symbol_size))) = (%d)]\n",
c_rb,aarx,(frame_parms->first_carrier_offset + 12 * c_rb + (symbol * (frame_parms->ofdm_symbol_size))));
#endif
j = 0;
......@@ -480,7 +485,7 @@ void nr_pdcch_extract_rbs_single(int32_t **rxdataF,
// then we point at the begining of the symbol part of rxdataF do process second part of RB
rxF = &rxdataF[aarx][((symbol * (frame_parms->ofdm_symbol_size)))]; // we point at the 1st part of the rxdataF in symbol
#ifdef NR_PDCCH_DCI_DEBUG
LOG_D(PHY,"in odd case c_rb (%d) is half N_RB_DL +1 we treat DC case -> rxF = &rxdataF[aarx = (%d)][(symbol * (frame_parms->ofdm_symbol_size)) = (%d)]\n",
LOG_I(PHY,"in odd case c_rb (%d) is half N_RB_DL +1 we treat DC case -> rxF = &rxdataF[aarx = (%d)][(symbol * (frame_parms->ofdm_symbol_size)) = (%d)]\n",
c_rb,aarx,(symbol * (frame_parms->ofdm_symbol_size)));
#endif
for (; i < 12; i++) {
......@@ -506,7 +511,7 @@ void nr_pdcch_extract_rbs_single(int32_t **rxdataF,
if ((i != 1) && (i != 5) && (i != 9)) {
rxF_ext[j] = rxF[i];
#ifdef NR_PDCCH_DCI_DEBUG
LOG_D(PHY,"RB[c_rb %d] \t RE[re %d] => rxF_ext[%d]=(%d,%d)\t rxF[%d]=(%d,%d)\n",
LOG_I(PHY,"RB[c_rb %d] \t RE[re %d] => rxF_ext[%d]=(%d,%d)\t rxF[%d]=(%d,%d)\n",
c_rb, i, j, *(short *) &rxF_ext[j],*(1 + (short *) &rxF_ext[j]), i,
*(short *) &rxF[i], *(1 + (short *) &rxF[i]));
#endif
......@@ -517,7 +522,7 @@ void nr_pdcch_extract_rbs_single(int32_t **rxdataF,
j++;
} else {
#ifdef NR_PDCCH_DCI_DEBUG
LOG_D(PHY,"RB[c_rb %d] \t RE[re %d] => rxF_ext[%d]=(%d,%d)\t rxF[%d]=(%d,%d) \t\t <==> DM-RS PDCCH, this is a pilot symbol\n",
LOG_I(PHY,"RB[c_rb %d] \t RE[re %d] => rxF_ext[%d]=(%d,%d)\t rxF[%d]=(%d,%d) \t\t <==> DM-RS PDCCH, this is a pilot symbol\n",
c_rb, i, j, *(short *) &rxF_ext[j], *(1 + (short *) &rxF_ext[j]), i,
*(short *) &rxF[i], *(1 + (short *) &rxF[i]));
#endif
......@@ -572,16 +577,16 @@ void nr_pdcch_channel_compensation(int32_t **rxdataF_ext,
for (rb=0; rb<(coreset_nbr_rb*3)>>2; rb++) {
#if defined(__x86_64__) || defined(__i386__)
// multiply by conjugated channel
mmtmpP0 = _mm_madd_epi16(dl_ch128[0],rxdataF128[0]);
mmtmpP0 = _mm_madd_epi16(dl_ch128[0],rxdataF128[0]); // (ac+bd) + (bc-ad)*j, so this is real part.
//print_ints("re",&mmtmpP0);
// mmtmpP0 contains real part of 4 consecutive outputs (32-bit)
mmtmpP1 = _mm_shufflelo_epi16(dl_ch128[0],_MM_SHUFFLE(2,3,0,1));
mmtmpP1 = _mm_shufflehi_epi16(mmtmpP1,_MM_SHUFFLE(2,3,0,1));
mmtmpP1 = _mm_sign_epi16(mmtmpP1,*(__m128i *)&conjugate[0]);
mmtmpP1 = _mm_shufflelo_epi16(dl_ch128[0],_MM_SHUFFLE(2,3,0,1)); //rearrange lower 64 bit(namely switch im part and real part)
mmtmpP1 = _mm_shufflehi_epi16(mmtmpP1,_MM_SHUFFLE(2,3,0,1)); //rearrange higher 64 bit(namely switch im part and real part)
mmtmpP1 = _mm_sign_epi16(mmtmpP1,*(__m128i *)&conjugate[0]); // mmtmpP1 multiply by sign bit of conjugate(predefined), conjugate:{-1,1,-1,1,-1,1,-1,1},ad-bc?
//print_ints("im",&mmtmpP1);
mmtmpP1 = _mm_madd_epi16(mmtmpP1,rxdataF128[0]);
mmtmpP1 = _mm_madd_epi16(mmtmpP1,rxdataF128[0]); // only im part
// mmtmpP1 contains imag part of 4 consecutive outputs (32-bit)
mmtmpP0 = _mm_srai_epi32(mmtmpP0,output_shift);
mmtmpP0 = _mm_srai_epi32(mmtmpP0,output_shift); // decrease by output_shift times, amount to divide by out_shift
// print_ints("re(shift)",&mmtmpP0);
mmtmpP1 = _mm_srai_epi32(mmtmpP1,output_shift);
// print_ints("im(shift)",&mmtmpP1);
......
......@@ -258,6 +258,7 @@ int nr_ulsch_encoding(PHY_VARS_NR_UE *ue,
Ilbrm = 0;
Tbslbrm = 950984; //max tbs
Coderate = 0.0;
///////////
/////////////////////////////////////////////////////////////////////////////////////////
......@@ -350,7 +351,16 @@ int nr_ulsch_encoding(PHY_VARS_NR_UE *ue,
uint16_t Kr_bytes;
Kr_bytes = Kr>>3;
#endif
LOG_D(PHY,"[%s]harq_process->ndi %d harq_process->pusch_pdu.pusch_data.new_data_indicator %d harq_process->pusch_pdu.rb_size %d harq_process->pusch_pdu.pusch_data.tb_size %d \
&harq_process->Z %d Kb %d harq_process->pusch_pdu.mcs_index %d harq_process->pusch_pdu.mcs_table %d\n",
__FUNCTION__,
harq_process->ndi,
harq_process->pusch_pdu.pusch_data.new_data_indicator,
harq_process->pusch_pdu.rb_size,
harq_process->pusch_pdu.pusch_data.tb_size,
*pz, Kb,
harq_process->pusch_pdu.mcs_index,
harq_process->pusch_pdu.mcs_table);
///////////////////////// c---->| LDCP coding |---->d /////////////////////////
///////////
......@@ -441,6 +451,7 @@ int nr_ulsch_encoding(PHY_VARS_NR_UE *ue,
E = nr_get_E(G, harq_process->C, mod_order, harq_process->pusch_pdu.nrOfLayers, r);
Tbslbrm = nr_compute_tbslbrm(0,nb_rb,harq_process->pusch_pdu.nrOfLayers);
LOG_D(PHY,"E %d Tbslbrm %d\n",E,Tbslbrm);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_RATE_MATCHING_LDPC, VCD_FUNCTION_IN);
start_meas(&ue->ulsch_rate_matching_stats);
......
......@@ -169,6 +169,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
N_RE_prime = NR_NB_SC_PER_RB*number_of_symbols - nb_dmrs_re_per_rb*number_dmrs_symbols - N_PRB_oh;
harq_process_ul_ue->num_of_mod_symbols = N_RE_prime*nb_rb*num_of_codewords;
/////////////////////////ULSCH coding/////////////////////////
///////////
......@@ -180,7 +181,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
ulsch_ue->harq_processes[harq_pid]->a,
ulsch_ue->harq_processes[harq_pid]->pusch_pdu.pusch_data.tb_size,
0, WS_C_RNTI, rnti, frame, slot, 0, 0);
if (nr_ulsch_encoding(UE, ulsch_ue, frame_parms, harq_pid, G) == -1)
return;
......@@ -487,12 +488,91 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
}
}
}
// for(int i=26000; i<26100;i+=2) printf("%d + j*(%d)\n",((short *)txdataF[0])[i],((short *)txdataF[0])[i + 1]);
#if 0
char fname_a[100],fname_b[100], fname_c0[100], fname_d0[100],fname_e[100], fname_f[100];
char fname_scramble[100], fname_mod[100],fname_layer[100], fname_txF[100];
snprintf(fname_a,100, "/home/witcomm/work/liuxu/DiscretePHY/PUSCH/test/harq_process_%d_%d_%d_a.m", frame, slot,harq_pid);
snprintf(fname_b,100, "/home/witcomm/work/liuxu/DiscretePHY/PUSCH/test/harq_process_%d_%d_%d_b.m", frame, slot,harq_pid);
snprintf(fname_c0,100, "/home/witcomm/work/liuxu/DiscretePHY/PUSCH/test/harq_process_%d_%d_%d_c0.m", frame, slot,harq_pid);
snprintf(fname_d0,100, "/home/witcomm/work/liuxu/DiscretePHY/PUSCH/test/harq_process_%d_%d_%d_d0.m", frame, slot,harq_pid);
snprintf(fname_e,100, "/home/witcomm/work/liuxu/DiscretePHY/PUSCH/test/harq_process_%d_%d_%d_e.m", frame, slot,harq_pid);
snprintf(fname_f,100, "/home/witcomm/work/liuxu/DiscretePHY/PUSCH/test/harq_process_%d_%d_%d_f.m", frame, slot,harq_pid);
snprintf(fname_scramble,100, "/home/witcomm/work/liuxu/DiscretePHY/PUSCH/test/scramble_%d_%d_%d.m", frame, slot,harq_pid);
snprintf(fname_mod,100, "/home/witcomm/work/liuxu/DiscretePHY/PUSCH/test/modulation_%d_%d_%d.m", frame, slot,harq_pid);
snprintf(fname_layer,100, "/home/witcomm/work/liuxu/DiscretePHY/PUSCH/test/layerMapping_%d_%d_%d.m", frame, slot,harq_pid);
snprintf(fname_txF,100, "/home/witcomm/work/liuxu/DiscretePHY/PUSCH/test/txdataF_%d_%d_%d.m", frame, slot,harq_pid);
#endif
LOG_M("/home/witcomm/work/liuxu/DiscretePHY/PUSCH/test/harq_process_b.m", "ldpc_b",
ulsch_ue->harq_processes[harq_pid]->b,ulsch_ue->harq_processes[harq_pid]->B,1,9);
LOG_M("/home/witcomm/work/liuxu/DiscretePHY/PUSCH/test/harq_process_c0.m", "ldpc_c0",
ulsch_ue->harq_processes[harq_pid]->c[0],ulsch_ue->harq_processes[harq_pid]->K,1,9);
LOG_M("/home/witcomm/work/liuxu/DiscretePHY/PUSCH/test/harq_process_d0.m", "ldpc_d0",
ulsch_ue->harq_processes[harq_pid]->d[0],ulsch_ue->harq_processes[harq_pid]->Z*10,1,9);
LOG_M("/home/witcomm/work/liuxu/DiscretePHY/PUSCH/test/harq_process_e.m", "ldpc_e",
ulsch_ue->harq_processes[harq_pid]->e,1380,1,9);
LOG_M("/home/witcomm/work/liuxu/DiscretePHY/PUSCH/test/harq_process_f.m", "ldpc_f",
ulsch_ue->harq_processes[harq_pid]->f,1380,1,9);
LOG_M("/home/witcomm/work/liuxu/DiscretePHY/PUSCH/test/harq_process_a.m", "ldpc_a",
ulsch_ue->harq_processes[harq_pid]->a,ulsch_ue->harq_processes[harq_pid]->pusch_pdu.pusch_data.tb_size,1,9);
LOG_M("/home/witcomm/work/liuxu/DiscretePHY/PUSCH/test/scramble.m", "scramble",
scrambled_output[cwd_index],NR_MAX_PDSCH_ENCODED_LENGTH>>5,1,9);
LOG_M("/home/witcomm/work/liuxu/DiscretePHY/PUSCH/test/modulation.m", "scramble",
(int16_t *)ulsch_ue->d_mod,(available_bits/mod_order)*sizeof(int16_t),1,1);
LOG_M("/home/witcomm/work/liuxu/DiscretePHY/PUSCH/test/layerMapping.m", "layer_mapping",
(int16_t *)tx_layers[0],(available_bits/mod_order)*sizeof(int16_t),1,1);
LOG_M("/home/witcomm/work/liuxu/DiscretePHY/PUSCH/test/txdataF.m", "txdataF",
txdataF[0],frame_parms->ofdm_symbol_size*14,1,1);
LOG_I(PHY, "(frame %d slot %d harq_pid %d)%s data already saved in /home/witcomm/work/liuxu/DiscretePHY/PUSCH/test/\n",
frame, slot, harq_pid, __FUNCTION__);
// LOG_M("/home/witcomm/work/liuxu/DiscretePHY/PUSCH/test/txdataF.m", "txF",txdataF[0],frame_parms->ofdm_symbol_size*14,1,1);
// LOG_I(PHY,"%d\n",harq_process_ul_ue->pusch_pdu.pusch_ptrs.ptrs_freq_density);
// LOG_I(PHY,"%d\n",harq_process_ul_ue->pusch_pdu.pusch_ptrs.ptrs_time_density);
// LOG_I(PHY,"%d\n",pusch_pdu->transform_precoding);
// LOG_I(PHY,"%d\n",pusch_pdu->dfts_ofdm.low_papr_group_number);
// LOG_I(PHY,"%d\n",pusch_pdu->dfts_ofdm.low_papr_sequence_number);
// LOG_I(PHY,"%d\n",pusch_pdu->pdu_bit_map);
// LOG_I(PHY,"%d\n",pusch_pdu->pusch_ptrs.ptrs_ports_list->ptrs_re_offset);
LOG_D(PHY,"[%s]harq_pid %d frame %d slot %d thread_id %d gNB_id %d cwd_index %d pusch_pdu->start_symbol_index %d pusch_pdu->ul_dmrs_symb_pos %d pusch_pdu->nr_of_symbols %d \
pusch_pdu->dmrs_config_type %d pusch_pdu->rb_start %d pusch_pdu->nrOfLayers %d pusch_pdu->qam_mod_order %d pusch_pdu->rnti %x pusch_pdu->num_dmrs_cdm_grps_no_data %d \
frame_parms->first_carrier_offset %d pusch_pdu->bwp_start %d frame_parms->ofdm_symbol_size %d ulsch_ue->Nid_cell %d harq_process_ul_ue->pusch_pdu.pusch_ptrs.ptrs_freq_density %d \
harq_process_ul_ue->pusch_pdu.pusch_ptrs.ptrs_time_density %d pusch_pdu->transform_precoding %d pusch_pdu->dfts_ofdm.low_papr_group_number %d \
pusch_pdu->dfts_ofdm.low_papr_sequence_number %d pusch_pdu->pdu_bit_map %d pusch_pdu->pusch_ptrs.ptrs_ports_list[0].ptrs_re_offset %d\n",
__FUNCTION__,
harq_pid,
frame,
slot,
thread_id,
gNB_id,
cwd_index,
pusch_pdu->start_symbol_index,
pusch_pdu->ul_dmrs_symb_pos,
pusch_pdu->nr_of_symbols,
pusch_pdu->dmrs_config_type,
pusch_pdu->rb_start,
pusch_pdu->nrOfLayers,
pusch_pdu->qam_mod_order,
pusch_pdu->rnti,
pusch_pdu->num_dmrs_cdm_grps_no_data,
frame_parms->first_carrier_offset,
pusch_pdu->bwp_start,
frame_parms->ofdm_symbol_size,
ulsch_ue->Nid_cell,
harq_process_ul_ue->pusch_pdu.pusch_ptrs.ptrs_freq_density,
harq_process_ul_ue->pusch_pdu.pusch_ptrs.ptrs_time_density,
pusch_pdu->transform_precoding,
pusch_pdu->dfts_ofdm.low_papr_group_number,
pusch_pdu->dfts_ofdm.low_papr_sequence_number,
pusch_pdu->pdu_bit_map,0);
// pusch_pdu->pusch_ptrs.ptrs_ports_list[0].ptrs_re_offset);
}
NR_UL_UE_HARQ_t *harq_process_ulsch=NULL;
harq_process_ulsch = UE->ulsch[thread_id][gNB_id][0]->harq_processes[harq_pid];
harq_process_ulsch->status = SCH_IDLE;
///////////
////////////////////////////////////////////////////////////////////////
......@@ -522,7 +602,7 @@ uint8_t nr_ue_pusch_common_procedures(PHY_VARS_NR_UE *UE,
txdata = UE->common_vars.txdata;
txdataF = UE->common_vars.txdataF;
// LOG_M("/home/witcomm/work/liuxu/DiscretePHY/PUSCH/test/txdataF_pre_ofdm.m", "txdataF_pre",txdataF[0],frame_parms->ofdm_symbol_size*14,1,1);
int symb_offset = (slot%frame_parms->slots_per_subframe)*frame_parms->symbols_per_slot;
for(ap = 0; ap < Nl; ap++) {
for (int s=0;s<NR_NUMBER_OF_SYMBOLS_PER_SLOT;s++){
......@@ -541,6 +621,8 @@ uint8_t nr_ue_pusch_common_procedures(PHY_VARS_NR_UE *UE,
15);
}
}
// LOG_M("/home/witcomm/work/liuxu/DiscretePHY/PUSCH/test/rotate_cpx_vector.m","cpx",&txdataF[0][0],NR_NUMBER_OF_SYMBOLS_PER_SLOT*frame_parms->ofdm_symbol_size,1,1);
for (ap = 0; ap < Nl; ap++) {
if (frame_parms->Ncp == 1) { // extended cyclic prefix
......@@ -558,8 +640,15 @@ uint8_t nr_ue_pusch_common_procedures(PHY_VARS_NR_UE *UE,
slot);
}
}
///////////
// printf("txdata :%lu txdataF %lu\n",sizeofArray(UE->common_vars.txdataF[0]),sizeofArray(UE->common_vars.txdata[0]));
// LOG_M("/home/witcomm/work/liuxu/DiscretePHY/PUSCH/test/PHY_ofdm_mod.m","txdata",&txdata[0][tx_offset],frame_parms->samples_per_slot0,1,1);
// LOG_I(PHY,"frame_parms->nb_prefix_samples %d\n",frame_parms->nb_prefix_samples);
// LOG_I(PHY,"slot %d tx_offset %d\n", slot,tx_offset);
// LOG_I(PHY,"frame_parms->Ncp %d\n",frame_parms->Ncp);
// LOG_I(PHY,"sample_per_slotN0 %lu\n",frame_parms->samples_per_slotN0);
// LOG_I(PHY,"sample_per_slot0 %lu\n",frame_parms->samples_per_slot0);
// LOG_I(PHY,"rnti %x\n",UE->ulsch[0][0][0]->harq_processes[0]->pusch_pdu.rnti);
///////////
////////////////////////////////////////////////////
return 0;
}
......@@ -46,7 +46,7 @@
#include "PHY/NR_UE_TRANSPORT/srs_modulation_nr.h"
#undef DEFINE_VARIABLES_SRS_MODULATION_NR_H
//#define SRS_DEBUG
#define SRS_DEBUG
/*******************************************************************
*
......
This diff is collapsed.
This diff is collapsed.
......@@ -1379,7 +1379,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_RX, VCD_FUNCTION_IN);
start_meas(&ue->phy_proc_rx[proc->thread_id]);
LOG_D(PHY," ****** start RX-Chain for Frame.Slot %d.%d (energy %d dB)****** \n",
LOG_I(PHY," ****** start RX-Chain for Frame.Slot %d.%d (energy %d dB)****** \n",
frame_rx%1024, nr_slot_rx,
dB_fixed(signal_energy(ue->common_vars.common_vars_rx_data_per_thread[proc->thread_id].rxdataF[0],2048*14)));
......@@ -1446,7 +1446,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
#ifdef NR_PDCCH_SCHED
LOG_D(PHY," ------ --> PDCCH ChannelComp/LLR Frame.slot %d.%d ------ \n", frame_rx%1024, nr_slot_rx);
LOG_I(PHY," ------ --> PDCCH ChannelComp/LLR Frame.slot %d.%d ------ \n", frame_rx%1024, nr_slot_rx);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP_PDCCH, VCD_FUNCTION_IN);
for (uint16_t l=0; l<nb_symb_pdcch; l++) {
......@@ -1484,7 +1484,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
if (dci_cnt > 0) {
LOG_D(PHY,"[UE %d] Frame %d, nr_slot_rx %d: found %d DCIs\n", ue->Mod_id, frame_rx, nr_slot_rx, dci_cnt);
LOG_I(PHY,"[UE %d] Frame %d, nr_slot_rx %d: found %d DCIs\n", ue->Mod_id, frame_rx, nr_slot_rx, dci_cnt);
NR_UE_DLSCH_t *dlsch = NULL;
if (ue->dlsch[proc->thread_id][gNB_id][0]->active == 1){
......@@ -1502,7 +1502,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
uint16_t nb_symb_sch = dlsch0_harq->nb_symbols;
uint16_t start_symb_sch = dlsch0_harq->start_symbol;
LOG_D(PHY," ------ --> PDSCH ChannelComp/LLR Frame.slot %d.%d ------ \n", frame_rx%1024, nr_slot_rx);
LOG_I(PHY," ------ --> PDSCH ChannelComp/LLR Frame.slot %d.%d ------ \n", frame_rx%1024, nr_slot_rx);
//to update from pdsch config
for (uint16_t m=start_symb_sch;m<(nb_symb_sch+start_symb_sch) ; m++){
......
......@@ -173,7 +173,7 @@
{GNB_CONFIG_STRING_DLCARRIERBANDWIDTH,NULL,0,i64ptr:&scc->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->carrierBandwidth,defint64val:217,TYPE_INT64,0 /*10*/}, \
{GNB_CONFIG_STRING_INITIALDLBWPLOCATIONANDBANDWIDTH,NULL,0,i64ptr:&scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth,defint64val:13036,TYPE_INT64,0/*11*/},\
{GNB_CONFIG_STRING_INITIALDLBWPSUBCARRIERSPACING,NULL,0,i64ptr:&scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.subcarrierSpacing,defint64val:NR_SubcarrierSpacing_kHz30,TYPE_INT64,0/*12*/},\
{GNB_CONFIG_STRING_INITIALDLBWPCONTROLRESOURCESETZERO,NULL,0,i64ptr:scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->controlResourceSetZero,defint64val:12,TYPE_INT64,0/*13*/},\
{GNB_CONFIG_STRING_INITIALDLBWPCONTROLRESOURCESETZERO,NULL,0,i64ptr:scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->controlResourceSetZero,defint64val:4,TYPE_INT64,0/*13*/},\
{GNB_CONFIG_STRING_INITIALDLBWPSEARCHSPACEZERO,NULL,0,i64ptr:scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->searchSpaceZero,defint64val:0,TYPE_INT64,0/*14*/},\
{GNB_CONFIG_STRING_ULFREQUENCYBAND,NULL,0,i64ptr:scc->uplinkConfigCommon->frequencyInfoUL->frequencyBandList->list.array[0],defint64val:-1,TYPE_INT64,0/*63*/},\
{GNB_CONFIG_STRING_ULABSOLUEFREQUENCYPOINTA,NULL,0,i64ptr:scc->uplinkConfigCommon->frequencyInfoUL->absoluteFrequencyPointA,defint64val:-1,TYPE_INT64,0/*64*/},\
......
......@@ -1027,11 +1027,13 @@ void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
paramlist_def_t pdcch_ConfigSIB1ParamList = {GNB_CONFIG_STRING_PDCCH_CONFIGSIB1, NULL, 0};
sprintf(aprefix, "%s.[%i]", GNB_CONFIG_STRING_GNB_LIST, 0);
config_getlist(&pdcch_ConfigSIB1ParamList, NULL, 0, aprefix);
// LOG_I(RRC,"-------------------rrc->carrier.pdcch_ConfigSIB1:%d\n",rrc->carrier.pdcch_ConfigSIB1->controlResourceSetZero);
if (pdcch_ConfigSIB1ParamList.numelt > 0) {
sprintf(aprefix, "%s.[%i].%s.[%i]", GNB_CONFIG_STRING_GNB_LIST,0,GNB_CONFIG_STRING_PDCCH_CONFIGSIB1, 0);
config_get(pdcch_ConfigSIB1,sizeof(pdcch_ConfigSIB1)/sizeof(paramdef_t),aprefix);
}
// LOG_I(RRC,"-------------------rrc->carrier.pdcch_ConfigSIB1:%d\n",rrc->carrier.pdcch_ConfigSIB1->controlResourceSetZero);
sprintf(aprefix, "%s.[%i]", GNB_CONFIG_STRING_GNB_LIST, 0);
config_getlist(&SCCsParamList, NULL, 0, aprefix);
......
......@@ -1048,7 +1048,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
harq->is_waiting = true;
UE_info->mac_stats[UE_id].dlsch_rounds[harq->round]++;
LOG_D(NR_MAC,
LOG_I(NR_MAC,
"%4d.%2d [DLSCH/PDSCH/PUCCH] UE %d RNTI %04x DCI L %d start %3d RBs %3d startSymbol %2d nb_symbol %2d dmrspos %x MCS %2d TBS %4d HARQ PID %2d round %d RV %d NDI %d dl_data_to_ULACK %d (%d.%d) PUCCH allocation %d TPC %d\n",
frame,
slot,
......
......@@ -1774,6 +1774,7 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, sub_frame_t slot)
&pusch_pdu->pusch_ptrs.ptrs_freq_density,&pusch_pdu->pusch_ptrs.ptrs_time_density,
&pusch_pdu->pusch_ptrs.ptrs_ports_list->ptrs_re_offset,&pusch_pdu->pusch_ptrs.num_ptrs_ports,
&pusch_pdu->pusch_ptrs.ul_ptrs_power, pusch_pdu->nr_of_symbols);
LOG_I(MAC,"*************************%d\n",pusch_pdu->pusch_ptrs.ptrs_ports_list->ptrs_re_offset) ;
if (valid_ptrs_setup==true) {
pusch_pdu->pdu_bit_map |= PUSCH_PDU_BITMAP_PUSCH_PTRS; // enable PUSCH PTRS
}
......
......@@ -247,6 +247,7 @@ int8_t mac_rrc_nr_data_req(const module_id_t Mod_idP,
// min_channel_bw);
mib->message.choice.mib->pdcch_ConfigSIB1.controlResourceSetZero = carrier->pdcch_ConfigSIB1->controlResourceSetZero;
LOG_D(RRC,"1111111111111111 controlResourceSetZero=%d\n",carrier->pdcch_ConfigSIB1->controlResourceSetZero);
mib->message.choice.mib->pdcch_ConfigSIB1.searchSpaceZero = carrier->pdcch_ConfigSIB1->searchSpaceZero;
mib->message.choice.mib->systemFrameNumber.buf[0] = sfn_msb << 2;
......
......@@ -233,6 +233,7 @@ uint8_t do_MIB_NR(gNB_RRC_INST *rrc,uint32_t frame) {
mib->message.choice.mib->pdcch_ConfigSIB1.controlResourceSetZero = *scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->controlResourceSetZero;
mib->message.choice.mib->pdcch_ConfigSIB1.searchSpaceZero = *scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->searchSpaceZero;
}
LOG_D(RRC,"/////////////////pdcch_ConfigSIB1->controlResourceSetZero=%d\n",mib->message.choice.mib->pdcch_ConfigSIB1.controlResourceSetZero);
AssertFatal(scc->ssbSubcarrierSpacing != NULL, "scc->ssbSubcarrierSpacing is null\n");
switch (*scc->ssbSubcarrierSpacing) {
......
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