Commit 606ca596 authored by Guy De Souza's avatar Guy De Souza

Merge branch 'nr_pdcch' of https://gitlab.eurecom.fr/oai/openairinterface5g into nr_pdcch

parents 03464d91 d89602c8
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
int8_t polar_decoder( int8_t polar_decoder(
double *input, double *input,
uint32_t *out, uint8_t *out,
t_nrPolar_paramsPtr polarParams, t_nrPolar_paramsPtr polarParams,
uint8_t listSize, uint8_t listSize,
uint8_t pathMetricAppr) uint8_t pathMetricAppr)
...@@ -274,7 +274,7 @@ int8_t polar_decoder( ...@@ -274,7 +274,7 @@ int8_t polar_decoder(
/* /*
* Return bits. * Return bits.
*/ */
nr_byte2bit_uint8_32_t(polarParams->nr_polar_A, polarParams->payloadBits, out); //nr_byte2bit_uint8_32_t(polarParams->nr_polar_A, polarParams->payloadBits, out);
return(0); return(0);
} }
......
...@@ -112,7 +112,7 @@ void polar_encoder_dci(uint32_t *in, ...@@ -112,7 +112,7 @@ void polar_encoder_dci(uint32_t *in,
uint16_t n_RNTI); uint16_t n_RNTI);
int8_t polar_decoder(double *input, int8_t polar_decoder(double *input,
uint32_t *output, uint8_t *output,
t_nrPolar_paramsPtr polarParams, t_nrPolar_paramsPtr polarParams,
uint8_t listSize, uint8_t listSize,
uint8_t pathMetricAppr); uint8_t pathMetricAppr);
......
...@@ -933,8 +933,9 @@ void nr_lte_ue_transport(PHY_VARS_UE *ue,int abstraction_flag) { ...@@ -933,8 +933,9 @@ void nr_lte_ue_transport(PHY_VARS_UE *ue,int abstraction_flag) {
}*/ }*/
void phy_init_nr_top(NR_DL_FRAME_PARMS *frame_parms) void phy_init_nr_top(PHY_VARS_NR_UE *ue)
{ {
NR_DL_FRAME_PARMS *frame_parms = &ue->frame_parms;
crcTableInit(); crcTableInit();
...@@ -960,7 +961,11 @@ void phy_init_nr_top(NR_DL_FRAME_PARMS *frame_parms) ...@@ -960,7 +961,11 @@ void phy_init_nr_top(NR_DL_FRAME_PARMS *frame_parms)
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); //nr_polar_init(&frame_parms->pbch_polar_params, 1);
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);
......
This diff is collapsed.
...@@ -535,16 +535,18 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue, ...@@ -535,16 +535,18 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue,
unsigned short idx_demod =0; unsigned short idx_demod =0;
int8_t decoderState=0; int8_t decoderState=0;
uint8_t decoderListSize = 8, pathMetricAppr = 0; uint8_t decoderListSize = 8, pathMetricAppr = 0;
double aPrioriArray[frame_parms->pbch_polar_params.payloadBits]; // assume no a priori knowledge available about the payload.
memset(&pbch_a[0], 0, sizeof(uint8_t) * NR_POLAR_PBCH_PAYLOAD_BITS); memset(&pbch_a[0], 0, sizeof(uint8_t) * NR_POLAR_PBCH_PAYLOAD_BITS);
//printf("nr_pbch_ue nid_cell %d\n",frame_parms->Nid_cell); //printf("nr_pbch_ue nid_cell %d\n",frame_parms->Nid_cell);
/*double aPrioriArray[frame_parms->pbch_polar_params.payloadBits]; // assume no a priori knowledge available about the payload. for (int i=0; i<frame_parms->pbch_polar_params.payloadBits; i++) aPrioriArray[i] = NAN;
for (int i=0; i<frame_parms->pbch_polar_params.payloadBits; i++) aPrioriArray[i] = NAN;*/
int subframe_rx = proc->subframe_rx; int subframe_rx = proc->subframe_rx;
printf("ue->current_thread_id[subframe_rx] %d subframe_rx %d\n",ue->current_thread_id[subframe_rx], subframe_rx);
pbch_e_rx = &nr_ue_pbch_vars->llr[0]; pbch_e_rx = &nr_ue_pbch_vars->llr[0];
// clear LLR buffer // clear LLR buffer
...@@ -651,7 +653,8 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue, ...@@ -651,7 +653,8 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue,
//#endif //#endif
//polar decoding de-rate matching //polar decoding de-rate matching
decoderState = polar_decoder(demod_pbch_e, pbch_a, &frame_parms->pbch_polar_params, decoderListSize, pathMetricAppr); t_nrPolar_paramsPtr currentPtr = nr_polar_params(&ue->nrPolar_params, NR_POLAR_PBCH_MESSAGE_TYPE, NR_POLAR_PBCH_PAYLOAD_BITS, NR_POLAR_PBCH_AGGREGATION_LEVEL);
decoderState = polar_decoder(demod_pbch_e, pbch_a_b, currentPtr, decoderListSize, pathMetricAppr);
printf("polar decoder state %d\n", decoderState); printf("polar decoder state %d\n", decoderState);
if(decoderState == -1) if(decoderState == -1)
return(decoderState); return(decoderState);
...@@ -715,8 +718,3 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue, ...@@ -715,8 +718,3 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue,
return 0; return 0;
} }
...@@ -1085,6 +1085,7 @@ typedef struct { ...@@ -1085,6 +1085,7 @@ typedef struct {
uint32_t dmrs_pbch_bitmap_nr[DMRS_PBCH_I_SSB][DMRS_PBCH_N_HF][DMRS_BITMAP_SIZE]; uint32_t dmrs_pbch_bitmap_nr[DMRS_PBCH_I_SSB][DMRS_PBCH_N_HF][DMRS_BITMAP_SIZE];
#endif #endif
t_nrPolar_paramsPtr nrPolar_params;
/// PBCH DMRS sequence /// PBCH DMRS sequence
uint32_t nr_gold_pbch[2][64][NR_PBCH_DMRS_LENGTH_DWORD]; uint32_t nr_gold_pbch[2][64][NR_PBCH_DMRS_LENGTH_DWORD];
......
...@@ -696,8 +696,8 @@ static void *UE_thread_rxn_txnp4(void *arg) { ...@@ -696,8 +696,8 @@ static void *UE_thread_rxn_txnp4(void *arg) {
UE->ul_indication.slot = 0; // to be fill UE->ul_indication.slot = 0; // to be fill
UE->ul_indication.frame = 0; // to be fill UE->ul_indication.frame = 0; // to be fill
// [TODO] mapping right after NR initial sync // [TODO] mapping right after NR initial sync
//UE->ul_indication.frame = ; UE->ul_indication.frame = proc->frame_rx;
//UE->ul_indication.slot = ; UE->ul_indication.slot = proc->nr_tti_rx;
UE->if_inst->ul_indication(&UE->ul_indication); UE->if_inst->ul_indication(&UE->ul_indication);
} }
......
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