Commit c9e741e0 authored by Florian Kaltenberger's avatar Florian Kaltenberger

Merge remote-tracking branch 'origin/nr-polar-encoder-optimizations' into...

Merge remote-tracking branch 'origin/nr-polar-encoder-optimizations' into nr-polar-encoder-optimizations

Conflicts:
	nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
parents 3ae239a1 6868e745
...@@ -1019,7 +1019,12 @@ typedef struct { ...@@ -1019,7 +1019,12 @@ typedef struct {
nr_ue_if_module_t *if_inst; nr_ue_if_module_t *if_inst;
nr_downlink_indication_t dl_indication; nr_downlink_indication_t dl_indication;
nr_uplink_indication_t ul_indication; nr_uplink_indication_t ul_indication;
/// UE FAPI DCI request
nr_dcireq_t dcireq;
/// UE FAPI indication for DLSCH reception
fapi_nr_rx_indication_t rx_ind; fapi_nr_rx_indication_t rx_ind;
/// UE FAPI indication for DCI reception
fapi_nr_dci_indication_t dci_ind; fapi_nr_dci_indication_t dci_ind;
// point to the current rxTx thread index // point to the current rxTx thread index
......
...@@ -123,7 +123,7 @@ void phy_procedures_UE_TX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eNB ...@@ -123,7 +123,7 @@ void phy_procedures_UE_TX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eNB
@param r_type indicates the relaying operation: 0: no_relaying, 1: unicast relaying type 1, 2: unicast relaying type 2, 3: multicast relaying @param r_type indicates the relaying operation: 0: no_relaying, 1: unicast relaying type 1, 2: unicast relaying type 2, 3: multicast relaying
@param phy_vars_rn pointer to RN variables @param phy_vars_rn pointer to RN variables
*/ */
int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t abstraction_flag,uint8_t do_pdcch_flag,runmode_t mode,relaying_type_t r_type); int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t do_pdcch_flag,runmode_t mode);
int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t abstraction_flag,uint8_t do_pdcch_flag,runmode_t mode,relaying_type_t r_type); int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t abstraction_flag,uint8_t do_pdcch_flag,runmode_t mode,relaying_type_t r_type);
#ifdef UE_SLOT_PARALLELISATION #ifdef UE_SLOT_PARALLELISATION
......
...@@ -3541,9 +3541,9 @@ int nr_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t * ...@@ -3541,9 +3541,9 @@ int nr_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *
// this table contains 56 (NBR_NR_DCI_FIELDS) elements for each dci field and format described in TS 38.212. Each element represents the size in bits for each dci field // this table contains 56 (NBR_NR_DCI_FIELDS) elements for each dci field and format described in TS 38.212. Each element represents the size in bits for each dci field
//uint8_t dci_fields_sizes[NBR_NR_DCI_FIELDS][NBR_NR_FORMATS] = {0}; //uint8_t dci_fields_sizes[NBR_NR_DCI_FIELDS][NBR_NR_FORMATS] = {0};
// this is the UL bandwidth part. FIXME! To be defined where this value comes from // this is the UL bandwidth part. FIXME! To be defined where this value comes from
// uint16_t n_RB_ULBWP = 106; uint16_t n_RB_ULBWP = 106;
// this is the DL bandwidth part. FIXME! To be defined where this value comes from // this is the DL bandwidth part. FIXME! To be defined where this value comes from
//uint16_t n_RB_DLBWP = 106; uint16_t n_RB_DLBWP = 106;
//#ifdef NR_PDCCH_SCHED_DEBUG //#ifdef NR_PDCCH_SCHED_DEBUG
// printf("<-NR_PDCCH_PHY_PROCEDURES_LTE_UE (nr_ue_pdcch_procedures)-> n_RB_ULBWP=%d n_RB_DLBWP=%d\n", // printf("<-NR_PDCCH_PHY_PROCEDURES_LTE_UE (nr_ue_pdcch_procedures)-> n_RB_ULBWP=%d n_RB_DLBWP=%d\n",
// n_RB_ULBWP, // n_RB_ULBWP,
...@@ -5917,25 +5917,24 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eN ...@@ -5917,25 +5917,24 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eN
//nr_gold_pdcch(ue,0, 2); //nr_gold_pdcch(ue,0, 2);
for (int l=0; l<2; l++) { for (int l=0; l<2; l++) {
if (abstraction_flag == 0) {
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
start_meas(&ue->ofdm_demod_stats); start_meas(&ue->ofdm_demod_stats);
#endif #endif
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP, VCD_FUNCTION_IN); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP, VCD_FUNCTION_IN);
nr_slot_fep(ue, nr_slot_fep(ue,
l, l,
nr_tti_rx, nr_tti_rx,
0, 0,
0, 0,
1, 1,
NR_PDCCH_EST); NR_PDCCH_EST);
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);
#endif #endif
}
} }
write_output("rxdataF.m","rxF",ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[nr_tti_rx>>1]].rxdataF[0],ue->frame_parms.ofdm_symbol_size*2,1,1); write_output("rxdataF.m","rxF",ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[nr_tti_rx>>1]].rxdataF[0],ue->frame_parms.ofdm_symbol_size*2,1,1);
...@@ -5950,7 +5949,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eN ...@@ -5950,7 +5949,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eN
//printf(">>> at phy_procedures_nrUE_RX, nr_ue_pdcch_procedures init, dlsch->active=%d\n", //printf(">>> at phy_procedures_nrUE_RX, nr_ue_pdcch_procedures init, dlsch->active=%d\n",
// ue->dlsch[ue->current_thread_id[nr_tti_rx]][eNB_id][0]->active); // ue->dlsch[ue->current_thread_id[nr_tti_rx]][eNB_id][0]->active);
if (nr_ue_pdcch_procedures(eNB_id,ue,proc,abstraction_flag) == -1) { if (nr_ue_pdcch_procedures(eNB_id,ue,proc,0) == -1) {
LOG_E(PHY,"[UE %d] Frame %d, nr_tti_rx %d: Error in pdcch procedures\n",ue->Mod_id,frame_rx,nr_tti_rx); LOG_E(PHY,"[UE %d] Frame %d, nr_tti_rx %d: Error in pdcch procedures\n",ue->Mod_id,frame_rx,nr_tti_rx);
return(-1); return(-1);
} }
...@@ -6014,12 +6013,12 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eN ...@@ -6014,12 +6013,12 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eN
nr_gold_pdsch(ue,0,0, 1); nr_gold_pdsch(ue,0,0, 1);
nr_slot_fep(ue, nr_slot_fep(ue,
2, //to be updated from higher layer 2, //to be updated from higher layer
(nr_tti_rx<<1), (nr_tti_rx<<1),
0, 0,
0, 0,
0, 0,
NR_PDSCH_EST); NR_PDSCH_EST);
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
start_meas(&ue->generic_stat); start_meas(&ue->generic_stat);
...@@ -6035,7 +6034,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eN ...@@ -6035,7 +6034,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eN
NULL, NULL,
ue->pdcch_vars[ue->current_thread_id[nr_tti_rx]][eNB_id]->num_pdcch_symbols, ue->pdcch_vars[ue->current_thread_id[nr_tti_rx]][eNB_id]->num_pdcch_symbols,
ue->frame_parms.symbols_per_tti>>1, ue->frame_parms.symbols_per_tti>>1,
abstraction_flag); 0);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_OUT); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_OUT);
} }
...@@ -6052,7 +6051,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eN ...@@ -6052,7 +6051,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eN
NULL, NULL,
ue->pdcch_vars[ue->current_thread_id[nr_tti_rx]][eNB_id]->num_pdcch_symbols, ue->pdcch_vars[ue->current_thread_id[nr_tti_rx]][eNB_id]->num_pdcch_symbols,
ue->frame_parms.symbols_per_tti>>1, ue->frame_parms.symbols_per_tti>>1,
abstraction_flag); 0);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_SI, VCD_FUNCTION_OUT); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_SI, VCD_FUNCTION_OUT);
} }
...@@ -6067,7 +6066,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eN ...@@ -6067,7 +6066,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eN
NULL, NULL,
ue->pdcch_vars[ue->current_thread_id[nr_tti_rx]][eNB_id]->num_pdcch_symbols, ue->pdcch_vars[ue->current_thread_id[nr_tti_rx]][eNB_id]->num_pdcch_symbols,
ue->frame_parms.symbols_per_tti>>1, ue->frame_parms.symbols_per_tti>>1,
abstraction_flag); 0);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_P, VCD_FUNCTION_OUT); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_P, VCD_FUNCTION_OUT);
} }
...@@ -6082,7 +6081,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eN ...@@ -6082,7 +6081,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eN
NULL, NULL,
ue->pdcch_vars[ue->current_thread_id[nr_tti_rx]][eNB_id]->num_pdcch_symbols, ue->pdcch_vars[ue->current_thread_id[nr_tti_rx]][eNB_id]->num_pdcch_symbols,
ue->frame_parms.symbols_per_tti>>1, ue->frame_parms.symbols_per_tti>>1,
abstraction_flag); 0);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_RA, VCD_FUNCTION_OUT); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_RA, VCD_FUNCTION_OUT);
} }
...@@ -6140,7 +6139,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eN ...@@ -6140,7 +6139,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eN
if ( (nr_tti_rx == 0) && (ue->decode_MIB == 1)) if ( (nr_tti_rx == 0) && (ue->decode_MIB == 1))
{ {
ue_pbch_procedures(eNB_id,ue,proc,abstraction_flag); ue_pbch_procedures(eNB_id,ue,proc,0);
} }
// do procedures for C-RNTI // do procedures for C-RNTI
...@@ -6159,7 +6158,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eN ...@@ -6159,7 +6158,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eN
NULL, NULL,
1+(ue->frame_parms.symbols_per_tti>>1), 1+(ue->frame_parms.symbols_per_tti>>1),
ue->frame_parms.symbols_per_tti-1, ue->frame_parms.symbols_per_tti-1,
abstraction_flag); 0);
LOG_D(PHY," ------ end PDSCH ChannelComp/LLR slot 0: AbsSubframe %d.%d ------ \n", frame_rx%1024, nr_tti_rx); LOG_D(PHY," ------ end PDSCH ChannelComp/LLR slot 0: AbsSubframe %d.%d ------ \n", frame_rx%1024, nr_tti_rx);
LOG_D(PHY," ------ --> PDSCH Turbo Decoder slot 0/1: AbsSubframe %d.%d ------ \n", frame_rx%1024, nr_tti_rx); LOG_D(PHY," ------ --> PDSCH Turbo Decoder slot 0/1: AbsSubframe %d.%d ------ \n", frame_rx%1024, nr_tti_rx);
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
...@@ -6174,7 +6173,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eN ...@@ -6174,7 +6173,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eN
ue->dlsch[ue->current_thread_id[nr_tti_rx]][eNB_id][1], ue->dlsch[ue->current_thread_id[nr_tti_rx]][eNB_id][1],
&ue->dlsch_errors[eNB_id], &ue->dlsch_errors[eNB_id],
mode, mode,
abstraction_flag);*/ 0);*/
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
stop_meas(&ue->dlsch_procedures_stat[ue->current_thread_id[nr_tti_rx]]); stop_meas(&ue->dlsch_procedures_stat[ue->current_thread_id[nr_tti_rx]]);
#if DISABLE_LOG_X #if DISABLE_LOG_X
...@@ -6224,7 +6223,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eN ...@@ -6224,7 +6223,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eN
NULL, NULL,
1+(ue->frame_parms.symbols_per_tti>>1), 1+(ue->frame_parms.symbols_per_tti>>1),
ue->frame_parms.symbols_per_tti-1, ue->frame_parms.symbols_per_tti-1,
abstraction_flag); 0);
/*ue_dlsch_procedures(ue, /*ue_dlsch_procedures(ue,
proc, proc,
...@@ -6234,7 +6233,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eN ...@@ -6234,7 +6233,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eN
NULL, NULL,
&ue->dlsch_SI_errors[eNB_id], &ue->dlsch_SI_errors[eNB_id],
mode, mode,
abstraction_flag); 0);
ue->dlsch_SI[eNB_id]->active = 0;*/ ue->dlsch_SI[eNB_id]->active = 0;*/
} }
...@@ -6248,7 +6247,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eN ...@@ -6248,7 +6247,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eN
NULL, NULL,
1+(ue->frame_parms.symbols_per_tti>>1), 1+(ue->frame_parms.symbols_per_tti>>1),
ue->frame_parms.symbols_per_tti-1, ue->frame_parms.symbols_per_tti-1,
abstraction_flag); 0);
/*ue_dlsch_procedures(ue, /*ue_dlsch_procedures(ue,
proc, proc,
...@@ -6258,7 +6257,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eN ...@@ -6258,7 +6257,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eN
NULL, NULL,
&ue->dlsch_p_errors[eNB_id], &ue->dlsch_p_errors[eNB_id],
mode, mode,
abstraction_flag);*/ 0);*/
ue->dlsch_p[eNB_id]->active = 0; ue->dlsch_p[eNB_id]->active = 0;
} }
// do procedures for RA-RNTI // do procedures for RA-RNTI
...@@ -6271,7 +6270,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eN ...@@ -6271,7 +6270,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eN
NULL, NULL,
1+(ue->frame_parms.symbols_per_tti>>1), 1+(ue->frame_parms.symbols_per_tti>>1),
ue->frame_parms.symbols_per_tti-1, ue->frame_parms.symbols_per_tti-1,
abstraction_flag); 0);
/*ue_dlsch_procedures(ue, /*ue_dlsch_procedures(ue,
proc, proc,
eNB_id, eNB_id,
...@@ -6280,7 +6279,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eN ...@@ -6280,7 +6279,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eN
NULL, NULL,
&ue->dlsch_ra_errors[eNB_id], &ue->dlsch_ra_errors[eNB_id],
mode, mode,
abstraction_flag);*/ 0);*/
ue->dlsch_ra[eNB_id]->active = 0; ue->dlsch_ra[eNB_id]->active = 0;
} }
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
static nr_ue_if_module_t *nr_ue_if_module_inst[MAX_IF_MODULES]; static nr_ue_if_module_t *nr_ue_if_module_inst[MAX_IF_MODULES];
// L2 Abstraction Layer // L2 Abstraction Layer
int8_t handle_bcch_bch(module_id_t module_id, int cc_id, uint8_t gNB_index, uint8_t *pduP, uint8_t additional_bits, uint32_t ssb_index, uint32_t ssb_length, uint16_t cell_id){ int handle_bcch_bch(module_id_t module_id, int cc_id, unsigned int gNB_index, uint8_t *pduP, unsigned int additional_bits, uint32_t ssb_index, uint32_t ssb_length, uint16_t cell_id){
return nr_ue_decode_mib( module_id, return nr_ue_decode_mib( module_id,
cc_id, cc_id,
...@@ -55,12 +55,12 @@ int8_t handle_bcch_bch(module_id_t module_id, int cc_id, uint8_t gNB_index, uint ...@@ -55,12 +55,12 @@ int8_t handle_bcch_bch(module_id_t module_id, int cc_id, uint8_t gNB_index, uint
} }
// L2 Abstraction Layer // L2 Abstraction Layer
int8_t handle_bcch_dlsch(module_id_t module_id, int cc_id, uint8_t gNB_index, uint32_t sibs_mask, uint8_t *pduP, uint32_t pdu_len){ int handle_bcch_dlsch(module_id_t module_id, int cc_id, unsigned int gNB_index, uint32_t sibs_mask, uint8_t *pduP, uint32_t pdu_len){
return 0; return 0;
} }
// L2 Abstraction Layer // L2 Abstraction Layer
int8_t handle_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fapi_nr_dci_pdu_rel15_t *dci, uint16_t rnti, uint32_t dci_type){ int handle_dci(module_id_t module_id, int cc_id, unsigned int gNB_index, fapi_nr_dci_pdu_rel15_t *dci, uint16_t rnti, uint32_t dci_type){
return nr_ue_process_dci(module_id, cc_id, gNB_index, dci, rnti, dci_type); return nr_ue_process_dci(module_id, cc_id, gNB_index, dci, rnti, dci_type);
...@@ -78,7 +78,7 @@ int8_t handle_dlsch (module_id_t module_id, int cc_id, uint8_t gNB_index, fapi_n ...@@ -78,7 +78,7 @@ int8_t handle_dlsch (module_id_t module_id, int cc_id, uint8_t gNB_index, fapi_n
} }
int8_t nr_ue_ul_indication(nr_uplink_indication_t *ul_info){ int nr_ue_ul_indication(nr_uplink_indication_t *ul_info){
NR_UE_L2_STATE_t ret; NR_UE_L2_STATE_t ret;
module_id_t module_id = ul_info->module_id; module_id_t module_id = ul_info->module_id;
...@@ -118,7 +118,7 @@ int8_t nr_ue_ul_indication(nr_uplink_indication_t *ul_info){ ...@@ -118,7 +118,7 @@ int8_t nr_ue_ul_indication(nr_uplink_indication_t *ul_info){
return 0; return 0;
} }
int8_t nr_ue_dl_indication(nr_downlink_indication_t *dl_info){ int nr_ue_dl_indication(nr_downlink_indication_t *dl_info){
int32_t i; int32_t i;
uint32_t ret_mask = 0x0; uint32_t ret_mask = 0x0;
...@@ -248,7 +248,7 @@ nr_ue_if_module_t *nr_ue_if_module_init(uint32_t module_id){ ...@@ -248,7 +248,7 @@ nr_ue_if_module_t *nr_ue_if_module_init(uint32_t module_id){
return nr_ue_if_module_inst[module_id]; return nr_ue_if_module_inst[module_id];
} }
int8_t nr_ue_if_module_kill(uint32_t module_id) { int nr_ue_if_module_kill(uint32_t module_id) {
if (nr_ue_if_module_inst[module_id] != NULL){ if (nr_ue_if_module_inst[module_id] != NULL){
free(nr_ue_if_module_inst[module_id]); free(nr_ue_if_module_inst[module_id]);
......
...@@ -38,6 +38,21 @@ ...@@ -38,6 +38,21 @@
typedef struct {
/// module id
module_id_t module_id;
/// gNB index
uint32_t gNB_index;
/// component carrier id
int cc_id;
/// frame
frame_t frame;
/// slot
int slot;
fapi_nr_dl_config_request_t dl_config_req;
} nr_dcireq_t;
typedef struct { typedef struct {
/// module id /// module id
module_id_t module_id; module_id_t module_id;
...@@ -48,7 +63,7 @@ typedef struct { ...@@ -48,7 +63,7 @@ typedef struct {
/// frame /// frame
frame_t frame; frame_t frame;
/// slot /// slot
uint8_t slot; int slot;
/// NR UE FAPI-like P7 message, direction: L1 to L2 /// NR UE FAPI-like P7 message, direction: L1 to L2
/// data reception indication structure /// data reception indication structure
...@@ -72,7 +87,7 @@ typedef struct { ...@@ -72,7 +87,7 @@ typedef struct {
/// slot /// slot
uint32_t slot; uint32_t slot;
/// ssb_index, if ssb is not present in current TTI, thie value set to -1 /// ssb_index, if ssb is not present in current TTI, thie value set to -1
int8_t ssb_index; int ssb_index;
} nr_uplink_indication_t; } nr_uplink_indication_t;
// Downlink subframe P7 // Downlink subframe P7
...@@ -82,13 +97,13 @@ typedef struct { ...@@ -82,13 +97,13 @@ typedef struct {
/// module id /// module id
module_id_t module_id; module_id_t module_id;
/// component carrier id /// component carrier id
uint8_t CC_id; int CC_id;
/// frame /// frame
frame_t frame; frame_t frame;
/// subframe /// subframe
sub_frame_t subframe; sub_frame_t subframe;
/// slot /// slot
uint8_t slot; int slot;
/// NR UE FAPI-like P7 message, direction: L2 to L1 /// NR UE FAPI-like P7 message, direction: L2 to L1
/// downlink transmission configuration request structure /// downlink transmission configuration request structure
...@@ -122,7 +137,7 @@ typedef struct { ...@@ -122,7 +137,7 @@ typedef struct {
* -1: Failed to consume bytes. Abort the mission. * -1: Failed to consume bytes. Abort the mission.
* Non-negative return values indicate success, and ignored. * Non-negative return values indicate success, and ignored.
*/ */
typedef int8_t (nr_ue_scheduled_response_f)(nr_scheduled_response_t *scheduled_response); typedef int (nr_ue_scheduled_response_f)(nr_scheduled_response_t *scheduled_response);
/* /*
...@@ -132,7 +147,7 @@ typedef int8_t (nr_ue_scheduled_response_f)(nr_scheduled_response_t *scheduled_r ...@@ -132,7 +147,7 @@ typedef int8_t (nr_ue_scheduled_response_f)(nr_scheduled_response_t *scheduled_r
* -1: Failed to consume bytes. Abort the mission. * -1: Failed to consume bytes. Abort the mission.
* Non-negative return values indicate success, and ignored. * Non-negative return values indicate success, and ignored.
*/ */
typedef int8_t (nr_ue_phy_config_request_f)(nr_phy_config_t *phy_config); typedef int (nr_ue_phy_config_request_f)(nr_phy_config_t *phy_config);
/* /*
...@@ -142,7 +157,7 @@ typedef int8_t (nr_ue_phy_config_request_f)(nr_phy_config_t *phy_config); ...@@ -142,7 +157,7 @@ typedef int8_t (nr_ue_phy_config_request_f)(nr_phy_config_t *phy_config);
* -1: Failed to consume bytes. Abort the mission. * -1: Failed to consume bytes. Abort the mission.
* Non-negative return values indicate success, and ignored. * Non-negative return values indicate success, and ignored.
*/ */
typedef int8_t (nr_ue_dl_indication_f)(nr_downlink_indication_t *dl_info); typedef int (nr_ue_dl_indication_f)(nr_downlink_indication_t *dl_info);
/* /*
* Generic type of an application-defined callback to return various * Generic type of an application-defined callback to return various
...@@ -151,19 +166,21 @@ typedef int8_t (nr_ue_dl_indication_f)(nr_downlink_indication_t *dl_info); ...@@ -151,19 +166,21 @@ typedef int8_t (nr_ue_dl_indication_f)(nr_downlink_indication_t *dl_info);
* -1: Failed to consume bytes. Abort the mission. * -1: Failed to consume bytes. Abort the mission.
* Non-negative return values indicate success, and ignored. * Non-negative return values indicate success, and ignored.
*/ */
typedef int8_t (nr_ue_ul_indication_f)(nr_uplink_indication_t *ul_info); typedef int (nr_ue_ul_indication_f)(nr_uplink_indication_t *ul_info);
typedef int (nr_ue_dcireq_f)(nr_dcireq_t *ul_info);
// TODO check this stuff can be reuse of need modification // TODO check this stuff can be reuse of need modification
typedef struct nr_ue_if_module_s { typedef struct nr_ue_if_module_s {
nr_ue_scheduled_response_f *scheduled_response; nr_ue_scheduled_response_f *scheduled_response;
nr_ue_phy_config_request_f *phy_config_request; nr_ue_phy_config_request_f *phy_config_request;
nr_ue_dl_indication_f *dl_indication; nr_ue_dl_indication_f *dl_indication;
nr_ue_ul_indication_f *ul_indication; nr_ue_ul_indication_f *ul_indication;
nr_ue_dcireq_f *dcireq;
uint32_t cc_mask; uint32_t cc_mask;
uint32_t current_frame; uint32_t current_frame;
uint32_t current_slot; uint32_t current_slot;
//pthread_mutex_t nr_if_mutex; //pthread_mutex_t nr_if_mutex;
} nr_ue_if_module_t; } nr_ue_if_module_t;
...@@ -174,14 +191,16 @@ nr_ue_if_module_t *nr_ue_if_module_init(uint32_t module_id); ...@@ -174,14 +191,16 @@ nr_ue_if_module_t *nr_ue_if_module_init(uint32_t module_id);
/**\brief done free of memory allocation by module_id and release to pointer pool. /**\brief done free of memory allocation by module_id and release to pointer pool.
\param module_id module id*/ \param module_id module id*/
int8_t nr_ue_if_module_kill(uint32_t module_id); int nr_ue_if_module_kill(uint32_t module_id);
/**\brief interface between L1/L2, indicating the downlink related information, like dci_ind and rx_req /**\brief interface between L1/L2, indicating the downlink related information, like dci_ind and rx_req
\param dl_info including dci_ind and rx_request messages*/ \param dl_info including dci_ind and rx_request messages*/
int8_t nr_ue_dl_indication(nr_downlink_indication_t *dl_info); int nr_ue_dl_indication(nr_downlink_indication_t *dl_info);
int nr_ue_ul_indication(nr_uplink_indication_t *ul_info);
int8_t nr_ue_ul_indication(nr_uplink_indication_t *ul_info); int nr_ue_dcireq(nr_dcireq_t *dcireq);
// TODO check // TODO check
/**\brief handle BCCH-BCH message from dl_indication /**\brief handle BCCH-BCH message from dl_indication
...@@ -190,15 +209,15 @@ int8_t nr_ue_ul_indication(nr_uplink_indication_t *ul_info); ...@@ -190,15 +209,15 @@ int8_t nr_ue_ul_indication(nr_uplink_indication_t *ul_info);
\param ssb_index SSB index within 0 - (L_ssb-1) corresponding to 38.331 ch.13 parameter i \param ssb_index SSB index within 0 - (L_ssb-1) corresponding to 38.331 ch.13 parameter i
\param ssb_length corresponding to L1 parameter L_ssb \param ssb_length corresponding to L1 parameter L_ssb
\param cell_id cell id */ \param cell_id cell id */
int8_t handle_bcch_bch(module_id_t module_id, int cc_id, uint8_t gNB_index, uint8_t *pduP, uint8_t additional_bits, uint32_t ssb_index, uint32_t ssb_length, uint16_t cell_id); int handle_bcch_bch(module_id_t module_id, int cc_id, unsigned int gNB_index, uint8_t *pduP, unsigned int additional_bits, uint32_t ssb_index, uint32_t ssb_length, uint16_t cell_id);
// TODO check // TODO check
/**\brief handle BCCH-DL-SCH message from dl_indication /**\brief handle BCCH-DL-SCH message from dl_indication
\param pdu_len length(bytes) of pdu \param pdu_len length(bytes) of pdu
\param pduP pointer to pdu*/ \param pduP pointer to pdu*/
int8_t handle_bcch_dlsch(module_id_t module_id, int cc_id, uint8_t gNB_index, uint32_t sibs_mask, uint8_t *pduP, uint32_t pdu_len); int handle_bcch_dlsch(module_id_t module_id, int cc_id, unsigned int gNB_index, uint32_t sibs_mask, uint8_t *pduP, uint32_t pdu_len);
int8_t handle_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fapi_nr_dci_pdu_rel15_t *dci, uint16_t rnti, uint32_t dci_type); int handle_dci(module_id_t module_id, int cc_id, unsigned int gNB_index, fapi_nr_dci_pdu_rel15_t *dci, uint16_t rnti, uint32_t dci_type);
#endif #endif
...@@ -680,12 +680,17 @@ static void *UE_thread_rxn_txnp4(void *arg) { ...@@ -680,12 +680,17 @@ static void *UE_thread_rxn_txnp4(void *arg) {
//clean previous FAPI MESSAGE //clean previous FAPI MESSAGE
// call L2 for DL_CONFIG (DCI) // call L2 for DL_CONFIG (DCI)
UE->if_inst->dcireq(&UE->dci_config,proc->frame_rx,proc->nr_tti_rx); UE->dcireq.module_id = UE->Mod_id;
UE->dcireq.gNB_index = 0;
UE->dcireq.cc_id = 0;
UE->dcireq.frame = proc->frame_rx;
UE->dcireq.slot = proc->nr_tti_rx;
UE->if_inst->dcireq(&UE->dcireq);
#ifdef UE_SLOT_PARALLELISATION #ifdef UE_SLOT_PARALLELISATION
phy_procedures_slot_parallelization_UE_RX( UE, proc, 0, 0, 1, UE->mode, no_relay, NULL ); phy_procedures_slot_parallelization_UE_RX( UE, proc, 0, 0, 1, UE->mode, no_relay, NULL );
#else #else
phy_procedures_nrUE_RX( UE, proc, 0, 0, 1, UE->mode, no_relay); phy_procedures_nrUE_RX( UE, proc, 0, 1, UE->mode);
printf(">>> nr_ue_pdcch_procedures ended\n"); printf(">>> nr_ue_pdcch_procedures ended\n");
#endif #endif
...@@ -1139,7 +1144,7 @@ void *UE_thread(void *arg) { ...@@ -1139,7 +1144,7 @@ void *UE_thread(void *arg) {
UE->if_inst->ul_indication(&UE->ul_indication); UE->if_inst->ul_indication(&UE->ul_indication);
} }
phy_procedures_nrUE_RX( UE, proc, 0, 0, 1, UE->mode, no_relay); phy_procedures_nrUE_RX( UE, proc, 0, 1, UE->mode);
getchar(); getchar();
} // else loop_through_memory } // else loop_through_memory
} // start_rx_stream==1 } // start_rx_stream==1
......
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