remove dead commented code
This commit is contained in:
@@ -268,9 +268,6 @@ unsigned short get_N_b_srs(int c_srs, int b_srs);
|
||||
#define CEILIDIV(a,b) ((a+b-1)/b)
|
||||
#define ROUNDIDIV(a,b) (((a<<1)+b)/(b<<1))
|
||||
|
||||
// Align up to a multiple of 16
|
||||
#define ALIGN_UP_16(a) ((a + 15) & ~15)
|
||||
|
||||
static const char *const duplex_mode_txt[] = {"FDD", "TDD"};
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -197,7 +197,7 @@ void phy_init_nr_gNB(PHY_VARS_gNB *gNB)
|
||||
int n_buf = Prx*max_ul_mimo_layers;
|
||||
|
||||
int nb_re_pusch = N_RB_UL * NR_NB_SC_PER_RB;
|
||||
int nb_re_pusch2 = ALIGN_UP_16(nb_re_pusch);
|
||||
int nb_re_pusch2 = ceil_mod(nb_re_pusch, 16);
|
||||
|
||||
gNB->pusch_vars = (NR_gNB_PUSCH *)malloc16_clear(gNB->max_nb_pusch * sizeof(NR_gNB_PUSCH));
|
||||
for (int ULSCH_id = 0; ULSCH_id < gNB->max_nb_pusch; ULSCH_id++) {
|
||||
|
||||
@@ -703,11 +703,11 @@ int nr_srs_channel_estimation(
|
||||
const nfapi_nr_srs_pdu_t *srs_pdu,
|
||||
const nr_srs_info_t *nr_srs_info,
|
||||
const c16_t **srs_generated_signal,
|
||||
int32_t srs_received_signal[][gNB->frame_parms.ofdm_symbol_size * (1 << srs_pdu->num_symbols)],
|
||||
int32_t srs_estimated_channel_freq[][1 << srs_pdu->num_ant_ports]
|
||||
[gNB->frame_parms.ofdm_symbol_size * (1 << srs_pdu->num_symbols)],
|
||||
int32_t srs_estimated_channel_time[][1 << srs_pdu->num_ant_ports][gNB->frame_parms.ofdm_symbol_size],
|
||||
int32_t srs_estimated_channel_time_shifted[][1 << srs_pdu->num_ant_ports][gNB->frame_parms.ofdm_symbol_size],
|
||||
c16_t srs_received_signal[][gNB->frame_parms.ofdm_symbol_size * (1 << srs_pdu->num_symbols)],
|
||||
c16_t srs_estimated_channel_freq[][1 << srs_pdu->num_ant_ports]
|
||||
[gNB->frame_parms.ofdm_symbol_size * (1 << srs_pdu->num_symbols)],
|
||||
c16_t srs_estimated_channel_time[][1 << srs_pdu->num_ant_ports][gNB->frame_parms.ofdm_symbol_size],
|
||||
c16_t srs_estimated_channel_time_shifted[][1 << srs_pdu->num_ant_ports][gNB->frame_parms.ofdm_symbol_size],
|
||||
int8_t *snr_per_rb,
|
||||
int8_t *snr)
|
||||
{
|
||||
@@ -738,20 +738,20 @@ int nr_srs_channel_estimation(
|
||||
c16_t noise[arr_len];
|
||||
memset(noise, 0, arr_len * sizeof(c16_t));
|
||||
|
||||
uint8_t mem_offset = ((16 - ((long)&srs_estimated_channel_freq[0][0][subcarrier_offset + nr_srs_info->k_0_p[0][0]])) & 0xF)
|
||||
uint8_t mem_offset = ((16 - ((intptr_t)&srs_estimated_channel_freq[0][0][subcarrier_offset + nr_srs_info->k_0_p[0][0]])) & 0xF)
|
||||
>> 2; // >> 2 <=> /sizeof(int32_t)
|
||||
|
||||
// filt16_end is {4096,8192,8192,8192,12288,16384,16384,16384,0,0,0,0,0,0,0,0}
|
||||
// The End of OFDM symbol corresponds to the position of last 16384 in the filter
|
||||
// The c16multaddVectRealComplex applies the remaining 8 zeros of filter, therefore, to avoid a buffer overflow,
|
||||
// we added 8 in the array size
|
||||
int32_t srs_est[frame_parms->ofdm_symbol_size * (1 << srs_pdu->num_symbols) + mem_offset + 8] __attribute__((aligned(32)));
|
||||
c16_t srs_est[frame_parms->ofdm_symbol_size * (1 << srs_pdu->num_symbols) + mem_offset + 8] __attribute__((aligned(32)));
|
||||
c16_t ls_estimated = {0};
|
||||
|
||||
for (int ant = 0; ant < frame_parms->nb_antennas_rx; ant++) {
|
||||
for (int p_index = 0; p_index < N_ap; p_index++) {
|
||||
memset(srs_ls_estimated_channel, 0, frame_parms->ofdm_symbol_size * (1 << srs_pdu->num_symbols) * sizeof(c16_t));
|
||||
memset(srs_est, 0, (frame_parms->ofdm_symbol_size * (1 << srs_pdu->num_symbols) + mem_offset) * sizeof(int32_t));
|
||||
memset(srs_est, 0, (frame_parms->ofdm_symbol_size * (1 << srs_pdu->num_symbols) + mem_offset) * sizeof(c16_t));
|
||||
|
||||
#ifdef SRS_DEBUG
|
||||
LOG_I(NR_PHY, "====================== UE port %d --> gNB Rx antenna %i ======================\n", p_index, ant);
|
||||
@@ -762,7 +762,7 @@ int nr_srs_channel_estimation(
|
||||
subcarrier -= frame_parms->ofdm_symbol_size;
|
||||
}
|
||||
|
||||
c16_t *srs_estimated_channel16 = (c16_t *)&srs_est[subcarrier + mem_offset];
|
||||
c16_t *srs_estimated_channel16 = &srs_est[subcarrier + mem_offset];
|
||||
|
||||
for (int k = 0; k < M_sc_b_SRS; k++) {
|
||||
if (k % fd_cdm == 0) {
|
||||
@@ -773,8 +773,8 @@ int nr_srs_channel_estimation(
|
||||
int16_t generated_real = srs_generated_signal[p_index][subcarrier_cdm].r;
|
||||
int16_t generated_imag = srs_generated_signal[p_index][subcarrier_cdm].i;
|
||||
|
||||
int16_t received_real = ((c16_t *)srs_received_signal[ant])[subcarrier_cdm].r;
|
||||
int16_t received_imag = ((c16_t *)srs_received_signal[ant])[subcarrier_cdm].i;
|
||||
int16_t received_real = srs_received_signal[ant][subcarrier_cdm].r;
|
||||
int16_t received_imag = srs_received_signal[ant][subcarrier_cdm].i;
|
||||
|
||||
// We know that nr_srs_info->srs_generated_signal_bits bits are enough to represent the generated_real and
|
||||
// generated_imag. So we only need a nr_srs_info->srs_generated_signal_bits shift to ensure that the result fits into 16
|
||||
@@ -806,10 +806,10 @@ int nr_srs_channel_estimation(
|
||||
LOG_I(NR_PHY,
|
||||
"(%4i) %6i\t%6i | %6i\t%6i | %6i\t%6i\n",
|
||||
subcarrier_log,
|
||||
((c16_t *)srs_generated_signal[p_index])[subcarrier].r,
|
||||
((c16_t *)srs_generated_signal[p_index])[subcarrier].i,
|
||||
((c16_t *)srs_received_signal[ant])[subcarrier].r,
|
||||
((c16_t *)srs_received_signal[ant])[subcarrier].i,
|
||||
srs_generated_signal[p_index][subcarrier].r,
|
||||
srs_generated_signal[p_index][subcarrier].i,
|
||||
srs_received_signal[ant][subcarrier].r,
|
||||
srs_received_signal[ant][subcarrier].i,
|
||||
ls_estimated.r,
|
||||
ls_estimated.i);
|
||||
#endif
|
||||
@@ -823,7 +823,7 @@ int nr_srs_channel_estimation(
|
||||
c16multaddVectRealComplex(filt8_start, &ls_estimated, srs_estimated_channel16, 8);
|
||||
} else if (subcarrier < K_TC) { // Start of OFDM symbol case
|
||||
// filt8_start is {12288,8192,4096,0,0,0,0,0}
|
||||
srs_estimated_channel16 = (c16_t *)&srs_est[subcarrier];
|
||||
srs_estimated_channel16 = &srs_est[subcarrier];
|
||||
const short *filter = mem_offset == 0 ? filt8_start : filt8_start_shift2;
|
||||
c16multaddVectRealComplex(filter, &ls_estimated, srs_estimated_channel16, 8);
|
||||
} else if ((subcarrier + K_TC) >= frame_parms->ofdm_symbol_size
|
||||
@@ -837,14 +837,14 @@ int nr_srs_channel_estimation(
|
||||
} else if (k % 2 == 0) { // 2nd middle case
|
||||
// filt8_middle4 is {0,0,4096,8192,8192,8192,4096,0}
|
||||
c16multaddVectRealComplex(filt8_middle4, &ls_estimated, srs_estimated_channel16, 8);
|
||||
srs_estimated_channel16 = (c16_t *)&srs_est[sc_offset];
|
||||
srs_estimated_channel16 = &srs_est[sc_offset];
|
||||
}
|
||||
} else {
|
||||
if (k == 0) { // First subcarrier case
|
||||
// filt16_start is {12288,8192,8192,8192,4096,0,0,0,0,0,0,0,0,0,0,0}
|
||||
c16multaddVectRealComplex(filt16_start, &ls_estimated, srs_estimated_channel16, 16);
|
||||
} else if (subcarrier < K_TC) { // Start of OFDM symbol case
|
||||
srs_estimated_channel16 = (c16_t *)&srs_est[sc_offset];
|
||||
srs_estimated_channel16 = &srs_est[sc_offset];
|
||||
// filt16_start is {12288,8192,8192,8192,4096,0,0,0,0,0,0,0,0,0,0,0}
|
||||
c16multaddVectRealComplex(filt16_start, &ls_estimated, srs_estimated_channel16, 16);
|
||||
} else if ((subcarrier + K_TC) >= frame_parms->ofdm_symbol_size
|
||||
@@ -854,7 +854,7 @@ int nr_srs_channel_estimation(
|
||||
} else { // Middle case
|
||||
// filt16_middle4 is {4096,8192,8192,8192,8192,8192,8192,8192,4096,0,0,0,0,0,0,0}
|
||||
c16multaddVectRealComplex(filt16_middle4, &ls_estimated, srs_estimated_channel16, 16);
|
||||
srs_estimated_channel16 = (c16_t *)&srs_est[sc_offset];
|
||||
srs_estimated_channel16 = &srs_est[sc_offset];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -866,9 +866,9 @@ int nr_srs_channel_estimation(
|
||||
|
||||
} // for (int k = 0; k < M_sc_b_SRS; k++)
|
||||
|
||||
memcpy(&srs_estimated_channel_freq[ant][p_index][0],
|
||||
memcpy(srs_estimated_channel_freq[ant][p_index],
|
||||
&srs_est[mem_offset],
|
||||
(frame_parms->ofdm_symbol_size * (1 << srs_pdu->num_symbols)) * sizeof(int32_t));
|
||||
(frame_parms->ofdm_symbol_size * (1 << srs_pdu->num_symbols)) * sizeof(c16_t));
|
||||
|
||||
// Compute noise
|
||||
subcarrier = subcarrier_offset + nr_srs_info->k_0_p[p_index][0];
|
||||
@@ -877,7 +877,7 @@ int nr_srs_channel_estimation(
|
||||
}
|
||||
uint16_t base_idx = ant * N_ap * M_sc_b_SRS + p_index * M_sc_b_SRS;
|
||||
for (int k = 0; k < M_sc_b_SRS; k++) {
|
||||
ch[base_idx + k] = ((c16_t *)srs_estimated_channel_freq[ant][p_index])[subcarrier];
|
||||
ch[base_idx + k] = srs_estimated_channel_freq[ant][p_index][subcarrier];
|
||||
noise[base_idx + k].r = abs(srs_ls_estimated_channel[subcarrier].r - ch[base_idx + k].r);
|
||||
noise[base_idx + k].i = abs(srs_ls_estimated_channel[subcarrier].i - ch[base_idx + k].i);
|
||||
subcarrier += K_TC;
|
||||
@@ -908,8 +908,8 @@ int nr_srs_channel_estimation(
|
||||
subcarrier_log,
|
||||
srs_ls_estimated_channel[subcarrier].r,
|
||||
srs_ls_estimated_channel[subcarrier].i,
|
||||
((c16_t *)srs_estimated_channel_freq[ant][p_index])[subcarrier].r,
|
||||
((c16_t *)srs_estimated_channel_freq[ant][p_index])[subcarrier].i,
|
||||
srs_estimated_channel_freq[ant][p_index][subcarrier].r,
|
||||
srs_estimated_channel_freq[ant][p_index][subcarrier].i,
|
||||
noise[base_idx + (k / K_TC)].r,
|
||||
noise[base_idx + (k / K_TC)].i);
|
||||
|
||||
@@ -926,13 +926,13 @@ int nr_srs_channel_estimation(
|
||||
(int16_t *)srs_estimated_channel_freq[ant][p_index],
|
||||
(int16_t *)srs_estimated_channel_time[ant][p_index]);
|
||||
|
||||
memcpy(&srs_estimated_channel_time_shifted[ant][p_index][0],
|
||||
memcpy(srs_estimated_channel_time_shifted[ant][p_index],
|
||||
&srs_estimated_channel_time[ant][p_index][gNB->frame_parms.ofdm_symbol_size >> 1],
|
||||
(gNB->frame_parms.ofdm_symbol_size >> 1) * sizeof(int32_t));
|
||||
(gNB->frame_parms.ofdm_symbol_size >> 1) * sizeof(c16_t));
|
||||
|
||||
memcpy(&srs_estimated_channel_time_shifted[ant][p_index][gNB->frame_parms.ofdm_symbol_size >> 1],
|
||||
&srs_estimated_channel_time[ant][p_index][0],
|
||||
(gNB->frame_parms.ofdm_symbol_size >> 1) * sizeof(int32_t));
|
||||
srs_estimated_channel_time[ant][p_index],
|
||||
(gNB->frame_parms.ofdm_symbol_size >> 1) * sizeof(c16_t));
|
||||
|
||||
} // for (int p_index = 0; p_index < N_ap; p_index++)
|
||||
} // for (int ant = 0; ant < frame_parms->nb_antennas_rx; ant++)
|
||||
|
||||
@@ -81,11 +81,11 @@ int nr_srs_channel_estimation(
|
||||
const nfapi_nr_srs_pdu_t *srs_pdu,
|
||||
const nr_srs_info_t *nr_srs_info,
|
||||
const c16_t **srs_generated_signal,
|
||||
int32_t srs_received_signal[][gNB->frame_parms.ofdm_symbol_size * (1 << srs_pdu->num_symbols)],
|
||||
int32_t srs_estimated_channel_freq[][1 << srs_pdu->num_ant_ports]
|
||||
[gNB->frame_parms.ofdm_symbol_size * (1 << srs_pdu->num_symbols)],
|
||||
int32_t srs_estimated_channel_time[][1 << srs_pdu->num_ant_ports][gNB->frame_parms.ofdm_symbol_size],
|
||||
int32_t srs_estimated_channel_time_shifted[][1 << srs_pdu->num_ant_ports][gNB->frame_parms.ofdm_symbol_size],
|
||||
c16_t srs_received_signal[][gNB->frame_parms.ofdm_symbol_size * (1 << srs_pdu->num_symbols)],
|
||||
c16_t srs_estimated_channel_freq[][1 << srs_pdu->num_ant_ports]
|
||||
[gNB->frame_parms.ofdm_symbol_size * (1 << srs_pdu->num_symbols)],
|
||||
c16_t srs_estimated_channel_time[][1 << srs_pdu->num_ant_ports][gNB->frame_parms.ofdm_symbol_size],
|
||||
c16_t srs_estimated_channel_time_shifted[][1 << srs_pdu->num_ant_ports][gNB->frame_parms.ofdm_symbol_size],
|
||||
int8_t *snr_per_rb,
|
||||
int8_t *snr);
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx, int frame, int slot)
|
||||
* => size_output is a sum of parts sizes rounded up to a multiple of 64
|
||||
*/
|
||||
size_t size_output_tb = rel15->rbSize * NR_SYMBOLS_PER_SLOT * NR_NB_SC_PER_RB * Qm * rel15->nrOfLayers;
|
||||
size_output += (size_output_tb + 63 - ((size_output_tb + 63) % 64));
|
||||
size_output += ceil_mod(size_output_tb, 64);
|
||||
}
|
||||
|
||||
unsigned char output[size_output] __attribute__((aligned(64)));
|
||||
@@ -220,7 +220,7 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx, int frame, int slot)
|
||||
* => offset_output should remain a multiple of 64 with enough offset to fit each dlsch
|
||||
*/
|
||||
uint32_t size_output_tb = rel15->rbSize * NR_SYMBOLS_PER_SLOT * NR_NB_SC_PER_RB * Qm * rel15->nrOfLayers;
|
||||
offset_output += (size_output_tb + 63) & ~63;
|
||||
offset_output += ceil_mod(size_output_tb, 64);
|
||||
|
||||
// Non interleaved VRB to PRB mapping
|
||||
uint16_t start_sc = frame_parms->first_carrier_offset + (rel15->rbStart+rel15->BWPStart)*NR_NB_SC_PER_RB;
|
||||
|
||||
@@ -304,7 +304,7 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB,
|
||||
* => dlsch_offset should remain a multiple of 64 with enough offset to fit each dlsch
|
||||
*/
|
||||
const size_t dlsch_size = rel15->rbSize * NR_SYMBOLS_PER_SLOT * NR_NB_SC_PER_RB * rel15->qamModOrder[0] * rel15->nrOfLayers;
|
||||
dlsch_offset += (dlsch_size + 63 - ((dlsch_size + 63) % 64));
|
||||
dlsch_offset += ceil_mod(dlsch_size, 64);
|
||||
}
|
||||
|
||||
gNB->nrLDPC_coding_interface.nrLDPC_coding_encoder(&slot_parameters);
|
||||
|
||||
@@ -303,7 +303,7 @@ int nr_get_srs_signal(PHY_VARS_gNB *gNB,
|
||||
slot_t slot,
|
||||
nfapi_nr_srs_pdu_t *srs_pdu,
|
||||
nr_srs_info_t *nr_srs_info,
|
||||
int32_t srs_received_signal[][gNB->frame_parms.ofdm_symbol_size*(1<<srs_pdu->num_symbols)]);
|
||||
c16_t srs_received_signal[][gNB->frame_parms.ofdm_symbol_size * (1 << srs_pdu->num_symbols)]);
|
||||
|
||||
void init_prach_list(PHY_VARS_gNB *gNB);
|
||||
void init_prach_ru_list(RU_t *ru);
|
||||
|
||||
@@ -1026,7 +1026,7 @@ static void inner_rx(PHY_VARS_gNB *gNB,
|
||||
int nb_layer = rel15_ul->nrOfLayers;
|
||||
int nb_rx_ant = frame_parms->nb_antennas_rx;
|
||||
int dmrs_symbol_flag = (rel15_ul->ul_dmrs_symb_pos >> symbol) & 0x01;
|
||||
int buffer_length = ALIGN_UP_16(rel15_ul->rb_size * NR_NB_SC_PER_RB);
|
||||
int buffer_length = ceil_mod(rel15_ul->rb_size * NR_NB_SC_PER_RB, 16);
|
||||
c16_t rxFext[nb_rx_ant][buffer_length] __attribute__((aligned(32)));
|
||||
c16_t chFext[nb_layer][nb_rx_ant][buffer_length] __attribute__((aligned(32)));
|
||||
|
||||
@@ -1400,7 +1400,7 @@ int nr_rx_pusch_tp(PHY_VARS_gNB *gNB,
|
||||
// extract the data in the OFDM frame, to the start of the array
|
||||
int soffset = (slot % RU_RX_SLOT_DEPTH) * frame_parms->symbols_per_slot * frame_parms->ofdm_symbol_size;
|
||||
|
||||
nb_re_pusch = ALIGN_UP_16(nb_re_pusch);
|
||||
nb_re_pusch = ceil_mod(nb_re_pusch, 16);
|
||||
int dmrs_symbol;
|
||||
if (gNB->chest_time == 0)
|
||||
dmrs_symbol = get_valid_dmrs_idx_for_channel_est(rel15_ul->ul_dmrs_symb_pos, meas_symbol);
|
||||
@@ -1524,7 +1524,7 @@ int nr_rx_pusch_tp(PHY_VARS_gNB *gNB,
|
||||
// buffer due to reference symbol extraction and padding. The gNBscopeCopy call is broken up into steps: trylock, copy, unlock.
|
||||
metadata mt = {.slot = slot, .frame = frame};
|
||||
if (gNBTryLockScopeData(gNB, gNBPuschRxIq, sizeof(c16_t), 1, total_res, &mt)) {
|
||||
int buffer_length = ALIGN_UP_16(rel15_ul->rb_size * NR_NB_SC_PER_RB);
|
||||
int buffer_length = ceil_mod(rel15_ul->rb_size * NR_NB_SC_PER_RB, 16);
|
||||
size_t offset = 0;
|
||||
for (uint8_t symbol = rel15_ul->start_symbol_index; symbol < (rel15_ul->start_symbol_index + rel15_ul->nr_of_symbols);
|
||||
symbol++) {
|
||||
|
||||
@@ -74,7 +74,7 @@ int nr_get_srs_signal(PHY_VARS_gNB *gNB,
|
||||
slot_t slot,
|
||||
nfapi_nr_srs_pdu_t *srs_pdu,
|
||||
nr_srs_info_t *nr_srs_info,
|
||||
int32_t srs_received_signal[][gNB->frame_parms.ofdm_symbol_size * (1 << srs_pdu->num_symbols)])
|
||||
c16_t srs_received_signal[][gNB->frame_parms.ofdm_symbol_size * (1 << srs_pdu->num_symbols)])
|
||||
{
|
||||
const NR_DL_FRAME_PARMS *frame_parms = &gNB->frame_parms;
|
||||
|
||||
@@ -91,9 +91,8 @@ int nr_get_srs_signal(PHY_VARS_gNB *gNB,
|
||||
c16_t *rx_signal;
|
||||
bool no_srs_signal = true;
|
||||
for (int ant = 0; ant < frame_parms->nb_antennas_rx; ant++) {
|
||||
|
||||
memset(srs_received_signal[ant], 0, frame_parms->ofdm_symbol_size*sizeof(int32_t));
|
||||
rx_signal = (int32_t *)&rxdataF[ant][symbol_offset];
|
||||
memset(srs_received_signal[ant], 0, frame_parms->ofdm_symbol_size * sizeof(c16_t));
|
||||
rx_signal = &rxdataF[ant][symbol_offset];
|
||||
|
||||
for (int p_index = 0; p_index < N_ap; p_index++) {
|
||||
|
||||
@@ -129,10 +128,11 @@ int nr_get_srs_signal(PHY_VARS_gNB *gNB,
|
||||
if(subcarrier_log%12 == 0) {
|
||||
LOG_I(NR_PHY,"------------ %d ------------\n", subcarrier_log/12);
|
||||
}
|
||||
LOG_I(NR_PHY,"(%i) \t%i\t%i\n",
|
||||
LOG_I(NR_PHY,
|
||||
"(%i) \t%i\t%i\n",
|
||||
subcarrier_log,
|
||||
(int16_t)(srs_received_signal[ant][l_line_offset+subcarrier]&0xFFFF),
|
||||
(int16_t)((srs_received_signal[ant][l_line_offset+subcarrier]>>16)&0xFFFF));
|
||||
srs_received_signal[ant][l_line_offset + subcarrier].r,
|
||||
srs_received_signal[ant][l_line_offset + subcarrier].i);
|
||||
#endif
|
||||
|
||||
// Subcarrier increment
|
||||
|
||||
@@ -918,10 +918,13 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, N
|
||||
NR_DL_FRAME_PARMS *frame_parms = &gNB->frame_parms;
|
||||
nfapi_nr_srs_pdu_t *srs_pdu = &srs->srs_pdu;
|
||||
uint8_t N_symb_SRS = 1 << srs_pdu->num_symbols;
|
||||
int32_t srs_received_signal[frame_parms->nb_antennas_rx][frame_parms->ofdm_symbol_size * N_symb_SRS];
|
||||
int32_t srs_estimated_channel_freq[frame_parms->nb_antennas_rx][1 << srs_pdu->num_ant_ports][frame_parms->ofdm_symbol_size * N_symb_SRS] __attribute__((aligned(32)));
|
||||
int32_t srs_estimated_channel_time[frame_parms->nb_antennas_rx][1 << srs_pdu->num_ant_ports][frame_parms->ofdm_symbol_size] __attribute__((aligned(32)));
|
||||
int32_t srs_estimated_channel_time_shifted[frame_parms->nb_antennas_rx][1 << srs_pdu->num_ant_ports][frame_parms->ofdm_symbol_size];
|
||||
c16_t srs_received_signal[frame_parms->nb_antennas_rx][frame_parms->ofdm_symbol_size * N_symb_SRS];
|
||||
c16_t srs_estimated_channel_freq[frame_parms->nb_antennas_rx][1 << srs_pdu->num_ant_ports]
|
||||
[frame_parms->ofdm_symbol_size * N_symb_SRS] __attribute__((aligned(32)));
|
||||
c16_t srs_estimated_channel_time[frame_parms->nb_antennas_rx][1 << srs_pdu->num_ant_ports][frame_parms->ofdm_symbol_size]
|
||||
__attribute__((aligned(32)));
|
||||
c16_t srs_estimated_channel_time_shifted[frame_parms->nb_antennas_rx][1 << srs_pdu->num_ant_ports]
|
||||
[frame_parms->ofdm_symbol_size];
|
||||
int8_t snr_per_rb[srs_pdu->bwp_size];
|
||||
|
||||
start_meas(&gNB->generate_srs_stats);
|
||||
|
||||
@@ -620,39 +620,6 @@ int main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
/*LOG_M("txsigF0.m","txsF0", gNB->common_vars.txdataF[0],frame_length_complex_samples_no_prefix,1,1);
|
||||
if (gNB->frame_parms.nb_antennas_tx>1)
|
||||
LOG_M("txsigF1.m","txsF1", gNB->common_vars.txdataF[1],frame_length_complex_samples_no_prefix,1,1);*/
|
||||
|
||||
//TODO: loop over slots
|
||||
/*for (aa=0; aa<gNB->frame_parms.nb_antennas_tx; aa++) {
|
||||
if (gNB_config->subframe_config.dl_cyclic_prefix_type.value == 1) {
|
||||
PHY_ofdm_mod(gNB->common_vars.txdataF[aa],
|
||||
txdata[aa],
|
||||
frame_parms->ofdm_symbol_size,
|
||||
12,
|
||||
frame_parms->nb_prefix_samples,
|
||||
CYCLIC_PREFIX);
|
||||
} else {
|
||||
nr_normal_prefix_mod(gNB->common_vars.txdataF[aa],
|
||||
txdata[aa],
|
||||
14,
|
||||
frame_parms);
|
||||
}
|
||||
}
|
||||
|
||||
LOG_M("txsig0.m","txs0", txdata[0],frame_length_complex_samples,1,1);
|
||||
if (gNB->frame_parms.nb_antennas_tx>1)
|
||||
LOG_M("txsig1.m","txs1", txdata[1],frame_length_complex_samples,1,1);
|
||||
|
||||
|
||||
for (i=0; i<frame_length_complex_samples; i++) {
|
||||
for (aa=0; aa<frame_parms->nb_antennas_tx; aa++) {
|
||||
r_re[aa][i] = ((double)(((short *)txdata[aa]))[(i<<1)]);
|
||||
r_im[aa][i] = ((double)(((short *)txdata[aa]))[(i<<1)+1]);
|
||||
}
|
||||
}*/
|
||||
|
||||
free_channel_desc_scm(gNB2UE);
|
||||
|
||||
reset_DLSCH_struct(gNB, &msgDataTx);
|
||||
|
||||
+6
-17
@@ -230,16 +230,12 @@ int read_prach_data(ru_info_t *ru, int frame, int slot)
|
||||
}
|
||||
}
|
||||
} else if (ru_conf->compMeth_PRACH == XRAN_COMPMETHOD_BLKFLOAT) {
|
||||
struct xranlib_decompress_request bfp_decom_req;
|
||||
struct xranlib_decompress_response bfp_decom_rsp;
|
||||
struct xranlib_decompress_request bfp_decom_req = {};
|
||||
struct xranlib_decompress_response bfp_decom_rsp = {};
|
||||
|
||||
int16_t local_dst[12 * 2 * N_SC_PER_PRB] __attribute__((aligned(64)));
|
||||
|
||||
int payload_len = (3 * ru_conf->iqWidth_PRACH + 1) * 12; // 12 = closest number of PRBs to 139 REs
|
||||
|
||||
memset(&bfp_decom_req, 0, sizeof(struct xranlib_decompress_request));
|
||||
memset(&bfp_decom_rsp, 0, sizeof(struct xranlib_decompress_response));
|
||||
|
||||
bfp_decom_req.data_in = (int8_t *)src;
|
||||
bfp_decom_req.numRBs = 12; // closest number of PRBs to 139 REs
|
||||
bfp_decom_req.len = payload_len;
|
||||
@@ -415,14 +411,10 @@ int xran_fh_rx_read_slot(ru_info_t *ru, int *frame, int *slot)
|
||||
memcpy((void *)dst2, (void *)local_dst, neg_len * 4);
|
||||
memcpy((void *)dst1, (void *)&local_dst[neg_len], pos_len * 4);
|
||||
} else if (pRbElm->compMethod == XRAN_COMPMETHOD_BLKFLOAT) {
|
||||
struct xranlib_decompress_request bfp_decom_req;
|
||||
struct xranlib_decompress_response bfp_decom_rsp;
|
||||
struct xranlib_decompress_request bfp_decom_req = {};
|
||||
struct xranlib_decompress_response bfp_decom_rsp = {};
|
||||
|
||||
payload_len = (3 * pRbElm->iqWidth + 1) * pRbElm->nRBSize;
|
||||
|
||||
memset(&bfp_decom_req, 0, sizeof(struct xranlib_decompress_request));
|
||||
memset(&bfp_decom_rsp, 0, sizeof(struct xranlib_decompress_response));
|
||||
|
||||
bfp_decom_req.data_in = (int8_t *)src;
|
||||
bfp_decom_req.numRBs = pRbElm->nRBSize;
|
||||
bfp_decom_req.len = payload_len;
|
||||
@@ -556,12 +548,9 @@ int xran_fh_tx_send_slot(ru_info_t *ru, int frame, int slot, uint64_t timestamp)
|
||||
for (idx = 0; idx < (pos_len + neg_len) * 2; idx++)
|
||||
((uint16_t *)dst16)[idx] = htons(((uint16_t *)local_src)[idx]);
|
||||
} else if (p_prbMapElm->compMethod == XRAN_COMPMETHOD_BLKFLOAT) {
|
||||
struct xranlib_compress_request bfp_com_req;
|
||||
struct xranlib_compress_response bfp_com_rsp;
|
||||
struct xranlib_compress_request bfp_com_req = {};
|
||||
struct xranlib_compress_response bfp_com_rsp = {};
|
||||
payload_len = (3 * p_prbMapElm->iqWidth + 1) * p_prbMapElm->nRBSize;
|
||||
memset(&bfp_com_req, 0, sizeof(struct xranlib_compress_request));
|
||||
memset(&bfp_com_rsp, 0, sizeof(struct xranlib_compress_response));
|
||||
|
||||
bfp_com_req.data_in = (int16_t *)local_src;
|
||||
bfp_com_req.numRBs = p_prbMapElm->nRBSize;
|
||||
bfp_com_req.len = payload_len;
|
||||
|
||||
Reference in New Issue
Block a user