Commit 5ef2af1c authored by Francesco Mani's avatar Francesco Mani

minor changes

parent 9bbb12f7
...@@ -54,6 +54,12 @@ int nr_slot_fep(PHY_VARS_NR_UE *phy_vars_ue, ...@@ -54,6 +54,12 @@ int nr_slot_fep(PHY_VARS_NR_UE *phy_vars_ue,
int sample_offset, int sample_offset,
int no_prefix); int no_prefix);
int nr_slot_fep_init_sync(PHY_VARS_NR_UE *ue,
unsigned char symbol,
unsigned char Ns,
int sample_offset,
int no_prefix);
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,
int subframe, int subframe,
......
...@@ -211,10 +211,10 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue, ...@@ -211,10 +211,10 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue,
} }
int nr_slot_fep_init_sync(PHY_VARS_NR_UE *ue, int nr_slot_fep_init_sync(PHY_VARS_NR_UE *ue,
unsigned char symbol, unsigned char symbol,
unsigned char Ns, unsigned char Ns,
int sample_offset, int sample_offset,
int no_prefix) int no_prefix)
{ {
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;
......
...@@ -83,11 +83,10 @@ void nr_fill_ulsch(PHY_VARS_gNB *gNB, ...@@ -83,11 +83,10 @@ void nr_fill_ulsch(PHY_VARS_gNB *gNB,
} }
void nr_ulsch_unscrambling(int16_t* llr, void nr_ulsch_unscrambling(int16_t* llr,
uint32_t size, uint32_t size,
uint8_t q, uint8_t q,
uint32_t Nid, uint32_t Nid,
uint32_t n_RNTI) uint32_t n_RNTI) {
{
uint8_t reset; uint8_t reset;
uint32_t x1, x2, s=0; uint32_t x1, x2, s=0;
......
...@@ -329,7 +329,6 @@ void nr_ulsch_scale_channel(int **ul_ch_estimates_ext, ...@@ -329,7 +329,6 @@ void nr_ulsch_scale_channel(int **ul_ch_estimates_ext,
nb_rb = (2*nb_rb)/3; nb_rb = (2*nb_rb)/3;
} }
for (rb=0;rb<nb_rb;rb++) { for (rb=0;rb<nb_rb;rb++) {
ul_ch128[0] = _mm_mulhi_epi16(ul_ch128[0], ch_amp128); ul_ch128[0] = _mm_mulhi_epi16(ul_ch128[0], ch_amp128);
...@@ -403,7 +402,7 @@ void nr_ulsch_channel_level(int **ul_ch_estimates_ext, ...@@ -403,7 +402,7 @@ void nr_ulsch_channel_level(int **ul_ch_estimates_ext,
symbol_mod = (symbol>=(7-frame_parms->Ncp)) ? symbol-(7-frame_parms->Ncp) : symbol; symbol_mod = (symbol>=(7-frame_parms->Ncp)) ? symbol-(7-frame_parms->Ncp) : symbol;
for (aatx=0; aatx<frame_parms->nb_antenna_ports_gNB; aatx++) for (aatx=0; aatx<frame_parms->nb_antenna_ports_gNB; aatx++) {
for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) { for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
//clear average level //clear average level
avg128U = vdupq_n_s32(0); avg128U = vdupq_n_s32(0);
...@@ -446,8 +445,7 @@ void nr_ulsch_channel_level(int **ul_ch_estimates_ext, ...@@ -446,8 +445,7 @@ void nr_ulsch_channel_level(int **ul_ch_estimates_ext,
((int32_t*)&avg128U)[2] + ((int32_t*)&avg128U)[2] +
((int32_t*)&avg128U)[3] ) / (nb_rb*nre); ((int32_t*)&avg128U)[3] ) / (nb_rb*nre);
} }
}
#endif #endif
} }
...@@ -666,7 +664,6 @@ void nr_ulsch_channel_compensation(int **rxdataF_ext, ...@@ -666,7 +664,6 @@ void nr_ulsch_channel_compensation(int **rxdataF_ext,
if (rho) { if (rho) {
for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) { for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
rho128 = (__m128i *)&rho[aarx][symbol*frame_parms->N_RB_UL*12]; rho128 = (__m128i *)&rho[aarx][symbol*frame_parms->N_RB_UL*12];
ul_ch128 = (__m128i *)&ul_ch_estimates_ext[aarx][symbol*frame_parms->N_RB_UL*12]; ul_ch128 = (__m128i *)&ul_ch_estimates_ext[aarx][symbol*frame_parms->N_RB_UL*12];
...@@ -748,7 +745,6 @@ void nr_ulsch_channel_compensation(int **rxdataF_ext, ...@@ -748,7 +745,6 @@ void nr_ulsch_channel_compensation(int **rxdataF_ext,
#elif defined(__arm__) #elif defined(__arm__)
unsigned short rb; unsigned short rb;
unsigned char aatx,aarx,symbol_mod,is_dmrs_symbol=0; unsigned char aatx,aarx,symbol_mod,is_dmrs_symbol=0;
...@@ -1017,7 +1013,6 @@ void nr_rx_pusch(PHY_VARS_gNB *gNB, ...@@ -1017,7 +1013,6 @@ void nr_rx_pusch(PHY_VARS_gNB *gNB,
nb_re_pusch = rel15_ul->rb_size * NR_NB_SC_PER_RB; nb_re_pusch = rel15_ul->rb_size * NR_NB_SC_PER_RB;
} }
//---------------------------------------------------------- //----------------------------------------------------------
//--------------------- Channel estimation --------------------- //--------------------- Channel estimation ---------------------
//---------------------------------------------------------- //----------------------------------------------------------
...@@ -1071,7 +1066,7 @@ void nr_rx_pusch(PHY_VARS_gNB *gNB, ...@@ -1071,7 +1066,7 @@ void nr_rx_pusch(PHY_VARS_gNB *gNB,
gNB->pusch_vars[UE_id]->log2_maxh = (log2_approx(avgs)/2)+1; gNB->pusch_vars[UE_id]->log2_maxh = (log2_approx(avgs)/2)+1;
gNB->pusch_vars[UE_id]->cl_done = 1; gNB->pusch_vars[UE_id]->cl_done = 1;
} }
nr_ulsch_channel_compensation(gNB->pusch_vars[UE_id]->rxdataF_ext, nr_ulsch_channel_compensation(gNB->pusch_vars[UE_id]->rxdataF_ext,
gNB->pusch_vars[UE_id]->ul_ch_estimates_ext, gNB->pusch_vars[UE_id]->ul_ch_estimates_ext,
......
...@@ -702,7 +702,7 @@ int32_t nr_rx_pdcch(PHY_VARS_NR_UE *ue, ...@@ -702,7 +702,7 @@ int32_t nr_rx_pdcch(PHY_VARS_NR_UE *ue,
for (aarx = 0; aarx < frame_parms->nb_antennas_rx; aarx++) for (aarx = 0; aarx < frame_parms->nb_antennas_rx; aarx++)
avgs = cmax(avgs, avgP[aarx]); avgs = cmax(avgs, avgP[aarx]);
log2_maxh = (log2_approx(avgs) / 2) + 5; //+frame_parms->nb_antennas_rx; log2_maxh = (log2_approx(avgs) / 2) + 5; //+frame_parms->nb_antennas_rx;
#ifdef UE_DEBUG_TRACE #ifdef UE_DEBUG_TRACE
LOG_D(PHY,"slot %d: pdcch log2_maxh = %d (%d,%d)\n",slot,log2_maxh,avgP[0],avgs); LOG_D(PHY,"slot %d: pdcch log2_maxh = %d (%d,%d)\n",slot,log2_maxh,avgP[0],avgs);
#endif #endif
......
...@@ -224,7 +224,7 @@ void nr_ulsch_procedures(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, int ULSCH ...@@ -224,7 +224,7 @@ void nr_ulsch_procedures(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, int ULSCH
number_symbols = pusch_pdu->nr_of_symbols; number_symbols = pusch_pdu->nr_of_symbols;
for (l = start_symbol; l < start_symbol + number_symbols; l++) for (l = start_symbol; l < start_symbol + number_symbols; l++)
number_dmrs_symbols += ((pusch_pdu->ul_dmrs_symb_pos)>>l)&0x01;; number_dmrs_symbols += ((pusch_pdu->ul_dmrs_symb_pos)>>l)&0x01;
if (nodata_dmrs) if (nodata_dmrs)
nb_re_dmrs = 12*number_dmrs_symbols; nb_re_dmrs = 12*number_dmrs_symbols;
...@@ -238,7 +238,6 @@ void nr_ulsch_procedures(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, int ULSCH ...@@ -238,7 +238,6 @@ void nr_ulsch_procedures(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, int ULSCH
pusch_pdu->qam_mod_order, pusch_pdu->qam_mod_order,
pusch_pdu->nrOfLayers); pusch_pdu->nrOfLayers);
//---------------------------------------------------------- //----------------------------------------------------------
//------------------- ULSCH unscrambling ------------------- //------------------- ULSCH unscrambling -------------------
//---------------------------------------------------------- //----------------------------------------------------------
......
...@@ -161,7 +161,7 @@ void fill_scc(NR_ServingCellConfigCommon_t *scc,uint64_t *ssb_bitmap,int N_RB_DL ...@@ -161,7 +161,7 @@ void fill_scc(NR_ServingCellConfigCommon_t *scc,uint64_t *ssb_bitmap,int N_RB_DL
*scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rsrp_ThresholdSSB=19; *scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rsrp_ThresholdSSB=19;
scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->prach_RootSequenceIndex.present=NR_RACH_ConfigCommon__prach_RootSequenceIndex_PR_l139; scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->prach_RootSequenceIndex.present=NR_RACH_ConfigCommon__prach_RootSequenceIndex_PR_l139;
scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->prach_RootSequenceIndex.choice.l139=0; scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->prach_RootSequenceIndex.choice.l139=0;
scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->restrictedSetConfig=NR_RACH_ConfigCommon__restrictedSetConfig_unrestrictedSet,TYPE_INT64; scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->restrictedSetConfig=NR_RACH_ConfigCommon__restrictedSetConfig_unrestrictedSet;
*scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[0]->k2=2; *scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[0]->k2=2;
scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[0]->mappingType=NR_PUSCH_TimeDomainResourceAllocation__mappingType_typeB; scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[0]->mappingType=NR_PUSCH_TimeDomainResourceAllocation__mappingType_typeB;
scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[0]->startSymbolAndLength=55; scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[0]->startSymbolAndLength=55;
......
...@@ -46,12 +46,14 @@ ...@@ -46,12 +46,14 @@
#include "PHY/NR_TRANSPORT/nr_ulsch.h" #include "PHY/NR_TRANSPORT/nr_ulsch.h"
#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h" #include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
#include "PHY/TOOLS/tools_defs.h" #include "PHY/TOOLS/tools_defs.h"
#include "SCHED_NR/fapi_nr_l1.h"
#include "SCHED_NR/sched_nr.h" #include "SCHED_NR/sched_nr.h"
#include "SCHED_NR_UE/defs.h" #include "SCHED_NR_UE/defs.h"
#include "SCHED_NR_UE/fapi_nr_ue_l1.h" #include "SCHED_NR_UE/fapi_nr_ue_l1.h"
#include "openair1/SIMULATION/TOOLS/sim.h" #include "openair1/SIMULATION/TOOLS/sim.h"
#include "openair1/SIMULATION/RF/rf.h" #include "openair1/SIMULATION/RF/rf.h"
#include "openair1/SIMULATION/NR_PHY/nr_unitary_defs.h" #include "openair1/SIMULATION/NR_PHY/nr_unitary_defs.h"
#include "openair2/RRC/NR/MESSAGES/asn1_msg.h"
//#include "openair1/SIMULATION/NR_PHY/nr_dummy_functions.c" //#include "openair1/SIMULATION/NR_PHY/nr_dummy_functions.c"
#include "LAYER2/NR_MAC_UE/mac_proto.h" #include "LAYER2/NR_MAC_UE/mac_proto.h"
#include "LAYER2/NR_MAC_gNB/mac_proto.h" #include "LAYER2/NR_MAC_gNB/mac_proto.h"
......
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