Merge remote-tracking branch 'origin/develop' into NR_cset_bwp_fixes
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
|
||||
#include "executables/nr-softmodem-common.h"
|
||||
#include "common/utils/nr/nr_common.h"
|
||||
#include "common/ran_context.h"
|
||||
#include "PHY/defs_gNB.h"
|
||||
#include "PHY/phy_extern.h"
|
||||
#include "PHY/NR_REFSIG/nr_refsig.h"
|
||||
@@ -35,7 +36,6 @@
|
||||
#include "MBSFN-SubframeConfigList.h"*/
|
||||
#include "openair1/PHY/defs_RU.h"
|
||||
#include "openair1/PHY/CODING/nrLDPC_extern.h"
|
||||
#include "LAYER2/NR_MAC_gNB/mac_proto.h"
|
||||
#include "assertions.h"
|
||||
#include <math.h>
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include "phy_init.h"
|
||||
#include "common/utils/nr/nr_common.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "LAYER2/NR_MAC_gNB/mac_proto.h"
|
||||
|
||||
/// Subcarrier spacings in Hz indexed by numerology index
|
||||
uint32_t nr_subcarrier_spacing[MAX_NUM_SUBCARRIER_SPACING] = {15e3, 30e3, 60e3, 120e3, 240e3};
|
||||
|
||||
@@ -129,18 +129,14 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue,
|
||||
rxdata_ptr = (int16_t *)tmp_dft_in;
|
||||
}
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
start_meas(&ue->rx_dft_stats);
|
||||
#endif
|
||||
|
||||
dft(dftsize,
|
||||
rxdata_ptr,
|
||||
(int16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],
|
||||
1);
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(&ue->rx_dft_stats);
|
||||
#endif
|
||||
|
||||
int symb_offset = (Ns%frame_parms->slots_per_subframe)*frame_parms->symbols_per_slot;
|
||||
int32_t rot2 = ((uint32_t*)frame_parms->symbol_rotation[0])[symbol+symb_offset];
|
||||
@@ -249,18 +245,14 @@ int nr_slot_fep_init_sync(PHY_VARS_NR_UE *ue,
|
||||
|
||||
}
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
start_meas(&ue->rx_dft_stats);
|
||||
#endif
|
||||
|
||||
dft(dftsize,
|
||||
rxdata_ptr,
|
||||
(int16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],
|
||||
1);
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(&ue->rx_dft_stats);
|
||||
#endif
|
||||
|
||||
int symb_offset = (Ns%frame_parms->slots_per_subframe)*frame_parms->symbols_per_slot;
|
||||
int32_t rot2 = ((uint32_t*)frame_parms->symbol_rotation[0])[symbol + symb_offset];
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
#include "PHY/NR_REFSIG/dmrs_nr.h"
|
||||
#include "PHY/NR_REFSIG/ptrs_nr.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
#include "LAYER2/NR_MAC_gNB/mac_proto.h"
|
||||
#include "common/utils/nr/nr_common.h"
|
||||
|
||||
//#define DEBUG_DLSCH
|
||||
//#define DEBUG_DLSCH_MAPPING
|
||||
|
||||
@@ -39,10 +39,10 @@
|
||||
#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_transport_common_proto.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_dlsch.h"
|
||||
#include "openair2/LAYER2/NR_MAC_gNB/mac_proto.h"
|
||||
#include "SCHED_NR/sched_nr.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "common/utils/nr/nr_common.h"
|
||||
#include <syscall.h>
|
||||
#include <openair2/UTIL/OPT/opt.h>
|
||||
|
||||
|
||||
@@ -37,7 +37,6 @@
|
||||
#include "PHY/NR_TRANSPORT/nr_transport_common_proto.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
#include "openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h"
|
||||
#include "T.h"
|
||||
|
||||
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
|
||||
#include "PHY/defs_nr_common.h"
|
||||
#include "PHY/defs_gNB.h"
|
||||
#include "LAYER2/NR_MAC_gNB/mac_proto.h"
|
||||
|
||||
#define NR_PBCH_PDU_BITS 24
|
||||
|
||||
@@ -315,6 +314,7 @@ int nr_find_pucch(uint16_t rnti,
|
||||
void init_prach_list(PHY_VARS_gNB *gNB);
|
||||
void init_prach_ru_list(RU_t *ru);
|
||||
void free_nr_ru_prach_entry(RU_t *ru, int prach_id);
|
||||
uint8_t get_nr_prach_duration(uint8_t prach_format);
|
||||
|
||||
void nr_generate_csi_rs(PHY_VARS_gNB *gNB,
|
||||
int16_t amp,
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
#include "PHY/phy_extern_nr_ue.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "PHY/sse_intrin.h"
|
||||
#include "openair2/LAYER2/NR_MAC_UE/mac_proto.h"
|
||||
|
||||
//#define k1 1000
|
||||
#define k1 ((long long int) 1000)
|
||||
|
||||
@@ -36,10 +36,8 @@
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#include <LAYER2/NR_MAC_UE/mac_defs.h>
|
||||
#include <LAYER2/NR_MAC_UE/mac_proto.h>
|
||||
#include "executables/softmodem-common.h"
|
||||
|
||||
#include "executables/softmodem-common.h"
|
||||
#include "nr_transport_proto_ue.h"
|
||||
#include "PHY/CODING/nrPolar_tools/nr_polar_dci_defs.h"
|
||||
#include "PHY/phy_extern_nr_ue.h"
|
||||
|
||||
@@ -45,11 +45,6 @@
|
||||
|
||||
//#define DEBUG_HARQ
|
||||
|
||||
//#include "LAYER2/MAC/extern.h"
|
||||
//#include "LAYER2/MAC/defs.h"
|
||||
//#include "../openair2/LAYER2/MAC/extern.h"
|
||||
//#include "../openair2/LAYER2/MAC/defs.h"
|
||||
|
||||
//#define DEBUG_DCI
|
||||
#define NR_PDCCH_DCI_TOOLS
|
||||
//#define NR_PDCCH_DCI_TOOLS_DEBUG
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
#include "SIMULATION/TOOLS/sim.h"
|
||||
#include "executables/nr-uesoftmodem.h"
|
||||
#include "PHY/CODING/nrLDPC_extern.h"
|
||||
#include "LAYER2/NR_MAC_gNB/mac_proto.h"
|
||||
#include "common/utils/nr/nr_common.h"
|
||||
|
||||
//#define ENABLE_PHY_PAYLOAD_DEBUG 1
|
||||
|
||||
@@ -236,11 +236,10 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
|
||||
uint8_t harq_pid,
|
||||
uint8_t is_crnti,
|
||||
uint8_t llr8_flag) {
|
||||
#if UE_TIMING_TRACE
|
||||
time_stats_t *dlsch_rate_unmatching_stats=&phy_vars_ue->dlsch_rate_unmatching_stats;
|
||||
time_stats_t *dlsch_turbo_decoding_stats=&phy_vars_ue->dlsch_turbo_decoding_stats;
|
||||
time_stats_t *dlsch_deinterleaving_stats=&phy_vars_ue->dlsch_deinterleaving_stats;
|
||||
#endif
|
||||
|
||||
uint32_t A,E;
|
||||
uint32_t G;
|
||||
uint32_t ret,offset;
|
||||
@@ -411,21 +410,15 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
|
||||
for (r=0; r<harq_process->C; r++) {
|
||||
//printf("start rx segment %d\n",r);
|
||||
E = nr_get_E(G, harq_process->C, harq_process->Qm, harq_process->Nl, r);
|
||||
#if UE_TIMING_TRACE
|
||||
start_meas(dlsch_deinterleaving_stats);
|
||||
#endif
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DEINTERLEAVING, VCD_FUNCTION_IN);
|
||||
nr_deinterleaving_ldpc(E,
|
||||
harq_process->Qm,
|
||||
harq_process->w[r], // [hna] w is e
|
||||
dlsch_llr+r_offset);
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DEINTERLEAVING, VCD_FUNCTION_OUT);
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(dlsch_deinterleaving_stats);
|
||||
#endif
|
||||
#if UE_TIMING_TRACE
|
||||
start_meas(dlsch_rate_unmatching_stats);
|
||||
#endif
|
||||
LOG_D(PHY,"HARQ_PID %d Rate Matching Segment %d (coded bits %d,E %d, F %d,unpunctured/repeated bits %d, TBS %d, mod_order %d, nb_rb %d, Nl %d, rv %d, round %d)...\n",
|
||||
harq_pid,r, G,E,harq_process->F,
|
||||
Kr*3,
|
||||
@@ -454,16 +447,12 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
|
||||
E,
|
||||
harq_process->F,
|
||||
Kr-harq_process->F-2*(p_decParams->Z))==-1) {
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_RATE_MATCHING, VCD_FUNCTION_OUT);
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(dlsch_rate_unmatching_stats);
|
||||
#endif
|
||||
LOG_E(PHY,"dlsch_decoding.c: Problem in rate_matching\n");
|
||||
return(dlsch->max_ldpc_iterations + 1);
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_RATE_MATCHING, VCD_FUNCTION_OUT);
|
||||
stop_meas(dlsch_rate_unmatching_stats);
|
||||
LOG_E(PHY,"dlsch_decoding.c: Problem in rate_matching\n");
|
||||
return(dlsch->max_ldpc_iterations + 1);
|
||||
} else {
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(dlsch_rate_unmatching_stats);
|
||||
#endif
|
||||
stop_meas(dlsch_rate_unmatching_stats);
|
||||
}
|
||||
|
||||
r_offset += E;
|
||||
@@ -492,9 +481,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
|
||||
}
|
||||
|
||||
if (err_flag == 0) {
|
||||
#if UE_TIMING_TRACE
|
||||
start_meas(dlsch_turbo_decoding_stats);
|
||||
#endif
|
||||
//set first 2*Z_c bits to zeros
|
||||
memset(&z[0],0,2*harq_process->Z*sizeof(int16_t));
|
||||
//set Filler bits
|
||||
@@ -545,13 +532,10 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
|
||||
if (LOG_DEBUGFLAG(DEBUG_DLSCH_DECOD)) {
|
||||
for (int k=0; k<A>>3; k++)
|
||||
LOG_D(PHY,"output decoder [%d] = 0x%02x \n", k, harq_process->c[r][k]);
|
||||
|
||||
LOG_D(PHY,"no_iterations_ldpc %d (ret %u)\n",no_iteration_ldpc,ret);
|
||||
}
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(dlsch_turbo_decoding_stats);
|
||||
#endif
|
||||
}
|
||||
|
||||
if ((err_flag == 0) && (ret>=(1+dlsch->max_ldpc_iterations))) {// a Code segment is in error so break;
|
||||
@@ -645,11 +629,10 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
|
||||
uint8_t harq_pid,
|
||||
uint8_t is_crnti,
|
||||
uint8_t llr8_flag) {
|
||||
#if UE_TIMING_TRACE
|
||||
|
||||
time_stats_t *dlsch_rate_unmatching_stats=&phy_vars_ue->dlsch_rate_unmatching_stats;
|
||||
time_stats_t *dlsch_turbo_decoding_stats=&phy_vars_ue->dlsch_turbo_decoding_stats;
|
||||
time_stats_t *dlsch_deinterleaving_stats=&phy_vars_ue->dlsch_deinterleaving_stats;
|
||||
#endif
|
||||
uint32_t A,E;
|
||||
uint32_t G;
|
||||
uint32_t ret,offset;
|
||||
@@ -812,7 +795,6 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
|
||||
|
||||
notifiedFIFO_elt_t *res_dl;
|
||||
opp_enabled=1;
|
||||
|
||||
if (harq_process->C>1) {
|
||||
for (int nb_seg =1 ; nb_seg<harq_process->C; nb_seg++) {
|
||||
if ( (res_dl=tryPullTpool(&nf, &pool_dl)) != NULL ) {
|
||||
@@ -867,9 +849,7 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
|
||||
dlsch_llr+r_offset,
|
||||
&harq_process->w[r]);
|
||||
*/
|
||||
#if UE_TIMING_TRACE
|
||||
start_meas(dlsch_deinterleaving_stats);
|
||||
#endif
|
||||
nr_deinterleaving_ldpc(E,
|
||||
harq_process->Qm,
|
||||
harq_process->w[r],
|
||||
@@ -879,12 +859,8 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
|
||||
for (int i =0; i<16; i++)
|
||||
LOG_D(PHY,"rx output deinterleaving w[%d]= %d r_offset %u\n", i,harq_process->w[r][i], r_offset);
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(dlsch_deinterleaving_stats);
|
||||
#endif
|
||||
#if UE_TIMING_TRACE
|
||||
start_meas(dlsch_rate_unmatching_stats);
|
||||
#endif
|
||||
|
||||
if (LOG_DEBUGFLAG(DEBUG_DLSCH_DECOD))
|
||||
LOG_I(PHY,"HARQ_PID %d Rate Matching Segment %d (coded bits %d,unpunctured/repeated bits %d, TBS %d, mod_order %d, nb_rb %d, Nl %d, rv %d, round %d)...\n",
|
||||
@@ -915,15 +891,11 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
|
||||
E,
|
||||
harq_process->F,
|
||||
Kr-harq_process->F-2*(p_decParams->Z))==-1) {
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(dlsch_rate_unmatching_stats);
|
||||
#endif
|
||||
LOG_E(PHY,"dlsch_decoding.c: Problem in rate_matching\n");
|
||||
return(dlsch->max_ldpc_iterations);
|
||||
} else {
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(dlsch_rate_unmatching_stats);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (LOG_DEBUGFLAG(DEBUG_DLSCH_DECOD))
|
||||
@@ -966,9 +938,7 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
|
||||
Kr,r,harq_process->C,harq_process->nb_rb,crc_type,A,harq_process->TBS,
|
||||
harq_process->B,harq_process->mcs,harq_process->Qm,harq_process->rvidx,harq_process->round,dlsch->max_ldpc_iterations);
|
||||
*/
|
||||
#if UE_TIMING_TRACE
|
||||
start_meas(dlsch_turbo_decoding_stats);
|
||||
#endif
|
||||
LOG_D(PHY,"mthread AbsSubframe %d.%d Start LDPC segment %d/%d \n",frame%1024,nr_slot_rx,r,harq_process->C-1);
|
||||
/*for (int cnt =0; cnt < (kc-2)*p_decParams->Z; cnt++){
|
||||
inv_d[cnt] = (1)*harq_process->d[r][cnt];
|
||||
@@ -1037,11 +1007,10 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
|
||||
for (int k=0; k<32; k++)
|
||||
LOG_D(PHY,"output decoder [%d] = 0x%02x \n", k, harq_process->c[r][k]);
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(dlsch_turbo_decoding_stats);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
if ((err_flag == 0) && (ret>=(1+dlsch->max_ldpc_iterations))) {// a Code segment is in error so break;
|
||||
LOG_D(PHY,"AbsSubframe %d.%d CRC failed, segment %d/%d \n",frame%1024,nr_slot_rx,r,harq_process->C-1);
|
||||
err_flag = 1;
|
||||
@@ -1135,7 +1104,6 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
|
||||
}
|
||||
|
||||
|
||||
|
||||
void nr_dlsch_decoding_process(void *arg) {
|
||||
nr_rxtx_thread_data_t *rxtxD= (nr_rxtx_thread_data_t *)arg;
|
||||
UE_nr_rxtx_proc_t *proc = &rxtxD->proc;
|
||||
@@ -1167,11 +1135,10 @@ void nr_dlsch_decoding_process(void *arg) {
|
||||
proc->instance_cnt_dlsch_td=-1;
|
||||
//proc->nr_slot_rx = proc->sub_frame_start * frame_parms->slots_per_subframe;
|
||||
proc->decoder_thread_available = 1;
|
||||
#if UE_TIMING_TRACE
|
||||
time_stats_t *dlsch_rate_unmatching_stats=&phy_vars_ue->dlsch_rate_unmatching_stats;
|
||||
time_stats_t *dlsch_turbo_decoding_stats=&phy_vars_ue->dlsch_turbo_decoding_stats;
|
||||
time_stats_t *dlsch_deinterleaving_stats=&phy_vars_ue->dlsch_deinterleaving_stats;
|
||||
#endif
|
||||
|
||||
uint32_t A,E;
|
||||
uint32_t G;
|
||||
uint32_t ret;
|
||||
@@ -1272,9 +1239,7 @@ void nr_dlsch_decoding_process(void *arg) {
|
||||
Kr_bytes = Kr>>3;
|
||||
K_bits_F = Kr-harq_process->F;
|
||||
E = nr_get_E(G, harq_process->C, harq_process->Qm, harq_process->Nl, r);
|
||||
#if UE_TIMING_TRACE
|
||||
start_meas(dlsch_deinterleaving_stats);
|
||||
#endif
|
||||
nr_deinterleaving_ldpc(E,
|
||||
harq_process->Qm,
|
||||
harq_process->w[r],
|
||||
@@ -1284,13 +1249,8 @@ void nr_dlsch_decoding_process(void *arg) {
|
||||
for (int i =0; i<16; i++)
|
||||
LOG_D(PHY,"rx output thread 0 deinterleaving w[%d]= %d r_offset %u\n", i,harq_process->w[r][i], r_offset);
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(dlsch_deinterleaving_stats);
|
||||
#endif
|
||||
#if UE_TIMING_TRACE
|
||||
start_meas(dlsch_rate_unmatching_stats);
|
||||
#endif
|
||||
|
||||
if (LOG_DEBUGFLAG(DEBUG_DLSCH_DECOD))
|
||||
LOG_I(PHY,"HARQ_PID %d Rate Matching Segment %d (coded bits %d,unpunctured/repeated bits %d, TBS %d, mod_order %d, nb_rb %d, Nl %d, rv %d, round %d)...\n",
|
||||
harq_pid,r, G,
|
||||
@@ -1319,15 +1279,11 @@ void nr_dlsch_decoding_process(void *arg) {
|
||||
E,
|
||||
harq_process->F,
|
||||
Kr-harq_process->F-2*(p_decParams->Z))==-1) {
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(dlsch_rate_unmatching_stats);
|
||||
#endif
|
||||
LOG_E(PHY,"dlsch_decoding.c: Problem in rate_matching\n");
|
||||
//return(dlsch->max_ldpc_iterations);
|
||||
} else {
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(dlsch_rate_unmatching_stats);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (LOG_DEBUGFLAG(DEBUG_DLSCH_DECOD)) {
|
||||
@@ -1364,9 +1320,7 @@ void nr_dlsch_decoding_process(void *arg) {
|
||||
Kr,r,harq_process->C,harq_process->nb_rb,A,harq_process->TBS,harq_process->B,harq_process->mcs,harq_process->Qm,harq_process->rvidx,harq_process->round);
|
||||
}
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
start_meas(dlsch_turbo_decoding_stats);
|
||||
#endif
|
||||
// LOG_D(PHY,"AbsSubframe %d.%d Start LDPC segment %d/%d \n",frame%1024,subframe,r,harq_process->C-1);
|
||||
/*
|
||||
for (int cnt =0; cnt < (kc-2)*p_decParams->Z; cnt++){
|
||||
@@ -1412,10 +1366,7 @@ void nr_dlsch_decoding_process(void *arg) {
|
||||
if ( LOG_DEBUGFLAG(DEBUG_DLSCH_DECOD))
|
||||
for (int k=0; k<2; k++)
|
||||
LOG_D(PHY,"segment 1 output decoder [%d] = 0x%02x \n", k, harq_process->c[r][k]);
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(dlsch_turbo_decoding_stats);
|
||||
#endif
|
||||
}
|
||||
|
||||
if ((err_flag == 0) && (ret>=(1+dlsch->max_ldpc_iterations))) {// a Code segment is in error so break;
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
#include "openair1/PHY/NR_TRANSPORT/nr_dlsch.h"
|
||||
#include "PHY/NR_REFSIG/nr_refsig.h"
|
||||
#include "PHY/NR_REFSIG/dmrs_nr.h"
|
||||
#include "common/utils/nr/nr_common.h"
|
||||
|
||||
#ifndef USER_MODE
|
||||
#define NOCYGWIN_STATIC static
|
||||
@@ -163,9 +164,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
|
||||
// int avg_0[2];
|
||||
// int avg_1[2];
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
uint8_t slot = 0;
|
||||
#endif
|
||||
|
||||
unsigned char aatx=0,aarx=0;
|
||||
|
||||
@@ -331,12 +330,10 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
|
||||
DevAssert(dlsch1_harq);
|
||||
}
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
if(symbol > ue->frame_parms.symbols_per_slot>>1)
|
||||
{
|
||||
slot = 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_HARQ
|
||||
printf("Demod dlsch0_harq->pmi_alloc %d\n", dlsch0_harq->pmi_alloc);
|
||||
@@ -346,9 +343,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
|
||||
uint8_t config_type = dlsch0_harq->dmrsConfigType;
|
||||
|
||||
if (beamforming_mode==0) {//No beamforming
|
||||
#if UE_TIMING_TRACE
|
||||
start_meas(&ue->generic_stat_bis[proc->thread_id][slot]);
|
||||
#endif
|
||||
if (dlsch0_harq->Nl > 1)//More than or equal 2 layers
|
||||
nb_rb = nr_dlsch_extract_rbs_multiple(common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF,
|
||||
pdsch_vars[gNB_id]->dl_ch_estimates,
|
||||
@@ -389,7 +384,6 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
|
||||
|
||||
len = (pilots==1)? ((config_type==NFAPI_NR_DMRS_TYPE1)?nb_rb*(12-6*dlsch0_harq->n_dmrs_cdm_groups): nb_rb*(12-4*dlsch0_harq->n_dmrs_cdm_groups)):(nb_rb*12);
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(&ue->generic_stat_bis[proc->thread_id][slot]);
|
||||
#if DISABLE_LOG_X
|
||||
printf("[AbsSFN %u.%d] Slot%d Symbol %d type %d: Pilot/Data extraction %5.2f \n",
|
||||
@@ -398,11 +392,8 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
|
||||
LOG_I(PHY, "[AbsSFN %u.%d] Slot%d Symbol %d type %d: Pilot/Data extraction %5.2f \n",
|
||||
frame,nr_slot_rx,slot,symbol,type,ue->generic_stat_bis[proc->thread_id][slot].p_time/(cpuf*1000.0));
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
start_meas(&ue->generic_stat_bis[proc->thread_id][slot]);
|
||||
#endif
|
||||
n_tx = dlsch0_harq->Nl;
|
||||
n_rx = frame_parms->nb_antennas_rx;
|
||||
|
||||
@@ -416,18 +407,13 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
|
||||
len,
|
||||
nb_rb_pdsch);
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(&ue->generic_stat_bis[proc->thread_id][slot]);
|
||||
#if DISABLE_LOG_X
|
||||
printf("[AbsSFN %u.%d] Slot%d Symbol %d: Channel Scale %5.2f \n",frame,nr_slot_rx,slot,symbol,ue->generic_stat_bis[proc->thread_id][slot].p_time/(cpuf*1000.0));
|
||||
#else
|
||||
LOG_I(PHY, "[AbsSFN %u.%d] Slot%d Symbol %d: Channel Scale %5.2f \n",frame,nr_slot_rx,slot,symbol,ue->generic_stat_bis[proc->thread_id][slot].p_time/(cpuf*1000.0));
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
start_meas(&ue->generic_stat_bis[proc->thread_id][slot]);
|
||||
#endif
|
||||
if (first_symbol_flag==1) {
|
||||
if (beamforming_mode==0){
|
||||
nr_dlsch_channel_level(pdsch_vars[gNB_id]->dl_ch_estimates_ext,
|
||||
@@ -482,19 +468,14 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
|
||||
}
|
||||
#endif
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(&ue->generic_stat_bis[proc->thread_id][slot]);
|
||||
#if DISABLE_LOG_X
|
||||
printf("[AbsSFN %u.%d] Slot%d Symbol %d first_symbol_flag %d: Channel Level %5.2f \n",frame,nr_slot_rx,slot,symbol,first_symbol_flag,ue->generic_stat_bis[proc->thread_id][slot].p_time/(cpuf*1000.0));
|
||||
#else
|
||||
LOG_I(PHY, "[AbsSFN %u.%d] Slot%d Symbol %d first_symbol_flag %d: Channel Level %5.2f \n",frame,nr_slot_rx,slot,symbol,first_symbol_flag,ue->generic_stat_bis[proc->thread_id][slot].p_time/(cpuf*1000.0));
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
start_meas(&ue->generic_stat_bis[proc->thread_id][slot]);
|
||||
#endif
|
||||
// Now channel compensation
|
||||
if (dlsch0_harq->mimo_mode<NR_DUALSTREAM) {
|
||||
nr_dlsch_channel_compensation(pdsch_vars[gNB_id]->rxdataF_ext,
|
||||
@@ -539,18 +520,13 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
|
||||
0);
|
||||
}
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(&ue->generic_stat_bis[proc->thread_id][slot]);
|
||||
#if DISABLE_LOG_X
|
||||
printf("[AbsSFN %u.%d] Slot%d Symbol %d log2_maxh %d channel_level %d: Channel Comp %5.2f \n", frame, nr_slot_rx, slot, symbol, pdsch_vars[gNB_id]->log2_maxh, proc->channel_level, ue->generic_stat_bis[proc->thread_id][slot].p_time/(cpuf*1000.0));
|
||||
#else
|
||||
LOG_I(PHY, "[AbsSFN %u.%d] Slot%d Symbol %d log2_maxh %d channel_level %d: Channel Comp %5.2f \n", frame, nr_slot_rx, slot, symbol, pdsch_vars[gNB_id]->log2_maxh, proc->channel_level, ue->generic_stat_bis[proc->thread_id][slot].p_time/(cpuf*1000.0));
|
||||
#endif
|
||||
#endif
|
||||
// MRC
|
||||
#if UE_TIMING_TRACE
|
||||
start_meas(&ue->generic_stat_bis[proc->thread_id][slot]);
|
||||
#endif
|
||||
|
||||
if (frame_parms->nb_antennas_rx > 1) {
|
||||
if (dlsch0_harq->mimo_mode<NR_DUALSTREAM) {
|
||||
@@ -603,19 +579,13 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
|
||||
//i_mod should have been passed as a parameter
|
||||
}
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(&ue->generic_stat_bis[proc->thread_id][slot]);
|
||||
#if DISABLE_LOG_X
|
||||
printf("[AbsSFN %u.%d] Slot%d Symbol %d: Channel Combine %5.2f \n",frame,nr_slot_rx,slot,symbol,ue->generic_stat_bis[proc->thread_id][slot].p_time/(cpuf*1000.0));
|
||||
#else
|
||||
LOG_I(PHY, "[AbsSFN %u.%d] Slot%d Symbol %d: Channel Combine %5.2f \n",frame,nr_slot_rx,slot,symbol,ue->generic_stat_bis[proc->thread_id][slot].p_time/(cpuf*1000.0));
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
|
||||
start_meas(&ue->generic_stat_bis[proc->thread_id][slot]);
|
||||
#endif
|
||||
/* Store the valid DL RE's */
|
||||
pdsch_vars[gNB_id]->dl_valid_re[symbol-1] = len;
|
||||
|
||||
@@ -692,14 +662,12 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
|
||||
|
||||
}
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(&ue->generic_stat_bis[proc->thread_id][slot]);
|
||||
#if DISABLE_LOG_X
|
||||
printf("[AbsSFN %u.%d] Slot%d Symbol %d: LLR Computation %5.2f \n",frame,nr_slot_rx,slot,symbol,ue->generic_stat_bis[proc->thread_id][slot].p_time/(cpuf*1000.0));
|
||||
#else
|
||||
LOG_I(PHY, "[AbsSFN %u.%d] Slot%d Symbol %d: LLR Computation %5.2f \n",frame,nr_slot_rx,slot,symbol,ue->generic_stat_bis[proc->thread_id][slot].p_time/(cpuf*1000.0));
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Please keep it: useful for debugging
|
||||
#ifdef DEBUG_PDSCH_RX
|
||||
|
||||
@@ -127,15 +127,11 @@ int nr_pbch_detection(UE_nr_rxtx_proc_t * proc, PHY_VARS_NR_UE *ue, int pbch_ini
|
||||
// initialization of structure
|
||||
current_ssb = create_ssb_node(l,hf);
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
start_meas(&ue->dlsch_channel_estimation_stats);
|
||||
#endif
|
||||
// computing correlation between received DMRS symbols and transmitted sequence for current i_ssb and n_hf
|
||||
for(int i=pbch_initial_symbol; i<pbch_initial_symbol+3;i++)
|
||||
nr_pbch_dmrs_correlation(ue,proc,0,0,i,i-pbch_initial_symbol,current_ssb);
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(&ue->dlsch_channel_estimation_stats);
|
||||
#endif
|
||||
|
||||
current_ssb->metric = current_ssb->c_re*current_ssb->c_re + current_ssb->c_im*current_ssb->c_im;
|
||||
|
||||
@@ -151,15 +147,11 @@ int nr_pbch_detection(UE_nr_rxtx_proc_t * proc, PHY_VARS_NR_UE *ue, int pbch_ini
|
||||
NR_UE_SSB *temp_ptr=best_ssb;
|
||||
while (ret!=0 && temp_ptr != NULL) {
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
start_meas(&ue->dlsch_channel_estimation_stats);
|
||||
#endif
|
||||
// computing channel estimation for selected best ssb
|
||||
for(int i=pbch_initial_symbol; i<pbch_initial_symbol+3;i++)
|
||||
nr_pbch_channel_estimation(ue,proc,0,0,i,i-pbch_initial_symbol,temp_ptr->i_ssb,temp_ptr->n_hf);
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(&ue->dlsch_channel_estimation_stats);
|
||||
#endif
|
||||
|
||||
ret = nr_rx_pbch(ue,
|
||||
proc,
|
||||
|
||||
@@ -39,7 +39,6 @@
|
||||
#include "PHY/CODING/nrLDPC_extern.h"
|
||||
#include "PHY/NR_UE_TRANSPORT/nr_transport_ue.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
#include "LAYER2/NR_MAC_gNB/mac_proto.h"
|
||||
#include <openair2/UTIL/OPT/opt.h>
|
||||
|
||||
//#define DEBUG_ULSCH_CODING
|
||||
|
||||
@@ -44,8 +44,6 @@
|
||||
#include "PHY/TOOLS/tools_defs.h"
|
||||
#include "executables/nr-softmodem.h"
|
||||
#include "executables/softmodem-common.h"
|
||||
#include "LAYER2/NR_MAC_UE/mac_proto.h"
|
||||
|
||||
#include "PHY/NR_REFSIG/ul_ref_seq_nr.h"
|
||||
|
||||
//#define DEBUG_PUSCH_MAPPING
|
||||
@@ -143,7 +141,12 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
|
||||
|
||||
ulsch_ue->Nid_cell = Nid_cell;
|
||||
|
||||
get_num_re_dmrs(pusch_pdu, &nb_dmrs_re_per_rb, &number_dmrs_symbols);
|
||||
for (int i = start_symbol; i < start_symbol + number_of_symbols; i++) {
|
||||
if((ul_dmrs_symb_pos >> i) & 0x01)
|
||||
number_dmrs_symbols += 1;
|
||||
}
|
||||
|
||||
nb_dmrs_re_per_rb = ((dmrs_type == pusch_dmrs_type1) ? 6:4)*cdm_grps_no_data;
|
||||
|
||||
LOG_D(PHY,"ulsch %x : start_rb %d bwp_start %d start_sc %d start_symbol %d num_symbols %d cdmgrpsnodata %d num_dmrs %d dmrs_re_per_rb %d\n",
|
||||
rnti,start_rb,pusch_pdu->bwp_start,start_sc,start_symbol,number_of_symbols,cdm_grps_no_data,number_dmrs_symbols,nb_dmrs_re_per_rb);
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
#include "PHY/defs_nr_common.h"
|
||||
#include "PHY/defs_nr_UE.h"
|
||||
//#include "PHY/extern.h"
|
||||
//#include "LAYER2/MAC/extern.h"
|
||||
#include "PHY/NR_UE_TRANSPORT/pucch_nr.h"
|
||||
#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_transport_common_proto.h"
|
||||
|
||||
@@ -37,7 +37,6 @@
|
||||
#include "PHY/defs_nr_common.h"
|
||||
#include "PHY/defs_nr_UE.h"
|
||||
//#include "PHY/extern.h"
|
||||
//#include "LAYER2/MAC/extern.h"
|
||||
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
|
||||
@@ -18,17 +18,27 @@
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <stdio.h>
|
||||
#include "time_meas.h"
|
||||
#include <math.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <string.h>
|
||||
#include "assertions.h"
|
||||
#ifndef PHYSIM
|
||||
#include <pthread.h>
|
||||
#include "common/config/config_userapi.h"
|
||||
#endif
|
||||
// global var for openair performance profiler
|
||||
int opp_enabled = 0;
|
||||
double cpu_freq_GHz __attribute__ ((aligned(32)));
|
||||
|
||||
double cpu_freq_GHz __attribute__ ((aligned(32)))=0.0;
|
||||
#ifndef PHYSIM
|
||||
static uint32_t max_cpumeasur;
|
||||
static time_stats_t **measur_table;
|
||||
notifiedFIFO_t measur_fifo;
|
||||
#endif
|
||||
double get_cpu_freq_GHz(void)
|
||||
{
|
||||
if (cpu_freq_GHz <1 ) {
|
||||
@@ -133,3 +143,112 @@ double get_time_meas_us(time_stats_t *ts)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifndef PHYSIM
|
||||
/* function for the asynchronous measurment module: cpu stat are sent to a dedicated thread
|
||||
* which is in charge of computing the cpu time spent in a given function/algorithm...
|
||||
*/
|
||||
|
||||
time_stats_t *register_meas(char *name)
|
||||
{
|
||||
for (int i=0; i<max_cpumeasur; i++) {
|
||||
if (measur_table[i] == NULL) {
|
||||
measur_table[i] = (time_stats_t *)malloc(sizeof(time_stats_t));
|
||||
memset(measur_table[i] ,0,sizeof(time_stats_t));
|
||||
measur_table[i]->meas_name = strdup(name);
|
||||
measur_table[i]->meas_index = i;
|
||||
measur_table[i]->tpoolmsg =newNotifiedFIFO_elt(sizeof(time_stats_msg_t),0,NULL,NULL);
|
||||
measur_table[i]->tstatptr = (time_stats_msg_t *)NotifiedFifoData(measur_table[i]->tpoolmsg);
|
||||
return measur_table[i];
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void free_measurtbl(void) {
|
||||
for (int i=0; i<max_cpumeasur; i++) {
|
||||
if (measur_table[i] != NULL) {
|
||||
free(measur_table[i]->meas_name);
|
||||
delNotifiedFIFO_elt(measur_table[i]->tpoolmsg);
|
||||
free(measur_table[i]);
|
||||
}
|
||||
}
|
||||
//free the fifo...
|
||||
}
|
||||
|
||||
void run_cpumeasur(void) {
|
||||
struct sched_param schedp;
|
||||
pthread_setname_np(pthread_self(), "measur");
|
||||
schedp.sched_priority=0;
|
||||
int rt=pthread_setschedparam(pthread_self(), SCHED_IDLE, &schedp);
|
||||
AssertFatal(rt==0, "couldn't set measur thread priority: %s\n",strerror(errno));
|
||||
initNotifiedFIFO(&measur_fifo);
|
||||
while(1) {
|
||||
notifiedFIFO_elt_t *msg = pullNotifiedFIFO(&measur_fifo);
|
||||
time_stats_msg_t *tsm = (time_stats_msg_t *)NotifiedFifoData(msg);
|
||||
switch(tsm->msgid) {
|
||||
case TIMESTAT_MSGID_START:
|
||||
measur_table[tsm->timestat_id]->in=tsm->ts;
|
||||
(measur_table[tsm->timestat_id]->trials)++;
|
||||
break;
|
||||
case TIMESTAT_MSGID_STOP:
|
||||
/// process duration is the difference between two clock points
|
||||
measur_table[tsm->timestat_id]->p_time = (tsm->ts - measur_table[tsm->timestat_id]->in);
|
||||
measur_table[tsm->timestat_id]->diff += measur_table[tsm->timestat_id]->p_time;
|
||||
if ( measur_table[tsm->timestat_id]->p_time > measur_table[tsm->timestat_id]->max )
|
||||
measur_table[tsm->timestat_id]->max = measur_table[tsm->timestat_id]->p_time;
|
||||
break;
|
||||
case TIMESTAT_MSGID_DISPLAY:
|
||||
{
|
||||
char aline[256];
|
||||
int start, stop;
|
||||
if (tsm->displayFunc != NULL) {
|
||||
if(tsm->timestat_id >= 0) {
|
||||
start=tsm->timestat_id ;
|
||||
stop=start+1;
|
||||
}
|
||||
else {
|
||||
start=0;
|
||||
stop=max_cpumeasur ;
|
||||
}
|
||||
for (int i=start ; i<stop ; i++) {
|
||||
if (measur_table[i] != NULL) {
|
||||
sprintf(aline,"%s: %15.3f us ",measur_table[i]->meas_name, measur_table[i]->trials==0?0:( (measur_table[i]->trials/measur_table[i]->diff )/ cpu_freq_GHz /1000 ));
|
||||
tsm->displayFunc(aline);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case TIMESTAT_MSGID_END:
|
||||
free_measurtbl();
|
||||
delNotifiedFIFO_elt(msg);
|
||||
pthread_exit(NULL);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
delNotifiedFIFO_elt(msg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void init_meas(void) {
|
||||
pthread_t thid;
|
||||
paramdef_t cpumeasur_params[] = CPUMEASUR_PARAMS_DESC;
|
||||
int numparams=sizeof(cpumeasur_params)/sizeof(paramdef_t);
|
||||
int rt = config_get( cpumeasur_params,numparams,CPUMEASUR_SECTION);
|
||||
AssertFatal(rt >= 0, "cpumeasur configuration couldn't be performed");
|
||||
measur_table=calloc(max_cpumeasur,sizeof( time_stats_t *));
|
||||
AssertFatal(measur_table!=NULL, "couldn't allocate %u cpu measurements entries\n",max_cpumeasur);
|
||||
rt=pthread_create(&thid,NULL, (void *(*)(void *))run_cpumeasur, NULL);
|
||||
AssertFatal(rt==0, "couldn't create cpu measurment thread: %s\n",strerror(errno));
|
||||
}
|
||||
|
||||
void end_meas(void) {
|
||||
notifiedFIFO_elt_t *nfe = newNotifiedFIFO_elt(sizeof(time_stats_msg_t),0,NULL,NULL);
|
||||
time_stats_msg_t *msg = (time_stats_msg_t *)NotifiedFifoData(nfe);
|
||||
msg->msgid = TIMESTAT_MSGID_END ;
|
||||
pushNotifiedFIFO(&measur_fifo, nfe);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -31,31 +31,57 @@
|
||||
#include <pthread.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/types.h>
|
||||
#ifndef PHYSIM
|
||||
#include "common/utils/threadPool/thread-pool.h"
|
||||
#endif
|
||||
// global var to enable openair performance profiler
|
||||
extern int opp_enabled;
|
||||
extern double cpu_freq_GHz __attribute__ ((aligned(32)));;
|
||||
|
||||
// structure to store data to compute cpu measurment
|
||||
#if defined(__x86_64__) || defined(__i386__)
|
||||
typedef struct {
|
||||
long long in;
|
||||
long long diff;
|
||||
long long p_time; /*!< \brief absolute process duration */
|
||||
long long diff_square; /*!< \brief process duration square */
|
||||
long long max;
|
||||
int trials;
|
||||
int meas_flag;
|
||||
} time_stats_t;
|
||||
#define OAI_CPUTIME_TYPE long long
|
||||
#elif defined(__arm__)
|
||||
typedef struct {
|
||||
uint32_t in;
|
||||
uint32_t diff;
|
||||
uint32_t p_time; /*!< \brief absolute process duration */
|
||||
uint32_t diff_square; /*!< \brief process duration square */
|
||||
uint32_t max;
|
||||
int trials;
|
||||
} time_stats_t;
|
||||
#define OAI_CPUTIME_TYPE uint32_t
|
||||
#else
|
||||
#error "building on unsupported CPU architecture"
|
||||
#endif
|
||||
|
||||
#define TIMESTAT_MSGID_START 0 /*!< \brief send time at measure starting point */
|
||||
#define TIMESTAT_MSGID_STOP 1 /*!< \brief send time at measure end point */
|
||||
#define TIMESTAT_MSGID_ENABLE 2 /*!< \brief enable measure point */
|
||||
#define TIMESTAT_MSGID_DISABLE 3 /*!< \brief disable measure point */
|
||||
#define TIMESTAT_MSGID_DISPLAY 10 /*!< \brief display measure */
|
||||
#define TIMESTAT_MSGID_END 11 /*!< \brief stops the measure threads and free assocated resources */
|
||||
typedef void(*meas_printfunc_t)(const char* format, ...);
|
||||
typedef struct {
|
||||
int msgid; /*!< \brief message id, as defined by TIMESTAT_MSGID_X macros */
|
||||
int timestat_id; /*!< \brief points to the time_stats_t entry in cpumeas table */
|
||||
OAI_CPUTIME_TYPE ts; /*!< \brief time stamp */
|
||||
meas_printfunc_t displayFunc; /*!< \brief function to call when DISPLAY message is received*/
|
||||
} time_stats_msg_t;
|
||||
|
||||
|
||||
typedef struct {
|
||||
OAI_CPUTIME_TYPE in; /*!< \brief time at measure starting point */
|
||||
OAI_CPUTIME_TYPE diff; /*!< \brief average difference between time at starting point and time at endpoint*/
|
||||
OAI_CPUTIME_TYPE p_time; /*!< \brief absolute process duration */
|
||||
OAI_CPUTIME_TYPE diff_square; /*!< \brief process duration square */
|
||||
OAI_CPUTIME_TYPE max; /*!< \brief maximum difference between time at starting point and time at endpoint*/
|
||||
int trials; /*!< \brief number of start point - end point iterations */
|
||||
int meas_flag; /*!< \brief 1: stop_meas not called (consecutive calls of start_meas) */
|
||||
char *meas_name; /*!< \brief name to use when printing the measure (not used for PHY simulators)*/
|
||||
int meas_index; /*!< \brief index of this measure in the measure array (not used for PHY simulators)*/
|
||||
int meas_enabled; /*!< \brief per measure enablement flag. send_meas tests this flag, unused today in start_meas and stop_meas*/
|
||||
#ifndef PHYSIM
|
||||
notifiedFIFO_elt_t *tpoolmsg; /*!< \brief message pushed to the cpu measurment queue to report a measure START or STOP */
|
||||
time_stats_msg_t *tstatptr; /*!< \brief pointer to the time_stats_msg_t data in the tpoolmsg, stored here for perf considerations*/
|
||||
#endif
|
||||
} time_stats_t;
|
||||
#define MEASURE_ENABLED(X) (X->meas_enabled)
|
||||
|
||||
|
||||
|
||||
|
||||
static inline void start_meas(time_stats_t *ts) __attribute__((always_inline));
|
||||
static inline void stop_meas(time_stats_t *ts) __attribute__((always_inline));
|
||||
|
||||
@@ -137,4 +163,28 @@ static inline void copy_meas(time_stats_t *dst_ts,time_stats_t *src_ts) {
|
||||
dst_ts->max=src_ts->max;
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef PHYSIM
|
||||
extern notifiedFIFO_t measur_fifo;
|
||||
#define CPUMEASUR_SECTION "cpumeasur"
|
||||
|
||||
#define CPUMEASUR_PARAMS_DESC { \
|
||||
{"max_cpumeasur", "Max number of cpu measur entries", 0, uptr:&max_cpumeasur, defintval:100, TYPE_UINT, 0},\
|
||||
}
|
||||
|
||||
void init_meas(void);
|
||||
time_stats_t *register_meas(char *name);
|
||||
#define START_MEAS(X) send_meas(X, TIMESTAT_MSGID_START)
|
||||
#define STOP_MEAS(X) send_meas(X, TIMESTAT_MSGID_STOP)
|
||||
static inline void send_meas(time_stats_t *ts, int msgid) {
|
||||
if (MEASURE_ENABLED(ts) ) {
|
||||
ts->tstatptr->timestat_id=ts->meas_index;
|
||||
ts->tstatptr->msgid = msgid ;
|
||||
ts->tstatptr->ts = rdtsc_oai();
|
||||
pushNotifiedFIFO(&measur_fifo, ts->tpoolmsg);
|
||||
}
|
||||
}
|
||||
void end_meas(void);
|
||||
|
||||
#endif //ifndef PHYSIM
|
||||
#endif
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
* \warning
|
||||
*/
|
||||
#include "fapi_nr_l1.h"
|
||||
#include "common/ran_context.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_dlsch.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_dci.h"
|
||||
@@ -146,7 +147,7 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO){
|
||||
AssertFatal(RC.gNB!=NULL,"RC.gNB is null\n");
|
||||
AssertFatal(RC.gNB[Mod_id]!=NULL,"RC.gNB[%d] is null\n",Mod_id);
|
||||
|
||||
gNB = RC.gNB[Mod_id];
|
||||
gNB = RC.gNB[Mod_id];
|
||||
|
||||
notifiedFIFO_elt_t *res;
|
||||
res = pullTpool(gNB->resp_L1_tx, gNB->threadPool);
|
||||
|
||||
@@ -49,6 +49,59 @@
|
||||
|
||||
extern uint8_t nfapi_mode;
|
||||
|
||||
uint8_t get_nr_prach_duration(uint8_t prach_format){
|
||||
|
||||
switch(prach_format){
|
||||
|
||||
case 0: // format 0
|
||||
return 0;
|
||||
|
||||
case 1: // format 1
|
||||
return 0;
|
||||
|
||||
case 2: // format 2
|
||||
return 0;
|
||||
|
||||
case 3: // format 3
|
||||
return 0;
|
||||
|
||||
case 4: // format A1
|
||||
return 2;
|
||||
|
||||
case 5: // format A2
|
||||
return 4;
|
||||
|
||||
case 6: // format A3
|
||||
return 6;
|
||||
|
||||
case 7: // format B1
|
||||
return 2;
|
||||
|
||||
case 8: // format B4
|
||||
return 12;
|
||||
|
||||
case 9: // format C0
|
||||
return 2;
|
||||
|
||||
case 10: // format C2
|
||||
return 6;
|
||||
|
||||
case 11: // format A1/B1
|
||||
return 2;
|
||||
|
||||
case 12: // format A2/B2
|
||||
return 4;
|
||||
|
||||
case 13: // format A3/B3
|
||||
return 6;
|
||||
|
||||
default :
|
||||
AssertFatal(1==0,"Invalid Prach format\n");
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void L1_nr_prach_procedures(PHY_VARS_gNB *gNB,int frame,int slot) {
|
||||
|
||||
uint16_t max_preamble[4]={0},max_preamble_energy[4]={0},max_preamble_delay[4]={0};
|
||||
|
||||
@@ -340,8 +340,6 @@ uint16_t nr_get_n1_pucch(PHY_VARS_NR_UE *phy_vars_ue,
|
||||
*/
|
||||
UE_MODE_t get_nrUE_mode(uint8_t Mod_id,uint8_t CC_id,uint8_t gNB_index);
|
||||
|
||||
uint8_t get_ra_PreambleIndex(uint8_t Mod_id, uint8_t CC_id, uint8_t gNB_id);
|
||||
|
||||
/*! \brief This function implements the power control mechanism for PUCCH from 36.213.
|
||||
@param phy_vars_ue PHY variables
|
||||
@param proc Pointer to proc descriptor
|
||||
|
||||
@@ -52,7 +52,8 @@
|
||||
#endif
|
||||
#include "executables/softmodem-common.h"
|
||||
#include "executables/nr-uesoftmodem.h"
|
||||
#include "openair2/LAYER2/NR_MAC_UE/mac_proto.h"
|
||||
#include "LAYER2/NR_MAC_UE/mac_proto.h"
|
||||
#include "LAYER2/NR_MAC_UE/nr_l1_helpers.h"
|
||||
|
||||
//#define DEBUG_PHY_PROC
|
||||
#define NR_PDCCH_SCHED
|
||||
@@ -64,8 +65,6 @@
|
||||
#define PUCCH
|
||||
#endif
|
||||
|
||||
#include "LAYER2/NR_MAC_UE/mac_defs.h"
|
||||
#include "LAYER2/NR_MAC_UE/mac_proto.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
|
||||
#ifdef EMOS
|
||||
@@ -215,12 +214,6 @@ UE_MODE_t get_nrUE_mode(uint8_t Mod_id,uint8_t CC_id,uint8_t gNB_id){
|
||||
return(PHY_vars_UE_g[Mod_id][CC_id]->UE_mode[gNB_id]);
|
||||
}
|
||||
|
||||
uint8_t get_ra_PreambleIndex(uint8_t Mod_id, uint8_t CC_id, uint8_t gNB_id){
|
||||
|
||||
return PHY_vars_UE_g[Mod_id][CC_id]->prach_resources[gNB_id]->ra_PreambleIndex;
|
||||
|
||||
}
|
||||
|
||||
// convert time factor "16 * 64 * T_c / (2^mu)" in N_TA calculation in TS38.213 section 4.2 to samples by multiplying with samples per second
|
||||
// 16 * 64 * T_c / (2^mu) * samples_per_second
|
||||
// = 16 * T_s / (2^mu) * samples_per_second
|
||||
@@ -282,9 +275,8 @@ void phy_procedures_nrUE_TX(PHY_VARS_NR_UE *ue,
|
||||
|
||||
LOG_D(PHY,"****** start TX-Chain for AbsSubframe %d.%d ******\n", frame_tx, slot_tx);
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
|
||||
start_meas(&ue->phy_proc_tx);
|
||||
#endif
|
||||
|
||||
if (ue->UE_mode[gNB_id] <= PUSCH){
|
||||
|
||||
@@ -296,9 +288,8 @@ void phy_procedures_nrUE_TX(PHY_VARS_NR_UE *ue,
|
||||
}
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX, VCD_FUNCTION_OUT);
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(&ue->phy_proc_tx);
|
||||
#endif
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -647,9 +638,7 @@ int nr_ue_pdcch_procedures(uint8_t gNB_id,
|
||||
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_PDCCH_PROCEDURES, VCD_FUNCTION_IN);
|
||||
#if UE_TIMING_TRACE
|
||||
start_meas(&ue->dlsch_rx_pdcch_stats);
|
||||
#endif
|
||||
start_meas(&ue->dlsch_rx_pdcch_stats);
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RX_PDCCH, VCD_FUNCTION_IN);
|
||||
#ifdef NR_PDCCH_SCHED_DEBUG
|
||||
@@ -749,9 +738,7 @@ int nr_ue_pdcch_procedures(uint8_t gNB_id,
|
||||
// send to mac
|
||||
ue->if_inst->dl_indication(&dl_indication, NULL);
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(&ue->dlsch_rx_pdcch_stats);
|
||||
#endif
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_PDCCH_PROCEDURES, VCD_FUNCTION_OUT);
|
||||
return(dci_cnt);
|
||||
@@ -833,12 +820,10 @@ int nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int gNB_
|
||||
else
|
||||
first_symbol_flag = 0;
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
uint8_t slot = 0;
|
||||
if(m >= ue->frame_parms.symbols_per_slot>>1)
|
||||
slot = 1;
|
||||
start_meas(&ue->dlsch_llr_stats_parallelization[proc->thread_id][slot]);
|
||||
#endif
|
||||
// process DLSCH received symbols in the slot
|
||||
// symbol by symbol processing (if data/DMRS are multiplexed is checked inside the function)
|
||||
if (pdsch == PDSCH || pdsch == SI_PDSCH || pdsch == RA_PDSCH) {
|
||||
@@ -857,13 +842,11 @@ int nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int gNB_
|
||||
return -1;
|
||||
} else AssertFatal(1==0,"Not RA_PDSCH, SI_PDSCH or PDSCH\n");
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(&ue->dlsch_llr_stats_parallelization[proc->thread_id][slot]);
|
||||
#if DISABLE_LOG_X
|
||||
#if PHYSIM
|
||||
printf("[AbsSFN %d.%d] LLR Computation Symbol %d %5.2f \n",frame_rx,nr_slot_rx,m,ue->dlsch_llr_stats_parallelization[proc->thread_id][slot].p_time/(cpuf*1000.0));
|
||||
#else
|
||||
LOG_D(PHY, "[AbsSFN %d.%d] LLR Computation Symbol %d %5.2f \n",frame_rx,nr_slot_rx,m,ue->dlsch_llr_stats_parallelization[proc->thread_id][slot].p_time/(cpuf*1000.0));
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if(first_symbol_flag) {
|
||||
@@ -971,19 +954,17 @@ bool nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
|
||||
dmrs_len,
|
||||
dlsch0->harq_processes[harq_pid]->Qm,
|
||||
dlsch0->harq_processes[harq_pid]->Nl);
|
||||
#if UE_TIMING_TRACE
|
||||
start_meas(&ue->dlsch_unscrambling_stats);
|
||||
#endif
|
||||
nr_dlsch_unscrambling(pdsch_vars->llr[0],
|
||||
dlsch0->harq_processes[harq_pid]->G,
|
||||
0,
|
||||
ue->frame_parms.Nid_cell,
|
||||
dlsch0->rnti);
|
||||
|
||||
start_meas(&ue->dlsch_unscrambling_stats);
|
||||
nr_dlsch_unscrambling(pdsch_vars->llr[0],
|
||||
dlsch0->harq_processes[harq_pid]->G,
|
||||
0,
|
||||
ue->frame_parms.Nid_cell,
|
||||
dlsch0->rnti);
|
||||
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(&ue->dlsch_unscrambling_stats);
|
||||
#endif
|
||||
stop_meas(&ue->dlsch_unscrambling_stats);
|
||||
|
||||
|
||||
#if 0
|
||||
LOG_I(PHY," ------ start ldpc decoder for AbsSubframe %d.%d / %d ------ \n", frame_rx, nr_slot_rx, harq_pid);
|
||||
@@ -996,9 +977,8 @@ bool nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
|
||||
LOG_I(PHY,"start ldpc decode for CW 0 for AbsSubframe %d.%d / %d --> Pdcch Sym %d \n", frame_rx, nr_slot_rx, harq_pid, ue->pdcch_vars[proc->thread_id][gNB_id]->num_pdcch_symbols);
|
||||
#endif
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
start_meas(&ue->dlsch_decoding_stats[proc->thread_id]);
|
||||
#endif
|
||||
|
||||
start_meas(&ue->dlsch_decoding_stats[proc->thread_id]);
|
||||
|
||||
if( dlsch_parallel) {
|
||||
ret = nr_dlsch_decoding_mthread(ue,
|
||||
@@ -1059,9 +1039,9 @@ bool nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
|
||||
|
||||
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(&ue->dlsch_decoding_stats[proc->thread_id]);
|
||||
#if DISABLE_LOG_X
|
||||
|
||||
stop_meas(&ue->dlsch_decoding_stats[proc->thread_id]);
|
||||
#if PHYSIM
|
||||
printf(" --> Unscrambling for CW0 %5.3f\n",
|
||||
(ue->dlsch_unscrambling_stats.p_time)/(cpuf*1000.0));
|
||||
printf("AbsSubframe %d.%d --> LDPC Decoding for CW0 %5.3f\n",
|
||||
@@ -1073,7 +1053,6 @@ bool nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
|
||||
frame_rx%1024, nr_slot_rx,(ue->dlsch_decoding_stats[proc->thread_id].p_time)/(cpuf*1000.0));
|
||||
#endif
|
||||
|
||||
#endif
|
||||
if(is_cw1_active) {
|
||||
// start ldpc decode for CW 1
|
||||
dlsch1->harq_processes[harq_pid]->G = nr_get_G(dlsch1->harq_processes[harq_pid]->nb_rb,
|
||||
@@ -1082,17 +1061,13 @@ bool nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
|
||||
dmrs_len,
|
||||
dlsch1->harq_processes[harq_pid]->Qm,
|
||||
dlsch1->harq_processes[harq_pid]->Nl);
|
||||
#if UE_TIMING_TRACE
|
||||
start_meas(&ue->dlsch_unscrambling_stats);
|
||||
#endif
|
||||
nr_dlsch_unscrambling(pdsch_vars->llr[1],
|
||||
dlsch1->harq_processes[harq_pid]->G,
|
||||
0,
|
||||
ue->frame_parms.Nid_cell,
|
||||
dlsch1->rnti);
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(&ue->dlsch_unscrambling_stats);
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
LOG_I(PHY,"start ldpc decode for CW 1 for AbsSubframe %d.%d / %d --> nb_rb %d \n", frame_rx, nr_slot_rx, harq_pid, dlsch1->harq_processes[harq_pid]->nb_rb);
|
||||
@@ -1104,9 +1079,8 @@ bool nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
|
||||
LOG_I(PHY,"start ldpc decode for CW 1 for AbsSubframe %d.%d / %d --> Pdcch Sym %d \n", frame_rx, nr_slot_rx, harq_pid, ue->pdcch_vars[proc->thread_id][gNB_id]->num_pdcch_symbols);
|
||||
#endif
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
start_meas(&ue->dlsch_decoding_stats[proc->thread_id]);
|
||||
#endif
|
||||
|
||||
|
||||
if(dlsch_parallel) {
|
||||
ret1 = nr_dlsch_decoding_mthread(ue,
|
||||
@@ -1141,9 +1115,9 @@ bool nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
|
||||
LOG_T(PHY,"CWW sequential dlsch decoding, ret1 = %d\n", ret1);
|
||||
}
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(&ue->dlsch_decoding_stats[proc->thread_id]);
|
||||
#if DISABLE_LOG_X
|
||||
|
||||
stop_meas(&ue->dlsch_decoding_stats[proc->thread_id]);
|
||||
#if PHYSIM
|
||||
printf(" --> Unscrambling for CW1 %5.3f\n",
|
||||
(ue->dlsch_unscrambling_stats.p_time)/(cpuf*1000.0));
|
||||
printf("AbsSubframe %d.%d --> ldpc Decoding for CW1 %5.3f\n",
|
||||
@@ -1155,7 +1129,7 @@ bool nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
|
||||
frame_rx%1024, nr_slot_rx,(ue->dlsch_decoding_stats[proc->thread_id].p_time)/(cpuf*1000.0));
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
LOG_D(PHY,"AbsSubframe %d.%d --> ldpc Decoding for CW1 %5.3f\n",
|
||||
frame_rx%1024, nr_slot_rx,(ue->dlsch_decoding_stats[proc->thread_id].p_time)/(cpuf*1000.0));
|
||||
|
||||
@@ -1372,9 +1346,9 @@ void *UE_thread_slot1_dl_processing(void *arg) {
|
||||
}
|
||||
|
||||
/**** Slot1 FE Processing ****/
|
||||
#if UE_TIMING_TRACE
|
||||
|
||||
start_meas(&ue->ue_front_end_per_slot_stat[proc->thread_id][1]);
|
||||
#endif
|
||||
|
||||
// I- start dl slot1 processing
|
||||
// do first symbol of next downlink nr_slot_rx for channel estimation
|
||||
/*
|
||||
@@ -1399,9 +1373,8 @@ void *UE_thread_slot1_dl_processing(void *arg) {
|
||||
{
|
||||
//if( (l != pilot0) && (l != pilot1))
|
||||
{
|
||||
#if UE_TIMING_TRACE
|
||||
|
||||
start_meas(&ue->ofdm_demod_stats);
|
||||
#endif
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP, VCD_FUNCTION_IN);
|
||||
//printf("AbsSubframe %d.%d FFT slot %d, symbol %d\n", frame_rx,nr_slot_rx,slot1,l);
|
||||
front_end_fft(ue,
|
||||
@@ -1410,9 +1383,7 @@ void *UE_thread_slot1_dl_processing(void *arg) {
|
||||
0,
|
||||
0);
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP, VCD_FUNCTION_OUT);
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(&ue->ofdm_demod_stats);
|
||||
#endif
|
||||
}
|
||||
} // for l=1..l2
|
||||
|
||||
@@ -1465,14 +1436,13 @@ void *UE_thread_slot1_dl_processing(void *arg) {
|
||||
//printf(" [slot1 dl processing] ==> Start LLR Comuptation slot1 for AbsSubframe %d.%d \n", proc->frame_rx, proc->nr_slot_rx);
|
||||
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
|
||||
stop_meas(&ue->ue_front_end_per_slot_stat[proc->thread_id][1]);
|
||||
#if DISABLE_LOG_X
|
||||
#if PHYSIM
|
||||
printf("[AbsSFN %d.%d] Slot1: FFT + Channel Estimate + Pdsch Proc Slot0 %5.2f \n",frame_rx,nr_slot_rx,ue->ue_front_end_per_slot_stat[proc->thread_id][1].p_time/(cpuf*1000.0));
|
||||
#else
|
||||
LOG_D(PHY, "[AbsSFN %d.%d] Slot1: FFT + Channel Estimate + Pdsch Proc Slot0 %5.2f \n",frame_rx,nr_slot_rx,ue->ue_front_end_per_slot_stat[proc->thread_id][1].p_time/(cpuf*1000.0));
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
//wait until pdcch is decoded
|
||||
@@ -1490,9 +1460,8 @@ void *UE_thread_slot1_dl_processing(void *arg) {
|
||||
//printf("AbsSubframe %d.%d Pdsch Procedure (slot1)\n",frame_rx,nr_slot_rx);
|
||||
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
start_meas(&ue->pdsch_procedures_per_slot_stat[proc->thread_id][1]);
|
||||
#endif
|
||||
|
||||
// start slave thread for Pdsch Procedure (slot1)
|
||||
// do procedures for C-RNTI
|
||||
uint8_t gNB_id = 0;
|
||||
@@ -1562,13 +1531,11 @@ void *UE_thread_slot1_dl_processing(void *arg) {
|
||||
proc->llr_slot1_available=1;
|
||||
//printf("Set available LLR slot1 to 1 AbsSubframe %d.%d \n",frame_rx,nr_slot_rx);
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(&ue->pdsch_procedures_per_slot_stat[proc->thread_id][1]);
|
||||
#if DISABLE_LOG_X
|
||||
#if PHYSIM
|
||||
printf("[AbsSFN %d.%d] Slot1: LLR Computation %5.2f \n",frame_rx,nr_slot_rx,ue->pdsch_procedures_per_slot_stat[proc->thread_id][1].p_time/(cpuf*1000.0));
|
||||
#else
|
||||
LOG_D(PHY, "[AbsSFN %d.%d] Slot1: LLR Computation %5.2f \n",frame_rx,nr_slot_rx,ue->pdsch_procedures_per_slot_stat[proc->thread_id][1].p_time/(cpuf*1000.0));
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (pthread_mutex_lock(&proc->mutex_slot1_dl_processing) != 0) {
|
||||
@@ -1711,13 +1678,10 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
|
||||
(ue->symbol_offset+i)%(fp->symbols_per_slot),
|
||||
nr_slot_rx);
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
|
||||
start_meas(&ue->dlsch_channel_estimation_stats);
|
||||
#endif
|
||||
nr_pbch_channel_estimation(ue,proc,gNB_id,nr_slot_rx,(ue->symbol_offset+i)%(fp->symbols_per_slot),i-1,(fp->ssb_index)&7,fp->half_frame_bit);
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(&ue->dlsch_channel_estimation_stats);
|
||||
#endif
|
||||
}
|
||||
|
||||
nr_ue_rsrp_measurements(ue, gNB_id, proc, nr_slot_rx, 0);
|
||||
@@ -1757,9 +1721,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
|
||||
|
||||
for (uint16_t l=0; l<nb_symb_pdcch; l++) {
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
start_meas(&ue->ofdm_demod_stats);
|
||||
#endif
|
||||
nr_slot_fep(ue,
|
||||
proc,
|
||||
l,
|
||||
@@ -1783,9 +1745,8 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
|
||||
fp->first_carrier_offset+(pdcch_vars->pdcch_config[n_ss].BWPStart + coreset_start_rb)*12,
|
||||
coreset_nb_rb);
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(&ue->ofdm_demod_stats);
|
||||
#endif
|
||||
|
||||
}
|
||||
dci_cnt = dci_cnt + nr_ue_pdcch_procedures(gNB_id, ue, proc, n_ss);
|
||||
}
|
||||
@@ -1835,10 +1796,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
|
||||
curMsg->UE = ue;
|
||||
curMsg->ue_sched_mode = ONLY_PUSCH;
|
||||
pushTpool(&(get_nrUE_params()->Tpool), newElt);
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
start_meas(&ue->generic_stat);
|
||||
#endif
|
||||
// do procedures for C-RNTI
|
||||
int ret_pdsch = 0;
|
||||
if (ue->dlsch[proc->thread_id][gNB_id][0]->active == 1) {
|
||||
@@ -1935,9 +1893,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
|
||||
LOG_D(PHY, "DLSCH data reception at nr_slot_rx: %d \n \n", nr_slot_rx);
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_IN);
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
start_meas(&ue->dlsch_procedures_stat[proc->thread_id]);
|
||||
#endif
|
||||
|
||||
if (ret_pdsch >= 0)
|
||||
nr_ue_dlsch_procedures(ue,
|
||||
@@ -1949,10 +1905,8 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
|
||||
&ue->dlsch_errors[gNB_id],
|
||||
dlsch_parallel);
|
||||
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(&ue->dlsch_procedures_stat[proc->thread_id]);
|
||||
#if DISABLE_LOG_X
|
||||
#if PHYSIM
|
||||
printf("[SFN %d] Slot1: Pdsch Proc %5.2f\n",nr_slot_rx,ue->pdsch_procedures_stat[proc->thread_id].p_time/(cpuf*1000.0));
|
||||
printf("[SFN %d] Slot0 Slot1: Dlsch Proc %5.2f\n",nr_slot_rx,ue->dlsch_procedures_stat[proc->thread_id].p_time/(cpuf*1000.0));
|
||||
#else
|
||||
@@ -1960,7 +1914,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
|
||||
LOG_D(PHY, "[SFN %d] Slot0 Slot1: Dlsch Proc %5.2f\n",nr_slot_rx,ue->dlsch_procedures_stat[proc->thread_id].p_time/(cpuf*1000.0));
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
// deactivate dlsch once dlsch proc is done
|
||||
ue->dlsch[proc->thread_id][gNB_id][0]->active = 0;
|
||||
@@ -1969,9 +1923,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
|
||||
|
||||
}
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
start_meas(&ue->generic_stat);
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
|
||||
@@ -2036,8 +1988,8 @@ if (nr_slot_rx==9) {
|
||||
|
||||
}
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(&ue->generic_stat);
|
||||
#if PHYSIM
|
||||
printf("after tubo until end of Rx %5.2f \n",ue->generic_stat.p_time/(cpuf*1000.0));
|
||||
#endif
|
||||
|
||||
@@ -2048,14 +2000,12 @@ phy_procedures_emos_UE_RX(ue,slot,gNB_id);
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_RX, VCD_FUNCTION_OUT);
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(&ue->phy_proc_rx[proc->thread_id]);
|
||||
#if DISABLE_LOG_X
|
||||
#if PHYSIM
|
||||
printf("------FULL RX PROC [SFN %d]: %5.2f ------\n",nr_slot_rx,ue->phy_proc_rx[proc->thread_id].p_time/(cpuf*1000.0));
|
||||
#else
|
||||
LOG_D(PHY, "------FULL RX PROC [SFN %d]: %5.2f ------\n",nr_slot_rx,ue->phy_proc_rx[proc->thread_id].p_time/(cpuf*1000.0));
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//#endif //pdsch
|
||||
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
#include "PHY/defs_nr_UE.h"
|
||||
#include <openair1/SCHED/sched_common.h>
|
||||
#include <openair1/PHY/NR_UE_TRANSPORT/pucch_nr.h>
|
||||
#include "openair2/LAYER2/NR_MAC_UE/mac_proto.h"
|
||||
#include "openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h"
|
||||
#include <openair1/PHY/impl_defs_nr.h>
|
||||
#include <common/utils/nr/nr_common.h>
|
||||
@@ -58,115 +57,6 @@
|
||||
uint8_t nr_is_cqi_TXOp(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t gNB_id);
|
||||
uint8_t nr_is_ri_TXOp(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t gNB_id);
|
||||
|
||||
/* TS 36.213 Table 9.2.5.2-1: Code rate corresponding to higher layer parameter PUCCH-F2-maximum-coderate, */
|
||||
/* or PUCCH-F3-maximum-coderate, or PUCCH-F4-maximum-coderate */
|
||||
/* add one additional element set to 0 for parsing the array until this end */
|
||||
/* stored values are code rates * 100 */
|
||||
//static const int code_rate_r_time_100[8] = { (0.08 * 100), (0.15 * 100), (0.25*100), (0.35*100), (0.45*100), (0.60*100), (0.80*100), 0 } ;
|
||||
|
||||
static float RSRP_meas_mapping_nr[98]
|
||||
= {
|
||||
-140,
|
||||
-139,
|
||||
-138,
|
||||
-137,
|
||||
-136,
|
||||
-135,
|
||||
-134,
|
||||
-133,
|
||||
-132,
|
||||
-131,
|
||||
-130,
|
||||
-129,
|
||||
-128,
|
||||
-127,
|
||||
-126,
|
||||
-125,
|
||||
-124,
|
||||
-123,
|
||||
-122,
|
||||
-121,
|
||||
-120,
|
||||
-119,
|
||||
-118,
|
||||
-117,
|
||||
-116,
|
||||
-115,
|
||||
-114,
|
||||
-113,
|
||||
-112,
|
||||
-111,
|
||||
-110,
|
||||
-109,
|
||||
-108,
|
||||
-107,
|
||||
-106,
|
||||
-105,
|
||||
-104,
|
||||
-103,
|
||||
-102,
|
||||
-101,
|
||||
-100,
|
||||
-99,
|
||||
-98,
|
||||
-97,
|
||||
-96,
|
||||
-95,
|
||||
-94,
|
||||
-93,
|
||||
-92,
|
||||
-91,
|
||||
-90,
|
||||
-89,
|
||||
-88,
|
||||
-87,
|
||||
-86,
|
||||
-85,
|
||||
-84,
|
||||
-83,
|
||||
-82,
|
||||
-81,
|
||||
-80,
|
||||
-79,
|
||||
-78,
|
||||
-77,
|
||||
-76,
|
||||
-75,
|
||||
-74,
|
||||
-73,
|
||||
-72,
|
||||
-71,
|
||||
-70,
|
||||
-69,
|
||||
-68,
|
||||
-67,
|
||||
-66,
|
||||
-65,
|
||||
-64,
|
||||
-63,
|
||||
-62,
|
||||
-61,
|
||||
-60,
|
||||
-59,
|
||||
-58,
|
||||
-57,
|
||||
-56,
|
||||
-55,
|
||||
-54,
|
||||
-53,
|
||||
-52,
|
||||
-51,
|
||||
-50,
|
||||
-49,
|
||||
-48,
|
||||
-47,
|
||||
-46,
|
||||
-45,
|
||||
-44,
|
||||
-43
|
||||
}
|
||||
;
|
||||
|
||||
long
|
||||
binary_search_float_nr(
|
||||
float elements[],
|
||||
@@ -394,187 +284,10 @@ void pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue,
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* NAME : check_pucch_format
|
||||
*
|
||||
* PARAMETERS : ue context
|
||||
* processing slots of reception/transmission
|
||||
* gNB_id identifier
|
||||
*
|
||||
* RETURN : harq process identifier
|
||||
*
|
||||
* DESCRIPTION : return tx harq process identifier for given transmission slot
|
||||
* YS 38.213 9.2.2 PUCCH Formats for UCI transmission
|
||||
*
|
||||
*********************************************************************/
|
||||
|
||||
boolean_t check_pucch_format(NR_UE_MAC_INST_t *mac, uint8_t gNB_id, pucch_format_nr_t format_pucch, int nb_symbols_for_tx, int uci_size)
|
||||
{
|
||||
pucch_format_nr_t selected_pucch_format;
|
||||
pucch_format_nr_t selected_pucch_format_second;
|
||||
/*NR_SetupRelease_PUCCH_FormatConfig_t *identified_format = NULL;
|
||||
|
||||
switch (format_pucch) {
|
||||
case pucch_format1_nr:
|
||||
if (mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup->format1 != NULL)
|
||||
identified_format = mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup->format1;
|
||||
break;
|
||||
|
||||
case pucch_format2_nr:
|
||||
if (mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup->format2 != NULL)
|
||||
identified_format = mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup->format2;
|
||||
break;
|
||||
|
||||
case pucch_format3_nr:
|
||||
if (mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup->format3 != NULL)
|
||||
identified_format = mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup->format3;
|
||||
break;
|
||||
|
||||
case pucch_format4_nr:
|
||||
if (mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup->format4 != NULL)
|
||||
identified_format = mac->ULbwp[bwp_id-1]->bwp_Dedicated->pucch_Config->choice.setup->format4;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}*/
|
||||
|
||||
/* if ((identified_format != NULL) && (identified_format->choice.setup->nrofSlots[0] != 1)) {
|
||||
LOG_E(PHY,"PUCCH not implemented multislots transmission : at line %d in function %s of file %s \n", LINE_FILE , __func__, FILE_NAME);
|
||||
return (FALSE);
|
||||
}*/
|
||||
|
||||
if (nb_symbols_for_tx <= 2) {
|
||||
if (uci_size <= 2) {
|
||||
selected_pucch_format = pucch_format0_nr;
|
||||
selected_pucch_format_second = selected_pucch_format;
|
||||
}
|
||||
else {
|
||||
selected_pucch_format = pucch_format2_nr;
|
||||
selected_pucch_format_second = selected_pucch_format;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (nb_symbols_for_tx >= 4) {
|
||||
if (uci_size <= 2) {
|
||||
selected_pucch_format = pucch_format1_nr;
|
||||
selected_pucch_format_second = selected_pucch_format;
|
||||
}
|
||||
else {
|
||||
selected_pucch_format = pucch_format3_nr; /* in this case choice can be done between two formats */
|
||||
selected_pucch_format_second = pucch_format4_nr;
|
||||
}
|
||||
}
|
||||
else {
|
||||
LOG_D(PHY,"PUCCH Undefined PUCCH format : set PUCCH to format 4 : at line %d in function %s of file %s \n", LINE_FILE , __func__, FILE_NAME);
|
||||
return (FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
NR_TST_PHY_PRINTF("PUCCH format %d nb symbols total %d uci size %d selected format %d \n", format_pucch, nb_symbols_for_tx, uci_size, selected_pucch_format);
|
||||
|
||||
if (format_pucch != selected_pucch_format) {
|
||||
if (format_pucch != selected_pucch_format_second) {
|
||||
NR_TST_PHY_PRINTF("PUCCH mismatched of selected format: at line %d in function %s of file %s \n", LINE_FILE , __func__, FILE_NAME);
|
||||
LOG_D(PHY,"PUCCH format mismatched of selected format: at line %d in function %s of file %s \n", LINE_FILE , __func__, FILE_NAME);
|
||||
return (FALSE);
|
||||
}
|
||||
else {
|
||||
return (TRUE);
|
||||
}
|
||||
}
|
||||
else {
|
||||
return (TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* NAME : get_csi_nr
|
||||
* PARAMETERS : ue context
|
||||
* processing slots of reception/transmission
|
||||
* gNB_id identifier
|
||||
*
|
||||
* RETURN : size of csi payload
|
||||
*
|
||||
* DESCRIPTION : CSI management is not already implemented
|
||||
* so it has been simulated thank to two functions:
|
||||
* - set_csi_nr
|
||||
* - get_csi_nr
|
||||
*
|
||||
*********************************************************************/
|
||||
|
||||
int dummy_csi_status = 0;
|
||||
uint32_t dummy_csi_payload = 0;
|
||||
|
||||
/* FFS TODO_NR code that should be developed */
|
||||
|
||||
uint16_t get_nr_csi_bitlen(NR_UE_MAC_INST_t *mac) {
|
||||
|
||||
uint16_t csi_bitlen =0;
|
||||
uint16_t rsrp_bitlen = 0;
|
||||
uint16_t diff_rsrp_bitlen = 0;
|
||||
uint16_t nb_ssbri_cri = 0;
|
||||
uint16_t cri_ssbri_bitlen = 0;
|
||||
|
||||
NR_CSI_MeasConfig_t *csi_MeasConfig = mac->cg->spCellConfig->spCellConfigDedicated->csi_MeasConfig->choice.setup;
|
||||
struct NR_CSI_ResourceConfig__csi_RS_ResourceSetList__nzp_CSI_RS_SSB * nzp_CSI_RS_SSB = csi_MeasConfig->csi_ResourceConfigToAddModList->list.array[0]->csi_RS_ResourceSetList.choice.nzp_CSI_RS_SSB;
|
||||
|
||||
uint16_t nb_csi_ssb_report = nzp_CSI_RS_SSB->csi_SSB_ResourceSetList!=NULL ? nzp_CSI_RS_SSB->csi_SSB_ResourceSetList->list.count:0;
|
||||
|
||||
if (0 != nb_csi_ssb_report){
|
||||
uint8_t nb_ssb_resources =0;
|
||||
|
||||
if (NULL != csi_MeasConfig->csi_ReportConfigToAddModList->list.array[0]->groupBasedBeamReporting.choice.disabled->nrofReportedRS)
|
||||
nb_ssbri_cri = *(csi_MeasConfig->csi_ReportConfigToAddModList->list.array[0]->groupBasedBeamReporting.choice.disabled->nrofReportedRS)+1;
|
||||
else
|
||||
nb_ssbri_cri = 1;
|
||||
|
||||
nb_ssb_resources = csi_MeasConfig->csi_SSB_ResourceSetToAddModList->list.array[0]->csi_SSB_ResourceList.list.count;
|
||||
|
||||
if (nb_ssb_resources){
|
||||
cri_ssbri_bitlen =ceil(log2 (nb_ssb_resources));
|
||||
rsrp_bitlen = 7;
|
||||
diff_rsrp_bitlen = 4;
|
||||
}
|
||||
else{
|
||||
cri_ssbri_bitlen =0;
|
||||
rsrp_bitlen = 0;
|
||||
diff_rsrp_bitlen = 0;
|
||||
}
|
||||
|
||||
csi_bitlen = ((cri_ssbri_bitlen * nb_ssbri_cri) + rsrp_bitlen +(diff_rsrp_bitlen *(nb_ssbri_cri -1 ))) *nb_csi_ssb_report;
|
||||
|
||||
//printf("get csi bitlen %d nb_ssbri_cri %d nb_csi_report %d nb_resources %d\n", csi_bitlen,nb_ssbri_cri ,nb_csi_ssb_report, nb_ssb_resources);
|
||||
}
|
||||
return csi_bitlen;
|
||||
}
|
||||
|
||||
int get_csi_nr(NR_UE_MAC_INST_t *mac, PHY_VARS_NR_UE *ue, uint8_t gNB_id, uint32_t *csi_payload)
|
||||
{
|
||||
VOID_PARAMETER ue;
|
||||
VOID_PARAMETER gNB_id;
|
||||
float rsrp_db[7];
|
||||
int nElem = 98;
|
||||
int rsrp_offset = 17;
|
||||
int csi_status = 0;
|
||||
|
||||
csi_status = get_nr_csi_bitlen(mac);
|
||||
rsrp_db[0] = get_nr_RSRP(0,0,0);
|
||||
|
||||
|
||||
if (csi_status == 0) {
|
||||
*csi_payload = 0;
|
||||
}
|
||||
else {
|
||||
*csi_payload = binary_search_float_nr(RSRP_meas_mapping_nr,nElem, rsrp_db[0]) + rsrp_offset;
|
||||
}
|
||||
|
||||
return (csi_status);
|
||||
}
|
||||
|
||||
/* FFS TODO_NR code that should be removed */
|
||||
|
||||
|
||||
@@ -41,8 +41,6 @@
|
||||
/************** INCLUDE *******************************************/
|
||||
|
||||
#include "PHY/defs_nr_UE.h"
|
||||
#include "openair2/LAYER2/NR_MAC_UE/mac_proto.h"
|
||||
#include "openair2/LAYER2/NR_MAC_UE/mac_defs.h"
|
||||
#include "RRC/NR_UE/rrc_proto.h"
|
||||
|
||||
#ifdef DEFINE_VARIABLES_PUCCH_UE_NR_H
|
||||
@@ -65,31 +63,6 @@ void pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue,
|
||||
uint8_t gNB_id,
|
||||
UE_nr_rxtx_proc_t *proc);
|
||||
|
||||
/** \brief This function check pucch format
|
||||
@param ue context
|
||||
@param gNB_id identity
|
||||
@param format_pucch pucch format
|
||||
@param nb_symbols_for_tx number of symbols for pucch transmission
|
||||
@param uci size number of uci bits
|
||||
@returns TRUE pucch format matched uci size and constraints, FALSE invalid pucch format */
|
||||
|
||||
boolean_t check_pucch_format(NR_UE_MAC_INST_t *mac, uint8_t gNB_id, pucch_format_nr_t format_pucch, int nb_symbols_for_tx,
|
||||
int uci_size);
|
||||
|
||||
/** \brief This function reads current CSI
|
||||
@param ue context
|
||||
@param gNB_id identity
|
||||
@param csi_payload is updated with CSI
|
||||
@returns number of bits of CSI */
|
||||
|
||||
int get_csi_nr(NR_UE_MAC_INST_t *mac, PHY_VARS_NR_UE *ue, uint8_t gNB_id, uint32_t *csi_payload);
|
||||
|
||||
/** \brief This dummy function sets current CSI for simulation
|
||||
@param csi_status
|
||||
@param csi_payload is updated with CSI
|
||||
@returns none */
|
||||
|
||||
uint16_t get_nr_csi_bitlen(NR_UE_MAC_INST_t *mac);
|
||||
|
||||
void set_csi_nr(int csi_status, uint32_t csi_payload);
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <unistd.h>
|
||||
#include "common/ran_context.h"
|
||||
#include "common/config/config_userapi.h"
|
||||
#include "common/utils/nr/nr_common.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "LAYER2/NR_MAC_gNB/nr_mac_gNB.h"
|
||||
#include "LAYER2/NR_MAC_UE/mac_defs.h"
|
||||
@@ -429,7 +430,9 @@ int main(int argc, char **argv)
|
||||
|
||||
FILE *scg_fd=NULL;
|
||||
|
||||
while ((c = getopt (argc, argv, "f:hA:pf:g:in:s:S:t:x:y:z:M:N:F:GR:dPIL:Ea:b:d:e:m:w:T:U:q")) != -1) {
|
||||
|
||||
while ((c = getopt (argc, argv, "f:hA:pf:g:in:s:S:t:x:y:z:M:N:F:GR:dPIL:Ea:b:D:e:m:w:T:U:q")) != -1) {
|
||||
|
||||
switch (c) {
|
||||
case 'f':
|
||||
scg_fd = fopen(optarg,"r");
|
||||
@@ -595,7 +598,7 @@ int main(int argc, char **argv)
|
||||
case 'b':
|
||||
g_rbSize = atoi(optarg);
|
||||
break;
|
||||
case 'd':
|
||||
case 'D':
|
||||
dlsch_threads = atoi(optarg);
|
||||
break;
|
||||
case 'e':
|
||||
@@ -668,7 +671,7 @@ int main(int argc, char **argv)
|
||||
printf("-U Change DMRS Config, arguments list DMRS TYPE{0=A,1=B} DMRS AddPos{0:2} DMRS ConfType{1:2}, e.g. -U 3 0 2 1 \n");
|
||||
printf("-P Print DLSCH performances\n");
|
||||
printf("-w Write txdata to binary file (one frame)\n");
|
||||
printf("-d number of dlsch threads, 0: no dlsch parallelization\n");
|
||||
printf("-D number of dlsch threads, 0: no dlsch parallelization\n");
|
||||
exit (-1);
|
||||
break;
|
||||
}
|
||||
@@ -685,7 +688,7 @@ int main(int argc, char **argv)
|
||||
|
||||
if (snr1set==0)
|
||||
snr1 = snr0+10;
|
||||
init_dlsch_tpool(dlsch_threads);
|
||||
|
||||
|
||||
|
||||
RC.gNB = (PHY_VARS_gNB**) malloc(sizeof(PHY_VARS_gNB *));
|
||||
@@ -977,7 +980,11 @@ int main(int argc, char **argv)
|
||||
reset_meas(&msgDataTx->phy_proc_tx);
|
||||
gNB->phy_proc_tx_0 = &msgDataTx->phy_proc_tx;
|
||||
pushTpool(gNB->threadPool,msgL1Tx);
|
||||
|
||||
if (dlsch_threads ) {
|
||||
init_dlsch_tpool(dlsch_threads);
|
||||
pthread_t dlsch0_threads;
|
||||
threadCreate(&dlsch0_threads, dlsch_thread, (void *)UE, "DLthread", -1, OAI_PRIORITY_RT_MAX-1);
|
||||
}
|
||||
for (SNR = snr0; SNR < snr1; SNR += .2) {
|
||||
|
||||
varArray_t *table_tx=initVarArray(1000,sizeof(double));
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "common/config/config_userapi.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "common/ran_context.h"
|
||||
#include "common/utils/nr/nr_common.h"
|
||||
#include "PHY/types.h"
|
||||
#include "PHY/defs_nr_common.h"
|
||||
#include "PHY/defs_nr_UE.h"
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
#include "nr_unitary_defs.h"
|
||||
#include "OCG_vars.h"
|
||||
#include <openair2/LAYER2/MAC/mac_vars.h>
|
||||
#include <openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h>
|
||||
#include <openair2/RRC/LTE/rrc_vars.h>
|
||||
#include <executables/softmodem-common.h>
|
||||
#include <openair2/RRC/NR_UE/rrc_defs.h>
|
||||
|
||||
Reference in New Issue
Block a user