* Two tables for intra-slot hopping (mprime=0 and mprime=1)
*/
*/
// complex-valued symbol d_re, d_im containing complex-valued symbol d(0):
uint8_ttable_6_3_2_4_1_1_N_SF_mprime_PUCCH_1_noHop[14]={0,0,0,2,2,3,3,4,4,5,5,6,6,7};// for index PUCCH-length, we obtain N_SF_mprime_PUCCH_1 when no intra-slot hopping
int16_td_re,d_im;
uint8_ttable_6_3_2_4_1_1_N_SF_mprime_PUCCH_1_m0Hop[14]={0,0,0,1,1,1,1,2,2,2,2,3,3,3};// for index PUCCH-length, we obtain N_SF_mprime_PUCCH_1 when intra-slot hopping and mprime=0
if(nr_bit==1){// using BPSK if M_bit=1 according to TC 38.211 Subclause 5.1.2
uint8_ttable_6_3_2_4_1_1_N_SF_mprime_PUCCH_1_m1Hop[14]={0,0,0,1,1,2,2,2,2,3,3,3,3,4};// for index PUCCH-length, we obtain N_SF_mprime_PUCCH_1 when intra-slot hopping and mprime=1
// lnormal is the OFDM symbol number in the PUCCH transmission where l=0 corresponds to the first OFDM symbol of the PUCCH transmission
uint8_tlnormal=0;
// lprime is the index of the OFDM symbol in the slot that corresponds to the first OFDM symbol of the PUCCH transmission in the slot given by [5, TS 38.213]
uint8_tlprime=startingSymbolIndex;
// mcs = 0 except for PUCCH format 0
uint8_tmcs=0;
// r_u_v_alpha_delta_re and r_u_v_alpha_delta_im tables containing the sequence y(n) for the PUCCH, when they are multiplied by d(0)
// r_u_v_alpha_delta_dmrs_re and r_u_v_alpha_delta_dmrs_im tables containing the sequence for the DM-RS.
* Implementing TS 38.211 Subclause 6.3.2.4.2 Mapping to physical resources
*/
*/
uint8_ttable_6_4_1_3_1_1_1_N_SF_mprime_PUCCH_1_noHop[14]={0,0,0,2,3,3,4,4,5,5,6,6,7,7};// for index PUCCH-DM-RS-length, we obtain N_SF_mprime_PUCCH_1 when no intra-slot hopping
int32_t*txptr;
uint8_ttable_6_4_1_3_1_1_1_N_SF_mprime_PUCCH_1_m0Hop[14]={0,0,0,1,1,2,2,2,2,3,3,3,3,4};// for index PUCCH-DM-RS-length, we obtain N_SF_mprime_PUCCH_1 when intra-slot hopping and mprime=0
uint32_tre_offset;
uint8_ttable_6_4_1_3_1_1_1_N_SF_mprime_PUCCH_1_m1Hop[14]={0,0,0,1,2,1,2,2,3,2,3,3,4,3};// for index PUCCH-DM-RS-length, we obtain N_SF_mprime_PUCCH_1 when intra-slot hopping and mprime=1
inti=0;
/* The following tables implement TS 38.211 table 6.3.2.4.1-2: Orthogonal sequences wi(m)=exp(j*2*pi*phi(m)/N_SF) for PUCCH format 1
#define MAX_SIZE_Z 168 // this value has to be calculated from mprime*12*table_6_3_2_4_1_1_N_SF_mprime_PUCCH_1_noHop[pucch_symbol_length]+m*12+n
// the orthogonal sequence index for wi(m) defined in TS 38.213 Subclause 9.2.1
// the index of the orthogonal cover code is from a set determined as described in [4, TS 38.211]
// and is indicated by higher layer parameter PUCCH-F1-time-domain-OCC
// In the PUCCH_Config IE, the PUCCH-format1, timeDomainOCC field
uint8_tw_index=timeDomainOCC;
// N_SF_mprime_PUCCH_1 contains N_SF_mprime from table 6.3.2.4.1-1 (depending on number of PUCCH symbols nrofSymbols, mprime and intra-slot hopping enabled/disabled)
uint8_tN_SF_mprime_PUCCH_1;
// N_SF_mprime_PUCCH_1 contains N_SF_mprime from table 6.4.1.3.1.1-1 (depending on number of PUCCH symbols nrofSymbols, mprime and intra-slot hopping enabled/disabled)
uint8_tN_SF_mprime_PUCCH_DMRS_1;
// N_SF_mprime_PUCCH_1 contains N_SF_mprime from table 6.3.2.4.1-1 (depending on number of PUCCH symbols nrofSymbols, mprime=0 and intra-slot hopping enabled/disabled)
uint8_tN_SF_mprime0_PUCCH_1;
// N_SF_mprime_PUCCH_1 contains N_SF_mprime from table 6.4.1.3.1.1-1 (depending on number of PUCCH symbols nrofSymbols, mprime=0 and intra-slot hopping enabled/disabled)
uint8_tN_SF_mprime0_PUCCH_DMRS_1;
// mprime is 0 if no intra-slot hopping / mprime is {0,1} if intra-slot hopping
printf("\t [nr_generate_pucch3_4] generation DM-RS base sequence when nrofPRB=%d == 1: r_u_v_base[n=%d]=(%d,%d)\n",
nrofPRB,n,r_u_v_base_re[n],r_u_v_base_im[n]);
#endif
}
}
// Next we proceed to mapping to physical resources according to TS 38.211, subclause 6.3.2.6.5 dor PUCCH formats 3 and 4 and subclause 6.4.1.3.3.2 for DM-RS
// Next we proceed to mapping to physical resources according to TS 38.211, subclause 6.3.2.6.5 dor PUCCH formats 3 and 4 and subclause 6.4.1.3.3.2 for DM-RS
* The following tables implement TS 38.211 table 6.3.2.4.1-1: Number of PUCCH symbols and the corresponding N_SF_mprime_PUCCH_1
* One table for no intra-slot hopping
* Two tables for intra-slot hopping (mprime=0 and mprime=1)
*/
uint8_ttable_6_3_2_4_1_1_N_SF_mprime_PUCCH_1_noHop[14]={0,0,0,2,2,3,3,4,4,5,5,6,6,7};// for index PUCCH-length, we obtain N_SF_mprime_PUCCH_1 when no intra-slot hopping
uint8_ttable_6_3_2_4_1_1_N_SF_mprime_PUCCH_1_m0Hop[14]={0,0,0,1,1,1,1,2,2,2,2,3,3,3};// for index PUCCH-length, we obtain N_SF_mprime_PUCCH_1 when intra-slot hopping and mprime=0
uint8_ttable_6_3_2_4_1_1_N_SF_mprime_PUCCH_1_m1Hop[14]={0,0,0,1,1,2,2,2,2,3,3,3,3,4};// for index PUCCH-length, we obtain N_SF_mprime_PUCCH_1 when intra-slot hopping and mprime=1
/*
* The following tables implement TS 38.211 table 6.4.1.3.1.1-1: Number of DM-RS symbols and the corresponding N_SF_mprime_PUCCH_1
* One table for no intra-slot hopping
* Two tables for intra-slot hopping (mprime=0 and mprime=1)
*/
uint8_ttable_6_4_1_3_1_1_1_N_SF_mprime_PUCCH_1_noHop[14]={0,0,0,2,3,3,4,4,5,5,6,6,7,7};// for index PUCCH-DM-RS-length, we obtain N_SF_mprime_PUCCH_1 when no intra-slot hopping
uint8_ttable_6_4_1_3_1_1_1_N_SF_mprime_PUCCH_1_m0Hop[14]={0,0,0,1,1,2,2,2,2,3,3,3,3,4};// for index PUCCH-DM-RS-length, we obtain N_SF_mprime_PUCCH_1 when intra-slot hopping and mprime=0
uint8_ttable_6_4_1_3_1_1_1_N_SF_mprime_PUCCH_1_m1Hop[14]={0,0,0,1,2,1,2,2,3,2,3,3,4,3};// for index PUCCH-DM-RS-length, we obtain N_SF_mprime_PUCCH_1 when intra-slot hopping and mprime=1
/* The following tables implement TS 38.211 table 6.3.2.4.1-2: Orthogonal sequences wi(m)=exp(j*2*pi*phi(m)/N_SF) for PUCCH format 1