\n')
self.htmlFile.write(' | ' + self.testCase_id + ' | \n')
@@ -2213,15 +2879,17 @@ class SSHConnection():
if (processesStatus == 0):
self.htmlFile.write(' ' + str(status) + ' | \n')
elif (processesStatus == ENB_PROCESS_FAILED):
- self.htmlFile.write(' KO - eNB process not found | \n')
+ self.htmlFile.write(' KO - ' + machine + ' process not found | \n')
elif (processesStatus == ENB_PROCESS_SEG_FAULT):
- self.htmlFile.write(' KO - eNB process ended in Segmentation Fault | \n')
- elif (processesStatus == ENB_PROCESS_ASSERTION):
- self.htmlFile.write(' KO - eNB process ended in Assertion | \n')
+ self.htmlFile.write(' KO - ' + machine + ' process ended in Segmentation Fault | \n')
+ elif (processesStatus == ENB_PROCESS_ASSERTION) or (processesStatus == UE_PROCESS_ASSERTION):
+ self.htmlFile.write(' KO - ' + machine + ' process ended in Assertion | \n')
elif (processesStatus == ENB_PROCESS_REALTIME_ISSUE):
- self.htmlFile.write(' KO - eNB process faced Real Time issue(s) | \n')
- elif (processesStatus == ENB_PROCESS_NOLOGFILE_TO_ANALYZE):
- self.htmlFile.write(' OK | \n')
+ self.htmlFile.write(' KO - ' + machine + ' process faced Real Time issue(s) | \n')
+ elif (processesStatus == ENB_PROCESS_NOLOGFILE_TO_ANALYZE) or (processesStatus == UE_PROCESS_NOLOGFILE_TO_ANALYZE):
+ self.htmlFile.write(' OK? | \n')
+ elif (processesStatus == UE_PROCESS_COULD_NOT_SYNC):
+ self.htmlFile.write(' KO - UE could not sync | \n')
elif (processesStatus == HSS_PROCESS_FAILED):
self.htmlFile.write(' KO - HSS process not found | \n')
elif (processesStatus == MME_PROCESS_FAILED):
@@ -2325,8 +2993,11 @@ def Usage():
print(' --XMLTestFile=[XML Test File to be run]')
print('------------------------------------------------------------')
+#def GetModeFromXML():
+# SSH.mode = test.findtext('mode')
+
def CheckClassValidity(action,id):
- if action != 'Build_eNB' and action != 'Initialize_eNB' and action != 'Terminate_eNB' and action != 'Initialize_UE' and action != 'Terminate_UE' and action != 'Attach_UE' and action != 'Detach_UE' and action != 'Ping' and action != 'Iperf' and action != 'Reboot_UE' and action != 'Initialize_HSS' and action != 'Terminate_HSS' and action != 'Initialize_MME' and action != 'Terminate_MME' and action != 'Initialize_SPGW' and action != 'Terminate_SPGW' and action != 'Initialize_CatM_module' and action != 'Terminate_CatM_module' and action != 'Attach_CatM_module' and action != 'Detach_CatM_module' and action != 'IdleSleep':
+ if action != 'Build_eNB' and action != 'Initialize_eNB' and action != 'Terminate_eNB' and action != 'Initialize_UE' and action != 'Terminate_UE' and action != 'Attach_UE' and action != 'Detach_UE' and action != 'Build_OAI_UE' and action != 'Initialize_OAI_UE' and action != 'Terminate_OAI_UE' and action != 'Initialize_OAI_eNB' and action != 'Ping' and action != 'Iperf' and action != 'Reboot_UE' and action != 'Initialize_HSS' and action != 'Terminate_HSS' and action != 'Initialize_MME' and action != 'Terminate_MME' and action != 'Initialize_SPGW' and action != 'Terminate_SPGW' and action != 'Initialize_CatM_module' and action != 'Terminate_CatM_module' and action != 'Attach_CatM_module' and action != 'Detach_CatM_module' and action != 'Ping_CatM_module' and action != 'IdleSleep':
logging.debug('ERROR: test-case ' + id + ' has wrong class ' + action)
return False
return True
@@ -2340,11 +3011,21 @@ def GetParametersFromXML(action):
SSH.eNB_instance = test.findtext('eNB_instance')
if (SSH.eNB_instance is None):
SSH.eNB_instance = '0'
-
+ SSH.air_interface = test.findtext('air_interface')
+ if (SSH.air_interface is None):
+ SSH.air_interface = 'lte'
+ else:
+ SSH.air_interface = SSH.air_interface.lower()
+
if action == 'Terminate_eNB':
SSH.eNB_instance = test.findtext('eNB_instance')
if (SSH.eNB_instance is None):
SSH.eNB_instance = '0'
+ SSH.air_interface = test.findtext('air_interface')
+ if (SSH.air_interface is None):
+ SSH.air_interface = 'lte'
+ else:
+ SSH.air_interface = SSH.air_interface.lower()
if action == 'Attach_UE':
nbMaxUEtoAttach = test.findtext('nbMaxUEtoAttach')
@@ -2353,7 +3034,42 @@ def GetParametersFromXML(action):
else:
SSH.nbMaxUEtoAttach = int(nbMaxUEtoAttach)
- if action == 'Ping':
+ if action == 'Build_OAI_UE':
+ SSH.Build_OAI_UE_args = test.findtext('Build_OAI_UE_args')
+ SSH.clean_repository = test.findtext('clean_repository')
+ if (SSH.clean_repository == 'false'):
+ SSH.clean_repository = False
+ else:
+ SSH.clean_repository = True
+
+ if action == 'Initialize_OAI_UE':
+ SSH.Initialize_OAI_UE_args = test.findtext('Initialize_OAI_UE_args')
+ SSH.UE_instance = test.findtext('UE_instance')
+ if (SSH.UE_instance is None):
+ SSH.UE_instance = '0'
+ SSH.air_interface = test.findtext('air_interface')
+ if (SSH.air_interface is None):
+ SSH.air_interface = 'lte'
+ else:
+ SSH.air_interface = SSH.air_interface.lower()
+
+ if action == 'Initialize_OAI_eNB':
+ SSH.Initialize_OAI_eNB_args = test.findtext('Initialize_OAI_eNB_args')
+ SSH.UE_instance = test.findtext('eNB_instance')
+ if (SSH.eNB_instance is None):
+ SSH.eNB_instance = '0'
+ SSH.air_interface = test.findtext('air_interface')
+ if (SSH.air_interface is None):
+ SSH.air_interface = 'lte'
+ else:
+ SSH.air_interface = SSH.air_interface.lower()
+
+ if action == 'Terminate_OAI_UE':
+ SSH.eNB_instance = test.findtext('UE_instance')
+ if (SSH.UE_instance is None):
+ SSH.UE_instance = '0'
+
+ if action == 'Ping' or action == 'Ping_CatM_module':
SSH.ping_args = test.findtext('ping_args')
SSH.ping_packetloss_threshold = test.findtext('ping_packetloss_threshold')
@@ -2395,6 +3111,7 @@ SSH = SSHConnection()
argvs = sys.argv
argc = len(argvs)
+cwd = os.getcwd()
while len(argvs) > 1:
myArgv = argvs.pop(1) # 0th is this file's name
@@ -2403,6 +3120,9 @@ while len(argvs) > 1:
sys.exit(0)
elif re.match('^\-\-mode=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-mode=(.+)$', myArgv, re.IGNORECASE)
+ #if matchReg and mode is not None:
+ #print('Warning: the mode is defined in both xml file and command line')
+ #print('ignoring the mode defined in the xml file')
mode = matchReg.group(1)
elif re.match('^\-\-eNBIPAddress=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-eNBIPAddress=(.+)$', myArgv, re.IGNORECASE)
@@ -2467,6 +3187,18 @@ while len(argvs) > 1:
matchReg = re.match('^\-\-XMLTestFile=(.+)$', myArgv, re.IGNORECASE)
SSH.testXMLfiles.append(matchReg.group(1))
SSH.nbTestXMLfiles += 1
+ elif re.match('^\-\-UEIPAddress=(.+)$', myArgv, re.IGNORECASE):
+ matchReg = re.match('^\-\-UEIPAddress=(.+)$', myArgv, re.IGNORECASE)
+ SSH.UEIPAddress = matchReg.group(1)
+ elif re.match('^\-\-UEUserName=(.+)$', myArgv, re.IGNORECASE):
+ matchReg = re.match('^\-\-UEUserName=(.+)$', myArgv, re.IGNORECASE)
+ SSH.UEUserName = matchReg.group(1)
+ elif re.match('^\-\-UEPassword=(.+)$', myArgv, re.IGNORECASE):
+ matchReg = re.match('^\-\-UEPassword=(.+)$', myArgv, re.IGNORECASE)
+ SSH.UEPassword = matchReg.group(1)
+ elif re.match('^\-\-UESourceCodePath=(.+)$', myArgv, re.IGNORECASE):
+ matchReg = re.match('^\-\-UESourceCodePath=(.+)$', myArgv, re.IGNORECASE)
+ SSH.UESourceCodePath = matchReg.group(1)
elif re.match('^\-\-finalStatus=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-finalStatus=(.+)$', myArgv, re.IGNORECASE)
finalStatus = matchReg.group(1)
@@ -2482,11 +3214,17 @@ if re.match('^TerminateeNB$', mode, re.IGNORECASE):
sys.exit('Insufficient Parameter')
SSH.TerminateeNB()
elif re.match('^TerminateUE$', mode, re.IGNORECASE):
- if SSH.ADBIPAddress == '' or SSH.ADBUserName == '' or SSH.ADBPassword == '':
+ if (SSH.ADBIPAddress == '' or SSH.ADBUserName == '' or SSH.ADBPassword == ''):
Usage()
sys.exit('Insufficient Parameter')
signal.signal(signal.SIGUSR1, receive_signal)
SSH.TerminateUE()
+elif re.match('^TerminateOAIUE$', mode, re.IGNORECASE):
+ if SSH.UEIPAddress == '' or SSH.UEUserName == '' or SSH.UEPassword == '':
+ Usage()
+ sys.exit('Insufficient Parameter')
+ signal.signal(signal.SIGUSR1, receive_signal)
+ SSH.TerminateOAIUE()
elif re.match('^TerminateHSS$', mode, re.IGNORECASE):
if SSH.EPCIPAddress == '' or SSH.EPCUserName == '' or SSH.EPCPassword == '' or SSH.EPCType == '' or SSH.EPCSourceCodePath == '':
Usage()
@@ -2503,7 +3241,7 @@ elif re.match('^TerminateSPGW$', mode, re.IGNORECASE):
sys.exit('Insufficient Parameter')
SSH.TerminateSPGW()
elif re.match('^LogCollectBuild$', mode, re.IGNORECASE):
- if SSH.eNBIPAddress == '' or SSH.eNBUserName == '' or SSH.eNBPassword == '' or SSH.eNBSourceCodePath == '':
+ if (SSH.eNBIPAddress == '' or SSH.eNBUserName == '' or SSH.eNBPassword == '' or SSH.eNBSourceCodePath == '') and (SSH.UEIPAddress == '' or SSH.UEUserName == '' or SSH.UEPassword == '' or SSH.UESourceCodePath == ''):
Usage()
sys.exit('Insufficient Parameter')
SSH.LogCollectBuild()
@@ -2537,16 +3275,24 @@ elif re.match('^LogCollectIperf$', mode, re.IGNORECASE):
Usage()
sys.exit('Insufficient Parameter')
SSH.LogCollectIperf()
+elif re.match('^LogCollectOAIUE$', mode, re.IGNORECASE):
+ if SSH.UEIPAddress == '' or SSH.UEUserName == '' or SSH.UEPassword == '' or SSH.UESourceCodePath == '':
+ Usage()
+ sys.exit('Insufficient Parameter')
+ SSH.LogCollectOAIUE()
elif re.match('^InitiateHtml$', mode, re.IGNORECASE):
- if SSH.ADBIPAddress == '' or SSH.ADBUserName == '' or SSH.ADBPassword == '':
+ if (SSH.ADBIPAddress == '' or SSH.ADBUserName == '' or SSH.ADBPassword == ''):
Usage()
sys.exit('Insufficient Parameter')
count = 0
foundCount = 0
while (count < SSH.nbTestXMLfiles):
- xml_test_file = sys.path[0] + "/" + SSH.testXMLfiles[count]
+ xml_test_file = cwd + "/" + SSH.testXMLfiles[count]
if (os.path.isfile(xml_test_file)):
- xmlTree = ET.parse(xml_test_file)
+ try:
+ xmlTree = ET.parse(xml_test_file)
+ except:
+ print("Error while parsing file: " + xml_test_file)
xmlRoot = xmlTree.getroot()
SSH.htmlTabRefs.append(xmlRoot.findtext('htmlTabRef',default='test-tab-' + str(count)))
SSH.htmlTabNames.append(xmlRoot.findtext('htmlTabName',default='Test-' + str(count)))
@@ -2558,20 +3304,33 @@ elif re.match('^InitiateHtml$', mode, re.IGNORECASE):
SSH.CreateHtmlHeader()
elif re.match('^FinalizeHtml$', mode, re.IGNORECASE):
SSH.CreateHtmlFooter(SSH.finalStatus)
-elif re.match('^TesteNB$', mode, re.IGNORECASE):
- if SSH.eNBIPAddress == '' or SSH.eNBRepository == '' or SSH.eNBBranch == '' or SSH.eNBUserName == '' or SSH.eNBPassword == '' or SSH.eNBSourceCodePath == '' or SSH.EPCIPAddress == '' or SSH.EPCUserName == '' or SSH.EPCPassword == '' or SSH.EPCType == '' or SSH.EPCSourceCodePath == '' or SSH.ADBIPAddress == '' or SSH.ADBUserName == '' or SSH.ADBPassword == '':
- Usage()
- sys.exit('Insufficient Parameter')
+elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re.IGNORECASE):
+ if re.match('^TesteNB$', mode, re.IGNORECASE):
+ if (SSH.eNBRepository == '' or SSH.eNBBranch == '' or SSH.eNBSourceCodePath == ''):
+ Usage()
+ sys.exit('Insufficient Parameter')
+ if (SSH.eNBIPAddress == '' or SSH.eNBUserName == '' or SSH.eNBPassword == '') and (SSH.UEIPAddress == '' or SSH.UEUserName == '' or SSH.UEPassword == ''):
+ Usage()
+ sys.exit('Insufficient Parameter')
+ elif SSH.ADBIPAddress == 'none' and SSH.EPCIPAddress == 'none':
+ pass
+ elif SSH.EPCIPAddress == '' or SSH.EPCUserName == '' or SSH.EPCPassword == '' or SSH.EPCType == '' or SSH.EPCSourceCodePath == '' or SSH.ADBIPAddress == '' or SSH.ADBUserName == '' or SSH.ADBPassword == '':
+ Usage()
+ sys.exit('Insufficient Parameter')
+ if (SSH.EPCIPAddress != ''):
+ SSH.copyout(SSH.EPCIPAddress, SSH.EPCUserName, SSH.EPCPassword, cwd + "/tcp_iperf_stats.awk", "/tmp")
+ SSH.copyout(SSH.EPCIPAddress, SSH.EPCUserName, SSH.EPCPassword, cwd + "/active_net_interfaces.awk", "/tmp")
+ else:
+ if SSH.UEIPAddress == '' or SSH.eNBRepository == '' or SSH.eNBBranch == '' or SSH.UEUserName == '' or SSH.UEPassword == '' or SSH.UESourceCodePath == '':
+ Usage()
+ sys.exit('UE: Insufficient Parameter')
- if (SSH.EPCIPAddress != 'none'):
- SSH.copyout(SSH.EPCIPAddress, SSH.EPCUserName, SSH.EPCPassword, sys.path[0] + "/tcp_iperf_stats.awk", "/tmp")
- SSH.copyout(SSH.EPCIPAddress, SSH.EPCUserName, SSH.EPCPassword, sys.path[0] + "/active_net_interfaces.awk", "/tmp")
#read test_case_list.xml file
# if no parameters for XML file, use default value
if (SSH.nbTestXMLfiles != 1):
- xml_test_file = sys.path[0] + "/test_case_list.xml"
+ xml_test_file = cwd + "/test_case_list.xml"
else:
- xml_test_file = sys.path[0] + "/" + SSH.testXMLfiles[0]
+ xml_test_file = cwd + "/" + SSH.testXMLfiles[0]
xmlTree = ET.parse(xml_test_file)
xmlRoot = xmlTree.getroot()
@@ -2627,6 +3386,7 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE):
SSH.testCase_id = id
SSH.desc = test.findtext('desc')
action = test.findtext('class')
+ mode = test.findtext('mode')
if (CheckClassValidity(action, id) == False):
continue
SSH.ShowTestID()
@@ -2648,6 +3408,14 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE):
SSH.AttachUE()
elif action == 'Detach_UE':
SSH.DetachUE()
+ elif action == 'Build_OAI_UE':
+ SSH.BuildOAIUE()
+ elif action == 'Initialize_OAI_UE':
+ SSH.InitializeOAIUE()
+ elif action == 'Terminate_OAI_UE':
+ SSH.TerminateOAIUE()
+ elif action == 'Initialize_OAI_eNB':
+ SSH.InitializeOAIeNB()
elif action == 'Initialize_CatM_module':
SSH.InitializeCatM()
elif action == 'Terminate_CatM_module':
@@ -2656,6 +3424,8 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE):
SSH.AttachCatM()
elif action == 'Detach_CatM_module':
SSH.TerminateCatM()
+ elif action == 'Ping_CatM_module':
+ SSH.PingCatM()
elif action == 'Ping':
SSH.Ping()
elif action == 'Iperf':
diff --git a/ci-scripts/xml_files/gnb_nr_ue_usrp_run.xml b/ci-scripts/xml_files/gnb_nr_ue_usrp_run.xml
new file mode 100644
index 0000000000..f9d068c5b2
--- /dev/null
+++ b/ci-scripts/xml_files/gnb_nr_ue_usrp_run.xml
@@ -0,0 +1,64 @@
+
+
+ run-OAI-gNB-NR-UE-USRP
+ run OAI gNB and OAI NR UE USRP
+ tasks
+
+090101 000001 090102 000001 090108 090109
+
+
+
+
+ Initialize_OAI_eNB
+ Initialize gNB USRP
+ -O ../../../ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf
+ NR
+
+
+
+ IdleSleep
+ Sleep
+ 5
+
+
+
+ Initialize_OAI_UE
+ Initialize NR UE USRP
+ -C 3510000000 --numerology 1 -r 106 --phy-test --usrp-args "addr=192.168.30.2,clock_source=external,time_source=external" --threadoffset 16
+ NR
+
+
+
+ Terminate_OAI_UE
+ Terminate NR UE
+ NR
+
+
+
+ Terminate_eNB
+ Terminate gNB
+ NR
+
+
+
diff --git a/ci-scripts/xml_files/gnb_usrp_build.xml b/ci-scripts/xml_files/gnb_usrp_build.xml
new file mode 100644
index 0000000000..1b57c077ba
--- /dev/null
+++ b/ci-scripts/xml_files/gnb_usrp_build.xml
@@ -0,0 +1,39 @@
+
+
+ gnb-build-tab
+ Build-gNB
+ wrench
+
+010101
+
+
+
+
+ TesteNB
+ Build_eNB
+ Build gNB (USRP)
+ --gNB -w USRP
+
+
+
diff --git a/ci-scripts/xml_files/nr_ue_usrp_build.xml b/ci-scripts/xml_files/nr_ue_usrp_build.xml
new file mode 100644
index 0000000000..7d8d97d2c5
--- /dev/null
+++ b/ci-scripts/xml_files/nr_ue_usrp_build.xml
@@ -0,0 +1,40 @@
+
+
+ nr-ue-build-tab
+ Build-NR-UE
+ wrench
+
+010102
+
+
+
+
+ TestUE
+ Build_OAI_UE
+ Build NR UE (USRP)
+ --nrUE -w USRP
+ false
+
+
+
diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
index d99abd70a0..4bdc30540d 100644
--- a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
+++ b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
@@ -134,7 +134,6 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
NR_DL_UE_HARQ_t *dlsch0_harq,*dlsch1_harq = 0;
uint8_t beamforming_mode;
- uint32_t *rballoc;
int32_t **rxdataF_comp_ptr;
int32_t **dl_ch_mag_ptr;
@@ -265,25 +264,14 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
return(-1);
}
- if (((frame_parms->Ncp == NORMAL) && (symbol>=7)) ||
- ((frame_parms->Ncp == EXTENDED) && (symbol>=6)))
- rballoc = dlsch0_harq->rb_alloc_odd;
- else
- rballoc = dlsch0_harq->rb_alloc_even;
-
-
- if (dlsch0_harq->mimo_mode>DUALSTREAM_PUSCH_PRECODING) {
+ if (dlsch0_harq->mimo_mode>NR_DUALSTREAM) {
LOG_E(PHY,"This transmission mode is not yet supported!\n");
return(-1);
}
- if ((dlsch0_harq->mimo_mode==LARGE_CDD) || ((dlsch0_harq->mimo_mode>=DUALSTREAM_UNIFORM_PRECODING1) && (dlsch0_harq->mimo_mode<=DUALSTREAM_PUSCH_PRECODING))) {
+ if (dlsch0_harq->mimo_mode==NR_DUALSTREAM) {
DevAssert(dlsch1_harq);
- if (eNB_id!=eNB_id_i) {
- LOG_E(PHY,"TM3/TM4 requires to set eNB_id==eNB_id_i!\n");
- return(-1);
- }
}
#if UE_TIMING_TRACE
@@ -376,46 +364,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
ue->high_speed_flag,
frame_parms);
-
-/*
- if (rx_type==rx_IC_single_stream) {
- if (eNB_id_in_connected_eNB)
- nb_rb = dlsch_extract_rbs_single(common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[nr_tti_rx]].rxdataF,
- common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[nr_tti_rx]].dl_ch_estimates[eNB_id_i],
- pdsch_vars[eNB_id_i]->rxdataF_ext,
- pdsch_vars[eNB_id_i]->dl_ch_estimates_ext,
- dlsch0_harq->pmi_alloc,
- pdsch_vars[eNB_id_i]->pmi_ext,
- rballoc,
- symbol,
- nr_tti_rx,
- ue->high_speed_flag,
- frame_parms);
- else
- nb_rb = dlsch_extract_rbs_single(common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[nr_tti_rx]].rxdataF,
- common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[nr_tti_rx]].dl_ch_estimates[eNB_id],
- pdsch_vars[eNB_id_i]->rxdataF_ext,
- pdsch_vars[eNB_id_i]->dl_ch_estimates_ext,
- dlsch0_harq->pmi_alloc,
- pdsch_vars[eNB_id_i]->pmi_ext,
- rballoc,
- symbol,
- nr_tti_rx,
- ue->high_speed_flag,
- frame_parms);
- }*/
- } /*else if (beamforming_mode==7) { //else if beamforming_mode == 7
- nb_rb = dlsch_extract_rbs_TM7(common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[nr_tti_rx]].rxdataF,
- pdsch_vars[eNB_id]->dl_bf_ch_estimates,
- pdsch_vars[eNB_id]->rxdataF_ext,
- pdsch_vars[eNB_id]->dl_bf_ch_estimates_ext,
- rballoc,
- symbol,
- nr_tti_rx,
- ue->high_speed_flag,
- frame_parms);
-
- } else if(beamforming_mode>7) {
+ } /*else if(beamforming_mode>7) {
LOG_W(PHY,"dlsch_demodulation: beamforming mode not supported yet.\n");
}*/
@@ -451,20 +400,6 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
pilots,
nb_rb);
- if ((dlsch0_harq->mimo_moden_connected_eNB) &&
- (dlsch0_harq->dl_power_off==0)
- ) // TM5 two-user
- {
- nr_dlsch_scale_channel(pdsch_vars[eNB_id_i]->dl_ch_estimates_ext,
- frame_parms,
- dlsch,
- symbol,
- pilots,
- nb_rb);
- }
-
#if UE_TIMING_TRACE
stop_meas(&ue->generic_stat_bis[ue->current_thread_id[nr_tti_rx]][slot]);
#if DISABLE_LOG_X
@@ -479,7 +414,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
#endif
if (first_symbol_flag==1) {
if (beamforming_mode==0){
- if (dlsch0_harq->mimo_modemimo_modedl_ch_estimates_ext,
frame_parms,
avg,
@@ -493,9 +428,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
pdsch_vars[eNB_id]->log2_maxh = (log2_approx(avgs)/2)+1;
}
- else if ((dlsch0_harq->mimo_mode == LARGE_CDD) ||
- ((dlsch0_harq->mimo_mode >=DUALSTREAM_UNIFORM_PRECODING1) &&
- (dlsch0_harq->mimo_mode <=DUALSTREAM_PUSCH_PRECODING)))
+ else if (dlsch0_harq->mimo_mode == NR_DUALSTREAM)
{
nr_dlsch_channel_level_median(pdsch_vars[eNB_id]->dl_ch_estimates_ext,
median,
@@ -514,54 +447,16 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
pdsch_vars[eNB_id]->log2_maxh = (log2_approx(avgs)/2) + 1; // this might need to be tuned
- }/*
- else if (dlsch0_harq->mimo_moden_connected_eNB) && (dlsch0_harq->dl_power_off==0)) {
- dlsch_channel_level_TM56(pdsch_vars[eNB_id]->dl_ch_estimates_ext,
- frame_parms,
- pdsch_vars[eNB_id]->pmi_ext,
- avg,
- symbol,
- nb_rb);
- avg[0] = log2_approx(avg[0]) - 13 + offset_mumimo_llr_drange[dlsch0_harq->mcs][(i_mod>>1)-1];
- pdsch_vars[eNB_id]->log2_maxh = cmax(avg[0],0);
-
- }
- else if (dlsch0_harq->dl_power_off==1) { //TM6
-
- nr_dlsch_channel_level(pdsch_vars[eNB_id]->dl_ch_estimates_ext,
- frame_parms,
- avg,
- symbol,
- nb_rb);
-
- avgs = 0;
- for (aatx=0;aatxnb_antenna_ports_eNB;aatx++)
- for (aarx=0;aarxnb_antennas_rx;aarx++)
- avgs = cmax(avgs,avg[(aatx<<1)+aarx]);
-
- pdsch_vars[eNB_id]->log2_maxh = (log2_approx(avgs)/2) + 1;
- pdsch_vars[eNB_id]->log2_maxh++;
-
- }
- }
-
+ }
}
- else if (beamforming_mode==7)
- dlsch_channel_level_TM7(pdsch_vars[eNB_id]->dl_bf_ch_estimates_ext,
- frame_parms,
- avg,
- symbol,
- nb_rb);*/
- }
-//#ifdef UE_DEBUG_TRACE
+#ifdef UE_DEBUG_TRACE
LOG_I(PHY,"[DLSCH] AbsSubframe %d.%d log2_maxh = %d [log2_maxh0 %d log2_maxh1 %d] (%d,%d)\n",
frame%1024,nr_tti_rx, pdsch_vars[eNB_id]->log2_maxh,
pdsch_vars[eNB_id]->log2_maxh0,
pdsch_vars[eNB_id]->log2_maxh1,
avg[0],avgs);
//LOG_D(PHY,"[DLSCH] mimo_mode = %d\n", dlsch0_harq->mimo_mode);
-//#endif
+#endif
//wait until pdcch is decoded
//proc->channel_level = 1;
@@ -598,7 +493,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
start_meas(&ue->generic_stat_bis[ue->current_thread_id[nr_tti_rx]][slot]);
#endif
// Now channel compensation
- if (dlsch0_harq->mimo_modemimo_moderxdataF_ext,
pdsch_vars[eNB_id]->dl_ch_estimates_ext,
pdsch_vars[eNB_id]->dl_ch_mag0,
@@ -649,8 +544,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
}*/
}
- else if ((dlsch0_harq->mimo_mode == LARGE_CDD) || ((dlsch0_harq->mimo_mode >=DUALSTREAM_UNIFORM_PRECODING1) &&
- (dlsch0_harq->mimo_mode <=DUALSTREAM_PUSCH_PRECODING))){
+ else if (dlsch0_harq->mimo_mode == NR_DUALSTREAM){
nr_dlsch_channel_compensation_core(pdsch_vars[eNB_id]->rxdataF_ext,
pdsch_vars[eNB_id]->dl_ch_estimates_ext,
pdsch_vars[eNB_id]->dl_ch_mag0,
@@ -712,9 +606,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
#endif
if (frame_parms->nb_antennas_rx > 1) {
- if ((dlsch0_harq->mimo_mode == LARGE_CDD) ||
- ((dlsch0_harq->mimo_mode >=DUALSTREAM_UNIFORM_PRECODING1) &&
- (dlsch0_harq->mimo_mode <=DUALSTREAM_PUSCH_PRECODING))){ // TM3 or TM4
+ if (dlsch0_harq->mimo_mode == NR_DUALSTREAM){
nr_dlsch_detection_mrc_core(pdsch_vars[eNB_id]->rxdataF_comp0,
NULL,
pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round],
@@ -733,33 +625,9 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
} */
}
}
-#if 0
- // printf("Combining");
- if ((dlsch0_harq->mimo_mode == SISO) ||
- ((dlsch0_harq->mimo_mode >= UNIFORM_PRECODING11) &&
- (dlsch0_harq->mimo_mode <= PUSCH_PRECODING0)) ||
- (dlsch0_harq->mimo_mode == TM7)) {
- /*
- dlsch_siso(frame_parms,
- pdsch_vars[eNB_id]->rxdataF_comp,
- pdsch_vars[eNB_id_i]->rxdataF_comp,
- symbol,
- nb_rb);
- */
- } else if (dlsch0_harq->mimo_mode == ALAMOUTI) {
- dlsch_alamouti(frame_parms,
- pdsch_vars[eNB_id]->rxdataF_comp0,
- pdsch_vars[eNB_id]->dl_ch_mag0,
- pdsch_vars[eNB_id]->dl_ch_magb0,
- symbol,
- nb_rb);
- }
-#endif
//printf("start compute LLR\n");
- if ((dlsch0_harq->mimo_mode == LARGE_CDD) ||
- ((dlsch0_harq->mimo_mode >=DUALSTREAM_UNIFORM_PRECODING1) &&
- (dlsch0_harq->mimo_mode <=DUALSTREAM_PUSCH_PRECODING))) {
+ if (dlsch0_harq->mimo_mode == NR_DUALSTREAM) {
rxdataF_comp_ptr = pdsch_vars[eNB_id]->rxdataF_comp1[harq_pid][round];
dl_ch_mag_ptr = pdsch_vars[eNB_id]->dl_ch_mag1[harq_pid][round];
}
@@ -1989,7 +1857,7 @@ void nr_dlsch_channel_level(int **dl_ch_estimates_ext,
#if defined(__x86_64__)||defined(__i386__)
short rb;
- unsigned char aatx,aarx,nre=12;
+ unsigned char aatx,aarx;
__m128i *dl_ch128, avg128D;
//nb_rb*nre = y * 2^x
diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_llr_computation.c b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_llr_computation.c
index a02efd9a82..036316dbaa 100644
--- a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_llr_computation.c
+++ b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_llr_computation.c
@@ -822,11 +822,11 @@ void nr_dlsch_64qam_llr(NR_DL_FRAME_PARMS *frame_parms,
pllr_symbol += llr_offset;
#if defined(__x86_64__) || defined(__i386__)
- ch_mag = (__m128i*)&dl_ch_mag[0][(symbol*frame_parms->N_RB_DL*12)];
- ch_magb = (__m128i*)&dl_ch_magb[0][(symbol*frame_parms->N_RB_DL*12)];
+ ch_mag = (__m128i*)&dl_ch_mag[0][(symbol*nb_rb*12)];
+ ch_magb = (__m128i*)&dl_ch_magb[0][(symbol*nb_rb*12)];
#elif defined(__arm__)
- ch_mag = (int16x8_t*)&dl_ch_mag[0][(symbol*frame_parms->N_RB_DL*12)];
- ch_magb = (int16x8_t*)&dl_ch_magb[0][(symbol*frame_parms->N_RB_DL*12)];
+ ch_mag = (int16x8_t*)&dl_ch_mag[0][(symbol*nb_rb*12)];
+ ch_magb = (int16x8_t*)&dl_ch_magb[0][(symbol*nb_rb*12)];
#endif
// printf("nr_dlsch_64qam_llr: symbol %d,nb_rb %d, len %d,pbch_pss_sss_adjust %d\n",symbol,nb_rb,len,pbch_pss_sss_adjust);
diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_transport_ue.h b/openair1/PHY/NR_UE_TRANSPORT/nr_transport_ue.h
index 7d2abd9993..fc303716e9 100644
--- a/openair1/PHY/NR_UE_TRANSPORT/nr_transport_ue.h
+++ b/openair1/PHY/NR_UE_TRANSPORT/nr_transport_ue.h
@@ -273,7 +273,7 @@ typedef struct {
/// Redundancy-version of the current sub-frame
uint8_t rvidx;
/// MIMO mode for this DLSCH
- MIMO_mode_t mimo_mode;
+ MIMO_nrmode_t mimo_mode;
/// soft bits for each received segment ("w"-sequence)(for definition see 36-212 V8.6 2009-03, p.15)
int16_t w[MAX_NUM_NR_DLSCH_SEGMENTS][3*8448];
/// for abstraction soft bits for each received segment ("w"-sequence)(for definition see 36-212 V8.6 2009-03, p.15)
diff --git a/openair1/PHY/defs_common.h b/openair1/PHY/defs_common.h
index 72387772bd..503e8cdc03 100644
--- a/openair1/PHY/defs_common.h
+++ b/openair1/PHY/defs_common.h
@@ -704,6 +704,11 @@ typedef enum {
TM9_10=14
} MIMO_mode_t;
+typedef enum {
+ NR_SISO=0,
+ NR_DUALSTREAM=1
+} MIMO_nrmode_t;
+
typedef enum {
/// MRT
diff --git a/targets/RT/USER/nr-softmodem.c b/targets/RT/USER/nr-softmodem.c
index 411281d72a..40d4758847 100644
--- a/targets/RT/USER/nr-softmodem.c
+++ b/targets/RT/USER/nr-softmodem.c
@@ -1238,6 +1238,8 @@ int main( int argc, char **argv )
// wait for end of program
printf("TYPE TO TERMINATE\n");
+ fflush(stdout);
+ fflush(stderr);
//getchar();
#if defined(ENABLE_ITTI)