Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
常顺宇
OpenXG-RAN
Commits
cb7e2c11
Commit
cb7e2c11
authored
Nov 02, 2020
by
hardy
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/NR_UE_RA_fixes' into integration_2020_wk45
parents
628c2b74
c355a26a
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
187 additions
and
283 deletions
+187
-283
ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf
ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf
+9
-9
ci-scripts/reportTestLocally.sh
ci-scripts/reportTestLocally.sh
+41
-49
ci-scripts/runTestOnVM.sh
ci-scripts/runTestOnVM.sh
+66
-104
common/utils/telnetsrv/telnetsrv_proccmd.c
common/utils/telnetsrv/telnetsrv_proccmd.c
+2
-0
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
+6
-6
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
+56
-107
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
+1
-1
targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf
.../GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf
+6
-7
No files found.
ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf
View file @
cb7e2c11
...
...
@@ -45,8 +45,8 @@ gNBs =
dl_carrierBandwidth
=
106
;
#initialDownlinkBWP
#genericParameters
# this is RBstart=
0,L=50
(275*(L-1))+RBstart
initialDLBWPlocationAndBandwidth
=
13475
;
# this is RBstart=
41,L=24
(275*(L-1))+RBstart
initialDLBWPlocationAndBandwidth
=
6366
;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialDLBWPsubcarrierSpacing
=
1
;
...
...
@@ -59,7 +59,7 @@ gNBs =
#initialULBWPmappingType
#0=typeA,1=typeB
initialDLBWPmappingType_0
=
0
;
#this is SS=
2,L=
3
#this is SS=
1,L=1
3
initialDLBWPstartSymbolAndLength_0
=
40
;
initialDLBWPk0_1
=
0
;
...
...
@@ -74,7 +74,7 @@ gNBs =
initialDLBWPk0_3
=
0
;
initialDLBWPmappingType_3
=
0
;
#this is SS=1,L=
4
#this is SS=1,L=
5
initialDLBWPstartSymbolAndLength_3
=
57
;
#uplinkConfigCommon
...
...
@@ -89,7 +89,7 @@ gNBs =
pMax
=
20
;
#initialUplinkBWP
#genericParameters
initialULBWPlocationAndBandwidth
=
13475
;
initialULBWPlocationAndBandwidth
=
6366
;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialULBWPsubcarrierSpacing
=
1
;
...
...
@@ -135,8 +135,8 @@ gNBs =
initialULBWPmappingType_0
=
1
# this is SS=0 L=11
initialULBWPstartSymbolAndLength_0
=
55
;
initialULBWPk2_1
=
6
;
initialULBWPk2_1
=
6
;
initialULBWPmappingType_1
=
1
;
# this is SS=0 L=12
initialULBWPstartSymbolAndLength_1
=
69
;
...
...
@@ -145,7 +145,7 @@ gNBs =
initialULBWPmappingType_2
=
1
;
# this is SS=10 L=4
initialULBWPstartSymbolAndLength_2
=
52
;
msg3_DeltaPreamble
=
1
;
p0_NominalWithGrant
=-
90
;
...
...
@@ -249,7 +249,7 @@ RUs = (
eNB_instances
= [
0
];
#beamforming 1x4 matrix:
bf_weights
= [
0
x00007fff
,
0
x0000
,
0
x0000
,
0
x0000
];
sdr_addrs
=
"
addr=192.168.10.2,second_addr=192.168.20.2"
;
sdr_addrs
=
"addr=192.168.10.2,mgmt_
addr=192.168.10.2,second_addr=192.168.20.2"
;
clock_src
=
"external"
;
}
);
...
...
ci-scripts/reportTestLocally.sh
View file @
cb7e2c11
...
...
@@ -768,55 +768,47 @@ function report_test {
#RA test (--do-ra option)
# Currently disabled
# #build log files names
# RA_ENB_LOG=$ARCHIVES_LOC/${TMODE}_${BW}prb_${CN_CONFIG}_gnb_ra_test.log
# RA_UE_LOG=$ARCHIVES_LOC/ra_check_${TMODE}_${BW}prb_${CN_CONFIG}_ue_ra_test.log
# if [ -f $RA_ENB_LOG ] && [ -f $RA_UE_LOG ]
# then
# #get rid of full path
# NAME_ENB=`echo $RA_ENB_LOG | sed -e "s#$ARCHIVES_LOC/##"`
# NAME_UE=`echo $RA_UE_LOG | sed -e "s#$ARCHIVES_LOC/##"`
# echo " <tr>" >> ./test_simulator_results.html
# echo " <td>$NAME_ENB --- $NAME_UE</td>" >> ./test_simulator_results.html
# echo " <td>Check if RA proc succeeded</td>" >> ./test_simulator_results.html
#
# #gNB RA check
# GNB_RECEIVED=`egrep -c "received correctly" $RA_ENB_LOG`
# GNB_CONNECTED=`egrep -c "now 5G connected" $RA_ENB_LOG`
# #UE RA check
# UE_RA_PROC_OK=`egrep -c "RA procedure succeeded" $RA_UE_LOG`
#
#
# if [ $GNB_RECEIVED -gt 0 ] && [ $GNB_CONNECTED -gt 0 ] && [ $UE_RA_PROC_OK -gt 0 ]
# then
# echo " <td bgcolor = \"green\" >OK</td>" >> ./test_simulator_results.html
# else
# echo " <td bgcolor = \"red\" >KO</td>" >> ./test_simulator_results.html
# fi
#
# echo " <td><pre>" >> ./test_simulator_results.html
# if [ $GNB_RECEIVED -gt 0 ]
# then
# echo "<font color = \"blue\">- gNB --> RA received</font>" >> ./test_simulator_results.html
# else
# echo "<font color = \"red\"><b>- gNB RA NOT RECEIVED</b></font>" >> ./test_simulator_results.html
# fi
# if [ $GNB_CONNECTED -gt 0 ]
# then
# echo "<font color = \"blue\">- gNB --> 5G connected</font>" >> ./test_simulator_results.html
# else
# echo "<font color = \"red\"><b>- gNB NOT 5G CONNECTED</b></font>" >> ./test_simulator_results.html
# fi
# if [ $UE_RA_PROC_OK -gt 0 ]
# then
# echo "<font color = \"blue\">- NR UE --> RA procedure succeded</font>" >> ./test_simulator_results.html
# else
# echo "<font color = \"red\"><b>- NR UE RA procedure failed</b></font>" >> ./test_simulator_results.html
# fi
# echo " </pre></td>" >> ./test_simulator_results.html
# echo " </tr>" >> ./test_simulator_results.html
# fi
#build log files names
RA_ENB_LOG
=
$ARCHIVES_LOC
/
${
TMODE
}
_
${
BW
}
prb_
${
CN_CONFIG
}
_gnb_ra_test.log
RA_UE_LOG
=
$ARCHIVES_LOC
/
${
TMODE
}
_
${
BW
}
prb_
${
CN_CONFIG
}
_ue_ra_test.log
if
[
-f
$RA_ENB_LOG
]
&&
[
-f
$RA_UE_LOG
]
then
#get rid of full path
NAME_ENB
=
`
echo
$RA_ENB_LOG
|
sed
-e
"s#
$ARCHIVES_LOC
/##"
`
NAME_UE
=
`
echo
$RA_UE_LOG
|
sed
-e
"s#
$ARCHIVES_LOC
/##"
`
echo
" <tr>"
>>
./test_simulator_results.html
echo
" <td>
$NAME_ENB
---
$NAME_UE
</td>"
>>
./test_simulator_results.html
echo
" <td>Check if RA proc succeeded</td>"
>>
./test_simulator_results.html
#gNB RA check
GNB_RECEIVED
=
`
egrep
-c
"
\[
RAPROC
\]
PUSCH with TC_RNTI (.+) received correctly"
$RA_ENB_LOG
`
#UE RA check
UE_RA_PROC_OK
=
`
egrep
-c
"
\[
RAPROC
\]
RA procedure succeeded"
$RA_UE_LOG
`
if
[
$GNB_RECEIVED
-gt
0
]
&&
[
$UE_RA_PROC_OK
-gt
0
]
then
echo
" <td bgcolor =
\"
green
\"
>OK</td>"
>>
./test_simulator_results.html
else
echo
" <td bgcolor =
\"
red
\"
>KO</td>"
>>
./test_simulator_results.html
fi
echo
" <td><pre>"
>>
./test_simulator_results.html
if
[
$GNB_RECEIVED
-gt
0
]
then
echo
"<font color =
\"
blue
\"
>- gNB --> RA received</font>"
>>
./test_simulator_results.html
else
echo
"<font color =
\"
red
\"
><b>- gNB RA NOT RECEIVED</b></font>"
>>
./test_simulator_results.html
fi
if
[
$UE_RA_PROC_OK
-gt
0
]
then
echo
"<font color =
\"
blue
\"
>- NR UE --> RA procedure succeded</font>"
>>
./test_simulator_results.html
else
echo
"<font color =
\"
red
\"
><b>- NR UE RA procedure failed</b></font>"
>>
./test_simulator_results.html
fi
echo
" </pre></td>"
>>
./test_simulator_results.html
echo
" </tr>"
>>
./test_simulator_results.html
fi
#SYNC test
ENB_LOG
=
$ARCHIVES_LOC
/
${
TMODE
}
_
${
BW
}
prb_
${
CN_CONFIG
}
_gnb.log
...
...
ci-scripts/runTestOnVM.sh
View file @
cb7e2c11
...
...
@@ -281,14 +281,35 @@ function check_ra_result {
local
LOC_GNB_LOG
=
$1
local
LOC_UE_LOG
=
$2
#gNB RA test
echo
"Checking gNB Log for RA success"
egrep
"received correctly"
$1
egrep
"now 5G connected"
$1
#UE RA test
echo
'Checking UE Log for RA success'
egrep
"RA procedure succeeded"
$2
#if log files exist
if
[
-f
$LOC_GNB_LOG
]
&&
[
-f
$LOC_UE_LOG
]
then
#gNB RA test
#console check
echo
"Checking gNB Log for RA success"
egrep
"
\[
RAPROC
\]
PUSCH with TC_RNTI (.+) received correctly"
$1
#script check
local
GNB_COMPLETE
=
`
egrep
-c
"
\[
RAPROC
\]
PUSCH with TC_RNTI (.+) received correctly"
$1
`
#UE RA test
#console check
echo
'Checking UE Log for RA success'
egrep
"
\[
RAPROC
\]
RA procedure succeeded"
$2
#script check
local
UE_COMPLETE
=
`
egrep
-c
"
\[
RAPROC
\]
RA procedure succeeded"
$2
`
#generate status
if
[
$GNB_COMPLETE
-eq
0
]
||
[
$UE_COMPLETE
-eq
0
]
then
RA_STATUS
=
-1
echo
"RA test FAILED, could not find the markers"
fi
#case where log files do not exist
else
echo
"RA test log files not present"
RA_STATUS
=
-1
fi
}
...
...
@@ -1225,16 +1246,6 @@ function start_rf_sim_gnb {
ssh
-T
-o
StrictHostKeyChecking
=
no ubuntu@
$LOC_GNB_VM_IP_ADDR
<
$1
rm
$1
# For the moment, in RA test, no check and no copy of generated raw files
if
[
$LOC_RA_TEST
-eq
1
]
# RA test
then
sleep
30
echo
"echo
\"
free -m
\"
"
>
$1
echo
"free -m"
>>
$1
ssh
-T
-o
StrictHostKeyChecking
=
no ubuntu@
$LOC_GNB_VM_IP_ADDR
<
$1
rm
$1
return
0
fi
local
i
=
"0"
echo
"egrep -c
\"
got sync
\"
/home/ubuntu/tmp/cmake_targets/log/
$LOC_LOG_FILE
"
>
$1
...
...
@@ -1258,7 +1269,9 @@ function start_rf_sim_gnb {
GNB_SYNC
=
1
echo
"RF-SIM gNB is sync'ed: waiting for UE(s) to connect"
fi
if
[
$LOC_S1_CONFIGURATION
-eq
0
]
# check noS1 config only outside RA test (as it does not support noS1)
if
[
$LOC_S1_CONFIGURATION
-eq
0
]
&&
[
$LOC_RA_TEST
-eq
0
]
then
echo
"ifconfig oaitun_enb1 | egrep -c
\"
inet addr
\"
"
>
$1
# Checking oaitun_enb1 interface has now an IP address
...
...
@@ -1341,14 +1354,6 @@ function start_rf_sim_nr_ue {
ssh
-T
-o
StrictHostKeyChecking
=
no ubuntu@
$LOC_NR_UE_VM_IP_ADDR
<
$1
rm
$1
# In case of RA test mode, no UE sync check for the moment.
# To be removed later?
if
[
$LOC_RA_TEST
-eq
1
]
# RA test
then
sleep
30
NR_UE_SYNC
=
1
return
0
fi
local
i
=
"0"
echo
"egrep -c
\"
Initial sync: pbch decoded sucessfully
\"
/home/ubuntu/tmp/cmake_targets/log/
$LOC_LOG_FILE
"
>
$1
while
[
$i
-lt
10
]
...
...
@@ -1372,11 +1377,13 @@ function start_rf_sim_nr_ue {
else
echo
"RF-SIM NR-UE is sync'ed w/ gNB"
fi
# Checking oaitun_ue1 interface has now an IP address
i
=
"0"
echo
"ifconfig oaitun_ue1 | egrep -c
\"
inet addr
\"
"
>
$1
while
[
$i
-lt
10
]
do
# Checking oaitun_ue1 interface has now an IP address (only outside RA test)
if
[
$LOC_RA_TEST
-eq
0
]
then
i
=
"0"
echo
"ifconfig oaitun_ue1 | egrep -c
\"
inet addr
\"
"
>
$1
while
[
$i
-lt
10
]
do
sleep
5
CONNECTED
=
`
ssh
-T
-o
StrictHostKeyChecking
=
no ubuntu@
$LOC_NR_UE_VM_IP_ADDR
<
$1
`
if
[
$CONNECTED
-eq
1
]
...
...
@@ -1385,21 +1392,20 @@ function start_rf_sim_nr_ue {
else
i
=
$[$i
+1]
fi
done
echo
"echo
\"
free -m
\"
"
>
$1
echo
"free -m"
>>
$1
ssh
-T
-o
StrictHostKeyChecking
=
no ubuntu@
$LOC_NR_UE_VM_IP_ADDR
<
$1
rm
$1
if
[
$i
-lt
50
]
then
done
echo
"echo
\"
free -m
\"
"
>
$1
echo
"free -m"
>>
$1
ssh
-T
-o
StrictHostKeyChecking
=
no ubuntu@
$LOC_NR_UE_VM_IP_ADDR
<
$1
rm
$1
if
[
$i
-lt
50
]
then
NR_UE_SYNC
=
0
echo
"RF-SIM NR-UE oaitun_ue1 is DOWN or NOT CONFIGURED"
else
else
echo
"RF-SIM NR-UE oaitun_ue1 is UP and CONFIGURED"
fi
sleep
10
fi
sleep
10
fi
}
...
...
@@ -2196,10 +2202,11 @@ function run_test_on_vm {
NR_STATUS
=
0
######### start of RA TEST loop
while
[
$try_cnt
-lt
1
]
while
[
$try_cnt
-lt
1
0
]
#10 because it hardly succeed within CI
do
SYNC_STATUS
=
0
RA_STATUS
=
0
echo
"############################################################"
echo
"
${
CN_CONFIG
}
: Starting the gNB"
...
...
@@ -2241,71 +2248,25 @@ function run_test_on_vm {
echo
"############################################################"
# Proper check to be done when RA test is working!
#check_ra_result $ARCHIVES_LOC/$CURRENT_GNB_LOG_FILE $ARCHIVES_LOC/$CURRENT_NR_UE_LOG_FILE
try_cnt
=
$[$try_cnt
+1]
########### end RA test
done
sleep
10
try_cnt
=
"0"
######### start of PHY TEST loop
while
[
$try_cnt
-lt
4
]
do
#start RA test
SYNC_STATUS
=
0
PING_STATUS
=
0
IPERF_STATUS
=
0
echo
"############################################################"
echo
"
${
CN_CONFIG
}
: Starting the gNB"
echo
"############################################################"
CURRENT_GNB_LOG_FILE
=
tdd_
${
PRB
}
prb_
${
CN_CONFIG
}
_gnb.log
#last argument = 1 is to enable --do-ra for RA test
start_rf_sim_gnb
$GNB_VM_CMDS
"
$GNB_VM_IP_ADDR
"
$CURRENT_GNB_LOG_FILE
$PRB
$CONF_FILE
$S1_NOS1_CFG
1
echo
"############################################################"
echo
"
${
CN_CONFIG
}
: Starting the NR-UE"
echo
"############################################################"
CURRENT_NR_UE_LOG_FILE
=
tdd_
${
PRB
}
prb_
${
CN_CONFIG
}
_ue.log
#last argument = 1 is to enable --do-ra for RA test
start_rf_sim_nr_ue
$NR_UE_VM_CMDS
$NR_UE_VM_IP_ADDR
$GNB_VM_IP_ADDR
$CURRENT_NR_UE_LOG_FILE
$PRB
$FREQUENCY
$S1_NOS1_CFG
1
if
[
$NR_UE_SYNC
-eq
0
]
check_ra_result
$ARCHIVES_LOC
/
$CURRENT_GNB_LOG_FILE
$ARCHIVES_LOC
/
$CURRENT_NR_UE_LOG_FILE
if
[
$RA_STATUS
-ne
0
]
then
echo
"Problem w/ gNB and NR-UE not syncing"
terminate_enb_ue_basic_sim
$NR_UE_VM_CMDS
$NR_UE_VM_IP_ADDR
2
terminate_enb_ue_basic_sim
$GNB_VM_CMDS
$GNB_VM_IP_ADDR
1
scp
-o
StrictHostKeyChecking
=
no ubuntu@
$GNB_VM_IP_ADDR
:/home/ubuntu/tmp/cmake_targets/log/
$CURRENT_GNB_LOG_FILE
$ARCHIVES_LOC
scp
-o
StrictHostKeyChecking
=
no ubuntu@
$NR_UE_VM_IP_ADDR
:/home/ubuntu/tmp/cmake_targets/log/
$CURRENT_NR_UE_LOG_FILE
$ARCHIVES_LOC
SYNC_STATUS
=
-1
echo
"RA test NOT OK"
try_cnt
=
$[$try_cnt
+1]
continue
else
try_cnt
=
$[$try_cnt
+10]
fi
done
########### end RA test
sleep
30
echo
"############################################################"
echo
"
${
CN_CONFIG
}
: Terminate gNB/NR-UE simulators"
echo
"############################################################"
sleep
20
terminate_enb_ue_basic_sim
$NR_UE_VM_CMDS
$NR_UE_VM_IP_ADDR
2
terminate_enb_ue_basic_sim
$GNB_VM_CMDS
$GNB_VM_IP_ADDR
1
scp
-o
StrictHostKeyChecking
=
no ubuntu@
$GNB_VM_IP_ADDR
:/home/ubuntu/tmp/cmake_targets/log/
$CURRENT_GNB_LOG_FILE
$ARCHIVES_LOC
scp
-o
StrictHostKeyChecking
=
no ubuntu@
$NR_UE_VM_IP_ADDR
:/home/ubuntu/tmp/cmake_targets/log/
$CURRENT_NR_UE_LOG_FILE
$ARCHIVES_LOC
#check RA markers in gNB and NR UE log files
echo
"############################################################"
echo
"
${
CN_CONFIG
}
: Checking RA on gNB / NR-UE"
echo
"############################################################"
mv
$ARCHIVES_LOC
/
$CURRENT_GNB_LOG_FILE
$ARCHIVES_LOC
/ra_check_
$CURRENT_GNB_LOG_FILE
mv
$ARCHIVES_LOC
/
$CURRENT_NR_UE_LOG_FILE
$ARCHIVES_LOC
/ra_check_
$CURRENT_NR_UE_LOG_FILE
# Proper check to be done when RA test is working!
#check_ra_result $ARCHIVES_LOC/ra_check_$CURRENT_GNB_LOG_FILE $ARCHIVES_LOC/ra_check_$CURRENT_NR_UE_LOG_FILE
######### start of PHY TEST loop
try_cnt
=
"0"
while
[
$try_cnt
-lt
4
]
do
#end RA test
sleep
30
SYNC_STATUS
=
0
PING_STATUS
=
0
...
...
@@ -2409,6 +2370,7 @@ function run_test_on_vm {
echo
"Checking run status"
echo
"############################################################"
if
[
$RA_STATUS
-ne
0
]
;
then
NR_STATUS
=
-1
;
fi
if
[
$SYNC_STATUS
-ne
0
]
;
then
NR_STATUS
=
-1
;
fi
if
[
$PING_STATUS
-ne
0
]
;
then
NR_STATUS
=
-1
;
fi
if
[
$IPERF_STATUS
-ne
0
]
;
then
NR_STATUS
=
-1
;
fi
...
...
common/utils/telnetsrv/telnetsrv_proccmd.c
View file @
cb7e2c11
...
...
@@ -121,9 +121,11 @@ char toksep[2];
case
SCHED_RR
:
lptr
+=
sprintf
(
lptr
,
"%s "
,
"rt: rr"
);
break
;
#ifdef SCHED_DEADLINE
case
SCHED_DEADLINE
:
lptr
+=
sprintf
(
lptr
,
"%s "
,
"rt: deadline"
);
break
;
#endif
default:
lptr
+=
sprintf
(
lptr
,
"%s "
,
"????"
);
break
;
...
...
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
View file @
cb7e2c11
...
...
@@ -478,7 +478,12 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
NR_gNB_ULSCH_t
*
ulsch
=
phy_vars_gNB
->
ulsch
[
UE_id
][
0
];
NR_UL_gNB_HARQ_t
*
harq_process
=
ulsch
->
harq_processes
[
harq_pid
];
if
(
!
harq_process
)
{
LOG_E
(
PHY
,
"ulsch_decoding.c: NULL harq_process pointer
\n
"
);
return
1
;
}
t_nrLDPC_dec_params
decParams
;
t_nrLDPC_dec_params
*
p_decParams
=
&
decParams
;
...
...
@@ -488,11 +493,6 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
phy_vars_gNB
->
nbDecode
=
0
;
harq_process
->
processedSegments
=
0
;
if
(
!
harq_process
)
{
LOG_E
(
PHY
,
"ulsch_decoding.c: NULL harq_process pointer
\n
"
);
return
1
;
}
double
Coderate
=
0
.
0
;
// ------------------------------------------------------------------
...
...
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
View file @
cb7e2c11
...
...
@@ -218,7 +218,7 @@ void phy_procedures_nrUE_TX(PHY_VARS_NR_UE *ue,
/* RACH */
if
(
get_softmodem_params
()
->
do_ra
==
1
)
{
if
((
ue
->
UE_mode
[
gNB_id
]
<
PUSCH
)
&&
(
ue
->
prach_vars
[
gNB_id
]
->
prach_Config_enabled
==
1
))
{
if
((
ue
->
UE_mode
[
gNB_id
]
>
NOT_SYNCHED
&&
ue
->
UE_mode
[
gNB_id
]
<
PUSCH
)
&&
(
ue
->
prach_vars
[
gNB_id
]
->
prach_Config_enabled
==
1
))
{
nr_ue_prach_procedures
(
ue
,
proc
,
gNB_id
,
mode
);
}
}
...
...
@@ -896,6 +896,9 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
int
*
dlsch_errors
,
runmode_t
mode
)
{
if
(
dlsch0
==
NULL
)
AssertFatal
(
0
,
"dlsch0 should be defined at this level
\n
"
);
int
harq_pid
=
dlsch0
->
current_harq_pid
;
int
frame_rx
=
proc
->
frame_rx
;
int
nr_tti_rx
=
proc
->
nr_tti_rx
;
...
...
@@ -923,9 +926,6 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
uint16_t
bw_scaling
,
start_symbol
;
float
tc_factor
;
if
(
dlsch0
==
NULL
)
AssertFatal
(
0
,
"dlsch0 should be defined at this level
\n
"
);
is_cw0_active
=
dlsch0
->
harq_processes
[
harq_pid
]
->
status
;
nb_symb_sch
=
dlsch0
->
harq_processes
[
harq_pid
]
->
nb_symbols
;
start_symbol
=
dlsch0
->
harq_processes
[
harq_pid
]
->
start_symbol
;
...
...
@@ -1354,9 +1354,9 @@ void *UE_thread_slot1_dl_processing(void *arg) {
CPU_ZERO
(
&
cpuset
);
if
(
(
proc
->
sub_frame_start
+
1
)
%
RX_NB_TH
==
0
&&
threads
.
slot1_proc_one
!=
-
1
)
CPU_SET
(
threads
.
slot1_proc_one
,
&
cpuset
);
if
(
(
proc
->
sub_frame_start
+
1
)
%
RX_NB_TH
==
1
&&
threads
.
slot1_proc_two
!=
-
1
)
if
(
RX_NB_TH
>
1
&&
(
proc
->
sub_frame_start
+
1
)
%
RX_NB_TH
==
1
&&
threads
.
slot1_proc_two
!=
-
1
)
CPU_SET
(
threads
.
slot1_proc_two
,
&
cpuset
);
if
(
(
proc
->
sub_frame_start
+
1
)
%
RX_NB_TH
==
2
&&
threads
.
slot1_proc_three
!=
-
1
)
if
(
RX_NB_TH
>
2
&&
(
proc
->
sub_frame_start
+
1
)
%
RX_NB_TH
==
2
&&
threads
.
slot1_proc_three
!=
-
1
)
CPU_SET
(
threads
.
slot1_proc_three
,
&
cpuset
);
init_thread
(
900000
,
1000000
,
FIFO_PRIORITY
-
1
,
&
cpuset
,
...
...
@@ -1823,24 +1823,48 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
if
((
ue
->
dlsch_SI
[
gNB_id
])
&&
(
ue
->
dlsch_SI
[
gNB_id
]
->
active
==
1
))
{
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_SI
,
VCD_FUNCTION_IN
);
nr_ue_pdsch_procedures
(
ue
,
proc
,
gNB_id
,
SI_PDSCH
,
ue
->
dlsch_SI
[
gNB_id
],
NULL
);
proc
,
gNB_id
,
SI_PDSCH
,
ue
->
dlsch_SI
[
gNB_id
],
NULL
);
nr_ue_dlsch_procedures
(
ue
,
proc
,
gNB_id
,
SI_PDSCH
,
ue
->
dlsch_SI
[
gNB_id
],
NULL
,
&
ue
->
dlsch_SI_errors
[
gNB_id
],
mode
);
// deactivate dlsch once dlsch proc is done
ue
->
dlsch_SI
[
gNB_id
]
->
active
=
0
;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_SI
,
VCD_FUNCTION_OUT
);
}
// do procedures for
SI
-RNTI
// do procedures for
P
-RNTI
if
((
ue
->
dlsch_p
[
gNB_id
])
&&
(
ue
->
dlsch_p
[
gNB_id
]
->
active
==
1
))
{
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_P
,
VCD_FUNCTION_IN
);
nr_ue_pdsch_procedures
(
ue
,
proc
,
gNB_id
,
P_PDSCH
,
ue
->
dlsch_p
[
gNB_id
],
NULL
);
proc
,
gNB_id
,
P_PDSCH
,
ue
->
dlsch_p
[
gNB_id
],
NULL
);
nr_ue_dlsch_procedures
(
ue
,
proc
,
gNB_id
,
P_PDSCH
,
ue
->
dlsch_p
[
gNB_id
],
NULL
,
&
ue
->
dlsch_p_errors
[
gNB_id
],
mode
);
// deactivate dlsch once dlsch proc is done
ue
->
dlsch_p
[
gNB_id
]
->
active
=
0
;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_P
,
VCD_FUNCTION_OUT
);
}
...
...
@@ -1849,15 +1873,11 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
if
((
ue
->
dlsch_ra
[
gNB_id
])
&&
(
ue
->
dlsch_ra
[
gNB_id
]
->
active
==
1
))
{
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_RA
,
VCD_FUNCTION_IN
);
nr_ue_pdsch_procedures
(
ue
,
proc
,
gNB_id
,
RA_PDSCH
,
ue
->
dlsch_ra
[
gNB_id
],
NULL
);
// #if UE_TIMING_TRACE
// start_meas(&ue->dlsch_procedures_stat[ue->current_thread_id[nr_tti_rx]]);
// #endif
proc
,
gNB_id
,
RA_PDSCH
,
ue
->
dlsch_ra
[
gNB_id
],
NULL
);
nr_ue_dlsch_procedures
(
ue
,
proc
,
...
...
@@ -1868,18 +1888,10 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
&
ue
->
dlsch_ra_errors
[
gNB_id
],
mode
);
// #if UE_TIMING_TRACE
// stop_meas(&ue->dlsch_procedures_stat[ue->current_thread_id[nr_tti_rx]]);
#if DISABLE_LOG_X
printf
(
"[SFN %d] Slot1: Pdsch Proc %5.2f
\n
"
,
nr_tti_rx
,
ue
->
pdsch_procedures_stat
[
ue
->
current_thread_id
[
nr_tti_rx
]].
p_time
/
(
cpuf
*
1000
.
0
));
printf
(
"[SFN %d] Slot0 Slot1: Dlsch Proc %5.2f
\n
"
,
nr_tti_rx
,
ue
->
dlsch_procedures_stat
[
ue
->
current_thread_id
[
nr_tti_rx
]].
p_time
/
(
cpuf
*
1000
.
0
));
#else
LOG_D
(
PHY
,
"[SFN %d] Slot1: Pdsch Proc %5.2f
\n
"
,
nr_tti_rx
,
ue
->
pdsch_procedures_stat
[
ue
->
current_thread_id
[
nr_tti_rx
]].
p_time
/
(
cpuf
*
1000
.
0
));
LOG_D
(
PHY
,
"[SFN %d] Slot0 Slot1: Dlsch Proc %5.2f
\n
"
,
nr_tti_rx
,
ue
->
dlsch_procedures_stat
[
ue
->
current_thread_id
[
nr_tti_rx
]].
p_time
/
(
cpuf
*
1000
.
0
));
#endif
// #endif
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_RA
,
VCD_FUNCTION_OUT
);
// deactivate dlsch once dlsch proc is done
ue
->
dlsch_ra
[
gNB_id
]
->
active
=
0
;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_RA
,
VCD_FUNCTION_OUT
);
}
// do procedures for C-RNTI
...
...
@@ -1946,71 +1958,8 @@ start_meas(&ue->generic_stat);
}
#endif
// do procedures for SI-RNTI
if
((
ue
->
dlsch_SI
[
gNB_id
])
&&
(
ue
->
dlsch_SI
[
gNB_id
]
->
active
==
1
))
{
nr_ue_pdsch_procedures
(
ue
,
proc
,
gNB_id
,
SI_PDSCH
,
ue
->
dlsch_SI
[
gNB_id
],
NULL
);
/*ue_dlsch_procedures(ue,
proc,
gNB_id,
SI_PDSCH,
ue->dlsch_SI[gNB_id],
NULL,
&ue->dlsch_SI_errors[gNB_id],
mode,
abstraction_flag);
ue->dlsch_SI[gNB_id]->active = 0;*/
}
// do procedures for P-RNTI
if
((
ue
->
dlsch_p
[
gNB_id
])
&&
(
ue
->
dlsch_p
[
gNB_id
]
->
active
==
1
))
{
nr_ue_pdsch_procedures
(
ue
,
proc
,
gNB_id
,
P_PDSCH
,
ue
->
dlsch_p
[
gNB_id
],
NULL
);
/*ue_dlsch_procedures(ue,
proc,
gNB_id,
P_PDSCH,
ue->dlsch_p[gNB_id],
NULL,
&ue->dlsch_p_errors[gNB_id],
mode,
abstraction_flag);*/
ue
->
dlsch_p
[
gNB_id
]
->
active
=
0
;
}
// do procedures for RA-RNTI
if
((
ue
->
dlsch_ra
[
gNB_id
])
&&
(
ue
->
dlsch_ra
[
gNB_id
]
->
active
==
1
))
{
nr_ue_pdsch_procedures
(
ue
,
proc
,
gNB_id
,
RA_PDSCH
,
ue
->
dlsch_ra
[
gNB_id
],
NULL
);
/*ue_dlsch_procedures(ue,
proc,
gNB_id,
RA_PDSCH,
ue->dlsch_ra[gNB_id],
NULL,
&ue->dlsch_ra_errors[gNB_id],
mode,
abstraction_flag);*/
ue
->
dlsch_ra
[
gNB_id
]
->
active
=
0
;
}
// duplicate harq structure
/*
/*
uint8_t current_harq_pid = ue->dlsch[ue->current_thread_id[nr_tti_rx]][gNB_id][0]->current_harq_pid;
NR_DL_UE_HARQ_t *current_harq_processes = ue->dlsch[ue->current_thread_id[nr_tti_rx]][gNB_id][0]->harq_processes[current_harq_pid];
NR_DL_UE_HARQ_t *harq_processes_dest = ue->dlsch[next1_thread_id][gNB_id][0]->harq_processes[current_harq_pid];
...
...
@@ -2138,6 +2087,11 @@ void nr_ue_prach_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX_PRACH
,
VCD_FUNCTION_IN
);
if
(
!
prach_resources
->
init_msg1
&&
(
frame_tx
==
(
ue
->
prach_resources
[
gNB_id
]
->
sync_frame
+
150
)
%
MAX_FRAME_NUMBER
)){
ue
->
prach_cnt
=
0
;
prach_resources
->
init_msg1
=
1
;
}
if
(
ue
->
mac_enabled
==
0
){
// prach_resources->ra_PreambleIndex = preamble_tx;
prach_resources
->
ra_TDD_map_index
=
0
;
...
...
@@ -2158,11 +2112,6 @@ void nr_ue_prach_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t
}
}
if
(
!
prach_resources
->
init_msg1
&&
(
frame_tx
>
ue
->
prach_resources
[
gNB_id
]
->
sync_frame
+
150
)){
ue
->
prach_cnt
=
0
;
prach_resources
->
init_msg1
=
1
;
}
if
(
ue
->
prach_resources
[
gNB_id
]
!=
NULL
&&
nr_prach
==
1
&&
prach_resources
->
init_msg1
)
{
pathloss
=
get_nr_PL
(
mod_id
,
ue
->
CC_id
,
gNB_id
);
...
...
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
View file @
cb7e2c11
...
...
@@ -424,7 +424,7 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
AssertFatal
(
CC_id
==
0
,
"Transmission on secondary CCs is not supported yet
\n
"
);
if
(
UE_mode
<
PUSCH
&&
prach_resources
->
init_msg1
)
{
if
(
prach_resources
->
init_msg1
)
{
LOG_D
(
MAC
,
"nr_ue_get_rach, RA_active value: %d"
,
mac
->
RA_active
);
...
...
targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf
View file @
cb7e2c11
...
...
@@ -45,7 +45,7 @@ gNBs =
dl_carrierBandwidth
=
106
;
#initialDownlinkBWP
#genericParameters
# this is RBstart=
0,L=50
(275*(L-1))+RBstart
# this is RBstart=
41,L=24
(275*(L-1))+RBstart
initialDLBWPlocationAndBandwidth
=
6366
;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
...
...
@@ -74,7 +74,7 @@ gNBs =
initialDLBWPk0_3
=
0
;
initialDLBWPmappingType_3
=
0
;
#this is SS=1,L=
4
#this is SS=1,L=
5
initialDLBWPstartSymbolAndLength_3
=
57
;
#uplinkConfigCommon
...
...
@@ -126,27 +126,26 @@ gNBs =
# SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex
#
msg1_SubcarrierSpacing
=
1
,
# restrictedSetConfig
# 0=unrestricted, 1=restricted type A, 2=restricted type B
restrictedSetConfig
=
0
,
# pusch-ConfigCommon (up to 16 elements)
initialULBWPk2_0
=
6
;
initialULBWPmappingType_0
=
1
# this is SS=0 L=11
initialULBWPstartSymbolAndLength_0
=
55
;
initialULBWPk2_1
=
6
;
initialULBWPk2_1
=
6
;
initialULBWPmappingType_1
=
1
;
# this is SS=0 L=12
initialULBWPstartSymbolAndLength_1
=
69
;
initialULBWPk2_2
=
7
;
initialULBWPk2_2
=
7
;
initialULBWPmappingType_2
=
1
;
# this is SS=10 L=4
initialULBWPstartSymbolAndLength_2
=
52
;
msg3_DeltaPreamble
=
1
;
p0_NominalWithGrant
=-
90
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment