mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-15 05:30:29 +00:00
Compare commits
1 Commits
info-ttrac
...
pre-commit
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d3d9380131 |
20
build/.pre-commit-config.yaml
Normal file
20
build/.pre-commit-config.yaml
Normal file
@@ -0,0 +1,20 @@
|
||||
repos:
|
||||
# Clang-Format: Ensures code style is consistent
|
||||
- repo: https://github.com/pre-commit/mirrors-clang-format
|
||||
rev: 'v22.1.3'
|
||||
hooks:
|
||||
- id: clang-format
|
||||
|
||||
# Cppcheck: Static analysis to find bugs
|
||||
- repo: https://github.com/pocc/pre-commit-hooks
|
||||
rev: 'v1.3.5'
|
||||
hooks:
|
||||
- id: cppcheck
|
||||
|
||||
# Basic sanity checks (trailing whitespace, end of file, etc.)
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: 'v6.0.0'
|
||||
hooks:
|
||||
- id: check-added-large-files
|
||||
- id: check-case-conflict
|
||||
- id: end-of-file-fixer
|
||||
@@ -135,14 +135,6 @@ ID = GNB_PHY_UL_PAYLOAD_RX_BITS
|
||||
DESC = gNodeB slot payload after decoder
|
||||
GROUP = ALL:PHY:GRAPHIC:HEAVY:GNB
|
||||
FORMAT = int,frame : int,slot : int,datetime_yyyymmdd : int,datetime_hhmmssmmm : int,frame_type : int,freq_range : int,subcarrier_spacing : int,cyclic_prefix : int,symbols_per_slot : int,Nid_cell : int,rnti : int,rb_size : int,rb_start : int,start_symbol_index : int,nr_of_symbols : int,qam_mod_order : int,mcs_index : int,mcs_table : int,nrOfLayers : int,transform_precoding : int,dmrs_config_type : int,ul_dmrs_symb_pos : int,number_dmrs_symbols : int,dmrs_port : int,dmrs_nscid : int,nb_antennas_rx : int,number_of_bits : buffer,data
|
||||
ID = GNB_PHY_PSS_CORRELATION
|
||||
DESC = gNodeB SNR estimation based on SRS
|
||||
GROUP = ALL:PHY:GRAPHIC:HEAVY:GNB
|
||||
FORMAT = int,gNB_ID : int,rnti : int,frame : int,subframe : int,antenna : buffer,pss_corr
|
||||
ID = GNB_PHY_PBCH_FREQ_CHANNEL_ESTIMATE
|
||||
DESC = PBCH channel estimation in the frequency domain
|
||||
GROUP = ALL:PHY:GRAPHIC:HEAVY:GNB
|
||||
FORMAT = int,gNB_ID : int,rnti : int,frame : int,subframe : int,antenna : buffer,chest_f
|
||||
ID = GNB_PHY_UL_FREQ_CHANNEL_ESTIMATE
|
||||
DESC = gNodeB channel estimation in the frequency domain
|
||||
GROUP = ALL:PHY:GRAPHIC:HEAVY:GNB
|
||||
@@ -155,14 +147,6 @@ ID = GNB_PHY_UL_SNR_ESTIMATE
|
||||
DESC = gNodeB SNR estimation based on SRS
|
||||
GROUP = ALL:PHY:GRAPHIC:HEAVY:GNB
|
||||
FORMAT = int,gNB_ID : int,rnti : int,frame : int,subframe : int,antenna : buffer,snr
|
||||
ID = GNB_PHY_DL_TIME_CHANNEL_ESTIMATE
|
||||
DESC = CSI-RS channel estimation in the time domain
|
||||
GROUP = ALL:PHY:GRAPHIC:HEAVY:GNB
|
||||
FORMAT = int,gNB_ID : int,rnti : int,frame : int,subframe : int,antenna : buffer,chest_t
|
||||
ID = GNB_PHY_DL_FREQ_CHANNEL_ESTIMATE
|
||||
DESC = CSI-RS channel estimation in the frequency domain
|
||||
GROUP = ALL:PHY:GRAPHIC:HEAVY:GNB
|
||||
FORMAT = int,gNB_ID : int,rnti : int,frame : int,subframe : int,antenna : buffer,chest_f
|
||||
ID = GNB_PHY_PRACH_INPUT_SIGNAL
|
||||
DESC = gNodeB input data in the time domain for slots with PRACH detection
|
||||
GROUP = ALL:PHY:GRAPHIC:HEAVY:GNB
|
||||
|
||||
@@ -21,25 +21,17 @@ int next_ue_id;
|
||||
|
||||
typedef struct {
|
||||
widget *pucch_pusch_iq_plot;
|
||||
widget *pss_corr_ue_xy_plot;
|
||||
widget *pbch_freq_estimate_ue_xy_plot;
|
||||
widget *ul_freq_estimate_ue_xy_plot;
|
||||
widget *ul_time_estimate_ue_xy_plot;
|
||||
widget *ul_snr_estimate_ue_xy_plot;
|
||||
widget *csirs_time_estimate_ue_xy_plot;
|
||||
widget *csirs_freq_estimate_ue_xy_plot;
|
||||
widget *current_ue_label;
|
||||
widget *current_ue_button;
|
||||
widget *prev_ue_button;
|
||||
widget *next_ue_button;
|
||||
logger *pucch_pusch_iq_logger;
|
||||
logger *pss_corr_ue_logger;
|
||||
logger *pbch_freq_estimate_ue_logger;
|
||||
logger *ul_freq_estimate_ue_logger;
|
||||
logger *ul_time_estimate_ue_logger;
|
||||
logger *ul_snr_ue_logger;
|
||||
logger *csirs_time_estimate_ue_logger;
|
||||
logger *csirs_freq_estimate_ue_logger;
|
||||
} gnb_gui;
|
||||
|
||||
typedef struct {
|
||||
@@ -104,29 +96,17 @@ static void set_current_ue(gui *g, gnb_data *e, int ue)
|
||||
sprintf(s, "[UE %d] ", ue);
|
||||
label_set_text(g, e->e->current_ue_label, s);
|
||||
|
||||
//sprintf(s, "GNB_PHY_PUCCH_PUSCH_IQ [UE %d]", ue);
|
||||
//xy_plot_set_title(g, e->e->pucch_pusch_iq_plot, s);
|
||||
sprintf(s, "GNB_PHY_PUCCH_PUSCH_IQ [UE %d]", ue);
|
||||
xy_plot_set_title(g, e->e->pucch_pusch_iq_plot, s);
|
||||
|
||||
sprintf(s, "PSS correlation");
|
||||
xy_plot_set_title(g, e->e->pss_corr_ue_xy_plot, s);
|
||||
|
||||
sprintf(s, "PBCH channel estimation in frequency domain");
|
||||
xy_plot_set_title(g, e->e->pbch_freq_estimate_ue_xy_plot, s);
|
||||
|
||||
sprintf(s, "UL channel estimation based on SRS in frequency domain [UE %d]", ue);
|
||||
sprintf(s, "UL channel estimation in frequency domain [UE %d]", ue);
|
||||
xy_plot_set_title(g, e->e->ul_freq_estimate_ue_xy_plot, s);
|
||||
|
||||
sprintf(s, "UL channel estimation based on SRS in time domain [UE %d]", ue);
|
||||
sprintf(s, "UL channel estimation in time domain [UE %d]", ue);
|
||||
xy_plot_set_title(g, e->e->ul_time_estimate_ue_xy_plot, s);
|
||||
|
||||
sprintf(s, "UL SNR per RB based on SRS [UE %d]", ue);
|
||||
xy_plot_set_title(g, e->e->ul_snr_estimate_ue_xy_plot, s);
|
||||
|
||||
sprintf(s, "DL channel estimation based on CSI-RS in time domain");
|
||||
xy_plot_set_title(g, e->e->csirs_time_estimate_ue_xy_plot, s);
|
||||
|
||||
sprintf(s, "DL channel estimation based on CSI-RS in frequency domain");
|
||||
xy_plot_set_title(g, e->e->csirs_freq_estimate_ue_xy_plot, s);
|
||||
}
|
||||
|
||||
void reset_ue_ids(void)
|
||||
@@ -175,117 +155,16 @@ static void gnb_main_gui(gnb_gui *e, gui *g, event_handler *h, void *database, g
|
||||
logger *l;
|
||||
view *v;
|
||||
|
||||
main_window = new_toplevel_window(g, 950, 925, "OAI Tracer");
|
||||
main_window = new_toplevel_window(g, 1500, 460, "gNB tracer");
|
||||
top_container = new_container(g, VERTICAL);
|
||||
widget_add_child(g, main_window, top_container, -1);
|
||||
|
||||
line = new_container(g, HORIZONTAL);
|
||||
widget_add_child(g, top_container, line, -1);
|
||||
|
||||
/* PUCCH/PUSCH IQ data */
|
||||
/*w = new_xy_plot(g, 200, 200, "", 10);
|
||||
e->pucch_pusch_iq_plot = w;
|
||||
widget_add_child(g, line, w, -1);
|
||||
xy_plot_set_range(g, w, -1000, 1000, -1000, 1000);
|
||||
l = new_iqlog_full(h, database, "GNB_PHY_PUCCH_PUSCH_IQ", "rxdataF");
|
||||
v = new_view_xy(300*12*14,10,g,w,new_color(g,"#000"),XY_FORCED_MODE);
|
||||
logger_add_view(l, v);
|
||||
e->pucch_pusch_iq_logger = l;*/
|
||||
|
||||
/* PSS correlation */
|
||||
w = new_xy_plot(g, 410, 200, "", 50);
|
||||
e->pss_corr_ue_xy_plot = w;
|
||||
widget_add_child(g, line, w, -1);
|
||||
xy_plot_set_range(g, w, 0, 2048, 40, 100);
|
||||
l = new_framelog(h, database, "GNB_PHY_PSS_CORRELATION", "subframe", "pss_corr");
|
||||
framelog_set_update_only_at_sf9(l, 0);
|
||||
framelog_set_type_buffer_db(l);
|
||||
v = new_view_xy(2048, 10, g, w, new_color(g, "#0c0c72"), XY_LOOP_MODE);
|
||||
logger_add_view(l, v);
|
||||
e->pss_corr_ue_logger = l;
|
||||
|
||||
/* PBCH channel estimation in frequency domain */
|
||||
w = new_xy_plot(g, 410, 200, "", 50);
|
||||
e->pbch_freq_estimate_ue_xy_plot = w;
|
||||
widget_add_child(g, line, w, -1);
|
||||
xy_plot_set_range(g, w, 0, 240, -10, 80);
|
||||
l = new_framelog(h, database, "GNB_PHY_PBCH_FREQ_CHANNEL_ESTIMATE", "subframe", "chest_f");
|
||||
framelog_set_update_only_at_sf9(l, 0);
|
||||
v = new_view_xy(240, 10, g, w, new_color(g, "#0c0c72"), XY_LOOP_MODE);
|
||||
logger_add_view(l, v);
|
||||
e->pbch_freq_estimate_ue_logger = l;
|
||||
|
||||
line = new_container(g, HORIZONTAL);
|
||||
widget_add_child(g, top_container, line, -1);
|
||||
|
||||
/* DL channel estimation in time domain */
|
||||
w = new_xy_plot(g, 410, 200, "", 50);
|
||||
e->csirs_time_estimate_ue_xy_plot = w;
|
||||
widget_add_child(g, line, w, -1);
|
||||
xy_plot_set_range(g, w, 0, 2048, -10, 80);
|
||||
l = new_framelog(h, database, "GNB_PHY_DL_TIME_CHANNEL_ESTIMATE", "subframe", "chest_t");
|
||||
framelog_set_update_only_at_sf9(l, 0);
|
||||
v = new_view_xy(2048, 10, g, w, new_color(g, "#0c0c72"), XY_LOOP_MODE);
|
||||
logger_add_view(l, v);
|
||||
e->csirs_time_estimate_ue_logger = l;
|
||||
|
||||
/* DL channel estimation in frequency domain */
|
||||
w = new_xy_plot(g, 410, 200, "", 50);
|
||||
e->csirs_freq_estimate_ue_xy_plot = w;
|
||||
widget_add_child(g, line, w, -1);
|
||||
xy_plot_set_range(g, w, 0, 2048, -10, 80);
|
||||
l = new_framelog(h, database, "GNB_PHY_DL_FREQ_CHANNEL_ESTIMATE", "subframe", "chest_f");
|
||||
framelog_set_update_only_at_sf9(l, 0);
|
||||
v = new_view_xy(2048, 10, g, w, new_color(g, "#0c0c72"), XY_LOOP_MODE);
|
||||
logger_add_view(l, v);
|
||||
e->csirs_freq_estimate_ue_logger = l;
|
||||
|
||||
line = new_container(g, HORIZONTAL);
|
||||
widget_add_child(g, top_container, line, -1);
|
||||
|
||||
/* UL channel estimation in time domain */
|
||||
w = new_xy_plot(g, 410, 200, "", 50);
|
||||
e->ul_time_estimate_ue_xy_plot = w;
|
||||
widget_add_child(g, line, w, -1);
|
||||
xy_plot_set_range(g, w, 0, 2048, -10, 80);
|
||||
l = new_framelog(h, database, "GNB_PHY_UL_TIME_CHANNEL_ESTIMATE", "subframe", "chest_t");
|
||||
framelog_set_update_only_at_sf9(l, 0);
|
||||
v = new_view_xy(2048, 10, g, w, new_color(g, "#0c0c72"), XY_LOOP_MODE);
|
||||
logger_add_view(l, v);
|
||||
e->ul_time_estimate_ue_logger = l;
|
||||
|
||||
/* UL channel estimation in frequency domain */
|
||||
w = new_xy_plot(g, 410, 200, "", 50);
|
||||
e->ul_freq_estimate_ue_xy_plot = w;
|
||||
widget_add_child(g, line, w, -1);
|
||||
xy_plot_set_range(g, w, 0, 2048, -10, 80);
|
||||
l = new_framelog(h, database, "GNB_PHY_UL_FREQ_CHANNEL_ESTIMATE", "subframe", "chest_f");
|
||||
framelog_set_update_only_at_sf9(l, 0);
|
||||
v = new_view_xy(2048, 10, g, w, new_color(g, "#0c0c72"), XY_LOOP_MODE);
|
||||
logger_add_view(l, v);
|
||||
e->ul_freq_estimate_ue_logger = l;
|
||||
|
||||
line = new_container(g, HORIZONTAL);
|
||||
widget_add_child(g, top_container, line, -1);
|
||||
|
||||
/* UL SNR based on SRS */
|
||||
w = new_xy_plot(g, 650, 200, "", 50);
|
||||
e->ul_snr_estimate_ue_xy_plot = w;
|
||||
widget_add_child(g, line, w, -1);
|
||||
xy_plot_set_range(g, w, 0, 273, -10, 65);
|
||||
l = new_framelog(h, database, "GNB_PHY_UL_SNR_ESTIMATE", "subframe", "snr");
|
||||
framelog_set_update_only_at_sf9(l, 0);
|
||||
framelog_set_type_buffer_db(l);
|
||||
v = new_view_xy(273, 10, g, w, new_color(g, "#0c0c72"), XY_LOOP_MODE);
|
||||
logger_add_view(l, v);
|
||||
e->ul_snr_ue_logger = l;
|
||||
|
||||
/* space */
|
||||
w = new_space(g, 50, 200);
|
||||
widget_add_child(g, line, w, -1);
|
||||
logo = new_image(g, openair_logo_png, openair_logo_png_len);
|
||||
|
||||
/* logo + prev/next UE buttons */
|
||||
logo = new_image(g, openair_logo_png, openair_logo_png_len);
|
||||
col = new_container(g, VERTICAL);
|
||||
widget_add_child(g, col, logo, -1);
|
||||
w = new_container(g, HORIZONTAL);
|
||||
@@ -305,6 +184,53 @@ static void gnb_main_gui(gnb_gui *e, gui *g, event_handler *h, void *database, g
|
||||
e->next_ue_button = w2;
|
||||
widget_add_child(g, line, col, -1);
|
||||
|
||||
/* PUCCH/PUSCH IQ data */
|
||||
w = new_xy_plot(g, 200, 200, "", 10);
|
||||
e->pucch_pusch_iq_plot = w;
|
||||
widget_add_child(g, line, w, -1);
|
||||
xy_plot_set_range(g, w, -1000, 1000, -1000, 1000);
|
||||
l = new_iqlog_full(h, database, "GNB_PHY_PUCCH_PUSCH_IQ", "rxdataF");
|
||||
v = new_view_xy(300*12*14,10,g,w,new_color(g,"#000"),XY_FORCED_MODE);
|
||||
logger_add_view(l, v);
|
||||
e->pucch_pusch_iq_logger = l;
|
||||
|
||||
/* UL channel estimation in frequency domain */
|
||||
w = new_xy_plot(g, 490, 200, "", 50);
|
||||
e->ul_freq_estimate_ue_xy_plot = w;
|
||||
widget_add_child(g, line, w, -1);
|
||||
xy_plot_set_range(g, w, 0, 2048, -10, 80);
|
||||
l = new_framelog(h, database, "GNB_PHY_UL_FREQ_CHANNEL_ESTIMATE", "subframe", "chest_f");
|
||||
framelog_set_update_only_at_sf9(l, 0);
|
||||
v = new_view_xy(2048, 10, g, w, new_color(g, "#0c0c72"), XY_LOOP_MODE);
|
||||
logger_add_view(l, v);
|
||||
e->ul_freq_estimate_ue_logger = l;
|
||||
|
||||
/* UL channel estimation in time domain */
|
||||
w = new_xy_plot(g, 490, 200, "", 50);
|
||||
e->ul_time_estimate_ue_xy_plot = w;
|
||||
widget_add_child(g, line, w, -1);
|
||||
xy_plot_set_range(g, w, 0, 2048, -10, 80);
|
||||
l = new_framelog(h, database, "GNB_PHY_UL_TIME_CHANNEL_ESTIMATE", "subframe", "chest_t");
|
||||
framelog_set_update_only_at_sf9(l, 0);
|
||||
v = new_view_xy(2048, 10, g, w, new_color(g, "#0c0c72"), XY_LOOP_MODE);
|
||||
logger_add_view(l, v);
|
||||
e->ul_time_estimate_ue_logger = l;
|
||||
|
||||
line = new_container(g, HORIZONTAL);
|
||||
widget_add_child(g, top_container, line, -1);
|
||||
|
||||
/* UL SNR based on SRS */
|
||||
w = new_xy_plot(g, 1280, 200, "", 190);
|
||||
e->ul_snr_estimate_ue_xy_plot = w;
|
||||
widget_add_child(g, line, w, -1);
|
||||
xy_plot_set_range(g, w, 0, 273, -10, 65);
|
||||
l = new_framelog(h, database, "GNB_PHY_UL_SNR_ESTIMATE", "subframe", "snr");
|
||||
framelog_set_update_only_at_sf9(l, 0);
|
||||
framelog_set_type_buffer_db(l);
|
||||
v = new_view_xy(273, 10, g, w, new_color(g, "#0c0c72"), XY_LOOP_MODE);
|
||||
logger_add_view(l, v);
|
||||
e->ul_snr_ue_logger = l;
|
||||
|
||||
set_current_ue(g, ed, ed->ue);
|
||||
register_notifier(g, "click", e->current_ue_button, click, ed);
|
||||
register_notifier(g, "click", e->prev_ue_button, click, ed);
|
||||
@@ -347,14 +273,10 @@ int main(int n, char **v)
|
||||
|
||||
h = new_handler(database);
|
||||
|
||||
//on_off(database, "GNB_PHY_PUCCH_PUSCH_IQ", is_on, 1);
|
||||
on_off(database, "GNB_PHY_PSS_CORRELATION", is_on, 1);
|
||||
on_off(database, "GNB_PHY_PBCH_FREQ_CHANNEL_ESTIMATE", is_on, 1);
|
||||
on_off(database, "GNB_PHY_PUCCH_PUSCH_IQ", is_on, 1);
|
||||
on_off(database, "GNB_PHY_UL_FREQ_CHANNEL_ESTIMATE", is_on, 1);
|
||||
on_off(database, "GNB_PHY_UL_TIME_CHANNEL_ESTIMATE", is_on, 1);
|
||||
on_off(database, "GNB_PHY_UL_SNR_ESTIMATE", is_on, 1);
|
||||
on_off(database, "GNB_PHY_DL_TIME_CHANNEL_ESTIMATE", is_on, 1);
|
||||
on_off(database, "GNB_PHY_DL_FREQ_CHANNEL_ESTIMATE", is_on, 1);
|
||||
|
||||
gnb_data.ue = 0;
|
||||
gnb_data.e = ⪚
|
||||
|
||||
@@ -786,13 +786,6 @@ int nr_pbch_channel_estimation(const NR_DL_FRAME_PARMS *fp,
|
||||
// do ifft of channel estimate
|
||||
LOG_D(PHY,"Channel Impulse Computation Slot %d Symbol %d ch_offset %d\n", Ns, symbol, ch_offset);
|
||||
freq2time(fp->ofdm_symbol_size, (int16_t *)&dl_ch_estimates[aarx][ch_offset], (int16_t *)&dl_ch_estimates_time[aarx]);
|
||||
T(T_GNB_PHY_PBCH_FREQ_CHANNEL_ESTIMATE,
|
||||
T_INT(0),
|
||||
T_INT(0),
|
||||
T_INT(0),
|
||||
T_INT(0),
|
||||
T_INT(0),
|
||||
T_BUFFER(&dl_ch_estimates[aarx][ch_offset], 240 * sizeof(c16_t)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -420,37 +420,6 @@ static int nr_csi_rs_channel_estimation(
|
||||
#ifdef NR_CSIRS_DEBUG
|
||||
LOG_I(NR_PHY, "Noise power estimation based on CSI-RS: %i\n", *noise_power);
|
||||
#endif
|
||||
|
||||
if (T_stdout == 0 || T_stdout == 2) {
|
||||
c16_t csirs_freq[fp->ofdm_symbol_size] __attribute__((aligned(32)));
|
||||
memset(csirs_freq, 0, fp->ofdm_symbol_size * sizeof(c16_t));
|
||||
int len1 = fp->ofdm_symbol_size - fp->first_carrier_offset;
|
||||
int len2 = fp->ofdm_symbol_size - len1;
|
||||
memcpy(csirs_freq, &csi_rs_estimated_channel_freq[0][0][fp->first_carrier_offset], len1 * sizeof(c16_t));
|
||||
memcpy(&csirs_freq[len1], csi_rs_estimated_channel_freq[0][0], len2 * sizeof(c16_t));
|
||||
T(T_GNB_PHY_DL_FREQ_CHANNEL_ESTIMATE,
|
||||
T_INT(0),
|
||||
T_INT(0),
|
||||
T_INT(0),
|
||||
T_INT(0),
|
||||
T_INT(0),
|
||||
T_BUFFER(csirs_freq, fp->ofdm_symbol_size * sizeof(int32_t)));
|
||||
|
||||
c16_t csirs_time[fp->ofdm_symbol_size] __attribute__((aligned(32)));
|
||||
memset(csirs_time, 0, fp->ofdm_symbol_size * sizeof(c16_t));
|
||||
freq2time(fp->ofdm_symbol_size, (int16_t *)csi_rs_estimated_channel_freq[0][0], (int16_t *)csirs_time);
|
||||
c16_t csirs_time_shifted[fp->ofdm_symbol_size] __attribute__((aligned(32)));
|
||||
memcpy(csirs_time_shifted, &csirs_time[fp->ofdm_symbol_size >> 1], (fp->ofdm_symbol_size >> 1) * sizeof(c16_t));
|
||||
memcpy(&csirs_time_shifted[fp->ofdm_symbol_size >> 1], csirs_time, (fp->ofdm_symbol_size >> 1) * sizeof(c16_t));
|
||||
T(T_GNB_PHY_DL_TIME_CHANNEL_ESTIMATE,
|
||||
T_INT(0),
|
||||
T_INT(0),
|
||||
T_INT(0),
|
||||
T_INT(0),
|
||||
T_INT(0),
|
||||
T_BUFFER(csirs_time_shifted, fp->ofdm_symbol_size * sizeof(int32_t)));
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -925,7 +894,7 @@ void nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue,
|
||||
int16_t log2_re = 0;
|
||||
int16_t log2_maxh = 0;
|
||||
// if we need to measure only RSRP no need to do channel estimation
|
||||
if (csirs_config_pdu->measurement_bitmap > 1 || T_stdout == 0 || T_stdout == 2)
|
||||
if (csirs_config_pdu->measurement_bitmap > 1)
|
||||
nr_csi_rs_channel_estimation(frame_parms,
|
||||
csirs_config_pdu,
|
||||
csi_info,
|
||||
|
||||
@@ -284,7 +284,7 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
|
||||
} break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (num_pdsch > 0) {
|
||||
LOG_D(PHY, "PDSCH generation started (%d) in frame %d.%d\n", num_pdsch, frame, slot);
|
||||
nr_generate_pdsch(gNB, num_pdsch, gNB->dlsch, frame, slot);
|
||||
|
||||
@@ -1092,42 +1092,6 @@ int pbch_processing(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, nr_phy_da
|
||||
__attribute__ ((aligned(32))) struct complex16 dl_ch_estimates[fp->nb_antennas_rx][estimateSz];
|
||||
__attribute__ ((aligned(32))) struct complex16 dl_ch_estimates_time[fp->nb_antennas_rx][fp->ofdm_symbol_size];
|
||||
|
||||
if (T_stdout == 0 || T_stdout == 2) {
|
||||
c16_t pss_time[fp->ofdm_symbol_size] __attribute__((aligned(32)));
|
||||
int nid2 = GET_NID2(fp->Nid_cell);
|
||||
generate_pss_nr_time(fp, nid2, fp->ssb_start_subcarrier, pss_time);
|
||||
int maxval = 0;
|
||||
for (int i = 0; i < fp->ofdm_symbol_size; i++) {
|
||||
maxval = max(maxval, abs(pss_time[i].r));
|
||||
maxval = max(maxval, abs(pss_time[i].i));
|
||||
}
|
||||
int shift = log2_approx(maxval);
|
||||
int length = fp->ofdm_symbol_size;
|
||||
int16_t pss_corr[length];
|
||||
memset(pss_corr, 0, length * sizeof(int16_t));
|
||||
unsigned int rx_offset = get_samples_slot_timestamp(fp, proc->nr_slot_rx);
|
||||
unsigned int symbol = ssb_start_symbol % fp->symbols_per_slot;
|
||||
unsigned int abs_symbol = proc->nr_slot_rx * fp->symbols_per_slot + symbol;
|
||||
for (int idx_symb = proc->nr_slot_rx * fp->symbols_per_slot; idx_symb <= abs_symbol; idx_symb++)
|
||||
rx_offset += (idx_symb % (0x7 << fp->numerology_index)) ? fp->nb_prefix_samples : fp->nb_prefix_samples0;
|
||||
rx_offset += fp->ofdm_symbol_size * symbol;
|
||||
rx_offset -= (fp->nb_prefix_samples / fp->ofdm_offset_divisor);
|
||||
rx_offset %= (2 * fp->samples_per_frame);
|
||||
c16_t *rxdata = &ue->common_vars.rxdata[0][rx_offset];
|
||||
for (int n = 0; n < length; n++) {
|
||||
const c32_t result = dot_product(pss_time, (c16_t *)&(rxdata[n]), fp->ofdm_symbol_size, shift);
|
||||
const c64_t r64 = {.r = result.r, .i = result.i};
|
||||
pss_corr[n] = dB_fixed64(squaredMod(r64));
|
||||
}
|
||||
T(T_GNB_PHY_PSS_CORRELATION,
|
||||
T_INT(0),
|
||||
T_INT(0),
|
||||
T_INT(frame_rx),
|
||||
T_INT(0),
|
||||
T_INT(0),
|
||||
T_BUFFER(pss_corr, length * sizeof(int16_t)));
|
||||
}
|
||||
|
||||
for (int i=1; i<4; i++) {
|
||||
nr_slot_fep(ue,
|
||||
fp,
|
||||
|
||||
@@ -224,7 +224,7 @@ void rxAddInput(c16_t **input_sig, cf_t *after_channel_sig, int rxAnt, channel_d
|
||||
// the normalized OAI value seems to be 256 as average amplitude (numerical amplification = 1)
|
||||
const double noise_per_sample = pow(10, channelDesc->noise_power_dB / 10.0) * 256;
|
||||
const int nbTx = channelDesc->nb_tx;
|
||||
double Doppler_phase_cur = channelDesc->enable_dynamic_Doppler ? channelDesc->Doppler_phase_cur[rxAnt] : 0;
|
||||
double Doppler_phase_cur = channelDesc->Doppler_phase_cur[rxAnt];
|
||||
Doppler_phase_cur -= 2 * M_PI * round(Doppler_phase_cur / (2 * M_PI));
|
||||
|
||||
for (int i = 0; i < nbSamples; i++) {
|
||||
@@ -260,8 +260,7 @@ void rxAddInput(c16_t **input_sig, cf_t *after_channel_sig, int rxAnt, channel_d
|
||||
out_ptr++;
|
||||
}
|
||||
|
||||
if (channelDesc->enable_dynamic_Doppler)
|
||||
channelDesc->Doppler_phase_cur[rxAnt] = Doppler_phase_cur;
|
||||
channelDesc->Doppler_phase_cur[rxAnt] = Doppler_phase_cur;
|
||||
|
||||
// Cast to a wrong type for compatibility !
|
||||
LOG_D(HW,
|
||||
|
||||
Reference in New Issue
Block a user