Commit 003a2ad6 authored by francescomani's avatar francescomani

remove unused pucch ue phy unit test

parent 0515cf98
......@@ -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
......
......@@ -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;
......
......@@ -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
......@@ -68,8 +68,7 @@ tst_files="
pbch_test
srs_test
frame_config_test
harq_test
pucch_uci_test"
harq_test"
#---------------------------------------------------------------------------
# manage input parameters
......
......@@ -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
......
#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);
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment