Commit 8d78c0c9 authored by knopp's avatar knopp

Changes:

0. unwiring of 40 MHz channel hard-coding and general SSB location
1. PSS dynamic range improvement and DC carrier fix
2. SSS channel estimation and detection corrected
3. PBCH channel estimation fixed
4. PBCH channel extraction/compensation reworked for the general case
5. fixed-point low-complexity polar decoder integrated to PBCH decoding chain

works by default (nr_pbchsim) at 100 MHz / 30 kHz SCS and SSB wherever (but known to UE)
parent 5e9da7c5
...@@ -185,9 +185,9 @@ void nr_polar_print_polarParams(t_nrPolar_paramsPtr polarParams) ...@@ -185,9 +185,9 @@ void nr_polar_print_polarParams(t_nrPolar_paramsPtr polarParams)
} }
t_nrPolar_paramsPtr nr_polar_params (t_nrPolar_paramsPtr polarParams, t_nrPolar_paramsPtr nr_polar_params (t_nrPolar_paramsPtr polarParams,
int8_t messageType, int8_t messageType,
uint16_t messageLength, uint16_t messageLength,
uint8_t aggregation_level) uint8_t aggregation_level)
{ {
t_nrPolar_paramsPtr currentPtr = NULL; t_nrPolar_paramsPtr currentPtr = NULL;
......
...@@ -380,7 +380,7 @@ void nr_phy_config_request_sim(PHY_VARS_gNB *gNB,int N_RB_DL,int N_RB_UL,int mu) ...@@ -380,7 +380,7 @@ void nr_phy_config_request_sim(PHY_VARS_gNB *gNB,int N_RB_DL,int N_RB_UL,int mu)
gNB_config->rf_config.ul_carrier_bandwidth.value = N_RB_UL; gNB_config->rf_config.ul_carrier_bandwidth.value = N_RB_UL;
gNB_config->sch_config.half_frame_index.value = 0; gNB_config->sch_config.half_frame_index.value = 0;
gNB_config->sch_config.ssb_subcarrier_offset.value = 0; gNB_config->sch_config.ssb_subcarrier_offset.value = 0;
gNB_config->sch_config.n_ssb_crb.value = N_RB_DL-20; gNB_config->sch_config.n_ssb_crb.value = (N_RB_DL-20)>>1;
gNB_config->sch_config.ssb_subcarrier_offset.value = 0; gNB_config->sch_config.ssb_subcarrier_offset.value = 0;
......
...@@ -655,7 +655,7 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, ...@@ -655,7 +655,7 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
int i,j,k,l; int i,j,k,l;
int eNB_id; int eNB_id;
int th_id; int th_id;
int n_ssb_crb=(fp->N_RB_DL-20)>>1;
abstraction_flag = 0; abstraction_flag = 0;
fp->nb_antennas_tx = 1; fp->nb_antennas_tx = 1;
fp->nb_antennas_rx=1; fp->nb_antennas_rx=1;
...@@ -664,7 +664,7 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, ...@@ -664,7 +664,7 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
printf("Initializing UE vars (abstraction %"PRIu8") for eNB TXant %"PRIu8", UE RXant %"PRIu8"\n",abstraction_flag,fp->nb_antennas_tx,fp->nb_antennas_rx); printf("Initializing UE vars (abstraction %"PRIu8") for eNB TXant %"PRIu8", UE RXant %"PRIu8"\n",abstraction_flag,fp->nb_antennas_tx,fp->nb_antennas_rx);
//LOG_D(PHY,"[MSC_NEW][FRAME 00000][PHY_UE][MOD %02u][]\n", ue->Mod_id+NB_eNB_INST); //LOG_D(PHY,"[MSC_NEW][FRAME 00000][PHY_UE][MOD %02u][]\n", ue->Mod_id+NB_eNB_INST);
nr_init_frame_parms_ue(&ue->frame_parms,NR_MU_1,NORMAL); nr_init_frame_parms_ue(&ue->frame_parms,NR_MU_1,NORMAL,n_ssb_crb,0);
phy_init_nr_top(ue); phy_init_nr_top(ue);
// many memory allocation sizes are hard coded // many memory allocation sizes are hard coded
...@@ -955,13 +955,12 @@ void phy_init_nr_top(PHY_VARS_NR_UE *ue) ...@@ -955,13 +955,12 @@ void phy_init_nr_top(PHY_VARS_NR_UE *ue)
generate_ul_reference_signal_sequences(SHRT_MAX); generate_ul_reference_signal_sequences(SHRT_MAX);
// Polar encoder init for PBCH // Polar encoder init for PBCH
//nr_polar_init(&frame_parms->pbch_polar_params, 1);
/*t_nrPolar_paramsPtr nrPolar_params = NULL, currentPtr = NULL;
nr_polar_init(&ue->nrPolar_params,
NR_POLAR_PBCH_MESSAGE_TYPE,
NR_POLAR_PBCH_PAYLOAD_BITS,
NR_POLAR_PBCH_AGGREGATION_LEVEL);*/
ue->nrPolar_params = NULL;
nr_polar_init(&ue->nrPolar_params,
NR_POLAR_PBCH_MESSAGE_TYPE,
NR_POLAR_PBCH_PAYLOAD_BITS,
NR_POLAR_PBCH_AGGREGATION_LEVEL);
//lte_sync_time_init(frame_parms); //lte_sync_time_init(frame_parms);
//generate_ul_ref_sigs(); //generate_ul_ref_sigs();
......
...@@ -28,7 +28,7 @@ uint16_t nr_slots_per_subframe[MAX_NUM_SUBCARRIER_SPACING] = {1, 2, 4, 16, 32}; ...@@ -28,7 +28,7 @@ uint16_t nr_slots_per_subframe[MAX_NUM_SUBCARRIER_SPACING] = {1, 2, 4, 16, 32};
int nr_init_frame_parms0( int nr_init_frame_parms0(
NR_DL_FRAME_PARMS *frame_parms, NR_DL_FRAME_PARMS *fp,
int mu, int mu,
int Ncp) int Ncp)
...@@ -37,9 +37,9 @@ int nr_init_frame_parms0( ...@@ -37,9 +37,9 @@ int nr_init_frame_parms0(
#if DISABLE_LOG_X #if DISABLE_LOG_X
printf("Initializing frame parms for mu %d, N_RB %d, Ncp %d\n",mu, frame_parms->N_RB_DL, Ncp); printf("Initializing frame parms for mu %d, N_RB %d, Ncp %d\n",mu, fp->N_RB_DL, Ncp);
#else #else
LOG_I(PHY,"Initializing frame parms for mu %d, N_RB %d, Ncp %d\n",mu, frame_parms->N_RB_DL, Ncp); LOG_I(PHY,"Initializing frame parms for mu %d, N_RB %d, Ncp %d\n",mu, fp->N_RB_DL, Ncp);
#endif #endif
if (Ncp == NFAPI_CP_EXTENDED) if (Ncp == NFAPI_CP_EXTENDED)
...@@ -48,15 +48,15 @@ int nr_init_frame_parms0( ...@@ -48,15 +48,15 @@ int nr_init_frame_parms0(
switch(mu) { switch(mu) {
case NR_MU_0: //15kHz scs case NR_MU_0: //15kHz scs
frame_parms->subcarrier_spacing = nr_subcarrier_spacing[NR_MU_0]; fp->subcarrier_spacing = nr_subcarrier_spacing[NR_MU_0];
frame_parms->slots_per_subframe = nr_slots_per_subframe[NR_MU_0]; fp->slots_per_subframe = nr_slots_per_subframe[NR_MU_0];
break; break;
case NR_MU_1: //30kHz scs case NR_MU_1: //30kHz scs
frame_parms->subcarrier_spacing = nr_subcarrier_spacing[NR_MU_1]; fp->subcarrier_spacing = nr_subcarrier_spacing[NR_MU_1];
frame_parms->slots_per_subframe = nr_slots_per_subframe[NR_MU_1]; fp->slots_per_subframe = nr_slots_per_subframe[NR_MU_1];
switch(frame_parms->N_RB_DL){ switch(fp->N_RB_DL){
case 11: case 11:
case 24: case 24:
case 38: case 38:
...@@ -65,17 +65,17 @@ int nr_init_frame_parms0( ...@@ -65,17 +65,17 @@ int nr_init_frame_parms0(
case 65: case 65:
case 106: //40 MHz case 106: //40 MHz
if (frame_parms->threequarter_fs) { if (fp->threequarter_fs) {
frame_parms->ofdm_symbol_size = 1536; fp->ofdm_symbol_size = 1536;
frame_parms->first_carrier_offset = 900; //1536 - 636 fp->first_carrier_offset = 900; //1536 - 636
frame_parms->nb_prefix_samples0 = 132; fp->nb_prefix_samples0 = 132;
frame_parms->nb_prefix_samples = 108; fp->nb_prefix_samples = 108;
} }
else { else {
frame_parms->ofdm_symbol_size = 2048; fp->ofdm_symbol_size = 2048;
frame_parms->first_carrier_offset = 1412; //2048 - 636 fp->first_carrier_offset = 1412; //2048 - 636
frame_parms->nb_prefix_samples0 = 176; fp->nb_prefix_samples0 = 176;
frame_parms->nb_prefix_samples = 144; fp->nb_prefix_samples = 144;
} }
break; break;
...@@ -84,44 +84,44 @@ int nr_init_frame_parms0( ...@@ -84,44 +84,44 @@ int nr_init_frame_parms0(
case 189: case 189:
case 217: //80 MHz case 217: //80 MHz
if (frame_parms->threequarter_fs) { if (fp->threequarter_fs) {
frame_parms->ofdm_symbol_size = 3072; fp->ofdm_symbol_size = 3072;
frame_parms->first_carrier_offset = 1770; //3072 - 1302 fp->first_carrier_offset = 1770; //3072 - 1302
frame_parms->nb_prefix_samples0 = 264; fp->nb_prefix_samples0 = 264;
frame_parms->nb_prefix_samples = 216; fp->nb_prefix_samples = 216;
} }
else { else {
frame_parms->ofdm_symbol_size = 4096; fp->ofdm_symbol_size = 4096;
frame_parms->first_carrier_offset = 2794; //4096 - 1302 fp->first_carrier_offset = 2794; //4096 - 1302
frame_parms->nb_prefix_samples0 = 352; fp->nb_prefix_samples0 = 352;
frame_parms->nb_prefix_samples = 288; fp->nb_prefix_samples = 288;
} }
break; break;
case 245: case 245:
AssertFatal(frame_parms->threequarter_fs==0,"3/4 sampling impossible for N_RB %d and MU %d\n",frame_parms->N_RB_DL,mu); AssertFatal(fp->threequarter_fs==0,"3/4 sampling impossible for N_RB %d and MU %d\n",fp->N_RB_DL,mu);
frame_parms->ofdm_symbol_size = 4096; fp->ofdm_symbol_size = 4096;
frame_parms->first_carrier_offset = 2626; //4096 - 1478 fp->first_carrier_offset = 2626; //4096 - 1478
frame_parms->nb_prefix_samples0 = 352; fp->nb_prefix_samples0 = 352;
frame_parms->nb_prefix_samples = 288; fp->nb_prefix_samples = 288;
break; break;
case 273: case 273:
AssertFatal(frame_parms->threequarter_fs==0,"3/4 sampling impossible for N_RB %d and MU %d\n",frame_parms->N_RB_DL,mu); AssertFatal(fp->threequarter_fs==0,"3/4 sampling impossible for N_RB %d and MU %d\n",fp->N_RB_DL,mu);
frame_parms->ofdm_symbol_size = 4096; fp->ofdm_symbol_size = 4096;
frame_parms->first_carrier_offset = 2458; //4096 - 1638 fp->first_carrier_offset = 2458; //4096 - 1638
frame_parms->nb_prefix_samples0 = 352; fp->nb_prefix_samples0 = 352;
frame_parms->nb_prefix_samples = 288; fp->nb_prefix_samples = 288;
break; break;
default: default:
AssertFatal(1==0,"Number of resource blocks %d undefined for mu %d, frame parms = %p\n", frame_parms->N_RB_DL, mu, frame_parms); AssertFatal(1==0,"Number of resource blocks %d undefined for mu %d, frame parms = %p\n", fp->N_RB_DL, mu, fp);
} }
break; break;
case NR_MU_2: //60kHz scs case NR_MU_2: //60kHz scs
frame_parms->subcarrier_spacing = nr_subcarrier_spacing[NR_MU_2]; fp->subcarrier_spacing = nr_subcarrier_spacing[NR_MU_2];
frame_parms->slots_per_subframe = nr_slots_per_subframe[NR_MU_2]; fp->slots_per_subframe = nr_slots_per_subframe[NR_MU_2];
switch(frame_parms->N_RB_DL){ //FR1 bands only switch(fp->N_RB_DL){ //FR1 bands only
case 11: case 11:
case 18: case 18:
case 38: case 38:
...@@ -135,77 +135,80 @@ int nr_init_frame_parms0( ...@@ -135,77 +135,80 @@ int nr_init_frame_parms0(
case 121: case 121:
case 135: case 135:
default: default:
AssertFatal(1==0,"Number of resource blocks %d undefined for mu %d, frame parms = %p\n", frame_parms->N_RB_DL, mu, frame_parms); AssertFatal(1==0,"Number of resource blocks %d undefined for mu %d, frame parms = %p\n", fp->N_RB_DL, mu, fp);
} }
break; break;
case NR_MU_3: case NR_MU_3:
frame_parms->subcarrier_spacing = nr_subcarrier_spacing[NR_MU_3]; fp->subcarrier_spacing = nr_subcarrier_spacing[NR_MU_3];
frame_parms->slots_per_subframe = nr_slots_per_subframe[NR_MU_3]; fp->slots_per_subframe = nr_slots_per_subframe[NR_MU_3];
break; break;
case NR_MU_4: case NR_MU_4:
frame_parms->subcarrier_spacing = nr_subcarrier_spacing[NR_MU_4]; fp->subcarrier_spacing = nr_subcarrier_spacing[NR_MU_4];
frame_parms->slots_per_subframe = nr_slots_per_subframe[NR_MU_4]; fp->slots_per_subframe = nr_slots_per_subframe[NR_MU_4];
break; break;
default: default:
AssertFatal(1==0,"Invalid numerology index %d", mu); AssertFatal(1==0,"Invalid numerology index %d", mu);
} }
frame_parms->slots_per_frame = 10* frame_parms->slots_per_subframe; fp->slots_per_frame = 10* fp->slots_per_subframe;
frame_parms->symbols_per_slot = ((Ncp == NORMAL)? 14 : 12); // to redefine for different slot formats fp->symbols_per_slot = ((Ncp == NORMAL)? 14 : 12); // to redefine for different slot formats
frame_parms->samples_per_subframe_wCP = frame_parms->ofdm_symbol_size * frame_parms->symbols_per_slot * frame_parms->slots_per_subframe; fp->samples_per_subframe_wCP = fp->ofdm_symbol_size * fp->symbols_per_slot * fp->slots_per_subframe;
frame_parms->samples_per_frame_wCP = 10 * frame_parms->samples_per_subframe_wCP; fp->samples_per_frame_wCP = 10 * fp->samples_per_subframe_wCP;
frame_parms->samples_per_subframe = (frame_parms->samples_per_subframe_wCP + (frame_parms->nb_prefix_samples0 * frame_parms->slots_per_subframe) + fp->samples_per_subframe = (fp->samples_per_subframe_wCP + (fp->nb_prefix_samples0 * fp->slots_per_subframe) +
(frame_parms->nb_prefix_samples * frame_parms->slots_per_subframe * (frame_parms->symbols_per_slot - 1))); (fp->nb_prefix_samples * fp->slots_per_subframe * (fp->symbols_per_slot - 1)));
frame_parms->samples_per_frame = 10 * frame_parms->samples_per_subframe; fp->samples_per_frame = 10 * fp->samples_per_subframe;
frame_parms->freq_range = (frame_parms->dl_CarrierFreq < 6e9)? nr_FR1 : nr_FR2; fp->freq_range = (fp->dl_CarrierFreq < 6e9)? nr_FR1 : nr_FR2;
// Initial bandwidth part configuration -- full carrier bandwidth // Initial bandwidth part configuration -- full carrier bandwidth
frame_parms->initial_bwp_dl.bwp_id = 0; fp->initial_bwp_dl.bwp_id = 0;
frame_parms->initial_bwp_dl.scs = frame_parms->subcarrier_spacing; fp->initial_bwp_dl.scs = fp->subcarrier_spacing;
frame_parms->initial_bwp_dl.location = 0; fp->initial_bwp_dl.location = 0;
frame_parms->initial_bwp_dl.N_RB = frame_parms->N_RB_DL; fp->initial_bwp_dl.N_RB = fp->N_RB_DL;
frame_parms->initial_bwp_dl.cyclic_prefix = Ncp; fp->initial_bwp_dl.cyclic_prefix = Ncp;
frame_parms->initial_bwp_dl.ofdm_symbol_size = frame_parms->ofdm_symbol_size; fp->initial_bwp_dl.ofdm_symbol_size = fp->ofdm_symbol_size;
return 0; return 0;
} }
int nr_init_frame_parms(nfapi_nr_config_request_t* config, int nr_init_frame_parms(nfapi_nr_config_request_t* config,
NR_DL_FRAME_PARMS *frame_parms) { NR_DL_FRAME_PARMS *fp) {
nr_init_frame_parms0(frame_parms, nr_init_frame_parms0(fp,
config->subframe_config.numerology_index_mu.value, config->subframe_config.numerology_index_mu.value,
config->subframe_config.dl_cyclic_prefix_type.value); config->subframe_config.dl_cyclic_prefix_type.value);
} }
int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *frame_parms, int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *fp,
int mu, int mu,
int Ncp) int Ncp,
int n_ssb_crb,
int ssb_subcarrier_offset)
{ {
nr_init_frame_parms0(frame_parms,mu,Ncp); nr_init_frame_parms0(fp,mu,Ncp);
int start_rb = n_ssb_crb / (1<<mu);
fp->ssb_start_subcarrier = 12 * start_rb + ssb_subcarrier_offset;
return 0; return 0;
} }
void nr_dump_frame_parms(NR_DL_FRAME_PARMS *frame_parms) void nr_dump_frame_parms(NR_DL_FRAME_PARMS *fp)
{ {
LOG_I(PHY,"frame_parms->scs=%d\n",frame_parms->subcarrier_spacing); LOG_I(PHY,"fp->scs=%d\n",fp->subcarrier_spacing);
LOG_I(PHY,"frame_parms->ofdm_symbol_size=%d\n",frame_parms->ofdm_symbol_size); LOG_I(PHY,"fp->ofdm_symbol_size=%d\n",fp->ofdm_symbol_size);
LOG_I(PHY,"frame_parms->nb_prefix_samples0=%d\n",frame_parms->nb_prefix_samples0); LOG_I(PHY,"fp->nb_prefix_samples0=%d\n",fp->nb_prefix_samples0);
LOG_I(PHY,"frame_parms->nb_prefix_samples=%d\n",frame_parms->nb_prefix_samples); LOG_I(PHY,"fp->nb_prefix_samples=%d\n",fp->nb_prefix_samples);
LOG_I(PHY,"frame_parms->slots_per_subframe=%d\n",frame_parms->slots_per_subframe); LOG_I(PHY,"fp->slots_per_subframe=%d\n",fp->slots_per_subframe);
LOG_I(PHY,"frame_parms->samples_per_subframe_wCP=%d\n",frame_parms->samples_per_subframe_wCP); LOG_I(PHY,"fp->samples_per_subframe_wCP=%d\n",fp->samples_per_subframe_wCP);
LOG_I(PHY,"frame_parms->samples_per_frame_wCP=%d\n",frame_parms->samples_per_frame_wCP); LOG_I(PHY,"fp->samples_per_frame_wCP=%d\n",fp->samples_per_frame_wCP);
LOG_I(PHY,"frame_parms->samples_per_subframe=%d\n",frame_parms->samples_per_subframe); LOG_I(PHY,"fp->samples_per_subframe=%d\n",fp->samples_per_subframe);
LOG_I(PHY,"frame_parms->samples_per_frame=%d\n",frame_parms->samples_per_frame); LOG_I(PHY,"fp->samples_per_frame=%d\n",fp->samples_per_frame);
LOG_I(PHY,"frame_parms->initial_bwp_dl.bwp_id=%d\n",frame_parms->initial_bwp_dl.bwp_id); LOG_I(PHY,"fp->initial_bwp_dl.bwp_id=%d\n",fp->initial_bwp_dl.bwp_id);
LOG_I(PHY,"frame_parms->initial_bwp_dl.scs=%d\n",frame_parms->initial_bwp_dl.scs); LOG_I(PHY,"fp->initial_bwp_dl.scs=%d\n",fp->initial_bwp_dl.scs);
LOG_I(PHY,"frame_parms->initial_bwp_dl.N_RB=%d\n",frame_parms->initial_bwp_dl.N_RB); LOG_I(PHY,"fp->initial_bwp_dl.N_RB=%d\n",fp->initial_bwp_dl.N_RB);
LOG_I(PHY,"frame_parms->initial_bwp_dl.cyclic_prefix=%d\n",frame_parms->initial_bwp_dl.cyclic_prefix); LOG_I(PHY,"fp->initial_bwp_dl.cyclic_prefix=%d\n",fp->initial_bwp_dl.cyclic_prefix);
LOG_I(PHY,"frame_parms->initial_bwp_dl.location=%d\n",frame_parms->initial_bwp_dl.location); LOG_I(PHY,"fp->initial_bwp_dl.location=%d\n",fp->initial_bwp_dl.location);
LOG_I(PHY,"frame_parms->initial_bwp_dl.ofdm_symbol_size=%d\n",frame_parms->initial_bwp_dl.ofdm_symbol_size); LOG_I(PHY,"fp->initial_bwp_dl.ofdm_symbol_size=%d\n",fp->initial_bwp_dl.ofdm_symbol_size);
} }
...@@ -377,7 +377,7 @@ void phy_config_request(PHY_Config_t *phy_config); ...@@ -377,7 +377,7 @@ void phy_config_request(PHY_Config_t *phy_config);
int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf); int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf);
void dump_frame_parms(LTE_DL_FRAME_PARMS *frame_parms); void dump_frame_parms(LTE_DL_FRAME_PARMS *frame_parms);
int nr_init_frame_parms(nfapi_nr_config_request_t* config, NR_DL_FRAME_PARMS *frame_parms); int nr_init_frame_parms(nfapi_nr_config_request_t* config, NR_DL_FRAME_PARMS *frame_parms);
int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *frame_parms,int mu,int Ncp); int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *frame_parms,int mu,int Ncp,int n_ssb_crb,int ssb_subcarrier_offset);
int init_nr_ue_signal(PHY_VARS_NR_UE *ue,int nb_connected_eNB,uint8_t abstraction_flag); int init_nr_ue_signal(PHY_VARS_NR_UE *ue,int nb_connected_eNB,uint8_t abstraction_flag);
void nr_dump_frame_parms(NR_DL_FRAME_PARMS *frame_parms); void nr_dump_frame_parms(NR_DL_FRAME_PARMS *frame_parms);
int phy_init_nr_gNB(PHY_VARS_gNB *gNB, unsigned char is_secondary_gNB, unsigned char abstraction_flag); int phy_init_nr_gNB(PHY_VARS_gNB *gNB, unsigned char is_secondary_gNB, unsigned char abstraction_flag);
......
...@@ -36,7 +36,7 @@ This section deals with basic functions for OFDM Modulation. ...@@ -36,7 +36,7 @@ This section deals with basic functions for OFDM Modulation.
#include "common/utils/LOG/vcd_signal_dumper.h" #include "common/utils/LOG/vcd_signal_dumper.h"
#include "modulation_common.h" #include "modulation_common.h"
#include "PHY/LTE_TRANSPORT/transport_common_proto.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) void normal_prefix_mod(int32_t *txdataF,int32_t *txdata,uint8_t nsymb,LTE_DL_FRAME_PARMS *frame_parms)
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#include "PHY/LTE_ESTIMATION/lte_estimation.h" #include "PHY/LTE_ESTIMATION/lte_estimation.h"
#include "PHY/NR_UE_ESTIMATION/nr_estimation.h" #include "PHY/NR_UE_ESTIMATION/nr_estimation.h"
#define DEBUG_FEP //#define DEBUG_FEP
#define SOFFSET 0 #define SOFFSET 0
...@@ -198,20 +198,17 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue, ...@@ -198,20 +198,17 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue,
switch(channel){ switch(channel){
case NR_PBCH_EST: case NR_PBCH_EST:
//if ((l>4) && (l<8)) {
for (aa=0; aa<frame_parms->nb_antenna_ports_eNB; aa++) {
//#ifdef DEBUG_FEP //#ifdef DEBUG_FEP
printf("Channel estimation eNB %d, aatx %d, slot %d, symbol %d\n",eNB_id,aa,Ns,l); printf("Channel estimation eNB %d, slot %d, symbol %d\n",eNB_id,Ns,l);
//#endif //#endif
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
start_meas(&ue->dlsch_channel_estimation_stats); start_meas(&ue->dlsch_channel_estimation_stats);
#endif #endif
nr_pbch_channel_estimation(ue,eNB_id,0, nr_pbch_channel_estimation(ue,eNB_id,0,
Ns, Ns,
aa, l,
l, symbol);
symbol);
//} //}
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
stop_meas(&ue->dlsch_channel_estimation_stats); stop_meas(&ue->dlsch_channel_estimation_stats);
...@@ -239,53 +236,48 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue, ...@@ -239,53 +236,48 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue,
#endif #endif
} }
}
break; break;
case NR_PDCCH_EST: case NR_PDCCH_EST:
for (aa=0; aa<frame_parms->nb_antenna_ports_eNB; aa++) {
#ifdef DEBUG_FEP #ifdef DEBUG_FEP
printf("PDCCH Channel estimation eNB %d, aatx %d, slot %d, symbol %d start_sc %d\n",eNB_id,aa,Ns,l,coreset_start_subcarrier); printf("PDCCH Channel estimation eNB %d, aatx %d, slot %d, symbol %d start_sc %d\n",eNB_id,aa,Ns,l,coreset_start_subcarrier);
#endif #endif
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
start_meas(&ue->dlsch_channel_estimation_stats); start_meas(&ue->dlsch_channel_estimation_stats);
#endif #endif
nr_pdcch_channel_estimation(ue,eNB_id,0, nr_pdcch_channel_estimation(ue,eNB_id,0,
Ns, Ns,
aa, l,
l, symbol,
symbol, coreset_start_subcarrier,
coreset_start_subcarrier, nb_rb_coreset);
nb_rb_coreset);
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
stop_meas(&ue->dlsch_channel_estimation_stats); stop_meas(&ue->dlsch_channel_estimation_stats);
#endif #endif
}
break; break;
case NR_PDSCH_EST: case NR_PDSCH_EST:
for (aa=0; aa<frame_parms->nb_antenna_ports_eNB; aa++) {
#ifdef DEBUG_FEP #ifdef DEBUG_FEP
printf("Channel estimation eNB %d, aatx %d, slot %d, symbol %d\n",eNB_id,aa,Ns,l); printf("Channel estimation eNB %d, aatx %d, slot %d, symbol %d\n",eNB_id,aa,Ns,l);
#endif #endif
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
start_meas(&ue->dlsch_channel_estimation_stats); start_meas(&ue->dlsch_channel_estimation_stats);
#endif #endif
nr_pdsch_channel_estimation(ue,eNB_id,0, nr_pdsch_channel_estimation(ue,eNB_id,0,
Ns, Ns,
aa, l,
l, symbol,
symbol, bwp_start_subcarrier,
bwp_start_subcarrier, nb_rb_pdsch);
nb_rb_pdsch);
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
stop_meas(&ue->dlsch_channel_estimation_stats); stop_meas(&ue->dlsch_channel_estimation_stats);
#endif #endif
}
break; break;
case NR_SSS_EST: case NR_SSS_EST:
break; break;
......
...@@ -106,13 +106,13 @@ short nr_rx_mod_table[NR_MOD_TABLE_SIZE_SHORT] = {0,0,23170,-23170,-23170,23170, ...@@ -106,13 +106,13 @@ short nr_rx_mod_table[NR_MOD_TABLE_SIZE_SHORT] = {0,0,23170,-23170,-23170,23170,
}*/ }*/
int nr_pdsch_dmrs_rx(PHY_VARS_NR_UE *ue, int nr_pdsch_dmrs_rx(PHY_VARS_NR_UE *ue,
uint8_t eNB_offset, uint8_t eNB_offset,
unsigned int Ns, unsigned int Ns,
unsigned int nr_gold_pdsch[2][20][2][21], unsigned int nr_gold_pdsch[2][20][2][21],
int32_t *output, int32_t *output,
unsigned short p, unsigned short p,
int length_dmrs, int length_dmrs,
unsigned short nb_rb_pdsch) unsigned short nb_rb_pdsch)
{ {
int32_t qpsk[4],nqpsk[4],*qpsk_p, n; int32_t qpsk[4],nqpsk[4],*qpsk_p, n;
//int w,mprime,ind,l,ind_dword,ind_qpsk_symb,kp,lp, config_type, k; //int w,mprime,ind,l,ind_dword,ind_qpsk_symb,kp,lp, config_type, k;
...@@ -216,26 +216,38 @@ int nr_pdcch_dmrs_rx(PHY_VARS_NR_UE *ue, ...@@ -216,26 +216,38 @@ int nr_pdcch_dmrs_rx(PHY_VARS_NR_UE *ue,
return(0); return(0);
} }