Merge remote-tracking branch 'origin/NR_DL_MIMO' into integration_2021_wk12_b
This commit is contained in:
@@ -23,6 +23,7 @@ gNBs =
|
|||||||
|
|
||||||
ssb_SubcarrierOffset = 0;
|
ssb_SubcarrierOffset = 0;
|
||||||
pdsch_AntennaPorts = 1;
|
pdsch_AntennaPorts = 1;
|
||||||
|
pusch_AntennaPorts = 1;
|
||||||
|
|
||||||
servingCellConfigCommon = (
|
servingCellConfigCommon = (
|
||||||
{
|
{
|
||||||
@@ -240,7 +241,7 @@ L1s = (
|
|||||||
|
|
||||||
RUs = (
|
RUs = (
|
||||||
{
|
{
|
||||||
local_rf = "yes"
|
local_rf = "yes"
|
||||||
nb_tx = 1
|
nb_tx = 1
|
||||||
nb_rx = 1
|
nb_rx = 1
|
||||||
att_tx = 0
|
att_tx = 0
|
||||||
@@ -249,12 +250,12 @@ RUs = (
|
|||||||
max_pdschReferenceSignalPower = -27;
|
max_pdschReferenceSignalPower = -27;
|
||||||
max_rxgain = 75;
|
max_rxgain = 75;
|
||||||
eNB_instances = [0];
|
eNB_instances = [0];
|
||||||
##beamforming 1x2 matrix: 1 layer x 2 antennas
|
## beamforming 1x2 matrix: 1 layer x 2 antennas
|
||||||
bf_weights = [0x00007fff, 0x0000];
|
bf_weights = [0x00007fff, 0x0000];
|
||||||
##beamforming 1x4 matrix: 1 layer x 4 antennas
|
## beamforming 1x4 matrix: 1 layer x 4 antennas
|
||||||
#bf_weights = [0x00007fff, 0x0000,0x0000, 0x0000];
|
#bf_weights = [0x00007fff, 0x0000,0x0000, 0x0000];
|
||||||
## beamforming 2x2 matrix:
|
## beamforming 2x2 matrix:
|
||||||
# bf_weights = [0x00007fff, 0x00000000, 0x00000000, 0x00007fff];
|
#bf_weights = [0x00007fff, 0x00000000, 0x00000000, 0x00007fff];
|
||||||
## beamforming 4x4 matrix:
|
## beamforming 4x4 matrix:
|
||||||
#bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000, 0x00000000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff];
|
#bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000, 0x00000000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff];
|
||||||
|
|
||||||
|
|||||||
@@ -832,7 +832,7 @@ add_library(F1AP
|
|||||||
|
|
||||||
# Hardware dependant options
|
# Hardware dependant options
|
||||||
###################################
|
###################################
|
||||||
add_list1_option(NB_ANTENNAS_RX "2" "Number of antennas in reception" "1" "2" "4")
|
add_list1_option(NB_ANTENNAS_RX "4" "Number of antennas in reception" "1" "2" "4")
|
||||||
add_list1_option(NB_ANTENNAS_TX "4" "Number of antennas in transmission" "1" "2" "4")
|
add_list1_option(NB_ANTENNAS_TX "4" "Number of antennas in transmission" "1" "2" "4")
|
||||||
|
|
||||||
add_list2_option(RF_BOARD "EXMIMO" "RF head type" "None" "OAI_USRP" "OAI_BLADERF" "OAI_LMSSDR" "OAI_SIMU")
|
add_list2_option(RF_BOARD "EXMIMO" "RF head type" "None" "OAI_USRP" "OAI_BLADERF" "OAI_LMSSDR" "OAI_SIMU")
|
||||||
|
|||||||
@@ -302,6 +302,9 @@ const char* eurecomFunctionsNames[] = {
|
|||||||
/* PHY signals */
|
/* PHY signals */
|
||||||
"ue_synch",
|
"ue_synch",
|
||||||
"ue_slot_fep",
|
"ue_slot_fep",
|
||||||
|
"ue_slot_fep_pdcch",
|
||||||
|
"ue_slot_fep_pbch",
|
||||||
|
"ue_slot_fep_pdsch",
|
||||||
"ue_slot_fep_mbsfn",
|
"ue_slot_fep_mbsfn",
|
||||||
"ue_slot_fep_mbsfn_khz_1dot25",
|
"ue_slot_fep_mbsfn_khz_1dot25",
|
||||||
"ue_rrc_measurements",
|
"ue_rrc_measurements",
|
||||||
@@ -390,6 +393,8 @@ const char* eurecomFunctionsNames[] = {
|
|||||||
"rx_pmch",
|
"rx_pmch",
|
||||||
"rx_pmch_khz_1dot25",
|
"rx_pmch_khz_1dot25",
|
||||||
"pdsch_procedures",
|
"pdsch_procedures",
|
||||||
|
"pdsch_procedures_crnti",
|
||||||
|
//"dlsch_procedures_crnti",
|
||||||
"pdsch_procedures_si",
|
"pdsch_procedures_si",
|
||||||
"pdsch_procedures_p",
|
"pdsch_procedures_p",
|
||||||
"pdsch_procedures_ra",
|
"pdsch_procedures_ra",
|
||||||
|
|||||||
@@ -283,6 +283,9 @@ typedef enum {
|
|||||||
/* PHY signals */
|
/* PHY signals */
|
||||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SYNCH,
|
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SYNCH,
|
||||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP,
|
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP,
|
||||||
|
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP_PDCCH,
|
||||||
|
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP_PBCH,
|
||||||
|
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP_PDSCH,
|
||||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP_MBSFN,
|
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP_MBSFN,
|
||||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP_MBSFN_KHZ_1DOT25,
|
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP_MBSFN_KHZ_1DOT25,
|
||||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_RRC_MEASUREMENTS,
|
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_RRC_MEASUREMENTS,
|
||||||
@@ -371,9 +374,11 @@ typedef enum {
|
|||||||
VCD_SIGNAL_DUMPER_FUNCTIONS_RX_PMCH,
|
VCD_SIGNAL_DUMPER_FUNCTIONS_RX_PMCH,
|
||||||
VCD_SIGNAL_DUMPER_FUNCTIONS_RX_PMCH_KHZ_1DOT25,
|
VCD_SIGNAL_DUMPER_FUNCTIONS_RX_PMCH_KHZ_1DOT25,
|
||||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC,
|
VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC,
|
||||||
|
VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_C,
|
||||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_SI,
|
VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_SI,
|
||||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_P,
|
VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_P,
|
||||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_RA,
|
VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_RA,
|
||||||
|
//VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_PROC_C,
|
||||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_UE_CONFIG_SIB2,
|
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_UE_CONFIG_SIB2,
|
||||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_CONFIG_SIB1_ENB,
|
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_CONFIG_SIB1_ENB,
|
||||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_CONFIG_SIB2_ENB,
|
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_CONFIG_SIB2_ENB,
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ typedef struct {
|
|||||||
} T_cache_t;
|
} T_cache_t;
|
||||||
|
|
||||||
/* number of VCD functions (to be kept up to date! see in T_messages.txt) */
|
/* number of VCD functions (to be kept up to date! see in T_messages.txt) */
|
||||||
#define VCD_NUM_FUNCTIONS (269)
|
#define VCD_NUM_FUNCTIONS (273)
|
||||||
|
|
||||||
/* number of VCD variables (to be kept up to date! see in T_messages.txt) */
|
/* number of VCD variables (to be kept up to date! see in T_messages.txt) */
|
||||||
#define VCD_NUM_VARIABLES (187)
|
#define VCD_NUM_VARIABLES (187)
|
||||||
|
|||||||
@@ -2407,6 +2407,21 @@ ID = VCD_FUNCTION_UE_SLOT_FEP
|
|||||||
GROUP = ALL:VCD:UE:VCD_FUNCTION
|
GROUP = ALL:VCD:UE:VCD_FUNCTION
|
||||||
FORMAT = int,value
|
FORMAT = int,value
|
||||||
VCD_NAME = ue_slot_fep
|
VCD_NAME = ue_slot_fep
|
||||||
|
ID = VCD_FUNCTION_UE_SLOT_FEP_PDCCH
|
||||||
|
DESC = VCD function UE_SLOT_FEP_PDCCH
|
||||||
|
GROUP = ALL:VCD:UE:VCD_FUNCTION
|
||||||
|
FORMAT = int,value
|
||||||
|
VCD_NAME = ue_slot_fep_pdcch
|
||||||
|
ID = VCD_FUNCTION_UE_SLOT_FEP_PBCH
|
||||||
|
DESC = VCD function UE_SLOT_FEP_PBCH
|
||||||
|
GROUP = ALL:VCD:UE:VCD_FUNCTION
|
||||||
|
FORMAT = int,value
|
||||||
|
VCD_NAME = ue_slot_fep_pbch
|
||||||
|
ID = VCD_FUNCTION_UE_SLOT_FEP_PDSCH
|
||||||
|
DESC = VCD function UE_SLOT_FEP_PDSCH
|
||||||
|
GROUP = ALL:VCD:UE:VCD_FUNCTION
|
||||||
|
FORMAT = int,value
|
||||||
|
VCD_NAME = ue_slot_fep_pdsch
|
||||||
ID = VCD_FUNCTION_UE_SLOT_FEP_MBSFN
|
ID = VCD_FUNCTION_UE_SLOT_FEP_MBSFN
|
||||||
DESC = VCD function UE_SLOT_FEP_MBSFN
|
DESC = VCD function UE_SLOT_FEP_MBSFN
|
||||||
GROUP = ALL:VCD:UE:VCD_FUNCTION
|
GROUP = ALL:VCD:UE:VCD_FUNCTION
|
||||||
@@ -2847,6 +2862,11 @@ ID = VCD_FUNCTION_PDSCH_PROC
|
|||||||
GROUP = ALL:VCD:UE:VCD_FUNCTION
|
GROUP = ALL:VCD:UE:VCD_FUNCTION
|
||||||
FORMAT = int,value
|
FORMAT = int,value
|
||||||
VCD_NAME = pdsch_procedures
|
VCD_NAME = pdsch_procedures
|
||||||
|
ID = VCD_FUNCTION_PDSCH_PROC_C
|
||||||
|
DESC = VCD function PDSCH_PROC_C
|
||||||
|
GROUP = ALL:VCD:UE:VCD_FUNCTION
|
||||||
|
FORMAT = int,value
|
||||||
|
VCD_NAME = pdsch_procedures_crnti
|
||||||
ID = VCD_FUNCTION_PDSCH_PROC_SI
|
ID = VCD_FUNCTION_PDSCH_PROC_SI
|
||||||
DESC = VCD function PDSCH_PROC_SI
|
DESC = VCD function PDSCH_PROC_SI
|
||||||
GROUP = ALL:VCD:UE:VCD_FUNCTION
|
GROUP = ALL:VCD:UE:VCD_FUNCTION
|
||||||
|
|||||||
@@ -339,7 +339,9 @@ extern "C" {
|
|||||||
int itti_create_queue(const task_info_t *taskInfo) {
|
int itti_create_queue(const task_info_t *taskInfo) {
|
||||||
pthread_mutex_lock (&lock_nb_queues);
|
pthread_mutex_lock (&lock_nb_queues);
|
||||||
int newQueue=nb_queues++;
|
int newQueue=nb_queues++;
|
||||||
AssertFatal(tasks=(task_list_t **) realloc(tasks, nb_queues * sizeof(*tasks)),"");
|
task_list_t **new_tasks = (task_list_t **)realloc(tasks, nb_queues * sizeof(*tasks));
|
||||||
|
AssertFatal(new_tasks != NULL, "could not realloc() tasks list");
|
||||||
|
tasks = new_tasks;
|
||||||
tasks[newQueue]= new task_list_t;
|
tasks[newQueue]= new task_list_t;
|
||||||
pthread_mutex_unlock (&lock_nb_queues);
|
pthread_mutex_unlock (&lock_nb_queues);
|
||||||
LOG_I(TMR,"Starting itti queue: %s as task %d\n", taskInfo->name, newQueue);
|
LOG_I(TMR,"Starting itti queue: %s as task %d\n", taskInfo->name, newQueue);
|
||||||
|
|||||||
@@ -250,13 +250,14 @@ void rx_func(void *param) {
|
|||||||
L1_nr_prach_procedures(gNB,frame_rx,slot_rx);
|
L1_nr_prach_procedures(gNB,frame_rx,slot_rx);
|
||||||
|
|
||||||
//apply the rx signal rotation here
|
//apply the rx signal rotation here
|
||||||
apply_nr_rotation_ul(&gNB->frame_parms,
|
for (int aa = 0; aa < gNB->frame_parms.nb_antennas_rx; aa++) {
|
||||||
gNB->common_vars.rxdataF[0],
|
apply_nr_rotation_ul(&gNB->frame_parms,
|
||||||
slot_rx,
|
gNB->common_vars.rxdataF[aa],
|
||||||
0,
|
slot_rx,
|
||||||
gNB->frame_parms.Ncp==EXTENDED?12:14,
|
0,
|
||||||
gNB->frame_parms.ofdm_symbol_size);
|
gNB->frame_parms.Ncp==EXTENDED?12:14,
|
||||||
|
gNB->frame_parms.ofdm_symbol_size);
|
||||||
|
}
|
||||||
phy_procedures_gNB_uespec_RX(gNB, frame_rx, slot_rx);
|
phy_procedures_gNB_uespec_RX(gNB, frame_rx, slot_rx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+7
-7
@@ -686,13 +686,13 @@ void *UE_thread(void *arg) {
|
|||||||
|
|
||||||
if (flags || IS_SOFTMODEM_RFSIM)
|
if (flags || IS_SOFTMODEM_RFSIM)
|
||||||
AssertFatal( writeBlockSize ==
|
AssertFatal( writeBlockSize ==
|
||||||
UE->rfdevice.trx_write_func(&UE->rfdevice,
|
UE->rfdevice.trx_write_func(&UE->rfdevice,
|
||||||
writeTimestamp,
|
writeTimestamp,
|
||||||
txp,
|
txp,
|
||||||
writeBlockSize,
|
writeBlockSize,
|
||||||
UE->frame_parms.nb_antennas_tx,
|
UE->frame_parms.nb_antennas_tx,
|
||||||
flags),"");
|
flags),"");
|
||||||
|
|
||||||
for (int i=0; i<UE->frame_parms.nb_antennas_tx; i++)
|
for (int i=0; i<UE->frame_parms.nb_antennas_tx; i++)
|
||||||
memset(txp[i], 0, writeBlockSize);
|
memset(txp[i], 0, writeBlockSize);
|
||||||
|
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ int test_ldpc(short No_iteration,
|
|||||||
t_nrLDPC_procBuf nrLDPC_procBuf;
|
t_nrLDPC_procBuf nrLDPC_procBuf;
|
||||||
t_nrLDPC_procBuf* p_nrLDPC_procBuf = &nrLDPC_procBuf;
|
t_nrLDPC_procBuf* p_nrLDPC_procBuf = &nrLDPC_procBuf;
|
||||||
|
|
||||||
t_nrLDPC_time_stats decoder_profiler;
|
t_nrLDPC_time_stats decoder_profiler = {0};
|
||||||
t_nrLDPC_time_stats* p_decoder_profiler =&decoder_profiler ;
|
t_nrLDPC_time_stats* p_decoder_profiler =&decoder_profiler ;
|
||||||
|
|
||||||
int32_t n_iter = 0;
|
int32_t n_iter = 0;
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ int nr_phy_init_RU(RU_t *ru) {
|
|||||||
int beam_count = 0;
|
int beam_count = 0;
|
||||||
if (ru->nb_tx>1) {//Enable beamforming when nb_tx > 1
|
if (ru->nb_tx>1) {//Enable beamforming when nb_tx > 1
|
||||||
for (p=0;p<ru->nb_log_antennas;p++) {
|
for (p=0;p<ru->nb_log_antennas;p++) {
|
||||||
if ((fp->L_ssb >> (63-p)) & 0x01)//64 bit-map with the MSB @2⁶³ corresponds to SSB ssb_index 0
|
//if ((fp->L_ssb >> (63-p)) & 0x01)//64 bit-map with the MSB @2⁶³ corresponds to SSB ssb_index 0
|
||||||
beam_count++;
|
beam_count++;
|
||||||
}
|
}
|
||||||
AssertFatal(ru->nb_bfw==(beam_count*ru->nb_tx),"Number of beam weights from config file is %d while the expected number is %d",ru->nb_bfw,(beam_count*ru->nb_tx));
|
AssertFatal(ru->nb_bfw==(beam_count*ru->nb_tx),"Number of beam weights from config file is %d while the expected number is %d",ru->nb_bfw,(beam_count*ru->nb_tx));
|
||||||
@@ -133,7 +133,7 @@ int nr_phy_init_RU(RU_t *ru) {
|
|||||||
int l_ind = 0;
|
int l_ind = 0;
|
||||||
for (i=0; i<RC.nb_nr_L1_inst; i++) {
|
for (i=0; i<RC.nb_nr_L1_inst; i++) {
|
||||||
for (p=0;p<ru->nb_log_antennas;p++) {
|
for (p=0;p<ru->nb_log_antennas;p++) {
|
||||||
if ((fp->L_ssb >> (63-p)) & 0x01) {
|
//if ((fp->L_ssb >> (63-p)) & 0x01) {
|
||||||
ru->beam_weights[i][p] = (int32_t **)malloc16_clear(ru->nb_tx*sizeof(int32_t*));
|
ru->beam_weights[i][p] = (int32_t **)malloc16_clear(ru->nb_tx*sizeof(int32_t*));
|
||||||
for (j=0; j<ru->nb_tx; j++) {
|
for (j=0; j<ru->nb_tx; j++) {
|
||||||
ru->beam_weights[i][p][j] = (int32_t *)malloc16_clear(fp->ofdm_symbol_size*sizeof(int32_t));
|
ru->beam_weights[i][p][j] = (int32_t *)malloc16_clear(fp->ofdm_symbol_size*sizeof(int32_t));
|
||||||
@@ -142,8 +142,8 @@ int nr_phy_init_RU(RU_t *ru) {
|
|||||||
//printf("Beam Weight %08x for beam %d and tx %d\n",ru->bw_list[i][l_ind],p,j);
|
//printf("Beam Weight %08x for beam %d and tx %d\n",ru->bw_list[i][l_ind],p,j);
|
||||||
l_ind++;
|
l_ind++;
|
||||||
} // for j
|
} // for j
|
||||||
} // for p
|
//}
|
||||||
}
|
} // for p
|
||||||
} //for i
|
} //for i
|
||||||
}
|
}
|
||||||
} // !=IF5
|
} // !=IF5
|
||||||
|
|||||||
@@ -71,33 +71,39 @@ void phy_init_nr_ue__PDSCH(NR_UE_PDSCH *const pdsch,
|
|||||||
pdsch->llr128 = (int16_t **)malloc16_clear( sizeof(int16_t *) );
|
pdsch->llr128 = (int16_t **)malloc16_clear( sizeof(int16_t *) );
|
||||||
// FIXME! no further allocation for (int16_t*)pdsch->llr128 !!! expect SIGSEGV
|
// FIXME! no further allocation for (int16_t*)pdsch->llr128 !!! expect SIGSEGV
|
||||||
// FK, 11-3-2015: this is only as a temporary pointer, no memory is stored there
|
// FK, 11-3-2015: this is only as a temporary pointer, no memory is stored there
|
||||||
pdsch->rxdataF_ext = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
|
pdsch->rxdataF_ext = (int32_t **)malloc16_clear( fp->nb_antennas_rx*sizeof(int32_t *) );
|
||||||
pdsch->rxdataF_uespec_pilots = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
|
pdsch->rxdataF_uespec_pilots = (int32_t **)malloc16_clear( fp->nb_antennas_rx*sizeof(int32_t *) );
|
||||||
pdsch->rxdataF_comp0 = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
|
pdsch->rxdataF_comp0 = (int32_t **)malloc16_clear( NR_MAX_NB_LAYERS*fp->nb_antennas_rx*sizeof(int32_t *) );
|
||||||
pdsch->rho = (int32_t **)malloc16_clear( fp->nb_antennas_rx*sizeof(int32_t *) );
|
pdsch->rho = (int32_t ***)malloc16_clear( fp->nb_antennas_rx*sizeof(int32_t **) );
|
||||||
pdsch->dl_ch_estimates = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
|
pdsch->dl_ch_estimates = (int32_t **)malloc16_clear( NR_MAX_NB_LAYERS*fp->nb_antennas_rx*sizeof(int32_t *) );
|
||||||
pdsch->dl_ch_estimates_ext = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
|
pdsch->dl_ch_estimates_ext = (int32_t **)malloc16_clear( NR_MAX_NB_LAYERS*fp->nb_antennas_rx*sizeof(int32_t *) );
|
||||||
pdsch->dl_bf_ch_estimates = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
|
pdsch->dl_bf_ch_estimates = (int32_t **)malloc16_clear( NR_MAX_NB_LAYERS*fp->nb_antennas_rx*sizeof(int32_t *) );
|
||||||
pdsch->dl_bf_ch_estimates_ext = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
|
pdsch->dl_bf_ch_estimates_ext = (int32_t **)malloc16_clear( NR_MAX_NB_LAYERS*fp->nb_antennas_rx*sizeof(int32_t *) );
|
||||||
//pdsch->dl_ch_rho_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
//pdsch->dl_ch_rho_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
||||||
//pdsch->dl_ch_rho2_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
//pdsch->dl_ch_rho2_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
||||||
pdsch->dl_ch_mag0 = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
|
pdsch->dl_ch_mag0 = (int32_t **)malloc16_clear( NR_MAX_NB_LAYERS*fp->nb_antennas_rx*sizeof(int32_t *) );
|
||||||
pdsch->dl_ch_magb0 = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
|
pdsch->dl_ch_magb0 = (int32_t **)malloc16_clear( NR_MAX_NB_LAYERS*fp->nb_antennas_rx*sizeof(int32_t *) );
|
||||||
pdsch->dl_ch_magr0 = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
|
pdsch->dl_ch_magr0 = (int32_t **)malloc16_clear( NR_MAX_NB_LAYERS*fp->nb_antennas_rx*sizeof(int32_t *) );
|
||||||
pdsch->ptrs_phase_per_slot = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
|
pdsch->ptrs_phase_per_slot = (int32_t **)malloc16_clear( fp->nb_antennas_rx*sizeof(int32_t *) );
|
||||||
pdsch->ptrs_re_per_slot = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
|
pdsch->ptrs_re_per_slot = (int32_t **)malloc16_clear( fp->nb_antennas_rx*sizeof(int32_t *) );
|
||||||
pdsch->dl_ch_ptrs_estimates_ext = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
|
pdsch->dl_ch_ptrs_estimates_ext = (int32_t **)malloc16_clear( fp->nb_antennas_rx*sizeof(int32_t *) );
|
||||||
// the allocated memory size is fixed:
|
// the allocated memory size is fixed:
|
||||||
AssertFatal( fp->nb_antennas_rx <= 2, "nb_antennas_rx > 2" );
|
AssertFatal( fp->nb_antennas_rx <= 4, "nb_antennas_rx > 4" );//Extend the max number of UE Rx antennas to 4
|
||||||
|
|
||||||
|
const size_t num = 7*2*fp->N_RB_DL*12;
|
||||||
for (int i=0; i<fp->nb_antennas_rx; i++) {
|
for (int i=0; i<fp->nb_antennas_rx; i++) {
|
||||||
pdsch->rho[i] = (int32_t *)malloc16_clear( sizeof(int32_t)*(fp->N_RB_DL*12*7*2) );
|
pdsch->rxdataF_ext[i] = (int32_t *)malloc16_clear( sizeof(int32_t) * num );
|
||||||
|
pdsch->rxdataF_uespec_pilots[i] = (int32_t *)malloc16_clear( sizeof(int32_t) * fp->N_RB_DL*12);
|
||||||
|
pdsch->ptrs_phase_per_slot[i] = (int32_t *)malloc16_clear( sizeof(int32_t) * 14 );
|
||||||
|
pdsch->ptrs_re_per_slot[i] = (int32_t *)malloc16_clear( sizeof(int32_t) * 14);
|
||||||
|
pdsch->dl_ch_ptrs_estimates_ext[i] = (int32_t *)malloc16_clear( sizeof(int32_t) * num);
|
||||||
|
pdsch->rho[i] = (int32_t **)malloc16_clear( NR_MAX_NB_LAYERS*NR_MAX_NB_LAYERS*sizeof(int32_t *) );
|
||||||
|
|
||||||
for (int j=0; j<4; j++) { //fp->nb_antennas_tx; j++)
|
for (int j=0; j<NR_MAX_NB_LAYERS; j++) {
|
||||||
const int idx = (j<<1)+i;
|
const int idx = (j*fp->nb_antennas_rx)+i;
|
||||||
const size_t num = 7*2*fp->N_RB_DL*12;
|
for (int k=0; k<NR_MAX_NB_LAYERS; k++) {
|
||||||
pdsch->rxdataF_ext[idx] = (int32_t *)malloc16_clear( sizeof(int32_t) * num );
|
pdsch->rho[i][j*NR_MAX_NB_LAYERS+k] = (int32_t *)malloc16_clear( sizeof(int32_t) * num );
|
||||||
pdsch->rxdataF_uespec_pilots[idx] = (int32_t *)malloc16_clear( sizeof(int32_t) * fp->N_RB_DL*12);
|
}
|
||||||
pdsch->rxdataF_comp0[idx] = (int32_t *)malloc16_clear( sizeof(int32_t) * num );
|
pdsch->rxdataF_comp0[idx] = (int32_t *)malloc16_clear( sizeof(int32_t) * num );
|
||||||
pdsch->dl_ch_estimates[idx] = (int32_t *)malloc16_clear( sizeof(int32_t) * fp->ofdm_symbol_size*7*2);
|
pdsch->dl_ch_estimates[idx] = (int32_t *)malloc16_clear( sizeof(int32_t) * fp->ofdm_symbol_size*7*2);
|
||||||
pdsch->dl_ch_estimates_ext[idx] = (int32_t *)malloc16_clear( sizeof(int32_t) * num );
|
pdsch->dl_ch_estimates_ext[idx] = (int32_t *)malloc16_clear( sizeof(int32_t) * num );
|
||||||
@@ -108,9 +114,6 @@ void phy_init_nr_ue__PDSCH(NR_UE_PDSCH *const pdsch,
|
|||||||
pdsch->dl_ch_mag0[idx] = (int32_t *)malloc16_clear( sizeof(int32_t) * num );
|
pdsch->dl_ch_mag0[idx] = (int32_t *)malloc16_clear( sizeof(int32_t) * num );
|
||||||
pdsch->dl_ch_magb0[idx] = (int32_t *)malloc16_clear( sizeof(int32_t) * num );
|
pdsch->dl_ch_magb0[idx] = (int32_t *)malloc16_clear( sizeof(int32_t) * num );
|
||||||
pdsch->dl_ch_magr0[idx] = (int32_t *)malloc16_clear( sizeof(int32_t) * num );
|
pdsch->dl_ch_magr0[idx] = (int32_t *)malloc16_clear( sizeof(int32_t) * num );
|
||||||
pdsch->ptrs_re_per_slot[idx] = (int32_t *)malloc16_clear(sizeof(int32_t) * 14);
|
|
||||||
pdsch->ptrs_phase_per_slot[idx] = (int32_t *)malloc16_clear( sizeof(int32_t) * 14 );
|
|
||||||
pdsch->dl_ch_ptrs_estimates_ext[idx]= (int32_t *)malloc16_clear( sizeof(int32_t) * num);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -139,16 +142,14 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
|
|||||||
uint16_t N_n_scid[2] = {0,1}; // [HOTFIX] This is a temporary implementation of scramblingID0 and scramblingID1 which are given by DMRS-UplinkConfig
|
uint16_t N_n_scid[2] = {0,1}; // [HOTFIX] This is a temporary implementation of scramblingID0 and scramblingID1 which are given by DMRS-UplinkConfig
|
||||||
int n_scid;
|
int n_scid;
|
||||||
abstraction_flag = 0;
|
abstraction_flag = 0;
|
||||||
fp->nb_antennas_tx = 1;
|
|
||||||
fp->nb_antennas_rx=1;
|
|
||||||
// dmrs_UplinkConfig_t *dmrs_Uplink_Config = &ue->pusch_config.dmrs_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;
|
// ptrs_UplinkConfig_t *ptrs_Uplink_Config = &ue->pusch_config.dmrs_UplinkConfig.ptrs_UplinkConfig;
|
||||||
LOG_I(PHY, "Initializing UE vars (abstraction %u) for gNB TXant %u, UE RXant %u\n", abstraction_flag, fp->nb_antennas_tx, fp->nb_antennas_rx);
|
LOG_I(PHY, "Initializing UE vars (abstraction %u) for gNB TXant %u, UE RXant %u\n", abstraction_flag, fp->nb_antennas_tx, fp->nb_antennas_rx);
|
||||||
//LOG_D(PHY,"[MSC_NEW][FRAME 00000][PHY_UE][MOD %02u][]\n", ue->Mod_id+NB_eNB_INST);
|
//LOG_D(PHY,"[MSC_NEW][FRAME 00000][PHY_UE][MOD %02u][]\n", ue->Mod_id+NB_gNB_INST);
|
||||||
phy_init_nr_top(ue);
|
phy_init_nr_top(ue);
|
||||||
// many memory allocation sizes are hard coded
|
// many memory allocation sizes are hard coded
|
||||||
AssertFatal( fp->nb_antennas_rx <= 2, "hard coded allocation for ue_common_vars->dl_ch_estimates[gNB_id]" );
|
AssertFatal( fp->nb_antennas_rx <= 4, "hard coded allocation for ue_common_vars->dl_ch_estimates[gNB_id]" );
|
||||||
AssertFatal(nb_connected_gNB <= NUMBER_OF_CONNECTED_gNB_MAX, "n_connected_gNB is too large" );
|
AssertFatal( nb_connected_gNB <= NUMBER_OF_CONNECTED_gNB_MAX, "n_connected_gNB is too large" );
|
||||||
// init phy_vars_ue
|
// init phy_vars_ue
|
||||||
|
|
||||||
for (i=0; i<4; i++) {
|
for (i=0; i<4; i++) {
|
||||||
@@ -276,7 +277,7 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//PDCCH DMRS init (eNB offset = 0)
|
//PDCCH DMRS init (gNB offset = 0)
|
||||||
ue->nr_gold_pdcch[0] = (uint32_t ***)malloc16(fp->slots_per_frame*sizeof(uint32_t **));
|
ue->nr_gold_pdcch[0] = (uint32_t ***)malloc16(fp->slots_per_frame*sizeof(uint32_t **));
|
||||||
uint32_t ***pdcch_dmrs = ue->nr_gold_pdcch[0];
|
uint32_t ***pdcch_dmrs = ue->nr_gold_pdcch[0];
|
||||||
AssertFatal(pdcch_dmrs!=NULL, "NR init: pdcch_dmrs malloc failed\n");
|
AssertFatal(pdcch_dmrs!=NULL, "NR init: pdcch_dmrs malloc failed\n");
|
||||||
@@ -291,7 +292,7 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//PDSCH DMRS init (eNB offset = 0)
|
//PDSCH DMRS init (gNB offset = 0)
|
||||||
ue->nr_gold_pdsch[0] = (uint32_t ****)malloc16(fp->slots_per_frame*sizeof(uint32_t ***));
|
ue->nr_gold_pdsch[0] = (uint32_t ****)malloc16(fp->slots_per_frame*sizeof(uint32_t ***));
|
||||||
uint32_t ****pdsch_dmrs = ue->nr_gold_pdsch[0];
|
uint32_t ****pdsch_dmrs = ue->nr_gold_pdsch[0];
|
||||||
|
|
||||||
@@ -329,31 +330,25 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
|
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
|
||||||
ue->pdsch_vars[th_id][gNB_id]->llr_shifts = (uint8_t *)malloc16_clear(7*2*fp->N_RB_DL*12);
|
ue->pdsch_vars[th_id][gNB_id]->llr_shifts = (uint8_t *)malloc16_clear(7*2*fp->N_RB_DL*12);
|
||||||
ue->pdsch_vars[th_id][gNB_id]->llr_shifts_p = ue->pdsch_vars[0][gNB_id]->llr_shifts;
|
ue->pdsch_vars[th_id][gNB_id]->llr_shifts_p = ue->pdsch_vars[0][gNB_id]->llr_shifts;
|
||||||
ue->pdsch_vars[th_id][gNB_id]->llr[1] = (int16_t *)malloc16_clear((8*(3*8*8448))*sizeof(int16_t));
|
ue->pdsch_vars[th_id][gNB_id]->llr[1] = (int16_t *)malloc16_clear( (8*(3*8*8448))*sizeof(int16_t) );
|
||||||
ue->pdsch_vars[th_id][gNB_id]->layer_llr[1] = (int16_t *)malloc16_clear((8*(3*8*8448))*sizeof(int16_t));
|
ue->pdsch_vars[th_id][gNB_id]->layer_llr[1] = (int16_t *)malloc16_clear( (8*(3*8*8448))*sizeof(int16_t) );
|
||||||
ue->pdsch_vars[th_id][gNB_id]->llr128_2ndstream = (int16_t **)malloc16_clear(sizeof(int16_t *));
|
ue->pdsch_vars[th_id][gNB_id]->llr128_2ndstream = (int16_t **)malloc16_clear( sizeof(int16_t *) );
|
||||||
ue->pdsch_vars[th_id][gNB_id]->rho = (int32_t **)malloc16_clear(fp->nb_antennas_rx*sizeof(int32_t *));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i=0; i<fp->nb_antennas_rx; i++) {
|
|
||||||
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
|
|
||||||
ue->pdsch_vars[th_id][gNB_id]->rho[i] = (int32_t *)malloc16_clear(7*2*sizeof(int32_t)*(fp->N_RB_DL*12));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
|
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
|
||||||
ue->pdsch_vars[th_id][gNB_id]->dl_ch_rho2_ext = (int32_t **)malloc16_clear(8*sizeof(int32_t *));
|
ue->pdsch_vars[th_id][gNB_id]->dl_ch_rho2_ext = (int32_t **)malloc16_clear( 4*fp->nb_antennas_rx*sizeof(int32_t *) );
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i=0; i<fp->nb_antennas_rx; i++)
|
for (i=0; i<fp->nb_antennas_rx; i++)
|
||||||
for (j=0; j<4; j++) {
|
for (j=0; j<4; j++) {
|
||||||
const int idx = (j<<1)+i;
|
const int idx = (j*fp->nb_antennas_rx)+i;
|
||||||
const size_t num = 7*2*fp->N_RB_DL*12+4;
|
const size_t num = 7*2*fp->N_RB_DL*12+4;
|
||||||
|
|
||||||
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
|
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
|
||||||
ue->pdsch_vars[th_id][gNB_id]->dl_ch_rho2_ext[idx] = (int32_t *)malloc16_clear(sizeof(int32_t) * num);
|
ue->pdsch_vars[th_id][gNB_id]->dl_ch_rho2_ext[idx] = (int32_t *)malloc16_clear( sizeof(int32_t) * num );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -361,15 +356,15 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
|
|||||||
for (k=0; k<8; k++) { //harq_pid
|
for (k=0; k<8; k++) { //harq_pid
|
||||||
for (l=0; l<8; l++) { //round
|
for (l=0; l<8; l++) { //round
|
||||||
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
|
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
|
||||||
ue->pdsch_vars[th_id][gNB_id]->rxdataF_comp1[k][l] = (int32_t **)malloc16_clear(8*sizeof(int32_t *));
|
ue->pdsch_vars[th_id][gNB_id]->rxdataF_comp1[k][l] = (int32_t **)malloc16_clear( 4*fp->nb_antennas_rx*sizeof(int32_t *) );
|
||||||
ue->pdsch_vars[th_id][gNB_id]->dl_ch_rho_ext[k][l] = (int32_t **)malloc16_clear(8*sizeof(int32_t *));
|
ue->pdsch_vars[th_id][gNB_id]->dl_ch_rho_ext[k][l] = (int32_t **)malloc16_clear( 4*fp->nb_antennas_rx*sizeof(int32_t *) );
|
||||||
ue->pdsch_vars[th_id][gNB_id]->dl_ch_mag1[k][l] = (int32_t **)malloc16_clear(8*sizeof(int32_t *));
|
ue->pdsch_vars[th_id][gNB_id]->dl_ch_mag1[k][l] = (int32_t **)malloc16_clear( 4*fp->nb_antennas_rx*sizeof(int32_t *) );
|
||||||
ue->pdsch_vars[th_id][gNB_id]->dl_ch_magb1[k][l] = (int32_t **)malloc16_clear(8*sizeof(int32_t *));
|
ue->pdsch_vars[th_id][gNB_id]->dl_ch_magb1[k][l] = (int32_t **)malloc16_clear( 4*fp->nb_antennas_rx*sizeof(int32_t *) );
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i=0; i<fp->nb_antennas_rx; i++)
|
for (int i=0; i<fp->nb_antennas_rx; i++)
|
||||||
for (int j=0; j<4; j++) { //frame_parms->nb_antennas_tx; j++)
|
for (int j=0; j<4; j++) { //frame_parms->nb_antennas_tx; j++)
|
||||||
const int idx = (j<<1)+i;
|
const int idx = (j*fp->nb_antennas_rx)+i;
|
||||||
|
|
||||||
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
|
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
|
||||||
ue->pdsch_vars[th_id][gNB_id]->dl_ch_rho_ext[k][l][idx] = (int32_t *)malloc16_clear(7*2*sizeof(int32_t)*(fp->N_RB_DL*12));
|
ue->pdsch_vars[th_id][gNB_id]->dl_ch_rho_ext[k][l][idx] = (int32_t *)malloc16_clear(7*2*sizeof(int32_t)*(fp->N_RB_DL*12));
|
||||||
@@ -383,26 +378,26 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
|
|||||||
|
|
||||||
// 100 PRBs * 12 REs/PRB * 4 PDCCH SYMBOLS * 2 LLRs/RE
|
// 100 PRBs * 12 REs/PRB * 4 PDCCH SYMBOLS * 2 LLRs/RE
|
||||||
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
|
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
|
||||||
ue->pdcch_vars[th_id][gNB_id]->llr = (int16_t *)malloc16_clear(2*4*100*12*sizeof(uint16_t));
|
ue->pdcch_vars[th_id][gNB_id]->llr = (int16_t *)malloc16_clear( 2*4*100*12*sizeof(uint16_t) );
|
||||||
ue->pdcch_vars[th_id][gNB_id]->llr16 = (int16_t *)malloc16_clear(2*4*100*12*sizeof(uint16_t));
|
ue->pdcch_vars[th_id][gNB_id]->llr16 = (int16_t *)malloc16_clear( 2*4*100*12*sizeof(uint16_t) );
|
||||||
ue->pdcch_vars[th_id][gNB_id]->wbar = (int16_t *)malloc16_clear(2*4*100*12*sizeof(uint16_t));
|
ue->pdcch_vars[th_id][gNB_id]->wbar = (int16_t *)malloc16_clear( 2*4*100*12*sizeof(uint16_t) );
|
||||||
ue->pdcch_vars[th_id][gNB_id]->e_rx = (int16_t *)malloc16_clear(4*2*100*12 );
|
ue->pdcch_vars[th_id][gNB_id]->e_rx = (int16_t *)malloc16_clear( 4*2*100*12 );
|
||||||
ue->pdcch_vars[th_id][gNB_id]->rxdataF_comp = (int32_t **)malloc16_clear(8*sizeof(int32_t *));
|
ue->pdcch_vars[th_id][gNB_id]->rxdataF_comp = (int32_t **)malloc16_clear( 4*fp->nb_antennas_rx*sizeof(int32_t *) );
|
||||||
ue->pdcch_vars[th_id][gNB_id]->dl_ch_rho_ext = (int32_t **)malloc16_clear(8*sizeof(int32_t *));
|
ue->pdcch_vars[th_id][gNB_id]->dl_ch_rho_ext = (int32_t **)malloc16_clear( 4*fp->nb_antennas_rx*sizeof(int32_t *) );
|
||||||
ue->pdcch_vars[th_id][gNB_id]->rho = (int32_t **)malloc16(fp->nb_antennas_rx*sizeof(int32_t *));
|
ue->pdcch_vars[th_id][gNB_id]->rho = (int32_t **)malloc16( fp->nb_antennas_rx*sizeof(int32_t *) );
|
||||||
ue->pdcch_vars[th_id][gNB_id]->rxdataF_ext = (int32_t **)malloc16_clear(8*sizeof(int32_t *));
|
ue->pdcch_vars[th_id][gNB_id]->rxdataF_ext = (int32_t **)malloc16_clear( 4*fp->nb_antennas_rx*sizeof(int32_t *) );
|
||||||
ue->pdcch_vars[th_id][gNB_id]->dl_ch_estimates_ext = (int32_t **)malloc16_clear(8*sizeof(int32_t *));
|
ue->pdcch_vars[th_id][gNB_id]->dl_ch_estimates_ext = (int32_t **)malloc16_clear( 4*fp->nb_antennas_rx*sizeof(int32_t *) );
|
||||||
// Channel estimates
|
// Channel estimates
|
||||||
ue->pdcch_vars[th_id][gNB_id]->dl_ch_estimates = (int32_t **)malloc16_clear(8*sizeof(int32_t *));
|
ue->pdcch_vars[th_id][gNB_id]->dl_ch_estimates = (int32_t **)malloc16_clear(4*fp->nb_antennas_rx*sizeof(int32_t *));
|
||||||
ue->pdcch_vars[th_id][gNB_id]->dl_ch_estimates_time = (int32_t **)malloc16_clear(8*sizeof(int32_t *));
|
ue->pdcch_vars[th_id][gNB_id]->dl_ch_estimates_time = (int32_t **)malloc16_clear(4*fp->nb_antennas_rx*sizeof(int32_t *));
|
||||||
|
|
||||||
for (i=0; i<fp->nb_antennas_rx; i++) {
|
for (i=0; i<fp->nb_antennas_rx; i++) {
|
||||||
ue->pdcch_vars[th_id][gNB_id]->rho[i] = (int32_t *)malloc16_clear( sizeof(int32_t)*(100*12*4));
|
ue->pdcch_vars[th_id][gNB_id]->rho[i] = (int32_t *)malloc16_clear( sizeof(int32_t)*(100*12*4));
|
||||||
|
|
||||||
for (j=0; j<4; j++) {
|
for (j=0; j<4; j++) {
|
||||||
int idx = (j<<1) + i;
|
int idx = (j*fp->nb_antennas_rx)+i;
|
||||||
ue->pdcch_vars[th_id][gNB_id]->dl_ch_estimates[idx] = (int32_t *)malloc16_clear(sizeof(int32_t)*fp->symbols_per_slot*(fp->ofdm_symbol_size+LTE_CE_FILTER_LENGTH));
|
ue->pdcch_vars[th_id][gNB_id]->dl_ch_estimates[idx] = (int32_t *)malloc16_clear( sizeof(int32_t)*fp->symbols_per_slot*(fp->ofdm_symbol_size+LTE_CE_FILTER_LENGTH) );
|
||||||
ue->pdcch_vars[th_id][gNB_id]->dl_ch_estimates_time[idx] = (int32_t *)malloc16_clear(sizeof(int32_t)*fp->ofdm_symbol_size*2);
|
ue->pdcch_vars[th_id][gNB_id]->dl_ch_estimates_time[idx] = (int32_t *)malloc16_clear( sizeof(int32_t)*fp->ofdm_symbol_size*2 );
|
||||||
// size_t num = 7*2*fp->N_RB_DL*12;
|
// size_t num = 7*2*fp->N_RB_DL*12;
|
||||||
size_t num = 4*273*12; // 4 symbols, 100 PRBs, 12 REs per PRB
|
size_t num = 4*273*12; // 4 symbols, 100 PRBs, 12 REs per PRB
|
||||||
ue->pdcch_vars[th_id][gNB_id]->rxdataF_comp[idx] = (int32_t *)malloc16_clear(sizeof(int32_t) * num);
|
ue->pdcch_vars[th_id][gNB_id]->rxdataF_comp[idx] = (int32_t *)malloc16_clear(sizeof(int32_t) * num);
|
||||||
@@ -414,24 +409,24 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// PBCH
|
// PBCH
|
||||||
pbch_vars[gNB_id]->rxdataF_ext = (int32_t **)malloc16(fp->nb_antennas_rx*sizeof(int32_t *));
|
pbch_vars[gNB_id]->rxdataF_ext = (int32_t **)malloc16( fp->nb_antennas_rx*sizeof(int32_t *) );
|
||||||
pbch_vars[gNB_id]->rxdataF_comp = (int32_t **)malloc16_clear(8*sizeof(int32_t *));
|
pbch_vars[gNB_id]->rxdataF_comp = (int32_t **)malloc16_clear( 4*fp->nb_antennas_rx*sizeof(int32_t *) );
|
||||||
pbch_vars[gNB_id]->dl_ch_estimates = (int32_t **)malloc16_clear(8*sizeof(int32_t *));
|
pbch_vars[gNB_id]->dl_ch_estimates = (int32_t **)malloc16_clear( 4*fp->nb_antennas_rx*sizeof(int32_t *) );
|
||||||
pbch_vars[gNB_id]->dl_ch_estimates_ext = (int32_t **)malloc16_clear(8*sizeof(int32_t *));
|
pbch_vars[gNB_id]->dl_ch_estimates_ext = (int32_t **)malloc16_clear( 4*fp->nb_antennas_rx*sizeof(int32_t *) );
|
||||||
pbch_vars[gNB_id]->dl_ch_estimates_time = (int32_t **)malloc16_clear(8*sizeof(int32_t *));
|
pbch_vars[gNB_id]->dl_ch_estimates_time = (int32_t **)malloc16_clear( 4*fp->nb_antennas_rx*sizeof(int32_t *) );
|
||||||
pbch_vars[gNB_id]->llr = (int16_t *)malloc16_clear(1920); //
|
pbch_vars[gNB_id]->llr = (int16_t *)malloc16_clear( 1920 ); //
|
||||||
prach_vars[gNB_id]->prachF = (int16_t *)malloc16_clear(sizeof(int)*(7*2*sizeof(int)*(fp->ofdm_symbol_size*12)));
|
prach_vars[gNB_id]->prachF = (int16_t *)malloc16_clear( sizeof(int)*(7*2*sizeof(int)*(fp->ofdm_symbol_size*12)) );
|
||||||
prach_vars[gNB_id]->prach = (int16_t *)malloc16_clear(sizeof(int)*(7*2*sizeof(int)*(fp->ofdm_symbol_size*12)));
|
prach_vars[gNB_id]->prach = (int16_t *)malloc16_clear( sizeof(int)*(7*2*sizeof(int)*(fp->ofdm_symbol_size*12)) );
|
||||||
|
|
||||||
for (i=0; i<fp->nb_antennas_rx; i++) {
|
for (i=0; i<fp->nb_antennas_rx; i++) {
|
||||||
pbch_vars[gNB_id]->rxdataF_ext[i] = (int32_t *)malloc16_clear( sizeof(int32_t)*20*12*4 );
|
pbch_vars[gNB_id]->rxdataF_ext[i] = (int32_t *)malloc16_clear( sizeof(int32_t)*20*12*4 );
|
||||||
|
|
||||||
for (j=0; j<4; j++) {//fp->nb_antennas_tx;j++) {
|
for (j=0; j<4; j++) {//fp->nb_antennas_tx;j++) {
|
||||||
int idx = (j<<1)+i;
|
int idx = (j*fp->nb_antennas_rx)+i;
|
||||||
pbch_vars[gNB_id]->rxdataF_comp[idx] = (int32_t *)malloc16_clear(sizeof(int32_t)*20*12*4);
|
pbch_vars[gNB_id]->rxdataF_comp[idx] = (int32_t *)malloc16_clear( sizeof(int32_t)*20*12*4 );
|
||||||
pbch_vars[gNB_id]->dl_ch_estimates[idx] = (int32_t *)malloc16_clear(sizeof(int32_t)*7*2*sizeof(int)*(fp->ofdm_symbol_size));
|
pbch_vars[gNB_id]->dl_ch_estimates[idx] = (int32_t *)malloc16_clear( sizeof(int32_t)*7*2*sizeof(int)*(fp->ofdm_symbol_size) );
|
||||||
pbch_vars[gNB_id]->dl_ch_estimates_time[idx] = (int32_t *)malloc16_clear(sizeof(int32_t)*7*2*sizeof(int)*(fp->ofdm_symbol_size));
|
pbch_vars[gNB_id]->dl_ch_estimates_time[idx]= (int32_t *)malloc16_clear( sizeof(int32_t)*7*2*sizeof(int)*(fp->ofdm_symbol_size) );
|
||||||
pbch_vars[gNB_id]->dl_ch_estimates_ext[idx] = (int32_t *)malloc16_clear(sizeof(int32_t)*20*12*4);
|
pbch_vars[gNB_id]->dl_ch_estimates_ext[idx] = (int32_t *)malloc16_clear( sizeof(int32_t)*20*12*4 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -204,9 +204,9 @@ int nr_init_frame_parms(nfapi_nr_config_request_scf_t* cfg,
|
|||||||
|
|
||||||
fp->slots_per_frame = 10* fp->slots_per_subframe;
|
fp->slots_per_frame = 10* fp->slots_per_subframe;
|
||||||
|
|
||||||
fp->nb_antenna_ports_gNB = cfg->carrier_config.num_tx_ant.value;// It corresponds to pdsch_AntennaPorts
|
fp->nb_antenna_ports_gNB = 1; // It corresponds to the number of common antenna ports
|
||||||
fp->nb_antennas_rx = cfg->carrier_config.num_rx_ant.value; // It denotes the number of rx antennas at gNB
|
fp->nb_antennas_rx = cfg->carrier_config.num_rx_ant.value; // It denotes the number of rx antennas at gNB
|
||||||
fp->nb_antennas_tx = 1; // It corresponds to the number of UE Tx antennas
|
fp->nb_antennas_tx = cfg->carrier_config.num_tx_ant.value; // It corresponds to pdsch_AntennaPorts
|
||||||
|
|
||||||
fp->symbols_per_slot = ((Ncp == NORMAL)? 14 : 12); // to redefine for different slot formats
|
fp->symbols_per_slot = ((Ncp == NORMAL)? 14 : 12); // to redefine for different slot formats
|
||||||
fp->samples_per_subframe_wCP = fp->ofdm_symbol_size * fp->symbols_per_slot * fp->slots_per_subframe;
|
fp->samples_per_subframe_wCP = fp->ofdm_symbol_size * fp->symbols_per_slot * fp->slots_per_subframe;
|
||||||
@@ -254,6 +254,11 @@ int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *fp,
|
|||||||
uint8_t Nid_cell = 0;
|
uint8_t Nid_cell = 0;
|
||||||
int Ncp = NORMAL;
|
int Ncp = NORMAL;
|
||||||
|
|
||||||
|
if(fp->nb_antennas_rx == 0)
|
||||||
|
fp->nb_antennas_rx = 1;
|
||||||
|
if(fp->nb_antennas_tx == 0)
|
||||||
|
fp->nb_antennas_tx = 1;
|
||||||
|
|
||||||
// default values until overwritten by RRCConnectionReconfiguration
|
// default values until overwritten by RRCConnectionReconfiguration
|
||||||
fp->nb_antenna_ports_gNB = nb_ant_ports_gNB;
|
fp->nb_antenna_ports_gNB = nb_ant_ports_gNB;
|
||||||
fp->tdd_config = tdd_cfg;
|
fp->tdd_config = tdd_cfg;
|
||||||
|
|||||||
@@ -145,7 +145,8 @@ int nr_beam_precoding(int32_t **txdataF,
|
|||||||
int slot,
|
int slot,
|
||||||
int symbol,
|
int symbol,
|
||||||
int aa,
|
int aa,
|
||||||
int nb_antenna_ports)
|
int nb_antenna_ports,
|
||||||
|
int offset)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
@@ -155,14 +156,14 @@ int nr_beam_precoding(int32_t **txdataF,
|
|||||||
memset(&txdataF_BF[aa][symbol*frame_parms->ofdm_symbol_size],0,sizeof(int32_t)*(frame_parms->ofdm_symbol_size));
|
memset(&txdataF_BF[aa][symbol*frame_parms->ofdm_symbol_size],0,sizeof(int32_t)*(frame_parms->ofdm_symbol_size));
|
||||||
|
|
||||||
for (p=0; p<nb_antenna_ports; p++) {
|
for (p=0; p<nb_antenna_ports; p++) {
|
||||||
if ((frame_parms->L_ssb >> (63-p)) & 0x01) {
|
//if ((frame_parms->L_ssb >> (63-p)) & 0x01) {
|
||||||
multadd_cpx_vector((int16_t*)&txdataF[p][symbol*frame_parms->ofdm_symbol_size],
|
multadd_cpx_vector((int16_t*)&txdataF[p][(symbol*frame_parms->ofdm_symbol_size)+offset],
|
||||||
(int16_t*)beam_weights[p][aa],
|
(int16_t*)beam_weights[p][aa],
|
||||||
(int16_t*)&txdataF_BF[aa][symbol*frame_parms->ofdm_symbol_size],
|
(int16_t*)&txdataF_BF[aa][symbol*frame_parms->ofdm_symbol_size],
|
||||||
0,
|
0,
|
||||||
frame_parms->ofdm_symbol_size,
|
frame_parms->ofdm_symbol_size,
|
||||||
15);
|
15);
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,6 +22,101 @@
|
|||||||
#include "nr_modulation.h"
|
#include "nr_modulation.h"
|
||||||
#include "PHY/NR_REFSIG/nr_mod_table.h"
|
#include "PHY/NR_REFSIG/nr_mod_table.h"
|
||||||
|
|
||||||
|
//Table 6.3.1.5-1 Precoding Matrix W 1 layer 2 antenna ports 'n' = -1 and 'o' = -j
|
||||||
|
char nr_W_1l_2p[6][2][1] = {
|
||||||
|
{{'1'}, {'0'}},//pmi 0
|
||||||
|
{{'0'}, {'1'}},
|
||||||
|
{{'1'}, {'1'}},
|
||||||
|
{{'1'}, {'n'}},
|
||||||
|
{{'1'}, {'j'}},
|
||||||
|
{{'1'}, {'o'}}//pmi 5
|
||||||
|
};
|
||||||
|
|
||||||
|
//Table 6.3.1.5-3 Precoding Matrix W 1 layer 4 antenna ports 'n' = -1 and 'o' = -j
|
||||||
|
char nr_W_1l_4p[28][4][1] = {
|
||||||
|
{{'1'}, {'0'}, {'0'}, {'0'}},//pmi 0
|
||||||
|
{{'0'}, {'1'}, {'0'}, {'0'}},
|
||||||
|
{{'0'}, {'0'}, {'1'}, {'0'}},
|
||||||
|
{{'0'}, {'0'}, {'0'}, {'1'}},
|
||||||
|
{{'1'}, {'0'}, {'1'}, {'0'}},
|
||||||
|
{{'1'}, {'0'}, {'n'}, {'0'}},
|
||||||
|
{{'1'}, {'0'}, {'j'}, {'0'}},
|
||||||
|
{{'1'}, {'0'}, {'o'}, {'0'}},//pmi 7
|
||||||
|
{{'0'}, {'1'}, {'0'}, {'1'}},//pmi 8
|
||||||
|
{{'0'}, {'1'}, {'0'}, {'n'}},
|
||||||
|
{{'0'}, {'1'}, {'0'}, {'j'}},
|
||||||
|
{{'0'}, {'1'}, {'0'}, {'o'}},
|
||||||
|
{{'1'}, {'1'}, {'1'}, {'1'}},
|
||||||
|
{{'1'}, {'1'}, {'j'}, {'j'}},
|
||||||
|
{{'1'}, {'1'}, {'n'}, {'n'}},
|
||||||
|
{{'1'}, {'1'}, {'o'}, {'o'}},
|
||||||
|
{{'1'}, {'j'}, {'1'}, {'j'}},//pmi 16
|
||||||
|
{{'1'}, {'j'}, {'j'}, {'n'}},
|
||||||
|
{{'1'}, {'j'}, {'n'}, {'o'}},
|
||||||
|
{{'1'}, {'j'}, {'o'}, {'1'}},
|
||||||
|
{{'1'}, {'n'}, {'1'}, {'n'}},
|
||||||
|
{{'1'}, {'n'}, {'j'}, {'o'}},
|
||||||
|
{{'1'}, {'n'}, {'n'}, {'1'}},
|
||||||
|
{{'1'}, {'n'}, {'o'}, {'j'}},//pmi 23
|
||||||
|
{{'1'}, {'o'}, {'1'}, {'o'}},//pmi 24
|
||||||
|
{{'1'}, {'o'}, {'j'}, {'1'}},
|
||||||
|
{{'1'}, {'o'}, {'n'}, {'j'}},
|
||||||
|
{{'1'}, {'o'}, {'o'}, {'n'}}//pmi 27
|
||||||
|
};
|
||||||
|
|
||||||
|
//Table 6.3.1.5-4 Precoding Matrix W 2 antenna ports layers 2 'n' = -1 and 'o' = -j
|
||||||
|
char nr_W_2l_2p[3][2][2] = {
|
||||||
|
{{'1', '0'}, {'0', '1'}},//pmi 0
|
||||||
|
{{'1', '1'}, {'1', 'n'}},
|
||||||
|
{{'1', '1'}, {'j', 'o'}} //pmi 2
|
||||||
|
};
|
||||||
|
|
||||||
|
//Table 6.3.1.5-5 Precoding Matrix W 2 layers 4 antenna ports 'n' = -1 and 'o' = -j
|
||||||
|
char nr_W_2l_4p[22][4][2] = {
|
||||||
|
{{'1', '0'}, {'0', '1'}, {'0', '0'}, {'0', '0'}},//pmi 0
|
||||||
|
{{'1', '0'}, {'0', '0'}, {'0', '1'}, {'0', '0'}},
|
||||||
|
{{'1', '0'}, {'0', '0'}, {'0', '0'}, {'0', '1'}},
|
||||||
|
{{'0', '0'}, {'1', '0'}, {'0', '1'}, {'0', '0'}},//pmi 3
|
||||||
|
{{'0', '0'}, {'1', '0'}, {'0', '0'}, {'0', '1'}},//pmi 4
|
||||||
|
{{'0', '0'}, {'0', '0'}, {'1', '0'}, {'0', '1'}},
|
||||||
|
{{'1', '0'}, {'0', '1'}, {'1', '0'}, {'0', 'o'}},
|
||||||
|
{{'1', '0'}, {'0', '1'}, {'1', '0'}, {'0', 'j'}},
|
||||||
|
{{'1', '0'}, {'0', '1'}, {'o', '0'}, {'0', '1'}},//pmi 8
|
||||||
|
{{'1', '0'}, {'0', '1'}, {'o', '0'}, {'0', 'n'}},
|
||||||
|
{{'1', '0'}, {'0', '1'}, {'n', '0'}, {'0', 'o'}},
|
||||||
|
{{'1', '0'}, {'0', '1'}, {'n', '0'}, {'0', 'j'}},//pmi 11
|
||||||
|
{{'1', '0'}, {'0', '1'}, {'j', '0'}, {'0', '1'}},//pmi 12
|
||||||
|
{{'1', '0'}, {'0', '1'}, {'j', '0'}, {'0', 'n'}},
|
||||||
|
{{'1', '1'}, {'1', '1'}, {'1', 'n'}, {'1', 'n'}},
|
||||||
|
{{'1', '1'}, {'1', '1'}, {'j', 'o'}, {'j', 'o'}},//pmi 15
|
||||||
|
{{'1', '1'}, {'j', 'j'}, {'1', 'n'}, {'j', 'o'}},//pmi 16
|
||||||
|
{{'1', '1'}, {'j', 'j'}, {'j', 'o'}, {'n', '1'}},
|
||||||
|
{{'1', '1'}, {'n', 'n'}, {'1', 'n'}, {'n', '1'}},
|
||||||
|
{{'1', '1'}, {'n', 'n'}, {'j', 'o'}, {'o', 'j'}},//pmi 19
|
||||||
|
{{'1', '1'}, {'o', 'o'}, {'1', 'n'}, {'o', 'j'}},
|
||||||
|
{{'1', '1'}, {'o', 'o'}, {'j', 'o'}, {'1', 'n'}}//pmi 21
|
||||||
|
};
|
||||||
|
|
||||||
|
//Table 6.3.1.5-6 Precoding Matrix W 3 layers 4 antenna ports 'n' = -1 and 'o' = -j
|
||||||
|
char nr_W_3l_4p[7][4][3] = {
|
||||||
|
{{'1', '0', '0'}, {'0', '1', '0'}, {'0', '0', '1'},{'0', '0', '0'}},//pmi 0
|
||||||
|
{{'1', '0', '0'}, {'0', '1', '0'}, {'1', '0', '0'},{'0', '0', '1'}},
|
||||||
|
{{'1', '0', '0'}, {'0', '1', '0'}, {'n', '0', '0'},{'0', '0', '1'}},
|
||||||
|
{{'1', '1', '1'}, {'1', 'n', '1'}, {'1', '1', 'n'},{'1', 'n', 'n'}},//pmi 3
|
||||||
|
{{'1', '1', '1'}, {'1', 'n', '1'}, {'j', 'j', 'o'},{'j', 'o', 'o'}},//pmi 4
|
||||||
|
{{'1', '1', '1'}, {'n', '1', 'n'}, {'1', '1', 'n'},{'n', '1', '1'}},
|
||||||
|
{{'1', '1', '1'}, {'n', '1', 'n'}, {'j', 'j', 'o'},{'o', 'j', 'j'}}
|
||||||
|
};
|
||||||
|
|
||||||
|
//Table 6.3.1.5-7 Precoding Matrix W 4 layers 4 antenna ports 'n' = -1 and 'o' = -j
|
||||||
|
char nr_W_4l_4p[5][4][4] = {
|
||||||
|
{{'1', '0', '0', '0'}, {'0', '1', '0', '0'}, {'0', '0', '1', '0'}, {'0', '0', '0', '1'}},//pmi 0
|
||||||
|
{{'1', '1', '0', '0'}, {'0', '0', '1', '1'}, {'1', 'n', '0', '0'}, {'0', '0', '1', 'n'}},
|
||||||
|
{{'1', '1', '0', '0'}, {'0', '0', '1', '1'}, {'j', 'o', '0', '0'}, {'0', '0', 'j', 'o'}},
|
||||||
|
{{'1', '1', '1', '1'}, {'1', 'n', '1', 'n'}, {'1', '1', 'n', 'n'}, {'1', 'n', 'n', '1'}},//pmi 3
|
||||||
|
{{'1', '1', '1', '1'}, {'1', 'n', '1', 'n'}, {'j', 'j', 'o', 'o'}, {'j', 'o', 'o', 'j'}}//pmi 4
|
||||||
|
};
|
||||||
|
|
||||||
void nr_modulation(uint32_t *in,
|
void nr_modulation(uint32_t *in,
|
||||||
uint32_t length,
|
uint32_t length,
|
||||||
uint16_t mod_order,
|
uint16_t mod_order,
|
||||||
@@ -37,7 +132,7 @@ void nr_modulation(uint32_t *in,
|
|||||||
uint32_t i,j;
|
uint32_t i,j;
|
||||||
uint32_t bit_cnt;
|
uint32_t bit_cnt;
|
||||||
uint64_t x,x1,x2;
|
uint64_t x,x1,x2;
|
||||||
|
|
||||||
#if defined(__SSE2__)
|
#if defined(__SSE2__)
|
||||||
__m128i *nr_mod_table128;
|
__m128i *nr_mod_table128;
|
||||||
__m128i *out128;
|
__m128i *out128;
|
||||||
@@ -56,7 +151,7 @@ void nr_modulation(uint32_t *in,
|
|||||||
// the bits that are left out
|
// the bits that are left out
|
||||||
i = i*8/2;
|
i = i*8/2;
|
||||||
nr_mod_table32 = (int32_t*) nr_qpsk_mod_table;
|
nr_mod_table32 = (int32_t*) nr_qpsk_mod_table;
|
||||||
while (i<length/2){
|
while (i<length/2) {
|
||||||
idx = ((in_bytes[(i*2)/8]>>((i*2)&0x7)) & mask);
|
idx = ((in_bytes[(i*2)/8]>>((i*2)&0x7)) & mask);
|
||||||
out32[i] = nr_mod_table32[idx];
|
out32[i] = nr_mod_table32[idx];
|
||||||
i++;
|
i++;
|
||||||
@@ -78,7 +173,7 @@ void nr_modulation(uint32_t *in,
|
|||||||
out64[i] = nr_16qam_byte_mod_table[in_bytes[i]];
|
out64[i] = nr_16qam_byte_mod_table[in_bytes[i]];
|
||||||
// the bits that are left out
|
// the bits that are left out
|
||||||
i = i*8/4;
|
i = i*8/4;
|
||||||
while (i<length/4){
|
while (i<length/4) {
|
||||||
idx = ((in_bytes[(i*4)/8]>>((i*4)&0x7)) & mask);
|
idx = ((in_bytes[(i*4)/8]>>((i*4)&0x7)) & mask);
|
||||||
out32[i] = nr_16qam_mod_table[idx];
|
out32[i] = nr_16qam_mod_table[idx];
|
||||||
i++;
|
i++;
|
||||||
@@ -88,7 +183,7 @@ void nr_modulation(uint32_t *in,
|
|||||||
case 6:
|
case 6:
|
||||||
j = 0;
|
j = 0;
|
||||||
for (i=0; i<length/192; i++) {
|
for (i=0; i<length/192; i++) {
|
||||||
x = in64[i*3];
|
x = in64[i*3];
|
||||||
x1 = x&4095;
|
x1 = x&4095;
|
||||||
out64[j++] = nr_64qam_mod_table[x1];
|
out64[j++] = nr_64qam_mod_table[x1];
|
||||||
x1 = (x>>12)&4095;
|
x1 = (x>>12)&4095;
|
||||||
@@ -140,7 +235,7 @@ void nr_modulation(uint32_t *in,
|
|||||||
bit_cnt += 24;
|
bit_cnt += 24;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case 8:
|
case 8:
|
||||||
nr_mod_table32 = (int32_t*) nr_256qam_mod_table;
|
nr_mod_table32 = (int32_t*) nr_256qam_mod_table;
|
||||||
for (i=0; i<length/8; i++)
|
for (i=0; i<length/8; i++)
|
||||||
@@ -151,20 +246,20 @@ void nr_modulation(uint32_t *in,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
AssertFatal(false,"Invalid or unsupported modulation order %d\n",mod_order);
|
AssertFatal(false,"Invalid or unsupported modulation order %d\n",mod_order);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void nr_layer_mapping(int16_t **mod_symbs,
|
void nr_layer_mapping(int16_t **mod_symbs,
|
||||||
uint8_t n_layers,
|
uint8_t n_layers,
|
||||||
uint16_t n_symbs,
|
uint16_t n_symbs,
|
||||||
int16_t **tx_layers) {
|
int16_t **tx_layers)
|
||||||
|
{
|
||||||
LOG_D(PHY,"Doing layer mapping for %d layers, %d symbols\n",n_layers,n_symbs);
|
LOG_D(PHY,"Doing layer mapping for %d layers, %d symbols\n",n_layers,n_symbs);
|
||||||
|
|
||||||
switch (n_layers) {
|
switch (n_layers) {
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
memcpy((void*)tx_layers[0], (void*)mod_symbs[0], (n_symbs<<1)*sizeof(int16_t));
|
memcpy((void*)tx_layers[0], (void*)mod_symbs[0], (n_symbs<<1)*sizeof(int16_t));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
case 3:
|
case 3:
|
||||||
@@ -174,7 +269,7 @@ void nr_layer_mapping(int16_t **mod_symbs,
|
|||||||
tx_layers[l][i<<1] = mod_symbs[0][(n_layers*i+l)<<1];
|
tx_layers[l][i<<1] = mod_symbs[0][(n_layers*i+l)<<1];
|
||||||
tx_layers[l][(i<<1)+1] = mod_symbs[0][((n_layers*i+l)<<1)+1];
|
tx_layers[l][(i<<1)+1] = mod_symbs[0][((n_layers*i+l)<<1)+1];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 5:
|
case 5:
|
||||||
for (int i=0; i<n_symbs>>1; i++)
|
for (int i=0; i<n_symbs>>1; i++)
|
||||||
@@ -186,8 +281,8 @@ void nr_layer_mapping(int16_t **mod_symbs,
|
|||||||
for (int l=2; l<5; l++) {
|
for (int l=2; l<5; l++) {
|
||||||
tx_layers[l][i<<1] = mod_symbs[1][(3*i+l)<<1];
|
tx_layers[l][i<<1] = mod_symbs[1][(3*i+l)<<1];
|
||||||
tx_layers[l][(i<<1)+1] = mod_symbs[1][((3*i+l)<<1)+1];
|
tx_layers[l][(i<<1)+1] = mod_symbs[1][((3*i+l)<<1)+1];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 6:
|
case 6:
|
||||||
for (int q=0; q<2; q++)
|
for (int q=0; q<2; q++)
|
||||||
@@ -196,7 +291,7 @@ void nr_layer_mapping(int16_t **mod_symbs,
|
|||||||
tx_layers[l][i<<1] = mod_symbs[q][(3*i+l)<<1];
|
tx_layers[l][i<<1] = mod_symbs[q][(3*i+l)<<1];
|
||||||
tx_layers[l][(i<<1)+1] = mod_symbs[q][((3*i+l)<<1)+1];
|
tx_layers[l][(i<<1)+1] = mod_symbs[q][((3*i+l)<<1)+1];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 7:
|
case 7:
|
||||||
for (int i=0; i<n_symbs/3; i++)
|
for (int i=0; i<n_symbs/3; i++)
|
||||||
@@ -209,7 +304,7 @@ void nr_layer_mapping(int16_t **mod_symbs,
|
|||||||
tx_layers[l][i<<1] = mod_symbs[0][((i<<2)+l)<<1];
|
tx_layers[l][i<<1] = mod_symbs[0][((i<<2)+l)<<1];
|
||||||
tx_layers[l][(i<<1)+1] = mod_symbs[0][(((i<<2)+l)<<1)+1];
|
tx_layers[l][(i<<1)+1] = mod_symbs[0][(((i<<2)+l)<<1)+1];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 8:
|
case 8:
|
||||||
for (int q=0; q<2; q++)
|
for (int q=0; q<2; q++)
|
||||||
@@ -218,42 +313,42 @@ void nr_layer_mapping(int16_t **mod_symbs,
|
|||||||
tx_layers[l][i<<1] = mod_symbs[q][((i<<2)+l)<<1];
|
tx_layers[l][i<<1] = mod_symbs[q][((i<<2)+l)<<1];
|
||||||
tx_layers[l][(i<<1)+1] = mod_symbs[q][(((i<<2)+l)<<1)+1];
|
tx_layers[l][(i<<1)+1] = mod_symbs[q][(((i<<2)+l)<<1)+1];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
AssertFatal(0, "Invalid number of layers %d\n", n_layers);
|
AssertFatal(0, "Invalid number of layers %d\n", n_layers);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void nr_ue_layer_mapping(NR_UE_ULSCH_t **ulsch_ue,
|
void nr_ue_layer_mapping(NR_UE_ULSCH_t **ulsch_ue,
|
||||||
uint8_t n_layers,
|
uint8_t n_layers,
|
||||||
uint16_t n_symbs,
|
uint16_t n_symbs,
|
||||||
int16_t **tx_layers) {
|
int16_t **tx_layers)
|
||||||
|
{
|
||||||
int16_t *mod_symbs;
|
int16_t *mod_symbs;
|
||||||
|
|
||||||
switch (n_layers) {
|
switch (n_layers) {
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
mod_symbs = (int16_t *)ulsch_ue[0]->d_mod;
|
mod_symbs = (int16_t *)ulsch_ue[0]->d_mod;
|
||||||
for (int i=0; i<n_symbs; i++){
|
for (int i=0; i<n_symbs; i++) {
|
||||||
tx_layers[0][i<<1] = (mod_symbs[i<<1]*AMP)>>15;
|
tx_layers[0][i<<1] = (mod_symbs[i<<1]*AMP)>>15;
|
||||||
tx_layers[0][(i<<1)+1] = (mod_symbs[(i<<1)+1]*AMP)>>15;
|
tx_layers[0][(i<<1)+1] = (mod_symbs[(i<<1)+1]*AMP)>>15;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
case 3:
|
case 3:
|
||||||
case 4:
|
case 4:
|
||||||
mod_symbs = (int16_t *)ulsch_ue[0]->d_mod;
|
mod_symbs = (int16_t *)ulsch_ue[0]->d_mod;
|
||||||
|
|
||||||
for (int i=0; i<n_symbs/n_layers; i++){
|
for (int i=0; i<n_symbs/n_layers; i++) {
|
||||||
for (int l=0; l<n_layers; l++) {
|
for (int l=0; l<n_layers; l++) {
|
||||||
tx_layers[l][i<<1] = (mod_symbs[(n_layers*i+l)<<1]*AMP)>>15;
|
tx_layers[l][i<<1] = (mod_symbs[(n_layers*i+l)<<1]*AMP)>>15;
|
||||||
tx_layers[l][(i<<1)+1] = (mod_symbs[((n_layers*i+l)<<1)+1]*AMP)>>15;
|
tx_layers[l][(i<<1)+1] = (mod_symbs[((n_layers*i+l)<<1)+1]*AMP)>>15;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 5:
|
case 5:
|
||||||
mod_symbs = (int16_t *)ulsch_ue[0]->d_mod;
|
mod_symbs = (int16_t *)ulsch_ue[0]->d_mod;
|
||||||
@@ -271,11 +366,10 @@ void nr_ue_layer_mapping(NR_UE_ULSCH_t **ulsch_ue,
|
|||||||
tx_layers[l][i<<1] = (mod_symbs[(3*i+l)<<1]*AMP)>>15;
|
tx_layers[l][i<<1] = (mod_symbs[(3*i+l)<<1]*AMP)>>15;
|
||||||
tx_layers[l][(i<<1)+1] = (mod_symbs[((3*i+l)<<1)+1]*AMP)>>15;
|
tx_layers[l][(i<<1)+1] = (mod_symbs[((3*i+l)<<1)+1]*AMP)>>15;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 6:
|
case 6:
|
||||||
for (int q=0; q<2; q++){
|
for (int q=0; q<2; q++) {
|
||||||
|
|
||||||
mod_symbs = (int16_t *)ulsch_ue[q]->d_mod;
|
mod_symbs = (int16_t *)ulsch_ue[q]->d_mod;
|
||||||
|
|
||||||
for (int i=0; i<n_symbs/3; i++)
|
for (int i=0; i<n_symbs/3; i++)
|
||||||
@@ -284,7 +378,7 @@ void nr_ue_layer_mapping(NR_UE_ULSCH_t **ulsch_ue,
|
|||||||
tx_layers[l][(i<<1)+1] = (mod_symbs[((3*i+l)<<1)+1]*AMP)>>15;
|
tx_layers[l][(i<<1)+1] = (mod_symbs[((3*i+l)<<1)+1]*AMP)>>15;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 7:
|
case 7:
|
||||||
mod_symbs = (int16_t *)ulsch_ue[1]->d_mod;
|
mod_symbs = (int16_t *)ulsch_ue[1]->d_mod;
|
||||||
@@ -302,11 +396,10 @@ void nr_ue_layer_mapping(NR_UE_ULSCH_t **ulsch_ue,
|
|||||||
tx_layers[l][i<<1] = (mod_symbs[((i<<2)+l)<<1]*AMP)>>15;
|
tx_layers[l][i<<1] = (mod_symbs[((i<<2)+l)<<1]*AMP)>>15;
|
||||||
tx_layers[l][(i<<1)+1] = (mod_symbs[(((i<<2)+l)<<1)+1]*AMP)>>15;
|
tx_layers[l][(i<<1)+1] = (mod_symbs[(((i<<2)+l)<<1)+1]*AMP)>>15;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 8:
|
case 8:
|
||||||
for (int q=0; q<2; q++){
|
for (int q=0; q<2; q++) {
|
||||||
|
|
||||||
mod_symbs = (int16_t *)ulsch_ue[q]->d_mod;
|
mod_symbs = (int16_t *)ulsch_ue[q]->d_mod;
|
||||||
|
|
||||||
for (int i=0; i<n_symbs>>2; i++)
|
for (int i=0; i<n_symbs>>2; i++)
|
||||||
@@ -315,10 +408,10 @@ void nr_ue_layer_mapping(NR_UE_ULSCH_t **ulsch_ue,
|
|||||||
tx_layers[l][(i<<1)+1] = (mod_symbs[(((i<<2)+l)<<1)+1]*AMP)>>15;
|
tx_layers[l][(i<<1)+1] = (mod_symbs[(((i<<2)+l)<<1)+1]*AMP)>>15;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
AssertFatal(0, "Invalid number of layers %d\n", n_layers);
|
AssertFatal(0, "Invalid number of layers %d\n", n_layers);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -651,3 +744,43 @@ void init_symbol_rotation(NR_DL_FRAME_PARMS *fp) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int nr_layer_precoder(int16_t **datatx_F_precoding, char *prec_matrix, uint8_t n_layers, int32_t re_offset)
|
||||||
|
{
|
||||||
|
int32_t precodatatx_F = 0;
|
||||||
|
|
||||||
|
for (int al = 0; al<n_layers; al++) {
|
||||||
|
int16_t antenna_re = datatx_F_precoding[al][re_offset<<1];
|
||||||
|
int16_t antenna_im = datatx_F_precoding[al][(re_offset<<1) +1];
|
||||||
|
|
||||||
|
switch (prec_matrix[al]) {
|
||||||
|
case '0': //multiply by zero
|
||||||
|
break;
|
||||||
|
|
||||||
|
case '1': //multiply by 1
|
||||||
|
((int16_t *) &precodatatx_F)[0] += antenna_re;
|
||||||
|
((int16_t *) &precodatatx_F)[1] += antenna_im;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'n': // multiply by -1
|
||||||
|
((int16_t *) &precodatatx_F)[0] -= antenna_re;
|
||||||
|
((int16_t *) &precodatatx_F)[1] -= antenna_im;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'j': //
|
||||||
|
((int16_t *) &precodatatx_F)[0] -= antenna_im;
|
||||||
|
((int16_t *) &precodatatx_F)[1] += antenna_re;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'o': // -j
|
||||||
|
((int16_t *) &precodatatx_F)[0] += antenna_im;
|
||||||
|
((int16_t *) &precodatatx_F)[1] -= antenna_re;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return precodatatx_F;
|
||||||
|
// normalize
|
||||||
|
/* ((int16_t *)precodatatx_F)[0] = (int16_t)((((int16_t *)precodatatx_F)[0]*ONE_OVER_SQRT2_Q15)>>15);
|
||||||
|
((int16_t *)precodatatx_F)[1] = (int16_t)((((int16_t *)precodatatx_F)[1]*ONE_OVER_SQRT2_Q15)>>15);*/
|
||||||
|
}
|
||||||
|
|||||||
@@ -28,7 +28,13 @@
|
|||||||
#include "PHY/NR_UE_TRANSPORT/nr_transport_ue.h"
|
#include "PHY/NR_UE_TRANSPORT/nr_transport_ue.h"
|
||||||
|
|
||||||
#define DMRS_MOD_ORDER 2
|
#define DMRS_MOD_ORDER 2
|
||||||
|
/*Precoding matices: W[pmi][antenna_port][layer]*/
|
||||||
|
extern char nr_W_1l_2p[6][2][1];
|
||||||
|
extern char nr_W_2l_2p[3][2][2];
|
||||||
|
extern char nr_W_1l_4p[28][4][1];
|
||||||
|
extern char nr_W_2l_4p[22][4][2];
|
||||||
|
extern char nr_W_3l_4p[7][4][3];
|
||||||
|
extern char nr_W_4l_4p[5][4][4];
|
||||||
/*! \brief Perform NR modulation. TS 38.211 V15.4.0 subclause 5.1
|
/*! \brief Perform NR modulation. TS 38.211 V15.4.0 subclause 5.1
|
||||||
@param[in] in, Pointer to input bits
|
@param[in] in, Pointer to input bits
|
||||||
@param[in] length, size of input bits
|
@param[in] length, size of input bits
|
||||||
@@ -98,7 +104,8 @@ int nr_beam_precoding(int32_t **txdataF,
|
|||||||
int slot,
|
int slot,
|
||||||
int symbol,
|
int symbol,
|
||||||
int aa,
|
int aa,
|
||||||
int nb_antenna_ports
|
int nb_antenna_ports,
|
||||||
|
int offset
|
||||||
);
|
);
|
||||||
|
|
||||||
void apply_nr_rotation(NR_DL_FRAME_PARMS *fp,
|
void apply_nr_rotation(NR_DL_FRAME_PARMS *fp,
|
||||||
@@ -116,4 +123,14 @@ void apply_nr_rotation_ul(NR_DL_FRAME_PARMS *frame_parms,
|
|||||||
int first_symbol,
|
int first_symbol,
|
||||||
int nsymb,
|
int nsymb,
|
||||||
int length);
|
int length);
|
||||||
|
|
||||||
|
/*! \brief Perform NR precoding. TS 38.211 V15.4.0 subclause 6.3.1.5
|
||||||
|
@param[in] datatx_F_precoding, Pointer to n_layers*re data array
|
||||||
|
@param[in] prec_matrix, Pointer to precoding matrix
|
||||||
|
@param[in] n_layers, number of DLSCH layers
|
||||||
|
*/
|
||||||
|
int nr_layer_precoder(int16_t **datatx_F_precoding,
|
||||||
|
char *prec_matrix,
|
||||||
|
uint8_t n_layers,
|
||||||
|
int32_t re_offset);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
|||||||
symbol_offset = gNB->frame_parms.ofdm_symbol_size*symbol;
|
symbol_offset = gNB->frame_parms.ofdm_symbol_size*symbol;
|
||||||
|
|
||||||
k = bwp_start_subcarrier;
|
k = bwp_start_subcarrier;
|
||||||
int re_offset = k;
|
int re_offset;
|
||||||
|
|
||||||
uint16_t nb_rb_pusch = pusch_pdu->rb_size;
|
uint16_t nb_rb_pusch = pusch_pdu->rb_size;
|
||||||
|
|
||||||
@@ -170,6 +170,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
|||||||
pil = (int16_t *)&pilot[0];
|
pil = (int16_t *)&pilot[0];
|
||||||
rxF = (int16_t *)&rxdataF[aarx][(symbol_offset+k+nushift)];
|
rxF = (int16_t *)&rxdataF[aarx][(symbol_offset+k+nushift)];
|
||||||
ul_ch = (int16_t *)&ul_ch_estimates[aarx][ch_offset];
|
ul_ch = (int16_t *)&ul_ch_estimates[aarx][ch_offset];
|
||||||
|
re_offset = k;
|
||||||
|
|
||||||
memset(ul_ch,0,4*(gNB->frame_parms.ofdm_symbol_size));
|
memset(ul_ch,0,4*(gNB->frame_parms.ofdm_symbol_size));
|
||||||
|
|
||||||
|
|||||||
@@ -141,6 +141,7 @@ uint8_t nr_generate_pdsch(PHY_VARS_gNB *gNB,
|
|||||||
uint32_t scrambled_output[NR_MAX_NB_CODEWORDS][NR_MAX_PDSCH_ENCODED_LENGTH>>5];
|
uint32_t scrambled_output[NR_MAX_NB_CODEWORDS][NR_MAX_PDSCH_ENCODED_LENGTH>>5];
|
||||||
int16_t **mod_symbs = (int16_t**)dlsch->mod_symbs;
|
int16_t **mod_symbs = (int16_t**)dlsch->mod_symbs;
|
||||||
int16_t **tx_layers = (int16_t**)dlsch->txdataF;
|
int16_t **tx_layers = (int16_t**)dlsch->txdataF;
|
||||||
|
int16_t **txdataF_precoding = (int16_t**)dlsch->txdataF_precoding;
|
||||||
int8_t Wf[2], Wt[2], l0, l_prime, l_overline, delta;
|
int8_t Wf[2], Wt[2], l0, l_prime, l_overline, delta;
|
||||||
uint8_t dmrs_Type = rel15->dmrsConfigType;
|
uint8_t dmrs_Type = rel15->dmrsConfigType;
|
||||||
int nb_re_dmrs;
|
int nb_re_dmrs;
|
||||||
@@ -264,9 +265,6 @@ uint8_t nr_generate_pdsch(PHY_VARS_gNB *gNB,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/// Antenna port mapping
|
|
||||||
//to be moved to init phase potentially, for now tx_layers 1-8 are mapped on antenna ports 1000-1007
|
|
||||||
|
|
||||||
/// DMRS QPSK modulation
|
/// DMRS QPSK modulation
|
||||||
for (int l=rel15->StartSymbolIndex; l<rel15->StartSymbolIndex+rel15->NrOfSymbols; l++) {
|
for (int l=rel15->StartSymbolIndex; l<rel15->StartSymbolIndex+rel15->NrOfSymbols; l++) {
|
||||||
if (rel15->dlDmrsSymbPos & (1 << l)) {
|
if (rel15->dlDmrsSymbPos & (1 << l)) {
|
||||||
@@ -290,7 +288,9 @@ uint8_t nr_generate_pdsch(PHY_VARS_gNB *gNB,
|
|||||||
uint16_t start_sc = frame_parms->first_carrier_offset + (rel15->rbStart+rel15->BWPStart)*NR_NB_SC_PER_RB;
|
uint16_t start_sc = frame_parms->first_carrier_offset + (rel15->rbStart+rel15->BWPStart)*NR_NB_SC_PER_RB;
|
||||||
if (start_sc >= frame_parms->ofdm_symbol_size)
|
if (start_sc >= frame_parms->ofdm_symbol_size)
|
||||||
start_sc -= frame_parms->ofdm_symbol_size;
|
start_sc -= frame_parms->ofdm_symbol_size;
|
||||||
|
|
||||||
|
int txdataF_offset = (slot%2)*frame_parms->samples_per_slot_wCP;
|
||||||
|
|
||||||
#ifdef DEBUG_DLSCH_MAPPING
|
#ifdef DEBUG_DLSCH_MAPPING
|
||||||
printf("PDSCH resource mapping started (start SC %d\tstart symbol %d\tN_PRB %d\tnb_re %d,nb_layers %d)\n",
|
printf("PDSCH resource mapping started (start SC %d\tstart symbol %d\tN_PRB %d\tnb_re %d,nb_layers %d)\n",
|
||||||
start_sc, rel15->StartSymbolIndex, rel15->rbSize, nb_re,rel15->nrOfLayers);
|
start_sc, rel15->StartSymbolIndex, rel15->rbSize, nb_re,rel15->nrOfLayers);
|
||||||
@@ -311,9 +311,7 @@ uint8_t nr_generate_pdsch(PHY_VARS_gNB *gNB,
|
|||||||
1+dmrs_Type,ap, Wt[0], Wt[1], Wf[0], Wf[1], delta, l_prime, l0, dmrs_symbol);
|
1+dmrs_Type,ap, Wt[0], Wt[1], Wf[0], Wf[1], delta, l_prime, l0, dmrs_symbol);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
uint16_t m=0, dmrs_idx=0, k=0;
|
uint16_t m=0, dmrs_idx=0;
|
||||||
|
|
||||||
int txdataF_offset = (slot%2)*frame_parms->samples_per_slot_wCP;
|
|
||||||
|
|
||||||
// Loop Over OFDM symbols:
|
// Loop Over OFDM symbols:
|
||||||
for (int l=rel15->StartSymbolIndex; l<rel15->StartSymbolIndex+rel15->NrOfSymbols; l++) {
|
for (int l=rel15->StartSymbolIndex; l<rel15->StartSymbolIndex+rel15->NrOfSymbols; l++) {
|
||||||
@@ -347,7 +345,7 @@ uint8_t nr_generate_pdsch(PHY_VARS_gNB *gNB,
|
|||||||
nr_modulation(pdsch_dmrs[l][0], (n_ptrs<<1), DMRS_MOD_ORDER, mod_ptrs);
|
nr_modulation(pdsch_dmrs[l][0], (n_ptrs<<1), DMRS_MOD_ORDER, mod_ptrs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
k = start_sc;
|
uint16_t k = start_sc;
|
||||||
// Loop Over SCs:
|
// Loop Over SCs:
|
||||||
for (int i=0; i<rel15->rbSize*NR_NB_SC_PER_RB; i++) {
|
for (int i=0; i<rel15->rbSize*NR_NB_SC_PER_RB; i++) {
|
||||||
/* check if cuurent RE is PTRS RE*/
|
/* check if cuurent RE is PTRS RE*/
|
||||||
@@ -367,12 +365,12 @@ uint8_t nr_generate_pdsch(PHY_VARS_gNB *gNB,
|
|||||||
|
|
||||||
/* Map DMRS Symbol */
|
/* Map DMRS Symbol */
|
||||||
if ( ( dmrs_symbol_map & (1 << l) ) && (k == ((start_sc+get_dmrs_freq_idx(n, k_prime, delta, dmrs_Type))%(frame_parms->ofdm_symbol_size)))) {
|
if ( ( dmrs_symbol_map & (1 << l) ) && (k == ((start_sc+get_dmrs_freq_idx(n, k_prime, delta, dmrs_Type))%(frame_parms->ofdm_symbol_size)))) {
|
||||||
((int16_t*)txdataF[ap])[((l*frame_parms->ofdm_symbol_size + k)<<1) + (2*txdataF_offset)] = (Wt[l_prime]*Wf[k_prime]*amp*mod_dmrs[l][dmrs_idx<<1]) >> 15;
|
txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1) + (2*txdataF_offset)] = (Wt[l_prime]*Wf[k_prime]*amp*mod_dmrs[l][dmrs_idx<<1]) >> 15;
|
||||||
((int16_t*)txdataF[ap])[((l*frame_parms->ofdm_symbol_size + k)<<1) + 1 + (2*txdataF_offset)] = (Wt[l_prime]*Wf[k_prime]*amp*mod_dmrs[l][(dmrs_idx<<1) + 1]) >> 15;
|
txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1) + 1 + (2*txdataF_offset)] = (Wt[l_prime]*Wf[k_prime]*amp*mod_dmrs[l][(dmrs_idx<<1) + 1]) >> 15;
|
||||||
#ifdef DEBUG_DLSCH_MAPPING
|
#ifdef DEBUG_DLSCH_MAPPING
|
||||||
printf("dmrs_idx %d\t l %d \t k %d \t k_prime %d \t n %d \t txdataF: %d %d\n",
|
printf("dmrs_idx %d\t l %d \t k %d \t k_prime %d \t n %d \t txdataF: %d %d\n",
|
||||||
dmrs_idx, l, k, k_prime, n, ((int16_t*)txdataF[ap])[((l*frame_parms->ofdm_symbol_size + k)<<1) + (2*txdataF_offset)],
|
dmrs_idx, l, k, k_prime, n, txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1) + (2*txdataF_offset)],
|
||||||
((int16_t*)txdataF[ap])[((l*frame_parms->ofdm_symbol_size + k)<<1) + 1 + (2*txdataF_offset)]);
|
txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1) + 1 + (2*txdataF_offset)]);
|
||||||
#endif
|
#endif
|
||||||
dmrs_idx++;
|
dmrs_idx++;
|
||||||
k_prime++;
|
k_prime++;
|
||||||
@@ -381,8 +379,8 @@ uint8_t nr_generate_pdsch(PHY_VARS_gNB *gNB,
|
|||||||
}
|
}
|
||||||
/* Map PTRS Symbol */
|
/* Map PTRS Symbol */
|
||||||
else if(is_ptrs_re){
|
else if(is_ptrs_re){
|
||||||
((int16_t*)txdataF[ap])[((l*frame_parms->ofdm_symbol_size + k)<<1) + (2*txdataF_offset)] = (beta_ptrs*amp*mod_ptrs[ptrs_idx<<1]) >> 15;
|
txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1) + (2*txdataF_offset)] = (beta_ptrs*amp*mod_ptrs[ptrs_idx<<1]) >> 15;
|
||||||
((int16_t*)txdataF[ap])[((l*frame_parms->ofdm_symbol_size + k)<<1) + 1 + (2*txdataF_offset)] = (beta_ptrs*amp*mod_ptrs[(ptrs_idx<<1) + 1])>> 15;
|
txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1) + 1 + (2*txdataF_offset)] = (beta_ptrs*amp*mod_ptrs[(ptrs_idx<<1) + 1])>> 15;
|
||||||
#ifdef DEBUG_DLSCH_MAPPING
|
#ifdef DEBUG_DLSCH_MAPPING
|
||||||
printf("ptrs_idx %d\t l %d \t k %d \t k_prime %d \t n %d \t txdataF: %d %d\n",
|
printf("ptrs_idx %d\t l %d \t k %d \t k_prime %d \t n %d \t txdataF: %d %d\n",
|
||||||
ptrs_idx, l, k, k_prime, n, ((int16_t*)txdataF[ap])[((l*frame_parms->ofdm_symbol_size + k)<<1) + (2*txdataF_offset)],
|
ptrs_idx, l, k, k_prime, n, ((int16_t*)txdataF[ap])[((l*frame_parms->ofdm_symbol_size + k)<<1) + (2*txdataF_offset)],
|
||||||
@@ -391,17 +389,20 @@ uint8_t nr_generate_pdsch(PHY_VARS_gNB *gNB,
|
|||||||
ptrs_idx++;
|
ptrs_idx++;
|
||||||
}
|
}
|
||||||
/* Map DATA Symbol */
|
/* Map DATA Symbol */
|
||||||
else {
|
else if( (!(dmrs_symbol_map & (1 << l))) || allowed_xlsch_re_in_dmrs_symbol(k,start_sc,frame_parms->ofdm_symbol_size,rel15->numDmrsCdmGrpsNoData,dmrs_Type)) {
|
||||||
if( (!(dmrs_symbol_map & (1 << l))) || allowed_xlsch_re_in_dmrs_symbol(k,start_sc,frame_parms->ofdm_symbol_size,rel15->numDmrsCdmGrpsNoData,dmrs_Type)) {
|
txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1) + (2*txdataF_offset)] = (amp * tx_layers[ap][m<<1]) >> 15;
|
||||||
((int16_t*)txdataF[ap])[((l*frame_parms->ofdm_symbol_size + k)<<1) + (2*txdataF_offset)] = (amp * tx_layers[ap][m<<1]) >> 15;
|
txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1) + 1 + (2*txdataF_offset)] = (amp * tx_layers[ap][(m<<1) + 1]) >> 15;
|
||||||
((int16_t*)txdataF[ap])[((l*frame_parms->ofdm_symbol_size + k)<<1) + 1 + (2*txdataF_offset)] = (amp * tx_layers[ap][(m<<1) + 1]) >> 15;
|
|
||||||
#ifdef DEBUG_DLSCH_MAPPING
|
#ifdef DEBUG_DLSCH_MAPPING
|
||||||
printf("m %d\t l %d \t k %d \t txdataF: %d %d\n",
|
printf("m %d\t l %d \t k %d \t txdataF: %d %d\n",
|
||||||
m, l, k, ((int16_t*)txdataF[ap])[((l*frame_parms->ofdm_symbol_size + k)<<1) + (2*txdataF_offset)],
|
m, l, k, txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1) + (2*txdataF_offset)],
|
||||||
((int16_t*)txdataF[ap])[((l*frame_parms->ofdm_symbol_size + k)<<1) + 1 + (2*txdataF_offset)]);
|
txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1) + 1 + (2*txdataF_offset)]);
|
||||||
#endif
|
#endif
|
||||||
m++;
|
m++;
|
||||||
}
|
}
|
||||||
|
/* mute RE */
|
||||||
|
else {
|
||||||
|
txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1) + (2*txdataF_offset)] = 0;
|
||||||
|
txdataF_precoding[ap][((l*frame_parms->ofdm_symbol_size + k)<<1) + 1 + (2*txdataF_offset)] = 0;
|
||||||
}
|
}
|
||||||
if (++k >= frame_parms->ofdm_symbol_size)
|
if (++k >= frame_parms->ofdm_symbol_size)
|
||||||
k -= frame_parms->ofdm_symbol_size;
|
k -= frame_parms->ofdm_symbol_size;
|
||||||
@@ -409,6 +410,100 @@ uint8_t nr_generate_pdsch(PHY_VARS_gNB *gNB,
|
|||||||
} // symbol loop
|
} // symbol loop
|
||||||
}// layer loop
|
}// layer loop
|
||||||
|
|
||||||
|
///Layer Precoding and Antenna port mapping
|
||||||
|
// tx_layers 1-8 are mapped on antenna ports 1000-1007
|
||||||
|
// The precoding info is supported by nfapi such as numPRGs, prgSize, and PMIdx
|
||||||
|
// The same precoding matrix is applied on prgSize RBs, Thus
|
||||||
|
// pmi = PMIdx[rbidx/prgSize], rbidx =0,...,rbSize-1
|
||||||
|
// The Precoding matrix:
|
||||||
|
// The Codebook Type I and Type II are not supported yet.
|
||||||
|
// We adopt the precoding matrices of PUSCH for 4 layers.
|
||||||
|
if ((frame_parms->nb_antennas_tx == 1 && rel15->nrOfLayers == 1) || rel15->precodingAndBeamforming.prgSize == 0) {//No precoding if precoding info is not available
|
||||||
|
for (int ap=0; ap<frame_parms->nb_antennas_tx; ap++) {//frame_parms->nb_antennas_tx rel15->nrOfLayers
|
||||||
|
if(ap<rel15->nrOfLayers)
|
||||||
|
memcpy((void*)&txdataF[ap][rel15->StartSymbolIndex*frame_parms->ofdm_symbol_size + txdataF_offset],
|
||||||
|
(void*)&txdataF_precoding[ap][2*(rel15->StartSymbolIndex*frame_parms->ofdm_symbol_size + txdataF_offset)],
|
||||||
|
rel15->NrOfSymbols*frame_parms->ofdm_symbol_size*sizeof(int32_t));
|
||||||
|
else
|
||||||
|
memset((void*)&txdataF[ap][rel15->StartSymbolIndex*frame_parms->ofdm_symbol_size + txdataF_offset],
|
||||||
|
0,
|
||||||
|
rel15->NrOfSymbols*frame_parms->ofdm_symbol_size*sizeof(int32_t));
|
||||||
|
}
|
||||||
|
} else {//apply precoding
|
||||||
|
uint8_t pmi;
|
||||||
|
for (int ap=0; ap<frame_parms->nb_antennas_tx; ap++) {
|
||||||
|
|
||||||
|
for (int l=rel15->StartSymbolIndex; l<rel15->StartSymbolIndex+rel15->NrOfSymbols; l++) {
|
||||||
|
uint16_t k = start_sc;
|
||||||
|
|
||||||
|
for (int rb=0; rb<rel15->rbSize; rb++) {
|
||||||
|
//get pmi info
|
||||||
|
if (rel15->precodingAndBeamforming.prgSize > 0)
|
||||||
|
pmi = rel15->precodingAndBeamforming.PMIdx[(int)rb/rel15->precodingAndBeamforming.prgSize];
|
||||||
|
else
|
||||||
|
pmi = 0;//no precoding
|
||||||
|
|
||||||
|
//get the precoding matrix weights:
|
||||||
|
char *W_prec;
|
||||||
|
switch (frame_parms->nb_antennas_tx) {
|
||||||
|
case 1://1 antenna port
|
||||||
|
W_prec = nr_W_1l_2p[pmi][ap];
|
||||||
|
break;
|
||||||
|
case 2://2 antenna ports
|
||||||
|
if (rel15->nrOfLayers == 1)//1 layer
|
||||||
|
W_prec = nr_W_1l_2p[pmi][ap];
|
||||||
|
else//2 layers
|
||||||
|
W_prec = nr_W_2l_2p[pmi][ap];
|
||||||
|
break;
|
||||||
|
case 4://4 antenna ports
|
||||||
|
if (rel15->nrOfLayers == 1)//1 layer
|
||||||
|
W_prec = nr_W_1l_4p[pmi][ap];
|
||||||
|
else if (rel15->nrOfLayers == 2)//2 layers
|
||||||
|
W_prec = nr_W_2l_4p[pmi][ap];
|
||||||
|
else if (rel15->nrOfLayers == 3)//3 layers
|
||||||
|
W_prec = nr_W_3l_4p[pmi][ap];
|
||||||
|
else//4 layers
|
||||||
|
W_prec = nr_W_4l_4p[pmi][ap];
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
LOG_D(PHY,"Precoding 1,2, or 4 antenna ports are currently supported\n");
|
||||||
|
W_prec = nr_W_1l_2p[pmi][ap];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (pmi == 0) {//unitary Precoding
|
||||||
|
if(ap<rel15->nrOfLayers)
|
||||||
|
memcpy((void*)&txdataF[ap][l*frame_parms->ofdm_symbol_size + txdataF_offset + k],
|
||||||
|
(void*)&txdataF_precoding[ap][2*(l*frame_parms->ofdm_symbol_size + txdataF_offset+ k)],
|
||||||
|
NR_NB_SC_PER_RB*sizeof(int32_t));
|
||||||
|
else
|
||||||
|
memset((void*)&txdataF[ap][rel15->StartSymbolIndex*frame_parms->ofdm_symbol_size + txdataF_offset +k],
|
||||||
|
0,
|
||||||
|
NR_NB_SC_PER_RB*sizeof(int32_t));
|
||||||
|
k += NR_NB_SC_PER_RB;
|
||||||
|
if (k >= frame_parms->ofdm_symbol_size) {
|
||||||
|
k -= frame_parms->ofdm_symbol_size;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
for (int i=0; i<NR_NB_SC_PER_RB; i++) {
|
||||||
|
int32_t re_offset = l*frame_parms->ofdm_symbol_size + k;
|
||||||
|
int32_t precodatatx_F = nr_layer_precoder(txdataF_precoding, W_prec, rel15->nrOfLayers, re_offset+txdataF_offset);
|
||||||
|
((int16_t*)txdataF[ap])[(re_offset<<1) + (2*txdataF_offset)] = ((int16_t *) &precodatatx_F)[0];
|
||||||
|
((int16_t*)txdataF[ap])[(re_offset<<1) + 1 + (2*txdataF_offset)] = ((int16_t *) &precodatatx_F)[1];
|
||||||
|
#ifdef DEBUG_DLSCH_MAPPING
|
||||||
|
printf("antenna %d\t l %d \t k %d \t txdataF: %d %d\n",
|
||||||
|
ap, l, k, ((int16_t*)txdataF[ap])[(re_offset<<1) + (2*txdataF_offset)],
|
||||||
|
((int16_t*)txdataF[ap])[(re_offset<<1) + 1 + (2*txdataF_offset)]);
|
||||||
|
#endif
|
||||||
|
if (++k >= frame_parms->ofdm_symbol_size) {
|
||||||
|
k -= frame_parms->ofdm_symbol_size;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} //RB loop
|
||||||
|
} // symbol loop
|
||||||
|
}// port loop
|
||||||
|
}
|
||||||
|
|
||||||
dlsch->slot_tx[slot]=0;
|
dlsch->slot_tx[slot]=0;
|
||||||
}// dlsch loop
|
}// dlsch loop
|
||||||
|
|||||||
@@ -61,10 +61,8 @@ void free_gNB_dlsch(NR_gNB_DLSCH_t **dlschptr, uint16_t N_RB)
|
|||||||
if (N_RB != 273) {
|
if (N_RB != 273) {
|
||||||
a_segments = a_segments*N_RB;
|
a_segments = a_segments*N_RB;
|
||||||
a_segments = a_segments/273 +1;
|
a_segments = a_segments/273 +1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef DEBUG_DLSCH_FREE
|
#ifdef DEBUG_DLSCH_FREE
|
||||||
LOG_D(PHY,"Freeing dlsch %p\n",dlsch);
|
LOG_D(PHY,"Freeing dlsch %p\n",dlsch);
|
||||||
#endif
|
#endif
|
||||||
@@ -133,7 +131,7 @@ NR_gNB_DLSCH_t *new_gNB_dlsch(NR_DL_FRAME_PARMS *frame_parms,
|
|||||||
if (N_RB != 273) {
|
if (N_RB != 273) {
|
||||||
a_segments = a_segments*N_RB;
|
a_segments = a_segments*N_RB;
|
||||||
a_segments = a_segments/273 +1;
|
a_segments = a_segments/273 +1;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16_t dlsch_bytes = a_segments*1056; // allocated bytes per segment
|
uint16_t dlsch_bytes = a_segments*1056; // allocated bytes per segment
|
||||||
|
|
||||||
@@ -145,31 +143,30 @@ NR_gNB_DLSCH_t *new_gNB_dlsch(NR_DL_FRAME_PARMS *frame_parms,
|
|||||||
dlsch->Mdlharq = Mdlharq;
|
dlsch->Mdlharq = Mdlharq;
|
||||||
dlsch->Mlimit = 4;
|
dlsch->Mlimit = 4;
|
||||||
dlsch->Nsoft = Nsoft;
|
dlsch->Nsoft = Nsoft;
|
||||||
|
|
||||||
for (layer=0; layer<NR_MAX_NB_LAYERS; layer++) {
|
|
||||||
dlsch->ue_spec_bf_weights[layer] = (int32_t **)malloc16(64 * sizeof(int32_t *));
|
|
||||||
|
|
||||||
for (aa = 0; aa < 64; aa++) {
|
for (layer=0; layer<NR_MAX_NB_LAYERS; layer++) {
|
||||||
dlsch->ue_spec_bf_weights[layer][aa] = (int32_t *)malloc16(OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES * sizeof(int32_t));
|
dlsch->ue_spec_bf_weights[layer] = (int32_t**)malloc16(64*sizeof(int32_t*));
|
||||||
for (re = 0; re < OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES; re++) {
|
|
||||||
|
for (aa=0; aa<64; aa++) {
|
||||||
|
dlsch->ue_spec_bf_weights[layer][aa] = (int32_t *)malloc16(OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES*sizeof(int32_t));
|
||||||
|
for (re=0;re<OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES; re++) {
|
||||||
dlsch->ue_spec_bf_weights[layer][aa][re] = 0x00007fff;
|
dlsch->ue_spec_bf_weights[layer][aa][re] = 0x00007fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dlsch->txdataF[layer] =
|
dlsch->txdataF[layer] = (int32_t *)malloc16((NR_MAX_PDSCH_ENCODED_LENGTH/NR_MAX_NB_LAYERS)*sizeof(int32_t)); // NR_MAX_NB_LAYERS is already included in NR_MAX_PDSCH_ENCODED_LENGTH
|
||||||
(int32_t *)malloc16((NR_MAX_PDSCH_ENCODED_LENGTH / NR_MAX_NB_LAYERS)
|
dlsch->txdataF_precoding[layer] = (int32_t *)malloc16(2*14*frame_parms->ofdm_symbol_size*sizeof(int32_t));
|
||||||
* sizeof(int32_t)); // NR_MAX_NB_LAYERS is already included in NR_MAX_PDSCH_ENCODED_LENGTH
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int q = 0; q < NR_MAX_NB_CODEWORDS; q++)
|
for (int q=0; q<NR_MAX_NB_CODEWORDS; q++)
|
||||||
dlsch->mod_symbs[q] = (int32_t *)malloc16(NR_MAX_PDSCH_ENCODED_LENGTH * sizeof(int32_t));
|
dlsch->mod_symbs[q] = (int32_t *)malloc16(NR_MAX_PDSCH_ENCODED_LENGTH*sizeof(int32_t));
|
||||||
|
|
||||||
dlsch->calib_dl_ch_estimates = (int32_t **)malloc16(64 * sizeof(int32_t *));
|
dlsch->calib_dl_ch_estimates = (int32_t**)malloc16(64*sizeof(int32_t*));
|
||||||
for (aa = 0; aa < 64; aa++) {
|
for (aa=0; aa<64; aa++) {
|
||||||
dlsch->calib_dl_ch_estimates[aa] = (int32_t *)malloc16(OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES * sizeof(int32_t));
|
dlsch->calib_dl_ch_estimates[aa] = (int32_t *)malloc16(OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES*sizeof(int32_t));
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < 20; i++) {
|
for (i=0; i<20; i++) {
|
||||||
dlsch->harq_ids[0][i] = 0;
|
dlsch->harq_ids[0][i] = 0;
|
||||||
dlsch->harq_ids[1][i] = 0;
|
dlsch->harq_ids[1][i] = 0;
|
||||||
}
|
}
|
||||||
@@ -268,7 +265,6 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB,
|
|||||||
float Coderate = 0.0;
|
float Coderate = 0.0;
|
||||||
uint8_t Nl = 4;
|
uint8_t Nl = 4;
|
||||||
|
|
||||||
|
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_DLSCH_ENCODING, VCD_FUNCTION_IN);
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_DLSCH_ENCODING, VCD_FUNCTION_IN);
|
||||||
|
|
||||||
A = rel15->TBSize[0]<<3;
|
A = rel15->TBSize[0]<<3;
|
||||||
@@ -304,7 +300,7 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB,
|
|||||||
a[2+(A>>3)] = ((uint8_t*)&crc)[0];
|
a[2+(A>>3)] = ((uint8_t*)&crc)[0];
|
||||||
//printf("CRC %x (A %d)\n",crc,A);
|
//printf("CRC %x (A %d)\n",crc,A);
|
||||||
//printf("a0 %d a1 %d a2 %d\n", a[A>>3], a[1+(A>>3)], a[2+(A>>3)]);
|
//printf("a0 %d a1 %d a2 %d\n", a[A>>3], a[1+(A>>3)], a[2+(A>>3)]);
|
||||||
|
|
||||||
harq->B = A+24;
|
harq->B = A+24;
|
||||||
// harq->b = a;
|
// harq->b = a;
|
||||||
|
|
||||||
@@ -323,7 +319,7 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB,
|
|||||||
a[1+(A>>3)] = ((uint8_t*)&crc)[0];
|
a[1+(A>>3)] = ((uint8_t*)&crc)[0];
|
||||||
//printf("CRC %x (A %d)\n",crc,A);
|
//printf("CRC %x (A %d)\n",crc,A);
|
||||||
//printf("a0 %d a1 %d \n", a[A>>3], a[1+(A>>3)]);
|
//printf("a0 %d a1 %d \n", a[A>>3], a[1+(A>>3)]);
|
||||||
|
|
||||||
harq->B = A+16;
|
harq->B = A+16;
|
||||||
// harq->b = a;
|
// harq->b = a;
|
||||||
|
|
||||||
@@ -339,17 +335,17 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB,
|
|||||||
Coderate = (float) R /(float) 1024;
|
Coderate = (float) R /(float) 1024;
|
||||||
else // to scale for mcs 20 and 26 in table 5.1.3.1-2 which are decimal and input 2* in nr_tbs_tools
|
else // to scale for mcs 20 and 26 in table 5.1.3.1-2 which are decimal and input 2* in nr_tbs_tools
|
||||||
Coderate = (float) R /(float) 2048;
|
Coderate = (float) R /(float) 2048;
|
||||||
|
|
||||||
if ((A <=292) || ((A<=3824) && (Coderate <= 0.6667)) || Coderate <= 0.25)
|
if ((A <=292) || ((A<=3824) && (Coderate <= 0.6667)) || Coderate <= 0.25)
|
||||||
harq->BG = 2;
|
harq->BG = 2;
|
||||||
else
|
else
|
||||||
harq->BG = 1;
|
harq->BG = 1;
|
||||||
|
|
||||||
start_meas(dlsch_segmentation_stats);
|
start_meas(dlsch_segmentation_stats);
|
||||||
Kb = nr_segmentation(harq->b, harq->c, harq->B, &harq->C, &harq->K, Zc, &harq->F, harq->BG);
|
Kb = nr_segmentation(harq->b, harq->c, harq->B, &harq->C, &harq->K, Zc, &harq->F, harq->BG);
|
||||||
stop_meas(dlsch_segmentation_stats);
|
stop_meas(dlsch_segmentation_stats);
|
||||||
F = harq->F;
|
F = harq->F;
|
||||||
|
|
||||||
Kr = harq->K;
|
Kr = harq->K;
|
||||||
#ifdef DEBUG_DLSCH_CODING
|
#ifdef DEBUG_DLSCH_CODING
|
||||||
uint16_t Kr_bytes;
|
uint16_t Kr_bytes;
|
||||||
@@ -357,7 +353,7 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
//printf("segment Z %d k %d Kr %d BG %d C %d\n", *Zc,harq->K,Kr,BG,harq->C);
|
//printf("segment Z %d k %d Kr %d BG %d C %d\n", *Zc,harq->K,Kr,BG,harq->C);
|
||||||
|
|
||||||
for (r=0; r<harq->C; r++) {
|
for (r=0; r<harq->C; r++) {
|
||||||
//d_tmp[r] = &harq->d[r][0];
|
//d_tmp[r] = &harq->d[r][0];
|
||||||
//channel_input[r] = &harq->d[r][0];
|
//channel_input[r] = &harq->d[r][0];
|
||||||
@@ -369,7 +365,7 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB,
|
|||||||
LOG_D(PHY,"%d ", harq->c[r][cnt]);
|
LOG_D(PHY,"%d ", harq->c[r][cnt]);
|
||||||
}
|
}
|
||||||
LOG_D(PHY,"\n");
|
LOG_D(PHY,"\n");
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
//ldpc_encoder_orig((unsigned char*)harq->c[r],harq->d[r],*Zc,Kb,Kr,BG,0);
|
//ldpc_encoder_orig((unsigned char*)harq->c[r],harq->d[r],*Zc,Kb,Kr,BG,0);
|
||||||
//ldpc_encoder_optim((unsigned char*)harq->c[r],(unsigned char*)&harq->d[r][0],*Zc,Kb,Kr,BG,NULL,NULL,NULL,NULL);
|
//ldpc_encoder_optim((unsigned char*)harq->c[r],(unsigned char*)&harq->d[r][0],*Zc,Kb,Kr,BG,NULL,NULL,NULL,NULL);
|
||||||
@@ -380,23 +376,22 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB,
|
|||||||
impp.tinput = tinput;
|
impp.tinput = tinput;
|
||||||
impp.tparity = tparity;
|
impp.tparity = tparity;
|
||||||
impp.toutput = toutput;
|
impp.toutput = toutput;
|
||||||
|
|
||||||
for(int j=0;j<(harq->C/8+1);j++) {
|
for(int j=0;j<(harq->C/8+1);j++) {
|
||||||
impp.macro_num=j;
|
impp.macro_num=j;
|
||||||
nrLDPC_encoder(harq->c,harq->d,*Zc,Kb,Kr,harq->BG,&impp);
|
nrLDPC_encoder(harq->c,harq->d,*Zc,Kb,Kr,harq->BG,&impp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef DEBUG_DLSCH_CODING
|
#ifdef DEBUG_DLSCH_CODING
|
||||||
write_output("enc_input0.m","enc_in0",&harq->c[0][0],Kr_bytes,1,4);
|
write_output("enc_input0.m","enc_in0",&harq->c[0][0],Kr_bytes,1,4);
|
||||||
write_output("enc_output0.m","enc0",&harq->d[0][0],(3*8*Kr_bytes)+12,1,4);
|
write_output("enc_output0.m","enc0",&harq->d[0][0],(3*8*Kr_bytes)+12,1,4);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
F = harq->F;
|
F = harq->F;
|
||||||
|
|
||||||
Kr = harq->K;
|
Kr = harq->K;
|
||||||
for (r=0; r<harq->C; r++) {
|
for (r=0; r<harq->C; r++) {
|
||||||
|
|
||||||
if (F>0) {
|
if (F>0) {
|
||||||
for (int k=(Kr-F-2*(*Zc)); k<Kr-2*(*Zc); k++) {
|
for (int k=(Kr-F-2*(*Zc)); k<Kr-2*(*Zc); k++) {
|
||||||
// writing into positions d[r][k-2Zc] as in clause 5.3.2 step 2) in 38.212
|
// writing into positions d[r][k-2Zc] as in clause 5.3.2 step 2) in 38.212
|
||||||
@@ -405,15 +400,13 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB,
|
|||||||
//printf("r %d filler bits [%d] = %d \n", r,k, harq->d[r][k]);
|
//printf("r %d filler bits [%d] = %d \n", r,k, harq->d[r][k]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef DEBUG_DLSCH_CODING
|
#ifdef DEBUG_DLSCH_CODING
|
||||||
LOG_D(PHY,"rvidx in encoding = %d\n", rel15->rvIndex[0]);
|
LOG_D(PHY,"rvidx in encoding = %d\n", rel15->rvIndex[0]);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
E = nr_get_E(G, harq->C, mod_order, rel15->nrOfLayers, r);
|
E = nr_get_E(G, harq->C, mod_order, rel15->nrOfLayers, r);
|
||||||
|
|
||||||
//#ifdef DEBUG_DLSCH_CODING
|
//#ifdef DEBUG_DLSCH_CODING
|
||||||
LOG_D(PHY,"Rate Matching, Code segment %d/%d (coded bits (G) %u, E %d, Filler bits %d, Filler offset %d mod_order %d, nb_rb %d)...\n",
|
LOG_D(PHY,"Rate Matching, Code segment %d/%d (coded bits (G) %u, E %d, Filler bits %d, Filler offset %d mod_order %d, nb_rb %d)...\n",
|
||||||
r,
|
r,
|
||||||
@@ -423,13 +416,13 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB,
|
|||||||
F,
|
F,
|
||||||
Kr-F-2*(*Zc),
|
Kr-F-2*(*Zc),
|
||||||
mod_order,nb_rb);
|
mod_order,nb_rb);
|
||||||
|
|
||||||
// for tbslbrm calculation according to 5.4.2.1 of 38.212
|
// for tbslbrm calculation according to 5.4.2.1 of 38.212
|
||||||
if (rel15->nrOfLayers < Nl)
|
if (rel15->nrOfLayers < Nl)
|
||||||
Nl = rel15->nrOfLayers;
|
Nl = rel15->nrOfLayers;
|
||||||
|
|
||||||
Tbslbrm = nr_compute_tbslbrm(rel15->mcsTable[0],nb_rb,Nl);
|
Tbslbrm = nr_compute_tbslbrm(rel15->mcsTable[0],nb_rb,Nl);
|
||||||
|
|
||||||
start_meas(dlsch_rate_matching_stats);
|
start_meas(dlsch_rate_matching_stats);
|
||||||
nr_rate_matching_ldpc(Ilbrm,
|
nr_rate_matching_ldpc(Ilbrm,
|
||||||
Tbslbrm,
|
Tbslbrm,
|
||||||
|
|||||||
@@ -320,7 +320,7 @@ void nr_processULSegment(void* arg) {
|
|||||||
Kr_bytes = Kr>>3;
|
Kr_bytes = Kr>>3;
|
||||||
K_bits_F = Kr-ulsch_harq->F;
|
K_bits_F = Kr-ulsch_harq->F;
|
||||||
|
|
||||||
t_nrLDPC_time_stats procTime;
|
t_nrLDPC_time_stats procTime = {0};
|
||||||
t_nrLDPC_time_stats* p_procTime = &procTime ;
|
t_nrLDPC_time_stats* p_procTime = &procTime ;
|
||||||
|
|
||||||
//start_meas(&phy_vars_gNB->ulsch_deinterleaving_stats);
|
//start_meas(&phy_vars_gNB->ulsch_deinterleaving_stats);
|
||||||
|
|||||||
@@ -345,7 +345,9 @@ void nr_ulsch_extract_rbs_single(int32_t **rxdataF,
|
|||||||
|
|
||||||
n = 0;
|
n = 0;
|
||||||
k_prime = 0;
|
k_prime = 0;
|
||||||
rxF_ext_index = ul_ch0_ext_index = ul_ch0_index = 0; /* In RX Antenna(aarx) loop, Reset the index */
|
rxF_ext_index = 0;
|
||||||
|
ul_ch0_ext_index = 0;
|
||||||
|
ul_ch0_index = 0;
|
||||||
|
|
||||||
if (is_dmrs_symbol == 0) {
|
if (is_dmrs_symbol == 0) {
|
||||||
//
|
//
|
||||||
@@ -407,7 +409,7 @@ void nr_ulsch_scale_channel(int **ul_ch_estimates_ext,
|
|||||||
#if defined(__x86_64__)||defined(__i386__)
|
#if defined(__x86_64__)||defined(__i386__)
|
||||||
|
|
||||||
short rb, ch_amp;
|
short rb, ch_amp;
|
||||||
unsigned char aatx,aarx;
|
unsigned char aarx;
|
||||||
__m128i *ul_ch128, ch_amp128;
|
__m128i *ul_ch128, ch_amp128;
|
||||||
|
|
||||||
// Determine scaling amplitude based the symbol
|
// Determine scaling amplitude based the symbol
|
||||||
@@ -425,8 +427,7 @@ void nr_ulsch_scale_channel(int **ul_ch_estimates_ext,
|
|||||||
int off = 0;
|
int off = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (aatx=0; aatx < frame_parms->nb_antenna_ports_gNB; aatx++) {
|
for (aarx=0; aarx < frame_parms->nb_antennas_rx; aarx++) {
|
||||||
for (aarx=0; aarx < frame_parms->nb_antennas_rx; aarx++) {
|
|
||||||
|
|
||||||
ul_ch128 = (__m128i *)&ul_ch_estimates_ext[aarx][symbol*(off+(nb_rb*NR_NB_SC_PER_RB))];
|
ul_ch128 = (__m128i *)&ul_ch_estimates_ext[aarx][symbol*(off+(nb_rb*NR_NB_SC_PER_RB))];
|
||||||
|
|
||||||
@@ -455,7 +456,6 @@ void nr_ulsch_scale_channel(int **ul_ch_estimates_ext,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -472,6 +472,7 @@ void nr_ulsch_channel_level(int **ul_ch_estimates_ext,
|
|||||||
|
|
||||||
short rb;
|
short rb;
|
||||||
unsigned char aatx, aarx;
|
unsigned char aatx, aarx;
|
||||||
|
char nb_antennas_ue_tx = 1;
|
||||||
__m128i *ul_ch128, avg128U;
|
__m128i *ul_ch128, avg128U;
|
||||||
|
|
||||||
int16_t x = factor2(len);
|
int16_t x = factor2(len);
|
||||||
@@ -483,7 +484,7 @@ void nr_ulsch_channel_level(int **ul_ch_estimates_ext,
|
|||||||
int off = 0;
|
int off = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (aatx = 0; aatx < frame_parms->nb_antennas_tx; aatx++)
|
for (aatx = 0; aatx < nb_antennas_ue_tx; aatx++)
|
||||||
for (aarx = 0; aarx < frame_parms->nb_antennas_rx; aarx++) {
|
for (aarx = 0; aarx < frame_parms->nb_antennas_rx; aarx++) {
|
||||||
//clear average level
|
//clear average level
|
||||||
avg128U = _mm_setzero_si128();
|
avg128U = _mm_setzero_si128();
|
||||||
@@ -624,11 +625,12 @@ void nr_ulsch_channel_compensation(int **rxdataF_ext,
|
|||||||
|
|
||||||
unsigned short rb;
|
unsigned short rb;
|
||||||
unsigned char aatx,aarx;
|
unsigned char aatx,aarx;
|
||||||
|
char nb_antennas_ue_tx = 1;
|
||||||
__m128i *ul_ch128,*ul_ch128_2,*ul_ch_mag128,*ul_ch_mag128b,*rxdataF128,*rxdataF_comp128,*rho128;
|
__m128i *ul_ch128,*ul_ch128_2,*ul_ch_mag128,*ul_ch_mag128b,*rxdataF128,*rxdataF_comp128,*rho128;
|
||||||
__m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp128,QAM_amp128b;
|
__m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp128,QAM_amp128b;
|
||||||
QAM_amp128b = _mm_setzero_si128();
|
QAM_amp128b = _mm_setzero_si128();
|
||||||
|
|
||||||
for (aatx=0; aatx<frame_parms->nb_antennas_tx; aatx++) {
|
for (aatx=0; aatx<nb_antennas_ue_tx; aatx++) {
|
||||||
|
|
||||||
if (mod_order == 4) {
|
if (mod_order == 4) {
|
||||||
QAM_amp128 = _mm_set1_epi16(QAM16_n1); // 2/sqrt(10)
|
QAM_amp128 = _mm_set1_epi16(QAM16_n1); // 2/sqrt(10)
|
||||||
@@ -1164,6 +1166,7 @@ int nr_rx_pusch(PHY_VARS_gNB *gNB,
|
|||||||
uint32_t nb_re_pusch, bwp_start_subcarrier;
|
uint32_t nb_re_pusch, bwp_start_subcarrier;
|
||||||
int avgs;
|
int avgs;
|
||||||
int avg[4];
|
int avg[4];
|
||||||
|
char nb_antennas_ue_tx = 1;
|
||||||
NR_DL_FRAME_PARMS *frame_parms = &gNB->frame_parms;
|
NR_DL_FRAME_PARMS *frame_parms = &gNB->frame_parms;
|
||||||
nfapi_nr_pusch_pdu_t *rel15_ul = &gNB->ulsch[ulsch_id][0]->harq_processes[harq_pid]->ulsch_pdu;
|
nfapi_nr_pusch_pdu_t *rel15_ul = &gNB->ulsch[ulsch_id][0]->harq_processes[harq_pid]->ulsch_pdu;
|
||||||
|
|
||||||
@@ -1263,7 +1266,7 @@ int nr_rx_pusch(PHY_VARS_gNB *gNB,
|
|||||||
|
|
||||||
avgs = 0;
|
avgs = 0;
|
||||||
|
|
||||||
for (aatx=0;aatx<frame_parms->nb_antennas_tx;aatx++)
|
for (aatx=0;aatx<nb_antennas_ue_tx;aatx++)
|
||||||
for (aarx=0;aarx<frame_parms->nb_antennas_rx;aarx++)
|
for (aarx=0;aarx<frame_parms->nb_antennas_rx;aarx++)
|
||||||
avgs = cmax(avgs,avg[(aatx<<1)+aarx]);
|
avgs = cmax(avgs,avg[(aatx<<1)+aarx]);
|
||||||
|
|
||||||
@@ -1281,7 +1284,7 @@ int nr_rx_pusch(PHY_VARS_gNB *gNB,
|
|||||||
gNB->pusch_vars[ulsch_id]->ul_ch_mag0,
|
gNB->pusch_vars[ulsch_id]->ul_ch_mag0,
|
||||||
gNB->pusch_vars[ulsch_id]->ul_ch_magb0,
|
gNB->pusch_vars[ulsch_id]->ul_ch_magb0,
|
||||||
gNB->pusch_vars[ulsch_id]->rxdataF_comp,
|
gNB->pusch_vars[ulsch_id]->rxdataF_comp,
|
||||||
(frame_parms->nb_antennas_tx>1) ? gNB->pusch_vars[ulsch_id]->rho : NULL,
|
(nb_antennas_ue_tx>1) ? gNB->pusch_vars[ulsch_id]->rho : NULL,
|
||||||
frame_parms,
|
frame_parms,
|
||||||
symbol,
|
symbol,
|
||||||
dmrs_symbol_flag,
|
dmrs_symbol_flag,
|
||||||
|
|||||||
@@ -77,9 +77,9 @@ int nr_pbch_dmrs_correlation(PHY_VARS_NR_UE *ue,
|
|||||||
// generate pilot
|
// generate pilot
|
||||||
nr_pbch_dmrs_rx(dmrss,ue->nr_gold_pbch[n_hf][ssb_index], &pilot[0]);
|
nr_pbch_dmrs_rx(dmrss,ue->nr_gold_pbch[n_hf][ssb_index], &pilot[0]);
|
||||||
|
|
||||||
int re_offset = ssb_offset;
|
|
||||||
for (aarx=0; aarx<ue->frame_parms.nb_antennas_rx; aarx++) {
|
for (aarx=0; aarx<ue->frame_parms.nb_antennas_rx; aarx++) {
|
||||||
|
|
||||||
|
int re_offset = ssb_offset;
|
||||||
pil = (int16_t *)&pilot[0];
|
pil = (int16_t *)&pilot[0];
|
||||||
rxF = (int16_t *)&rxdataF[aarx][(symbol_offset+k+re_offset)];
|
rxF = (int16_t *)&rxdataF[aarx][(symbol_offset+k+re_offset)];
|
||||||
|
|
||||||
@@ -277,9 +277,9 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue,
|
|||||||
// generate pilot
|
// generate pilot
|
||||||
nr_pbch_dmrs_rx(dmrss,ue->nr_gold_pbch[n_hf][ssb_index], &pilot[0]);
|
nr_pbch_dmrs_rx(dmrss,ue->nr_gold_pbch[n_hf][ssb_index], &pilot[0]);
|
||||||
|
|
||||||
int re_offset = ssb_offset;
|
|
||||||
for (aarx=0; aarx<ue->frame_parms.nb_antennas_rx; aarx++) {
|
for (aarx=0; aarx<ue->frame_parms.nb_antennas_rx; aarx++) {
|
||||||
|
|
||||||
|
int re_offset = ssb_offset;
|
||||||
pil = (int16_t *)&pilot[0];
|
pil = (int16_t *)&pilot[0];
|
||||||
rxF = (int16_t *)&rxdataF[aarx][(symbol_offset+k+re_offset)];
|
rxF = (int16_t *)&rxdataF[aarx][(symbol_offset+k+re_offset)];
|
||||||
dl_ch = (int16_t *)&dl_ch_estimates[aarx][ch_offset];
|
dl_ch = (int16_t *)&dl_ch_estimates[aarx][ch_offset];
|
||||||
@@ -456,12 +456,12 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue,
|
|||||||
// do ifft of channel estimate
|
// do ifft of channel estimate
|
||||||
for (aarx=0; aarx<ue->frame_parms.nb_antennas_rx; aarx++)
|
for (aarx=0; aarx<ue->frame_parms.nb_antennas_rx; aarx++)
|
||||||
for (p=0; p<ue->frame_parms.nb_antenna_ports_gNB; p++) {
|
for (p=0; p<ue->frame_parms.nb_antenna_ports_gNB; p++) {
|
||||||
if (ue->pbch_vars[eNB_offset]->dl_ch_estimates[(p<<1)+aarx])
|
if (ue->pbch_vars[eNB_offset]->dl_ch_estimates[(p*ue->frame_parms.nb_antennas_rx)+aarx])
|
||||||
{
|
{
|
||||||
LOG_D(PHY,"Channel Impulse Computation Slot %d ThreadId %d Symbol %d ch_offset %d\n", Ns, proc->thread_id, symbol, ch_offset);
|
LOG_D(PHY,"Channel Impulse Computation Slot %d ThreadId %d Symbol %d ch_offset %d\n", Ns, proc->thread_id, symbol, ch_offset);
|
||||||
idft(idftsizeidx,
|
idft(idftsizeidx,
|
||||||
(int16_t*) &ue->pbch_vars[eNB_offset]->dl_ch_estimates[(p<<1)+aarx][ch_offset],
|
(int16_t*) &ue->pbch_vars[eNB_offset]->dl_ch_estimates[(p*ue->frame_parms.nb_antennas_rx)+aarx][ch_offset],
|
||||||
(int16_t*) ue->pbch_vars[eNB_offset]->dl_ch_estimates_time[(p<<1)+aarx],1);
|
(int16_t*) ue->pbch_vars[eNB_offset]->dl_ch_estimates_time[(p*ue->frame_parms.nb_antennas_rx)+aarx],1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -672,7 +672,7 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
|
|||||||
int **rxdataF=ue->common_vars.common_vars_rx_data_per_thread[proc->thread_id].rxdataF;
|
int **rxdataF=ue->common_vars.common_vars_rx_data_per_thread[proc->thread_id].rxdataF;
|
||||||
|
|
||||||
if (ue->high_speed_flag == 0)
|
if (ue->high_speed_flag == 0)
|
||||||
ch_offset = ue->frame_parms.ofdm_symbol_size ;
|
ch_offset = ue->frame_parms.ofdm_symbol_size;
|
||||||
else
|
else
|
||||||
ch_offset = ue->frame_parms.ofdm_symbol_size*symbol;
|
ch_offset = ue->frame_parms.ofdm_symbol_size*symbol;
|
||||||
|
|
||||||
@@ -690,11 +690,11 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
|
|||||||
uint16_t rb_offset = (bwp_start_subcarrier - ue->frame_parms.first_carrier_offset) / 12 - BWPStart;
|
uint16_t rb_offset = (bwp_start_subcarrier - ue->frame_parms.first_carrier_offset) / 12 - BWPStart;
|
||||||
uint8_t config_type = ue->dmrs_DownlinkConfig.pdsch_dmrs_type;
|
uint8_t config_type = ue->dmrs_DownlinkConfig.pdsch_dmrs_type;
|
||||||
int8_t delta = get_delta(p, config_type);
|
int8_t delta = get_delta(p, config_type);
|
||||||
nr_pdsch_dmrs_rx(ue,Ns,ue->nr_gold_pdsch[eNB_offset][Ns][symbol][0], &pilot[0],1000,0,nb_rb_pdsch+rb_offset);
|
nr_pdsch_dmrs_rx(ue,Ns,ue->nr_gold_pdsch[eNB_offset][Ns][symbol][0], &pilot[0],1000+p,0,nb_rb_pdsch+rb_offset);
|
||||||
|
|
||||||
if (config_type == pdsch_dmrs_type1){
|
if (config_type == pdsch_dmrs_type1){
|
||||||
nushift = (p>>1)&1;
|
nushift = (p>>1)&1;
|
||||||
ue->frame_parms.nushift = nushift;
|
if (p<4) ue->frame_parms.nushift = nushift;
|
||||||
switch (delta) {
|
switch (delta) {
|
||||||
|
|
||||||
case 0://port 0,1
|
case 0://port 0,1
|
||||||
@@ -734,7 +734,7 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
|
|||||||
}
|
}
|
||||||
} else {//pdsch_dmrs_type2
|
} else {//pdsch_dmrs_type2
|
||||||
nushift = delta;
|
nushift = delta;
|
||||||
ue->frame_parms.nushift = nushift;
|
if (p<6) ue->frame_parms.nushift = nushift;
|
||||||
switch (delta) {
|
switch (delta) {
|
||||||
case 0://port 0,1
|
case 0://port 0,1
|
||||||
fl = filt8_l2;//left interpolation Filter should be fml
|
fl = filt8_l2;//left interpolation Filter should be fml
|
||||||
|
|||||||
@@ -261,7 +261,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
|
|||||||
int8_t llrProcBuf[NR_LDPC_MAX_NUM_LLR] __attribute__ ((aligned(32)));
|
int8_t llrProcBuf[NR_LDPC_MAX_NUM_LLR] __attribute__ ((aligned(32)));
|
||||||
t_nrLDPC_dec_params decParams;
|
t_nrLDPC_dec_params decParams;
|
||||||
t_nrLDPC_dec_params* p_decParams = &decParams;
|
t_nrLDPC_dec_params* p_decParams = &decParams;
|
||||||
t_nrLDPC_time_stats procTime;
|
t_nrLDPC_time_stats procTime = {0};
|
||||||
t_nrLDPC_time_stats* p_procTime =&procTime ;
|
t_nrLDPC_time_stats* p_procTime =&procTime ;
|
||||||
|
|
||||||
if (!harq_process) {
|
if (!harq_process) {
|
||||||
@@ -678,7 +678,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
|
|||||||
|
|
||||||
memcpy(harq_process->b+offset,
|
memcpy(harq_process->b+offset,
|
||||||
harq_process->c[r],
|
harq_process->c[r],
|
||||||
Kr_bytes- - (harq_process->F>>3) -((harq_process->C>1)?3:0));
|
Kr_bytes - (harq_process->F>>3) - ((harq_process->C>1)?3:0));
|
||||||
offset += (Kr_bytes - (harq_process->F>>3) - ((harq_process->C>1)?3:0));
|
offset += (Kr_bytes - (harq_process->F>>3) - ((harq_process->C>1)?3:0));
|
||||||
|
|
||||||
if (LOG_DEBUGFLAG(DEBUG_DLSCH_DECOD))
|
if (LOG_DEBUGFLAG(DEBUG_DLSCH_DECOD))
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -60,16 +60,15 @@ uint16_t nr_pbch_extract(int **rxdataF,
|
|||||||
uint8_t i,j,aarx;
|
uint8_t i,j,aarx;
|
||||||
int32_t *dl_ch0,*dl_ch0_ext,*rxF,*rxF_ext;
|
int32_t *dl_ch0,*dl_ch0_ext,*rxF,*rxF_ext;
|
||||||
int nushiftmod4 = frame_parms->nushift;
|
int nushiftmod4 = frame_parms->nushift;
|
||||||
unsigned int rx_offset = frame_parms->first_carrier_offset + frame_parms->ssb_start_subcarrier; //and
|
|
||||||
|
|
||||||
// if (rx_offset>= frame_parms->ofdm_symbol_size) rx_offset-=frame_parms->ofdm_symbol_size;
|
|
||||||
rx_offset=(rx_offset)%(frame_parms->ofdm_symbol_size);
|
|
||||||
|
|
||||||
AssertFatal(symbol>=1 && symbol<5,
|
AssertFatal(symbol>=1 && symbol<5,
|
||||||
"symbol %d illegal for PBCH extraction\n",
|
"symbol %d illegal for PBCH extraction\n",
|
||||||
symbol);
|
symbol);
|
||||||
|
|
||||||
for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
|
for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
|
||||||
|
unsigned int rx_offset = frame_parms->first_carrier_offset + frame_parms->ssb_start_subcarrier;
|
||||||
|
rx_offset = (rx_offset)%(frame_parms->ofdm_symbol_size);
|
||||||
|
|
||||||
rxF = &rxdataF[aarx][(symbol+s_offset)*frame_parms->ofdm_symbol_size];
|
rxF = &rxdataF[aarx][(symbol+s_offset)*frame_parms->ofdm_symbol_size];
|
||||||
rxF_ext = &rxdataF_ext[aarx][symbol*20*12];
|
rxF_ext = &rxdataF_ext[aarx][symbol*20*12];
|
||||||
#ifdef DEBUG_PBCH
|
#ifdef DEBUG_PBCH
|
||||||
|
|||||||
@@ -686,11 +686,8 @@ void dlsch_detection_mrc_TM34(NR_DL_FRAME_PARMS *frame_parms,
|
|||||||
int32_t **dl_ch_estimates,
|
int32_t **dl_ch_estimates,
|
||||||
int32_t **rxdataF_ext,
|
int32_t **rxdataF_ext,
|
||||||
int32_t **dl_ch_estimates_ext,
|
int32_t **dl_ch_estimates_ext,
|
||||||
uint16_t pmi,
|
|
||||||
uint8_t *pmi_ext,
|
|
||||||
uint32_t *rb_alloc,
|
uint32_t *rb_alloc,
|
||||||
uint8_t symbol,
|
uint8_t symbol,
|
||||||
uint8_t nr_slot_rx,
|
|
||||||
NR_DL_FRAME_PARMS *frame_parms)
|
NR_DL_FRAME_PARMS *frame_parms)
|
||||||
\brief This function extracts the received resource blocks, both channel estimates and data symbols,
|
\brief This function extracts the received resource blocks, both channel estimates and data symbols,
|
||||||
for the current allocation and for single antenna eNB transmission.
|
for the current allocation and for single antenna eNB transmission.
|
||||||
@@ -698,67 +695,61 @@ void dlsch_detection_mrc_TM34(NR_DL_FRAME_PARMS *frame_parms,
|
|||||||
@param dl_ch_estimates Channel estimates of current slot
|
@param dl_ch_estimates Channel estimates of current slot
|
||||||
@param rxdataF_ext FFT output for RBs in this allocation
|
@param rxdataF_ext FFT output for RBs in this allocation
|
||||||
@param dl_ch_estimates_ext Channel estimates for RBs in this allocation
|
@param dl_ch_estimates_ext Channel estimates for RBs in this allocation
|
||||||
@param pmi subband Precoding matrix indicator
|
|
||||||
@param pmi_ext Extracted PMI for chosen RBs
|
|
||||||
@param rb_alloc RB allocation vector
|
@param rb_alloc RB allocation vector
|
||||||
@param symbol Symbol to extract
|
@param symbol Symbol to extract
|
||||||
@param nr_slot_rx Slot number
|
@param n_dmrs_cdm_groups
|
||||||
@param high_speed_flag
|
|
||||||
@param frame_parms Pointer to frame descriptor
|
@param frame_parms Pointer to frame descriptor
|
||||||
*/
|
*/
|
||||||
unsigned short nr_dlsch_extract_rbs_single(int **rxdataF,
|
unsigned short nr_dlsch_extract_rbs_single(int **rxdataF,
|
||||||
int **dl_ch_estimates,
|
int **dl_ch_estimates,
|
||||||
int **rxdataF_ext,
|
int **rxdataF_ext,
|
||||||
int **dl_ch_estimates_ext,
|
int **dl_ch_estimates_ext,
|
||||||
unsigned short pmi,
|
|
||||||
unsigned char *pmi_ext,
|
|
||||||
unsigned char symbol,
|
unsigned char symbol,
|
||||||
uint8_t pilots,
|
uint8_t pilots,
|
||||||
uint8_t config_type,
|
uint8_t config_type,
|
||||||
unsigned short start_rb,
|
unsigned short start_rb,
|
||||||
unsigned short nb_pdsch_rb,
|
unsigned short nb_rb_pdsch,
|
||||||
unsigned char nr_slot_rx,
|
uint8_t n_dmrs_cdm_groups,
|
||||||
uint32_t high_speed_flag,
|
|
||||||
NR_DL_FRAME_PARMS *frame_parms,
|
NR_DL_FRAME_PARMS *frame_parms,
|
||||||
uint16_t dlDmrsSymbPos);
|
uint16_t dlDmrsSymbPos);
|
||||||
|
|
||||||
/** \fn dlsch_extract_rbs_dual(int32_t **rxdataF,
|
/** \fn dlsch_extract_rbs_multiple(int32_t **rxdataF,
|
||||||
int32_t **dl_ch_estimates,
|
int32_t **dl_ch_estimates,
|
||||||
int32_t **rxdataF_ext,
|
int32_t **rxdataF_ext,
|
||||||
int32_t **dl_ch_estimates_ext,
|
int32_t **dl_ch_estimates_ext,
|
||||||
uint16_t pmi,
|
unsigned char symbol
|
||||||
uint8_t *pmi_ext,
|
uint8_t pilots,
|
||||||
uint32_t *rb_alloc,
|
uint8_t config_type,
|
||||||
uint8_t symbol,
|
unsigned short start_rb,
|
||||||
NR_DL_FRAME_PARMS *frame_parms)
|
unsigned short nb_rb_pdsch,
|
||||||
|
uint8_t n_dmrs_cdm_groups,
|
||||||
|
uint8_t Nl,
|
||||||
|
NR_DL_FRAME_PARMS *frame_parms,
|
||||||
|
uint16_t dlDmrsSymbPos)
|
||||||
\brief This function extracts the received resource blocks, both channel estimates and data symbols,
|
\brief This function extracts the received resource blocks, both channel estimates and data symbols,
|
||||||
for the current allocation and for dual antenna eNB transmission.
|
for the current allocation and for multiple layer antenna gNB transmission.
|
||||||
@param rxdataF Raw FFT output of received signal
|
@param rxdataF Raw FFT output of received signal
|
||||||
@param dl_ch_estimates Channel estimates of current slot
|
@param dl_ch_estimates Channel estimates of current slot
|
||||||
@param rxdataF_ext FFT output for RBs in this allocation
|
@param rxdataF_ext FFT output for RBs in this allocation
|
||||||
@param dl_ch_estimates_ext Channel estimates for RBs in this allocation
|
@param dl_ch_estimates_ext Channel estimates for RBs in this allocation
|
||||||
@param pmi subband Precoding matrix indicator
|
@param Nl nb of antenna layers
|
||||||
@param pmi_ext Extracted PMI for chosen RBs
|
|
||||||
@param rb_alloc RB allocation vector
|
|
||||||
@param symbol Symbol to extract
|
@param symbol Symbol to extract
|
||||||
@param nr_slot_rx Slot index
|
@param n_dmrs_cdm_groups
|
||||||
@param high_speed_flag
|
|
||||||
@param frame_parms Pointer to frame descriptor
|
@param frame_parms Pointer to frame descriptor
|
||||||
*/
|
*/
|
||||||
unsigned short nr_dlsch_extract_rbs_dual(int **rxdataF,
|
unsigned short nr_dlsch_extract_rbs_multiple(int **rxdataF,
|
||||||
int **dl_ch_estimates,
|
int **dl_ch_estimates,
|
||||||
int **rxdataF_ext,
|
int **rxdataF_ext,
|
||||||
int **dl_ch_estimates_ext,
|
int **dl_ch_estimates_ext,
|
||||||
unsigned short pmi,
|
unsigned char symbol,
|
||||||
unsigned char *pmi_ext,
|
uint8_t pilots,
|
||||||
unsigned char symbol,
|
uint8_t config_type,
|
||||||
uint8_t pilots,
|
unsigned short start_rb,
|
||||||
unsigned short start_rb,
|
unsigned short nb_rb_pdsch,
|
||||||
unsigned short nb_rb_pdsch,
|
uint8_t n_dmrs_cdm_groups,
|
||||||
unsigned char nr_slot_rx,
|
uint8_t Nl,
|
||||||
uint32_t high_speed_flag,
|
NR_DL_FRAME_PARMS *frame_parms,
|
||||||
NR_DL_FRAME_PARMS *frame_parms,
|
uint16_t dlDmrsSymbPos);
|
||||||
MIMO_mode_t mimo_mode);
|
|
||||||
|
|
||||||
/** \fn dlsch_extract_rbs_TM7(int32_t **rxdataF,
|
/** \fn dlsch_extract_rbs_TM7(int32_t **rxdataF,
|
||||||
int32_t **dl_bf_ch_estimates,
|
int32_t **dl_bf_ch_estimates,
|
||||||
@@ -812,8 +803,9 @@ void nr_dlsch_channel_compensation(int32_t **rxdataF_ext,
|
|||||||
int32_t **dl_ch_magb,
|
int32_t **dl_ch_magb,
|
||||||
int32_t **dl_ch_magr,
|
int32_t **dl_ch_magr,
|
||||||
int32_t **rxdataF_comp,
|
int32_t **rxdataF_comp,
|
||||||
int32_t **rho,
|
int32_t ***rho,
|
||||||
NR_DL_FRAME_PARMS *frame_parms,
|
NR_DL_FRAME_PARMS *frame_parms,
|
||||||
|
uint8_t nb_aatx,
|
||||||
uint8_t symbol,
|
uint8_t symbol,
|
||||||
uint8_t start_symbol,
|
uint8_t start_symbol,
|
||||||
uint8_t first_symbol_flag,
|
uint8_t first_symbol_flag,
|
||||||
@@ -827,7 +819,7 @@ void nr_dlsch_channel_compensation_core(int **rxdataF_ext,
|
|||||||
int **dl_ch_mag,
|
int **dl_ch_mag,
|
||||||
int **dl_ch_magb,
|
int **dl_ch_magb,
|
||||||
int **rxdataF_comp,
|
int **rxdataF_comp,
|
||||||
int **rho,
|
int ***rho,
|
||||||
unsigned char n_tx,
|
unsigned char n_tx,
|
||||||
unsigned char n_rx,
|
unsigned char n_rx,
|
||||||
unsigned char mod_order,
|
unsigned char mod_order,
|
||||||
@@ -898,6 +890,15 @@ void nr_dlsch_channel_level_median(int **dl_ch_estimates_ext,
|
|||||||
int length,
|
int length,
|
||||||
int start_point);
|
int start_point);
|
||||||
|
|
||||||
|
void nr_dlsch_detection_mrc(int **rxdataF_comp,
|
||||||
|
int ***rho,
|
||||||
|
int **dl_ch_mag,
|
||||||
|
int **dl_ch_magb,
|
||||||
|
short n_tx,
|
||||||
|
short n_rx,
|
||||||
|
unsigned char symbol,
|
||||||
|
unsigned short nb_rb);
|
||||||
|
|
||||||
void nr_dlsch_detection_mrc_core(int **rxdataF_comp,
|
void nr_dlsch_detection_mrc_core(int **rxdataF_comp,
|
||||||
int **rxdataF_comp_i,
|
int **rxdataF_comp_i,
|
||||||
int **rho,
|
int **rho,
|
||||||
@@ -971,6 +972,7 @@ void dlsch_channel_compensation_TM34(NR_DL_FRAME_PARMS *frame_parms,
|
|||||||
*/
|
*/
|
||||||
void nr_dlsch_channel_level(int **dl_ch_estimates_ext,
|
void nr_dlsch_channel_level(int **dl_ch_estimates_ext,
|
||||||
NR_DL_FRAME_PARMS *frame_parms,
|
NR_DL_FRAME_PARMS *frame_parms,
|
||||||
|
uint8_t n_tx,
|
||||||
int32_t *avg,
|
int32_t *avg,
|
||||||
uint8_t symbol,
|
uint8_t symbol,
|
||||||
uint32_t len,
|
uint32_t len,
|
||||||
@@ -1002,6 +1004,8 @@ void dlsch_channel_level_TM7(int32_t **dl_bf_ch_estimates_ext,
|
|||||||
|
|
||||||
void nr_dlsch_scale_channel(int32_t **dl_ch_estimates_ext,
|
void nr_dlsch_scale_channel(int32_t **dl_ch_estimates_ext,
|
||||||
NR_DL_FRAME_PARMS *frame_parms,
|
NR_DL_FRAME_PARMS *frame_parms,
|
||||||
|
uint8_t n_tx,
|
||||||
|
uint8_t n_rx,
|
||||||
NR_UE_DLSCH_t **dlsch_ue,
|
NR_UE_DLSCH_t **dlsch_ue,
|
||||||
uint8_t symbol,
|
uint8_t symbol,
|
||||||
uint8_t start_symbol,
|
uint8_t start_symbol,
|
||||||
|
|||||||
@@ -138,8 +138,10 @@ typedef struct {
|
|||||||
typedef struct {
|
typedef struct {
|
||||||
/// Pointers to variables related to DLSCH harq process
|
/// Pointers to variables related to DLSCH harq process
|
||||||
NR_DL_gNB_HARQ_t harq_process;
|
NR_DL_gNB_HARQ_t harq_process;
|
||||||
/// TX buffers for UE-spec transmission (antenna ports 5 or 7..14, prior to precoding)
|
/// TX buffers for UE-spec transmission (antenna layers 1,...,4 after to precoding)
|
||||||
int32_t *txdataF[NR_MAX_NB_LAYERS];
|
int32_t *txdataF[NR_MAX_NB_LAYERS];
|
||||||
|
/// TX buffers for UE-spec transmission (antenna ports 1000 or 1001,...,1007, before precoding)
|
||||||
|
int32_t *txdataF_precoding[NR_MAX_NB_LAYERS];
|
||||||
/// Modulated symbols buffer
|
/// Modulated symbols buffer
|
||||||
int32_t *mod_symbs[NR_MAX_NB_CODEWORDS];
|
int32_t *mod_symbs[NR_MAX_NB_CODEWORDS];
|
||||||
/// beamforming weights for UE-spec transmission (antenna ports 5 or 7..14), for each codeword, maximum 4 layers?
|
/// beamforming weights for UE-spec transmission (antenna ports 5 or 7..14), for each codeword, maximum 4 layers?
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ typedef struct {
|
|||||||
//! estimated rssi (dBm)
|
//! estimated rssi (dBm)
|
||||||
short rx_rssi_dBm[NUMBER_OF_CONNECTED_gNB_MAX];
|
short rx_rssi_dBm[NUMBER_OF_CONNECTED_gNB_MAX];
|
||||||
//! estimated correlation (wideband linear) between spatial channels (computed in dlsch_demodulation)
|
//! estimated correlation (wideband linear) between spatial channels (computed in dlsch_demodulation)
|
||||||
int rx_correlation[NUMBER_OF_CONNECTED_gNB_MAX][2];
|
int rx_correlation[NUMBER_OF_CONNECTED_gNB_MAX][4][4];
|
||||||
//! estimated correlation (wideband dB) between spatial channels (computed in dlsch_demodulation)
|
//! estimated correlation (wideband dB) between spatial channels (computed in dlsch_demodulation)
|
||||||
int rx_correlation_dB[NUMBER_OF_CONNECTED_gNB_MAX][2];
|
int rx_correlation_dB[NUMBER_OF_CONNECTED_gNB_MAX][2];
|
||||||
|
|
||||||
@@ -332,12 +332,10 @@ typedef struct {
|
|||||||
int32_t **dl_ch_magb1[8][8];
|
int32_t **dl_ch_magb1[8][8];
|
||||||
/// \brief Magnitude of Downlink Channel, first layer (256QAM level).
|
/// \brief Magnitude of Downlink Channel, first layer (256QAM level).
|
||||||
int32_t **dl_ch_magr0;
|
int32_t **dl_ch_magr0;
|
||||||
/// \brief Cross-correlation of two gNB signals.
|
/// \brief Cross-correlation Matrix of the gNB Tx channel signals.
|
||||||
/// - first index: rx antenna [0..nb_antennas_rx[
|
/// - first index: aatx*n_rx+aarx for all aatx=[0..n_tx[ and aarx=[0..nb_rx[
|
||||||
/// - second index: symbol [0..]
|
/// - second index: symbol [0..]
|
||||||
int32_t **rho;
|
int32_t ***rho;
|
||||||
/// never used... always send dl_ch_rho_ext instead...
|
|
||||||
int32_t **rho_i;
|
|
||||||
/// \brief Pointers to llr vectors (2 TBs).
|
/// \brief Pointers to llr vectors (2 TBs).
|
||||||
/// - first index: ? [0..1] (hard coded)
|
/// - first index: ? [0..1] (hard coded)
|
||||||
/// - second index: ? [0..1179743] (hard coded)
|
/// - second index: ? [0..1179743] (hard coded)
|
||||||
|
|||||||
@@ -279,13 +279,12 @@ static void *nr_feptx_thread(void *param) {
|
|||||||
|
|
||||||
RU_feptx_t *feptx = (RU_feptx_t *)param;
|
RU_feptx_t *feptx = (RU_feptx_t *)param;
|
||||||
RU_t *ru;
|
RU_t *ru;
|
||||||
int aa, slot, start, l, nb_antenna_ports, ret;
|
int aa, slot, start, l, ret;
|
||||||
int i;
|
int i;
|
||||||
int32_t ***bw;
|
int32_t ***bw;
|
||||||
NR_DL_FRAME_PARMS *fp;
|
NR_DL_FRAME_PARMS *fp;
|
||||||
int ofdm_mask_full;
|
int ofdm_mask_full;
|
||||||
int txdataF_offset;
|
int txdataF_offset;
|
||||||
int32_t *txdataF;
|
|
||||||
while (!oai_exit) {
|
while (!oai_exit) {
|
||||||
ret = 0;
|
ret = 0;
|
||||||
if (wait_on_condition(&feptx->mutex_feptx,&feptx->cond_feptx,&feptx->instance_cnt_feptx,"NR feptx thread")<0) break;
|
if (wait_on_condition(&feptx->mutex_feptx,&feptx->cond_feptx,&feptx->instance_cnt_feptx,"NR feptx thread")<0) break;
|
||||||
@@ -299,7 +298,6 @@ static void *nr_feptx_thread(void *param) {
|
|||||||
l = feptx->symbol;
|
l = feptx->symbol;
|
||||||
fp = ru->nr_frame_parms;
|
fp = ru->nr_frame_parms;
|
||||||
start = feptx->symbol;
|
start = feptx->symbol;
|
||||||
nb_antenna_ports = feptx->nb_antenna_ports;
|
|
||||||
ofdm_mask_full = (1<<(ru->nb_tx*2))-1;
|
ofdm_mask_full = (1<<(ru->nb_tx*2))-1;
|
||||||
|
|
||||||
if(ru->num_gNB != 0){
|
if(ru->num_gNB != 0){
|
||||||
@@ -314,16 +312,16 @@ static void *nr_feptx_thread(void *param) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
bw = ru->beam_weights[0];
|
bw = ru->beam_weights[0];
|
||||||
txdataF = &ru->gNB_list[0]->common_vars.txdataF[0][txdataF_offset];
|
|
||||||
for(i=0; i<fp->symbols_per_slot>>1; ++i){
|
for(i=0; i<fp->symbols_per_slot>>1; ++i){
|
||||||
nr_beam_precoding(&txdataF,
|
nr_beam_precoding(ru->gNB_list[0]->common_vars.txdataF,
|
||||||
ru->common.txdataF_BF,
|
ru->common.txdataF_BF,
|
||||||
fp,
|
fp,
|
||||||
bw,
|
bw,
|
||||||
slot,
|
slot,
|
||||||
l+i,
|
l+i,
|
||||||
aa,
|
aa,
|
||||||
nb_antenna_ports);
|
ru->nb_log_antennas,
|
||||||
|
txdataF_offset);//here
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stop_meas(&ru->precoding_stats);
|
stop_meas(&ru->precoding_stats);
|
||||||
@@ -362,7 +360,8 @@ static void *nr_feptx_thread(void *param) {
|
|||||||
slot,
|
slot,
|
||||||
l,
|
l,
|
||||||
aa,
|
aa,
|
||||||
nb_antenna_ports);
|
ru->nb_log_antennas,
|
||||||
|
0);
|
||||||
}
|
}
|
||||||
stop_meas(&ru->precoding_stats);
|
stop_meas(&ru->precoding_stats);
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_PREC+feptx->index+1 , 0);
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_PREC+feptx->index+1 , 0);
|
||||||
@@ -485,7 +484,8 @@ void nr_feptx_prec(RU_t *ru,int frame_tx,int tti_tx) {
|
|||||||
tti_tx,
|
tti_tx,
|
||||||
l,
|
l,
|
||||||
aa,
|
aa,
|
||||||
ru->nb_log_antennas);
|
ru->nb_log_antennas,
|
||||||
|
0);
|
||||||
}// for (aa=0;aa<ru->nb_tx;aa++)
|
}// for (aa=0;aa<ru->nb_tx;aa++)
|
||||||
}// for (l=0;l<fp->symbols_per_slot;l++)
|
}// for (l=0;l<fp->symbols_per_slot;l++)
|
||||||
}// if (ru->nb_tx == 1)
|
}// if (ru->nb_tx == 1)
|
||||||
|
|||||||
@@ -207,7 +207,9 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
|
|||||||
if ((frame&127) == 0) dump_pdsch_stats(gNB);
|
if ((frame&127) == 0) dump_pdsch_stats(gNB);
|
||||||
|
|
||||||
//apply the OFDM symbol rotation here
|
//apply the OFDM symbol rotation here
|
||||||
apply_nr_rotation(fp,(int16_t*) &gNB->common_vars.txdataF[0][txdataF_offset],slot,0,fp->Ncp==EXTENDED?12:14,fp->ofdm_symbol_size);
|
for (aa=0; aa<cfg->carrier_config.num_tx_ant.value; aa++) {
|
||||||
|
apply_nr_rotation(fp,(int16_t*) &gNB->common_vars.txdataF[aa][txdataF_offset],slot,0,fp->Ncp==EXTENDED?12:14,fp->ofdm_symbol_size);
|
||||||
|
}
|
||||||
|
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_gNB_TX+offset,0);
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_gNB_TX+offset,0);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -776,7 +776,7 @@ int nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int eNB_
|
|||||||
|
|
||||||
for (m = s0; m < (s0 +s1); m++) {
|
for (m = s0; m < (s0 +s1); m++) {
|
||||||
if (((1<<m)&dlsch0->harq_processes[harq_pid]->dlDmrsSymbPos) > 0) {
|
if (((1<<m)&dlsch0->harq_processes[harq_pid]->dlDmrsSymbPos) > 0) {
|
||||||
for (uint8_t aatx=0; aatx<1; aatx++) {//for MIMO Config: it shall loop over no_layers
|
for (uint8_t aatx=0; aatx<dlsch0->harq_processes[harq_pid]->Nl; aatx++) {//for MIMO Config: it shall loop over no_layers
|
||||||
nr_pdsch_channel_estimation(ue,
|
nr_pdsch_channel_estimation(ue,
|
||||||
proc,
|
proc,
|
||||||
0 /*eNB_id*/,
|
0 /*eNB_id*/,
|
||||||
@@ -831,43 +831,24 @@ int nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int eNB_
|
|||||||
slot = 1;
|
slot = 1;
|
||||||
start_meas(&ue->dlsch_llr_stats_parallelization[proc->thread_id][slot]);
|
start_meas(&ue->dlsch_llr_stats_parallelization[proc->thread_id][slot]);
|
||||||
#endif
|
#endif
|
||||||
// process DLSCH received in first slot
|
// process DLSCH received symbols in the slot
|
||||||
// skip DMRS symbols (will have to check later if PDSCH/DMRS are multiplexed
|
// symbol by symbol processing (if data/DMRS are multiplexed is checked inside the function)
|
||||||
if (((1<<m)&dlsch0->harq_processes[harq_pid]->dlDmrsSymbPos) == 0) {
|
if (pdsch == PDSCH || pdsch == SI_PDSCH || pdsch == RA_PDSCH) {
|
||||||
if (nr_rx_pdsch(ue,
|
if (nr_rx_pdsch(ue,
|
||||||
proc,
|
proc,
|
||||||
pdsch,
|
pdsch,
|
||||||
eNB_id,
|
eNB_id,
|
||||||
eNB_id_i,
|
eNB_id_i,
|
||||||
frame_rx,
|
frame_rx,
|
||||||
nr_slot_rx,
|
nr_slot_rx,
|
||||||
m,
|
m,
|
||||||
first_symbol_flag,
|
first_symbol_flag,
|
||||||
dual_stream_UE,
|
dual_stream_UE,
|
||||||
i_mod,
|
i_mod,
|
||||||
dlsch0->current_harq_pid) < 0)
|
dlsch0->current_harq_pid) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
} else AssertFatal(1==0,"Not RA_PDSCH, SI_PDSCH or PDSCH\n");
|
||||||
else { // This is to adjust the llr offset in the case of skipping over a dmrs symbol (i.e. in case of no PDSCH REs in DMRS)
|
|
||||||
if (pdsch == RA_PDSCH) ue->pdsch_vars[proc->thread_id][eNB_id]->llr_offset[m]=ue->pdsch_vars[proc->thread_id][eNB_id]->llr_offset[m-1];
|
|
||||||
else if (pdsch == PDSCH || pdsch == SI_PDSCH) {
|
|
||||||
if (nr_rx_pdsch(ue,
|
|
||||||
proc,
|
|
||||||
pdsch,
|
|
||||||
eNB_id,
|
|
||||||
eNB_id_i,
|
|
||||||
frame_rx,
|
|
||||||
nr_slot_rx,
|
|
||||||
m,
|
|
||||||
first_symbol_flag,
|
|
||||||
dual_stream_UE,
|
|
||||||
i_mod,
|
|
||||||
dlsch0->current_harq_pid) < 0)
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
else AssertFatal(1==0,"Not RA_PDSCH, SI_PDSCH or PDSCH\n");
|
|
||||||
}
|
|
||||||
if (pdsch == PDSCH) LOG_D(PHY,"Done processing symbol %d : llr_offset %d\n",m,ue->pdsch_vars[proc->thread_id][eNB_id]->llr_offset[m]);
|
|
||||||
#if UE_TIMING_TRACE
|
#if UE_TIMING_TRACE
|
||||||
stop_meas(&ue->dlsch_llr_stats_parallelization[proc->thread_id][slot]);
|
stop_meas(&ue->dlsch_llr_stats_parallelization[proc->thread_id][slot]);
|
||||||
#if DISABLE_LOG_X
|
#if DISABLE_LOG_X
|
||||||
@@ -877,10 +858,9 @@ int nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int eNB_
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(first_symbol_flag)
|
if(first_symbol_flag) {
|
||||||
{
|
proc->first_symbol_available = 1;
|
||||||
proc->first_symbol_available = 1;
|
}
|
||||||
}
|
|
||||||
} // CRNTI active
|
} // CRNTI active
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
@@ -901,7 +881,7 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
|
|||||||
int harq_pid = dlsch0->current_harq_pid;
|
int harq_pid = dlsch0->current_harq_pid;
|
||||||
int frame_rx = proc->frame_rx;
|
int frame_rx = proc->frame_rx;
|
||||||
int nr_slot_rx = proc->nr_slot_rx;
|
int nr_slot_rx = proc->nr_slot_rx;
|
||||||
int ret=0, ret1=0;
|
uint32_t ret = UINT32_MAX, ret1 = UINT32_MAX;
|
||||||
NR_UE_PDSCH *pdsch_vars;
|
NR_UE_PDSCH *pdsch_vars;
|
||||||
uint16_t dmrs_len = get_num_dmrs(dlsch0->harq_processes[dlsch0->current_harq_pid]->dlDmrsSymbPos);
|
uint16_t dmrs_len = get_num_dmrs(dlsch0->harq_processes[dlsch0->current_harq_pid]->dlDmrsSymbPos);
|
||||||
nr_downlink_indication_t dl_indication;
|
nr_downlink_indication_t dl_indication;
|
||||||
@@ -1667,6 +1647,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
|
|||||||
|
|
||||||
// looking for pbch only in slot where it is supposed to be
|
// looking for pbch only in slot where it is supposed to be
|
||||||
if (slot_ssb) {
|
if (slot_ssb) {
|
||||||
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP_PBCH, VCD_FUNCTION_IN);
|
||||||
LOG_D(PHY," ------ PBCH ChannelComp/LLR: frame.slot %d.%d ------ \n", frame_rx%1024, nr_slot_rx);
|
LOG_D(PHY," ------ PBCH ChannelComp/LLR: frame.slot %d.%d ------ \n", frame_rx%1024, nr_slot_rx);
|
||||||
for (int i=1; i<4; i++) {
|
for (int i=1; i<4; i++) {
|
||||||
|
|
||||||
@@ -1704,6 +1685,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
|
|||||||
|
|
||||||
LOG_D(PHY, "Doing N0 measurements in %s\n", __FUNCTION__);
|
LOG_D(PHY, "Doing N0 measurements in %s\n", __FUNCTION__);
|
||||||
nr_ue_rrc_measurements(ue, proc, nr_slot_rx);
|
nr_ue_rrc_measurements(ue, proc, nr_slot_rx);
|
||||||
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP_PBCH, VCD_FUNCTION_OUT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1717,12 +1699,12 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
|
|||||||
nr_gold_pdcch(ue, 0, 2);
|
nr_gold_pdcch(ue, 0, 2);
|
||||||
|
|
||||||
LOG_D(PHY," ------ --> PDCCH ChannelComp/LLR Frame.slot %d.%d ------ \n", frame_rx%1024, nr_slot_rx);
|
LOG_D(PHY," ------ --> PDCCH ChannelComp/LLR Frame.slot %d.%d ------ \n", frame_rx%1024, nr_slot_rx);
|
||||||
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP_PDCCH, VCD_FUNCTION_IN);
|
||||||
for (uint16_t l=0; l<nb_symb_pdcch; l++) {
|
for (uint16_t l=0; l<nb_symb_pdcch; l++) {
|
||||||
|
|
||||||
#if UE_TIMING_TRACE
|
#if UE_TIMING_TRACE
|
||||||
start_meas(&ue->ofdm_demod_stats);
|
start_meas(&ue->ofdm_demod_stats);
|
||||||
#endif
|
#endif
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP, VCD_FUNCTION_IN);
|
|
||||||
nr_slot_fep(ue,
|
nr_slot_fep(ue,
|
||||||
proc,
|
proc,
|
||||||
l,
|
l,
|
||||||
@@ -1744,7 +1726,6 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
|
|||||||
fp->first_carrier_offset+(pdcch_vars->pdcch_config[n_ss].BWPStart + coreset_start_rb)*12,
|
fp->first_carrier_offset+(pdcch_vars->pdcch_config[n_ss].BWPStart + coreset_start_rb)*12,
|
||||||
coreset_nb_rb);
|
coreset_nb_rb);
|
||||||
|
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP, VCD_FUNCTION_OUT);
|
|
||||||
#if UE_TIMING_TRACE
|
#if UE_TIMING_TRACE
|
||||||
stop_meas(&ue->ofdm_demod_stats);
|
stop_meas(&ue->ofdm_demod_stats);
|
||||||
#endif
|
#endif
|
||||||
@@ -1752,6 +1733,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
|
|||||||
dci_cnt = dci_cnt + nr_ue_pdcch_procedures(gNB_id, ue, proc);
|
dci_cnt = dci_cnt + nr_ue_pdcch_procedures(gNB_id, ue, proc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP_PDCCH, VCD_FUNCTION_OUT);
|
||||||
|
|
||||||
if (dci_cnt > 0) {
|
if (dci_cnt > 0) {
|
||||||
|
|
||||||
@@ -1767,6 +1749,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (dlsch) {
|
if (dlsch) {
|
||||||
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP_PDSCH, VCD_FUNCTION_IN);
|
||||||
uint8_t harq_pid = dlsch->current_harq_pid;
|
uint8_t harq_pid = dlsch->current_harq_pid;
|
||||||
NR_DL_UE_HARQ_t *dlsch0_harq = dlsch->harq_processes[harq_pid];
|
NR_DL_UE_HARQ_t *dlsch0_harq = dlsch->harq_processes[harq_pid];
|
||||||
uint16_t nb_symb_sch = dlsch0_harq->nb_symbols;
|
uint16_t nb_symb_sch = dlsch0_harq->nb_symbols;
|
||||||
@@ -1787,6 +1770,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
|
|||||||
m, //to be updated from higher layer
|
m, //to be updated from higher layer
|
||||||
nr_slot_rx);
|
nr_slot_rx);
|
||||||
}
|
}
|
||||||
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP_PDSCH, VCD_FUNCTION_OUT);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
LOG_D(PHY,"[UE %d] Frame %d, nr_slot_rx %d: No DCIs found\n", ue->Mod_id, frame_rx, nr_slot_rx);
|
LOG_D(PHY,"[UE %d] Frame %d, nr_slot_rx %d: No DCIs found\n", ue->Mod_id, frame_rx, nr_slot_rx);
|
||||||
@@ -1800,7 +1784,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
|
|||||||
// do procedures for C-RNTI
|
// do procedures for C-RNTI
|
||||||
int ret_pdsch = 0;
|
int ret_pdsch = 0;
|
||||||
if (ue->dlsch[proc->thread_id][gNB_id][0]->active == 1) {
|
if (ue->dlsch[proc->thread_id][gNB_id][0]->active == 1) {
|
||||||
//VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_IN);
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_C, VCD_FUNCTION_IN);
|
||||||
ret_pdsch = nr_ue_pdsch_procedures(ue,
|
ret_pdsch = nr_ue_pdsch_procedures(ue,
|
||||||
proc,
|
proc,
|
||||||
gNB_id,
|
gNB_id,
|
||||||
@@ -1809,6 +1793,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
|
|||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
nr_ue_measurement_procedures(2, ue, proc, gNB_id, nr_slot_rx);
|
nr_ue_measurement_procedures(2, ue, proc, gNB_id, nr_slot_rx);
|
||||||
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_C, VCD_FUNCTION_OUT);
|
||||||
}
|
}
|
||||||
|
|
||||||
// do procedures for SI-RNTI
|
// do procedures for SI-RNTI
|
||||||
@@ -1857,7 +1842,6 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
|
|||||||
|
|
||||||
// deactivate dlsch once dlsch proc is done
|
// deactivate dlsch once dlsch proc is done
|
||||||
ue->dlsch_p[gNB_id]->active = 0;
|
ue->dlsch_p[gNB_id]->active = 0;
|
||||||
|
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_P, VCD_FUNCTION_OUT);
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_P, VCD_FUNCTION_OUT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -173,7 +173,8 @@ int nr_derive_key(int alg_type, uint8_t alg_id,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void config_common(int Mod_idP,
|
void config_common(int Mod_idP,
|
||||||
int pdsch_AntennaPorts,
|
int pdsch_AntennaPorts,
|
||||||
|
int pusch_AntennaPorts,
|
||||||
NR_ServingCellConfigCommon_t *scc
|
NR_ServingCellConfigCommon_t *scc
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -297,7 +298,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
//uint8_t frame_mod4,num_pdcch_symbols = 0;
|
//uint8_t frame_mod4,num_pdcch_symbols = 0;
|
||||||
|
|
||||||
SCM_t channel_model=AWGN;//Rayleigh1_anticorr;
|
SCM_t channel_model = AWGN; // AWGN Rayleigh1 Rayleigh1_anticorr;
|
||||||
|
|
||||||
NB_UE_INST = 1;
|
NB_UE_INST = 1;
|
||||||
//double pbch_sinr;
|
//double pbch_sinr;
|
||||||
@@ -456,7 +457,7 @@ int main(int argc, char **argv)
|
|||||||
case 'y':
|
case 'y':
|
||||||
n_tx=atoi(optarg);
|
n_tx=atoi(optarg);
|
||||||
|
|
||||||
if ((n_tx==0) || (n_tx>2)) {
|
if ((n_tx==0) || (n_tx>4)) {//extend gNB to support n_tx = 4
|
||||||
printf("Unsupported number of tx antennas %d\n",n_tx);
|
printf("Unsupported number of tx antennas %d\n",n_tx);
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
@@ -466,7 +467,7 @@ int main(int argc, char **argv)
|
|||||||
case 'z':
|
case 'z':
|
||||||
n_rx=atoi(optarg);
|
n_rx=atoi(optarg);
|
||||||
|
|
||||||
if ((n_rx==0) || (n_rx>2)) {
|
if ((n_rx==0) || (n_rx>4)) {//extend UE to support n_tx = 4
|
||||||
printf("Unsupported number of rx antennas %d\n",n_rx);
|
printf("Unsupported number of rx antennas %d\n",n_rx);
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
@@ -601,7 +602,8 @@ int main(int argc, char **argv)
|
|||||||
InitSinLUT();
|
InitSinLUT();
|
||||||
|
|
||||||
get_softmodem_params()->phy_test = 1;
|
get_softmodem_params()->phy_test = 1;
|
||||||
|
get_softmodem_params()->do_ra = 0;
|
||||||
|
|
||||||
if (snr1set==0)
|
if (snr1set==0)
|
||||||
snr1 = snr0+10;
|
snr1 = snr0+10;
|
||||||
init_dlsch_tpool(dlsch_threads);
|
init_dlsch_tpool(dlsch_threads);
|
||||||
@@ -679,7 +681,7 @@ int main(int argc, char **argv)
|
|||||||
prepare_scc(rrc.carrier.servingcellconfigcommon);
|
prepare_scc(rrc.carrier.servingcellconfigcommon);
|
||||||
uint64_t ssb_bitmap;
|
uint64_t ssb_bitmap;
|
||||||
fill_scc(rrc.carrier.servingcellconfigcommon,&ssb_bitmap,N_RB_DL,N_RB_DL,mu,mu);
|
fill_scc(rrc.carrier.servingcellconfigcommon,&ssb_bitmap,N_RB_DL,N_RB_DL,mu,mu);
|
||||||
|
ssb_bitmap = 1;// Enable only first SSB with index ssb_indx=0
|
||||||
fix_scc(scc,ssb_bitmap);
|
fix_scc(scc,ssb_bitmap);
|
||||||
|
|
||||||
prepare_scd(scd);
|
prepare_scd(scd);
|
||||||
@@ -709,9 +711,9 @@ int main(int argc, char **argv)
|
|||||||
AssertFatal((gNB->if_inst = NR_IF_Module_init(0))!=NULL,"Cannot register interface");
|
AssertFatal((gNB->if_inst = NR_IF_Module_init(0))!=NULL,"Cannot register interface");
|
||||||
gNB->if_inst->NR_PHY_config_req = nr_phy_config_request;
|
gNB->if_inst->NR_PHY_config_req = nr_phy_config_request;
|
||||||
// common configuration
|
// common configuration
|
||||||
rrc_mac_config_req_gNB(0,0,1,pusch_tgt_snrx10,pucch_tgt_snrx10,scc,0,0,NULL);
|
rrc_mac_config_req_gNB(0,0,n_tx,1,pusch_tgt_snrx10,pucch_tgt_snrx10,scc,0,0,NULL);
|
||||||
// UE dedicated configuration
|
// UE dedicated configuration
|
||||||
rrc_mac_config_req_gNB(0,0,1,pusch_tgt_snrx10,pucch_tgt_snrx10,NULL,1,secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity,secondaryCellGroup);
|
rrc_mac_config_req_gNB(0,0,n_tx,1,pusch_tgt_snrx10,pucch_tgt_snrx10,NULL,1,secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity,secondaryCellGroup);
|
||||||
phy_init_nr_gNB(gNB,0,0);
|
phy_init_nr_gNB(gNB,0,0);
|
||||||
N_RB_DL = gNB->frame_parms.N_RB_DL;
|
N_RB_DL = gNB->frame_parms.N_RB_DL;
|
||||||
NR_UE_info_t *UE_info = &RC.nrmac[0]->UE_info;
|
NR_UE_info_t *UE_info = &RC.nrmac[0]->UE_info;
|
||||||
@@ -759,7 +761,7 @@ int main(int argc, char **argv)
|
|||||||
gNB2UE = new_channel_desc_scm(n_tx,
|
gNB2UE = new_channel_desc_scm(n_tx,
|
||||||
n_rx,
|
n_rx,
|
||||||
channel_model,
|
channel_model,
|
||||||
fs,
|
fs/1e6,//sampling frequency in MHz
|
||||||
bw,
|
bw,
|
||||||
30e-9,
|
30e-9,
|
||||||
0,
|
0,
|
||||||
@@ -774,28 +776,28 @@ int main(int argc, char **argv)
|
|||||||
frame_length_complex_samples = frame_parms->samples_per_subframe*NR_NUMBER_OF_SUBFRAMES_PER_FRAME;
|
frame_length_complex_samples = frame_parms->samples_per_subframe*NR_NUMBER_OF_SUBFRAMES_PER_FRAME;
|
||||||
//frame_length_complex_samples_no_prefix = frame_parms->samples_per_subframe_wCP*NR_NUMBER_OF_SUBFRAMES_PER_FRAME;
|
//frame_length_complex_samples_no_prefix = frame_parms->samples_per_subframe_wCP*NR_NUMBER_OF_SUBFRAMES_PER_FRAME;
|
||||||
|
|
||||||
s_re = malloc(2*sizeof(double*));
|
s_re = malloc(n_tx*sizeof(double*));
|
||||||
s_im = malloc(2*sizeof(double*));
|
s_im = malloc(n_tx*sizeof(double*));
|
||||||
r_re = malloc(2*sizeof(double*));
|
r_re = malloc(n_rx*sizeof(double*));
|
||||||
r_im = malloc(2*sizeof(double*));
|
r_im = malloc(n_rx*sizeof(double*));
|
||||||
txdata = malloc(2*sizeof(int*));
|
txdata = malloc(n_tx*sizeof(int*));
|
||||||
|
|
||||||
for (i=0; i<2; i++) {
|
|
||||||
|
|
||||||
|
for (i=0; i<n_tx; i++) {
|
||||||
s_re[i] = malloc(frame_length_complex_samples*sizeof(double));
|
s_re[i] = malloc(frame_length_complex_samples*sizeof(double));
|
||||||
bzero(s_re[i],frame_length_complex_samples*sizeof(double));
|
bzero(s_re[i],frame_length_complex_samples*sizeof(double));
|
||||||
s_im[i] = malloc(frame_length_complex_samples*sizeof(double));
|
s_im[i] = malloc(frame_length_complex_samples*sizeof(double));
|
||||||
bzero(s_im[i],frame_length_complex_samples*sizeof(double));
|
bzero(s_im[i],frame_length_complex_samples*sizeof(double));
|
||||||
|
|
||||||
|
printf("Allocating %d samples for txdata\n",frame_length_complex_samples);
|
||||||
|
txdata[i] = malloc(frame_length_complex_samples*sizeof(int));
|
||||||
|
bzero(txdata[i],frame_length_complex_samples*sizeof(int));
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i=0; i<n_rx; i++) {
|
||||||
r_re[i] = malloc(frame_length_complex_samples*sizeof(double));
|
r_re[i] = malloc(frame_length_complex_samples*sizeof(double));
|
||||||
bzero(r_re[i],frame_length_complex_samples*sizeof(double));
|
bzero(r_re[i],frame_length_complex_samples*sizeof(double));
|
||||||
r_im[i] = malloc(frame_length_complex_samples*sizeof(double));
|
r_im[i] = malloc(frame_length_complex_samples*sizeof(double));
|
||||||
bzero(r_im[i],frame_length_complex_samples*sizeof(double));
|
bzero(r_im[i],frame_length_complex_samples*sizeof(double));
|
||||||
|
|
||||||
printf("Allocating %d samples for txdata\n",frame_length_complex_samples);
|
|
||||||
txdata[i] = malloc(frame_length_complex_samples*sizeof(int));
|
|
||||||
bzero(txdata[i],frame_length_complex_samples*sizeof(int));
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pbch_file_fd!=NULL) {
|
if (pbch_file_fd!=NULL) {
|
||||||
@@ -810,6 +812,7 @@ int main(int argc, char **argv)
|
|||||||
PHY_vars_UE_g[0] = malloc(sizeof(PHY_VARS_NR_UE*));
|
PHY_vars_UE_g[0] = malloc(sizeof(PHY_VARS_NR_UE*));
|
||||||
PHY_vars_UE_g[0][0] = UE;
|
PHY_vars_UE_g[0][0] = UE;
|
||||||
memcpy(&UE->frame_parms,frame_parms,sizeof(NR_DL_FRAME_PARMS));
|
memcpy(&UE->frame_parms,frame_parms,sizeof(NR_DL_FRAME_PARMS));
|
||||||
|
UE->frame_parms.nb_antennas_rx = n_rx;
|
||||||
|
|
||||||
if (run_initial_sync==1) UE->is_synchronized = 0;
|
if (run_initial_sync==1) UE->is_synchronized = 0;
|
||||||
else {UE->is_synchronized = 1; UE->UE_mode[0]=PUSCH;}
|
else {UE->is_synchronized = 1; UE->UE_mode[0]=PUSCH;}
|
||||||
@@ -879,7 +882,7 @@ int main(int argc, char **argv)
|
|||||||
scheduled_response.CC_id = 0;
|
scheduled_response.CC_id = 0;
|
||||||
scheduled_response.frame = frame;
|
scheduled_response.frame = frame;
|
||||||
scheduled_response.slot = slot;
|
scheduled_response.slot = slot;
|
||||||
scheduled_response.thread_id = UE_proc.thread_id;
|
scheduled_response.thread_id = 0;
|
||||||
|
|
||||||
nr_ue_phy_config_request(&UE_mac->phy_config);
|
nr_ue_phy_config_request(&UE_mac->phy_config);
|
||||||
//NR_COMMON_channels_t *cc = RC.nrmac[0]->common_channels;
|
//NR_COMMON_channels_t *cc = RC.nrmac[0]->common_channels;
|
||||||
@@ -988,9 +991,9 @@ int main(int argc, char **argv)
|
|||||||
int txdataF_offset = (slot%2) * frame_parms->samples_per_slot_wCP;
|
int txdataF_offset = (slot%2) * frame_parms->samples_per_slot_wCP;
|
||||||
|
|
||||||
if (n_trials==1) {
|
if (n_trials==1) {
|
||||||
LOG_M("txsigF0.m","txsF0", &gNB->common_vars.txdataF[0][txdataF_offset],frame_parms->samples_per_slot_wCP,1,1);
|
LOG_M("txsigF0.m","txsF0=", &gNB->common_vars.txdataF[0][txdataF_offset+2*frame_parms->ofdm_symbol_size],frame_parms->ofdm_symbol_size,1,1);
|
||||||
if (gNB->frame_parms.nb_antennas_tx>1)
|
if (gNB->frame_parms.nb_antennas_tx>1)
|
||||||
LOG_M("txsigF1.m","txsF1", &gNB->common_vars.txdataF[1][txdataF_offset],frame_parms->samples_per_slot_wCP,1,1);
|
LOG_M("txsigF1.m","txsF1=", &gNB->common_vars.txdataF[1][txdataF_offset+2*frame_parms->ofdm_symbol_size],frame_parms->ofdm_symbol_size,1,1);
|
||||||
}
|
}
|
||||||
int tx_offset = frame_parms->get_samples_slot_timestamp(slot,frame_parms,0);
|
int tx_offset = frame_parms->get_samples_slot_timestamp(slot,frame_parms,0);
|
||||||
if (n_trials==1) printf("tx_offset %d, txdataF_offset %d \n", tx_offset,txdataF_offset);
|
if (n_trials==1) printf("tx_offset %d, txdataF_offset %d \n", tx_offset,txdataF_offset);
|
||||||
@@ -1014,45 +1017,79 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (n_trials==1) {
|
if (n_trials==1) {
|
||||||
LOG_M("txsig0.m","txs0", &txdata[0][tx_offset],frame_parms->get_samples_slot_timestamp(slot,frame_parms,0),1,1);
|
char filename[100];//LOG_M
|
||||||
if (gNB->frame_parms.nb_antennas_tx>1)
|
for (aa=0;aa<n_tx;aa++) {
|
||||||
LOG_M("txsig1.m","txs1", &txdata[1][tx_offset],frame_parms->get_samples_slot_timestamp(slot,frame_parms,0),1,1);
|
sprintf(filename,"txsig%d.m", aa);//LOG_M
|
||||||
|
LOG_M(filename,"txs", &txdata[aa][tx_offset+frame_parms->ofdm_symbol_size+frame_parms->nb_prefix_samples0],6*(frame_parms->ofdm_symbol_size+frame_parms->nb_prefix_samples),1,1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (output_fd) {
|
if (output_fd) {
|
||||||
printf("writing txdata to binary file\n");
|
printf("writing txdata to binary file\n");
|
||||||
fwrite(txdata[0],sizeof(int32_t),frame_length_complex_samples,output_fd);
|
fwrite(txdata[0],sizeof(int32_t),frame_length_complex_samples,output_fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
int txlev = signal_energy(&txdata[0][frame_parms->get_samples_slot_timestamp(slot,frame_parms,0)+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);
|
int txlev[n_tx];
|
||||||
|
int txlev_sum = 0;
|
||||||
// if (n_trials==1) printf("txlev %d (%f)\n",txlev,10*log10((double)txlev));
|
int l_ofdm = 6;
|
||||||
|
for (aa=0; aa<n_tx; aa++) {
|
||||||
|
txlev[aa] = signal_energy(&txdata[aa][tx_offset+l_ofdm*frame_parms->ofdm_symbol_size + (l_ofdm-1)*frame_parms->nb_prefix_samples + frame_parms->nb_prefix_samples0],
|
||||||
|
frame_parms->ofdm_symbol_size + frame_parms->nb_prefix_samples);
|
||||||
|
txlev_sum += txlev[aa];
|
||||||
|
if (n_trials==1) printf("txlev[%d] = %d (%f dB) txlev_sum %d\n",aa,txlev[aa],10*log10((double)txlev[aa]),txlev_sum);
|
||||||
|
}
|
||||||
|
|
||||||
for (i=(frame_parms->get_samples_slot_timestamp(slot,frame_parms,0));
|
for (i=(frame_parms->get_samples_slot_timestamp(slot,frame_parms,0));
|
||||||
i<(frame_parms->get_samples_slot_timestamp(slot+1,frame_parms,0));
|
i<(frame_parms->get_samples_slot_timestamp(slot+1,frame_parms,0));
|
||||||
i++) {
|
i++) {
|
||||||
|
|
||||||
for (aa=0; aa<frame_parms->nb_antennas_tx; aa++) {
|
for (aa=0; aa<frame_parms->nb_antennas_tx; aa++) {
|
||||||
r_re[aa][i] = ((double)(((short *)txdata[aa]))[(i<<1)]);
|
s_re[aa][i] = ((double)(((short *)txdata[aa]))[(i<<1)]);
|
||||||
r_im[aa][i] = ((double)(((short *)txdata[aa]))[(i<<1)+1]);
|
s_im[aa][i] = ((double)(((short *)txdata[aa]))[(i<<1)+1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
double ts = 1.0/(frame_parms->subcarrier_spacing * frame_parms->ofdm_symbol_size);
|
double ts = 1.0/(frame_parms->subcarrier_spacing * frame_parms->ofdm_symbol_size);
|
||||||
//AWGN
|
//Compute AWGN variance
|
||||||
sigma2_dB = 10 * log10((double)txlev * ((double)UE->frame_parms.ofdm_symbol_size/(12*rel15->rbSize))) - SNR;
|
sigma2_dB = 10 * log10((double)txlev_sum * ((double)UE->frame_parms.ofdm_symbol_size/(12*rel15->rbSize))) - SNR;
|
||||||
sigma2 = pow(10, sigma2_dB/10);
|
sigma2 = pow(10, sigma2_dB/10);
|
||||||
if (n_trials==1) printf("sigma2 %f (%f dB), txlev %f (factor %f)\n",sigma2,sigma2_dB,10*log10((double)txlev),(double)(double)UE->frame_parms.ofdm_symbol_size/(12*rel15->rbSize));
|
if (n_trials==1) printf("sigma2 %f (%f dB), txlev_sum %f (factor %f)\n",sigma2,sigma2_dB,10*log10((double)txlev_sum),(double)(double)UE->frame_parms.ofdm_symbol_size/(12*rel15->rbSize));
|
||||||
|
|
||||||
|
for (aa=0; aa<n_rx; aa++) {
|
||||||
|
bzero(r_re[aa],frame_length_complex_samples*sizeof(double));
|
||||||
|
bzero(r_im[aa],frame_length_complex_samples*sizeof(double));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Apply MIMO Channel
|
||||||
|
if (channel_model != AWGN) multipath_tv_channel(gNB2UE,
|
||||||
|
s_re,
|
||||||
|
s_im,
|
||||||
|
r_re,
|
||||||
|
r_im,
|
||||||
|
frame_length_complex_samples,
|
||||||
|
0);
|
||||||
|
|
||||||
for (i=frame_parms->get_samples_slot_timestamp(slot,frame_parms,0);
|
for (i=frame_parms->get_samples_slot_timestamp(slot,frame_parms,0);
|
||||||
i<frame_parms->get_samples_slot_timestamp(slot+1,frame_parms,0);
|
i<frame_parms->get_samples_slot_timestamp(slot+1,frame_parms,0);
|
||||||
i++) {
|
i++) {
|
||||||
|
|
||||||
for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
|
for (int aa_rx=0; aa_rx<n_rx; aa_rx++) {
|
||||||
((short*) UE->common_vars.rxdata[aa])[2*i] = (short) ((r_re[aa][i] + sqrt(sigma2/2)*gaussdouble(0.0,1.0)));
|
|
||||||
((short*) UE->common_vars.rxdata[aa])[2*i+1] = (short) ((r_im[aa][i] + sqrt(sigma2/2)*gaussdouble(0.0,1.0)));
|
if (channel_model == AWGN) {
|
||||||
|
// sum up signals from different Tx antennas
|
||||||
|
r_re[aa_rx][i] = 0;
|
||||||
|
r_im[aa_rx][i] = 0;
|
||||||
|
for (aa=0; aa<n_tx; aa++) {
|
||||||
|
r_re[aa_rx][i] += s_re[aa][i];
|
||||||
|
r_im[aa_rx][i] += s_im[aa][i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Add Gaussian noise
|
||||||
|
((short*) UE->common_vars.rxdata[aa_rx])[2*i] = (short) ((r_re[aa_rx][i] + sqrt(sigma2/2)*gaussdouble(0.0,1.0)));
|
||||||
|
((short*) UE->common_vars.rxdata[aa_rx])[2*i+1] = (short) ((r_im[aa_rx][i] + sqrt(sigma2/2)*gaussdouble(0.0,1.0)));
|
||||||
/* Add phase noise if enabled */
|
/* Add phase noise if enabled */
|
||||||
if (pdu_bit_map & 0x1) {
|
if (pdu_bit_map & 0x1) {
|
||||||
phase_noise(ts, &((short*) UE->common_vars.rxdata[aa])[2*i],
|
phase_noise(ts, &((short*) UE->common_vars.rxdata[aa_rx])[2*i],
|
||||||
&((short*) UE->common_vars.rxdata[aa])[2*i+1]);
|
&((short*) UE->common_vars.rxdata[aa_rx])[2*i+1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1092,10 +1129,10 @@ int main(int argc, char **argv)
|
|||||||
available_bits-= (ptrsSymbPerSlot * ptrsRePerSymb *rel15->nrOfLayers* 2);
|
available_bits-= (ptrsSymbPerSlot * ptrsRePerSymb *rel15->nrOfLayers* 2);
|
||||||
printf("[DLSIM][PTRS] Available bits are: %5u, removed PTRS bits are: %5u \n",available_bits, (ptrsSymbPerSlot * ptrsRePerSymb *rel15->nrOfLayers* 2) );
|
printf("[DLSIM][PTRS] Available bits are: %5u, removed PTRS bits are: %5u \n",available_bits, (ptrsSymbPerSlot * ptrsRePerSymb *rel15->nrOfLayers* 2) );
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < available_bits; i++) {
|
for (i = 0; i < available_bits; i++) {
|
||||||
|
|
||||||
if(((gNB_dlsch->harq_process.f[i] == 0) && (UE_llr[i] <= 0)) ||
|
if(((gNB_dlsch->harq_process.f[i] == 0) && (UE_llr[i] <= 0)) ||
|
||||||
((gNB_dlsch->harq_process.f[i] == 1) && (UE_llr[i] >= 0)))
|
((gNB_dlsch->harq_process.f[i] == 1) && (UE_llr[i] >= 0)))
|
||||||
{
|
{
|
||||||
if(errors_scrambling == 0) {
|
if(errors_scrambling == 0) {
|
||||||
@@ -1104,7 +1141,7 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
errors_scrambling++;
|
errors_scrambling++;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
for (i = 0; i < TBS; i++) {
|
for (i = 0; i < TBS; i++) {
|
||||||
|
|
||||||
@@ -1232,12 +1269,16 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
for (i = 0; i < 2; i++) {
|
free_channel_desc_scm(gNB2UE);
|
||||||
|
|
||||||
|
for (i = 0; i < n_tx; i++) {
|
||||||
free(s_re[i]);
|
free(s_re[i]);
|
||||||
free(s_im[i]);
|
free(s_im[i]);
|
||||||
|
free(txdata[i]);
|
||||||
|
}
|
||||||
|
for (i = 0; i < n_rx; i++) {
|
||||||
free(r_re[i]);
|
free(r_re[i]);
|
||||||
free(r_im[i]);
|
free(r_im[i]);
|
||||||
free(txdata[i]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
free(s_re);
|
free(s_re);
|
||||||
|
|||||||
@@ -666,9 +666,9 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
gNB->if_inst->NR_PHY_config_req = nr_phy_config_request;
|
gNB->if_inst->NR_PHY_config_req = nr_phy_config_request;
|
||||||
// common configuration
|
// common configuration
|
||||||
rrc_mac_config_req_gNB(0,0,n_rx,pusch_tgt_snrx10,pucch_tgt_snrx10,scc,0,0,NULL);
|
rrc_mac_config_req_gNB(0,0,n_tx,n_rx,pusch_tgt_snrx10,pucch_tgt_snrx10,scc,0,0,NULL);
|
||||||
// UE dedicated configuration
|
// UE dedicated configuration
|
||||||
rrc_mac_config_req_gNB(0,0,1,pusch_tgt_snrx10,pucch_tgt_snrx10,NULL,1,secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity,secondaryCellGroup);
|
rrc_mac_config_req_gNB(0,0,1,1,pusch_tgt_snrx10,pucch_tgt_snrx10,NULL,1,secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity,secondaryCellGroup);
|
||||||
phy_init_nr_gNB(gNB,0,0);
|
phy_init_nr_gNB(gNB,0,0);
|
||||||
N_RB_DL = gNB->frame_parms.N_RB_DL;
|
N_RB_DL = gNB->frame_parms.N_RB_DL;
|
||||||
|
|
||||||
|
|||||||
@@ -48,9 +48,9 @@ void multipath_tv_channel(channel_desc_t *desc,
|
|||||||
printf("[TV CHANNEL] keep = %d : path_loss = %g (%f), nb_rx %d, nb_tx %d, dd %d, len %d max_doppler %g\n",keep_channel,path_loss,desc->path_loss_dB,desc->nb_rx,desc->nb_tx,dd,desc->channel_length,
|
printf("[TV CHANNEL] keep = %d : path_loss = %g (%f), nb_rx %d, nb_tx %d, dd %d, len %d max_doppler %g\n",keep_channel,path_loss,desc->path_loss_dB,desc->nb_rx,desc->nb_tx,dd,desc->channel_length,
|
||||||
desc->max_Doppler);
|
desc->max_Doppler);
|
||||||
#endif
|
#endif
|
||||||
tx = (double complex **)malloc(desc->nb_tx*sizeof(double complex));
|
tx = (double complex **)malloc(desc->nb_tx*sizeof(double complex *));
|
||||||
rx = (double complex **)malloc(desc->nb_rx*sizeof(double complex));
|
rx = (double complex **)malloc(desc->nb_rx*sizeof(double complex *));
|
||||||
H_t= (double complex ** *) malloc(desc->nb_tx*desc->nb_rx*sizeof(double complex **));
|
H_t= (double complex ***) malloc(desc->nb_tx*desc->nb_rx*sizeof(double complex **));
|
||||||
// tv_H_t = (double complex *) malloc(length*sizeof(double complex));
|
// tv_H_t = (double complex *) malloc(length*sizeof(double complex));
|
||||||
rx_temp= (double complex *) calloc(length,sizeof(double complex));
|
rx_temp= (double complex *) calloc(length,sizeof(double complex));
|
||||||
|
|
||||||
@@ -63,10 +63,10 @@ void multipath_tv_channel(channel_desc_t *desc,
|
|||||||
}
|
}
|
||||||
|
|
||||||
for(i=0; i<desc->nb_tx*desc->nb_rx; i++) {
|
for(i=0; i<desc->nb_tx*desc->nb_rx; i++) {
|
||||||
H_t[i] = (double complex **) malloc(length*sizeof(double complex *));
|
H_t[i] = (double complex **)malloc(desc->nb_taps*sizeof(double complex *));
|
||||||
|
|
||||||
for(j=0; j<length; j++) {
|
for(j=0; j<desc->nb_taps; j++) {
|
||||||
H_t[i][j] = (double complex *) calloc (desc->nb_taps,sizeof(double complex));
|
H_t[i][j] = (double complex *)calloc(length,sizeof(double complex));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -116,7 +116,7 @@ void multipath_tv_channel(channel_desc_t *desc,
|
|||||||
free(rx);
|
free(rx);
|
||||||
|
|
||||||
for(i=0; i<desc->nb_rx*desc->nb_tx; i++) {
|
for(i=0; i<desc->nb_rx*desc->nb_tx; i++) {
|
||||||
for(j=0; j<length; j++) {
|
for(j=0; j<desc->nb_taps; j++) {
|
||||||
free(H_t[i][j]);
|
free(H_t[i][j]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -131,14 +131,29 @@ void multipath_tv_channel(channel_desc_t *desc,
|
|||||||
void tv_channel(channel_desc_t *desc,double complex ***H,uint32_t length){
|
void tv_channel(channel_desc_t *desc,double complex ***H,uint32_t length){
|
||||||
|
|
||||||
int i,j,p,l,k;
|
int i,j,p,l,k;
|
||||||
double *alpha,*phi_rad,pi=acos(-1),*w_Hz;
|
double *alpha,***phi_rad,pi=acos(-1),***w_Hz;
|
||||||
alpha = (double *)calloc(desc->nb_paths,sizeof(double));
|
alpha = (double *)calloc(desc->nb_paths,sizeof(double));
|
||||||
phi_rad = (double *)calloc(desc->nb_paths,sizeof(double));
|
phi_rad = (double ***)malloc(desc->nb_rx*desc->nb_tx*sizeof(double **));
|
||||||
w_Hz = (double *)calloc(desc->nb_paths,sizeof(double));
|
w_Hz = (double ***)malloc(desc->nb_rx*desc->nb_tx*sizeof(double **));
|
||||||
|
|
||||||
for(i=0; i<desc->nb_paths; i++) {
|
for(i=0; i<desc->nb_tx*desc->nb_rx; i++) {
|
||||||
w_Hz[i]=desc->max_Doppler*cos(frand_a_b(0,2*pi));
|
phi_rad[i] = (double **) malloc(desc->nb_taps*sizeof(double *));
|
||||||
phi_rad[i]=frand_a_b(0,2*pi);
|
w_Hz[i] = (double **) malloc(desc->nb_taps*sizeof(double *));
|
||||||
|
for(j=0; j<desc->nb_taps; j++) {
|
||||||
|
phi_rad[i][j] = (double *) malloc(desc->nb_paths*sizeof(double));
|
||||||
|
w_Hz[i][j] = (double *) malloc(desc->nb_paths*sizeof(double));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for(i=0; i<desc->nb_tx*desc->nb_rx; i++) {
|
||||||
|
for (j = 0; j<desc->nb_taps; j++) {
|
||||||
|
for(k=0; k<desc->nb_paths; k++) {
|
||||||
|
w_Hz[i][j][k] = desc->max_Doppler*cos(frand_a_b(0,2*M_PI));
|
||||||
|
phi_rad[i][j][k] = frand_a_b(0,2*M_PI);
|
||||||
|
//printf("w_hz[%d][%d][%d]=f_d*cos(theta) = %f\n",i,j,k,w_Hz[i][j][k]);
|
||||||
|
//printf("phi_rad[%d][%d][%d] = %f\n",i,j,k,phi_rad[i][j][k]);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(desc->ricean_factor == 1) {
|
if(desc->ricean_factor == 1) {
|
||||||
@@ -153,44 +168,34 @@ void tv_channel(channel_desc_t *desc,double complex ***H,uint32_t length){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
// SISO or MIMO
|
||||||
// This is the code when we only consider a SISO case
|
|
||||||
for(i=0;i<length;i++)
|
|
||||||
{
|
|
||||||
for(j=0;j<desc->nb_taps;j++)
|
|
||||||
{
|
|
||||||
for(p=0;p<desc->nb_paths;p++)
|
|
||||||
{
|
|
||||||
H[i][j] += sqrt(desc->amps[j]/2)*alpha[p]*cexp(-I*(2*pi*w_Hz[p]*i*(1/(desc->sampling_rate*1e6))+phi_rad[p]));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for(j=0;j<desc->nb_paths;j++)
|
|
||||||
{
|
|
||||||
phi_rad[j] = fmod(2*pi*w_Hz[j]*(length-1)*(1/desc->sampling_rate)+phi_rad[j],2*pi);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
// if MIMO
|
|
||||||
for (i=0; i<desc->nb_rx; i++) {
|
for (i=0; i<desc->nb_rx; i++) {
|
||||||
for(j=0; j<desc->nb_tx; j++) {
|
for(j=0; j<desc->nb_tx; j++) {
|
||||||
for(k=0; k<length; k++) {
|
for(k=0; k<desc->nb_taps; k++) {
|
||||||
for(l=0; l<desc->nb_taps; l++) {
|
for(l=0; l<length; l++) {
|
||||||
H[i+(j*desc->nb_rx)][k][l] = 0;
|
|
||||||
|
|
||||||
for(p=0; p<desc->nb_paths; p++) {
|
for(p=0; p<desc->nb_paths; p++) {
|
||||||
H[i+(j*desc->nb_rx)][k][l] += sqrt(desc->amps[l]/2)*alpha[p]*cexp(I*(2*pi*w_Hz[p]*k*(1/(desc->sampling_rate*1e6))+phi_rad[p]));
|
H[i+(j*desc->nb_rx)][k][l] += sqrt(desc->amps[k])*alpha[p]*cexp(I*(2*pi*w_Hz[i+(j*desc->nb_rx)][k][p]*l*(1/(desc->sampling_rate*1e6))+phi_rad[i+(j*desc->nb_rx)][k][p]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
//printf("H[tx%d][rx%d][k%d] = %f+j%f \n",j,i,k,creal(H[i+(j*desc->nb_rx)][k][0]),cimag(H[i+(j*desc->nb_rx)][k][0]));
|
||||||
|
|
||||||
for(j=0; j<desc->nb_paths; j++) {
|
|
||||||
phi_rad[j] = fmod(2*pi*w_Hz[j]*(length-1)*(1/desc->sampling_rate)+phi_rad[j],2*pi);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//accumlate the phase
|
||||||
|
/*for(k=0; k<desc->nb_taps; k++) {
|
||||||
|
* for(j=0; j<desc->nb_paths; j++) {
|
||||||
|
* desc->random_phase[k][j] = fmod(2*pi*w_Hz[k][j]*(length-1)*(1/(desc->sampling_rate*1e6))+phi_rad[k][j],2*pi);
|
||||||
|
* }
|
||||||
|
* }*/
|
||||||
free(alpha);
|
free(alpha);
|
||||||
|
for(i=0; i<desc->nb_rx*desc->nb_tx; i++) {
|
||||||
|
for (j=0; j<desc->nb_taps; j++) {
|
||||||
|
free(w_Hz[i][j]);
|
||||||
|
free(phi_rad[i][j]);
|
||||||
|
}
|
||||||
|
free(w_Hz[i]);
|
||||||
|
free(phi_rad[i]);
|
||||||
|
}
|
||||||
free(w_Hz);
|
free(w_Hz);
|
||||||
free(phi_rad);
|
free(phi_rad);
|
||||||
}
|
}
|
||||||
@@ -203,7 +208,7 @@ void tv_conv(double complex **h, double complex *x, double complex *y, uint32_t
|
|||||||
for(i=0; i<((int)nb_samples-dd); i++) {
|
for(i=0; i<((int)nb_samples-dd); i++) {
|
||||||
for(j=0; j<nb_taps; j++) {
|
for(j=0; j<nb_taps; j++) {
|
||||||
if(i>j)
|
if(i>j)
|
||||||
y[i+dd] += creal(h[i][j])*creal(x[i-j])-cimag(h[i][j])*cimag(x[i-j]) + I*(creal(h[i][j])*cimag(x[i-j])+cimag(h[i][j])*creal(x[i-j]));
|
y[i+dd] += creal(h[j][i])*creal(x[i-j])-cimag(h[j][i])*cimag(x[i-j]) + I*(creal(h[j][i])*cimag(x[i-j])+cimag(h[j][i])*creal(x[i-j]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ static telnetshell_vardef_t channelmod_vardef[] = {
|
|||||||
static double snr_dB=25;
|
static double snr_dB=25;
|
||||||
static double sinr_dB=0;
|
static double sinr_dB=0;
|
||||||
static unsigned int max_chan;
|
static unsigned int max_chan;
|
||||||
static channel_desc_t** defined_channels;
|
static channel_desc_t **defined_channels;
|
||||||
void fill_channel_desc(channel_desc_t *chan_desc,
|
void fill_channel_desc(channel_desc_t *chan_desc,
|
||||||
uint8_t nb_tx,
|
uint8_t nb_tx,
|
||||||
uint8_t nb_rx,
|
uint8_t nb_rx,
|
||||||
@@ -1185,11 +1185,11 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx,
|
|||||||
1);
|
1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Rayleigh1:
|
case Rayleigh1://MIMO Test uses Rayleigh1
|
||||||
nb_taps = 1;
|
nb_taps = 1;
|
||||||
Td = 0;
|
Td = 0;
|
||||||
channel_length = 1;
|
channel_length = 1;
|
||||||
ricean_factor = 1;
|
ricean_factor = 0.0;
|
||||||
aoa = .03;
|
aoa = .03;
|
||||||
maxDoppler = 0;
|
maxDoppler = 0;
|
||||||
fill_channel_desc(chan_desc,nb_tx,
|
fill_channel_desc(chan_desc,nb_tx,
|
||||||
@@ -1632,7 +1632,7 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx,
|
|||||||
|
|
||||||
void free_channel_desc_scm(channel_desc_t *ch) {
|
void free_channel_desc_scm(channel_desc_t *ch) {
|
||||||
// Must be made cleanly, a lot of leaks...
|
// Must be made cleanly, a lot of leaks...
|
||||||
defined_channels[ch->chan_idx]=NULL;
|
if (max_chan != 0) defined_channels[ch->chan_idx]=NULL;
|
||||||
if(ch->free_flags&CHANMODEL_FREE_AMPS)
|
if(ch->free_flags&CHANMODEL_FREE_AMPS)
|
||||||
free(ch->amps);
|
free(ch->amps);
|
||||||
for (int i = 0; i<ch->nb_tx*ch->nb_rx; i++) {
|
for (int i = 0; i<ch->nb_tx*ch->nb_rx; i++) {
|
||||||
|
|||||||
@@ -409,6 +409,7 @@ typedef struct NRRrcConfigurationReq_s {
|
|||||||
NR_ServingCellConfig_t *scd;
|
NR_ServingCellConfig_t *scd;
|
||||||
int ssb_SubcarrierOffset;
|
int ssb_SubcarrierOffset;
|
||||||
int pdsch_AntennaPorts;
|
int pdsch_AntennaPorts;
|
||||||
|
int pusch_AntennaPorts;
|
||||||
int pusch_TargetSNRx10;
|
int pusch_TargetSNRx10;
|
||||||
int pucch_TargetSNRx10;
|
int pucch_TargetSNRx10;
|
||||||
} gNB_RrcConfigurationReq;
|
} gNB_RrcConfigurationReq;
|
||||||
|
|||||||
@@ -297,7 +297,7 @@ void fix_scc(NR_ServingCellConfigCommon_t *scc,uint64_t ssbmap) {
|
|||||||
void prepare_scd(NR_ServingCellConfig_t *scd) {
|
void prepare_scd(NR_ServingCellConfig_t *scd) {
|
||||||
// Allocate downlink structures
|
// Allocate downlink structures
|
||||||
|
|
||||||
scd->downlinkBWP_ToAddModList = CALLOC(1, sizeof(scd->downlinkBWP_ToAddModList));
|
scd->downlinkBWP_ToAddModList = CALLOC(1, sizeof(*scd->downlinkBWP_ToAddModList));
|
||||||
|
|
||||||
// Downlink bandwidth part
|
// Downlink bandwidth part
|
||||||
NR_BWP_Downlink_t *bwp = calloc(1, sizeof(*bwp));
|
NR_BWP_Downlink_t *bwp = calloc(1, sizeof(*bwp));
|
||||||
@@ -318,29 +318,25 @@ void prepare_scd(NR_ServingCellConfig_t *scd) {
|
|||||||
NR_DMRS_DownlinkCfg->phaseTrackingRS->present = NR_SetupRelease_PTRS_DownlinkConfig_PR_setup;
|
NR_DMRS_DownlinkCfg->phaseTrackingRS->present = NR_SetupRelease_PTRS_DownlinkConfig_PR_setup;
|
||||||
NR_DMRS_DownlinkCfg->phaseTrackingRS->choice.setup = CALLOC(1, sizeof(*NR_DMRS_DownlinkCfg->phaseTrackingRS->choice.setup));
|
NR_DMRS_DownlinkCfg->phaseTrackingRS->choice.setup = CALLOC(1, sizeof(*NR_DMRS_DownlinkCfg->phaseTrackingRS->choice.setup));
|
||||||
NR_PTRS_DownlinkConfig_t *NR_PTRS_DownlinkCfg = NR_DMRS_DownlinkCfg->phaseTrackingRS->choice.setup;
|
NR_PTRS_DownlinkConfig_t *NR_PTRS_DownlinkCfg = NR_DMRS_DownlinkCfg->phaseTrackingRS->choice.setup;
|
||||||
NR_PTRS_DownlinkCfg->frequencyDensity = CALLOC(1, sizeof(NR_PTRS_DownlinkCfg->frequencyDensity));
|
NR_PTRS_DownlinkCfg->frequencyDensity = CALLOC(1, sizeof(*NR_PTRS_DownlinkCfg->frequencyDensity));
|
||||||
int *dl_rbs[2];
|
long *dl_rbs = CALLOC(2, sizeof(long));
|
||||||
for (int i=0;i<2;i++) {
|
for (int i=0;i<2;i++) {
|
||||||
dl_rbs[i] = CALLOC(1, sizeof(*dl_rbs[i]));
|
ASN_SEQUENCE_ADD(&NR_PTRS_DownlinkCfg->frequencyDensity->list, &dl_rbs[i]);
|
||||||
*dl_rbs[i] = 0;
|
|
||||||
ASN_SEQUENCE_ADD(&NR_PTRS_DownlinkCfg->frequencyDensity->list, dl_rbs[i]);
|
|
||||||
}
|
}
|
||||||
NR_PTRS_DownlinkCfg->timeDensity = CALLOC(1, sizeof(NR_PTRS_DownlinkCfg->timeDensity));
|
NR_PTRS_DownlinkCfg->timeDensity = CALLOC(1, sizeof(*NR_PTRS_DownlinkCfg->timeDensity));
|
||||||
int *dl_mcs[3];
|
long *dl_mcs = CALLOC(3, sizeof(long));
|
||||||
for (int i=0;i<3;i++) {
|
for (int i=0;i<3;i++) {
|
||||||
dl_mcs[i] = CALLOC(1, sizeof(*dl_mcs[i]));
|
ASN_SEQUENCE_ADD(&NR_PTRS_DownlinkCfg->timeDensity->list, &dl_mcs[i]);
|
||||||
*dl_mcs[i] = 0;
|
|
||||||
ASN_SEQUENCE_ADD(&NR_PTRS_DownlinkCfg->timeDensity->list, dl_mcs[i]);
|
|
||||||
}
|
}
|
||||||
NR_PTRS_DownlinkCfg->epre_Ratio = CALLOC(1, sizeof(NR_PTRS_DownlinkCfg->epre_Ratio));
|
NR_PTRS_DownlinkCfg->epre_Ratio = CALLOC(1, sizeof(*NR_PTRS_DownlinkCfg->epre_Ratio));
|
||||||
NR_PTRS_DownlinkCfg->resourceElementOffset = CALLOC(1, sizeof(NR_PTRS_DownlinkCfg->resourceElementOffset));
|
NR_PTRS_DownlinkCfg->resourceElementOffset = CALLOC(1, sizeof(*NR_PTRS_DownlinkCfg->resourceElementOffset));
|
||||||
*NR_PTRS_DownlinkCfg->resourceElementOffset = 0;
|
*NR_PTRS_DownlinkCfg->resourceElementOffset = 0;
|
||||||
ASN_SEQUENCE_ADD(&scd->downlinkBWP_ToAddModList->list,bwp);
|
ASN_SEQUENCE_ADD(&scd->downlinkBWP_ToAddModList->list,bwp);
|
||||||
|
|
||||||
// Allocate uplink structures
|
// Allocate uplink structures
|
||||||
|
|
||||||
scd->uplinkConfig = CALLOC(1, sizeof(NR_UplinkConfig_t));
|
scd->uplinkConfig = CALLOC(1, sizeof(*scd->uplinkConfig));
|
||||||
scd->uplinkConfig->uplinkBWP_ToAddModList = CALLOC(1, sizeof(scd->uplinkConfig->uplinkBWP_ToAddModList));
|
scd->uplinkConfig->uplinkBWP_ToAddModList = CALLOC(1, sizeof(*scd->uplinkConfig->uplinkBWP_ToAddModList));
|
||||||
|
|
||||||
NR_PUSCH_Config_t *pusch_Config = CALLOC(1, sizeof(*pusch_Config));
|
NR_PUSCH_Config_t *pusch_Config = CALLOC(1, sizeof(*pusch_Config));
|
||||||
|
|
||||||
@@ -355,20 +351,16 @@ void prepare_scd(NR_ServingCellConfig_t *scd) {
|
|||||||
NR_PTRS_UplinkConfig_t *NR_PTRS_UplinkConfig = NR_DMRS_UplinkConfig->phaseTrackingRS->choice.setup;
|
NR_PTRS_UplinkConfig_t *NR_PTRS_UplinkConfig = NR_DMRS_UplinkConfig->phaseTrackingRS->choice.setup;
|
||||||
NR_PTRS_UplinkConfig->transformPrecoderDisabled = CALLOC(1, sizeof(*NR_PTRS_UplinkConfig->transformPrecoderDisabled));
|
NR_PTRS_UplinkConfig->transformPrecoderDisabled = CALLOC(1, sizeof(*NR_PTRS_UplinkConfig->transformPrecoderDisabled));
|
||||||
NR_PTRS_UplinkConfig->transformPrecoderDisabled->frequencyDensity = CALLOC(1, sizeof(*NR_PTRS_UplinkConfig->transformPrecoderDisabled->frequencyDensity));
|
NR_PTRS_UplinkConfig->transformPrecoderDisabled->frequencyDensity = CALLOC(1, sizeof(*NR_PTRS_UplinkConfig->transformPrecoderDisabled->frequencyDensity));
|
||||||
int *n_rbs[2];
|
long *n_rbs = CALLOC(2, sizeof(long));
|
||||||
for (int i=0;i<2;i++) {
|
for (int i=0;i<2;i++) {
|
||||||
n_rbs[i] = CALLOC(1, sizeof(*n_rbs[i]));
|
ASN_SEQUENCE_ADD(&NR_PTRS_UplinkConfig->transformPrecoderDisabled->frequencyDensity->list, &n_rbs[i]);
|
||||||
*n_rbs[i] = 0;
|
|
||||||
ASN_SEQUENCE_ADD(&NR_PTRS_UplinkConfig->transformPrecoderDisabled->frequencyDensity->list, n_rbs[i]);
|
|
||||||
}
|
}
|
||||||
NR_PTRS_UplinkConfig->transformPrecoderDisabled->timeDensity = CALLOC(1, sizeof(*NR_PTRS_UplinkConfig->transformPrecoderDisabled->timeDensity));
|
NR_PTRS_UplinkConfig->transformPrecoderDisabled->timeDensity = CALLOC(1, sizeof(*NR_PTRS_UplinkConfig->transformPrecoderDisabled->timeDensity));
|
||||||
int *ptrs_mcs[3];
|
long *ptrs_mcs = CALLOC(3, sizeof(long));
|
||||||
for (int i = 0; i < 3; i++) {
|
for (int i = 0; i < 3; i++) {
|
||||||
ptrs_mcs[i] = CALLOC(1, sizeof(*ptrs_mcs[i]));
|
ASN_SEQUENCE_ADD(&NR_PTRS_UplinkConfig->transformPrecoderDisabled->timeDensity->list, &ptrs_mcs[i]);
|
||||||
*ptrs_mcs[i] = 0;
|
|
||||||
ASN_SEQUENCE_ADD(&NR_PTRS_UplinkConfig->transformPrecoderDisabled->timeDensity->list, ptrs_mcs[i]);
|
|
||||||
}
|
}
|
||||||
NR_PTRS_UplinkConfig->transformPrecoderDisabled->resourceElementOffset = CALLOC(1, sizeof(NR_PTRS_UplinkConfig->transformPrecoderDisabled->resourceElementOffset));
|
NR_PTRS_UplinkConfig->transformPrecoderDisabled->resourceElementOffset = CALLOC(1, sizeof(*NR_PTRS_UplinkConfig->transformPrecoderDisabled->resourceElementOffset));
|
||||||
*NR_PTRS_UplinkConfig->transformPrecoderDisabled->resourceElementOffset = 0;
|
*NR_PTRS_UplinkConfig->transformPrecoderDisabled->resourceElementOffset = 0;
|
||||||
|
|
||||||
// UL bandwidth part
|
// UL bandwidth part
|
||||||
@@ -954,6 +946,8 @@ void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
|
|||||||
NRRRC_CONFIGURATION_REQ (msg_p).ssb_SubcarrierOffset = *GNBParamList.paramarray[i][GNB_SSB_SUBCARRIEROFFSET_IDX].iptr;
|
NRRRC_CONFIGURATION_REQ (msg_p).ssb_SubcarrierOffset = *GNBParamList.paramarray[i][GNB_SSB_SUBCARRIEROFFSET_IDX].iptr;
|
||||||
printf("pdsch_AntennaPorts %d\n",*GNBParamList.paramarray[i][GNB_PDSCH_ANTENNAPORTS_IDX].iptr);
|
printf("pdsch_AntennaPorts %d\n",*GNBParamList.paramarray[i][GNB_PDSCH_ANTENNAPORTS_IDX].iptr);
|
||||||
NRRRC_CONFIGURATION_REQ (msg_p).pdsch_AntennaPorts = *GNBParamList.paramarray[i][GNB_PDSCH_ANTENNAPORTS_IDX].iptr;
|
NRRRC_CONFIGURATION_REQ (msg_p).pdsch_AntennaPorts = *GNBParamList.paramarray[i][GNB_PDSCH_ANTENNAPORTS_IDX].iptr;
|
||||||
|
printf("pusch_AntennaPorts %d\n",*GNBParamList.paramarray[i][GNB_PUSCH_ANTENNAPORTS_IDX].iptr);
|
||||||
|
NRRRC_CONFIGURATION_REQ (msg_p).pusch_AntennaPorts = *GNBParamList.paramarray[i][GNB_PUSCH_ANTENNAPORTS_IDX].iptr;
|
||||||
printf("pusch_TargetSNRx10 %d\n",*GNBParamList.paramarray[i][GNB_PUSCH_TARGETPOW_X10_IDX].iptr);
|
printf("pusch_TargetSNRx10 %d\n",*GNBParamList.paramarray[i][GNB_PUSCH_TARGETPOW_X10_IDX].iptr);
|
||||||
NRRRC_CONFIGURATION_REQ (msg_p).pusch_TargetSNRx10 = *GNBParamList.paramarray[i][GNB_PUSCH_TARGETPOW_X10_IDX].iptr;
|
NRRRC_CONFIGURATION_REQ (msg_p).pusch_TargetSNRx10 = *GNBParamList.paramarray[i][GNB_PUSCH_TARGETPOW_X10_IDX].iptr;
|
||||||
printf("pucch_TargetSNRx10 %d\n",*GNBParamList.paramarray[i][GNB_PUCCH_TARGETPOW_X10_IDX].iptr);
|
printf("pucch_TargetSNRx10 %d\n",*GNBParamList.paramarray[i][GNB_PUCCH_TARGETPOW_X10_IDX].iptr);
|
||||||
|
|||||||
@@ -115,6 +115,7 @@ typedef enum {
|
|||||||
#define GNB_CONFIG_STRING_REMOTE_S_PORTD "remote_s_portd"
|
#define GNB_CONFIG_STRING_REMOTE_S_PORTD "remote_s_portd"
|
||||||
#define GNB_CONFIG_STRING_SSBSUBCARRIEROFFSET "ssb_SubcarrierOffset"
|
#define GNB_CONFIG_STRING_SSBSUBCARRIEROFFSET "ssb_SubcarrierOffset"
|
||||||
#define GNB_CONFIG_STRING_PDSCHANTENNAPORTS "pdsch_AntennaPorts"
|
#define GNB_CONFIG_STRING_PDSCHANTENNAPORTS "pdsch_AntennaPorts"
|
||||||
|
#define GNB_CONFIG_STRING_PUSCHANTENNAPORTS "pusch_AntennaPorts"
|
||||||
#define GNB_CONFIG_STRING_PUSCHTARGETPOWX10 "pusch_TargetSNRx10"
|
#define GNB_CONFIG_STRING_PUSCHTARGETPOWX10 "pusch_TargetSNRx10"
|
||||||
#define GNB_CONFIG_STRING_PUCCHTARGETPOWX10 "pucch_TargetSNRx10"
|
#define GNB_CONFIG_STRING_PUCCHTARGETPOWX10 "pucch_TargetSNRx10"
|
||||||
|
|
||||||
@@ -139,6 +140,7 @@ typedef enum {
|
|||||||
{GNB_CONFIG_STRING_REMOTE_S_PORTD, NULL, 0, uptr:NULL, defuintval:50001, TYPE_UINT, 0}, \
|
{GNB_CONFIG_STRING_REMOTE_S_PORTD, NULL, 0, uptr:NULL, defuintval:50001, TYPE_UINT, 0}, \
|
||||||
{GNB_CONFIG_STRING_SSBSUBCARRIEROFFSET, NULL, 0, iptr:NULL, defintval:31, TYPE_INT, 0}, \
|
{GNB_CONFIG_STRING_SSBSUBCARRIEROFFSET, NULL, 0, iptr:NULL, defintval:31, TYPE_INT, 0}, \
|
||||||
{GNB_CONFIG_STRING_PDSCHANTENNAPORTS, NULL, 0, iptr:NULL, defintval:1, TYPE_INT, 0}, \
|
{GNB_CONFIG_STRING_PDSCHANTENNAPORTS, NULL, 0, iptr:NULL, defintval:1, TYPE_INT, 0}, \
|
||||||
|
{GNB_CONFIG_STRING_PUSCHANTENNAPORTS, NULL, 0, iptr:NULL, defintval:1, TYPE_INT, 0}, \
|
||||||
{GNB_CONFIG_STRING_PUSCHTARGETPOWX10, NULL, 0, iptr:NULL, defintval:200, TYPE_INT, 0}, \
|
{GNB_CONFIG_STRING_PUSCHTARGETPOWX10, NULL, 0, iptr:NULL, defintval:200, TYPE_INT, 0}, \
|
||||||
{GNB_CONFIG_STRING_PUCCHTARGETPOWX10, NULL, 0, iptr:NULL, defintval:200, TYPE_INT, 0}, \
|
{GNB_CONFIG_STRING_PUCCHTARGETPOWX10, NULL, 0, iptr:NULL, defintval:200, TYPE_INT, 0}, \
|
||||||
}
|
}
|
||||||
@@ -159,8 +161,9 @@ typedef enum {
|
|||||||
#define GNB_REMOTE_S_PORTD_IDX 13
|
#define GNB_REMOTE_S_PORTD_IDX 13
|
||||||
#define GNB_SSB_SUBCARRIEROFFSET_IDX 14
|
#define GNB_SSB_SUBCARRIEROFFSET_IDX 14
|
||||||
#define GNB_PDSCH_ANTENNAPORTS_IDX 15
|
#define GNB_PDSCH_ANTENNAPORTS_IDX 15
|
||||||
#define GNB_PUSCH_TARGETPOW_X10_IDX 16
|
#define GNB_PUSCH_ANTENNAPORTS_IDX 16
|
||||||
#define GNB_PUCCH_TARGETPOW_X10_IDX 17
|
#define GNB_PUSCH_TARGETPOW_X10_IDX 17
|
||||||
|
#define GNB_PUCCH_TARGETPOW_X10_IDX 18
|
||||||
|
|
||||||
#define TRACKING_AREA_CODE_OKRANGE {0x0001,0xFFFD}
|
#define TRACKING_AREA_CODE_OKRANGE {0x0001,0xFFFD}
|
||||||
#define GNBPARAMS_CHECK { \
|
#define GNBPARAMS_CHECK { \
|
||||||
|
|||||||
@@ -1746,7 +1746,7 @@ void nr_ue_process_mac_pdu(nr_downlink_indication_t *dl_info,
|
|||||||
frame_t frameP = dl_info->frame;
|
frame_t frameP = dl_info->frame;
|
||||||
int slot = dl_info->slot;
|
int slot = dl_info->slot;
|
||||||
uint8_t *pduP = (dl_info->rx_ind->rx_indication_body + pdu_id)->pdsch_pdu.pdu;
|
uint8_t *pduP = (dl_info->rx_ind->rx_indication_body + pdu_id)->pdsch_pdu.pdu;
|
||||||
uint16_t pdu_len = (dl_info->rx_ind->rx_indication_body + pdu_id)->pdsch_pdu.pdu_length;
|
int32_t pdu_len = (dl_info->rx_ind->rx_indication_body + pdu_id)->pdsch_pdu.pdu_length;
|
||||||
uint8_t gNB_index = dl_info->gNB_index;
|
uint8_t gNB_index = dl_info->gNB_index;
|
||||||
uint8_t CC_id = dl_info->cc_id;
|
uint8_t CC_id = dl_info->cc_id;
|
||||||
uint8_t done = 0;
|
uint8_t done = 0;
|
||||||
@@ -1757,7 +1757,7 @@ void nr_ue_process_mac_pdu(nr_downlink_indication_t *dl_info,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_D(MAC, "In %s [%d.%d]: processing PDU %d of %d total number of PDUs...\n", __FUNCTION__, frameP, slot, pdu_id, dl_info->rx_ind->number_pdus);
|
LOG_D(MAC, "In %s [%d.%d]: processing PDU %d (with length %d) of %d total number of PDUs...\n", __FUNCTION__, frameP, slot, pdu_id, pdu_len, dl_info->rx_ind->number_pdus);
|
||||||
|
|
||||||
while (!done && pdu_len > 0){
|
while (!done && pdu_len > 0){
|
||||||
mac_ce_len = 0x0000;
|
mac_ce_len = 0x0000;
|
||||||
@@ -1961,7 +1961,7 @@ void nr_ue_process_mac_pdu(nr_downlink_indication_t *dl_info,
|
|||||||
pduP += ( mac_subheader_len + mac_ce_len + mac_sdu_len );
|
pduP += ( mac_subheader_len + mac_ce_len + mac_sdu_len );
|
||||||
pdu_len -= ( mac_subheader_len + mac_ce_len + mac_sdu_len );
|
pdu_len -= ( mac_subheader_len + mac_ce_len + mac_sdu_len );
|
||||||
if (pdu_len < 0)
|
if (pdu_len < 0)
|
||||||
LOG_E(MAC, "[MAC] nr_ue_process_mac_pdu, residual mac pdu length %d < 0!\n", pdu_len);
|
LOG_E(MAC, "[UE %d][%d.%d] nr_ue_process_mac_pdu, residual mac pdu length %d < 0!\n", module_idP, frameP, slot, pdu_len);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ extern RAN_CONTEXT_t RC;
|
|||||||
extern void mac_top_init_gNB(void);
|
extern void mac_top_init_gNB(void);
|
||||||
extern uint8_t nfapi_mode;
|
extern uint8_t nfapi_mode;
|
||||||
|
|
||||||
void config_common(int Mod_idP, int pdsch_AntennaPorts, NR_ServingCellConfigCommon_t *scc) {
|
void config_common(int Mod_idP, int pdsch_AntennaPorts, int pusch_AntennaPorts, NR_ServingCellConfigCommon_t *scc) {
|
||||||
|
|
||||||
nfapi_nr_config_request_scf_t *cfg = &RC.nrmac[Mod_idP]->config[0];
|
nfapi_nr_config_request_scf_t *cfg = &RC.nrmac[Mod_idP]->config[0];
|
||||||
RC.nrmac[Mod_idP]->common_channels[0].ServingCellConfigCommon = scc;
|
RC.nrmac[Mod_idP]->common_channels[0].ServingCellConfigCommon = scc;
|
||||||
@@ -275,7 +275,8 @@ void config_common(int Mod_idP, int pdsch_AntennaPorts, NR_ServingCellConfigComm
|
|||||||
num_ssb += (cfg->ssb_table.ssb_mask_list[1].ssb_mask.value>>i)&1;
|
num_ssb += (cfg->ssb_table.ssb_mask_list[1].ssb_mask.value>>i)&1;
|
||||||
}
|
}
|
||||||
|
|
||||||
cfg->carrier_config.num_rx_ant.value = cfg->carrier_config.num_tx_ant.value;
|
cfg->carrier_config.num_rx_ant.value = pusch_AntennaPorts;
|
||||||
|
AssertFatal(pusch_AntennaPorts > 0 && pusch_AntennaPorts < 13, "pusch_AntennaPorts in 1...12\n");
|
||||||
cfg->carrier_config.num_rx_ant.tl.tag = NFAPI_NR_CONFIG_NUM_RX_ANT_TAG;
|
cfg->carrier_config.num_rx_ant.tl.tag = NFAPI_NR_CONFIG_NUM_RX_ANT_TAG;
|
||||||
LOG_I(MAC,"Set TX/RX antenna number to %d (num ssb %d: %x,%x)\n",cfg->carrier_config.num_tx_ant.value,num_ssb,cfg->ssb_table.ssb_mask_list[0].ssb_mask.value,cfg->ssb_table.ssb_mask_list[1].ssb_mask.value);
|
LOG_I(MAC,"Set TX/RX antenna number to %d (num ssb %d: %x,%x)\n",cfg->carrier_config.num_tx_ant.value,num_ssb,cfg->ssb_table.ssb_mask_list[0].ssb_mask.value,cfg->ssb_table.ssb_mask_list[1].ssb_mask.value);
|
||||||
AssertFatal(cfg->carrier_config.num_tx_ant.value > 0,"carrier_config.num_tx_ant.value %d !\n",cfg->carrier_config.num_tx_ant.value );
|
AssertFatal(cfg->carrier_config.num_tx_ant.value > 0,"carrier_config.num_tx_ant.value %d !\n",cfg->carrier_config.num_tx_ant.value );
|
||||||
@@ -311,9 +312,10 @@ void config_common(int Mod_idP, int pdsch_AntennaPorts, NR_ServingCellConfigComm
|
|||||||
}
|
}
|
||||||
|
|
||||||
extern uint16_t sl_ahead;
|
extern uint16_t sl_ahead;
|
||||||
int rrc_mac_config_req_gNB(module_id_t Mod_idP,
|
int rrc_mac_config_req_gNB(module_id_t Mod_idP,
|
||||||
int ssb_SubcarrierOffset,
|
int ssb_SubcarrierOffset,
|
||||||
int pdsch_AntennaPorts,
|
int pdsch_AntennaPorts,
|
||||||
|
int pusch_AntennaPorts,
|
||||||
int pusch_tgt_snrx10,
|
int pusch_tgt_snrx10,
|
||||||
int pucch_tgt_snrx10,
|
int pucch_tgt_snrx10,
|
||||||
NR_ServingCellConfigCommon_t *scc,
|
NR_ServingCellConfigCommon_t *scc,
|
||||||
@@ -359,7 +361,8 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
|
|||||||
LOG_I(MAC,"Configuring common parameters from NR ServingCellConfig\n");
|
LOG_I(MAC,"Configuring common parameters from NR ServingCellConfig\n");
|
||||||
|
|
||||||
config_common(Mod_idP,
|
config_common(Mod_idP,
|
||||||
pdsch_AntennaPorts,
|
pdsch_AntennaPorts,
|
||||||
|
pusch_AntennaPorts,
|
||||||
scc);
|
scc);
|
||||||
LOG_E(MAC, "%s() %s:%d RC.nrmac[Mod_idP]->if_inst->NR_PHY_config_req:%p\n", __FUNCTION__, __FILE__, __LINE__, RC.nrmac[Mod_idP]->if_inst->NR_PHY_config_req);
|
LOG_E(MAC, "%s() %s:%d RC.nrmac[Mod_idP]->if_inst->NR_PHY_config_req:%p\n", __FUNCTION__, __FILE__, __LINE__, RC.nrmac[Mod_idP]->if_inst->NR_PHY_config_req);
|
||||||
|
|
||||||
|
|||||||
@@ -961,7 +961,7 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
|
|||||||
pdsch_pdu_rel15->nrOfLayers = 1;
|
pdsch_pdu_rel15->nrOfLayers = 1;
|
||||||
pdsch_pdu_rel15->transmissionScheme = 0;
|
pdsch_pdu_rel15->transmissionScheme = 0;
|
||||||
pdsch_pdu_rel15->refPoint = 0;
|
pdsch_pdu_rel15->refPoint = 0;
|
||||||
pdsch_pdu_rel15->dmrsConfigType = 0;
|
pdsch_pdu_rel15->dmrsConfigType = 0;//Reconfigure Msg2 to use pdsch_dmrs_type1
|
||||||
pdsch_pdu_rel15->dlDmrsScramblingId = *scc->physCellId;
|
pdsch_pdu_rel15->dlDmrsScramblingId = *scc->physCellId;
|
||||||
pdsch_pdu_rel15->SCID = 0;
|
pdsch_pdu_rel15->SCID = 0;
|
||||||
pdsch_pdu_rel15->numDmrsCdmGrpsNoData = 2;
|
pdsch_pdu_rel15->numDmrsCdmGrpsNoData = 2;
|
||||||
|
|||||||
@@ -137,10 +137,10 @@ void nr_process_mac_pdu(
|
|||||||
|
|
||||||
case UL_SCH_LCID_S_BSR:
|
case UL_SCH_LCID_S_BSR:
|
||||||
case UL_SCH_LCID_S_TRUNCATED_BSR:
|
case UL_SCH_LCID_S_TRUNCATED_BSR:
|
||||||
//38.321 section 6.1.3.1
|
//38.321 section 6.1.3.1
|
||||||
//fixed length
|
//fixed length
|
||||||
mac_ce_len =1;
|
mac_ce_len =1;
|
||||||
/* Extract short BSR value */
|
/* Extract short BSR value */
|
||||||
ce_ptr = &pdu_ptr[mac_subheader_len];
|
ce_ptr = &pdu_ptr[mac_subheader_len];
|
||||||
NR_BSR_SHORT *bsr_s = (NR_BSR_SHORT *) ce_ptr;
|
NR_BSR_SHORT *bsr_s = (NR_BSR_SHORT *) ce_ptr;
|
||||||
sched_ctrl->estimated_ul_buffer = 0;
|
sched_ctrl->estimated_ul_buffer = 0;
|
||||||
@@ -182,7 +182,7 @@ void nr_process_mac_pdu(
|
|||||||
NR_LONG_BSR_TABLE[pdu_ptr[mac_subheader_len + 1 + n]];
|
NR_LONG_BSR_TABLE[pdu_ptr[mac_subheader_len + 1 + n]];
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case UL_SCH_LCID_C_RNTI:
|
case UL_SCH_LCID_C_RNTI:
|
||||||
//38.321 section 6.1.3.2
|
//38.321 section 6.1.3.2
|
||||||
|
|||||||
@@ -42,12 +42,14 @@ void mac_top_init_gNB(void);
|
|||||||
|
|
||||||
void config_common(int Mod_idP,
|
void config_common(int Mod_idP,
|
||||||
int pdsch_AntennaPorts,
|
int pdsch_AntennaPorts,
|
||||||
|
int pusch_AntennaPorts,
|
||||||
NR_ServingCellConfigCommon_t *scc
|
NR_ServingCellConfigCommon_t *scc
|
||||||
);
|
);
|
||||||
|
|
||||||
int rrc_mac_config_req_gNB(module_id_t Mod_idP,
|
int rrc_mac_config_req_gNB(module_id_t Mod_idP,
|
||||||
int ssb_SubcarrierOffset,
|
int ssb_SubcarrierOffset,
|
||||||
int pdsch_AntennaPorts,
|
int pdsch_AntennaPorts,
|
||||||
|
int pusch_AntennaPorts,
|
||||||
int pusch_tgt_snrx10,
|
int pusch_tgt_snrx10,
|
||||||
int pucch_tgt_snrx10,
|
int pucch_tgt_snrx10,
|
||||||
NR_ServingCellConfigCommon_t *scc,
|
NR_ServingCellConfigCommon_t *scc,
|
||||||
|
|||||||
@@ -431,6 +431,7 @@ typedef struct {
|
|||||||
NR_BCCH_BCH_Message_t mib;
|
NR_BCCH_BCH_Message_t mib;
|
||||||
int ssb_SubcarrierOffset;
|
int ssb_SubcarrierOffset;
|
||||||
int pdsch_AntennaPorts;
|
int pdsch_AntennaPorts;
|
||||||
|
int pusch_AntennaPorts;
|
||||||
int pusch_TargetSNRx10;
|
int pusch_TargetSNRx10;
|
||||||
int pucch_TargetSNRx10;
|
int pucch_TargetSNRx10;
|
||||||
NR_BCCH_DL_SCH_Message_t *siblock1;
|
NR_BCCH_DL_SCH_Message_t *siblock1;
|
||||||
|
|||||||
@@ -224,6 +224,7 @@ static void init_NR_SI(gNB_RRC_INST *rrc, gNB_RrcConfigurationReq *configuration
|
|||||||
rrc_mac_config_req_gNB(rrc->module_id,
|
rrc_mac_config_req_gNB(rrc->module_id,
|
||||||
rrc->carrier.ssb_SubcarrierOffset,
|
rrc->carrier.ssb_SubcarrierOffset,
|
||||||
rrc->carrier.pdsch_AntennaPorts,
|
rrc->carrier.pdsch_AntennaPorts,
|
||||||
|
rrc->carrier.pusch_AntennaPorts,
|
||||||
rrc->carrier.pusch_TargetSNRx10,
|
rrc->carrier.pusch_TargetSNRx10,
|
||||||
rrc->carrier.pucch_TargetSNRx10,
|
rrc->carrier.pucch_TargetSNRx10,
|
||||||
(NR_ServingCellConfigCommon_t *)rrc->carrier.servingcellconfigcommon,
|
(NR_ServingCellConfigCommon_t *)rrc->carrier.servingcellconfigcommon,
|
||||||
@@ -309,6 +310,7 @@ char openair_rrc_gNB_configuration(const module_id_t gnb_mod_idP, gNB_RrcConfigu
|
|||||||
rrc->carrier.servingcellconfigcommon = configuration->scc;
|
rrc->carrier.servingcellconfigcommon = configuration->scc;
|
||||||
rrc->carrier.ssb_SubcarrierOffset = configuration->ssb_SubcarrierOffset;
|
rrc->carrier.ssb_SubcarrierOffset = configuration->ssb_SubcarrierOffset;
|
||||||
rrc->carrier.pdsch_AntennaPorts = configuration->pdsch_AntennaPorts;
|
rrc->carrier.pdsch_AntennaPorts = configuration->pdsch_AntennaPorts;
|
||||||
|
rrc->carrier.pusch_AntennaPorts = configuration->pusch_AntennaPorts;
|
||||||
rrc->carrier.pusch_TargetSNRx10 = configuration->pusch_TargetSNRx10;
|
rrc->carrier.pusch_TargetSNRx10 = configuration->pusch_TargetSNRx10;
|
||||||
rrc->carrier.pucch_TargetSNRx10 = configuration->pucch_TargetSNRx10;
|
rrc->carrier.pucch_TargetSNRx10 = configuration->pucch_TargetSNRx10;
|
||||||
/// System Information INIT
|
/// System Information INIT
|
||||||
@@ -462,6 +464,7 @@ rrc_gNB_generate_RRCSetup_for_RRCReestablishmentRequest(
|
|||||||
rrc_mac_config_req_gNB(rrc_instance_p->module_id,
|
rrc_mac_config_req_gNB(rrc_instance_p->module_id,
|
||||||
rrc_instance_p->carrier.ssb_SubcarrierOffset,
|
rrc_instance_p->carrier.ssb_SubcarrierOffset,
|
||||||
rrc_instance_p->carrier.pdsch_AntennaPorts,
|
rrc_instance_p->carrier.pdsch_AntennaPorts,
|
||||||
|
rrc_instance_p->carrier.pusch_AntennaPorts,
|
||||||
rrc_instance_p->carrier.pusch_TargetSNRx10,
|
rrc_instance_p->carrier.pusch_TargetSNRx10,
|
||||||
rrc_instance_p->carrier.pucch_TargetSNRx10,
|
rrc_instance_p->carrier.pucch_TargetSNRx10,
|
||||||
(NR_ServingCellConfigCommon_t *)rrc_instance_p->carrier.servingcellconfigcommon,
|
(NR_ServingCellConfigCommon_t *)rrc_instance_p->carrier.servingcellconfigcommon,
|
||||||
|
|||||||
@@ -346,6 +346,7 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_
|
|||||||
rrc_mac_config_req_gNB(rrc->module_id,
|
rrc_mac_config_req_gNB(rrc->module_id,
|
||||||
rrc->carrier.ssb_SubcarrierOffset,
|
rrc->carrier.ssb_SubcarrierOffset,
|
||||||
rrc->carrier.pdsch_AntennaPorts,
|
rrc->carrier.pdsch_AntennaPorts,
|
||||||
|
rrc->carrier.pusch_AntennaPorts,
|
||||||
rrc->carrier.pusch_TargetSNRx10,
|
rrc->carrier.pusch_TargetSNRx10,
|
||||||
rrc->carrier.pucch_TargetSNRx10,
|
rrc->carrier.pucch_TargetSNRx10,
|
||||||
NULL,
|
NULL,
|
||||||
|
|||||||
@@ -651,7 +651,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
|
|||||||
}
|
}
|
||||||
bwp->bwp_Dedicated->pdsch_Config->choice.setup->dataScramblingIdentityPDSCH = NULL;
|
bwp->bwp_Dedicated->pdsch_Config->choice.setup->dataScramblingIdentityPDSCH = NULL;
|
||||||
|
|
||||||
bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type=NULL;
|
bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type=NULL;//calloc(1,sizeof(*bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type));
|
||||||
bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->maxLength=NULL;
|
bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->maxLength=NULL;
|
||||||
bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->scramblingID0=NULL;
|
bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->scramblingID0=NULL;
|
||||||
bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->scramblingID1=NULL;
|
bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->scramblingID1=NULL;
|
||||||
|
|||||||
@@ -25,7 +25,6 @@
|
|||||||
*/
|
*/
|
||||||
#define _LARGEFILE_SOURCE
|
#define _LARGEFILE_SOURCE
|
||||||
#define _FILE_OFFSET_BITS 64
|
#define _FILE_OFFSET_BITS 64
|
||||||
#define NB_ANTENNAS_RX 2
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|||||||
@@ -54,7 +54,7 @@
|
|||||||
#include <targets/ARCH/rfsimulator/rfsimulator.h>
|
#include <targets/ARCH/rfsimulator/rfsimulator.h>
|
||||||
|
|
||||||
#define PORT 4043 //default TCP port for this simulator
|
#define PORT 4043 //default TCP port for this simulator
|
||||||
#define CirSize 307200 // 100ms is enough
|
#define CirSize 6144000 // 100ms is enough
|
||||||
#define sampleToByte(a,b) ((a)*(b)*sizeof(sample_t))
|
#define sampleToByte(a,b) ((a)*(b)*sizeof(sample_t))
|
||||||
#define byteToSample(a,b) ((a)/(sizeof(sample_t)*(b)))
|
#define byteToSample(a,b) ((a)/(sizeof(sample_t)*(b)))
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ gNBs =
|
|||||||
|
|
||||||
ssb_SubcarrierOffset = 31; //0;
|
ssb_SubcarrierOffset = 31; //0;
|
||||||
pdsch_AntennaPorts = 1;
|
pdsch_AntennaPorts = 1;
|
||||||
|
pusch_AntennaPorts = 1;
|
||||||
#pusch_TargetSNRx10 = 200;
|
#pusch_TargetSNRx10 = 200;
|
||||||
#pucch_TargetSNRx10 = 200;
|
#pucch_TargetSNRx10 = 200;
|
||||||
pusch_TargetSNRx10 = 200;
|
pusch_TargetSNRx10 = 200;
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ gNBs =
|
|||||||
|
|
||||||
ssb_SubcarrierOffset = 0;
|
ssb_SubcarrierOffset = 0;
|
||||||
pdsch_AntennaPorts = 1;
|
pdsch_AntennaPorts = 1;
|
||||||
|
pusch_AntennaPorts = 1;
|
||||||
|
|
||||||
servingCellConfigCommon = (
|
servingCellConfigCommon = (
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ gNBs =
|
|||||||
|
|
||||||
ssb_SubcarrierOffset = 0;
|
ssb_SubcarrierOffset = 0;
|
||||||
pdsch_AntennaPorts = 1;
|
pdsch_AntennaPorts = 1;
|
||||||
|
pusch_AntennaPorts = 1;
|
||||||
|
|
||||||
servingCellConfigCommon = (
|
servingCellConfigCommon = (
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ gNBs =
|
|||||||
|
|
||||||
ssb_SubcarrierOffset = 0;
|
ssb_SubcarrierOffset = 0;
|
||||||
pdsch_AntennaPorts = 1;
|
pdsch_AntennaPorts = 1;
|
||||||
|
pusch_AntennaPorts = 1;
|
||||||
pusch_TargetSNRx10 = 200;
|
pusch_TargetSNRx10 = 200;
|
||||||
pucch_TargetSNRx10 = 200;
|
pucch_TargetSNRx10 = 200;
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ gNBs =
|
|||||||
|
|
||||||
ssb_SubcarrierOffset = 0;
|
ssb_SubcarrierOffset = 0;
|
||||||
pdsch_AntennaPorts = 1;
|
pdsch_AntennaPorts = 1;
|
||||||
|
pusch_AntennaPorts = 1;
|
||||||
|
|
||||||
servingCellConfigCommon = (
|
servingCellConfigCommon = (
|
||||||
{
|
{
|
||||||
@@ -238,7 +239,7 @@ L1s = (
|
|||||||
|
|
||||||
RUs = (
|
RUs = (
|
||||||
{
|
{
|
||||||
local_rf = "yes"
|
local_rf = "yes"
|
||||||
nb_tx = 1;
|
nb_tx = 1;
|
||||||
nb_rx = 1;
|
nb_rx = 1;
|
||||||
att_tx = 0;
|
att_tx = 0;
|
||||||
@@ -247,15 +248,14 @@ RUs = (
|
|||||||
max_pdschReferenceSignalPower = -27;
|
max_pdschReferenceSignalPower = -27;
|
||||||
max_rxgain = 75;
|
max_rxgain = 75;
|
||||||
eNB_instances = [0];
|
eNB_instances = [0];
|
||||||
##beamforming 1x2 matrix: 1 layer x 2 antennas
|
## beamforming 1x2 matrix: 1 layer x 2 antennas
|
||||||
bf_weights = [0x00007fff, 0x0000];
|
bf_weights = [0x00007fff, 0x0000];
|
||||||
##beamforming 1x4 matrix: 1 layer x 4 antennas
|
## beamforming 1x4 matrix: 1 layer x 4 antennas
|
||||||
#bf_weights = [0x00007fff, 0x0000,0x0000, 0x0000];
|
#bf_weights = [0x00007fff, 0x0000,0x0000, 0x0000];
|
||||||
## beamforming 2x2 matrix:
|
## beamforming 2x2 matrix:
|
||||||
# bf_weights = [0x00007fff, 0x00000000, 0x00000000, 0x00007fff];
|
#bf_weights = [0x00007fff, 0x00000000, 0x00000000, 0x00007fff];
|
||||||
## beamforming 4x4 matrix:
|
## beamforming 4x4 matrix:
|
||||||
#bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000, 0x00000000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff];
|
#bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000, 0x00000000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff];
|
||||||
|
|
||||||
sdr_addrs = "addr=192.168.10.2,mgmt_addr=192.168.10.2,second_addr=192.168.20.2";
|
sdr_addrs = "addr=192.168.10.2,mgmt_addr=192.168.10.2,second_addr=192.168.20.2";
|
||||||
clock_src = "external";
|
clock_src = "external";
|
||||||
# if_freq = 3700000000L;
|
# if_freq = 3700000000L;
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ gNBs =
|
|||||||
|
|
||||||
ssb_SubcarrierOffset = 0;
|
ssb_SubcarrierOffset = 0;
|
||||||
pdsch_AntennaPorts = 1;
|
pdsch_AntennaPorts = 1;
|
||||||
|
pusch_AntennaPorts = 1;
|
||||||
|
|
||||||
servingCellConfigCommon = (
|
servingCellConfigCommon = (
|
||||||
{
|
{
|
||||||
@@ -238,7 +239,7 @@ L1s = (
|
|||||||
|
|
||||||
RUs = (
|
RUs = (
|
||||||
{
|
{
|
||||||
local_rf = "yes"
|
local_rf = "yes"
|
||||||
nb_tx = 1;
|
nb_tx = 1;
|
||||||
nb_rx = 1;
|
nb_rx = 1;
|
||||||
att_tx = 0;
|
att_tx = 0;
|
||||||
@@ -247,15 +248,14 @@ RUs = (
|
|||||||
max_pdschReferenceSignalPower = -27;
|
max_pdschReferenceSignalPower = -27;
|
||||||
max_rxgain = 114;
|
max_rxgain = 114;
|
||||||
eNB_instances = [0];
|
eNB_instances = [0];
|
||||||
##beamforming 1x2 matrix: 1 layer x 2 antennas
|
## beamforming 1x2 matrix: 1 layer x 2 antennas
|
||||||
bf_weights = [0x00007fff, 0x0000];
|
bf_weights = [0x00007fff, 0x0000];
|
||||||
##beamforming 1x4 matrix: 1 layer x 4 antennas
|
## beamforming 1x4 matrix: 1 layer x 4 antennas
|
||||||
#bf_weights = [0x00007fff, 0x0000,0x0000, 0x0000];
|
#bf_weights = [0x00007fff, 0x0000,0x0000, 0x0000];
|
||||||
## beamforming 2x2 matrix:
|
## beamforming 2x2 matrix:
|
||||||
# bf_weights = [0x00007fff, 0x00000000, 0x00000000, 0x00007fff];
|
#bf_weights = [0x00007fff, 0x00000000, 0x00000000, 0x00007fff];
|
||||||
## beamforming 4x4 matrix:
|
## beamforming 4x4 matrix:
|
||||||
#bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000, 0x00000000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff];
|
#bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000, 0x00000000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff];
|
||||||
|
|
||||||
sdr_addrs = "type=x300";
|
sdr_addrs = "type=x300";
|
||||||
clock_src = "external";
|
clock_src = "external";
|
||||||
# if_freq = 3700000000L;
|
# if_freq = 3700000000L;
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ gNBs =
|
|||||||
|
|
||||||
ssb_SubcarrierOffset = 31;
|
ssb_SubcarrierOffset = 31;
|
||||||
pdsch_AntennaPorts = 1;
|
pdsch_AntennaPorts = 1;
|
||||||
|
pusch_AntennaPorts = 1;
|
||||||
|
|
||||||
servingCellConfigCommon = (
|
servingCellConfigCommon = (
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ gNBs =
|
|||||||
|
|
||||||
ssb_SubcarrierOffset = 0;
|
ssb_SubcarrierOffset = 0;
|
||||||
pdsch_AntennaPorts = 1;
|
pdsch_AntennaPorts = 1;
|
||||||
|
pusch_AntennaPorts = 1;
|
||||||
|
|
||||||
servingCellConfigCommon = (
|
servingCellConfigCommon = (
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ gNBs =
|
|||||||
|
|
||||||
ssb_SubcarrierOffset = 0;
|
ssb_SubcarrierOffset = 0;
|
||||||
pdsch_AntennaPorts = 1;
|
pdsch_AntennaPorts = 1;
|
||||||
|
pusch_AntennaPorts = 1;
|
||||||
|
|
||||||
servingCellConfigCommon = (
|
servingCellConfigCommon = (
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ gNBs =
|
|||||||
|
|
||||||
ssb_SubcarrierOffset = 0;
|
ssb_SubcarrierOffset = 0;
|
||||||
pdsch_AntennaPorts = 1;
|
pdsch_AntennaPorts = 1;
|
||||||
|
pusch_AntennaPorts = 1;
|
||||||
|
|
||||||
servingCellConfigCommon = (
|
servingCellConfigCommon = (
|
||||||
{
|
{
|
||||||
@@ -282,6 +283,7 @@ L1s = (
|
|||||||
{
|
{
|
||||||
num_cc = 1;
|
num_cc = 1;
|
||||||
tr_n_preference = "local_mac";
|
tr_n_preference = "local_mac";
|
||||||
|
pusch_proc_threads = 8;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -296,8 +298,14 @@ RUs = (
|
|||||||
max_pdschReferenceSignalPower = -27;
|
max_pdschReferenceSignalPower = -27;
|
||||||
max_rxgain = 114;
|
max_rxgain = 114;
|
||||||
eNB_instances = [0];
|
eNB_instances = [0];
|
||||||
#beamforming 1x4 matrix:
|
## beamforming 1x2 matrix: 1 layer x 2 antennas
|
||||||
bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000];
|
bf_weights = [0x00007fff, 0x0000];
|
||||||
|
## beamforming 1x4 matrix: 1 layer x 4 antennas
|
||||||
|
#bf_weights = [0x00007fff, 0x0000,0x0000, 0x0000];
|
||||||
|
## beamforming 2x2 matrix:
|
||||||
|
#bf_weights = [0x00007fff, 0x00000000, 0x00000000, 0x00007fff];
|
||||||
|
## beamforming 4x4 matrix:
|
||||||
|
#bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000, 0x00000000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff];
|
||||||
sdr_addrs = "type=x300";
|
sdr_addrs = "type=x300";
|
||||||
clock_src = "external";
|
clock_src = "external";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ gNBs =
|
|||||||
|
|
||||||
ssb_SubcarrierOffset = 0;
|
ssb_SubcarrierOffset = 0;
|
||||||
pdsch_AntennaPorts = 1;
|
pdsch_AntennaPorts = 1;
|
||||||
|
pusch_AntennaPorts = 1;
|
||||||
|
|
||||||
servingCellConfigCommon = (
|
servingCellConfigCommon = (
|
||||||
{
|
{
|
||||||
@@ -228,7 +229,7 @@ L1s = (
|
|||||||
|
|
||||||
RUs = (
|
RUs = (
|
||||||
{
|
{
|
||||||
local_rf = "yes"
|
local_rf = "yes"
|
||||||
nb_tx = 1
|
nb_tx = 1
|
||||||
nb_rx = 1
|
nb_rx = 1
|
||||||
att_tx = 0
|
att_tx = 0
|
||||||
@@ -237,7 +238,15 @@ RUs = (
|
|||||||
max_pdschReferenceSignalPower = -27;
|
max_pdschReferenceSignalPower = -27;
|
||||||
max_rxgain = 114;
|
max_rxgain = 114;
|
||||||
eNB_instances = [0];
|
eNB_instances = [0];
|
||||||
sdr_addrs = "type=b200";
|
## beamforming 1x2 matrix: 1 layer x 2 antennas
|
||||||
|
#bf_weights = [0x00007fff, 0x00007fff];
|
||||||
|
## beamforming 1x4 matrix: 1 layer x 4 antennas
|
||||||
|
#bf_weights = [0x00007fff, 0x0000,0x0000, 0x0000];
|
||||||
|
## beamforming 2x2 matrix:
|
||||||
|
#bf_weights = [0x00007fff, 0x00000000, 0x00000000, 0x00007fff];
|
||||||
|
## beamforming 4x4 matrix:
|
||||||
|
#bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000, 0x00000000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff];
|
||||||
|
sdr_addrs = "type=b200";
|
||||||
#clock_src = "external";
|
#clock_src = "external";
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ gNBs =
|
|||||||
|
|
||||||
ssb_SubcarrierOffset = 0;
|
ssb_SubcarrierOffset = 0;
|
||||||
pdsch_AntennaPorts = 1;
|
pdsch_AntennaPorts = 1;
|
||||||
|
pusch_AntennaPorts = 1;
|
||||||
|
|
||||||
servingCellConfigCommon = (
|
servingCellConfigCommon = (
|
||||||
{
|
{
|
||||||
@@ -239,7 +240,7 @@ L1s = (
|
|||||||
|
|
||||||
RUs = (
|
RUs = (
|
||||||
{
|
{
|
||||||
local_rf = "yes"
|
local_rf = "yes"
|
||||||
nb_tx = 1
|
nb_tx = 1
|
||||||
nb_rx = 1
|
nb_rx = 1
|
||||||
att_tx = 0
|
att_tx = 0
|
||||||
@@ -248,15 +249,14 @@ RUs = (
|
|||||||
max_pdschReferenceSignalPower = -27;
|
max_pdschReferenceSignalPower = -27;
|
||||||
max_rxgain = 50;
|
max_rxgain = 50;
|
||||||
eNB_instances = [0];
|
eNB_instances = [0];
|
||||||
##beamforming 1x2 matrix: 1 layer x 2 antennas
|
## beamforming 1x2 matrix: 1 layer x 2 antennas
|
||||||
bf_weights = [0x00007fff, 0x0000];
|
#bf_weights = [0x00007fff, 0x00007fff];
|
||||||
##beamforming 1x4 matrix: 1 layer x 4 antennas
|
## beamforming 1x4 matrix: 1 layer x 4 antennas
|
||||||
#bf_weights = [0x00007fff, 0x0000,0x0000, 0x0000];
|
#bf_weights = [0x00007fff, 0x0000,0x0000, 0x0000];
|
||||||
## beamforming 2x2 matrix:
|
## beamforming 2x2 matrix:
|
||||||
# bf_weights = [0x00007fff, 0x00000000, 0x00000000, 0x00007fff];
|
#bf_weights = [0x00007fff, 0x00000000, 0x00000000, 0x00007fff];
|
||||||
## beamforming 4x4 matrix:
|
## beamforming 4x4 matrix:
|
||||||
#bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000, 0x00000000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff];
|
#bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000, 0x00000000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff];
|
||||||
|
|
||||||
sdr_addrs = "addr=192.168.10.2,mgmt_addr=192.168.10.2,second_addr=192.168.20.2";
|
sdr_addrs = "addr=192.168.10.2,mgmt_addr=192.168.10.2,second_addr=192.168.20.2";
|
||||||
clock_src = "external";
|
clock_src = "external";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ gNBs =
|
|||||||
|
|
||||||
ssb_SubcarrierOffset = 0;
|
ssb_SubcarrierOffset = 0;
|
||||||
pdsch_AntennaPorts = 1;
|
pdsch_AntennaPorts = 1;
|
||||||
|
pusch_AntennaPorts = 1;
|
||||||
|
|
||||||
servingCellConfigCommon = (
|
servingCellConfigCommon = (
|
||||||
{
|
{
|
||||||
@@ -256,7 +257,6 @@ RUs = (
|
|||||||
# bf_weights = [0x00007fff, 0x00000000, 0x00000000, 0x00007fff];
|
# bf_weights = [0x00007fff, 0x00000000, 0x00000000, 0x00007fff];
|
||||||
## beamforming 4x4 matrix:
|
## beamforming 4x4 matrix:
|
||||||
#bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000, 0x00000000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff];
|
#bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000, 0x00000000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff];
|
||||||
|
|
||||||
sdr_addrs = "type=x300";
|
sdr_addrs = "type=x300";
|
||||||
clock_src = "external";
|
clock_src = "external";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ gNBs =
|
|||||||
|
|
||||||
ssb_SubcarrierOffset = 0;
|
ssb_SubcarrierOffset = 0;
|
||||||
pdsch_AntennaPorts = 1;
|
pdsch_AntennaPorts = 1;
|
||||||
|
pusch_AntennaPorts = 1;
|
||||||
|
|
||||||
servingCellConfigCommon = (
|
servingCellConfigCommon = (
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ gNBs =
|
|||||||
|
|
||||||
ssb_SubcarrierOffset = 0;
|
ssb_SubcarrierOffset = 0;
|
||||||
pdsch_AntennaPorts = 1;
|
pdsch_AntennaPorts = 1;
|
||||||
|
pusch_AntennaPorts = 1;
|
||||||
|
|
||||||
servingCellConfigCommon = (
|
servingCellConfigCommon = (
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ gNBs =
|
|||||||
|
|
||||||
ssb_SubcarrierOffset = 0;
|
ssb_SubcarrierOffset = 0;
|
||||||
pdsch_AntennaPorts = 1;
|
pdsch_AntennaPorts = 1;
|
||||||
|
pusch_AntennaPorts = 1;
|
||||||
|
|
||||||
servingCellConfigCommon = (
|
servingCellConfigCommon = (
|
||||||
{
|
{
|
||||||
@@ -257,8 +258,8 @@ RUs = (
|
|||||||
## beamforming 4x4 matrix:
|
## beamforming 4x4 matrix:
|
||||||
#bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000, 0x00000000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff];
|
#bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000, 0x00000000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff, 0x0000, 0x0000, 0x0000, 0x0000, 0x00007fff];
|
||||||
sdr_addrs = "type=b200";
|
sdr_addrs = "type=b200";
|
||||||
#"addr=192.168.18.207";
|
#"addr=192.168.18.207";
|
||||||
#"addr=192.168.10.2,mgmt_addr=192.168.10.2,second_addr=192.168.20.2";
|
#"addr=192.168.10.2,mgmt_addr=192.168.10.2,second_addr=192.168.20.2";
|
||||||
clock_src = "external";
|
clock_src = "external";
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ gNBs =
|
|||||||
|
|
||||||
ssb_SubcarrierOffset = 0;
|
ssb_SubcarrierOffset = 0;
|
||||||
pdsch_AntennaPorts = 1;
|
pdsch_AntennaPorts = 1;
|
||||||
|
pusch_AntennaPorts = 1;
|
||||||
|
|
||||||
servingCellConfigCommon = (
|
servingCellConfigCommon = (
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ gNBs =
|
|||||||
|
|
||||||
ssb_SubcarrierOffset = 0;
|
ssb_SubcarrierOffset = 0;
|
||||||
pdsch_AntennaPorts = 1;
|
pdsch_AntennaPorts = 1;
|
||||||
|
pusch_AntennaPorts = 1;
|
||||||
|
|
||||||
servingCellConfigCommon = (
|
servingCellConfigCommon = (
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ gNBs =
|
|||||||
|
|
||||||
ssb_SubcarrierOffset = 0;
|
ssb_SubcarrierOffset = 0;
|
||||||
pdsch_AntennaPorts = 1;
|
pdsch_AntennaPorts = 1;
|
||||||
|
pusch_AntennaPorts = 1;
|
||||||
|
|
||||||
servingCellConfigCommon = (
|
servingCellConfigCommon = (
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ gNBs =
|
|||||||
|
|
||||||
ssb_SubcarrierOffset = 0;
|
ssb_SubcarrierOffset = 0;
|
||||||
pdsch_AntennaPorts = 1;
|
pdsch_AntennaPorts = 1;
|
||||||
|
pusch_AntennaPorts = 1;
|
||||||
|
|
||||||
servingCellConfigCommon = (
|
servingCellConfigCommon = (
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ gNBs =
|
|||||||
|
|
||||||
ssb_SubcarrierOffset = 31; //0;
|
ssb_SubcarrierOffset = 31; //0;
|
||||||
pdsch_AntennaPorts = 1;
|
pdsch_AntennaPorts = 1;
|
||||||
|
pusch_AntennaPorts = 1;
|
||||||
pusch_TargetSNRx10 = 200;
|
pusch_TargetSNRx10 = 200;
|
||||||
pucch_TargetSNRx10 = 200;
|
pucch_TargetSNRx10 = 200;
|
||||||
|
|
||||||
@@ -249,7 +250,7 @@ L1s = (
|
|||||||
{
|
{
|
||||||
num_cc = 1;
|
num_cc = 1;
|
||||||
tr_n_preference = "local_mac";
|
tr_n_preference = "local_mac";
|
||||||
pusch_proc_threads = 8;
|
pusch_proc_threads = 8;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ gNBs =
|
|||||||
|
|
||||||
ssb_SubcarrierOffset = 31; //0;
|
ssb_SubcarrierOffset = 31; //0;
|
||||||
pdsch_AntennaPorts = 1;
|
pdsch_AntennaPorts = 1;
|
||||||
|
pusch_AntennaPorts = 1;
|
||||||
pusch_TargetSNRx10 = 200;
|
pusch_TargetSNRx10 = 200;
|
||||||
pucch_TargetSNRx10 = 200;
|
pucch_TargetSNRx10 = 200;
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ gNBs =
|
|||||||
|
|
||||||
ssb_SubcarrierOffset = 31; //0;
|
ssb_SubcarrierOffset = 31; //0;
|
||||||
pdsch_AntennaPorts = 1;
|
pdsch_AntennaPorts = 1;
|
||||||
|
pusch_AntennaPorts = 1;
|
||||||
|
|
||||||
servingCellConfigCommon = (
|
servingCellConfigCommon = (
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user