Commit 39d1e3ff authored by Robert Schmidt's avatar Robert Schmidt

Merge remote-tracking branch 'origin/clear_ue_unit_tests' into integration_2025_w12 (!3301)

Remove unused NR UE PHY unit tests

Old dead code that won't even compile and that is not testing anything
relevant to current state of code
parents 82fb9fcc 73e96220
......@@ -682,7 +682,6 @@ set(SCHED_SRC_NR_UE
${OPENAIR1_DIR}/SCHED_NR_UE/phy_procedures_nr_ue.c
${OPENAIR1_DIR}/SCHED_NR_UE/phy_procedures_nr_ue_sl.c
${OPENAIR1_DIR}/SCHED_NR_UE/fapi_nr_ue_l1.c
${OPENAIR1_DIR}/SCHED_NR_UE/phy_frame_config_nr_ue.c
${OPENAIR1_DIR}/SCHED_NR_UE/harq_nr.c
${OPENAIR1_DIR}/SCHED_NR_UE/pucch_uci_ue_nr.c
)
......
......@@ -2283,10 +2283,8 @@ INPUT = \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/SIMULATION/TOOLS/phase_noise.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/SIMULATION/TOOLS/channel_sim.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/SIMULATION/TOOLS/sim.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/SCHED_NR_UE/phy_frame_config_nr.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/SCHED_NR_UE/harq_nr.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/SCHED_NR_UE/fapi_nr_ue_l1.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/SCHED_NR_UE/phy_frame_config_nr_ue.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/SCHED_NR_UE/pucch_uci_ue_nr.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/SCHED_NR_UE/harq_nr.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/SCHED_NR_UE/phy_procedures_nr_ue.c \
......
......@@ -28,7 +28,6 @@
#include "NR_MAC_UE/mac_proto.h"
#include "RRC/NR_UE/rrc_proto.h"
#include "RRC/NR_UE/L2_interface_ue.h"
#include "SCHED_NR_UE/phy_frame_config_nr.h"
#include "SCHED_NR_UE/defs.h"
#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
#include "executables/softmodem-common.h"
......@@ -466,6 +465,38 @@ static void UE_synch(void *arg) {
}
}
static int nr_ue_slot_select(const fapi_nr_config_request_t *cfg, int nr_slot)
{
if (cfg->cell_config.frame_duplex_type == FDD)
return NR_UPLINK_SLOT | NR_DOWNLINK_SLOT;
const fapi_nr_tdd_table_t *tdd_table = &cfg->tdd_table;
int rel_slot = nr_slot % tdd_table->tdd_period_in_slots;
if (tdd_table->max_tdd_periodicity_list == NULL) // this happens before receiving TDD configuration
return NR_DOWNLINK_SLOT;
const fapi_nr_max_tdd_periodicity_t *current_slot = &tdd_table->max_tdd_periodicity_list[rel_slot];
// if the 1st symbol is UL the whole slot is UL
if (current_slot->max_num_of_symbol_per_slot_list[0].slot_config == 1)
return NR_UPLINK_SLOT;
// if the 1st symbol is flexible the whole slot is mixed
if (current_slot->max_num_of_symbol_per_slot_list[0].slot_config == 2)
return NR_MIXED_SLOT;
for (int i = 1; i < NR_NUMBER_OF_SYMBOLS_PER_SLOT; i++) {
// if the 1st symbol is DL and any other is not, the slot is mixed
if (current_slot->max_num_of_symbol_per_slot_list[i].slot_config != 0) {
return NR_MIXED_SLOT;
}
}
// if here, all the symbols where DL
return NR_DOWNLINK_SLOT;
}
static void RU_write(nr_rxtx_thread_data_t *rxtxD, bool sl_tx_action)
{
PHY_VARS_NR_UE *UE = rxtxD->UE;
......
......@@ -52,12 +52,10 @@ void nr_group_sequence_hopping(pucch_GroupHopping_t PUCCH_GroupHopping,
* n_hop=1 for the second hop
*/
// depending on the value of the PUCCH_GroupHopping, we will obtain different values for u,v
//pucch_GroupHopping_t PUCCH_GroupHopping = ue->pucch_config_common_nr->pucch_GroupHopping; // from higher layers FIXME!!!
// n_id defined as per TS 38.211 subclause 6.3.2.2.1 (is given by the higher-layer parameter hoppingId)
// it is hoppingId from PUCCH-ConfigCommon:
// Cell-Specific scrambling ID for group hoppping and sequence hopping if enabled
// Corresponds to L1 parameter 'HoppingID' (see 38.211, section 6.3.2.2) BIT STRING (SIZE (10))
//uint16_t n_id = ue->pucch_config_common_nr->hoppingId; // from higher layers FIXME!!!
#ifdef DEBUG_NR_PUCCH_TX
printf("\t\t [nr_group_sequence_hopping] PUCCH_GroupHopping=%u, n_id=%u \n",PUCCH_GroupHopping,n_id);
#endif
......
......@@ -237,8 +237,6 @@ typedef struct {
/// estimated frequency offset (in radians) for all subcarriers
int32_t freq_offset;
/// nid2 is the PSS value, the PCI (physical cell id) will be: 3*NID1 (SSS value) + NID2 (PSS value)
int32_t nid2;
} NR_UE_COMMON;
#define NR_PRS_IDFT_OVERSAMP_FACTOR 1 // IDFT oversampling factor for NR PRS channel estimates in time domain, ALLOWED value 16x, and 1x is default(ie. IDFT size is frame_params->ofdm_symbol_size)
......@@ -413,12 +411,6 @@ typedef struct PHY_VARS_NR_UE_s {
uint32_t PF;
uint32_t PO;
#if defined(UPGRADE_RAT_NR)
/// demodulation reference signal for NR PBCH
uint32_t dmrs_pbch_bitmap_nr[DMRS_PBCH_I_SSB][DMRS_PBCH_N_HF][DMRS_BITMAP_SIZE];
#endif
// Scrambling IDs used in PUSCH DMRS
c16_t X_u[64][839];
......@@ -476,15 +468,6 @@ typedef struct PHY_VARS_NR_UE_s {
int ta_slot;
int ta_command;
/// Flag to tell if UE is secondary user (cognitive mode)
unsigned char is_secondary_ue;
/// Flag to tell if secondary gNB has channel estimates to create NULL-beams from.
unsigned char has_valid_precoder;
/// hold the precoder for NULL beam to the primary gNB
int **ul_precoder_S_UE;
/// holds the maximum channel/precoder coefficient
char log2_maxp;
/// Flag to initialize averaging of PHY measurements
int init_averaging;
......@@ -504,17 +487,6 @@ typedef struct PHY_VARS_NR_UE_s {
/// CSI variables
nr_csi_info_t *nr_csi_info;
//#if defined(UPGRADE_RAT_NR)
#if 1
SystemInformationBlockType1_nr_t systemInformationBlockType1_nr;
#endif
//#if defined(UPGRADE_RAT_NR)
#if 1
scheduling_request_config_t scheduling_request_config_nr[NUMBER_OF_CONNECTED_gNB_MAX];
#endif
uint32_t use_ia_receiver;
// TODO: move this out of phy
time_stats_t ue_ul_indication_stats;
nr_ue_phy_cpu_stat_t phy_cpu_stats;
......@@ -522,11 +494,6 @@ typedef struct PHY_VARS_NR_UE_s {
/// RF and Interface devices per CC
openair0_device rfdevice;
#if ENABLE_RAL
hash_table_t *ral_thresholds_timed;
SLIST_HEAD(ral_thresholds_gen_poll_s, ral_threshold_phy_t) ral_thresholds_gen_polled[RAL_LINK_PARAM_GEN_MAX];
SLIST_HEAD(ral_thresholds_lte_poll_s, ral_threshold_phy_t) ral_thresholds_lte_polled[RAL_LINK_PARAM_LTE_MAX];
#endif
void* scopeData;
// Pointers to hold PDSCH data only for phy simulators
void *phy_sim_rxdataF;
......
......@@ -218,16 +218,8 @@ struct NR_DL_FRAME_PARMS {
c16_t delay_table[2 * MAX_DELAY_COMP + 1][NR_MAX_OFDM_SYMBOL_SIZE];
/// Table used to apply the delay compensation in PUCCH2
c16_t delay_table128[2 * MAX_DELAY_COMP + 1][128];
/// SRS configuration from TS 38.331 RRC
SRS_NR srs_nr;
/// Power used by SSB in order to estimate signal strength and path loss
int ss_PBCH_BlockPower;
/// for NR TDD management
TDD_UL_DL_configCommon_t *p_tdd_UL_DL_Configuration;
TDD_UL_DL_configCommon_t *p_tdd_UL_DL_ConfigurationCommon2;
TDD_UL_DL_SlotConfig_t *p_TDD_UL_DL_ConfigDedicated;
/// TDD configuration
uint16_t tdd_uplink_nr[2*NR_MAX_SLOTS_PER_FRAME]; /* this is a bitmap of symbol of each slot given for 2 frames */
......
......@@ -152,147 +152,6 @@ void set_tdd_config_nr(nfapi_nr_config_request_scf_t *cfg, frame_structure_t *fs
}
}
/*******************************************************************
*
* NAME : add_tdd_dedicated_configuration_nr
*
* PARAMETERS : pointer to frame configuration
*
* OUTPUT: table of uplink symbol for each slot for several frames
*
* RETURN : 0 if tdd has been properly configurated
* -1 tdd configuration can not be done
*
* DESCRIPTION : generate bit map for uplink symbol for each slot for several frames
* see TS 38.213 11.1 Slot configuration
*
*********************************************************************/
void add_tdd_dedicated_configuration_nr(NR_DL_FRAME_PARMS *frame_parms, int slotIndex, int nrofDownlinkSymbols, int nrofUplinkSymbols) {
TDD_UL_DL_SlotConfig_t *p_TDD_UL_DL_ConfigDedicated = frame_parms->p_TDD_UL_DL_ConfigDedicated;
TDD_UL_DL_SlotConfig_t *p_previous_TDD_UL_DL_ConfigDedicated=NULL;
int next = 0;
while (p_TDD_UL_DL_ConfigDedicated != NULL) {
p_previous_TDD_UL_DL_ConfigDedicated = p_TDD_UL_DL_ConfigDedicated;
p_TDD_UL_DL_ConfigDedicated = (TDD_UL_DL_SlotConfig_t *)(p_TDD_UL_DL_ConfigDedicated->p_next_TDD_UL_DL_SlotConfig);
next = 1;
}
p_TDD_UL_DL_ConfigDedicated = calloc( 1, sizeof(TDD_UL_DL_SlotConfig_t));
//printf("allocate pt %p \n", p_TDD_UL_DL_ConfigDedicated);
if (p_TDD_UL_DL_ConfigDedicated == NULL) {
printf("Error test_frame_configuration: memory allocation problem \n");
assert(0);
}
if (next == 0) {
frame_parms->p_TDD_UL_DL_ConfigDedicated = p_TDD_UL_DL_ConfigDedicated;
} else {
p_previous_TDD_UL_DL_ConfigDedicated->p_next_TDD_UL_DL_SlotConfig = (TDD_UL_DL_SlotConfig_t *)p_TDD_UL_DL_ConfigDedicated;
}
p_TDD_UL_DL_ConfigDedicated->slotIndex = slotIndex;
p_TDD_UL_DL_ConfigDedicated->nrofDownlinkSymbols = nrofDownlinkSymbols;
p_TDD_UL_DL_ConfigDedicated->nrofUplinkSymbols = nrofUplinkSymbols;
}
/*******************************************************************
*
* NAME : set_tdd_configuration_dedicated_nr
*
* PARAMETERS : pointer to frame configuration
*
* OUTPUT: table of uplink symbol for each slot for several frames
*
* RETURN : 0 if tdd has been properly configurated
* -1 tdd configuration can not be done
*
* DESCRIPTION : generate bit map for uplink symbol for each slot for several frames
* see TS 38.213 11.1 Slot configuration
*
*********************************************************************/
int set_tdd_configuration_dedicated_nr(NR_DL_FRAME_PARMS *frame_parms) {
TDD_UL_DL_SlotConfig_t *p_current_TDD_UL_DL_SlotConfig;
p_current_TDD_UL_DL_SlotConfig = frame_parms->p_TDD_UL_DL_ConfigDedicated;
NR_TST_PHY_PRINTF("\nSet tdd dedicated configuration\n ");
while(p_current_TDD_UL_DL_SlotConfig != NULL) {
int slot_index = p_current_TDD_UL_DL_SlotConfig->slotIndex;
if (slot_index < frame_parms->slots_per_frame) {
if (p_current_TDD_UL_DL_SlotConfig->nrofDownlinkSymbols != 0) {
if (p_current_TDD_UL_DL_SlotConfig->nrofDownlinkSymbols == NR_TDD_SET_ALL_SYMBOLS) {
if (p_current_TDD_UL_DL_SlotConfig->nrofUplinkSymbols == 0) {
frame_parms->tdd_uplink_nr[slot_index] = NR_TDD_DOWNLINK_SLOT;
NR_TST_PHY_PRINTF(" DL[%d] ", slot_index);
} else {
LOG_E(PHY,"set_tdd_configuration_dedicated_nr: tdd downlink & uplink symbol configuration is not supported \n");
return (-1);
}
} else {
LOG_E(PHY,"set_tdd_configuration_dedicated_nr: tdd downlink symbol configuration is not supported \n");
return (-1);
}
} else if (p_current_TDD_UL_DL_SlotConfig->nrofUplinkSymbols != 0) {
if (p_current_TDD_UL_DL_SlotConfig->nrofUplinkSymbols == NR_TDD_SET_ALL_SYMBOLS) {
frame_parms->tdd_uplink_nr[slot_index] = NR_TDD_UPLINK_SLOT;
NR_TST_PHY_PRINTF(" UL[%d] ", slot_index);
} else {
LOG_E(PHY,"set_tdd_configuration_dedicated_nr: tdd uplink symbol configuration is not supported \n");
return (-1);
}
} else {
LOG_E(PHY,"set_tdd_configuration_dedicated_nr: no tdd symbol configuration is specified \n");
return (-1);
}
} else {
LOG_E(PHY,"set_tdd_configuration_dedicated_nr: tdd slot index exceeds maximum value \n");
return (-1);
}
p_current_TDD_UL_DL_SlotConfig = (TDD_UL_DL_SlotConfig_t *)(p_current_TDD_UL_DL_SlotConfig->p_next_TDD_UL_DL_SlotConfig);
}
NR_TST_PHY_PRINTF("\n");
return (0);
}
/*******************************************************************
*
* NAME : set_tdd_configuration
*
* PARAMETERS : pointer to tdd common configuration
* pointer to tdd common configuration2
* pointer to tdd dedicated configuration
*
* OUTPUT: table of uplink symbol for each slot for 2 frames
*
* RETURN : 0 if srs sequence has been successfully generated
* -1 if sequence can not be properly generated
*
* DESCRIPTION : generate bit map for uplink symbol for each slot for 2 frames
* see TS 38.213 11.1 Slot configuration
*
*********************************************************************/
int get_next_downlink_slot(PHY_VARS_gNB *gNB, nfapi_nr_config_request_scf_t *cfg, int nr_frame, int nr_slot) {
int slot = nr_slot;
int frame = nr_frame;
int slots_per_frame = gNB->frame_parms.slots_per_frame;
while (true) {
slot++;
if (slot/slots_per_frame) frame++;
slot %= slots_per_frame;
int slot_type = nr_slot_select(cfg, frame, slot);
if (slot_type == NR_DOWNLINK_SLOT || slot_type == NR_MIXED_SLOT) return slot;
AssertFatal(frame < (nr_frame+2), "Something went worng. This shouldn't happen\n");
}
}
int nr_slot_select(nfapi_nr_config_request_scf_t *cfg, int nr_frame, int nr_slot)
{
(void) nr_frame;
......@@ -329,70 +188,6 @@ int nr_slot_select(nfapi_nr_config_request_scf_t *cfg, int nr_frame, int nr_slot
}
}
/*******************************************************************
*
* NAME : free_tdd_configuration_nr
*
* PARAMETERS : pointer to frame configuration
*
* RETURN : none
*
* DESCRIPTION : free structure related to tdd configuration
*
*********************************************************************/
void free_tdd_configuration_nr(NR_DL_FRAME_PARMS *frame_parms) {
TDD_UL_DL_configCommon_t *p_tdd_UL_DL_Configuration = frame_parms->p_tdd_UL_DL_Configuration;
free_tdd_configuration_dedicated_nr(frame_parms);
if (p_tdd_UL_DL_Configuration != NULL) {
frame_parms->p_tdd_UL_DL_Configuration = NULL;
free(p_tdd_UL_DL_Configuration);
}
for (int number_of_slot = 0; number_of_slot < NR_MAX_SLOTS_PER_FRAME; number_of_slot++) {
frame_parms->tdd_uplink_nr[number_of_slot] = NR_TDD_DOWNLINK_SLOT;
}
}
/*******************************************************************
*
* NAME : free_tdd_configuration_dedicated_nr
*
* PARAMETERS : pointer to frame configuration
*
* RETURN : none
*
* DESCRIPTION : free structure related to tdd dedicated configuration
*
*********************************************************************/
void free_tdd_configuration_dedicated_nr(NR_DL_FRAME_PARMS *frame_parms) {
TDD_UL_DL_SlotConfig_t *p_current_TDD_UL_DL_ConfigDedicated = frame_parms->p_TDD_UL_DL_ConfigDedicated;
TDD_UL_DL_SlotConfig_t *p_next_TDD_UL_DL_ConfigDedicated;
int next = 0;
if (p_current_TDD_UL_DL_ConfigDedicated != NULL) {
do {
if (p_current_TDD_UL_DL_ConfigDedicated->p_next_TDD_UL_DL_SlotConfig != NULL) {
next = 1;
p_next_TDD_UL_DL_ConfigDedicated = (TDD_UL_DL_SlotConfig_t *)(p_current_TDD_UL_DL_ConfigDedicated->p_next_TDD_UL_DL_SlotConfig);
p_current_TDD_UL_DL_ConfigDedicated->p_next_TDD_UL_DL_SlotConfig = NULL;
//printf("free pt %p \n", p_current_TDD_UL_DL_ConfigDedicated);
free(p_current_TDD_UL_DL_ConfigDedicated);
p_current_TDD_UL_DL_ConfigDedicated = p_next_TDD_UL_DL_ConfigDedicated;
} else {
if (p_current_TDD_UL_DL_ConfigDedicated != NULL) {
frame_parms->p_TDD_UL_DL_ConfigDedicated = NULL;
//printf("free pt %p \n", p_current_TDD_UL_DL_ConfigDedicated);
free(p_current_TDD_UL_DL_ConfigDedicated);
next = 0;
}
}
} while (next);
}
}
void do_tdd_config_sim(PHY_VARS_gNB *gNB, int mu)
{
frame_structure_t fs = {.frame_type = TDD};
......
......@@ -47,27 +47,6 @@
*/
void set_tdd_config_nr(nfapi_nr_config_request_scf_t *cfg, frame_structure_t *fs);
/** \brief This function adds a slot configuration to current dedicated configuration for nr
* @param frame_parms NR DL Frame parameters
* @param slotIndex
* @param nrofDownlinkSymbols
* @param nrofUplinkSymbols
@returns none */
void add_tdd_dedicated_configuration_nr(NR_DL_FRAME_PARMS *frame_parms, int slotIndex,
int nrofDownlinkSymbols, int nrofUplinkSymbols);
/** \brief This function processes tdd dedicated configuration for nr
* @param frame_parms nr frame parameters
* @param dl_UL_TransmissionPeriodicity periodicity
* @param nrofDownlinkSlots number of downlink slots
* @param nrofDownlinkSymbols number of downlink symbols
* @param nrofUplinkSlots number of uplink slots
* @param nrofUplinkSymbols number of uplink symbols
@returns 0 if tdd dedicated configuration has been properly set or -1 on error with message */
int set_tdd_configuration_dedicated_nr(NR_DL_FRAME_PARMS *frame_parms);
/** \brief This function checks nr slot direction : downlink or uplink
* @param frame_parms NR DL Frame parameters
* @param nr_frame : frame number
......@@ -76,20 +55,6 @@ int set_tdd_configuration_dedicated_nr(NR_DL_FRAME_PARMS *frame_parms);
int nr_slot_select(nfapi_nr_config_request_scf_t *cfg, int nr_frame, int nr_slot);
/** \brief This function frees tdd configuration for nr
* @param frame_parms NR DL Frame parameters
@returns none */
void free_tdd_configuration_nr(NR_DL_FRAME_PARMS *frame_parms);
/** \brief This function frees tdd dedicated configuration for nr
* @param frame_parms NR DL Frame parameters
@returns none */
void free_tdd_configuration_dedicated_nr(NR_DL_FRAME_PARMS *frame_parms);
int get_next_downlink_slot(PHY_VARS_gNB *gNB, nfapi_nr_config_request_scf_t *cfg, int nr_frame, int nr_slot);
void do_tdd_config_sim(PHY_VARS_gNB *gNB, int mu);
#endif /* PHY_FRAME_CONFIG_NR_H */
......
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/***********************************************************************
*
* FILENAME : phy_frame_configuration_nr.h
*
* DESCRIPTION : functions related to FDD/TDD configuration for NR
* see TS 38.213 11.1 Slot configuration
* and TS 38.331 for RRC configuration
*
************************************************************************/
#ifndef PHY_FRAME_CONFIG_NR_UE_H
#define PHY_FRAME_CONFIG_NR_UE_H
/************** DEFINE ********************************************/
/*************** FUNCTIONS *****************************************/
/** \brief This function adds a slot configuration to current dedicated configuration for nr
* @param frame_parms NR DL Frame parameters
* @param slotIndex
* @param nrofDownlinkSymbols
* @param nrofUplinkSymbols
@returns none */
void add_tdd_dedicated_configuration_nr(NR_DL_FRAME_PARMS *frame_parms, int slotIndex,
int nrofDownlinkSymbols, int nrofUplinkSymbols);
/** \brief This function processes tdd dedicated configuration for nr
* @param frame_parms nr frame parameters
* @param dl_UL_TransmissionPeriodicity periodicity
* @param nrofDownlinkSlots number of downlink slots
* @param nrofDownlinkSymbols number of downlink symbols
* @param nrofUplinkSlots number of uplink slots
* @param nrofUplinkSymbols number of uplink symbols
@returns 0 if tdd dedicated configuration has been properly set or -1 on error with message */
int set_tdd_configuration_dedicated_nr(NR_DL_FRAME_PARMS *frame_parms);
/** \brief This function checks nr slot direction : downlink or uplink
* @param frame_parms NR DL Frame parameters
* @param nr_frame : frame number
* @param nr_slot : slot number
@returns int : downlink or uplink */
int slot_select_nr(NR_DL_FRAME_PARMS *frame_parms, int nr_frame, int nr_slot);
/** \brief This function checks nr UE slot direction : downlink or uplink
* @param cfg : FAPI Config Request
* @param nr_frame : frame number
* @param nr_slot : slot number
@returns int : downlink, uplink or mixed slot type */
int nr_ue_slot_select(const fapi_nr_config_request_t *cfg, int nr_slot);
/** \brief This function frees tdd configuration for nr
* @param frame_parms NR DL Frame parameters
@returns none */
void free_tdd_configuration_nr(NR_DL_FRAME_PARMS *frame_parms);
/** \brief This function frees tdd dedicated configuration for nr
* @param frame_parms NR DL Frame parameters
@returns none */
void free_tdd_configuration_dedicated_nr(NR_DL_FRAME_PARMS *frame_parms);
#endif /* PHY_FRAME_CONFIG_NR_H */
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/***********************************************************************
*
* FILENAME : phy_frame_configuration_nr_ue.c
*
* DESCRIPTION : functions related to FDD/TDD configuration for NR
* see TS 38.213 11.1 Slot configuration
* and TS 38.331 for RRC configuration
*
************************************************************************/
#include "PHY/defs_nr_UE.h"
/*******************************************************************
*
* NAME : nr_ue_slot_select
*
* DESCRIPTION : function for the UE equivalent to nr_slot_select
*
*********************************************************************/
int nr_ue_slot_select(const fapi_nr_config_request_t *cfg, int nr_slot)
{
if (cfg->cell_config.frame_duplex_type == FDD)
return NR_UPLINK_SLOT | NR_DOWNLINK_SLOT;
const fapi_nr_tdd_table_t *tdd_table = &cfg->tdd_table;
int rel_slot = nr_slot % tdd_table->tdd_period_in_slots;
if (tdd_table->max_tdd_periodicity_list == NULL) // this happens before receiving TDD configuration
return NR_DOWNLINK_SLOT;
const fapi_nr_max_tdd_periodicity_t *current_slot = &tdd_table->max_tdd_periodicity_list[rel_slot];
// if the 1st symbol is UL the whole slot is UL
if (current_slot->max_num_of_symbol_per_slot_list[0].slot_config == 1)
return NR_UPLINK_SLOT;
// if the 1st symbol is flexible the whole slot is mixed
if (current_slot->max_num_of_symbol_per_slot_list[0].slot_config == 2)
return NR_MIXED_SLOT;
for (int i = 1; i < NR_NUMBER_OF_SYMBOLS_PER_SLOT; i++) {
// if the 1st symbol is DL and any other is not, the slot is mixed
if (current_slot->max_num_of_symbol_per_slot_list[i].slot_config != 0) {
return NR_MIXED_SLOT;
}
}
// if here, all the symbols where DL
return NR_DOWNLINK_SLOT;
}
/*
* This function determines if the mixed slot is a Sidelink slot
*/
uint8_t sl_determine_if_sidelink_slot(uint8_t sl_startsym, uint8_t sl_lensym, uint8_t num_ulsym)
{
uint8_t ul_startsym = NR_NUMBER_OF_SYMBOLS_PER_SLOT - num_ulsym;
if ((sl_startsym >= ul_startsym) && (sl_lensym <= NR_NUMBER_OF_SYMBOLS_PER_SLOT)) {
LOG_D(MAC,
"MIXED SLOT is a SIDELINK SLOT. Sidelink Symbols: %d-%d, Uplink Symbols: %d-%d\n",
sl_startsym,
sl_lensym - 1,
ul_startsym,
ul_startsym + num_ulsym - 1);
return NR_SIDELINK_SLOT;
} else {
LOG_D(MAC,
"MIXED SLOT is NOT SIDELINK SLOT. Sidelink Symbols: %d-%d, Uplink Symbols: %d-%d\n",
sl_startsym,
sl_lensym - 1,
ul_startsym,
ul_startsym + num_ulsym - 1);
return 0;
}
}
/*
* This function determines if the Slot is a SIDELINK SLOT
* Every Uplink Slot is a Sidelink slot
* Mixed Slot is a sidelink slot if the uplink symbols in Mixed slot
* overlaps with Sidelink start symbol and number of symbols.
*/
int sl_nr_ue_slot_select(const sl_nr_phy_config_request_t *cfg, int slot, uint8_t frame_duplex_type)
{
int ul_sym = 0, slot_type = 0;
// All PC5 bands are TDD bands , hence handling only TDD in this function.
AssertFatal(frame_duplex_type == TDD, "No Sidelink operation defined for FDD in 3GPP rel16\n");
if (cfg->tdd_table.max_tdd_periodicity_list == NULL) { // this happens before receiving TDD configuration
return slot_type;
}
int period = cfg->tdd_table.tdd_period_in_slots;
int rel_slot = slot % period;
const fapi_nr_tdd_table_t *tdd_table = &cfg->tdd_table;
const fapi_nr_max_tdd_periodicity_t *current_slot = &tdd_table->max_tdd_periodicity_list[rel_slot];
for (int symbol_count = 0; symbol_count < NR_NUMBER_OF_SYMBOLS_PER_SLOT; symbol_count++) {
if (current_slot->max_num_of_symbol_per_slot_list[symbol_count].slot_config == 1) {
ul_sym++;
}
}
if (ul_sym == NR_NUMBER_OF_SYMBOLS_PER_SLOT) {
slot_type = NR_SIDELINK_SLOT;
} else if (ul_sym) {
slot_type = sl_determine_if_sidelink_slot(cfg->sl_bwp_config.sl_start_symbol, cfg->sl_bwp_config.sl_num_symbols, ul_sym);
}
return slot_type;
}
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
cmake_minimum_required(VERSION 2.8)
set(CMAKE_C_FLAGS
"${CMAKE_C_FLAGS} -O0 -g -Wextra -march=native"
)
add_definitions("-DUPGRADE_RAT_NR")
add_definitions("-DDEBUG_PSS_NR")
add_definitions("-DDEBUG_SSS_NR")
add_definitions("-DNR_UNIT_TEST")
set(PACKAGE_NAME "Testbench for unitary tests")
set(PHYSIM True)
set(RF_BOARD None)
set(XFORMS False)
set(ENABLE_ITTI False)
set(DEBUG_PHY False)
set(DEBUG_PSS True)
set(DEBUG_PHY True)
set(DEBUG_PHY_PROC False)
set(DEBUG_DLSCH True)
set(T_TRACER False)
# standard cmake file for nr ue build
include(../../../../../CMakeLists.txt)
set(SRC_UNIT_TESTS
${OPENAIR1_DIR}/SIMULATION/NR_UE_PHY/unit_tests/src/pss_util_test.c
${OPENAIR1_DIR}/SIMULATION/NR_UE_PHY/unit_tests/src/dummy_functions.c
)
set(INC_UNIT_TESTS
${OPENAIR1_DIR}/SIMULATION/NR_UE_PHY/unit_tests/src/pss_util_test.h
)
add_executable(pss_test ${OPENAIR1_DIR}/SIMULATION/NR_UE_PHY/unit_tests/src/pss_test.c ${SRC_UNIT_TESTS} )
target_link_libraries(pss_test
-Wl,--start-group UTIL SCHED_NR_UE_LIB PHY PHY_COMMON PHY_UE PHY_NR_UE -Wl,--end-group
pthread m ${ATLAS_LIBRARIES}
)
add_executable(sss_test ${OPENAIR1_DIR}/SIMULATION/NR_UE_PHY/unit_tests/src/sss_test.c ${SRC_UNIT_TESTS} )
target_link_libraries(sss_test
-Wl,--start-group UTIL SCHED_NR_UE_LIB PHY PHY_COMMON PHY_UE PHY_NR_UE -Wl,--end-group
pthread m ${ATLAS_LIBRARIES}
)
add_executable(frame_config_test ${OPENAIR1_DIR}/SIMULATION/NR_UE_PHY/unit_tests/src/frame_config_test.c ${SRC_UNIT_TESTS} )
target_link_libraries(frame_config_test
-Wl,--start-group UTIL SCHED_NR_UE_LIB PHY PHY_COMMON PHY_UE PHY_NR_UE -Wl,--end-group
pthread m ${ATLAS_LIBRARIES}
)
add_executable(harq_test ${OPENAIR1_DIR}/SIMULATION/NR_UE_PHY/unit_tests/src/harq_test.c ${SRC_UNIT_TESTS} )
target_link_libraries(harq_test
-Wl,--start-group UTIL SCHED_NR_UE_LIB PHY PHY_COMMON PHY_UE PHY_NR_UE -Wl,--end-group
pthread m ${ATLAS_LIBRARIES}
)
add_executable(srs_test ${OPENAIR1_DIR}/SIMULATION/NR_UE_PHY/unit_tests/src/srs_test.c ${SRC_UNIT_TESTS} )
target_link_libraries(srs_test
-Wl,--start-group UTIL SCHED_NR_UE_LIB PHY PHY_COMMON PHY_UE PHY_NR_UE -Wl,--end-group
pthread m ${ATLAS_LIBRARIES}
)
add_executable(pbch_test ${OPENAIR1_DIR}/SIMULATION/NR_UE_PHY/unit_tests/src/pbch_test.c ${SRC_UNIT_TESTS} )
target_link_libraries(pbch_test
-Wl,--start-group UTIL SCHED_NR_UE_LIB PHY PHY_COMMON PHY_UE PHY_NR_UE -Wl,--end-group
pthread m ${ATLAS_LIBRARIES}
)
add_executable(pucch_uci_test ${OPENAIR1_DIR}/SIMULATION/NR_UE_PHY/unit_tests/src/pucch_uci_test.c ${SRC_UNIT_TESTS} )
target_link_libraries(pucch_uci_test
-Wl,--start-group UTIL SCHED_NR_UE_LIB PHY PHY_COMMON PHY_UE PHY_NR_UE -Wl,--end-group
pthread m ${ATLAS_LIBRARIES}
)
add_executable(pucch_uci_generator_test ${OPENAIR1_DIR}/SIMULATION/NR_UE_PHY/unit_tests/src/pucch_uci_generator_test.c ${SRC_UNIT_TESTS} )
target_link_libraries(pucch_uci_generator_test
-Wl,--start-group UTIL SCHED_NR_UE_LIB PHY PHY_COMMON PHY_UE PHY_NR_UE -Wl,--end-group
pthread m ${ATLAS_LIBRARIES}
)
\ No newline at end of file
FRAME CONFIGURATION TEST
--------------------------
log init done
Start lte_param_init, frame_type 0, extended_prefix 0
[PHY][I][nr_init_frame_parms_ue] Initializing frame parms for mu 1, N_RB 106, Ncp 0
Initializing UE vars (abstraction 0) for eNB TXant 1, UE RXant 1
[PHY][E][set_tdd_config_nr] set_tdd_configuration_nr: given period is inconsistent with current tdd configuration

Tdd configuration tti 2 downlink 5 uplink 1 period 2500
[ 0] D [ 1] D [ 2] D [ 3] D [ 4] D [ 5] D [ 6] D [ 7] D [ 8] D [ 9] D [ 10] D [ 11] D [ 12] D [ 13] D [ 14] D [ 15] D [ 16] D [ 17] D [ 18] D [ 19] D
[ 20] D [ 21] D [ 22] D [ 23] D [ 24] D [ 25] D [ 26] D [ 27] D [ 28] D [ 29] D [ 30] D [ 31] D [ 32] D [ 33] D [ 34] D [ 35] D [ 36] D [ 37] D [ 38] D [ 39] D
[PHY][E][set_tdd_config_nr] set_tdd_configuration_nr: given period is inconsistent with current tdd configuration

Tdd configuration tti 2 downlink 4 uplink 2 period 2500
[ 0] D [ 1] D [ 2] D [ 3] D [ 4] D [ 5] D [ 6] D [ 7] D [ 8] D [ 9] D [ 10] D [ 11] D [ 12] D [ 13] D [ 14] D [ 15] D [ 16] D [ 17] D [ 18] D [ 19] D
[ 20] D [ 21] D [ 22] D [ 23] D [ 24] D [ 25] D [ 26] D [ 27] D [ 28] D [ 29] D [ 30] D [ 31] D [ 32] D [ 33] D [ 34] D [ 35] D [ 36] D [ 37] D [ 38] D [ 39] D
[PHY][E][set_tdd_config_nr] set_tdd_configuration_nr: given period is inconsistent with current tdd configuration

Tdd configuration tti 2 downlink 4 uplink 1 period 500
[ 0] D [ 1] D [ 2] D [ 3] D [ 4] D [ 5] D [ 6] D [ 7] D [ 8] D [ 9] D [ 10] D [ 11] D [ 12] D [ 13] D [ 14] D [ 15] D [ 16] D [ 17] D [ 18] D [ 19] D
[ 20] D [ 21] D [ 22] D [ 23] D [ 24] D [ 25] D [ 26] D [ 27] D [ 28] D [ 29] D [ 30] D [ 31] D [ 32] D [ 33] D [ 34] D [ 35] D [ 36] D [ 37] D [ 38] D [ 39] D
Tdd configuration tti 1 downlink 1 uplink 1 period 2000
[ 0] D [ 1] U [ 2] D [ 3] U [ 4] D [ 5] U [ 6] D [ 7] U [ 8] D [ 9] U [ 10] D [ 11] U [ 12] D [ 13] U [ 14] D [ 15] U [ 16] D [ 17] U [ 18] D [ 19] U
Tdd configuration tti 1 downlink 4 uplink 1 period 5000
[ 0] D [ 1] D [ 2] D [ 3] D [ 4] U [ 5] D [ 6] D [ 7] D [ 8] D [ 9] U [ 10] D [ 11] D [ 12] D [ 13] D [ 14] U [ 15] D [ 16] D [ 17] D [ 18] D [ 19] U
Tdd configuration tti 1 downlink 9 uplink 1 period 10000
[ 0] D [ 1] D [ 2] D [ 3] D [ 4] D [ 5] D [ 6] D [ 7] D [ 8] D [ 9] U [ 10] D [ 11] D [ 12] D [ 13] D [ 14] D [ 15] D [ 16] D [ 17] D [ 18] D [ 19] U
Tdd configuration tti 2 downlink 1 uplink 1 period 1000
[ 0] D [ 1] U [ 2] D [ 3] U [ 4] D [ 5] U [ 6] D [ 7] U [ 8] D [ 9] U [ 10] D [ 11] U [ 12] D [ 13] U [ 14] D [ 15] U [ 16] D [ 17] U [ 18] D [ 19] U
[ 20] D [ 21] U [ 22] D [ 23] U [ 24] D [ 25] U [ 26] D [ 27] U [ 28] D [ 29] U [ 30] D [ 31] U [ 32] D [ 33] U [ 34] D [ 35] U [ 36] D [ 37] U [ 38] D [ 39] U
Tdd configuration tti 2 downlink 3 uplink 1 period 2000
[ 0] D [ 1] D [ 2] D [ 3] U [ 4] D [ 5] D [ 6] D [ 7] U [ 8] D [ 9] D [ 10] D [ 11] U [ 12] D [ 13] D [ 14] D [ 15] U [ 16] D [ 17] D [ 18] D [ 19] U
[ 20] D [ 21] D [ 22] D [ 23] U [ 24] D [ 25] D [ 26] D [ 27] U [ 28] D [ 29] D [ 30] D [ 31] U [ 32] D [ 33] D [ 34] D [ 35] U [ 36] D [ 37] D [ 38] D [ 39] U
Tdd configuration tti 2 downlink 4 uplink 1 period 2500
[ 0] D [ 1] D [ 2] D [ 3] D [ 4] U [ 5] D [ 6] D [ 7] D [ 8] D [ 9] U [ 10] D [ 11] D [ 12] D [ 13] D [ 14] U [ 15] D [ 16] D [ 17] D [ 18] D [ 19] U
[ 20] D [ 21] D [ 22] D [ 23] D [ 24] U [ 25] D [ 26] D [ 27] D [ 28] D [ 29] U [ 30] D [ 31] D [ 32] D [ 33] D [ 34] U [ 35] D [ 36] D [ 37] D [ 38] D [ 39] U
Tdd configuration tti 2 downlink 9 uplink 1 period 5000
[ 0] D [ 1] D [ 2] D [ 3] D [ 4] D [ 5] D [ 6] D [ 7] D [ 8] D [ 9] U [ 10] D [ 11] D [ 12] D [ 13] D [ 14] D [ 15] D [ 16] D [ 17] D [ 18] D [ 19] U
[ 20] D [ 21] D [ 22] D [ 23] D [ 24] D [ 25] D [ 26] D [ 27] D [ 28] D [ 29] U [ 30] D [ 31] D [ 32] D [ 33] D [ 34] D [ 35] D [ 36] D [ 37] D [ 38] D [ 39] U
Tdd configuration tti 2 downlink 19 uplink 1 period 10000
[ 0] D [ 1] D [ 2] D [ 3] D [ 4] D [ 5] D [ 6] D [ 7] D [ 8] D [ 9] D [ 10] D [ 11] D [ 12] D [ 13] D [ 14] D [ 15] D [ 16] D [ 17] D [ 18] D [ 19] U
[ 20] D [ 21] D [ 22] D [ 23] D [ 24] D [ 25] D [ 26] D [ 27] D [ 28] D [ 29] D [ 30] D [ 31] D [ 32] D [ 33] D [ 34] D [ 35] D [ 36] D [ 37] D [ 38] D [ 39] U
Tdd configuration tti 4 downlink 1 uplink 1 period 500
[ 0] D [ 1] U [ 2] D [ 3] U [ 4] D [ 5] U [ 6] D [ 7] U [ 8] D [ 9] U [ 10] D [ 11] U [ 12] D [ 13] U [ 14] D [ 15] U [ 16] D [ 17] U [ 18] D [ 19] U
[ 20] D [ 21] U [ 22] D [ 23] U [ 24] D [ 25] U [ 26] D [ 27] U [ 28] D [ 29] U [ 30] D [ 31] U [ 32] D [ 33] U [ 34] D [ 35] U [ 36] D [ 37] U [ 38] D [ 39] U
[ 40] D [ 41] U [ 42] D [ 43] U [ 44] D [ 45] U [ 46] D [ 47] U [ 48] D [ 49] U [ 50] D [ 51] U [ 52] D [ 53] U [ 54] D [ 55] U [ 56] D [ 57] U [ 58] D [ 59] U
[ 60] D [ 61] U [ 62] D [ 63] U [ 64] D [ 65] U [ 66] D [ 67] U [ 68] D [ 69] U [ 70] D [ 71] U [ 72] D [ 73] U [ 74] D [ 75] U [ 76] D [ 77] U [ 78] D [ 79] U
Tdd configuration tti 4 downlink 3 uplink 1 period 1000
[ 0] D [ 1] D [ 2] D [ 3] U [ 4] D [ 5] D [ 6] D [ 7] U [ 8] D [ 9] D [ 10] D [ 11] U [ 12] D [ 13] D [ 14] D [ 15] U [ 16] D [ 17] D [ 18] D [ 19] U
[ 20] D [ 21] D [ 22] D [ 23] U [ 24] D [ 25] D [ 26] D [ 27] U [ 28] D [ 29] D [ 30] D [ 31] U [ 32] D [ 33] D [ 34] D [ 35] U [ 36] D [ 37] D [ 38] D [ 39] U
[ 40] D [ 41] D [ 42] D [ 43] U [ 44] D [ 45] D [ 46] D [ 47] U [ 48] D [ 49] D [ 50] D [ 51] U [ 52] D [ 53] D [ 54] D [ 55] U [ 56] D [ 57] D [ 58] D [ 59] U
[ 60] D [ 61] D [ 62] D [ 63] U [ 64] D [ 65] D [ 66] D [ 67] U [ 68] D [ 69] D [ 70] D [ 71] U [ 72] D [ 73] D [ 74] D [ 75] U [ 76] D [ 77] D [ 78] D [ 79] U
Tdd configuration tti 4 downlink 4 uplink 1 period 1250
[ 0] D [ 1] D [ 2] D [ 3] D [ 4] U [ 5] D [ 6] D [ 7] D [ 8] D [ 9] U [ 10] D [ 11] D [ 12] D [ 13] D [ 14] U [ 15] D [ 16] D [ 17] D [ 18] D [ 19] U
[ 20] D [ 21] D [ 22] D [ 23] D [ 24] U [ 25] D [ 26] D [ 27] D [ 28] D [ 29] U [ 30] D [ 31] D [ 32] D [ 33] D [ 34] U [ 35] D [ 36] D [ 37] D [ 38] D [ 39] U
[ 40] D [ 41] D [ 42] D [ 43] D [ 44] U [ 45] D [ 46] D [ 47] D [ 48] D [ 49] U [ 50] D [ 51] D [ 52] D [ 53] D [ 54] U [ 55] D [ 56] D [ 57] D [ 58] D [ 59] U
[ 60] D [ 61] D [ 62] D [ 63] D [ 64] U [ 65] D [ 66] D [ 67] D [ 68] D [ 69] U [ 70] D [ 71] D [ 72] D [ 73] D [ 74] U [ 75] D [ 76] D [ 77] D [ 78] D [ 79] U
Tdd configuration tti 4 downlink 7 uplink 1 period 2000
[ 0] D [ 1] D [ 2] D [ 3] D [ 4] D [ 5] D [ 6] D [ 7] U [ 8] D [ 9] D [ 10] D [ 11] D [ 12] D [ 13] D [ 14] D [ 15] U [ 16] D [ 17] D [ 18] D [ 19] D
[ 20] D [ 21] D [ 22] D [ 23] U [ 24] D [ 25] D [ 26] D [ 27] D [ 28] D [ 29] D [ 30] D [ 31] U [ 32] D [ 33] D [ 34] D [ 35] D [ 36] D [ 37] D [ 38] D [ 39] U
[ 40] D [ 41] D [ 42] D [ 43] D [ 44] D [ 45] D [ 46] D [ 47] U [ 48] D [ 49] D [ 50] D [ 51] D [ 52] D [ 53] D [ 54] D [ 55] U [ 56] D [ 57] D [ 58] D [ 59] D
[ 60] D [ 61] D [ 62] D [ 63] U [ 64] D [ 65] D [ 66] D [ 67] D [ 68] D [ 69] D [ 70] D [ 71] U [ 72] D [ 73] D [ 74] D [ 75] D [ 76] D [ 77] D [ 78] D [ 79] U
Tdd configuration tti 4 downlink 9 uplink 1 period 2500
[ 0] D [ 1] D [ 2] D [ 3] D [ 4] D [ 5] D [ 6] D [ 7] D [ 8] D [ 9] U [ 10] D [ 11] D [ 12] D [ 13] D [ 14] D [ 15] D [ 16] D [ 17] D [ 18] D [ 19] U
[ 20] D [ 21] D [ 22] D [ 23] D [ 24] D [ 25] D [ 26] D [ 27] D [ 28] D [ 29] U [ 30] D [ 31] D [ 32] D [ 33] D [ 34] D [ 35] D [ 36] D [ 37] D [ 38] D [ 39] U
[ 40] D [ 41] D [ 42] D [ 43] D [ 44] D [ 45] D [ 46] D [ 47] D [ 48] D [ 49] U [ 50] D [ 51] D [ 52] D [ 53] D [ 54] D [ 55] D [ 56] D [ 57] D [ 58] D [ 59] U
[ 60] D [ 61] D [ 62] D [ 63] D [ 64] D [ 65] D [ 66] D [ 67] D [ 68] D [ 69] U [ 70] D [ 71] D [ 72] D [ 73] D [ 74] D [ 75] D [ 76] D [ 77] D [ 78] D [ 79] U
Tdd configuration tti 4 downlink 19 uplink 1 period 5000
[ 0] D [ 1] D [ 2] D [ 3] D [ 4] D [ 5] D [ 6] D [ 7] D [ 8] D [ 9] D [ 10] D [ 11] D [ 12] D [ 13] D [ 14] D [ 15] D [ 16] D [ 17] D [ 18] D [ 19] U
[ 20] D [ 21] D [ 22] D [ 23] D [ 24] D [ 25] D [ 26] D [ 27] D [ 28] D [ 29] D [ 30] D [ 31] D [ 32] D [ 33] D [ 34] D [ 35] D [ 36] D [ 37] D [ 38] D [ 39] U
[ 40] D [ 41] D [ 42] D [ 43] D [ 44] D [ 45] D [ 46] D [ 47] D [ 48] D [ 49] D [ 50] D [ 51] D [ 52] D [ 53] D [ 54] D [ 55] D [ 56] D [ 57] D [ 58] D [ 59] U
[ 60] D [ 61] D [ 62] D [ 63] D [ 64] D [ 65] D [ 66] D [ 67] D [ 68] D [ 69] D [ 70] D [ 71] D [ 72] D [ 73] D [ 74] D [ 75] D [ 76] D [ 77] D [ 78] D [ 79] U
Tdd configuration tti 4 downlink 38 uplink 2 period 10000
[ 0] D [ 1] D [ 2] D [ 3] D [ 4] D [ 5] D [ 6] D [ 7] D [ 8] D [ 9] D [ 10] D [ 11] D [ 12] D [ 13] D [ 14] D [ 15] D [ 16] D [ 17] D [ 18] D [ 19] D
[ 20] D [ 21] D [ 22] D [ 23] D [ 24] D [ 25] D [ 26] D [ 27] D [ 28] D [ 29] D [ 30] D [ 31] D [ 32] D [ 33] D [ 34] D [ 35] D [ 36] D [ 37] D [ 38] U [ 39] U
[ 40] D [ 41] D [ 42] D [ 43] D [ 44] D [ 45] D [ 46] D [ 47] D [ 48] D [ 49] D [ 50] D [ 51] D [ 52] D [ 53] D [ 54] D [ 55] D [ 56] D [ 57] D [ 58] D [ 59] D
[ 60] D [ 61] D [ 62] D [ 63] D [ 64] D [ 65] D [ 66] D [ 67] D [ 68] D [ 69] D [ 70] D [ 71] D [ 72] D [ 73] D [ 74] D [ 75] D [ 76] D [ 77] D [ 78] U [ 79] U
Tdd configuration tti 8 downlink 4 uplink 1 period 625
[ 0] D [ 1] D [ 2] D [ 3] D [ 4] U [ 5] D [ 6] D [ 7] D [ 8] D [ 9] U [ 10] D [ 11] D [ 12] D [ 13] D [ 14] U [ 15] D [ 16] D [ 17] D [ 18] D [ 19] U
[ 20] D [ 21] D [ 22] D [ 23] D [ 24] U [ 25] D [ 26] D [ 27] D [ 28] D [ 29] U [ 30] D [ 31] D [ 32] D [ 33] D [ 34] U [ 35] D [ 36] D [ 37] D [ 38] D [ 39] U
[ 40] D [ 41] D [ 42] D [ 43] D [ 44] U [ 45] D [ 46] D [ 47] D [ 48] D [ 49] U [ 50] D [ 51] D [ 52] D [ 53] D [ 54] U [ 55] D [ 56] D [ 57] D [ 58] D [ 59] U
[ 60] D [ 61] D [ 62] D [ 63] D [ 64] U [ 65] D [ 66] D [ 67] D [ 68] D [ 69] U [ 70] D [ 71] D [ 72] D [ 73] D [ 74] U [ 75] D [ 76] D [ 77] D [ 78] D [ 79] U
[ 80] D [ 81] D [ 82] D [ 83] D [ 84] U [ 85] D [ 86] D [ 87] D [ 88] D [ 89] U [ 90] D [ 91] D [ 92] D [ 93] D [ 94] U [ 95] D [ 96] D [ 97] D [ 98] D [ 99] U
[100] D [101] D [102] D [103] D [104] U [105] D [106] D [107] D [108] D [109] U [110] D [111] D [112] D [113] D [114] U [115] D [116] D [117] D [118] D [119] U
[120] D [121] D [122] D [123] D [124] U [125] D [126] D [127] D [128] D [129] U [130] D [131] D [132] D [133] D [134] U [135] D [136] D [137] D [138] D [139] U
[140] D [141] D [142] D [143] D [144] U [145] D [146] D [147] D [148] D [149] U [150] D [151] D [152] D [153] D [154] U [155] D [156] D [157] D [158] D [159] U
Tdd configuration tti 16 downlink 7 uplink 1 period 500
[ 0] D [ 1] D [ 2] D [ 3] D [ 4] D [ 5] D [ 6] D [ 7] U [ 8] D [ 9] D [ 10] D [ 11] D [ 12] D [ 13] D [ 14] D [ 15] U [ 16] D [ 17] D [ 18] D [ 19] D
[ 20] D [ 21] D [ 22] D [ 23] U [ 24] D [ 25] D [ 26] D [ 27] D [ 28] D [ 29] D [ 30] D [ 31] U [ 32] D [ 33] D [ 34] D [ 35] D [ 36] D [ 37] D [ 38] D [ 39] U
[ 40] D [ 41] D [ 42] D [ 43] D [ 44] D [ 45] D [ 46] D [ 47] U [ 48] D [ 49] D [ 50] D [ 51] D [ 52] D [ 53] D [ 54] D [ 55] U [ 56] D [ 57] D [ 58] D [ 59] D
[ 60] D [ 61] D [ 62] D [ 63] U [ 64] D [ 65] D [ 66] D [ 67] D [ 68] D [ 69] D [ 70] D [ 71] U [ 72] D [ 73] D [ 74] D [ 75] D [ 76] D [ 77] D [ 78] D [ 79] U
[ 80] D [ 81] D [ 82] D [ 83] D [ 84] D [ 85] D [ 86] D [ 87] U [ 88] D [ 89] D [ 90] D [ 91] D [ 92] D [ 93] D [ 94] D [ 95] U [ 96] D [ 97] D [ 98] D [ 99] D
[100] D [101] D [102] D [103] U [104] D [105] D [106] D [107] D [108] D [109] D [110] D [111] U [112] D [113] D [114] D [115] D [116] D [117] D [118] D [119] U
[120] D [121] D [122] D [123] D [124] D [125] D [126] D [127] U [128] D [129] D [130] D [131] D [132] D [133] D [134] D [135] U [136] D [137] D [138] D [139] D
[140] D [141] D [142] D [143] U [144] D [145] D [146] D [147] D [148] D [149] D [150] D [151] U [152] D [153] D [154] D [155] D [156] D [157] D [158] D [159] U
[160] D [161] D [162] D [163] D [164] D [165] D [166] D [167] U [168] D [169] D [170] D [171] D [172] D [173] D [174] D [175] U [176] D [177] D [178] D [179] D
[180] D [181] D [182] D [183] U [184] D [185] D [186] D [187] D [188] D [189] D [190] D [191] U [192] D [193] D [194] D [195] D [196] D [197] D [198] D [199] U
[200] D [201] D [202] D [203] D [204] D [205] D [206] D [207] U [208] D [209] D [210] D [211] D [212] D [213] D [214] D [215] U [216] D [217] D [218] D [219] D
[220] D [221] D [222] D [223] U [224] D [225] D [226] D [227] D [228] D [229] D [230] D [231] U [232] D [233] D [234] D [235] D [236] D [237] D [238] D [239] U
[240] D [241] D [242] D [243] D [244] D [245] D [246] D [247] U [248] D [249] D [250] D [251] D [252] D [253] D [254] D [255] U [256] D [257] D [258] D [259] D
[260] D [261] D [262] D [263] U [264] D [265] D [266] D [267] D [268] D [269] D [270] D [271] U [272] D [273] D [274] D [275] D [276] D [277] D [278] D [279] U
[280] D [281] D [282] D [283] D [284] D [285] D [286] D [287] U [288] D [289] D [290] D [291] D [292] D [293] D [294] D [295] U [296] D [297] D [298] D [299] D
[300] D [301] D [302] D [303] U [304] D [305] D [306] D [307] D [308] D [309] D [310] D [311] U [312] D [313] D [314] D [315] D [316] D [317] D [318] D [319] U
Tdd configuration tti 2 downlink 4 uplink 1 period 2500
[ 0] D [ 1] D [ 2] D [ 3] D [ 4] U [ 5] D [ 6] D [ 7] D [ 8] D [ 9] U [ 10] D [ 11] D [ 12] D [ 13] D [ 14] U [ 15] D [ 16] D [ 17] D [ 18] D [ 19] U
[ 20] D [ 21] D [ 22] D [ 23] D [ 24] U [ 25] D [ 26] D [ 27] D [ 28] D [ 29] U [ 30] D [ 31] D [ 32] D [ 33] D [ 34] U [ 35] D [ 36] D [ 37] D [ 38] D [ 39] U
Set tdd dedicated configuration
[PHY][E][set_tdd_configuration_dedicated_nr] set_tdd_configuration_dedicated_nr: tdd downlink symbol configuration is not supported

Set tdd dedicated configuration
[PHY][E][set_tdd_configuration_dedicated_nr] set_tdd_configuration_dedicated_nr: tdd uplink symbol configuration is not supported

Set tdd dedicated configuration
[PHY][E][set_tdd_configuration_dedicated_nr] set_tdd_configuration_dedicated_nr: tdd slot index exceeds maximum value

Set tdd dedicated configuration
[PHY][E][set_tdd_configuration_dedicated_nr] set_tdd_configuration_dedicated_nr: tdd downlink & uplink symbol configuration is not supported

Set tdd dedicated configuration
[PHY][E][set_tdd_configuration_dedicated_nr] set_tdd_configuration_dedicated_nr: no tdd symbol configuration is specified

Set tdd dedicated configuration
UL[0] [PHY][E][set_tdd_configuration_dedicated_nr] set_tdd_configuration_dedicated_nr: no tdd symbol configuration is specified

Set tdd dedicated configuration
DL[0]
Tdd configuration tti 2 downlink 4 uplink 1 period 2500
[ 0] D [ 1] D [ 2] D [ 3] D [ 4] U [ 5] D [ 6] D [ 7] D [ 8] D [ 9] U [ 10] D [ 11] D [ 12] D [ 13] D [ 14] U [ 15] D [ 16] D [ 17] D [ 18] D [ 19] U
[ 20] D [ 21] D [ 22] D [ 23] D [ 24] U [ 25] D [ 26] D [ 27] D [ 28] D [ 29] U [ 30] D [ 31] D [ 32] D [ 33] D [ 34] U [ 35] D [ 36] D [ 37] D [ 38] D [ 39] U
Set tdd dedicated configuration
UL[0] UL[5] UL[10] UL[15] UL[20] UL[25] UL[30] UL[35] DL[4] DL[9] DL[14] DL[19] DL[19] DL[24] DL[29] DL[34] DL[39]
Tdd configuration tti 2 downlink 4 uplink 1 period 2500
[ 0] U [ 1] D [ 2] D [ 3] D [ 4] D [ 5] U [ 6] D [ 7] D [ 8] D [ 9] D [ 10] U [ 11] D [ 12] D [ 13] D [ 14] D [ 15] U [ 16] D [ 17] D [ 18] D [ 19] D
[ 20] U [ 21] D [ 22] D [ 23] D [ 24] D [ 25] U [ 26] D [ 27] D [ 28] D [ 29] D [ 30] U [ 31] D [ 32] D [ 33] D [ 34] D [ 35] U [ 36] D [ 37] D [ 38] D [ 39] D
Test NR FRAME CONFIGURATION is pass
HARQ TEST
----------
log init done
Start lte_param_init, frame_type 0, extended_prefix 0
[PHY][I][nr_init_frame_parms_ue] Initializing frame parms for mu 1, N_RB 106, Ncp 0
Initializing UE vars (abstraction 0) for eNB TXant 1, UE RXant 1
HARQ Uplink
First sequence ndi does not toggle
[HARQ-UL-PUSCH harqId : 0] first new transmission
[HARQ-UL-PUSCH harqId : 0] retransmission
[HARQ-UL-PUSCH harqId : 0] retransmission
[HARQ-UL-PUSCH harqId : 0] retransmission
[HARQ-UL-PUSCH harqId : 0] retransmission
Second sequence ndi toggle each transmission
[HARQ-UL-PUSCH harqId : 1] first new transmission
[HARQ-UL-PUSCH harqId : 1] new transmission due to toogle of ndi
[HARQ-UL-PUSCH harqId : 1] new transmission due to toogle of ndi
[HARQ-UL-PUSCH harqId : 1] new transmission due to toogle of ndi
[HARQ-UL-PUSCH harqId : 1] new transmission due to toogle of ndi
Third sequence ndi toggle each two transmissions
[HARQ-UL-PUSCH harqId : 2] first new transmission
[HARQ-UL-PUSCH harqId : 2] retransmission
[HARQ-UL-PUSCH harqId : 2] new transmission due to toogle of ndi
[HARQ-UL-PUSCH harqId : 2] retransmission
[HARQ-UL-PUSCH harqId : 2] new transmission due to toogle of ndi
HARQ Downlink
First sequence ndi does not toggle
[HARQ-DL-PDSCH harqId : 0] first new reception
[HARQ-DL-PDSCH harqId : 0] reception of a retransmission
[HARQ-DL-PDSCH harqId : 0] reception of a retransmission
[HARQ-DL-PDSCH harqId : 0] reception of a retransmission
[HARQ-DL-PDSCH harqId : 0] reception of a retransmission
Second sequence ndi toggle each transmission
[HARQ-DL-PDSCH harqId : 1] first new reception
[HARQ-DL-PDSCH harqId : 1] new reception due to toogle of ndi
[HARQ-DL-PDSCH harqId : 1] new reception due to toogle of ndi
[HARQ-DL-PDSCH harqId : 1] new reception due to toogle of ndi
[HARQ-DL-PDSCH harqId : 1] new reception due to toogle of ndi
Third sequence ndi toggle each two transmissions
[HARQ-DL-PDSCH harqId : 2] first new reception
[HARQ-DL-PDSCH harqId : 2] reception of a retransmission
[HARQ-DL-PDSCH harqId : 2] new reception due to toogle of ndi
[HARQ-DL-PDSCH harqId : 2] reception of a retransmission
[HARQ-DL-PDSCH harqId : 2] new reception due to toogle of ndi
Test NR HARQ is pass
PSS TEST
----------
log init done
Start lte_param_init, frame_type 0, extended_prefix 0
[PHY][I][nr_init_frame_parms_ue] Initializing frame parms for mu 1, N_RB 106, Ncp 0
Initializing UE vars (abstraction 0) for eNB TXant 1, UE RXant 1
***********************************
PSS NR Test synchronisation
***********************************
------------------------------------------------
Test nr pss with Nid2 0 at position 0
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 0, Peak found at pos 0, val = 232379536 (41 dB)
[UE] nr_synchro_time: Sync source = 0, Peak found at pos 0, val = 232379536 (41 dB)
PSS NR Test is pass: pss detected at right position
------------------------------------------------
Test nr pss with Nid2 1 at position 0
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 1, Peak found at pos 0, val = 232105225 (41 dB)
[UE] nr_synchro_time: Sync source = 1, Peak found at pos 0, val = 232105225 (41 dB)
PSS NR Test is pass: pss detected at right position
------------------------------------------------
Test nr pss with Nid2 2 at position 0
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 0, val = 231344100 (41 dB)
[UE] nr_synchro_time: Sync source = 2, Peak found at pos 0, val = 231344100 (41 dB)
PSS NR Test is pass: pss detected at right position
------------------------------------------------
Test nr pss with Nid2 0 at position 492
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 0, Peak found at pos 492, val = 232379536 (41 dB)
[UE] nr_synchro_time: Sync source = 0, Peak found at pos 492, val = 232379536 (41 dB)
PSS NR Test is pass: pss detected at right position
------------------------------------------------
Test nr pss with Nid2 1 at position 492
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 1, Peak found at pos 492, val = 232105225 (41 dB)
[UE] nr_synchro_time: Sync source = 1, Peak found at pos 492, val = 232105225 (41 dB)
PSS NR Test is pass: pss detected at right position
------------------------------------------------
Test nr pss with Nid2 2 at position 492
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 492, val = 231344100 (41 dB)
[UE] nr_synchro_time: Sync source = 2, Peak found at pos 492, val = 231344100 (41 dB)
PSS NR Test is pass: pss detected at right position
------------------------------------------------
Test nr pss with Nid2 0 at position 493
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 0, Peak found at pos 492, val = 230217517 (41 dB)
[UE] nr_synchro_time: Sync source = 0, Peak found at pos 492, val = 230217517 (41 dB)
PSS NR Test is pass with warning: pss detected with a shift of 1
------------------------------------------------
Test nr pss with Nid2 1 at position 493
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 1, Peak found at pos 492, val = 230099437 (41 dB)
[UE] nr_synchro_time: Sync source = 1, Peak found at pos 492, val = 230099437 (41 dB)
PSS NR Test is pass with warning: pss detected with a shift of 1
------------------------------------------------
Test nr pss with Nid2 2 at position 493
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 492, val = 229165600 (41 dB)
[UE] nr_synchro_time: Sync source = 2, Peak found at pos 492, val = 229165600 (41 dB)
PSS NR Test is pass with warning: pss detected with a shift of 1
------------------------------------------------
Test nr pss with Nid2 0 at position 56788
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 0, Peak found at pos 56788, val = 232379536 (41 dB)
[UE] nr_synchro_time: Sync source = 0, Peak found at pos 56788, val = 232379536 (41 dB)
PSS NR Test is pass: pss detected at right position
------------------------------------------------
Test nr pss with Nid2 1 at position 56788
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 1, Peak found at pos 56788, val = 232105225 (41 dB)
[UE] nr_synchro_time: Sync source = 1, Peak found at pos 56788, val = 232105225 (41 dB)
PSS NR Test is pass: pss detected at right position
------------------------------------------------
Test nr pss with Nid2 2 at position 56788
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 56788, val = 231344100 (41 dB)
[UE] nr_synchro_time: Sync source = 2, Peak found at pos 56788, val = 231344100 (41 dB)
PSS NR Test is pass: pss detected at right position
------------------------------------------------
Test nr pss with Nid2 0 at position 56888
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 0, Peak found at pos 56888, val = 232379536 (41 dB)
[UE] nr_synchro_time: Sync source = 0, Peak found at pos 56888, val = 232379536 (41 dB)
PSS NR Test is pass: pss detected at right position
------------------------------------------------
Test nr pss with Nid2 1 at position 56888
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 1, Peak found at pos 56888, val = 232105225 (41 dB)
[UE] nr_synchro_time: Sync source = 1, Peak found at pos 56888, val = 232105225 (41 dB)
PSS NR Test is pass: pss detected at right position
------------------------------------------------
Test nr pss with Nid2 2 at position 56888
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 56888, val = 231344100 (41 dB)
[UE] nr_synchro_time: Sync source = 2, Peak found at pos 56888, val = 231344100 (41 dB)
PSS NR Test is pass: pss detected at right position
------------------------------------------------
Test nr pss with Nid2 0 at position 111111
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 0, Peak found at pos 111112, val = 230349320 (41 dB)
[UE] nr_synchro_time: Sync source = 0, Peak found at pos 111112, val = 230349320 (41 dB)
PSS NR Test is pass with warning: pss detected with a shift of 1
------------------------------------------------
Test nr pss with Nid2 1 at position 111111
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 1, Peak found at pos 111112, val = 230409881 (41 dB)
[UE] nr_synchro_time: Sync source = 1, Peak found at pos 111112, val = 230409881 (41 dB)
PSS NR Test is pass with warning: pss detected with a shift of 1
------------------------------------------------
Test nr pss with Nid2 2 at position 111111
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 111112, val = 229601794 (41 dB)
[UE] nr_synchro_time: Sync source = 2, Peak found at pos 111112, val = 229601794 (41 dB)
PSS NR Test is pass with warning: pss detected with a shift of 1
------------------------------------------------
Test nr pss with Nid2 0 at position 151234
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 0, Peak found at pos 151236, val = 219912170 (41 dB)
[UE] nr_synchro_time: Sync source = 0, Peak found at pos 151236, val = 219912170 (41 dB)
PSS NR Test is pass with warning: pss detected with a shift of 2
------------------------------------------------
Test nr pss with Nid2 1 at position 151234
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 1, Peak found at pos 151236, val = 219714314 (41 dB)
[UE] nr_synchro_time: Sync source = 1, Peak found at pos 151236, val = 219714314 (41 dB)
PSS NR Test is pass with warning: pss detected with a shift of 2
------------------------------------------------
Test nr pss with Nid2 2 at position 151234
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 151236, val = 219588850 (41 dB)
[UE] nr_synchro_time: Sync source = 2, Peak found at pos 151236, val = 219588850 (41 dB)
PSS NR Test is pass with warning: pss detected with a shift of 2
------------------------------------------------
Test nr pss with Nid2 0 at position 151500
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 0, Peak found at pos 151500, val = 232379536 (41 dB)
[UE] nr_synchro_time: Sync source = 0, Peak found at pos 151500, val = 232379536 (41 dB)
PSS NR Test is pass: pss detected at right position
------------------------------------------------
Test nr pss with Nid2 1 at position 151500
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 1, Peak found at pos 151500, val = 232105225 (41 dB)
[UE] nr_synchro_time: Sync source = 1, Peak found at pos 151500, val = 232105225 (41 dB)
PSS NR Test is pass: pss detected at right position
------------------------------------------------
Test nr pss with Nid2 2 at position 151500
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 151500, val = 231344100 (41 dB)
[UE] nr_synchro_time: Sync source = 2, Peak found at pos 151500, val = 231344100 (41 dB)
PSS NR Test is pass: pss detected at right position
------------------------------------------------
Test nr pss with Nid2 0 at position 200000
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 0, Peak found at pos 200000, val = 232379536 (41 dB)
[UE] nr_synchro_time: Sync source = 0, Peak found at pos 200000, val = 232379536 (41 dB)
PSS NR Test is pass: pss detected at right position
------------------------------------------------
Test nr pss with Nid2 1 at position 200000
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 1, Peak found at pos 200000, val = 232105225 (41 dB)
[UE] nr_synchro_time: Sync source = 1, Peak found at pos 200000, val = 232105225 (41 dB)
PSS NR Test is pass: pss detected at right position
------------------------------------------------
Test nr pss with Nid2 2 at position 200000
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 200000, val = 231344100 (41 dB)
[UE] nr_synchro_time: Sync source = 2, Peak found at pos 200000, val = 231344100 (41 dB)
PSS NR Test is pass: pss detected at right position
------------------------------------------------
Test nr pss with Nid2 0 at position 250004
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 0, Peak found at pos 250004, val = 232379536 (41 dB)
[UE] nr_synchro_time: Sync source = 0, Peak found at pos 250004, val = 232379536 (41 dB)
PSS NR Test is pass: pss detected at right position
------------------------------------------------
Test nr pss with Nid2 1 at position 250004
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 1, Peak found at pos 250004, val = 232105225 (41 dB)
[UE] nr_synchro_time: Sync source = 1, Peak found at pos 250004, val = 232105225 (41 dB)
PSS NR Test is pass: pss detected at right position
------------------------------------------------
Test nr pss with Nid2 2 at position 250004
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 250004, val = 231344100 (41 dB)
[UE] nr_synchro_time: Sync source = 2, Peak found at pos 250004, val = 231344100 (41 dB)
PSS NR Test is pass: pss detected at right position
------------------------------------------------
Test nr pss with Nid2 0 at position 305152
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 0, Peak found at pos 305148, val = 185066768 (41 dB)
[UE] nr_synchro_time: Sync source = 0, Peak found at pos 305148, val = 185066768 (41 dB)
PSS NR Test is pass with warning: pss detected with a shift of 4
------------------------------------------------
Test nr pss with Nid2 1 at position 305152
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 1, Peak found at pos 305148, val = 185490842 (41 dB)
[UE] nr_synchro_time: Sync source = 1, Peak found at pos 305148, val = 185490842 (41 dB)
PSS NR Test is pass with warning: pss detected with a shift of 4
------------------------------------------------
Test nr pss with Nid2 2 at position 305152
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 305148, val = 185637380 (41 dB)
[UE] nr_synchro_time: Sync source = 2, Peak found at pos 305148, val = 185637380 (41 dB)
PSS NR Test is pass with warning: pss detected with a shift of 4
PSS NR Number of tests : 33 Pass : 21 Pass with warning : 12 Fail : 0
PSS NR Synchronisaton test is terminated.
PUCCH TEST
-----------
log init done
Start lte_param_init, frame_type 0, extended_prefix 0
[PHY][I][nr_init_frame_parms_ue] Initializing frame parms for mu 1, N_RB 106, Ncp 0
Initializing UE vars (abstraction 0) for eNB TXant 1, UE RXant 1
-------------------------------------------------------------------------------------------
=> Test : No harq feedback on going
Set pucch common configuration
PUCCH No feedback AbsSubframe 0.4
[PHY][D][pucch_procedures_ue_nr] PUCCH No feedback AbsSubframe 0.4
=> Test : Error due to acknownlegment not set
[PHY][E][get_downlink_ack] PUCCH Downlink acknowledgment has not been set : at line 0 in function get_downlink_ack of file
PUCCH No feedback AbsSubframe 0.4
[PHY][D][pucch_procedures_ue_nr] PUCCH No feedback AbsSubframe 0.4
=> Test : Error due to DAI not set
[PHY][E][get_downlink_ack] PUCCH Downlink DAI has not been set : at line 0 in function get_downlink_ack of file
PUCCH No feedback AbsSubframe 0.4
[PHY][D][pucch_procedures_ue_nr] PUCCH No feedback AbsSubframe 0.4
=> Test : Error due to DAI at wrong value
[PHY][E][get_downlink_ack] PUCCH Downlink DAI has an invalid value : at line 0 in function get_downlink_ack of file
PUCCH No feedback AbsSubframe 0.4
[PHY][D][pucch_procedures_ue_nr] PUCCH No feedback AbsSubframe 0.4
=> Test : Error due to ACK not ready to be send
[PHY][E][get_downlink_ack] PUCCH Downlink ack can not be transmitted : at line 0 in function get_downlink_ack of file
PUCCH No feedback AbsSubframe 0.4
[PHY][D][pucch_procedures_ue_nr] PUCCH No feedback AbsSubframe 0.4
=> Test : Error due to invalid DAI value
[PHY][E][get_downlink_ack] PUCCH Downlink dai is invalid : at line 0 in function get_downlink_ack of file
PUCCH No feedback AbsSubframe 0.4
[PHY][D][pucch_procedures_ue_nr] PUCCH No feedback AbsSubframe 0.4
Set pucch common configuration
=> Test : Error due to undefined PUCCH format from common config
PUCCH power n(1) = ( V(1) - U(1) )mod4 * N_TB(1) + N(1)
[PHY][E][select_pucch_resource] PUCCH Invalid initial resource index : at line 0 in function select_pucch_resource of file
[PHY][W][pucch_procedures_ue_nr] PUCCH No PUCCH resource found at AbsSubframe 0.4

=> Test : Error due to PUCCH format with multiple cells not already implemented
[PHY][E][get_downlink_ack] PUCCH ACK feedback is not implemented for mutiple gNB cells : at line 0 in function get_downlink_ack of file
PUCCH No feedback AbsSubframe 0.4
[PHY][D][pucch_procedures_ue_nr] PUCCH No feedback AbsSubframe 0.4
-------------------------------------------------------------------------------------------
Set pucch common configuration
=> Test : PUCCH format from common config in prach mode: one positive downlink ACKnowledgment
PUCCH power n(1) = ( V(1) - U(1) )mod4 * N_TB(1) + N(1)
PUCCH format 0 nb symbols total 2 uci size 1 selected format 0
PUCCH common configuration with index 1
PUCCH ( AbsSubframe : 0.4 ) ( total payload size 0 data 0x00 ) ( ack length 0 data 0x00 ) ( sr length 0 value 0 ) ( csi length 0 data : 0x00 )
PUCCH ( format : 0 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 2 ) ( nb symbols : 2 ) ( max code rate*100 : 0 ) ( starting_symbol_index : 12 )
PUCCH ( starting_prb : 0 ) ( second_hop : 99 ) ( m_0 : 4 ) ( m_CS : 6 ) ( time_domain_occ 0 ) (occ_length : 0 ) ( occ_Index : 0 )
[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE
PUCCH ( Tx power : 4 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 1 ) ( DELTA_TF : 0 ) ( G_b_f_c : 0 )
=> Test : PUCCH format from common config in prach mode: one negative downlink ACKnowledgment
PUCCH power n(1) = ( V(1) - U(1) )mod4 * N_TB(1) + N(1)
PUCCH format 0 nb symbols total 2 uci size 1 selected format 0
PUCCH common configuration with index 1
PUCCH ( AbsSubframe : 0.4 ) ( total payload size 0 data 0x00 ) ( ack length 0 data 0x00 ) ( sr length 0 value 0 ) ( csi length 0 data : 0x00 )
PUCCH ( format : 0 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 2 ) ( nb symbols : 2 ) ( max code rate*100 : 0 ) ( starting_symbol_index : 12 )
PUCCH ( starting_prb : 0 ) ( second_hop : 99 ) ( m_0 : 4 ) ( m_CS : 0 ) ( time_domain_occ 0 ) (occ_length : 0 ) ( occ_Index : 0 )
[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE
PUCCH ( Tx power : 4 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 1 ) ( DELTA_TF : 0 ) ( G_b_f_c : 0 )
=> Test : PUCCH format from common config in dedicated mode: two positive downlink ACKnowledgments
PUCCH power n(2) = ( V(2) - U(2) )mod4 * N_TB(1) + N(2)
PUCCH format 1 nb symbols total 4 uci size 2 selected format 1
PUCCH common configuration with index 3
PUCCH ( AbsSubframe : 0.4 ) ( total payload size 2 data 0x02 ) ( ack length 2 data 0x02 ) ( sr length 0 value 0 ) ( csi length 0 data : 0x00 )
PUCCH ( format : 1 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 4 ) ( nb symbols : 4 ) ( max code rate*100 : 0 ) ( starting_symbol_index : 10 )
PUCCH ( starting_prb : 1 ) ( second_hop : 98 ) ( m_0 : 6 ) ( m_CS : 0 ) ( time_domain_occ 0 ) (occ_length : 0 ) ( occ_Index : 0 )
[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE
PUCCH ( Tx power : 9 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 2 ) ( DELTA_TF : 4 ) ( G_b_f_c : 0 )
=> Test : PUCCH format from common config in dedicated mode: one positive and one negative downlink ACKnowledgments
PUCCH power n(2) = ( V(2) - U(2) )mod4 * N_TB(1) + N(2)
PUCCH format 1 nb symbols total 4 uci size 2 selected format 1
PUCCH common configuration with index 3
PUCCH ( AbsSubframe : 0.4 ) ( total payload size 2 data 0x00 ) ( ack length 2 data 0x00 ) ( sr length 0 value 0 ) ( csi length 0 data : 0x00 )
PUCCH ( format : 1 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 4 ) ( nb symbols : 4 ) ( max code rate*100 : 0 ) ( starting_symbol_index : 10 )
PUCCH ( starting_prb : 1 ) ( second_hop : 98 ) ( m_0 : 6 ) ( m_CS : 0 ) ( time_domain_occ 0 ) (occ_length : 0 ) ( occ_Index : 0 )
[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE
PUCCH ( Tx power : 9 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 2 ) ( DELTA_TF : 4 ) ( G_b_f_c : 0 )
=> Test : PUCCH format from common config in dedicated mode: two negative downlink ACKnowledgments
PUCCH power n(2) = ( V(2) - U(2) )mod4 * N_TB(1) + N(2)
PUCCH format 1 nb symbols total 4 uci size 2 selected format 1
PUCCH common configuration with index 3
PUCCH ( AbsSubframe : 0.4 ) ( total payload size 2 data 0x00 ) ( ack length 2 data 0x00 ) ( sr length 0 value 0 ) ( csi length 0 data : 0x00 )
PUCCH ( format : 1 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 4 ) ( nb symbols : 4 ) ( max code rate*100 : 0 ) ( starting_symbol_index : 10 )
PUCCH ( starting_prb : 1 ) ( second_hop : 98 ) ( m_0 : 6 ) ( m_CS : 0 ) ( time_domain_occ 0 ) (occ_length : 0 ) ( occ_Index : 0 )
[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE
PUCCH ( Tx power : 9 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 2 ) ( DELTA_TF : 4 ) ( G_b_f_c : 0 )
=> Test : PUCCH format from common config in dedicated mode: no resource is found
PUCCH power n(2) = ( V(2) - U(2) )mod4 * N_TB(1) + N(2)
[PHY][E][select_pucch_resource] PUCCH No compatible pucch format found : at line 0 in function select_pucch_resource of file
[PHY][W][pucch_procedures_ue_nr] PUCCH No PUCCH resource found at AbsSubframe 0.4

=> Test : PUCCH format from common config in dedicated mode: no PUCCH after reset of pending harq ACKnowledgments
PUCCH No feedback AbsSubframe 0.4
[PHY][D][pucch_procedures_ue_nr] PUCCH No feedback AbsSubframe 0.4
Set default pucch dedicated configuration
-------------------------------------------------------------------------------------------
=> Test : PUCCH format from dedicated config : pucch resource indicator is invalid
PUCCH power n(1) = ( V(1) - U(1) )mod4 * N_TB(1) + N(1)
PUCCH found resource set 0
[PHY][E][select_pucch_resource] PUCCH Invalid pucch resource indicator: at line 0 in function select_pucch_resource of file
[PHY][W][pucch_procedures_ue_nr] PUCCH No PUCCH resource found at AbsSubframe 0.4

=> Test : PUCCH format from dedicated config with 1 transport block : with 1 downlink ACKnowledgments and pucch resource indicator 0
PUCCH power n(1) = ( V(1) - U(1) )mod4 * N_TB(1) + N(1)
PUCCH found resource set 0
PUCCH format 0 nb symbols total 1 uci size 1 selected format 0
PUCCH dedicated configuration with resource index 0
PUCCH ( AbsSubframe : 0.4 ) ( total payload size 0 data 0x00 ) ( ack length 0 data 0x00 ) ( sr length 0 value 0 ) ( csi length 0 data : 0x00 )
PUCCH ( format : 0 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 1 ) ( nb symbols : 1 ) ( max code rate*100 : 0 ) ( starting_symbol_index : 0 )
PUCCH ( starting_prb : 1 ) ( second_hop : 1 ) ( m_0 : 2 ) ( m_CS : 6 ) ( time_domain_occ 0 ) (occ_length : 0 ) ( occ_Index : 0 )
[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE
PUCCH ( Tx power : 7 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 1 ) ( DELTA_TF : 3 ) ( G_b_f_c : 0 )
=> Test : PUCCH format from dedicated config with 1 transport block : with 1 downlink ACKnowledgments and pucch resource indicator 5
PUCCH power n(1) = ( V(1) - U(1) )mod4 * N_TB(1) + N(1)
PUCCH found resource set 0
PUCCH format 1 nb symbols total 9 uci size 1 selected format 1
PUCCH dedicated configuration with resource index 5
PUCCH ( AbsSubframe : 0.4 ) ( total payload size 1 data 0x01 ) ( ack length 1 data 0x01 ) ( sr length 0 value 0 ) ( csi length 0 data : 0x00 )
PUCCH ( format : 1 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 9 ) ( nb symbols : 9 ) ( max code rate*100 : 8 ) ( starting_symbol_index : 0 )
PUCCH ( starting_prb : 1 ) ( second_hop : 1 ) ( m_0 : 2 ) ( m_CS : 0 ) ( time_domain_occ 5 ) (occ_length : 0 ) ( occ_Index : 0 )
[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE
PUCCH ( Tx power : 5 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 2 ) ( DELTA_TF : 0 ) ( G_b_f_c : 0 )
=> Test : PUCCH format from dedicated config with 1 transport block : with 2 downlink ACKnowledgments and pucch resource indicator 1
PUCCH power n(2) = ( V(2) - U(2) )mod4 * N_TB(1) + N(2)
PUCCH found resource set 0
PUCCH format 1 nb symbols total 5 uci size 2 selected format 1
PUCCH dedicated configuration with resource index 1
PUCCH ( AbsSubframe : 0.4 ) ( total payload size 2 data 0x03 ) ( ack length 2 data 0x03 ) ( sr length 0 value 0 ) ( csi length 0 data : 0x00 )
PUCCH ( format : 1 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 5 ) ( nb symbols : 5 ) ( max code rate*100 : 8 ) ( starting_symbol_index : 0 )
PUCCH ( starting_prb : 1 ) ( second_hop : 1 ) ( m_0 : 2 ) ( m_CS : 0 ) ( time_domain_occ 1 ) (occ_length : 0 ) ( occ_Index : 0 )
[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE
PUCCH ( Tx power : 8 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 2 ) ( DELTA_TF : 3 ) ( G_b_f_c : 0 )
=> Test : PUCCH format from dedicated config with 1 transport block : with 2 downlink ACKnowledgments and pucch resource indicator 0
PUCCH power n(2) = ( V(2) - U(2) )mod4 * N_TB(1) + N(2)
PUCCH found resource set 0
PUCCH format 0 nb symbols total 1 uci size 2 selected format 0
PUCCH dedicated configuration with resource index 0
PUCCH ( AbsSubframe : 0.4 ) ( total payload size 0 data 0x00 ) ( ack length 0 data 0x00 ) ( sr length 0 value 0 ) ( csi length 0 data : 0x00 )
PUCCH ( format : 0 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 1 ) ( nb symbols : 1 ) ( max code rate*100 : 0 ) ( starting_symbol_index : 0 )
PUCCH ( starting_prb : 1 ) ( second_hop : 1 ) ( m_0 : 2 ) ( m_CS : 6 ) ( time_domain_occ 0 ) (occ_length : 0 ) ( occ_Index : 0 )
[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE
PUCCH ( Tx power : 7 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 1 ) ( DELTA_TF : 3 ) ( G_b_f_c : 0 )
=> Test : PUCCH format from dedicated config with 1 transport block : with 3 downlink ACKnowledgments and pucch resource indicator 1
PUCCH power n(3) = ( V(3) - U(3) )mod4 * N_TB(1) + N(3)
PUCCH found resource set 1
PUCCH format 3 nb symbols total 5 uci size 3 selected format 3
PUCCH dedicated configuration with resource index 9
PUCCH Adjust number of prb : (N_UCI : 3 ) (payload_in_bits : 18) (N_sc_ctrl_RB : 12) (nb_symbols : 3) (Q_m : 2) (max_code_rate*100 : 25)
PUCCH ( AbsSubframe : 0.4 ) ( total payload size 3 data 0x07 ) ( ack length 3 data 0x07 ) ( sr length 0 value 0 ) ( csi length 0 data : 0x00 )
PUCCH ( format : 3 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 5 ) ( nb symbols : 3 ) ( max code rate*100 : 25 ) ( starting_symbol_index : 1 )
PUCCH ( starting_prb : 2 ) ( second_hop : 2 ) ( m_0 : 0 ) ( m_CS : 0 ) ( time_domain_occ 0 ) (occ_length : 0 ) ( occ_Index : 0 )
[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE
PUCCH ( Tx power : 4 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 4 ) ( DELTA_TF : -3 ) ( G_b_f_c : 0 )
=> Test : PUCCH format from dedicated config with 1 transport block : with 3 downlink ACKnowledgments and pucch resource indicator 3
PUCCH power n(3) = ( V(3) - U(3) )mod4 * N_TB(1) + N(3)
PUCCH found resource set 1
PUCCH format 2 nb symbols total 2 uci size 3 selected format 2
PUCCH dedicated configuration with resource index 11
PUCCH Adjust number of prb : (N_UCI : 3 ) (payload_in_bits : 4) (N_sc_ctrl_RB : 8) (nb_symbols : 2) (Q_m : 2) (max_code_rate*100 : 15)
PUCCH ( AbsSubframe : 0.4 ) ( total payload size 3 data 0x07 ) ( ack length 3 data 0x07 ) ( sr length 0 value 0 ) ( csi length 0 data : 0x00 )
PUCCH ( format : 2 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 2 ) ( nb symbols : 2 ) ( max code rate*100 : 15 ) ( starting_symbol_index : 1 )
PUCCH ( starting_prb : 2 ) ( second_hop : 2 ) ( m_0 : 0 ) ( m_CS : 0 ) ( time_domain_occ 0 ) (occ_length : 0 ) ( occ_Index : 0 )
[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE
PUCCH ( Tx power : 6 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 3 ) ( DELTA_TF : 0 ) ( G_b_f_c : 0 )
=> Test : PUCCH format from dedicated config with 1 transport block : with 4 downlink ACKnowledgments and pucch resource indicator 5
PUCCH power n(4) = ( V(4) - U(4) )mod4 * N_TB(1) + N(4)
PUCCH found resource set 2
PUCCH format 4 nb symbols total 9 uci size 4 selected format 3
PUCCH dedicated configuration with resource index 21
PUCCH Number of pucch format 4 in subframe 4 is 1
PUCCH ( AbsSubframe : 0.4 ) ( total payload size 4 data 0x0f ) ( ack length 4 data 0x0f ) ( sr length 0 value 0 ) ( csi length 0 data : 0x00 )
PUCCH ( format : 4 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 9 ) ( nb symbols : 7 ) ( max code rate*100 : 35 ) ( starting_symbol_index : 2 )
PUCCH ( starting_prb : 3 ) ( second_hop : 3 ) ( m_0 : 0 ) ( m_CS : 0 ) ( time_domain_occ 0 ) (occ_length : 15 ) ( occ_Index : 16 )
[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE
PUCCH ( Tx power : 3 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 5 ) ( DELTA_TF : -5 ) ( G_b_f_c : 0 )
=> Test : PUCCH format from dedicated config with 1 transport block : with 4 downlink ACKnowledgments and pucch resource indicator 7
PUCCH power n(4) = ( V(4) - U(4) )mod4 * N_TB(1) + N(4)
PUCCH found resource set 2
PUCCH format 3 nb symbols total 11 uci size 4 selected format 3
PUCCH dedicated configuration with resource index 23
PUCCH Adjust number of prb : (N_UCI : 4 ) (payload_in_bits : 54) (N_sc_ctrl_RB : 12) (nb_symbols : 9) (Q_m : 2) (max_code_rate*100 : 25)
PUCCH ( AbsSubframe : 0.4 ) ( total payload size 4 data 0x0f ) ( ack length 4 data 0x0f ) ( sr length 0 value 0 ) ( csi length 0 data : 0x00 )
PUCCH ( format : 3 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 11 ) ( nb symbols : 9 ) ( max code rate*100 : 25 ) ( starting_symbol_index : 2 )
PUCCH ( starting_prb : 3 ) ( second_hop : 3 ) ( m_0 : 0 ) ( m_CS : 0 ) ( time_domain_occ 0 ) (occ_length : 0 ) ( occ_Index : 0 )
[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE
PUCCH ( Tx power : 1 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 4 ) ( DELTA_TF : -6 ) ( G_b_f_c : 0 )
=> Test : PUCCH format from dedicated config with 1 transport block and missed PDSCH : with 6 downlink ACKnowledgments and pucch resource indicator 5
PUCCH power n(4) = ( V(4) - U(2) )mod4 * N_TB(1) + N(2)
PUCCH found resource set 2
PUCCH format 4 nb symbols total 9 uci size 4 selected format 3
PUCCH dedicated configuration with resource index 21
PUCCH Number of pucch format 4 in subframe 4 is 2
PUCCH ( AbsSubframe : 0.4 ) ( total payload size 4 data 0x0a ) ( ack length 4 data 0x0a ) ( sr length 0 value 0 ) ( csi length 0 data : 0x00 )
PUCCH ( format : 4 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 9 ) ( nb symbols : 7 ) ( max code rate*100 : 35 ) ( starting_symbol_index : 2 )
PUCCH ( starting_prb : 3 ) ( second_hop : 3 ) ( m_0 : 0 ) ( m_CS : 0 ) ( time_domain_occ 0 ) (occ_length : 15 ) ( occ_Index : 16 )
[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE
PUCCH ( Tx power : 6 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 5 ) ( DELTA_TF : -2 ) ( G_b_f_c : 0 )
-------------------------------------------------------------------------------------------
=> Test : PUCCH format from dedicated config with 2 transport blocks : with 1 downlink ACKnowledgments and pucch resource indicator 0
PUCCH power n(2) = ( V(1) - U(1) )mod4 * N_TB(2) + N(2)
PUCCH found resource set 0
PUCCH format 0 nb symbols total 1 uci size 2 selected format 0
PUCCH dedicated configuration with resource index 0
PUCCH ( AbsSubframe : 0.4 ) ( total payload size 0 data 0x00 ) ( ack length 0 data 0x00 ) ( sr length 0 value 0 ) ( csi length 0 data : 0x00 )
PUCCH ( format : 0 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 1 ) ( nb symbols : 1 ) ( max code rate*100 : 0 ) ( starting_symbol_index : 0 )
PUCCH ( starting_prb : 1 ) ( second_hop : 1 ) ( m_0 : 2 ) ( m_CS : 6 ) ( time_domain_occ 0 ) (occ_length : 0 ) ( occ_Index : 0 )
[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE
PUCCH ( Tx power : 7 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 1 ) ( DELTA_TF : 3 ) ( G_b_f_c : 0 )
=> Test : PUCCH format from dedicated config with 2 transport blocks : with 1 downlink ACKnowledgments and pucch resource indicator 1
PUCCH power n(2) = ( V(1) - U(1) )mod4 * N_TB(2) + N(2)
PUCCH found resource set 0
PUCCH format 1 nb symbols total 5 uci size 2 selected format 1
PUCCH dedicated configuration with resource index 1
PUCCH ( AbsSubframe : 0.4 ) ( total payload size 2 data 0x03 ) ( ack length 2 data 0x03 ) ( sr length 0 value 0 ) ( csi length 0 data : 0x00 )
PUCCH ( format : 1 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 5 ) ( nb symbols : 5 ) ( max code rate*100 : 8 ) ( starting_symbol_index : 0 )
PUCCH ( starting_prb : 1 ) ( second_hop : 1 ) ( m_0 : 2 ) ( m_CS : 0 ) ( time_domain_occ 1 ) (occ_length : 0 ) ( occ_Index : 0 )
[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE
PUCCH ( Tx power : 8 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 2 ) ( DELTA_TF : 3 ) ( G_b_f_c : 0 )
=> Test : PUCCH format from dedicated config with 2 transport blocks : with 2 downlink ACKnowledgments and pucch resource indicator 3
PUCCH power n(4) = ( V(2) - U(2) )mod4 * N_TB(2) + N(4)
PUCCH found resource set 2
PUCCH format 2 nb symbols total 2 uci size 4 selected format 2
PUCCH dedicated configuration with resource index 19
PUCCH Adjust number of prb : (N_UCI : 4 ) (payload_in_bits : 4) (N_sc_ctrl_RB : 8) (nb_symbols : 2) (Q_m : 2) (max_code_rate*100 : 15)
PUCCH ( AbsSubframe : 0.4 ) ( total payload size 4 data 0x0f ) ( ack length 4 data 0x0f ) ( sr length 0 value 0 ) ( csi length 0 data : 0x00 )
PUCCH ( format : 2 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 2 ) ( nb symbols : 2 ) ( max code rate*100 : 15 ) ( starting_symbol_index : 2 )
PUCCH ( starting_prb : 3 ) ( second_hop : 3 ) ( m_0 : 0 ) ( m_CS : 0 ) ( time_domain_occ 0 ) (occ_length : 0 ) ( occ_Index : 0 )
[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE
PUCCH ( Tx power : 7 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 3 ) ( DELTA_TF : 1 ) ( G_b_f_c : 0 )
=> Test : PUCCH format from dedicated config with 2 transport blocks : with 2 downlink ACKnowledgments and pucch resource indicator 7
PUCCH power n(4) = ( V(2) - U(2) )mod4 * N_TB(2) + N(4)
PUCCH found resource set 2
PUCCH format 3 nb symbols total 11 uci size 4 selected format 3
PUCCH dedicated configuration with resource index 23
PUCCH Adjust number of prb : (N_UCI : 4 ) (payload_in_bits : 54) (N_sc_ctrl_RB : 12) (nb_symbols : 9) (Q_m : 2) (max_code_rate*100 : 25)
PUCCH ( AbsSubframe : 0.4 ) ( total payload size 4 data 0x0f ) ( ack length 4 data 0x0f ) ( sr length 0 value 0 ) ( csi length 0 data : 0x00 )
PUCCH ( format : 3 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 11 ) ( nb symbols : 9 ) ( max code rate*100 : 25 ) ( starting_symbol_index : 2 )
PUCCH ( starting_prb : 3 ) ( second_hop : 3 ) ( m_0 : 0 ) ( m_CS : 0 ) ( time_domain_occ 0 ) (occ_length : 0 ) ( occ_Index : 0 )
[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE
PUCCH ( Tx power : 1 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 4 ) ( DELTA_TF : -6 ) ( G_b_f_c : 0 )
=> Test : PUCCH format from dedicated config with 2 transport blocks : with 3 downlink ACKnowledgments and pucch resource indicator 2
PUCCH power n(6) = ( V(3) - U(3) )mod4 * N_TB(2) + N(6)
PUCCH found resource set 3
PUCCH format 4 nb symbols total 6 uci size 6 selected format 3
PUCCH dedicated configuration with resource index 26
PUCCH Number of pucch format 4 in subframe 4 is 3
PUCCH ( AbsSubframe : 0.4 ) ( total payload size 6 data 0x3f ) ( ack length 6 data 0x3f ) ( sr length 0 value 0 ) ( csi length 0 data : 0x00 )
PUCCH ( format : 4 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 6 ) ( nb symbols : 4 ) ( max code rate*100 : 35 ) ( starting_symbol_index : 3 )
PUCCH ( starting_prb : 4 ) ( second_hop : 4 ) ( m_0 : 0 ) ( m_CS : 0 ) ( time_domain_occ 0 ) (occ_length : 12 ) ( occ_Index : 13 )
[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE
PUCCH ( Tx power : 11 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 5 ) ( DELTA_TF : 3 ) ( G_b_f_c : 0 )
=> Test : PUCCH format from dedicated config with 2 transport blocks : with 3 downlink ACKnowledgments and pucch resource indicator 4
PUCCH power n(6) = ( V(3) - U(3) )mod4 * N_TB(2) + N(6)
PUCCH found resource set 3
PUCCH format 3 nb symbols total 8 uci size 6 selected format 3
PUCCH dedicated configuration with resource index 28
PUCCH Adjust number of prb : (N_UCI : 6 ) (payload_in_bits : 36) (N_sc_ctrl_RB : 12) (nb_symbols : 6) (Q_m : 2) (max_code_rate*100 : 25)
PUCCH ( AbsSubframe : 0.4 ) ( total payload size 6 data 0x3f ) ( ack length 6 data 0x3f ) ( sr length 0 value 0 ) ( csi length 0 data : 0x00 )
PUCCH ( format : 3 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 8 ) ( nb symbols : 6 ) ( max code rate*100 : 25 ) ( starting_symbol_index : 3 )
PUCCH ( starting_prb : 4 ) ( second_hop : 4 ) ( m_0 : 0 ) ( m_CS : 0 ) ( time_domain_occ 0 ) (occ_length : 0 ) ( occ_Index : 0 )
[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE
PUCCH ( Tx power : 4 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 4 ) ( DELTA_TF : -3 ) ( G_b_f_c : 0 )
=> Test : PUCCH format from dedicated config with 2 transport blocks : with 4 downlink ACKnowledgments and pucch resource indicator 4
PUCCH power n(8) = ( V(4) - U(4) )mod4 * N_TB(2) + N(8)
PUCCH found resource set 3
PUCCH format 3 nb symbols total 8 uci size 8 selected format 3
PUCCH dedicated configuration with resource index 28
PUCCH Adjust number of prb : (N_UCI : 8 ) (payload_in_bits : 36) (N_sc_ctrl_RB : 12) (nb_symbols : 6) (Q_m : 2) (max_code_rate*100 : 25)
PUCCH ( AbsSubframe : 0.4 ) ( total payload size 8 data 0xff ) ( ack length 8 data 0xff ) ( sr length 0 value 0 ) ( csi length 0 data : 0x00 )
PUCCH ( format : 3 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 8 ) ( nb symbols : 6 ) ( max code rate*100 : 25 ) ( starting_symbol_index : 3 )
PUCCH ( starting_prb : 4 ) ( second_hop : 4 ) ( m_0 : 0 ) ( m_CS : 0 ) ( time_domain_occ 0 ) (occ_length : 0 ) ( occ_Index : 0 )
[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE
PUCCH ( Tx power : 6 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 4 ) ( DELTA_TF : -1 ) ( G_b_f_c : 0 )
=> Test : PUCCH format from dedicated config with 2 transport blocks : with 4 downlink ACKnowledgments and pucch resource indicator 6
PUCCH power n(8) = ( V(4) - U(4) )mod4 * N_TB(2) + N(8)
PUCCH found resource set 3
PUCCH format 3 nb symbols total 10 uci size 8 selected format 3
PUCCH dedicated configuration with resource index 30
PUCCH Adjust number of prb : (N_UCI : 8 ) (payload_in_bits : 48) (N_sc_ctrl_RB : 12) (nb_symbols : 8) (Q_m : 2) (max_code_rate*100 : 25)
PUCCH ( AbsSubframe : 0.4 ) ( total payload size 8 data 0xff ) ( ack length 8 data 0xff ) ( sr length 0 value 0 ) ( csi length 0 data : 0x00 )
PUCCH ( format : 3 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 10 ) ( nb symbols : 8 ) ( max code rate*100 : 25 ) ( starting_symbol_index : 3 )
PUCCH ( starting_prb : 4 ) ( second_hop : 4 ) ( m_0 : 0 ) ( m_CS : 0 ) ( time_domain_occ 0 ) (occ_length : 0 ) ( occ_Index : 0 )
[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE
PUCCH ( Tx power : 4 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 4 ) ( DELTA_TF : -3 ) ( G_b_f_c : 0 )
=> Test : PUCCH format from dedicated config with 2 transport blocks and 1 missed PDSCH : with 4 downlink ACKnowledgments and pucch resource indicator 4
PUCCH power n(8) = ( V(4) - U(3) )mod4 * N_TB(2) + N(6)
PUCCH found resource set 3
PUCCH format 3 nb symbols total 10 uci size 8 selected format 3
PUCCH dedicated configuration with resource index 30
PUCCH Adjust number of prb : (N_UCI : 8 ) (payload_in_bits : 48) (N_sc_ctrl_RB : 12) (nb_symbols : 8) (Q_m : 2) (max_code_rate*100 : 25)
PUCCH ( AbsSubframe : 0.4 ) ( total payload size 8 data 0xfc ) ( ack length 8 data 0xfc ) ( sr length 0 value 0 ) ( csi length 0 data : 0x00 )
PUCCH ( format : 3 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 10 ) ( nb symbols : 8 ) ( max code rate*100 : 25 ) ( starting_symbol_index : 3 )
PUCCH ( starting_prb : 4 ) ( second_hop : 4 ) ( m_0 : 0 ) ( m_CS : 0 ) ( time_domain_occ 0 ) (occ_length : 0 ) ( occ_Index : 0 )
[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE
PUCCH ( Tx power : 4 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 4 ) ( DELTA_TF : -3 ) ( G_b_f_c : 0 )
=> Test : PUCCH format from dedicated config with 2 transport blocks and 2 missed PDSCH : with 4 downlink ACKnowledgments and pucch resource indicator 4
PUCCH power n(8) = ( V(4) - U(2) )mod4 * N_TB(2) + N(4)
PUCCH found resource set 3
PUCCH format 3 nb symbols total 10 uci size 8 selected format 3
PUCCH dedicated configuration with resource index 30
PUCCH Adjust number of prb : (N_UCI : 8 ) (payload_in_bits : 48) (N_sc_ctrl_RB : 12) (nb_symbols : 8) (Q_m : 2) (max_code_rate*100 : 25)
PUCCH ( AbsSubframe : 0.4 ) ( total payload size 8 data 0xcc ) ( ack length 8 data 0xcc ) ( sr length 0 value 0 ) ( csi length 0 data : 0x00 )
PUCCH ( format : 3 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 10 ) ( nb symbols : 8 ) ( max code rate*100 : 25 ) ( starting_symbol_index : 3 )
PUCCH ( starting_prb : 4 ) ( second_hop : 4 ) ( m_0 : 0 ) ( m_CS : 0 ) ( time_domain_occ 0 ) (occ_length : 0 ) ( occ_Index : 0 )
[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE
PUCCH ( Tx power : 4 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 4 ) ( DELTA_TF : -3 ) ( G_b_f_c : 0 )
-------------------------------------------------------------------------------------------
=> Test : PUCCH format from dedicated config with only a negative scheduling request : no PUCCH should be generated
PUCCH No feedback AbsSubframe 0.4
[PHY][D][pucch_procedures_ue_nr] PUCCH No feedback AbsSubframe 0.4
=> Test : PUCCH format 0 from dedicated config with only a positive scheduling request
PUCCH found resource set 0
PUCCH format 0 nb symbols total 1 uci size 1 selected format 0
PUCCH dedicated configuration with resource index 0
PUCCH ( AbsSubframe : 0.4 ) ( total payload size 0 data 0x00 ) ( ack length 0 data 0x00 ) ( sr length 0 value 0 ) ( csi length 0 data : 0x00 )
PUCCH ( format : 0 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 1 ) ( nb symbols : 1 ) ( max code rate*100 : 0 ) ( starting_symbol_index : 0 )
PUCCH ( starting_prb : 1 ) ( second_hop : 1 ) ( m_0 : 2 ) ( m_CS : 0 ) ( time_domain_occ 0 ) (occ_length : 0 ) ( occ_Index : 0 )
[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE
PUCCH ( Tx power : 7 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 1 ) ( DELTA_TF : 3 ) ( G_b_f_c : 0 )
=> Test : PUCCH format 1 from dedicated config with only a positive scheduling request
PUCCH found resource set 0
PUCCH format 1 nb symbols total 5 uci size 1 selected format 1
PUCCH dedicated configuration with resource index 1
PUCCH ( AbsSubframe : 0.4 ) ( total payload size 1 data 0x00 ) ( ack length 0 data 0x00 ) ( sr length 1 value 0 ) ( csi length 0 data : 0x00 )
PUCCH ( format : 1 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 5 ) ( nb symbols : 5 ) ( max code rate*100 : 8 ) ( starting_symbol_index : 0 )
PUCCH ( starting_prb : 1 ) ( second_hop : 1 ) ( m_0 : 2 ) ( m_CS : 0 ) ( time_domain_occ 1 ) (occ_length : 0 ) ( occ_Index : 0 )
[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE
PUCCH ( Tx power : 8 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 2 ) ( DELTA_TF : 3 ) ( G_b_f_c : 0 )
-------------------------------------------------------------------------------------------
=> Test : PUCCH format from dedicated config with a negative scheduling request and a positive ack
PUCCH power n(1) = ( V(1) - U(1) )mod4 * N_TB(1) + N(1)
PUCCH found resource set 0
PUCCH format 0 nb symbols total 1 uci size 2 selected format 0
PUCCH dedicated configuration with resource index 0
PUCCH ( AbsSubframe : 0.4 ) ( total payload size 0 data 0x00 ) ( ack length 0 data 0x00 ) ( sr length 0 value 0 ) ( csi length 0 data : 0x00 )
PUCCH ( format : 0 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 1 ) ( nb symbols : 1 ) ( max code rate*100 : 0 ) ( starting_symbol_index : 0 )
PUCCH ( starting_prb : 1 ) ( second_hop : 1 ) ( m_0 : 2 ) ( m_CS : 0 ) ( time_domain_occ 0 ) (occ_length : 0 ) ( occ_Index : 0 )
[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE
PUCCH ( Tx power : 7 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 1 ) ( DELTA_TF : 3 ) ( G_b_f_c : 0 )
=> Test : PUCCH format from dedicated config with a positive scheduling request and a positive ack
PUCCH power n(1) = ( V(1) - U(1) )mod4 * N_TB(1) + N(1)
PUCCH found resource set 0
PUCCH format 0 nb symbols total 1 uci size 2 selected format 0
PUCCH dedicated configuration with resource index 0
PUCCH ( AbsSubframe : 0.4 ) ( total payload size 0 data 0x00 ) ( ack length 0 data 0x00 ) ( sr length 0 value 0 ) ( csi length 0 data : 0x00 )
PUCCH ( format : 0 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 1 ) ( nb symbols : 1 ) ( max code rate*100 : 0 ) ( starting_symbol_index : 0 )
PUCCH ( starting_prb : 1 ) ( second_hop : 1 ) ( m_0 : 2 ) ( m_CS : 9 ) ( time_domain_occ 0 ) (occ_length : 0 ) ( occ_Index : 0 )
[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE
PUCCH ( Tx power : 7 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 1 ) ( DELTA_TF : 3 ) ( G_b_f_c : 0 )
=> Test : PUCCH format from dedicated config with a positive scheduling request and a positive ack
PUCCH power n(1) = ( V(1) - U(1) )mod4 * N_TB(1) + N(1)
PUCCH found resource set 0
PUCCH format 1 nb symbols total 5 uci size 2 selected format 1
PUCCH dedicated configuration with resource index 1
PUCCH ( AbsSubframe : 0.4 ) ( total payload size 2 data 0x01 ) ( ack length 1 data 0x01 ) ( sr length 1 value 0 ) ( csi length 0 data : 0x00 )
PUCCH ( format : 1 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 5 ) ( nb symbols : 5 ) ( max code rate*100 : 8 ) ( starting_symbol_index : 0 )
PUCCH ( starting_prb : 1 ) ( second_hop : 1 ) ( m_0 : 2 ) ( m_CS : 0 ) ( time_domain_occ 1 ) (occ_length : 0 ) ( occ_Index : 0 )
[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE
PUCCH ( Tx power : 8 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 2 ) ( DELTA_TF : 3 ) ( G_b_f_c : 0 )
=> Test : PUCCH format from dedicated config with a positive scheduling request and two positive acks
PUCCH power n(2) = ( V(2) - U(2) )mod4 * N_TB(1) + N(2)
PUCCH found resource set 1
PUCCH format 2 nb symbols total 2 uci size 3 selected format 2
PUCCH dedicated configuration with resource index 8
PUCCH ( AbsSubframe : 0.4 ) ( total payload size 3 data 0x07 ) ( ack length 2 data 0x03 ) ( sr length 1 value 1 ) ( csi length 0 data : 0x00 )
PUCCH ( format : 2 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 2 ) ( nb symbols : 2 ) ( max code rate*100 : 15 ) ( starting_symbol_index : 1 )
PUCCH ( starting_prb : 2 ) ( second_hop : 2 ) ( m_0 : 0 ) ( m_CS : 0 ) ( time_domain_occ 0 ) (occ_length : 0 ) ( occ_Index : 0 )
[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE
PUCCH ( Tx power : 6 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 3 ) ( DELTA_TF : 0 ) ( G_b_f_c : 0 )
=> Test : PUCCH format from dedicated config with a positive scheduling request and two positive acks
PUCCH power n(2) = ( V(2) - U(2) )mod4 * N_TB(1) + N(2)
PUCCH found resource set 1
PUCCH format 3 nb symbols total 5 uci size 3 selected format 3
PUCCH dedicated configuration with resource index 9
PUCCH Adjust number of prb : (N_UCI : 3 ) (payload_in_bits : 18) (N_sc_ctrl_RB : 12) (nb_symbols : 3) (Q_m : 2) (max_code_rate*100 : 25)
PUCCH ( AbsSubframe : 0.4 ) ( total payload size 3 data 0x07 ) ( ack length 2 data 0x03 ) ( sr length 1 value 1 ) ( csi length 0 data : 0x00 )
PUCCH ( format : 3 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 5 ) ( nb symbols : 3 ) ( max code rate*100 : 25 ) ( starting_symbol_index : 1 )
PUCCH ( starting_prb : 2 ) ( second_hop : 2 ) ( m_0 : 0 ) ( m_CS : 0 ) ( time_domain_occ 0 ) (occ_length : 0 ) ( occ_Index : 0 )
[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE
PUCCH ( Tx power : 4 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 4 ) ( DELTA_TF : -3 ) ( G_b_f_c : 0 )
-------------------------------------------------------------------------------------------
=> Test : PUCCH format from dedicated config with CSI alone
PUCCH found resource set 2
PUCCH format 2 nb symbols total 2 uci size 4 selected format 2
PUCCH dedicated configuration with resource index 16
PUCCH Adjust number of prb : (N_UCI : 4 ) (payload_in_bits : 4) (N_sc_ctrl_RB : 8) (nb_symbols : 2) (Q_m : 2) (max_code_rate*100 : 15)
PUCCH ( AbsSubframe : 0.4 ) ( total payload size 4 data 0x0e ) ( ack length 0 data 0x00 ) ( sr length 0 value 0 ) ( csi length 4 data : 0x0e )
PUCCH ( format : 2 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 2 ) ( nb symbols : 2 ) ( max code rate*100 : 15 ) ( starting_symbol_index : 2 )
PUCCH ( starting_prb : 3 ) ( second_hop : 3 ) ( m_0 : 0 ) ( m_CS : 0 ) ( time_domain_occ 0 ) (occ_length : 0 ) ( occ_Index : 0 )
[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE
PUCCH ( Tx power : 7 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 3 ) ( DELTA_TF : 1 ) ( G_b_f_c : 0 )
=> Test : PUCCH format from dedicated config with ACK and CSI
PUCCH power n(1) = ( V(1) - U(1) )mod4 * N_TB(1) + N(1)
PUCCH found resource set 2
PUCCH format 2 nb symbols total 2 uci size 5 selected format 2
PUCCH dedicated configuration with resource index 19
PUCCH Adjust number of prb : (N_UCI : 5 ) (payload_in_bits : 4) (N_sc_ctrl_RB : 8) (nb_symbols : 2) (Q_m : 2) (max_code_rate*100 : 15)
PUCCH Adjust number of prb : (N_UCI : 5 ) (payload_in_bits : 9) (N_sc_ctrl_RB : 8) (nb_symbols : 2) (Q_m : 2) (max_code_rate*100 : 15)
PUCCH ( AbsSubframe : 0.4 ) ( total payload size 5 data 0x1d ) ( ack length 1 data 0x01 ) ( sr length 0 value 0 ) ( csi length 4 data : 0x0e )
PUCCH ( format : 2 ) ( modulation : QPSK ) ( nb prb : 2 ) ( nb symbols total: 2 ) ( nb symbols : 2 ) ( max code rate*100 : 15 ) ( starting_symbol_index : 2 )
PUCCH ( starting_prb : 3 ) ( second_hop : 3 ) ( m_0 : 0 ) ( m_CS : 0 ) ( time_domain_occ 0 ) (occ_length : 0 ) ( occ_Index : 0 )
[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE
PUCCH ( Tx power : 9 dBm ) ( 10Log(...) : 3 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 3 ) ( DELTA_TF : 0 ) ( G_b_f_c : 0 )
=> Test : PUCCH format from dedicated config with ACK, negative SR and CSI
PUCCH power n(1) = ( V(1) - U(1) )mod4 * N_TB(1) + N(1)
PUCCH found resource set 3
PUCCH format 3 nb symbols total 7 uci size 6 selected format 3
PUCCH dedicated configuration with resource index 27
PUCCH Adjust number of prb : (N_UCI : 2 ) (payload_in_bits : 30) (N_sc_ctrl_RB : 12) (nb_symbols : 5) (Q_m : 2) (max_code_rate*100 : 25)
PUCCH ( AbsSubframe : 0.4 ) ( total payload size 2 data 0x01 ) ( ack length 1 data 0x01 ) ( sr length 1 value 0 ) ( csi length 4 data : 0x00 )
PUCCH ( format : 3 ) ( modulation : QPSK ) ( nb prb : 1 ) ( nb symbols total: 7 ) ( nb symbols : 5 ) ( max code rate*100 : 25 ) ( starting_symbol_index : 3 )
PUCCH ( starting_prb : 4 ) ( second_hop : 4 ) ( m_0 : 0 ) ( m_CS : 0 ) ( time_domain_occ 0 ) (occ_length : 0 ) ( occ_Index : 0 )
[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE
PUCCH ( Tx power : 1 dBm ) ( 10Log(...) : 0 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 4 ) ( DELTA_TF : -6 ) ( G_b_f_c : 0 )
=> Test : PUCCH format from dedicated config with negative SR and CSI
PUCCH found resource set 2
PUCCH format 2 nb symbols total 2 uci size 5 selected format 2
PUCCH dedicated configuration with resource index 16
PUCCH Adjust number of prb : (N_UCI : 5 ) (payload_in_bits : 4) (N_sc_ctrl_RB : 8) (nb_symbols : 2) (Q_m : 2) (max_code_rate*100 : 15)
PUCCH Adjust number of prb : (N_UCI : 5 ) (payload_in_bits : 9) (N_sc_ctrl_RB : 8) (nb_symbols : 2) (Q_m : 2) (max_code_rate*100 : 15)
PUCCH ( AbsSubframe : 0.4 ) ( total payload size 5 data 0x1c ) ( ack length 0 data 0x00 ) ( sr length 1 value 0 ) ( csi length 4 data : 0x0e )
PUCCH ( format : 2 ) ( modulation : QPSK ) ( nb prb : 2 ) ( nb symbols total: 2 ) ( nb symbols : 2 ) ( max code rate*100 : 15 ) ( starting_symbol_index : 2 )
PUCCH ( starting_prb : 3 ) ( second_hop : 3 ) ( m_0 : 0 ) ( m_CS : 0 ) ( time_domain_occ 0 ) (occ_length : 0 ) ( occ_Index : 0 )
[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE
PUCCH ( Tx power : 9 dBm ) ( 10Log(...) : 3 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 3 ) ( DELTA_TF : 0 ) ( G_b_f_c : 0 )
=> Test : PUCCH format from dedicated config with positive SR and CSI
PUCCH found resource set 2
PUCCH format 2 nb symbols total 2 uci size 5 selected format 2
PUCCH dedicated configuration with resource index 16
PUCCH Adjust number of prb : (N_UCI : 5 ) (payload_in_bits : 4) (N_sc_ctrl_RB : 8) (nb_symbols : 2) (Q_m : 2) (max_code_rate*100 : 15)
PUCCH Adjust number of prb : (N_UCI : 5 ) (payload_in_bits : 9) (N_sc_ctrl_RB : 8) (nb_symbols : 2) (Q_m : 2) (max_code_rate*100 : 15)
PUCCH ( AbsSubframe : 0.4 ) ( total payload size 5 data 0x1d ) ( ack length 0 data 0x00 ) ( sr length 1 value 1 ) ( csi length 4 data : 0x0e )
PUCCH ( format : 2 ) ( modulation : QPSK ) ( nb prb : 2 ) ( nb symbols total: 2 ) ( nb symbols : 2 ) ( max code rate*100 : 15 ) ( starting_symbol_index : 2 )
PUCCH ( starting_prb : 3 ) ( second_hop : 3 ) ( m_0 : 0 ) ( m_CS : 0 ) ( time_domain_occ 0 ) (occ_length : 0 ) ( occ_Index : 0 )
[PHY][D][get_PL] get_PL : Frame 0 : rsrp 0.000000 dBm/RE (-inf), eNB power 0 dBm/RE
PUCCH ( Tx power : 9 dBm ) ( 10Log(...) : 3 ) ( from Path Loss : 0 ) ( delta_F_PUCCH : 3 ) ( DELTA_TF : 0 ) ( G_b_f_c : 0 )
Release default pucch dedicated configuration
Test PUCCH is pass
SRS TEST
----------
log init done
Start lte_param_init, frame_type 0, extended_prefix 0
[PHY][I][nr_init_frame_parms_ue] Initializing frame parms for mu 1, N_RB 106, Ncp 0
Initializing UE vars (abstraction 0) for eNB TXant 1, UE RXant 1
Ok: No detected differences for uplink reference sequences
Number of srs generations 491520
srs period 1 offset 0
test_srs_periodicity srs at frame 0 slot 0
test_srs_periodicity srs at frame 0 slot 1
test_srs_periodicity srs at frame 0 slot 2
test_srs_periodicity srs at frame 0 slot 3
test_srs_periodicity srs at frame 0 slot 4
test_srs_periodicity srs at frame 0 slot 5
test_srs_periodicity srs at frame 0 slot 6
test_srs_periodicity srs at frame 0 slot 7
test_srs_periodicity srs at frame 0 slot 8
test_srs_periodicity srs at frame 0 slot 9
srs period 1 offset 0
test_srs_periodicity srs at frame 0 slot 0
test_srs_periodicity srs at frame 0 slot 1
test_srs_periodicity srs at frame 0 slot 2
test_srs_periodicity srs at frame 0 slot 3
test_srs_periodicity srs at frame 0 slot 4
test_srs_periodicity srs at frame 0 slot 5
test_srs_periodicity srs at frame 0 slot 6
test_srs_periodicity srs at frame 0 slot 7
test_srs_periodicity srs at frame 0 slot 8
test_srs_periodicity srs at frame 0 slot 9
srs period 2 offset 0
test_srs_periodicity srs at frame 0 slot 0
test_srs_periodicity srs at frame 0 slot 2
test_srs_periodicity srs at frame 0 slot 4
test_srs_periodicity srs at frame 0 slot 6
test_srs_periodicity srs at frame 0 slot 8
test_srs_periodicity srs at frame 1 slot 0
test_srs_periodicity srs at frame 1 slot 2
test_srs_periodicity srs at frame 1 slot 4
test_srs_periodicity srs at frame 1 slot 6
test_srs_periodicity srs at frame 1 slot 8
srs period 2 offset 1
test_srs_periodicity srs at frame 0 slot 1
test_srs_periodicity srs at frame 0 slot 3
test_srs_periodicity srs at frame 0 slot 5
test_srs_periodicity srs at frame 0 slot 7
test_srs_periodicity srs at frame 0 slot 9
test_srs_periodicity srs at frame 1 slot 1
test_srs_periodicity srs at frame 1 slot 3
test_srs_periodicity srs at frame 1 slot 5
test_srs_periodicity srs at frame 1 slot 7
test_srs_periodicity srs at frame 1 slot 9
srs period 4 offset 0
test_srs_periodicity srs at frame 0 slot 0
test_srs_periodicity srs at frame 0 slot 4
test_srs_periodicity srs at frame 0 slot 8
test_srs_periodicity srs at frame 1 slot 2
test_srs_periodicity srs at frame 1 slot 6
test_srs_periodicity srs at frame 2 slot 0
test_srs_periodicity srs at frame 2 slot 4
test_srs_periodicity srs at frame 2 slot 8
test_srs_periodicity srs at frame 3 slot 2
test_srs_periodicity srs at frame 3 slot 6
srs period 4 offset 3
test_srs_periodicity srs at frame 0 slot 3
test_srs_periodicity srs at frame 0 slot 7
test_srs_periodicity srs at frame 1 slot 1
test_srs_periodicity srs at frame 1 slot 5
test_srs_periodicity srs at frame 1 slot 9
test_srs_periodicity srs at frame 2 slot 3
test_srs_periodicity srs at frame 2 slot 7
test_srs_periodicity srs at frame 3 slot 1
test_srs_periodicity srs at frame 3 slot 5
test_srs_periodicity srs at frame 3 slot 9
srs period 5 offset 0
test_srs_periodicity srs at frame 0 slot 0
test_srs_periodicity srs at frame 0 slot 5
test_srs_periodicity srs at frame 1 slot 0
test_srs_periodicity srs at frame 1 slot 5
test_srs_periodicity srs at frame 2 slot 0
test_srs_periodicity srs at frame 2 slot 5
test_srs_periodicity srs at frame 3 slot 0
test_srs_periodicity srs at frame 3 slot 5
test_srs_periodicity srs at frame 4 slot 0
test_srs_periodicity srs at frame 4 slot 5
srs period 5 offset 4
test_srs_periodicity srs at frame 0 slot 4
test_srs_periodicity srs at frame 0 slot 9
test_srs_periodicity srs at frame 1 slot 4
test_srs_periodicity srs at frame 1 slot 9
test_srs_periodicity srs at frame 2 slot 4
test_srs_periodicity srs at frame 2 slot 9
test_srs_periodicity srs at frame 3 slot 4
test_srs_periodicity srs at frame 3 slot 9
test_srs_periodicity srs at frame 4 slot 4
test_srs_periodicity srs at frame 4 slot 9
srs period 8 offset 0
test_srs_periodicity srs at frame 0 slot 0
test_srs_periodicity srs at frame 0 slot 8
test_srs_periodicity srs at frame 1 slot 6
test_srs_periodicity srs at frame 2 slot 4
test_srs_periodicity srs at frame 3 slot 2
test_srs_periodicity srs at frame 4 slot 0
test_srs_periodicity srs at frame 4 slot 8
test_srs_periodicity srs at frame 5 slot 6
test_srs_periodicity srs at frame 6 slot 4
test_srs_periodicity srs at frame 7 slot 2
srs period 8 offset 7
test_srs_periodicity srs at frame 0 slot 7
test_srs_periodicity srs at frame 1 slot 5
test_srs_periodicity srs at frame 2 slot 3
test_srs_periodicity srs at frame 3 slot 1
test_srs_periodicity srs at frame 3 slot 9
test_srs_periodicity srs at frame 4 slot 7
test_srs_periodicity srs at frame 5 slot 5
test_srs_periodicity srs at frame 6 slot 3
test_srs_periodicity srs at frame 7 slot 1
test_srs_periodicity srs at frame 7 slot 9
srs period 10 offset 0
test_srs_periodicity srs at frame 0 slot 0
test_srs_periodicity srs at frame 1 slot 0
test_srs_periodicity srs at frame 2 slot 0
test_srs_periodicity srs at frame 3 slot 0
test_srs_periodicity srs at frame 4 slot 0
test_srs_periodicity srs at frame 5 slot 0
test_srs_periodicity srs at frame 6 slot 0
test_srs_periodicity srs at frame 7 slot 0
test_srs_periodicity srs at frame 8 slot 0
test_srs_periodicity srs at frame 9 slot 0
srs period 10 offset 9
test_srs_periodicity srs at frame 0 slot 9
test_srs_periodicity srs at frame 1 slot 9
test_srs_periodicity srs at frame 2 slot 9
test_srs_periodicity srs at frame 3 slot 9
test_srs_periodicity srs at frame 4 slot 9
test_srs_periodicity srs at frame 5 slot 9
test_srs_periodicity srs at frame 6 slot 9
test_srs_periodicity srs at frame 7 slot 9
test_srs_periodicity srs at frame 8 slot 9
test_srs_periodicity srs at frame 9 slot 9
srs period 16 offset 0
test_srs_periodicity srs at frame 0 slot 0
test_srs_periodicity srs at frame 1 slot 6
test_srs_periodicity srs at frame 3 slot 2
test_srs_periodicity srs at frame 4 slot 8
test_srs_periodicity srs at frame 6 slot 4
test_srs_periodicity srs at frame 8 slot 0
test_srs_periodicity srs at frame 9 slot 6
test_srs_periodicity srs at frame 11 slot 2
test_srs_periodicity srs at frame 12 slot 8
test_srs_periodicity srs at frame 14 slot 4
srs period 16 offset 15
test_srs_periodicity srs at frame 1 slot 5
test_srs_periodicity srs at frame 3 slot 1
test_srs_periodicity srs at frame 4 slot 7
test_srs_periodicity srs at frame 6 slot 3
test_srs_periodicity srs at frame 7 slot 9
test_srs_periodicity srs at frame 9 slot 5
test_srs_periodicity srs at frame 11 slot 1
test_srs_periodicity srs at frame 12 slot 7
test_srs_periodicity srs at frame 14 slot 3
test_srs_periodicity srs at frame 15 slot 9
srs period 20 offset 0
test_srs_periodicity srs at frame 0 slot 0
test_srs_periodicity srs at frame 2 slot 0
test_srs_periodicity srs at frame 4 slot 0
test_srs_periodicity srs at frame 6 slot 0
test_srs_periodicity srs at frame 8 slot 0
test_srs_periodicity srs at frame 10 slot 0
test_srs_periodicity srs at frame 12 slot 0
test_srs_periodicity srs at frame 14 slot 0
test_srs_periodicity srs at frame 16 slot 0
test_srs_periodicity srs at frame 18 slot 0
srs period 20 offset 19
test_srs_periodicity srs at frame 1 slot 9
test_srs_periodicity srs at frame 3 slot 9
test_srs_periodicity srs at frame 5 slot 9
test_srs_periodicity srs at frame 7 slot 9
test_srs_periodicity srs at frame 9 slot 9
test_srs_periodicity srs at frame 11 slot 9
test_srs_periodicity srs at frame 13 slot 9
test_srs_periodicity srs at frame 15 slot 9
test_srs_periodicity srs at frame 17 slot 9
test_srs_periodicity srs at frame 19 slot 9
srs period 32 offset 0
test_srs_periodicity srs at frame 0 slot 0
test_srs_periodicity srs at frame 3 slot 2
test_srs_periodicity srs at frame 6 slot 4
test_srs_periodicity srs at frame 9 slot 6
test_srs_periodicity srs at frame 12 slot 8
test_srs_periodicity srs at frame 16 slot 0
test_srs_periodicity srs at frame 19 slot 2
test_srs_periodicity srs at frame 22 slot 4
test_srs_periodicity srs at frame 25 slot 6
test_srs_periodicity srs at frame 28 slot 8
srs period 32 offset 31
test_srs_periodicity srs at frame 3 slot 1
test_srs_periodicity srs at frame 6 slot 3
test_srs_periodicity srs at frame 9 slot 5
test_srs_periodicity srs at frame 12 slot 7
test_srs_periodicity srs at frame 15 slot 9
test_srs_periodicity srs at frame 19 slot 1
test_srs_periodicity srs at frame 22 slot 3
test_srs_periodicity srs at frame 25 slot 5
test_srs_periodicity srs at frame 28 slot 7
test_srs_periodicity srs at frame 31 slot 9
srs period 40 offset 0
test_srs_periodicity srs at frame 0 slot 0
test_srs_periodicity srs at frame 4 slot 0
test_srs_periodicity srs at frame 8 slot 0
test_srs_periodicity srs at frame 12 slot 0
test_srs_periodicity srs at frame 16 slot 0
test_srs_periodicity srs at frame 20 slot 0
test_srs_periodicity srs at frame 24 slot 0
test_srs_periodicity srs at frame 28 slot 0
test_srs_periodicity srs at frame 32 slot 0
test_srs_periodicity srs at frame 36 slot 0
srs period 40 offset 39
test_srs_periodicity srs at frame 3 slot 9
test_srs_periodicity srs at frame 7 slot 9
test_srs_periodicity srs at frame 11 slot 9
test_srs_periodicity srs at frame 15 slot 9
test_srs_periodicity srs at frame 19 slot 9
test_srs_periodicity srs at frame 23 slot 9
test_srs_periodicity srs at frame 27 slot 9
test_srs_periodicity srs at frame 31 slot 9
test_srs_periodicity srs at frame 35 slot 9
test_srs_periodicity srs at frame 39 slot 9
srs period 64 offset 0
test_srs_periodicity srs at frame 0 slot 0
test_srs_periodicity srs at frame 6 slot 4
test_srs_periodicity srs at frame 12 slot 8
test_srs_periodicity srs at frame 19 slot 2
test_srs_periodicity srs at frame 25 slot 6
test_srs_periodicity srs at frame 32 slot 0
test_srs_periodicity srs at frame 38 slot 4
test_srs_periodicity srs at frame 44 slot 8
test_srs_periodicity srs at frame 51 slot 2
test_srs_periodicity srs at frame 57 slot 6
srs period 64 offset 63
test_srs_periodicity srs at frame 6 slot 3
test_srs_periodicity srs at frame 12 slot 7
test_srs_periodicity srs at frame 19 slot 1
test_srs_periodicity srs at frame 25 slot 5
test_srs_periodicity srs at frame 31 slot 9
test_srs_periodicity srs at frame 38 slot 3
test_srs_periodicity srs at frame 44 slot 7
test_srs_periodicity srs at frame 51 slot 1
test_srs_periodicity srs at frame 57 slot 5
test_srs_periodicity srs at frame 63 slot 9
srs period 80 offset 0
test_srs_periodicity srs at frame 0 slot 0
test_srs_periodicity srs at frame 8 slot 0
test_srs_periodicity srs at frame 16 slot 0
test_srs_periodicity srs at frame 24 slot 0
test_srs_periodicity srs at frame 32 slot 0
test_srs_periodicity srs at frame 40 slot 0
test_srs_periodicity srs at frame 48 slot 0
test_srs_periodicity srs at frame 56 slot 0
test_srs_periodicity srs at frame 64 slot 0
test_srs_periodicity srs at frame 72 slot 0
srs period 80 offset 79
test_srs_periodicity srs at frame 7 slot 9
test_srs_periodicity srs at frame 15 slot 9
test_srs_periodicity srs at frame 23 slot 9
test_srs_periodicity srs at frame 31 slot 9
test_srs_periodicity srs at frame 39 slot 9
test_srs_periodicity srs at frame 47 slot 9
test_srs_periodicity srs at frame 55 slot 9
test_srs_periodicity srs at frame 63 slot 9
test_srs_periodicity srs at frame 71 slot 9
test_srs_periodicity srs at frame 79 slot 9
srs period 160 offset 0
test_srs_periodicity srs at frame 0 slot 0
test_srs_periodicity srs at frame 16 slot 0
test_srs_periodicity srs at frame 32 slot 0
test_srs_periodicity srs at frame 48 slot 0
test_srs_periodicity srs at frame 64 slot 0
test_srs_periodicity srs at frame 80 slot 0
test_srs_periodicity srs at frame 96 slot 0
test_srs_periodicity srs at frame 112 slot 0
test_srs_periodicity srs at frame 128 slot 0
test_srs_periodicity srs at frame 144 slot 0
srs period 160 offset 159
test_srs_periodicity srs at frame 15 slot 9
test_srs_periodicity srs at frame 31 slot 9
test_srs_periodicity srs at frame 47 slot 9
test_srs_periodicity srs at frame 63 slot 9
test_srs_periodicity srs at frame 79 slot 9
test_srs_periodicity srs at frame 95 slot 9
test_srs_periodicity srs at frame 111 slot 9
test_srs_periodicity srs at frame 127 slot 9
test_srs_periodicity srs at frame 143 slot 9
test_srs_periodicity srs at frame 159 slot 9
srs period 320 offset 0
test_srs_periodicity srs at frame 0 slot 0
test_srs_periodicity srs at frame 32 slot 0
test_srs_periodicity srs at frame 64 slot 0
test_srs_periodicity srs at frame 96 slot 0
test_srs_periodicity srs at frame 128 slot 0
test_srs_periodicity srs at frame 160 slot 0
test_srs_periodicity srs at frame 192 slot 0
test_srs_periodicity srs at frame 224 slot 0
test_srs_periodicity srs at frame 256 slot 0
test_srs_periodicity srs at frame 288 slot 0
srs period 320 offset 319
test_srs_periodicity srs at frame 31 slot 9
test_srs_periodicity srs at frame 63 slot 9
test_srs_periodicity srs at frame 95 slot 9
test_srs_periodicity srs at frame 127 slot 9
test_srs_periodicity srs at frame 159 slot 9
test_srs_periodicity srs at frame 191 slot 9
test_srs_periodicity srs at frame 223 slot 9
test_srs_periodicity srs at frame 255 slot 9
test_srs_periodicity srs at frame 287 slot 9
test_srs_periodicity srs at frame 319 slot 9
srs period 640 offset 0
test_srs_periodicity srs at frame 0 slot 0
test_srs_periodicity srs at frame 64 slot 0
test_srs_periodicity srs at frame 128 slot 0
test_srs_periodicity srs at frame 192 slot 0
test_srs_periodicity srs at frame 256 slot 0
test_srs_periodicity srs at frame 320 slot 0
test_srs_periodicity srs at frame 384 slot 0
test_srs_periodicity srs at frame 448 slot 0
test_srs_periodicity srs at frame 512 slot 0
test_srs_periodicity srs at frame 576 slot 0
srs period 640 offset 639
test_srs_periodicity srs at frame 63 slot 9
test_srs_periodicity srs at frame 127 slot 9
test_srs_periodicity srs at frame 191 slot 9
test_srs_periodicity srs at frame 255 slot 9
test_srs_periodicity srs at frame 319 slot 9
test_srs_periodicity srs at frame 383 slot 9
test_srs_periodicity srs at frame 447 slot 9
test_srs_periodicity srs at frame 511 slot 9
test_srs_periodicity srs at frame 575 slot 9
test_srs_periodicity srs at frame 639 slot 9
srs period 1280 offset 0
test_srs_periodicity srs at frame 0 slot 0
test_srs_periodicity srs at frame 128 slot 0
test_srs_periodicity srs at frame 256 slot 0
test_srs_periodicity srs at frame 384 slot 0
test_srs_periodicity srs at frame 512 slot 0
test_srs_periodicity srs at frame 640 slot 0
test_srs_periodicity srs at frame 768 slot 0
test_srs_periodicity srs at frame 896 slot 0
test_srs_periodicity srs at frame 1024 slot 0
test_srs_periodicity srs at frame 1152 slot 0
srs period 1280 offset 1279
test_srs_periodicity srs at frame 127 slot 9
test_srs_periodicity srs at frame 255 slot 9
test_srs_periodicity srs at frame 383 slot 9
test_srs_periodicity srs at frame 511 slot 9
test_srs_periodicity srs at frame 639 slot 9
test_srs_periodicity srs at frame 767 slot 9
test_srs_periodicity srs at frame 895 slot 9
test_srs_periodicity srs at frame 1023 slot 9
test_srs_periodicity srs at frame 1151 slot 9
test_srs_periodicity srs at frame 1279 slot 9
srs period 2560 offset 0
test_srs_periodicity srs at frame 0 slot 0
test_srs_periodicity srs at frame 256 slot 0
test_srs_periodicity srs at frame 512 slot 0
test_srs_periodicity srs at frame 768 slot 0
test_srs_periodicity srs at frame 1024 slot 0
test_srs_periodicity srs at frame 1280 slot 0
test_srs_periodicity srs at frame 1536 slot 0
test_srs_periodicity srs at frame 1792 slot 0
test_srs_periodicity srs at frame 2048 slot 0
test_srs_periodicity srs at frame 2304 slot 0
srs period 2560 offset 2559
test_srs_periodicity srs at frame 255 slot 9
test_srs_periodicity srs at frame 511 slot 9
test_srs_periodicity srs at frame 767 slot 9
test_srs_periodicity srs at frame 1023 slot 9
test_srs_periodicity srs at frame 1279 slot 9
test_srs_periodicity srs at frame 1535 slot 9
test_srs_periodicity srs at frame 1791 slot 9
test_srs_periodicity srs at frame 2047 slot 9
test_srs_periodicity srs at frame 2303 slot 9
test_srs_periodicity srs at frame 2559 slot 9
Test NR SRS is pass
SSS TEST
----------
log init done
Start lte_param_init, frame_type 0, extended_prefix 0
[PHY][I][nr_init_frame_parms_ue] Initializing frame parms for mu 1, N_RB 106, Ncp 0
Initializing UE vars (abstraction 0) for eNB TXant 1, UE RXant 1
***********************************
SSS NR Test synchronisation
***********************************
------------------------------------------------
Test nr pss with Nid2 0 at position 0
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 0, Peak found at pos 0, val = 232379536 (41 dB)
[UE] nr_synchro_time: Sync source = 0, Peak found at pos 0, val = 232379536 (41 dB)
Test nr sss with Nid1 0
(phase,Nid1) (0,0), metric_phase -201728 tot_metric -201728, phase_max 0
(phase,Nid1) (0,1), metric_phase 2048 tot_metric 2048, phase_max 0
(phase,Nid1) (0,3), metric_phase 18432 tot_metric 18432, phase_max 0
(phase,Nid1) (0,8), metric_phase 19456 tot_metric 19456, phase_max 0
(phase,Nid1) (0,13), metric_phase 22528 tot_metric 22528, phase_max 0
(phase,Nid1) (0,113), metric_phase 43008 tot_metric 43008, phase_max 0
(phase,Nid1) (0,135), metric_phase 45056 tot_metric 45056, phase_max 0
(phase,Nid1) (0,287), metric_phase 46080 tot_metric 46080, phase_max 0
(phase,Nid1) (1,0), metric_phase 48128 tot_metric 48128, phase_max 1
(phase,Nid1) (2,0), metric_phase 310272 tot_metric 310272, phase_max 2
(phase,Nid1) (3,0), metric_phase 498176 tot_metric 498176, phase_max 3
(phase,Nid1) (4,0), metric_phase 642048 tot_metric 642048, phase_max 4
(phase,Nid1) (5,0), metric_phase 760832 tot_metric 760832, phase_max 5
Nid2 0 Nid1 0 tot_metric 760832, phase_max 5
SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 0 Nid1 0 Nid2 0
------------------------------------------------
Test nr pss with Nid2 0 at position 492
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 0, Peak found at pos 492, val = 232379536 (41 dB)
[UE] nr_synchro_time: Sync source = 0, Peak found at pos 492, val = 232379536 (41 dB)
Test nr sss with Nid1 0
(phase,Nid1) (0,0), metric_phase -201728 tot_metric -201728, phase_max 0
(phase,Nid1) (0,1), metric_phase 2048 tot_metric 2048, phase_max 0
(phase,Nid1) (0,3), metric_phase 18432 tot_metric 18432, phase_max 0
(phase,Nid1) (0,8), metric_phase 19456 tot_metric 19456, phase_max 0
(phase,Nid1) (0,13), metric_phase 22528 tot_metric 22528, phase_max 0
(phase,Nid1) (0,113), metric_phase 43008 tot_metric 43008, phase_max 0
(phase,Nid1) (0,135), metric_phase 45056 tot_metric 45056, phase_max 0
(phase,Nid1) (0,287), metric_phase 46080 tot_metric 46080, phase_max 0
(phase,Nid1) (1,0), metric_phase 48128 tot_metric 48128, phase_max 1
(phase,Nid1) (2,0), metric_phase 310272 tot_metric 310272, phase_max 2
(phase,Nid1) (3,0), metric_phase 498176 tot_metric 498176, phase_max 3
(phase,Nid1) (4,0), metric_phase 642048 tot_metric 642048, phase_max 4
(phase,Nid1) (5,0), metric_phase 760832 tot_metric 760832, phase_max 5
Nid2 0 Nid1 0 tot_metric 760832, phase_max 5
SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 492 Nid1 0 Nid2 0
------------------------------------------------
Test nr pss with Nid2 0 at position 493
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 0, Peak found at pos 492, val = 230217517 (41 dB)
[UE] nr_synchro_time: Sync source = 0, Peak found at pos 492, val = 230217517 (41 dB)
Test nr sss with Nid1 0
(phase,Nid1) (0,0), metric_phase -201728 tot_metric -201728, phase_max 0
(phase,Nid1) (0,1), metric_phase 2048 tot_metric 2048, phase_max 0
(phase,Nid1) (0,3), metric_phase 18432 tot_metric 18432, phase_max 0
(phase,Nid1) (0,8), metric_phase 19456 tot_metric 19456, phase_max 0
(phase,Nid1) (0,13), metric_phase 22528 tot_metric 22528, phase_max 0
(phase,Nid1) (0,113), metric_phase 43008 tot_metric 43008, phase_max 0
(phase,Nid1) (0,135), metric_phase 45056 tot_metric 45056, phase_max 0
(phase,Nid1) (0,287), metric_phase 46080 tot_metric 46080, phase_max 0
(phase,Nid1) (1,0), metric_phase 48128 tot_metric 48128, phase_max 1
(phase,Nid1) (2,0), metric_phase 310272 tot_metric 310272, phase_max 2
(phase,Nid1) (3,0), metric_phase 498176 tot_metric 498176, phase_max 3
(phase,Nid1) (4,0), metric_phase 642048 tot_metric 642048, phase_max 4
(phase,Nid1) (5,0), metric_phase 760832 tot_metric 760832, phase_max 5
Nid2 0 Nid1 0 tot_metric 760832, phase_max 5
SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 493 Nid1 0 Nid2 0
------------------------------------------------
Test nr pss with Nid2 0 at position 56788
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 0, Peak found at pos 56788, val = 232379536 (41 dB)
[UE] nr_synchro_time: Sync source = 0, Peak found at pos 56788, val = 232379536 (41 dB)
Test nr sss with Nid1 0
(phase,Nid1) (0,0), metric_phase -201728 tot_metric -201728, phase_max 0
(phase,Nid1) (0,1), metric_phase 2048 tot_metric 2048, phase_max 0
(phase,Nid1) (0,3), metric_phase 18432 tot_metric 18432, phase_max 0
(phase,Nid1) (0,8), metric_phase 19456 tot_metric 19456, phase_max 0
(phase,Nid1) (0,13), metric_phase 22528 tot_metric 22528, phase_max 0
(phase,Nid1) (0,113), metric_phase 43008 tot_metric 43008, phase_max 0
(phase,Nid1) (0,135), metric_phase 45056 tot_metric 45056, phase_max 0
(phase,Nid1) (0,287), metric_phase 46080 tot_metric 46080, phase_max 0
(phase,Nid1) (1,0), metric_phase 48128 tot_metric 48128, phase_max 1
(phase,Nid1) (2,0), metric_phase 310272 tot_metric 310272, phase_max 2
(phase,Nid1) (3,0), metric_phase 498176 tot_metric 498176, phase_max 3
(phase,Nid1) (4,0), metric_phase 642048 tot_metric 642048, phase_max 4
(phase,Nid1) (5,0), metric_phase 760832 tot_metric 760832, phase_max 5
Nid2 0 Nid1 0 tot_metric 760832, phase_max 5
SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 56788 Nid1 0 Nid2 0
------------------------------------------------
Test nr pss with Nid2 0 at position 111111
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 0, Peak found at pos 111112, val = 230349320 (41 dB)
[UE] nr_synchro_time: Sync source = 0, Peak found at pos 111112, val = 230349320 (41 dB)
Test nr sss with Nid1 0
(phase,Nid1) (0,0), metric_phase -201728 tot_metric -201728, phase_max 0
(phase,Nid1) (0,1), metric_phase 2048 tot_metric 2048, phase_max 0
(phase,Nid1) (0,3), metric_phase 18432 tot_metric 18432, phase_max 0
(phase,Nid1) (0,8), metric_phase 19456 tot_metric 19456, phase_max 0
(phase,Nid1) (0,13), metric_phase 22528 tot_metric 22528, phase_max 0
(phase,Nid1) (0,113), metric_phase 43008 tot_metric 43008, phase_max 0
(phase,Nid1) (0,135), metric_phase 45056 tot_metric 45056, phase_max 0
(phase,Nid1) (0,287), metric_phase 46080 tot_metric 46080, phase_max 0
(phase,Nid1) (1,0), metric_phase 48128 tot_metric 48128, phase_max 1
(phase,Nid1) (2,0), metric_phase 310272 tot_metric 310272, phase_max 2
(phase,Nid1) (3,0), metric_phase 498176 tot_metric 498176, phase_max 3
(phase,Nid1) (4,0), metric_phase 642048 tot_metric 642048, phase_max 4
(phase,Nid1) (5,0), metric_phase 760832 tot_metric 760832, phase_max 5
Nid2 0 Nid1 0 tot_metric 760832, phase_max 5
SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 111111 Nid1 0 Nid2 0
------------------------------------------------
Test nr pss with Nid2 0 at position 222222
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 0, Peak found at pos 222224, val = 219912170 (41 dB)
[UE] nr_synchro_time: Sync source = 0, Peak found at pos 222224, val = 219912170 (41 dB)
Test nr sss with Nid1 0
(phase,Nid1) (0,0), metric_phase -201728 tot_metric -201728, phase_max 0
(phase,Nid1) (0,1), metric_phase 2048 tot_metric 2048, phase_max 0
(phase,Nid1) (0,3), metric_phase 18432 tot_metric 18432, phase_max 0
(phase,Nid1) (0,8), metric_phase 19456 tot_metric 19456, phase_max 0
(phase,Nid1) (0,13), metric_phase 22528 tot_metric 22528, phase_max 0
(phase,Nid1) (0,113), metric_phase 43008 tot_metric 43008, phase_max 0
(phase,Nid1) (0,135), metric_phase 45056 tot_metric 45056, phase_max 0
(phase,Nid1) (0,287), metric_phase 46080 tot_metric 46080, phase_max 0
(phase,Nid1) (1,0), metric_phase 48128 tot_metric 48128, phase_max 1
(phase,Nid1) (2,0), metric_phase 310272 tot_metric 310272, phase_max 2
(phase,Nid1) (3,0), metric_phase 498176 tot_metric 498176, phase_max 3
(phase,Nid1) (4,0), metric_phase 642048 tot_metric 642048, phase_max 4
(phase,Nid1) (5,0), metric_phase 760832 tot_metric 760832, phase_max 5
Nid2 0 Nid1 0 tot_metric 760832, phase_max 5
SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 222222 Nid1 0 Nid2 0
------------------------------------------------
Test nr pss with Nid2 0 at position 0
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 0, Peak found at pos 0, val = 232379536 (41 dB)
[UE] nr_synchro_time: Sync source = 0, Peak found at pos 0, val = 232379536 (41 dB)
Test nr sss with Nid1 71
(phase,Nid1) (0,0), metric_phase -14336 tot_metric -14336, phase_max 0
(phase,Nid1) (0,1), metric_phase 2048 tot_metric 2048, phase_max 0
(phase,Nid1) (0,3), metric_phase 18432 tot_metric 18432, phase_max 0
(phase,Nid1) (0,8), metric_phase 20480 tot_metric 20480, phase_max 0
(phase,Nid1) (0,23), metric_phase 22528 tot_metric 22528, phase_max 0
(phase,Nid1) (0,79), metric_phase 23552 tot_metric 23552, phase_max 0
(phase,Nid1) (0,113), metric_phase 46080 tot_metric 46080, phase_max 0
(phase,Nid1) (0,226), metric_phase 47104 tot_metric 47104, phase_max 0
(phase,Nid1) (1,71), metric_phase 60928 tot_metric 60928, phase_max 1
(phase,Nid1) (2,71), metric_phase 324608 tot_metric 324608, phase_max 2
(phase,Nid1) (3,71), metric_phase 509440 tot_metric 509440, phase_max 3
(phase,Nid1) (4,71), metric_phase 650240 tot_metric 650240, phase_max 4
(phase,Nid1) (5,71), metric_phase 770560 tot_metric 770560, phase_max 5
Nid2 0 Nid1 71 tot_metric 770560, phase_max 5
SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 0 Nid1 71 Nid2 0
------------------------------------------------
Test nr pss with Nid2 0 at position 492
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 0, Peak found at pos 492, val = 232379536 (41 dB)
[UE] nr_synchro_time: Sync source = 0, Peak found at pos 492, val = 232379536 (41 dB)
Test nr sss with Nid1 71
(phase,Nid1) (0,0), metric_phase -14336 tot_metric -14336, phase_max 0
(phase,Nid1) (0,1), metric_phase 2048 tot_metric 2048, phase_max 0
(phase,Nid1) (0,3), metric_phase 18432 tot_metric 18432, phase_max 0
(phase,Nid1) (0,8), metric_phase 20480 tot_metric 20480, phase_max 0
(phase,Nid1) (0,23), metric_phase 22528 tot_metric 22528, phase_max 0
(phase,Nid1) (0,79), metric_phase 23552 tot_metric 23552, phase_max 0
(phase,Nid1) (0,113), metric_phase 46080 tot_metric 46080, phase_max 0
(phase,Nid1) (0,226), metric_phase 47104 tot_metric 47104, phase_max 0
(phase,Nid1) (1,71), metric_phase 60928 tot_metric 60928, phase_max 1
(phase,Nid1) (2,71), metric_phase 324608 tot_metric 324608, phase_max 2
(phase,Nid1) (3,71), metric_phase 509440 tot_metric 509440, phase_max 3
(phase,Nid1) (4,71), metric_phase 650240 tot_metric 650240, phase_max 4
(phase,Nid1) (5,71), metric_phase 770560 tot_metric 770560, phase_max 5
Nid2 0 Nid1 71 tot_metric 770560, phase_max 5
SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 492 Nid1 71 Nid2 0
------------------------------------------------
Test nr pss with Nid2 0 at position 493
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 0, Peak found at pos 492, val = 230217517 (41 dB)
[UE] nr_synchro_time: Sync source = 0, Peak found at pos 492, val = 230217517 (41 dB)
Test nr sss with Nid1 71
(phase,Nid1) (0,0), metric_phase -14336 tot_metric -14336, phase_max 0
(phase,Nid1) (0,1), metric_phase 2048 tot_metric 2048, phase_max 0
(phase,Nid1) (0,3), metric_phase 18432 tot_metric 18432, phase_max 0
(phase,Nid1) (0,8), metric_phase 20480 tot_metric 20480, phase_max 0
(phase,Nid1) (0,23), metric_phase 22528 tot_metric 22528, phase_max 0
(phase,Nid1) (0,79), metric_phase 23552 tot_metric 23552, phase_max 0
(phase,Nid1) (0,113), metric_phase 46080 tot_metric 46080, phase_max 0
(phase,Nid1) (0,226), metric_phase 47104 tot_metric 47104, phase_max 0
(phase,Nid1) (1,71), metric_phase 60928 tot_metric 60928, phase_max 1
(phase,Nid1) (2,71), metric_phase 324608 tot_metric 324608, phase_max 2
(phase,Nid1) (3,71), metric_phase 509440 tot_metric 509440, phase_max 3
(phase,Nid1) (4,71), metric_phase 650240 tot_metric 650240, phase_max 4
(phase,Nid1) (5,71), metric_phase 770560 tot_metric 770560, phase_max 5
Nid2 0 Nid1 71 tot_metric 770560, phase_max 5
SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 493 Nid1 71 Nid2 0
------------------------------------------------
Test nr pss with Nid2 0 at position 56788
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 0, Peak found at pos 56788, val = 232379536 (41 dB)
[UE] nr_synchro_time: Sync source = 0, Peak found at pos 56788, val = 232379536 (41 dB)
Test nr sss with Nid1 71
(phase,Nid1) (0,0), metric_phase -14336 tot_metric -14336, phase_max 0
(phase,Nid1) (0,1), metric_phase 2048 tot_metric 2048, phase_max 0
(phase,Nid1) (0,3), metric_phase 18432 tot_metric 18432, phase_max 0
(phase,Nid1) (0,8), metric_phase 20480 tot_metric 20480, phase_max 0
(phase,Nid1) (0,23), metric_phase 22528 tot_metric 22528, phase_max 0
(phase,Nid1) (0,79), metric_phase 23552 tot_metric 23552, phase_max 0
(phase,Nid1) (0,113), metric_phase 46080 tot_metric 46080, phase_max 0
(phase,Nid1) (0,226), metric_phase 47104 tot_metric 47104, phase_max 0
(phase,Nid1) (1,71), metric_phase 60928 tot_metric 60928, phase_max 1
(phase,Nid1) (2,71), metric_phase 324608 tot_metric 324608, phase_max 2
(phase,Nid1) (3,71), metric_phase 509440 tot_metric 509440, phase_max 3
(phase,Nid1) (4,71), metric_phase 650240 tot_metric 650240, phase_max 4
(phase,Nid1) (5,71), metric_phase 770560 tot_metric 770560, phase_max 5
Nid2 0 Nid1 71 tot_metric 770560, phase_max 5
SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 56788 Nid1 71 Nid2 0
------------------------------------------------
Test nr pss with Nid2 0 at position 111111
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 0, Peak found at pos 111112, val = 230349320 (41 dB)
[UE] nr_synchro_time: Sync source = 0, Peak found at pos 111112, val = 230349320 (41 dB)
Test nr sss with Nid1 71
(phase,Nid1) (0,0), metric_phase -14336 tot_metric -14336, phase_max 0
(phase,Nid1) (0,1), metric_phase 2048 tot_metric 2048, phase_max 0
(phase,Nid1) (0,3), metric_phase 18432 tot_metric 18432, phase_max 0
(phase,Nid1) (0,8), metric_phase 20480 tot_metric 20480, phase_max 0
(phase,Nid1) (0,23), metric_phase 22528 tot_metric 22528, phase_max 0
(phase,Nid1) (0,79), metric_phase 23552 tot_metric 23552, phase_max 0
(phase,Nid1) (0,113), metric_phase 46080 tot_metric 46080, phase_max 0
(phase,Nid1) (0,226), metric_phase 47104 tot_metric 47104, phase_max 0
(phase,Nid1) (1,71), metric_phase 60928 tot_metric 60928, phase_max 1
(phase,Nid1) (2,71), metric_phase 324608 tot_metric 324608, phase_max 2
(phase,Nid1) (3,71), metric_phase 509440 tot_metric 509440, phase_max 3
(phase,Nid1) (4,71), metric_phase 650240 tot_metric 650240, phase_max 4
(phase,Nid1) (5,71), metric_phase 770560 tot_metric 770560, phase_max 5
Nid2 0 Nid1 71 tot_metric 770560, phase_max 5
SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 111111 Nid1 71 Nid2 0
------------------------------------------------
Test nr pss with Nid2 0 at position 222222
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 0, Peak found at pos 222224, val = 219912170 (41 dB)
[UE] nr_synchro_time: Sync source = 0, Peak found at pos 222224, val = 219912170 (41 dB)
Test nr sss with Nid1 71
(phase,Nid1) (0,0), metric_phase -14336 tot_metric -14336, phase_max 0
(phase,Nid1) (0,1), metric_phase 2048 tot_metric 2048, phase_max 0
(phase,Nid1) (0,3), metric_phase 18432 tot_metric 18432, phase_max 0
(phase,Nid1) (0,8), metric_phase 20480 tot_metric 20480, phase_max 0
(phase,Nid1) (0,23), metric_phase 22528 tot_metric 22528, phase_max 0
(phase,Nid1) (0,79), metric_phase 23552 tot_metric 23552, phase_max 0
(phase,Nid1) (0,113), metric_phase 46080 tot_metric 46080, phase_max 0
(phase,Nid1) (0,226), metric_phase 47104 tot_metric 47104, phase_max 0
(phase,Nid1) (1,71), metric_phase 60928 tot_metric 60928, phase_max 1
(phase,Nid1) (2,71), metric_phase 324608 tot_metric 324608, phase_max 2
(phase,Nid1) (3,71), metric_phase 509440 tot_metric 509440, phase_max 3
(phase,Nid1) (4,71), metric_phase 650240 tot_metric 650240, phase_max 4
(phase,Nid1) (5,71), metric_phase 770560 tot_metric 770560, phase_max 5
Nid2 0 Nid1 71 tot_metric 770560, phase_max 5
SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 222222 Nid1 71 Nid2 0
------------------------------------------------
Test nr pss with Nid2 2 at position 0
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 0, val = 231344100 (41 dB)
[UE] nr_synchro_time: Sync source = 2, Peak found at pos 0, val = 231344100 (41 dB)
Test nr sss with Nid1 21
(phase,Nid1) (0,0), metric_phase 19456 tot_metric 19456, phase_max 0
(phase,Nid1) (0,8), metric_phase 21504 tot_metric 21504, phase_max 0
(phase,Nid1) (0,13), metric_phase 23552 tot_metric 23552, phase_max 0
(phase,Nid1) (0,88), metric_phase 24576 tot_metric 24576, phase_max 0
(phase,Nid1) (0,124), metric_phase 41984 tot_metric 41984, phase_max 0
(phase,Nid1) (0,135), metric_phase 46080 tot_metric 46080, phase_max 0
(phase,Nid1) (0,319), metric_phase 47104 tot_metric 47104, phase_max 0
(phase,Nid1) (2,21), metric_phase 308736 tot_metric 308736, phase_max 2
(phase,Nid1) (3,21), metric_phase 494592 tot_metric 494592, phase_max 3
(phase,Nid1) (4,21), metric_phase 642048 tot_metric 642048, phase_max 4
(phase,Nid1) (5,21), metric_phase 759808 tot_metric 759808, phase_max 5
Nid2 2 Nid1 21 tot_metric 759808, phase_max 5
SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 0 Nid1 21 Nid2 2
------------------------------------------------
Test nr pss with Nid2 2 at position 492
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 492, val = 231344100 (41 dB)
[UE] nr_synchro_time: Sync source = 2, Peak found at pos 492, val = 231344100 (41 dB)
Test nr sss with Nid1 21
(phase,Nid1) (0,0), metric_phase 19456 tot_metric 19456, phase_max 0
(phase,Nid1) (0,8), metric_phase 21504 tot_metric 21504, phase_max 0
(phase,Nid1) (0,13), metric_phase 23552 tot_metric 23552, phase_max 0
(phase,Nid1) (0,88), metric_phase 24576 tot_metric 24576, phase_max 0
(phase,Nid1) (0,124), metric_phase 41984 tot_metric 41984, phase_max 0
(phase,Nid1) (0,135), metric_phase 46080 tot_metric 46080, phase_max 0
(phase,Nid1) (0,319), metric_phase 47104 tot_metric 47104, phase_max 0
(phase,Nid1) (2,21), metric_phase 308736 tot_metric 308736, phase_max 2
(phase,Nid1) (3,21), metric_phase 494592 tot_metric 494592, phase_max 3
(phase,Nid1) (4,21), metric_phase 642048 tot_metric 642048, phase_max 4
(phase,Nid1) (5,21), metric_phase 759808 tot_metric 759808, phase_max 5
Nid2 2 Nid1 21 tot_metric 759808, phase_max 5
SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 492 Nid1 21 Nid2 2
------------------------------------------------
Test nr pss with Nid2 2 at position 493
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 492, val = 229165600 (41 dB)
[UE] nr_synchro_time: Sync source = 2, Peak found at pos 492, val = 229165600 (41 dB)
Test nr sss with Nid1 21
(phase,Nid1) (0,0), metric_phase 19456 tot_metric 19456, phase_max 0
(phase,Nid1) (0,8), metric_phase 21504 tot_metric 21504, phase_max 0
(phase,Nid1) (0,13), metric_phase 23552 tot_metric 23552, phase_max 0
(phase,Nid1) (0,88), metric_phase 24576 tot_metric 24576, phase_max 0
(phase,Nid1) (0,124), metric_phase 41984 tot_metric 41984, phase_max 0
(phase,Nid1) (0,135), metric_phase 46080 tot_metric 46080, phase_max 0
(phase,Nid1) (0,319), metric_phase 47104 tot_metric 47104, phase_max 0
(phase,Nid1) (2,21), metric_phase 308736 tot_metric 308736, phase_max 2
(phase,Nid1) (3,21), metric_phase 494592 tot_metric 494592, phase_max 3
(phase,Nid1) (4,21), metric_phase 642048 tot_metric 642048, phase_max 4
(phase,Nid1) (5,21), metric_phase 759808 tot_metric 759808, phase_max 5
Nid2 2 Nid1 21 tot_metric 759808, phase_max 5
SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 493 Nid1 21 Nid2 2
------------------------------------------------
Test nr pss with Nid2 2 at position 56788
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 56788, val = 231344100 (41 dB)
[UE] nr_synchro_time: Sync source = 2, Peak found at pos 56788, val = 231344100 (41 dB)
Test nr sss with Nid1 21
(phase,Nid1) (0,0), metric_phase 19456 tot_metric 19456, phase_max 0
(phase,Nid1) (0,8), metric_phase 21504 tot_metric 21504, phase_max 0
(phase,Nid1) (0,13), metric_phase 23552 tot_metric 23552, phase_max 0
(phase,Nid1) (0,88), metric_phase 24576 tot_metric 24576, phase_max 0
(phase,Nid1) (0,124), metric_phase 41984 tot_metric 41984, phase_max 0
(phase,Nid1) (0,135), metric_phase 46080 tot_metric 46080, phase_max 0
(phase,Nid1) (0,319), metric_phase 47104 tot_metric 47104, phase_max 0
(phase,Nid1) (2,21), metric_phase 308736 tot_metric 308736, phase_max 2
(phase,Nid1) (3,21), metric_phase 494592 tot_metric 494592, phase_max 3
(phase,Nid1) (4,21), metric_phase 642048 tot_metric 642048, phase_max 4
(phase,Nid1) (5,21), metric_phase 759808 tot_metric 759808, phase_max 5
Nid2 2 Nid1 21 tot_metric 759808, phase_max 5
SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 56788 Nid1 21 Nid2 2
------------------------------------------------
Test nr pss with Nid2 2 at position 111111
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 111112, val = 229601794 (41 dB)
[UE] nr_synchro_time: Sync source = 2, Peak found at pos 111112, val = 229601794 (41 dB)
Test nr sss with Nid1 21
(phase,Nid1) (0,0), metric_phase 19456 tot_metric 19456, phase_max 0
(phase,Nid1) (0,8), metric_phase 21504 tot_metric 21504, phase_max 0
(phase,Nid1) (0,13), metric_phase 23552 tot_metric 23552, phase_max 0
(phase,Nid1) (0,88), metric_phase 24576 tot_metric 24576, phase_max 0
(phase,Nid1) (0,124), metric_phase 41984 tot_metric 41984, phase_max 0
(phase,Nid1) (0,135), metric_phase 46080 tot_metric 46080, phase_max 0
(phase,Nid1) (0,319), metric_phase 47104 tot_metric 47104, phase_max 0
(phase,Nid1) (2,21), metric_phase 308736 tot_metric 308736, phase_max 2
(phase,Nid1) (3,21), metric_phase 494592 tot_metric 494592, phase_max 3
(phase,Nid1) (4,21), metric_phase 642048 tot_metric 642048, phase_max 4
(phase,Nid1) (5,21), metric_phase 759808 tot_metric 759808, phase_max 5
Nid2 2 Nid1 21 tot_metric 759808, phase_max 5
SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 111111 Nid1 21 Nid2 2
------------------------------------------------
Test nr pss with Nid2 2 at position 222222
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 222224, val = 219559301 (41 dB)
[UE] nr_synchro_time: Sync source = 2, Peak found at pos 222224, val = 219559301 (41 dB)
Test nr sss with Nid1 21
(phase,Nid1) (0,0), metric_phase 19456 tot_metric 19456, phase_max 0
(phase,Nid1) (0,8), metric_phase 21504 tot_metric 21504, phase_max 0
(phase,Nid1) (0,13), metric_phase 23552 tot_metric 23552, phase_max 0
(phase,Nid1) (0,88), metric_phase 24576 tot_metric 24576, phase_max 0
(phase,Nid1) (0,124), metric_phase 41984 tot_metric 41984, phase_max 0
(phase,Nid1) (0,135), metric_phase 46080 tot_metric 46080, phase_max 0
(phase,Nid1) (0,319), metric_phase 47104 tot_metric 47104, phase_max 0
(phase,Nid1) (2,21), metric_phase 308736 tot_metric 308736, phase_max 2
(phase,Nid1) (3,21), metric_phase 494592 tot_metric 494592, phase_max 3
(phase,Nid1) (4,21), metric_phase 642048 tot_metric 642048, phase_max 4
(phase,Nid1) (5,21), metric_phase 759808 tot_metric 759808, phase_max 5
Nid2 2 Nid1 21 tot_metric 759808, phase_max 5
SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 222222 Nid1 21 Nid2 2
------------------------------------------------
Test nr pss with Nid2 2 at position 0
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 0, val = 231344100 (41 dB)
[UE] nr_synchro_time: Sync source = 2, Peak found at pos 0, val = 231344100 (41 dB)
Test nr sss with Nid1 21
(phase,Nid1) (0,0), metric_phase 19456 tot_metric 19456, phase_max 0
(phase,Nid1) (0,8), metric_phase 21504 tot_metric 21504, phase_max 0
(phase,Nid1) (0,13), metric_phase 23552 tot_metric 23552, phase_max 0
(phase,Nid1) (0,88), metric_phase 24576 tot_metric 24576, phase_max 0
(phase,Nid1) (0,124), metric_phase 41984 tot_metric 41984, phase_max 0
(phase,Nid1) (0,135), metric_phase 46080 tot_metric 46080, phase_max 0
(phase,Nid1) (0,319), metric_phase 47104 tot_metric 47104, phase_max 0
(phase,Nid1) (2,21), metric_phase 308736 tot_metric 308736, phase_max 2
(phase,Nid1) (3,21), metric_phase 494592 tot_metric 494592, phase_max 3
(phase,Nid1) (4,21), metric_phase 642048 tot_metric 642048, phase_max 4
(phase,Nid1) (5,21), metric_phase 759808 tot_metric 759808, phase_max 5
Nid2 2 Nid1 21 tot_metric 759808, phase_max 5
SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 0 Nid1 21 Nid2 2
------------------------------------------------
Test nr pss with Nid2 2 at position 492
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 492, val = 231344100 (41 dB)
[UE] nr_synchro_time: Sync source = 2, Peak found at pos 492, val = 231344100 (41 dB)
Test nr sss with Nid1 21
(phase,Nid1) (0,0), metric_phase 19456 tot_metric 19456, phase_max 0
(phase,Nid1) (0,8), metric_phase 21504 tot_metric 21504, phase_max 0
(phase,Nid1) (0,13), metric_phase 23552 tot_metric 23552, phase_max 0
(phase,Nid1) (0,88), metric_phase 24576 tot_metric 24576, phase_max 0
(phase,Nid1) (0,124), metric_phase 41984 tot_metric 41984, phase_max 0
(phase,Nid1) (0,135), metric_phase 46080 tot_metric 46080, phase_max 0
(phase,Nid1) (0,319), metric_phase 47104 tot_metric 47104, phase_max 0
(phase,Nid1) (2,21), metric_phase 308736 tot_metric 308736, phase_max 2
(phase,Nid1) (3,21), metric_phase 494592 tot_metric 494592, phase_max 3
(phase,Nid1) (4,21), metric_phase 642048 tot_metric 642048, phase_max 4
(phase,Nid1) (5,21), metric_phase 759808 tot_metric 759808, phase_max 5
Nid2 2 Nid1 21 tot_metric 759808, phase_max 5
SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 492 Nid1 21 Nid2 2
------------------------------------------------
Test nr pss with Nid2 2 at position 493
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 492, val = 229165600 (41 dB)
[UE] nr_synchro_time: Sync source = 2, Peak found at pos 492, val = 229165600 (41 dB)
Test nr sss with Nid1 21
(phase,Nid1) (0,0), metric_phase 19456 tot_metric 19456, phase_max 0
(phase,Nid1) (0,8), metric_phase 21504 tot_metric 21504, phase_max 0
(phase,Nid1) (0,13), metric_phase 23552 tot_metric 23552, phase_max 0
(phase,Nid1) (0,88), metric_phase 24576 tot_metric 24576, phase_max 0
(phase,Nid1) (0,124), metric_phase 41984 tot_metric 41984, phase_max 0
(phase,Nid1) (0,135), metric_phase 46080 tot_metric 46080, phase_max 0
(phase,Nid1) (0,319), metric_phase 47104 tot_metric 47104, phase_max 0
(phase,Nid1) (2,21), metric_phase 308736 tot_metric 308736, phase_max 2
(phase,Nid1) (3,21), metric_phase 494592 tot_metric 494592, phase_max 3
(phase,Nid1) (4,21), metric_phase 642048 tot_metric 642048, phase_max 4
(phase,Nid1) (5,21), metric_phase 759808 tot_metric 759808, phase_max 5
Nid2 2 Nid1 21 tot_metric 759808, phase_max 5
SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 493 Nid1 21 Nid2 2
------------------------------------------------
Test nr pss with Nid2 2 at position 56788
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 56788, val = 231344100 (41 dB)
[UE] nr_synchro_time: Sync source = 2, Peak found at pos 56788, val = 231344100 (41 dB)
Test nr sss with Nid1 21
(phase,Nid1) (0,0), metric_phase 19456 tot_metric 19456, phase_max 0
(phase,Nid1) (0,8), metric_phase 21504 tot_metric 21504, phase_max 0
(phase,Nid1) (0,13), metric_phase 23552 tot_metric 23552, phase_max 0
(phase,Nid1) (0,88), metric_phase 24576 tot_metric 24576, phase_max 0
(phase,Nid1) (0,124), metric_phase 41984 tot_metric 41984, phase_max 0
(phase,Nid1) (0,135), metric_phase 46080 tot_metric 46080, phase_max 0
(phase,Nid1) (0,319), metric_phase 47104 tot_metric 47104, phase_max 0
(phase,Nid1) (2,21), metric_phase 308736 tot_metric 308736, phase_max 2
(phase,Nid1) (3,21), metric_phase 494592 tot_metric 494592, phase_max 3
(phase,Nid1) (4,21), metric_phase 642048 tot_metric 642048, phase_max 4
(phase,Nid1) (5,21), metric_phase 759808 tot_metric 759808, phase_max 5
Nid2 2 Nid1 21 tot_metric 759808, phase_max 5
SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 56788 Nid1 21 Nid2 2
------------------------------------------------
Test nr pss with Nid2 2 at position 111111
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 111112, val = 229601794 (41 dB)
[UE] nr_synchro_time: Sync source = 2, Peak found at pos 111112, val = 229601794 (41 dB)
Test nr sss with Nid1 21
(phase,Nid1) (0,0), metric_phase 19456 tot_metric 19456, phase_max 0
(phase,Nid1) (0,8), metric_phase 21504 tot_metric 21504, phase_max 0
(phase,Nid1) (0,13), metric_phase 23552 tot_metric 23552, phase_max 0
(phase,Nid1) (0,88), metric_phase 24576 tot_metric 24576, phase_max 0
(phase,Nid1) (0,124), metric_phase 41984 tot_metric 41984, phase_max 0
(phase,Nid1) (0,135), metric_phase 46080 tot_metric 46080, phase_max 0
(phase,Nid1) (0,319), metric_phase 47104 tot_metric 47104, phase_max 0
(phase,Nid1) (2,21), metric_phase 308736 tot_metric 308736, phase_max 2
(phase,Nid1) (3,21), metric_phase 494592 tot_metric 494592, phase_max 3
(phase,Nid1) (4,21), metric_phase 642048 tot_metric 642048, phase_max 4
(phase,Nid1) (5,21), metric_phase 759808 tot_metric 759808, phase_max 5
Nid2 2 Nid1 21 tot_metric 759808, phase_max 5
SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 111111 Nid1 21 Nid2 2
------------------------------------------------
Test nr pss with Nid2 2 at position 222222
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 222224, val = 219559301 (41 dB)
[UE] nr_synchro_time: Sync source = 2, Peak found at pos 222224, val = 219559301 (41 dB)
Test nr sss with Nid1 21
(phase,Nid1) (0,0), metric_phase 19456 tot_metric 19456, phase_max 0
(phase,Nid1) (0,8), metric_phase 21504 tot_metric 21504, phase_max 0
(phase,Nid1) (0,13), metric_phase 23552 tot_metric 23552, phase_max 0
(phase,Nid1) (0,88), metric_phase 24576 tot_metric 24576, phase_max 0
(phase,Nid1) (0,124), metric_phase 41984 tot_metric 41984, phase_max 0
(phase,Nid1) (0,135), metric_phase 46080 tot_metric 46080, phase_max 0
(phase,Nid1) (0,319), metric_phase 47104 tot_metric 47104, phase_max 0
(phase,Nid1) (2,21), metric_phase 308736 tot_metric 308736, phase_max 2
(phase,Nid1) (3,21), metric_phase 494592 tot_metric 494592, phase_max 3
(phase,Nid1) (4,21), metric_phase 642048 tot_metric 642048, phase_max 4
(phase,Nid1) (5,21), metric_phase 759808 tot_metric 759808, phase_max 5
Nid2 2 Nid1 21 tot_metric 759808, phase_max 5
SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 222222 Nid1 21 Nid2 2
------------------------------------------------
Test nr pss with Nid2 1 at position 0
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 1, Peak found at pos 0, val = 232105225 (41 dB)
[UE] nr_synchro_time: Sync source = 1, Peak found at pos 0, val = 232105225 (41 dB)
Test nr sss with Nid1 55
(phase,Nid1) (0,0), metric_phase -1536 tot_metric -1536, phase_max 0
(phase,Nid1) (0,1), metric_phase 1536 tot_metric 1536, phase_max 0
(phase,Nid1) (0,2), metric_phase 5632 tot_metric 5632, phase_max 0
(phase,Nid1) (0,3), metric_phase 20992 tot_metric 20992, phase_max 0
(phase,Nid1) (0,13), metric_phase 23040 tot_metric 23040, phase_max 0
(phase,Nid1) (0,120), metric_phase 28160 tot_metric 28160, phase_max 0
(phase,Nid1) (0,135), metric_phase 43520 tot_metric 43520, phase_max 0
(phase,Nid1) (0,228), metric_phase 44544 tot_metric 44544, phase_max 0
(phase,Nid1) (1,55), metric_phase 61440 tot_metric 61440, phase_max 1
(phase,Nid1) (2,55), metric_phase 326144 tot_metric 326144, phase_max 2
(phase,Nid1) (3,55), metric_phase 507392 tot_metric 507392, phase_max 3
(phase,Nid1) (4,55), metric_phase 651264 tot_metric 651264, phase_max 4
(phase,Nid1) (5,55), metric_phase 770560 tot_metric 770560, phase_max 5
Nid2 1 Nid1 55 tot_metric 770560, phase_max 5
SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 0 Nid1 55 Nid2 1
------------------------------------------------
Test nr pss with Nid2 1 at position 492
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 1, Peak found at pos 492, val = 232105225 (41 dB)
[UE] nr_synchro_time: Sync source = 1, Peak found at pos 492, val = 232105225 (41 dB)
Test nr sss with Nid1 55
(phase,Nid1) (0,0), metric_phase -1536 tot_metric -1536, phase_max 0
(phase,Nid1) (0,1), metric_phase 1536 tot_metric 1536, phase_max 0
(phase,Nid1) (0,2), metric_phase 5632 tot_metric 5632, phase_max 0
(phase,Nid1) (0,3), metric_phase 20992 tot_metric 20992, phase_max 0
(phase,Nid1) (0,13), metric_phase 23040 tot_metric 23040, phase_max 0
(phase,Nid1) (0,120), metric_phase 28160 tot_metric 28160, phase_max 0
(phase,Nid1) (0,135), metric_phase 43520 tot_metric 43520, phase_max 0
(phase,Nid1) (0,228), metric_phase 44544 tot_metric 44544, phase_max 0
(phase,Nid1) (1,55), metric_phase 61440 tot_metric 61440, phase_max 1
(phase,Nid1) (2,55), metric_phase 326144 tot_metric 326144, phase_max 2
(phase,Nid1) (3,55), metric_phase 507392 tot_metric 507392, phase_max 3
(phase,Nid1) (4,55), metric_phase 651264 tot_metric 651264, phase_max 4
(phase,Nid1) (5,55), metric_phase 770560 tot_metric 770560, phase_max 5
Nid2 1 Nid1 55 tot_metric 770560, phase_max 5
SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 492 Nid1 55 Nid2 1
------------------------------------------------
Test nr pss with Nid2 1 at position 493
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 1, Peak found at pos 492, val = 230099437 (41 dB)
[UE] nr_synchro_time: Sync source = 1, Peak found at pos 492, val = 230099437 (41 dB)
Test nr sss with Nid1 55
(phase,Nid1) (0,0), metric_phase -1536 tot_metric -1536, phase_max 0
(phase,Nid1) (0,1), metric_phase 1536 tot_metric 1536, phase_max 0
(phase,Nid1) (0,2), metric_phase 5632 tot_metric 5632, phase_max 0
(phase,Nid1) (0,3), metric_phase 20992 tot_metric 20992, phase_max 0
(phase,Nid1) (0,13), metric_phase 23040 tot_metric 23040, phase_max 0
(phase,Nid1) (0,120), metric_phase 28160 tot_metric 28160, phase_max 0
(phase,Nid1) (0,135), metric_phase 43520 tot_metric 43520, phase_max 0
(phase,Nid1) (0,228), metric_phase 44544 tot_metric 44544, phase_max 0
(phase,Nid1) (1,55), metric_phase 61440 tot_metric 61440, phase_max 1
(phase,Nid1) (2,55), metric_phase 326144 tot_metric 326144, phase_max 2
(phase,Nid1) (3,55), metric_phase 507392 tot_metric 507392, phase_max 3
(phase,Nid1) (4,55), metric_phase 651264 tot_metric 651264, phase_max 4
(phase,Nid1) (5,55), metric_phase 770560 tot_metric 770560, phase_max 5
Nid2 1 Nid1 55 tot_metric 770560, phase_max 5
SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 493 Nid1 55 Nid2 1
------------------------------------------------
Test nr pss with Nid2 1 at position 56788
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 1, Peak found at pos 56788, val = 232105225 (41 dB)
[UE] nr_synchro_time: Sync source = 1, Peak found at pos 56788, val = 232105225 (41 dB)
Test nr sss with Nid1 55
(phase,Nid1) (0,0), metric_phase -1536 tot_metric -1536, phase_max 0
(phase,Nid1) (0,1), metric_phase 1536 tot_metric 1536, phase_max 0
(phase,Nid1) (0,2), metric_phase 5632 tot_metric 5632, phase_max 0
(phase,Nid1) (0,3), metric_phase 20992 tot_metric 20992, phase_max 0
(phase,Nid1) (0,13), metric_phase 23040 tot_metric 23040, phase_max 0
(phase,Nid1) (0,120), metric_phase 28160 tot_metric 28160, phase_max 0
(phase,Nid1) (0,135), metric_phase 43520 tot_metric 43520, phase_max 0
(phase,Nid1) (0,228), metric_phase 44544 tot_metric 44544, phase_max 0
(phase,Nid1) (1,55), metric_phase 61440 tot_metric 61440, phase_max 1
(phase,Nid1) (2,55), metric_phase 326144 tot_metric 326144, phase_max 2
(phase,Nid1) (3,55), metric_phase 507392 tot_metric 507392, phase_max 3
(phase,Nid1) (4,55), metric_phase 651264 tot_metric 651264, phase_max 4
(phase,Nid1) (5,55), metric_phase 770560 tot_metric 770560, phase_max 5
Nid2 1 Nid1 55 tot_metric 770560, phase_max 5
SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 56788 Nid1 55 Nid2 1
------------------------------------------------
Test nr pss with Nid2 1 at position 111111
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 1, Peak found at pos 111112, val = 230409881 (41 dB)
[UE] nr_synchro_time: Sync source = 1, Peak found at pos 111112, val = 230409881 (41 dB)
Test nr sss with Nid1 55
(phase,Nid1) (0,0), metric_phase -1536 tot_metric -1536, phase_max 0
(phase,Nid1) (0,1), metric_phase 1536 tot_metric 1536, phase_max 0
(phase,Nid1) (0,2), metric_phase 5632 tot_metric 5632, phase_max 0
(phase,Nid1) (0,3), metric_phase 20992 tot_metric 20992, phase_max 0
(phase,Nid1) (0,13), metric_phase 23040 tot_metric 23040, phase_max 0
(phase,Nid1) (0,120), metric_phase 28160 tot_metric 28160, phase_max 0
(phase,Nid1) (0,135), metric_phase 43520 tot_metric 43520, phase_max 0
(phase,Nid1) (0,228), metric_phase 44544 tot_metric 44544, phase_max 0
(phase,Nid1) (1,55), metric_phase 61440 tot_metric 61440, phase_max 1
(phase,Nid1) (2,55), metric_phase 326144 tot_metric 326144, phase_max 2
(phase,Nid1) (3,55), metric_phase 507392 tot_metric 507392, phase_max 3
(phase,Nid1) (4,55), metric_phase 651264 tot_metric 651264, phase_max 4
(phase,Nid1) (5,55), metric_phase 770560 tot_metric 770560, phase_max 5
Nid2 1 Nid1 55 tot_metric 770560, phase_max 5
SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 111111 Nid1 55 Nid2 1
------------------------------------------------
Test nr pss with Nid2 1 at position 222222
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 1, Peak found at pos 222224, val = 219714314 (41 dB)
[UE] nr_synchro_time: Sync source = 1, Peak found at pos 222224, val = 219714314 (41 dB)
Test nr sss with Nid1 55
(phase,Nid1) (0,0), metric_phase -1536 tot_metric -1536, phase_max 0
(phase,Nid1) (0,1), metric_phase 1536 tot_metric 1536, phase_max 0
(phase,Nid1) (0,2), metric_phase 5632 tot_metric 5632, phase_max 0
(phase,Nid1) (0,3), metric_phase 20992 tot_metric 20992, phase_max 0
(phase,Nid1) (0,13), metric_phase 23040 tot_metric 23040, phase_max 0
(phase,Nid1) (0,120), metric_phase 28160 tot_metric 28160, phase_max 0
(phase,Nid1) (0,135), metric_phase 43520 tot_metric 43520, phase_max 0
(phase,Nid1) (0,228), metric_phase 44544 tot_metric 44544, phase_max 0
(phase,Nid1) (1,55), metric_phase 61440 tot_metric 61440, phase_max 1
(phase,Nid1) (2,55), metric_phase 326144 tot_metric 326144, phase_max 2
(phase,Nid1) (3,55), metric_phase 507392 tot_metric 507392, phase_max 3
(phase,Nid1) (4,55), metric_phase 651264 tot_metric 651264, phase_max 4
(phase,Nid1) (5,55), metric_phase 770560 tot_metric 770560, phase_max 5
Nid2 1 Nid1 55 tot_metric 770560, phase_max 5
SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 222222 Nid1 55 Nid2 1
------------------------------------------------
Test nr pss with Nid2 2 at position 0
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 0, val = 231344100 (41 dB)
[UE] nr_synchro_time: Sync source = 2, Peak found at pos 0, val = 231344100 (41 dB)
Test nr sss with Nid1 111
(phase,Nid1) (0,0), metric_phase 19968 tot_metric 19968, phase_max 0
(phase,Nid1) (0,13), metric_phase 22016 tot_metric 22016, phase_max 0
(phase,Nid1) (0,109), metric_phase 23040 tot_metric 23040, phase_max 0
(phase,Nid1) (0,117), metric_phase 26112 tot_metric 26112, phase_max 0
(phase,Nid1) (0,124), metric_phase 37376 tot_metric 37376, phase_max 0
(phase,Nid1) (0,161), metric_phase 42496 tot_metric 42496, phase_max 0
(phase,Nid1) (0,170), metric_phase 43520 tot_metric 43520, phase_max 0
(phase,Nid1) (0,210), metric_phase 45568 tot_metric 45568, phase_max 0
(phase,Nid1) (1,111), metric_phase 62464 tot_metric 62464, phase_max 1
(phase,Nid1) (2,111), metric_phase 327680 tot_metric 327680, phase_max 2
(phase,Nid1) (3,111), metric_phase 511488 tot_metric 511488, phase_max 3
(phase,Nid1) (4,111), metric_phase 651264 tot_metric 651264, phase_max 4
(phase,Nid1) (5,111), metric_phase 770048 tot_metric 770048, phase_max 5
Nid2 2 Nid1 111 tot_metric 770048, phase_max 5
SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 0 Nid1 111 Nid2 2
------------------------------------------------
Test nr pss with Nid2 2 at position 492
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 492, val = 231344100 (41 dB)
[UE] nr_synchro_time: Sync source = 2, Peak found at pos 492, val = 231344100 (41 dB)
Test nr sss with Nid1 111
(phase,Nid1) (0,0), metric_phase 19968 tot_metric 19968, phase_max 0
(phase,Nid1) (0,13), metric_phase 22016 tot_metric 22016, phase_max 0
(phase,Nid1) (0,109), metric_phase 23040 tot_metric 23040, phase_max 0
(phase,Nid1) (0,117), metric_phase 26112 tot_metric 26112, phase_max 0
(phase,Nid1) (0,124), metric_phase 37376 tot_metric 37376, phase_max 0
(phase,Nid1) (0,161), metric_phase 42496 tot_metric 42496, phase_max 0
(phase,Nid1) (0,170), metric_phase 43520 tot_metric 43520, phase_max 0
(phase,Nid1) (0,210), metric_phase 45568 tot_metric 45568, phase_max 0
(phase,Nid1) (1,111), metric_phase 62464 tot_metric 62464, phase_max 1
(phase,Nid1) (2,111), metric_phase 327680 tot_metric 327680, phase_max 2
(phase,Nid1) (3,111), metric_phase 511488 tot_metric 511488, phase_max 3
(phase,Nid1) (4,111), metric_phase 651264 tot_metric 651264, phase_max 4
(phase,Nid1) (5,111), metric_phase 770048 tot_metric 770048, phase_max 5
Nid2 2 Nid1 111 tot_metric 770048, phase_max 5
SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 492 Nid1 111 Nid2 2
------------------------------------------------
Test nr pss with Nid2 2 at position 493
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 492, val = 229165600 (41 dB)
[UE] nr_synchro_time: Sync source = 2, Peak found at pos 492, val = 229165600 (41 dB)
Test nr sss with Nid1 111
(phase,Nid1) (0,0), metric_phase 19968 tot_metric 19968, phase_max 0
(phase,Nid1) (0,13), metric_phase 22016 tot_metric 22016, phase_max 0
(phase,Nid1) (0,109), metric_phase 23040 tot_metric 23040, phase_max 0
(phase,Nid1) (0,117), metric_phase 26112 tot_metric 26112, phase_max 0
(phase,Nid1) (0,124), metric_phase 37376 tot_metric 37376, phase_max 0
(phase,Nid1) (0,161), metric_phase 42496 tot_metric 42496, phase_max 0
(phase,Nid1) (0,170), metric_phase 43520 tot_metric 43520, phase_max 0
(phase,Nid1) (0,210), metric_phase 45568 tot_metric 45568, phase_max 0
(phase,Nid1) (1,111), metric_phase 62464 tot_metric 62464, phase_max 1
(phase,Nid1) (2,111), metric_phase 327680 tot_metric 327680, phase_max 2
(phase,Nid1) (3,111), metric_phase 511488 tot_metric 511488, phase_max 3
(phase,Nid1) (4,111), metric_phase 651264 tot_metric 651264, phase_max 4
(phase,Nid1) (5,111), metric_phase 770048 tot_metric 770048, phase_max 5
Nid2 2 Nid1 111 tot_metric 770048, phase_max 5
SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 493 Nid1 111 Nid2 2
------------------------------------------------
Test nr pss with Nid2 2 at position 56788
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 56788, val = 231344100 (41 dB)
[UE] nr_synchro_time: Sync source = 2, Peak found at pos 56788, val = 231344100 (41 dB)
Test nr sss with Nid1 111
(phase,Nid1) (0,0), metric_phase 19968 tot_metric 19968, phase_max 0
(phase,Nid1) (0,13), metric_phase 22016 tot_metric 22016, phase_max 0
(phase,Nid1) (0,109), metric_phase 23040 tot_metric 23040, phase_max 0
(phase,Nid1) (0,117), metric_phase 26112 tot_metric 26112, phase_max 0
(phase,Nid1) (0,124), metric_phase 37376 tot_metric 37376, phase_max 0
(phase,Nid1) (0,161), metric_phase 42496 tot_metric 42496, phase_max 0
(phase,Nid1) (0,170), metric_phase 43520 tot_metric 43520, phase_max 0
(phase,Nid1) (0,210), metric_phase 45568 tot_metric 45568, phase_max 0
(phase,Nid1) (1,111), metric_phase 62464 tot_metric 62464, phase_max 1
(phase,Nid1) (2,111), metric_phase 327680 tot_metric 327680, phase_max 2
(phase,Nid1) (3,111), metric_phase 511488 tot_metric 511488, phase_max 3
(phase,Nid1) (4,111), metric_phase 651264 tot_metric 651264, phase_max 4
(phase,Nid1) (5,111), metric_phase 770048 tot_metric 770048, phase_max 5
Nid2 2 Nid1 111 tot_metric 770048, phase_max 5
SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 56788 Nid1 111 Nid2 2
------------------------------------------------
Test nr pss with Nid2 2 at position 111111
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 111112, val = 229601794 (41 dB)
[UE] nr_synchro_time: Sync source = 2, Peak found at pos 111112, val = 229601794 (41 dB)
Test nr sss with Nid1 111
(phase,Nid1) (0,0), metric_phase 19968 tot_metric 19968, phase_max 0
(phase,Nid1) (0,13), metric_phase 22016 tot_metric 22016, phase_max 0
(phase,Nid1) (0,109), metric_phase 23040 tot_metric 23040, phase_max 0
(phase,Nid1) (0,117), metric_phase 26112 tot_metric 26112, phase_max 0
(phase,Nid1) (0,124), metric_phase 37376 tot_metric 37376, phase_max 0
(phase,Nid1) (0,161), metric_phase 42496 tot_metric 42496, phase_max 0
(phase,Nid1) (0,170), metric_phase 43520 tot_metric 43520, phase_max 0
(phase,Nid1) (0,210), metric_phase 45568 tot_metric 45568, phase_max 0
(phase,Nid1) (1,111), metric_phase 62464 tot_metric 62464, phase_max 1
(phase,Nid1) (2,111), metric_phase 327680 tot_metric 327680, phase_max 2
(phase,Nid1) (3,111), metric_phase 511488 tot_metric 511488, phase_max 3
(phase,Nid1) (4,111), metric_phase 651264 tot_metric 651264, phase_max 4
(phase,Nid1) (5,111), metric_phase 770048 tot_metric 770048, phase_max 5
Nid2 2 Nid1 111 tot_metric 770048, phase_max 5
SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 111111 Nid1 111 Nid2 2
------------------------------------------------
Test nr pss with Nid2 2 at position 222222
[PHY][I][pss_search_time_nr] [UE] nr_synchro_time: Sync source = 2, Peak found at pos 222224, val = 219559301 (41 dB)
[UE] nr_synchro_time: Sync source = 2, Peak found at pos 222224, val = 219559301 (41 dB)
Test nr sss with Nid1 111
(phase,Nid1) (0,0), metric_phase 19968 tot_metric 19968, phase_max 0
(phase,Nid1) (0,13), metric_phase 22016 tot_metric 22016, phase_max 0
(phase,Nid1) (0,109), metric_phase 23040 tot_metric 23040, phase_max 0
(phase,Nid1) (0,117), metric_phase 26112 tot_metric 26112, phase_max 0
(phase,Nid1) (0,124), metric_phase 37376 tot_metric 37376, phase_max 0
(phase,Nid1) (0,161), metric_phase 42496 tot_metric 42496, phase_max 0
(phase,Nid1) (0,170), metric_phase 43520 tot_metric 43520, phase_max 0
(phase,Nid1) (0,210), metric_phase 45568 tot_metric 45568, phase_max 0
(phase,Nid1) (1,111), metric_phase 62464 tot_metric 62464, phase_max 1
(phase,Nid1) (2,111), metric_phase 327680 tot_metric 327680, phase_max 2
(phase,Nid1) (3,111), metric_phase 511488 tot_metric 511488, phase_max 3
(phase,Nid1) (4,111), metric_phase 651264 tot_metric 651264, phase_max 4
(phase,Nid1) (5,111), metric_phase 770048 tot_metric 770048, phase_max 5
Nid2 2 Nid1 111 tot_metric 770048, phase_max 5
SSS NR Test is pass with warning due to phase difference 5 (instead of 3) offset 222222 Nid1 111 Nid2 2
SSS NR Number of tests : 36 Pass : 0 Pass with warning : 36 Fail : 0
SSS NR Synchronisaton test is terminated.
#!/bin/bash
#
# Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The OpenAirInterface Software Alliance licenses this file to You under
# the OAI Public License, Version 1.1 (the "License"); you may not use this file
# except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.openairinterface.org/?page_id=698
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#-------------------------------------------------------------------------------
# For more information about the OpenAirInterface (OAI) Software Alliance:
# contact@openairinterface.org
#
#----------------------
# File: run_tests.sh
#----------------------
# Description: script batch for:
# - building tests
# - executing tests
# - checking output files with reference files.
# ./run_test to build/run and check all tests
# -b no build
# -e no execution
# -c no check
# -m no run of meld
# an alone specific test can be executed ./run_tests test_name
#----------------------------------------------------------------------------
# CONFIGURATION
# files and directories
WORK_DIR="openair1/SIMULATION/NR_UE_PHY/unit_tests/build"
OAIENV_DIR="../../../../.."
EXECUTABLE_DIR="."
REFERENCE_DIR="./reflogs"
RESULT_TEST_FILE=""
RESULT_DIR="./testlogs"
BROWSER="firefox"
#----------------------------------------------------------------------------
# For building and executing test application
BUILD_TEST="yes"
CHECK_TEST="yes"
EXECUTE_TEST="yes"
SINGLE_TEST="no"
RUN_MELD="yes"
# for removing files
REMOVE="rm -f"
COMPARE="cmp"
TESTS_RUN=0
TESTS_PASS=0
TESTS_FAIL=0
#----------------------------------------------------------------------------
# List of tests
tst_files="
pss_test
sss_test
pbch_test
srs_test
frame_config_test
harq_test
pucch_uci_test"
#---------------------------------------------------------------------------
# manage input parameters
while [ $# != "0" ]
do
case $1 in
-b)
echo "No build of unit test"
BUILD_TEST="no"
;;
-e)
echo "No execution of unit test"
EXECUTE_TEST="no"
;;
-c)
echo "No check of unit test"
CHECK_TEST="no"
;;
-m)
echo "No run of meld tool"
RUN_MELD="no"
;;
-h)
echo "Option of run_test script"
echo "-b : No Build of unit tests"
echo "-c : No check for unit test"
echo "-e : No run of unit tests"
echo "-m : No run of meld tool"
exit
BUILD_TEST="no"
CHECK_TEST="no"
EXECUTE_TEST="no"
;;
*)
for file in $tst_files
do
if [ $file == $1 ]
then
SINGLE_TEST="yes"
TEST=$1
echo "Single test $TEST"
fi
done
if [ $SINGLE_TEST == "no" ]
then
echo "Unknown parameter $1"
BUILD_TEST="no"
CHECK_TEST="no"
EXECUTE_TEST="no"
exit
fi
;;
esac
# shift of input parameter (excluding $0 ) $1 <- $2 <- $3 ...
# $# is decrement by shift
shift
done
#--------------------------------------------------------------------------------------------
# RUN AND CHECK RESULTS
numberDisplayFilesDifferencies=0
let MAX_NUMBER_DISPLAY_FILES_DIFFERENCES=8
num_diff=0
if [ $EXECUTE_TEST == "yes" ]
then
mkdir $RESULT_DIR
fi
if [ $BUILD_TEST == "yes" ]
then
if [ $SINGLE_TEST == "no" ]
then
echo "cd $OAIENV_DIR"
cd $OAIENV_DIR
echo "source oaienv"
source oaienv
echo "cd $WORK_DIR"
cd $WORK_DIR
echo "cmake CMakeLists.txt"
cmake CMakeLists.txt
echo -e "make clean\n"
#make clean
fi
fi
if [ $CHECK_TEST == "yes" ]
then
echo "Display differencies for a maximum of "$MAX_NUMBER_DISPLAY_FILES_DIFFERENCES" files"
fi
for file in $tst_files
do
if [ $SINGLE_TEST == "yes" ]
then
file=$TEST
fi
echo "Test : $file"
RESULT_TEST_FILE="$file.txt"
# build executable
if [ $BUILD_TEST == "yes" ]
then
echo -e "make $file\n"
make $file
fi
if [ $EXECUTE_TEST == "yes" ]
then
echo "rm $RESULT_DIR/$RESULT_TEST_FILE"
rm $RESULT_DIR/$RESULT_TEST_FILE
echo "$EXECUTABLE_DIR/$file > $RESULT_DIR/$RESULT_TEST_FILE"
$EXECUTABLE_DIR/$file > $RESULT_DIR/$RESULT_TEST_FILE
TESTS_RUN=$((TESTS_RUN+1))
fi
if [ $CHECK_TEST == "yes" ]
then
# check if there is already a reference file
if [ -f "$REFERENCE_DIR/$RESULT_TEST_FILE" ]
then
echo File "$REFERENCE_DIR/$RESULT_TEST_FILE" exists
$COMPARE $RESULT_DIR/$RESULT_TEST_FILE $REFERENCE_DIR/$RESULT_TEST_FILE > /dev/null 2>&1
if [ $? == 0 ]
then
echo "Test $file is PASS"
echo "Same logging file for $file"
TESTS_PASS=$((TESTS_PASS+1))
else
echo "Test $file is FAIL"
TESTS_FAIL=$((TESTS_FAIL+1))
echo "Difference of logging file for scenario $file"
let "num_diff=$num_diff + 1"
if [ $RUN_MELD == "yes" ]
then
meld $RESULT_DIR/$RESULT_TEST_FILE $REFERENCE_DIR/$RESULT_TEST_FILE &
let "numberDisplayFilesDifferencies=$numberDisplayFilesDifferencies + 1"
echo "Meld number "$numberDisplayFilesDifferencies
if [ $numberDisplayFilesDifferencies = $MAX_NUMBER_DISPLAY_FILES_DIFFERENCES ]
then
echo "###### ERROR ###### ERROR ###### ERROR ###### ERROR ###### ERROR ###### ERROR ######"
echo "=> ERROR Test aborted because there are already $MAX_NUMBER_DISPLAY_FILES_DIFFERENCES detected logging files which are different"
break
fi
fi
fi
else
echo "No reference file for test $file"
fi
fi
if [ $SINGLE_TEST == "yes" ]
then
echo "Test $file has been executed"
break
fi
done
if [ $CHECK_TEST == "yes" ]
then
echo "There are $num_diff result files which are different"
fi
echo " tests run : $TESTS_RUN pass : $TESTS_PASS fail : $TESTS_FAIL"
# end of script
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
File: /home/jacques/workspace/oai_openairinterface/openairinterface5g/openair1/SIMULATION/NR_UE_PHY/unit_tests/README.txt
This directory contains testbenchs for 5G NR physical layers.
Before building unit tests, full UE build should be done before (maily for asn1 dependencies):
Initialise environment:
- under openairinterface5g enter >source oaienv
Install tools:
- under openairinterface5g/cmake_targets/build -I
Build NR UE:
- under openairinterface5g/cmake_targets/build --nrUE
Specific test files
====================
pss_test.c: test for detection of primary synchronisation signal.
sss_test.c: test for detection of secundary synchronisation signal.
pbch_test.c: test for decoding of packet braodcast channel.
srs_test.c: test of sounding reference signal.
frame_config_test.c : test of frame configurations (FDD/TDD).
harq_test.c : test of HARQ downlink and uplink.
pucch_uci_test : test of packed Uplink Control Channel Uplink Control Information
pss_util_test.c: common functions for running synchronisation tests.
pss_util_test.h: common headers for synchronisation tests.
input_buffer_test.h: it allows providing samples for pss test.
How to build & run tests
========================
Before building, oai environment should be set by entering under directory openairinterface5g "source oaienv".
A script "run_tests.sh" allows to build, to run and to check all tests.
To run a complete non regression of unit tests, go under directory NR_UE_PHY/unit_tests/build and execute:
./run_tests.sh
This script "run_tests.sh" list all available unit tests.
build is based on cmake tool.
cmake file is "/openairinterface5g/openair1/SIMULATION/NR_UE_PHY/unit_tests/build/CMakeList.txt".
CMakeList.txt lists different build.
How to build: in directory "oai_openairinterface/openairinterface5g/openair1/SIMULATION/NR_UE_PHY/unit_tests/build/", below commands should be entered:
First command to do:
cmake CMakeList.txt -> it generates makefiles to build all projects.
Then build of test:
make pss_test -> build pss_test: detection of NR (Primary Synchronisation Channel - synchronisation of UE).
make sss_test -> build sss_test: detection of NR SSS (Secundary Synchronisation Channel - second step for UE synchronisation).
make pbch_test -> build pbch_test: decoding of NR PBCH (Packet Broadcast Channel -> UE read MIB Master Information Block which gives network parameters).
make frame_config_test -> build frame_config_test: NR FDD/TDD configuration.
make srs_test -> build srs_test: Sounding Reference Signals are transmitted by UE to the network which can use them for channel estimations.
make harq_test -> build harq_test: Hybrid Repeat Request Acknowledgment: mecanism to acknowledge transmitted and received transport blocks.
make pucch_uci_test -> build pucch_uci_test : Packet Uplink Control Channel / Uplink Control information : create UCI payload and select PUCCH formats and its parameters.
make clean -> clean all projects.
And execution of tests:
./pss_test -> run NR PSS tests.
./sss_test -> run NR SSS tests.
./pbch_test -> run NR PBCH tests.
./srs_test -> run NR srs tests.
./frame_config_test -> run NR frame configuration tests.
./harq_test -> run NR HARQ downlink and uplink tests.
./pucch_uci_test -> run NR PUCCH UCI tests.
There is a script in build/run_test.sh which allows:
- building/running/checking all tests
What is test result?
====================
Test verdict consists in a comparaison of generated logging file at execution with a reference logging file which is stored under git for each test.
By default, tool "meld" is open each time there is a difference between reference file and logging file.
It is possible to disable execution of meld with option -m.
Build/execute only one test:
===========================
The script "run_tests.sh" has different options:
"-b : No Build of unit tests"
"-c : No check for unit test"
"-e : No execution of unit tests"
"-m : No run of meld tool"
./run_tests.sh -> run all unit tests (build, execute and compare for each test)
./run_tests.sh -m -> run all unit tests but meld is not used (verdict is based on system command "cmp").
./run_tests.sh -b -c -r -m -> list all available unit tests
./run_tests.sh pss_test -> run only one test (here it is pss_test).
./run_tests.sh -c -e -m pss_test -> build only one test
./run_tests.sh -m pss_test -> run only one test but without execution of meld
Which processing can be tuned?
=============================
Decimation feature:
By default pss processing uses samples from received buffer at input sampling frequency fs.
For saving processing time, it is possible that pss uses a decimation of input signal.
To enable decimation file openairinterface5g_bis/openairinterface5g/openair1/PHY/NR_REFSIG/pss_nr.h should be modified.
//#define PSS_DECIMATOR should be enable to get decimation.
By default, decimation uses a FIR filter.
It is possible to use a CIC (Cascaded Integrated Comb filter) for decimation by enabling line //#define CIC_DECIMATOR.
Input received signal:
Different waveforms can be generated for testing pss and sss detection.
By default, it uses a sinusoidal signals at different frequencies with an amplitude at the same level than pss or sss signals.
For modifying these waveforms, function "set_random_rx_buffer" in file pss_util_test.c has to be modified.
For wavecom type, line data_format = SINUSOIDAL_DATA should be changed with new format.
For amplitude of waveform, declaration have to be modified in the function.
Status
======
NR synchronisation tests run successfully with default parameters.
Warning: Tests of PSS NR with decimation (based on FIR or CIC filter) does not run successfully at the moment.
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*********************************************************************
*
* FILENAME : dummy_functions.c
*
* MODULE : NR UE unit test
*
* DESCRIPTION : it allows to define unused functions for unit tests.
*
************************************************************************/
#include <stddef.h>
#include "../../unit_tests/src/pss_util_test.h"
#include "PHY/types.h"
#include "PHY/defs_gNB.h"
#include "../common/ran_context.h"
#include "../common/config/config_paramdesc.h"
/*****************variables****************************************/
RAN_CONTEXT_t RC;
uint32_t (*p_nr_ue_get_SR)(module_id_t module_idP,int CC_id,frame_t frameP,uint8_t eNB_id,uint16_t rnti, sub_frame_t subframe) = NULL;
/*****************functions****************************************/
lte_subframe_t subframe_select(LTE_DL_FRAME_PARMS *frame_parms,unsigned char subframe)
{
return(0);
}
PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP, int CC_id,
frame_t frameP, uint8_t new_Msg3,
sub_frame_t subframe){ return(NULL);}
void ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
sub_frame_t subframe, uint8_t eNB_index,
uint8_t * ulsch_buffer, uint16_t buflen,
uint8_t * access_mode){}
void Msg1_transmitted(module_id_t module_idP, uint8_t CC_id,
frame_t frameP, uint8_t eNB_id){}
void Msg3_transmitted(module_id_t module_idP, uint8_t CC_id,
frame_t frameP, uint8_t eNB_id){}
uint32_t nr_ue_get_SR(module_id_t module_idP, int CC_id, frame_t frameP,
uint8_t eNB_id, rnti_t rnti, sub_frame_t subframe){
uint32_t value = 0;
if (p_nr_ue_get_SR != NULL)
{
value = (p_nr_ue_get_SR)(module_idP, CC_id, frameP, eNB_id, rnti, subframe);
}
return(value);}
void rrc_out_of_sync_ind(module_id_t Mod_idP, frame_t frameP, uint16_t eNB_index)
{}
UE_L2_STATE_t ue_scheduler(const module_id_t module_idP,
const frame_t rxFrameP,
const sub_frame_t rxSubframe,
const frame_t txFrameP,
const sub_frame_t txSubframe,
const lte_subframe_t direction,
const uint8_t eNB_index, const int CC_id){ return(0);}
void ue_decode_p(module_id_t module_idP, int CC_id, frame_t frame,
uint8_t CH_index, void *pdu, uint16_t len){}
void ue_decode_si(module_id_t module_idP, int CC_id, frame_t frame,
uint8_t CH_index, void *pdu, uint16_t len){}
void ue_send_sdu(module_id_t module_idP, uint8_t CC_id, frame_t frame,
sub_frame_t subframe, uint8_t * sdu, uint16_t sdu_len,
uint8_t CH_index){}
uint16_t
ue_process_rar(const module_id_t module_idP,
const int CC_id,
const frame_t frameP,
const rnti_t ra_rnti,
uint8_t * const dlsch_buffer,
rnti_t * const t_crnti,
const uint8_t preamble_index,
uint8_t * selected_rar_buffer){ return(0);}
void ue_send_mch_sdu(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
uint8_t * sdu, uint16_t sdu_len, uint8_t eNB_index,
uint8_t sync_area){}
int ue_query_mch(module_id_t Mod_id, uint8_t CC_id, uint32_t frame,
sub_frame_t subframe, uint8_t eNB_index,
uint8_t * sync_area, uint8_t * mcch_active){ return(0);}
int ue_query_mch_fembms(module_id_t Mod_id, uint8_t CC_id, uint32_t frame,
sub_frame_t subframe, uint8_t eNB_index,
uint8_t * sync_area, uint8_t * mcch_active){ return(0);}
void dl_phy_sync_success(module_id_t module_idP,
frame_t frameP,
unsigned char eNB_index, uint8_t first_sync){}
uint64_t from_nrarfcn(int nr_bandP, uint32_t dl_nrarfcn) { return(0);}
int32_t get_uldl_offset(int nr_bandP) { return(0);}
IF_Module_t *IF_Module_init(int Mod_id) { return(NULL);}
int8_t get_Po_NOMINAL_PUSCH(module_id_t module_idP, uint8_t CC_id) { return(0);}
int8_t get_deltaP_rampup(module_id_t module_idP, uint8_t CC_id) { return(0);}
void thread_top_init(char *thread_name,
int affinity,
uint64_t runtime,
uint64_t deadline,
uint64_t period) {}
int oai_nfapi_hi_dci0_req(nfapi_hi_dci0_request_t *hi_dci0_req) { return(0);}
int oai_nfapi_tx_req(nfapi_tx_request_t *tx_req) { return(0); }
int oai_nfapi_dl_tti_req(nfapi_nr_dl_tti_request_t *dl_config_req) { return(0); }
int oai_nfapi_tx_data_req(nfapi_nr_tx_data_request_t *tx_data_req){ return(0); }
int oai_nfapi_ul_dci_req(nfapi_nr_ul_dci_request_t *ul_dci_req){ return(0); }
int oai_nfapi_ul_tti_req(nfapi_nr_ul_tti_request_t *ul_tti_req){ return(0); }
int oai_nfapi_nr_rx_data_indication(nfapi_nr_rx_data_indication_t *ind) { return(0); }
int oai_nfapi_nr_crc_indication(nfapi_nr_crc_indication_t *ind) { return(0); }
int oai_nfapi_nr_srs_indication(nfapi_nr_srs_indication_t *ind) { return(0); }
int oai_nfapi_nr_uci_indication(nfapi_nr_uci_indication_t *ind) { return(0); }
int oai_nfapi_nr_rach_indication(nfapi_nr_rach_indication_t *ind) { return(0); }
int oai_nfapi_dl_config_req(nfapi_dl_config_request_t *dl_config_req) { return(0); }
int oai_nfapi_ul_config_req(nfapi_ul_config_request_t *ul_config_req) { return(0); }
static int step_log = 0;
const char log_first[] = "debug";
const char log_second[] = "full";
const char log_default[] = " ";
int config_get(paramdef_t *params,int numparams, char *prefix)
{
#define MAX_STRING_SIZE (255)
char *p_log;
for (int i=0; i < numparams; i++)
{
switch(step_log)
{
case 1:
p_log = log_first;
params[i].strptr = calloc(1, MAX_STRING_SIZE);
*(params[i].strptr) = p_log;
break;
case 2:
p_log = log_first;
params[i].strptr = calloc(1, MAX_STRING_SIZE);
*(params[i].strptr) = p_log;
break;
case 3:
params[i].uptr = calloc(1, sizeof(int));
*(params[i].uptr) = 0;
break;
default:
p_log = log_default;
params[i].strptr = calloc(1, MAX_STRING_SIZE);
*(params[i].strptr) = p_log;
break;
}
}
step_log++;
return(0);
}
unsigned int taus(void) { return (0); }
typedef int loader_shlibfunc_t;
int load_module_shlib(char *modname,loader_shlibfunc_t *farray, int numf) { return(0); }
void * get_shlibmodule_fptr(char *modname, char *fname) { return(NULL) ; }
/*void exit_fun (const char *s) {
VOID_PARAMETER s;
undefined_function(__FUNCTION__);
}*/
uint32_t ue_get_SR(module_id_t module_idP, int CC_id, frame_t frameP,
uint8_t eNB_id, rnti_t rnti, sub_frame_t subframe){
uint32_t value = 0;
return(value);
}
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/**********************************************************************
*
* FILENAME : frame_config_test.c
*
* MODULE : UE test bench for tdd configuration
*
* DESCRIPTION : it allows unitary tests for tdd configuration
*
************************************************************************/
#include "../../unit_tests/src/pss_util_test.h"
#include "PHY/defs_nr_UE.h"
#include "PHY/INIT/init_extern.h"
#include "PHY/phy_extern_nr_ue.h"
#include "SCHED_NR_UE/phy_frame_config_nr.h"
/*******************************************************************
*
* NAME : display_frame_configuration
*
* PARAMETERS : none
*
* RETURN : none
*
* DESCRIPTION : display uplink & downlink configuration
*
*********************************************************************/
void display_frame_configuration(NR_DL_FRAME_PARMS *frame_parms) {
printf("\nTdd configuration tti %d downlink %d uplink %d period %d \n", frame_parms->slots_per_subframe, frame_parms->p_tdd_UL_DL_Configuration->nrofDownlinkSlots,
frame_parms->p_tdd_UL_DL_Configuration->nrofUplinkSlots, frame_parms->p_tdd_UL_DL_Configuration->dl_UL_TransmissionPeriodicity);
int k = NR_NUMBER_OF_SUBFRAMES_PER_FRAME - 1;
int tti = 0;
for (int j = 0; j < frame_parms->slots_per_frame; j++) {
int frame = 0;
if (j != 0) {
frame = j / frame_parms->slots_per_frame;
tti = j % frame_parms->slots_per_frame;
}
else {
frame = 0;
tti = 0;
}
if (slot_select_nr(frame_parms, frame, tti) & NR_DOWNLINK_SLOT) {
printf(" [%3d] D", j);
}
else {
if (slot_select_nr(frame_parms, frame, tti) & NR_UPLINK_SLOT) {
printf(" [%3d] U", j);
}
else {
printf("Error test_frame_configuration: unexpected value \n");
assert(0);
}
}
if (j == k) {
printf("\n");
k += NR_NUMBER_OF_SUBFRAMES_PER_FRAME;
}
}
printf("\n");
}
/*******************************************************************
*
* NAME : set_tti_test
*
* PARAMETERS : none
*
* RETURN : none
*
* DESCRIPTION : set tti
*
*********************************************************************/
void set_tti_test(NR_DL_FRAME_PARMS *frame_parms, int slots_per_subframe)
{
frame_parms->slots_per_subframe = slots_per_subframe;
frame_parms->slots_per_frame = slots_per_subframe * NR_NUMBER_OF_SUBFRAMES_PER_FRAME;
}
/*******************************************************************
*
* NAME : test_frame_configuration
*
* PARAMETERS : none
*
* RETURN : none
*
* DESCRIPTION : test of frame configuration feature
*
*********************************************************************/
int test_frame_configuration(PHY_VARS_NR_UE *PHY_vars_UE)
{
NR_DL_FRAME_PARMS *frame_parms = &(PHY_vars_UE->frame_parms);
int v_return = 0;
#define NO_DOWNLINK_SYMBOL (0)
#define NO_UPLINK_SYMBOL (0)
#define TTI_DEFAULT (2)
#define DL_SLOT_DEFAULT (4)
#define UL_SLOT_DEFAULT (1)
#define TDD_PERIODICITY_DEFAULT (ms2p5)
#define TDD_WRONG_CONFIG_TEST (3)
#define TDD_GOOD_CONFIG_TEST (18)
#define TDD_CONFIG_TEST (TDD_WRONG_CONFIG_TEST + TDD_GOOD_CONFIG_TEST)
/* this array allows setting different tdd configurations */
/* it defines number of tti (slot) per subframe, number of downlink slots, number of uplink slots */
/* and a period of the configuration */
/* first configurations (wrong) shall be fired error because they are not correct */
/* other configurations (good) are correct and they do not generate any error */
/* there is a tdd configuration for each line */
uint16_t TDD_configuration[TDD_CONFIG_TEST][4] = {
/* tti per subframe SLOT_DL SLOT_UL period */
{ 2, 4+1, 1, ms2p5 },
{ 2, 4, 1+1, ms2p5 },
{ 2, 4, 1, ms0p5 },
{ 1, 1, 1, ms2 },
{ 1, 4, 1, ms5 },
{ 1, 9, 1, ms10 },
{ 2, 1, 1, ms1 },
{ 2, 3, 1, ms2 },
{ 2, 4, 1, ms2p5 },
{ 2, 9, 1, ms5 },
{ 2, 19, 1, ms10 },
{ 4, 1, 1, ms0p5 },
{ 4, 3, 1, ms1 },
{ 4, 4, 1, ms1p25 },
{ 4, 7, 1, ms2 },
{ 4, 9, 1, ms2p5 },
{ 4, 19, 1, ms5 },
{ 4, 38, 2, ms10 },
{ 8, 4, 1, ms0p625 },
{ 16, 7, 1, ms0p5 },
{ TTI_DEFAULT, DL_SLOT_DEFAULT, UL_SLOT_DEFAULT, TDD_PERIODICITY_DEFAULT },
};
#define TDD_WRONG_DEDICATED_CONFIG_TEST (7)
#define TDD_GOOD_DEDICATED_CONFIG_TEST (18)
#define TDD_DEDICATED_CONFIG_TEST (TDD_WRONG_DEDICATED_CONFIG_TEST + TDD_GOOD_DEDICATED_CONFIG_TEST)
/* this array allows setting different tdd dedicated configurations */
/* tdd dedicated configuration overwrite current tdd confirguration for specified slot number */
/* it defines slot number to modify, then with a bit map number of downlink symbol, number of uplink symbols */
/* if next slot is set to 0 means that there is no additional slot to modify with current dedicated configuration */
/* if next slot is set to 1 means that there is an additional slot to mdofy with current dedicated configuration */
/* so tdd dedicated configuration can be composed of only 1 lines (for 1 slot) or several lines for several slots */
/* first dedictaed configurations (wrong) shall be fired errors because they are not correct */
/* other dedicated configurations (good) are correct and they do not generate any error */
uint16_t TDD_dedicated_config[TDD_DEDICATED_CONFIG_TEST][4] = {
/* slot number SLOT_DL SLOT_UL next slot */
{ 0, 1, 1, 0 },
{ 0, 0, 1, 0 },
{ 40, 0, NR_TDD_SET_ALL_SYMBOLS, 0 },
{ 0, NR_TDD_SET_ALL_SYMBOLS, NR_TDD_SET_ALL_SYMBOLS, 0 },
{ 0, 0, 0, 0 },
{ 0, 0, NR_TDD_SET_ALL_SYMBOLS, 1 },
{ 0, 0, 0, 0 },
{ 0, NR_TDD_SET_ALL_SYMBOLS, 0, 0 },
{ 0, 0, NR_TDD_SET_ALL_SYMBOLS, 1 },
{ 5, 0, NR_TDD_SET_ALL_SYMBOLS, 1 },
{ 10, 0, NR_TDD_SET_ALL_SYMBOLS, 1 },
{ 15, 0, NR_TDD_SET_ALL_SYMBOLS, 1 },
{ 20, 0, NR_TDD_SET_ALL_SYMBOLS, 1 },
{ 25, 0, NR_TDD_SET_ALL_SYMBOLS, 1 },
{ 30, 0, NR_TDD_SET_ALL_SYMBOLS, 1 },
{ 35, 0, NR_TDD_SET_ALL_SYMBOLS, 1 },
{ 4, NR_TDD_SET_ALL_SYMBOLS, 0, 1 },
{ 9, NR_TDD_SET_ALL_SYMBOLS, 0, 1 },
{ 14, NR_TDD_SET_ALL_SYMBOLS, 0, 1 },
{ 19, NR_TDD_SET_ALL_SYMBOLS, 0, 1 },
{ 19, NR_TDD_SET_ALL_SYMBOLS, 0, 1 },
{ 24, NR_TDD_SET_ALL_SYMBOLS, 0, 1 },
{ 29, NR_TDD_SET_ALL_SYMBOLS, 0, 1 },
{ 34, NR_TDD_SET_ALL_SYMBOLS, 0, 1 },
{ 39, NR_TDD_SET_ALL_SYMBOLS, 0, 0 },
};
/* TEST wrong and good tdd configurations starting by wrong ones */
int return_status = -1;
for (int i = 0; i < TDD_CONFIG_TEST; i++) {
if (i == TDD_WRONG_CONFIG_TEST) {
return_status = 0; /* status should be fine for fine configurations */
}
set_tti_test(frame_parms, TDD_configuration[i][0]);
if (set_tdd_config_nr(frame_parms, TDD_configuration[i][3], TDD_configuration[i][1], NO_DOWNLINK_SYMBOL,
TDD_configuration[i][2], NO_UPLINK_SYMBOL) != return_status) {
v_return = (-1);
}
display_frame_configuration(frame_parms);
free_tdd_configuration_nr(frame_parms);
}
/* set default configuration */
set_tti_test(frame_parms, TTI_DEFAULT);
if (set_tdd_config_nr(frame_parms, TDD_PERIODICITY_DEFAULT, DL_SLOT_DEFAULT, NO_DOWNLINK_SYMBOL, UL_SLOT_DEFAULT, NO_UPLINK_SYMBOL) != 0) {
v_return = (-1);
}
/* TEST wrong and good tdd dedicated configurations starting by wrong ones */
return_status = (-1);
for (int i = 0; i < TDD_DEDICATED_CONFIG_TEST; i++) {
bool next = false;
do {
if (i == TDD_WRONG_DEDICATED_CONFIG_TEST) {
return_status = 0; /* status should be fine for fine configurations */
}
add_tdd_dedicated_configuration_nr( frame_parms, TDD_dedicated_config[i][0], TDD_dedicated_config[i][1], TDD_dedicated_config[i][2]);
if (TDD_dedicated_config[i][3] == 1) {
next = true;
i = i + 1;
}
else {
next = false;
}
} while (next);
if (set_tdd_configuration_dedicated_nr(frame_parms) != return_status) {
v_return = (-1);
}
if (return_status == 0) {
display_frame_configuration(frame_parms);
}
free_tdd_configuration_dedicated_nr(frame_parms);
}
free_tdd_configuration_nr(frame_parms);
return (v_return);
}
/*******************************************************************
*
* NAME : main
*
* DESCRIPTION : test of tdd configuration
*
*********************************************************************/
int main(int argc, char *argv[])
{
uint8_t transmission_mode = 1;
uint8_t nb_antennas_tx = 1;
uint8_t nb_antennas_rx = 1;
uint8_t frame_type = FDD;
int N_RB_DL=100;
lte_prefix_type_t extended_prefix_flag = NORMAL;
int Nid_cell[] = {(3*0+0)};
VOID_PARAMETER argc;
VOID_PARAMETER argv;
printf(" FRAME CONFIGURATION TEST \n");
printf("--------------------------\n");
if (init_test(nb_antennas_tx, nb_antennas_rx, transmission_mode, extended_prefix_flag, frame_type, Nid_cell[0], N_RB_DL) != 0) {
printf("Initialisation problem for frame configuration test \n");
exit(-1);;
}
if (test_frame_configuration(PHY_vars_UE) != 0) {
printf("Test NR FRAME CONFIGURATION is fail \n");
}
else {
printf("Test NR FRAME CONFIGURATION is pass \n");
}
lte_sync_time_free();
free_context_synchro_nr();
return(0);
}
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/**********************************************************************
*
* FILENAME : harq_test.c
*
* MODULE : UE test bench for hard (hybrid repeat request acknowledgment)
*
* DESCRIPTION : it allows unitary tests for downlink harq
*
************************************************************************/
#include "../../unit_tests/src/pss_util_test.h"
#include "PHY/defs_nr_UE.h"
#include "PHY/INIT/init_extern.h"
#include "PHY/phy_extern_nr_ue.h"
#include "SCHED_NR_UE/harq_nr.h"
//#include "PHY/vars.h"
//#include "LAYER2/MAC/vars.h"
/*******************************************************************
*
* NAME : test_harq_downlink
*
* PARAMETERS : none
*
* RETURN : none
*
* DESCRIPTION : test of HARQ downlink feature
*
*********************************************************************/
int test_harq_downlink(PHY_VARS_NR_UE *phy_vars_ue)
{
int gNB_id = 0;
int harq_pid = 0;
int ndi = 1;
uint8_t rnti_type = TYPE_C_RNTI_;
int number_steps = 5;
int thread_number = 0;
int TB_identifier = 0;
printf("\nHARQ Downlink \n");
config_downlink_harq_process(phy_vars_ue , gNB_id, TB_identifier, thread_number, NR_DEFAULT_DLSCH_HARQ_PROCESSES);
NR_DL_UE_HARQ_t *dlsch_harq = phy_vars_ue->dlsch[thread_number][gNB_id][TB_identifier]->harq_processes[harq_pid];
/* reach maximum number of retransmissions */
printf("First sequence ndi does not toggle \n");
for (int i = 0 ; i < number_steps; i++) {
downlink_harq_process(dlsch_harq, harq_pid, ndi, rnti_type);
}
harq_pid++; /* next harq */
dlsch_harq = phy_vars_ue->dlsch[thread_number][gNB_id][TB_identifier]->harq_processes[harq_pid];
/* new grant so new transmission each try */
printf("Second sequence ndi toggle each transmission \n");
for (int i = 0 ; i < number_steps; i++) {
downlink_harq_process(dlsch_harq, harq_pid, ndi, rnti_type);
ndi ^= 1; /* toogle ndi each try */
}
harq_pid++; /* next harq */
dlsch_harq = phy_vars_ue->dlsch[thread_number][gNB_id][TB_identifier]->harq_processes[harq_pid];
/* new grant so new transmission each try */
printf("Third sequence ndi toggle each two transmissions \n");
for (int i = 0 ; i < number_steps; i++) {
downlink_harq_process(dlsch_harq, harq_pid, ndi, rnti_type);
if (i & 0x1) {
ndi ^= 1; /* toogle ndi each try */
}
}
release_downlink_harq_process(phy_vars_ue , gNB_id, TB_identifier, thread_number);
return 0;
}
/*******************************************************************
*
* NAME : test_harq
*
* PARAMETERS : none
*
* RETURN : none
*
* DESCRIPTION : test of HARQ feature
*
*********************************************************************/
int test_harq(PHY_VARS_NR_UE *phy_vars_ue)
{
int result = -1;
result = test_harq_downlink(phy_vars_ue);
return (result);
}
/*******************************************************************
*
* NAME : main
*
* DESCRIPTION : test of downlink harq entities
*
*********************************************************************/
int main(int argc, char *argv[])
{
VOID_PARAMETER argc;
VOID_PARAMETER argv;
uint8_t transmission_mode = 1;
uint8_t nb_antennas_tx = 1;
uint8_t nb_antennas_rx = 1;
uint8_t frame_type = FDD;
int N_RB_DL=100;
lte_prefix_type_t extended_prefix_flag = NORMAL;
int Nid_cell[] = {(3*0+0)};
VOID_PARAMETER argc;
VOID_PARAMETER argv;
printf(" HARQ TEST \n");
printf("----------\n");
if (init_test(nb_antennas_tx, nb_antennas_rx, transmission_mode, extended_prefix_flag, frame_type, Nid_cell[0], N_RB_DL) != 0) {
printf("Initialisation problem for harq test \n");
exit(-1);;
}
if (test_harq(PHY_vars_UE) != 0) {
printf("Test NR HARQ is fail \n");
}
else {
printf("Test NR HARQ is pass \n");
}
free_context_synchro_nr();
return(0);
}
/**********************************************************************
* FILENAME : input_buffer_test
*
* MODULE : test of UE synchronisation
*
* DESCRIPTION : it allows unitary tests of UE synchronisation on host machine
*
************************************************************************/
#ifndef INPUT_BUFFER_H
#define INPUT_BUFFER_H
#ifdef DEFINE_VARIABLES_INPUT_BUFFER_TEST_H
#define EXTERNAL
#define INIT_VARIABLES_INPUT_BUFFER_H
#else
#define EXTERNAL extern
#undef INIT_VARIABLES_INPUT_BUFFER_H
#endif
#ifndef INIT_VARIABLES_INPUT_BUFFER_H
EXTERNAL short input_buffer[]
#else
EXTERNAL short input_buffer[307360] = {0}
#endif /* INIT_VARIABLES_INPUT_BUFFER_H */
;
#undef EXTERNAL
#undef INIT_VARIABLES_INPUT_BUFFER_H
#endif /* INPUT_BUFFER_H */
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/**********************************************************************
*
* FILENAME : pbch_test.c
*
* MODULE : UE test bench for sss tests
*
* DESCRIPTION : it allows unitary tests for SSS on host machine
*
************************************************************************/
#include <stdlib.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <limits.h>
typedef int nfapi_nr_pfcch_commonSearchSpaces_t;
#include "../nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface.h"
#include "PHY/defs_nr_UE.h"
#include "PHY/phy_extern_nr_ue.h"
#include "PHY/INIT/init_extern.h"
#include "PHY/NR_UE_TRANSPORT/nr_transport_ue.h"
#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
#include "PHY/NR_REFSIG/ss_pbch_nr.h"
#include "PHY/NR_REFSIG/pss_nr.h"
#include "PHY/NR_REFSIG/sss_nr.h"
#include "PHY/NR_REFSIG/dmrs_nr.h"
#include "../../unit_tests/src/pss_util_test.h"
/************** EXTERNAL ******************************************/
extern int pbch_detection(PHY_VARS_NR_UE *ue, runmode_t mode);
/*******************************************************************
*
* NAME : test_synchro_pss_sss_nr
*
* INPUT : UE context
* for first and second pss sequence
* - position of pss in the received UE buffer
* - number of pss sequence
*
* RETURN : 0 if OK else error
*
* DESCRIPTION : detect pss sequences in the received UE buffer
* then detect sss sequence
*
* Test procedure:
* - reference pss sequences (first, second or both) are written at specific
* positions
* - correlation is done between the received buffer and the possible pss sequences
* - results indicate pss sequence number and correlation result
* - reference sss sequences are written at specific positions
* - correlation is done with possible sss sequence
*
* (10 ms)
* <--------------------------------------------------------------------------->
* -----------------------------------------------------------------------------
* | Received UE data buffer |
* ----------------------------------------------------------------------------
* ---------------------------------------------
* <-------------->| pss | pbch | sss | pbch |
* ---------------------------------------------
* offset
*
* SSS/PBCH block contains following symbols: pss + pbch + sss + pbch
*
*********************************************************************/
int test_synchro_pss_sss_nr(PHY_VARS_NR_UE *PHY_vars_UE, int position_symbol, int pss_sequence_number)
{
NR_DL_FRAME_PARMS *frame_parms = &(PHY_vars_UE->frame_parms);
UE_nr_rxtx_proc_t proc = {0};
int synchro_position;
int offset;
int16_t *tmp;
int32_t metric_fdd_ncp=0;
uint8_t phase_fdd_ncp;
int rate_change = SYNCHRO_RATE_CHANGE_FACTOR;
int decoded_pbch = -1;
set_sequence_pss(PHY_vars_UE, position_symbol, pss_sequence_number);
synchro_position = pss_synchro_nr(PHY_vars_UE, rate_change);
synchro_position = synchro_position * rate_change;
if (abs(synchro_position - position_symbol) > PSS_DETECTION_MARGIN_MAX)
{
printf("NR Pss has been detected at position %d instead of %d \n", synchro_position, position_symbol);
}
/* symbols order for synchronisation block is PSS - PBCH - SSS */
/* knowing that synchronisation position gives pss ofdm start one can deduce start of sss symbol */
offset = (position_symbol + (SSS_SYMBOL_NB - PSS_SYMBOL_NB)*(frame_parms->ofdm_symbol_size + frame_parms->nb_prefix_samples));
tmp = (int16_t *)&PHY_vars_UE->common_vars.rxdata[0][offset];
insert_sss_nr(tmp, frame_parms);
//PHY_vars_UE->rx_offset = position_symbol; /* offset is given for samples of type int16 */
PHY_vars_UE->rx_offset = synchro_position; /* offset is given for samples of type int16 */
#if TEST_SYNCHRO_TIMING_PSS
start_meas(&generic_time[TIME_SSS]);
#endif
rx_sss_nr(PHY_vars_UE, &proc, &metric_fdd_ncp, &phase_fdd_ncp);
#if TEST_SYNCHRO_TIMING_PSS
stop_meas(&generic_time[TIME_SSS]);
#ifndef NR_UNIT_TEST
printf("PSS execution duration %5.2f \n", generic_time[TIME_PSS].p_time/(cpuf*1000.0));
printf("SSS execution duration %5.2f \n", generic_time[TIME_SSS].p_time/(cpuf*1000.0));
#endif
#endif
if (phase_fdd_ncp != INDEX_NO_PHASE_DIFFERENCE) {
printf("Error: detected phase on sss is not correct: expected index phase is %d, detected index phase is %d !\n", INDEX_NO_PHASE_DIFFERENCE, phase_fdd_ncp);
return -1;
}
generate_dmrs_pbch(PHY_vars_UE->dmrs_pbch_bitmap_nr, frame_parms->Nid_cell);
decoded_pbch = pbch_detection(PHY_vars_UE, PHY_vars_UE->mode);
return decoded_pbch;
}
/*******************************************************************
*
* NAME : set_sequence_sss
*
* PARAMETERS : UE context
* position of sss in the received UE buffer
*
* RETURN : none
*
* DESCRIPTION : write reference sss sequence at a specified sample position in the received UE buffer
*
*********************************************************************/
void set_sequence_sss(PHY_VARS_NR_UE *PHY_vars_UE, int offset, int slot_offset)
{
NR_DL_FRAME_PARMS *frame_parms = &(PHY_vars_UE->frame_parms);
int length = frame_parms->ofdm_symbol_size;
int size = length * IQ_SIZE; /* i & q */
nfapi_config_request_t nfapi_config;
int16_t data_sss[LENGTH_SSS_NR];
nfapi_config.sch_config.physical_cell_id.value = PHY_vars_UE->frame_parms.Nid_cell;
/* reinitialise random for always getting same data */
srand(0);
int random;
for (int i=0; i< size/2; i++) {
random = ((rand() % AMP) - AMP/2); /* AMP allows to get a scaling of samples */
synchroF_tmp[i] = random;
}
bzero(synchro_tmp, size);
/* Computation of below offset has been added due to function generate_sss which is used for eNodeB to process transmission */
/* so it is based on a transmitted buffer which has been dimensioned for a full frame */
/* here one uses a smaller buffer according to the size of an ofdm symbol so it can not properly work in this case. */
/* so in order to only write in this buffer, pointer of the buffer has been modified in such a way that function */
/* generate_sss writes correct data at the right buffer location */
/* this address offset is applied for SSS which is in the second part of the frame */
int Nsymb = (frame_parms->Ncp==NORMAL)?14:12;
int index_offset = slot_offset*Nsymb/2*frame_parms->ofdm_symbol_size;
int16_t *tmp = synchroF_tmp - (2*index_offset);
#if 0
nr_generate_sss(data_sss,
(int32_t **)&tmp,
AMP,
0, // symbol number
&nfapi_config,
frame_parms);
/* get sss in the frequency domain by applying an inverse FFT */
idft2048(synchroF_tmp, /* complex input */
synchro_tmp, /* complex output */
1); /* scaling factor */
for (int aa=0;aa<PHY_vars_UE->frame_parms.nb_antennas_rx;aa++) {
/* copy sss in rx buffer */
for (int i=0; i<length; i++) {
((int32_t*)PHY_vars_UE->common_vars.rxdata[aa])[i + offset] = ((int32_t *)synchro_tmp)[i];
}
}
#else
insert_sss_nr(tmp, frame_parms);
#endif
}
/*******************************************************************
*
* NAME : insert_sequence_sss
*
* PARAMETERS : UE context
* position of sss in the received UE buffer
*
* RETURN : none
*
* DESCRIPTION : write reference sss sequence at a specified sample position in the received UE buffer
*
*********************************************************************/
void insert_sequence_sss(PHY_VARS_NR_UE *PHY_vars_UE, int offset)
{
NR_DL_FRAME_PARMS *frame_parms = &(PHY_vars_UE->frame_parms);
int samples_for_half_frame = frame_parms->samples_per_frame / 2;
set_sequence_sss(PHY_vars_UE, offset, 0);
set_sequence_sss(PHY_vars_UE, offset + samples_for_half_frame, 10);
}
/********************************************************************
*
* NAME : test_synchro_pss_sss
*
* INPUT : UE context
* for first and second pss sequence
* - position of pss in the received UE buffer
* - number of pss sequence
*
* RETURN : 0 if OK else error
*
* DESCRIPTION : detect pss sequences in the received UE buffer
* then detect sss sequence
*
* Test procedure:
*
* - reference pss sequences (first, second or both) are written at specific
* positions
* - correlation is done between the received buffer and the possible pss sequences
* - results indicate pss sequence number and correlation result
* - reference sss sequences are written at specific positions
* - correlation is done with possible sss sequence
*
* (10 ms)
* <--------------------------------------------------------------------------->
* -----------------------------------------------------------------------------
* | Received UE data buffer |
* ----------------------------------------------------------------------------
* ------------- -------------
* <-------------->| first pss |<--------------------->| second pss |
* position ------------- (5 ms) -------------
* ---------- ----------
* | first sss| |second sss|
* ------------ -----------
* As specified by the standard:
* - first and second sss sequence are different -> allow to get frame slot timing
* - first sss sequence is located in slot 0 and second sss sequence is in slot 10
* - ofdm symbol of sss is just before ofdm symbol of pss
*
*********************************************************************/
int test_synchro_pss_sss(PHY_VARS_NR_UE *PHY_vars_UE, int position_symbol, int sequence_number, test_t *test)
{
VOID_PARAMETER test;
NR_DL_FRAME_PARMS *frame_parms = &(PHY_vars_UE->frame_parms);
int synchro_position;
int offset;
int32_t metric_fdd_ncp=0;
uint8_t flip_fdd_ncp;
uint8_t phase_fdd_ncp;
int rate_change = SYNCHRO_RATE_CHANGE_FACTOR; /* by default there is no sampling rate change */
int decoded_pbch = -1;
offset = position_symbol - frame_parms->ofdm_symbol_size - frame_parms->nb_prefix_samples;
if (offset < 0)
{
printf("Test aborted because sss position is outside the window\n");
exit(0);
}
set_sequence_pss(PHY_vars_UE, position_symbol, sequence_number);
synchro_position = pss_synchro_nr(PHY_vars_UE, rate_change);
printf("Pss has been detected at position %d with Nid2 %d \n", synchro_position, PHY_vars_UE->common_vars.eNb_id );
insert_sequence_sss(PHY_vars_UE, offset);
if ((frame_parms->Ncp != NORMAL) || (frame_parms->frame_type != FDD)) {
printf("This configuration is not supported. Please use call to function ""initial_sync"" for covering others configurations.\n");
exit(0);
}
int sync_pos2 = synchro_position - frame_parms->nb_prefix_samples;
int sync_pos_slot = (frame_parms->samples_per_slot>>1) - frame_parms->ofdm_symbol_size - frame_parms->nb_prefix_samples;
if (sync_pos2 >= sync_pos_slot)
PHY_vars_UE->rx_offset = sync_pos2 - sync_pos_slot;
else
PHY_vars_UE->rx_offset = FRAME_LENGTH_COMPLEX_SAMPLES + sync_pos2 - sync_pos_slot;
rx_sss(PHY_vars_UE, &metric_fdd_ncp, &flip_fdd_ncp, &phase_fdd_ncp);
if (phase_fdd_ncp != INDEX_NO_PHASE_DIFFERENCE) {
printf("Error: detected phase on sss is not correct: expected index phase is %d, detected index phase is %d !\n", INDEX_NO_PHASE_DIFFERENCE, phase_fdd_ncp);
return -1;
}
init_frame_parms(&PHY_vars_UE->frame_parms,1);
//lte_gold_new(frame_parms, PHY_vars_UE->lte_gold_table[0],frame_parms->Nid_cell);
decoded_pbch = pbch_detection(PHY_vars_UE, PHY_vars_UE->mode);
return decoded_pbch;
}
/*******************************************************************
*
* NAME : main
*
* DESCRIPTION : test bench for synchronisation sequence (pss/sss/pbch)
* purpose of test is to check that synchronisation sequence can be
* properly detected depending of input waveforms.
*
* - First step of synchronisation consists in pss search (primary synchronisation signal).
* pss sequence should be detected at the right position
* in the received buffer whatever the position along the
* received data buffer.
* Detection of position is based on correlation in time domain between
* received signal and pss sequence -> position is given by
* peak of correlation result.
* - Second step of synchronisation is sss decoding (secundary synchronisation signal).
* sss detection is based on position of detected pss.
*
*********************************************************************/
int main(int argc, char *argv[])
{
VOID_PARAMETER argc;
VOID_PARAMETER argv;
uint8_t transmission_mode = 1;
uint8_t nb_antennas_tx = 1;
uint8_t nb_antennas_rx = 1;
uint8_t frame_type = FDD;
int N_RB_DL=100;
lte_prefix_type_t extended_prefix_flag = NORMAL;
int decoded_pbch = -1;
int Nid1, Nid2;
const char *name_test = " PBCH NR ";
test_t test = { name_test, 0, 0, 0, 0};
#if 1
int test_position[] = { 20000 }; /* this is the sample number in the frame */
#else
int test_position[] = { -1 }; /* to get samples from a buffer initialised from an external file */
#endif
int size_test_position;
/* this is a pointer to the function in charge of the test */
int (*p_test_synchro_pss_sss)(PHY_VARS_NR_UE *PHY_vars_UE, int position_symbol, int sequence_number) = test_synchro_pss_sss_nr;
#if 0
int Nid_cell[] = { (3*0+0), (3*71+0), (3*21+2), (3*21+2), (3*55+1), (3*111+2) };
#else
int Nid_cell[] = { ((3*1+2)) };
#endif
printf(" PBCH TEST \n");
printf("----------\n");
if (init_test(nb_antennas_tx, nb_antennas_rx, transmission_mode, extended_prefix_flag, frame_type, Nid_cell[0], N_RB_DL) != 0) {
printf("Initialisation problem for synchronisation test \n");
exit(-1);;
}
p_test_synchro_pss_sss = test_synchro_pss_sss_nr;
size_test_position = sizeof(test_position)/sizeof(int);
printf("***********************************\n");
printf(" %s Test NR synchroisation \n", test.test_current);
printf("***********************************\n");
for (unsigned int index = 0; index < (sizeof(Nid_cell)/sizeof(int)); index++) {
Nid2 = GET_NID2(Nid_cell[index]);
Nid1 = GET_NID1(Nid_cell[index]);
for (int position = 0; position < size_test_position; position++) {
PHY_vars_UE->frame_parms.Nid_cell = (3 * N_ID_1_NUMBER) + N_ID_2_NUMBER; /* set to unvalid value */
decoded_pbch = (*p_test_synchro_pss_sss)(PHY_vars_UE, test_position[position], Nid2); /* return phase index which gives phase error from an array */
test.number_of_tests++;
printf("\n%s ", test.test_current);
if (PHY_vars_UE->frame_parms.Nid_cell == (3 * Nid1) + Nid2) {
if (decoded_pbch != -1) {
printf("Test is pass with offset %d Nid1 %d Nid2 %d \n", test_position[position], Nid1, Nid2);
test.number_of_pass++;
}
else {
printf("Test is fail because pbch has not been decoded \n");
test.number_of_fail++;
}
}
else {
printf("Test is fail with offset %d Nid1 %d Nid2 %d \n", test_position[position], Nid1, Nid2);
test.number_of_fail++;
}
break;
}
break;
}
printf("\n %s Number of tests : %d Pass : %d Pass with warning : %d Fail : %d \n", test.test_current, test.number_of_tests, test.number_of_pass, test.number_of_pass_warning, test.number_of_fail);
printf("%s Synchronisaton test is terminated.\n\n", test.test_current);
/* reset test statistics */
test.number_of_tests = test.number_of_pass = test.number_of_pass_warning = test.number_of_fail = 0;
free_context_synchro_nr();
return(0);
}
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/**********************************************************************
*
* FILENAME : pss_test.c
*
* MODULE : UE test bench for synchronisation
*
* DESCRIPTION : it allows unitary tests of UE synchronisation on host machine
*
************************************************************************/
#include <stdlib.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <limits.h>
#include "../../unit_tests/src/pss_util_test.h"
#include "PHY/defs_nr_UE.h"
#include "PHY/INIT/init_extern.h"
#include "PHY/phy_extern_nr_ue.h"
#include "PHY/NR_REFSIG/ss_pbch_nr.h"
#include "PHY/NR_REFSIG/pss_nr.h"
#include "PHY/NR_REFSIG/sss_nr.h"
#include "PHY/NR_REFSIG/dmrs_nr.h"
/************** DEFINE *******************************************/
/*************** LOCAL VARIABLES***********************************/
/*************** FUNCTIONS ****************************************/
/********************************************************************
*
* NAME : pss_test
*
* INPUT : UE context
* for a pss sequence
* - position of pss in the received UE buffer
* - number of pss sequence
*
* RETURN : 0 if OK else error
*
* DESCRIPTION : detect pss sequences in the received UE buffer
*
* Test procedure:
*
* - reference pss sequences is written at a specific position
* - correlation is done between the received buffer and the possible pss sequences
* - results indicate pss sequence number and correlation result.
*
* Test is pass if detection of pss position is the one which has been set.
*
* (10 ms)
* <--------------------------------------------------------------------------->
* -----------------------------------------------------------------------------
* | Received UE data buffer |
* ----------------------------------------------------------------------------
* +-----------+
* <--------->| pss |
* position +-----------+
* ^
* |
* peak position
* given by maximum of correlation result
* position matches beginning of ofdm symbol
*
* Remark: memory position should be aligned on a multiple of 4 due to I & Q samples of int16
* An OFDM symbol is composed of x number of received samples depending of Rf front end sample rate.
*
* I & Q storage in memory
*
* First samples Second samples
* ------------------------- ------------------------- ...
* | I1 | Q1 | I2 | Q2 |
* --------------------------------------------------- ...
* ^ 16 bits 16 bits ^
* | |
* --------------------------------------------------- ...
* | sample 1 | sample 2 |
* ---------------------------------------------------- ...
* ^
* |
* OFDM in time
*
*********************************************************************/
void test_synchro_pss_nr(PHY_VARS_NR_UE *PHY_VARS_NR_UE, int position_symbol, int pss_sequence_number, test_t *test)
{
int rate_change = SYNCHRO_RATE_CHANGE_FACTOR;
int synchro_position;
int NID2_value;
display_test_configuration_pss(position_symbol, pss_sequence_number);
set_sequence_pss(PHY_VARS_NR_UE, position_symbol, pss_sequence_number);
/* search pss */
synchro_position = pss_synchro_nr(PHY_VARS_NR_UE, rate_change);
int pss_sequence = get_softmodem_params()->sl_mode == 0 ? NUMBER_PSS_SEQUENCE : NUMBER_PSS_SEQUENCE_SL;
if (pss_sequence_number < pss_sequence) {
NID2_value = pss_sequence_number;
} else {
NID2_value = pss_sequence;
}
if (NID2_value < pss_sequence) {
test->number_of_tests++;
/* position should be adjusted with i&q samples which are successively stored as int16 in the received buffer */
int test_margin = PSS_DETECTION_MARGIN_MAX; /* warning correlation results give an offset position between 0 and 12 */
int delta_position = abs(position_symbol - (synchro_position*rate_change));
printf("%s ", test->test_current);
if (PHY_VARS_NR_UE->common_vars.eNb_id == pss_sequence_number) {
if ( delta_position != 0) {
if (delta_position > test_margin*rate_change) {
printf("Test is fail due to wrong position %d instead of %d \n", (synchro_position*rate_change), position_symbol);
printf("%s ", test->test_current);
printf("Test is fail : pss detected with a shift of %d \n", delta_position);
test->number_of_fail++;
}
else {
printf("Test is pass with warning: pss detected with a shift of %d \n", delta_position);
test->number_of_pass_warning++;
}
}
else {
printf("Test is pass: pss detected at right position \n");
test->number_of_pass++;
}
}
else {
printf("Test is fail due to wrong NID2 detection %d instead of %d \n", PHY_VARS_NR_UE->common_vars.eNb_id, NID2_value);
test->number_of_fail++;
}
}
}
/*******************************************************************
*
* NAME : main
*
* DESCRIPTION : test bench for synchronisation sequence (pss/sss/pbch)
* purpose of test is to check that synchronisation sequence can be
* properly detected depending of input waveforms.
*
* - First step of synchronisation is pss sequence.
* pss sequence should be detected at the right position
* in the received buffer whatever the position along the
* received data buffer.
* Detection of position is based on correlation in time domain between
* received signal and pss sequence -> position is given by
* peak of correlation result.
*
*********************************************************************/
int main(int argc, char *argv[])
{
VOID_PARAMETER argc;
VOID_PARAMETER argv;
uint8_t transmission_mode = 1;
uint8_t nb_antennas_tx = 1;
uint8_t nb_antennas_rx = 1;
uint16_t Nid_cell=123;
uint8_t frame_type=FDD;
int N_RB_DL=100;
lte_prefix_type_t extended_prefix_flag=NORMAL;
const char *name_test = "PSS NR";
test_t test = { name_test, 0, 0, 0, 0};
/* this is a pointer to the function in charge of the test */
void (*p_test_synchro_pss)(PHY_VARS_NR_UE *PHY_VARS_NR_UE, int position_symbol, int pss_sequence_number, test_t *test) = test_synchro_pss_nr;
int test_position[] = { 0, 492, 493, 56788, 56888, 111111, 151234, 151500, 200000, 250004, (307200-2048) };
int size_test_position = sizeof(test_position)/sizeof(int);
printf(" PSS TEST \n");
printf("----------\n");
if (init_test(nb_antennas_tx, nb_antennas_rx, transmission_mode, extended_prefix_flag, frame_type, Nid_cell, N_RB_DL) != 0) {
printf("Initialisation problem for synchronisation test \n");
exit(-1);;
}
printf("***********************************\n");
printf(" %s Test synchronisation \n", test.test_current);
printf("***********************************\n");
#if 0
printf("Synchronisation with random data\n");
test_synchro_pss_nr(PHY_vars_UE, 0, INVALID_PSS_SEQUENCE, &test);
#endif
int pss_sequence = get_softmodem_params()->sl_mode == 0 ? NUMBER_PSS_SEQUENCE : NUMBER_PSS_SEQUENCE_SL;
for (int index_position = 0; index_position < size_test_position; index_position++) {
for (int number_pss_sequence = 0; number_pss_sequence < pss_sequence; number_pss_sequence++) {
p_test_synchro_pss(PHY_vars_UE, test_position[index_position], number_pss_sequence, &test);
//break;
}
//break;
}
printf("\n%s Number of tests : %d Pass : %d Pass with warning : %d Fail : %d \n\n", test.test_current, test.number_of_tests, test.number_of_pass, test.number_of_pass_warning, test.number_of_fail);
printf("%s Synchronisaton test is terminated.\n\n", test.test_current);
/* reset test statistics */
test.number_of_tests = test.number_of_pass = test.number_of_pass_warning = test.number_of_fail = 0;
free_context_synchro_nr();
return(0);
}
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*********************************************************************
*
* FILENAME : pss_util_test.c
*
* MODULE : UE test bench for unit tests
*
* DESCRIPTION : it allows unitary tests of NR UE
*
************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <limits.h>
#include <signal.h>
#include <time.h>
#include "PHY/defs_nr_UE.h"
#include "PHY/INIT/phy_init.h"
#include "PHY/phy_extern_nr_ue.h"
/* to declare ue variables */
#include "PHY/phy_vars_nr_ue.h"
#include "PHY/LTE_TRANSPORT/transport_vars.h"
#include "PHY/NR_REFSIG/pss_nr.h"
#include "PHY/NR_REFSIG/sss_nr.h"
#include "PHY/NR_UE_TRANSPORT/cic_filter_nr.h"
#define DEFINE_VARIABLES_PSS_NR_H
#include "../../unit_tests/src/pss_util_test.h"
#undef DEFINE_VARIABLES_PSS_NR_H
#define DEFINE_VARIABLES_INPUT_BUFFER_TEST_H
#include "../../unit_tests/src/input_buffer_test.h"
#undef DEFINE_VARIABLES_INPUT_BUFFER_TEST_H
#include "common/utils/LOG/log.h"
/************** DEFINE *******************************************/
/*************** LOCAL VARIABLES***********************************/
static nfapi_config_request_t config_t;
static nfapi_config_request_t *config =&config_t;
/*************** FUNCTIONS ****************************************/
//void phy_init_nr_top(NR_DL_FRAME_PARMS *frame_parms);
int init_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_eNB);
/*******************************************************************
*
* NAME : apply phase shift
*
* PARAMETERS : pointer to buffer in frequency
* length of sample
*
* RETURN : none
*
* DESCRIPTION : apply phase shift to samples
*
*********************************************************************/
void phase_shift_samples(int16_t *samples, int length, int16_t phase_shift_re, int16_t phase_shift_im) {
int16_t sample_re, sample_im;
for (int i = 0; i < length; i++) {
sample_re = (((phase_shift_re*samples[2*i])>>SCALING_METRIC_SSS_NR) - ((phase_shift_im*samples[2*i+1])>>SCALING_METRIC_SSS_NR));
sample_im = (((phase_shift_im*samples[2*i])>>SCALING_METRIC_SSS_NR) + ((phase_shift_re*samples[2*i+1])>>SCALING_METRIC_SSS_NR));
samples[2*i] = sample_re;
samples[2*i+1] = sample_im;
}
}
/*******************************************************************
*
* NAME : display_data
*
* PARAMETERS : pointer to buffer
* position in the buffer
*
* RETURN : none
*
* DESCRIPTION : display pss sequence and data of a buffer
*
*
*********************************************************************/
void display_data(int pss_sequence_number, int16_t *rxdata, int position) {
#ifdef DEBUG_TEST_PSS
int pss_sequence = get_softmodem_params()->sl_mode == 0 ? NUMBER_PSS_SEQUENCE : NUMBER_PSS_SEQUENCE_SL;
int16_t *pss_sequence[pss_sequence] = {primary_synch0_time, primary_synch1_time, primary_synch2_time};
int16_t *pss_sequence_sl[pss_sequence] = {primary_synch0_time, primary_synch1_time};
int16_t *pss_sequence_time = pss_sequence[pss_sequence_number];;
if (get_softmodem_params()->sl_mode != 0)
pss_sequence_time = pss_sequence_sl[pss_sequence_number];
printf(" pss %6d data \n", pss_sequence_number);
for (int i = 0; i < 4; i++) {
if (pss_sequence_number < pss_sequence) {
printf("[i %6d] : %4d [i %6d] : %8i at address : %p \n", i, pss_sequence_time[2*i], (i + position), rxdata[2*i + (position*2)], &(rxdata[2*i + (position*2)]));
printf("[q %6d] : %4d [q %6d] : %8i at address : %p \n", i, pss_sequence_time[2*i+1], (i + position), rxdata[2*i + 1 + (position*2)], &(rxdata[2*i + 1 + (position*2)]));
} else {
printf("[i %6d] : Undef [i %6d] : %8i at address : %p \n", i, (i + position), rxdata[2*i + (position*2)], &(rxdata[2*i + (position*2)]));
printf("[q %6d] : Undef [q %6d] : %8i at address : %p \n", i, (i + position), rxdata[2*i + 1 + (position*2)], &(rxdata[2*i + 1 + (position*2)]));
}
}
nr_init_frame_parms
printf(" ... ... \n");
#else
(void) pss_sequence_number;
(void) rxdata;
(void) position;
#endif
}
/*******************************************************************
*
* NAME : display_test_configuration_pss
*
* PARAMETERS :
*
*
* RETURN : none
*
* DESCRIPTION : display test configuration of pss
*
*********************************************************************/
void display_test_configuration_pss(int position, int pss_sequence_number) {
const char next_test_text[] = "------------------------------------------------\n";
const char test_text_pss[] = "Test nr pss with Nid2 %i at position %i \n";
printf(next_test_text);
printf(test_text_pss, pss_sequence_number, position);
}
/*******************************************************************
*
* NAME : display_test_configuration_sss
*
* PARAMETERS :
*
*
* RETURN : none
*
* DESCRIPTION : display test configuration of pss
*
*********************************************************************/
void display_test_configuration_sss(int sss_sequence_number) {
const char test_text_sss[] = "Test nr sss with Nid1 %i \n";
printf(test_text_sss, sss_sequence_number);
}
/*******************************************************************
*
* NAME : undefinedFunction
*
* PARAMETERS : function name
*
* RETURN : none
*
* DESCRIPTION : these functions allow to solve undefined functions at link
* function name is printed at execution time for checking that
* each function is not called
*
*********************************************************************/
void undefined_function(const char *function) {
printf("%s undefined \n", function);
printf("Warning: function \"%s\" has been replaced by an empty function for avoiding undefined function error at build \n", function);
}
/*******************************************************************
*
* NAME : init_synchro_test
*
* PARAMETERS : configuration for UE and eNB
*
* RETURN : 0 if OK else error
*
* DESCRIPTION : initialisation of UE and eNode contexts
*
*********************************************************************/
int init_test(unsigned char N_tx, unsigned char N_rx, unsigned char transmission_mode,
unsigned char extended_prefix_flag, uint8_t frame_type, uint16_t Nid_cell, int N_RB_DL) {
(void) transmission_mode;
NR_DL_FRAME_PARMS *frame_parms;
int log_level = OAILOG_TRACE;
logInit();
// enable these lines if you need debug info
//set_comp_log(PHY,LOG_DEBUG,LOG_HIGH,1);
set_glog(log_level);
#ifndef NR_UNIT_TEST
cpuf = get_cpu_freq_GHz();
//LOG_I(PHY, "[CONFIG] Test of UE synchronisation \n");
set_component_filelog(USIM); // file located in /tmp/testSynchroue.txt
#endif
//randominit(0);
//set_taus_seed(0);
printf("Start lte_param_init, frame_type %d, extended_prefix %d\n",frame_type,extended_prefix_flag);
PHY_vars_UE = malloc(sizeof(PHY_VARS_NR_UE));
bzero(PHY_vars_UE, sizeof(PHY_VARS_NR_UE));
if (PHY_vars_UE == NULL)
return(-1);
frame_parms = &(PHY_vars_UE->frame_parms);
frame_parms->N_RB_DL = N_RB_DL; //50 for 10MHz and 25 for 5 MHz
frame_parms->N_RB_UL = N_RB_DL;
frame_parms->Ncp = extended_prefix_flag;
frame_parms->Nid_cell = Nid_cell;
frame_parms->nb_antennas_tx = N_tx;
frame_parms->nb_antennas_rx = N_rx;
frame_parms->frame_type = frame_type;
frame_parms->nb_antenna_ports_gNB = 1;
frame_parms->threequarter_fs = 0;
frame_parms->numerology_index = NUMEROLOGY_INDEX_MAX_NR;
int mu = 1;
int n_ssb_crb = 0;
int ssb_subcarrier_offset = 0;
nr_init_frame_parms_ue(frame_parms, mu, extended_prefix_flag, N_RB_DL, n_ssb_crb, ssb_subcarrier_offset);
int nid_2_num = get_softmodem_params()->sl_mode == 0 ? N_ID_2_NUMBER : N_ID_2_NUMBER_SL;
PHY_vars_UE->frame_parms.Nid_cell = (3 * N_ID_1_NUMBER) + nid_2_num; /* set to unvalid value */
//phy_init_nr_top(frame_parms);
if (init_nr_ue_signal(PHY_vars_UE, 1) != 0) {
LOG_E(PHY,"Error at UE NR initialisation : at line %d in function %s of file %s \n", LINE_FILE , __func__, FILE_NAME);
return (0);
}
/* dummy initialisation of global structure PHY_vars_UE_g */
uint16_t NB_UE_INST=1;
PHY_vars_UE_g = (PHY_VARS_NR_UE ** *)calloc( NB_UE_INST, sizeof(PHY_VARS_NR_UE **));
for (int UE_id=0; UE_id<NB_UE_INST; UE_id++) {
PHY_vars_UE_g[UE_id] = (PHY_VARS_NR_UE **) calloc( MAX_NUM_CCs, sizeof(PHY_VARS_NR_UE *));
for (int CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
//(frame_parms[CC_id])->nb_antennas_tx = 1;
//(frame_parms[CC_id])->nb_antennas_rx = nb_antennas_rx_ue;
// PHY_vars_UE_g[UE_id][CC_id] = init_lte_UE(frame_parms[CC_id], UE_id,abstraction_flag);
PHY_vars_UE_g[UE_id][CC_id] = calloc(1, sizeof(PHY_VARS_NR_UE));
PHY_vars_UE_g[UE_id][CC_id]->Mod_id=UE_id;
PHY_vars_UE_g[UE_id][CC_id]->CC_id=CC_id;
}
}
return (0);
}
/*******************************************************************
*
* NAME : set_random_rx_buffer
*
* PARAMETERS : Ue context
*
* RETURN : 0 if OK else error
*
* DESCRIPTION : write random data in received UE buffer of the synchronisation window
*
*********************************************************************/
typedef enum {
ZERO_DATA,
SINUSOIDAL_DATA,
RANDOM_DATA,
RANDOM_MAX_DATA
} random_data_format_t;
/* data is a pure cosinus wave */
#define SAMPLING_RATE (30720000L)
#define SCALING_SINUSOIDAL_DATA (4) /* 16 is max value without decimation */
#define FREQUENCY_15_MHZ (15360000L)
#define FREQUENCY (FREQUENCY_15_MHZ) /* to generate a frequency with a sampling of 30,72 MHz 5 gives 770 KHz, 20 gives 1,5 MHz, 40 gives 3 MHz */
void set_random_rx_buffer(PHY_VARS_NR_UE *PHY_vars_UE, int amp) {
NR_DL_FRAME_PARMS *frame_parms = &(PHY_vars_UE->frame_parms);
int samples_for_frame = frame_parms->samples_per_frame;
int16_t random;
int16_t *data_p;
random_data_format_t data_format = SINUSOIDAL_DATA;
/* reinitialise random for always getting same data */
srand(0);
double n = 0;
for (int aa=0; aa<PHY_vars_UE->frame_parms.nb_antennas_rx; aa++) {
data_p = (int16_t *) &(PHY_vars_UE->common_vars.rxdata[aa][0]);
int frequency_switch = samples_for_frame/LTE_NUMBER_OF_SUBFRAMES_PER_FRAME;
int frequency_step = 0;
double beat = (2*M_PI*FREQUENCY_15_MHZ)/(SAMPLING_RATE);
for (int i=0; i< samples_for_frame; i++) {
switch(data_format) {
case ZERO_DATA: {
/* all data are forced to zero */
random = 0;
break;
}
case SINUSOIDAL_DATA: {
/* sinusoidal signal */
n = cos(beat*i);
random = n * (amp * SCALING_SINUSOIDAL_DATA);
frequency_step++;
if (frequency_step == frequency_switch) {
beat = beat/2; /* frequency is divided by 2 */
//printf("frequency %f at %d\n", (beat/2*M_PI), i);
frequency_step = 0;
}
//printf("%d : cos %d %d \n", i, n, random);
break;
}
case RANDOM_DATA: {
/* random data can take any value between -SHRT_MAX and SHRT_MAX */
/* in this case one can use maxim value for uint16 because there is no saturation */
#define SCALING_RANDOM_DATA (24) /* 48 is max value without decimation */
#define RANDOM_MAX_AMP (amp * SCALING_RANDOM_DATA)
random = ((rand() % RANDOM_MAX_AMP) - RANDOM_MAX_AMP/2);
break;
}
case RANDOM_MAX_DATA: {
/* random data can take only two value (-RANDOM_MAX) or RANDOM_MAX */
/* In this case saturation can occur with value of scaling_value greater than 23 */
#define SCALING_RANDOM_MAX_DATA (8)
#define RANDOM_VALUE (amp * SCALING_RANDOM_DATA)
const int random_number[2] = {-1,+1};
random = random_number[rand()%2] * RANDOM_VALUE;
break;
}
default: {
printf("Format of data is undefined \n");
assert(0);
break;
}
}
data_p[2*i] = random;
data_p[2*i+1] = random;
#if 0
if (i < 10) {
printf("random %d \n", random);
printf("data[%d] : %d %d at address %p \n", i, data_p[2*i], data_p[2*i+1], &data_p[2*i]);
}
#endif
}
}
}
/*******************************************************************
*
* NAME : set_pss_in_rx_buffer_from_external_buffer
*
* PARAMETERS : UE context
* position of pss in the received UE buffer
* number of pss sequence*
*
* RETURN : 0 if OK else error
*
* DESCRIPTION : set received buffer according to an external buffer
*
*********************************************************************/
int set_pss_in_rx_buffer_from_external_buffer(PHY_VARS_NR_UE *PHY_vars_UE, short *input_buffer) {
NR_DL_FRAME_PARMS *frame_parms = &(PHY_vars_UE->frame_parms);
int samples_for_frame = frame_parms->samples_per_frame; /* both i and q */
for (int aa=0; aa<PHY_vars_UE->frame_parms.nb_antennas_rx; aa++) {
for (int i = 0; i < samples_for_frame; i++) {
((int16_t *)PHY_vars_UE->common_vars.rxdata[aa])[2*i] = input_buffer[2*i]; /* real part */
((int16_t *)PHY_vars_UE->common_vars.rxdata[aa])[2*i+1] = input_buffer[2*i+1]; /* imaginary part */
}
}
/* check that sequence has been properly copied */
for (int aa=0; aa<PHY_vars_UE->frame_parms.nb_antennas_rx; aa++) {
for (int i=0; i<samples_for_frame; i++) {
if ((input_buffer[2*i] != ((int16_t *)PHY_vars_UE->common_vars.rxdata[aa])[2*i])
|| (input_buffer[2*i+1] != ((int16_t *)PHY_vars_UE->common_vars.rxdata[aa])[2*i+1])) {
printf("Sequence pss was not properly copied into received buffer at index %d \n", i);
exit(-1);
}
}
}
return (0);
}
/*******************************************************************
*
* NAME : set_pss_in_rx_buffer
*
* PARAMETERS : UE context
* position of pss in the received UE buffer
* number of pss sequence*
*
* RETURN : 0 if OK else error
*
* DESCRIPTION : write reference pss sequence at a specified sample position in the received UE buffer
*
* first pss sequence is written into the buffer only if:
* - pss sequence is valid
* - there is enough room for written the complete sequence
*
* second sequence is written at a position of 5 ms after first pss sequence if:
* - pss sequence is valid
* - there is enough room for written the complete sequence*
*
*********************************************************************/
int set_pss_in_rx_buffer(PHY_VARS_NR_UE *PHY_vars_UE, int position_symbol, int pss_sequence_number) {
NR_DL_FRAME_PARMS *frame_parms = &(PHY_vars_UE->frame_parms);
int samples_for_frame = frame_parms->samples_per_frame;
int16_t *pss_sequence_time;
if ((position_symbol > samples_for_frame)
|| ((position_symbol + frame_parms->ofdm_symbol_size) > samples_for_frame)) {
printf("This pss sequence can not be fully written in the received window \n");
return (-1);
}
int pss_sequence = get_softmodem_params()->sl_mode == 0 ? NUMBER_PSS_SEQUENCE : NUMBER_PSS_SEQUENCE_SL;
if ((pss_sequence_number >= pss_sequence) && (pss_sequence_number < 0)) {
printf("Unknow pss sequence %d \n", pss_sequence_number);
return (-1);
}
pss_sequence_time = primary_synchro_time_nr[pss_sequence_number];
for (int aa=0; aa<PHY_vars_UE->frame_parms.nb_antennas_rx; aa++) {
for (int i = 0; i < frame_parms->ofdm_symbol_size; i++) {
((int16_t *)PHY_vars_UE->common_vars.rxdata[aa])[(position_symbol*2) + (2*i)] = pss_sequence_time[2*i]; /* real part */
((int16_t *)PHY_vars_UE->common_vars.rxdata[aa])[(position_symbol*2) + (2*i+1)] = pss_sequence_time[2*i+1]; /* imaginary part */
}
}
/* check that sequence has been properly copied */
for (int aa=0; aa<PHY_vars_UE->frame_parms.nb_antennas_rx; aa++) {
for (int i=0; i<(frame_parms->ofdm_symbol_size); i++) {
if ((pss_sequence_time[2*i] != ((int16_t *)PHY_vars_UE->common_vars.rxdata[aa])[(position_symbol*2) + (2*i)])
|| (pss_sequence_time[2*i+1] != ((int16_t *)PHY_vars_UE->common_vars.rxdata[aa])[(position_symbol*2) + (2*i+1)])) {
printf("Sequence pss was not properly copied into received buffer at index %d \n", i);
exit(-1);
}
}
}
return (0);
}
/*******************************************************************
*
* NAME : set_sequence_pss
*
* PARAMETERS : UE context
* position of pss in the received UE buffer
* number of pss sequence*
*
* RETURN : 0 if OK else error
*
* DESCRIPTION : write reference pss sequence at a specified sample position in the received UE buffer
*
* pss sequence is written into the buffer only if:
* - pss sequence is valid
* - there is enough room for written the complete sequence*
*
*********************************************************************/
void set_sequence_pss(PHY_VARS_NR_UE *PHY_vars_UE, int position_symbol, int pss_sequence_number) {
NR_DL_FRAME_PARMS *frame_parms = &(PHY_vars_UE->frame_parms);
int samples_for_frame = frame_parms->samples_per_frame;
/* initialise received ue data with random */
set_random_rx_buffer(PHY_vars_UE, AMP);
/* in this case input buffer is provided by an external buffer */
if (position_symbol < 0) {
set_pss_in_rx_buffer_from_external_buffer(PHY_vars_UE, input_buffer);
}
int pss_sequence = get_softmodem_params()->sl_mode == 0 ? NUMBER_PSS_SEQUENCE : NUMBER_PSS_SEQUENCE_SL;
/* write pss sequence in received ue buffer */
else if (pss_sequence_number < pss_sequence) {
if (position_symbol > (samples_for_frame - frame_parms->ofdm_symbol_size)) {
printf("This position for pss sequence %d is not supported because it exceeds the frame length %d!\n", position_symbol, samples_for_frame);
exit(0);
}
if (set_pss_in_rx_buffer(PHY_vars_UE, position_symbol, pss_sequence_number) != 0)
printf("Warning: pss sequence can not be properly written into received buffer !\n");
}
display_data(pss_sequence_number, (int16_t *)&(PHY_vars_UE->common_vars.rxdata[0][0]), position_symbol);
}
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/**********************************************************************
*
* FILENAME : pss_util_test.h
*
* MODULE : UE utilities for test bench of synchronisation
*
* DESCRIPTION : it allows unitary tests of UE synchronisation on host machine
*
************************************************************************/
#ifndef PSS_UTIL_TEST_H
#define PSS_UTIL_TEST_H
#include <stdlib.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <limits.h>
#include "PHY/defs_nr_UE.h"
#include "PHY/INIT/init_extern.h"
#include "PHY/phy_extern_nr_ue.h"
#include "PHY/NR_REFSIG/pss_nr.h"
#ifdef DEFINE_VARIABLES_PSS_NR_H
#define EXTERN
#define INIT_VARIABLES_PSS_NR_H
#else
#define EXTERN extern
#undef INIT_VARIABLES_PSS_NR_H
#endif
/************** DEFINE *******************************************/
//#define DEBUG_TEST_PSS
#define PSS_DETECTION_MARGIN_MAX (4)
#define NUMEROLOGY_INDEX_MAX_NR (5)
/*************** TYPE*********************************************/
typedef struct {
const char *test_current;
int number_of_tests;
int number_of_pass;
int number_of_pass_warning;
int number_of_fail;
} test_t;
/*************** GLOBAL VARIABLES***********************************/
EXTERN PHY_VARS_eNB *PHY_vars_eNB;
EXTERN PHY_VARS_NR_UE *PHY_vars_UE;
/*************** FUNCTIONS *****************************************/
void undefined_function(const char *function);
void display_data(int pss_sequence_number, int16_t *rxdata, int position);
void init_decimator_test(void);
void decimation_synchro_nr(PHY_VARS_NR_UE *PHY_vars_UE, int **rxdata);
void restore_context_frame(int **rxdata);
int set_pss_in_rx_buffer(PHY_VARS_NR_UE *PHY_vars_UE, int position_symbol, int pss_sequence_number);
int init_test(unsigned char N_tx, unsigned char N_rx, unsigned char transmission_mode,
unsigned char extended_prefix_flag, uint8_t frame_type, uint16_t Nid_cell,
int N_RB_DL);
void display_test_configuration_pss(int position, int pss_sequence_number);
void display_test_configuration_sss(int sss_sequence_number);
int set_pss_nr(int ofdm_symbol_size);
void set_random_rx_buffer(PHY_VARS_NR_UE *PHY_vars_UE, int amp);
void set_sequence_pss(PHY_VARS_NR_UE *PHY_vars_UE, int position_symbol, int pss_sequence_number);
int set_pss_in_rx_buffer_from_external_buffer(PHY_VARS_NR_UE *PHY_vars_UE, short *inputBuffer);
void phase_shift_samples(int16_t *samples, int length, int16_t phase_shift_re, int16_t phase_shift_im);
#endif /* PSS_UTIL_TEST_H */
#include "../../unit_tests/src/pss_util_test.h"
#include "PHY/defs_nr_UE.h"
#include "PHY/INIT/init_extern.h"
#include "PHY/phy_extern_nr_ue.h"
/*
#include "SCHED_NR_UE/defs.h"
#include "SCHED_NR/extern.h"
#include "SCHED_NR_UE/harq_nr.h"
*/
#include "SCHED_NR_UE/pucch_uci_ue_nr.h"
/**************** define **************************************/
#define TST_GNB_ID_0 (0) /* first index of gNB */
#define TST_THREAD_ID (0)
int test_pucch_generators(PHY_VARS_NR_UE *ue) {
int gNB_id = TST_GNB_ID_0;
int thread_number = TST_THREAD_ID;
int TB_identifier = 0;
int v_return = 0;
pucch_format_nr_t format = pucch_format2_nr;
uint8_t starting_symbol_index;
uint8_t nb_symbols_total = 4;
uint16_t starting_prb = 0;; /* it can be considered as first hop on case of pucch hopping */
uint16_t second_hop = 0; /* second part for pucch for hopping */
uint8_t nb_of_prbs = 1;
switch (format) {
case pucch_format0_nr:
nb_symbols_total = 2;
nb_of_prbs = 1;
starting_symbol_index = 0;
break;
case pucch_format1_nr:
nb_symbols_total = 5;
nb_of_prbs = 1;
starting_symbol_index = 0;
break;
case pucch_format2_nr:
nb_symbols_total = 2;
nb_of_prbs = 16;
starting_symbol_index = 0;
break;
}
int m_0 = 0; /* format 0 only */
int m_CS = 0; /* for all format except for format 0 */
int index_additional_dmrs = I_PUCCH_NO_ADDITIONAL_DMRS;
int index_hopping = I_PUCCH_NO_HOPPING;
int time_domain_occ = 0;
int occ_length = 0;
int occ_Index = 0;
uint64_t pucch_payload = 0;
int tx_amp = 512;
int nr_slot_tx = 0;
int N_UCI = 0; /* size in bits for Uplink Control Information */
switch(format) {
case pucch_format0_nr: {
nr_generate_pucch0(ue,ue->common_vars.txdataF,
&ue->frame_parms,
&ue->pucch_config_dedicated_nr[gNB_id],
tx_amp,
nr_slot_tx,
(uint8_t)m_0,
(uint8_t)m_CS,
nb_symbols_total,
starting_symbol_index,
starting_prb);
break;
}
case pucch_format1_nr: {
nr_generate_pucch1(ue,ue->common_vars.txdataF,
&ue->frame_parms,
&ue->pucch_config_dedicated_nr[gNB_id],
pucch_payload,
tx_amp,
nr_slot_tx,
(uint8_t)m_0,
nb_symbols_total,
starting_symbol_index,
starting_prb,
second_hop,
(uint8_t)time_domain_occ,
(uint8_t)N_UCI);
break;
}
case pucch_format2_nr: {
nr_generate_pucch2(ue,
ue->pdcch_vars[thread_number][gNB_id]->crnti,
ue->common_vars.txdataF,
&ue->frame_parms,
&ue->pucch_config_dedicated_nr[gNB_id],
pucch_payload,
tx_amp,
nr_slot_tx,
nb_symbols_total,
starting_symbol_index,
nb_of_prbs,
starting_prb,
(uint8_t)N_UCI);
break;
}
case pucch_format3_nr:
case pucch_format4_nr: {
nr_generate_pucch3_4(ue,
ue->pdcch_vars[thread_number][gNB_id]->crnti,
ue->common_vars.txdataF,
&ue->frame_parms,
format,
&ue->pucch_config_dedicated_nr[gNB_id],
pucch_payload,
tx_amp,
nr_slot_tx,
nb_symbols_total,
starting_symbol_index,
nb_of_prbs,
starting_prb,
second_hop,
(uint8_t)N_UCI,
(uint8_t)occ_length,
(uint8_t)occ_Index);
break;
}
}
return (v_return);
}
int main(int argc, char *argv[]) {
uint8_t transmission_mode = 1;
uint8_t nb_antennas_tx = 1;
uint8_t nb_antennas_rx = 1;
uint8_t frame_type = FDD;
int N_RB_DL=106;
lte_prefix_type_t extended_prefix_flag = NORMAL;
int Nid_cell[] = {(3*1+3)};
VOID_PARAMETER argc;
VOID_PARAMETER argv;
printf(" PUCCH TEST \n");
printf("-----------\n");
if (init_test(nb_antennas_tx, nb_antennas_rx, transmission_mode, extended_prefix_flag, frame_type, Nid_cell[0], N_RB_DL) != 0) {
printf("Initialisation problem for test \n");
exit(-1);;
}
if (test_pucch_generators(PHY_vars_UE) != 0) {
printf("\nTest PUCCH is fail \n");
} else {
printf("\nTest PUCCH is pass \n");
}
free_context_synchro_nr();
return(0);
}
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/**********************************************************************
*
* FILENAME : pucch_uci_test.c
*
* MODULE : UE test bench for pucch tests
*
* DESCRIPTION : it allows unitary tests of PUCCH UCI on host machine
*
************************************************************************/
#include "../../unit_tests/src/pss_util_test.h"
#include "PHY/defs_nr_UE.h"
#include "PHY/INIT/init_extern.h"
#include "PHY/phy_extern_nr_ue.h"
#include "SCHED_NR_UE/defs.h"
#include "SCHED_NR/extern.h"
#include "SCHED_NR_UE/harq_nr.h"
#include "SCHED_NR_UE/pucch_uci_ue_nr.h"
/**************** define **************************************/
#define TST_GNB_ID_0 (0) /* first index of gNB */
#define TST_THREAD_ID (0)
#define TST_N_BWP_SIZE (100) /* band width for pucch */
#define TST_PUCCH_COMMON_CONFIG_INDEX_KO (6)
#define TST_PUCCH_COMMON_CONFIG_INDEX_OK (1)
#define TST_DL_HARQ_PID_FIRST (1)
#define TST_DL_HARQ_PID_SECOND (3)
#define TST_DL_HARQ_PID_THIRD (4)
#define TST_DL_HARQ_PID_FOURTH (0)
#define TST_NB_RESOURCE_SET (MAX_NB_OF_PUCCH_RESOURCE_SETS)
#define TST_NB_RESOURCES (32)
#define TST_NB_RESOURCES_PER_SET (8)
/* pucch power control */
#define TST_P0_NOMINAL (3) /* -202..24 */
#define TST_P0_PUCCH_VALUE (0) /* -16..15 */
#define TST_DELTA_F (1) /* -16..15 */
#define TST_TX_POWER_MAX_DBM (24) /* -202..24 */
/**************** extern *****************************************/
extern uint32_t (*p_nr_ue_get_SR)(module_id_t module_idP,int CC_id,frame_t frameP,uint8_t eNB_id,uint16_t rnti, sub_frame_t subframe);
/**************** variables **************************************/
uint32_t tst_scheduling_request_payload;
const char tst_separator[255] = "\n-------------------------------------------------------------------------------------------\n";
/*******************************************************************
*
* NAME : init_pucch_power_configuration
*
* PARAMETERS : none
*
* RETURN : none
*
* DESCRIPTION : set power onfiguration
*
*********************************************************************/
void init_pucch_power_configuration(PHY_VARS_NR_UE *ue, uint8_t gNB_id) {
ue->pucch_config_common_nr[gNB_id].p0_nominal = TST_P0_NOMINAL;
PUCCH_PowerControl_t *power_config = &ue->pucch_config_dedicated_nr[gNB_id].pucch_PowerControl;
P0_PUCCH_t *p_p0_pucch = calloc( 1, sizeof(P0_PUCCH_t));
p_p0_pucch->p0_PUCCH_Value = TST_P0_PUCCH_VALUE;
p_p0_pucch->p0_PUCCH_Id = 1;
power_config->p0_Set[0] = p_p0_pucch;
for (int i = 0; i < NUMBER_PUCCH_FORMAT_NR; i++) {
power_config->deltaF_PUCCH_f[i] = TST_DELTA_F + i;
}
ue->tx_power_max_dBm = TST_TX_POWER_MAX_DBM;
}
/*******************************************************************
*
* NAME : init_pucch_configuration
*
* PARAMETERS : none
*
* RETURN : none
*
* DESCRIPTION : set srs default configuration
*
*********************************************************************/
void common_pucch_configuration(PHY_VARS_NR_UE *ue, uint8_t gNB_id, int pucch_index_config)
{
printf("\nSet pucch common configuration \n");
for (int i = 0; i < MAX_NB_OF_PUCCH_RESOURCES; i++) {
ue->pucch_config_dedicated_nr[gNB_id].PUCCH_Resource[i] = NULL;
}
for (int i = 0; i < MAX_NB_OF_PUCCH_RESOURCE_SETS; i++) {
ue->pucch_config_dedicated_nr[gNB_id].PUCCH_ResourceSet[i] = NULL;
}
for (int i = 0; i < NUMBER_PUCCH_FORMAT_NR-1; i++) {
ue->pucch_config_dedicated_nr[gNB_id].formatConfig[i] = NULL;
}
ue->pucch_config_common_nr[gNB_id].pucch_ResourceCommon = pucch_index_config;
/* default number of pdsch code words */
ue->PDSCH_Config.maxNrofCodeWordsScheduledByDCI = nb_code_n1;
/* init of band width part for pucch */
ue->systemInformationBlockType1_nr.N_BWP_SIZE = TST_N_BWP_SIZE;
/* init default state */
ue->UE_mode[gNB_id] = PRACH;
}
/*******************************************************************
*
* NAME : test_pucch_basic_error
*
* PARAMETERS : none
*
* RETURN : none
*
* DESCRIPTION : test of PUCCH error cases
* in this case no transmission occurs
*
*********************************************************************/
int test_pucch_basic_error(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *proc)
{
int v_return = 0;
bool reset_harq = false;
printf("%s", tst_separator);
ue->dlsch[proc->thread_id][gNB_id][0]->current_harq_pid = TST_DL_HARQ_PID_FIRST;
printf("\n => Test : No harq feedback on going\n");
common_pucch_configuration(ue, gNB_id, TST_PUCCH_COMMON_CONFIG_INDEX_KO);
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) {
v_return = -1;
}
/* set a tx slot with no ack */
NR_UE_DL_HARQ_STATUS_t *harq_status = &ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[TST_DL_HARQ_PID_FIRST].harq_ack;
harq_status->slot_for_feedback_ack = proc->nr_slot_tx;
printf("\n => Test : Error due to acknownlegment not set \n");
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) {
v_return = -1;
}
harq_status->ack = DL_ACK;
printf("\n => Test : Error due to DAI not set \n");
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) {
v_return = -1;
}
printf("\n => Test : Error due to DAI at wrong value \n");
harq_status->vDAI_DL = NR_DL_MAX_DAI + 1;
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) {
v_return = -1;
}
printf("\n => Test : Error due to ACK not ready to be send \n");
harq_status->vDAI_DL = 0;
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) {
v_return = -1;
}
printf("\n => Test : Error due to invalid DAI value \n");
harq_status->send_harq_status = 1; /* ack ready to be send */
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) {
v_return = -1;
}
common_pucch_configuration(ue, gNB_id, NB_INITIAL_PUCCH_RESOURCE);
printf("\n => Test : Error due to undefined PUCCH format from common config \n");
harq_status->vDAI_DL = 1;
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) {
v_return = -1;
}
ue->n_connected_gNB = 2;
printf("\n => Test : Error due to PUCCH format with multiple cells not already implemented \n");
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) {
v_return = -1;
}
ue->n_connected_gNB = 1;
return (v_return);
}
/*******************************************************************
*
* NAME : test_pucch_common_config_single_transport_block
*
* PARAMETERS : none
*
* RETURN : none
*
* DESCRIPTION : test of PUCCH from common configuration*
*
*********************************************************************/
int test_pucch_common_config_single_transport_block(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *proc)
{
int v_return = 0;
bool reset_harq = false;
printf("%s", tst_separator);
common_pucch_configuration(ue, gNB_id, TST_PUCCH_COMMON_CONFIG_INDEX_OK);
/* set a tx slot with no ack */
NR_UE_DL_HARQ_STATUS_t *harq_status = &ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[TST_DL_HARQ_PID_FIRST].harq_ack;
harq_status->ack = DL_ACK;
printf("\n => Test : PUCCH format from common config in prach mode: one positive downlink ACKnowledgment \n");
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
v_return = -1;
}
harq_status->decodeResult = false;
printf("\n => Test : PUCCH format from common config in prach mode: one negative downlink ACKnowledgment \n");
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
v_return = -1;
}
/* switch ue mode after PRACH phase */
ue->UE_mode[gNB_id] = PUSCH;
/* set a second ack on a different downlink harq process */
ue->dlsch[proc->thread_id][gNB_id][0]->current_harq_pid = TST_DL_HARQ_PID_SECOND;
harq_status = &ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[TST_DL_HARQ_PID_SECOND].harq_ack;
harq_status->n_CCE = 2;
harq_status->N_CCE = 4;
harq_status->pucch_resource_indicator = 1;
harq_status->send_harq_status = 1;
harq_status->vDAI_DL = 2;
harq_status->ack = DL_ACK;
harq_status->slot_for_feedback_ack = proc->nr_slot_tx;
printf("\n => Test : PUCCH format from common config in dedicated mode: two positive downlink ACKnowledgments \n");
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
v_return = -1;
}
harq_status->decodeResult = false;
printf("\n => Test : PUCCH format from common config in dedicated mode: one positive and one negative downlink ACKnowledgments \n");
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
v_return = -1;
}
ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[TST_DL_HARQ_PID_FIRST].harq_ack.ack = DL_NACK;
printf("\n => Test : PUCCH format from common config in dedicated mode: two negative downlink ACKnowledgments \n");
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
v_return = -1;
}
harq_status->ack = DL_ACK;
reset_harq = true;
printf("\n => Test : PUCCH format from common config in dedicated mode: no resource is found \n");
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) {
v_return = -1;
}
printf("\n => Test : PUCCH format from common config in dedicated mode: no PUCCH after reset of pending harq ACKnowledgments \n");
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) {
v_return = -1;
}
return (v_return);
}
/*******************************************************************
*
* NAME : init_pucch_dedicated_configuration
*
* PARAMETERS : none
*
* RETURN : none
*
* DESCRIPTION : initialisation of PUCCH from dedicated configuration
*
*********************************************************************/
void init_pucch_dedicated_configuration(PHY_VARS_NR_UE *ue, uint8_t gNB_id)
{
PUCCH_FormatConfig_t *p_format;
PUCCH_Resource_t *p_resource;
PUCCH_ResourceSet_t *p_resource_set;
int i,j;
/* set cell group parameters which are supported */
ue->cell_group_config.physicalCellGroupConfig.harq_ACK_SpatialBundlingPUCCH = false;
ue->cell_group_config.physicalCellGroupConfig.pdsch_HARQ_ACK_Codebook = dynamic;
ue->PDSCH_ServingCellConfig.codeBlockGroupTransmission = NULL;
ue->PDSCH_ServingCellConfig.nrofHARQ_ProcessesForPDSCH = 8;
printf("\nSet default pucch dedicated configuration \n");
for (i = 0; i < NB_DL_DATA_TO_UL_ACK; i++) {
ue->pucch_config_dedicated_nr[gNB_id].dl_DataToUL_ACK[i] = i + NR_UE_CAPABILITY_SLOT_RX_TO_TX;
}
/* set configuration for format 1 to 4 */
for (i = 0; i < NUMBER_PUCCH_FORMAT_NR-1; i++) {
p_format = calloc( 1, sizeof(PUCCH_FormatConfig_t));
if (p_format == NULL) {
printf("Error of memory allocation : at line %d in function %s of file %s \n", LINE_FILE , __func__, __FILE__);
assert(0);
}
else {
//printf("Allocation %p \n", p_format);
p_format->interslotFrequencyHopping = feature_disabled;
p_format->additionalDMRS = disable_feature;
p_format->maxCodeRate = i;
p_format->nrofSlots = 1;
p_format->pi2PBSK = feature_disabled;
p_format->simultaneousHARQ_ACK_CSI = disable_feature;
}
ue->pucch_config_dedicated_nr[gNB_id].formatConfig[i] = p_format;
}
/* 4 resource set with 8 resources */
/* for set 0 only format 0 and 1 can be used */
const pucch_format_nr_t tst_pucch_format[TST_NB_RESOURCE_SET][TST_NB_RESOURCES_PER_SET] = {
/* set 0 */ { pucch_format0_nr, pucch_format1_nr, pucch_format0_nr, pucch_format1_nr, pucch_format0_nr, pucch_format1_nr, pucch_format0_nr, pucch_format1_nr},
/* set 1 */ { pucch_format2_nr, pucch_format3_nr, pucch_format4_nr, pucch_format2_nr, pucch_format3_nr, pucch_format4_nr, pucch_format2_nr, pucch_format3_nr},
/* set 2 */ { pucch_format2_nr, pucch_format3_nr, pucch_format4_nr, pucch_format2_nr, pucch_format3_nr, pucch_format4_nr, pucch_format2_nr, pucch_format3_nr},
/* set 3 */ { pucch_format3_nr, pucch_format3_nr, pucch_format4_nr, pucch_format3_nr, pucch_format3_nr, pucch_format4_nr, pucch_format3_nr, pucch_format3_nr},
};
/* from TS 38.331 The field is not present in the first set (Set0) since the maximum Size of Set0 is specified to be 3 bit. */
const int tst_max_payload[TST_NB_RESOURCE_SET] = { 1, 2, 4, 9 };
int counter_resource_id = 0;
/* create TST_NB_RESOURCE_SET resources set with resources according to test tables */
/* each resource set has TST_NB_RESOURCES_PER_SET resources */
for (i = 0; i < TST_NB_RESOURCE_SET; i++) {
p_resource_set = calloc( 1, sizeof(PUCCH_ResourceSet_t));
if (p_resource_set == NULL) {
printf("Error of memory allocation : at line %d in function %s of file %s \n", LINE_FILE , __func__, __FILE__);
assert(0);
}
else {
//printf("Allocation %p \n", p_resource_set);
p_resource_set->pucch_ResourceSetId = i;
p_resource_set->maxPayloadMinus1 = tst_max_payload[i];
/* create resources for format 0 to 4 */
for (j = 0; j < TST_NB_RESOURCES_PER_SET; j++) {
p_resource_set->pucch_resource_id[j] = counter_resource_id;
p_resource = calloc( 1, sizeof(PUCCH_Resource_t));
if (p_resource == NULL) {
//printf("Error of memory allocation : at line %d in function %s of file %s \n", LINE_FILE , __func__, __FILE__);
assert(0);
}
else {
//printf("Allocation %p \n", p_resource);
p_resource->format_parameters.format = tst_pucch_format[i][j];
p_resource->pucch_ResourceId = counter_resource_id;
p_resource->startingPRB = i+1;
p_resource->intraSlotFrequencyHopping = 0;
p_resource->secondHopPRB = 0;
p_resource->format_parameters.initialCyclicShift = i+2;
p_resource->format_parameters.timeDomainOCC = 0;
p_resource->format_parameters.nrofPRBs = j + i;
p_resource->format_parameters.occ_length = 0;
p_resource->format_parameters.occ_Index = 0;
switch(p_resource->format_parameters.format) {
case 0:
p_resource->format_parameters.nrofSymbols = 1;
break;
case 1:
p_resource->format_parameters.timeDomainOCC = 10+j;
p_resource->format_parameters.nrofSymbols = 4+j;
p_resource->format_parameters.timeDomainOCC = j%6;
break;
case 2:
p_resource->format_parameters.nrofSymbols = 2;
break;
case 3:
p_resource->format_parameters.nrofSymbols = 4+j;
break;
case 4:
p_resource->format_parameters.nrofSymbols = 4+j;
p_resource->format_parameters.occ_length = 10+j;
// p_resource->format_parameters.occ_Index = 11+j;
p_resource->format_parameters.occ_Index = 0;
break;
default:
LOG_E(PHY,"Unknown format : at line %d in function %s of file %s \n", LINE_FILE , __func__, __FILE__);
}
p_resource->format_parameters.startingSymbolIndex = i;
}
ue->pucch_config_dedicated_nr[gNB_id].PUCCH_Resource[counter_resource_id] = p_resource;
counter_resource_id++; /* next resource id */
}
}
if (i == 0) { /* this is the first resource set */
p_resource_set->first_resources_set_R_PUCCH = j;
}
for (; j < MAX_NB_OF_PUCCH_RESOURCES_PER_SET; j++) {
p_resource_set->pucch_resource_id[j] = MAX_NB_OF_PUCCH_RESOURCES;
ue->pucch_config_dedicated_nr[gNB_id].PUCCH_ResourceSet[i] = p_resource_set;
}
}
}
/*******************************************************************
*
* NAME : relase_pucch_dedicated_configuration
*
* PARAMETERS : none
*
* RETURN : none
*
* DESCRIPTION : release of PUCCH dedicated configuration
*
*********************************************************************/
void release_pucch_dedicated_configuration(PHY_VARS_NR_UE *ue, uint8_t gNB_id)
{
int i;
printf("\nRelease default pucch dedicated configuration \n");
/* release of resources set */
for (i = 0; i < MAX_NB_OF_PUCCH_RESOURCE_SETS; i++) {
if (ue->pucch_config_dedicated_nr[gNB_id].PUCCH_ResourceSet[i] != NULL) {
//printf("Free %p \n", ue->pucch_config_dedicated_nr[gNB_id].PUCCH_ResourceSet[i]);
free(ue->pucch_config_dedicated_nr[gNB_id].PUCCH_ResourceSet[i]);
}
}
/* release of resources */
for (i = 0; i < MAX_NB_OF_PUCCH_RESOURCES; i++) {
if (ue->pucch_config_dedicated_nr[gNB_id].PUCCH_Resource[i] != NULL) {
//printf("Free %p \n", ue->pucch_config_dedicated_nr[gNB_id].PUCCH_Resource[i]);
free(ue->pucch_config_dedicated_nr[gNB_id].PUCCH_Resource[i]);
}
}
/* release of format */
for (i = 0; i < NUMBER_PUCCH_FORMAT_NR-1; i++) {
if (ue->pucch_config_dedicated_nr[gNB_id].formatConfig[i] != NULL) {
//printf("Free %p \n", ue->pucch_config_dedicated_nr[gNB_id].formatConfig[i]);
free(ue->pucch_config_dedicated_nr[gNB_id].formatConfig[i]);
}
}
}
/*******************************************************************
*
* NAME : test_pucch_dedicated_single_transport_block
*
* PARAMETERS : ue context
* gNB identity
* current rx and tx time frame
*
* RETURN : none
*
* DESCRIPTION : test of PUCCH from dedicated configuration
* get DAI values from downlink harq and the generates
* acknownledgment with a PUCCH
*
*********************************************************************/
int test_pucch_dedicated_single_transport_block(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *proc)
{
#define TST_NB_STEP_SINGLE_TRANSPORT_BLOCK (4)
int v_return = 0;
int reset_harq = false;
int dl_harq_pid[TST_NB_STEP_SINGLE_TRANSPORT_BLOCK] = {TST_DL_HARQ_PID_FIRST, TST_DL_HARQ_PID_SECOND, TST_DL_HARQ_PID_THIRD, TST_DL_HARQ_PID_FOURTH };
int pucch_resource_indicator[TST_NB_STEP_SINGLE_TRANSPORT_BLOCK][2] = { { 0, 4 }, { 1, 0 } , { 1, 3 } , { 5, 7 } };
NR_UE_DL_HARQ_STATUS_t *harq_status;
ue->PDSCH_Config.maxNrofCodeWordsScheduledByDCI = nb_code_n1;
printf("%s", tst_separator);
ue->dlsch[proc->thread_id][gNB_id][0]->current_harq_pid = TST_DL_HARQ_PID_FIRST;
harq_status = &ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[TST_DL_HARQ_PID_FIRST].harq_ack;
harq_status->slot_for_feedback_ack = proc->nr_slot_tx;
harq_status->send_harq_status = 1;
harq_status->vDAI_DL = 1;
harq_status->ack = DL_ACK;
harq_status->pucch_resource_indicator = MAX_PUCCH_RESOURCE_INDICATOR;
printf("\n => Test : PUCCH format from dedicated config : pucch resource indicator is invalid \n");
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) {
v_return = -1;
}
for (int i = 0; i < TST_NB_STEP_SINGLE_TRANSPORT_BLOCK; i++) {
/* set a tx slot with no ack */
ue->dlsch[proc->thread_id][gNB_id][0]->current_harq_pid = dl_harq_pid[i];
NR_UE_DL_HARQ_STATUS_t *harq_status = &ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[dl_harq_pid[i]].harq_ack;
harq_status->slot_for_feedback_ack = proc->nr_slot_tx;
harq_status->send_harq_status = 1;
harq_status->vDAI_DL = i+1;
harq_status->ack = DL_ACK;
for (int j = 0 ; j < 2; j++) {
/* reset ack context on last test */
if ((i == (TST_NB_STEP_SINGLE_TRANSPORT_BLOCK-1)) && (j == 1)) {
reset_harq = true;
}
harq_status->pucch_resource_indicator = pucch_resource_indicator[i][j];
printf("\n => Test : PUCCH format from dedicated config with 1 transport block : with %d downlink ACKnowledgments and pucch resource indicator %d \n", i+1, pucch_resource_indicator[i][j]);
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
v_return = -1;
}
}
}
/* Test with missed PDSCH */
/* some transport blocks have been missed and they need to be nack by UE in order to be retransmitted by the network */
int i;
for (i = 1; i < TST_NB_STEP_SINGLE_TRANSPORT_BLOCK; i = i+2) {
/* set a tx slot with no ack */
ue->dlsch[proc->thread_id][gNB_id][0]->current_harq_pid = dl_harq_pid[i];
NR_UE_DL_HARQ_STATUS_t *harq_status = &ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[dl_harq_pid[i]].harq_ack;
harq_status->slot_for_feedback_ack = proc->nr_slot_tx;
harq_status->send_harq_status = 1;
harq_status->vDAI_DL = i+1;
harq_status->ack = DL_ACK;
harq_status->pucch_resource_indicator = pucch_resource_indicator[i][0];
}
reset_harq = true;
printf("\n => Test : PUCCH format from dedicated config with 1 transport block and missed PDSCH : with %d downlink ACKnowledgments and pucch resource indicator %d \n", i+1, pucch_resource_indicator[3][0]);
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
v_return = -1;
}
return (v_return);
}
/*******************************************************************
*
* NAME : test_pucch_dedicated_config_two_transport_blocks
*
* PARAMETERS : ue context
* gNB identity
* current rx and tx time frame
*
* RETURN : none
*
* DESCRIPTION : test of PUCCH from dedicated configuration
* get DAI values from downlink harq and the generates
* acknownledgment with a PUCCH
*
*********************************************************************/
int test_pucch_dedicated_two_transport_blocks(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *proc)
{
#define TST_NB_STEP_TWO_TRANSPORT_BLOCKS (4)
int v_return = 0;
int reset_harq = false;
int dl_harq_pid[TST_NB_STEP_TWO_TRANSPORT_BLOCKS] = {TST_DL_HARQ_PID_FIRST, TST_DL_HARQ_PID_SECOND, TST_DL_HARQ_PID_THIRD, TST_DL_HARQ_PID_FOURTH };
int pucch_resource_indicator[TST_NB_STEP_TWO_TRANSPORT_BLOCKS][2] = { { 0, 1 }, { 3, 7 } , { 2 , 4 } , { 4 , 6 } };
NR_UE_DL_HARQ_STATUS_t *harq_status;
int TB_identifier = 1;
int thread_number = TST_THREAD_ID;
ue->PDSCH_Config.maxNrofCodeWordsScheduledByDCI = nb_code_n2;
printf("%s", tst_separator);
/* create context for second transport block */
config_downlink_harq_process(ue , gNB_id, TB_identifier, thread_number, NR_DEFAULT_DLSCH_HARQ_PROCESSES);
for (int i = 0; i < TST_NB_STEP_TWO_TRANSPORT_BLOCKS; i++) {
for (int code_word = 0; code_word < 2; code_word++) {
ue->dlsch[proc->thread_id][gNB_id][code_word]->Number_MCS_HARQ_DL_DCI = 2;
/* set a tx slot with no ack */
ue->dlsch[proc->thread_id][gNB_id][code_word]->current_harq_pid = dl_harq_pid[i];
NR_UE_DL_HARQ_STATUS_t *harq_status = &ue->dlsch[proc->thread_id][gNB_id][code_word]->harq_processes[dl_harq_pid[i]].harq_ack;
harq_status->slot_for_feedback_ack = proc->nr_slot_tx;
harq_status->send_harq_status = 1;
harq_status->vDAI_DL = i+1;
harq_status->ack = DL_ACK;
}
for (int j = 0 ; j < 2; j++) {
/* reset ack context on last test */
if ((i == (TST_NB_STEP_TWO_TRANSPORT_BLOCKS-1)) && (j == 1)) {
reset_harq = true;
}
harq_status = &ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[dl_harq_pid[i]].harq_ack;
harq_status->pucch_resource_indicator = pucch_resource_indicator[i][j];
printf("\n => Test : PUCCH format from dedicated config with 2 transport blocks : with %d downlink ACKnowledgments and pucch resource indicator %d \n", i+1, pucch_resource_indicator[i][j]);
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
printf("Test fail \n");
v_return = -1;
}
}
}
/* Test with missed PDSCH */
/* some transport blocks have been missed and they need to be nack by UE in order to be retransmitted by the network */
/* here first and third block receptions have been missed */
reset_harq = true;
for (int i = 1; i < TST_NB_STEP_TWO_TRANSPORT_BLOCKS; i = i + 1) {
for (int code_word = 0; code_word < 2; code_word++) {
ue->dlsch[proc->thread_id][gNB_id][code_word]->Number_MCS_HARQ_DL_DCI = 2;
/* set a tx slot with no ack */
ue->dlsch[proc->thread_id][gNB_id][code_word]->current_harq_pid = dl_harq_pid[i];
NR_UE_DL_HARQ_STATUS_t *harq_status = &ue->dlsch[proc->thread_id][gNB_id][code_word]->harq_processes[dl_harq_pid[i]].harq_ack;
harq_status->slot_for_feedback_ack = proc->nr_slot_tx;
harq_status->send_harq_status = 1;
harq_status->vDAI_DL = i+1;
harq_status->ack = DL_ACK;
for (int j = 0 ; j < 2; j++) {
harq_status = &ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[dl_harq_pid[i]].harq_ack;
harq_status->pucch_resource_indicator = pucch_resource_indicator[i][j];
}
}
}
printf("\n => Test : PUCCH format from dedicated config with 2 transport blocks and 1 missed PDSCH : with %d downlink ACKnowledgments and pucch resource indicator %d \n", 4, pucch_resource_indicator[3][0]);
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
printf("Test fail \n");
v_return = -1;
}
printf("\n => Test : PUCCH format from dedicated config with 2 transport blocks and 2 missed PDSCH : with %d downlink ACKnowledgments and pucch resource indicator %d \n", 4, pucch_resource_indicator[3][0]);
for (int i = 1; i < TST_NB_STEP_TWO_TRANSPORT_BLOCKS; i = i + 2) {
for (int code_word = 0; code_word < 2; code_word++) {
ue->dlsch[proc->thread_id][gNB_id][code_word]->Number_MCS_HARQ_DL_DCI = 2;
/* set a tx slot with no ack */
ue->dlsch[proc->thread_id][gNB_id][code_word]->current_harq_pid = dl_harq_pid[i];
NR_UE_DL_HARQ_STATUS_t *harq_status = &ue->dlsch[proc->thread_id][gNB_id][code_word]->harq_processes[dl_harq_pid[i]].harq_ack;
harq_status->slot_for_feedback_ack = proc->nr_slot_tx;
harq_status->send_harq_status = 1;
harq_status->vDAI_DL = i+1;
harq_status->ack = DL_ACK;
for (int j = 0 ; j < 2; j++) {
harq_status = &ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[dl_harq_pid[i]].harq_ack;
harq_status->pucch_resource_indicator = pucch_resource_indicator[i][j];
}
}
}
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
printf("Test fail \n");
v_return = -1;
}
ue->PDSCH_Config.maxNrofCodeWordsScheduledByDCI = nb_code_n1; /* set to default value */
return (v_return);
}
/*******************************************************************
*
* NAME : tst_set_scheduling_request_configuration
*
* PARAMETERS : resource identity
* period and offset
*
* RETURN : none
*
* DESCRIPTION : set configuration of scheduling request
*
*********************************************************************/
void tst_set_scheduling_request_configuration (PHY_VARS_NR_UE *ue, int gNB_id, int sr_config_index, int resource_id, sr_periodicity_t periodicity, int offset)
{
SchedulingRequestResourceConfig_t *p_scheduling_request_config = calloc( 1, sizeof(SchedulingRequestResourceConfig_t));
p_scheduling_request_config->schedulingRequestResourceId = 0;
p_scheduling_request_config->schedulingRequestID = 0;
p_scheduling_request_config->resource = resource_id;
p_scheduling_request_config->periodicity = periodicity;
p_scheduling_request_config->offset = offset;
ue->scheduling_request_config_nr[gNB_id].sr_ResourceConfig[sr_config_index] = p_scheduling_request_config;
ue->scheduling_request_config_nr[gNB_id].active_sr_id = sr_config_index;
}
/*******************************************************************
*
* NAME : tst_free_scheduling_request_configuration
*
* PARAMETERS : resource identity
* period and offset
*
* RETURN : none
*
* DESCRIPTION : set configuration of scheduling request
*
*********************************************************************/
void tst_free_scheduling_request_configuration (PHY_VARS_NR_UE *ue, int gNB_id, int sr_config_index)
{
free(ue->scheduling_request_config_nr[gNB_id].sr_ResourceConfig[sr_config_index]);
ue->scheduling_request_config_nr[gNB_id].sr_ResourceConfig[sr_config_index] = NULL;
}
/*******************************************************************
*
* NAME : tst_ue_get_SR
*
* PARAMETERS : frameP is the sr payload
*
* RETURN : frameP is the sr payload
*
* DESCRIPTION : return payload of scheduling request
*
*********************************************************************/
uint32_t tst_ue_get_SR(module_id_t module_idP,int CC_id,frame_t frameP,uint8_t eNB_id,uint16_t rnti, sub_frame_t subframe)
{
VOID_PARAMETER module_idP;
VOID_PARAMETER CC_id;
VOID_PARAMETER frameP;
VOID_PARAMETER eNB_id;
VOID_PARAMETER subframe;
VOID_PARAMETER rnti;
return (tst_scheduling_request_payload);
}
/*******************************************************************
*
* NAME : tst_set_sr_config
*
* PARAMETERS : ue context
* gNB_id identity
*
* RETURN : none
*
* DESCRIPTION : set sr configuration
*
*********************************************************************/
void tst_set_sr_config(PHY_VARS_NR_UE *ue, int gNB_id) {
ue->scheduling_request_config[gNB_id].sr_ConfigIndex = 0;
p_nr_ue_get_SR = tst_ue_get_SR;
}
/*******************************************************************
*
* NAME : test_sr_dedicated
*
* PARAMETERS : ue context
* gNB identity
* current rx and tx time frame
*
* RETURN : none
*
* DESCRIPTION : test of PUCCH from dedicated configuration
* with scheduling request
*
*********************************************************************/
int test_sr_alone_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *proc)
{
int v_return = 0;
int reset_harq = 0;
int sr_config_id = 0;
int sr_resource_id = 0;
int sr_offset = 0;
printf("%s", tst_separator);
tst_set_scheduling_request_configuration( ue, gNB_id, sr_config_id, sr_resource_id, sr_sl1, sr_offset);
tst_set_sr_config( ue, gNB_id);
printf("\n => Test : PUCCH format from dedicated config with only a negative scheduling request : no PUCCH should be generated \n");
tst_scheduling_request_payload = 0;
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) {
printf("Test fail \n");
v_return = -1;
}
printf("\n => Test : PUCCH format 0 from dedicated config with only a positive scheduling request \n");
tst_scheduling_request_payload = 1;
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
printf("Test fail \n");
v_return = -1;
}
printf("\n => Test : PUCCH format 1 from dedicated config with only a positive scheduling request \n");
sr_resource_id = 1;
tst_set_scheduling_request_configuration( ue, gNB_id, sr_config_id, sr_resource_id, sr_sl1, sr_offset );
tst_scheduling_request_payload = 1;
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
printf("Test fail \n");
v_return = -1;
}
/* restore single transport block */
ue->dlsch[proc->thread_id][gNB_id][0]->Number_MCS_HARQ_DL_DCI = 1;
return (v_return);
}
/*******************************************************************
*
* NAME : test_sr_ack_dedicated
*
* PARAMETERS : ue context
* gNB identity
* current rx and tx time frame
*
* RETURN : none
*
* DESCRIPTION : test of PUCCH from dedicated configuration
* with scheduling request and acknowledgment
*
*********************************************************************/
int test_sr_ack_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *proc)
{
int v_return = 0;
bool reset_harq = false;
int sr_config_id = 0;
int sr_resource_id = 0;
int sr_offset = 0;
int pucch_resource_indicator[5] = { 0, 1, 2, 3, 4 };
printf("%s", tst_separator);
tst_set_scheduling_request_configuration( ue, gNB_id, sr_config_id, sr_resource_id, sr_sl1, sr_offset);
tst_set_sr_config( ue, gNB_id);
printf("\n => Test : PUCCH format from dedicated config with a negative scheduling request and a positive ack \n");
/* set a first harq ack context */
NR_UE_DL_HARQ_STATUS_t *harq_status;
ue->dlsch[proc->thread_id][gNB_id][0]->current_harq_pid = TST_DL_HARQ_PID_FIRST;
harq_status = &ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[TST_DL_HARQ_PID_FIRST].harq_ack;
harq_status->slot_for_feedback_ack = proc->nr_slot_tx;
harq_status->send_harq_status = 1;
harq_status->vDAI_DL = 1;
harq_status->ack = DL_ACK;
harq_status->pucch_resource_indicator = pucch_resource_indicator[0];
tst_scheduling_request_payload = 0; /* set sr payload */
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
printf("Test fail \n");
v_return = -1;
}
printf("\n => Test : PUCCH format from dedicated config with a positive scheduling request and a positive ack \n");
tst_scheduling_request_payload = 1; /* set sr payload */
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
printf("Test fail \n");
v_return = -1;
}
printf("\n => Test : PUCCH format from dedicated config with a positive scheduling request and a positive ack \n");
harq_status->pucch_resource_indicator = pucch_resource_indicator[1];
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
printf("Test fail \n");
v_return = -1;
}
printf("\n => Test : PUCCH format from dedicated config with a positive scheduling request and two positive acks \n");
/* set a second harq ack context */
ue->dlsch[proc->thread_id][gNB_id][0]->current_harq_pid = TST_DL_HARQ_PID_SECOND;
harq_status = &ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[TST_DL_HARQ_PID_SECOND].harq_ack;
harq_status->slot_for_feedback_ack = proc->nr_slot_tx;
harq_status->send_harq_status = 1;
harq_status->vDAI_DL = 2;
harq_status->ack = DL_ACK;
harq_status->pucch_resource_indicator = pucch_resource_indicator[0];
tst_scheduling_request_payload = 1; /* set sr payload */
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
printf("Test fail \n");
v_return = -1;
}
printf("\n => Test : PUCCH format from dedicated config with a positive scheduling request and two positive acks \n");
harq_status->pucch_resource_indicator = pucch_resource_indicator[1];
reset_harq = true;
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
printf("Test fail \n");
v_return = -1;
}
tst_free_scheduling_request_configuration(ue, gNB_id, sr_config_id);
return (v_return);
}
/*******************************************************************
*
* NAME : test_csi_dedicated
*
* PARAMETERS : ue context
* gNB identity
* current rx and tx time frame
*
* RETURN : none
*
* DESCRIPTION : test of PUCCH from dedicated configuration
* with channel state information CSI
*
*********************************************************************/
int test_csi_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *proc)
{
int v_return = 0;
int reset_harq = false;
int sr_config_id = 0;
int sr_resource_id = 0;
int sr_offset = 0;
int pucch_resource_indicator[5] = { 0, 1, 2, 3, 4 };
printf("%s", tst_separator);
ue->dlsch[proc->thread_id][gNB_id][0]->current_harq_pid = NR_MAX_DLSCH_HARQ_PROCESSES;
printf("\n => Test : PUCCH format from dedicated config with CSI alone \n");
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
printf("Test fail \n");
v_return = -1;
}
printf("\n => Test : PUCCH format from dedicated config with ACK and CSI \n");
/* set a first harq ack context */
NR_UE_DL_HARQ_STATUS_t *harq_status;
ue->dlsch[proc->thread_id][gNB_id][0]->current_harq_pid = TST_DL_HARQ_PID_FIRST;
harq_status = &ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[TST_DL_HARQ_PID_FIRST].harq_ack;
harq_status->slot_for_feedback_ack = proc->nr_slot_tx;
harq_status->send_harq_status = 1;
harq_status->vDAI_DL = 1;
harq_status->ack = DL_ACK;
harq_status->pucch_resource_indicator = pucch_resource_indicator[3];
ue->pucch_config_dedicated_nr[gNB_id].formatConfig[2-1]->simultaneousHARQ_ACK_CSI = enable_feature; /* format 2 */
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
printf("Test fail \n");
v_return = -1;
}
printf("\n => Test : PUCCH format from dedicated config with ACK, negative SR and CSI \n");
tst_set_scheduling_request_configuration( ue, gNB_id, sr_config_id, sr_resource_id, sr_sl1, sr_offset);
tst_set_sr_config( ue, gNB_id);
tst_scheduling_request_payload = 0; /* set sr payload */
reset_harq = true;
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
printf("Test fail \n");
v_return = -1;
}
printf("\n => Test : PUCCH format from dedicated config with negative SR and CSI \n");
harq_status->pucch_resource_indicator = pucch_resource_indicator[4];
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
printf("Test fail \n");
v_return = -1;
}
tst_scheduling_request_payload = 1;
printf("\n => Test : PUCCH format from dedicated config with positive SR and CSI \n");
if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
printf("Test fail \n");
v_return = -1;
}
return (v_return);
}
/*******************************************************************
*
* NAME : test_pucch
*
* PARAMETERS : none
*
* RETURN : none
*
* DESCRIPTION : test of PUCCH feature
*
*********************************************************************/
int test_pucch(PHY_VARS_NR_UE *ue)
{
int gNB_id = TST_GNB_ID_0;
int thread_number = TST_THREAD_ID;
int TB_identifier = 0;
int v_return = 0;
UE_nr_rxtx_proc_t *proc = calloc( 1, sizeof(UE_nr_rxtx_proc_t));
if (proc == NULL) {
printf("Error test_srs: memory allocation problem p_rxtx_proc \n");
assert(0);
}
proc->frame_rx = 0;
proc->nr_slot_rx = 0;
proc->frame_tx = proc->frame_rx + (proc->nr_slot_rx + NR_UE_CAPABILITY_SLOT_RX_TO_TX) / ue->frame_parms.slots_per_frame;
proc->nr_slot_tx = (proc->nr_slot_rx + NR_UE_CAPABILITY_SLOT_RX_TO_TX) % ue->frame_parms.slots_per_frame;
init_pucch_power_configuration( ue, gNB_id);
/* init and clear downlink harq */
config_downlink_harq_process(ue , gNB_id, TB_identifier, thread_number, NR_DEFAULT_DLSCH_HARQ_PROCESSES);
if (test_pucch_basic_error(ue, gNB_id, proc) != 0) {
v_return = -1;
return (v_return);
}
if (test_pucch_common_config_single_transport_block(ue, gNB_id, proc) != 0) {
v_return = -1;
return (v_return);
}
init_pucch_dedicated_configuration(ue , gNB_id);
if (test_pucch_dedicated_single_transport_block(ue, gNB_id, proc) != 0) {
v_return = -1;
return (v_return);
}
if (test_pucch_dedicated_two_transport_blocks(ue, gNB_id, proc) != 0) {
v_return = -1;
return (v_return);
}
if (test_sr_alone_dedicated(ue, gNB_id, proc) != 0) {
v_return = -1;
return (v_return);
}
if (test_sr_ack_dedicated(ue, gNB_id, proc) != 0) {
v_return = -1;
return (v_return);
}
if (test_csi_dedicated(ue, gNB_id, proc) != 0) {
v_return = -1;
return (v_return);
}
release_downlink_harq_process(ue, gNB_id, TB_identifier, thread_number);
release_pucch_dedicated_configuration(ue , gNB_id);
free(proc);
return (v_return);
}
/*******************************************************************
*
* NAME : main
*
* DESCRIPTION : test of uplink sounding reference signal aka SRS feature
*
*********************************************************************/
int main(int argc, char *argv[])
{
uint8_t transmission_mode = 1;
uint8_t nb_antennas_tx = 1;
uint8_t nb_antennas_rx = 1;
uint8_t frame_type = FDD;
int N_RB_DL=100;
lte_prefix_type_t extended_prefix_flag = NORMAL;
int Nid_cell[] = {(3*1+3)};
VOID_PARAMETER argc;
VOID_PARAMETER argv;
printf(" PUCCH TEST \n");
printf("-----------\n");
if (init_test(nb_antennas_tx, nb_antennas_rx, transmission_mode, extended_prefix_flag, frame_type, Nid_cell[0], N_RB_DL) != 0) {
printf("Initialisation problem for test \n");
exit(-1);;
}
if (test_pucch(PHY_vars_UE) != 0) {
printf("\nTest PUCCH is fail \n");
}
else {
printf("\nTest PUCCH is pass \n");
}
free_context_synchro_nr();
return(0);
}
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/**********************************************************************
*
* FILENAME : pbch_test.c
*
* MODULE : UE test bench for sss tests
*
* DESCRIPTION : it allows unitary tests for SSS on host machine
*
************************************************************************/
#include <stdlib.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <limits.h>
#include "../../unit_tests/src/pss_util_test.h"
#include "PHY/defs_nr_UE.h"
#include "PHY/INIT/init_extern.h"
#include "PHY/phy_extern_nr_ue.h"
#include "PHY/NR_REFSIG/ul_ref_seq_nr.h"
#include "PHY/NR_UE_TRANSPORT/srs_modulation_nr.h"
/*******************************************************************
*
* NAME : generate_reference_signals
*
* PARAMETERS : none
*
* RETURN : none
*
* DESCRIPTION : generate sequence of reference signals
*
*********************************************************************/
void generate_reference_signals(void)
{
int number_differencies = 0;;
int u, v, Msc_RS;
generate_ul_reference_signal_sequences(SHRT_MAX);
generate_ul_ref_sigs();
for (Msc_RS = 2; Msc_RS < 33; Msc_RS++) {
for (u=0; u < U_GROUP_NUMBER; u++) {
for (v=0; v < V_BASE_SEQUENCE_NUMBER; v++) {
int number_differencies = 0;
/* find index of table which is for this srs length */
unsigned int Msc_RS_index_nr = 0;
while((ul_allocated_re[Msc_RS_index_nr] != dftsizes[Msc_RS]) && (Msc_RS_index_nr < SRS_SB_CONF)){
Msc_RS_index_nr++;
}
if (Msc_RS_index_nr == SRS_SB_CONF) {
printf("No nr index found for length %d \n", dftsizes[Msc_RS]);
assert(0);
}
for (int n=0; n<ul_allocated_re[Msc_RS]; n++) {
if ((ul_ref_sigs[u][v][Msc_RS][n].r != rv_ul_ref_sig[u][v][Msc_RS_index_nr][n].r)
|| (ul_ref_sigs[u][v][Msc_RS][n].i != rv_ul_ref_sig[u][v][Msc_RS_index_nr][n].i)) {
number_differencies++;
}
}
}
if (number_differencies != 0) {
printf("Differencies for u %d v %d Msc_RS %d differencies %d \n", u, v, Msc_RS, number_differencies);
assert(0);
}
else {
//printf("no differencies for u %d v %d Msc_RS %d of size %d differencies %d \n", u, v, Msc_RS, dftsizes[Msc_RS], number_differencies);
}
}
}
printf("Ok: No detected differences for uplink reference sequences \n");
}
/*******************************************************************
*
* NAME : default_srs_configuration
*
* PARAMETERS : none
*
* RETURN : none
*
* DESCRIPTION : set srs default configuration
*
*********************************************************************/
void default_srs_configuration(NR_DL_FRAME_PARMS *frame_parms)
{
SRS_ResourceSet_t *p_srs_resource_set;
SRS_Resource_t *p_srs_resource;
p_srs_resource_set = calloc( 1, sizeof(SRS_ResourceSet_t));
if (p_srs_resource_set == NULL) {
printf("Error default_srs_configuration: memory allocation problem \n");
assert(0);
}
else {
frame_parms->srs_nr.active_srs_Resource_Set = 0;
frame_parms->srs_nr.number_srs_Resource_Set++;
frame_parms->srs_nr.p_SRS_ResourceSetList[0] = p_srs_resource_set;
}
p_srs_resource = calloc( 1, sizeof(SRS_Resource_t));
if (p_srs_resource == NULL) {
free(p_srs_resource_set);
printf("Error default_srs_configuration: memory allocation problem \n");
assert(0);
}
/* init resource */
p_srs_resource->nrof_SrsPorts = port1;
p_srs_resource->transmissionComb = 2; /* K_TC */
p_srs_resource->resourceMapping_nrofSymbols = 1;
p_srs_resource->resourceMapping_repetitionFactor = 1;
p_srs_resource->SRS_Periodicity = sr_sl4;
p_srs_resource->SRS_Offset = 3;
/* init resource set with only 1 resource */
p_srs_resource_set->resourceType = periodic;
p_srs_resource_set->number_srs_Resource++;
frame_parms->srs_nr.p_SRS_ResourceSetList[0]->p_srs_ResourceList[0] = p_srs_resource;
}
/*******************************************************************
*
* NAME : test_srs_single
*
* PARAMETERS : none
*
* RETURN : none
*
* DESCRIPTION : test of SRS feature
* for various combinations of parameters
*
*********************************************************************/
int test_srs_single(NR_DL_FRAME_PARMS *frame_parms, c16_t *txptr, UE_nr_rxtx_proc_t *proc)
{
SRS_Resource_t *p_SRS_Resource = frame_parms->srs_nr.p_SRS_ResourceSetList[0]->p_srs_ResourceList[0];
if (generate_srs_nr(frame_parms->srs_nr.p_SRS_ResourceSetList[0],
frame_parms,
txptr,
AMP,
proc) != 0) {
printf("Ok: test_srs_single for K_TC %d comboffset %d cyclicShift %d u %d B_SRS %d C_SRS %d n_shift %d n_RRC %d b_hop %d groupOrSequenceHopping %d "
" sequenceId %d l_offset %d \n",
p_SRS_Resource->transmissionComb, p_SRS_Resource->combOffset, p_SRS_Resource->cyclicShift, p_SRS_Resource->sequenceId,
p_SRS_Resource->freqHopping_b_SRS, p_SRS_Resource->freqHopping_c_SRS, p_SRS_Resource->freqDomainPosition,
p_SRS_Resource->freqDomainShift, p_SRS_Resource->freqHopping_b_hop, p_SRS_Resource->groupOrSequenceHopping,
p_SRS_Resource->sequenceId, p_SRS_Resource->resourceMapping_startPosition);
printf("Error: generate_srs_nr was not successfully executed ! \n");
return (-1);
}
else {
#if 1
printf("Ok: test_srs_single for K_TC %d comboffset %d cyclicShift %d u %d B_SRS %d C_SRS %d n_shift %d n_RRC %d b_hop %d groupOrSequenceHopping %d "
" sequenceId %d l_offset %d \n",
p_SRS_Resource->transmissionComb, p_SRS_Resource->combOffset, p_SRS_Resource->cyclicShift, p_SRS_Resource->sequenceId,
p_SRS_Resource->freqHopping_b_SRS, p_SRS_Resource->freqHopping_c_SRS, p_SRS_Resource->freqDomainPosition,
p_SRS_Resource->freqDomainShift, p_SRS_Resource->freqHopping_b_hop, p_SRS_Resource->groupOrSequenceHopping,
p_SRS_Resource->sequenceId, p_SRS_Resource->resourceMapping_startPosition);
#endif
return (0);
}
}
/*******************************************************************
*
* NAME : test_srs_periodicity
*
* PARAMETERS : none
*
* RETURN : none
*
* DESCRIPTION : test of SRS feature
* for various combinations of parameters
*
*********************************************************************/
int test_srs_periodicity(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc)
{
NR_DL_FRAME_PARMS *frame_parms = &(ue->frame_parms);
SRS_Resource_t *p_srs_resource = frame_parms->srs_nr.p_SRS_ResourceSetList[0]->p_srs_ResourceList[0];
for (int test_index = 0; test_index < NB_SRS_PERIOD; test_index++) {
p_srs_resource->SRS_Periodicity = test_index;
int srs_current_period = srs_period[p_srs_resource->SRS_Periodicity];
for (int offset = 0 ; offset < 2; offset++) {
if (offset == 0) {
p_srs_resource->SRS_Offset = 0;
}
else {
p_srs_resource->SRS_Offset = srs_current_period - 1;
}
printf("srs period %d offset %d \n", srs_current_period, p_srs_resource->SRS_Offset);
int duration = (10 * srs_current_period) / frame_parms->slots_per_frame;
for (int frame_tx = 0; frame_tx < duration; frame_tx++) {
for (int slot_tx = 0; slot_tx < frame_parms->slots_per_frame; slot_tx++) {
proc->frame_tx = frame_tx;
proc->nr_slot_tx = slot_tx;
if (ue_srs_procedures_nr( ue, proc, 0) == 0) {
printf("test_srs_periodicity srs at frame %d slot %d \n", frame_tx, slot_tx);
}
}
}
}
}
return(0);
}
/*******************************************************************
*
* NAME : test_srs_single
*
* PARAMETERS : none
*
* RETURN : none
*
* DESCRIPTION : test of SRS feature
* for various combinations of parameters
*
*********************************************************************/
int test_srs_specific(NR_DL_FRAME_PARMS *frame_parms,
int32_t *txptr,
UE_nr_rxtx_proc_t *proc)
{
#define NUMBER_TEST_PARAMETERS (12)
//#define SRS_TEST_HOPPING
#ifdef SRS_TEST_HOPPING
#define NUMBER_SRS_TEST (5)
#else
#define NUMBER_SRS_TEST (3)
#endif
SRS_Resource_t *p_SRS_Resource = frame_parms->srs_nr.p_SRS_ResourceSetList[0]->p_srs_ResourceList[0];
uint8_t test_parameters[NUMBER_SRS_TEST][NUMBER_TEST_PARAMETERS] = {
/* K_TC comboffset cyclicShift u B_SRS C_SRS n_shift b_hop n_RRC groupOrSequenceHopping sequenceId l_offset*/
{ 2, 0, 0, 0, 1, 3, 0, 3, 0, neitherHopping, 0, 0 },
{ 2, 0, 0, 0, 1, 3, 0, 3, 2, neitherHopping, 0, 1 },
{ 2, 0, 0, 0, 3, 3, 0, 1, 0, neitherHopping, 0, 0 },
#ifdef SRS_TEST_HOPPING
{ 2, 0, 0, 0, 1, 3, 0, 0, 0, groupHopping, 30, 0 },
{ 2, 0, 0, 0, 0, 14, 0, 0, 0, sequenceHopping, 55, 1 },
#endif
};
for (int test_index = 0; test_index < NUMBER_SRS_TEST; test_index++) {
p_SRS_Resource->transmissionComb = test_parameters[test_index][0]; /* K_TC */
p_SRS_Resource->combOffset = test_parameters[test_index][1];
p_SRS_Resource->cyclicShift = test_parameters[test_index][2];
p_SRS_Resource->sequenceId = test_parameters[test_index][3];
p_SRS_Resource->freqHopping_b_SRS = test_parameters[test_index][4];
p_SRS_Resource->freqHopping_c_SRS = test_parameters[test_index][5];
p_SRS_Resource->freqDomainPosition = test_parameters[test_index][6];
p_SRS_Resource->freqHopping_b_hop = test_parameters[test_index][7];
p_SRS_Resource->freqDomainShift = (uint16_t)test_parameters[test_index][8];
p_SRS_Resource->groupOrSequenceHopping = test_parameters[test_index][9];
p_SRS_Resource->sequenceId = test_parameters[test_index][10];
p_SRS_Resource->resourceMapping_startPosition = test_parameters[test_index][11];
if (test_srs_single(frame_parms,
txptr,
proc) != 0) {
return (-1);
}
}
return (0);
}
/*******************************************************************
*
* NAME : test_srs_group
*
* PARAMETERS : none
*
* RETURN : none
*
* DESCRIPTION : test of SRS feature
* for various combinations of parameters
*
*********************************************************************/
int test_srs_group(NR_DL_FRAME_PARMS *frame_parms,
int32_t *txptr,
UE_nr_rxtx_proc_t *proc)
{
SRS_Resource_t *p_SRS_Resource = frame_parms->srs_nr.p_SRS_ResourceSetList[0]->p_srs_ResourceList[0];
uint8_t n_SRS_cs_max[5] = { 0, 0, 8, 0, 12};
int number_of_test = 0;
for (int K_TC = 2; K_TC < 5; K_TC = K_TC + 2) {
for (int comboffset = 0; comboffset < K_TC; comboffset++) {
for (int cyclicShift = 0; cyclicShift < n_SRS_cs_max[K_TC]; cyclicShift++) {
for (int u = 0; u < U_GROUP_NUMBER; u++) {
for (uint8_t B_SRS = 0; B_SRS < B_SRS_NUMBER; B_SRS++) {
for (uint8_t C_SRS = 0; C_SRS < C_SRS_NUMBER; C_SRS++) {
p_SRS_Resource->transmissionComb = K_TC;
p_SRS_Resource->combOffset = comboffset;
p_SRS_Resource->cyclicShift = cyclicShift;
p_SRS_Resource->sequenceId = u;
p_SRS_Resource->freqHopping_b_SRS = B_SRS;
p_SRS_Resource->freqHopping_c_SRS = C_SRS;
number_of_test++;
if (test_srs_single(frame_parms, txptr, proc) != 0) {
return (-1);
}
}
}
}
}
}
}
printf("Number of srs generations %d\n", number_of_test);
return (0);
}
/*******************************************************************
*
* NAME : test_srs
*
* PARAMETERS : none
*
* RETURN : none
*
* DESCRIPTION : test of SRS feature
*
*********************************************************************/
int test_srs(PHY_VARS_NR_UE *PHY_vars_UE)
{
int32_t *txptr;
NR_DL_FRAME_PARMS *frame_parms = &(PHY_vars_UE->frame_parms);
UE_nr_rxtx_proc_t *p_rxtx_proc;
int v_return = 0;
generate_reference_signals();
/* start test of sounding reference signals */
default_srs_configuration(frame_parms);
txptr = calloc(frame_parms->samples_per_slot , sizeof(int32_t));
if (txptr == NULL) {
printf("Error test_srs: memory allocation problem txptr \n");
assert(0);
}
p_rxtx_proc = calloc( 1, sizeof(UE_nr_rxtx_proc_t));
if (p_rxtx_proc == NULL) {
printf("Error test_srs: memory allocation problem p_rxtx_proc \n");
assert(0);
}
if (test_srs_group(frame_parms,
txptr,
p_rxtx_proc) != 0) {
v_return = -1;
}
if (test_srs_specific(frame_parms,
txptr,
p_rxtx_proc) != 0) {
v_return = -1;
}
if (test_srs_periodicity(PHY_vars_UE, p_rxtx_proc) != 0) {
v_return = -1;
}
for (int i = 0; i < frame_parms->srs_nr.number_srs_Resource_Set; i++) {
if (frame_parms->srs_nr.p_SRS_ResourceSetList[i] != NULL) {
for (int j = 0; j < frame_parms->srs_nr.p_SRS_ResourceSetList[i]->number_srs_Resource; j++) {
if (frame_parms->srs_nr.p_SRS_ResourceSetList[0]->p_srs_ResourceList[0] != NULL) {
free(frame_parms->srs_nr.p_SRS_ResourceSetList[0]->p_srs_ResourceList[0]);
}
else {
printf("Error test_srs: memory allocation problem p_srs_ResourceList \n");
assert(0);
}
}
free(frame_parms->srs_nr.p_SRS_ResourceSetList[i]);
}
else {
printf("Error test_srs: memory allocation problem \n");
assert(0);
}
}
free(txptr);
free(p_rxtx_proc);
free_ul_reference_signal_sequences();
free_ul_ref_sigs();
return (v_return);
}
/*******************************************************************
*
* NAME : main
*
* DESCRIPTION : test of uplink sounding reference signal aka SRS feature
*
*********************************************************************/
int main(int argc, char *argv[])
{
uint8_t transmission_mode = 1;
uint8_t nb_antennas_tx = 1;
uint8_t nb_antennas_rx = 1;
uint8_t frame_type = FDD;
int N_RB_DL=100;
lte_prefix_type_t extended_prefix_flag = NORMAL;
int Nid_cell[] = {(3*0+0)};
VOID_PARAMETER argc;
VOID_PARAMETER argv;
printf(" SRS TEST \n");
printf("----------\n");
if (init_test(nb_antennas_tx, nb_antennas_rx, transmission_mode, extended_prefix_flag, frame_type, Nid_cell[0], N_RB_DL) != 0) {
printf("Initialisation problem for synchronisation test \n");
exit(-1);;
}
if (test_srs(PHY_vars_UE) != 0) {
printf("Test NR SRS is fail \n");
}
else {
printf("Test NR SRS is pass \n");
}
free_context_synchro_nr();
return(0);
}
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/**********************************************************************
*
* FILENAME : sss_test.c
*
* MODULE : UE test bench for sss tests
*
* DESCRIPTION : it allows unitary tests for SSS on host machine
*
************************************************************************/
#include <stdlib.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <limits.h>
#include "../../unit_tests/src/pss_util_test.h"
#include "PHY/defs_nr_UE.h"
#include "PHY/INIT/init_extern.h"
#include "PHY/phy_extern_nr_ue.h"
#include "PHY/NR_REFSIG/ss_pbch_nr.h"
#include "PHY/NR_REFSIG/pss_nr.h"
#include "PHY/NR_REFSIG/sss_nr.h"
#include "PHY/NR_REFSIG/dmrs_nr.h"
/*******************************************************************
*
* NAME : test_synchro_pss_sss_nr
*
* INPUT : UE context
* for first and second pss sequence
* - position of pss in the received UE buffer
* - number of pss sequence
*
* RETURN : 0 if OK else error
*
* DESCRIPTION : detect pss sequences in the received UE buffer
* then detect sss sequence
*
* Test procedure:
* - reference pss sequences (first, second or both) are written at specific
* positions
* - correlation is done between the received buffer and the possible pss sequences
* - results indicate pss sequence number and correlation result
* - reference sss sequences are written at specific positions
* - correlation is done with possible sss sequence
*
* (10 ms)
* <--------------------------------------------------------------------------->
* -----------------------------------------------------------------------------
* | Received UE data buffer |
* ----------------------------------------------------------------------------
* ---------------------------------------------
* <-------------->| pss | pbch | sss | pbch |
* ---------------------------------------------
* offset
*
* SSS/PBCH block contains following symbols: pss + pbch + sss + pbch
*
*********************************************************************/
int test_synchro_pss_sss_nr(PHY_VARS_NR_UE *PHY_vars_UE, int position_symbol, NR_DL_FRAME_PARMS *frame_parms_gNB, test_t *test)
{
UE_nr_rxtx_proc_t proc = {0};
VOID_PARAMETER test;
int synchro_position;
int offset;
int16_t *tmp;
int32_t metric_fdd_ncp=0;
uint8_t phase_fdd_ncp;
int rate_change = SYNCHRO_RATE_CHANGE_FACTOR;
int Nid2 = GET_NID2(frame_parms_gNB->Nid_cell);
int Nid1 = GET_NID1(frame_parms_gNB->Nid_cell);
display_test_configuration_pss(position_symbol, Nid2);
set_sequence_pss(PHY_vars_UE, position_symbol, Nid2);
synchro_position = pss_synchro_nr(PHY_vars_UE, rate_change);
display_test_configuration_sss(Nid1);
synchro_position = synchro_position * rate_change;
if (abs(synchro_position - position_symbol) > PSS_DETECTION_MARGIN_MAX)
{
printf("NR Pss has been detected at position %d instead of %d \n", synchro_position, position_symbol);
}
/* symbols order for synchronisation block is PSS - PBCH - SSS */
/* knowing that synchronisation position gives pss ofdm start one can deduce start of sss symbol */
offset = (position_symbol + (SSS_SYMBOL_NB - PSS_SYMBOL_NB)*(PHY_vars_UE->frame_parms.ofdm_symbol_size + PHY_vars_UE->frame_parms.nb_prefix_samples));
tmp = (int16_t *)&PHY_vars_UE->common_vars.rxdata[0][offset];
insert_sss_nr(tmp, frame_parms_gNB);
PHY_vars_UE->rx_offset = position_symbol; /* offset is given for samples of type int16 */
#if 0
int samples_for_frame = PHY_vars_UE->frame_parms.samples_per_frame;
write_output("rxdata0_rand.m","rxd0_rand", &PHY_vars_UE->common_vars.rxdata[0][0], samples_for_frame, 1, 1);
#endif
#if TEST_SYNCHRO_TIMING_PSS
start_meas(&generic_time[TIME_SSS]);
#endif
rx_sss_nr(PHY_vars_UE, &proc, &metric_fdd_ncp, &phase_fdd_ncp);
#if TEST_SYNCHRO_TIMING_PSS
stop_meas(&generic_time[TIME_SSS]);
#ifndef NR_UNIT_TEST
printf("PSS execution duration %5.2f \n", generic_time[TIME_PSS].p_time/(cpuf*1000.0));
printf("SSS execution duration %5.2f \n", generic_time[TIME_SSS].p_time/(cpuf*1000.0));
#endif
#endif
return phase_fdd_ncp;
}
/*******************************************************************
*
* NAME : main
*
* DESCRIPTION : test bench for synchronisation sequence (pss/sss/pbch)
* purpose of test is to check that synchronisation sequence can be
* properly detected depending of input waveforms.
*
* - First step of synchronisation consists in pss search (primary synchronisation signal).
* pss sequence should be detected at the right position
* in the received buffer whatever the position along the
* received data buffer.
* Detection of position is based on correlation in time domain between
* received signal and pss sequence -> position is given by
* peak of correlation result.
* - Second step of synchronisation is sss decoding (secundary synchronisation signal).
* sss detection is based on position of detected pss.
*
*********************************************************************/
int main(int argc, char *argv[])
{
VOID_PARAMETER argc;
VOID_PARAMETER argv;
uint8_t transmission_mode = 1;
uint8_t nb_antennas_tx = 1;
uint8_t nb_antennas_rx = 1;
uint8_t frame_type = FDD;
int N_RB_DL=100;
lte_prefix_type_t extended_prefix_flag = NORMAL;
int phase;
int Nid1, Nid2;
NR_DL_FRAME_PARMS frame_parms_gNB;
const char *name_test = "SSS NR";
test_t test = { name_test, 0, 0, 0, 0};
#if 1
int test_position[] = { 0, 492, 493, 56788, 111111, 222222 }; /* this is the sample number in the frame */
#else
int test_position[] = {-1}; /* to get samples from an array */
#endif
int size_test_position = sizeof(test_position)/sizeof(int);
/* this is a pointer to the function in charge of the test */
int (*p_test_synchro_pss_sss)(PHY_VARS_NR_UE *PHY_vars_UE, int position_symbol, NR_DL_FRAME_PARMS *frame_parms, test_t *test) = test_synchro_pss_sss_nr;
#if 1
int Nid_cell[] = { (3*0+0), (3*71+0), (3*21+2), (3*21+2), (3*55+1), (3*111+2) };
#else
int Nid_cell[] = { ((3*1+2)) };
#endif
printf(" SSS TEST \n");
printf("----------\n");
if (init_test(nb_antennas_tx, nb_antennas_rx, transmission_mode, extended_prefix_flag, frame_type, Nid_cell[0], N_RB_DL) != 0) {
printf("Initialisation problem for synchronisation test \n");
exit(-1);;
}
memcpy((void *)&frame_parms_gNB, (void*)&PHY_vars_UE->frame_parms, sizeof(NR_DL_FRAME_PARMS));
printf("***********************************\n");
printf(" %s Test synchronisation \n", test.test_current);
printf("***********************************\n");
for (unsigned int index = 0; index < (sizeof(Nid_cell)/sizeof(int)); index++) {
frame_parms_gNB.Nid_cell = Nid_cell[index];
Nid2 = GET_NID2(Nid_cell[index]);
Nid1 = GET_NID1(Nid_cell[index]);
int nid_2_num = get_softmodem_params()->sl_mode == 0 ? N_ID_2_NUMBER : N_ID_2_NUMBER_SL;
for (int position = 0; position < size_test_position; position++) {
PHY_vars_UE->frame_parms.Nid_cell = (3 * N_ID_1_NUMBER) + nid_2_num; /* set to invalid value */
phase = (*p_test_synchro_pss_sss)(PHY_vars_UE, test_position[position], &frame_parms_gNB, &test); /* return phase index which gives phase error from an array */
test.number_of_tests++;
printf("%s ", test.test_current);
if (PHY_vars_UE->frame_parms.Nid_cell == (3 * Nid1) + Nid2) {
if (phase != INDEX_NO_PHASE_DIFFERENCE) {
printf("Test is pass with warning due to phase difference %d (instead of %d) offset %d Nid1 %d Nid2 %d \n",
phase, INDEX_NO_PHASE_DIFFERENCE, test_position[position], Nid1, Nid2);
test.number_of_pass_warning++;
} else {
printf("Test is pass with offset %d Nid1 %d Nid2 %d \n", test_position[position], Nid1, Nid2);
test.number_of_pass++;
}
}
else {
printf("Test is fail with offset %d Nid1 %d Nid2 %d \n", test_position[position], Nid1, Nid2);
test.number_of_fail++;
}
//break;
}
//break;
}
printf("\n%s Number of tests : %d Pass : %d Pass with warning : %d Fail : %d \n", test.test_current, test.number_of_tests, test.number_of_pass, test.number_of_pass_warning, test.number_of_fail);
printf("%s Synchronisaton test is terminated.\n\n", test.test_current);
/* reset test statistics */
test.number_of_tests = test.number_of_pass = test.number_of_pass_warning = test.number_of_fail = 0;
free_context_synchro_nr();
return(0);
}
......@@ -58,6 +58,70 @@ static uint8_t sl_get_elapsed_slots(uint32_t slot, uint32_t sl_slot_bitmap)
return elapsed_slots;
}
/*
* This function determines if the mixed slot is a Sidelink slot
*/
static uint8_t sl_determine_if_sidelink_slot(uint8_t sl_startsym, uint8_t sl_lensym, uint8_t num_ulsym)
{
uint8_t ul_startsym = NR_NUMBER_OF_SYMBOLS_PER_SLOT - num_ulsym;
if ((sl_startsym >= ul_startsym) && (sl_lensym <= NR_NUMBER_OF_SYMBOLS_PER_SLOT)) {
LOG_D(MAC,
"MIXED SLOT is a SIDELINK SLOT. Sidelink Symbols: %d-%d, Uplink Symbols: %d-%d\n",
sl_startsym,
sl_lensym - 1,
ul_startsym,
ul_startsym + num_ulsym - 1);
return NR_SIDELINK_SLOT;
} else {
LOG_D(MAC,
"MIXED SLOT is NOT SIDELINK SLOT. Sidelink Symbols: %d-%d, Uplink Symbols: %d-%d\n",
sl_startsym,
sl_lensym - 1,
ul_startsym,
ul_startsym + num_ulsym - 1);
return 0;
}
}
/*
* This function determines if the Slot is a SIDELINK SLOT
* Every Uplink Slot is a Sidelink slot
* Mixed Slot is a sidelink slot if the uplink symbols in Mixed slot
* overlaps with Sidelink start symbol and number of symbols.
*/
int sl_nr_ue_slot_select(const sl_nr_phy_config_request_t *cfg, int slot, uint8_t frame_duplex_type)
{
int ul_sym = 0, slot_type = 0;
// All PC5 bands are TDD bands , hence handling only TDD in this function.
AssertFatal(frame_duplex_type == TDD, "No Sidelink operation defined for FDD in 3GPP rel16\n");
if (cfg->tdd_table.max_tdd_periodicity_list == NULL) { // this happens before receiving TDD configuration
return slot_type;
}
int period = cfg->tdd_table.tdd_period_in_slots;
int rel_slot = slot % period;
const fapi_nr_tdd_table_t *tdd_table = &cfg->tdd_table;
const fapi_nr_max_tdd_periodicity_t *current_slot = &tdd_table->max_tdd_periodicity_list[rel_slot];
for (int symbol_count = 0; symbol_count < NR_NUMBER_OF_SYMBOLS_PER_SLOT; symbol_count++) {
if (current_slot->max_num_of_symbol_per_slot_list[symbol_count].slot_config == 1) {
ul_sym++;
}
}
if (ul_sym == NR_NUMBER_OF_SYMBOLS_PER_SLOT) {
slot_type = NR_SIDELINK_SLOT;
} else if (ul_sym) {
slot_type = sl_determine_if_sidelink_slot(cfg->sl_bwp_config.sl_start_symbol, cfg->sl_bwp_config.sl_num_symbols, ul_sym);
}
return slot_type;
}
static void sl_determine_slot_bitmap(sl_nr_ue_mac_params_t *sl_mac, int ue_id)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment