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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG-RAN
Commits
fd2f61de
Commit
fd2f61de
authored
Dec 03, 2021
by
Melissa Elkadi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'eurecom-develop' into eurecom-episys-merge-nsa
parents
3fac8bd2
0ac69fb1
Changes
25
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
500 additions
and
1158 deletions
+500
-1158
ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf
...pts/conf_files/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf
+1
-1
ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf
...cripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf
+1
-0
ci-scripts/sshconnection.py
ci-scripts/sshconnection.py
+1
-1
ci-scripts/xml_files/fr1_nsa_quectel.xml
ci-scripts/xml_files/fr1_nsa_quectel.xml
+1
-1
ci-scripts/yaml_files/nsa_b200_gnb/docker-compose.yml
ci-scripts/yaml_files/nsa_b200_gnb/docker-compose.yml
+1
-1
common/utils/T/T_messages.txt
common/utils/T/T_messages.txt
+4
-0
common/utils/T/tracer/macpdu2wireshark.c
common/utils/T/tracer/macpdu2wireshark.c
+115
-61
docker/Dockerfile.eNB.ubuntu18
docker/Dockerfile.eNB.ubuntu18
+1
-0
docker/Dockerfile.gNB.ubuntu18
docker/Dockerfile.gNB.ubuntu18
+1
-0
docker/Dockerfile.lteUE.ubuntu18
docker/Dockerfile.lteUE.ubuntu18
+1
-0
docker/Dockerfile.nrUE.ubuntu18
docker/Dockerfile.nrUE.ubuntu18
+1
-0
executables/nr-ue.c
executables/nr-ue.c
+0
-6
openair1/PHY/NR_TRANSPORT/pucch_rx.c
openair1/PHY/NR_TRANSPORT/pucch_rx.c
+5
-5
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
+251
-973
openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h
openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h
+0
-18
openair1/PHY/defs_nr_UE.h
openair1/PHY/defs_nr_UE.h
+22
-0
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
+27
-53
openair1/SIMULATION/NR_PHY/dlschsim.c
openair1/SIMULATION/NR_PHY/dlschsim.c
+6
-3
openair1/SIMULATION/NR_PHY/dlsim.c
openair1/SIMULATION/NR_PHY/dlsim.c
+2
-6
openair1/SIMULATION/NR_PHY/pucchsim.c
openair1/SIMULATION/NR_PHY/pucchsim.c
+10
-5
openair2/LAYER2/NR_MAC_gNB/config.c
openair2/LAYER2/NR_MAC_gNB/config.c
+18
-5
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
+3
-0
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+22
-12
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
+1
-7
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
+5
-0
No files found.
ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf
View file @
fd2f61de
...
...
@@ -263,7 +263,7 @@ L1s = (
{
num_cc
=
1
;
tr_n_preference
=
"local_mac"
;
pusch_proc_threads
=
2
;
pusch_proc_threads
=
4
;
prach_dtx_threshold
=
120
;
# pucch0_dtx_threshold = 150;
}
...
...
ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf
View file @
fd2f61de
...
...
@@ -250,6 +250,7 @@ RUs = (
max_pdschReferenceSignalPower
= -
27
;
max_rxgain
=
111
;
eNB_instances
= [
0
];
# sdr_addrs = "serial=30C51D4";
# clock_src = "external";
}
);
...
...
ci-scripts/sshconnection.py
View file @
fd2f61de
...
...
@@ -100,7 +100,7 @@ class SSHConnection():
time
.
sleep
(
1
)
count
+=
1
if
connect_status
:
pass
self
.
command
(
'unset HISTFILE'
,
'\$'
,
5
,
silent
=
True
)
else
:
sys
.
exit
(
'SSH Connection Failed'
)
self
.
ipaddress
=
ipaddress
...
...
ci-scripts/xml_files/fr1_nsa_quectel.xml
View file @
fd2f61de
...
...
@@ -73,7 +73,7 @@
<testCase
id=
"040000"
>
<class>
Initialize_eNB
</class>
<desc>
Initialize gNB
</desc>
<Initialize_eNB_args>
-O ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf -E -q --
usrp-arg
s "serial=30C51D4"
</Initialize_eNB_args>
<Initialize_eNB_args>
-O ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf -E -q --
RUs.[0].sdr_addr
s "serial=30C51D4"
</Initialize_eNB_args>
<eNB_instance>
1
</eNB_instance>
<eNB_serverId>
1
</eNB_serverId>
<air_interface>
nr
</air_interface>
...
...
ci-scripts/yaml_files/nsa_b200_gnb/docker-compose.yml
View file @
fd2f61de
...
...
@@ -26,7 +26,7 @@ services:
FLEXRAN_INTERFACE_NAME
:
eth0
FLEXRAN_IPV4_ADDRESS
:
192.168.18.210
THREAD_PARALLEL_CONFIG
:
PARALLEL_RU_L1_TRX_SPLIT
USE_ADDITIONAL_OPTIONS
:
'
-E
-q
--usrp-args
"serial=30C51D4"'
USE_ADDITIONAL_OPTIONS
:
-E -q --RUs.[0].sdr_addrs serial=30C51D4
volumes
:
-
/dev:/dev
networks
:
...
...
common/utils/T/T_messages.txt
View file @
fd2f61de
...
...
@@ -155,6 +155,10 @@ ID = GNB_MAC_DL_RAR_PDU_WITH_DATA
DESC = NR MAC downlink PDU for RAR
GROUP = ALL:MAC:GNB:WIRESHARK
FORMAT = int,gNB_ID : int,CC_id : int,rnti : int,frame : int,slot : int,harq_pid : buffer,data
ID = GNB_MAC_RETRANSMISSION_DL_PDU_WITH_DATA
DESC = NR MAC downlink retransmitted PDU for an UE
GROUP = ALL:MAC:GNB:WIRESHARK
FORMAT = int,gNB_ID : int,CC_id : int,rnti : int,frame : int,slot : int,harq_pid : int,round : buffer,data
#RLC logs
ID = ENB_RLC_DL
...
...
common/utils/T/tracer/macpdu2wireshark.c
View file @
fd2f61de
This diff is collapsed.
Click to expand it.
docker/Dockerfile.eNB.ubuntu18
View file @
fd2f61de
...
...
@@ -96,6 +96,7 @@ COPY --from=enb-build /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1 .
COPY --from=enb-build /usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.65.1 .
COPY --from=enb-build /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 .
COPY --from=enb-build /usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 .
COPY --from=enb-build /usr/lib/x86_64-linux-gnu/libboost_program_options.so.1.65.1 .
RUN ldconfig
...
...
docker/Dockerfile.gNB.ubuntu18
View file @
fd2f61de
...
...
@@ -100,6 +100,7 @@ COPY --from=gnb-build /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1 .
COPY --from=gnb-build /usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.65.1 .
COPY --from=gnb-build /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 .
COPY --from=gnb-build /usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 .
COPY --from=gnb-build /usr/lib/x86_64-linux-gnu/libboost_program_options.so.1.65.1 .
RUN ldconfig
...
...
docker/Dockerfile.lteUE.ubuntu18
View file @
fd2f61de
...
...
@@ -101,6 +101,7 @@ COPY --from=lte-ue-build /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1 .
COPY --from=lte-ue-build /usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.65.1 .
COPY --from=lte-ue-build /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 .
COPY --from=lte-ue-build /usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 .
COPY --from=lte-ue-build /usr/lib/x86_64-linux-gnu/libboost_program_options.so.1.65.1 .
RUN ldconfig
...
...
docker/Dockerfile.nrUE.ubuntu18
View file @
fd2f61de
...
...
@@ -102,6 +102,7 @@ COPY --from=nr-ue-build /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1 .
COPY --from=nr-ue-build /usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.65.1 .
COPY --from=nr-ue-build /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 .
COPY --from=nr-ue-build /usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 .
COPY --from=nr-ue-build /usr/lib/x86_64-linux-gnu/libboost_program_options.so.1.65.1 .
RUN ldconfig
...
...
executables/nr-ue.c
View file @
fd2f61de
...
...
@@ -1160,12 +1160,6 @@ void init_NR_UE_threads(int nb_inst) {
LOG_I
(
PHY
,
"Intializing UE Threads for instance %d (%p,%p)...
\n
"
,
inst
,
PHY_vars_UE_g
[
inst
],
PHY_vars_UE_g
[
inst
][
0
]);
threadCreate
(
&
threads
[
inst
],
UE_thread
,
(
void
*
)
UE
,
"UEthread"
,
-
1
,
OAI_PRIORITY_RT_MAX
);
if
(
get_nrUE_params
()
->
nr_dlsch_parallel
)
{
pthread_t
dlsch0_threads
;
threadCreate
(
&
dlsch0_threads
,
dlsch_thread
,
(
void
*
)
UE
,
"DLthread"
,
-
1
,
OAI_PRIORITY_RT_MAX
-
1
);
}
}
}
...
...
openair1/PHY/NR_TRANSPORT/pucch_rx.c
View file @
fd2f61de
...
...
@@ -431,8 +431,8 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
uci_pdu
->
harq
->
num_harq
=
1
;
uci_pdu
->
harq
->
harq_confidence_level
=
no_conf
?
1
:
0
;
uci_pdu
->
harq
->
harq_list
=
(
nfapi_nr_harq_t
*
)
malloc
(
1
);
uci_pdu
->
harq
->
harq_list
[
0
].
harq_value
=
index
&
0x01
;
LOG_D
(
PHY
,
"[DLSCH/PDSCH/PUCCH] %d.%d HARQ value %d
with confidence level (0 is good, 1 is bad) %d
xrt_mag %d xrt_mag_next %d n0 %d (%d,%d) pucch0_thres %d, cqi %d, SNRtimes10 %d, energy %f, sync_pos %d
\n
"
,
uci_pdu
->
harq
->
harq_list
[
0
].
harq_value
=
!
(
index
&
0x01
)
;
LOG_D
(
PHY
,
"[DLSCH/PDSCH/PUCCH] %d.%d HARQ value %d
(0 pass, 1 fail) with confidence level %d (0 is good, 1 is bad)
xrt_mag %d xrt_mag_next %d n0 %d (%d,%d) pucch0_thres %d, cqi %d, SNRtimes10 %d, energy %f, sync_pos %d
\n
"
,
frame
,
slot
,
uci_pdu
->
harq
->
harq_list
[
0
].
harq_value
,
uci_pdu
->
harq
->
harq_confidence_level
,
xrtmag_dBtimes10
,
xrtmag_next_dBtimes10
,
max_n0
,
uci_stats
->
pucch0_n00
,
uci_stats
->
pucch0_n01
,
uci_stats
->
pucch0_thres
,
cqi
,
SNRtimes10
,
10
*
log10
((
double
)
sigenergy
),
gNB
->
ulsch_stats
[
0
].
sync_pos
);
if
(
pucch_pdu
->
sr_flag
==
1
)
{
uci_pdu
->
sr
=
calloc
(
1
,
sizeof
(
*
uci_pdu
->
sr
));
...
...
@@ -447,9 +447,9 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
uci_pdu
->
harq
->
num_harq
=
2
;
uci_pdu
->
harq
->
harq_confidence_level
=
(
no_conf
)
?
1
:
0
;
uci_pdu
->
harq
->
harq_list
=
(
nfapi_nr_harq_t
*
)
malloc
(
2
);
uci_pdu
->
harq
->
harq_list
[
1
].
harq_value
=
index
&
0x01
;
uci_pdu
->
harq
->
harq_list
[
0
].
harq_value
=
(
index
>>
1
)
&
0x01
;
LOG_D
(
PHY
,
"[DLSCH/PDSCH/PUCCH] %d.%d HARQ values %d
and %d with confidence level (0 is good, 1 is bad) %d
, xrt_mag %d xrt_mag_next %d n0 %d (%d,%d) pucch0_thres %d, cqi %d, SNRtimes10 %d,sync_pos %d
\n
"
,
uci_pdu
->
harq
->
harq_list
[
1
].
harq_value
=
!
(
index
&
0x01
)
;
uci_pdu
->
harq
->
harq_list
[
0
].
harq_value
=
!
((
index
>>
1
)
&
0x01
)
;
LOG_D
(
PHY
,
"[DLSCH/PDSCH/PUCCH] %d.%d HARQ values %d
(0 pass, 1 fail) and %d with confidence level %d (0 is good, 1 is bad)
, xrt_mag %d xrt_mag_next %d n0 %d (%d,%d) pucch0_thres %d, cqi %d, SNRtimes10 %d,sync_pos %d
\n
"
,
frame
,
slot
,
uci_pdu
->
harq
->
harq_list
[
1
].
harq_value
,
uci_pdu
->
harq
->
harq_list
[
0
].
harq_value
,
uci_pdu
->
harq
->
harq_confidence_level
,
xrtmag_dBtimes10
,
xrtmag_next_dBtimes10
,
max_n0
,
uci_stats
->
pucch0_n00
,
uci_stats
->
pucch0_n01
,
uci_stats
->
pucch0_thres
,
cqi
,
SNRtimes10
,
gNB
->
ulsch_stats
[
0
].
sync_pos
);
if
(
pucch_pdu
->
sr_flag
==
1
)
{
uci_pdu
->
sr
=
calloc
(
1
,
sizeof
(
*
uci_pdu
->
sr
));
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
View file @
fd2f61de
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h
View file @
fd2f61de
...
...
@@ -1087,22 +1087,6 @@ uint8_t nr_ue_pusch_common_procedures(PHY_VARS_NR_UE *UE,
NR_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
Nl
);
uint32_t
nr_dlsch_decoding_mthread
(
PHY_VARS_NR_UE
*
phy_vars_ue
,
UE_nr_rxtx_proc_t
*
proc
,
int
eNB_id
,
short
*
dlsch_llr
,
NR_DL_FRAME_PARMS
*
frame_parms
,
NR_UE_DLSCH_t
*
dlsch
,
NR_DL_UE_HARQ_t
*
harq_process
,
uint32_t
frame
,
uint16_t
nb_symb_sch
,
uint8_t
nr_slot_rx
,
uint8_t
harq_pid
,
uint8_t
is_crnti
,
uint8_t
llr8_flag
);
void
*
nr_dlsch_decoding_2thread0
(
void
*
arg
);
void
*
nr_dlsch_decoding_2thread1
(
void
*
arg
);
...
...
@@ -1750,8 +1734,6 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
int32_t
generate_nr_prach
(
PHY_VARS_NR_UE
*
ue
,
uint8_t
gNB_id
,
uint8_t
subframe
);
void
dump_nrdlsch
(
PHY_VARS_NR_UE
*
ue
,
uint8_t
gNB_id
,
uint8_t
nr_slot_rx
,
unsigned
int
*
coded_bits_per_codeword
,
int
round
,
unsigned
char
harq_pid
);
void
*
dlsch_thread
(
void
*
arg
);
/**@}*/
#endif
openair1/PHY/defs_nr_UE.h
View file @
fd2f61de
...
...
@@ -1078,5 +1078,27 @@ typedef struct nr_rxtx_thread_data_s {
notifiedFIFO_t
txFifo
;
}
nr_rxtx_thread_data_t
;
typedef
struct
LDPCDecode_ue_s
{
PHY_VARS_NR_UE
*
phy_vars_ue
;
NR_DL_UE_HARQ_t
*
harq_process
;
t_nrLDPC_dec_params
decoderParms
;
NR_UE_DLSCH_t
*
dlsch
;
short
*
dlsch_llr
;
int
dlsch_id
;
int
harq_pid
;
int
rv_index
;
int
A
;
int
E
;
int
Kc
;
int
Qm
;
int
Kr_bytes
;
int
nbSegments
;
int
segment_r
;
int
r_offset
;
int
offset
;
int
Tbslbrm
;
int
decodeIterations
;
}
ldpcDecode_ue_t
;
#include "SIMULATION/ETH_TRANSPORT/defs.h"
#endif
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
View file @
fd2f61de
...
...
@@ -981,37 +981,23 @@ bool nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
start_meas
(
&
ue
->
dlsch_decoding_stats
[
proc
->
thread_id
]);
ret
=
nr_dlsch_decoding
(
ue
,
proc
,
gNB_id
,
pdsch_vars
->
llr
[
0
],
&
ue
->
frame_parms
,
dlsch0
,
dlsch0
->
harq_processes
[
harq_pid
],
frame_rx
,
nb_symb_sch
,
nr_slot_rx
,
harq_pid
,
pdsch
==
PDSCH
?
1
:
0
,
dlsch0
->
harq_processes
[
harq_pid
]
->
TBS
>
256
?
1
:
0
);
if
(
dlsch_parallel
)
{
ret
=
nr_dlsch_decoding_mthread
(
ue
,
proc
,
gNB_id
,
pdsch_vars
->
llr
[
0
],
&
ue
->
frame_parms
,
dlsch0
,
dlsch0
->
harq_processes
[
harq_pid
],
frame_rx
,
nb_symb_sch
,
nr_slot_rx
,
harq_pid
,
pdsch
==
PDSCH
?
1
:
0
,
dlsch0
->
harq_processes
[
harq_pid
]
->
TBS
>
256
?
1
:
0
);
LOG_T
(
PHY
,
"dlsch decoding is parallelized, ret = %d
\n
"
,
ret
);
}
else
{
ret
=
nr_dlsch_decoding
(
ue
,
proc
,
gNB_id
,
pdsch_vars
->
llr
[
0
],
&
ue
->
frame_parms
,
dlsch0
,
dlsch0
->
harq_processes
[
harq_pid
],
frame_rx
,
nb_symb_sch
,
nr_slot_rx
,
harq_pid
,
pdsch
==
PDSCH
?
1
:
0
,
dlsch0
->
harq_processes
[
harq_pid
]
->
TBS
>
256
?
1
:
0
);
LOG_T
(
PHY
,
"Sequential dlsch decoding , ret = %d
\n
"
,
ret
);
}
...
...
@@ -1083,36 +1069,24 @@ bool nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
start_meas
(
&
ue
->
dlsch_decoding_stats
[
proc
->
thread_id
]);
ret1
=
nr_dlsch_decoding
(
ue
,
proc
,
gNB_id
,
pdsch_vars
->
llr
[
1
],
&
ue
->
frame_parms
,
dlsch1
,
dlsch1
->
harq_processes
[
harq_pid
],
frame_rx
,
nb_symb_sch
,
nr_slot_rx
,
harq_pid
,
pdsch
==
PDSCH
?
1
:
0
,
//proc->decoder_switch,
dlsch1
->
harq_processes
[
harq_pid
]
->
TBS
>
256
?
1
:
0
);
if
(
dlsch_parallel
)
{
ret1
=
nr_dlsch_decoding_mthread
(
ue
,
proc
,
gNB_id
,
pdsch_vars
->
llr
[
1
],
&
ue
->
frame_parms
,
dlsch1
,
dlsch1
->
harq_processes
[
harq_pid
],
frame_rx
,
nb_symb_sch
,
nr_slot_rx
,
harq_pid
,
pdsch
==
PDSCH
?
1
:
0
,
dlsch1
->
harq_processes
[
harq_pid
]
->
TBS
>
256
?
1
:
0
);
LOG_T
(
PHY
,
"CW dlsch decoding is parallelized, ret1 = %d
\n
"
,
ret1
);
}
else
{
ret1
=
nr_dlsch_decoding
(
ue
,
proc
,
gNB_id
,
pdsch_vars
->
llr
[
1
],
&
ue
->
frame_parms
,
dlsch1
,
dlsch1
->
harq_processes
[
harq_pid
],
frame_rx
,
nb_symb_sch
,
nr_slot_rx
,
harq_pid
,
pdsch
==
PDSCH
?
1
:
0
,
//proc->decoder_switch,
dlsch1
->
harq_processes
[
harq_pid
]
->
TBS
>
256
?
1
:
0
);
LOG_T
(
PHY
,
"CWW sequential dlsch decoding, ret1 = %d
\n
"
,
ret1
);
}
...
...
openair1/SIMULATION/NR_PHY/dlschsim.c
View file @
fd2f61de
...
...
@@ -109,6 +109,7 @@ int main(int argc, char **argv)
int
ret
;
//int run_initial_sync=0;
int
loglvl
=
OAILOG_WARNING
;
uint8_t
dlsch_threads
=
0
;
float
target_error_rate
=
0
.
01
;
uint64_t
SSB_positions
=
0x01
;
uint16_t
nb_symb_sch
=
12
;
...
...
@@ -138,9 +139,9 @@ int main(int argc, char **argv)
break;*/
/*
case 'd':
frame_type = 1
;
break;
*/
case
'd'
:
dlsch_threads
=
atoi
(
optarg
)
;
break
;
case
'g'
:
switch
((
char
)
*
optarg
)
{
...
...
@@ -320,6 +321,7 @@ int main(int argc, char **argv)
//printf("-C Generate Calibration information for Abstraction (effective SNR adjustment to remove Pe bias w.r.t. AWGN)\n");
//printf("-f Output filename (.txt format) for Pe/SNR results\n");
printf
(
"-F Input filename (.txt format) for RX conformance testing
\n
"
);
printf
(
"-d number of dlsch threads, 0: no dlsch parallelization
\n
"
);
exit
(
-
1
);
break
;
}
...
...
@@ -331,6 +333,7 @@ int main(int argc, char **argv)
if
(
snr1set
==
0
)
snr1
=
snr0
+
10
;
init_dlsch_tpool
(
dlsch_threads
);
if
(
ouput_vcd
)
vcd_signal_dumper_init
(
"/tmp/openair_dump_nr_dlschsim.vcd"
);
...
...
openair1/SIMULATION/NR_PHY/dlsim.c
View file @
fd2f61de
...
...
@@ -688,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
*
));
...
...
@@ -980,11 +980,7 @@ 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
));
...
...
openair1/SIMULATION/NR_PHY/pucchsim.c
View file @
fd2f61de
...
...
@@ -662,14 +662,19 @@ int main(int argc, char **argv)
if
(
uci_pdu
.
sr
->
sr_indication
==
0
||
uci_pdu
.
sr
->
sr_confidence_level
==
1
)
sr_errors
+=
1
;
}
// harq value 0 -> pass
// confidence value 0 -> good confidence
const
int
harq_value0
=
uci_pdu
.
harq
->
harq_list
[
0
].
harq_value
;
const
int
harq_value1
=
uci_pdu
.
harq
->
harq_list
[
1
].
harq_value
;
const
int
confidence_lvl
=
uci_pdu
.
harq
->
harq_confidence_level
;
if
(
nr_bit
>
0
){
if
(
nr_bit
==
1
&&
do_DTX
==
0
)
ack_nack_errors
+=
(
actual_payload
^
uci_pdu
.
harq
->
harq_list
[
0
].
harq_value
);
ack_nack_errors
+=
(
actual_payload
^
(
!
harq_value0
)
);
else
if
(
do_DTX
==
0
)
ack_nack_errors
+=
(((
actual_payload
&
1
)
^
uci_pdu
.
harq
->
harq_list
[
0
].
harq_value
)
+
((
actual_payload
>>
1
)
^
uci_pdu
.
harq
->
harq_list
[
1
].
harq_value
));
else
if
((
uci_pdu
.
harq
->
harq_confidence_level
==
0
&&
uci_pdu
.
harq
->
harq_list
[
0
].
harq_value
==
1
)
||
(
uci_pdu
.
harq
->
harq_confidence_level
==
0
&&
nr_bit
==
2
&&
uci_pdu
.
harq
->
harq_list
[
1
].
harq_value
==
1
))
ack_nack_errors
++
;
ack_nack_errors
+=
(((
actual_payload
&
1
)
^
(
!
harq_value0
))
+
((
actual_payload
>>
1
)
^
(
!
harq_value1
)
));
else
if
((
!
confidence_lvl
&&
!
harq_value0
)
||
(
!
confidence_lvl
&&
nr_bit
==
2
&&
!
harq_value
1
))
ack_nack_errors
++
;
free
(
uci_pdu
.
harq
->
harq_list
);
}
}
...
...
openair2/LAYER2/NR_MAC_gNB/config.c
View file @
fd2f61de
...
...
@@ -610,12 +610,25 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
UE_info
->
CellGroup
[
UE_id
]
=
CellGroup
;
LOG_I
(
NR_MAC
,
"Modified UE_id %d/%x with CellGroup
\n
"
,
UE_id
,
rnti
);
process_CellGroup
(
CellGroup
,
&
UE_info
->
UE_sched_ctrl
[
UE_id
]);
const
NR_ServingCellConfig_t
*
servingCellConfig
=
CellGroup
?
CellGroup
->
spCellConfig
->
spCellConfigDedicated
:
NULL
;
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
];
const
NR_PDSCH_ServingCellConfig_t
*
pdsch
=
servingCellConfig
?
servingCellConfig
->
pdsch_ServingCellConfig
->
choice
.
setup
:
NULL
;
if
(
sched_ctrl
->
available_dl_harq
.
len
==
0
)
{
// add all available DL HARQ processes for this UE in SA
create_dl_harq_list
(
sched_ctrl
,
pdsch
);
}
else
{
const
int
nrofHARQ
=
pdsch
&&
pdsch
->
nrofHARQ_ProcessesForPDSCH
?
get_nrofHARQ_ProcessesForPDSCH
(
*
pdsch
->
nrofHARQ_ProcessesForPDSCH
)
:
8
;
AssertFatal
(
sched_ctrl
->
available_dl_harq
.
len
==
nrofHARQ
,
"Reconfiguration of available harq processes not yet supported
\n
"
);
}
// update coreset/searchspace
void
*
bwpd
=
NULL
;
target_ss
=
NR_SearchSpace__searchSpaceType_PR_common
;
if
((
UE_info
->
UE_sched_ctrl
[
UE_id
].
active_bwp
))
{
if
((
sched_ctrl
->
active_bwp
))
{
target_ss
=
NR_SearchSpace__searchSpaceType_PR_ue_Specific
;
bwpd
=
(
void
*
)
UE_info
->
UE_sched_ctrl
[
UE_id
].
active_bwp
->
bwp_Dedicated
;
bwpd
=
(
void
*
)
sched_ctrl
->
active_bwp
->
bwp_Dedicated
;
}
else
if
(
CellGroup
->
spCellConfig
&&
CellGroup
->
spCellConfig
->
spCellConfigDedicated
&&
...
...
@@ -623,9 +636,9 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
target_ss
=
NR_SearchSpace__searchSpaceType_PR_ue_Specific
;
bwpd
=
(
void
*
)
CellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
;
}
UE_info
->
UE_sched_ctrl
[
UE_id
].
search_space
=
get_searchspace
(
scc
,
bwpd
,
target_ss
);
UE_info
->
UE_sched_ctrl
[
UE_id
].
coreset
=
get_coreset
(
Mod_idP
,
scc
,
bwpd
,
UE_info
->
UE_sched_ctrl
[
UE_id
].
search_space
,
target_ss
);
UE_info
->
UE_sched_ctrl
[
UE_id
].
maxL
=
2
;
sched_ctrl
->
search_space
=
get_searchspace
(
scc
,
bwpd
,
target_ss
);
sched_ctrl
->
coreset
=
get_coreset
(
Mod_idP
,
scc
,
bwpd
,
sched_ctrl
->
search_space
,
target_ss
);
sched_ctrl
->
maxL
=
2
;
}
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_MAC_CONFIG
,
VCD_FUNCTION_OUT
);
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
View file @
fd2f61de
...
...
@@ -1199,6 +1199,9 @@ void nr_schedule_ue_spec(module_id_t module_id,
"UE %d mismatch between scheduled TBS and buffered TB for HARQ PID %d
\n
"
,
UE_id
,
current_harq_pid
);
T
(
T_GNB_MAC_RETRANSMISSION_DL_PDU_WITH_DATA
,
T_INT
(
module_id
),
T_INT
(
CC_id
),
T_INT
(
rnti
),
T_INT
(
frame
),
T_INT
(
slot
),
T_INT
(
current_harq_pid
),
T_INT
(
harq
->
round
),
T_BUFFER
(
harq
->
tb
,
TBS
));
}
else
{
/* initial transmission */
LOG_D
(
NR_MAC
,
"[%s] Initial HARQ transmission in %d.%d
\n
"
,
__FUNCTION__
,
frame
,
slot
);
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
fd2f61de
...
...
@@ -1971,8 +1971,8 @@ int add_new_nr_ue(module_id_t mod_idP, rnti_t rntiP, NR_CellGroupConfig_t *CellG
if
(
bwpList
)
AssertFatal
(
bwpList
->
list
.
count
==
1
,
"downlinkBWP_ToAddModList has %d BWP!
\n
"
,
bwpList
->
list
.
count
);
const
int
bwp_id
=
1
;
sched_ctrl
->
active_bwp
=
bwpList
?
bwpList
->
list
.
array
[
bwp_id
-
1
]
:
NULL
;
const
int
bwp_id
=
servingCellConfig
?
*
servingCellConfig
->
firstActiveDownlinkBWP_Id
:
0
;
sched_ctrl
->
active_bwp
=
bwpList
&&
bwp_id
>
0
?
bwpList
->
list
.
array
[
bwp_id
-
1
]
:
NULL
;
const
int
target_ss
=
sched_ctrl
->
active_bwp
?
NR_SearchSpace__searchSpaceType_PR_ue_Specific
:
NR_SearchSpace__searchSpaceType_PR_common
;
sched_ctrl
->
search_space
=
get_searchspace
(
scc
,
sched_ctrl
->
active_bwp
?
sched_ctrl
->
active_bwp
->
bwp_Dedicated
:
NULL
,
...
...
@@ -1984,23 +1984,20 @@ int add_new_nr_ue(module_id_t mod_idP, rnti_t rntiP, NR_CellGroupConfig_t *CellG
if
(
ubwpList
)
AssertFatal
(
ubwpList
->
list
.
count
==
1
,
"uplinkBWP_ToAddModList has %d BWP!
\n
"
,
ubwpList
->
list
.
count
);
sched_ctrl
->
active_ubwp
=
ubwpList
?
ubwpList
->
list
.
array
[
bwp_id
-
1
]
:
NULL
;
const
int
ul_bwp_id
=
servingCellConfig
?
*
servingCellConfig
->
uplinkConfig
->
firstActiveUplinkBWP_Id
:
0
;
sched_ctrl
->
active_ubwp
=
ubwpList
&&
ul_bwp_id
>
0
?
ubwpList
->
list
.
array
[
ul_bwp_id
-
1
]
:
NULL
;
/* get Number of HARQ processes for this UE */
if
(
servingCellConfig
)
AssertFatal
(
servingCellConfig
->
pdsch_ServingCellConfig
->
present
==
NR_SetupRelease_PDSCH_ServingCellConfig_PR_setup
,
"no pdsch-ServingCellConfig found for UE %d
\n
"
,
UE_id
);
const
NR_PDSCH_ServingCellConfig_t
*
pdsch
=
servingCellConfig
?
servingCellConfig
->
pdsch_ServingCellConfig
->
choice
.
setup
:
NULL
;
const
int
nrofHARQ
=
pdsch
?
(
pdsch
->
nrofHARQ_ProcessesForPDSCH
?
get_nrofHARQ_ProcessesForPDSCH
(
*
pdsch
->
nrofHARQ_ProcessesForPDSCH
)
:
8
)
:
8
;
// add all available DL HARQ processes for this UE
create_nr_list
(
&
sched_ctrl
->
available_dl_harq
,
nrofHARQ
);
for
(
int
harq
=
0
;
harq
<
nrofHARQ
;
harq
++
)
add_tail_nr_list
(
&
sched_ctrl
->
available_dl_harq
,
harq
);
create_nr_list
(
&
sched_ctrl
->
feedback_dl_harq
,
nrofHARQ
);
create_nr_list
(
&
sched_ctrl
->
retrans_dl_harq
,
nrofHARQ
);
// add DL HARQ processes for this UE only in NSA
// (SA still doesn't have information on nrofHARQ_ProcessesForPDSCH at this stage)
if
(
!
get_softmodem_params
()
->
sa
)
create_dl_harq_list
(
sched_ctrl
,
pdsch
);
// add all available UL HARQ processes for this UE
// nb of ul harq processes not configurable
create_nr_list
(
&
sched_ctrl
->
available_ul_harq
,
16
);
for
(
int
harq
=
0
;
harq
<
16
;
harq
++
)
add_tail_nr_list
(
&
sched_ctrl
->
available_ul_harq
,
harq
);
...
...
@@ -2020,6 +2017,19 @@ int add_new_nr_ue(module_id_t mod_idP, rnti_t rntiP, NR_CellGroupConfig_t *CellG
return
-
1
;
}
void
create_dl_harq_list
(
NR_UE_sched_ctrl_t
*
sched_ctrl
,
const
NR_PDSCH_ServingCellConfig_t
*
pdsch
)
{
const
int
nrofHARQ
=
pdsch
&&
pdsch
->
nrofHARQ_ProcessesForPDSCH
?
get_nrofHARQ_ProcessesForPDSCH
(
*
pdsch
->
nrofHARQ_ProcessesForPDSCH
)
:
8
;
// add all available DL HARQ processes for this UE
create_nr_list
(
&
sched_ctrl
->
available_dl_harq
,
nrofHARQ
);
for
(
int
harq
=
0
;
harq
<
nrofHARQ
;
harq
++
)
add_tail_nr_list
(
&
sched_ctrl
->
available_dl_harq
,
harq
);
create_nr_list
(
&
sched_ctrl
->
feedback_dl_harq
,
nrofHARQ
);
create_nr_list
(
&
sched_ctrl
->
retrans_dl_harq
,
nrofHARQ
);
}
/* hack data to remove UE in the phy */
int
rnti_to_remove
[
10
];
volatile
int
rnti_to_remove_count
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
View file @
fd2f61de
...
...
@@ -1102,13 +1102,7 @@ void handle_nr_uci_pucch_0_1(module_id_t mod_id,
DevAssert
(
harq
->
is_waiting
);
const
int8_t
pid
=
sched_ctrl
->
feedback_dl_harq
.
head
;
remove_front_nr_list
(
&
sched_ctrl
->
feedback_dl_harq
);
/* According to nfapi_nr_interface_scf.h, harq_value = 0 is a pass
(The check below was for harq_value == 1 in the develop branch)
TODO: After update in develop branch, the following condition will be updated.*/
if
(
get_softmodem_params
()
->
emulate_l1
)
handle_dl_harq
(
mod_id
,
UE_id
,
pid
,
harq_value
==
0
&&
harq_confidence
==
0
);
else
handle_dl_harq
(
mod_id
,
UE_id
,
pid
,
harq_value
==
1
&&
harq_confidence
==
0
);
handle_dl_harq
(
mod_id
,
UE_id
,
pid
,
harq_value
==
0
&&
harq_confidence
==
0
);
if
(
harq_confidence
==
1
)
UE_info
->
mac_stats
[
UE_id
].
pucch0_DTX
++
;
}
}
...
...
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
View file @
fd2f61de
...
...
@@ -306,6 +306,8 @@ int get_spf(nfapi_nr_config_request_scf_t *cfg);
int
to_absslot
(
nfapi_nr_config_request_scf_t
*
cfg
,
int
frame
,
int
slot
);
int
get_nrofHARQ_ProcessesForPDSCH
(
e_NR_PDSCH_ServingCellConfig__nrofHARQ_ProcessesForPDSCH
n
);
void
nr_get_tbs_dl
(
nfapi_nr_dl_tti_pdsch_pdu
*
pdsch_pdu
,
int
x_overhead
,
uint8_t
numdmrscdmgroupnodata
,
...
...
@@ -409,6 +411,9 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
const
uint8_t
ul_cqi
,
const
uint16_t
rssi
);
void
create_dl_harq_list
(
NR_UE_sched_ctrl_t
*
sched_ctrl
,
const
NR_PDSCH_ServingCellConfig_t
*
pdsch
);
void
handle_nr_ul_harq
(
const
int
CC_idP
,
module_id_t
mod_id
,
frame_t
frame
,
...
...
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