Commit fb5739dc authored by Raphael Defosseux's avatar Raphael Defosseux

Merge branch 'develop_integration_w48' into 'develop'

Develop integration 2018 week 48

See merge request !462

Integration of the following MRs:

 - MR 448: Missing RRC inactivity timer
 - MR 458: Adding MAC main config to RRC connection setup
 - MR 457: Resolving "parallelization not working correctly in phy simulators"
 - MR 460: Fixing RU DFT initialization
parents 814b967c 84d66914
Pipeline #11144 passed with stage
in 0 seconds
...@@ -436,7 +436,7 @@ class SSHConnection(): ...@@ -436,7 +436,7 @@ class SSHConnection():
self.copyout(self.eNBIPAddress, self.eNBUserName, self.eNBPassword, pcap_log_file, self.eNBSourceCodePath + '/cmake_targets/.') self.copyout(self.eNBIPAddress, self.eNBUserName, self.eNBPassword, pcap_log_file, self.eNBSourceCodePath + '/cmake_targets/.')
sys.exit(1) sys.exit(1)
else: else:
self.command('stdbuf -o0 cat enb_' + SSH.testCase_id + '.log | egrep --color=never -i "wait|sync"', '\$', 4) self.command('stdbuf -o0 cat enb_' + SSH.testCase_id + '.log | egrep --text --color=never -i "wait|sync"', '\$', 4)
if rruCheck: if rruCheck:
result = re.search('wait RUs', str(self.ssh.before)) result = re.search('wait RUs', str(self.ssh.before))
else: else:
...@@ -1573,6 +1573,8 @@ class SSHConnection(): ...@@ -1573,6 +1573,8 @@ class SSHConnection():
rrcReestablishRequest = 0 rrcReestablishRequest = 0
rrcReestablishComplete = 0 rrcReestablishComplete = 0
rrcReestablishReject = 0 rrcReestablishReject = 0
rlcDiscardBuffer = 0
rachCanceledProcedure = 0
uciStatMsgCount = 0 uciStatMsgCount = 0
pdcpFailure = 0 pdcpFailure = 0
ulschFailure = 0 ulschFailure = 0
...@@ -1625,6 +1627,12 @@ class SSHConnection(): ...@@ -1625,6 +1627,12 @@ class SSHConnection():
result = re.search('ULSCH in error in round', str(line)) result = re.search('ULSCH in error in round', str(line))
if result is not None: if result is not None:
ulschFailure += 1 ulschFailure += 1
result = re.search('BAD all_segments_received', str(line))
if result is not None:
rlcDiscardBuffer += 1
result = re.search('Canceled RA procedure for UE rnti', str(line))
if result is not None:
rachCanceledProcedure += 1
enb_log_file.close() enb_log_file.close()
self.htmleNBFailureMsg = '' self.htmleNBFailureMsg = ''
if uciStatMsgCount > 0: if uciStatMsgCount > 0:
...@@ -1667,6 +1675,10 @@ class SSHConnection(): ...@@ -1667,6 +1675,10 @@ class SSHConnection():
rrcMsg = ' -- ' + str(rrcReestablishReject) + ' were rejected' rrcMsg = ' -- ' + str(rrcReestablishReject) + ' were rejected'
logging.debug('\u001B[1;30;43m ' + rrcMsg + ' \u001B[0m') logging.debug('\u001B[1;30;43m ' + rrcMsg + ' \u001B[0m')
self.htmleNBFailureMsg += rrcMsg + '\n' self.htmleNBFailureMsg += rrcMsg + '\n'
if rachCanceledProcedure > 0:
rachMsg = 'eNB cancelled ' + str(rachCanceledProcedure) + ' RA procedure(s)'
logging.debug('\u001B[1;30;43m ' + rachMsg + ' \u001B[0m')
self.htmleNBFailureMsg += rachMsg + '\n'
if foundSegFault: if foundSegFault:
logging.debug('\u001B[1;37;41m eNB ended with a Segmentation Fault! \u001B[0m') logging.debug('\u001B[1;37;41m eNB ended with a Segmentation Fault! \u001B[0m')
return ENB_PROCESS_SEG_FAULT return ENB_PROCESS_SEG_FAULT
...@@ -1677,6 +1689,11 @@ class SSHConnection(): ...@@ -1677,6 +1689,11 @@ class SSHConnection():
if foundRealTimeIssue: if foundRealTimeIssue:
logging.debug('\u001B[1;37;41m eNB faced real time issues! \u001B[0m') logging.debug('\u001B[1;37;41m eNB faced real time issues! \u001B[0m')
return ENB_PROCESS_REALTIME_ISSUE return ENB_PROCESS_REALTIME_ISSUE
if rlcDiscardBuffer > 0:
rlcMsg = 'eNB RLC discarded ' + str(rlcDiscardBuffer) + ' buffer(s)'
logging.debug('\u001B[1;37;41m ' + rlcMsg + ' \u001B[0m')
self.htmleNBFailureMsg += rlcMsg + '\n'
return ENB_PROCESS_REALTIME_ISSUE
return 0 return 0
def TerminateeNB(self): def TerminateeNB(self):
......
...@@ -21,17 +21,15 @@ ...@@ -21,17 +21,15 @@
--> -->
<testCaseList> <testCaseList>
<!-- Only 5MHz is tested since neither 10MHz nor 20MHz work in this configuration --> <!-- Only 5MHz/10MHz is tested since 20MHz does not work as in monolithic -->
<!-- Also no UL iperf in 5MHz (040642) -->
<TestCaseRequestedList> <TestCaseRequestedList>
010101 010101
050101 060101 070101 040101 050101 060101 070101 040101
030104 030105 040301 040501 040602 040401 040201 030201 030202 030104 030105 040301 040501 040602 040642 040401 040201 030201 030202
030114 030115 040301 040511 040612 040652 040401 040201 030201 030202
050201 060201 070201 050201 060201 070201
</TestCaseRequestedList> </TestCaseRequestedList>
<!-- <!--
030104 030105 040301 040501 040602 040642 040401 040201 030201 030202
030114 030115 040301 040511 040612 040652 040401 040201 030201 030202
030124 030125 040301 040521 040622 040662 040401 040201 030201 030202 030124 030125 040301 040521 040622 040662 040401 040201 030201 030202
--> -->
<TestCaseExclusionList> <TestCaseExclusionList>
......
...@@ -21,17 +21,14 @@ ...@@ -21,17 +21,14 @@
--> -->
<testCaseList> <testCaseList>
<!-- Only 5MHz is tested since neither 10MHz nor 20MHz work in this configuration -->
<TestCaseRequestedList> <TestCaseRequestedList>
010101 010101
050101 060101 070101 040101 050101 060101 070101 040101
030101 030102 040301 040501 040604 040642 040401 040201 030201 030202 030101 030102 040301 040501 040604 040642 040401 040201 030201 030202
050201 060201 070201
</TestCaseRequestedList>
<!--
030111 030112 040301 040511 040614 040652 040401 040201 030201 030202 030111 030112 040301 040511 040614 040652 040401 040201 030201 030202
030121 030122 040301 040521 040624 040662 040401 040201 030201 030202 030121 030122 040301 040521 040624 040662 040401 040201 030201 030202
--> 050201 060201 070201
</TestCaseRequestedList>
<TestCaseExclusionList> <TestCaseExclusionList>
</TestCaseExclusionList> </TestCaseExclusionList>
......
...@@ -232,7 +232,7 @@ add_definitions("-DPACKAGE_BUGREPORT=\"openair4g-devel@lists.eurecom.fr\"") ...@@ -232,7 +232,7 @@ add_definitions("-DPACKAGE_BUGREPORT=\"openair4g-devel@lists.eurecom.fr\"")
# Debug related options # Debug related options
######################################### #########################################
add_boolean_option(ASN_DEBUG False "ASN1 coder/decoder Debug") add_boolean_option(ASN_DEBUG False "ASN1 coder/decoder Debug")
add_boolean_option(EMIT_ASN_DEBUG False "ASN1 coder/decoder Debug") add_boolean_option(ASN_EMIT_DEBUG False "ASN1 coder/decoder Debug")
add_boolean_option(MSG_PRINT False "print debug messages") add_boolean_option(MSG_PRINT False "print debug messages")
add_boolean_option(DISABLE_XER_PRINT False "print XER Format") add_boolean_option(DISABLE_XER_PRINT False "print XER Format")
add_boolean_option(XER_PRINT False "print XER Format") add_boolean_option(XER_PRINT False "print XER Format")
......
...@@ -39,10 +39,9 @@ ...@@ -39,10 +39,9 @@
#include "vcd_signal_dumper.h" #include "vcd_signal_dumper.h"
#include "assertions.h" #include "assertions.h"
#include <pthread.h>
# include <pthread.h> #include <string.h>
# include <string.h> #include <linux/prctl.h>
#include <linux/prctl.h>
#include "common/config/config_userapi.h" #include "common/config/config_userapi.h"
// main log variables // main log variables
......
This diff is collapsed.
...@@ -196,14 +196,12 @@ void oai_create_enb(void) { ...@@ -196,14 +196,12 @@ void oai_create_enb(void) {
int bodge_counter=0; int bodge_counter=0;
PHY_VARS_eNB *eNB = RC.eNB[0][0]; PHY_VARS_eNB *eNB = RC.eNB[0][0];
printf("[VNF] RC.eNB[0][0]. Mod_id:%d CC_id:%d nb_CC[0]:%d abstraction_flag:%d single_thread_flag:%d td:%p te:%p if_inst:%p\n", eNB->Mod_id, eNB->CC_id, RC.nb_CC[0], eNB->abstraction_flag, eNB->single_thread_flag, eNB->td, eNB->te, eNB->if_inst); printf("[VNF] RC.eNB[0][0]. Mod_id:%d CC_id:%d nb_CC[0]:%d abstraction_flag:%d single_thread_flag:%d if_inst:%p\n", eNB->Mod_id, eNB->CC_id, RC.nb_CC[0], eNB->abstraction_flag, eNB->single_thread_flag, eNB->if_inst);
eNB->Mod_id = bodge_counter; eNB->Mod_id = bodge_counter;
eNB->CC_id = bodge_counter; eNB->CC_id = bodge_counter;
eNB->abstraction_flag = 0; eNB->abstraction_flag = 0;
eNB->single_thread_flag = 0;//single_thread_flag; eNB->single_thread_flag = 0;//single_thread_flag;
eNB->td = ulsch_decoding_data_all;//(single_thread_flag==1) ? ulsch_decoding_data_2thread : ulsch_decoding_data;
eNB->te = dlsch_encoding_all;//(single_thread_flag==1) ? dlsch_encoding_2threads : dlsch_encoding;
RC.nb_CC[bodge_counter] = 1; RC.nb_CC[bodge_counter] = 1;
......
...@@ -59,14 +59,11 @@ void generate_qpsk_table(void) { ...@@ -59,14 +59,11 @@ void generate_qpsk_table(void) {
} }
} }
void init_7_5KHz(void);
void init_lte_top(LTE_DL_FRAME_PARMS *frame_parms) { void init_lte_top(LTE_DL_FRAME_PARMS *frame_parms) {
ccodelte_init(); ccodelte_init();
ccodelte_init_inv(); ccodelte_init_inv();
init_dfts();
phy_generate_viterbi_tables_lte(); phy_generate_viterbi_tables_lte();
load_codinglib(); load_codinglib();
lte_sync_time_init(frame_parms);
generate_ul_ref_sigs(); generate_ul_ref_sigs();
generate_ul_ref_sigs_rx(); generate_ul_ref_sigs_rx();
generate_64qam_table(); generate_64qam_table();
...@@ -76,13 +73,11 @@ void init_lte_top(LTE_DL_FRAME_PARMS *frame_parms) { ...@@ -76,13 +73,11 @@ void init_lte_top(LTE_DL_FRAME_PARMS *frame_parms) {
init_unscrambling_lut(); init_unscrambling_lut();
init_scrambling_lut(); init_scrambling_lut();
//set_taus_seed(1328); //set_taus_seed(1328);
// init_7_5KHz();
init_sss(); init_sss();
} }
void free_lte_top(void) { void free_lte_top(void) {
free_codinglib(); free_codinglib();
lte_sync_time_free();
/* free_ul_ref_sigs() is called in phy_free_lte_eNB() */ /* free_ul_ref_sigs() is called in phy_free_lte_eNB() */
} }
......
...@@ -67,6 +67,7 @@ int phy_init_RU(RU_t *ru) { ...@@ -67,6 +67,7 @@ int phy_init_RU(RU_t *ru) {
} }
if (ru->function != NGFI_RRU_IF5) { // we need to do RX/TX RU processing if (ru->function != NGFI_RRU_IF5) { // we need to do RX/TX RU processing
init_dfts();
init_7_5KHz(); init_7_5KHz();
LOG_I(PHY,"nb_tx %d\n",ru->nb_tx); LOG_I(PHY,"nb_tx %d\n",ru->nb_tx);
ru->common.rxdata_7_5kHz = (int32_t**)malloc16(ru->nb_rx*sizeof(int32_t*) ); ru->common.rxdata_7_5kHz = (int32_t**)malloc16(ru->nb_rx*sizeof(int32_t*) );
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include "common/utils/LOG/vcd_signal_dumper.h" #include "common/utils/LOG/vcd_signal_dumper.h"
#include "assertions.h" #include "assertions.h"
#include <math.h> #include <math.h>
#include "PHY/LTE_ESTIMATION/lte_estimation.h"
#include "PHY/LTE_TRANSPORT/transport_common_proto.h" #include "PHY/LTE_TRANSPORT/transport_common_proto.h"
#include "PHY/LTE_UE_TRANSPORT/transport_proto_ue.h" #include "PHY/LTE_UE_TRANSPORT/transport_proto_ue.h"
#include "PHY/LTE_REFSIG/lte_refsig.h" #include "PHY/LTE_REFSIG/lte_refsig.h"
...@@ -661,8 +662,9 @@ int init_lte_ue_signal(PHY_VARS_UE *ue, ...@@ -661,8 +662,9 @@ int init_lte_ue_signal(PHY_VARS_UE *ue,
init_dfts();
init_frame_parms(&ue->frame_parms,1); init_frame_parms(&ue->frame_parms,1);
lte_sync_time_init(&ue->frame_parms);
init_lte_top(&ue->frame_parms); init_lte_top(&ue->frame_parms);
init_7_5KHz(); init_7_5KHz();
init_ul_hopping(&ue->frame_parms); init_ul_hopping(&ue->frame_parms);
......
...@@ -1505,7 +1505,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, ...@@ -1505,7 +1505,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
// Do ULSCH Decoding for data portion // Do ULSCH Decoding for data portion
ret = eNB->td(eNB,UE_id,harq_pid,llr8_flag); ret = ulsch_decoding_data_all(eNB,UE_id,harq_pid,llr8_flag);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_ULSCH_DECODING0+harq_pid,0); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_ULSCH_DECODING0+harq_pid,0);
......
...@@ -1298,7 +1298,7 @@ void dlsch_channel_compensation(int **rxdataF_ext, ...@@ -1298,7 +1298,7 @@ void dlsch_channel_compensation(int **rxdataF_ext,
unsigned short rb; unsigned short rb;
unsigned char aatx,aarx,symbol_mod,pilots=0; unsigned char aatx,aarx,symbol_mod,pilots=0;
__m128i *dl_ch128,*dl_ch128_2,*dl_ch_mag128,*dl_ch_mag128b,*rxdataF128,*rxdataF_comp128,*rho128; __m128i *dl_ch128,*dl_ch128_2,*dl_ch_mag128,*dl_ch_mag128b,*rxdataF128,*rxdataF_comp128,*rho128;
__m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp128,QAM_amp128b; __m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp128;
symbol_mod = (symbol>=(7-frame_parms->Ncp)) ? symbol-(7-frame_parms->Ncp) : symbol; symbol_mod = (symbol>=(7-frame_parms->Ncp)) ? symbol-(7-frame_parms->Ncp) : symbol;
...@@ -1311,9 +1311,9 @@ void dlsch_channel_compensation(int **rxdataF_ext, ...@@ -1311,9 +1311,9 @@ void dlsch_channel_compensation(int **rxdataF_ext,
} }
for (aatx=0; aatx<frame_parms->nb_antenna_ports_eNB; aatx++) { for (aatx=0; aatx<frame_parms->nb_antenna_ports_eNB; aatx++) {
__m128i QAM_amp128b = _mm_setzero_si128();
if (mod_order == 4) { if (mod_order == 4) {
QAM_amp128 = _mm_set1_epi16(QAM16_n1); // 2/sqrt(10) QAM_amp128 = _mm_set1_epi16(QAM16_n1); // 2/sqrt(10)
QAM_amp128b = _mm_setzero_si128();
} else if (mod_order == 6) { } else if (mod_order == 6) {
QAM_amp128 = _mm_set1_epi16(QAM64_n1); // QAM_amp128 = _mm_set1_epi16(QAM64_n1); //
QAM_amp128b = _mm_set1_epi16(QAM64_n2); QAM_amp128b = _mm_set1_epi16(QAM64_n2);
...@@ -1766,11 +1766,11 @@ void dlsch_channel_compensation_core(int **rxdataF_ext, ...@@ -1766,11 +1766,11 @@ void dlsch_channel_compensation_core(int **rxdataF_ext,
int length_mod8 = 0; int length_mod8 = 0;
int length2; int length2;
__m128i *dl_ch128,*dl_ch_mag128,*dl_ch_mag128b, *dl_ch128_2, *rxdataF128,*rxdataF_comp128,*rho128; __m128i *dl_ch128,*dl_ch_mag128,*dl_ch_mag128b, *dl_ch128_2, *rxdataF128,*rxdataF_comp128,*rho128;
__m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp128,QAM_amp128b; __m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp128;
int aatx = 0, aarx = 0; int aatx = 0, aarx = 0;
for (aatx=0; aatx<n_tx; aatx++) { for (aatx=0; aatx<n_tx; aatx++) {
__m128i QAM_amp128b;
if (mod_order == 4) { if (mod_order == 4) {
QAM_amp128 = _mm_set1_epi16(QAM16_n1); // 2/sqrt(10) QAM_amp128 = _mm_set1_epi16(QAM16_n1); // 2/sqrt(10)
QAM_amp128b = _mm_setzero_si128(); QAM_amp128b = _mm_setzero_si128();
...@@ -2158,7 +2158,7 @@ void dlsch_channel_compensation_TM56(int **rxdataF_ext, ...@@ -2158,7 +2158,7 @@ void dlsch_channel_compensation_TM56(int **rxdataF_ext,
__m128i *dl_ch0_128,*dl_ch1_128,*dl_ch_mag128,*dl_ch_mag128b,*rxdataF128,*rxdataF_comp128; __m128i *dl_ch0_128,*dl_ch1_128,*dl_ch_mag128,*dl_ch_mag128b,*rxdataF128,*rxdataF_comp128;
unsigned char aarx=0,symbol_mod,pilots=0; unsigned char aarx=0,symbol_mod,pilots=0;
int precoded_signal_strength=0; int precoded_signal_strength=0;
__m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp128,QAM_amp128b; __m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp128;
symbol_mod = (symbol>=(7-frame_parms->Ncp)) ? symbol-(7-frame_parms->Ncp) : symbol; symbol_mod = (symbol>=(7-frame_parms->Ncp)) ? symbol-(7-frame_parms->Ncp) : symbol;
...@@ -2167,10 +2167,9 @@ void dlsch_channel_compensation_TM56(int **rxdataF_ext, ...@@ -2167,10 +2167,9 @@ void dlsch_channel_compensation_TM56(int **rxdataF_ext,
//printf("comp prec: symbol %d, pilots %d\n",symbol, pilots); //printf("comp prec: symbol %d, pilots %d\n",symbol, pilots);
__m128i QAM_amp128b = _mm_setzero_si128();
if (mod_order == 4) { if (mod_order == 4) {
QAM_amp128 = _mm_set1_epi16(QAM16_n1); QAM_amp128 = _mm_set1_epi16(QAM16_n1);
QAM_amp128b = _mm_setzero_si128();
} else if (mod_order == 6) { } else if (mod_order == 6) {
QAM_amp128 = _mm_set1_epi16(QAM64_n1); QAM_amp128 = _mm_set1_epi16(QAM64_n1);
QAM_amp128b = _mm_set1_epi16(QAM64_n2); QAM_amp128b = _mm_set1_epi16(QAM64_n2);
...@@ -2621,7 +2620,7 @@ void dlsch_channel_compensation_TM34(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -2621,7 +2620,7 @@ void dlsch_channel_compensation_TM34(LTE_DL_FRAME_PARMS *frame_parms,
int **rxdataF_comp0 = pdsch_vars->rxdataF_comp0; int **rxdataF_comp0 = pdsch_vars->rxdataF_comp0;
int **rxdataF_comp1 = pdsch_vars->rxdataF_comp1[harq_pid][round]; int **rxdataF_comp1 = pdsch_vars->rxdataF_comp1[harq_pid][round];
unsigned char *pmi_ext = pdsch_vars->pmi_ext; unsigned char *pmi_ext = pdsch_vars->pmi_ext;
__m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp0_128,QAM_amp0_128b,QAM_amp1_128,QAM_amp1_128b; __m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp0_128,QAM_amp1_128;
symbol_mod = (symbol>=(7-frame_parms->Ncp)) ? symbol-(7-frame_parms->Ncp) : symbol; symbol_mod = (symbol>=(7-frame_parms->Ncp)) ? symbol-(7-frame_parms->Ncp) : symbol;
...@@ -2632,17 +2631,17 @@ void dlsch_channel_compensation_TM34(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -2632,17 +2631,17 @@ void dlsch_channel_compensation_TM34(LTE_DL_FRAME_PARMS *frame_parms,
// printf("comp prec: symbol %d, pilots %d\n",symbol, pilots); // printf("comp prec: symbol %d, pilots %d\n",symbol, pilots);
__m128i QAM_amp0_128b = _mm_setzero_si128();
if (mod_order0 == 4) { if (mod_order0 == 4) {
QAM_amp0_128 = _mm_set1_epi16(QAM16_n1); QAM_amp0_128 = _mm_set1_epi16(QAM16_n1);
QAM_amp0_128b = _mm_setzero_si128();
} else if (mod_order0 == 6) { } else if (mod_order0 == 6) {
QAM_amp0_128 = _mm_set1_epi16(QAM64_n1); QAM_amp0_128 = _mm_set1_epi16(QAM64_n1);
QAM_amp0_128b = _mm_set1_epi16(QAM64_n2); QAM_amp0_128b = _mm_set1_epi16(QAM64_n2);
} }
__m128i QAM_amp1_128b = _mm_setzero_si128();
if (mod_order1 == 4) { if (mod_order1 == 4) {
QAM_amp1_128 = _mm_set1_epi16(QAM16_n1); QAM_amp1_128 = _mm_set1_epi16(QAM16_n1);
QAM_amp1_128b = _mm_setzero_si128();
} else if (mod_order1 == 6) { } else if (mod_order1 == 6) {
QAM_amp1_128 = _mm_set1_epi16(QAM64_n1); QAM_amp1_128 = _mm_set1_epi16(QAM64_n1);
QAM_amp1_128b = _mm_set1_epi16(QAM64_n2); QAM_amp1_128b = _mm_set1_epi16(QAM64_n2);
......
...@@ -58,6 +58,7 @@ ...@@ -58,6 +58,7 @@
#include <math.h> #include <math.h>
#include "common_lib.h" #include "common_lib.h"
#include "msc.h" #include "msc.h"
#include <common/utils/LOG/log.h>
//#include <complex.h> //#include <complex.h>
...@@ -862,22 +863,60 @@ typedef enum { ...@@ -862,22 +863,60 @@ typedef enum {
RESYNCH=4 RESYNCH=4
} UE_MODE_t; } UE_MODE_t;
/// Threading Parameter #define FOREACH_PARALLEL(GEN) \
GEN(PARALLEL_SINGLE_THREAD) \
GEN(PARALLEL_RU_L1_SPLIT) \
GEN(PARALLEL_RU_L1_TRX_SPLIT)
#define GENERATE_ENUM(N) N,
#define GENERATE_ENUMTXT(N) {(char*)#N, N},
typedef enum { typedef enum {
PARALLEL_SINGLE_THREAD =0, FOREACH_PARALLEL(GENERATE_ENUM)
PARALLEL_RU_L1_SPLIT =1, } PARALLEL_CONF_t;
PARALLEL_RU_L1_TRX_SPLIT =2
}PARALLEL_CONF_t;
#define FOREACH_WORKER(GEN) GEN(WORKER_DISABLE) GEN(WORKER_ENABLE)
typedef enum { typedef enum {
WORKER_DISABLE =0, FOREACH_WORKER(GENERATE_ENUM)
WORKER_ENABLE =1
}WORKER_CONF_t; }WORKER_CONF_t;
typedef struct THREAD_STRUCT_s { typedef struct THREAD_STRUCT_s {
PARALLEL_CONF_t parallel_conf; PARALLEL_CONF_t parallel_conf;
WORKER_CONF_t worker_conf; WORKER_CONF_t worker_conf;
} THREAD_STRUCT; } THREAD_STRUCT;
extern THREAD_STRUCT thread_struct;
static inline void set_parallel_conf(char *parallel_conf) {
mapping config[]= {
FOREACH_PARALLEL(GENERATE_ENUMTXT)
{NULL,-1}
};
thread_struct.parallel_conf = (PARALLEL_CONF_t)map_str_to_int(config, parallel_conf);
if (thread_struct.parallel_conf == -1 ) {
LOG_E(ENB_APP,"Impossible value: %s\n", parallel_conf);
thread_struct.parallel_conf = PARALLEL_SINGLE_THREAD;
}
}
static inline void set_worker_conf(char *worker_conf) {
mapping config[]={
FOREACH_WORKER(GENERATE_ENUMTXT)
{NULL, -1}
};
thread_struct.worker_conf = (WORKER_CONF_t)map_str_to_int(config, worker_conf);
if (thread_struct.worker_conf == -1 ) {
LOG_E(ENB_APP,"Impossible value: %s\n", worker_conf);
thread_struct.worker_conf = WORKER_DISABLE ;
}
}
static inline PARALLEL_CONF_t get_thread_parallel_conf(void) {
return thread_struct.parallel_conf;
}
static inline WORKER_CONF_t get_thread_worker_conf(void) {
return thread_struct.worker_conf;
}
typedef enum {SF_DL, SF_UL, SF_S} lte_subframe_t; typedef enum {SF_DL, SF_UL, SF_S} lte_subframe_t;
......
...@@ -904,8 +904,6 @@ typedef struct PHY_VARS_eNB_s { ...@@ -904,8 +904,6 @@ typedef struct PHY_VARS_eNB_s {
/// Ethernet parameters for fronthaul interface /// Ethernet parameters for fronthaul interface
eth_params_t eth_params; eth_params_t eth_params;
int rx_total_gain_dB; int rx_total_gain_dB;
int (*td)(struct PHY_VARS_eNB_s *eNB,int UE_id,int harq_pid,int llr8_flag);
int (*te)(struct PHY_VARS_eNB_s *,uint8_t *,uint8_t,LTE_eNB_DLSCH_t *,int,uint8_t,time_stats_t *,time_stats_t *,time_stats_t *,time_stats_t *,time_stats_t *,time_stats_t *,time_stats_t *);
int (*start_if)(struct RU_t_s *ru,struct PHY_VARS_eNB_s *eNB); int (*start_if)(struct RU_t_s *ru,struct PHY_VARS_eNB_s *eNB);
uint8_t local_flag; uint8_t local_flag;
LTE_DL_FRAME_PARMS frame_parms; LTE_DL_FRAME_PARMS frame_parms;
...@@ -1080,6 +1078,7 @@ typedef struct PHY_VARS_eNB_s { ...@@ -1080,6 +1078,7 @@ typedef struct PHY_VARS_eNB_s {
time_stats_t ofdm_mod_stats; time_stats_t ofdm_mod_stats;
time_stats_t dlsch_common_and_dci; time_stats_t dlsch_common_and_dci;
time_stats_t dlsch_ue_specific;
time_stats_t dlsch_encoding_stats; time_stats_t dlsch_encoding_stats;
time_stats_t dlsch_modulation_stats; time_stats_t dlsch_modulation_stats;
time_stats_t dlsch_scrambling_stats; time_stats_t dlsch_scrambling_stats;
......
...@@ -28,9 +28,9 @@ ...@@ -28,9 +28,9 @@
#include "common/ran_context.h" #include "common/ran_context.h"
char* namepointer_chMag ; char *namepointer_chMag ;
char fmageren_name2[512]; char fmageren_name2[512];
char* namepointer_log2; char *namepointer_log2;
#include "PHY/LTE_REFSIG/primary_synch.h" #include "PHY/LTE_REFSIG/primary_synch.h"
...@@ -45,7 +45,7 @@ int16_t *primary_synch2_time; ...@@ -45,7 +45,7 @@ int16_t *primary_synch2_time;
PHY_VARS_UE ***PHY_vars_UE_g; PHY_VARS_UE ***PHY_vars_UE_g;
LTE_DL_FRAME_PARMS *lte_frame_parms_g; LTE_DL_FRAME_PARMS *lte_frame_parms_g;
#else #else
PHY_VARS_UE * PHY_vars_UE_g[MAX_UE][MAX_NUM_CCs]={NULL}; PHY_VARS_UE *PHY_vars_UE_g[MAX_UE][MAX_NUM_CCs]= {NULL};
#endif #endif
...@@ -62,10 +62,10 @@ char mode_string[4][20] = {"NOT SYNCHED","PRACH","RAR","PUSCH"}; ...@@ -62,10 +62,10 @@ char mode_string[4][20] = {"NOT SYNCHED","PRACH","RAR","PUSCH"};
#ifndef OPENAIR2 #ifndef OPENAIR2
unsigned char NB_eNB_INST=0; unsigned char NB_eNB_INST=0;
unsigned char NB_UE_INST=0; unsigned char NB_UE_INST=0;
unsigned char NB_RN_INST=0; unsigned char NB_RN_INST=0;
unsigned char NB_INST=0; unsigned char NB_INST=0;
#endif #endif
unsigned int ULSCH_max_consecutive_errors = 20; unsigned int ULSCH_max_consecutive_errors = 20;
...@@ -134,9 +134,9 @@ double beta2_dlsch[6][MCS_COUNT] = { {2.52163, 0.83231, 0.77472, 1.36536, 1.1682 ...@@ -134,9 +134,9 @@ double beta2_dlsch[6][MCS_COUNT] = { {2.52163, 0.83231, 0.77472, 1.36536, 1.1682
#ifdef OCP_FRAMEWORK #ifdef OCP_FRAMEWORK
#include <enums.h> #include <enums.h>
#else #else
char eNB_functions[6][20]={"eNodeB_3GPP","eNodeB_3GPP_BBU","NGFI_RAU_IF4p5","NGFI_RRU_IF5","NGFI_RRU_IF4p5",}; char eNB_functions[6][20]= {"eNodeB_3GPP","eNodeB_3GPP_BBU","NGFI_RAU_IF4p5","NGFI_RRU_IF5","NGFI_RRU_IF4p5",};
char eNB_timing[2][20]={"synch_to_ext_device","synch_to_other"}; char eNB_timing[2][20]= {"synch_to_ext_device","synch_to_other"};
char ru_if_types[MAX_RU_IF_TYPES][20]={"local RF","IF5 RRU","IF5 Mobipass","IF4p5 RRU","IF1pp RRU"}; char ru_if_types[MAX_RU_IF_TYPES][20]= {"local RF","IF5 RRU","IF5 Mobipass","IF4p5 RRU","IF1pp RRU"};
#endif #endif
/// lookup table for unscrambling in RX /// lookup table for unscrambling in RX
......
...@@ -400,7 +400,7 @@ void pdsch_procedures(PHY_VARS_eNB *eNB, ...@@ -400,7 +400,7 @@ void pdsch_procedures(PHY_VARS_eNB *eNB,
start_meas(&eNB->dlsch_encoding_stats); start_meas(&eNB->dlsch_encoding_stats);
eNB->te(eNB, dlsch_encoding_all(eNB,
dlsch_harq->pdu, dlsch_harq->pdu,
dlsch_harq->pdsch_start, dlsch_harq->pdsch_start,
dlsch, dlsch,
...@@ -582,6 +582,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB, ...@@ -582,6 +582,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
} }
if (do_meas==1) stop_meas(&eNB->dlsch_common_and_dci); if (do_meas==1) stop_meas(&eNB->dlsch_common_and_dci);
if (do_meas==1) start_meas(&eNB->dlsch_ue_specific);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_PDCCH_TX,0); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_PDCCH_TX,0);
...@@ -649,6 +650,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB, ...@@ -649,6 +650,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GENERATE_PHICH,0); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GENERATE_PHICH,0);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_TX+(eNB->CC_id),0); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_TX+(eNB->CC_id),0);
if (do_meas==1) stop_meas(&eNB->dlsch_ue_specific);
if (do_meas==1) stop_meas(&eNB->phy_proc_tx); if (do_meas==1) stop_meas(&eNB->phy_proc_tx);
} }
......
This diff is collapsed.
...@@ -49,38 +49,46 @@ void sumUpStatsSlot(time_stats_t *res, time_stats_t src[RX_NB_TH][2], int lastAc ...@@ -49,38 +49,46 @@ void sumUpStatsSlot(time_stats_t *res, time_stats_t src[RX_NB_TH][2], int lastAc
res->p_time=src[lastActive][last].p_time; res->p_time=src[lastActive][last].p_time;
} }
void printStatIndent(time_stats_t *ptr, char *txt) { double squareRoot(time_stats_t *ptr) {
printf("|__ %-50s %.2f us (%d trials)\n", double timeBase=1/(1000*cpu_freq_GHz);
return sqrt((double)ptr->diff_square*pow(timeBase,2)/ptr->trials -
pow((double)ptr->diff/ptr->trials*timeBase,2));
}
void printDistribution(time_stats_t *ptr, varArray_t *sortedList, char *txt) {
double timeBase=1/(1000*cpu_freq_GHz);
printf("%-43s %6.2f us (%d trials)\n",
txt, txt,
ptr->trials?inMicroS(ptr->diff/ptr->trials):0, (double)ptr->diff/ptr->trials*timeBase,
ptr->trials); ptr->trials);
printf(" Statistics std=%.2f, median=%.2f, q1=%.2f, q3=%.2f µs (on %ld trials)\n",
squareRoot(ptr), median(sortedList),q1(sortedList),q3(sortedList), sortedList->size);
} }
void printStatIndent2(time_stats_t *ptr, char *txt, int turbo_iter) { void printStatIndent(time_stats_t *ptr, char *txt) {
double timeBase=1/(1000*cpu_freq_GHz); printf("|__ %-38s %6.2f us (%3d trials)\n",
printf(" |__ %-45s %.2f us (cycles/block %ld, %5d trials)\n",
txt, txt,
ptr->trials?((double)ptr->diff)/ptr->trials*timeBase:0, ptr->trials?inMicroS(ptr->diff/ptr->trials):0,
turbo_iter?(uint64_t)round(((double)ptr->diff)/turbo_iter):0,
ptr->trials); ptr->trials);
} }
double squareRoot(time_stats_t *ptr) { void printStatIndent2(time_stats_t *ptr, char *txt) {
double timeBase=1/(1000*cpu_freq_GHz); double timeBase=1/(1000*cpu_freq_GHz);