Make read-only globals const, additional fixes

- Global variables that are never written to are marked const
- Remove some EXTERN declaration
- Remove unused `log_mem_multi` from logging module
This commit is contained in:
Laurent THOMAS
2023-08-18 14:20:37 +02:00
committed by Robert Schmidt
parent 5b943f598d
commit 206aa36a47
62 changed files with 1516 additions and 1337 deletions
+1 -1
View File
@@ -31,7 +31,7 @@
//#define RM_DEBUG 1
uint8_t index_k0[2][4] = {{0,17,33,56},{0,13,25,43}};
static const uint8_t index_k0[2][4] = {{0, 17, 33, 56}, {0, 13, 25, 43}};
void nr_interleaving_ldpc(uint32_t E, uint8_t Qm, uint8_t *e,uint8_t *f)
{
@@ -97,8 +97,6 @@ uint16_t RIV2nb_rb_LUT100[6000];
uint16_t RIV2first_rb_LUT100[6000];
uint16_t RIV_max100=0;
const int8_t *delta_PUCCH_lut = delta_PUSCH_acc;
uint32_t check_phich_reg(LTE_DL_FRAME_PARMS *frame_parms,uint32_t kprime,uint8_t lprime,uint8_t mi)
{
@@ -83,7 +83,3 @@ extern uint32_t distRIV2alloc_gap1_odd_LUT100_3[6000];
extern uint16_t RIV2nb_rb_LUT100[6000];
extern uint16_t RIV2first_rb_LUT100[6000];
extern uint16_t RIV_max100;
extern const int8_t *delta_PUCCH_lut;
extern const int8_t delta_PUSCH_acc[4];
extern const int8_t delta_PUSCH_abs[4];
+6 -8
View File
@@ -295,14 +295,12 @@ const uint16_t prach_root_sequence_map0_3[838] = {
404, 435, 406, 433, 235, 604, 267, 572, 302, 537, 309, 530, 265, 574, 233, 606, 367, 472, 296, 543, 336, 503, 305, 534, 373,
466, 280, 559, 279, 560, 419, 420, 240, 599, 258, 581, 229, 610};
uint16_t prach_root_sequence_map4[138] = { 1,138,2,137,3,136,4,135,5,134,6,133,7,132,8,131,9,130,10,129,
11,128,12,127,13,126,14,125,15,124,16,123,17,122,18,121,19,120,20,119,
21,118,22,117,23,116,24,115,25,114,26,113,27,112,28,111,29,110,30,109,
31,108,32,107,33,106,34,105,35,104,36,103,37,102,38,101,39,100,40,99,
41,98,42,97,43,96,44,95,45,94,46,93,47,92,48,91,49,90,50,89,
51,88,52,87,53,86,54,85,55,84,56,83,57,82,58,81,59,80,60,79,
61,78,62,77,63,76,64,75,65,74,66,73,67,72,68,71,69,70
};
const uint16_t prach_root_sequence_map4[138] = {
1, 138, 2, 137, 3, 136, 4, 135, 5, 134, 6, 133, 7, 132, 8, 131, 9, 130, 10, 129, 11, 128, 12, 127, 13, 126, 14, 125,
15, 124, 16, 123, 17, 122, 18, 121, 19, 120, 20, 119, 21, 118, 22, 117, 23, 116, 24, 115, 25, 114, 26, 113, 27, 112, 28, 111,
29, 110, 30, 109, 31, 108, 32, 107, 33, 106, 34, 105, 35, 104, 36, 103, 37, 102, 38, 101, 39, 100, 40, 99, 41, 98, 42, 97,
43, 96, 44, 95, 45, 94, 46, 93, 47, 92, 48, 91, 49, 90, 50, 89, 51, 88, 52, 87, 53, 86, 54, 85, 55, 84, 56, 83,
57, 82, 58, 81, 59, 80, 60, 79, 61, 78, 62, 77, 63, 76, 64, 75, 65, 74, 66, 73, 67, 72, 68, 71, 69, 70};
void dump_prach_config(LTE_DL_FRAME_PARMS *frame_parms,uint8_t subframe) {
FILE *fd;
+4 -6
View File
@@ -1521,7 +1521,7 @@ void prepare_dl_decoding_format1_1A(DCI_format_t dci_format,
pdlsch0_harq->Nl = 1;
pdlsch0_harq->mimo_mode = frame_parms->nb_antenna_ports_eNB == 1 ?SISO : ALAMOUTI;
pdlsch0_harq->dl_power_off = 1; //no power offset
pdlsch0_harq->delta_PUCCH = delta_PUCCH_lut[TPC &3];
pdlsch0_harq->delta_PUCCH = delta_PUSCH_acc[TPC & 3];
// compute resource allocation
if(dci_format == format1A)
@@ -1979,8 +1979,8 @@ void prepare_dl_decoding_format2_2A(DCI_format_t dci_format,
dlsch1_harq->codeword = 1;
dlsch0_harq->Nl = 1;
dlsch1_harq->Nl = 1;
dlsch0_harq->delta_PUCCH = delta_PUCCH_lut[TPC&3];
dlsch1_harq->delta_PUCCH = delta_PUCCH_lut[TPC&3];
dlsch0_harq->delta_PUCCH = delta_PUSCH_acc[TPC & 3];
dlsch1_harq->delta_PUCCH = delta_PUSCH_acc[TPC & 3];
dlsch0_harq->dl_power_off = 1;
dlsch1_harq->dl_power_off = 1;
@@ -2598,9 +2598,7 @@ int generate_ue_dlsch_params_from_dci(int frame,
//dlsch1_harq->nb_rb = dlsch0_harq->nb_rb;
dlsch0_harq->mcs = ((DCI1E_5MHz_2A_M10PRB_TDD_t *)dci_pdu)->mcs;
dlsch0_harq->delta_PUCCH = delta_PUCCH_lut[((DCI1E_5MHz_2A_M10PRB_TDD_t *)dci_pdu)->TPC&3];
dlsch0_harq->delta_PUCCH = delta_PUSCH_acc[((DCI1E_5MHz_2A_M10PRB_TDD_t *)dci_pdu)->TPC & 3];
/*
if (dlsch0_harq->mcs>20) {
+1 -2
View File
@@ -32,6 +32,7 @@
#include "PHY/defs_UE.h"
#include "PHY/phy_extern_ue.h"
#include "PHY/phy_extern.h"
#include "SCHED_UE/sched_UE.h"
#include "transport_ue.h"
#include "transport_proto_ue.h"
@@ -86,8 +87,6 @@ void rx_phich(PHY_VARS_UE *ue,
uint8_t NSF_PHICH = 4;
uint8_t pusch_subframe;
int8_t delta_PUSCH_acc[4] = {-1,0,1,3};
// check if we're expecting a PHICH in this subframe
LOG_D(PHY,"[UE %d][PUSCH %d] Frame %d subframe %d PHICH RX\n",ue->Mod_id,harq_pid,proc->frame_rx,subframe);
+9 -10
View File
@@ -35,9 +35,7 @@
#include <math.h>
#include "defs.h"
#define DEFINE_VARIABLES_LOWPAPR_SEQUENCES_NR_H
#include "PHY/NR_REFSIG/ul_ref_seq_nr.h"
#undef DEFINE_VARIABLES_LOWPAPR_SEQUENCES_NR_H
/*******************************************************************
*
@@ -54,9 +52,7 @@
*
*********************************************************************/
int16_t *base_sequence_less_than_36(unsigned int M_ZC,
unsigned int u,
unsigned int scaling)
static int16_t *base_sequence_less_than_36(unsigned int M_ZC, unsigned int u, unsigned int scaling)
{
char *phi_table;
int16_t *rv_overbar;
@@ -153,10 +149,11 @@ int16_t get_index_for_dmrs_lowpapr_seq(int16_t num_dmrs_res) {
*
*********************************************************************/
int16_t *base_sequence_36_or_larger(unsigned int Msc_RS,
unsigned int u,
unsigned int v,
unsigned int scaling, unsigned int if_dmrs_seq)
static int16_t *base_sequence_36_or_larger(unsigned int Msc_RS,
unsigned int u,
unsigned int v,
unsigned int scaling,
unsigned int if_dmrs_seq)
{
int16_t *rv_overbar;
unsigned int N_ZC, M_ZC;
@@ -199,6 +196,8 @@ int16_t *base_sequence_36_or_larger(unsigned int Msc_RS,
return rv_overbar;
}
int16_t *rv_ul_ref_sig[U_GROUP_NUMBER][V_BASE_SEQUENCE_NUMBER][SRS_SB_CONF];
int16_t *gNB_dmrs_lowpaprtype1_sequence[U_GROUP_NUMBER][V_BASE_SEQUENCE_NUMBER][MAX_INDEX_DMRS_UL_ALLOCATED_REs];
void generate_lowpapr_typ1_refsig_sequences(unsigned int scaling)
{
/* prevent multiple calls, relevant when both UE & gNB initialize this */
@@ -222,7 +221,7 @@ void generate_lowpapr_typ1_refsig_sequences(unsigned int scaling)
}
}
int16_t *dmrs_lowpaprtype1_ul_ref_sig[U_GROUP_NUMBER][V_BASE_SEQUENCE_NUMBER][MAX_INDEX_DMRS_UL_ALLOCATED_REs];
void generate_ul_reference_signal_sequences(unsigned int scaling)
{
/* prevent multiple calls, relevant when both UE & gNB initialize this */
+432 -243
View File
@@ -41,14 +41,6 @@
#include "PHY/defs_nr_common.h"
#include "PHY/defs_gNB.h"
#ifdef DEFINE_VARIABLES_LOWPAPR_SEQUENCES_NR_H
#define EXTERN
#define INIT_VARIABLES_LOWPAPR_SEQUENCES_NR_H
#else
#define EXTERN extern
#endif
/************** DEFINE ********************************************/
#define U_GROUP_NUMBER (30) /* maximum number of sequence-group */
#define V_BASE_SEQUENCE_NUMBER (2) /* maximum number of base sequences */
@@ -58,212 +50,326 @@
#define INDEX_SB_LESS_32 (4) /* index of dftsizes array for which subcarrier number is less than 36 */
EXTERN const uint16_t ul_allocated_re[SRS_SB_CONF] /* number of uplink allocated resource elements */
/* this table is derivated from TS 38.211 Table 6.4.1.4.3-1: SRS bandwidth configuration which gives m_SRS_b then all possible values of sequence length is */
/* M_sc_b_SRS = m_SRS_b * N_SC_RB/K_TC with K_TC = 2 or K_TC = 4 as specified in TS 38.211 6.4.1.4.3 */
#ifdef INIT_VARIABLES_LOWPAPR_SEQUENCES_NR_H
= { /*
K_TC 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
m_SRS_b 4 8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 68 72 76 80 */
6, 12, 18, 24, 30, 36, 48, 60, 72, 84, 96, 108, 120, 132, 144, 156, 168, 180, 192, 204, 216, 228, 240,
/*
K_TC 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 6 3 3
m_SRS_b 84 88 92 96 100 104 108 112 116 120 128 132 136 144 152 160 168 176 184 192 100 208 216 */
252, 264, 276, 288, 300, 312, 324, 336, 348, 360, 384, 396, 408, 432, 456, 480, 504, 528, 552, 576, 600, 624, 648,
/*
K_TC 3 6 3 3 3 3 6 6 6 6 6 6 6 6 6 6 6 6 6 6
m_SRS_b 224 116, 240 256 264 272 144 152 160 168 176 184 192 208 216 224 240 256 264 272 */
672, 696, 720, 768, 792, 816, 864, 912, 960, 1008, 1056, 1104, 1152, 1248, 1296, 1344, 1440, 1536, 1584, 1632,
static const uint16_t ul_allocated_re[SRS_SB_CONF] /* number of uplink allocated resource elements */
/* this table is derivated from TS 38.211 Table 6.4.1.4.3-1: SRS bandwidth configuration which gives m_SRS_b then all possible
values of sequence length is */
/* M_sc_b_SRS = m_SRS_b * N_SC_RB/K_TC with K_TC = 2 or K_TC = 4 as specified in TS 38.211 6.4.1.4.3 */
= {
/*
K_TC 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 3 3 m_SRS_b 4 8 12 16 20 24 28 32 36 40 44 48 52 56 60
64 68 72 76 80 */
6,
12,
18,
24,
30,
36,
48,
60,
72,
84,
96,
108,
120,
132,
144,
156,
168,
180,
192,
204,
216,
228,
240,
/*
K_TC 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 6 3 3 m_SRS_b 84 88 92 96 100 104 108 112 116 120 128 132 136 144 152 160
168 176 184 192 100 208 216 */
252,
264,
276,
288,
300,
312,
324,
336,
348,
360,
384,
396,
408,
432,
456,
480,
504,
528,
552,
576,
600,
624,
648,
/*
K_TC 3 6 3 3 3 3 6 6 6 6 6 6 6 6 6 6 6 6 6 6
m_SRS_b 224 116, 240 256 264 272 144 152 160 168 176 184 192 208 216 224 240 256 264
272 */
672,
696,
720,
768,
792,
816,
864,
912,
960,
1008,
1056,
1104,
1152,
1248,
1296,
1344,
1440,
1536,
1584,
1632,
/* below numbers have been added just to include all possible lengths already used for lte */
540, 900, 972, 1080, 1200,
}
#endif
;
/* below numbers have been added just to include all possible lengths already used for lte */
540,
900,
972,
1080,
1200,
};
/* table of largest prime number lower than uplink allocated resource elements "ul_allocated_re" */
EXTERN const uint16_t ref_ul_primes[SRS_SB_CONF]
#ifdef INIT_VARIABLES_LOWPAPR_SEQUENCES_NR_H
= {
/* 6, 12, 18, 24, 30, 36, 48, 60, 72, 84, 96, 108, 120, 132, 144, 156, 168, 180, 192, 204, 216, 228, 240, */
5, 11, 17, 23, 29, 31, 47, 59, 71, 83, 89, 107, 113, 127, 139, 151, 167, 179, 191, 199, 211, 227, 239,
static const uint16_t ref_ul_primes[SRS_SB_CONF] = {
/* 6, 12, 18, 24, 30, 36, 48, 60, 72, 84, 96, 108, 120, 132, 144, 156, 168, 180, 192, 204,
216, 228, 240, */
5,
11,
17,
23,
29,
31,
47,
59,
71,
83,
89,
107,
113,
127,
139,
151,
167,
179,
191,
199,
211,
227,
239,
/* 252, 264, 276, 288, 300, 312, 324, 336, 348, 360, 384, 396, 408, 432, 456, 480, 504, 528, 552, 576, 600, 624, 648, */
251, 263, 271, 283, 293, 311, 317, 331, 347, 359, 383, 389, 401, 431, 449, 479, 503, 523, 547, 571, 599, 619, 647,
/* 252, 264, 276, 288, 300, 312, 324, 336, 348, 360, 384, 396, 408, 432, 456, 480, 504, 528, 552, 576,
600, 624, 648, */
251,
263,
271,
283,
293,
311,
317,
331,
347,
359,
383,
389,
401,
431,
449,
479,
503,
523,
547,
571,
599,
619,
647,
/* 672, 696, 720, 768, 792, 816, 864, 912, 960, 1008, 1056, 1104, 1152, 1248, 1296, 1344, 1440, 1536, 1584, 1632, */
661, 691, 719, 761, 787, 811, 863, 911, 953, 997, 1051, 1103, 1151, 1237, 1291, 1327, 1439, 1531, 1583, 1627,
/* 672, 696, 720, 768, 792, 816, 864, 912, 960, 1008, 1056, 1104, 1152, 1248, 1296, 1344, 1440, 1536, 1584,
1632, */
661,
691,
719,
761,
787,
811,
863,
911,
953,
997,
1051,
1103,
1151,
1237,
1291,
1327,
1439,
1531,
1583,
1627,
/* 540, 900, 972, 1080, 1200, */
523, 887, 971, 1069, 1193,
}
#endif
;
/* 540, 900, 972, 1080, 1200, */
523,
887,
971,
1069,
1193,
};
/* Low-PAPR base sequence; see TS 38.211 clause 5.2.2 */
EXTERN int16_t *rv_ul_ref_sig[U_GROUP_NUMBER][V_BASE_SEQUENCE_NUMBER][SRS_SB_CONF];
extern int16_t *rv_ul_ref_sig[U_GROUP_NUMBER][V_BASE_SEQUENCE_NUMBER][SRS_SB_CONF];
/* 38.211 table Table 5.2.2.2-1: Definition of phi(n) for M_ZC = 6 */
EXTERN const char phi_M_ZC_6[6*U_GROUP_NUMBER]
#ifdef INIT_VARIABLES_LOWPAPR_SEQUENCES_NR_H
= {
/* 0 1 2 3 4 5 */
/* 0 */ -3, -1, 3, 3, -1, -3,
/* 1 */ -3, 3, -1, -1, 3, -3,
/* 2 */ -3, -3, -3, 3, 1, -3,
/* 3 */ 1, 1, 1, 3, -1, -3,
/* 4 */ 1, 1, 1, -3, -1, 3,
/* 5 */ -3, 1, -1, -3, -3, -3,
/* 6 */ -3, 1, 3, -3, -3, -3,
/* 7 */ -3, -1, 1, -3, 1, -1,
/* 8 */ -3, -1, -3, 1, -3, -3,
/* 9 */ -3, -3, 1, -3, 3, -3,
/* 10 */ -3, 1, 3, 1, -3, -3,
/* 11 */ -3, -1, -3, 1, 1, -3,
/* 12 */ 1, 1, 3, -1, -3, 3,
/* 13 */ 1, 1, 3, 3, -1, 3,
/* 14 */ 1, 1, 1, -3, 3, -1,
/* 15 */ 1, 1, 1, -1, 3, -3,
/* 16 */ -3, -1, -1, -1, 3, -1,
/* 17 */ -3, -3, -1, 1, -1, -3,
/* 18 */ -3, -3, -3, 1, -3, -1,
/* 19 */ -3, 1, 1, -3, -1, -3,
/* 20 */ -3, 3, -3, 1, 1, -3,
/* 21 */ -3, 1, -3, -3, -3, -1,
/* 22 */ 1, 1, -3, 3, 1, 3,
/* 23 */ 1, 1, -3, -3, 1, -3,
/* 24 */ 1, 1, 3, -1, 3, 3,
/* 25 */ 1, 1, -3, 1, 3, 3,
/* 26 */ 1, 1, -1, -1, 3, -1,
/* 27 */ 1, 1, -1, 3, -1, -1,
/* 28 */ 1, 1, -1, 3, -3, -1,
/* 29 */ 1, 1, -3, 1, -1, -1,
}
#endif
;
static const char phi_M_ZC_6[6 * U_GROUP_NUMBER] = {
/* 0 1 2 3 4 5 */
/* 0 */ -3, -1, 3, 3, -1, -3,
/* 1 */ -3, 3, -1, -1, 3, -3,
/* 2 */ -3, -3, -3, 3, 1, -3,
/* 3 */ 1, 1, 1, 3, -1, -3,
/* 4 */ 1, 1, 1, -3, -1, 3,
/* 5 */ -3, 1, -1, -3, -3, -3,
/* 6 */ -3, 1, 3, -3, -3, -3,
/* 7 */ -3, -1, 1, -3, 1, -1,
/* 8 */ -3, -1, -3, 1, -3, -3,
/* 9 */ -3, -3, 1, -3, 3, -3,
/* 10 */ -3, 1, 3, 1, -3, -3,
/* 11 */ -3, -1, -3, 1, 1, -3,
/* 12 */ 1, 1, 3, -1, -3, 3,
/* 13 */ 1, 1, 3, 3, -1, 3,
/* 14 */ 1, 1, 1, -3, 3, -1,
/* 15 */ 1, 1, 1, -1, 3, -3,
/* 16 */ -3, -1, -1, -1, 3, -1,
/* 17 */ -3, -3, -1, 1, -1, -3,
/* 18 */ -3, -3, -3, 1, -3, -1,
/* 19 */ -3, 1, 1, -3, -1, -3,
/* 20 */ -3, 3, -3, 1, 1, -3,
/* 21 */ -3, 1, -3, -3, -3, -1,
/* 22 */ 1, 1, -3, 3, 1, 3,
/* 23 */ 1, 1, -3, -3, 1, -3,
/* 24 */ 1, 1, 3, -1, 3, 3,
/* 25 */ 1, 1, -3, 1, 3, 3,
/* 26 */ 1, 1, -1, -1, 3, -1,
/* 27 */ 1, 1, -1, 3, -1, -1,
/* 28 */ 1, 1, -1, 3, -3, -1,
/* 29 */ 1, 1, -3, 1, -1, -1,
};
/* Table 5.2.2.2-2: Definition of phi ( n ) for M ZC = 12 */
EXTERN const char phi_M_ZC_12[12*U_GROUP_NUMBER]
#ifdef INIT_VARIABLES_LOWPAPR_SEQUENCES_NR_H
= {
/* 0 1 2 3 4 5 6 7 8 9 10 11 */
/* 0 */ -3, 1, -3, -3, -3, 3, -3, -1, 1, 1, 1, -3,
/* 1 */ -3, 3, 1, -3, 1, 3, -1, -1, 1, 3, 3, 3,
/* 2 */ -3, 3, 3, 1, -3, 3, -1, 1, 3, -3, 3, -3,
/* 3 */ -3, -3, -1, 3, 3, 3, -3, 3, -3, 1, -1, -3,
/* 4 */ -3, -1, -1, 1, 3, 1, 1, -1, 1, -1, -3, 1,
/* 5 */ -3, -3, 3, 1, -3, -3, -3, -1, 3, -1, 1, 3,
/* 6 */ 1, -1, 3, -1, -1, -1, -3, -1, 1, 1, 1, -3,
/* 7 */ -1, -3, 3, -1, -3, -3, -3, -1, 1, -1, 1, -3,
/* 8 */ -3, -1, 3, 1, -3, -1, -3, 3, 1, 3, 3, 1,
/* 9 */ -3, -1, -1, -3, -3, -1, -3, 3, 1, 3, -1, -3,
/* 10 */ -3, 3, -3, 3, 3, -3, -1, -1, 3, 3, 1, -3,
/* 11 */ -3, -1, -3, -1, -1, -3, 3, 3, -1, -1, 1, -3,
/* 12 */ -3, -1, 3, -3, -3, -1, -3, 1, -1, -3, 3, 3,
/* 13 */ -3, 1, -1, -1, 3, 3, -3, -1, -1, -3, -1, -3,
/* 14 */ 1, 3, -3, 1, 3, 3, 3, 1, -1, 1, -1, 3,
/* 15 */ -3, 1, 3, -1, -1, -3, -3, -1, -1, 3, 1, -3,
/* 16 */ -1, -1, -1, -1, 1, -3, -1, 3, 3, -1, -3, 1,
/* 17 */ -1, 1, 1, -1, 1, 3, 3, -1, -1, -3, 1, -3,
/* 18 */ -3, 1, 3, 3, -1, -1, -3, 3, 3, -3, 3, -3,
/* 19 */ -3, -3, 3, -3, -1, 3, 3, 3, -1, -3, 1, -3,
/* 20 */ 3, 1, 3, 1, 3, -3, -1, 1, 3, 1, -1, -3,
/* 21 */ -3, 3, 1, 3, -3, 1, 1, 1, 1, 3, -3, 3,
/* 22 */ -3, 3, 3, 3, -1, -3, -3, -1, -3, 1, 3, -3,
/* 23 */ 3, -1, -3, 3, -3, -1, 3, 3, 3, -3, -1, -3,
/* 24 */ -3, -1, 1, -3, 1, 3, 3, 3, -1, -3, 3, 3,
/* 25 */ -3, 3, 1, -1, 3, 3, -3, 1, -1, 1, -1, 1,
/* 26 */ -1, 1, 3, -3, 1, -1, 1, -1, -1, -3, 1, -1,
/* 27 */ -3, -3, 3, 3, 3, -3, -1, 1, -3, 3, 1, -3,
/* 28 */ 1, -1, 3, 1, 1, -1, -1, -1, 1, 3, -3, 1,
/* 29 */ -3, 3, -3, 3, -3, -3, 3, -1, -1, 1, 3, -3,
}
#endif
;
static const char phi_M_ZC_12[12 * U_GROUP_NUMBER] = {
/* 0 1 2 3 4 5 6 7 8 9 10 11 */
/* 0 */ -3, 1, -3, -3, -3, 3, -3, -1, 1, 1, 1, -3,
/* 1 */ -3, 3, 1, -3, 1, 3, -1, -1, 1, 3, 3, 3,
/* 2 */ -3, 3, 3, 1, -3, 3, -1, 1, 3, -3, 3, -3,
/* 3 */ -3, -3, -1, 3, 3, 3, -3, 3, -3, 1, -1, -3,
/* 4 */ -3, -1, -1, 1, 3, 1, 1, -1, 1, -1, -3, 1,
/* 5 */ -3, -3, 3, 1, -3, -3, -3, -1, 3, -1, 1, 3,
/* 6 */ 1, -1, 3, -1, -1, -1, -3, -1, 1, 1, 1, -3,
/* 7 */ -1, -3, 3, -1, -3, -3, -3, -1, 1, -1, 1, -3,
/* 8 */ -3, -1, 3, 1, -3, -1, -3, 3, 1, 3, 3, 1,
/* 9 */ -3, -1, -1, -3, -3, -1, -3, 3, 1, 3, -1, -3,
/* 10 */ -3, 3, -3, 3, 3, -3, -1, -1, 3, 3, 1, -3,
/* 11 */ -3, -1, -3, -1, -1, -3, 3, 3, -1, -1, 1, -3,
/* 12 */ -3, -1, 3, -3, -3, -1, -3, 1, -1, -3, 3, 3,
/* 13 */ -3, 1, -1, -1, 3, 3, -3, -1, -1, -3, -1, -3,
/* 14 */ 1, 3, -3, 1, 3, 3, 3, 1, -1, 1, -1, 3,
/* 15 */ -3, 1, 3, -1, -1, -3, -3, -1, -1, 3, 1, -3,
/* 16 */ -1, -1, -1, -1, 1, -3, -1, 3, 3, -1, -3, 1,
/* 17 */ -1, 1, 1, -1, 1, 3, 3, -1, -1, -3, 1, -3,
/* 18 */ -3, 1, 3, 3, -1, -1, -3, 3, 3, -3, 3, -3,
/* 19 */ -3, -3, 3, -3, -1, 3, 3, 3, -1, -3, 1, -3,
/* 20 */ 3, 1, 3, 1, 3, -3, -1, 1, 3, 1, -1, -3,
/* 21 */ -3, 3, 1, 3, -3, 1, 1, 1, 1, 3, -3, 3,
/* 22 */ -3, 3, 3, 3, -1, -3, -3, -1, -3, 1, 3, -3,
/* 23 */ 3, -1, -3, 3, -3, -1, 3, 3, 3, -3, -1, -3,
/* 24 */ -3, -1, 1, -3, 1, 3, 3, 3, -1, -3, 3, 3,
/* 25 */ -3, 3, 1, -1, 3, 3, -3, 1, -1, 1, -1, 1,
/* 26 */ -1, 1, 3, -3, 1, -1, 1, -1, -1, -3, 1, -1,
/* 27 */ -3, -3, 3, 3, 3, -3, -1, 1, -3, 3, 1, -3,
/* 28 */ 1, -1, 3, 1, 1, -1, -1, -1, 1, 3, -3, 1,
/* 29 */ -3, 3, -3, 3, -3, -3, 3, -1, -1, 1, 3, -3,
};
/* Table 5.2.2.2-3: Definition of phi (n ) for M_ZC = 18 */
EXTERN const char phi_M_ZC_18[18*U_GROUP_NUMBER]
#ifdef INIT_VARIABLES_LOWPAPR_SEQUENCES_NR_H
= {
/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 */
/* 0 */ -1, 3, -1, -3, 3, 1, -3, -1, 3, -3, -1, -1, 1, 1, 1, -1, -1, -1,
/* 1 */ 3, -3, 3, -1, 1, 3, -3, -1, -3, -3, -1, -3, 3, 1, -1, 3, -3, 3,
/* 2 */ -3, 3, 1, -1, -1, 3, -3, -1, 1, 1, 1, 1, 1, -1, 3, -1, -3, -1,
/* 3 */ -3, -3, 3, 3, 3, 1, -3, 1, 3, 3, 1, -3, -3, 3, -1, -3, -1, 1,
/* 4 */ 1, 1, -1, -1, -3, -1, 1, -3, -3, -3, 1, -3, -1, -1, 1, -1, 3, 1,
/* 5 */ 3, -3, 1, 1, 3, -1, 1, -1, -1, -3, 1, 1, -1, 3, 3, -3, 3, -1,
/* 6 */ -3, 3, -1, 1, 3, 1, -3, -1, 1, 1, -3, 1, 3, 3, -1, -3, -3, -3,
/* 7 */ 1, 1, -3, 3, 3, 1, 3, -3, 3, -1, 1, 1, -1, 1, -3, -3, -1, 3,
/* 8 */ -3, 1, -3, -3, 1, -3, -3, 3, 1, -3, -1, -3, -3, -3, -1, 1, 1, 3,
/* 9 */ 3, -1, 3, 1, -3, -3, -1, 1, -3, -3, 3, 3, 3, 1, 3, -3, 3, -3,
/* 10 */ -3, -3, -3, 1, -3, 3, 1, 1, 3, -3, -3, 1, 3, -1, 3, -3, -3, 3,
/* 11 */ -3, -3, 3, 3, 3, -1, -1, -3, -1, -1, -1, 3, 1, -3, -3, -1, 3, -1,
/* 12 */ -3, -1, -3, -3, 1, 1, -1, -3, -1, -3, -1, -1, 3, 3, -1, 3, 1, 3,
/* 13 */ 1, 1, -3, -3, -3, -3, 1, 3, -3, 3, 3, 1, -3, -1, 3, -1, -3, 1,
/* 14 */ -3, 3, -1, -3, -1, -3, 1, 1, -3, -3, -1, -1, 3, -3, 1, 3, 1, 1,
/* 15 */ 3, 1, -3, 1, -3, 3, 3, -1, -3, -3, -1, -3, -3, 3, -3, -1, 1, 3,
/* 16 */ -3, -1, -3, -1, -3, 1, 3, -3, -1, 3, 3, 3, 1, -1, -3, 3, -1, -3,
/* 17 */ -3, -1, 3, 3, -1, 3, -1, -3, -1, 1, -1, -3, -1, -1, -1, 3, 3, 1,
/* 18 */ -3, 1, -3, -1, -1, 3, 1, -3, -3, -3, -1, -3, -3, 1, 1, 1, -1, -1,
/* 19 */ 3, 3, 3, -3, -1, -3, -1, 3, -1, 1, -1, -3, 1, -3, -3, -1, 3, 3,
/* 20 */ -3, 1, 1, -3, 1, 1, 3, -3, -1, -3, -1, 3, -3, 3, -1, -1, -1, -3,
/* 21 */ 1, -3, -1, -3, 3, 3, -1, -3, 1, -3, -3, -1, -3, -1, 1, 3, 3, 3,
/* 22 */ -3, -3, 1, -1, -1, 1, 1, -3, -1, 3, 3, 3, 3, -1, 3, 1, 3, 1,
/* 23 */ 3, -1, -3, 1, -3, -3, -3, 3, 3, -1, 1, -3, -1, 3, 1, 1, 3, 3,
/* 24 */ 3, -1, -1, 1, -3, -1, -3, -1, -3, -3, -1, -3, 1, 1, 1, -3, -3, 3,
/* 25 */ -3, -3, 1, -3, 3, 3, 3, -1, 3, 1, 1, -3, -3, -3, 3, -3, -1, -1,
/* 26 */ -3, -1, -1, -3, 1, -3, 3, -1, -1, -3, 3, 3, -3, -1, 3, -1, -1, -1,
/* 27 */ -3, -3, 3, 3, -3, 1, 3, -1, -3, 1, -1, -3, 3, -3, -1, -1, -1, 3,
/* 28 */ -1, -3, 1, -3, -3, -3, 1, 1, 3, 3, -3, 3, 3, -3, -1, 3, -3, 1,
/* 29 */ -3, 3, 1, -1, -1, -1, -1, 1, -1, 3, 3, -3, -1, 1, 3, -1, 3, -1,
}
#endif
;
static const char phi_M_ZC_18[18 * U_GROUP_NUMBER] = {
/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 */
/* 0 */ -1, 3, -1, -3, 3, 1, -3, -1, 3, -3, -1, -1, 1, 1, 1, -1, -1, -1,
/* 1 */ 3, -3, 3, -1, 1, 3, -3, -1, -3, -3, -1, -3, 3, 1, -1, 3, -3, 3,
/* 2 */ -3, 3, 1, -1, -1, 3, -3, -1, 1, 1, 1, 1, 1, -1, 3, -1, -3, -1,
/* 3 */ -3, -3, 3, 3, 3, 1, -3, 1, 3, 3, 1, -3, -3, 3, -1, -3, -1, 1,
/* 4 */ 1, 1, -1, -1, -3, -1, 1, -3, -3, -3, 1, -3, -1, -1, 1, -1, 3, 1,
/* 5 */ 3, -3, 1, 1, 3, -1, 1, -1, -1, -3, 1, 1, -1, 3, 3, -3, 3, -1,
/* 6 */ -3, 3, -1, 1, 3, 1, -3, -1, 1, 1, -3, 1, 3, 3, -1, -3, -3, -3,
/* 7 */ 1, 1, -3, 3, 3, 1, 3, -3, 3, -1, 1, 1, -1, 1, -3, -3, -1, 3,
/* 8 */ -3, 1, -3, -3, 1, -3, -3, 3, 1, -3, -1, -3, -3, -3, -1, 1, 1, 3,
/* 9 */ 3, -1, 3, 1, -3, -3, -1, 1, -3, -3, 3, 3, 3, 1, 3, -3, 3, -3,
/* 10 */ -3, -3, -3, 1, -3, 3, 1, 1, 3, -3, -3, 1, 3, -1, 3, -3, -3, 3,
/* 11 */ -3, -3, 3, 3, 3, -1, -1, -3, -1, -1, -1, 3, 1, -3, -3, -1, 3, -1,
/* 12 */ -3, -1, -3, -3, 1, 1, -1, -3, -1, -3, -1, -1, 3, 3, -1, 3, 1, 3,
/* 13 */ 1, 1, -3, -3, -3, -3, 1, 3, -3, 3, 3, 1, -3, -1, 3, -1, -3, 1,
/* 14 */ -3, 3, -1, -3, -1, -3, 1, 1, -3, -3, -1, -1, 3, -3, 1, 3, 1, 1,
/* 15 */ 3, 1, -3, 1, -3, 3, 3, -1, -3, -3, -1, -3, -3, 3, -3, -1, 1, 3,
/* 16 */ -3, -1, -3, -1, -3, 1, 3, -3, -1, 3, 3, 3, 1, -1, -3, 3, -1, -3,
/* 17 */ -3, -1, 3, 3, -1, 3, -1, -3, -1, 1, -1, -3, -1, -1, -1, 3, 3, 1,
/* 18 */ -3, 1, -3, -1, -1, 3, 1, -3, -3, -3, -1, -3, -3, 1, 1, 1, -1, -1,
/* 19 */ 3, 3, 3, -3, -1, -3, -1, 3, -1, 1, -1, -3, 1, -3, -3, -1, 3, 3,
/* 20 */ -3, 1, 1, -3, 1, 1, 3, -3, -1, -3, -1, 3, -3, 3, -1, -1, -1, -3,
/* 21 */ 1, -3, -1, -3, 3, 3, -1, -3, 1, -3, -3, -1, -3, -1, 1, 3, 3, 3,
/* 22 */ -3, -3, 1, -1, -1, 1, 1, -3, -1, 3, 3, 3, 3, -1, 3, 1, 3, 1,
/* 23 */ 3, -1, -3, 1, -3, -3, -3, 3, 3, -1, 1, -3, -1, 3, 1, 1, 3, 3,
/* 24 */ 3, -1, -1, 1, -3, -1, -3, -1, -3, -3, -1, -3, 1, 1, 1, -3, -3, 3,
/* 25 */ -3, -3, 1, -3, 3, 3, 3, -1, 3, 1, 1, -3, -3, -3, 3, -3, -1, -1,
/* 26 */ -3, -1, -1, -3, 1, -3, 3, -1, -1, -3, 3, 3, -3, -1, 3, -1, -1, -1,
/* 27 */ -3, -3, 3, 3, -3, 1, 3, -1, -3, 1, -1, -3, 3, -3, -1, -1, -1, 3,
/* 28 */ -1, -3, 1, -3, -3, -3, 1, 1, 3, 3, -3, 3, 3, -3, -1, 3, -3, 1,
/* 29 */ -3, 3, 1, -1, -1, -1, -1, 1, -1, 3, 3, -3, -1, 1, 3, -1, 3, -1,
};
/* Table 5.2.2.2-4: Definition of phi (n ) for M_ZC = 24 */
EXTERN const char phi_M_ZC_24[24*U_GROUP_NUMBER]
#ifdef INIT_VARIABLES_LOWPAPR_SEQUENCES_NR_H
= {
/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 */
/* 0 */ -1, -3, 3, -1, 3, 1, 3, -1, 1, -3, -1, -3, -1, 1, 3, -3, -1, -3, 3, 3, 3, -3, -3, -3,
/* 1 */ -1, -3, 3, 1, 1, -3, 1, -3, -3, 1, -3, -1, -1, 3, -3, 3, 3, 3, -3, 1, 3, 3, -3, -3,
/* 2 */ -1, -3, -3, 1, -1, -1, -3, 1, 3, -1, -3, -1, -1, -3, 1, 1, 3, 1, -3, -1, -1, 3, -3, -3,
/* 3 */ 1, -3, 3, -1, -3, -1, 3, 3, 1, -1, 1, 1, 3, -3, -1, -3, -3, -3, -1, 3, -3, -1, -3, -3,
/* 4 */ -1, 3, -3, -3, -1, 3, -1, -1, 1, 3, 1, 3, -1, -1, -3, 1, 3, 1, -1, -3, 1, -1, -3, -3,
/* 5 */ -3, -1, 1, -3, -3, 1, 1, -3, 3, -1, -1, -3, 1, 3, 1, -1, -3, -1, -3, 1, -3, -3, -3, -3,
/* 6 */ -3, 3, 1, 3, -1, 1, -3, 1, -3, 1, -1, -3, -1, -3, -3, -3, -3, -1, -1, -1, 1, 1, -3, -3,
/* 7 */ -3, 1, 3, -1, 1, -1, 3, -3, 3, -1, -3, -1, -3, 3, -1, -1, -1, -3, -1, -1, -3, 3, 3, -3,
/* 8 */ -3, 1, -3, 3, -1, -1, -1, -3, 3, 1, -1, -3, -1, 1, 3, -1, 1, -1, 1, -3, -3, -3, -3, -3,
/* 9 */ 1, 1, -1, -3, -1, 1, 1, -3, 1, -1, 1, -3, 3, -3, -3, 3, -1, -3, 1, 3, -3, 1, -3, -3,
/* 10 */ -3, -3, -3, -1, 3, -3, 3, 1, 3, 1, -3, -1, -1, -3, 1, 1, 3, 1, -1, -3, 3, 1, 3, -3,
/* 11 */ -3, 3, -1, 3, 1, -1, -1, -1, 3, 3, 1, 1, 1, 3, 3, 1, -3, -3, -1, 1, -3, 1, 3, -3,
/* 12 */ 3, -3, 3, -1, -3, 1, 3, 1, -1, -1, -3, -1, 3, -3, 3, -1, -1, 3, 3, -3, -3, 3, -3, -3,
/* 13 */ -3, 3, -1, 3, -1, 3, 3, 1, 1, -3, 1, 3, -3, 3, -3, -3, -1, 1, 3, -3, -1, -1, -3, -3,
/* 14 */ -3, 1, -3, -1, -1, 3, 1, 3, -3, 1, -1, 3, 3, -1, -3, 3, -3, -1, -1, -3, -3, -3, 3, -3,
/* 15 */ -3, -1, -1, -3, 1, -3, -3, -1, -1, 3, -1, 1, -1, 3, 1, -3, -1, 3, 1, 1, -1, -1, -3, -3,
/* 16 */ -3, -3, 1, -1, 3, 3, -3, -1, 1, -1, -1, 1, 1, -1, -1, 3, -3, 1, -3, 1, -1, -1, -1, -3,
/* 17 */ 3, -1, 3, -1, 1, -3, 1, 1, -3, -3, 3, -3, -1, -1, -1, -1, -1, -3, -3, -1, 1, 1, -3, -3,
/* 18 */ 3, 1, -3, 1, -3, -3, 1, -3, 1, -3, -3, -3, -3, -3, 1, -3, -3, 1, 1, -3, 1, 1, -3, -3,
/* 19 */ -3, -3, 3, 3, 1, -1, -1, -1, 1, -3, -1, 1, -1, 3, -3, -1, -3, -1, -1, 1, -3, 3, -1, -3,
/* 20 */ -3, -3, -1, -1, -1, -3, 1, -1, -3, -1, 3, -3, 1, -3, 3, -3, 3, 3, 1, -1, -1, 1, -3, -3,
/* 21 */ 3, -1, 1, -1, 3, -3, 1, 1, 3, -1, -3, 3, 1, -3, 3, -1, -1, -1, -1, 1, -3, -3, -3, -3,
/* 22 */ -3, 1, -3, 3, -3, 1, -3, 3, 1, -1, -3, -1, -3, -3, -3, -3, 1, 3, -1, 1, 3, 3, 3, -3,
/* 23 */ -3, -1, 1, -3, -1, -1, 1, 1, 1, 3, 3, -1, 1, -1, 1, -1, -1, -3, -3, -3, 3, 1, -1, -3,
/* 24 */ -3, 3, -1, -3, -1, -1, -1, 3, -1, -1, 3, -3, -1, 3, -3, 3, -3, -1, 3, 1, 1, -1, -3, -3,
/* 25 */ -3, 1, -1, -3, -3, -1, 1, -3, -1, -3, 1, 1, -1, 1, 1, 3, 3, 3, -1, 1, -1, 1, -1, -3,
/* 26 */ -1, 3, -1, -1, 3, 3, -1, -1, -1, 3, -1, -3, 1, 3, 1, 1, -3, -3, -3, -1, -3, -1, -3, -3,
/* 27 */ 3, -3, -3, -1, 3, 3, -3, -1, 3, 1, 1, 1, 3, -1, 3, -3, -1, 3, -1, 3, 1, -1, -3, -3,
/* 28 */ -3, 1, -3, 1, -3, 1, 1, 3, 1, -3, -3, -1, 1, 3, -1, -3, 3, 1, -1, -3, -3, -3, -3, -3,
/* 29 */ 3, -3, -1, 1, 3, -1, -1, -3, -1, 3, -1, -3, -1, -3, 3, -1, 3, 1, 1, -3, 3, -3, -3, -3,
}
#endif
;
static const char phi_M_ZC_24[24 * U_GROUP_NUMBER] = {
/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 */
/* 0 */ -1, -3, 3, -1, 3, 1, 3, -1, 1, -3, -1, -3, -1, 1, 3, -3, -1, -3, 3, 3, 3, -3, -3, -3,
/* 1 */ -1, -3, 3, 1, 1, -3, 1, -3, -3, 1, -3, -1, -1, 3, -3, 3, 3, 3, -3, 1, 3, 3, -3, -3,
/* 2 */ -1, -3, -3, 1, -1, -1, -3, 1, 3, -1, -3, -1, -1, -3, 1, 1, 3, 1, -3, -1, -1, 3, -3, -3,
/* 3 */ 1, -3, 3, -1, -3, -1, 3, 3, 1, -1, 1, 1, 3, -3, -1, -3, -3, -3, -1, 3, -3, -1, -3, -3,
/* 4 */ -1, 3, -3, -3, -1, 3, -1, -1, 1, 3, 1, 3, -1, -1, -3, 1, 3, 1, -1, -3, 1, -1, -3, -3,
/* 5 */ -3, -1, 1, -3, -3, 1, 1, -3, 3, -1, -1, -3, 1, 3, 1, -1, -3, -1, -3, 1, -3, -3, -3, -3,
/* 6 */ -3, 3, 1, 3, -1, 1, -3, 1, -3, 1, -1, -3, -1, -3, -3, -3, -3, -1, -1, -1, 1, 1, -3, -3,
/* 7 */ -3, 1, 3, -1, 1, -1, 3, -3, 3, -1, -3, -1, -3, 3, -1, -1, -1, -3, -1, -1, -3, 3, 3, -3,
/* 8 */ -3, 1, -3, 3, -1, -1, -1, -3, 3, 1, -1, -3, -1, 1, 3, -1, 1, -1, 1, -3, -3, -3, -3, -3,
/* 9 */ 1, 1, -1, -3, -1, 1, 1, -3, 1, -1, 1, -3, 3, -3, -3, 3, -1, -3, 1, 3, -3, 1, -3, -3,
/* 10 */ -3, -3, -3, -1, 3, -3, 3, 1, 3, 1, -3, -1, -1, -3, 1, 1, 3, 1, -1, -3, 3, 1, 3, -3,
/* 11 */ -3, 3, -1, 3, 1, -1, -1, -1, 3, 3, 1, 1, 1, 3, 3, 1, -3, -3, -1, 1, -3, 1, 3, -3,
/* 12 */ 3, -3, 3, -1, -3, 1, 3, 1, -1, -1, -3, -1, 3, -3, 3, -1, -1, 3, 3, -3, -3, 3, -3, -3,
/* 13 */ -3, 3, -1, 3, -1, 3, 3, 1, 1, -3, 1, 3, -3, 3, -3, -3, -1, 1, 3, -3, -1, -1, -3, -3,
/* 14 */ -3, 1, -3, -1, -1, 3, 1, 3, -3, 1, -1, 3, 3, -1, -3, 3, -3, -1, -1, -3, -3, -3, 3, -3,
/* 15 */ -3, -1, -1, -3, 1, -3, -3, -1, -1, 3, -1, 1, -1, 3, 1, -3, -1, 3, 1, 1, -1, -1, -3, -3,
/* 16 */ -3, -3, 1, -1, 3, 3, -3, -1, 1, -1, -1, 1, 1, -1, -1, 3, -3, 1, -3, 1, -1, -1, -1, -3,
/* 17 */ 3, -1, 3, -1, 1, -3, 1, 1, -3, -3, 3, -3, -1, -1, -1, -1, -1, -3, -3, -1, 1, 1, -3, -3,
/* 18 */ 3, 1, -3, 1, -3, -3, 1, -3, 1, -3, -3, -3, -3, -3, 1, -3, -3, 1, 1, -3, 1, 1, -3, -3,
/* 19 */ -3, -3, 3, 3, 1, -1, -1, -1, 1, -3, -1, 1, -1, 3, -3, -1, -3, -1, -1, 1, -3, 3, -1, -3,
/* 20 */ -3, -3, -1, -1, -1, -3, 1, -1, -3, -1, 3, -3, 1, -3, 3, -3, 3, 3, 1, -1, -1, 1, -3, -3,
/* 21 */ 3, -1, 1, -1, 3, -3, 1, 1, 3, -1, -3, 3, 1, -3, 3, -1, -1, -1, -1, 1, -3, -3, -3, -3,
/* 22 */ -3, 1, -3, 3, -3, 1, -3, 3, 1, -1, -3, -1, -3, -3, -3, -3, 1, 3, -1, 1, 3, 3, 3, -3,
/* 23 */ -3, -1, 1, -3, -1, -1, 1, 1, 1, 3, 3, -1, 1, -1, 1, -1, -1, -3, -3, -3, 3, 1, -1, -3,
/* 24 */ -3, 3, -1, -3, -1, -1, -1, 3, -1, -1, 3, -3, -1, 3, -3, 3, -3, -1, 3, 1, 1, -1, -3, -3,
/* 25 */ -3, 1, -1, -3, -3, -1, 1, -3, -1, -3, 1, 1, -1, 1, 1, 3, 3, 3, -1, 1, -1, 1, -1, -3,
/* 26 */ -1, 3, -1, -1, 3, 3, -1, -1, -1, 3, -1, -3, 1, 3, 1, 1, -3, -3, -3, -1, -3, -1, -3, -3,
/* 27 */ 3, -3, -3, -1, 3, 3, -3, -1, 3, 1, 1, 1, 3, -1, 3, -3, -1, 3, -1, 3, 1, -1, -3, -3,
/* 28 */ -3, 1, -3, 1, -3, 1, 1, 3, 1, -3, -3, -1, 1, 3, -1, -3, 3, 1, -1, -3, -3, -3, -3, -3,
/* 29 */ 3, -3, -1, 1, 3, -1, -1, -3, -1, 3, -1, -3, -1, -3, 3, -1, 3, 1, 1, -3, 3, -3, -3, -3,
};
/************** FUNCTION ******************************************/
EXTERN int16_t *base_sequence_36_or_larger(unsigned int M_ZC, unsigned int u, unsigned int v, unsigned int scaling, unsigned int if_dmrs_seq);
EXTERN int16_t *base_sequence_less_than_36(unsigned int M_ZC, unsigned int u, unsigned int scaling);
/*!
\brief This function generate the sounding reference symbol (SRS) for the uplink.
@param tables of srs
@@ -277,68 +383,151 @@ void free_ul_reference_signal_sequences(void);
// Supported for 100Mhz configuration - which has max 273 RBs
#define MAX_INDEX_DMRS_UL_ALLOCATED_REs 53
static const uint16_t dmrs_ul_allocated_res[MAX_INDEX_DMRS_UL_ALLOCATED_REs]
/* Number of possible DMRS REs based on PRBs allocated for PUSCH. Array has values until 273 RBs (100Mhz BW)
Number of PUSCH RBs allocated should be able to be expressed as 2topowerofn*3topowerofn*5tothepowerofn
According to 3GPP spec 38.211 section 6.3.1.4
Table used in calculating DMRS low papr type1 sequence for transform precoding */
= {
/*RBs 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 16, */
6,
12,
18,
24,
30,
36,
48,
54,
60,
72,
90,
96,
EXTERN const uint16_t dmrs_ul_allocated_res[MAX_INDEX_DMRS_UL_ALLOCATED_REs]
/* Number of possible DMRS REs based on PRBs allocated for PUSCH. Array has values until 273 RBs (100Mhz BW)
Number of PUSCH RBs allocated should be able to be expressed as 2topowerofn*3topowerofn*5tothepowerofn
According to 3GPP spec 38.211 section 6.3.1.4
Table used in calculating DMRS low papr type1 sequence for transform precoding */
#ifdef INIT_VARIABLES_LOWPAPR_SEQUENCES_NR_H
= {
/*RBs 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 16, */
6, 12, 18, 24, 30, 36, 48, 54, 60, 72, 90, 96,
/*RBs 18, 20, 24, 25, 27, 30, 32, 36, 40, 45, 48, 50, */
108,
120,
144,
150,
162,
180,
192,
216,
240,
270,
288,
300,
/*RBs 18, 20, 24, 25, 27, 30, 32, 36, 40, 45, 48, 50, */
108, 120, 144, 150, 162, 180, 192, 216, 240, 270, 288, 300,
/*RBs 54, 60, 64, 72 75, 80, 81, 90, 96, 100, (Bw 40Mhz) */
324,
360,
384,
432,
450,
480,
486,
540,
576,
600,
/*RBs 54, 60, 64, 72 75, 80, 81, 90, 96, 100, (Bw 40Mhz) */
324, 360, 384, 432, 450, 480, 486, 540, 576, 600,
/*RBs 108, 120 125 128 135 144 150 160 162 180 192 200 */
648,
720,
750,
768,
810,
864,
900,
960,
972,
1080,
1152,
1200,
/*RBs 108, 120 125 128 135 144 150 160 162 180 192 200 */
648, 720, 750, 768, 810, 864, 900, 960, 972, 1080, 1152, 1200,
/*RBs 216 225 240 243 250 256 270 supported until 100Mhz */
1296, 1350, 1440, 1458, 1500, 1536, 1620
/*RBs 216 225 240 243 250 256 270 supported until 100Mhz */
1296,
1350,
1440,
1458,
1500,
1536,
1620
}
#endif
;
};
/* Table of largest prime number N_ZC < possible DMRS REs M_ZC, this array has values until 100Mhz
According to 3GPP spec 38.211 section 5.2.2.1
Table used in calculating DMRS low papr type1 sequence for transform precoding */
EXTERN const uint16_t dmrs_ref_ul_primes[MAX_INDEX_DMRS_UL_ALLOCATED_REs]
#ifdef INIT_VARIABLES_LOWPAPR_SEQUENCES_NR_H
= {
/*DMRS REs 6, 12, 18, 24, 30, 36, 48, 54, 60, 72, 90, 96, */
5, 11, 17, 23, 29, 31, 47, 53, 59, 71, 89, 89,
static const uint16_t dmrs_ref_ul_primes[MAX_INDEX_DMRS_UL_ALLOCATED_REs] = {
/*DMRS REs 6, 12, 18, 24, 30, 36, 48, 54, 60, 72, 90, 96, */
5,
11,
17,
23,
29,
31,
47,
53,
59,
71,
89,
89,
/*DMRS REs 108, 120, 144, 150, 162, 180, 192, 216, 240, 270, 288, 300, */
107, 113, 139, 149, 157, 179, 191, 211, 239, 269, 283, 293,
/*DMRS REs 108, 120, 144, 150, 162, 180, 192, 216, 240, 270, 288, 300, */
107,
113,
139,
149,
157,
179,
191,
211,
239,
269,
283,
293,
/*DMRS REs 324, 360, 384, 432, 450, 480, 486, 540, 576, 600, */
317, 359, 383, 431, 449, 479, 479, 523, 571, 599,
/*DMRS REs 648, 720, 750, 768, 810, 864, 900, 960, 972, 1080, 1152, 1200, */
647, 719, 743, 761, 809, 863, 887, 953, 971, 1069, 1151, 1193,
/*DMRS REs 1296, 1350, 1440, 1458, 1500, 1536 1620 supported until 100Mhz */
1291, 1327, 1439, 1453, 1499, 1531, 1619
/*DMRS REs 324, 360, 384, 432, 450, 480, 486, 540, 576, 600, */
317,
359,
383,
431,
449,
479,
479,
523,
571,
599,
}
#endif
;
/*DMRS REs 648, 720, 750, 768, 810, 864, 900, 960, 972, 1080, 1152, 1200, */
647,
719,
743,
761,
809,
863,
887,
953,
971,
1069,
1151,
1193,
/*DMRS REs 1296, 1350, 1440, 1458, 1500, 1536 1620 supported until 100Mhz */
1291,
1327,
1439,
1453,
1499,
1531,
1619
};
/// PUSCH DMRS for transform precoding
EXTERN int16_t *gNB_dmrs_lowpaprtype1_sequence[U_GROUP_NUMBER][V_BASE_SEQUENCE_NUMBER][MAX_INDEX_DMRS_UL_ALLOCATED_REs];
EXTERN int16_t *dmrs_lowpaprtype1_ul_ref_sig[U_GROUP_NUMBER][V_BASE_SEQUENCE_NUMBER][MAX_INDEX_DMRS_UL_ALLOCATED_REs];
extern int16_t *gNB_dmrs_lowpaprtype1_sequence[U_GROUP_NUMBER][V_BASE_SEQUENCE_NUMBER][MAX_INDEX_DMRS_UL_ALLOCATED_REs];
extern int16_t *dmrs_lowpaprtype1_ul_ref_sig[U_GROUP_NUMBER][V_BASE_SEQUENCE_NUMBER][MAX_INDEX_DMRS_UL_ALLOCATED_REs];
int16_t get_index_for_dmrs_lowpapr_seq(int16_t num_dmrs_res);
void generate_lowpapr_typ1_refsig_sequences(unsigned int scaling);
void free_gnb_lowpapr_sequences(void);
#undef INIT_VARIABLES_LOWPAPR_SEQUENCES_NR_H
#undef EXTERN
#endif /* SSS_NR_H */
@@ -678,7 +678,7 @@ void nr_ulsch_qpsk_qpsk(c16_t *stream0_in, c16_t *stream1_in, c16_t *stream0_out
_m_empty();
}
int16_t ones[8] __attribute__((aligned(16))) = {0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff};
static const int16_t ones[8] __attribute__((aligned(16))) = {0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff};
// Calculates psi_a = psi_r * a_r + psi_i * a_i
#define prodsum_psi_a_epi16(psi_r, a_r, psi_i, a_i, psi_a) \
@@ -3945,4 +3945,4 @@ void nr_ulsch_shift_llr(int16_t **llr_layers, uint32_t nb_re, uint32_t rxdataF_e
llr_layers0[i] = simde_mm_srai_epi16(llr_layers0[i], shift);
llr_layers1[i] = simde_mm_srai_epi16(llr_layers1[i], shift);
}
}
}
+1 -3
View File
@@ -36,9 +36,7 @@
#include "PHY/defs_nr_UE.h"
#define DEFINE_VARIABLES_CIC_FILTER_NR_H
#include "PHY/NR_UE_TRANSPORT/cic_filter_nr.h"
#undef DEFINE_VARIABLES_CIC_FILTER_NR_H
/*******************************************************************
*
@@ -223,7 +221,7 @@ void fir_filter_basic(int32_t *input, int32_t *output, int length, int taps_fir_
*
*********************************************************************/
void fir_filter(int32_t *input, int32_t *output, int length, int taps_fir_number, int *taps_fir, int scaling_shift)
void fir_filter(int32_t *input, int32_t *output, int length, int taps_fir_number, const int *taps_fir, int scaling_shift)
{
int32_t current;
+26 -119
View File
@@ -36,13 +36,6 @@
#include "PHY/defs_nr_UE.h"
#include "PHY/types.h"
#ifdef DEFINE_VARIABLES_CIC_FILTER_NR_H
#define EXTERN
#define INIT_VARIABLES_CIC_FILTER_NR_H
#else
#define EXTERN extern
#endif
/************** DEFINE ********************************************/
#define M_DIFFERENTIAL_DELAY (1)
@@ -53,50 +46,28 @@
#define FIR_TAPS_NUMBER (20)
#define FIR_FITER_SCALING_ACC (14)
EXTERN double sharpened_fir_taps[FIR_TAPS_NUMBER]
#ifdef INIT_VARIABLES_CIC_FILTER_NR_H
= {
/*
cic filter and compensation FIR have been designed based on cic design tools provided at
http://www.tsdconseil.fr/tutos/index.html
-->cfir = cic_comp_design(4,4,1,30720000,2,1650000,20);
R = 4.00, Fin = 30720000.00 Hz, Fout = 7680000.00 Hz.
Attenuation for f > fout/2 : -14.82 dB.
Attenuation at 1650000.00 Hz: -0.15 dB.
Attenuation max. between 0 et 1650000.00 Hz: -0.15 dB.
E.g. in linear scale : * 0.983
Number of additionnal bits needed for implementation: 7.
Fout = 7680000.00 Hz.
index = 1026 / 4096.
Correction Fint ?
Filtre global :
static const double sharpened_fir_taps[FIR_TAPS_NUMBER] = {
/*
cic filter and compensation FIR have been designed based on cic design tools provided at
http://www.tsdconseil.fr/tutos/index.html
-->cfir = cic_comp_design(4,4,1,30720000,2,1650000,20);
R = 4.00, Fin = 30720000.00 Hz, Fout = 7680000.00 Hz.
Attenuation for f > fout/2 : -14.82 dB.
Attenuation at 1650000.00 Hz: -0.15 dB.
Attenuation max. between 0 et 1650000.00 Hz: -0.15 dB.
E.g. in linear scale : * 0.983
Number of additionnal bits needed for implementation: 7.
Fout = 7680000.00 Hz.
index = 1026 / 4096.
Correction Fint ?
Filtre global :
-->cfir
cfir =
*/
- 0.0059900,
- 0.0056191,
0.0107582,
0.0266043,
0.0130358,
- 0.0331228,
- 0.0680440,
- 0.0278570,
0.1106335,
0.2897060,
0.3607857,
0.2607354,
0.0983409,
- 0.0243749,
- 0.0583235,
- 0.0276023,
0.0104286,
0.0199533,
0.0071721,
- 0.0028096,
}
#endif
;
-->cfir
cfir =
*/
-0.0059900, -0.0056191, 0.0107582, 0.0266043, 0.0130358, -0.0331228, -0.0680440, -0.0278570, 0.1106335, 0.2897060,
0.3607857, 0.2607354, 0.0983409, -0.0243749, -0.0583235, -0.0276023, 0.0104286, 0.0199533, 0.0071721, -0.0028096,
};
#define MAX_SAMPLEFILTER_TAP_NUM (100)
#define FIR_SCALING_ACC (15)
@@ -119,71 +90,10 @@ typedef struct {
* 2 MHz 15 MHz 0 -20 dB
*/
EXTERN int filter_taps[SAMPLEFILTER_TAP_NUM]
#ifdef INIT_VARIABLES_CIC_FILTER_NR_H
= {
-1572,
65,
-132,
197,
26,
393,
194,
536,
250,
514,
105,
279,
-234,
-105,
-646,
-466,
-924,
-583,
-856,
-279,
-321,
492,
639,
1601,
1812,
2766,
2872,
3650,
3503,
3976,
3503,
3650,
2872,
2766,
1812,
1601,
639,
492,
-321,
-279,
-856,
-583,
-924,
-466,
-646,
-105,
-234,
279,
105,
514,
250,
536,
194,
393,
26,
197,
-132,
65,
-1572
}
#endif
;
static const int filter_taps[SAMPLEFILTER_TAP_NUM] = {
-1572, 65, -132, 197, 26, 393, 194, 536, 250, 514, 105, 279, -234, -105, -646, -466, -924, -583, -856, -279,
-321, 492, 639, 1601, 1812, 2766, 2872, 3650, 3503, 3976, 3503, 3650, 2872, 2766, 1812, 1601, 639, 492, -321, -279,
-856, -583, -924, -466, -646, -105, -234, 279, 105, 514, 250, 536, 194, 393, 26, 197, -132, 65, -1572};
/************** FUNCTION ******************************************/
@@ -193,15 +103,12 @@ void comb_stage(int32_t *input, int32_t *output, int length, int differential_de
void rate_change_stage(int32_t *input, int32_t *output, int length, int rate_change);
void fir_filter(int32_t *input, int32_t *output, int length, int taps_fir_number, int32_t *taps_fir, int scaling_shift);
void fir_filter(int32_t *input, int32_t *output, int length, int taps_fir_number, const int32_t *taps_fir, int scaling_shift);
void cic_decimator(int16_t *input_buffer, int16_t *output_buffer, int length, int rate_change, int number_cic_stage, int set_scaling_factor, int fir_rate_change);
void fir_decimator(int16_t *input_buffer, int16_t *output_buffer, int length, int rate_change, int scaling_factor);
#undef EXTERN
#undef INIT_VARIABLES_CIC_FILTER_NR_H
#endif /* CIC_FILTER_NR_H */
+8 -9
View File
@@ -47,15 +47,14 @@
#include "assertions.h"
#include "T.h"
char nr_dci_format_string[8][30] = {
"NR_DL_DCI_FORMAT_1_0",
"NR_DL_DCI_FORMAT_1_1",
"NR_DL_DCI_FORMAT_2_0",
"NR_DL_DCI_FORMAT_2_1",
"NR_DL_DCI_FORMAT_2_2",
"NR_DL_DCI_FORMAT_2_3",
"NR_UL_DCI_FORMAT_0_0",
"NR_UL_DCI_FORMAT_0_1"};
static const char nr_dci_format_string[8][30] = {"NR_DL_DCI_FORMAT_1_0",
"NR_DL_DCI_FORMAT_1_1",
"NR_DL_DCI_FORMAT_2_0",
"NR_DL_DCI_FORMAT_2_1",
"NR_DL_DCI_FORMAT_2_2",
"NR_DL_DCI_FORMAT_2_3",
"NR_UL_DCI_FORMAT_0_0",
"NR_UL_DCI_FORMAT_0_1"};
//#define DEBUG_DCI_DECODING 1
@@ -38,9 +38,7 @@
//#define DEBUG_LLR_SIC
int16_t nr_zeros[8] __attribute__ ((aligned(16))) = {0,0,0,0,0,0,0,0};
int16_t nr_ones[8] __attribute__ ((aligned(16))) = {0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff};
int16_t nr_zeros[8] __attribute__((aligned(16))) = {0, 0, 0, 0, 0, 0, 0, 0};
#if defined(__x86_64__) || defined(__i386__)
__m128i rho_rpi __attribute__ ((aligned(16)));
__m128i rho_rmi __attribute__((aligned(16)));
@@ -196,9 +196,6 @@ int nr_pbch_detection(UE_nr_rxtx_proc_t * proc, PHY_VARS_NR_UE *ue, int pbch_ini
}
char duplex_string[2][4] = {"FDD","TDD"};
char prefix_string[2][9] = {"NORMAL","EXTENDED"};
int nr_initial_sync(UE_nr_rxtx_proc_t *proc,
PHY_VARS_NR_UE *ue,
int n_frames, int sa)
+2 -1
View File
@@ -380,7 +380,8 @@ unsigned char sign(int8_t x) {
}
*/
uint8_t pbch_deinterleaving_pattern[32] = {28,0,31,30,7,29,25,27,5,8,24,9,10,11,12,13,1,4,3,14,15,16,17,2,26,18,19,20,21,22,6,23};
const uint8_t pbch_deinterleaving_pattern[32] = {28, 0, 31, 30, 7, 29, 25, 27, 5, 8, 24, 9, 10, 11, 12, 13,
1, 4, 3, 14, 15, 16, 17, 2, 26, 18, 19, 20, 21, 22, 6, 23};
int nr_rx_pbch(PHY_VARS_NR_UE *ue,
UE_nr_rxtx_proc_t *proc,
@@ -33,19 +33,13 @@
#include <stdio.h>
#include <math.h>
#define DEFINE_VARIABLES_PHY_IMPLEMENTATION_DEFS_NR_H
#include "PHY/impl_defs_nr.h"
#undef DEFINE_VARIABLES_PHY_IMPLEMENTATION_DEFS_NR_H
#include "PHY/defs_nr_UE.h"
#include "PHY/NR_REFSIG/ss_pbch_nr.h"
#include "PHY/NR_REFSIG/dmrs_nr.h"
#include "PHY/NR_REFSIG/ul_ref_seq_nr.h"
#define DEFINE_VARIABLES_SRS_MODULATION_NR_H
#include "PHY/NR_UE_TRANSPORT/srs_modulation_nr.h"
#undef DEFINE_VARIABLES_SRS_MODULATION_NR_H
//#define SRS_DEBUG
@@ -35,15 +35,6 @@
#include "PHY/defs_nr_UE.h"
#ifdef DEFINE_VARIABLES_SRS_MODULATION_NR_H
#define EXTERN
#define INIT_VARIABLES_SRS_MODULATION_NR_H
#else
#define EXTERN extern
#undef INIT_VARIABLES_SRS_MODULATION_NR_H
#endif
/************** DEFINE ********************************************/
#define C_SRS_NUMBER (64)
@@ -52,93 +43,81 @@
/************** VARIABLES *****************************************/
/* TS 38.211 Table 6.4.1.4.3-1: SRS bandwidth configuration */
EXTERN const unsigned short srs_bandwidth_config[C_SRS_NUMBER][B_SRS_NUMBER][2]
#ifdef INIT_VARIABLES_SRS_MODULATION_NR_H
= {
/* B_SRS = 0 B_SRS = 1 B_SRS = 2 B_SRS = 3 */
/* C SRS m_srs0 N_0 m_srs1 N_1 m_srs2 N_2 m_srs3 N_3 */
/* 0 */ { { 4, 1 },{ 4, 1 },{ 4, 1 },{ 4, 1 } },
/* 1 */ { { 8, 1 },{ 4, 2 },{ 4, 1 },{ 4, 1 } },
/* 2 */ { { 12, 1 },{ 4, 3 },{ 4, 1 },{ 4, 1 } },
/* 3 */ { { 16, 1 },{ 4, 4 },{ 4, 1 },{ 4, 1 } },
/* 4 */ { { 16, 1 },{ 8, 2 },{ 4, 2 },{ 4, 1 } },
/* 5 */ { { 20, 1 },{ 4, 5 },{ 4, 1 },{ 4, 1 } },
/* 6 */ { { 24, 1 },{ 4, 6 },{ 4, 1 },{ 4, 1 } },
/* 7 */ { { 24, 1 },{ 12, 2 },{ 4, 3 },{ 4, 1 } },
/* 8 */ { { 28, 1 },{ 4, 7 },{ 4, 1 },{ 4, 1 } },
/* 9 */ { { 32, 1 },{ 16, 2 },{ 8, 2 },{ 4, 2 } },
/* 10 */ { { 36, 1 },{ 12, 3 },{ 4, 3 },{ 4, 1 } },
/* 11 */ { { 40, 1 },{ 20, 2 },{ 4, 5 },{ 4, 1 } },
/* 12 */ { { 48, 1 },{ 16, 3 },{ 8, 2 },{ 4, 2 } },
/* 13 */ { { 48, 1 },{ 24, 2 },{ 12, 2 },{ 4, 3 } },
/* 14 */ { { 52, 1 },{ 4, 13 },{ 4, 1 },{ 4, 1 } },
/* 15 */ { { 56, 1 },{ 28, 2 },{ 4, 7 },{ 4, 1 } },
/* 16 */ { { 60, 1 },{ 20, 3 },{ 4, 5 },{ 4, 1 } },
/* 17 */ { { 64, 1 },{ 32, 2 },{ 16, 2 },{ 4, 4 } },
/* 18 */ { { 72, 1 },{ 24, 3 },{ 12, 2 },{ 4, 3 } },
/* 19 */ { { 72, 1 },{ 36, 2 },{ 12, 3 },{ 4, 3 } },
/* 20 */ { { 76, 1 },{ 4, 19 },{ 4, 1 },{ 4, 1 } },
/* 21 */ { { 80, 1 },{ 40, 2 },{ 20, 2 },{ 4, 5 } },
/* 22 */ { { 88, 1 },{ 44, 2 },{ 4, 11 },{ 4, 1 } },
/* 23 */ { { 96, 1 },{ 32, 3 },{ 16, 2 },{ 4, 4 } },
/* 24 */ { { 96, 1 },{ 48, 2 },{ 24, 2 },{ 4, 6 } },
/* 25 */ { { 104, 1 },{ 52, 2 },{ 4, 13 },{ 4, 1 } },
/* 26 */ { { 112, 1 },{ 56, 2 },{ 28, 2 },{ 4, 7 } },
/* 27 */ { { 120, 1 },{ 60, 2 },{ 20, 3 },{ 4, 5 } },
/* 28 */ { { 120, 1 },{ 40, 3 },{ 8, 5 },{ 4, 2 } },
/* 29 */ { { 120, 1 },{ 24, 5 },{ 12, 2 },{ 4, 3 } },
/* 30 */ { { 128, 1 },{ 64, 2 },{ 32, 2 },{ 4, 8 } },
/* 31 */ { { 128, 1 },{ 64, 2 },{ 16, 4 },{ 4, 4 } },
/* 32 */ { { 128, 1 },{ 16, 8 },{ 8, 2 },{ 4, 2 } },
/* 33 */ { { 132, 1 },{ 44, 3 },{ 4, 11 },{ 4, 1 } },
/* 34 */ { { 136, 1 },{ 68, 2 },{ 4, 17 },{ 4, 1 } },
/* 35 */ { { 144, 1 },{ 72, 2 },{ 36, 2 },{ 4, 9 } },
/* 36 */ { { 144, 1 },{ 48, 3 },{ 24, 2 },{ 12, 2 } },
/* 37 */ { { 144, 1 },{ 48, 3 },{ 16, 3 },{ 4, 4 } },
/* 38 */ { { 144, 1 },{ 16, 9 },{ 8, 2 },{ 4, 2 } },
/* 39 */ { { 152, 1 },{ 76, 2 },{ 4, 19 },{ 4, 1 } },
/* 40 */ { { 160, 1 },{ 80, 2 },{ 40, 2 },{ 4, 10 } },
/* 41 */ { { 160, 1 },{ 80, 2 },{ 20, 4 },{ 4, 5 } },
/* 42 */ { { 160, 1 },{ 32, 5 },{ 16, 2 },{ 4, 4 } },
/* 43 */ { { 168, 1 },{ 84, 2 },{ 28, 3 },{ 4, 7 } },
/* 44 */ { { 176, 1 },{ 88, 2 },{ 44, 2 },{ 4, 11 } },
/* 45 */ { { 184, 1 },{ 92, 2 },{ 4, 23 },{ 4, 1 } },
/* 46 */ { { 192, 1 },{ 96, 2 },{ 48, 2 },{ 4, 12 } },
/* 47 */ { { 192, 1 },{ 96, 2 },{ 24, 4 },{ 4, 6 } },
/* 48 */ { { 192, 1 },{ 64, 3 },{ 16, 4 },{ 4, 4 } },
/* 49 */ { { 192, 1 },{ 24, 8 },{ 8, 3 },{ 4, 2 } },
/* 50 */ { { 208, 1 },{ 104, 2 },{ 52, 2 },{ 4, 13 } },
/* 51 */ { { 216, 1 },{ 108, 2 },{ 36, 3 },{ 4, 9 } },
/* 52 */ { { 224, 1 },{ 112, 2 },{ 56, 2 },{ 4, 14 } },
/* 53 */ { { 240, 1 },{ 120, 2 },{ 60, 2 },{ 4, 15 } },
/* 54 */ { { 240, 1 },{ 80, 3 },{ 20, 4 },{ 4, 5 } },
/* 55 */ { { 240, 1 },{ 48, 5 },{ 16, 3 },{ 8, 2 } },
/* 56 */ { { 240, 1 },{ 24, 10 },{ 12, 2 },{ 4, 3 } },
/* 57 */ { { 256, 1 },{ 128, 2 },{ 64, 2 },{ 4, 16 } },
/* 58 */ { { 256, 1 },{ 128, 2 },{ 32, 4 },{ 4, 8 } },
/* 59 */ { { 256, 1 },{ 16, 16 },{ 8, 2 },{ 4, 2 } },
/* 60 */ { { 264, 1 },{ 132, 2 },{ 44, 3 },{ 4, 11 } },
/* 61 */ { { 272, 1 },{ 136, 2 },{ 68, 2 },{ 4, 17 } },
/* 62 */ { { 272, 1 },{ 68, 4 },{ 4, 17 },{ 4, 1 } },
/* 63 */ { { 272, 1 },{ 16, 17 },{ 8, 2 },{ 4, 2 } },
}
#endif
;
static const unsigned short srs_bandwidth_config[C_SRS_NUMBER][B_SRS_NUMBER][2] = {
/* B_SRS = 0 B_SRS = 1 B_SRS = 2 B_SRS = 3 */
/* C SRS m_srs0 N_0 m_srs1 N_1 m_srs2 N_2 m_srs3 N_3 */
/* 0 */ {{4, 1}, {4, 1}, {4, 1}, {4, 1}},
/* 1 */ {{8, 1}, {4, 2}, {4, 1}, {4, 1}},
/* 2 */ {{12, 1}, {4, 3}, {4, 1}, {4, 1}},
/* 3 */ {{16, 1}, {4, 4}, {4, 1}, {4, 1}},
/* 4 */ {{16, 1}, {8, 2}, {4, 2}, {4, 1}},
/* 5 */ {{20, 1}, {4, 5}, {4, 1}, {4, 1}},
/* 6 */ {{24, 1}, {4, 6}, {4, 1}, {4, 1}},
/* 7 */ {{24, 1}, {12, 2}, {4, 3}, {4, 1}},
/* 8 */ {{28, 1}, {4, 7}, {4, 1}, {4, 1}},
/* 9 */ {{32, 1}, {16, 2}, {8, 2}, {4, 2}},
/* 10 */ {{36, 1}, {12, 3}, {4, 3}, {4, 1}},
/* 11 */ {{40, 1}, {20, 2}, {4, 5}, {4, 1}},
/* 12 */ {{48, 1}, {16, 3}, {8, 2}, {4, 2}},
/* 13 */ {{48, 1}, {24, 2}, {12, 2}, {4, 3}},
/* 14 */ {{52, 1}, {4, 13}, {4, 1}, {4, 1}},
/* 15 */ {{56, 1}, {28, 2}, {4, 7}, {4, 1}},
/* 16 */ {{60, 1}, {20, 3}, {4, 5}, {4, 1}},
/* 17 */ {{64, 1}, {32, 2}, {16, 2}, {4, 4}},
/* 18 */ {{72, 1}, {24, 3}, {12, 2}, {4, 3}},
/* 19 */ {{72, 1}, {36, 2}, {12, 3}, {4, 3}},
/* 20 */ {{76, 1}, {4, 19}, {4, 1}, {4, 1}},
/* 21 */ {{80, 1}, {40, 2}, {20, 2}, {4, 5}},
/* 22 */ {{88, 1}, {44, 2}, {4, 11}, {4, 1}},
/* 23 */ {{96, 1}, {32, 3}, {16, 2}, {4, 4}},
/* 24 */ {{96, 1}, {48, 2}, {24, 2}, {4, 6}},
/* 25 */ {{104, 1}, {52, 2}, {4, 13}, {4, 1}},
/* 26 */ {{112, 1}, {56, 2}, {28, 2}, {4, 7}},
/* 27 */ {{120, 1}, {60, 2}, {20, 3}, {4, 5}},
/* 28 */ {{120, 1}, {40, 3}, {8, 5}, {4, 2}},
/* 29 */ {{120, 1}, {24, 5}, {12, 2}, {4, 3}},
/* 30 */ {{128, 1}, {64, 2}, {32, 2}, {4, 8}},
/* 31 */ {{128, 1}, {64, 2}, {16, 4}, {4, 4}},
/* 32 */ {{128, 1}, {16, 8}, {8, 2}, {4, 2}},
/* 33 */ {{132, 1}, {44, 3}, {4, 11}, {4, 1}},
/* 34 */ {{136, 1}, {68, 2}, {4, 17}, {4, 1}},
/* 35 */ {{144, 1}, {72, 2}, {36, 2}, {4, 9}},
/* 36 */ {{144, 1}, {48, 3}, {24, 2}, {12, 2}},
/* 37 */ {{144, 1}, {48, 3}, {16, 3}, {4, 4}},
/* 38 */ {{144, 1}, {16, 9}, {8, 2}, {4, 2}},
/* 39 */ {{152, 1}, {76, 2}, {4, 19}, {4, 1}},
/* 40 */ {{160, 1}, {80, 2}, {40, 2}, {4, 10}},
/* 41 */ {{160, 1}, {80, 2}, {20, 4}, {4, 5}},
/* 42 */ {{160, 1}, {32, 5}, {16, 2}, {4, 4}},
/* 43 */ {{168, 1}, {84, 2}, {28, 3}, {4, 7}},
/* 44 */ {{176, 1}, {88, 2}, {44, 2}, {4, 11}},
/* 45 */ {{184, 1}, {92, 2}, {4, 23}, {4, 1}},
/* 46 */ {{192, 1}, {96, 2}, {48, 2}, {4, 12}},
/* 47 */ {{192, 1}, {96, 2}, {24, 4}, {4, 6}},
/* 48 */ {{192, 1}, {64, 3}, {16, 4}, {4, 4}},
/* 49 */ {{192, 1}, {24, 8}, {8, 3}, {4, 2}},
/* 50 */ {{208, 1}, {104, 2}, {52, 2}, {4, 13}},
/* 51 */ {{216, 1}, {108, 2}, {36, 3}, {4, 9}},
/* 52 */ {{224, 1}, {112, 2}, {56, 2}, {4, 14}},
/* 53 */ {{240, 1}, {120, 2}, {60, 2}, {4, 15}},
/* 54 */ {{240, 1}, {80, 3}, {20, 4}, {4, 5}},
/* 55 */ {{240, 1}, {48, 5}, {16, 3}, {8, 2}},
/* 56 */ {{240, 1}, {24, 10}, {12, 2}, {4, 3}},
/* 57 */ {{256, 1}, {128, 2}, {64, 2}, {4, 16}},
/* 58 */ {{256, 1}, {128, 2}, {32, 4}, {4, 8}},
/* 59 */ {{256, 1}, {16, 16}, {8, 2}, {4, 2}},
/* 60 */ {{264, 1}, {132, 2}, {44, 3}, {4, 11}},
/* 61 */ {{272, 1}, {136, 2}, {68, 2}, {4, 17}},
/* 62 */ {{272, 1}, {68, 4}, {4, 17}, {4, 1}},
/* 63 */ {{272, 1}, {16, 17}, {8, 2}, {4, 2}},
};
#define SRS_PERIODICITY (17)
EXTERN const uint16_t srs_periodicity[SRS_PERIODICITY]
#ifdef INIT_VARIABLES_SRS_MODULATION_NR_H
= { 1, 2, 4, 5, 8, 10, 16, 20, 32, 40, 64, 80, 160, 320, 640, 1280, 2560}
#endif
;
static const uint16_t srs_periodicity[SRS_PERIODICITY] = {1, 2, 4, 5, 8, 10, 16, 20, 32, 40, 64, 80, 160, 320, 640, 1280, 2560};
// TS 38.211 - Table 6.4.1.4.2-1
EXTERN const uint16_t srs_max_number_cs[3]
#ifdef INIT_VARIABLES_SRS_MODULATION_NR_H
= {8, 12, 6}
#endif
;
static const uint16_t srs_max_number_cs[3] = {8, 12, 6};
/*************** FUNCTIONS *****************************************/
@@ -179,7 +158,4 @@ int is_srs_period_nr(SRS_Resource_t *p_SRS_Resource,
int ue_srs_procedures_nr(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, c16_t **txdataF);
#undef EXTERN
#undef INIT_VARIABLES_SRS_MODULATION_NR_H
#endif /* SRS_MODULATION_NR_H */
+1 -2
View File
@@ -43,8 +43,7 @@
/* function description array, to be used when loading the dfts/idfts lib */
static loader_shlibfunc_t shlib_fdesc[2];
static char *arg[64]={"phytest","-O","cmdlineonly::dbgl0"};
static char *const arg[64] = {"phytest", "-O", "cmdlineonly::dbgl0"};
int load_dftslib(void) {
+29 -10
View File
@@ -5407,11 +5407,11 @@ void idft98304(int16_t *input, int16_t *output,uint8_t scale) {
/// THIS SECTION IS FOR ALL PUSCH DFTS (i.e. radix 2^a * 3^b * 4^c * 5^d)
/// They use twiddles for 4-way parallel DFTS (i.e. 4 DFTS with interleaved input/output)
static int16_t W1_12s[8]__attribute__((aligned(32))) = {28377,-16383,28377,-16383,28377,-16383,28377,-16383};
static int16_t W2_12s[8]__attribute__((aligned(32))) = {16383,-28377,16383,-28377,16383,-28377,16383,-28377};
static int16_t W3_12s[8]__attribute__((aligned(32))) = {0,-32767,0,-32767,0,-32767,0,-32767};
static int16_t W4_12s[8]__attribute__((aligned(32))) = {-16383,-28377,-16383,-28377,-16383,-28377,-16383,-28377};
static int16_t W6_12s[8]__attribute__((aligned(32))) = {-32767,0,-32767,0,-32767,0,-32767,0};
static int16_t const W1_12s[8] __attribute__((aligned(32))) = {28377, -16383, 28377, -16383, 28377, -16383, 28377, -16383};
static int16_t const W2_12s[8] __attribute__((aligned(32))) = {16383, -28377, 16383, -28377, 16383, -28377, 16383, -28377};
static int16_t const W3_12s[8] __attribute__((aligned(32))) = {0, -32767, 0, -32767, 0, -32767, 0, -32767};
static int16_t const W4_12s[8] __attribute__((aligned(32))) = {-16383, -28377, -16383, -28377, -16383, -28377, -16383, -28377};
static int16_t const W6_12s[8] __attribute__((aligned(32))) = {-32767, 0, -32767, 0, -32767, 0, -32767, 0};
simd_q15_t *W1_12=(simd_q15_t *)W1_12s;
simd_q15_t *W2_12=(simd_q15_t *)W2_12s;
@@ -5587,11 +5587,30 @@ void dft12(int16_t *x,int16_t *y ,unsigned char scale_flag)
}
static int16_t W1_12s_256[16]__attribute__((aligned(32))) = {28377,-16383,28377,-16383,28377,-16383,28377,-16383,28377,-16383,28377,-16383,28377,-16383,28377,-16383};
static int16_t W2_12s_256[16]__attribute__((aligned(32))) = {16383,-28377,16383,-28377,16383,-28377,16383,-28377,16383,-28377,16383,-28377,16383,-28377,16383,-28377};
static int16_t W3_12s_256[16]__attribute__((aligned(32))) = {0,-32767,0,-32767,0,-32767,0,-32767,0,-32767,0,-32767,0,-32767,0,-32767};
static int16_t W4_12s_256[16]__attribute__((aligned(32))) = {-16383,-28377,-16383,-28377,-16383,-28377,-16383,-28377,-16383,-28377,-16383,-28377,-16383,-28377,-16383,-28377};
static int16_t W6_12s_256[16]__attribute__((aligned(32))) = {-32767,0,-32767,0,-32767,0,-32767,0,-32767,0,-32767,0,-32767,0,-32767,0};
static const int16_t W1_12s_256[16] __attribute__((aligned(32))) =
{28377, -16383, 28377, -16383, 28377, -16383, 28377, -16383, 28377, -16383, 28377, -16383, 28377, -16383, 28377, -16383};
static const int16_t W2_12s_256[16] __attribute__((aligned(32))) =
{16383, -28377, 16383, -28377, 16383, -28377, 16383, -28377, 16383, -28377, 16383, -28377, 16383, -28377, 16383, -28377};
static const int16_t W3_12s_256[16]
__attribute__((aligned(32))) = {0, -32767, 0, -32767, 0, -32767, 0, -32767, 0, -32767, 0, -32767, 0, -32767, 0, -32767};
static const int16_t W4_12s_256[16] __attribute__((aligned(32))) = {-16383,
-28377,
-16383,
-28377,
-16383,
-28377,
-16383,
-28377,
-16383,
-28377,
-16383,
-28377,
-16383,
-28377,
-16383,
-28377};
static const int16_t W6_12s_256[16]
__attribute__((aligned(32))) = {-32767, 0, -32767, 0, -32767, 0, -32767, 0, -32767, 0, -32767, 0, -32767, 0, -32767, 0};
simd256_q15_t *W1_12_256=(simd256_q15_t *)W1_12s_256;
simd256_q15_t *W2_12_256=(simd256_q15_t *)W2_12s_256;
+2 -6
View File
@@ -655,17 +655,13 @@ typedef enum idft_size_idx {
struct {
adftfunc_t func;
int size;
} dft_ftab[]= {
FOREACH_DFTSZ(SZ_PTR)
};
} const dft_ftab[] = {FOREACH_DFTSZ(SZ_PTR)};
#define SZ_iPTR(Sz) {idft ## Sz,Sz},
struct {
adftfunc_t func;
int size;
} idft_ftab[]= {
FOREACH_IDFTSZ(SZ_iPTR)
};
} const idft_ftab[] = {FOREACH_IDFTSZ(SZ_iPTR)};
#endif
+2 -22
View File
@@ -37,14 +37,6 @@
#include <stdbool.h>
#include "types.h"
#ifdef DEFINE_VARIABLES_PHY_IMPLEMENTATION_DEFS_NR_H
#define EXTERN
#define INIT_VARIABLES_PHY_IMPLEMENTATION_DEFS_NR_H
#else
#define EXTERN extern
#undef INIT_VARIABLES_PHY_IMPLEMENTATION_DEFS_NR_H
#endif
#ifdef PHY_DBG_DEV_TST
#define PHY_DBG_DEV_TST_PRINTF(...) printf(__VA_ARGS__)
#else
@@ -60,12 +52,7 @@
/* TS 38.211 Table 4.3.2-1: Number of OFDM symbols per slot, slots per frame, and slots per subframe for normal cyclic prefix */
#define MU_NUMBER (5)
EXTERN const uint8_t N_slot_subframe[MU_NUMBER]
#ifdef INIT_VARIABLES_PHY_IMPLEMENTATION_DEFS_NR_H
= { 1, 2, 4, 8, 16}
#endif
;
static const uint8_t N_slot_subframe[MU_NUMBER] = {1, 2, 4, 8, 16};
#define NB_DL_DATA_TO_UL_ACK (8) /* size of table TS 38.213 Table 9.2.3-1 */
@@ -173,11 +160,7 @@ typedef struct TDD_UL_DL_SlotConfig_s {
*
************************************************************************/
EXTERN const int16_t SRS_antenna_port[MAX_NROFSRS_PORTS]
#ifdef INIT_VARIABLES_PHY_IMPLEMENTATION_DEFS_NR_H
= { 1000, 1001, 1002, 1003 }
#endif
;
static const int16_t SRS_antenna_port[MAX_NROFSRS_PORTS] = {1000, 1001, 1002, 1003};
typedef enum {
port1 = 1,
@@ -582,7 +565,4 @@ typedef struct {
SchedulingRequestResourceConfig_t *sr_ResourceConfig[MAX_NR_OF_SR_CONFIG_PER_CELL_GROUP];
} scheduling_request_config_t;
#undef EXTERN
#undef INIT_VARIABLES_PHY_IMPLEMENTATION_DEFS_NR_H
#endif /* PHY_IMPL_DEFS_NR_H */
+2 -5
View File
@@ -270,13 +270,10 @@
/* FFS_NR_TODO it defines ue capability which is the number of slots */
/* - between reception of pdsch and tarnsmission of its acknowlegment */
/* - between reception of un uplink grant and its related transmission */
// should be 2 as per NR standard, but current UE is not able to perform this value
#define NR_UE_CAPABILITY_SLOT_RX_TO_TX (3)
#ifndef NO_RAT_NR
#define DURATION_RX_TO_TX (NR_UE_CAPABILITY_SLOT_RX_TO_TX) /* for NR this will certainly depends to such UE capability which is not yet defined */
#else
#define DURATION_RX_TO_TX (6) /* For LTE, this duration is fixed to 4 and it is linked to LTE standard for both modes FDD/TDD */
#endif
#define DURATION_RX_TO_TX (NR_UE_CAPABILITY_SLOT_RX_TO_TX)
#define NR_MAX_ULSCH_HARQ_PROCESSES (NR_MAX_HARQ_PROCESSES) /* cf 38.214 6.1 UE procedure for receiving the physical uplink shared channel */
#define NR_MAX_DLSCH_HARQ_PROCESSES (NR_MAX_HARQ_PROCESSES) /* cf 38.214 5.1 UE procedure for receiving the physical downlink shared channel */
+1 -1
View File
@@ -177,7 +177,7 @@ static const uint16_t beta_ack[16] = {16, // 2.000
400, // 50.000
640, // 80.000
808}; // 126.00
// TS 36.211 5.3 scrambling
static const int8_t delta_PUSCH_abs[4] = {-4, -1, 1, 4};
static const int8_t delta_PUSCH_acc[4] = {-1, 0, 1, 3};
@@ -47,8 +47,6 @@
//#define DEBUG_RXDATA
//#define SRS_IND_DEBUG
uint8_t SSB_Table[38]={0,2,4,6,8,10,12,14,254,254,16,18,20,22,24,26,28,30,254,254,32,34,36,38,40,42,44,46,254,254,48,50,52,54,56,58,60,62};
extern uint8_t nfapi_mode;
void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame,int slot,nfapi_nr_dl_tti_ssb_pdu ssb_pdu) {
+2 -2
View File
@@ -44,8 +44,8 @@
extern PHY_VARS_NR_UE ***PHY_vars_UE_g;
const char *dl_pdu_type[]={"DCI", "DLSCH", "RA_DLSCH", "SI_DLSCH", "P_DLSCH", "CSI_RS", "CSI_IM", "TA"};
const char *ul_pdu_type[]={"PRACH", "PUCCH", "PUSCH", "SRS"};
const char *const dl_pdu_type[] = {"DCI", "DLSCH", "RA_DLSCH", "SI_DLSCH", "P_DLSCH", "CSI_RS", "CSI_IM", "TA"};
const char *const ul_pdu_type[] = {"PRACH", "PUCCH", "PUSCH", "SRS"};
queue_t nr_rx_ind_queue;
queue_t nr_crc_ind_queue;
queue_t nr_uci_ind_queue;
+3 -1
View File
@@ -74,7 +74,9 @@ fifo_dump_emos_UE emos_dump_UE;
#include "intertask_interface.h"
#include "T.h"
unsigned int gain_table[31] = {100,112,126,141,158,178,200,224,251,282,316,359,398,447,501,562,631,708,794,891,1000,1122,1258,1412,1585,1778,1995,2239,2512,2818,3162};
static const unsigned int gain_table[31] = {100, 112, 126, 141, 158, 178, 200, 224, 251, 282, 316,
359, 398, 447, 501, 562, 631, 708, 794, 891, 1000, 1122,
1258, 1412, 1585, 1778, 1995, 2239, 2512, 2818, 3162};
void nr_fill_dl_indication(nr_downlink_indication_t *dl_ind,
fapi_nr_dci_indication_t *dci_ind,
-8
View File
@@ -41,18 +41,10 @@
#include "openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h"
#include <openair1/PHY/impl_defs_nr.h>
#include <common/utils/nr/nr_common.h>
#ifndef NO_RAT_NR
#include "SCHED_NR_UE/defs.h"
#include "SCHED_NR_UE/harq_nr.h"
#define DEFINE_VARIABLES_PUCCH_UE_NR_H
#include "SCHED_NR_UE/pucch_uci_ue_nr.h"
#undef DEFINE_VARIABLES_PUCCH_UE_NR_H
#endif
long
binary_search_float_nr(
-8
View File
@@ -42,14 +42,6 @@
#include "PHY/defs_nr_UE.h"
#ifdef DEFINE_VARIABLES_PUCCH_UE_NR_H
#define EXTERN
#define INIT_VARIABLES_PUCCH_UE_NR_H
#else
#define EXTERN extern
#undef INIT_VARIABLES_PUCCH_UE_NR_H
#endif
/************** DEFINE ********************************************/
#define BITS_PER_SYMBOL_BPSK (1) /* 1 bit per symbol for bpsk modulation */
+3 -7
View File
@@ -2586,13 +2586,9 @@ int ue_pdcch_procedures(uint8_t eNB_id,
ue->transmission_mode[eNB_id]<7?0:ue->transmission_mode[eNB_id],
ue->pdcch_vars[0%RX_NB_TH][eNB_id]->crnti_is_temporary? ue->pdcch_vars[ue->current_thread_id[subframe_rx]][eNB_id]->crnti: 0)==0)) {
// update TPC for PUCCH
if((dci_alloc_rx[i].format == format1) ||
(dci_alloc_rx[i].format == format1A) ||
(dci_alloc_rx[i].format == format1B) ||
(dci_alloc_rx[i].format == format2) ||
(dci_alloc_rx[i].format == format2A) ||
(dci_alloc_rx[i].format == format2B)) {
//ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][0]->g_pucch += ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][0]->harq_processes[ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][0]->current_harq_pid]->delta_PUCCH;
if ((dci_alloc_rx[i].format == format1) || (dci_alloc_rx[i].format == format1A) || (dci_alloc_rx[i].format == format1B)
|| (dci_alloc_rx[i].format == format2) || (dci_alloc_rx[i].format == format2A)
|| (dci_alloc_rx[i].format == format2B)) {
int32_t delta_pucch = ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][0]->harq_processes[ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][0]->current_harq_pid]->delta_PUCCH;
for(int th_id=0; th_id<RX_NB_TH; th_id++) {
+33 -21
View File
@@ -19,29 +19,41 @@
* contact@openairinterface.org
*/
static double R22_sqrt[6][32] = {
{0.921700, -0.000000, 0.010380, -0.027448, -0.250153, 0.294754, 0.005961, 0.010769, 0.010380, 0.027448, 0.921700, 0.000000, -0.011595, -0.004130, -0.250153, 0.294754, -0.250153, -0.294754, -0.011595, 0.004130, 0.921700, 0.000000, 0.010380, -0.027448, 0.005961, -0.010769, -0.250153, -0.294754, 0.010380, 0.027448, 0.921700, 0.000000},
{0.923810, 0.000000, 0.004069, 0.027832, 0.151730, 0.350180, -0.009882, 0.006114, 0.004069, -0.027832, 0.923810, 0.000000, 0.011218, -0.003029, 0.151730, 0.350180, 0.151730, -0.350180, 0.011218, 0.003029, 0.923810, -0.000000, 0.004069, 0.027832, -0.009882, -0.006114, 0.151730, -0.350180, 0.004069, -0.027832, 0.923810, 0.000000},
{0.927613, 0.000000, 0.014253, 0.025767, -0.061171, -0.367133, 0.009258, -0.007340, 0.014253, -0.025767, 0.927613, -0.000000, -0.011138, -0.003942, -0.061171, -0.367133, -0.061171, 0.367133, -0.011138, 0.003942, 0.927613, 0.000000, 0.014253, 0.025767, 0.009258, 0.007340, -0.061171, 0.367133, 0.014253, -0.025767, 0.927613, 0.000000},
{0.869794, -0.000000, -0.010613, -0.001218, 0.399115, 0.289852, -0.004464, -0.004096, -0.010613, 0.001218, 0.869794, -0.000000, -0.005276, -0.002978, 0.399115, 0.289852, 0.399115, -0.289852, -0.005276, 0.002978, 0.869794, -0.000000, -0.010613, -0.001218, -0.004464, 0.004096, 0.399115, -0.289852, -0.010613, 0.001218, 0.869794, 0.000000},
{0.919726, -0.000000, 0.038700, -0.111146, 0.217804, 0.300925, 0.045531, -0.013659, 0.038700, 0.111146, 0.919726, 0.000000, -0.027201, 0.038983, 0.217804, 0.300925, 0.217804, -0.300925, -0.027201, -0.038983, 0.919726, 0.000000, 0.038700, -0.111146, 0.045531, 0.013659, 0.217804, -0.300925, 0.038700, 0.111146, 0.919726, 0.000000},
{0.867608, -0.000000, 0.194097, -0.112414, -0.418811, 0.095938, -0.081264, 0.075727, 0.194097, 0.112414, 0.867608, -0.000000, -0.106125, -0.032801, -0.418811, 0.095938, -0.418811, -0.095938, -0.106125, 0.032801, 0.867608, 0.000000, 0.194097, -0.112414, -0.081264, -0.075727, -0.418811, -0.095938, 0.194097, 0.112414, 0.867608, 0.000000},
static const double R22_sqrt[6][32] = {
{0.921700, -0.000000, 0.010380, -0.027448, -0.250153, 0.294754, 0.005961, 0.010769, 0.010380, 0.027448, 0.921700,
0.000000, -0.011595, -0.004130, -0.250153, 0.294754, -0.250153, -0.294754, -0.011595, 0.004130, 0.921700, 0.000000,
0.010380, -0.027448, 0.005961, -0.010769, -0.250153, -0.294754, 0.010380, 0.027448, 0.921700, 0.000000},
{0.923810, 0.000000, 0.004069, 0.027832, 0.151730, 0.350180, -0.009882, 0.006114, 0.004069, -0.027832, 0.923810,
0.000000, 0.011218, -0.003029, 0.151730, 0.350180, 0.151730, -0.350180, 0.011218, 0.003029, 0.923810, -0.000000,
0.004069, 0.027832, -0.009882, -0.006114, 0.151730, -0.350180, 0.004069, -0.027832, 0.923810, 0.000000},
{0.927613, 0.000000, 0.014253, 0.025767, -0.061171, -0.367133, 0.009258, -0.007340, 0.014253, -0.025767, 0.927613,
-0.000000, -0.011138, -0.003942, -0.061171, -0.367133, -0.061171, 0.367133, -0.011138, 0.003942, 0.927613, 0.000000,
0.014253, 0.025767, 0.009258, 0.007340, -0.061171, 0.367133, 0.014253, -0.025767, 0.927613, 0.000000},
{0.869794, -0.000000, -0.010613, -0.001218, 0.399115, 0.289852, -0.004464, -0.004096, -0.010613, 0.001218, 0.869794,
-0.000000, -0.005276, -0.002978, 0.399115, 0.289852, 0.399115, -0.289852, -0.005276, 0.002978, 0.869794, -0.000000,
-0.010613, -0.001218, -0.004464, 0.004096, 0.399115, -0.289852, -0.010613, 0.001218, 0.869794, 0.000000},
{0.919726, -0.000000, 0.038700, -0.111146, 0.217804, 0.300925, 0.045531, -0.013659, 0.038700, 0.111146, 0.919726,
0.000000, -0.027201, 0.038983, 0.217804, 0.300925, 0.217804, -0.300925, -0.027201, -0.038983, 0.919726, 0.000000,
0.038700, -0.111146, 0.045531, 0.013659, 0.217804, -0.300925, 0.038700, 0.111146, 0.919726, 0.000000},
{0.867608, -0.000000, 0.194097, -0.112414, -0.418811, 0.095938, -0.081264, 0.075727, 0.194097, 0.112414, 0.867608,
-0.000000, -0.106125, -0.032801, -0.418811, 0.095938, -0.418811, -0.095938, -0.106125, 0.032801, 0.867608, 0.000000,
0.194097, -0.112414, -0.081264, -0.075727, -0.418811, -0.095938, 0.194097, 0.112414, 0.867608, 0.000000},
};
static double R21_sqrt[6][8] = {
{0.922167, 0.000000,-0.250280, 0.294903,-0.250280, -0.294903,0.922167, 0.000000},
{0.924238, 0.000000,0.151801, 0.350342,0.151801, -0.350342,0.924238, 0.000000},
{0.928080, 0.000000,-0.061202, -0.367318,-0.061202, 0.367318,0.928080, 0.000000},
{0.869860, 0.000000,0.399145, 0.289874,0.399145, -0.289874,0.869860, 0.000000},
{0.927225, 0.000000,0.219580, 0.303378,0.219580, -0.303378,0.927225, 0.000000},
{0.896133, 0.000000,-0.432581, 0.099092,-0.432581, -0.099092,0.896133, 0.000000},
static const double R21_sqrt[6][8] = {
{0.922167, 0.000000, -0.250280, 0.294903, -0.250280, -0.294903, 0.922167, 0.000000},
{0.924238, 0.000000, 0.151801, 0.350342, 0.151801, -0.350342, 0.924238, 0.000000},
{0.928080, 0.000000, -0.061202, -0.367318, -0.061202, 0.367318, 0.928080, 0.000000},
{0.869860, 0.000000, 0.399145, 0.289874, 0.399145, -0.289874, 0.869860, 0.000000},
{0.927225, 0.000000, 0.219580, 0.303378, 0.219580, -0.303378, 0.927225, 0.000000},
{0.896133, 0.000000, -0.432581, 0.099092, -0.432581, -0.099092, 0.896133, 0.000000},
};
static double R12_sqrt[6][8] = {
{0.999494, 0.000000,0.011256, -0.029765,0.011256, 0.029765,0.999494, 0.000000},
{0.999537, 0.000000,0.004402, 0.030114,0.004402, -0.030114,0.999537, 0.000000},
{0.999497, 0.000000,0.015358, 0.027764,0.015358, -0.027764,0.999497, 0.000000},
{0.999925, -0.000000,-0.012201, -0.001400,-0.012201, 0.001400,0.999925, 0.000000},
{0.991912, 0.000000,0.041738, -0.119870,0.041738, 0.119870,0.991912, 0.000000},
{0.968169, 0.000000,0.216594, -0.125443,0.216594, 0.125443,0.968169, 0.000000},
static const double R12_sqrt[6][8] = {
{0.999494, 0.000000, 0.011256, -0.029765, 0.011256, 0.029765, 0.999494, 0.000000},
{0.999537, 0.000000, 0.004402, 0.030114, 0.004402, -0.030114, 0.999537, 0.000000},
{0.999497, 0.000000, 0.015358, 0.027764, 0.015358, -0.027764, 0.999497, 0.000000},
{0.999925, -0.000000, -0.012201, -0.001400, -0.012201, 0.001400, 0.999925, 0.000000},
{0.991912, 0.000000, 0.041738, -0.119870, 0.041738, 0.119870, 0.991912, 0.000000},
{0.968169, 0.000000, 0.216594, -0.125443, 0.216594, 0.125443, 0.968169, 0.000000},
};
// TS 38.104 - Table G.2.3.1.2-2: MIMO correlation matrices for high correlation