SRS tx power with power control state
This commit is contained in:
@@ -631,7 +631,7 @@ int nr_srs_channel_estimation(
|
||||
|
||||
const uint8_t N_ap = 1<<srs_pdu->num_ant_ports;
|
||||
const uint8_t K_TC = 2<<srs_pdu->comb_size;
|
||||
const uint16_t m_SRS_b = srs_bandwidth_config[srs_pdu->config_index][srs_pdu->bandwidth_index][0];
|
||||
const uint16_t m_SRS_b = get_m_srs(srs_pdu->config_index, srs_pdu->bandwidth_index);
|
||||
const uint16_t M_sc_b_SRS = m_SRS_b * NR_NB_SC_PER_RB/K_TC;
|
||||
uint8_t fd_cdm = N_ap;
|
||||
if (N_ap == 4 && ((K_TC == 2 && srs_pdu->cyclic_shift >= 4) || (K_TC == 4 && srs_pdu->cyclic_shift >= 6))) {
|
||||
|
||||
@@ -80,7 +80,7 @@ int nr_get_srs_signal(PHY_VARS_gNB *gNB,
|
||||
const uint8_t N_ap = 1<<srs_pdu->num_ant_ports;
|
||||
const uint8_t N_symb_SRS = 1 << srs_pdu->num_symbols;
|
||||
const uint8_t K_TC = 2 << srs_pdu->comb_size;
|
||||
const uint16_t M_sc_b_SRS = srs_bandwidth_config[srs_pdu->config_index][srs_pdu->bandwidth_index][0] * NR_NB_SC_PER_RB/K_TC;
|
||||
const uint16_t M_sc_b_SRS = get_m_srs(srs_pdu->config_index, srs_pdu->bandwidth_index) * NR_NB_SC_PER_RB / K_TC;
|
||||
|
||||
int32_t *rx_signal;
|
||||
bool no_srs_signal = true;
|
||||
|
||||
@@ -110,17 +110,17 @@ uint16_t compute_F_b(frame_t frame_number,
|
||||
uint16_t product_N_b = 1;
|
||||
for (unsigned int b_prime = b_hop; b_prime < B_SRS; b_prime++) {
|
||||
if (b_prime != b_hop) {
|
||||
product_N_b *= srs_bandwidth_config[C_SRS][b_prime][1];
|
||||
product_N_b *= get_N_b_srs(C_SRS, b_prime);
|
||||
}
|
||||
}
|
||||
|
||||
uint16_t F_b = 0;
|
||||
uint8_t N_b = srs_bandwidth_config[C_SRS][b][1];
|
||||
uint8_t N_b = get_N_b_srs(C_SRS, b);
|
||||
if (N_b & 1) { // Nb odd
|
||||
F_b = (N_b/2)*(n_SRS/product_N_b);
|
||||
} else { // Nb even
|
||||
uint16_t product_N_b_B_SRS = product_N_b;
|
||||
product_N_b_B_SRS *= srs_bandwidth_config[C_SRS][B_SRS][1]; /* product for b_hop to b */
|
||||
product_N_b_B_SRS *= get_N_b_srs(C_SRS, B_SRS); /* product for b_hop to b */
|
||||
F_b = (N_b/2)*((n_SRS%product_N_b_B_SRS)/product_N_b) + ((n_SRS%product_N_b_B_SRS)/2*product_N_b);
|
||||
}
|
||||
|
||||
@@ -142,8 +142,8 @@ uint16_t compute_n_b(frame_t frame_number,
|
||||
uint8_t l_line,
|
||||
uint8_t b) {
|
||||
|
||||
uint8_t N_b = srs_bandwidth_config[C_SRS][b][1];
|
||||
uint16_t m_SRS_b = srs_bandwidth_config[C_SRS][B_SRS][0];
|
||||
uint8_t N_b = get_N_b_srs(C_SRS, b);
|
||||
uint16_t m_SRS_b = get_m_srs(C_SRS, B_SRS);
|
||||
|
||||
uint16_t n_b = 0;
|
||||
if (b_hop >= B_SRS) {
|
||||
@@ -211,7 +211,7 @@ int generate_srs_nr(nfapi_nr_srs_pdu_t *srs_config_pdu,
|
||||
uint8_t N_symb_SRS = 1<<srs_config_pdu->num_symbols; // Number of consecutive OFDM symbols
|
||||
uint8_t l0 = frame_parms->symbols_per_slot - 1 - l_offset; // Starting symbol position in the time domain
|
||||
uint8_t n_SRS_cs_max = srs_max_number_cs[srs_config_pdu->comb_size];
|
||||
uint16_t m_SRS_b = srs_bandwidth_config[C_SRS][B_SRS][0]; // Number of resource blocks
|
||||
uint16_t m_SRS_b = get_m_srs(C_SRS, B_SRS); // Number of resource blocks
|
||||
uint16_t M_sc_b_SRS = m_SRS_b * NR_NB_SC_PER_RB/K_TC; // Length of the SRS sequence
|
||||
|
||||
#ifdef SRS_DEBUG
|
||||
@@ -273,7 +273,7 @@ int generate_srs_nr(nfapi_nr_srs_pdu_t *srs_config_pdu,
|
||||
}
|
||||
uint64_t subcarrier_offset = frame_parms->first_carrier_offset + srs_config_pdu->bwp_start*NR_NB_SC_PER_RB;
|
||||
double sqrt_N_ap = sqrt(N_ap);
|
||||
uint16_t n_b[B_SRS_NUMBER];
|
||||
uint16_t n_b[B_SRS + 1];
|
||||
|
||||
// Find index of table which is for this SRS length
|
||||
uint16_t M_sc_b_SRS_index = 0;
|
||||
|
||||
@@ -35,83 +35,6 @@
|
||||
|
||||
#include "PHY/defs_nr_UE.h"
|
||||
|
||||
/************** DEFINE ********************************************/
|
||||
|
||||
#define C_SRS_NUMBER (64)
|
||||
#define B_SRS_NUMBER (4)
|
||||
|
||||
/************** VARIABLES *****************************************/
|
||||
|
||||
/* TS 38.211 Table 6.4.1.4.3-1: SRS bandwidth configuration */
|
||||
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)
|
||||
|
||||
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};
|
||||
|
||||
Reference in New Issue
Block a user