diff --git a/openair1/PHY/NR_TRANSPORT/nr_uci_tools_common.c b/openair1/PHY/NR_TRANSPORT/nr_uci_tools_common.c index b6b56ec79f..73ba90e62f 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_uci_tools_common.c +++ b/openair1/PHY/NR_TRANSPORT/nr_uci_tools_common.c @@ -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 diff --git a/openair1/PHY/defs_nr_UE.h b/openair1/PHY/defs_nr_UE.h index 542c94f63d..059042116e 100644 --- a/openair1/PHY/defs_nr_UE.h +++ b/openair1/PHY/defs_nr_UE.h @@ -476,15 +476,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 +495,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; diff --git a/openair1/SIMULATION/NR_UE_PHY/unit_tests/build/CMakeLists.txt b/openair1/SIMULATION/NR_UE_PHY/unit_tests/build/CMakeLists.txt index 849b483ec6..261e29fc92 100644 --- a/openair1/SIMULATION/NR_UE_PHY/unit_tests/build/CMakeLists.txt +++ b/openair1/SIMULATION/NR_UE_PHY/unit_tests/build/CMakeLists.txt @@ -90,14 +90,3 @@ 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 diff --git a/openair1/SIMULATION/NR_UE_PHY/unit_tests/build/reflogs/pucch_uci_test.txt b/openair1/SIMULATION/NR_UE_PHY/unit_tests/build/reflogs/pucch_uci_test.txt deleted file mode 100644 index d14373675c..0000000000 --- a/openair1/SIMULATION/NR_UE_PHY/unit_tests/build/reflogs/pucch_uci_test.txt +++ /dev/null @@ -1,498 +0,0 @@ - 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 diff --git a/openair1/SIMULATION/NR_UE_PHY/unit_tests/build/run_tests.sh b/openair1/SIMULATION/NR_UE_PHY/unit_tests/build/run_tests.sh index 81894ed726..ed4e1270d0 100755 --- a/openair1/SIMULATION/NR_UE_PHY/unit_tests/build/run_tests.sh +++ b/openair1/SIMULATION/NR_UE_PHY/unit_tests/build/run_tests.sh @@ -68,8 +68,7 @@ tst_files=" pbch_test srs_test frame_config_test - harq_test - pucch_uci_test" + harq_test" #--------------------------------------------------------------------------- # manage input parameters diff --git a/openair1/SIMULATION/NR_UE_PHY/unit_tests/readme.txt b/openair1/SIMULATION/NR_UE_PHY/unit_tests/readme.txt index 8309bf0f92..50b966fca3 100644 --- a/openair1/SIMULATION/NR_UE_PHY/unit_tests/readme.txt +++ b/openair1/SIMULATION/NR_UE_PHY/unit_tests/readme.txt @@ -41,7 +41,6 @@ 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. @@ -75,7 +74,6 @@ make pbch_test -> build pbch_test: decoding of NR PBCH (Packet Broadcas 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: @@ -85,7 +83,6 @@ And execution of 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 diff --git a/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/pucch_uci_generator_test.c b/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/pucch_uci_generator_test.c deleted file mode 100644 index 4948d0a876..0000000000 --- a/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/pucch_uci_generator_test.c +++ /dev/null @@ -1,166 +0,0 @@ -#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); -} diff --git a/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/pucch_uci_test.c b/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/pucch_uci_test.c deleted file mode 100644 index 1217f70fba..0000000000 --- a/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/pucch_uci_test.c +++ /dev/null @@ -1,1263 +0,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); -}