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
promise
OpenXG-RAN
Commits
1462f0e6
Commit
1462f0e6
authored
Mar 20, 2020
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ENDC path switch S1-U: Bugfixes at gNB side
parent
cbba3da3
Changes
18
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
229 additions
and
36 deletions
+229
-36
openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
+14
-0
openair1/PHY/NR_TRANSPORT/nr_dci.c
openair1/PHY/NR_TRANSPORT/nr_dci.c
+2
-0
openair1/PHY/NR_TRANSPORT/nr_prach.c
openair1/PHY/NR_TRANSPORT/nr_prach.c
+37
-2
openair1/PHY/NR_TRANSPORT/nr_prach_common.c
openair1/PHY/NR_TRANSPORT/nr_prach_common.c
+1
-1
openair1/PHY/NR_TRANSPORT/nr_ulsch.c
openair1/PHY/NR_TRANSPORT/nr_ulsch.c
+1
-0
openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
+25
-0
openair1/SCHED_NR/nr_prach_procedures.c
openair1/SCHED_NR/nr_prach_procedures.c
+4
-0
openair1/SCHED_NR/nr_ru_procedures.c
openair1/SCHED_NR/nr_ru_procedures.c
+12
-0
openair2/GNB_APP/gnb_config.c
openair2/GNB_APP/gnb_config.c
+9
-4
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
+1
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
+4
-2
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
+1
-1
openair2/LAYER2/NR_MAC_gNB/nr_compute_tbs_common.c
openair2/LAYER2/NR_MAC_gNB/nr_compute_tbs_common.c
+4
-0
openair2/RRC/NR/rrc_gNB_nsa.c
openair2/RRC/NR/rrc_gNB_nsa.c
+28
-0
openair2/RRC/NR/rrc_gNB_reconfig.c
openair2/RRC/NR/rrc_gNB_reconfig.c
+64
-23
openair2/X2AP/x2ap_eNB_generate_messages.c
openair2/X2AP/x2ap_eNB_generate_messages.c
+2
-2
openair2/X2AP/x2ap_eNB_handler.c
openair2/X2AP/x2ap_eNB_handler.c
+9
-0
openair3/GTPV1-U/gtpv1u_eNB.c
openair3/GTPV1-U/gtpv1u_eNB.c
+11
-0
No files found.
openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
View file @
1462f0e6
...
...
@@ -36,6 +36,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
unsigned
char
symbol
,
unsigned
short
bwp_start_subcarrier
,
nfapi_nr_pusch_pdu_t
*
pusch_pdu
)
{
printf
(
"nr_pusch_channel_estimation Ns %d p %d symbol %d
\n
"
,
Ns
,
p
,
symbol
);
int
pilot
[
3280
]
__attribute__
((
aligned
(
16
)));
unsigned
char
aarx
;
...
...
@@ -488,5 +489,18 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
fclose
(
debug_ch_est
);
#endif
{
char
name
[
128
];
FILE
*
f
;
sprintf
(
name
,
"ch_estimate.%d.%d.raw"
,
gNB
->
proc
.
frame_rx
,
symbol
);
f
=
fopen
(
name
,
"w"
);
if
(
f
==
NULL
)
exit
(
1
);
fwrite
(
&
ul_ch_estimates
[
0
][
symbol_offset
],
nb_rb_pusch
*
12
*
4
,
1
,
f
);
fclose
(
f
);
sprintf
(
name
,
"ch_estimate_time.%d.%d.raw"
,
gNB
->
proc
.
frame_rx
,
symbol
);
f
=
fopen
(
name
,
"w"
);
if
(
f
==
NULL
)
exit
(
1
);
fwrite
(
ul_ch_estimates_time
[
0
],
1536
*
4
,
1
,
f
);
fclose
(
f
);
}
return
(
0
);
}
openair1/PHY/NR_TRANSPORT/nr_dci.c
View file @
1462f0e6
...
...
@@ -238,6 +238,8 @@ uint8_t nr_generate_dci_top(nfapi_nr_dl_tti_pdcch_pdu *pdcch_pdu,
pdcch_pdu_rel15
->
dci_pdu
.
AggregationLevel
[
d
],
0
,
NULL
);
polar_encoder_fast
((
uint64_t
*
)
pdcch_pdu_rel15
->
dci_pdu
.
Payload
[
d
],
encoder_output
,
n_RNTI
,
1
,
currentPtr
);
printf
(
"DCI PDU: [0]->0x%lx
\t
[1]->0x%lx %d bits aggreg %d
\n
"
,
((
uint64_t
*
)
pdcch_pdu_rel15
->
dci_pdu
.
Payload
[
d
])[
0
],
((
uint64_t
*
)
pdcch_pdu_rel15
->
dci_pdu
.
Payload
[
d
])[
1
],
pdcch_pdu_rel15
->
dci_pdu
.
PayloadSizeBits
[
d
],
pdcch_pdu_rel15
->
dci_pdu
.
AggregationLevel
[
d
]);
#ifdef DEBUG_CHANNEL_CODING
printf
(
"polar rnti %x,length %d, L %d
\n
"
,
n_RNTI
,
pdcch_pdu_rel15
->
dci_pdu
.
PayloadSizeBits
[
d
],
pdcch_pdu_rel15
->
dci_pdu
.
AggregationLevel
[
d
]);
printf
(
"DCI PDU: [0]->0x%lx
\t
[1]->0x%lx
\n
"
,
...
...
openair1/PHY/NR_TRANSPORT/nr_prach.c
View file @
1462f0e6
...
...
@@ -81,6 +81,8 @@ void nr_fill_prach(PHY_VARS_gNB *gNB,
void
init_prach_ru_list
(
RU_t
*
ru
)
{
//g_log->debug_mask |= PRACH;
AssertFatal
(
ru
!=
NULL
,
"ruis null
\n
"
);
for
(
int
i
=
0
;
i
<
NUMBER_OF_NR_RU_PRACH_MAX
;
i
++
)
ru
->
prach_list
[
i
].
frame
=-
1
;
pthread_mutex_init
(
&
ru
->
prach_list_mutex
,
NULL
);
...
...
@@ -382,6 +384,17 @@ void rx_nr_prach_ru(RU_t *ru,
for
(
int
i
=
6
;
i
<
12
;
i
++
)
dft1536
(
prach2
+
(
3072
*
i
),
rxsigF
[
aa
]
+
(
3072
*
i
),
1
);
reps
+=
6
;
}
if
(
0
){
char
name
[
256
];
sprintf
(
name
,
"time.%d.%d.raw"
,
frame
,
slot
);
FILE
*
f
=
fopen
(
name
,
"w"
);
if
(
f
==
NULL
)
exit
(
1
);
fwrite
(
prach2
-
1536
*
4
,
1536
*
4
*
4
+
1536
*
4
,
1
,
f
);
fclose
(
f
);
sprintf
(
name
,
"freq.%d.%d.raw"
,
frame
,
slot
);
f
=
fopen
(
name
,
"w"
);
if
(
f
==
NULL
)
exit
(
1
);
fwrite
(
rxsigF
[
aa
],
1536
*
4
*
4
,
1
,
f
);
fclose
(
f
);
}
}
// mu==1
else
if
(
mu
==
2
)
AssertFatal
(
1
==
0
,
"Shouldn't get here
\n
"
);
else
if
(
mu
==
3
)
AssertFatal
(
1
==
0
,
"Shouldn't get here
\n
"
);
...
...
@@ -515,6 +528,13 @@ void rx_nr_prach_ru(RU_t *ru,
}
memcpy
((
void
*
)
rxsigF2
,(
void
*
)
rxsigF_tmp
,
N_ZC
<<
2
);
if
(
0
){
char
name
[
256
];
sprintf
(
name
,
"sum.%d.%d.raw"
,
frame
,
slot
);
FILE
*
f
=
fopen
(
name
,
"w"
);
if
(
f
==
NULL
)
exit
(
1
);
fwrite
(
rxsigF_tmp
,
N_ZC
*
4
,
1
,
f
);
fclose
(
f
);
}
}
}
...
...
@@ -537,7 +557,7 @@ void rx_nr_prach(PHY_VARS_gNB *gNB,
uint16_t
rootSequenceIndex
;
int
numrootSequenceIndex
;
uint8_t
restricted_set
;
uint8_t
n_ra_prb
;
uint8_t
n_ra_prb
=
0
;
int16_t
*
prachF
=
NULL
;
int
nb_rx
;
...
...
@@ -620,7 +640,19 @@ void rx_nr_prach(PHY_VARS_gNB *gNB,
*
max_preamble_delay
=
0
;
*
max_preamble
=
0
;
if
(
0
){
char
name
[
256
];
sprintf
(
name
,
"sum2.%d.%d.raw"
,
frame
,
subframe
);
FILE
*
f
=
fopen
(
name
,
"w"
);
if
(
f
==
NULL
)
exit
(
1
);
fwrite
(
rxsigF
[
0
],
N_ZC
*
4
,
1
,
f
);
fclose
(
f
);
}
for
(
preamble_index
=
0
;
preamble_index
<
64
;
preamble_index
++
)
{
{
int
en
=
dB_fixed
(
signal_energy
((
int32_t
*
)
&
rxsigF
[
0
][
0
],(
N_ZC
==
839
)
?
840
:
140
));
if
(
en
>
40
&&
preamble_index
==
0
)
LOG_I
(
PHY
,
"%d.%d: try preamble %d en %d
\n
"
,
frame
,
subframe
,
preamble_index
,
en
);
}
if
(
LOG_DEBUGFLAG
(
PRACH
)){
int
en
=
dB_fixed
(
signal_energy
((
int32_t
*
)
&
rxsigF
[
0
][
0
],(
N_ZC
==
839
)
?
840
:
140
));
...
...
@@ -701,8 +733,9 @@ void rx_nr_prach(PHY_VARS_gNB *gNB,
}
// Compute DFT of RX signal (conjugate input, results in conjugate output) for each new rootSequenceIndex
int
en
=
dB_fixed
(
signal_energy
((
int32_t
*
)
&
rxsigF
[
0
][
0
],
140
));
if
(
LOG_DEBUGFLAG
(
PRACH
))
{
int
en
=
dB_fixed
(
signal_energy
((
int32_t
*
)
&
rxsigF
[
0
][
0
],
840
));
//
int en = dB_fixed(signal_energy((int32_t*)&rxsigF[0][0],840));
if
(
en
>
60
)
LOG_I
(
PHY
,
"frame %d, subframe %d : preamble index %d, NCS %d, N_ZC/NCS %d: offset %d, preamble shift %d , en %d)
\n
"
,
frame
,
subframe
,
preamble_index
,
NCS
,
N_ZC
/
NCS
,
preamble_offset
,
preamble_shift
,
en
);
}
...
...
@@ -765,6 +798,8 @@ void rx_nr_prach(PHY_VARS_gNB *gNB,
for
(
i
=
0
;
i
<
NCS2
;
i
++
)
{
lev
=
(
int32_t
)
prach_ifft
[(
preamble_shift2
+
i
)];
levdB
=
dB_fixed_times10
(
lev
);
//if (en>60) LOG_I(PHY, "preamble_index %d NCS2 %d i %d lev %d levdB %d preamble_shift2 %d\n", preamble_index, NCS2, i, lev, levdB, preamble_shift2);
if
(
levdB
>*
max_preamble_energy
)
{
*
max_preamble_energy
=
levdB
;
*
max_preamble_delay
=
i
;
// Note: This has to be normalized to the 30.72 Ms/s sampling rate
...
...
openair1/PHY/NR_TRANSPORT/nr_prach_common.c
View file @
1462f0e6
...
...
@@ -94,7 +94,6 @@ void nr_fill_du(uint16_t N_ZC,uint16_t *prach_root_sequence_map)
nr_du
[
u
]
=
((
p
<
(
N_ZC
>>
1
))
?
p
:
(
N_ZC
-
p
));
}
}
...
...
@@ -159,6 +158,7 @@ void compute_nr_prach_seq(nfapi_nr_config_request_scf_t *config,
for
(
k
=
0
;
k
<
N_ZC
;
k
++
)
{
// multiply by inverse of 2 (required since ru is exp[j 2\pi n])
X_u
[
i
][
k
]
=
((
uint32_t
*
)
nr_ru
)[(((
k
*
(
1
+
(
inv_u
*
k
)))
%
N_ZC
)
*
nr_ZC_inv
[
2
])
%
N_ZC
];
if
(
k
<
16
)
printf
(
"u %d k %d I %d Q %d index %d
\n
"
,
u
,
k
,
(
short
)(
X_u
[
i
][
k
]
&
65535
),
(
short
)((
X_u
[
i
][
k
]
>>
16
)
&
65535
),
(((
k
*
(
1
+
(
inv_u
*
k
)))
%
N_ZC
)
*
70
)
%
N_ZC
);
}
}
...
...
openair1/PHY/NR_TRANSPORT/nr_ulsch.c
View file @
1462f0e6
...
...
@@ -88,6 +88,7 @@ void nr_ulsch_unscrambling(int16_t* llr,
uint32_t
Nid
,
uint32_t
n_RNTI
)
{
printf
(
"nr_ulsch_unscrambling n_RNTI %d
\n
"
,
n_RNTI
);
uint8_t
reset
;
uint32_t
x1
,
x2
,
s
=
0
;
...
...
openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
View file @
1462f0e6
...
...
@@ -991,6 +991,8 @@ void nr_rx_pusch(PHY_VARS_gNB *gNB,
int
avg
[
4
];
uint8_t
nodata_dmrs
=
1
;
// FIXME to be properly configured from fapi
printf
(
"nr_rx_pusch frame %d nr_tti_rx %d symbol %d rel15_ul->start_symbol_index %d rel15_ul->nr_of_symbols %d
\n
"
,
frame
,
nr_tti_rx
,
symbol
,
rel15_ul
->
start_symbol_index
,
rel15_ul
->
nr_of_symbols
);
dmrs_symbol_flag
=
0
;
if
(
symbol
==
rel15_ul
->
start_symbol_index
){
...
...
@@ -1034,6 +1036,15 @@ void nr_rx_pusch(PHY_VARS_gNB *gNB,
//--------------------- RBs extraction ---------------------
//----------------------------------------------------------
{
char
name
[
128
];
FILE
*
f
;
sprintf
(
name
,
"rxdataF.%d.%d.raw"
,
frame
,
symbol
);
f
=
fopen
(
name
,
"w"
);
fwrite
(
&
gNB
->
common_vars
.
rxdataF
[
0
][
symbol
*
frame_parms
->
ofdm_symbol_size
],
frame_parms
->
ofdm_symbol_size
*
4
,
1
,
f
);
fclose
(
f
);
}
if
(
nb_re_pusch
>
0
)
{
nr_ulsch_extract_rbs_single
(
gNB
->
common_vars
.
rxdataF
,
...
...
@@ -1086,6 +1097,20 @@ void nr_rx_pusch(PHY_VARS_gNB *gNB,
rel15_ul
->
rb_size
,
gNB
->
pusch_vars
[
UE_id
]
->
log2_maxh
);
{
char
name
[
128
];
FILE
*
f
;
sprintf
(
name
,
"rxdataF_ext.%d.%d.raw"
,
frame
,
symbol
);
f
=
fopen
(
name
,
"w"
);
int
nb_re_pusch
=
NR_NB_SC_PER_RB
*
rel15_ul
->
rb_size
;
fwrite
(
&
gNB
->
pusch_vars
[
UE_id
]
->
rxdataF_ext
[
0
][
symbol
*
nb_re_pusch
],
nb_re_pusch
*
4
,
1
,
f
);
fclose
(
f
);
sprintf
(
name
,
"rxdataF_comp.%d.%d.raw"
,
frame
,
symbol
);
f
=
fopen
(
name
,
"w"
);
fwrite
(
&
gNB
->
pusch_vars
[
UE_id
]
->
rxdataF_comp
[
0
][
symbol
*
nb_re_pusch
],
nb_re_pusch
*
4
,
1
,
f
);
fclose
(
f
);
}
#ifdef NR_SC_FDMA
nr_idft
(
&
((
uint32_t
*
)
gNB
->
pusch_vars
[
UE_id
]
->
rxdataF_ext
[
0
])[
symbol
*
rel15_ul
->
rb_size
*
NR_NB_SC_PER_RB
],
nb_re_pusch
);
#endif
...
...
openair1/SCHED_NR/nr_prach_procedures.c
View file @
1462f0e6
...
...
@@ -77,6 +77,8 @@ void L1_nr_prach_procedures(PHY_VARS_gNB *gNB,int frame,int slot,
}
}
//ru = gNB->RU_list[0];
//rx_nr_prach_ru(ru, prach_pdu, frame, slot);
rx_nr_prach
(
gNB
,
prach_pdu
,
...
...
@@ -86,6 +88,8 @@ void L1_nr_prach_procedures(PHY_VARS_gNB *gNB,int frame,int slot,
&
max_preamble_energy
[
0
],
&
max_preamble_delay
[
0
]
);
if
(
max_preamble_energy
[
0
]
>
200
)
printf
(
"ra %d.%d preamble %d energy %d delay %d gNB->measurements.prach_I0+100 %d
\n
"
,
frame
,
slot
,
max_preamble
[
0
],
max_preamble_energy
[
0
],
max_preamble_delay
[
0
],
gNB
->
measurements
.
prach_I0
+
100
);
LOG_D
(
PHY
,
"[RAPROC] Frame %d, slot %d : Most likely preamble %d, energy %d dB delay %d (prach_energy counter %d)
\n
"
,
frame
,
slot
,
...
...
openair1/SCHED_NR/nr_ru_procedures.c
View file @
1462f0e6
...
...
@@ -512,6 +512,16 @@ void nr_fep0(RU_t *ru, int first_half) {
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPRX
+
proc
->
tti_rx
,
1
);
if
(
0
){
//printf("nr_fep0 proc->tti_rx %d f %dd\n", proc->tti_rx, proc->frame_rx);
char
name
[
128
];
FILE
*
f
;
sprintf
(
name
,
"rxdata.%d.%d.raw"
,
proc
->
frame_rx
,
proc
->
tti_rx
);
f
=
fopen
(
name
,
"w"
);
if
(
f
==
NULL
)
exit
(
1
);
fwrite
(
&
ru
->
common
.
rxdata
[
0
][
proc
->
tti_rx
*
23040
],
23040
*
4
,
1
,
f
);
fclose
(
f
);
}
// remove_7_5_kHz(ru,(slot&1)+(proc->tti_rx<<1));
for
(
l
=
start_symbol
;
l
<
end_symbol
;
l
++
)
{
for
(
aa
=
0
;
aa
<
fp
->
nb_antennas_rx
;
aa
++
)
{
...
...
@@ -648,6 +658,8 @@ void nr_fep_full(RU_t *ru, int slot) {
// remove_7_5_kHz(ru,proc->tti_rx<<1);
// remove_7_5_kHz(ru,1+(proc->tti_rx<<1));
printf
(
"nr_fep_full proc->tti_rx %d
\n
"
,
proc
->
tti_rx
);
for
(
l
=
0
;
l
<
fp
->
symbols_per_slot
;
l
++
)
{
for
(
aa
=
0
;
aa
<
fp
->
nb_antennas_rx
;
aa
++
)
{
nr_slot_fep_ul
(
fp
,
...
...
openair2/GNB_APP/gnb_config.c
View file @
1462f0e6
...
...
@@ -237,6 +237,7 @@ void fix_scc(NR_ServingCellConfigCommon_t *scc,uint64_t ssbmap) {
scc
->
ssb_PositionsInBurst
->
choice
.
mediumBitmap
.
buf
[
0
]
=
0
;
for
(
int
i
=
0
;
i
<
8
;
i
++
)
scc
->
ssb_PositionsInBurst
->
choice
.
mediumBitmap
.
buf
[
0
]
|=
(((
ssbmap
>>
(
7
-
i
))
&
0x01
)
<<
i
);
//scc->ssb_PositionsInBurst->choice.mediumBitmap.buf[0] = 0x80; //ssbmap;
}
else
{
scc
->
ssb_PositionsInBurst
->
choice
.
longBitmap
.
size
=
8
;
scc
->
ssb_PositionsInBurst
->
choice
.
longBitmap
.
bits_unused
=
0
;
...
...
@@ -719,10 +720,14 @@ int RCconfig_nr_gtpu(void ) {
if
(
address
)
{
MessageDef
*
message
;
AssertFatal
((
message
=
itti_alloc_new_message
(
TASK_GNB_APP
,
GTPV1U_ENB_S1_REQ
))
!=
NULL
,
""
);
IPV4_STR_ADDR_TO_INT_NWBO
(
address
,
RC
.
gtpv1u_data_g
->
enb_ip_address_for_S1u_S12_S4_up
,
"BAD IP ADDRESS FORMAT FOR eNB S1_U !
\n
"
);
LOG_I
(
GTPU
,
"Configuring GTPu address : %s -> %x
\n
"
,
address
,
RC
.
gtpv1u_data_g
->
enb_ip_address_for_S1u_S12_S4_up
);
GTPV1U_ENB_S1_REQ
(
message
).
enb_port_for_S1u_S12_S4_up
=
gnb_port_for_S1U
;
itti_send_msg_to_task
(
TASK_GTPV1_U
,
0
,
message
);
// data model is wrong: gtpu doesn't have enb_id (or module_id)
// IPV4_STR_ADDR_TO_INT_NWBO ( address, RC.gtpv1u_data_g->enb_ip_address_for_S1u_S12_S4_up, "BAD IP ADDRESS FORMAT FOR eNB S1_U !\n" );
// LOG_I(GTPU,"Configuring GTPu address : %s -> %x\n",address,RC.gtpv1u_data_g->enb_ip_address_for_S1u_S12_S4_up);
IPV4_STR_ADDR_TO_INT_NWBO
(
address
,
GTPV1U_ENB_S1_REQ
(
message
).
enb_ip_address_for_S1u_S12_S4_up
,
"BAD IP ADDRESS FORMAT FOR eNB S1_U !
\n
"
);
LOG_I
(
GTPU
,
"Configuring GTPu address : %s -> %x
\n
"
,
address
,
GTPV1U_ENB_S1_REQ
(
message
).
enb_ip_address_for_S1u_S12_S4_up
);
GTPV1U_ENB_S1_REQ
(
message
).
enb_port_for_S1u_S12_S4_up
=
gnb_port_for_S1U
;
itti_send_msg_to_task
(
TASK_GTPV1_U
,
0
,
message
);
// data model is wrong: gtpu doesn't have enb_id (or module_id)
}
else
LOG_E
(
GTPU
,
"invalid address for S1U
\n
"
);
...
...
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
View file @
1462f0e6
...
...
@@ -1397,7 +1397,7 @@ void nr_get_tbs_dl(nfapi_nr_dl_tti_pdsch_pdu *pdsch_pdu,
uint8_t
N_sh_symb
=
pdsch_rel15
->
NrOfSymbols
;
uint8_t
Imcs
=
pdsch_rel15
->
mcsIndex
[
0
];
uint16_t
N_RE_prime
=
NR_NB_SC_PER_RB
*
N_sh_symb
-
N_PRB_DMRS
-
N_PRB_oh
;
LOG_
D
(
MAC
,
"N_RE_prime %d for %d symbols %d DMRS per PRB and %d overhead
\n
"
,
N_RE_prime
,
N_sh_symb
,
N_PRB_DMRS
,
N_PRB_oh
);
LOG_
I
(
MAC
,
"N_RE_prime %d for %d symbols %d DMRS per PRB and %d overhead
\n
"
,
N_RE_prime
,
N_sh_symb
,
N_PRB_DMRS
,
N_PRB_oh
);
uint16_t
R
;
uint32_t
TBS
=
0
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
View file @
1462f0e6
...
...
@@ -295,7 +295,7 @@ void nr_initiate_ra_proc(module_id_t module_idP,
LOG_D
(
MAC
,
"%s() Msg2[%04d%d] SFN/SF:%04d%d
\n
"
,
__FUNCTION__
,
ra
->
Msg2_frame
,
ra
->
Msg2_slot
,
frameP
,
slotP
);
do
{
ra
->
rnti
=
(
taus
()
%
65518
)
+
1
;
ra
->
rnti
=
666
;
//
(taus() % 65518) + 1;
loop
++
;
}
while
(
loop
!=
100
&&
!
(
find_nr_UE_id
(
module_idP
,
ra
->
rnti
)
==
-
1
&&
ra
->
rnti
>=
1
&&
ra
->
rnti
<=
65519
));
...
...
@@ -677,7 +677,7 @@ void nr_generate_Msg2(module_id_t module_idP,
dci_formats
[
0
]
=
NR_DL_DCI_FORMAT_1_0
;
rnti_types
[
0
]
=
NR_RNTI_RA
;
LOG_
D
(
MAC
,
"[RAPROC] DCI params: rnti %d, rnti_type %d, dci_format %d coreset params: FreqDomainResource %llx, start_symbol %d n_symb %d
\n
"
,
LOG_
I
(
MAC
,
"[RAPROC] DCI params: rnti %d, rnti_type %d, dci_format %d coreset params: FreqDomainResource %llx, start_symbol %d n_symb %d
\n
"
,
pdcch_pdu_rel15
->
dci_pdu
.
RNTI
[
0
],
rnti_types
[
0
],
dci_formats
[
0
],
...
...
@@ -810,6 +810,8 @@ void nr_fill_rar(uint8_t Mod_idP,
ul_grant
=
csi_req
|
(
tpc_command
<<
1
)
|
(
pusch_pdu
->
mcs_index
<<
4
)
|
(
ra
->
Msg3_tda_id
<<
8
)
|
(
f_alloc
<<
12
)
|
(
pusch_pdu
->
frequency_hopping
<<
26
);
printf
(
"ul grant 0x%x mcs %d f_alloc %d tpc %d
\n
"
,
ul_grant
,
pusch_pdu
->
mcs_index
,
f_alloc
,
tpc_command
);
rar
->
UL_GRANT_1
=
(
uint8_t
)
(
ul_grant
>>
24
)
&
0x07
;
rar
->
UL_GRANT_2
=
(
uint8_t
)
(
ul_grant
>>
16
)
&
0xff
;
rar
->
UL_GRANT_3
=
(
uint8_t
)
(
ul_grant
>>
8
)
&
0xff
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
View file @
1462f0e6
...
...
@@ -84,7 +84,7 @@ void schedule_nr_mib(module_id_t module_idP, frame_t frameP, sub_frame_t slotP){
if
(
mib_sdu_length
>
0
)
{
LOG_
I
(
MAC
,
"Frame %d, slot %d: Adding BCH PDU in position %d (length %d)
\n
"
,
frameP
,
slotP
,
dl_req
->
nPDUs
,
mib_sdu_length
);
LOG_
D
(
MAC
,
"Frame %d, slot %d: Adding BCH PDU in position %d (length %d)
\n
"
,
frameP
,
slotP
,
dl_req
->
nPDUs
,
mib_sdu_length
);
if
((
frameP
&
1023
)
<
80
){
LOG_I
(
MAC
,
"[gNB %d] Frame %d : MIB->BCH CC_id %d, Received %d bytes
\n
"
,
module_idP
,
frameP
,
CC_id
,
mib_sdu_length
);
...
...
openair2/LAYER2/NR_MAC_gNB/nr_compute_tbs_common.c
View file @
1462f0e6
...
...
@@ -28,6 +28,8 @@
#include "common/utils/nr/nr_common.h"
#include <math.h>
#include "LOG/log.h"
//Table 5.1.2.2-2
uint16_t
Tbstable_nr
[
INDEX_MAX_TBS_TABLE
]
=
{
24
,
32
,
40
,
48
,
56
,
64
,
72
,
80
,
88
,
96
,
104
,
112
,
120
,
128
,
136
,
144
,
152
,
160
,
168
,
176
,
184
,
192
,
208
,
224
,
240
,
256
,
272
,
288
,
304
,
320
,
336
,
352
,
368
,
384
,
408
,
432
,
456
,
480
,
504
,
528
,
552
,
576
,
608
,
640
,
672
,
704
,
736
,
768
,
808
,
848
,
888
,
928
,
984
,
1032
,
1064
,
1128
,
1160
,
1192
,
1224
,
1256
,
1288
,
1320
,
1352
,
1416
,
1480
,
1544
,
1608
,
1672
,
1736
,
1800
,
1864
,
1928
,
2024
,
2088
,
2152
,
2216
,
2280
,
2408
,
2472
,
2536
,
2600
,
2664
,
2728
,
2792
,
2856
,
2976
,
3104
,
3240
,
3368
,
3496
,
3624
,
3752
,
3824
};
...
...
@@ -88,6 +90,8 @@ uint32_t nr_compute_tbs(uint16_t Qm,
}
//printf("Ninfo %d nbp_re %d nb_re %d Qm %d, R %d, tbs %d\n", Ninfo, nbp_re, nb_re, Qm, R, nr_tbs);
LOG_I
(
PHY
,
"Ninfo %d nbp_re %d nb_re %d Qm %d, R %d, tbs %d nb_symb_sch %d nb_dmrs_prb %d nb_rb_oh %d tb_scaling %d Nl %d
\n
"
,
Ninfo
,
nbp_re
,
nb_re
,
Qm
,
R
,
nr_tbs
,
nb_symb_sch
,
nb_dmrs_prb
,
nb_rb_oh
,
tb_scaling
,
Nl
);
return
nr_tbs
;
}
...
...
openair2/RRC/NR/rrc_gNB_nsa.c
View file @
1462f0e6
...
...
@@ -155,6 +155,14 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_
create_tunnel_req
.
sgw_S1u_teid
[
i
]
=
ue_context_p
->
ue_context
.
e_rab
[
i
].
param
.
gtp_teid
;
memcpy
(
&
create_tunnel_req
.
sgw_addr
[
i
],
&
ue_context_p
->
ue_context
.
e_rab
[
i
].
param
.
sgw_addr
,
sizeof
(
transport_layer_addr_t
));
inde_list
[
i
]
=
i
;
LOG_I
(
RRC
,
"S1-U tunnel: index %d target sgw ip %d.%d.%d.%d length %d gtp teid %u
\n
"
,
i
,
create_tunnel_req
.
sgw_addr
[
i
].
buffer
[
0
],
create_tunnel_req
.
sgw_addr
[
i
].
buffer
[
1
],
create_tunnel_req
.
sgw_addr
[
i
].
buffer
[
2
],
create_tunnel_req
.
sgw_addr
[
i
].
buffer
[
3
],
create_tunnel_req
.
sgw_addr
[
i
].
length
,
create_tunnel_req
.
sgw_S1u_teid
[
i
]);
}
//PM: Is this where we should extract the rnti from?
create_tunnel_req
.
rnti
=
ue_context_p
->
ue_id_rnti
;
...
...
@@ -175,6 +183,26 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_
X2AP_ENDC_SGNB_ADDITION_REQ_ACK
(
msg
).
e_rabs_admitted_tobeadded
[
i
].
e_rab_id
=
ue_context_p
->
ue_context
.
e_rab
[
i
].
param
.
e_rab_id
;
X2AP_ENDC_SGNB_ADDITION_REQ_ACK
(
msg
).
e_rabs_admitted_tobeadded
[
i
].
gtp_teid
=
create_tunnel_resp
.
enb_S1u_teid
[
i
];
memcpy
(
&
X2AP_ENDC_SGNB_ADDITION_REQ_ACK
(
msg
).
e_rabs_admitted_tobeadded
[
i
].
gnb_addr
,
&
create_tunnel_resp
.
enb_addr
,
sizeof
(
transport_layer_addr_t
));
//The length field in the X2AP targetting structure is expected in bits but the create_tunnel_resp returns the address length in bytes
X2AP_ENDC_SGNB_ADDITION_REQ_ACK
(
msg
).
e_rabs_admitted_tobeadded
[
i
].
gnb_addr
.
length
=
create_tunnel_resp
.
enb_addr
.
length
*
8
;
LOG_I
(
RRC
,
"S1-U create_tunnel_resp tunnel: index %d target gNB ip %d.%d.%d.%d length %d gtp teid %u
\n
"
,
i
,
create_tunnel_resp
.
enb_addr
.
buffer
[
0
],
create_tunnel_resp
.
enb_addr
.
buffer
[
1
],
create_tunnel_resp
.
enb_addr
.
buffer
[
2
],
create_tunnel_resp
.
enb_addr
.
buffer
[
3
],
create_tunnel_resp
.
enb_addr
.
length
,
create_tunnel_resp
.
enb_S1u_teid
[
i
]);
LOG_I
(
RRC
,
"X2AP sGNB Addition Request: index %d target gNB ip %d.%d.%d.%d length %d gtp teid %u
\n
"
,
i
,
X2AP_ENDC_SGNB_ADDITION_REQ_ACK
(
msg
).
e_rabs_admitted_tobeadded
[
i
].
gnb_addr
.
buffer
[
0
],
X2AP_ENDC_SGNB_ADDITION_REQ_ACK
(
msg
).
e_rabs_admitted_tobeadded
[
i
].
gnb_addr
.
buffer
[
1
],
X2AP_ENDC_SGNB_ADDITION_REQ_ACK
(
msg
).
e_rabs_admitted_tobeadded
[
i
].
gnb_addr
.
buffer
[
2
],
X2AP_ENDC_SGNB_ADDITION_REQ_ACK
(
msg
).
e_rabs_admitted_tobeadded
[
i
].
gnb_addr
.
buffer
[
3
],
X2AP_ENDC_SGNB_ADDITION_REQ_ACK
(
msg
).
e_rabs_admitted_tobeadded
[
i
].
gnb_addr
.
length
,
X2AP_ENDC_SGNB_ADDITION_REQ_ACK
(
msg
).
e_rabs_admitted_tobeadded
[
i
].
gtp_teid
);
}
}
else
...
...
openair2/RRC/NR/rrc_gNB_reconfig.c
View file @
1462f0e6
This diff is collapsed.
Click to expand it.
openair2/X2AP/x2ap_eNB_generate_messages.c
View file @
1462f0e6
...
...
@@ -1748,8 +1748,8 @@ int x2ap_gNB_generate_ENDC_x2_SgNB_addition_request_ACK( x2ap_eNB_instance_t *in
e_RABS_AdmittedToBeAdded_SgNBAddReq_Item
->
resource_configuration
.
present
=
X2AP_E_RABs_Admitted_ToBeAdded_SgNBAddReqAck_Item__resource_configuration_PR_sgNBPDCPpresent
;
INT32_TO_OCTET_STRING
(
x2ap_sgnb_addition_req_ACK
->
e_rabs_admitted_tobeadded
[
i
].
gtp_teid
,
&
e_RABS_AdmittedToBeAdded_SgNBAddReq_Item
->
resource_configuration
.
choice
.
sgNBPDCPpresent
.
s1_DL_GTPtunnelEndpoint
.
gTP_TEID
);
e_RABS_AdmittedToBeAdded_SgNBAddReq_Item
->
resource_configuration
.
choice
.
sgNBPDCPpresent
.
s1_DL_GTPtunnelEndpoint
.
transportLayerAddress
.
size
=
e_SCG_rabs_tobeadded
.
eNB
_addr
.
length
/
8
;
e_RABS_AdmittedToBeAdded_SgNBAddReq_Item
->
resource_configuration
.
choice
.
sgNBPDCPpresent
.
s1_DL_GTPtunnelEndpoint
.
transportLayerAddress
.
bits_unused
=
e_SCG_rabs_tobeadded
.
eNB_addr
.
length
%
8
;
e_RABS_AdmittedToBeAdded_SgNBAddReq_Item
->
resource_configuration
.
choice
.
sgNBPDCPpresent
.
s1_DL_GTPtunnelEndpoint
.
transportLayerAddress
.
size
=
x2ap_sgnb_addition_req_ACK
->
e_rabs_admitted_tobeadded
[
i
].
gnb
_addr
.
length
/
8
;
e_RABS_AdmittedToBeAdded_SgNBAddReq_Item
->
resource_configuration
.
choice
.
sgNBPDCPpresent
.
s1_DL_GTPtunnelEndpoint
.
transportLayerAddress
.
bits_unused
=
x2ap_sgnb_addition_req_ACK
->
e_rabs_admitted_tobeadded
[
i
].
gnb_addr
.
length
%
8
;
e_RABS_AdmittedToBeAdded_SgNBAddReq_Item
->
resource_configuration
.
choice
.
sgNBPDCPpresent
.
s1_DL_GTPtunnelEndpoint
.
transportLayerAddress
.
buf
=
calloc
(
1
,
e_RABS_AdmittedToBeAdded_SgNBAddReq_Item
->
resource_configuration
.
choice
.
sgNBPDCPpresent
.
s1_DL_GTPtunnelEndpoint
.
transportLayerAddress
.
size
);
...
...
openair2/X2AP/x2ap_eNB_handler.c
View file @
1462f0e6
...
...
@@ -1756,6 +1756,15 @@ int x2ap_gNB_handle_ENDC_sGNB_addition_request (instance_t instance,
X2AP_ENDC_SGNB_ADDITION_REQ
(
msg
).
e_rabs_tobeadded
[
i
].
sgw_addr
.
length
=
e_RABS_ToBeAdded_SgNBAddReq_Item
->
resource_configuration
.
choice
.
sgNBPDCPpresent
.
s1_UL_GTPtunnelEndpoint
.
transportLayerAddress
.
size
*
8
-
e_RABS_ToBeAdded_SgNBAddReq_Item
->
resource_configuration
.
choice
.
sgNBPDCPpresent
.
s1_UL_GTPtunnelEndpoint
.
transportLayerAddress
.
bits_unused
;
LOG_I
(
RRC
,
"x2u tunnel: index %d target sgw ip %d.%d.%d.%d length %d gtp teid %u
\n
"
,
i
,
X2AP_ENDC_SGNB_ADDITION_REQ
(
msg
).
e_rabs_tobeadded
[
i
].
sgw_addr
.
buffer
[
0
],
X2AP_ENDC_SGNB_ADDITION_REQ
(
msg
).
e_rabs_tobeadded
[
i
].
sgw_addr
.
buffer
[
1
],
X2AP_ENDC_SGNB_ADDITION_REQ
(
msg
).
e_rabs_tobeadded
[
i
].
sgw_addr
.
buffer
[
2
],
X2AP_ENDC_SGNB_ADDITION_REQ
(
msg
).
e_rabs_tobeadded
[
i
].
sgw_addr
.
buffer
[
3
],
X2AP_ENDC_SGNB_ADDITION_REQ
(
msg
).
e_rabs_tobeadded
[
i
].
sgw_addr
.
length
,
X2AP_ENDC_SGNB_ADDITION_REQ
(
msg
).
e_rabs_tobeadded
[
i
].
gtp_teid
);
OCTET_STRING_TO_INT32
(
&
e_RABS_ToBeAdded_SgNBAddReq_Item
->
resource_configuration
.
choice
.
sgNBPDCPpresent
.
s1_UL_GTPtunnelEndpoint
.
gTP_TEID
,
X2AP_ENDC_SGNB_ADDITION_REQ
(
msg
).
e_rabs_tobeadded
[
i
].
gtp_teid
);
}
...
...
openair3/GTPV1-U/gtpv1u_eNB.c
View file @
1462f0e6
...
...
@@ -943,6 +943,8 @@ gtpv1u_create_s1u_tunnel(
memcpy
(
&
create_tunnel_resp_pP
->
enb_addr
.
buffer
,
&
RC
.
gtpv1u_data_g
->
enb_ip_address_for_S1u_S12_S4_up
,
sizeof
(
in_addr_t
));
LOG_I
(
GTPU
,
"Configured GTPu address : %x
\n
"
,
RC
.
gtpv1u_data_g
->
enb_ip_address_for_S1u_S12_S4_up
);
create_tunnel_resp_pP
->
enb_addr
.
length
=
sizeof
(
in_addr_t
);
addrs_length_in_bytes
=
create_tunnel_req_pP
->
sgw_addr
[
i
].
length
/
8
;
AssertFatal
((
addrs_length_in_bytes
==
4
)
||
...
...
@@ -971,6 +973,15 @@ gtpv1u_create_s1u_tunnel(
gtpv1u_ue_data_p
->
bearers
[
eps_bearer_id
-
GTPV1U_BEARER_OFFSET
].
teid_sgw
=
create_tunnel_req_pP
->
sgw_S1u_teid
[
i
];
gtpv1u_ue_data_p
->
num_bearers
++
;
create_tunnel_resp_pP
->
enb_S1u_teid
[
i
]
=
s1u_teid
;
LOG_I
(
GTPU
,
"Copied to create_tunnel_resp tunnel: index %d target gNB ip %d.%d.%d.%d length %d gtp teid %u
\n
"
,
i
,
create_tunnel_resp_pP
->
enb_addr
.
buffer
[
0
],
create_tunnel_resp_pP
->
enb_addr
.
buffer
[
1
],
create_tunnel_resp_pP
->
enb_addr
.
buffer
[
2
],
create_tunnel_resp_pP
->
enb_addr
.
buffer
[
3
],
create_tunnel_resp_pP
->
enb_addr
.
length
,
create_tunnel_resp_pP
->
enb_S1u_teid
[
i
]);
}
else
{
create_tunnel_resp_pP
->
enb_S1u_teid
[
i
]
=
0
;
create_tunnel_resp_pP
->
status
=
0xFF
;
...
...
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