Merge branch 'develop' into NR_RRC_harq_hacks
This commit is contained in:
@@ -657,8 +657,8 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
|
||||
abstraction_flag = 0;
|
||||
fp->nb_antennas_tx = 1;
|
||||
fp->nb_antennas_rx=1;
|
||||
dmrs_UplinkConfig_t *dmrs_Uplink_Config = &ue->pusch_config.dmrs_UplinkConfig;
|
||||
ptrs_UplinkConfig_t *ptrs_Uplink_Config = &ue->pusch_config.dmrs_UplinkConfig.ptrs_UplinkConfig;
|
||||
// dmrs_UplinkConfig_t *dmrs_Uplink_Config = &ue->pusch_config.dmrs_UplinkConfig;
|
||||
// ptrs_UplinkConfig_t *ptrs_Uplink_Config = &ue->pusch_config.dmrs_UplinkConfig.ptrs_UplinkConfig;
|
||||
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);
|
||||
phy_init_nr_top(ue);
|
||||
@@ -710,9 +710,9 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
|
||||
}
|
||||
|
||||
//------------- config DMRS parameters--------------//
|
||||
dmrs_Uplink_Config->pusch_dmrs_type = pusch_dmrs_type1;
|
||||
dmrs_Uplink_Config->pusch_dmrs_AdditionalPosition = pusch_dmrs_pos0;
|
||||
dmrs_Uplink_Config->pusch_maxLength = pusch_len1;
|
||||
// dmrs_Uplink_Config->pusch_dmrs_type = pusch_dmrs_type1;
|
||||
// dmrs_Uplink_Config->pusch_dmrs_AdditionalPosition = pusch_dmrs_pos0;
|
||||
// dmrs_Uplink_Config->pusch_maxLength = pusch_len1;
|
||||
//-------------------------------------------------//
|
||||
ue->dmrs_DownlinkConfig.pdsch_dmrs_type = pdsch_dmrs_type1;
|
||||
ue->dmrs_DownlinkConfig.pdsch_dmrs_AdditionalPosition = pdsch_dmrs_pos0;
|
||||
@@ -745,15 +745,13 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
|
||||
/////////////////////////PUSCH PTRS init/////////////////////////
|
||||
///////////
|
||||
|
||||
ue->ptrs_configured = 0; // flag to be toggled by RCC
|
||||
|
||||
//------------- config PTRS parameters--------------//
|
||||
ptrs_Uplink_Config->timeDensity.ptrs_mcs1 = 0; // setting MCS values to 0 indicate abscence of time_density field in the configuration
|
||||
ptrs_Uplink_Config->timeDensity.ptrs_mcs2 = 0;
|
||||
ptrs_Uplink_Config->timeDensity.ptrs_mcs3 = 0;
|
||||
ptrs_Uplink_Config->frequencyDensity.n_rb0 = 0; // setting N_RB values to 0 indicate abscence of frequency_density field in the configuration
|
||||
ptrs_Uplink_Config->frequencyDensity.n_rb1 = 0;
|
||||
ptrs_Uplink_Config->resourceElementOffset = 0;
|
||||
// ptrs_Uplink_Config->timeDensity.ptrs_mcs1 = 2; // setting MCS values to 0 indicate abscence of time_density field in the configuration
|
||||
// ptrs_Uplink_Config->timeDensity.ptrs_mcs2 = 4;
|
||||
// ptrs_Uplink_Config->timeDensity.ptrs_mcs3 = 10;
|
||||
// ptrs_Uplink_Config->frequencyDensity.n_rb0 = 25; // setting N_RB values to 0 indicate abscence of frequency_density field in the configuration
|
||||
// ptrs_Uplink_Config->frequencyDensity.n_rb1 = 75;
|
||||
// ptrs_Uplink_Config->resourceElementOffset = 0;
|
||||
//-------------------------------------------------//
|
||||
|
||||
///////////
|
||||
|
||||
@@ -112,18 +112,12 @@ int lte_est_timing_advance(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
}
|
||||
|
||||
|
||||
int lte_est_timing_advance_pusch(PHY_VARS_eNB *eNB,
|
||||
module_id_t UE_id)
|
||||
int lte_est_timing_advance_pusch(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
int32_t **ul_ch_estimates_time)
|
||||
{
|
||||
int temp, i, aa, max_pos=0, max_val=0;
|
||||
short Re,Im;
|
||||
|
||||
RU_t *ru;
|
||||
ru = RC.ru[UE_id];
|
||||
LTE_DL_FRAME_PARMS *frame_parms = (eNB==NULL) ? ru->frame_parms : &eNB->frame_parms;
|
||||
LTE_eNB_PUSCH *eNB_pusch_vars = (eNB!=NULL) ? eNB->pusch_vars[UE_id] : (LTE_eNB_PUSCH*)NULL;
|
||||
RU_CALIBRATION *calibration = &ru->calibration;
|
||||
int32_t **ul_ch_estimates_time = (eNB==NULL) ? calibration->drs_ch_estimates_time : eNB_pusch_vars->drs_ch_estimates_time;
|
||||
uint8_t cyclic_shift = 0;
|
||||
int sync_pos = (frame_parms->ofdm_symbol_size-cyclic_shift*frame_parms->ofdm_symbol_size/12)%(frame_parms->ofdm_symbol_size);
|
||||
|
||||
@@ -149,7 +143,7 @@ int lte_est_timing_advance_pusch(PHY_VARS_eNB *eNB,
|
||||
max_pos = max_pos-frame_parms->ofdm_symbol_size;
|
||||
|
||||
//#ifdef DEBUG_PHY
|
||||
LOG_D(PHY,"frame %d: max_pos = %d, sync_pos=%d\n",eNB->proc.frame_rx,max_pos,sync_pos);
|
||||
LOG_D(PHY,"max_pos = %d, sync_pos=%d\n",max_pos,sync_pos);
|
||||
//#endif //DEBUG_PHY
|
||||
|
||||
return max_pos - sync_pos;
|
||||
|
||||
@@ -220,8 +220,12 @@ void phy_adjust_gain (PHY_VARS_UE *phy_vars_ue,
|
||||
uint32_t rx_power_fil_dB,
|
||||
unsigned char eNB_id);
|
||||
|
||||
int lte_ul_channel_estimation(PHY_VARS_eNB *phy_vars_eNB,
|
||||
int32_t lte_ul_channel_estimation(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
L1_rxtx_proc_t *proc,
|
||||
LTE_eNB_ULSCH_t * ulsch,
|
||||
int32_t **ul_ch_estimates,
|
||||
int32_t **ul_ch_estimates_time,
|
||||
int32_t **rxdataF_ext,
|
||||
module_id_t UE_id,
|
||||
uint8_t l,
|
||||
uint8_t Ns);
|
||||
@@ -258,7 +262,8 @@ int lte_est_timing_advance(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
unsigned char number_of_cards,
|
||||
short coef);
|
||||
|
||||
int lte_est_timing_advance_pusch(PHY_VARS_eNB* phy_vars_eNB,module_id_t UE_id);
|
||||
int lte_est_timing_advance_pusch(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
int32_t **ul_ch_estimates_time);
|
||||
|
||||
void lte_eNB_I0_measurements(PHY_VARS_eNB *phy_vars_eNB,
|
||||
int subframe,
|
||||
|
||||
@@ -34,23 +34,17 @@ static int16_t ru_90c[2*128] = {32767, 0,32766, -402,32758, -804,32746, -1206,32
|
||||
|
||||
#define SCALE 0x3FFF
|
||||
|
||||
int32_t lte_ul_channel_estimation(PHY_VARS_eNB *eNB,
|
||||
int32_t lte_ul_channel_estimation(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
L1_rxtx_proc_t *proc,
|
||||
LTE_eNB_ULSCH_t * ulsch,
|
||||
int32_t **ul_ch_estimates,
|
||||
int32_t **ul_ch_estimates_time,
|
||||
int32_t **rxdataF_ext,
|
||||
module_id_t UE_id,
|
||||
unsigned char l,
|
||||
unsigned char Ns) {
|
||||
RU_t *ru;
|
||||
ru = RC.ru[UE_id];
|
||||
LTE_DL_FRAME_PARMS *frame_parms = (eNB!=NULL) ? &eNB->frame_parms : ru->frame_parms;
|
||||
LTE_eNB_PUSCH *pusch_vars = (eNB!=NULL) ? eNB->pusch_vars[UE_id] : NULL;
|
||||
RU_CALIBRATION *calibration = &ru->calibration;
|
||||
int32_t **ul_ch_estimates = (eNB!=NULL) ? pusch_vars->drs_ch_estimates : calibration->drs_ch_estimates;
|
||||
AssertFatal(ul_ch_estimates != NULL, "ul_ch_estimates is null (eNB %p, pusch %p, pusch->drs_ch_estimates %p, pusch->drs_ch_estimates[0] %p ul_ch_estimates %p UE_id %d)\n",eNB,pusch_vars,
|
||||
pusch_vars->drs_ch_estimates,pusch_vars->drs_ch_estimates[0],ul_ch_estimates,UE_id);
|
||||
int32_t **ul_ch_estimates_time = (eNB!=NULL) ? pusch_vars->drs_ch_estimates_time : calibration->drs_ch_estimates_time;
|
||||
AssertFatal(ul_ch_estimates != NULL, "ul_ch_estimates is null ");
|
||||
AssertFatal(ul_ch_estimates_time != NULL, "ul_ch_estimates_time is null\n");
|
||||
int32_t **rxdataF_ext = (eNB!=NULL) ? pusch_vars->rxdataF_ext : calibration->rxdataF_ext;
|
||||
|
||||
int subframe = proc->subframe_rx;
|
||||
|
||||
uint8_t harq_pid;
|
||||
@@ -83,16 +77,16 @@ int32_t lte_ul_channel_estimation(PHY_VARS_eNB *eNB,
|
||||
#endif
|
||||
int32_t temp_in_ifft_0[2048*2] __attribute__((aligned(32)));
|
||||
|
||||
if (eNB->ulsch[UE_id]->ue_type > 0) harq_pid = 0;
|
||||
if (ulsch->ue_type > 0) harq_pid = 0;
|
||||
else {
|
||||
harq_pid = subframe2harq_pid(frame_parms,proc->frame_rx,subframe);
|
||||
}
|
||||
|
||||
uint16_t N_rb_alloc = eNB->ulsch[UE_id]->harq_processes[harq_pid]->nb_rb;
|
||||
uint16_t N_rb_alloc = ulsch->harq_processes[harq_pid]->nb_rb;
|
||||
int32_t tmp_estimates[N_rb_alloc*12] __attribute__((aligned(16)));
|
||||
Msc_RS = N_rb_alloc*12;
|
||||
cyclic_shift = (frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift +
|
||||
eNB->ulsch[UE_id]->harq_processes[harq_pid]->n_DMRS2 +
|
||||
ulsch->harq_processes[harq_pid]->n_DMRS2 +
|
||||
frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.nPRS[(subframe<<1)+Ns]) % 12;
|
||||
Msc_idx_ptr = (uint16_t *) bsearch(&Msc_RS, dftsizes, 34, sizeof(uint16_t), compareints);
|
||||
|
||||
@@ -276,7 +270,7 @@ int32_t lte_ul_channel_estimation(PHY_VARS_eNB *eNB,
|
||||
#if T_TRACER
|
||||
|
||||
if (aa == 0)
|
||||
T(T_ENB_PHY_UL_CHANNEL_ESTIMATE, T_INT(0), T_INT(eNB->ulsch[UE_id]->rnti),
|
||||
T(T_ENB_PHY_UL_CHANNEL_ESTIMATE, T_INT(0), T_INT(ulsch->rnti),
|
||||
T_INT(proc->frame_rx), T_INT(subframe),
|
||||
T_INT(0), T_BUFFER(ul_ch_estimates_time[0], 512 * 4));
|
||||
|
||||
|
||||
@@ -19,9 +19,14 @@
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#ifndef __PHY_LTE_REFSIG_MOD_TABLE__H__
|
||||
#define __PHY_LTE_REFSIG_MOD_TABLE__H__
|
||||
|
||||
#define MOD_TABLE_SIZE_SHORT 304
|
||||
#define MOD_TABLE_QPSK_OFFSET 1
|
||||
#define MOD_TABLE_16QAM_OFFSET 5
|
||||
#define MOD_TABLE_64QAM_OFFSET 21
|
||||
#define MOD_TABLE_PSS_OFFSET 85
|
||||
short mod_table[MOD_TABLE_SIZE_SHORT] = {0,0,768,768,768,-768,-768,768,-768,-768,343,343,343,1030,1030,343,1030,1030,343,-343,343,-1030,1030,-343,1030,-1030,-343,343,-343,1030,-1030,343,-1030,1030,-343,-343,-343,-1030,-1030,-343,-1030,-1030,503,503,503,168,168,503,168,168,503,838,503,1173,168,838,168,1173,838,503,838,168,1173,503,1173,168,838,838,838,1173,1173,838,1173,1173,503,-503,503,-168,168,-503,168,-168,503,-838,503,-1173,168,-838,168,-1173,838,-503,838,-168,1173,-503,1173,-168,838,-838,838,-1173,1173,-838,1173,-1173,-503,503,-503,168,-168,503,-168,168,-503,838,-503,1173,-168,838,-168,1173,-838,503,-838,168,-1173,503,-1173,168,-838,838,-838,1173,-1173,838,-1173,1173,-503,-503,-503,-168,-168,-503,-168,-168,-503,-838,-503,-1173,-168,-838,-168,-1173,-838,-503,-838,-168,-1173,-503,-1173,-168,-838,-838,-838,-1173,-1173,-838,-1173,-1173,1086,0,1081,-108,1065,-215,1038,-320,1001,-422,954,-519,897,-612,832,-698,758,-777,677,-849,589,-912,495,-966,397,-1011,294,-1046,189,-1070,81,-1083,-27,-1086,-135,-1078,-242,-1059,-346,-1030,-447,-990,-543,-941,-634,-882,-719,-814,-796,-739,-866,-656,-927,-566,-979,-471,-1021,-371,-1053,-268,-1074,-162,-1085,-54,-1085,54,-1074,162,-1053,268,-1021,371,-979,471,-927,566,-866,656,-796,739,-719,814,-634,882,-543,941,-447,990,-346,1030,-242,1059,-135,1078,-27,1086,81,1083,189,1070,294,1045,397,1011,495,966,589,912,677,849,758,777,832,698,897,612,954,519,1001,422,1038,320,1065,215,1081,108,16384,0,8192,0,4096,0,2048,0};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,6 +19,9 @@
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#ifndef __DLSCH_TBS_FULL__H__
|
||||
#define __DLSCH_TBS_FULL__H__
|
||||
|
||||
#define TBStable_rowCnt 27
|
||||
|
||||
/** \brief "Transport block size table"
|
||||
@@ -54,3 +57,4 @@ unsigned int TBStable[TBStable_rowCnt][110] = {{16,32,56,88,120,152,176,208,224,
|
||||
};
|
||||
|
||||
unsigned int TBStable1C[32] = {40, 56, 72, 120, 136, 144, 176, 208, 224, 256, 280, 296, 328, 336, 392, 488, 552, 600, 632, 696, 776, 840, 904, 1000, 1064, 1128, 1224, 1288, 1384, 1480, 1608, 1736};
|
||||
#endif
|
||||
|
||||
@@ -29,6 +29,10 @@
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
|
||||
#ifndef __PHY_LTE_TRANSPORT_PRACH_EXTERN__H__
|
||||
#define __PHY_LTE_TRANSPORT_PRACH_EXTERN__H__
|
||||
|
||||
#include "PHY/sse_intrin.h"
|
||||
#include "PHY/defs_eNB.h"
|
||||
#include "PHY/phy_extern.h"
|
||||
@@ -91,3 +95,4 @@ void compute_prach_seq(uint16_t rootSequenceIndex,
|
||||
lte_frame_type_t frame_type,
|
||||
uint32_t X_u[64][839]);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
* \warning
|
||||
*/
|
||||
|
||||
#ifndef __PHY_LTE_TRANSPORT_PUCCH_EXTERN__H__
|
||||
#define __PHY_LTE_TRANSPORT_PUCCH_EXTERN__H__
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/* PUCCH format3 >> */
|
||||
@@ -76,3 +79,5 @@ extern uint8_t Np4_TBL[4];
|
||||
// alpha_TBL
|
||||
extern int16_t alphaTBL_re[12];
|
||||
extern int16_t alphaTBL_im[12];
|
||||
|
||||
#endif
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
extern unsigned int dlsch_tbs25[27][25],TBStable[27][110],TBStable1C[32];
|
||||
extern unsigned short lte_cqi_eff1024[16];
|
||||
extern char lte_cqi_snr_dB[15];
|
||||
extern short conjugate[8],conjugate2[8];
|
||||
extern const short conjugate[8],conjugate2[8];
|
||||
extern short minus_one[8];
|
||||
extern short minus_one[8];
|
||||
extern short *ul_ref_sigs[30][2][34];
|
||||
|
||||
@@ -495,7 +495,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,
|
||||
}
|
||||
|
||||
AssertFatal(sumKr>0,
|
||||
"[eNB] ulsch_decoding.c: FATAL sumKr is 0! (Nid_cell %d, rnti %x, x2 %x): harq_pid %d round %d, RV %d, O_RI %d, O_ACK %d, G %d, subframe %d\n",
|
||||
"[eNB] ulsch_decoding.c: FATAL sumKr is 0! (Nid_cell %d, rnti %x, x2 %x): harq_pid %d round %d, RV %d, O_RI %d, O_ACK %d, G %u, subframe %d\n",
|
||||
frame_parms->Nid_cell,ulsch->rnti,x2,
|
||||
harq_pid,
|
||||
ulsch_harq->round,
|
||||
|
||||
@@ -1047,7 +1047,11 @@ void rx_ulsch(PHY_VARS_eNB *eNB,
|
||||
l%(frame_parms->symbols_per_tti/2),
|
||||
l/(frame_parms->symbols_per_tti/2),
|
||||
frame_parms);
|
||||
lte_ul_channel_estimation(eNB,proc,
|
||||
lte_ul_channel_estimation(&eNB->frame_parms,proc,
|
||||
eNB->ulsch[UE_id],
|
||||
eNB->pusch_vars[UE_id]->drs_ch_estimates,
|
||||
eNB->pusch_vars[UE_id]->drs_ch_estimates_time,
|
||||
eNB->pusch_vars[UE_id]->rxdataF_ext,
|
||||
UE_id,
|
||||
l%(frame_parms->symbols_per_tti/2),
|
||||
l/(frame_parms->symbols_per_tti/2));
|
||||
|
||||
@@ -29,8 +29,6 @@
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
#ifndef __LTE_TRANSPORT_SLSS__C__
|
||||
#define __LTE_TRANSPORT_SLSS__C__
|
||||
#include "PHY/defs_UE.h"
|
||||
|
||||
extern int multicast_link_write_sock(int groupP, char *dataP, uint32_t sizeP);
|
||||
@@ -63,4 +61,3 @@ void generate_sldch(PHY_VARS_UE *ue,SLDCH_t *sldch,int frame_tx,int subframe_tx)
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -29,8 +29,6 @@
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
#ifndef __LTE_TRANSPORT_SLSS__C__
|
||||
#define __LTE_TRANSPORT_SLSS__C__
|
||||
#include "PHY/defs_UE.h"
|
||||
|
||||
extern int
|
||||
@@ -66,5 +64,3 @@ void generate_slsch(PHY_VARS_UE *ue,SLSCH_t *slsch,int frame_tx,int subframe_tx)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -29,8 +29,6 @@
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
#ifndef __LTE_TRANSPORT_SLSS__C__
|
||||
#define __LTE_TRANSPORT_SLSS__C__
|
||||
#include "PHY/defs_UE.h"
|
||||
|
||||
|
||||
@@ -39,5 +37,3 @@ void generate_slss(PHY_VARS_UE *ue,SLSS_t *slss,int frame_tx,int subframe_tx) {
|
||||
AssertFatal(1==0,"Should get here yet for UE %d\n",ue->Mod_id);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "nr_modulation.h"
|
||||
#include "PHY/LTE_ESTIMATION/lte_estimation.h"
|
||||
#include "PHY/NR_UE_ESTIMATION/nr_estimation.h"
|
||||
#include <common/utils/LOG/log.h>
|
||||
|
||||
//#define DEBUG_FEP
|
||||
|
||||
|
||||
@@ -33,149 +33,6 @@
|
||||
#include "PHY/NR_REFSIG/ss_pbch_nr.h"
|
||||
#include "PHY/NR_REFSIG/dmrs_nr.h"
|
||||
|
||||
/***********************************************************************/
|
||||
|
||||
// TS 38.211 Table 6.4.1.1.3-3: PUSCH DMRS positions l' within a slot for single-symbol DMRS and intra-slot frequency hopping disabled.
|
||||
// The first 4 colomns are PUSCH mapping type A and the last 4 colomns are PUSCH mapping type B.
|
||||
// When l' = l0, it is represented by 1
|
||||
// E.g. when symbol duration is 12 in colomn 7, value 1057 ('10000100001') which means l' = l0, 5, 10.
|
||||
|
||||
int32_t table_6_4_1_1_3_3_pusch_dmrs_positions_l [12][8] = { // Duration in symbols
|
||||
{-1, -1, -1, -1, 1, 1, 1, 1}, //<4 // (DMRS l' position)
|
||||
{1, 1, 1, 1, 1, 1, 1, 1}, //4 // (DMRS l' position)
|
||||
{1, 1, 1, 1, 1, 5, 5, 5}, //5 // (DMRS l' position)
|
||||
{1, 1, 1, 1, 1, 5, 5, 5}, //6 // (DMRS l' position)
|
||||
{1, 1, 1, 1, 1, 5, 5, 5}, //7 // (DMRS l' position)
|
||||
{1, 129, 129, 129, 1, 65, 73, 73}, //8 // (DMRS l' position)
|
||||
{1, 129, 129, 129, 1, 65, 73, 73}, //9 // (DMRS l' position)
|
||||
{1, 513, 577, 577, 1, 257, 273, 585}, //10 // (DMRS l' position)
|
||||
{1, 513, 577, 577, 1, 257, 273, 585}, //11 // (DMRS l' position)
|
||||
{1, 513, 577, 2337, 1, 1025, 1057, 585}, //12 // (DMRS l' position)
|
||||
{1, 2049, 2177, 2337, 1, 1025, 1057, 585}, //13 // (DMRS l' position)
|
||||
{1, 2049, 2177, 2337, 1, 1025, 1057, 585}, //14 // (DMRS l' position)
|
||||
};
|
||||
|
||||
|
||||
// TS 38.211 Table 6.4.1.1.3-4: PUSCH DMRS positions l' within a slot for double-symbol DMRS and intra-slot frequency hopping disabled.
|
||||
// The first 4 colomns are PUSCH mapping type A and the last 4 colomns are PUSCH mapping type B.
|
||||
// When l' = l0, it is represented by 1
|
||||
|
||||
int32_t table_6_4_1_1_3_4_pusch_dmrs_positions_l [12][8] = { // Duration in symbols
|
||||
{-1, -1, -1, -1, -1, -1, -1, -1}, //<4 // (DMRS l' position)
|
||||
{1, 1, -1, -1, -1, -1, -1, -1}, //4 // (DMRS l' position)
|
||||
{1, 1, -1, -1, 1, 1, -1, -1}, //5 // (DMRS l' position)
|
||||
{1, 1, -1, -1, 1, 1, -1, -1}, //6 // (DMRS l' position)
|
||||
{1, 1, -1, -1, 1, 1, -1, -1}, //7 // (DMRS l' position)
|
||||
{1, 1, -1, -1, 1, 33, -1, -1}, //8 // (DMRS l' position)
|
||||
{1, 1, -1, -1, 1, 33, -1, -1}, //9 // (DMRS l' position)
|
||||
{1, 257, -1, -1, 1, 129, -1, -1}, //10 // (DMRS l' position)
|
||||
{1, 257, -1, -1, 1, 129, -1, -1}, //11 // (DMRS l' position)
|
||||
{1, 257, -1, -1, 1, 513, -1, -1}, //12 // (DMRS l' position)
|
||||
{1, 1025, -1, -1, 1, 513, -1, -1}, //13 // (DMRS l' position)
|
||||
{1, 1025, -1, -1, 1, 513, -1, -1}, //14 // (DMRS l' position)
|
||||
};
|
||||
|
||||
int32_t get_l_prime(uint8_t duration_in_symbols, uint8_t mapping_type, pusch_dmrs_AdditionalPosition_t additional_pos, pusch_maxLength_t pusch_maxLength) {
|
||||
|
||||
uint8_t row, colomn;
|
||||
int32_t l_prime;
|
||||
|
||||
colomn = additional_pos;
|
||||
|
||||
if (mapping_type == typeB)
|
||||
colomn += 4;
|
||||
|
||||
if (duration_in_symbols < 4)
|
||||
row = 0;
|
||||
else
|
||||
row = duration_in_symbols - 3;
|
||||
|
||||
if (pusch_maxLength == pusch_len1)
|
||||
l_prime = table_6_4_1_1_3_3_pusch_dmrs_positions_l[row][colomn];
|
||||
else
|
||||
l_prime = table_6_4_1_1_3_4_pusch_dmrs_positions_l[row][colomn];
|
||||
|
||||
AssertFatal(l_prime>0,"invalid l_prime < 0\n");
|
||||
|
||||
return l_prime;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* NAME : is_dmrs_symbol
|
||||
*
|
||||
* PARAMETERS : l ofdm symbol index within slot
|
||||
* k subcarrier index
|
||||
* start_sc first subcarrier index
|
||||
* k_prime index alternating 0 and 1
|
||||
* n index starting 0,1,...
|
||||
* delta see Table 6.4.1.1.3
|
||||
* duration_in_symbols number of scheduled PUSCH ofdm symbols
|
||||
* start_symbol first symbol index in PUSCH allocation
|
||||
* dmrs_UplinkConfig DMRS uplink configuration
|
||||
* mapping_type PUSCH mapping type (A or B)
|
||||
* ofdm_symbol_size IFFT size
|
||||
*
|
||||
* RETURN : 0 if symbol(k,l) is data, or 1 if symbol(k,l) is dmrs
|
||||
*
|
||||
* DESCRIPTION : 3GPP TS 38.211 6.4.1.1 Demodulation reference signal for PUSCH
|
||||
*
|
||||
*********************************************************************/
|
||||
|
||||
uint8_t is_dmrs_symbol(uint8_t l,
|
||||
uint16_t k,
|
||||
uint16_t start_sc,
|
||||
uint8_t k_prime,
|
||||
uint16_t n,
|
||||
uint8_t delta,
|
||||
uint8_t duration_in_symbols,
|
||||
uint8_t dmrs_type,
|
||||
uint16_t ofdm_symbol_size) {
|
||||
|
||||
uint8_t is_dmrs_freq, is_dmrs_time, l0;
|
||||
int32_t l_prime_mask;
|
||||
pusch_dmrs_AdditionalPosition_t additional_pos = pusch_dmrs_pos0;
|
||||
pusch_maxLength_t pusch_maxLength = pusch_len1;
|
||||
uint8_t mapping_type = typeB;
|
||||
|
||||
is_dmrs_freq = 0;
|
||||
is_dmrs_time = 0;
|
||||
|
||||
AssertFatal(l >= 0,"Check DMRS configuration (start_symbol) !\n");
|
||||
|
||||
|
||||
l0 = get_l0_ul(mapping_type, 2);
|
||||
l_prime_mask = get_l_prime(duration_in_symbols, mapping_type, additional_pos, pusch_maxLength);
|
||||
|
||||
if (k == ((start_sc+get_dmrs_freq_idx_ul(n, k_prime, delta, dmrs_type))%ofdm_symbol_size))
|
||||
is_dmrs_freq = 1;
|
||||
|
||||
|
||||
if (l_prime_mask == 1){
|
||||
|
||||
if (l == l0)
|
||||
is_dmrs_time = 1;
|
||||
|
||||
} else if ( (l==l0) || (((l_prime_mask>>l)&1) == 1 && l!=0) )
|
||||
is_dmrs_time = 1;
|
||||
|
||||
if (pusch_maxLength == pusch_len2){
|
||||
|
||||
if (((l_prime_mask>>(l-1))&1) == 1 && l!=0 && l!=1)
|
||||
is_dmrs_time = 1;
|
||||
|
||||
if (l-1 == l0)
|
||||
is_dmrs_time = 1;
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (is_dmrs_time && is_dmrs_freq)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
@@ -368,25 +225,6 @@ void lte_gold_new(LTE_DL_FRAME_PARMS *frame_parms, uint32_t lte_gold_table[20][2
|
||||
#endif
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* NAME : get_l0_ul
|
||||
*
|
||||
* PARAMETERS : mapping_type : PUSCH mapping type
|
||||
* dmrs_typeA_position : higher layer parameter
|
||||
*
|
||||
* RETURN : demodulation reference signal for PUSCH
|
||||
*
|
||||
* DESCRIPTION : see TS 38.211 V15.4.0 Demodulation reference signals for PUSCH
|
||||
*
|
||||
*********************************************************************/
|
||||
|
||||
uint8_t get_l0_ul(uint8_t mapping_type, uint8_t dmrs_typeA_position) {
|
||||
|
||||
return ((mapping_type==typeA)?dmrs_typeA_position:0);
|
||||
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* NAME : get_dmrs_freq_idx_ul
|
||||
|
||||
@@ -54,21 +54,8 @@
|
||||
int pseudo_random_sequence(int M_PN, uint32_t *c, uint32_t cinit);
|
||||
void lte_gold_new(LTE_DL_FRAME_PARMS *frame_parms, uint32_t lte_gold_table[20][2][14], uint16_t Nid_cell);
|
||||
void generate_dmrs_pbch(uint32_t dmrs_pbch_bitmap[DMRS_PBCH_I_SSB][DMRS_PBCH_N_HF][DMRS_BITMAP_SIZE], uint16_t Nid_cell);
|
||||
uint8_t get_l0_ul(uint8_t mapping_type, uint8_t dmrs_typeA_position);
|
||||
uint16_t get_dmrs_freq_idx_ul(uint16_t n, uint8_t k_prime, uint8_t delta, uint8_t dmrs_type);
|
||||
|
||||
int32_t get_l_prime(uint8_t duration_in_symbols, uint8_t mapping_type, pusch_dmrs_AdditionalPosition_t additional_pos, pusch_maxLength_t pusch_maxLength);
|
||||
|
||||
uint8_t is_dmrs_symbol(uint8_t l,
|
||||
uint16_t k,
|
||||
uint16_t start_sc,
|
||||
uint8_t k_prime,
|
||||
uint16_t n,
|
||||
uint8_t delta,
|
||||
uint8_t duration_in_symbols,
|
||||
uint8_t dmrs_type,
|
||||
uint16_t ofdm_symbol_size);
|
||||
|
||||
#undef EXTERN
|
||||
|
||||
#endif /* DMRS_NR_H */
|
||||
|
||||
@@ -1,3 +1,27 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#ifndef __PHY_NR_REFSIG_NR_MOD_TABLE__H__
|
||||
#define __PHY_NR_REFSIG_NR_MOD_TABLE__H__
|
||||
|
||||
#define NR_MOD_TABLE_SIZE_SHORT 686
|
||||
#define NR_MOD_TABLE_BPSK_OFFSET 1
|
||||
#define NR_MOD_TABLE_QPSK_OFFSET 3
|
||||
@@ -5,3 +29,5 @@
|
||||
#define NR_MOD_TABLE_QAM64_OFFSET 23
|
||||
#define NR_MOD_TABLE_QAM256_OFFSET 87
|
||||
short nr_mod_table[NR_MOD_TABLE_SIZE_SHORT] = {0,0,16384,16384,-16384,-16384,16384,16384,16384,-16384,-16384,16384,-16384,-16384,7327,7327,7327,21981,21981,7327,21981,21981,7327,-7327,7327,-21981,21981,-7327,21981,-21981,-7327,7327,-7327,21981,-21981,7327,-21981,21981,-7327,-7327,-7327,-21981,-21981,-7327,-21981,-21981,10726,10726,10726,3576,3576,10726,3576,3576,10726,17876,10726,25027,3576,17876,3576,25027,17876,10726,17876,3576,25027,10726,25027,3576,17876,17876,17876,25027,25027,17876,25027,25027,10726,-10726,10726,-3576,3576,-10726,3576,-3576,10726,-17876,10726,-25027,3576,-17876,3576,-25027,17876,-10726,17876,-3576,25027,-10726,25027,-3576,17876,-17876,17876,-25027,25027,-17876,25027,-25027,-10726,10726,-10726,3576,-3576,10726,-3576,3576,-10726,17876,-10726,25027,-3576,17876,-3576,25027,-17876,10726,-17876,3576,-25027,10726,-25027,3576,-17876,17876,-17876,25027,-25027,17876,-25027,25027,-10726,-10726,-10726,-3576,-3576,-10726,-3576,-3576,-10726,-17876,-10726,-25027,-3576,-17876,-3576,-25027,-17876,-10726,-17876,-3576,-25027,-10726,-25027,-3576,-17876,-17876,-17876,-25027,-25027,-17876,-25027,-25027,8886,8886,8886,12439,12439,8886,12439,12439,8886,5332,8886,1778,12439,5332,12439,1778,5332,8886,5332,12439,1778,8886,1778,12439,5332,5332,5332,1778,1778,5332,1778,1778,8886,19547,8886,15993,12439,19547,12439,15993,8886,23101,8886,26655,12439,23101,12439,26655,5332,19547,5332,15993,1778,19547,1778,15993,5332,23101,5332,26655,1778,23101,1778,26655,19547,8886,19547,12439,15993,8886,15993,12439,19547,5332,19547,1778,15993,5332,15993,1778,23101,8886,23101,12439,26655,8886,26655,12439,23101,5332,23101,1778,26655,5332,26655,1778,19547,19547,19547,15993,15993,19547,15993,15993,19547,23101,19547,26655,15993,23101,15993,26655,23101,19547,23101,15993,26655,19547,26655,15993,23101,23101,23101,26655,26655,23101,26655,26655,8886,-8886,8886,-12439,12439,-8886,12439,-12439,8886,-5332,8886,-1778,12439,-5332,12439,-1778,5332,-8886,5332,-12439,1778,-8886,1778,-12439,5332,-5332,5332,-1778,1778,-5332,1778,-1778,8886,-19547,8886,-15993,12439,-19547,12439,-15993,8886,-23101,8886,-26655,12439,-23101,12439,-26655,5332,-19547,5332,-15993,1778,-19547,1778,-15993,5332,-23101,5332,-26655,1778,-23101,1778,-26655,19547,-8886,19547,-12439,15993,-8886,15993,-12439,19547,-5332,19547,-1778,15993,-5332,15993,-1778,23101,-8886,23101,-12439,26655,-8886,26655,-12439,23101,-5332,23101,-1778,26655,-5332,26655,-1778,19547,-19547,19547,-15993,15993,-19547,15993,-15993,19547,-23101,19547,-26655,15993,-23101,15993,-26655,23101,-19547,23101,-15993,26655,-19547,26655,-15993,23101,-23101,23101,-26655,26655,-23101,26655,-26655,-8886,8886,-8886,12439,-12439,8886,-12439,12439,-8886,5332,-8886,1778,-12439,5332,-12439,1778,-5332,8886,-5332,12439,-1778,8886,-1778,12439,-5332,5332,-5332,1778,-1778,5332,-1778,1778,-8886,19547,-8886,15993,-12439,19547,-12439,15993,-8886,23101,-8886,26655,-12439,23101,-12439,26655,-5332,19547,-5332,15993,-1778,19547,-1778,15993,-5332,23101,-5332,26655,-1778,23101,-1778,26655,-19547,8886,-19547,12439,-15993,8886,-15993,12439,-19547,5332,-19547,1778,-15993,5332,-15993,1778,-23101,8886,-23101,12439,-26655,8886,-26655,12439,-23101,5332,-23101,1778,-26655,5332,-26655,1778,-19547,19547,-19547,15993,-15993,19547,-15993,15993,-19547,23101,-19547,26655,-15993,23101,-15993,26655,-23101,19547,-23101,15993,-26655,19547,-26655,15993,-23101,23101,-23101,26655,-26655,23101,-26655,26655,-8886,-8886,-8886,-12439,-12439,-8886,-12439,-12439,-8886,-5332,-8886,-1778,-12439,-5332,-12439,-1778,-5332,-8886,-5332,-12439,-1778,-8886,-1778,-12439,-5332,-5332,-5332,-1778,-1778,-5332,-1778,-1778,-8886,-19547,-8886,-15993,-12439,-19547,-12439,-15993,-8886,-23101,-8886,-26655,-12439,-23101,-12439,-26655,-5332,-19547,-5332,-15993,-1778,-19547,-1778,-15993,-5332,-23101,-5332,-26655,-1778,-23101,-1778,-26655,-19547,-8886,-19547,-12439,-15993,-8886,-15993,-12439,-19547,-5332,-19547,-1778,-15993,-5332,-15993,-1778,-23101,-8886,-23101,-12439,-26655,-8886,-26655,-12439,-23101,-5332,-23101,-1778,-26655,-5332,-26655,-1778,-19547,-19547,-19547,-15993,-15993,-19547,-15993,-15993,-19547,-23101,-19547,-26655,-15993,-23101,-15993,-26655,-23101,-19547,-23101,-15993,-26655,-19547,-26655,-15993,-23101,-23101,-23101,-26655,-26655,-23101,-26655,-26655};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -38,18 +38,18 @@
|
||||
/***********************************************************************/
|
||||
|
||||
|
||||
//#define max(a,b) (((a) > (b)) ? (a) : (b))
|
||||
//#define max(a,b) (((a) > (b)) ? (a) : (b))
|
||||
|
||||
// TS 38.211 Table 6.4.1.2.2.1-1: The parameter kRE_ref.
|
||||
// The first 4 colomns are DM-RS Configuration type 1 and the last 4 colomns are DM-RS Configuration type 2.
|
||||
|
||||
int16_t table_6_4_1_2_2_1_1_pusch_ptrs_kRE_ref [6][8] = {
|
||||
{ 0, 2, 6, 8, 0, 1, 6, 7},
|
||||
{ 2, 4, 8, 10, 1, 6, 7, 0},
|
||||
{ 1, 3, 7, 9, 2, 3, 8, 9},
|
||||
{ 3, 5, 9, 11, 3, 8, 9, 2},
|
||||
{-1, -1, -1, -1, 4, 5, 10, 11},
|
||||
{-1, -1, -1, -1, 5, 10, 11, 4},
|
||||
{ 0, 2, 6, 8, 0, 1, 6, 7},
|
||||
{ 2, 4, 8, 10, 1, 6, 7, 0},
|
||||
{ 1, 3, 7, 9, 2, 3, 8, 9},
|
||||
{ 3, 5, 9, 11, 3, 8, 9, 2},
|
||||
{-1, -1, -1, -1, 4, 5, 10, 11},
|
||||
{-1, -1, -1, -1, 5, 10, 11, 4},
|
||||
};
|
||||
|
||||
|
||||
@@ -68,55 +68,20 @@ int16_t table_6_4_1_2_2_1_1_pusch_ptrs_kRE_ref [6][8] = {
|
||||
*********************************************************************/
|
||||
|
||||
int16_t get_kRE_ref(uint8_t dmrs_antenna_port, uint8_t pusch_dmrs_type, uint8_t resourceElementOffset) {
|
||||
|
||||
uint8_t colomn;
|
||||
int16_t k_RE_ref;
|
||||
|
||||
colomn = resourceElementOffset;
|
||||
|
||||
if (pusch_dmrs_type == 2)
|
||||
colomn += 4;
|
||||
|
||||
k_RE_ref = table_6_4_1_2_2_1_1_pusch_ptrs_kRE_ref[dmrs_antenna_port][colomn];
|
||||
|
||||
AssertFatal(k_RE_ref>=0,"invalid k_RE_ref < 0. Check PTRS Configuration\n");
|
||||
|
||||
return k_RE_ref;
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* NAME : get_K_ptrs
|
||||
*
|
||||
* PARAMETERS : ptrs_UplinkConfig PTRS uplink configuration
|
||||
* N_RB number of RBs scheduled for PUSCH
|
||||
*
|
||||
* RETURN : the parameter K_ptrs
|
||||
*
|
||||
* DESCRIPTION : 3GPP TS 38.214 6.2.3 Table 6.2.3.1-2
|
||||
*
|
||||
*********************************************************************/
|
||||
|
||||
uint8_t get_K_ptrs(ptrs_UplinkConfig_t *ptrs_UplinkConfig, uint16_t N_RB){
|
||||
|
||||
uint16_t nrb0, nrb1;
|
||||
|
||||
nrb0 = ptrs_UplinkConfig->frequencyDensity.n_rb0;
|
||||
nrb1 = ptrs_UplinkConfig->frequencyDensity.n_rb1;
|
||||
|
||||
if (nrb0 == 0 || nrb0 == 0)
|
||||
return 2;
|
||||
|
||||
if (N_RB < nrb0){
|
||||
LOG_I(PHY,"PUSH PT-RS is not present.\n");
|
||||
return 0;
|
||||
}
|
||||
else if (N_RB >= nrb0 && N_RB < nrb1)
|
||||
return 2;
|
||||
else
|
||||
return 4;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
@@ -126,7 +91,7 @@ uint8_t get_K_ptrs(ptrs_UplinkConfig_t *ptrs_UplinkConfig, uint16_t N_RB){
|
||||
* duration_in_symbols number of scheduled PUSCH ofdm symbols
|
||||
* start_symbol first ofdm symbol of PUSCH within slot
|
||||
* L_ptrs the parameter L_ptrs
|
||||
* ofdm_symbol_size FFT size
|
||||
* ul_dmrs_symb_pos bitmap of the time domain positions of the DMRS symbols in the scheduled PUSCH
|
||||
*
|
||||
* RETURN : sets the bit map of PTRS ofdm symbol indicies
|
||||
*
|
||||
@@ -137,54 +102,31 @@ uint8_t get_K_ptrs(ptrs_UplinkConfig_t *ptrs_UplinkConfig, uint16_t N_RB){
|
||||
void set_ptrs_symb_idx(uint16_t *ptrs_symbols,
|
||||
uint8_t duration_in_symbols,
|
||||
uint8_t start_symbol,
|
||||
uint8_t dmrs_type,
|
||||
uint8_t L_ptrs,
|
||||
uint8_t pusch_maxLength,
|
||||
uint16_t ofdm_symbol_size) {
|
||||
uint16_t ul_dmrs_symb_pos) {
|
||||
|
||||
uint8_t i, last_symbol, is_dmrs_symbol1, is_dmrs_symbol2;
|
||||
int16_t l_ref;
|
||||
|
||||
*ptrs_symbols = 0;
|
||||
i = 0;
|
||||
is_dmrs_symbol1 = 0;
|
||||
is_dmrs_symbol2 = 0;
|
||||
l_ref = start_symbol;
|
||||
last_symbol = start_symbol + duration_in_symbols - 1;
|
||||
uint8_t i = 0, last_symbol, is_dmrs_symbol, l_ref;
|
||||
int8_t l_counter;
|
||||
l_ref = start_symbol;
|
||||
last_symbol = start_symbol + duration_in_symbols - 1;
|
||||
|
||||
while ( (l_ref + i*L_ptrs) <= last_symbol) {
|
||||
|
||||
is_dmrs_symbol1 = is_dmrs_symbol(max((l_ref + (i-1)*L_ptrs + 1), l_ref),
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
duration_in_symbols,
|
||||
dmrs_type,
|
||||
ofdm_symbol_size);
|
||||
is_dmrs_symbol = 0;
|
||||
|
||||
is_dmrs_symbol2 = is_dmrs_symbol(l_ref + i*L_ptrs,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
duration_in_symbols,
|
||||
dmrs_type,
|
||||
ofdm_symbol_size);
|
||||
for(l_counter = l_ref + i*L_ptrs; l_counter >= max(l_ref + (i-1)*L_ptrs + 1, l_ref); l_counter--) {
|
||||
|
||||
if ( is_dmrs_symbol1 + is_dmrs_symbol2 > 0 ) {
|
||||
if((ul_dmrs_symb_pos >> l_counter) & 0x01) {
|
||||
is_dmrs_symbol = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
if (pusch_maxLength == 2)
|
||||
l_ref = l_ref + i*L_ptrs + 1;
|
||||
else
|
||||
l_ref = l_ref + i*L_ptrs;
|
||||
|
||||
i = 1;
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
if (is_dmrs_symbol) {
|
||||
l_ref = l_counter;
|
||||
i = 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
*ptrs_symbols = *ptrs_symbols | (1<<(l_ref + i*L_ptrs));
|
||||
@@ -192,53 +134,19 @@ void set_ptrs_symb_idx(uint16_t *ptrs_symbols,
|
||||
}
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* NAME : get_L_ptrs
|
||||
*
|
||||
* PARAMETERS : ptrs_UplinkConfig PTRS uplink configuration
|
||||
* I_mcs MCS index used for PUSCH
|
||||
*
|
||||
* RETURN : the parameter L_ptrs
|
||||
*
|
||||
* DESCRIPTION : 3GPP TS 38.214 6.2.3 Table 6.2.3.1-1
|
||||
*
|
||||
*********************************************************************/
|
||||
|
||||
uint8_t get_L_ptrs(ptrs_UplinkConfig_t *ptrs_UplinkConfig, uint8_t I_mcs) {
|
||||
|
||||
uint8_t mcs1, mcs2, mcs3;
|
||||
|
||||
mcs1 = ptrs_UplinkConfig->timeDensity.ptrs_mcs1;
|
||||
mcs2 = ptrs_UplinkConfig->timeDensity.ptrs_mcs2;
|
||||
mcs3 = ptrs_UplinkConfig->timeDensity.ptrs_mcs3;
|
||||
|
||||
if (mcs1 == 0 || mcs2 == 0 || mcs3 == 0)
|
||||
return 1;
|
||||
|
||||
if (I_mcs < mcs1){
|
||||
LOG_I(PHY,"PUSH PT-RS is not present.\n");
|
||||
return 0;
|
||||
}
|
||||
else if (I_mcs >= mcs1 && I_mcs < mcs2)
|
||||
return 4;
|
||||
else if (I_mcs >= mcs2 && I_mcs < mcs3)
|
||||
return 2;
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* NAME : is_ptrs_subcarrier
|
||||
*
|
||||
* PARAMETERS : k subcarrier index
|
||||
* K_ptrs the parameter K_ptrs
|
||||
* n_rnti UE CRNTI
|
||||
* dmrs_antenna_port DMRS antenna port
|
||||
* K_ptrs the parameter K_ptrs
|
||||
* pusch_dmrs_type the DMRS configuration type used for PUSCH
|
||||
* N_RB number of RBs scheduled for PUSCH
|
||||
* k_RE_ref the parameter k_RE_ref
|
||||
* start_sc first subcarrier index
|
||||
* ofdm_symbol_size FFT size
|
||||
* ofdm_symbol_size number of samples in an OFDM symbol
|
||||
*
|
||||
* RETURN : 1 if subcarrier k is PTRS, or 0 otherwise
|
||||
*
|
||||
@@ -246,107 +154,48 @@ uint8_t get_L_ptrs(ptrs_UplinkConfig_t *ptrs_UplinkConfig, uint8_t I_mcs) {
|
||||
*
|
||||
*********************************************************************/
|
||||
|
||||
uint8_t is_ptrs_subcarrier(uint16_t k, uint8_t K_ptrs, uint16_t n_rnti, uint16_t N_RB, int16_t k_RE_ref, uint16_t start_sc, uint16_t ofdm_symbol_size) {
|
||||
uint8_t is_ptrs_subcarrier(uint16_t k,
|
||||
uint16_t n_rnti,
|
||||
uint8_t dmrs_antenna_port,
|
||||
uint8_t pusch_dmrs_type,
|
||||
uint8_t K_ptrs,
|
||||
uint16_t N_RB,
|
||||
uint8_t k_RE_ref,
|
||||
uint16_t start_sc,
|
||||
uint16_t ofdm_symbol_size)
|
||||
{
|
||||
// int16_t k_RE_ref = get_kRE_ref(dmrs_antenna_port, pusch_dmrs_type, resourceElementOffset);
|
||||
uint16_t k_RB_ref;
|
||||
|
||||
uint16_t k_RB_ref, i, sc;
|
||||
|
||||
i = 0;
|
||||
sc = 0;
|
||||
k_RB_ref = 0;
|
||||
|
||||
if (N_RB % K_ptrs == 0)
|
||||
k_RB_ref = n_rnti % K_ptrs;
|
||||
else
|
||||
k_RB_ref = n_rnti % (N_RB % K_ptrs);
|
||||
|
||||
while (k > sc){
|
||||
|
||||
sc = (start_sc + k_RE_ref + (i*K_ptrs + k_RB_ref)*NR_NB_SC_PER_RB)%ofdm_symbol_size;
|
||||
i++;
|
||||
|
||||
}
|
||||
|
||||
if (k == sc)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* NAME : is_ptrs_symbol
|
||||
*
|
||||
* PARAMETERS : l ofdm symbol index within slot
|
||||
* k subcarrier index
|
||||
* n_rnti UE CRNTI
|
||||
* N_RB number of RBs scheduled for PUSCH
|
||||
* duration_in_symbols number of scheduled PUSCH ofdm symbols
|
||||
* dmrs_antenna_port DMRS antenna port
|
||||
* K_ptrs the parameter K_ptrs
|
||||
* ptrs_symbols bit mask of ptrs
|
||||
* start_sc first subcarrier index
|
||||
* ofdm_symbol_size FFT size
|
||||
* pusch_dmrs_type PUSCH DMRS type (1 or 2)
|
||||
* ptrs_UplinkConfig PTRS uplink configuration
|
||||
*
|
||||
* RETURN : 0 if symbol(k,l) is data, or 1 if symbol(k,l) is ptrs
|
||||
*
|
||||
* DESCRIPTION : 3GPP TS 38.211 6.4.1.2 Phase-tracking reference signal for PUSCH
|
||||
*
|
||||
*********************************************************************/
|
||||
|
||||
uint8_t is_ptrs_symbol(uint8_t l,
|
||||
uint16_t k,
|
||||
uint16_t n_rnti,
|
||||
uint16_t N_RB,
|
||||
uint8_t duration_in_symbols,
|
||||
uint8_t dmrs_antenna_port,
|
||||
uint8_t K_ptrs,
|
||||
uint16_t ptrs_symbols,
|
||||
uint16_t start_sc,
|
||||
uint16_t ofdm_symbol_size,
|
||||
pusch_dmrs_type_t pusch_dmrs_type,
|
||||
uint8_t resourceElementOffset) {
|
||||
|
||||
uint8_t is_ptrs_freq, is_ptrs_time;
|
||||
int16_t k_RE_ref;
|
||||
|
||||
is_ptrs_freq = 0;
|
||||
is_ptrs_time = 0;
|
||||
|
||||
k_RE_ref = get_kRE_ref(dmrs_antenna_port, pusch_dmrs_type, resourceElementOffset);
|
||||
|
||||
is_ptrs_freq = is_ptrs_subcarrier(k, K_ptrs, n_rnti, N_RB, k_RE_ref, start_sc, ofdm_symbol_size);
|
||||
|
||||
if (is_ptrs_freq == 0)
|
||||
return 0;
|
||||
|
||||
if (((ptrs_symbols>>l)&1) == 1)
|
||||
is_ptrs_time = 1;
|
||||
|
||||
if (is_ptrs_time && is_ptrs_freq)
|
||||
return 1;
|
||||
if (N_RB % K_ptrs == 0)
|
||||
k_RB_ref = n_rnti % K_ptrs;
|
||||
else
|
||||
return 0;
|
||||
k_RB_ref = n_rnti % (N_RB % K_ptrs);
|
||||
|
||||
if (k < start_sc)
|
||||
k += ofdm_symbol_size;
|
||||
|
||||
if ((k - k_RE_ref - k_RB_ref*NR_NB_SC_PER_RB - start_sc) % (K_ptrs*NR_NB_SC_PER_RB) == 0)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
int main(int argc, char const *argv[])
|
||||
{
|
||||
|
||||
dmrs_UplinkConfig_t dmrs_Uplink_Config;
|
||||
ptrs_UplinkConfig_t ptrs_Uplink_Config;
|
||||
uint8_t resourceElementOffset;
|
||||
uint8_t dmrs_antenna_port;
|
||||
uint8_t L_ptrs, K_ptrs;
|
||||
int16_t k_RE_ref;
|
||||
uint16_t N_RB, ptrs_symbols, ofdm_symbol_size, k;
|
||||
uint8_t duration_in_symbols, I_mcs;
|
||||
uint8_t start_symbol, l;
|
||||
uint8_t ptrs_symbol_flag;
|
||||
uint16_t n_rnti;
|
||||
dmrs_UplinkConfig_t dmrs_Uplink_Config;
|
||||
ptrs_UplinkConfig_t ptrs_Uplink_Config;
|
||||
uint8_t resourceElementOffset;
|
||||
uint8_t dmrs_antenna_port;
|
||||
uint8_t L_ptrs, K_ptrs;
|
||||
int16_t k_RE_ref;
|
||||
uint16_t N_RB, ptrs_symbols, ofdm_symbol_size, k;
|
||||
uint8_t duration_in_symbols, I_mcs;
|
||||
uint8_t start_symbol, l;
|
||||
uint8_t ptrs_symbol_flag;
|
||||
uint16_t n_rnti;
|
||||
|
||||
dmrs_Uplink_Config.pusch_dmrs_type = pusch_dmrs_type1;
|
||||
dmrs_Uplink_Config.pusch_dmrs_AdditionalPosition = pusch_dmrs_pos1;
|
||||
@@ -362,13 +211,13 @@ int main(int argc, char const *argv[])
|
||||
n_rnti = 0x1234;
|
||||
resourceElementOffset = 0;
|
||||
ptrs_symbols = 0;
|
||||
dmrs_antenna_port = 0;
|
||||
N_RB = 50;
|
||||
duration_in_symbols = 14;
|
||||
ofdm_symbol_size = 2048;
|
||||
I_mcs = 9;
|
||||
start_symbol = 0;
|
||||
ptrs_symbol_flag = 0;
|
||||
dmrs_antenna_port = 0;
|
||||
N_RB = 50;
|
||||
duration_in_symbols = 14;
|
||||
ofdm_symbol_size = 2048;
|
||||
I_mcs = 9;
|
||||
start_symbol = 0;
|
||||
ptrs_symbol_flag = 0;
|
||||
|
||||
k_RE_ref = get_kRE_ref(dmrs_antenna_port, dmrs_Uplink_Config.pusch_dmrs_type, resourceElementOffset);
|
||||
|
||||
@@ -418,6 +267,6 @@ int main(int argc, char const *argv[])
|
||||
|
||||
printf("\n");
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
*/
|
||||
|
||||
@@ -49,32 +49,36 @@
|
||||
|
||||
int16_t get_kRE_ref(uint8_t dmrs_antenna_port, uint8_t pusch_dmrs_type, uint8_t resourceElementOffset);
|
||||
|
||||
uint8_t get_K_ptrs(ptrs_UplinkConfig_t *ptrs_UplinkConfig, uint16_t N_RB);
|
||||
|
||||
void set_ptrs_symb_idx(uint16_t *ptrs_symbols,
|
||||
uint8_t duration_in_symbols,
|
||||
uint8_t start_symbol,
|
||||
uint8_t dmrs_type,
|
||||
uint8_t L_ptrs,
|
||||
uint8_t pusch_maxLength,
|
||||
uint16_t ofdm_symbol_size);
|
||||
uint16_t ul_dmrs_symb_pos);
|
||||
|
||||
uint8_t get_L_ptrs(ptrs_UplinkConfig_t *ptrs_UplinkConfig, uint8_t I_mcs);
|
||||
uint8_t is_ptrs_subcarrier(uint16_t k,
|
||||
uint16_t n_rnti,
|
||||
uint8_t dmrs_antenna_port,
|
||||
uint8_t pusch_dmrs_type,
|
||||
uint8_t K_ptrs,
|
||||
uint16_t N_RB,
|
||||
uint8_t k_RE_ref,
|
||||
uint16_t start_sc,
|
||||
uint16_t ofdm_symbol_size);
|
||||
|
||||
uint8_t is_ptrs_subcarrier(uint16_t k, uint8_t K_ptrs, uint16_t n_rnti, uint16_t N_RB, int16_t k_RE_ref, uint16_t start_sc, uint16_t ofdm_symbol_size);
|
||||
/*******************************************************************
|
||||
*
|
||||
* NAME : is_ptrs_symbol
|
||||
*
|
||||
* PARAMETERS : l ofdm symbol index within slot
|
||||
* ptrs_symbols bit mask of ptrs
|
||||
*
|
||||
* RETURN : 1 if symbol is ptrs, or 0 otherwise
|
||||
*
|
||||
* DESCRIPTION : 3GPP TS 38.211 6.4.1.2 Phase-tracking reference signal for PUSCH
|
||||
*
|
||||
*********************************************************************/
|
||||
|
||||
uint8_t is_ptrs_symbol(uint8_t l,
|
||||
uint16_t k,
|
||||
uint16_t n_rnti,
|
||||
uint16_t N_RB,
|
||||
uint8_t duration_in_symbols,
|
||||
uint8_t dmrs_antenna_port,
|
||||
uint8_t K_ptrs,
|
||||
uint16_t ptrs_symbols,
|
||||
uint16_t start_sc,
|
||||
uint16_t ofdm_symbol_size,
|
||||
pusch_dmrs_type_t pusch_dmrs_type,
|
||||
uint8_t resourceElementOffset);
|
||||
static inline uint8_t is_ptrs_symbol(uint8_t l, uint16_t ptrs_symbols) { return ((ptrs_symbols >> l) & 1); }
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
__m64 byte2m64_re[256];
|
||||
__m64 byte2m64_im[256];
|
||||
|
||||
void init_byte2m64() {
|
||||
void init_byte2m64(void) {
|
||||
|
||||
for (int s=0;s<256;s++) {
|
||||
byte2m64_re[s] = _mm_insert_pi16(byte2m64_re[s],(1-2*(s&1)),0);
|
||||
@@ -53,7 +53,7 @@ void init_byte2m64() {
|
||||
}
|
||||
}
|
||||
|
||||
void init_scrambling_luts() {
|
||||
void init_scrambling_luts(void) {
|
||||
|
||||
init_byte2m64();
|
||||
|
||||
|
||||
@@ -531,6 +531,7 @@ void rx_nr_prach(PHY_VARS_gNB *gNB,
|
||||
uint16_t *max_preamble_delay
|
||||
)
|
||||
{
|
||||
AssertFatal(gNB!=NULL,"Can only be called from gNB\n");
|
||||
|
||||
int i;
|
||||
|
||||
@@ -574,6 +575,7 @@ void rx_nr_prach(PHY_VARS_gNB *gNB,
|
||||
fp = &gNB->frame_parms;
|
||||
|
||||
nb_rx = gNB->gNB_config.carrier_config.num_rx_ant.value;
|
||||
|
||||
|
||||
rootSequenceIndex = cfg->num_prach_fd_occasions_list[0].prach_root_sequence_index.value;
|
||||
numrootSequenceIndex = cfg->num_prach_fd_occasions_list[0].num_root_sequences.value;
|
||||
@@ -586,7 +588,6 @@ void rx_nr_prach(PHY_VARS_gNB *gNB,
|
||||
|
||||
restricted_set = cfg->restricted_set_config.value;
|
||||
|
||||
|
||||
uint8_t prach_fmt = prach_pdu->prach_format;
|
||||
uint16_t N_ZC = (prach_sequence_length==0)?839:139;
|
||||
|
||||
@@ -599,9 +600,6 @@ void rx_nr_prach(PHY_VARS_gNB *gNB,
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
start_meas(&gNB->rx_prach);
|
||||
|
||||
|
||||
|
||||
@@ -61,4 +61,5 @@ uint32_t nr_get_G(uint16_t nb_rb, uint16_t nb_symb_sch, uint8_t nb_re_dmrs, uint
|
||||
|
||||
uint32_t nr_get_E(uint32_t G, uint8_t C, uint8_t Qm, uint8_t Nl, uint8_t r);
|
||||
|
||||
void init_pucch2_luts(void);
|
||||
#endif
|
||||
|
||||
@@ -1028,10 +1028,6 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
|
||||
uint8_t is_crnti,
|
||||
uint8_t llr8_flag);
|
||||
|
||||
int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
|
||||
NR_DL_FRAME_PARMS* frame_parms,
|
||||
uint8_t harq_pid);
|
||||
|
||||
uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
|
||||
UE_nr_rxtx_proc_t *proc,
|
||||
int eNB_id,
|
||||
|
||||
@@ -282,21 +282,18 @@ void nr_ulsch_extract_rbs_single(int32_t **rxdataF,
|
||||
else
|
||||
is_dmrs_re = 0;
|
||||
|
||||
if ( ((pusch_pdu->pdu_bit_map)>>2)& 0x01 ) {
|
||||
|
||||
if (pusch_pdu->pdu_bit_map & PUSCH_PDU_BITMAP_PUSCH_PTRS) {
|
||||
K_ptrs = (pusch_pdu->pusch_ptrs.ptrs_freq_density)?4:2;
|
||||
is_ptrs_symbol_flag = is_ptrs_symbol(symbol,
|
||||
(start_re + re)%frame_parms->ofdm_symbol_size,
|
||||
n_rnti,
|
||||
pusch_pdu->rb_size,
|
||||
pusch_pdu->nr_of_symbols,
|
||||
aarx,
|
||||
K_ptrs,
|
||||
pusch_vars->ptrs_symbols,
|
||||
start_re,
|
||||
frame_parms->ofdm_symbol_size,
|
||||
pusch_pdu->dmrs_config_type,
|
||||
pusch_pdu->pusch_ptrs.ptrs_ports_list[0].ptrs_re_offset);
|
||||
if(is_ptrs_symbol(symbol, pusch_vars->ptrs_symbols))
|
||||
is_ptrs_symbol_flag = is_ptrs_subcarrier((start_re + re) % frame_parms->ofdm_symbol_size,
|
||||
n_rnti,
|
||||
aarx,
|
||||
pusch_pdu->dmrs_config_type,
|
||||
K_ptrs,
|
||||
pusch_pdu->rb_size,
|
||||
pusch_pdu->pusch_ptrs.ptrs_ports_list[0].ptrs_re_offset,
|
||||
start_re,
|
||||
frame_parms->ofdm_symbol_size);
|
||||
|
||||
if (is_ptrs_symbol_flag == 1)
|
||||
num_ptrs_symbols++;
|
||||
@@ -304,7 +301,7 @@ void nr_ulsch_extract_rbs_single(int32_t **rxdataF,
|
||||
}
|
||||
|
||||
#ifdef DEBUG_RB_EXT
|
||||
printf("re = %d, symbol = %d\n", re, symbol);
|
||||
printf("re = %d, is_ptrs_symbol_flag = %d, symbol = %d\n", re, is_ptrs_symbol_flag, symbol);
|
||||
#endif
|
||||
|
||||
if ( is_dmrs_re == 0 && is_ptrs_symbol_flag == 0) {
|
||||
@@ -315,7 +312,7 @@ void nr_ulsch_extract_rbs_single(int32_t **rxdataF,
|
||||
ul_ch0_ptrs_ext[ul_ch0_ptrs_ext_index] = ul_ch0_ptrs[ul_ch0_ptrs_index];
|
||||
|
||||
#ifdef DEBUG_RB_EXT
|
||||
printf("rxF_ext[%d] = (%d,%d)\n", rxF_ext_index>>1, rxF_ext[rxF_ext_index],rxF_ext[rxF_ext_index+1]);
|
||||
printf("rxF_ext[%d] = %d, %d\n", rxF_ext_index, rxF_ext[rxF_ext_index], rxF_ext[rxF_ext_index+1]);
|
||||
#endif
|
||||
|
||||
ul_ch0_ext_index++;
|
||||
@@ -1021,7 +1018,7 @@ int nr_rx_pusch(PHY_VARS_gNB *gNB,
|
||||
unsigned char harq_pid)
|
||||
{
|
||||
|
||||
uint8_t aarx, aatx, dmrs_symbol_flag, ptrs_symbol_flag; // dmrs_symbol_flag, a flag to indicate DMRS REs in current symbol
|
||||
uint8_t first_symbol_flag, aarx, aatx, dmrs_symbol_flag; // dmrs_symbol_flag, a flag to indicate DMRS REs in current symbol
|
||||
uint32_t nb_re_pusch, bwp_start_subcarrier;
|
||||
uint8_t L_ptrs = 0; // PTRS parameter
|
||||
int avgs;
|
||||
@@ -1030,7 +1027,7 @@ int nr_rx_pusch(PHY_VARS_gNB *gNB,
|
||||
nfapi_nr_pusch_pdu_t *rel15_ul = &gNB->ulsch[ulsch_id][0]->harq_processes[harq_pid]->ulsch_pdu;
|
||||
|
||||
dmrs_symbol_flag = 0;
|
||||
ptrs_symbol_flag = 0;
|
||||
first_symbol_flag = 0;
|
||||
gNB->pusch_vars[ulsch_id]->ptrs_sc_per_ofdm_symbol = 0;
|
||||
|
||||
if(symbol == rel15_ul->start_symbol_index){
|
||||
@@ -1039,16 +1036,14 @@ int nr_rx_pusch(PHY_VARS_gNB *gNB,
|
||||
gNB->pusch_vars[ulsch_id]->cl_done = 0;
|
||||
gNB->pusch_vars[ulsch_id]->ptrs_symbols = 0;
|
||||
|
||||
if ( ((rel15_ul->pdu_bit_map)>>2)& 0x01 ) { // if there is ptrs pdu
|
||||
if (rel15_ul->pdu_bit_map & PUSCH_PDU_BITMAP_PUSCH_PTRS) { // if there is ptrs pdu
|
||||
L_ptrs = 1<<(rel15_ul->pusch_ptrs.ptrs_time_density);
|
||||
|
||||
set_ptrs_symb_idx(&gNB->pusch_vars[ulsch_id]->ptrs_symbols,
|
||||
rel15_ul->nr_of_symbols,
|
||||
rel15_ul->start_symbol_index,
|
||||
rel15_ul->dmrs_config_type,
|
||||
L_ptrs,
|
||||
1, // only dmrs of length 1 is currently supported
|
||||
frame_parms->ofdm_symbol_size);
|
||||
rel15_ul->ul_dmrs_symb_pos);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1073,23 +1068,9 @@ int nr_rx_pusch(PHY_VARS_gNB *gNB,
|
||||
nb_re_pusch = rel15_ul->rb_size * NR_NB_SC_PER_RB;
|
||||
}
|
||||
|
||||
if ( ((rel15_ul->pdu_bit_map)>>2)& 0x01 ) { // if there is ptrs pdu
|
||||
ptrs_symbol_flag = is_ptrs_symbol(symbol,
|
||||
0,
|
||||
rel15_ul->rnti,
|
||||
rel15_ul->rb_size,
|
||||
rel15_ul->nr_of_symbols,
|
||||
0,
|
||||
(rel15_ul->pusch_ptrs.ptrs_freq_density)?4:2,
|
||||
gNB->pusch_vars[ulsch_id]->ptrs_symbols,
|
||||
0,
|
||||
frame_parms->ofdm_symbol_size,
|
||||
rel15_ul->dmrs_config_type,
|
||||
rel15_ul->pusch_ptrs.ptrs_ports_list[0].ptrs_re_offset);
|
||||
}
|
||||
|
||||
if (ptrs_symbol_flag == 1){
|
||||
gNB->pusch_vars[ulsch_id]->ptrs_symbol_index = symbol;
|
||||
if (rel15_ul->pdu_bit_map & PUSCH_PDU_BITMAP_PUSCH_PTRS) { // if there is ptrs pdu
|
||||
if(is_ptrs_symbol(symbol, gNB->pusch_vars[ulsch_id]->ptrs_symbols))
|
||||
gNB->pusch_vars[ulsch_id]->ptrs_symbol_index = symbol;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
#include "PHY/defs_gNB.h"
|
||||
#include "PHY/sse_intrin.h"
|
||||
#include "PHY/NR_UE_TRANSPORT/pucch_nr.h"
|
||||
#include <openair1/PHY/CODING/nrSmallBlock/nr_small_block_defs.h>
|
||||
#include "PHY/NR_TRANSPORT/nr_transport_common_proto.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_transport.h"
|
||||
#include "PHY/NR_REFSIG/nr_refsig.h"
|
||||
@@ -201,7 +202,7 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
|
||||
* Defining cyclic shift hopping TS 38.211 Subclause 6.3.2.2.2
|
||||
*/
|
||||
// alpha is cyclic shift
|
||||
double alpha;
|
||||
//double alpha;
|
||||
// lnormal is the OFDM symbol number in the PUCCH transmission where l=0 corresponds to the first OFDM symbol of the PUCCH transmission
|
||||
//uint8_t lnormal;
|
||||
// lprime is the index of the OFDM symbol in the slot that corresponds to the first OFDM symbol of the PUCCH transmission in the slot given by [5, TS 38.213]
|
||||
@@ -240,7 +241,7 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
|
||||
for(i=0;i<nr_sequences;i++){
|
||||
// we proceed to calculate alpha according to TS 38.211 Subclause 6.3.2.2.2
|
||||
for (l=0; l<pucch_pdu->nr_of_symbols; l++){
|
||||
alpha = nr_cyclic_shift_hopping(pucch_pdu->hopping_id,pucch_pdu->initial_cyclic_shift,mcs[i],l,pucch_pdu->start_symbol_index,slot);
|
||||
double alpha = nr_cyclic_shift_hopping(pucch_pdu->hopping_id,pucch_pdu->initial_cyclic_shift,mcs[i],l,pucch_pdu->start_symbol_index,slot);
|
||||
#ifdef DEBUG_NR_PUCCH_RX
|
||||
printf("\t [nr_generate_pucch0] sequence generation \tu=%d \tv=%d \talpha=%lf \t(for symbol l=%d/%d,mcs %d)\n",u,v,alpha,l,l+pucch_pdu->start_symbol_index,mcs[i]);
|
||||
printf("lut output %d\n",gNB->pucch0_lut.lut[cs_ind][slot][l+pucch_pdu->start_symbol_index]);
|
||||
@@ -311,9 +312,9 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
|
||||
}
|
||||
#else
|
||||
|
||||
int16_t *x_re = table_5_2_2_2_2_Re[u],*x_im = table_5_2_2_2_2_Im[u];
|
||||
const int16_t *x_re = table_5_2_2_2_2_Re[u],*x_im = table_5_2_2_2_2_Im[u];
|
||||
int16_t xr[24] __attribute__((aligned(32)));
|
||||
int16_t xrt[24] __attribute__((aligned(32)));
|
||||
//int16_t xrt[24] __attribute__((aligned(32)));
|
||||
int32_t xrtmag=0;
|
||||
int maxpos=0;
|
||||
int n2=0;
|
||||
@@ -439,7 +440,7 @@ void nr_decode_pucch1( int32_t **rxdataF,
|
||||
uint8_t timeDomainOCC,
|
||||
uint8_t nr_bit) {
|
||||
#ifdef DEBUG_NR_PUCCH_RX
|
||||
printf("\t [nr_generate_pucch1] start function at slot(nr_tti_tx)=%d payload=%d m0=%d nrofSymbols=%d startingSymbolIndex=%d startingPRB=%d startingPRB_intraSlotHopping=%d timeDomainOCC=%d nr_bit=%d\n",
|
||||
printf("\t [nr_generate_pucch1] start function at slot(nr_tti_tx)=%d payload=%lp m0=%d nrofSymbols=%d startingSymbolIndex=%d startingPRB=%d startingPRB_intraSlotHopping=%d timeDomainOCC=%d nr_bit=%d\n",
|
||||
nr_tti_tx,payload,m0,nrofSymbols,startingSymbolIndex,startingPRB,startingPRB_intraSlotHopping,timeDomainOCC,nr_bit);
|
||||
#endif
|
||||
/*
|
||||
@@ -449,7 +450,7 @@ void nr_decode_pucch1( int32_t **rxdataF,
|
||||
// complex-valued symbol d_re, d_im containing complex-valued symbol d(0):
|
||||
int16_t d_re=0, d_im=0,d1_re=0,d1_im=0;
|
||||
#ifdef DEBUG_NR_PUCCH_RX
|
||||
printf("\t [nr_generate_pucch1] sequence modulation: payload=%x \tde_re=%d \tde_im=%d\n",payload,d_re,d_im);
|
||||
printf("\t [nr_generate_pucch1] sequence modulation: payload=%lp \tde_re=%d \tde_im=%d\n",payload,d_re,d_im);
|
||||
#endif
|
||||
/*
|
||||
* Defining cyclic shift hopping TS 38.211 Subclause 6.3.2.2.2
|
||||
@@ -543,7 +544,7 @@ void nr_decode_pucch1( int32_t **rxdataF,
|
||||
z_re_rx[i+n] = ((int16_t *)&rxdataF[0][re_offset])[0];
|
||||
z_im_rx[i+n] = ((int16_t *)&rxdataF[0][re_offset])[1];
|
||||
#ifdef DEBUG_NR_PUCCH_RX
|
||||
printf("\t [nr_generate_pucch1] mapping PUCCH to RE \t amp=%d \tofdm_symbol_size=%d \tN_RB_DL=%d \tfirst_carrier_offset=%d \tz_pucch[%d]=txptr(%d)=(x_n(l=%d,n=%d)=(%d,%d))\n",
|
||||
printf("\t [nr_generate_pucch1] mapping PUCCH to RE \t amp=%d \tofdm_symbol_size=%d \tN_RB_DL=%d \tfirst_carrier_offset=%d \tz_pucch[%d]=txptr(%u)=(x_n(l=%d,n=%d)=(%d,%d))\n",
|
||||
amp,frame_parms->ofdm_symbol_size,frame_parms->N_RB_DL,frame_parms->first_carrier_offset,i+n,re_offset,
|
||||
l,n,((int16_t *)&rxdataF[0][re_offset])[0],((int16_t *)&rxdataF[0][re_offset])[1]);
|
||||
#endif
|
||||
@@ -554,7 +555,7 @@ void nr_decode_pucch1( int32_t **rxdataF,
|
||||
z_dmrs_im_rx[i+n] = ((int16_t *)&rxdataF[0][re_offset])[1];
|
||||
// printf("%d\t%d\t%d\n",l,z_dmrs_re_rx[i+n],z_dmrs_im_rx[i+n]);
|
||||
#ifdef DEBUG_NR_PUCCH_RX
|
||||
printf("\t [nr_generate_pucch1] mapping DM-RS to RE \t amp=%d \tofdm_symbol_size=%d \tN_RB_DL=%d \tfirst_carrier_offset=%d \tz_dm-rs[%d]=txptr(%d)=(x_n(l=%d,n=%d)=(%d,%d))\n",
|
||||
printf("\t [nr_generate_pucch1] mapping DM-RS to RE \t amp=%d \tofdm_symbol_size=%d \tN_RB_DL=%d \tfirst_carrier_offset=%d \tz_dm-rs[%d]=txptr(%u)=(x_n(l=%d,n=%d)=(%d,%d))\n",
|
||||
amp,frame_parms->ofdm_symbol_size,frame_parms->N_RB_DL,frame_parms->first_carrier_offset,i+n,re_offset,
|
||||
l,n,((int16_t *)&rxdataF[0][re_offset])[0],((int16_t *)&rxdataF[0][re_offset])[1]);
|
||||
#endif
|
||||
@@ -1006,7 +1007,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
|
||||
|
||||
int32_t **rxdataF = gNB->common_vars.rxdataF;
|
||||
NR_DL_FRAME_PARMS *frame_parms = &gNB->frame_parms;
|
||||
pucch_GroupHopping_t pucch_GroupHopping = pucch_pdu->group_hop_flag + (pucch_pdu->sequence_hop_flag<<1);
|
||||
//pucch_GroupHopping_t pucch_GroupHopping = pucch_pdu->group_hop_flag + (pucch_pdu->sequence_hop_flag<<1);
|
||||
|
||||
AssertFatal(pucch_pdu->nr_of_symbols==1 || pucch_pdu->nr_of_symbols==2,
|
||||
"Illegal number of symbols for PUCCH 2 %d\n",pucch_pdu->nr_of_symbols);
|
||||
@@ -1014,7 +1015,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
|
||||
|
||||
//extract pucch and dmrs first
|
||||
|
||||
int l2;
|
||||
int l2=-1;
|
||||
int re_offset = (12*pucch_pdu->prb_start) + (12*pucch_pdu->bwp_start) + frame_parms->first_carrier_offset;
|
||||
if (re_offset>= frame_parms->ofdm_symbol_size)
|
||||
re_offset-=frame_parms->ofdm_symbol_size;
|
||||
@@ -1109,7 +1110,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
|
||||
r_im_ext[aa][15]=rp[aa][47];
|
||||
|
||||
#ifdef DEBUG_NR_PUCCH_RX
|
||||
for (int i=0;i<8;i++) printf("Ant %d PRB %d dmrs[%d] -> (%d,%d)\n",aa,prb+(i>>2),i,rd_re_ext[aa][i],rd_im_ext[aa],i);
|
||||
for (int i=0;i<8;i++) printf("Ant %d PRB %d dmrs[%d] -> (%d,%d)\n",aa,prb+(i>>2),i,rd_re_ext[aa][i],rd_im_ext[aa]);
|
||||
#endif
|
||||
} // aa
|
||||
} // prb
|
||||
@@ -1378,7 +1379,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
|
||||
|
||||
int harq_bytes=pucch_pdu->bit_len_harq>>3;
|
||||
if ((pucch_pdu->bit_len_harq&7) > 0) harq_bytes++;
|
||||
uci_pdu->harq.harq_payload = (nfapi_nr_harq_t*)malloc(harq_bytes);
|
||||
uci_pdu->harq.harq_payload = (uint8_t*)malloc(harq_bytes);
|
||||
uci_pdu->harq.harq_crc = 2;
|
||||
for (int i=0;i<harq_bytes;i++) {
|
||||
uci_pdu->harq.harq_payload[i] = cw_ML & 255;
|
||||
|
||||
@@ -618,7 +618,7 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
|
||||
ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
|
||||
|
||||
#ifdef DEBUG_PDCCH
|
||||
printf("pilot %d : rxF - > (%d,%d) ch -> (%d,%d), pil -> (%d,%d) \n",pilot_cnt+2,rxF[0],rxF[1],ch[0],ch[1],pil[0],pil[1]);
|
||||
printf("pilot %u : rxF - > (%d,%d) ch -> (%d,%d), pil -> (%d,%d) \n",pilot_cnt+2,rxF[0],rxF[1],ch[0],ch[1],pil[0],pil[1]);
|
||||
#endif
|
||||
|
||||
multadd_real_vector_complex_scalar(fr,
|
||||
|
||||
@@ -29,6 +29,10 @@
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
|
||||
#ifndef __PHY_NR_UE_TRANSPORT_DCI_NR__H__
|
||||
#define __PHY_NR_UE_TRANSPORT_DCI_NR__H__
|
||||
|
||||
#ifndef USER_MODE
|
||||
#include "PHY/types.h"
|
||||
#else
|
||||
@@ -118,4 +122,5 @@ typedef struct NR_DCI_INFO_EXTRACTED NR_DCI_INFO_EXTRACTED_t;
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
#include <openair1/PHY/NR_TRANSPORT/nr_transport_proto_common.h>
|
||||
|
||||
#include "T.h"
|
||||
#include <openair1/PHY/NR_TRANSPORT/nr_transport_proto_common.h>
|
||||
|
||||
@@ -1053,7 +1053,8 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
|
||||
|
||||
int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
|
||||
NR_DL_FRAME_PARMS* frame_parms,
|
||||
uint8_t harq_pid);
|
||||
uint8_t harq_pid,
|
||||
unsigned int G);
|
||||
|
||||
/*! \brief Perform PUSCH scrambling. TS 38.211 V15.4.0 subclause 6.3.1.1
|
||||
@param[in] in, Pointer to input bits
|
||||
|
||||
@@ -42,6 +42,9 @@
|
||||
#include "UTIL/LISTS/list.h"
|
||||
#endif
|
||||
|
||||
#include "LAYER2/NR_MAC_gNB/mac_proto.h"
|
||||
#include "openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.h"
|
||||
|
||||
//#include "../LTE_TRANSPORT/transport_common.h"
|
||||
|
||||
// structures below implement 36-211 and 36-212
|
||||
@@ -84,40 +87,26 @@ typedef struct {
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
/// NDAPI struct for UE
|
||||
nfapi_nr_ue_pusch_pdu_t pusch_pdu;
|
||||
/// Indicator of first transmission
|
||||
uint8_t first_tx;
|
||||
/// Last Ndi received for this process on DCI (used for C-RNTI only)
|
||||
uint8_t DCINdi;
|
||||
/// HARQ tx status
|
||||
harq_result_t tx_status;
|
||||
/// Flag indicating that this ULSCH has a new packet (start of new round)
|
||||
// uint8_t Ndi;
|
||||
/// Status Flag indicating for this ULSCH (idle,active,disabled)
|
||||
SCH_status_t status;
|
||||
/// Subframe scheduling indicator (i.e. Transmission opportunity indicator)
|
||||
uint8_t subframe_scheduling_flag;
|
||||
/// Subframe cba scheduling indicator (i.e. Transmission opportunity indicator)
|
||||
uint8_t subframe_cba_scheduling_flag;
|
||||
/// First Allocated RB
|
||||
uint16_t first_rb;
|
||||
/// Current Number of RBs
|
||||
uint16_t nb_rb;
|
||||
/// number of layers
|
||||
uint8_t Nl;
|
||||
/// Last TPC command
|
||||
uint8_t TPC;
|
||||
/// Transport block size
|
||||
uint32_t TBS;
|
||||
/// The payload + CRC size in bits, "B" from 36-212
|
||||
uint32_t B;
|
||||
/// Length of ACK information (bits)
|
||||
uint8_t O_ACK;
|
||||
/// Index of current HARQ round for this ULSCH
|
||||
uint8_t round;
|
||||
/// MCS format of this ULSCH
|
||||
uint8_t mcs;
|
||||
/// Redundancy-version of the current sub-frame
|
||||
uint8_t rvidx;
|
||||
/// pointer to pdu from MAC interface (TS 36.212 V15.4.0, Sec 5.1 p. 8)
|
||||
unsigned char *a;
|
||||
/// Pointer to the payload + CRC
|
||||
@@ -150,19 +139,11 @@ typedef struct {
|
||||
uint32_t G;
|
||||
// Number of modulated symbols carrying data
|
||||
uint32_t num_of_mod_symbols;
|
||||
// This is "L" in TS 38.214 V15.4.0 subclause 6.1.2.1
|
||||
uint8_t number_of_symbols;
|
||||
// This is "S" in TS 38.214 V15.4.0 subclause 6.1.2.1
|
||||
uint8_t start_symbol;
|
||||
// decode phich
|
||||
uint8_t decode_phich;
|
||||
} NR_UL_UE_HARQ_t;
|
||||
|
||||
typedef struct {
|
||||
/// number of DMRS resource elements
|
||||
uint8_t nb_re_dmrs;
|
||||
/// DMRS length
|
||||
uint8_t length_dmrs;
|
||||
/// SRS active flag
|
||||
uint8_t srs_active;
|
||||
//#if defined(UPGRADE_RAT_NR)
|
||||
@@ -224,8 +205,6 @@ typedef struct {
|
||||
uint8_t power_offset;
|
||||
// for cooperative communication
|
||||
uint8_t cooperation_flag;
|
||||
/// RNTI attributed to this ULSCH
|
||||
uint16_t rnti;
|
||||
/// RNTI type
|
||||
uint8_t rnti_type;
|
||||
/// Cell ID
|
||||
|
||||
@@ -216,15 +216,15 @@ NR_UE_ULSCH_t *new_nr_ue_ulsch(uint16_t N_RB_UL,
|
||||
|
||||
int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
|
||||
NR_DL_FRAME_PARMS* frame_parms,
|
||||
uint8_t harq_pid)
|
||||
uint8_t harq_pid,
|
||||
unsigned int G)
|
||||
{
|
||||
/////////////////////////parameters and variables declaration/////////////////////////
|
||||
///////////
|
||||
|
||||
unsigned int G,crc;
|
||||
unsigned int crc;
|
||||
NR_UL_UE_HARQ_t *harq_process;
|
||||
uint16_t nb_rb ;
|
||||
uint8_t nb_symb_sch ;
|
||||
uint32_t A, Z, F;
|
||||
uint32_t *pz;
|
||||
uint8_t mod_order;
|
||||
@@ -234,8 +234,6 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
|
||||
uint32_t E,Kb;
|
||||
uint8_t Ilbrm;
|
||||
uint32_t Tbslbrm;
|
||||
uint8_t nb_re_dmrs;
|
||||
uint16_t length_dmrs;
|
||||
uint16_t R;
|
||||
float Coderate;
|
||||
|
||||
@@ -248,20 +246,17 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
|
||||
|
||||
crc = 1;
|
||||
harq_process = ulsch->harq_processes[harq_pid];
|
||||
nb_rb = harq_process->nb_rb;
|
||||
nb_symb_sch = harq_process->number_of_symbols;
|
||||
A = harq_process->TBS;
|
||||
nb_rb = harq_process->pusch_pdu.rb_size;
|
||||
A = harq_process->pusch_pdu.pusch_data.tb_size;
|
||||
pz = &Z;
|
||||
mod_order = nr_get_Qm_ul(harq_process->mcs,0);
|
||||
R = nr_get_code_rate_ul(harq_process->mcs, 0);
|
||||
mod_order = nr_get_Qm_ul(harq_process->pusch_pdu.mcs_index, harq_process->pusch_pdu.mcs_table);
|
||||
R = nr_get_code_rate_ul(harq_process->pusch_pdu.mcs_index, harq_process->pusch_pdu.mcs_table);
|
||||
Kr=0;
|
||||
r_offset=0;
|
||||
BG = 1;
|
||||
F=0;
|
||||
Ilbrm = 0;
|
||||
Tbslbrm = 950984; //max tbs
|
||||
nb_re_dmrs = ulsch->nb_re_dmrs;
|
||||
length_dmrs = ulsch->length_dmrs;
|
||||
Coderate = 0.0;
|
||||
|
||||
///////////
|
||||
@@ -270,10 +265,7 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ENCODING, VCD_FUNCTION_IN);
|
||||
|
||||
LOG_D(PHY,"ulsch coding nb_rb %d nb_symb_sch %d nb_re_dmrs %d, length_dmrs %d, harq_process->Nl = %d\n", nb_rb,nb_symb_sch, nb_re_dmrs,length_dmrs, harq_process->Nl);
|
||||
|
||||
|
||||
G = nr_get_G(nb_rb, nb_symb_sch, nb_re_dmrs, length_dmrs,mod_order,harq_process->Nl);
|
||||
LOG_D(PHY,"ulsch coding nb_rb %d, Nl = %d\n", nb_rb, harq_process->pusch_pdu.nrOfLayers);
|
||||
LOG_D(PHY,"ulsch coding A %d G %d mod_order %d\n", A,G, mod_order);
|
||||
|
||||
// if (harq_process->Ndi == 1) { // this is a new packet
|
||||
@@ -433,15 +425,15 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
|
||||
|
||||
//start_meas(rm_stats);
|
||||
#ifdef DEBUG_DLSCH_CODING
|
||||
printf("rvidx in encoding = %d\n", harq_process->rvidx);
|
||||
printf("rvidx in encoding = %d\n", harq_process->pusch_pdu.pusch_data.rv_index);
|
||||
#endif
|
||||
|
||||
///////////////////////// d---->| Rate matching bit selection |---->e /////////////////////////
|
||||
///////////
|
||||
|
||||
E = nr_get_E(G, harq_process->C, mod_order, harq_process->Nl, r);
|
||||
E = nr_get_E(G, harq_process->C, mod_order, harq_process->pusch_pdu.nrOfLayers, r);
|
||||
|
||||
Tbslbrm = nr_compute_tbslbrm(0,nb_rb,harq_process->Nl,harq_process->C);
|
||||
Tbslbrm = nr_compute_tbslbrm(0,nb_rb,harq_process->pusch_pdu.nrOfLayers,harq_process->C);
|
||||
|
||||
nr_rate_matching_ldpc(Ilbrm,
|
||||
Tbslbrm,
|
||||
@@ -452,7 +444,7 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
|
||||
harq_process->C,
|
||||
F,
|
||||
Kr-F-2*(*pz),
|
||||
harq_process->rvidx,
|
||||
harq_process->pusch_pdu.pusch_data.rv_index,
|
||||
E);
|
||||
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
|
||||
uint8_t thread_id,
|
||||
int gNB_id) {
|
||||
|
||||
uint32_t available_bits;
|
||||
uint32_t available_bits, TBS;
|
||||
uint8_t mod_order, cwd_index, num_of_codewords, l;
|
||||
uint32_t scrambled_output[NR_MAX_NB_CODEWORDS][NR_MAX_PDSCH_ENCODED_LENGTH>>5];
|
||||
uint32_t ***pusch_dmrs;
|
||||
@@ -106,11 +106,11 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
|
||||
int32_t **txdataF;
|
||||
uint16_t start_sc, start_rb;
|
||||
int8_t Wf[2], Wt[2], l_prime[2], delta;
|
||||
uint16_t n_dmrs, code_rate, number_dmrs_symbols, k;
|
||||
uint8_t dmrs_type;
|
||||
uint16_t rnti, n_dmrs, code_rate, number_dmrs_symbols, nb_rb, k;
|
||||
uint8_t dmrs_type, nb_dmrs_re_per_rb, number_of_symbols, mcs, Nl;
|
||||
int ap, start_symbol, Nid_cell, i;
|
||||
int sample_offsetF, N_RE_prime, N_PRB_oh;
|
||||
uint16_t n_rnti;
|
||||
uint16_t ul_dmrs_symb_pos;
|
||||
uint8_t data_existing =0;
|
||||
uint8_t L_ptrs, K_ptrs; // PTRS parameters
|
||||
uint16_t beta_ptrs; // PTRS parameter related to power control
|
||||
@@ -120,14 +120,12 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
|
||||
NR_DL_FRAME_PARMS *frame_parms = &UE->frame_parms;
|
||||
NR_UE_PUSCH *pusch_ue = UE->pusch_vars[thread_id][gNB_id];
|
||||
uint8_t ulsch_input_buffer[MAX_ULSCH_PAYLOAD_BYTES];
|
||||
ptrs_UplinkConfig_t *ptrs_Uplink_Config = &UE->pusch_config.dmrs_UplinkConfig.ptrs_UplinkConfig;
|
||||
// ptrs_UplinkConfig_t *ptrs_Uplink_Config = &UE->pusch_config.dmrs_UplinkConfig.ptrs_UplinkConfig;
|
||||
|
||||
num_of_codewords = 1; // tmp assumption
|
||||
n_rnti = 0x1234;
|
||||
Nid_cell = 0;
|
||||
N_PRB_oh = 0; // higher layer (RRC) parameter xOverhead in PUSCH-ServingCellConfig
|
||||
number_dmrs_symbols = 0;
|
||||
uint8_t mapping_type = UE->pusch_config.pusch_TimeDomainResourceAllocation[0]->mappingType;
|
||||
|
||||
|
||||
for (cwd_index = 0;cwd_index < num_of_codewords; cwd_index++) {
|
||||
@@ -135,42 +133,41 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
|
||||
ulsch_ue = UE->ulsch[thread_id][gNB_id][cwd_index];
|
||||
harq_process_ul_ue = ulsch_ue->harq_processes[harq_pid];
|
||||
|
||||
start_symbol = harq_process_ul_ue->start_symbol;
|
||||
start_symbol = harq_process_ul_ue->pusch_pdu.start_symbol_index;
|
||||
ul_dmrs_symb_pos = harq_process_ul_ue->pusch_pdu.ul_dmrs_symb_pos;
|
||||
number_of_symbols = harq_process_ul_ue->pusch_pdu.nr_of_symbols;
|
||||
dmrs_type = harq_process_ul_ue->pusch_pdu.dmrs_config_type;
|
||||
|
||||
for (i = start_symbol; i < start_symbol + harq_process_ul_ue->number_of_symbols; i++)
|
||||
number_dmrs_symbols += is_dmrs_symbol((mapping_type)?i-start_symbol:i,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
harq_process_ul_ue->number_of_symbols,
|
||||
UE->pusch_config.dmrs_UplinkConfig.pusch_dmrs_type,
|
||||
frame_parms->ofdm_symbol_size);
|
||||
for (i = start_symbol; i < start_symbol + number_of_symbols; i++) {
|
||||
|
||||
if((ul_dmrs_symb_pos >> i) & 0x01)
|
||||
number_dmrs_symbols += 1;
|
||||
|
||||
ulsch_ue->length_dmrs = number_dmrs_symbols; // pusch.MaxLenght is redundant here as number_dmrs_symbols
|
||||
// contains all dmrs symbols even for double symbol dmrs
|
||||
ulsch_ue->rnti = n_rnti;
|
||||
}
|
||||
|
||||
rnti = harq_process_ul_ue->pusch_pdu.rnti;
|
||||
ulsch_ue->Nid_cell = Nid_cell;
|
||||
ulsch_ue->nb_re_dmrs = 12; //FIXME temprary for no data in dmrs symbol
|
||||
//((UE->dmrs_UplinkConfig.pusch_dmrs_type == pusch_dmrs_type1)?6:4)*number_dmrs_symbols;
|
||||
nb_dmrs_re_per_rb = ((dmrs_type == pusch_dmrs_type1) ? 6:4);
|
||||
|
||||
N_RE_prime = NR_NB_SC_PER_RB*harq_process_ul_ue->number_of_symbols - ulsch_ue->nb_re_dmrs*number_dmrs_symbols - N_PRB_oh;
|
||||
N_RE_prime = NR_NB_SC_PER_RB*number_of_symbols - nb_dmrs_re_per_rb*number_dmrs_symbols - N_PRB_oh;
|
||||
|
||||
harq_process_ul_ue->num_of_mod_symbols = N_RE_prime*harq_process_ul_ue->nb_rb*num_of_codewords;
|
||||
nb_rb = harq_process_ul_ue->pusch_pdu.rb_size;
|
||||
|
||||
mod_order = nr_get_Qm_ul(harq_process_ul_ue->mcs, 0);
|
||||
code_rate = nr_get_code_rate_ul(harq_process_ul_ue->mcs, 0);
|
||||
harq_process_ul_ue->num_of_mod_symbols = N_RE_prime*nb_rb*num_of_codewords;
|
||||
|
||||
harq_process_ul_ue->TBS = nr_compute_tbs(mod_order,
|
||||
mcs = harq_process_ul_ue->pusch_pdu.mcs_index;
|
||||
Nl = harq_process_ul_ue->pusch_pdu.nrOfLayers;
|
||||
mod_order = nr_get_Qm_ul(mcs, 0);
|
||||
code_rate = nr_get_code_rate_ul(mcs, 0);
|
||||
|
||||
harq_process_ul_ue->pusch_pdu.pusch_data.tb_size = nr_compute_tbs(mod_order,
|
||||
code_rate,
|
||||
harq_process_ul_ue->nb_rb,
|
||||
harq_process_ul_ue->number_of_symbols,
|
||||
ulsch_ue->nb_re_dmrs*ulsch_ue->length_dmrs,
|
||||
nb_rb,
|
||||
number_of_symbols,
|
||||
nb_dmrs_re_per_rb*number_dmrs_symbols,
|
||||
0,
|
||||
0,
|
||||
harq_process_ul_ue->Nl);
|
||||
harq_process_ul_ue->pusch_pdu.nrOfLayers);
|
||||
|
||||
|
||||
uint8_t access_mode = SCHEDULED_ACCESS;
|
||||
@@ -179,14 +176,16 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
|
||||
// to be removed later when MAC is ready
|
||||
|
||||
if (harq_process_ul_ue != NULL){
|
||||
TBS = harq_process_ul_ue->pusch_pdu.pusch_data.tb_size;
|
||||
data_existing = 0;
|
||||
|
||||
if (IS_SOFTMODEM_NOS1){
|
||||
data_existing = nr_ue_get_sdu(UE->Mod_id, UE->CC_id, frame,
|
||||
slot, 0, ulsch_input_buffer, harq_process_ul_ue->TBS/8, &access_mode);
|
||||
slot, 0, ulsch_input_buffer, TBS/8, &access_mode);
|
||||
//IP traffic to be transmitted
|
||||
if(data_existing){
|
||||
//harq_process_ul_ue->a = (unsigned char*)calloc(harq_process_ul_ue->TBS/8, sizeof(unsigned char));
|
||||
memcpy(harq_process_ul_ue->a, ulsch_input_buffer, harq_process_ul_ue->TBS/8);
|
||||
memcpy(harq_process_ul_ue->a, ulsch_input_buffer, TBS/8);
|
||||
}
|
||||
}
|
||||
//Random traffic to be transmitted if there is no IP traffic available for this Tx opportunity
|
||||
@@ -201,7 +200,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
|
||||
for (i = 0; i<payload_offset; i++)
|
||||
harq_process_ul_ue->a[i] = 64;
|
||||
|
||||
for (i = payload_offset; i < harq_process_ul_ue->TBS / 8; i++) {
|
||||
for (i = payload_offset; i < TBS / 8; i++) {
|
||||
harq_process_ul_ue->a[i] = (unsigned char) rand();
|
||||
//printf(" input encoder a[%d]=0x%02x\n",i,harq_process_ul_ue->a[i]);
|
||||
}
|
||||
@@ -223,8 +222,10 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
|
||||
/////////////////////////ULSCH coding/////////////////////////
|
||||
///////////
|
||||
|
||||
unsigned int G = nr_get_G(nb_rb, number_of_symbols,
|
||||
nb_dmrs_re_per_rb, number_dmrs_symbols, mod_order, Nl);
|
||||
|
||||
nr_ulsch_encoding(ulsch_ue, frame_parms, harq_pid);
|
||||
nr_ulsch_encoding(ulsch_ue, frame_parms, harq_pid, G);
|
||||
|
||||
///////////
|
||||
////////////////////////////////////////////////////////////////////
|
||||
@@ -232,21 +233,14 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
|
||||
/////////////////////////ULSCH scrambling/////////////////////////
|
||||
///////////
|
||||
|
||||
mod_order = nr_get_Qm_ul(harq_process_ul_ue->mcs, 0);
|
||||
|
||||
available_bits = nr_get_G(harq_process_ul_ue->nb_rb,
|
||||
harq_process_ul_ue->number_of_symbols,
|
||||
ulsch_ue->nb_re_dmrs,
|
||||
ulsch_ue->length_dmrs,
|
||||
mod_order,
|
||||
1);
|
||||
available_bits = G;
|
||||
|
||||
memset(scrambled_output[cwd_index], 0, ((available_bits>>5)+1)*sizeof(uint32_t));
|
||||
|
||||
nr_pusch_codeword_scrambling(ulsch_ue->g,
|
||||
available_bits,
|
||||
ulsch_ue->Nid_cell,
|
||||
ulsch_ue->rnti,
|
||||
rnti,
|
||||
scrambled_output[cwd_index]); // assume one codeword for the moment
|
||||
|
||||
|
||||
@@ -273,11 +267,9 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
|
||||
|
||||
/////////////////////////DMRS Modulation/////////////////////////
|
||||
///////////
|
||||
ulsch_ue->nb_re_dmrs = ((UE->pusch_config.dmrs_UplinkConfig.pusch_dmrs_type == pusch_dmrs_type1)?6:4)*number_dmrs_symbols; //FIXME temprary here for no data in dmrs symbol
|
||||
pusch_dmrs = UE->nr_gold_pusch_dmrs[slot];
|
||||
n_dmrs = (harq_process_ul_ue->nb_rb*ulsch_ue->nb_re_dmrs*ulsch_ue->length_dmrs);
|
||||
n_dmrs = (nb_rb*nb_dmrs_re_per_rb*number_dmrs_symbols);
|
||||
int16_t mod_dmrs[n_dmrs<<1];
|
||||
dmrs_type = UE->pusch_config.dmrs_UplinkConfig.pusch_dmrs_type;
|
||||
///////////
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -285,26 +277,23 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
|
||||
/////////////////////////PTRS parameters' initialization/////////////////////////
|
||||
///////////
|
||||
|
||||
int16_t mod_ptrs[(harq_process_ul_ue->nb_rb/2)*(NR_SYMBOLS_PER_SLOT-1)*2]; // assume maximum number of PTRS per pusch allocation
|
||||
int16_t mod_ptrs[(nb_rb/2)*(NR_SYMBOLS_PER_SLOT-1)*2]; // assume maximum number of PTRS per pusch allocation
|
||||
K_ptrs = 0; // just to avoid a warning
|
||||
|
||||
if (UE->ptrs_configured == 1) {
|
||||
if (harq_process_ul_ue->pusch_pdu.pdu_bit_map & PUSCH_PDU_BITMAP_PUSCH_PTRS) {
|
||||
|
||||
K_ptrs = get_K_ptrs(ptrs_Uplink_Config, harq_process_ul_ue->nb_rb);
|
||||
|
||||
L_ptrs = get_L_ptrs(ptrs_Uplink_Config, harq_process_ul_ue->mcs);
|
||||
K_ptrs = (harq_process_ul_ue->pusch_pdu.pusch_ptrs.ptrs_freq_density)?4:2;
|
||||
L_ptrs = 1<<harq_process_ul_ue->pusch_pdu.pusch_ptrs.ptrs_time_density;
|
||||
|
||||
beta_ptrs = 1; // temp value until power control is implemented
|
||||
|
||||
ulsch_ue->ptrs_symbols = 0;
|
||||
|
||||
set_ptrs_symb_idx(&ulsch_ue->ptrs_symbols,
|
||||
harq_process_ul_ue->number_of_symbols,
|
||||
number_of_symbols,
|
||||
start_symbol,
|
||||
dmrs_type,
|
||||
L_ptrs,
|
||||
ulsch_ue->length_dmrs,
|
||||
frame_parms->ofdm_symbol_size);
|
||||
ul_dmrs_symb_pos);
|
||||
}
|
||||
|
||||
///////////
|
||||
@@ -316,7 +305,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
|
||||
tx_layers = (int16_t **)pusch_ue->txdataF_layers;
|
||||
|
||||
nr_ue_layer_mapping(UE->ulsch[thread_id][gNB_id],
|
||||
harq_process_ul_ue->Nl,
|
||||
Nl,
|
||||
available_bits/mod_order,
|
||||
tx_layers);
|
||||
|
||||
@@ -333,24 +322,19 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
|
||||
uint32_t nb_re_pusch, nb_re_dmrs_per_rb;
|
||||
uint32_t y_offset = 0;
|
||||
|
||||
for (l = start_symbol; l < start_symbol + harq_process_ul_ue->number_of_symbols; l++) {
|
||||
for (l = start_symbol; l < start_symbol + number_of_symbols; l++) {
|
||||
|
||||
if((ul_dmrs_symb_pos >> l) & 0x01)
|
||||
is_dmrs = 1;
|
||||
else
|
||||
is_dmrs = 0;
|
||||
|
||||
is_dmrs = is_dmrs_symbol((mapping_type)?l-start_symbol:l,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
harq_process_ul_ue->number_of_symbols,
|
||||
dmrs_type,
|
||||
frame_parms->ofdm_symbol_size);
|
||||
|
||||
if (is_dmrs == 1)
|
||||
nb_re_dmrs_per_rb = ulsch_ue->nb_re_dmrs;
|
||||
nb_re_dmrs_per_rb = nb_dmrs_re_per_rb;
|
||||
else
|
||||
nb_re_dmrs_per_rb = 0;
|
||||
|
||||
nb_re_pusch = harq_process_ul_ue->nb_rb * (NR_NB_SC_PER_RB - nb_re_dmrs_per_rb);
|
||||
nb_re_pusch = nb_rb * (NR_NB_SC_PER_RB - nb_re_dmrs_per_rb);
|
||||
|
||||
nr_dft(&ulsch_ue->y[y_offset], &((int32_t*)tx_layers[0])[y_offset], nb_re_pusch);
|
||||
|
||||
@@ -370,13 +354,13 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
|
||||
|
||||
txdataF = UE->common_vars.txdataF;
|
||||
|
||||
start_rb = harq_process_ul_ue->first_rb;
|
||||
start_rb = harq_process_ul_ue->pusch_pdu.rb_start;
|
||||
start_sc = frame_parms->first_carrier_offset + start_rb*NR_NB_SC_PER_RB;
|
||||
|
||||
if (start_sc >= frame_parms->ofdm_symbol_size)
|
||||
start_sc -= frame_parms->ofdm_symbol_size;
|
||||
|
||||
for (ap=0; ap<harq_process_ul_ue->Nl; ap++) {
|
||||
for (ap=0; ap< Nl; ap++) {
|
||||
|
||||
// DMRS params for this ap
|
||||
get_Wt(Wt, ap, dmrs_type);
|
||||
@@ -386,46 +370,38 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
|
||||
|
||||
uint8_t k_prime=0;
|
||||
uint8_t is_dmrs, is_ptrs;
|
||||
uint8_t l_ref;
|
||||
uint16_t m=0, n=0, dmrs_idx=0, ptrs_idx = 0;
|
||||
|
||||
for (l=start_symbol; l<start_symbol+harq_process_ul_ue->number_of_symbols; l++) {
|
||||
for (l=start_symbol; l<start_symbol+number_of_symbols; l++) {
|
||||
|
||||
k = start_sc;
|
||||
n = 0;
|
||||
dmrs_idx = 0;
|
||||
l_ref = (mapping_type) ? l-start_symbol : l;
|
||||
|
||||
for (i=0; i<harq_process_ul_ue->nb_rb*NR_NB_SC_PER_RB; i++) {
|
||||
for (i=0; i< nb_rb*NR_NB_SC_PER_RB; i++) {
|
||||
|
||||
sample_offsetF = l*frame_parms->ofdm_symbol_size + k;
|
||||
|
||||
is_dmrs = 0;
|
||||
is_ptrs = 0;
|
||||
|
||||
is_dmrs = is_dmrs_symbol(l_ref,
|
||||
k,
|
||||
start_sc,
|
||||
k_prime,
|
||||
n,
|
||||
delta,
|
||||
harq_process_ul_ue->number_of_symbols,
|
||||
dmrs_type,
|
||||
frame_parms->ofdm_symbol_size);
|
||||
if((ul_dmrs_symb_pos >> l) & 0x01) {
|
||||
if (k == ((start_sc+get_dmrs_freq_idx_ul(n, k_prime, delta, dmrs_type))%frame_parms->ofdm_symbol_size))
|
||||
is_dmrs = 1;
|
||||
}
|
||||
|
||||
if (UE->ptrs_configured == 1){
|
||||
is_ptrs = is_ptrs_symbol(l,
|
||||
k,
|
||||
ulsch_ue->rnti,
|
||||
harq_process_ul_ue->nb_rb,
|
||||
harq_process_ul_ue->number_of_symbols,
|
||||
ap,
|
||||
K_ptrs,
|
||||
ulsch_ue->ptrs_symbols,
|
||||
start_sc,
|
||||
frame_parms->ofdm_symbol_size,
|
||||
UE->pusch_config.dmrs_UplinkConfig.pusch_dmrs_type,
|
||||
ptrs_Uplink_Config->resourceElementOffset);
|
||||
if (harq_process_ul_ue->pusch_pdu.pdu_bit_map & PUSCH_PDU_BITMAP_PUSCH_PTRS){
|
||||
|
||||
if(is_ptrs_symbol(l, ulsch_ue->ptrs_symbols))
|
||||
is_ptrs = is_ptrs_subcarrier(k,
|
||||
rnti,
|
||||
ap,
|
||||
dmrs_type,
|
||||
K_ptrs,
|
||||
nb_rb,
|
||||
harq_process_ul_ue->pusch_pdu.pusch_ptrs.ptrs_ports_list[0].ptrs_re_offset,
|
||||
start_sc,
|
||||
frame_parms->ofdm_symbol_size);
|
||||
}
|
||||
|
||||
if (is_dmrs == 1) {
|
||||
@@ -452,7 +428,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
|
||||
} else if (is_ptrs == 1) {
|
||||
|
||||
if (k == start_sc){
|
||||
nr_modulation(pusch_dmrs[l][0], harq_process_ul_ue->nb_rb/2, DMRS_MOD_ORDER, mod_ptrs);
|
||||
nr_modulation(pusch_dmrs[l][0], nb_rb, DMRS_MOD_ORDER, mod_ptrs);
|
||||
}
|
||||
|
||||
((int16_t*)txdataF[ap])[(sample_offsetF)<<1] = (beta_ptrs*AMP*mod_ptrs[ptrs_idx<<1]) >> 15;
|
||||
@@ -460,29 +436,18 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
|
||||
|
||||
ptrs_idx++;
|
||||
|
||||
} else {
|
||||
} else {
|
||||
|
||||
if (!is_dmrs_symbol((mapping_type)?l-start_symbol:l,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
harq_process_ul_ue->number_of_symbols,
|
||||
UE->pusch_config.dmrs_UplinkConfig.pusch_dmrs_type,
|
||||
frame_parms->ofdm_symbol_size))
|
||||
{
|
||||
((int16_t*)txdataF[ap])[(sample_offsetF)<<1] = ((int16_t *) ulsch_ue->y)[m<<1];
|
||||
((int16_t*)txdataF[ap])[((sample_offsetF)<<1) + 1] = ((int16_t *) ulsch_ue->y)[(m<<1) + 1];
|
||||
((int16_t*)txdataF[ap])[(sample_offsetF)<<1] = ((int16_t *) ulsch_ue->y)[m<<1];
|
||||
((int16_t*)txdataF[ap])[((sample_offsetF)<<1) + 1] = ((int16_t *) ulsch_ue->y)[(m<<1) + 1];
|
||||
|
||||
#ifdef DEBUG_PUSCH_MAPPING
|
||||
printf("m %d\t l %d \t k %d \t txdataF: %d %d\n",
|
||||
m, l, k, ((int16_t*)txdataF[ap])[(sample_offsetF)<<1],
|
||||
((int16_t*)txdataF[ap])[((sample_offsetF)<<1) + 1]);
|
||||
printf("m %d\t l %d \t k %d \t txdataF: %d %d\n",
|
||||
m, l, k, ((int16_t*)txdataF[ap])[(sample_offsetF)<<1],
|
||||
((int16_t*)txdataF[ap])[((sample_offsetF)<<1) + 1]);
|
||||
#endif
|
||||
|
||||
m++;
|
||||
}
|
||||
m++;
|
||||
}
|
||||
|
||||
if (++k >= frame_parms->ofdm_symbol_size)
|
||||
@@ -511,7 +476,7 @@ uint8_t nr_ue_pusch_common_procedures(PHY_VARS_NR_UE *UE,
|
||||
int32_t **txdata;
|
||||
int32_t **txdataF;
|
||||
int timing_advance;
|
||||
uint8_t Nl = UE->ulsch[thread_id][gNB_id][0]->harq_processes[harq_pid]->Nl; // cw 0
|
||||
uint8_t Nl = UE->ulsch[thread_id][gNB_id][0]->harq_processes[harq_pid]->pusch_pdu.nrOfLayers; // cw 0
|
||||
|
||||
/////////////////////////IFFT///////////////////////
|
||||
///////////
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include "PHY/NR_UE_TRANSPORT/pucch_nr.h"
|
||||
#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_transport_common_proto.h"
|
||||
#include <openair1/PHY/CODING/nrSmallBlock/nr_small_block_defs.h>
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
|
||||
|
||||
@@ -911,19 +911,18 @@ void reset_stats_gNB(FL_OBJECT *button,
|
||||
|
||||
|
||||
static void *scope_thread_gNB(void *arg) {
|
||||
int UE_id;
|
||||
int ue_cnt=0;
|
||||
scopeParms_t * p=(scopeParms_t *) arg;
|
||||
//# ifdef ENABLE_XFORMS_WRITE_STATS
|
||||
// FILE *gNB_stats = fopen("gNB_stats.txt", "w");
|
||||
//#endif
|
||||
|
||||
while (!oai_exit) {
|
||||
ue_cnt=0;
|
||||
int ue_cnt=0;
|
||||
|
||||
for(UE_id=0; UE_id<NUMBER_OF_UE_MAX; UE_id++) {
|
||||
for(int UE_id=0; UE_id<NUMBER_OF_UE_MAX; UE_id++) {
|
||||
if ((ue_cnt<scope_enb_num_ue)) {
|
||||
//this function needs to be written
|
||||
phy_scope_gNB(form_gnb[ue_cnt], RC.gNB[0], RC.ru[0], UE_id);
|
||||
phy_scope_gNB(form_gnb[ue_cnt], p->gNB, p->ru, UE_id);
|
||||
ue_cnt++;
|
||||
}
|
||||
}
|
||||
@@ -983,5 +982,5 @@ void startScope(scopeParms_t * p) {
|
||||
} // UE_id
|
||||
|
||||
pthread_t forms_thread;
|
||||
threadCreate(&forms_thread, scope_thread_gNB, NULL, "scope", -1, OAI_PRIORITY_RT_LOW);
|
||||
threadCreate(&forms_thread, scope_thread_gNB, p, "scope", -1, OAI_PRIORITY_RT_LOW);
|
||||
}
|
||||
|
||||
@@ -68,19 +68,13 @@ typedef struct {
|
||||
typedef struct {
|
||||
int *argc;
|
||||
char **argv;
|
||||
RU_t* ru;
|
||||
PHY_VARS_gNB *gNB;
|
||||
} scopeParms_t;
|
||||
|
||||
extern unsigned char scope_enb_num_ue;
|
||||
FD_phy_scope_gnb * create_phy_scope_gnb( void );
|
||||
FD_phy_scope_nrue * create_phy_scope_nrue( void );
|
||||
|
||||
|
||||
void phy_scope_gNB(FD_phy_scope_gnb *form,
|
||||
PHY_VARS_gNB *phy_vars_gnb,
|
||||
RU_t *phy_vars_ru,
|
||||
int UE_id);
|
||||
|
||||
|
||||
void phy_scope_nrUE(FD_phy_scope_nrue *form,
|
||||
PHY_VARS_NR_UE *phy_vars_ue,
|
||||
int eNB_id,
|
||||
@@ -90,6 +84,5 @@ void phy_scope_nrUE(FD_phy_scope_nrue *form,
|
||||
|
||||
void startScope(scopeParms_t * p);
|
||||
|
||||
|
||||
extern RAN_CONTEXT_t RC;
|
||||
#endif
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
This library offers some functions to remotely program the R&S SMBV100A.
|
||||
*/
|
||||
|
||||
#ifndef __PHY_TOOLS_SMBV__H__
|
||||
#define __PHY_TOOLS_SMBV__H__
|
||||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
@@ -93,3 +95,4 @@ int smbv_configure_common_dci(const char* fname, uint8_t subframe, const char* t
|
||||
// item is the row in the DCI table
|
||||
int smbv_configure_ue_spec_dci(const char* fname, uint8_t subframe, uint8_t user, DCI_ALLOC_t *dci_alloc, uint8_t item);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -148,11 +148,7 @@ static inline void* malloc16_clear( size_t size )
|
||||
#define NB_BANDS_MAX_NB_IoT 8
|
||||
|
||||
|
||||
#ifdef OCP_FRAMEWORK
|
||||
#include <enums.h>
|
||||
#else
|
||||
typedef enum {normal_txrx_NB_IoT=0,rx_calib_ue_NB_IoT=1,rx_calib_ue_med_NB_IoT=2,rx_calib_ue_byp_NB_IoT=3,debug_prach_NB_IoT=4,no_L2_connect_NB_IoT=5,calib_prach_tx_NB_IoT=6,rx_dump_frame_NB_IoT=7,loop_through_memory_NB_IoT=8} runmode_NB_IoT_t;
|
||||
#endif
|
||||
/*
|
||||
enum transmission_access_mode {
|
||||
NO_ACCESS=0,
|
||||
|
||||
@@ -44,9 +44,6 @@
|
||||
#define MAX_RRU_CONFIG_SIZE 1024
|
||||
|
||||
|
||||
#ifdef OCP_FRAMEWORK
|
||||
#include <enums.h>
|
||||
#else
|
||||
|
||||
typedef enum {
|
||||
normal_txrx=0,
|
||||
@@ -92,7 +89,6 @@ typedef enum {
|
||||
synch_to_other, // synch to another source_(timer, other RU)
|
||||
synch_to_mobipass_standalone // special case for mobipass in standalone mode
|
||||
} node_timing_t;
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct {
|
||||
@@ -552,6 +548,8 @@ typedef struct RU_t_s {
|
||||
void (*wakeup_prach_gNB)(struct PHY_VARS_gNB_s *gNB, struct RU_t_s *ru, int frame, int subframe);
|
||||
/// function pointer to wakeup routine in lte-enb.
|
||||
void (*wakeup_prach_eNB_br)(struct PHY_VARS_eNB_s *eNB, struct RU_t_s *ru, int frame, int subframe);
|
||||
/// function pointer to start a thread of tx write for USRP.
|
||||
int (*start_write_thread)(struct RU_t_s *ru);
|
||||
|
||||
/// function pointer to NB entry routine
|
||||
void (*eNB_top)(struct PHY_VARS_eNB_s *eNB, int frame_rx, int subframe_rx, char *string, struct RU_t_s *ru);
|
||||
|
||||
@@ -99,9 +99,6 @@
|
||||
|
||||
#define NB_RX_ANTENNAS_MAX 64
|
||||
|
||||
#ifdef OCP_FRAMEWORK
|
||||
#include "enums.h"
|
||||
#else
|
||||
|
||||
typedef enum {TDD=1,FDD=0} lte_frame_type_t;
|
||||
|
||||
@@ -122,7 +119,6 @@ typedef enum {
|
||||
one=6,
|
||||
two=12
|
||||
} PHICH_RESOURCE_t;
|
||||
#endif
|
||||
/// PHICH-Config from 36.331 RRC spec
|
||||
typedef struct {
|
||||
/// Parameter: PHICH-Duration, see TS 36.211 (Table 6.9.3-1).
|
||||
@@ -250,12 +246,10 @@ typedef struct {
|
||||
} UL_REFERENCE_SIGNALS_PUSCH_t;
|
||||
|
||||
/// Enumeration for parameter Hopping-mode \ref PUSCH_CONFIG_COMMON::hoppingMode.
|
||||
#ifndef OCP_FRAMEWORK
|
||||
typedef enum {
|
||||
interSubFrame=0,
|
||||
intraAndInterSubFrame=1
|
||||
} PUSCH_HOPPING_t;
|
||||
#endif
|
||||
|
||||
/// PUSCH-ConfigCommon from 36.331 RRC spec.
|
||||
typedef struct {
|
||||
@@ -434,7 +428,6 @@ typedef struct {
|
||||
uint8_t filterCoefficient;
|
||||
} UL_POWER_CONTROL_DEDICATED;
|
||||
|
||||
#ifndef OCP_FRAMEWORK
|
||||
/// Enumeration for parameter \f$\alpha\f$ \ref UL_POWER_CONTROL_CONFIG_COMMON::alpha.
|
||||
typedef enum {
|
||||
al0=0,
|
||||
@@ -446,7 +439,6 @@ typedef enum {
|
||||
al09=6,
|
||||
al1=7
|
||||
} PUSCH_alpha_t;
|
||||
#endif
|
||||
|
||||
/// \note UNUSED
|
||||
typedef enum {
|
||||
|
||||
@@ -956,9 +956,6 @@ typedef struct {
|
||||
/// PUSCH DMRS sequence
|
||||
uint32_t ****nr_gold_pusch_dmrs;
|
||||
|
||||
/// flag to indicate if PTRS is configured
|
||||
uint8_t ptrs_configured;
|
||||
|
||||
uint32_t X_u[64][839];
|
||||
|
||||
uint32_t high_speed_flag;
|
||||
|
||||
+16
-17
@@ -38,7 +38,7 @@ extern unsigned int TX_DMA_BUFFER[4][NB_ANTENNAS_TX];
|
||||
extern unsigned int DAQ_MBOX;
|
||||
extern int number_of_cards;
|
||||
|
||||
extern short conjugate[8],conjugate2[8];
|
||||
extern const short conjugate[8],conjugate2[8];
|
||||
|
||||
extern RAN_CONTEXT_t RC;
|
||||
|
||||
@@ -73,8 +73,8 @@ extern int flag_LA;
|
||||
extern double sinr_bler_map[MCS_COUNT][2][MCS_TABLE_LENGTH_MAX];
|
||||
extern double sinr_bler_map_up[MCS_COUNT][2][16];
|
||||
extern int table_length[MCS_COUNT];
|
||||
extern double sinr_to_cqi[4][16];
|
||||
extern int cqi_to_mcs[16];
|
||||
extern const double sinr_to_cqi[4][16];
|
||||
extern const int cqi_to_mcs[16];
|
||||
|
||||
//for MU-MIMO abstraction using MIESM
|
||||
//this 2D arrarays contains SINR, MI and RBIR in rows 1, 2, and 3 respectively
|
||||
@@ -82,23 +82,22 @@ extern double MI_map_4qam[3][162];
|
||||
extern double MI_map_16qam[3][197];
|
||||
extern double MI_map_64qam[3][227];
|
||||
|
||||
extern double beta1_dlsch_MI[6][MCS_COUNT];
|
||||
extern double beta2_dlsch_MI[6][MCS_COUNT];
|
||||
extern const double beta1_dlsch_MI[6][MCS_COUNT];
|
||||
extern const double beta2_dlsch_MI[6][MCS_COUNT];
|
||||
|
||||
extern double q_qpsk[8];
|
||||
extern double q_qam16[8];
|
||||
extern double q_qam64[8];
|
||||
extern const double q_qpsk[8];
|
||||
extern const double q_qam16[8];
|
||||
extern const double q_qam64[8];
|
||||
extern const double p_qpsk[8];
|
||||
extern const double p_qam16[8];
|
||||
extern const double p_qam64[8];
|
||||
|
||||
extern double p_qpsk[8];
|
||||
extern double p_qam16[8];
|
||||
extern double p_qam64[8];
|
||||
extern const double beta1_dlsch[6][MCS_COUNT];
|
||||
extern const double beta2_dlsch[6][MCS_COUNT];
|
||||
|
||||
extern double beta1_dlsch[6][MCS_COUNT];
|
||||
extern double beta2_dlsch[6][MCS_COUNT];
|
||||
|
||||
extern char NB_functions[7][20];
|
||||
extern char NB_timing[2][20];
|
||||
extern char ru_if_types[MAX_RU_IF_TYPES][20];
|
||||
extern const char NB_functions[7][20];
|
||||
extern const char NB_timing[2][20];
|
||||
extern const char ru_if_types[MAX_RU_IF_TYPES][20];
|
||||
|
||||
extern int16_t unscrambling_lut[65536*16];
|
||||
extern uint8_t scrambling_lut[65536*16];
|
||||
|
||||
@@ -34,7 +34,7 @@ extern unsigned int TX_DMA_BUFFER[4][NB_ANTENNAS_TX];
|
||||
|
||||
//#include "PHY/LTE_TRANSPORT/transport_extern.h"
|
||||
|
||||
extern short conjugate[8],conjugate2[8];
|
||||
extern const short conjugate[8],conjugate2[8];
|
||||
extern int number_of_cards;
|
||||
|
||||
|
||||
@@ -70,8 +70,8 @@ extern int flag_LA;
|
||||
extern double sinr_bler_map[MCS_COUNT][2][MCS_TABLE_LENGTH_MAX];
|
||||
extern double sinr_bler_map_up[MCS_COUNT][2][16];
|
||||
extern int table_length[MCS_COUNT];
|
||||
extern double sinr_to_cqi[4][16];
|
||||
extern int cqi_to_mcs[16];
|
||||
extern const double sinr_to_cqi[4][16];
|
||||
extern const int cqi_to_mcs[16];
|
||||
|
||||
//for MU-MIMO abstraction using MIESM
|
||||
//this 2D arrarays contains SINR, MI and RBIR in rows 1, 2, and 3 respectively
|
||||
@@ -79,23 +79,19 @@ extern double MI_map_4qam[3][162];
|
||||
extern double MI_map_16qam[3][197];
|
||||
extern double MI_map_64qam[3][227];
|
||||
|
||||
extern double beta1_dlsch_MI[6][MCS_COUNT];
|
||||
extern double beta2_dlsch_MI[6][MCS_COUNT];
|
||||
extern const double beta1_dlsch_MI[6][MCS_COUNT];
|
||||
extern const double beta2_dlsch_MI[6][MCS_COUNT];
|
||||
|
||||
extern double q_qpsk[8];
|
||||
extern double q_qam16[8];
|
||||
extern double q_qam64[8];
|
||||
extern const double q_qpsk[8];
|
||||
extern const double q_qam16[8];
|
||||
extern const double q_qam64[8];
|
||||
|
||||
extern double p_qpsk[8];
|
||||
extern double p_qam16[8];
|
||||
extern double p_qam64[8];
|
||||
extern const double beta1_dlsch[6][MCS_COUNT];
|
||||
extern const double beta2_dlsch[6][MCS_COUNT];
|
||||
|
||||
extern double beta1_dlsch[6][MCS_COUNT];
|
||||
extern double beta2_dlsch[6][MCS_COUNT];
|
||||
|
||||
extern char NB_functions[7][20];
|
||||
extern char NB_timing[2][20];
|
||||
extern char ru_if_types[MAX_RU_IF_TYPES][20];
|
||||
extern const char NB_functions[7][20];
|
||||
extern const char NB_timing[2][20];
|
||||
extern const char ru_if_types[MAX_RU_IF_TYPES][20];
|
||||
|
||||
extern int16_t unscrambling_lut[65536*16];
|
||||
extern uint8_t scrambling_lut[65536*16];
|
||||
|
||||
@@ -36,7 +36,7 @@ extern unsigned int TX_DMA_BUFFER[4][NB_ANTENNAS_TX];
|
||||
|
||||
extern int number_of_cards;
|
||||
|
||||
extern short conjugate[8],conjugate2[8];
|
||||
extern const short conjugate[8],conjugate2[8];
|
||||
|
||||
|
||||
extern PHY_VARS_UE ***PHY_vars_UE_g;
|
||||
@@ -70,8 +70,8 @@ extern int flag_LA;
|
||||
extern double sinr_bler_map[MCS_COUNT][2][MCS_TABLE_LENGTH_MAX];
|
||||
extern double sinr_bler_map_up[MCS_COUNT][2][16];
|
||||
extern int table_length[MCS_COUNT];
|
||||
extern double sinr_to_cqi[4][16];
|
||||
extern int cqi_to_mcs[16];
|
||||
extern const double sinr_to_cqi[4][16];
|
||||
extern const int cqi_to_mcs[16];
|
||||
|
||||
//for MU-MIMO abstraction using MIESM
|
||||
//this 2D arrarays contains SINR, MI and RBIR in rows 1, 2, and 3 respectively
|
||||
@@ -79,23 +79,23 @@ extern double MI_map_4qam[3][162];
|
||||
extern double MI_map_16qam[3][197];
|
||||
extern double MI_map_64qam[3][227];
|
||||
|
||||
extern double beta1_dlsch_MI[6][MCS_COUNT];
|
||||
extern double beta2_dlsch_MI[6][MCS_COUNT];
|
||||
extern const double beta1_dlsch_MI[6][MCS_COUNT];
|
||||
extern const double beta2_dlsch_MI[6][MCS_COUNT];
|
||||
|
||||
extern double q_qpsk[8];
|
||||
extern double q_qam16[8];
|
||||
extern double q_qam64[8];
|
||||
extern const double q_qpsk[8];
|
||||
extern const double q_qam16[8];
|
||||
extern const double q_qam64[8];
|
||||
|
||||
extern double p_qpsk[8];
|
||||
extern double p_qam16[8];
|
||||
extern double p_qam64[8];
|
||||
extern const double p_qpsk[8];
|
||||
extern const double p_qam16[8];
|
||||
extern const double p_qam64[8];
|
||||
|
||||
extern double beta1_dlsch[6][MCS_COUNT];
|
||||
extern double beta2_dlsch[6][MCS_COUNT];
|
||||
extern const double beta1_dlsch[6][MCS_COUNT];
|
||||
extern const double beta2_dlsch[6][MCS_COUNT];
|
||||
|
||||
extern char NB_functions[7][20];
|
||||
extern char NB_timing[2][20];
|
||||
extern char ru_if_types[MAX_RU_IF_TYPES][20];
|
||||
extern const char NB_functions[7][20];
|
||||
extern const char NB_timing[2][20];
|
||||
extern const char ru_if_types[MAX_RU_IF_TYPES][20];
|
||||
|
||||
extern int16_t unscrambling_lut[65536*16];
|
||||
extern uint8_t scrambling_lut[65536*16];
|
||||
|
||||
+17
-21
@@ -50,8 +50,8 @@ unsigned short rev[2048],rev_times4[8192],rev_half[1024];
|
||||
unsigned short rev256[256],rev512[512],rev1024[1024],rev4096[4096],rev2048[2048],rev8192[8192];
|
||||
|
||||
|
||||
short conjugate[8]__attribute__((aligned(16))) = {-1,1,-1,1,-1,1,-1,1};
|
||||
short conjugate2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1};
|
||||
const short conjugate[8]__attribute__((aligned(16))) = {-1,1,-1,1,-1,1,-1,1};
|
||||
const short conjugate2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1};
|
||||
|
||||
|
||||
#include "SIMULATION/ETH_TRANSPORT/vars.h"
|
||||
@@ -84,29 +84,29 @@ double MI_map_16qam[3][197];
|
||||
double MI_map_64qam[3][227];
|
||||
|
||||
// here the first index is for transmission mode 1, 2, 5 and 6 whereas the second index is for the 16 sinr vaues corresponding to 16 CQIs
|
||||
double sinr_to_cqi[4][16]= { {-2.5051, -2.5051, -1.7451, -0.3655, 1.0812, 2.4012, 3.6849, 6.6754, 8.3885, 8.7970, 12.0437, 14.4709, 15.7281, 17.2424, 17.2424, 17.2424},
|
||||
const double sinr_to_cqi[4][16]= { {-2.5051, -2.5051, -1.7451, -0.3655, 1.0812, 2.4012, 3.6849, 6.6754, 8.3885, 8.7970, 12.0437, 14.4709, 15.7281, 17.2424, 17.2424, 17.2424},
|
||||
{-2.2360, -2.2360, -1.3919, -0.0218, 1.5319, 2.9574, 4.3234, 6.3387, 8.9879, 9.5096, 12.6609, 14.0116, 16.4984, 18.1572, 18.1572, 18.1572},
|
||||
{-1, -1.0000, -0.4198, -0.0140, 1.0362, 2.3520, 3.5793, 6.1136, 8.4836, 9.0858, 12.4723, 13.9128, 16.2054, 17.7392, 17.7392, 17.7392},
|
||||
{ -4.1057, -4.1057, -3.3768, -2.2916, -1.1392, 0.1236, 1.2849, 3.1933, 5.9298, 6.4052, 9.6245, 10.9414, 13.5166, 14.9545, 14.9545, 14.9545}
|
||||
};
|
||||
|
||||
//int cqi_to_mcs[16]={0, 0, 1, 3, 5, 7, 9, 13, 15, 16, 20, 23, 25, 27, 27, 27};
|
||||
int cqi_to_mcs[16]= {0, 0, 1, 2, 4, 6, 8, 11, 13, 16, 18, 20, 23, 25, 27, 28};
|
||||
const int cqi_to_mcs[16]= {0, 0, 1, 2, 4, 6, 8, 11, 13, 16, 18, 20, 23, 25, 27, 28};
|
||||
|
||||
//for SNR to MI conversion 7 th order Polynomial coeff
|
||||
double q_qam16[8]= {3.21151853033897e-10,5.55435952230651e-09,-2.30760065362117e-07,-6.25587743817859e-06,4.62251036452795e-06,0.00224150813158937,0.0393723140344367,0.245486379182639};
|
||||
double q_qpsk[8]= {1.94491167814437e-09,8.40494123817774e-08,4.75527131198034e-07,-2.48946285301621e-05,-0.000347614016158364,0.00209252225437100,0.0742986115462510,0.488297879889425};
|
||||
double q_qam64[8]= {2.25934026232206e-11,-1.45992206328306e-10,-3.70861183071900e-08,-1.22206071019319e-06,6.49115500399637e-06,0.00129828997837433,0.0259669554914859,0.166602901214898};
|
||||
const double q_qam16[8]= {3.21151853033897e-10,5.55435952230651e-09,-2.30760065362117e-07,-6.25587743817859e-06,4.62251036452795e-06,0.00224150813158937,0.0393723140344367,0.245486379182639};
|
||||
const double q_qpsk[8]= {1.94491167814437e-09,8.40494123817774e-08,4.75527131198034e-07,-2.48946285301621e-05,-0.000347614016158364,0.00209252225437100,0.0742986115462510,0.488297879889425};
|
||||
const double q_qam64[8]= {2.25934026232206e-11,-1.45992206328306e-10,-3.70861183071900e-08,-1.22206071019319e-06,6.49115500399637e-06,0.00129828997837433,0.0259669554914859,0.166602901214898};
|
||||
|
||||
//for MI to SNR conversion 7 th order Polynomial coeff
|
||||
double p_qpsk[8]= {5982.42405670359,-21568.1135917693,31293.9987036905,-23394.6795043871,9608.34750585489,-2158.15802349899,267.731968719036,-20.6145324295965};
|
||||
double p_qam16[8]= {7862.12690694170,-28510.3207048338,41542.2150287122,-31088.3036957379,12690.1982361016,-2785.66604739984,326.595462489375,-18.9911849872089};
|
||||
double p_qam64[8]= {8832.57933013696,-32119.1802555952,46914.2578990397,-35163.8150557183,14343.7419388853,-3126.61025510092,360.954930562237,-18.0358548533343};
|
||||
const double p_qpsk[8]= {5982.42405670359,-21568.1135917693,31293.9987036905,-23394.6795043871,9608.34750585489,-2158.15802349899,267.731968719036,-20.6145324295965};
|
||||
const double p_qam16[8]= {7862.12690694170,-28510.3207048338,41542.2150287122,-31088.3036957379,12690.1982361016,-2785.66604739984,326.595462489375,-18.9911849872089};
|
||||
const double p_qam64[8]= {8832.57933013696,-32119.1802555952,46914.2578990397,-35163.8150557183,14343.7419388853,-3126.61025510092,360.954930562237,-18.0358548533343};
|
||||
|
||||
// ideal CE MIESM
|
||||
|
||||
double beta1_dlsch_MI[6][MCS_COUNT] = { {1.1188, 0.3720, 0.3755, 0.9453, 0.5799, 0.5256, 0.5485, 0.5340, 0.5165, 0.5300, 0.6594, 0.5962, 0.4884, 0.4927, 0.3687, 0.4614, 0.4081, 0.2639,0.2935,0.2520,0.3709,0.2906,0.2612,0.2390}, {0.7138, 0.5533, 0.5533, 0.4828, 0.4998, 0.4843, 0.4942, 0.5323, 0.5142, 0.4756, 0.5792, 0.4167, 0.4445, 0.3942, 0.3789, 0.2756, 0.4456, 0.1650, 0.2254, 0.2353, 0.2097,0.2517,0.3242,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1},{1.808065416202085, 1.754544945430673,1.902272019362616, 1.790054645392961, 1.563204092967629, 1.585258289348813, 1.579349443720310, 1.570650121437345, 1.545055626608596, 1.362229442426877, 1.85, 1.79, 1.65, 1.54, 1.46, 1.39, 1.33, 1,1,1,1,1,1,1},{0.7146, 0.4789, 0.5392, 0.5556, 0.4975, 0.4847, 0.4691, 0.5261, 0.5278, 0.4962, 0.4468, 0.4113, 0.4622, 0.4609, 0.3946, 0.3991, 0.3532, 0.2439, 0.1898, 0.2929, 0.2712, 0.3367, 0.3591, 0.2571}};
|
||||
double beta2_dlsch_MI[6][MCS_COUNT] = { {1.1293, 0.3707, 0.3722, 0.9310, 0.5808, 0.5265, 0.5404, 0.5279, 0.5210, 0.5226, 0.6438, 0.5827, 0.4804, 0.4830, 0.3638, 0.4506, 0.4107, 0.2547, 0.2797, 0.2413, 0.3351, 0.2750, 0.2568, 0.2273}, {0.7028, 0.5503, 0.5503, 0.4815, 0.5006, 0.4764, 0.4810, 0.5124, 0.4964, 0.4485, 0.5497, 0.3971, 0.4239, 0.3701, 0.3494, 0.2630, 0.4053, 0.1505, 0.2001,0.2024,0.1788,0.2124,0.2668,1}, {1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1},{1.079518113138858, 1.105622953570353, 1.031337449900606, 1.073342032668810, 1.242636589110353, 1.255054927783647, 1.291463834317768, 1.317048698347491, 1.354485054187984, 0.338534029291017, 1.85, 1.79, 1.65, 1.54, 1.46, 1.39, 1.33,1, 1,1,1,1,1,1},{0.6980, 0.4694, 0.5379, 0.5483, 0.4982, 0.4737, 0.4611, 0.5051, 0.5020, 0.4672, 0.4357, 0.3957, 0.4389, 0.4344, 0.3645, 0.3661, 0.3301, 0.2179, 0.1730, 0.2536, 0.2389,0.2884,0.2936,0.2226}};
|
||||
const double beta1_dlsch_MI[6][MCS_COUNT] = { {1.1188, 0.3720, 0.3755, 0.9453, 0.5799, 0.5256, 0.5485, 0.5340, 0.5165, 0.5300, 0.6594, 0.5962, 0.4884, 0.4927, 0.3687, 0.4614, 0.4081, 0.2639,0.2935,0.2520,0.3709,0.2906,0.2612,0.2390}, {0.7138, 0.5533, 0.5533, 0.4828, 0.4998, 0.4843, 0.4942, 0.5323, 0.5142, 0.4756, 0.5792, 0.4167, 0.4445, 0.3942, 0.3789, 0.2756, 0.4456, 0.1650, 0.2254, 0.2353, 0.2097,0.2517,0.3242,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1},{1.808065416202085, 1.754544945430673,1.902272019362616, 1.790054645392961, 1.563204092967629, 1.585258289348813, 1.579349443720310, 1.570650121437345, 1.545055626608596, 1.362229442426877, 1.85, 1.79, 1.65, 1.54, 1.46, 1.39, 1.33, 1,1,1,1,1,1,1},{0.7146, 0.4789, 0.5392, 0.5556, 0.4975, 0.4847, 0.4691, 0.5261, 0.5278, 0.4962, 0.4468, 0.4113, 0.4622, 0.4609, 0.3946, 0.3991, 0.3532, 0.2439, 0.1898, 0.2929, 0.2712, 0.3367, 0.3591, 0.2571}};
|
||||
const double beta2_dlsch_MI[6][MCS_COUNT] = { {1.1293, 0.3707, 0.3722, 0.9310, 0.5808, 0.5265, 0.5404, 0.5279, 0.5210, 0.5226, 0.6438, 0.5827, 0.4804, 0.4830, 0.3638, 0.4506, 0.4107, 0.2547, 0.2797, 0.2413, 0.3351, 0.2750, 0.2568, 0.2273}, {0.7028, 0.5503, 0.5503, 0.4815, 0.5006, 0.4764, 0.4810, 0.5124, 0.4964, 0.4485, 0.5497, 0.3971, 0.4239, 0.3701, 0.3494, 0.2630, 0.4053, 0.1505, 0.2001,0.2024,0.1788,0.2124,0.2668,1}, {1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1},{1.079518113138858, 1.105622953570353, 1.031337449900606, 1.073342032668810, 1.242636589110353, 1.255054927783647, 1.291463834317768, 1.317048698347491, 1.354485054187984, 0.338534029291017, 1.85, 1.79, 1.65, 1.54, 1.46, 1.39, 1.33,1, 1,1,1,1,1,1},{0.6980, 0.4694, 0.5379, 0.5483, 0.4982, 0.4737, 0.4611, 0.5051, 0.5020, 0.4672, 0.4357, 0.3957, 0.4389, 0.4344, 0.3645, 0.3661, 0.3301, 0.2179, 0.1730, 0.2536, 0.2389,0.2884,0.2936,0.2226}};
|
||||
|
||||
//real CE MIESM
|
||||
/*
|
||||
@@ -116,8 +116,8 @@ double beta2_dlsch_MI[6][MCS_COUNT] = { {1.36875, 0.59304, 0.53870, 0.98239, 0.8
|
||||
//ideal channel estimation values
|
||||
//double beta1_dlsch[6][MCS_COUNT] = { {2.3814, 0.4956, 0.5273, 1.1708, 0.8014, 0.7889, 0.8111, 0.8139, 0.8124, 0.8479, 1.9280, 1.9664, 2.3857, 2.5147, 2.4511, 3.0158, 2.8643, 5.3013, 5.8594, 6.5372, 7.8073, 7.8030, 7.5295, 7.1320}, {0.5146, 0.5549, 0.7405, 0.6913, 0.7349, 0.7000, 0.7539, 0.7955, 0.8074, 0.7760, 1.8150, 1.6561, 1.9280, 2.3563, 2.6699, 2.3086, 3.1601, 4.5316, 5.2870, 6.0983, 6.5635, 7.7024, 9.9592, 6.6173}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {1.79358, 1.17908, 2.02600, 1.72040, 1.58618, 1.59039, 1.68111, 1.67062, 1.64911, 1.33274, 4.87800, 3.58797, 3.72338, 5.35700, 2.81752, 1.93472, 2.23259, 1,1,1,1,1,1,1}, {0.4445, 0.5918, 0.7118, 0.7115, 0.7284, 0.7202, 0.7117, 0.8111, 0.8239, 0.7907, 1.8456, 1.8144, 2.3830, 2.6634, 2.6129, 2.8127, 2.7372, 4.9424, 4.8763, 6.8413, 7.1493, 9.4180, 10.1230, 8.9613}};
|
||||
//double beta2_dlsch[6][MCS_COUNT] = { {2.3639, 0.4952, 0.5207, 1.1572, 0.8026, 0.7864, 0.7996, 0.8034, 0.8200, 0.8367, 1.8701, 1.9212, 2.2947, 2.4472, 2.4091, 2.9479, 2.8973, 5.0591, 5.5134, 6.1483, 7.2166, 7.5177, 7.5704, 7.2248}, {0.5113, 0.5600, 0.7359, 0.6860, 0.7344, 0.6902, 0.7315, 0.7660, 0.7817, 0.7315, 1.7268, 1.5912, 1.8519, 2.2115, 2.4580, 2.1879, 2.9015, 4.1543, 4.6986, 5.3193, 5.6319, 6.5640, 8.2421, 5.6393}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {0.79479, 0.52872, 0.90005, 0.77170, 0.73220, 0.72060, 0.75433, 0.75451, 0.75989, 0.67655, 1.68525, 1.31100, 1.46573, 1.99843, 1.57293, 1.62852, 2.10636, 1,1,1,1,1,1,1}, {0.4398, 0.5823, 0.7094, 0.7043, 0.7282, 0.7041, 0.6979, 0.7762, 0.7871, 0.7469, 1.7752, 1.7443, 2.2266, 2.4767, 2.4146, 2.6040, 2.5708, 4.4488, 4.4944, 5.9630, 6.3740, 8.1097, 8.4210, 7.8027}};
|
||||
double beta1_dlsch[6][MCS_COUNT] = { {1.199175, 1.085656, 0.983872, 0.843789, 0.816093, 0.853078, 0.899236, 0.919665, 0.888673, 0.924181, 0.814176, 0.794108, 0.770653, 0.826266, 0.982043, 0.979621, 0.985176, 0.901741, 0.870311, 0.911303, 0.898923, 1.003359, 0.988535, 1.030639, 1.151038, 1.116939, 1.214118, 1.219148}, {0.5146, 0.5549, 0.7405, 0.6913, 0.7349, 0.7000, 0.7539, 0.7955, 0.8074, 0.7760, 1.8150, 1.6561, 1.9280, 2.3563, 2.6699, 2.3086, 3.1601, 4.5316, 5.2870, 6.0983, 6.5635, 7.7024, 9.9592, 6.6173}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {1.79358, 1.17908, 2.02600, 1.72040, 1.58618, 1.59039, 1.68111, 1.67062, 1.64911, 1.33274, 4.87800, 3.58797, 3.72338, 5.35700, 2.81752, 1.93472, 2.23259, 1,1,1,1,1,1,1}, {0.4445, 0.5918, 0.7118, 0.7115, 0.7284, 0.7202, 0.7117, 0.8111, 0.8239, 0.7907, 1.8456, 1.8144, 2.3830, 2.6634, 2.6129, 2.8127, 2.7372, 4.9424, 4.8763, 6.8413, 7.1493, 9.4180, 10.1230, 8.9613}};
|
||||
double beta2_dlsch[6][MCS_COUNT] = { {0.534622, 0.596561, 0.500838, 0.471721, 0.548218, 0.547974, 0.924245, 0.836484, 0.776917, 0.879691, 0.875722, 0.666933, 0.666393, 0.755377, 1.074985, 1.080290, 1.010914, 0.790892, 0.793435, 0.860249, 0.901508, 0.967060, 0.951372, 1.011493, 1.106151, 1.117076, 1.209397, 1.227790}, {0.5113, 0.5600, 0.7359, 0.6860, 0.7344, 0.6902, 0.7315, 0.7660, 0.7817, 0.7315, 1.7268, 1.5912, 1.8519, 2.2115, 2.4580, 2.1879, 2.9015, 4.1543, 4.6986, 5.3193, 5.6319, 6.5640, 8.2421, 5.6393}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {0.79479, 0.52872, 0.90005, 0.77170, 0.73220, 0.72060, 0.75433, 0.75451, 0.75989, 0.67655, 1.68525, 1.31100, 1.46573, 1.99843, 1.57293, 1.62852, 2.10636, 1,1,1,1,1,1,1}, {0.4398, 0.5823, 0.7094, 0.7043, 0.7282, 0.7041, 0.6979, 0.7762, 0.7871, 0.7469, 1.7752, 1.7443, 2.2266, 2.4767, 2.4146, 2.6040, 2.5708, 4.4488, 4.4944, 5.9630, 6.3740, 8.1097, 8.4210, 7.8027}};
|
||||
const double beta1_dlsch[6][MCS_COUNT] = { {1.199175, 1.085656, 0.983872, 0.843789, 0.816093, 0.853078, 0.899236, 0.919665, 0.888673, 0.924181, 0.814176, 0.794108, 0.770653, 0.826266, 0.982043, 0.979621, 0.985176, 0.901741, 0.870311, 0.911303, 0.898923, 1.003359, 0.988535, 1.030639, 1.151038, 1.116939, 1.214118, 1.219148}, {0.5146, 0.5549, 0.7405, 0.6913, 0.7349, 0.7000, 0.7539, 0.7955, 0.8074, 0.7760, 1.8150, 1.6561, 1.9280, 2.3563, 2.6699, 2.3086, 3.1601, 4.5316, 5.2870, 6.0983, 6.5635, 7.7024, 9.9592, 6.6173}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {1.79358, 1.17908, 2.02600, 1.72040, 1.58618, 1.59039, 1.68111, 1.67062, 1.64911, 1.33274, 4.87800, 3.58797, 3.72338, 5.35700, 2.81752, 1.93472, 2.23259, 1,1,1,1,1,1,1}, {0.4445, 0.5918, 0.7118, 0.7115, 0.7284, 0.7202, 0.7117, 0.8111, 0.8239, 0.7907, 1.8456, 1.8144, 2.3830, 2.6634, 2.6129, 2.8127, 2.7372, 4.9424, 4.8763, 6.8413, 7.1493, 9.4180, 10.1230, 8.9613}};
|
||||
const double beta2_dlsch[6][MCS_COUNT] = { {0.534622, 0.596561, 0.500838, 0.471721, 0.548218, 0.547974, 0.924245, 0.836484, 0.776917, 0.879691, 0.875722, 0.666933, 0.666393, 0.755377, 1.074985, 1.080290, 1.010914, 0.790892, 0.793435, 0.860249, 0.901508, 0.967060, 0.951372, 1.011493, 1.106151, 1.117076, 1.209397, 1.227790}, {0.5113, 0.5600, 0.7359, 0.6860, 0.7344, 0.6902, 0.7315, 0.7660, 0.7817, 0.7315, 1.7268, 1.5912, 1.8519, 2.2115, 2.4580, 2.1879, 2.9015, 4.1543, 4.6986, 5.3193, 5.6319, 6.5640, 8.2421, 5.6393}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {0.79479, 0.52872, 0.90005, 0.77170, 0.73220, 0.72060, 0.75433, 0.75451, 0.75989, 0.67655, 1.68525, 1.31100, 1.46573, 1.99843, 1.57293, 1.62852, 2.10636, 1,1,1,1,1,1,1}, {0.4398, 0.5823, 0.7094, 0.7043, 0.7282, 0.7041, 0.6979, 0.7762, 0.7871, 0.7469, 1.7752, 1.7443, 2.2266, 2.4767, 2.4146, 2.6040, 2.5708, 4.4488, 4.4944, 5.9630, 6.3740, 8.1097, 8.4210, 7.8027}};
|
||||
|
||||
//real channel estimation valus
|
||||
/*
|
||||
@@ -126,13 +126,9 @@ double beta2_dlsch[6][MCS_COUNT] = { {2.52163, 0.83231, 0.77472, 1.36536, 1.1682
|
||||
|
||||
*/
|
||||
|
||||
#ifdef OCP_FRAMEWORK
|
||||
#include <enums.h>
|
||||
#else
|
||||
char NB_functions[7][20]={"eNodeB_3GPP","eNodeB_3GPP_BBU","NGFI_RAU_IF4p5","NGFI_RRU_IF5","NGFI_RRU_IF4p5","gNodeB_3GPP",};
|
||||
char NB_timing[2][20]={"synch_to_ext_device","synch_to_other"};
|
||||
char ru_if_types[MAX_RU_IF_TYPES][20]={"local RF","IF5 RRU","IF5 Mobipass","IF4p5 RRU","IF1pp RRU"};
|
||||
#endif
|
||||
const char NB_functions[7][20]={"eNodeB_3GPP","eNodeB_3GPP_BBU","NGFI_RAU_IF4p5","NGFI_RRU_IF5","NGFI_RRU_IF4p5","gNodeB_3GPP",};
|
||||
const char NB_timing[2][20]={"synch_to_ext_device","synch_to_other"};
|
||||
const char ru_if_types[MAX_RU_IF_TYPES][20]={"local RF","IF5 RRU","IF5 Mobipass","IF4p5 RRU","IF1pp RRU"};
|
||||
|
||||
/// lookup table for unscrambling in RX
|
||||
int16_t unscrambling_lut[65536*16] __attribute__((aligned(32)));
|
||||
|
||||
@@ -49,8 +49,8 @@ unsigned short rev[2048],rev_times4[8192],rev_half[1024];
|
||||
unsigned short rev256[256],rev512[512],rev1024[1024],rev4096[4096],rev2048[2048],rev8192[8192];
|
||||
|
||||
|
||||
short conjugate[8]__attribute__((aligned(16))) = {-1,1,-1,1,-1,1,-1,1};
|
||||
short conjugate2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1};
|
||||
const short conjugate[8]__attribute__((aligned(16))) = {-1,1,-1,1,-1,1,-1,1};
|
||||
const short conjugate2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1};
|
||||
|
||||
|
||||
#include "SIMULATION/ETH_TRANSPORT/vars.h"
|
||||
@@ -84,29 +84,29 @@ double MI_map_16qam[3][197];
|
||||
double MI_map_64qam[3][227];
|
||||
|
||||
// here the first index is for transmission mode 1, 2, 5 and 6 whereas the second index is for the 16 sinr vaues corresponding to 16 CQIs
|
||||
double sinr_to_cqi[4][16]= { {-2.5051, -2.5051, -1.7451, -0.3655, 1.0812, 2.4012, 3.6849, 6.6754, 8.3885, 8.7970, 12.0437, 14.4709, 15.7281, 17.2424, 17.2424, 17.2424},
|
||||
const double sinr_to_cqi[4][16]= { {-2.5051, -2.5051, -1.7451, -0.3655, 1.0812, 2.4012, 3.6849, 6.6754, 8.3885, 8.7970, 12.0437, 14.4709, 15.7281, 17.2424, 17.2424, 17.2424},
|
||||
{-2.2360, -2.2360, -1.3919, -0.0218, 1.5319, 2.9574, 4.3234, 6.3387, 8.9879, 9.5096, 12.6609, 14.0116, 16.4984, 18.1572, 18.1572, 18.1572},
|
||||
{-1, -1.0000, -0.4198, -0.0140, 1.0362, 2.3520, 3.5793, 6.1136, 8.4836, 9.0858, 12.4723, 13.9128, 16.2054, 17.7392, 17.7392, 17.7392},
|
||||
{ -4.1057, -4.1057, -3.3768, -2.2916, -1.1392, 0.1236, 1.2849, 3.1933, 5.9298, 6.4052, 9.6245, 10.9414, 13.5166, 14.9545, 14.9545, 14.9545}
|
||||
};
|
||||
|
||||
//int cqi_to_mcs[16]={0, 0, 1, 3, 5, 7, 9, 13, 15, 16, 20, 23, 25, 27, 27, 27};
|
||||
int cqi_to_mcs[16]= {0, 0, 1, 2, 4, 6, 8, 11, 13, 16, 18, 20, 23, 25, 27, 28};
|
||||
const int cqi_to_mcs[16]= {0, 0, 1, 2, 4, 6, 8, 11, 13, 16, 18, 20, 23, 25, 27, 28};
|
||||
|
||||
//for SNR to MI conversion 7 th order Polynomial coeff
|
||||
double q_qam16[8]= {3.21151853033897e-10,5.55435952230651e-09,-2.30760065362117e-07,-6.25587743817859e-06,4.62251036452795e-06,0.00224150813158937,0.0393723140344367,0.245486379182639};
|
||||
double q_qpsk[8]= {1.94491167814437e-09,8.40494123817774e-08,4.75527131198034e-07,-2.48946285301621e-05,-0.000347614016158364,0.00209252225437100,0.0742986115462510,0.488297879889425};
|
||||
double q_qam64[8]= {2.25934026232206e-11,-1.45992206328306e-10,-3.70861183071900e-08,-1.22206071019319e-06,6.49115500399637e-06,0.00129828997837433,0.0259669554914859,0.166602901214898};
|
||||
const double q_qam16[8]= {3.21151853033897e-10,5.55435952230651e-09,-2.30760065362117e-07,-6.25587743817859e-06,4.62251036452795e-06,0.00224150813158937,0.0393723140344367,0.245486379182639};
|
||||
const double q_qpsk[8]= {1.94491167814437e-09,8.40494123817774e-08,4.75527131198034e-07,-2.48946285301621e-05,-0.000347614016158364,0.00209252225437100,0.0742986115462510,0.488297879889425};
|
||||
const double q_qam64[8]= {2.25934026232206e-11,-1.45992206328306e-10,-3.70861183071900e-08,-1.22206071019319e-06,6.49115500399637e-06,0.00129828997837433,0.0259669554914859,0.166602901214898};
|
||||
|
||||
//for MI to SNR conversion 7 th order Polynomial coeff
|
||||
double p_qpsk[8]= {5982.42405670359,-21568.1135917693,31293.9987036905,-23394.6795043871,9608.34750585489,-2158.15802349899,267.731968719036,-20.6145324295965};
|
||||
double p_qam16[8]= {7862.12690694170,-28510.3207048338,41542.2150287122,-31088.3036957379,12690.1982361016,-2785.66604739984,326.595462489375,-18.9911849872089};
|
||||
double p_qam64[8]= {8832.57933013696,-32119.1802555952,46914.2578990397,-35163.8150557183,14343.7419388853,-3126.61025510092,360.954930562237,-18.0358548533343};
|
||||
const double p_qpsk[8]= {5982.42405670359,-21568.1135917693,31293.9987036905,-23394.6795043871,9608.34750585489,-2158.15802349899,267.731968719036,-20.6145324295965};
|
||||
const double p_qam16[8]= {7862.12690694170,-28510.3207048338,41542.2150287122,-31088.3036957379,12690.1982361016,-2785.66604739984,326.595462489375,-18.9911849872089};
|
||||
const double p_qam64[8]= {8832.57933013696,-32119.1802555952,46914.2578990397,-35163.8150557183,14343.7419388853,-3126.61025510092,360.954930562237,-18.0358548533343};
|
||||
|
||||
// ideal CE MIESM
|
||||
|
||||
double beta1_dlsch_MI[6][MCS_COUNT] = { {1.1188, 0.3720, 0.3755, 0.9453, 0.5799, 0.5256, 0.5485, 0.5340, 0.5165, 0.5300, 0.6594, 0.5962, 0.4884, 0.4927, 0.3687, 0.4614, 0.4081, 0.2639,0.2935,0.2520,0.3709,0.2906,0.2612,0.2390}, {0.7138, 0.5533, 0.5533, 0.4828, 0.4998, 0.4843, 0.4942, 0.5323, 0.5142, 0.4756, 0.5792, 0.4167, 0.4445, 0.3942, 0.3789, 0.2756, 0.4456, 0.1650, 0.2254, 0.2353, 0.2097,0.2517,0.3242,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1},{1.808065416202085, 1.754544945430673,1.902272019362616, 1.790054645392961, 1.563204092967629, 1.585258289348813, 1.579349443720310, 1.570650121437345, 1.545055626608596, 1.362229442426877, 1.85, 1.79, 1.65, 1.54, 1.46, 1.39, 1.33, 1,1,1,1,1,1,1},{0.7146, 0.4789, 0.5392, 0.5556, 0.4975, 0.4847, 0.4691, 0.5261, 0.5278, 0.4962, 0.4468, 0.4113, 0.4622, 0.4609, 0.3946, 0.3991, 0.3532, 0.2439, 0.1898, 0.2929, 0.2712, 0.3367, 0.3591, 0.2571}};
|
||||
double beta2_dlsch_MI[6][MCS_COUNT] = { {1.1293, 0.3707, 0.3722, 0.9310, 0.5808, 0.5265, 0.5404, 0.5279, 0.5210, 0.5226, 0.6438, 0.5827, 0.4804, 0.4830, 0.3638, 0.4506, 0.4107, 0.2547, 0.2797, 0.2413, 0.3351, 0.2750, 0.2568, 0.2273}, {0.7028, 0.5503, 0.5503, 0.4815, 0.5006, 0.4764, 0.4810, 0.5124, 0.4964, 0.4485, 0.5497, 0.3971, 0.4239, 0.3701, 0.3494, 0.2630, 0.4053, 0.1505, 0.2001,0.2024,0.1788,0.2124,0.2668,1}, {1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1},{1.079518113138858, 1.105622953570353, 1.031337449900606, 1.073342032668810, 1.242636589110353, 1.255054927783647, 1.291463834317768, 1.317048698347491, 1.354485054187984, 0.338534029291017, 1.85, 1.79, 1.65, 1.54, 1.46, 1.39, 1.33,1, 1,1,1,1,1,1},{0.6980, 0.4694, 0.5379, 0.5483, 0.4982, 0.4737, 0.4611, 0.5051, 0.5020, 0.4672, 0.4357, 0.3957, 0.4389, 0.4344, 0.3645, 0.3661, 0.3301, 0.2179, 0.1730, 0.2536, 0.2389,0.2884,0.2936,0.2226}};
|
||||
const double beta1_dlsch_MI[6][MCS_COUNT] = { {1.1188, 0.3720, 0.3755, 0.9453, 0.5799, 0.5256, 0.5485, 0.5340, 0.5165, 0.5300, 0.6594, 0.5962, 0.4884, 0.4927, 0.3687, 0.4614, 0.4081, 0.2639,0.2935,0.2520,0.3709,0.2906,0.2612,0.2390}, {0.7138, 0.5533, 0.5533, 0.4828, 0.4998, 0.4843, 0.4942, 0.5323, 0.5142, 0.4756, 0.5792, 0.4167, 0.4445, 0.3942, 0.3789, 0.2756, 0.4456, 0.1650, 0.2254, 0.2353, 0.2097,0.2517,0.3242,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1},{1.808065416202085, 1.754544945430673,1.902272019362616, 1.790054645392961, 1.563204092967629, 1.585258289348813, 1.579349443720310, 1.570650121437345, 1.545055626608596, 1.362229442426877, 1.85, 1.79, 1.65, 1.54, 1.46, 1.39, 1.33, 1,1,1,1,1,1,1},{0.7146, 0.4789, 0.5392, 0.5556, 0.4975, 0.4847, 0.4691, 0.5261, 0.5278, 0.4962, 0.4468, 0.4113, 0.4622, 0.4609, 0.3946, 0.3991, 0.3532, 0.2439, 0.1898, 0.2929, 0.2712, 0.3367, 0.3591, 0.2571}};
|
||||
const double beta2_dlsch_MI[6][MCS_COUNT] = { {1.1293, 0.3707, 0.3722, 0.9310, 0.5808, 0.5265, 0.5404, 0.5279, 0.5210, 0.5226, 0.6438, 0.5827, 0.4804, 0.4830, 0.3638, 0.4506, 0.4107, 0.2547, 0.2797, 0.2413, 0.3351, 0.2750, 0.2568, 0.2273}, {0.7028, 0.5503, 0.5503, 0.4815, 0.5006, 0.4764, 0.4810, 0.5124, 0.4964, 0.4485, 0.5497, 0.3971, 0.4239, 0.3701, 0.3494, 0.2630, 0.4053, 0.1505, 0.2001,0.2024,0.1788,0.2124,0.2668,1}, {1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1},{1.079518113138858, 1.105622953570353, 1.031337449900606, 1.073342032668810, 1.242636589110353, 1.255054927783647, 1.291463834317768, 1.317048698347491, 1.354485054187984, 0.338534029291017, 1.85, 1.79, 1.65, 1.54, 1.46, 1.39, 1.33,1, 1,1,1,1,1,1},{0.6980, 0.4694, 0.5379, 0.5483, 0.4982, 0.4737, 0.4611, 0.5051, 0.5020, 0.4672, 0.4357, 0.3957, 0.4389, 0.4344, 0.3645, 0.3661, 0.3301, 0.2179, 0.1730, 0.2536, 0.2389,0.2884,0.2936,0.2226}};
|
||||
|
||||
//real CE MIESM
|
||||
/*
|
||||
@@ -116,8 +116,8 @@ double beta2_dlsch_MI[6][MCS_COUNT] = { {1.36875, 0.59304, 0.53870, 0.98239, 0.8
|
||||
//ideal channel estimation values
|
||||
//double beta1_dlsch[6][MCS_COUNT] = { {2.3814, 0.4956, 0.5273, 1.1708, 0.8014, 0.7889, 0.8111, 0.8139, 0.8124, 0.8479, 1.9280, 1.9664, 2.3857, 2.5147, 2.4511, 3.0158, 2.8643, 5.3013, 5.8594, 6.5372, 7.8073, 7.8030, 7.5295, 7.1320}, {0.5146, 0.5549, 0.7405, 0.6913, 0.7349, 0.7000, 0.7539, 0.7955, 0.8074, 0.7760, 1.8150, 1.6561, 1.9280, 2.3563, 2.6699, 2.3086, 3.1601, 4.5316, 5.2870, 6.0983, 6.5635, 7.7024, 9.9592, 6.6173}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {1.79358, 1.17908, 2.02600, 1.72040, 1.58618, 1.59039, 1.68111, 1.67062, 1.64911, 1.33274, 4.87800, 3.58797, 3.72338, 5.35700, 2.81752, 1.93472, 2.23259, 1,1,1,1,1,1,1}, {0.4445, 0.5918, 0.7118, 0.7115, 0.7284, 0.7202, 0.7117, 0.8111, 0.8239, 0.7907, 1.8456, 1.8144, 2.3830, 2.6634, 2.6129, 2.8127, 2.7372, 4.9424, 4.8763, 6.8413, 7.1493, 9.4180, 10.1230, 8.9613}};
|
||||
//double beta2_dlsch[6][MCS_COUNT] = { {2.3639, 0.4952, 0.5207, 1.1572, 0.8026, 0.7864, 0.7996, 0.8034, 0.8200, 0.8367, 1.8701, 1.9212, 2.2947, 2.4472, 2.4091, 2.9479, 2.8973, 5.0591, 5.5134, 6.1483, 7.2166, 7.5177, 7.5704, 7.2248}, {0.5113, 0.5600, 0.7359, 0.6860, 0.7344, 0.6902, 0.7315, 0.7660, 0.7817, 0.7315, 1.7268, 1.5912, 1.8519, 2.2115, 2.4580, 2.1879, 2.9015, 4.1543, 4.6986, 5.3193, 5.6319, 6.5640, 8.2421, 5.6393}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {0.79479, 0.52872, 0.90005, 0.77170, 0.73220, 0.72060, 0.75433, 0.75451, 0.75989, 0.67655, 1.68525, 1.31100, 1.46573, 1.99843, 1.57293, 1.62852, 2.10636, 1,1,1,1,1,1,1}, {0.4398, 0.5823, 0.7094, 0.7043, 0.7282, 0.7041, 0.6979, 0.7762, 0.7871, 0.7469, 1.7752, 1.7443, 2.2266, 2.4767, 2.4146, 2.6040, 2.5708, 4.4488, 4.4944, 5.9630, 6.3740, 8.1097, 8.4210, 7.8027}};
|
||||
double beta1_dlsch[6][MCS_COUNT] = { {1.199175, 1.085656, 0.983872, 0.843789, 0.816093, 0.853078, 0.899236, 0.919665, 0.888673, 0.924181, 0.814176, 0.794108, 0.770653, 0.826266, 0.982043, 0.979621, 0.985176, 0.901741, 0.870311, 0.911303, 0.898923, 1.003359, 0.988535, 1.030639, 1.151038, 1.116939, 1.214118, 1.219148}, {0.5146, 0.5549, 0.7405, 0.6913, 0.7349, 0.7000, 0.7539, 0.7955, 0.8074, 0.7760, 1.8150, 1.6561, 1.9280, 2.3563, 2.6699, 2.3086, 3.1601, 4.5316, 5.2870, 6.0983, 6.5635, 7.7024, 9.9592, 6.6173}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {1.79358, 1.17908, 2.02600, 1.72040, 1.58618, 1.59039, 1.68111, 1.67062, 1.64911, 1.33274, 4.87800, 3.58797, 3.72338, 5.35700, 2.81752, 1.93472, 2.23259, 1,1,1,1,1,1,1}, {0.4445, 0.5918, 0.7118, 0.7115, 0.7284, 0.7202, 0.7117, 0.8111, 0.8239, 0.7907, 1.8456, 1.8144, 2.3830, 2.6634, 2.6129, 2.8127, 2.7372, 4.9424, 4.8763, 6.8413, 7.1493, 9.4180, 10.1230, 8.9613}};
|
||||
double beta2_dlsch[6][MCS_COUNT] = { {0.534622, 0.596561, 0.500838, 0.471721, 0.548218, 0.547974, 0.924245, 0.836484, 0.776917, 0.879691, 0.875722, 0.666933, 0.666393, 0.755377, 1.074985, 1.080290, 1.010914, 0.790892, 0.793435, 0.860249, 0.901508, 0.967060, 0.951372, 1.011493, 1.106151, 1.117076, 1.209397, 1.227790}, {0.5113, 0.5600, 0.7359, 0.6860, 0.7344, 0.6902, 0.7315, 0.7660, 0.7817, 0.7315, 1.7268, 1.5912, 1.8519, 2.2115, 2.4580, 2.1879, 2.9015, 4.1543, 4.6986, 5.3193, 5.6319, 6.5640, 8.2421, 5.6393}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {0.79479, 0.52872, 0.90005, 0.77170, 0.73220, 0.72060, 0.75433, 0.75451, 0.75989, 0.67655, 1.68525, 1.31100, 1.46573, 1.99843, 1.57293, 1.62852, 2.10636, 1,1,1,1,1,1,1}, {0.4398, 0.5823, 0.7094, 0.7043, 0.7282, 0.7041, 0.6979, 0.7762, 0.7871, 0.7469, 1.7752, 1.7443, 2.2266, 2.4767, 2.4146, 2.6040, 2.5708, 4.4488, 4.4944, 5.9630, 6.3740, 8.1097, 8.4210, 7.8027}};
|
||||
const double beta1_dlsch[6][MCS_COUNT] = { {1.199175, 1.085656, 0.983872, 0.843789, 0.816093, 0.853078, 0.899236, 0.919665, 0.888673, 0.924181, 0.814176, 0.794108, 0.770653, 0.826266, 0.982043, 0.979621, 0.985176, 0.901741, 0.870311, 0.911303, 0.898923, 1.003359, 0.988535, 1.030639, 1.151038, 1.116939, 1.214118, 1.219148}, {0.5146, 0.5549, 0.7405, 0.6913, 0.7349, 0.7000, 0.7539, 0.7955, 0.8074, 0.7760, 1.8150, 1.6561, 1.9280, 2.3563, 2.6699, 2.3086, 3.1601, 4.5316, 5.2870, 6.0983, 6.5635, 7.7024, 9.9592, 6.6173}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {1.79358, 1.17908, 2.02600, 1.72040, 1.58618, 1.59039, 1.68111, 1.67062, 1.64911, 1.33274, 4.87800, 3.58797, 3.72338, 5.35700, 2.81752, 1.93472, 2.23259, 1,1,1,1,1,1,1}, {0.4445, 0.5918, 0.7118, 0.7115, 0.7284, 0.7202, 0.7117, 0.8111, 0.8239, 0.7907, 1.8456, 1.8144, 2.3830, 2.6634, 2.6129, 2.8127, 2.7372, 4.9424, 4.8763, 6.8413, 7.1493, 9.4180, 10.1230, 8.9613}};
|
||||
const double beta2_dlsch[6][MCS_COUNT] = { {0.534622, 0.596561, 0.500838, 0.471721, 0.548218, 0.547974, 0.924245, 0.836484, 0.776917, 0.879691, 0.875722, 0.666933, 0.666393, 0.755377, 1.074985, 1.080290, 1.010914, 0.790892, 0.793435, 0.860249, 0.901508, 0.967060, 0.951372, 1.011493, 1.106151, 1.117076, 1.209397, 1.227790}, {0.5113, 0.5600, 0.7359, 0.6860, 0.7344, 0.6902, 0.7315, 0.7660, 0.7817, 0.7315, 1.7268, 1.5912, 1.8519, 2.2115, 2.4580, 2.1879, 2.9015, 4.1543, 4.6986, 5.3193, 5.6319, 6.5640, 8.2421, 5.6393}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {0.79479, 0.52872, 0.90005, 0.77170, 0.73220, 0.72060, 0.75433, 0.75451, 0.75989, 0.67655, 1.68525, 1.31100, 1.46573, 1.99843, 1.57293, 1.62852, 2.10636, 1,1,1,1,1,1,1}, {0.4398, 0.5823, 0.7094, 0.7043, 0.7282, 0.7041, 0.6979, 0.7762, 0.7871, 0.7469, 1.7752, 1.7443, 2.2266, 2.4767, 2.4146, 2.6040, 2.5708, 4.4488, 4.4944, 5.9630, 6.3740, 8.1097, 8.4210, 7.8027}};
|
||||
|
||||
//real channel estimation valus
|
||||
/*
|
||||
@@ -126,13 +126,9 @@ double beta2_dlsch[6][MCS_COUNT] = { {2.52163, 0.83231, 0.77472, 1.36536, 1.1682
|
||||
|
||||
*/
|
||||
|
||||
#ifdef OCP_FRAMEWORK
|
||||
#include <enums.h>
|
||||
#else
|
||||
char NB_functions[7][20]={"eNodeB_3GPP","eNodeB_3GPP_BBU","NGFI_RAU_IF4p5","NGFI_RRU_IF5","NGFI_RRU_IF4p5","gNodeB_3GPP",};
|
||||
char NB_timing[2][20]={"synch_to_ext_device","synch_to_other"};
|
||||
char ru_if_types[MAX_RU_IF_TYPES][20]={"local RF","IF5 RRU","IF5 Mobipass","IF4p5 RRU","IF1pp RRU"};
|
||||
#endif
|
||||
const char NB_functions[7][20]={"eNodeB_3GPP","eNodeB_3GPP_BBU","NGFI_RAU_IF4p5","NGFI_RRU_IF5","NGFI_RRU_IF4p5","gNodeB_3GPP",};
|
||||
const char NB_timing[2][20]={"synch_to_ext_device","synch_to_other"};
|
||||
const char ru_if_types[MAX_RU_IF_TYPES][20]={"local RF","IF5 RRU","IF5 Mobipass","IF4p5 RRU","IF1pp RRU"};
|
||||
|
||||
/// lookup table for unscrambling in RX
|
||||
int16_t unscrambling_lut[65536*16] __attribute__((aligned(32)));
|
||||
|
||||
+20
-24
@@ -19,8 +19,8 @@
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#ifndef __PHY_VARS_H__
|
||||
#define __PHY_VARS_H__
|
||||
#ifndef __PHY_VARS_UE__H__
|
||||
#define __PHY_VARS_UE__H__
|
||||
|
||||
#include "PHY/types.h"
|
||||
#include "PHY/defs_UE.h"
|
||||
@@ -43,8 +43,8 @@ unsigned short rev[2048],rev_times4[8192],rev_half[1024];
|
||||
unsigned short rev256[256],rev512[512],rev1024[1024],rev4096[4096],rev2048[2048],rev8192[8192];
|
||||
|
||||
|
||||
short conjugate[8]__attribute__((aligned(16))) = {-1,1,-1,1,-1,1,-1,1};
|
||||
short conjugate2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1};
|
||||
const short conjugate[8]__attribute__((aligned(16))) = {-1,1,-1,1,-1,1,-1,1};
|
||||
const short conjugate2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1};
|
||||
|
||||
|
||||
#include "SIMULATION/ETH_TRANSPORT/vars.h"
|
||||
@@ -77,29 +77,29 @@ double MI_map_16qam[3][197];
|
||||
double MI_map_64qam[3][227];
|
||||
|
||||
// here the first index is for transmission mode 1, 2, 5 and 6 whereas the second index is for the 16 sinr vaues corresponding to 16 CQIs
|
||||
double sinr_to_cqi[4][16]= { {-2.5051, -2.5051, -1.7451, -0.3655, 1.0812, 2.4012, 3.6849, 6.6754, 8.3885, 8.7970, 12.0437, 14.4709, 15.7281, 17.2424, 17.2424, 17.2424},
|
||||
const double sinr_to_cqi[4][16]= { {-2.5051, -2.5051, -1.7451, -0.3655, 1.0812, 2.4012, 3.6849, 6.6754, 8.3885, 8.7970, 12.0437, 14.4709, 15.7281, 17.2424, 17.2424, 17.2424},
|
||||
{-2.2360, -2.2360, -1.3919, -0.0218, 1.5319, 2.9574, 4.3234, 6.3387, 8.9879, 9.5096, 12.6609, 14.0116, 16.4984, 18.1572, 18.1572, 18.1572},
|
||||
{-1, -1.0000, -0.4198, -0.0140, 1.0362, 2.3520, 3.5793, 6.1136, 8.4836, 9.0858, 12.4723, 13.9128, 16.2054, 17.7392, 17.7392, 17.7392},
|
||||
{ -4.1057, -4.1057, -3.3768, -2.2916, -1.1392, 0.1236, 1.2849, 3.1933, 5.9298, 6.4052, 9.6245, 10.9414, 13.5166, 14.9545, 14.9545, 14.9545}
|
||||
};
|
||||
|
||||
//int cqi_to_mcs[16]={0, 0, 1, 3, 5, 7, 9, 13, 15, 16, 20, 23, 25, 27, 27, 27};
|
||||
int cqi_to_mcs[16]= {0, 0, 1, 2, 4, 6, 8, 11, 13, 16, 18, 20, 23, 25, 27, 28};
|
||||
const int cqi_to_mcs[16]= {0, 0, 1, 2, 4, 6, 8, 11, 13, 16, 18, 20, 23, 25, 27, 28};
|
||||
|
||||
//for SNR to MI conversion 7 th order Polynomial coeff
|
||||
double q_qam16[8]= {3.21151853033897e-10,5.55435952230651e-09,-2.30760065362117e-07,-6.25587743817859e-06,4.62251036452795e-06,0.00224150813158937,0.0393723140344367,0.245486379182639};
|
||||
double q_qpsk[8]= {1.94491167814437e-09,8.40494123817774e-08,4.75527131198034e-07,-2.48946285301621e-05,-0.000347614016158364,0.00209252225437100,0.0742986115462510,0.488297879889425};
|
||||
double q_qam64[8]= {2.25934026232206e-11,-1.45992206328306e-10,-3.70861183071900e-08,-1.22206071019319e-06,6.49115500399637e-06,0.00129828997837433,0.0259669554914859,0.166602901214898};
|
||||
const double q_qam16[8]= {3.21151853033897e-10,5.55435952230651e-09,-2.30760065362117e-07,-6.25587743817859e-06,4.62251036452795e-06,0.00224150813158937,0.0393723140344367,0.245486379182639};
|
||||
const double q_qpsk[8]= {1.94491167814437e-09,8.40494123817774e-08,4.75527131198034e-07,-2.48946285301621e-05,-0.000347614016158364,0.00209252225437100,0.0742986115462510,0.488297879889425};
|
||||
const double q_qam64[8]= {2.25934026232206e-11,-1.45992206328306e-10,-3.70861183071900e-08,-1.22206071019319e-06,6.49115500399637e-06,0.00129828997837433,0.0259669554914859,0.166602901214898};
|
||||
|
||||
//for MI to SNR conversion 7 th order Polynomial coeff
|
||||
double p_qpsk[8]= {5982.42405670359,-21568.1135917693,31293.9987036905,-23394.6795043871,9608.34750585489,-2158.15802349899,267.731968719036,-20.6145324295965};
|
||||
double p_qam16[8]= {7862.12690694170,-28510.3207048338,41542.2150287122,-31088.3036957379,12690.1982361016,-2785.66604739984,326.595462489375,-18.9911849872089};
|
||||
double p_qam64[8]= {8832.57933013696,-32119.1802555952,46914.2578990397,-35163.8150557183,14343.7419388853,-3126.61025510092,360.954930562237,-18.0358548533343};
|
||||
const double p_qpsk[8]= {5982.42405670359,-21568.1135917693,31293.9987036905,-23394.6795043871,9608.34750585489,-2158.15802349899,267.731968719036,-20.6145324295965};
|
||||
const double p_qam16[8]= {7862.12690694170,-28510.3207048338,41542.2150287122,-31088.3036957379,12690.1982361016,-2785.66604739984,326.595462489375,-18.9911849872089};
|
||||
const double p_qam64[8]= {8832.57933013696,-32119.1802555952,46914.2578990397,-35163.8150557183,14343.7419388853,-3126.61025510092,360.954930562237,-18.0358548533343};
|
||||
|
||||
// ideal CE MIESM
|
||||
|
||||
double beta1_dlsch_MI[6][MCS_COUNT] = { {1.1188, 0.3720, 0.3755, 0.9453, 0.5799, 0.5256, 0.5485, 0.5340, 0.5165, 0.5300, 0.6594, 0.5962, 0.4884, 0.4927, 0.3687, 0.4614, 0.4081, 0.2639,0.2935,0.2520,0.3709,0.2906,0.2612,0.2390}, {0.7138, 0.5533, 0.5533, 0.4828, 0.4998, 0.4843, 0.4942, 0.5323, 0.5142, 0.4756, 0.5792, 0.4167, 0.4445, 0.3942, 0.3789, 0.2756, 0.4456, 0.1650, 0.2254, 0.2353, 0.2097,0.2517,0.3242,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1},{1.808065416202085, 1.754544945430673,1.902272019362616, 1.790054645392961, 1.563204092967629, 1.585258289348813, 1.579349443720310, 1.570650121437345, 1.545055626608596, 1.362229442426877, 1.85, 1.79, 1.65, 1.54, 1.46, 1.39, 1.33, 1,1,1,1,1,1,1},{0.7146, 0.4789, 0.5392, 0.5556, 0.4975, 0.4847, 0.4691, 0.5261, 0.5278, 0.4962, 0.4468, 0.4113, 0.4622, 0.4609, 0.3946, 0.3991, 0.3532, 0.2439, 0.1898, 0.2929, 0.2712, 0.3367, 0.3591, 0.2571}};
|
||||
double beta2_dlsch_MI[6][MCS_COUNT] = { {1.1293, 0.3707, 0.3722, 0.9310, 0.5808, 0.5265, 0.5404, 0.5279, 0.5210, 0.5226, 0.6438, 0.5827, 0.4804, 0.4830, 0.3638, 0.4506, 0.4107, 0.2547, 0.2797, 0.2413, 0.3351, 0.2750, 0.2568, 0.2273}, {0.7028, 0.5503, 0.5503, 0.4815, 0.5006, 0.4764, 0.4810, 0.5124, 0.4964, 0.4485, 0.5497, 0.3971, 0.4239, 0.3701, 0.3494, 0.2630, 0.4053, 0.1505, 0.2001,0.2024,0.1788,0.2124,0.2668,1}, {1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1},{1.079518113138858, 1.105622953570353, 1.031337449900606, 1.073342032668810, 1.242636589110353, 1.255054927783647, 1.291463834317768, 1.317048698347491, 1.354485054187984, 0.338534029291017, 1.85, 1.79, 1.65, 1.54, 1.46, 1.39, 1.33,1, 1,1,1,1,1,1},{0.6980, 0.4694, 0.5379, 0.5483, 0.4982, 0.4737, 0.4611, 0.5051, 0.5020, 0.4672, 0.4357, 0.3957, 0.4389, 0.4344, 0.3645, 0.3661, 0.3301, 0.2179, 0.1730, 0.2536, 0.2389,0.2884,0.2936,0.2226}};
|
||||
const double beta1_dlsch_MI[6][MCS_COUNT] = { {1.1188, 0.3720, 0.3755, 0.9453, 0.5799, 0.5256, 0.5485, 0.5340, 0.5165, 0.5300, 0.6594, 0.5962, 0.4884, 0.4927, 0.3687, 0.4614, 0.4081, 0.2639,0.2935,0.2520,0.3709,0.2906,0.2612,0.2390}, {0.7138, 0.5533, 0.5533, 0.4828, 0.4998, 0.4843, 0.4942, 0.5323, 0.5142, 0.4756, 0.5792, 0.4167, 0.4445, 0.3942, 0.3789, 0.2756, 0.4456, 0.1650, 0.2254, 0.2353, 0.2097,0.2517,0.3242,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1},{1.808065416202085, 1.754544945430673,1.902272019362616, 1.790054645392961, 1.563204092967629, 1.585258289348813, 1.579349443720310, 1.570650121437345, 1.545055626608596, 1.362229442426877, 1.85, 1.79, 1.65, 1.54, 1.46, 1.39, 1.33, 1,1,1,1,1,1,1},{0.7146, 0.4789, 0.5392, 0.5556, 0.4975, 0.4847, 0.4691, 0.5261, 0.5278, 0.4962, 0.4468, 0.4113, 0.4622, 0.4609, 0.3946, 0.3991, 0.3532, 0.2439, 0.1898, 0.2929, 0.2712, 0.3367, 0.3591, 0.2571}};
|
||||
const double beta2_dlsch_MI[6][MCS_COUNT] = { {1.1293, 0.3707, 0.3722, 0.9310, 0.5808, 0.5265, 0.5404, 0.5279, 0.5210, 0.5226, 0.6438, 0.5827, 0.4804, 0.4830, 0.3638, 0.4506, 0.4107, 0.2547, 0.2797, 0.2413, 0.3351, 0.2750, 0.2568, 0.2273}, {0.7028, 0.5503, 0.5503, 0.4815, 0.5006, 0.4764, 0.4810, 0.5124, 0.4964, 0.4485, 0.5497, 0.3971, 0.4239, 0.3701, 0.3494, 0.2630, 0.4053, 0.1505, 0.2001,0.2024,0.1788,0.2124,0.2668,1}, {1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1},{1.079518113138858, 1.105622953570353, 1.031337449900606, 1.073342032668810, 1.242636589110353, 1.255054927783647, 1.291463834317768, 1.317048698347491, 1.354485054187984, 0.338534029291017, 1.85, 1.79, 1.65, 1.54, 1.46, 1.39, 1.33,1, 1,1,1,1,1,1},{0.6980, 0.4694, 0.5379, 0.5483, 0.4982, 0.4737, 0.4611, 0.5051, 0.5020, 0.4672, 0.4357, 0.3957, 0.4389, 0.4344, 0.3645, 0.3661, 0.3301, 0.2179, 0.1730, 0.2536, 0.2389,0.2884,0.2936,0.2226}};
|
||||
|
||||
//real CE MIESM
|
||||
/*
|
||||
@@ -109,8 +109,8 @@ double beta2_dlsch_MI[6][MCS_COUNT] = { {1.36875, 0.59304, 0.53870, 0.98239, 0.8
|
||||
//ideal channel estimation values
|
||||
//double beta1_dlsch[6][MCS_COUNT] = { {2.3814, 0.4956, 0.5273, 1.1708, 0.8014, 0.7889, 0.8111, 0.8139, 0.8124, 0.8479, 1.9280, 1.9664, 2.3857, 2.5147, 2.4511, 3.0158, 2.8643, 5.3013, 5.8594, 6.5372, 7.8073, 7.8030, 7.5295, 7.1320}, {0.5146, 0.5549, 0.7405, 0.6913, 0.7349, 0.7000, 0.7539, 0.7955, 0.8074, 0.7760, 1.8150, 1.6561, 1.9280, 2.3563, 2.6699, 2.3086, 3.1601, 4.5316, 5.2870, 6.0983, 6.5635, 7.7024, 9.9592, 6.6173}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {1.79358, 1.17908, 2.02600, 1.72040, 1.58618, 1.59039, 1.68111, 1.67062, 1.64911, 1.33274, 4.87800, 3.58797, 3.72338, 5.35700, 2.81752, 1.93472, 2.23259, 1,1,1,1,1,1,1}, {0.4445, 0.5918, 0.7118, 0.7115, 0.7284, 0.7202, 0.7117, 0.8111, 0.8239, 0.7907, 1.8456, 1.8144, 2.3830, 2.6634, 2.6129, 2.8127, 2.7372, 4.9424, 4.8763, 6.8413, 7.1493, 9.4180, 10.1230, 8.9613}};
|
||||
//double beta2_dlsch[6][MCS_COUNT] = { {2.3639, 0.4952, 0.5207, 1.1572, 0.8026, 0.7864, 0.7996, 0.8034, 0.8200, 0.8367, 1.8701, 1.9212, 2.2947, 2.4472, 2.4091, 2.9479, 2.8973, 5.0591, 5.5134, 6.1483, 7.2166, 7.5177, 7.5704, 7.2248}, {0.5113, 0.5600, 0.7359, 0.6860, 0.7344, 0.6902, 0.7315, 0.7660, 0.7817, 0.7315, 1.7268, 1.5912, 1.8519, 2.2115, 2.4580, 2.1879, 2.9015, 4.1543, 4.6986, 5.3193, 5.6319, 6.5640, 8.2421, 5.6393}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {0.79479, 0.52872, 0.90005, 0.77170, 0.73220, 0.72060, 0.75433, 0.75451, 0.75989, 0.67655, 1.68525, 1.31100, 1.46573, 1.99843, 1.57293, 1.62852, 2.10636, 1,1,1,1,1,1,1}, {0.4398, 0.5823, 0.7094, 0.7043, 0.7282, 0.7041, 0.6979, 0.7762, 0.7871, 0.7469, 1.7752, 1.7443, 2.2266, 2.4767, 2.4146, 2.6040, 2.5708, 4.4488, 4.4944, 5.9630, 6.3740, 8.1097, 8.4210, 7.8027}};
|
||||
double beta1_dlsch[6][MCS_COUNT] = { {1.199175, 1.085656, 0.983872, 0.843789, 0.816093, 0.853078, 0.899236, 0.919665, 0.888673, 0.924181, 0.814176, 0.794108, 0.770653, 0.826266, 0.982043, 0.979621, 0.985176, 0.901741, 0.870311, 0.911303, 0.898923, 1.003359, 0.988535, 1.030639, 1.151038, 1.116939, 1.214118, 1.219148}, {0.5146, 0.5549, 0.7405, 0.6913, 0.7349, 0.7000, 0.7539, 0.7955, 0.8074, 0.7760, 1.8150, 1.6561, 1.9280, 2.3563, 2.6699, 2.3086, 3.1601, 4.5316, 5.2870, 6.0983, 6.5635, 7.7024, 9.9592, 6.6173}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {1.79358, 1.17908, 2.02600, 1.72040, 1.58618, 1.59039, 1.68111, 1.67062, 1.64911, 1.33274, 4.87800, 3.58797, 3.72338, 5.35700, 2.81752, 1.93472, 2.23259, 1,1,1,1,1,1,1}, {0.4445, 0.5918, 0.7118, 0.7115, 0.7284, 0.7202, 0.7117, 0.8111, 0.8239, 0.7907, 1.8456, 1.8144, 2.3830, 2.6634, 2.6129, 2.8127, 2.7372, 4.9424, 4.8763, 6.8413, 7.1493, 9.4180, 10.1230, 8.9613}};
|
||||
double beta2_dlsch[6][MCS_COUNT] = { {0.534622, 0.596561, 0.500838, 0.471721, 0.548218, 0.547974, 0.924245, 0.836484, 0.776917, 0.879691, 0.875722, 0.666933, 0.666393, 0.755377, 1.074985, 1.080290, 1.010914, 0.790892, 0.793435, 0.860249, 0.901508, 0.967060, 0.951372, 1.011493, 1.106151, 1.117076, 1.209397, 1.227790}, {0.5113, 0.5600, 0.7359, 0.6860, 0.7344, 0.6902, 0.7315, 0.7660, 0.7817, 0.7315, 1.7268, 1.5912, 1.8519, 2.2115, 2.4580, 2.1879, 2.9015, 4.1543, 4.6986, 5.3193, 5.6319, 6.5640, 8.2421, 5.6393}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {0.79479, 0.52872, 0.90005, 0.77170, 0.73220, 0.72060, 0.75433, 0.75451, 0.75989, 0.67655, 1.68525, 1.31100, 1.46573, 1.99843, 1.57293, 1.62852, 2.10636, 1,1,1,1,1,1,1}, {0.4398, 0.5823, 0.7094, 0.7043, 0.7282, 0.7041, 0.6979, 0.7762, 0.7871, 0.7469, 1.7752, 1.7443, 2.2266, 2.4767, 2.4146, 2.6040, 2.5708, 4.4488, 4.4944, 5.9630, 6.3740, 8.1097, 8.4210, 7.8027}};
|
||||
const double beta1_dlsch[6][MCS_COUNT] = { {1.199175, 1.085656, 0.983872, 0.843789, 0.816093, 0.853078, 0.899236, 0.919665, 0.888673, 0.924181, 0.814176, 0.794108, 0.770653, 0.826266, 0.982043, 0.979621, 0.985176, 0.901741, 0.870311, 0.911303, 0.898923, 1.003359, 0.988535, 1.030639, 1.151038, 1.116939, 1.214118, 1.219148}, {0.5146, 0.5549, 0.7405, 0.6913, 0.7349, 0.7000, 0.7539, 0.7955, 0.8074, 0.7760, 1.8150, 1.6561, 1.9280, 2.3563, 2.6699, 2.3086, 3.1601, 4.5316, 5.2870, 6.0983, 6.5635, 7.7024, 9.9592, 6.6173}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {1.79358, 1.17908, 2.02600, 1.72040, 1.58618, 1.59039, 1.68111, 1.67062, 1.64911, 1.33274, 4.87800, 3.58797, 3.72338, 5.35700, 2.81752, 1.93472, 2.23259, 1,1,1,1,1,1,1}, {0.4445, 0.5918, 0.7118, 0.7115, 0.7284, 0.7202, 0.7117, 0.8111, 0.8239, 0.7907, 1.8456, 1.8144, 2.3830, 2.6634, 2.6129, 2.8127, 2.7372, 4.9424, 4.8763, 6.8413, 7.1493, 9.4180, 10.1230, 8.9613}};
|
||||
const double beta2_dlsch[6][MCS_COUNT] = { {0.534622, 0.596561, 0.500838, 0.471721, 0.548218, 0.547974, 0.924245, 0.836484, 0.776917, 0.879691, 0.875722, 0.666933, 0.666393, 0.755377, 1.074985, 1.080290, 1.010914, 0.790892, 0.793435, 0.860249, 0.901508, 0.967060, 0.951372, 1.011493, 1.106151, 1.117076, 1.209397, 1.227790}, {0.5113, 0.5600, 0.7359, 0.6860, 0.7344, 0.6902, 0.7315, 0.7660, 0.7817, 0.7315, 1.7268, 1.5912, 1.8519, 2.2115, 2.4580, 2.1879, 2.9015, 4.1543, 4.6986, 5.3193, 5.6319, 6.5640, 8.2421, 5.6393}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {0.79479, 0.52872, 0.90005, 0.77170, 0.73220, 0.72060, 0.75433, 0.75451, 0.75989, 0.67655, 1.68525, 1.31100, 1.46573, 1.99843, 1.57293, 1.62852, 2.10636, 1,1,1,1,1,1,1}, {0.4398, 0.5823, 0.7094, 0.7043, 0.7282, 0.7041, 0.6979, 0.7762, 0.7871, 0.7469, 1.7752, 1.7443, 2.2266, 2.4767, 2.4146, 2.6040, 2.5708, 4.4488, 4.4944, 5.9630, 6.3740, 8.1097, 8.4210, 7.8027}};
|
||||
|
||||
//real channel estimation valus
|
||||
/*
|
||||
@@ -119,13 +119,9 @@ double beta2_dlsch[6][MCS_COUNT] = { {2.52163, 0.83231, 0.77472, 1.36536, 1.1682
|
||||
|
||||
*/
|
||||
|
||||
#ifdef OCP_FRAMEWORK
|
||||
#include <enums.h>
|
||||
#else
|
||||
char NB_functions[7][20]={"eNodeB_3GPP","eNodeB_3GPP_BBU","NGFI_RAU_IF4p5","NGFI_RRU_IF5","NGFI_RRU_IF4p5","gNodeB_3GPP",};
|
||||
char NB_timing[2][20]={"synch_to_ext_device","synch_to_other"};
|
||||
char ru_if_types[MAX_RU_IF_TYPES][20]={"local RF","IF5 RRU","IF5 Mobipass","IF4p5 RRU","IF1pp RRU"};
|
||||
#endif
|
||||
const char NB_functions[7][20]={"eNodeB_3GPP","eNodeB_3GPP_BBU","NGFI_RAU_IF4p5","NGFI_RRU_IF5","NGFI_RRU_IF4p5","gNodeB_3GPP",};
|
||||
const char NB_timing[2][20]={"synch_to_ext_device","synch_to_other"};
|
||||
const char ru_if_types[MAX_RU_IF_TYPES][20]={"local RF","IF5 RRU","IF5 Mobipass","IF4p5 RRU","IF1pp RRU"};
|
||||
|
||||
/// lookup table for unscrambling in RX
|
||||
int16_t unscrambling_lut[65536*16] __attribute__((aligned(32)));
|
||||
@@ -133,4 +129,4 @@ int16_t unscrambling_lut[65536*16] __attribute__((aligned(32)));
|
||||
uint8_t scrambling_lut[65536*16] __attribute__((aligned(32)));
|
||||
|
||||
uint8_t max_turbo_iterations=4;
|
||||
#endif /*__PHY_VARS_H__ */
|
||||
#endif /* __PHY_VARS_UE__H__ */
|
||||
|
||||
@@ -1419,7 +1419,7 @@ void fill_rx_indication(PHY_VARS_eNB *eNB,
|
||||
pdu->rx_indication_rel8.offset = 1; // DJP - I dont understand - but broken unless 1 ???? 0; // filled in at the end of the UL_INFO formation
|
||||
pdu->data = eNB->ulsch[UE_id]->harq_processes[harq_pid]->decodedBytes;
|
||||
// estimate timing advance for MAC
|
||||
sync_pos = lte_est_timing_advance_pusch(eNB,UE_id);
|
||||
sync_pos = lte_est_timing_advance_pusch(&eNB->frame_parms, eNB->pusch_vars[UE_id]->drs_ch_estimates_time);
|
||||
timing_advance_update = sync_pos; // - eNB->frame_parms.nb_prefix_samples/4; //to check
|
||||
|
||||
// if (timing_advance_update > 10) { dump_ulsch(eNB,frame,subframe,UE_id); exit(-1);}
|
||||
|
||||
@@ -693,12 +693,6 @@ void ru_fep_full_2thread(RU_t *ru,
|
||||
3/(fp->symbols_per_tti/2),// Ns = slot number
|
||||
fp);
|
||||
|
||||
/*lte_ul_channel_estimation((PHY_VARS_eNB *)NULL,
|
||||
proc,
|
||||
ru->idx,
|
||||
3%(fp->symbols_per_tti/2),
|
||||
3/(fp->symbols_per_tti/2));
|
||||
*/
|
||||
lte_ul_channel_estimation_RRU(fp,
|
||||
calibration->drs_ch_estimates,
|
||||
calibration->drs_ch_estimates_time,
|
||||
@@ -713,7 +707,7 @@ void ru_fep_full_2thread(RU_t *ru,
|
||||
0,//interpolate,
|
||||
0 /*eNB->ulsch[ru->idx]->rnti rnti or ru->ulsch[eNB_id]->rnti*/);
|
||||
|
||||
check_sync_pos = lte_est_timing_advance_pusch((PHY_VARS_eNB *)NULL, ru->idx);
|
||||
check_sync_pos = lte_est_timing_advance_pusch(ru->frame_parms, ru->calibration.drs_ch_estimates_time);
|
||||
if (ru->state == RU_CHECK_SYNC) {
|
||||
if ((check_sync_pos >= 0 && check_sync_pos<8) || (check_sync_pos < 0 && check_sync_pos>-8)) {
|
||||
LOG_I(PHY,"~~~~~~~~~~~ check_sync_pos %d, frame %d, cnt %d\n",check_sync_pos,proc->frame_rx,ru->wait_check);
|
||||
|
||||
@@ -116,7 +116,6 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){
|
||||
if (scheduled_response->ul_config != NULL){
|
||||
|
||||
fapi_nr_ul_config_request_t *ul_config = scheduled_response->ul_config;
|
||||
|
||||
for (i = 0; i < ul_config->number_pdus; ++i){
|
||||
|
||||
uint8_t pdu_type = ul_config->ul_config_list[i].pdu_type, pucch_resource_id, current_harq_pid, format, gNB_id = 0;
|
||||
@@ -124,7 +123,7 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){
|
||||
NR_PRACH_RESOURCES_t *prach_resources;
|
||||
fapi_nr_ul_config_prach_pdu *prach_config_pdu;
|
||||
/* PUSCH */
|
||||
fapi_nr_ul_config_pusch_pdu_rel15_t *pusch_config_pdu;
|
||||
nfapi_nr_ue_pusch_pdu_t *pusch_config_pdu;
|
||||
/* PUCCH */
|
||||
fapi_nr_ul_config_pucch_pdu *pucch_config_pdu;
|
||||
PUCCH_ConfigCommon_nr_t *pucch_config_common_nr;
|
||||
@@ -135,16 +134,12 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){
|
||||
|
||||
case (FAPI_NR_UL_CONFIG_TYPE_PUSCH):
|
||||
// pusch config pdu
|
||||
pusch_config_pdu = &ul_config->ul_config_list[i].ulsch_config_pdu.ulsch_pdu_rel15;
|
||||
current_harq_pid = pusch_config_pdu->harq_process_nbr;
|
||||
ulsch0->harq_processes[current_harq_pid]->nb_rb = pusch_config_pdu->number_rbs;
|
||||
ulsch0->harq_processes[current_harq_pid]->first_rb = pusch_config_pdu->start_rb;
|
||||
ulsch0->harq_processes[current_harq_pid]->number_of_symbols = pusch_config_pdu->number_symbols;
|
||||
ulsch0->harq_processes[current_harq_pid]->start_symbol = pusch_config_pdu->start_symbol;
|
||||
ulsch0->harq_processes[current_harq_pid]->mcs = pusch_config_pdu->mcs;
|
||||
ulsch0->harq_processes[current_harq_pid]->DCINdi = pusch_config_pdu->ndi;
|
||||
ulsch0->harq_processes[current_harq_pid]->rvidx = pusch_config_pdu->rv;
|
||||
ulsch0->harq_processes[current_harq_pid]->Nl = pusch_config_pdu->n_layers;
|
||||
pusch_config_pdu = &ul_config->ul_config_list[i].pusch_config_pdu;
|
||||
current_harq_pid = pusch_config_pdu->pusch_data.harq_process_id;
|
||||
nfapi_nr_ue_pusch_pdu_t *pusch_pdu = &ulsch0->harq_processes[current_harq_pid]->pusch_pdu;
|
||||
|
||||
memcpy(pusch_pdu, pusch_config_pdu, sizeof(nfapi_nr_ue_pusch_pdu_t));
|
||||
|
||||
ulsch0->f_pusch = pusch_config_pdu->absolute_delta_PUSCH;
|
||||
break;
|
||||
|
||||
@@ -216,6 +211,8 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
int8_t nr_ue_phy_config_request(nr_phy_config_t *phy_config){
|
||||
|
||||
fapi_nr_config_request_t *nrUE_config = &PHY_vars_UE_g[phy_config->Mod_id][phy_config->CC_id]->nrUE_config;
|
||||
|
||||
@@ -296,7 +296,7 @@ harq_result_t uplink_harq_process(NR_UE_ULSCH_t *ulsch, int harq_pid, int ndi, u
|
||||
/* 38.321 5.4.2.1 2> if the uplink grant was received on PDCCH for the C-RNTI and the HARQ buffer of the identified process is empty */
|
||||
if ((ulsch->harq_processes[harq_pid]->first_tx == 1) && (rnti_type == _C_RNTI_)) { /* no transmission yet on this process so consider its harq buffer as empty */
|
||||
ulsch->harq_processes[harq_pid]->first_tx = 0;
|
||||
ulsch->harq_processes[harq_pid]->DCINdi = ndi; /* store first value of ndi */
|
||||
ulsch->harq_processes[harq_pid]->pusch_pdu.pusch_data.new_data_indicator = ndi; /* store first value of ndi */
|
||||
ulsch->harq_processes[harq_pid]->round = 0;
|
||||
ulsch->harq_processes[harq_pid]->subframe_scheduling_flag = 1;
|
||||
|
||||
@@ -306,8 +306,8 @@ harq_result_t uplink_harq_process(NR_UE_ULSCH_t *ulsch, int harq_pid, int ndi, u
|
||||
}
|
||||
/* 38.321 5.4.2.1 2> if the received grant was not addressed to a Temporary C-RNTI on PDCCH, and the NDI provided in the associated HARQ */
|
||||
/* information has been toggled compared to the value in the previous transmission of this TB of this HARQ process */
|
||||
else if ((ulsch->harq_processes[harq_pid]->DCINdi != ndi) && (rnti_type != _TC_RNTI_)) { /* is ndi toogled so this is a new grant ? */
|
||||
ulsch->harq_processes[harq_pid]->DCINdi = ndi; /* store first value of ndi */
|
||||
else if ((ulsch->harq_processes[harq_pid]->pusch_pdu.pusch_data.new_data_indicator != ndi) && (rnti_type != _TC_RNTI_)) { /* is ndi toogled so this is a new grant ? */
|
||||
ulsch->harq_processes[harq_pid]->pusch_pdu.pusch_data.new_data_indicator = ndi; /* store first value of ndi */
|
||||
ulsch->harq_processes[harq_pid]->round = 0;
|
||||
ulsch->harq_processes[harq_pid]->subframe_scheduling_flag = 1;
|
||||
|
||||
@@ -317,7 +317,7 @@ harq_result_t uplink_harq_process(NR_UE_ULSCH_t *ulsch, int harq_pid, int ndi, u
|
||||
}
|
||||
/* 38.321 5.4.2.1 2> else (i.e. retransmission): */
|
||||
else {
|
||||
ulsch->harq_processes[harq_pid]->DCINdi = ndi; /* ndi has not toggled si this is a retransmission */
|
||||
ulsch->harq_processes[harq_pid]->pusch_pdu.pusch_data.new_data_indicator = ndi; /* ndi has not toggled si this is a retransmission */
|
||||
ulsch->harq_processes[harq_pid]->round++; /* increment number of retransmission */
|
||||
|
||||
result_harq = RETRANSMISSION_HARQ;
|
||||
|
||||
@@ -88,17 +88,6 @@ char nr_mode_string[4][20] = {"NOT SYNCHED","PRACH","RAR","PUSCH"};
|
||||
|
||||
extern double cpuf;
|
||||
|
||||
|
||||
|
||||
int32_t nr_rx_pdcch(PHY_VARS_NR_UE *ue,
|
||||
uint32_t frame,
|
||||
uint32_t slot);
|
||||
|
||||
uint8_t nr_dci_decoding_procedure(PHY_VARS_NR_UE *ue,
|
||||
int frame,
|
||||
int nr_tti_rx,
|
||||
fapi_nr_dci_indication_t *dci_ind);
|
||||
|
||||
/*
|
||||
int nr_generate_ue_ul_dlsch_params_from_dci(PHY_VARS_NR_UE *ue,
|
||||
uint8_t eNB_id,
|
||||
|
||||
@@ -28,8 +28,9 @@
|
||||
* \email: lionel.gauthier@eurecom.fr
|
||||
*/
|
||||
|
||||
#ifndef __SOCKET_H__
|
||||
# define __SOCKET_H__
|
||||
#ifndef __SIMULATION_ETH_TRANSPORT_SOCKET__H__
|
||||
#define __SIMULATION_ETH_TRANSPORT_SOCKET__H__
|
||||
|
||||
# ifdef SOCKET_C
|
||||
# define private_socket(x) x
|
||||
# define public_socket(x) x
|
||||
|
||||
@@ -897,7 +897,7 @@ int main(int argc, char **argv)
|
||||
|
||||
if (errors_scrambling > 0) {
|
||||
if (n_trials == 1)
|
||||
printf("errors_scrambling = %d/%d (trial %d)\n", errors_scrambling, available_bits,trial);
|
||||
printf("errors_scrambling = %u/%u (trial %d)\n", errors_scrambling, available_bits,trial);
|
||||
}
|
||||
|
||||
if (errors_bit > 0) {
|
||||
@@ -1019,6 +1019,8 @@ int main(int argc, char **argv)
|
||||
if (input_fd)
|
||||
fclose(input_fd);
|
||||
|
||||
if (scg_fd)
|
||||
fclose(scg_fd);
|
||||
return(n_errors);
|
||||
|
||||
}
|
||||
|
||||
@@ -173,21 +173,27 @@ int main(int argc, char **argv){
|
||||
|
||||
case 'H':
|
||||
channel_model=Rayleigh8;
|
||||
break;
|
||||
|
||||
case 'I':
|
||||
channel_model=Rayleigh1;
|
||||
break;
|
||||
|
||||
case 'J':
|
||||
channel_model=Rayleigh1_corr;
|
||||
break;
|
||||
|
||||
case 'K':
|
||||
channel_model=Rayleigh1_anticorr;
|
||||
break;
|
||||
|
||||
case 'L':
|
||||
channel_model=Rice8;
|
||||
break;
|
||||
|
||||
case 'M':
|
||||
channel_model=Rice1;
|
||||
break;
|
||||
|
||||
case 'N':
|
||||
channel_model=Rayleigh1_800;
|
||||
@@ -721,11 +727,13 @@ int main(int argc, char **argv){
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
printf("SNR %f dB, UE Speed %f km/h: errors %d/%d (delay %f)\n", SNR, ue_speed, prach_errors, n_frames, delay_avg/(double)(n_frames-prach_errors));
|
||||
if (input_fd)
|
||||
break;
|
||||
if (prach_errors)
|
||||
break;
|
||||
|
||||
} // UE Speed loop
|
||||
if (!prach_errors) {
|
||||
printf("PRACH test OK\n");
|
||||
|
||||
@@ -465,7 +465,7 @@ int main(int argc, char **argv)
|
||||
mcs=table1_mcs[actual_payload];
|
||||
else if(nr_bit==2)
|
||||
mcs=table2_mcs[actual_payload];
|
||||
else AssertFatal(1==0,"Either nr_bit %d or sr_flag %d must be non-zero\n");
|
||||
else AssertFatal(1==0,"Either nr_bit %d or sr_flag %d must be non-zero\n", nr_bit, sr_flag);
|
||||
}
|
||||
|
||||
for(SNR=snr0;SNR<=snr1;SNR=SNR+1){
|
||||
|
||||
@@ -402,7 +402,6 @@ int main(int argc, char **argv)
|
||||
rel15_ul->mcs_index = Imcs;
|
||||
rel15_ul->pusch_data.rv_index = rvidx;
|
||||
rel15_ul->nrOfLayers = Nl;
|
||||
//rel15_ul->length_dmrs = length_dmrs;
|
||||
rel15_ul->target_code_rate = code_rate;
|
||||
rel15_ul->pusch_data.tb_size = TBS>>3;
|
||||
///////////////////////////////////////////////////
|
||||
@@ -424,15 +423,6 @@ int main(int argc, char **argv)
|
||||
for (i = 0; i < TBS / 8; i++)
|
||||
test_input[i] = (unsigned char) rand();
|
||||
|
||||
|
||||
/////////////////////////[adk] preparing NR_UE_ULSCH_t parameters///////////////////////// A HOT FIX until creating nfapi_nr_ul_config_ulsch_pdu_rel15_t
|
||||
///////////
|
||||
ulsch_ue->nb_re_dmrs = nb_re_dmrs;
|
||||
ulsch_ue->length_dmrs = length_dmrs;
|
||||
ulsch_ue->rnti = n_rnti;
|
||||
///////////
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/////////////////////////[adk] preparing UL harq_process parameters/////////////////////////
|
||||
///////////
|
||||
NR_UL_UE_HARQ_t *harq_process_ul_ue = ulsch_ue->harq_processes[harq_pid];
|
||||
@@ -442,13 +432,14 @@ int main(int argc, char **argv)
|
||||
|
||||
if (harq_process_ul_ue) {
|
||||
|
||||
harq_process_ul_ue->mcs = Imcs;
|
||||
harq_process_ul_ue->Nl = Nl;
|
||||
harq_process_ul_ue->nb_rb = nb_rb;
|
||||
harq_process_ul_ue->number_of_symbols = nb_symb_sch;
|
||||
harq_process_ul_ue->pusch_pdu.rnti = n_rnti;
|
||||
harq_process_ul_ue->pusch_pdu.mcs_index = Imcs;
|
||||
harq_process_ul_ue->pusch_pdu.nrOfLayers = Nl;
|
||||
harq_process_ul_ue->pusch_pdu.rb_size = nb_rb;
|
||||
harq_process_ul_ue->pusch_pdu.nr_of_symbols = nb_symb_sch;
|
||||
harq_process_ul_ue->num_of_mod_symbols = N_RE_prime*nb_rb*nb_codewords;
|
||||
harq_process_ul_ue->rvidx = rvidx;
|
||||
harq_process_ul_ue->TBS = TBS;
|
||||
harq_process_ul_ue->pusch_pdu.pusch_data.rv_index = rvidx;
|
||||
harq_process_ul_ue->pusch_pdu.pusch_data.tb_size = TBS;
|
||||
harq_process_ul_ue->a = &test_input[0];
|
||||
|
||||
}
|
||||
@@ -461,9 +452,10 @@ int main(int argc, char **argv)
|
||||
|
||||
/////////////////////////ULSCH coding/////////////////////////
|
||||
///////////
|
||||
unsigned int G = nr_get_G(nb_rb, nb_symb_sch, nb_re_dmrs, length_dmrs, mod_order, Nl);
|
||||
|
||||
if (input_fd == NULL) {
|
||||
nr_ulsch_encoding(ulsch_ue, frame_parms, harq_pid);
|
||||
nr_ulsch_encoding(ulsch_ue, frame_parms, harq_pid, G);
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
|
||||
@@ -133,7 +133,7 @@ int main(int argc, char **argv)
|
||||
int loglvl = OAILOG_WARNING;
|
||||
uint64_t SSB_positions=0x01;
|
||||
uint16_t nb_symb_sch = 12;
|
||||
int start_symbol = 0;
|
||||
int start_symbol = 2;
|
||||
uint16_t nb_rb = 50;
|
||||
uint8_t Imcs = 9;
|
||||
uint8_t precod_nbr_layers = 1;
|
||||
@@ -548,17 +548,31 @@ int main(int argc, char **argv)
|
||||
uint16_t number_dmrs_symbols = 1;
|
||||
unsigned int available_bits;
|
||||
|
||||
uint8_t nb_re_dmrs=12; // no PUSCH REs
|
||||
uint8_t length_dmrs = 1;
|
||||
uint8_t nb_re_dmrs;
|
||||
unsigned char mod_order;
|
||||
uint16_t code_rate;
|
||||
uint8_t ptrs_mcs1 = 2;
|
||||
uint8_t ptrs_mcs2 = 4;
|
||||
uint8_t ptrs_mcs3 = 10;
|
||||
uint16_t n_rb0 = 25;
|
||||
uint16_t n_rb1 = 75;
|
||||
uint8_t mcs_table = 0;
|
||||
uint16_t pdu_bit_map = PUSCH_PDU_BITMAP_PUSCH_DATA; // | PUSCH_PDU_BITMAP_PUSCH_PTRS;
|
||||
|
||||
uint8_t length_dmrs = pusch_len1; // [hna] remove dmrs struct
|
||||
uint16_t l_prime_mask = get_l_prime(nb_symb_sch, typeB, pusch_dmrs_pos0, length_dmrs); // [hna] remove dmrs struct
|
||||
uint8_t ptrs_time_density = get_L_ptrs(ptrs_mcs1, ptrs_mcs2, ptrs_mcs3, Imcs, mcs_table);
|
||||
uint8_t ptrs_freq_density = get_K_ptrs(n_rb0, n_rb1, nb_rb);
|
||||
|
||||
if(1<<ptrs_time_density >= nb_symb_sch)
|
||||
pdu_bit_map &= ~PUSCH_PDU_BITMAP_PUSCH_PTRS; // disable PUSCH PTRS
|
||||
|
||||
for (i = 0; i < nb_symb_sch; i++) {
|
||||
number_dmrs_symbols += (l_prime_mask >> i) & 0x01;
|
||||
}
|
||||
|
||||
mod_order = nr_get_Qm_ul(Imcs, 0);
|
||||
|
||||
code_rate = nr_get_code_rate_ul(Imcs, 0);
|
||||
available_bits = nr_get_G(nb_rb, nb_symb_sch, nb_re_dmrs, length_dmrs, mod_order, 1);
|
||||
TBS = nr_compute_tbs(mod_order, code_rate, nb_rb, nb_symb_sch, nb_re_dmrs*length_dmrs, 0, 0, precod_nbr_layers);
|
||||
|
||||
printf("\n");
|
||||
|
||||
@@ -622,16 +636,16 @@ int main(int argc, char **argv)
|
||||
pusch_pdu->bwp_size = abwp_size;
|
||||
}
|
||||
|
||||
pusch_pdu->pdu_bit_map = PUSCH_PDU_BITMAP_PUSCH_DATA;
|
||||
pusch_pdu->pdu_bit_map = pdu_bit_map;
|
||||
pusch_pdu->rnti = n_rnti;
|
||||
pusch_pdu->mcs_index = Imcs;
|
||||
pusch_pdu->mcs_table = 0;
|
||||
pusch_pdu->mcs_table = mcs_table;
|
||||
pusch_pdu->target_code_rate = code_rate;
|
||||
pusch_pdu->qam_mod_order = mod_order;
|
||||
pusch_pdu->transform_precoding = 1;
|
||||
pusch_pdu->data_scrambling_id = *scc->physCellId;
|
||||
pusch_pdu->nrOfLayers = 1;
|
||||
pusch_pdu->ul_dmrs_symb_pos = (1<<start_symbol);
|
||||
pusch_pdu->ul_dmrs_symb_pos = l_prime_mask << start_symbol;
|
||||
pusch_pdu->dmrs_config_type = 0;
|
||||
pusch_pdu->ul_dmrs_scrambling_id = *scc->physCellId;
|
||||
pusch_pdu->scid = 0;
|
||||
@@ -648,8 +662,11 @@ int main(int argc, char **argv)
|
||||
pusch_pdu->pusch_data.rv_index = 0;
|
||||
pusch_pdu->pusch_data.harq_process_id = 0;
|
||||
pusch_pdu->pusch_data.new_data_indicator = 0;
|
||||
pusch_pdu->pusch_data.tb_size = TBS>>3;
|
||||
pusch_pdu->pusch_data.num_cb = 0;
|
||||
pusch_pdu->pusch_ptrs.ptrs_time_density = ptrs_time_density;
|
||||
pusch_pdu->pusch_ptrs.ptrs_freq_density = ptrs_freq_density;
|
||||
pusch_pdu->pusch_ptrs.ptrs_ports_list = (nfapi_nr_ptrs_ports_t *) malloc(2*sizeof(nfapi_nr_ptrs_ports_t));
|
||||
pusch_pdu->pusch_ptrs.ptrs_ports_list[0].ptrs_re_offset = 0;
|
||||
|
||||
// prepare ULSCH/PUSCH reception
|
||||
nr_schedule_response(Sched_INFO);
|
||||
@@ -667,47 +684,62 @@ int main(int argc, char **argv)
|
||||
ul_config.slot = slot;
|
||||
ul_config.number_pdus = 1;
|
||||
ul_config.ul_config_list[0].pdu_type = FAPI_NR_UL_CONFIG_TYPE_PUSCH;
|
||||
ul_config.ul_config_list[0].ulsch_config_pdu.rnti = n_rnti;
|
||||
ul_config.ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.number_rbs = nb_rb;
|
||||
ul_config.ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.start_rb = start_rb;
|
||||
ul_config.ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.number_symbols = nb_symb_sch;
|
||||
ul_config.ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.start_symbol = start_symbol;
|
||||
ul_config.ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.mcs = Imcs;
|
||||
ul_config.ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.ndi = 0;
|
||||
ul_config.ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.rv = 0;
|
||||
ul_config.ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.n_layers = precod_nbr_layers;
|
||||
ul_config.ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.harq_process_nbr = harq_pid;
|
||||
ul_config.ul_config_list[0].pusch_config_pdu.rnti = n_rnti;
|
||||
ul_config.ul_config_list[0].pusch_config_pdu.pdu_bit_map = pdu_bit_map;
|
||||
ul_config.ul_config_list[0].pusch_config_pdu.rb_size = nb_rb;
|
||||
ul_config.ul_config_list[0].pusch_config_pdu.rb_start = start_rb;
|
||||
ul_config.ul_config_list[0].pusch_config_pdu.nr_of_symbols = nb_symb_sch;
|
||||
ul_config.ul_config_list[0].pusch_config_pdu.start_symbol_index = start_symbol;
|
||||
ul_config.ul_config_list[0].pusch_config_pdu.ul_dmrs_symb_pos = l_prime_mask << start_symbol;
|
||||
ul_config.ul_config_list[0].pusch_config_pdu.dmrs_config_type = 0;
|
||||
ul_config.ul_config_list[0].pusch_config_pdu.mcs_index = Imcs;
|
||||
ul_config.ul_config_list[0].pusch_config_pdu.mcs_table = mcs_table;
|
||||
ul_config.ul_config_list[0].pusch_config_pdu.pusch_data.new_data_indicator = 0;
|
||||
ul_config.ul_config_list[0].pusch_config_pdu.pusch_data.rv_index = 0;
|
||||
ul_config.ul_config_list[0].pusch_config_pdu.nrOfLayers = precod_nbr_layers;
|
||||
ul_config.ul_config_list[0].pusch_config_pdu.pusch_data.harq_process_id = harq_pid;
|
||||
ul_config.ul_config_list[0].pusch_config_pdu.pusch_ptrs.ptrs_time_density = ptrs_time_density;
|
||||
ul_config.ul_config_list[0].pusch_config_pdu.pusch_ptrs.ptrs_freq_density = ptrs_freq_density;
|
||||
ul_config.ul_config_list[0].pusch_config_pdu.pusch_ptrs.ptrs_ports_list = (nfapi_nr_ue_ptrs_ports_t *) malloc(2*sizeof(nfapi_nr_ue_ptrs_ports_t));
|
||||
ul_config.ul_config_list[0].pusch_config_pdu.pusch_ptrs.ptrs_ports_list[0].ptrs_re_offset = 0;
|
||||
//there are plenty of other parameters that we don't seem to be using for now. e.g.
|
||||
//ul_config.ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.absolute_delta_PUSCH = 0;
|
||||
ul_config.ul_config_list[0].pusch_config_pdu.absolute_delta_PUSCH = 0;
|
||||
|
||||
nb_re_dmrs = ((ul_config.ul_config_list[0].pusch_config_pdu.dmrs_config_type == pusch_dmrs_type1) ? 6 : 4);
|
||||
available_bits = nr_get_G(nb_rb, nb_symb_sch, nb_re_dmrs, number_dmrs_symbols, mod_order, 1);
|
||||
TBS = nr_compute_tbs(mod_order, code_rate, nb_rb, nb_symb_sch, nb_re_dmrs * number_dmrs_symbols, 0, 0, precod_nbr_layers);
|
||||
|
||||
<<<<<<< HEAD
|
||||
if (input_fd != NULL) {
|
||||
// set FAPI parameters for UE, put them in the scheduled response and call
|
||||
nr_ue_scheduled_response(&scheduled_response);
|
||||
|
||||
/////////////////////////phy_procedures_nr_ue_TX///////////////////////
|
||||
///////////
|
||||
|
||||
phy_procedures_nrUE_TX(UE, &UE_proc, gNB_id, 0);
|
||||
|
||||
if (n_trials==1)
|
||||
LOG_M("txsig0.m","txs0", UE->common_vars.txdata[0],frame_length_complex_samples,1,1);
|
||||
|
||||
///////////
|
||||
////////////////////////////////////////////////////
|
||||
tx_offset = frame_parms->get_samples_slot_timestamp(slot,frame_parms,0);
|
||||
|
||||
txlev = signal_energy(&UE->common_vars.txdata[0][tx_offset + 5*frame_parms->ofdm_symbol_size + 4*frame_parms->nb_prefix_samples + frame_parms->nb_prefix_samples0],
|
||||
frame_parms->ofdm_symbol_size + frame_parms->nb_prefix_samples);
|
||||
|
||||
txlev_float = (double)txlev; // output of signal_energy is fixed point representation
|
||||
|
||||
n_errors = 0;
|
||||
n_false_positive = 0;
|
||||
|
||||
//AWGN
|
||||
sigma_dB = 10*log10(txlev_float)-SNR;
|
||||
sigma = pow(10,sigma_dB/10);
|
||||
}
|
||||
pusch_pdu->pusch_data.tb_size = TBS>>3;
|
||||
ul_config.ul_config_list[0].pusch_config_pdu.pusch_data.tb_size = TBS;
|
||||
// set FAPI parameters for UE, put them in the scheduled response and call
|
||||
nr_ue_scheduled_response(&scheduled_response);
|
||||
|
||||
/////////////////////////phy_procedures_nr_ue_TX///////////////////////
|
||||
///////////
|
||||
|
||||
phy_procedures_nrUE_TX(UE, &UE_proc, gNB_id, 0);
|
||||
|
||||
if (n_trials==1)
|
||||
LOG_M("txsig0.m","txs0", UE->common_vars.txdata[0],frame_length_complex_samples,1,1);
|
||||
|
||||
///////////
|
||||
////////////////////////////////////////////////////
|
||||
tx_offset = frame_parms->get_samples_slot_timestamp(slot,frame_parms,0);
|
||||
|
||||
txlev = signal_energy_amp_shift(&UE->common_vars.txdata[0][tx_offset + 5*frame_parms->ofdm_symbol_size + 4*frame_parms->nb_prefix_samples + frame_parms->nb_prefix_samples0],
|
||||
frame_parms->ofdm_symbol_size + frame_parms->nb_prefix_samples);
|
||||
|
||||
txlev_float = (double)txlev/(double)AMP; // output of signal_energy is fixed point representation
|
||||
|
||||
n_errors = 0;
|
||||
n_false_positive = 0;
|
||||
|
||||
//AWGN
|
||||
sigma_dB = 10*log10(txlev_float)-SNR;
|
||||
sigma = pow(10,sigma_dB/10);
|
||||
}
|
||||
else n_trials = 1;
|
||||
|
||||
for (trial = 0; trial < n_trials; trial++) {
|
||||
@@ -799,7 +831,7 @@ int main(int argc, char **argv)
|
||||
|
||||
if (errors_scrambling > 0) {
|
||||
if (n_trials==1)
|
||||
printf("\x1B[31m""[frame %d][trial %d]\tnumber of errors in unscrambling = %d\n" "\x1B[0m", frame, trial, errors_scrambling);
|
||||
printf("\x1B[31m""[frame %d][trial %d]\tnumber of errors in unscrambling = %u\n" "\x1B[0m", frame, trial, errors_scrambling);
|
||||
}
|
||||
|
||||
for (i = 0; i < TBS; i++) {
|
||||
@@ -817,13 +849,13 @@ int main(int argc, char **argv)
|
||||
if (errors_decoding > 0) {
|
||||
n_false_positive++;
|
||||
if (n_trials==1)
|
||||
printf("\x1B[31m""[frame %d][trial %d]\tnumber of errors in decoding = %d\n" "\x1B[0m", frame, trial, errors_decoding);
|
||||
printf("\x1B[31m""[frame %d][trial %d]\tnumber of errors in decoding = %u\n" "\x1B[0m", frame, trial, errors_decoding);
|
||||
}
|
||||
|
||||
} // trial loop
|
||||
|
||||
printf("*****************************************\n");
|
||||
printf("SNR %f: n_errors (negative CRC) = %d/%d, false_positive %d/%d, errors_scrambling %d/%d\n", SNR, n_errors, n_trials, n_false_positive, n_trials, errors_scrambling, n_trials);
|
||||
printf("SNR %f: n_errors (negative CRC) = %d/%d, false_positive %d/%d, errors_scrambling %u/%d\n", SNR, n_errors, n_trials, n_false_positive, n_trials, errors_scrambling, n_trials);
|
||||
printf("\n");
|
||||
printf("SNR %f: Channel BLER %e, Channel BER %e\n", SNR,(double)n_errors/n_trials,(double)errors_scrambling/available_bits/n_trials);
|
||||
printf("*****************************************\n");
|
||||
@@ -866,5 +898,8 @@ int main(int argc, char **argv)
|
||||
if (input_fd)
|
||||
fclose(input_fd);
|
||||
|
||||
if (scg_fd)
|
||||
fclose(scg_fd);
|
||||
|
||||
return (n_errors);
|
||||
}
|
||||
|
||||
@@ -432,15 +432,6 @@ void multipath_tv_channel(channel_desc_t *desc,
|
||||
/**@} */
|
||||
/**@} */
|
||||
|
||||
void rxAddInput( struct complex16 *input_sig,
|
||||
struct complex16 *after_channel_sig,
|
||||
int rxAnt,
|
||||
channel_desc_t *channelDesc,
|
||||
int nbSamples,
|
||||
uint64_t TS,
|
||||
uint32_t CirSize
|
||||
);
|
||||
|
||||
int modelid_fromname(char *modelname);
|
||||
double channelmod_get_snr_dB(void);
|
||||
double channelmod_get_sinr_dB(void);
|
||||
|
||||
Reference in New Issue
Block a user