- UE channel estimation no longer done in slot_fep. Also created dedicated memory for channel estimates of different channels
- using nr_extract_dci_info instead of nr_generate_ue_ul_dlsch_params_from_dci as in phy_procedures_nr_ue. The latter was only a (poor) wrapper and not doing what the name suggests. also with FAPI things have to be done differently now. This will come in a next commit. - other minor changes to remove warning prepreatory changes
This commit is contained in:
@@ -607,6 +607,7 @@ void phy_init_nr_ue__PDSCH( NR_UE_PDSCH* const pdsch, const NR_DL_FRAME_PARMS* c
|
|||||||
pdsch->rxdataF_uespec_pilots = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
pdsch->rxdataF_uespec_pilots = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
||||||
pdsch->rxdataF_comp0 = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
pdsch->rxdataF_comp0 = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
||||||
pdsch->rho = (int32_t**)malloc16_clear( fp->nb_antennas_rx*sizeof(int32_t*) );
|
pdsch->rho = (int32_t**)malloc16_clear( fp->nb_antennas_rx*sizeof(int32_t*) );
|
||||||
|
pdsch->dl_ch_estimates = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
||||||
pdsch->dl_ch_estimates_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
pdsch->dl_ch_estimates_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
||||||
pdsch->dl_bf_ch_estimates = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
pdsch->dl_bf_ch_estimates = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
||||||
pdsch->dl_bf_ch_estimates_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
pdsch->dl_bf_ch_estimates_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
||||||
@@ -628,6 +629,7 @@ void phy_init_nr_ue__PDSCH( NR_UE_PDSCH* const pdsch, const NR_DL_FRAME_PARMS* c
|
|||||||
pdsch->rxdataF_ext[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
|
pdsch->rxdataF_ext[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
|
||||||
pdsch->rxdataF_uespec_pilots[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * fp->N_RB_DL*12);
|
pdsch->rxdataF_uespec_pilots[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * fp->N_RB_DL*12);
|
||||||
pdsch->rxdataF_comp0[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
|
pdsch->rxdataF_comp0[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
|
||||||
|
pdsch->dl_ch_estimates[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * fp->ofdm_symbol_size*7*2);
|
||||||
pdsch->dl_ch_estimates_ext[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
|
pdsch->dl_ch_estimates_ext[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
|
||||||
pdsch->dl_bf_ch_estimates[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * fp->ofdm_symbol_size*7*2);
|
pdsch->dl_bf_ch_estimates[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * fp->ofdm_symbol_size*7*2);
|
||||||
pdsch->dl_bf_ch_estimates_ext[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
|
pdsch->dl_bf_ch_estimates_ext[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
|
||||||
@@ -724,22 +726,6 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Channel estimates
|
|
||||||
for (eNB_id=0; eNB_id<7; eNB_id++) {
|
|
||||||
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
|
|
||||||
common_vars->common_vars_rx_data_per_thread[th_id].dl_ch_estimates[eNB_id] = (int32_t**)malloc16_clear(8*sizeof(int32_t*));
|
|
||||||
common_vars->common_vars_rx_data_per_thread[th_id].dl_ch_estimates_time[eNB_id] = (int32_t**)malloc16_clear(8*sizeof(int32_t*));
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i=0; i<fp->nb_antennas_rx; i++)
|
|
||||||
for (j=0; j<4; j++) {
|
|
||||||
int idx = (j<<1) + i;
|
|
||||||
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
|
|
||||||
common_vars->common_vars_rx_data_per_thread[th_id].dl_ch_estimates[eNB_id][idx] = (int32_t*)malloc16_clear( sizeof(int32_t)*fp->symbols_per_slot*(fp->ofdm_symbol_size+LTE_CE_FILTER_LENGTH) );
|
|
||||||
common_vars->common_vars_rx_data_per_thread[th_id].dl_ch_estimates_time[eNB_id][idx] = (int32_t*)malloc16_clear( sizeof(int32_t)*fp->ofdm_symbol_size*2 );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// DLSCH
|
// DLSCH
|
||||||
for (eNB_id=0; eNB_id<ue->n_connected_eNB; eNB_id++) {
|
for (eNB_id=0; eNB_id<ue->n_connected_eNB; eNB_id++) {
|
||||||
@@ -832,30 +818,32 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
|
|||||||
(*pdcch_vars_th)[th_id][eNB_id]->rho = (int32_t**)malloc16( fp->nb_antennas_rx*sizeof(int32_t*) );
|
(*pdcch_vars_th)[th_id][eNB_id]->rho = (int32_t**)malloc16( fp->nb_antennas_rx*sizeof(int32_t*) );
|
||||||
(*pdcch_vars_th)[th_id][eNB_id]->rxdataF_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
(*pdcch_vars_th)[th_id][eNB_id]->rxdataF_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
||||||
(*pdcch_vars_th)[th_id][eNB_id]->dl_ch_estimates_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
(*pdcch_vars_th)[th_id][eNB_id]->dl_ch_estimates_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
||||||
}
|
|
||||||
|
|
||||||
for (i=0; i<fp->nb_antennas_rx; i++) {
|
|
||||||
//ue_pdcch_vars[eNB_id]->rho[i] = (int32_t*)malloc16_clear( sizeof(int32_t)*(fp->N_RB_DL*12*7*2) );
|
|
||||||
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
|
|
||||||
(*pdcch_vars_th)[th_id][eNB_id]->rho[i] = (int32_t*)malloc16_clear( sizeof(int32_t)*(100*12*4) );
|
|
||||||
}
|
|
||||||
|
|
||||||
for (j=0; j<4; j++) { //fp->nb_antennas_tx; j++)
|
// Channel estimates
|
||||||
int idx = (j<<1)+i;
|
(*pdcch_vars_th)[th_id][eNB_id]->dl_ch_estimates = (int32_t**)malloc16_clear(8*sizeof(int32_t*));
|
||||||
// size_t num = 7*2*fp->N_RB_DL*12;
|
(*pdcch_vars_th)[th_id][eNB_id]->dl_ch_estimates_time = (int32_t**)malloc16_clear(8*sizeof(int32_t*));
|
||||||
size_t num = 4*100*12; // 4 symbols, 100 PRBs, 12 REs per PRB
|
|
||||||
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
|
for (i=0; i<fp->nb_antennas_rx; i++) {
|
||||||
|
(*pdcch_vars_th)[th_id][eNB_id]->rho[i] = (int32_t*)malloc16_clear( sizeof(int32_t)*(100*12*4) );
|
||||||
|
for (j=0; j<4; j++) {
|
||||||
|
int idx = (j<<1) + i;
|
||||||
|
(*pdcch_vars_th)[th_id][eNB_id]->dl_ch_estimates[idx] = (int32_t*)malloc16_clear( sizeof(int32_t)*fp->symbols_per_slot*(fp->ofdm_symbol_size+LTE_CE_FILTER_LENGTH) );
|
||||||
|
(*pdcch_vars_th)[th_id][eNB_id]->dl_ch_estimates_time[idx] = (int32_t*)malloc16_clear( sizeof(int32_t)*fp->ofdm_symbol_size*2 );
|
||||||
|
|
||||||
|
// size_t num = 7*2*fp->N_RB_DL*12;
|
||||||
|
size_t num = 4*100*12; // 4 symbols, 100 PRBs, 12 REs per PRB
|
||||||
(*pdcch_vars_th)[th_id][eNB_id]->rxdataF_comp[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
|
(*pdcch_vars_th)[th_id][eNB_id]->rxdataF_comp[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
|
||||||
(*pdcch_vars_th)[th_id][eNB_id]->dl_ch_rho_ext[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
|
(*pdcch_vars_th)[th_id][eNB_id]->dl_ch_rho_ext[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
|
||||||
(*pdcch_vars_th)[th_id][eNB_id]->rxdataF_ext[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
|
(*pdcch_vars_th)[th_id][eNB_id]->rxdataF_ext[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
|
||||||
(*pdcch_vars_th)[th_id][eNB_id]->dl_ch_estimates_ext[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
|
(*pdcch_vars_th)[th_id][eNB_id]->dl_ch_estimates_ext[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// PBCH
|
// PBCH
|
||||||
pbch_vars[eNB_id]->rxdataF_ext = (int32_t**)malloc16( fp->nb_antennas_rx*sizeof(int32_t*) );
|
pbch_vars[eNB_id]->rxdataF_ext = (int32_t**)malloc16( fp->nb_antennas_rx*sizeof(int32_t*) );
|
||||||
pbch_vars[eNB_id]->rxdataF_comp = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
pbch_vars[eNB_id]->rxdataF_comp = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
||||||
|
pbch_vars[eNB_id]->dl_ch_estimates = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
||||||
pbch_vars[eNB_id]->dl_ch_estimates_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
pbch_vars[eNB_id]->dl_ch_estimates_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
||||||
pbch_vars[eNB_id]->llr = (int16_t*)malloc16_clear( 1920 );//
|
pbch_vars[eNB_id]->llr = (int16_t*)malloc16_clear( 1920 );//
|
||||||
prach_vars[eNB_id]->prachF = (int16_t*)malloc16_clear( sizeof(int)*(7*2*sizeof(int)*(fp->ofdm_symbol_size*12)) );
|
prach_vars[eNB_id]->prachF = (int16_t*)malloc16_clear( sizeof(int)*(7*2*sizeof(int)*(fp->ofdm_symbol_size*12)) );
|
||||||
@@ -867,6 +855,7 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
|
|||||||
for (j=0; j<4; j++) {//fp->nb_antennas_tx;j++) {
|
for (j=0; j<4; j++) {//fp->nb_antennas_tx;j++) {
|
||||||
int idx = (j<<1)+i;
|
int idx = (j<<1)+i;
|
||||||
pbch_vars[eNB_id]->rxdataF_comp[idx] = (int32_t*)malloc16_clear( sizeof(int32_t)*20*12*4 );
|
pbch_vars[eNB_id]->rxdataF_comp[idx] = (int32_t*)malloc16_clear( sizeof(int32_t)*20*12*4 );
|
||||||
|
pbch_vars[eNB_id]->dl_ch_estimates[idx] = (int32_t*)malloc16_clear( sizeof(int32_t)*7*2*sizeof(int)*(fp->ofdm_symbol_size) );
|
||||||
pbch_vars[eNB_id]->dl_ch_estimates_ext[idx] = (int32_t*)malloc16_clear( sizeof(int32_t)*20*12*4 );
|
pbch_vars[eNB_id]->dl_ch_estimates_ext[idx] = (int32_t*)malloc16_clear( sizeof(int32_t)*20*12*4 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,8 +52,7 @@ int nr_slot_fep(PHY_VARS_NR_UE *phy_vars_ue,
|
|||||||
unsigned char l,
|
unsigned char l,
|
||||||
unsigned char Ns,
|
unsigned char Ns,
|
||||||
int sample_offset,
|
int sample_offset,
|
||||||
int no_prefix,
|
int no_prefix);
|
||||||
NR_CHANNEL_EST_t channel);
|
|
||||||
|
|
||||||
int slot_fep_mbsfn(PHY_VARS_UE *phy_vars_ue,
|
int slot_fep_mbsfn(PHY_VARS_UE *phy_vars_ue,
|
||||||
unsigned char l,
|
unsigned char l,
|
||||||
|
|||||||
@@ -35,16 +35,14 @@
|
|||||||
#endif*/
|
#endif*/
|
||||||
|
|
||||||
int nr_slot_fep(PHY_VARS_NR_UE *ue,
|
int nr_slot_fep(PHY_VARS_NR_UE *ue,
|
||||||
unsigned char l,
|
unsigned char symbol,
|
||||||
unsigned char Ns,
|
unsigned char Ns,
|
||||||
int sample_offset,
|
int sample_offset,
|
||||||
int no_prefix,
|
int no_prefix)
|
||||||
NR_CHANNEL_EST_t channel)
|
|
||||||
{
|
{
|
||||||
NR_DL_FRAME_PARMS *frame_parms = &ue->frame_parms;
|
NR_DL_FRAME_PARMS *frame_parms = &ue->frame_parms;
|
||||||
NR_UE_COMMON *common_vars = &ue->common_vars;
|
NR_UE_COMMON *common_vars = &ue->common_vars;
|
||||||
unsigned char aa;
|
unsigned char aa;
|
||||||
unsigned char symbol = l;//+((7-frame_parms->Ncp)*(Ns&1)); ///symbol within sub-frame
|
|
||||||
unsigned int nb_prefix_samples;
|
unsigned int nb_prefix_samples;
|
||||||
unsigned int nb_prefix_samples0;
|
unsigned int nb_prefix_samples0;
|
||||||
if (ue->is_synchronized) {
|
if (ue->is_synchronized) {
|
||||||
@@ -60,19 +58,7 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue,
|
|||||||
//int i;
|
//int i;
|
||||||
unsigned int frame_length_samples = frame_parms->samples_per_subframe * 10;
|
unsigned int frame_length_samples = frame_parms->samples_per_subframe * 10;
|
||||||
unsigned int rx_offset;
|
unsigned int rx_offset;
|
||||||
NR_UE_PDCCH *pdcch_vars = ue->pdcch_vars[ue->current_thread_id[Ns]][0];
|
|
||||||
uint16_t coreset_start_subcarrier = frame_parms->first_carrier_offset;//+((int)floor(frame_parms->ssb_start_subcarrier/NR_NB_SC_PER_RB)+pdcch_vars->coreset[0].rb_offset)*NR_NB_SC_PER_RB;
|
|
||||||
uint16_t nb_rb_coreset = 0;
|
|
||||||
uint16_t bwp_start_subcarrier = frame_parms->first_carrier_offset;//+516;
|
|
||||||
uint16_t nb_rb_pdsch = 50;
|
|
||||||
uint8_t p=0;
|
|
||||||
uint8_t l0 = pdcch_vars->coreset[0].duration;
|
|
||||||
uint64_t coreset_freq_dom = pdcch_vars->coreset[0].frequencyDomainResources;
|
|
||||||
for (int i = 0; i < 45; i++) {
|
|
||||||
if (((coreset_freq_dom & 0x1FFFFFFFFFFF) >> i) & 0x1) nb_rb_coreset++;
|
|
||||||
}
|
|
||||||
nb_rb_coreset = 6 * nb_rb_coreset;
|
|
||||||
//printf("corset duration %d nb_rb_coreset %d\n", l0, nb_rb_coreset);
|
|
||||||
|
|
||||||
void (*dft)(int16_t *,int16_t *, int);
|
void (*dft)(int16_t *,int16_t *, int);
|
||||||
int tmp_dft_in[8192] __attribute__ ((aligned (32))); // This is for misalignment issues for 6 and 15 PRBs
|
int tmp_dft_in[8192] __attribute__ ((aligned (32))); // This is for misalignment issues for 6 and 15 PRBs
|
||||||
@@ -146,7 +132,7 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue,
|
|||||||
nb_prefix_samples,nb_prefix_samples0,slot_offset,sample_offset,rx_offset,frame_length_samples);
|
nb_prefix_samples,nb_prefix_samples0,slot_offset,sample_offset,rx_offset,frame_length_samples);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (l==0) {
|
if (symbol==0) {
|
||||||
|
|
||||||
if (rx_offset > (frame_length_samples - frame_parms->ofdm_symbol_size))
|
if (rx_offset > (frame_length_samples - frame_parms->ofdm_symbol_size))
|
||||||
memcpy((short *)&common_vars->rxdata[aa][frame_length_samples],
|
memcpy((short *)&common_vars->rxdata[aa][frame_length_samples],
|
||||||
@@ -171,7 +157,7 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue,
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
rx_offset += (frame_parms->ofdm_symbol_size+nb_prefix_samples)*l;// +
|
rx_offset += (frame_parms->ofdm_symbol_size+nb_prefix_samples)*symbol;// +
|
||||||
// (frame_parms->ofdm_symbol_size+nb_prefix_samples)*(l-1);
|
// (frame_parms->ofdm_symbol_size+nb_prefix_samples)*(l-1);
|
||||||
|
|
||||||
if (rx_offset > (frame_length_samples - frame_parms->ofdm_symbol_size))
|
if (rx_offset > (frame_length_samples - frame_parms->ofdm_symbol_size))
|
||||||
@@ -206,68 +192,6 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue,
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ue->perfect_ce == 0) {
|
|
||||||
|
|
||||||
switch(channel){
|
|
||||||
case NR_PBCH_EST:
|
|
||||||
break;
|
|
||||||
|
|
||||||
case NR_PDCCH_EST:
|
|
||||||
|
|
||||||
#ifdef DEBUG_FEP
|
|
||||||
printf("PDCCH Channel estimation aatx %d, slot %d, symbol %d start_sc %d\n",aa,Ns,l,coreset_start_subcarrier);
|
|
||||||
#endif
|
|
||||||
#if UE_TIMING_TRACE
|
|
||||||
start_meas(&ue->dlsch_channel_estimation_stats);
|
|
||||||
#endif
|
|
||||||
nr_pdcch_channel_estimation(ue,0,
|
|
||||||
Ns,
|
|
||||||
l,
|
|
||||||
symbol,
|
|
||||||
coreset_start_subcarrier,
|
|
||||||
nb_rb_coreset);
|
|
||||||
#if UE_TIMING_TRACE
|
|
||||||
stop_meas(&ue->dlsch_channel_estimation_stats);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case NR_PDSCH_EST:
|
|
||||||
#ifdef DEBUG_FEP
|
|
||||||
printf("Channel estimation aatx %d, slot %d, symbol %d\n",aa,Ns,l);
|
|
||||||
#endif
|
|
||||||
#if UE_TIMING_TRACE
|
|
||||||
start_meas(&ue->dlsch_channel_estimation_stats);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
ue->frame_parms.nushift = (p>>1)&1;;
|
|
||||||
|
|
||||||
if (symbol ==l0)
|
|
||||||
nr_pdsch_channel_estimation(ue,0,
|
|
||||||
Ns,
|
|
||||||
p,
|
|
||||||
l,
|
|
||||||
symbol,
|
|
||||||
bwp_start_subcarrier,
|
|
||||||
nb_rb_pdsch);
|
|
||||||
|
|
||||||
#if UE_TIMING_TRACE
|
|
||||||
stop_meas(&ue->dlsch_channel_estimation_stats);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case NR_SSS_EST:
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
LOG_E(PHY,"[UE][FATAL] Unknown channel format %d\n",channel);
|
|
||||||
return(-1);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef DEBUG_FEP
|
#ifdef DEBUG_FEP
|
||||||
printf("slot_fep: done\n");
|
printf("slot_fep: done\n");
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -60,8 +60,8 @@ void nr_adjust_synch_ue(NR_DL_FRAME_PARMS *frame_parms,
|
|||||||
temp = 0;
|
temp = 0;
|
||||||
|
|
||||||
for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
|
for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
|
||||||
Re = ((int16_t*)ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_id][aa])[(i<<1)];
|
Re = ((int16_t*)ue->pdcch_vars[ue->current_thread_id[subframe]][eNB_id]->dl_ch_estimates_time[aa])[(i<<1)];
|
||||||
Im = ((int16_t*)ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_id][aa])[1+(i<<1)];
|
Im = ((int16_t*)ue->pdcch_vars[ue->current_thread_id[subframe]][eNB_id]->dl_ch_estimates_time[aa])[1+(i<<1)];
|
||||||
temp += (Re*Re/2) + (Im*Im/2);
|
temp += (Re*Re/2) + (Im*Im/2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,12 +22,10 @@
|
|||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
//#include "defs.h"
|
#include "nr_estimation.h"
|
||||||
//#include "SCHED/defs.h"
|
|
||||||
#include "PHY/defs_nr_UE.h"
|
|
||||||
#include "PHY/NR_REFSIG/refsig_defs_ue.h"
|
#include "PHY/NR_REFSIG/refsig_defs_ue.h"
|
||||||
#include "filt16a_32.h"
|
#include "filt16a_32.h"
|
||||||
#include "T.h"
|
|
||||||
//#define DEBUG_PDSCH
|
//#define DEBUG_PDSCH
|
||||||
//#define DEBUG_PDCCH
|
//#define DEBUG_PDCCH
|
||||||
|
|
||||||
@@ -211,7 +209,7 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue,
|
|||||||
//uint16_t Nid_cell = (eNB_offset == 0) ? ue->frame_parms.Nid_cell : ue->measurements.adj_cell_id[eNB_offset-1];
|
//uint16_t Nid_cell = (eNB_offset == 0) ? ue->frame_parms.Nid_cell : ue->measurements.adj_cell_id[eNB_offset-1];
|
||||||
|
|
||||||
uint8_t nushift;
|
uint8_t nushift;
|
||||||
int **dl_ch_estimates =ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[Ns]].dl_ch_estimates[eNB_offset];
|
int **dl_ch_estimates =ue->pbch_vars[eNB_offset]->dl_ch_estimates;
|
||||||
int **rxdataF=ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[Ns]].rxdataF;
|
int **rxdataF=ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[Ns]].rxdataF;
|
||||||
|
|
||||||
nushift = ue->frame_parms.Nid_cell%4;
|
nushift = ue->frame_parms.Nid_cell%4;
|
||||||
@@ -413,7 +411,6 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue,
|
|||||||
int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
|
int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
|
||||||
uint8_t eNB_offset,
|
uint8_t eNB_offset,
|
||||||
unsigned char Ns,
|
unsigned char Ns,
|
||||||
unsigned char l,
|
|
||||||
unsigned char symbol,
|
unsigned char symbol,
|
||||||
unsigned short coreset_start_subcarrier,
|
unsigned short coreset_start_subcarrier,
|
||||||
unsigned short nb_rb_coreset)
|
unsigned short nb_rb_coreset)
|
||||||
@@ -428,7 +425,7 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
|
|||||||
//uint16_t Nid_cell = (eNB_offset == 0) ? ue->frame_parms.Nid_cell : ue->measurements.adj_cell_id[eNB_offset-1];
|
//uint16_t Nid_cell = (eNB_offset == 0) ? ue->frame_parms.Nid_cell : ue->measurements.adj_cell_id[eNB_offset-1];
|
||||||
|
|
||||||
uint8_t nushift;
|
uint8_t nushift;
|
||||||
int **dl_ch_estimates =ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[Ns]].dl_ch_estimates[eNB_offset];
|
int **dl_ch_estimates =ue->pdcch_vars[ue->current_thread_id[Ns]][eNB_offset]->dl_ch_estimates;
|
||||||
int **rxdataF=ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[Ns]].rxdataF;
|
int **rxdataF=ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[Ns]].rxdataF;
|
||||||
|
|
||||||
nushift = 1;
|
nushift = 1;
|
||||||
@@ -616,16 +613,16 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( (Ns== 1) && (l == 0))
|
if( (Ns== 1) && (symbol == 0))
|
||||||
{
|
{
|
||||||
// do ifft of channel estimate
|
// do ifft of channel estimate
|
||||||
for (aarx=0; aarx<ue->frame_parms.nb_antennas_rx; aarx++)
|
for (aarx=0; aarx<ue->frame_parms.nb_antennas_rx; aarx++)
|
||||||
for (p=0; p<ue->frame_parms.nb_antenna_ports_eNB; p++) {
|
for (p=0; p<ue->frame_parms.nb_antenna_ports_eNB; p++) {
|
||||||
if (ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[Ns]].dl_ch_estimates[eNB_offset][(p<<1)+aarx])
|
if (ue->pdcch_vars[ue->current_thread_id[Ns]][eNB_offset]->dl_ch_estimates[(p<<1)+aarx])
|
||||||
{
|
{
|
||||||
LOG_D(PHY,"Channel Impulse Computation Slot %d ThreadId %d Symbol %d \n", Ns, ue->current_thread_id[Ns], l);
|
LOG_D(PHY,"Channel Impulse Computation Slot %d ThreadId %d Symbol %d \n", Ns, ue->current_thread_id[Ns], symbol);
|
||||||
idft((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[Ns]].dl_ch_estimates[eNB_offset][(p<<1)+aarx][0],
|
idft((int16_t*) &ue->pdcch_vars[ue->current_thread_id[Ns]][eNB_offset]->dl_ch_estimates[(p<<1)+aarx][0],
|
||||||
(int16_t*) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[Ns]].dl_ch_estimates_time[eNB_offset][(p<<1)+aarx],1);
|
(int16_t*) ue->pdcch_vars[ue->current_thread_id[Ns]][eNB_offset]->dl_ch_estimates_time[(p<<1)+aarx],1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -634,13 +631,12 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
|
int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
|
||||||
uint8_t eNB_offset,
|
uint8_t eNB_offset,
|
||||||
unsigned char Ns,
|
unsigned char Ns,
|
||||||
unsigned short p,
|
unsigned short p,
|
||||||
unsigned char l,
|
unsigned char symbol,
|
||||||
unsigned char symbol,
|
unsigned short bwp_start_subcarrier,
|
||||||
unsigned short bwp_start_subcarrier,
|
unsigned short nb_rb_pdsch)
|
||||||
unsigned short nb_rb_pdsch)
|
|
||||||
{
|
{
|
||||||
int pilot[1320] __attribute__((aligned(16)));
|
int pilot[1320] __attribute__((aligned(16)));
|
||||||
unsigned char aarx;
|
unsigned char aarx;
|
||||||
@@ -652,7 +648,7 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
|
|||||||
//uint16_t Nid_cell = (eNB_offset == 0) ? ue->frame_parms.Nid_cell : ue->measurements.adj_cell_id[eNB_offset-1];
|
//uint16_t Nid_cell = (eNB_offset == 0) ? ue->frame_parms.Nid_cell : ue->measurements.adj_cell_id[eNB_offset-1];
|
||||||
|
|
||||||
uint8_t nushift;
|
uint8_t nushift;
|
||||||
int **dl_ch_estimates =ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[Ns]].dl_ch_estimates[eNB_offset];
|
int **dl_ch_estimates =ue->pdsch_vars[ue->current_thread_id[Ns]][eNB_offset]->dl_ch_estimates;
|
||||||
int **rxdataF=ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[Ns]].rxdataF;
|
int **rxdataF=ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[Ns]].rxdataF;
|
||||||
|
|
||||||
nushift = (p>>1)&1;
|
nushift = (p>>1)&1;
|
||||||
|
|||||||
@@ -45,7 +45,6 @@
|
|||||||
int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
|
int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
|
||||||
uint8_t eNB_offset,
|
uint8_t eNB_offset,
|
||||||
unsigned char Ns,
|
unsigned char Ns,
|
||||||
unsigned char l,
|
|
||||||
unsigned char symbol,
|
unsigned char symbol,
|
||||||
unsigned short coreset_start_subcarrier,
|
unsigned short coreset_start_subcarrier,
|
||||||
unsigned short nb_rb_coreset);
|
unsigned short nb_rb_coreset);
|
||||||
@@ -69,7 +68,6 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
|
|||||||
uint8_t eNB_offset,
|
uint8_t eNB_offset,
|
||||||
unsigned char Ns,
|
unsigned char Ns,
|
||||||
unsigned short p,
|
unsigned short p,
|
||||||
unsigned char l,
|
|
||||||
unsigned char symbol,
|
unsigned char symbol,
|
||||||
unsigned short bwp_start_subcarrier,
|
unsigned short bwp_start_subcarrier,
|
||||||
unsigned short nb_rb_pdsch);
|
unsigned short nb_rb_pdsch);
|
||||||
|
|||||||
@@ -843,7 +843,7 @@ int32_t nr_rx_pdcch(PHY_VARS_NR_UE *ue,
|
|||||||
printf("\t<-NR_PDCCH_DCI_DEBUG (nr_rx_pdcch)-> in nr_pdcch_extract_rbs_single(rxdataF -> rxdataF_ext || dl_ch_estimates -> dl_ch_estimates_ext)\n");
|
printf("\t<-NR_PDCCH_DCI_DEBUG (nr_rx_pdcch)-> in nr_pdcch_extract_rbs_single(rxdataF -> rxdataF_ext || dl_ch_estimates -> dl_ch_estimates_ext)\n");
|
||||||
#endif
|
#endif
|
||||||
nr_pdcch_extract_rbs_single(common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[nr_tti_rx]].rxdataF,
|
nr_pdcch_extract_rbs_single(common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[nr_tti_rx]].rxdataF,
|
||||||
common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[nr_tti_rx]].dl_ch_estimates[eNB_id],
|
pdcch_vars[eNB_id]->dl_ch_estimates,
|
||||||
pdcch_vars[eNB_id]->rxdataF_ext,
|
pdcch_vars[eNB_id]->rxdataF_ext,
|
||||||
pdcch_vars[eNB_id]->dl_ch_estimates_ext,
|
pdcch_vars[eNB_id]->dl_ch_estimates_ext,
|
||||||
s,
|
s,
|
||||||
|
|||||||
@@ -95,11 +95,8 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue,
|
|||||||
uint8_t dci_length,
|
uint8_t dci_length,
|
||||||
uint16_t rnti,
|
uint16_t rnti,
|
||||||
uint64_t dci_pdu[2],
|
uint64_t dci_pdu[2],
|
||||||
NR_DCI_INFO_EXTRACTED_t *nr_pdci_info_extracted,
|
fapi_nr_dci_pdu_rel15_t *nr_pdci_info_extracted,
|
||||||
uint8_t dci_fields_sizes[NBR_NR_DCI_FIELDS][NBR_NR_FORMATS],
|
uint8_t dci_fields_sizes[NBR_NR_DCI_FIELDS][NBR_NR_FORMATS],
|
||||||
NR_DL_UE_HARQ_t *pdlsch0_harq,
|
|
||||||
NR_UE_DLSCH_t *pdlsch0,
|
|
||||||
NR_UE_ULSCH_t *ulsch0,
|
|
||||||
NR_DCI_format_t dci_format,
|
NR_DCI_format_t dci_format,
|
||||||
uint8_t nr_tti_rx,
|
uint8_t nr_tti_rx,
|
||||||
uint16_t n_RB_ULBWP,
|
uint16_t n_RB_ULBWP,
|
||||||
@@ -631,7 +628,7 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue,
|
|||||||
case TB1_MCS: // 18 TB1_MCS: (field defined for -,-,-,format1_1,-,-,-,-)
|
case TB1_MCS: // 18 TB1_MCS: (field defined for -,-,-,format1_1,-,-,-,-)
|
||||||
nr_pdci_info_extracted->tb1_mcs = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field);
|
nr_pdci_info_extracted->tb1_mcs = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,dci_field);
|
||||||
//(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format]));
|
//(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[dci_field][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[dci_field][dci_format]));
|
||||||
if (nr_pdci_info_extracted->mcs < 29) pdlsch0_harq->mcs = nr_pdci_info_extracted->tb1_mcs;
|
//if (nr_pdci_info_extracted->mcs < 29) pdlsch0_harq->mcs = nr_pdci_info_extracted->tb1_mcs;
|
||||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
||||||
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->tb1_mcs=%x\n",nr_pdci_info_extracted->tb1_mcs);
|
printf("\t\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_extract_dci_info) -> nr_pdci_info_extracted->tb1_mcs=%x\n",nr_pdci_info_extracted->tb1_mcs);
|
||||||
#endif
|
#endif
|
||||||
@@ -1025,98 +1022,50 @@ int nr_generate_ue_ul_dlsch_params_from_dci(PHY_VARS_NR_UE *ue,
|
|||||||
uint16_t rnti,
|
uint16_t rnti,
|
||||||
uint8_t dci_length,
|
uint8_t dci_length,
|
||||||
NR_DCI_format_t dci_format,
|
NR_DCI_format_t dci_format,
|
||||||
NR_UE_PDCCH *pdcch_vars,
|
|
||||||
NR_UE_PDSCH *pdsch_vars,
|
|
||||||
NR_UE_DLSCH_t **dlsch,
|
|
||||||
NR_UE_ULSCH_t *ulsch,
|
|
||||||
NR_DL_FRAME_PARMS *frame_parms,
|
NR_DL_FRAME_PARMS *frame_parms,
|
||||||
PDSCH_CONFIG_DEDICATED *pdsch_config_dedicated,
|
PDSCH_CONFIG_DEDICATED *pdsch_config_dedicated,
|
||||||
uint8_t beamforming_mode,
|
|
||||||
uint8_t dci_fields_sizes[NBR_NR_DCI_FIELDS][NBR_NR_FORMATS],
|
uint8_t dci_fields_sizes[NBR_NR_DCI_FIELDS][NBR_NR_FORMATS],
|
||||||
uint16_t n_RB_ULBWP,
|
uint16_t n_RB_ULBWP,
|
||||||
uint16_t n_RB_DLBWP,
|
uint16_t n_RB_DLBWP,
|
||||||
uint16_t crc_scrambled_values[TOTAL_NBR_SCRAMBLED_VALUES],
|
uint16_t crc_scrambled_values[TOTAL_NBR_SCRAMBLED_VALUES],
|
||||||
NR_DCI_INFO_EXTRACTED_t *nr_dci_info_extracted)
|
fapi_nr_dci_pdu_rel15_t *nr_dci_info_extracted)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Note only format0_0 and format1_0 are implemented
|
* Note only format0_0 and format1_0 are implemented
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//uint8_t harq_pid=0;
|
|
||||||
uint8_t frame_type=frame_parms->frame_type;
|
uint8_t frame_type=frame_parms->frame_type;
|
||||||
//uint8_t tpmi=0;
|
|
||||||
NR_UE_DLSCH_t *dlsch0=NULL;//*dlsch1=NULL;
|
|
||||||
NR_DL_UE_HARQ_t *dlsch0_harq=NULL;//*dlsch1_harq=NULL;
|
|
||||||
NR_UE_ULSCH_t *ulsch0=NULL;//*ulsch1=NULL;
|
|
||||||
|
|
||||||
|
|
||||||
NR_DCI_INFO_EXTRACTED_t *ptr_nr_dci_info_extracted = nr_dci_info_extracted;
|
|
||||||
|
|
||||||
|
|
||||||
uint8_t status=0;
|
uint8_t status=0;
|
||||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
|
||||||
printf("\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_generate_ue_ul_dlsch_params_from_dci) -> dci_format=%d, rnti=%d, dci_length=%d, dci_pdu[0]=0x%lx, dci_pdu[1]=0x%lx\n",
|
|
||||||
dci_format,rnti,dci_length,dci_pdu[0],dci_pdu[1]);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
LOG_D(PHY,"\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_generate_ue_ul_dlsch_params_from_dci) -> dci_format=%d, rnti=%d, dci_length=%d, dci_pdu[0]=0x%lx, dci_pdu[1]=0x%lx\n",dci_format,rnti,dci_length,dci_pdu[0],dci_pdu[1]);
|
||||||
|
|
||||||
// uint8_t dci_fields_sizes_format[NBR_NR_DCI_FIELDS] ={0};
|
memset(nr_dci_info_extracted,0,sizeof(nr_dci_info_extracted));
|
||||||
// for (int m=0; m<NBR_NR_DCI_FIELDS; m++) dci_fields_sizes_format[m]=dci_fields_sizes[m][dci_format];
|
|
||||||
/*
|
|
||||||
dlsch0 = dlsch[0];
|
|
||||||
dlsch0->active = 0;
|
|
||||||
if (dci_fields_sizes[HARQ_PROCESS_NUMBER][dci_format] != 0) { // 27 HARQ_PROCESS_NUMBER (27 is the position in dci_fields_sizes array for field HARQ_PROCESS_NUMBER)
|
|
||||||
//for (int i=0; i<=HARQ_PROCESS_NUMBER; i++) left_shift = left_shift + dci_fields_sizes[i][dci_format];
|
|
||||||
nr_dci_info_extracted->harq_process_number = (uint8_t)nr_dci_field(dci_pdu,dci_fields_sizes_format,HARQ_PROCESS_NUMBER);
|
|
||||||
//(((((*(uint128_t *)dci_pdu) << (left_shift - dci_fields_sizes[HARQ_PROCESS_NUMBER][dci_format]))) & pdu_bitmap) >> (dci_length - dci_fields_sizes[HARQ_PROCESS_NUMBER][dci_format]));
|
|
||||||
//left_shift = 0;
|
|
||||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
|
||||||
printf("\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_generate_ue_ul_dlsch_params_from_dci) -> nr_dci_info_extracted->harq_process_number=%x\n",nr_dci_info_extracted->harq_process_number);
|
|
||||||
for (int i=0; i<1000; i++) printf("%d",i);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
LOG_D(PHY,"\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_generate_ue_ul_dlsch_params_from_dci) -> Entering function nr_extract_dci_info(dci_format=%d) \n",dci_format);
|
||||||
|
|
||||||
dlsch0_harq = dlsch[0]->harq_processes[nr_dci_info_extracted->harq_process_number];
|
|
||||||
ulsch0 = ulsch;
|
|
||||||
//printf("nr_dci_info_extracted.harq_process_number = %d\n",nr_dci_info_extracted.harq_process_number);
|
|
||||||
//printf("dlsch0 = %d\n",dlsch0);
|
|
||||||
//printf("dlsch0_harq = %d\n",dlsch0_harq);
|
|
||||||
|
|
||||||
if (!dlsch[0]) return -1;
|
|
||||||
if (!ulsch) return -1;
|
|
||||||
*/
|
|
||||||
memset(&nr_dci_info_extracted,0,sizeof(nr_dci_info_extracted));
|
|
||||||
// printf("we reach this point\n");
|
|
||||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
|
||||||
printf("\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_generate_ue_ul_dlsch_params_from_dci) -> Entering function nr_extract_dci_info(dci_format=%d) \n",dci_format);
|
|
||||||
#endif
|
|
||||||
status = nr_extract_dci_info(ue,
|
status = nr_extract_dci_info(ue,
|
||||||
eNB_id,
|
eNB_id,
|
||||||
frame_type,
|
frame_type,
|
||||||
dci_length,
|
dci_length,
|
||||||
rnti,
|
rnti,
|
||||||
dci_pdu,
|
dci_pdu,
|
||||||
ptr_nr_dci_info_extracted,//&nr_dci_info_extracted,
|
nr_dci_info_extracted,//&nr_dci_info_extracted,
|
||||||
dci_fields_sizes,
|
dci_fields_sizes,
|
||||||
dlsch0_harq,
|
|
||||||
dlsch0,
|
|
||||||
ulsch0,
|
|
||||||
dci_format,
|
dci_format,
|
||||||
nr_tti_rx,
|
nr_tti_rx,
|
||||||
n_RB_ULBWP,
|
n_RB_ULBWP,
|
||||||
n_RB_DLBWP,
|
n_RB_DLBWP,
|
||||||
crc_scrambled_values);
|
crc_scrambled_values);
|
||||||
//printf("\n>>> inside nr_generate_ue_ul_dlsch_params_from_dci after nr_extract_dci_info: mcs=%d\n",nr_dci_info_extracted->mcs);
|
|
||||||
#ifdef NR_PDCCH_DCI_TOOLS_DEBUG
|
if(status == 0) {
|
||||||
if(status == 0) {
|
LOG_W(PHY,"\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_generate_ue_ul_dlsch_params_from_dci) -> bad DCI %d !!! \n",dci_format);
|
||||||
printf("\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_generate_ue_ul_dlsch_params_from_dci) -> bad DCI %d !!! \n",dci_format);
|
return(-1);
|
||||||
return(-1);
|
}
|
||||||
}
|
|
||||||
//printf("\n>>> inside nr_generate_ue_ul_dlsch_params_from_dci after nr_extract_dci_info: modified mcs=%d \n",nr_dci_info_extracted->mcs);
|
LOG_D(PHY,"\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_generate_ue_ul_dlsch_params_from_dci) -> Ending function nr_extract_dci_info()\n");
|
||||||
printf("\t<-NR_PDCCH_DCI_TOOLS_DEBUG (nr_generate_ue_ul_dlsch_params_from_dci) -> Ending function nr_extract_dci_info()\n");
|
|
||||||
#endif
|
//fill
|
||||||
|
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -342,7 +342,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
|
|||||||
if (beamforming_mode==0) { //else if nb_antennas_ports_eNB==1 && beamforming_mode == 0
|
if (beamforming_mode==0) { //else if nb_antennas_ports_eNB==1 && beamforming_mode == 0
|
||||||
//printf("start nr dlsch extract nr_tti_rx %d thread id %d \n", nr_tti_rx, ue->current_thread_id[nr_tti_rx]);
|
//printf("start nr dlsch extract nr_tti_rx %d thread id %d \n", nr_tti_rx, ue->current_thread_id[nr_tti_rx]);
|
||||||
nb_rb = nr_dlsch_extract_rbs_single(common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[nr_tti_rx]].rxdataF,
|
nb_rb = nr_dlsch_extract_rbs_single(common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[nr_tti_rx]].rxdataF,
|
||||||
common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[nr_tti_rx]].dl_ch_estimates[eNB_id],
|
pdsch_vars[eNB_id]->dl_ch_estimates,
|
||||||
pdsch_vars[eNB_id]->rxdataF_ext,
|
pdsch_vars[eNB_id]->rxdataF_ext,
|
||||||
pdsch_vars[eNB_id]->dl_ch_estimates_ext,
|
pdsch_vars[eNB_id]->dl_ch_estimates_ext,
|
||||||
dlsch0_harq->pmi_alloc,
|
dlsch0_harq->pmi_alloc,
|
||||||
|
|||||||
@@ -296,8 +296,7 @@ int nr_initial_sync(PHY_VARS_NR_UE *ue, runmode_t mode)
|
|||||||
i,
|
i,
|
||||||
0,
|
0,
|
||||||
ue->ssb_offset,
|
ue->ssb_offset,
|
||||||
0,
|
0);
|
||||||
NR_PBCH_EST);
|
|
||||||
|
|
||||||
#ifdef DEBUG_INITIAL_SYNCH
|
#ifdef DEBUG_INITIAL_SYNCH
|
||||||
LOG_I(PHY,"Calling sss detection (normal CP)\n");
|
LOG_I(PHY,"Calling sss detection (normal CP)\n");
|
||||||
|
|||||||
@@ -456,7 +456,7 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue,
|
|||||||
// symbol refers to symbol within SSB. symbol_offset is the offset of the SSB wrt start of slot
|
// symbol refers to symbol within SSB. symbol_offset is the offset of the SSB wrt start of slot
|
||||||
for (symbol=1; symbol<4; symbol++) {
|
for (symbol=1; symbol<4; symbol++) {
|
||||||
nr_pbch_extract(nr_ue_common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe_rx]].rxdataF,
|
nr_pbch_extract(nr_ue_common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe_rx]].rxdataF,
|
||||||
nr_ue_common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe_rx]].dl_ch_estimates[eNB_id],
|
nr_ue_pbch_vars->dl_ch_estimates,
|
||||||
nr_ue_pbch_vars->rxdataF_ext,
|
nr_ue_pbch_vars->rxdataF_ext,
|
||||||
nr_ue_pbch_vars->dl_ch_estimates_ext,
|
nr_ue_pbch_vars->dl_ch_estimates_ext,
|
||||||
symbol,
|
symbol,
|
||||||
|
|||||||
@@ -1731,16 +1731,31 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
|
|||||||
uint32_t nr_get_G(uint16_t nb_rb, uint16_t nb_symb_sch,uint8_t nb_re_dmrs,uint16_t length_dmrs, uint8_t Qm, uint8_t Nl) ;
|
uint32_t nr_get_G(uint16_t nb_rb, uint16_t nb_symb_sch,uint8_t nb_re_dmrs,uint16_t length_dmrs, uint8_t Qm, uint8_t Nl) ;
|
||||||
|
|
||||||
uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
|
uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
|
||||||
short *dlsch_llr,
|
short *dlsch_llr,
|
||||||
NR_DL_FRAME_PARMS *frame_parms,
|
NR_DL_FRAME_PARMS *frame_parms,
|
||||||
NR_UE_DLSCH_t *dlsch,
|
NR_UE_DLSCH_t *dlsch,
|
||||||
NR_DL_UE_HARQ_t *harq_process,
|
NR_DL_UE_HARQ_t *harq_process,
|
||||||
uint32_t frame,
|
uint32_t frame,
|
||||||
uint16_t nb_symb_sch,
|
uint16_t nb_symb_sch,
|
||||||
uint8_t nr_tti_rx,
|
uint8_t nr_tti_rx,
|
||||||
uint8_t harq_pid,
|
uint8_t harq_pid,
|
||||||
uint8_t is_crnti,
|
uint8_t is_crnti,
|
||||||
uint8_t llr8_flag);
|
uint8_t llr8_flag);
|
||||||
|
|
||||||
|
int nr_extract_dci_info(PHY_VARS_NR_UE *ue,
|
||||||
|
uint8_t eNB_id,
|
||||||
|
lte_frame_type_t frame_type,
|
||||||
|
uint8_t dci_length,
|
||||||
|
uint16_t rnti,
|
||||||
|
uint64_t dci_pdu[2],
|
||||||
|
fapi_nr_dci_pdu_rel15_t *nr_pdci_info_extracted,
|
||||||
|
uint8_t dci_fields_sizes[NBR_NR_DCI_FIELDS][NBR_NR_FORMATS],
|
||||||
|
NR_DCI_format_t dci_format,
|
||||||
|
uint8_t nr_tti_rx,
|
||||||
|
uint16_t n_RB_ULBWP,
|
||||||
|
uint16_t n_RB_DLBWP,
|
||||||
|
uint16_t crc_scrambled_values[TOTAL_NBR_SCRAMBLED_VALUES]);
|
||||||
|
|
||||||
|
|
||||||
/**@}*/
|
/**@}*/
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -590,8 +590,8 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
|
|||||||
time = calloc(samples_per_frame,sizeof(float));
|
time = calloc(samples_per_frame,sizeof(float));
|
||||||
corr = calloc(samples_per_frame,sizeof(float));
|
corr = calloc(samples_per_frame,sizeof(float));
|
||||||
|
|
||||||
chest_t = (int16_t**) phy_vars_ue->common_vars.common_vars_rx_data_per_thread[phy_vars_ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_id];
|
chest_t = (int16_t**) phy_vars_ue->pdcch_vars[phy_vars_ue->current_thread_id[subframe]][eNB_id]->dl_ch_estimates_time;
|
||||||
chest_f = (int16_t**) phy_vars_ue->common_vars.common_vars_rx_data_per_thread[phy_vars_ue->current_thread_id[subframe]].dl_ch_estimates[eNB_id];
|
chest_f = (int16_t**) phy_vars_ue->pdcch_vars[phy_vars_ue->current_thread_id[subframe]][eNB_id]->dl_ch_estimates;
|
||||||
|
|
||||||
pbch_llr = (int16_t*) phy_vars_ue->pbch_vars[eNB_id]->llr;
|
pbch_llr = (int16_t*) phy_vars_ue->pbch_vars[eNB_id]->llr;
|
||||||
pbch_comp = (int16_t*) phy_vars_ue->pbch_vars[eNB_id]->rxdataF_comp[0];
|
pbch_comp = (int16_t*) phy_vars_ue->pbch_vars[eNB_id]->rxdataF_comp[0];
|
||||||
|
|||||||
+16
-11
@@ -378,17 +378,6 @@ typedef struct {
|
|||||||
/// - second index: symbol [0..28*ofdm_symbol_size[
|
/// - second index: symbol [0..28*ofdm_symbol_size[
|
||||||
int32_t **rxdataF;
|
int32_t **rxdataF;
|
||||||
|
|
||||||
/// \brief Hold the channel estimates in frequency domain.
|
|
||||||
/// - first index: eNB id [0..6] (hard coded)
|
|
||||||
/// - second index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
|
|
||||||
/// - third index: samples? [0..symbols_per_tti*(ofdm_symbol_size+LTE_CE_FILTER_LENGTH)[
|
|
||||||
int32_t **dl_ch_estimates[7];
|
|
||||||
|
|
||||||
/// \brief Hold the channel estimates in time domain (used for tracking).
|
|
||||||
/// - first index: eNB id [0..6] (hard coded)
|
|
||||||
/// - second index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
|
|
||||||
/// - third index: samples? [0..2*ofdm_symbol_size[
|
|
||||||
int32_t **dl_ch_estimates_time[7];
|
|
||||||
} NR_UE_COMMON_PER_THREAD;
|
} NR_UE_COMMON_PER_THREAD;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@@ -438,6 +427,10 @@ typedef struct {
|
|||||||
/// - third index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
|
/// - third index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
|
||||||
/// - fourth index: ? [0..168*N_RB_DL[
|
/// - fourth index: ? [0..168*N_RB_DL[
|
||||||
int32_t **rxdataF_comp1[8][8];
|
int32_t **rxdataF_comp1[8][8];
|
||||||
|
/// \brief Hold the channel estimates in frequency domain.
|
||||||
|
/// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
|
||||||
|
/// - second index: samples? [0..symbols_per_tti*(ofdm_symbol_size+LTE_CE_FILTER_LENGTH)[
|
||||||
|
int32_t **dl_ch_estimates;
|
||||||
/// \brief Downlink channel estimates extracted in PRBS.
|
/// \brief Downlink channel estimates extracted in PRBS.
|
||||||
/// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
|
/// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
|
||||||
/// - second index: ? [0..168*N_RB_DL[
|
/// - second index: ? [0..168*N_RB_DL[
|
||||||
@@ -830,6 +823,14 @@ typedef struct {
|
|||||||
/// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
|
/// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
|
||||||
/// - second index: ? [0..168*N_RB_DL[
|
/// - second index: ? [0..168*N_RB_DL[
|
||||||
int32_t **rxdataF_comp;
|
int32_t **rxdataF_comp;
|
||||||
|
/// \brief Hold the channel estimates in frequency domain.
|
||||||
|
/// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
|
||||||
|
/// - second index: samples? [0..symbols_per_tti*(ofdm_symbol_size+LTE_CE_FILTER_LENGTH)[
|
||||||
|
int32_t **dl_ch_estimates;
|
||||||
|
/// \brief Hold the channel estimates in time domain (used for tracking).
|
||||||
|
/// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
|
||||||
|
/// - second index: samples? [0..2*ofdm_symbol_size[
|
||||||
|
int32_t **dl_ch_estimates_time;
|
||||||
/// \brief Pointers to extracted channel estimates of PDCCH symbols.
|
/// \brief Pointers to extracted channel estimates of PDCCH symbols.
|
||||||
/// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
|
/// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
|
||||||
/// - second index: ? [0..168*N_RB_DL[
|
/// - second index: ? [0..168*N_RB_DL[
|
||||||
@@ -897,6 +898,10 @@ typedef struct {
|
|||||||
/// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
|
/// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
|
||||||
/// - second index: ? [0..287] (hard coded)
|
/// - second index: ? [0..287] (hard coded)
|
||||||
int32_t **rxdataF_comp;
|
int32_t **rxdataF_comp;
|
||||||
|
/// \brief Hold the channel estimates in frequency domain.
|
||||||
|
/// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
|
||||||
|
/// - second index: samples? [0..symbols_per_tti*(ofdm_symbol_size+LTE_CE_FILTER_LENGTH)[
|
||||||
|
int32_t **dl_ch_estimates;
|
||||||
/// \brief Pointers to downlink channel estimates in frequency-domain extracted in PRBS.
|
/// \brief Pointers to downlink channel estimates in frequency-domain extracted in PRBS.
|
||||||
/// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
|
/// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
|
||||||
/// - second index: ? [0..287] (hard coded)
|
/// - second index: ? [0..287] (hard coded)
|
||||||
|
|||||||
@@ -32,9 +32,6 @@
|
|||||||
|
|
||||||
#include "PHY/defs_gNB.h"
|
#include "PHY/defs_gNB.h"
|
||||||
#include "PHY/phy_extern.h"
|
#include "PHY/phy_extern.h"
|
||||||
#include "PHY/LTE_TRANSPORT/transport_proto.h"
|
|
||||||
#include "SCHED/sched_eNB.h"
|
|
||||||
#include "SCHED/sched_common.h"
|
|
||||||
#include "SCHED_NR/sched_nr.h"
|
#include "SCHED_NR/sched_nr.h"
|
||||||
#include "nfapi_nr_interface.h"
|
#include "nfapi_nr_interface.h"
|
||||||
|
|
||||||
|
|||||||
@@ -3178,12 +3178,41 @@ int nr_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *
|
|||||||
}
|
}
|
||||||
if ((dci_alloc_rx[i].format == format1_1)){ // This format not implemented at a first time. FIXME
|
if ((dci_alloc_rx[i].format == format1_1)){ // This format not implemented at a first time. FIXME
|
||||||
}
|
}
|
||||||
NR_DCI_INFO_EXTRACTED_t nr_dci_info_extracted;
|
|
||||||
#ifdef NR_PDCCH_SCHED_DEBUG
|
|
||||||
printf("<-NR_PDCCH_PHY_PROCEDURES_LTE_UE (nr_ue_pdcch_procedures)-> Entering function nr_generate_ue_ul_dlsch_params_from_dci with eNB_id=%d dci_cnt=%d\n",
|
uint8_t status=0;
|
||||||
eNB_id,
|
|
||||||
dci_cnt);
|
LOG_D(PHY,"<-NR_PDCCH_PHY_PROCEDURES_UE (nr_ue_pdcch_procedures)-> dci_format=%d, rnti=%d, dci_length=%d, dci_pdu[0]=0x%lx, dci_pdu[1]=0x%lx\n",dci_alloc_rx[i].format,dci_alloc_rx[i].rnti,dci_alloc_rx[i].dci_length,dci_alloc_rx[i].dci_pdu[0],dci_alloc_rx[i].dci_pdu[1]);
|
||||||
#endif
|
|
||||||
|
memset(&ue->dci_ind.dci_list[i].dci,0,sizeof(fapi_nr_dci_pdu_rel15_t));
|
||||||
|
|
||||||
|
ue->dci_ind.dci_list[i].rnti = dci_alloc_rx[i].rnti;
|
||||||
|
ue->dci_ind.dci_list[i].dci_format = dci_alloc_rx[i].format;
|
||||||
|
ue->dci_ind.dci_list[i].n_CCE = dci_alloc_rx[i].firstCCE;
|
||||||
|
ue->dci_ind.dci_list[i].N_CCE = (int)dci_alloc_rx[i].L;
|
||||||
|
|
||||||
|
status = nr_extract_dci_info(ue,
|
||||||
|
eNB_id,
|
||||||
|
ue->frame_parms.frame_type,
|
||||||
|
dci_alloc_rx[i].dci_length,
|
||||||
|
dci_alloc_rx[i].rnti,
|
||||||
|
dci_alloc_rx[i].dci_pdu,
|
||||||
|
&ue->dci_ind.dci_list[i].dci,
|
||||||
|
dci_fields_sizes,
|
||||||
|
dci_alloc_rx[i].format,
|
||||||
|
nr_tti_rx,
|
||||||
|
pdcch_vars2->n_RB_BWP[nb_searchspace_active],
|
||||||
|
pdcch_vars2->n_RB_BWP[nb_searchspace_active],
|
||||||
|
crc_scrambled_values);
|
||||||
|
|
||||||
|
if(status == 0) {
|
||||||
|
LOG_W(PHY,"<-NR_PDCCH_PHY_PROCEDURES_UE (nr_ue_pdcch_procedures)-> bad DCI %d !!! \n",dci_alloc_rx[i].format);
|
||||||
|
return(-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
LOG_D(PHY,"<-NR_PDCCH_PHY_PROCEDURES_UE (nr_ue_pdcch_procedures)-> Ending function nr_extract_dci_info()\n");
|
||||||
|
|
||||||
|
/*
|
||||||
nr_generate_ue_ul_dlsch_params_from_dci(ue,
|
nr_generate_ue_ul_dlsch_params_from_dci(ue,
|
||||||
eNB_id,
|
eNB_id,
|
||||||
frame_rx,
|
frame_rx,
|
||||||
@@ -3204,12 +3233,8 @@ int nr_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *
|
|||||||
pdcch_vars2->n_RB_BWP[nb_searchspace_active],
|
pdcch_vars2->n_RB_BWP[nb_searchspace_active],
|
||||||
crc_scrambled_values,
|
crc_scrambled_values,
|
||||||
&nr_dci_info_extracted);
|
&nr_dci_info_extracted);
|
||||||
|
*/
|
||||||
|
|
||||||
ue->dci_ind.dci_list[i].rnti = dci_alloc_rx[i].rnti;
|
|
||||||
ue->dci_ind.dci_list[i].dci_format = dci_alloc_rx[i].format;
|
|
||||||
ue->dci_ind.dci_list[i].n_CCE = dci_alloc_rx[i].firstCCE;
|
|
||||||
ue->dci_ind.dci_list[i].N_CCE = (int)dci_alloc_rx[i].L;
|
|
||||||
memcpy(&ue->dci_ind.dci_list[i].dci, &nr_dci_info_extracted, sizeof(fapi_nr_dci_pdu_rel15_t) );
|
|
||||||
|
|
||||||
} // end for loop dci_cnt
|
} // end for loop dci_cnt
|
||||||
|
|
||||||
@@ -3570,6 +3595,8 @@ void nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int eNB
|
|||||||
int harq_pid;
|
int harq_pid;
|
||||||
int i_mod,eNB_id_i,dual_stream_UE;
|
int i_mod,eNB_id_i,dual_stream_UE;
|
||||||
int first_symbol_flag=0;
|
int first_symbol_flag=0;
|
||||||
|
uint16_t pdsch_start_rb = 0;
|
||||||
|
uint16_t pdsch_nb_rb = 50;
|
||||||
|
|
||||||
if (dlsch0->active == 0)
|
if (dlsch0->active == 0)
|
||||||
return;
|
return;
|
||||||
@@ -3577,40 +3604,22 @@ void nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int eNB
|
|||||||
for (m=s0;m<=s1;m++) {
|
for (m=s0;m<=s1;m++) {
|
||||||
|
|
||||||
if (dlsch0 && (!dlsch1)) {
|
if (dlsch0 && (!dlsch1)) {
|
||||||
|
|
||||||
|
if (m==s0)
|
||||||
|
nr_pdsch_channel_estimation(ue,
|
||||||
|
0 /*eNB_id*/,
|
||||||
|
nr_tti_rx,
|
||||||
|
0 /*p*/,
|
||||||
|
m,
|
||||||
|
ue->frame_parms.first_carrier_offset+pdsch_start_rb*12,
|
||||||
|
pdsch_nb_rb);
|
||||||
|
|
||||||
harq_pid = dlsch0->current_harq_pid;
|
harq_pid = dlsch0->current_harq_pid;
|
||||||
LOG_D(PHY,"[UE %d] PDSCH type %d active in nr_tti_rx %d, harq_pid %d Symbol %d\n",ue->Mod_id,pdsch,nr_tti_rx,harq_pid,m);
|
LOG_D(PHY,"[UE %d] PDSCH type %d active in nr_tti_rx %d, harq_pid %d Symbol %d\n",ue->Mod_id,pdsch,nr_tti_rx,harq_pid,m);
|
||||||
|
|
||||||
if ((pdsch==PDSCH) &&
|
dual_stream_UE = 0;
|
||||||
(ue->transmission_mode[eNB_id] == 5) &&
|
eNB_id_i = eNB_id+1;
|
||||||
(dlsch0->harq_processes[harq_pid]->dl_power_off==0) &&
|
i_mod = 0;
|
||||||
(ue->use_ia_receiver ==1)) {
|
|
||||||
dual_stream_UE = 1;
|
|
||||||
eNB_id_i = ue->n_connected_eNB;
|
|
||||||
i_mod = dlsch0->harq_processes[harq_pid]->Qm;
|
|
||||||
|
|
||||||
}
|
|
||||||
else if((pdsch==PDSCH) && (ue->transmission_mode[eNB_id]==3))
|
|
||||||
{
|
|
||||||
dual_stream_UE = rx_IC_dual_stream;
|
|
||||||
eNB_id_i = eNB_id;
|
|
||||||
i_mod = 0;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
dual_stream_UE = 0;
|
|
||||||
eNB_id_i = eNB_id+1;
|
|
||||||
i_mod = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
//TM7 UE specific channel estimation here!!!
|
|
||||||
if (ue->transmission_mode[eNB_id]==7) {
|
|
||||||
if (ue->frame_parms.Ncp==0) {
|
|
||||||
//if ((m==3) || (m==6) || (m==9) || (m==12))
|
|
||||||
//LOG_D(PHY,"[UE %d] dlsch->active in nr_tti_rx %d => %d, l=%d\n",phy_vars_ue->Mod_id,nr_tti_rx,phy_vars_ue->dlsch_ue[eNB_id][0]->active, l);
|
|
||||||
//lte_dl_bf_channel_estimation(ue,eNB_id,0,nr_tti_rx*2+(m>6?1:0),5,m);
|
|
||||||
} else {
|
|
||||||
LOG_E(PHY,"[UE %d]Beamforming channel estimation not supported yet for TM7 extented CP.\n",ue->Mod_id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((m==s0) && (m<3))
|
if ((m==s0) && (m<3))
|
||||||
first_symbol_flag = 1;
|
first_symbol_flag = 1;
|
||||||
@@ -4320,9 +4329,23 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eN
|
|||||||
uint8_t next2_thread_id = next1_thread_id== (RX_NB_TH-1) ? 0:(next1_thread_id+1);
|
uint8_t next2_thread_id = next1_thread_id== (RX_NB_TH-1) ? 0:(next1_thread_id+1);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
uint8_t coreset_start=0, coreset_start_set=0;
|
||||||
|
uint16_t coreset_count = 0;
|
||||||
|
uint64_t coreset_freq_dom = pdcch_vars->coreset[0].frequencyDomainResources;
|
||||||
|
for (int i = 0; i < 45; i++) {
|
||||||
|
if (((coreset_freq_dom & 0x1FFFFFFFFFFF) >> (44-i)) & 0x1) {
|
||||||
|
if (!coreset_start_set) {
|
||||||
|
coreset_start = i;
|
||||||
|
coreset_start_set = 1;
|
||||||
|
}
|
||||||
|
coreset_count++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
uint16_t coreset_nb_rb = 6 * coreset_count;
|
||||||
|
uint16_t coreset_start_rb = 6 * coreset_start;
|
||||||
|
|
||||||
#ifdef NR_PDCCH_SCHED
|
#ifdef NR_PDCCH_SCHED
|
||||||
nr_gold_pdcch(ue,0, 2);
|
nr_gold_pdcch(ue,0, 2);
|
||||||
|
|
||||||
|
|
||||||
LOG_D(PHY," ------ --> PDCCH ChannelComp/LLR Frame.slot %d.%d ------ \n", frame_rx%1024, nr_tti_rx);
|
LOG_D(PHY," ------ --> PDCCH ChannelComp/LLR Frame.slot %d.%d ------ \n", frame_rx%1024, nr_tti_rx);
|
||||||
for (uint16_t l=0; l<nb_symb_pdcch; l++) {
|
for (uint16_t l=0; l<nb_symb_pdcch; l++) {
|
||||||
@@ -4335,8 +4358,15 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eN
|
|||||||
l,
|
l,
|
||||||
nr_tti_rx,
|
nr_tti_rx,
|
||||||
0,
|
0,
|
||||||
0,
|
0);
|
||||||
NR_PDCCH_EST);
|
|
||||||
|
nr_pdcch_channel_estimation(ue,0,
|
||||||
|
nr_tti_rx,
|
||||||
|
l,
|
||||||
|
ue->frame_parms.first_carrier_offset+coreset_start_rb*12,
|
||||||
|
coreset_nb_rb);
|
||||||
|
|
||||||
|
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP, VCD_FUNCTION_OUT);
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP, VCD_FUNCTION_OUT);
|
||||||
#if UE_TIMING_TRACE
|
#if UE_TIMING_TRACE
|
||||||
stop_meas(&ue->ofdm_demod_stats);
|
stop_meas(&ue->ofdm_demod_stats);
|
||||||
@@ -4379,8 +4409,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eN
|
|||||||
m, //to be updated from higher layer
|
m, //to be updated from higher layer
|
||||||
nr_tti_rx,
|
nr_tti_rx,
|
||||||
0,
|
0,
|
||||||
0,
|
0);
|
||||||
NR_PDSCH_EST);
|
|
||||||
|
|
||||||
//printf("phy procedure pdsch start measurement\n");
|
//printf("phy procedure pdsch start measurement\n");
|
||||||
nr_ue_measurement_procedures(m,ue,proc,eNB_id,(nr_tti_rx<<1),mode);
|
nr_ue_measurement_procedures(m,ue,proc,eNB_id,(nr_tti_rx<<1),mode);
|
||||||
@@ -4408,7 +4437,10 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eN
|
|||||||
(nb_symb_sch+nb_symb_pdcch-1)); //ue->frame_parms.symbols_per_tti>>1,
|
(nb_symb_sch+nb_symb_pdcch-1)); //ue->frame_parms.symbols_per_tti>>1,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
write_output("rxF_ext.m","rxFe",&ue->pdsch_vars[ue->current_thread_id[nr_tti_rx]][eNB_id]->rxdataF_ext[0][0],ue->frame_parms.N_RB_DL*12*14,1,1);
|
write_output("rxF.m","rxF",&ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[nr_tti_rx]].rxdataF[0][0],ue->frame_parms.ofdm_symbol_size*14,1,1);
|
||||||
|
write_output("rxF_ch.m","rxFch",&ue->pdsch_vars[ue->current_thread_id[nr_tti_rx]][eNB_id]->dl_ch_estimates[0][0],ue->frame_parms.ofdm_symbol_size*14,1,1);
|
||||||
|
write_output("rxF_ch_ext.m","rxFche",&ue->pdsch_vars[ue->current_thread_id[nr_tti_rx]][eNB_id]->dl_ch_estimates_ext[0][2*50*12],50*12,1,1);
|
||||||
|
write_output("rxF_ext.m","rxFe",&ue->pdsch_vars[ue->current_thread_id[nr_tti_rx]][eNB_id]->rxdataF_ext[0][0],50*12*14,1,1);
|
||||||
write_output("rxF_comp.m","rxFc",&ue->pdsch_vars[ue->current_thread_id[nr_tti_rx]][eNB_id]->rxdataF_comp0[0][0],ue->frame_parms.N_RB_DL*12*14,1,1);
|
write_output("rxF_comp.m","rxFc",&ue->pdsch_vars[ue->current_thread_id[nr_tti_rx]][eNB_id]->rxdataF_comp0[0][0],ue->frame_parms.N_RB_DL*12*14,1,1);
|
||||||
write_output("rxF_llr.m","rxFllr",ue->pdsch_vars[ue->current_thread_id[nr_tti_rx]][eNB_id]->llr[0],(nb_symb_sch-1)*50*12+50*6,1,0);
|
write_output("rxF_llr.m","rxFllr",ue->pdsch_vars[ue->current_thread_id[nr_tti_rx]][eNB_id]->llr[0],(nb_symb_sch-1)*50*12+50*6,1,0);
|
||||||
*/
|
*/
|
||||||
@@ -4472,8 +4504,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eN
|
|||||||
(ue->symbol_offset+i), //mu=1 case B
|
(ue->symbol_offset+i), //mu=1 case B
|
||||||
nr_tti_rx,
|
nr_tti_rx,
|
||||||
0,
|
0,
|
||||||
0,
|
0);
|
||||||
NR_PBCH_EST);
|
|
||||||
|
|
||||||
#if UE_TIMING_TRACE
|
#if UE_TIMING_TRACE
|
||||||
start_meas(&ue->dlsch_channel_estimation_stats);
|
start_meas(&ue->dlsch_channel_estimation_stats);
|
||||||
|
|||||||
@@ -45,11 +45,14 @@
|
|||||||
#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
|
#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
|
||||||
|
|
||||||
#include "SCHED_NR/sched_nr.h"
|
#include "SCHED_NR/sched_nr.h"
|
||||||
|
#include "SCHED_NR/fapi_nr_l1.h"
|
||||||
#include "SCHED_NR_UE/fapi_nr_ue_l1.h"
|
#include "SCHED_NR_UE/fapi_nr_ue_l1.h"
|
||||||
|
|
||||||
#include "LAYER2/NR_MAC_gNB/nr_mac_gNB.h"
|
#include "LAYER2/NR_MAC_gNB/nr_mac_gNB.h"
|
||||||
#include "LAYER2/NR_MAC_UE/mac_defs.h"
|
#include "LAYER2/NR_MAC_UE/mac_defs.h"
|
||||||
#include "LAYER2/NR_MAC_UE/mac_extern.h"
|
#include "LAYER2/NR_MAC_UE/mac_extern.h"
|
||||||
|
#include "LAYER2/NR_MAC_UE/mac_proto.h"
|
||||||
|
#include "LAYER2/NR_MAC_gNB/mac_proto.h"
|
||||||
|
|
||||||
#include "NR_PHY_INTERFACE/NR_IF_Module.h"
|
#include "NR_PHY_INTERFACE/NR_IF_Module.h"
|
||||||
#include "NR_UE_PHY_INTERFACE/NR_IF_Module.h"
|
#include "NR_UE_PHY_INTERFACE/NR_IF_Module.h"
|
||||||
@@ -77,8 +80,8 @@ int32_t get_uldl_offset(int nr_bandP) {return(0);}
|
|||||||
|
|
||||||
NR_IF_Module_t *NR_IF_Module_init(int Mod_id){return(NULL);}
|
NR_IF_Module_t *NR_IF_Module_init(int Mod_id){return(NULL);}
|
||||||
|
|
||||||
int8_t dummy_nr_ue_dl_indication(nr_downlink_indication_t *dl_info){return(0);}
|
int dummy_nr_ue_dl_indication(nr_downlink_indication_t *dl_info){return(0);}
|
||||||
int8_t dummy_nr_ue_ul_indication(nr_uplink_indication_t *ul_info){return(0);}
|
int dummy_nr_ue_ul_indication(nr_uplink_indication_t *ul_info){return(0);}
|
||||||
|
|
||||||
lte_subframe_t subframe_select(LTE_DL_FRAME_PARMS *frame_parms,unsigned char subframe) { return(SF_DL);}
|
lte_subframe_t subframe_select(LTE_DL_FRAME_PARMS *frame_parms,unsigned char subframe) { return(SF_DL);}
|
||||||
|
|
||||||
@@ -111,7 +114,7 @@ void config_common(int Mod_idP,
|
|||||||
|
|
||||||
// needed for some functions
|
// needed for some functions
|
||||||
PHY_VARS_NR_UE ***PHY_vars_UE_g;
|
PHY_VARS_NR_UE ***PHY_vars_UE_g;
|
||||||
uint16_t conjugate[8]__attribute__((aligned(32))) = {-1,1,-1,1,-1,1,-1,1};
|
short conjugate[8]__attribute__((aligned(32))) = {-1,1,-1,1,-1,1,-1,1};
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
@@ -510,7 +513,7 @@ int main(int argc, char **argv)
|
|||||||
gNB_mac = RC.nrmac[0];
|
gNB_mac = RC.nrmac[0];
|
||||||
|
|
||||||
config_common(0,0,Nid_cell,78,ssb_pattern,(uint64_t)3640000000L,N_RB_DL);
|
config_common(0,0,Nid_cell,78,ssb_pattern,(uint64_t)3640000000L,N_RB_DL);
|
||||||
config_nr_mib(0,0,1,kHz30,0,0,0,0);
|
config_nr_mib(0,0,1,kHz30,0,0,0,0,0);
|
||||||
|
|
||||||
nr_l2_init_ue();
|
nr_l2_init_ue();
|
||||||
UE_mac = get_mac_inst(0);
|
UE_mac = get_mac_inst(0);
|
||||||
|
|||||||
@@ -385,19 +385,18 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
|||||||
|
|
||||||
// Note: This should not be done in the MAC!
|
// Note: This should not be done in the MAC!
|
||||||
for (int ii=0; ii<MAX_MOBILES_PER_GNB; ii++) {
|
for (int ii=0; ii<MAX_MOBILES_PER_GNB; ii++) {
|
||||||
LTE_eNB_ULSCH_t *ulsch = RC.gNB[module_idP][CC_id]->ulsch[ii];
|
NR_gNB_ULSCH_t *ulsch = RC.gNB[module_idP][CC_id]->ulsch[ii][0];
|
||||||
if((ulsch != NULL) && (ulsch->rnti == rnti)){
|
if((ulsch != NULL) && (ulsch->rnti == rnti)){
|
||||||
LOG_I(MAC, "clean_eNb_ulsch UE %x \n", rnti);
|
LOG_W(MAC, "TODO: clean_eNb_ulsch UE %x \n", rnti);
|
||||||
clean_eNb_ulsch(ulsch);
|
//clean_eNb_ulsch(ulsch);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int ii=0; ii<MAX_MOBILES_PER_GNB; ii++) {
|
for (int ii=0; ii<MAX_MOBILES_PER_GNB; ii++) {
|
||||||
NR_gNB_DLSCH_t *dlsch = RC.gNB[module_idP][CC_id]->dlsch[ii][0];
|
NR_gNB_DLSCH_t *dlsch = RC.gNB[module_idP][CC_id]->dlsch[ii][0];
|
||||||
if((dlsch != NULL) && (dlsch->rnti == rnti)){
|
if((dlsch != NULL) && (dlsch->rnti == rnti)){
|
||||||
LOG_I(MAC, "clean_eNb_dlsch UE %x \n", rnti);
|
LOG_W(MAC, "TODO: clean_eNb_dlsch UE %x \n", rnti);
|
||||||
LOG_E(PHY,"Calling with wrong paramter type\n");
|
//clean_eNb_dlsch(dlsch);
|
||||||
clean_eNb_dlsch(dlsch);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -67,6 +67,10 @@ void nr_schedule_css_dlsch_phytest(module_id_t module_idP,
|
|||||||
frame_t frameP,
|
frame_t frameP,
|
||||||
sub_frame_t subframeP);
|
sub_frame_t subframeP);
|
||||||
|
|
||||||
|
void nr_schedule_uss_dlsch_phytest(module_id_t module_idP,
|
||||||
|
frame_t frameP,
|
||||||
|
sub_frame_t slotP);
|
||||||
|
|
||||||
|
|
||||||
void nr_configure_css_dci_initial(nfapi_nr_dl_config_pdcch_parameters_rel15_t* pdcch_params,
|
void nr_configure_css_dci_initial(nfapi_nr_dl_config_pdcch_parameters_rel15_t* pdcch_params,
|
||||||
nr_scs_e scs_common,
|
nr_scs_e scs_common,
|
||||||
@@ -108,4 +112,14 @@ uint64_t from_nrarfcn(int nr_bandP, uint32_t dl_nrarfcn);
|
|||||||
|
|
||||||
uint32_t to_nrarfcn(int nr_bandP, uint64_t dl_CarrierFreq, uint32_t bw);
|
uint32_t to_nrarfcn(int nr_bandP, uint64_t dl_CarrierFreq, uint32_t bw);
|
||||||
|
|
||||||
|
void config_nr_mib(int Mod_idP,
|
||||||
|
int CC_idP,
|
||||||
|
int p_gNBP,
|
||||||
|
int subCarrierSpacingCommon,
|
||||||
|
uint32_t ssb_SubcarrierOffset,
|
||||||
|
int dmrs_TypeA_Position,
|
||||||
|
uint32_t pdcch_ConfigSIB1,
|
||||||
|
int cellBarred,
|
||||||
|
int intraFreqReselection);
|
||||||
|
|
||||||
#endif /*__LAYER2_NR_MAC_PROTO_H__*/
|
#endif /*__LAYER2_NR_MAC_PROTO_H__*/
|
||||||
|
|||||||
Reference in New Issue
Block a user