move init_delay_table to nr_phy_common
This commit is contained in:
committed by
Robert Schmidt
parent
c6ccda2998
commit
331325b0f3
@@ -34,9 +34,8 @@
|
|||||||
#include "assertions.h"
|
#include "assertions.h"
|
||||||
#include "common/utils/assertions.h"
|
#include "common/utils/assertions.h"
|
||||||
#include "common/utils/LOG/log.h"
|
#include "common/utils/LOG/log.h"
|
||||||
#include "openair1/PHY/TOOLS/tools_defs.h"
|
|
||||||
#include "nr_common.h"
|
#include "nr_common.h"
|
||||||
#include <complex.h>
|
#include <limits.h>
|
||||||
|
|
||||||
#define C_SRS_NUMBER (64)
|
#define C_SRS_NUMBER (64)
|
||||||
#define B_SRS_NUMBER (4)
|
#define B_SRS_NUMBER (4)
|
||||||
@@ -1321,20 +1320,6 @@ int get_delay_idx(int delay, int max_delay_comp)
|
|||||||
return delay_idx;
|
return delay_idx;
|
||||||
}
|
}
|
||||||
|
|
||||||
void init_delay_table(uint16_t ofdm_symbol_size,
|
|
||||||
int max_delay_comp,
|
|
||||||
int max_ofdm_symbol_size,
|
|
||||||
c16_t delay_table[][max_ofdm_symbol_size])
|
|
||||||
{
|
|
||||||
for (int delay = -max_delay_comp; delay <= max_delay_comp; delay++) {
|
|
||||||
for (int k = 0; k < ofdm_symbol_size; k++) {
|
|
||||||
double complex delay_cexp = cexp(I * (2.0 * M_PI * k * delay / ofdm_symbol_size));
|
|
||||||
delay_table[max_delay_comp + delay][k].r = (int16_t)round(256 * creal(delay_cexp));
|
|
||||||
delay_table[max_delay_comp + delay][k].i = (int16_t)round(256 * cimag(delay_cexp));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int set_default_nta_offset(frequency_range_t freq_range, uint32_t samples_per_subframe)
|
int set_default_nta_offset(frequency_range_t freq_range, uint32_t samples_per_subframe)
|
||||||
{
|
{
|
||||||
// ta_offset_samples : ta_offset = samples_per_subframe : (Δf_max x N_f / 1000)
|
// ta_offset_samples : ta_offset = samples_per_subframe : (Δf_max x N_f / 1000)
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "nr_phy_common.h"
|
#include "nr_phy_common.h"
|
||||||
|
#include <complex.h>
|
||||||
#ifdef __aarch64__
|
#ifdef __aarch64__
|
||||||
#define USE_128BIT
|
#define USE_128BIT
|
||||||
#endif
|
#endif
|
||||||
@@ -56,6 +57,20 @@ void init_byte2m128i(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void init_delay_table(uint16_t ofdm_symbol_size,
|
||||||
|
int max_delay_comp,
|
||||||
|
int max_ofdm_symbol_size,
|
||||||
|
c16_t delay_table[][max_ofdm_symbol_size])
|
||||||
|
{
|
||||||
|
for (int delay = -max_delay_comp; delay <= max_delay_comp; delay++) {
|
||||||
|
for (int k = 0; k < ofdm_symbol_size; k++) {
|
||||||
|
double complex delay_cexp = cexp(I * (2.0 * M_PI * k * delay / ofdm_symbol_size));
|
||||||
|
delay_table[max_delay_comp + delay][k].r = (int16_t)round(256 * creal(delay_cexp));
|
||||||
|
delay_table[max_delay_comp + delay][k].i = (int16_t)round(256 * cimag(delay_cexp));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int16_t saturating_sub(int16_t a, int16_t b)
|
int16_t saturating_sub(int16_t a, int16_t b)
|
||||||
{
|
{
|
||||||
int32_t result = (int32_t)a - (int32_t)b;
|
int32_t result = (int32_t)a - (int32_t)b;
|
||||||
|
|||||||
@@ -43,7 +43,6 @@
|
|||||||
#include "NR_BCCH-BCH-Message.h"
|
#include "NR_BCCH-BCH-Message.h"
|
||||||
#include "NR_ServingCellConfigCommon.h"
|
#include "NR_ServingCellConfigCommon.h"
|
||||||
#include "NR_MIB.h"
|
#include "NR_MIB.h"
|
||||||
#include "PHY/TOOLS/tools_defs.h"
|
|
||||||
#include "RRC/NR/nr_rrc_config.h"
|
#include "RRC/NR/nr_rrc_config.h"
|
||||||
#include "SCHED_NR/phy_frame_config_nr.h"
|
#include "SCHED_NR/phy_frame_config_nr.h"
|
||||||
#include "T.h"
|
#include "T.h"
|
||||||
|
|||||||
Reference in New Issue
Block a user