Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Shweta Shrivastava
openairinterface5G
Commits
0ef6ef2b
Commit
0ef6ef2b
authored
May 12, 2021
by
Roberto Louro Magueta
Browse files
Code format improvements in differences for develop
parent
ee6b7702
Changes
52
Hide whitespace changes
Inline
Side-by-side
executables/nr-gnb.c
View file @
0ef6ef2b
...
...
@@ -404,7 +404,6 @@ void init_gNB_Tpool(int inst) {
if
(
opp_enabled
==
1
)
threadCreate
(
&
proc
->
process_stats_thread
,
process_stats_thread
,(
void
*
)
gNB
,
"time_meas"
,
-
1
,
OAI_PRIORITY_RT_LOW
);
threadCreate
(
&
proc
->
L1_stats_thread
,
nrL1_stats_thread
,(
void
*
)
gNB
,
"L1_stats"
,
-
1
,
OAI_PRIORITY_RT_LOW
);
}
...
...
@@ -493,8 +492,6 @@ printf("after %p\n", gNB->common_vars.rxdataF[aa]);
}
void
init_gNB
(
int
single_thread_flag
,
int
wait_for_sync
)
{
int
inst
;
...
...
executables/nr-ru.c
View file @
0ef6ef2b
...
...
@@ -1979,7 +1979,7 @@ void RCconfig_RU(void)
}
else
{
LOG_I
(
PHY
,
"Setting time source to internal
\n
"
);
RC
.
ru
[
j
]
->
openair0_cfg
.
time_source
=
internal
;
RC
.
ru
[
j
]
->
openair0_cfg
.
time_source
=
internal
;
}
if
(
strcmp
(
*
(
RUParamList
.
paramarray
[
j
][
RU_LOCAL_RF_IDX
].
strptr
),
"yes"
)
==
0
)
{
...
...
executables/nr-softmodem.c
View file @
0ef6ef2b
...
...
@@ -745,10 +745,6 @@ if(!IS_SOFTMODEM_NOS1)
// don't create if node doesn't connect to RRC/S1/GTP
AssertFatal
(
create_gNB_tasks
(
1
)
==
0
,
"cannot create ITTI tasks
\n
"
);
/* Start the agent. If it is turned off in the configuration, it won't start */
/*
RCconfig_nr_flexran();
...
...
executables/nr-ue.c
View file @
0ef6ef2b
...
...
@@ -715,11 +715,13 @@ void *UE_thread(void *arg) {
if
(
openair0_cfg
[
0
].
duplex_mode
==
duplex_mode_TDD
)
{
uint8_t
tdd_period
=
mac
->
phy_config
.
config_req
.
tdd_table
.
tdd_period_in_slots
;
int
nrofUplinkSlots
=
0
;
if
(
mac
->
scc_SIB
)
nrofUplinkSlots
=
mac
->
scc_SIB
->
tdd_UL_DL_ConfigurationCommon
->
pattern1
.
nrofUplinkSlots
;
nrofUplinkSlots
=
mac
->
scc_SIB
->
tdd_UL_DL_ConfigurationCommon
->
pattern1
.
nrofUplinkSlots
;
else
if
(
mac
->
scc
)
nrofUplinkSlots
=
mac
->
scc
->
tdd_UL_DL_ConfigurationCommon
->
pattern1
.
nrofUplinkSlots
;
nrofUplinkSlots
=
mac
->
scc
->
tdd_UL_DL_ConfigurationCommon
->
pattern1
.
nrofUplinkSlots
;
uint8_t
num_UL_slots
=
nrofUplinkSlots
+
(
nrofUplinkSlots
!=
0
);
uint8_t
first_tx_slot
=
tdd_period
-
num_UL_slots
;
...
...
executables/nr-uesoftmodem.c
View file @
0ef6ef2b
...
...
@@ -183,6 +183,7 @@ struct timespec clock_difftime(struct timespec start, struct timespec end) {
void
print_difftimes
(
void
)
{
LOG_I
(
HW
,
"difftimes min = %lu ns ; max = %lu ns
\n
"
,
min_diff_time
.
tv_nsec
,
max_diff_time
.
tv_nsec
);
}
int
create_tasks_nrue
(
uint32_t
ue_nb
)
{
LOG_D
(
NR_RRC
,
"%s(ue_nb:%d)
\n
"
,
__FUNCTION__
,
ue_nb
);
itti_wait_ready
(
1
);
...
...
openair1/PHY/NR_TRANSPORT/nr_dci_tools.c
View file @
0ef6ef2b
...
...
@@ -255,10 +255,7 @@ void nr_fill_dci(PHY_VARS_gNB *gNB,
dlsch
->
harq_mask
|=
(
1
<<
harq_pid
);
dlsch
->
rnti
=
pdcch_pdu_rel15
->
dci_pdu
[
i
].
RNTI
;
// nr_fill_cce_list(gNB,0);
// nr_fill_cce_list(gNB,0);
}
}
...
...
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
View file @
0ef6ef2b
...
...
@@ -82,7 +82,6 @@ void nr_pdsch_codeword_scrambling_optim(uint8_t *in,
s
=
lte_gold_generic
(
&
x1
,
&
x2
,
1
);
#if defined(__AVX2__)
for
(
int
i
=
0
;
i
<
((
size
>>
5
)
+
((
size
&
0x1f
)
>
0
?
1
:
0
));
i
++
)
{
in32
=
_mm256_movemask_epi8
(
_mm256_slli_epi16
(((
__m256i
*
)
in
)[
i
],
7
));
...
...
@@ -162,7 +161,6 @@ uint8_t nr_generate_pdsch(PHY_VARS_gNB *gNB,
uint32_t
encoded_length
=
nb_re
*
Qm
;
int16_t
mod_dmrs
[
14
][
n_dmrs
<<
1
]
__attribute__
((
aligned
(
16
)));
/* PTRS */
uint16_t
beta_ptrs
=
1
;
uint8_t
ptrs_symbol
=
0
;
...
...
openair1/PHY/NR_TRANSPORT/pucch_rx.c
View file @
0ef6ef2b
...
...
@@ -296,7 +296,8 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
for
(
i
=
0
;
i
<
nr_sequences
;
i
++
){
for
(
l
=
0
;
l
<
pucch_pdu
->
nr_of_symbols
;
l
++
)
{
corr_re
[
l
]
=
0
;
corr_im
[
l
]
=
0
;
corr_re
[
l
]
=
0
;
corr_im
[
l
]
=
0
;
seq_index
=
(
pucch_pdu
->
initial_cyclic_shift
+
mcs
[
i
]
+
gNB
->
pucch0_lut
.
lut
[
cs_ind
][
slot
][
l
+
pucch_pdu
->
start_symbol_index
])
%
12
;
...
...
@@ -346,7 +347,6 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
index
=
maxpos
;
// estimate CQI for MAC (from antenna port 0 only)
int
max_n0
=
uci_stats
->
pucch0_n00
>
uci_stats
->
pucch0_n01
?
uci_stats
->
pucch0_n00
:
uci_stats
->
pucch0_n01
;
int
SNRtimes10
=
dB_fixed_times10
(
signal_energy_nodc
(
&
rxdataF
[
0
][
pucch_pdu
->
start_symbol_index
*
frame_parms
->
ofdm_symbol_size
+
re_offset
[
0
]],
12
))
-
(
10
*
max_n0
);
...
...
@@ -399,7 +399,6 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
uci_stats
->
pucch0_positive_SR
++
;
}
uci_stats
->
pucch01_trials
++
;
}
else
{
uci_pdu
->
harq
=
calloc
(
1
,
sizeof
(
*
uci_pdu
->
harq
));
...
...
@@ -1643,7 +1642,6 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
}
}
void
dump_uci_stats
(
FILE
*
fd
,
PHY_VARS_gNB
*
gNB
,
int
frame
)
{
int
strpos
=
0
;
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
View file @
0ef6ef2b
...
...
@@ -701,7 +701,6 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_COMBINE_SEG
,
VCD_FUNCTION_OUT
);
dlsch
->
last_iteration_cnt
=
ret
;
// log_dump(PHY, harq_process->b, 60, LOG_DUMP_CHAR,"nrue pdsch rx frame %d %d: ", frame, nr_slot_rx );
return
(
ret
);
}
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_prach.c
View file @
0ef6ef2b
...
...
@@ -218,12 +218,12 @@ int32_t generate_nr_prach(PHY_VARS_NR_UE *ue, uint8_t gNB_id, uint8_t slot){
k
*=
2
;
LOG_I
(
PHY
,
"PRACH [UE %d] in slot %d, placing PRACH in position %d, msg1 frequency start %d (k1 %d), preamble_offset %d, first_nonzero_root_idx %d
\n
"
,
Mod_id
,
slot
,
k
,
n_ra_prb
,
nrUE_config
->
prach_config
.
num_prach_fd_occasions_list
[
fd_occasion
].
k1
,
preamble_offset
,
first_nonzero_root_idx
);
slot
,
k
,
n_ra_prb
,
nrUE_config
->
prach_config
.
num_prach_fd_occasions_list
[
fd_occasion
].
k1
,
preamble_offset
,
first_nonzero_root_idx
);
Xu
=
(
int16_t
*
)
ue
->
X_u
[
preamble_offset
-
first_nonzero_root_idx
];
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
View file @
0ef6ef2b
...
...
@@ -164,8 +164,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
///////////
////////////////////////////////////////////////////////////////////
//log_dump(PHY, harq_process_ul_ue->a, 16, LOG_DUMP_CHAR,"nrue pusch tx frame %d %d: ", frame, slot);
/////////////////////////ULSCH scrambling/////////////////////////
///////////
...
...
@@ -365,7 +364,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
// TODO: performance improvement, we can skip the modulation of DMRS symbols outside the bandwidth part
// Perform this on gold sequence, not required when SC FDMA operation is done,
LOG_D
(
PHY
,
"DMRS in symbol %d
\n
"
,
l
);
LOG_D
(
PHY
,
"DMRS in symbol %d
\n
"
,
l
);
nr_modulation
(
pusch_dmrs
[
l
][
0
],
n_dmrs
*
2
,
DMRS_MOD_ORDER
,
mod_dmrs
);
// currently only codeword 0 is modulated. Qm = 2 as DMRS is QPSK modulated
}
else
{
...
...
openair1/PHY/NR_UE_TRANSPORT/pucch_nr.h
View file @
0ef6ef2b
...
...
@@ -54,11 +54,12 @@ void nr_generate_pucch0(PHY_VARS_NR_UE *ue,
int16_t
amp
,
int
nr_slot_tx
,
uint8_t
m0
,
uint8_t
mcs
,
uint8_t
mcs
,
uint8_t
nrofSymbols
,
uint8_t
startingSymbolIndex
,
uint16_t
startingPRB
,
uint16_t
secondHopPRB
);
uint16_t
secondHopPRB
);
void
nr_generate_pucch1
(
PHY_VARS_NR_UE
*
ue
,
int32_t
**
txdataF
,
NR_DL_FRAME_PARMS
*
frame_parms
,
...
...
@@ -73,10 +74,11 @@ void nr_generate_pucch1(PHY_VARS_NR_UE *ue,
uint16_t
startingPRB_intraSlotHopping
,
uint8_t
timeDomainOCC
,
uint8_t
nr_bit
);
void
nr_generate_pucch2
(
PHY_VARS_NR_UE
*
ue
,
uint16_t
crnti
,
uint32_t
dmrs_scrambling_id
,
uint32_t
data_scrambling_id
,
uint32_t
dmrs_scrambling_id
,
uint32_t
data_scrambling_id
,
int32_t
**
txdataF
,
NR_DL_FRAME_PARMS
*
frame_parms
,
PUCCH_CONFIG_DEDICATED
*
pucch_config_dedicated
,
...
...
@@ -88,6 +90,7 @@ void nr_generate_pucch2(PHY_VARS_NR_UE *ue,
uint8_t
nrofPRB
,
uint16_t
startingPRB
,
uint8_t
nr_bit
);
void
nr_generate_pucch3_4
(
PHY_VARS_NR_UE
*
ue
,
uint16_t
crnti
,
int32_t
**
txdataF
,
...
...
openair1/SCHED_NR/nr_prach_procedures.c
View file @
0ef6ef2b
...
...
@@ -121,8 +121,7 @@ void L1_nr_prach_procedures(PHY_VARS_gNB *gNB,int frame,int slot) {
max_preamble_delay
[
0
],
gNB
->
prach_energy_counter
);
if
((
gNB
->
prach_energy_counter
==
100
)
&&
(
max_preamble_energy
[
0
]
>
gNB
->
measurements
.
prach_I0
+
gNB
->
prach_thres
))
{
if
((
gNB
->
prach_energy_counter
==
100
)
&&
(
max_preamble_energy
[
0
]
>
gNB
->
measurements
.
prach_I0
+
gNB
->
prach_thres
))
{
LOG_I
(
PHY
,
"[gNB %d][RAPROC] Frame %d, slot %d Initiating RA procedure with preamble %d, energy %d.%d dB, delay %d start symbol %u freq index %u
\n
"
,
gNB
->
Mod_id
,
...
...
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
0ef6ef2b
...
...
@@ -259,7 +259,6 @@ void nr_postDecode(PHY_VARS_gNB *gNB, notifiedFIFO_elt_t *req) {
LOG_D
(
PHY
,
"ULSCH received ok
\n
"
);
nr_fill_indication
(
gNB
,
ulsch_harq
->
frame
,
ulsch_harq
->
slot
,
rdata
->
ulsch_id
,
rdata
->
harq_pid
,
0
);
//log_dump(PHY, ulsch_harq->b, 16, LOG_DUMP_CHAR,"gnb pusch rx frame %d %d: ", ulsch_harq->frame, ulsch_harq->slot);
}
else
{
LOG_D
(
PHY
,
"[gNB %d] ULSCH: Setting NAK for SFN/SF %d/%d (pid %d, status %d, round %d, TBS %d) r %d
\n
"
,
gNB
->
Mod_id
,
ulsch_harq
->
frame
,
ulsch_harq
->
slot
,
...
...
openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
View file @
0ef6ef2b
...
...
@@ -274,7 +274,7 @@ int8_t nr_ue_phy_config_request(nr_phy_config_t *phy_config){
if
(
phy_config
!=
NULL
)
{
memcpy
(
nrUE_config
,
&
phy_config
->
config_req
,
sizeof
(
fapi_nr_config_request_t
));
if
(
PHY_vars_UE_g
[
phy_config
->
Mod_id
][
phy_config
->
CC_id
]
->
UE_mode
[
0
]
==
NOT_SYNCHED
)
PHY_vars_UE_g
[
phy_config
->
Mod_id
][
phy_config
->
CC_id
]
->
UE_mode
[
0
]
=
PRACH
;
PHY_vars_UE_g
[
phy_config
->
Mod_id
][
phy_config
->
CC_id
]
->
UE_mode
[
0
]
=
PRACH
;
}
return
0
;
}
...
...
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
View file @
0ef6ef2b
...
...
@@ -2062,7 +2062,6 @@ void nr_ue_prach_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t
}
else
{
nr_prach
=
nr_ue_get_rach
(
prach_resources
,
&
ue
->
prach_vars
[
0
]
->
prach_pdu
,
mod_id
,
ue
->
CC_id
,
frame_tx
,
gNB_id
,
nr_slot_tx
);
LOG_D
(
PHY
,
"In %s:[%d.%d] getting PRACH resources : %d
\n
"
,
__FUNCTION__
,
frame_tx
,
nr_slot_tx
,
nr_prach
);
}
...
...
openair1/SCHED_NR_UE/pucch_uci_ue_nr.c
View file @
0ef6ef2b
...
...
@@ -564,10 +564,8 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_
int
N_CS
=
initial_pucch_resource
[
initial_pucch_id
].
nb_CS_indexes
;
/* see TS 38213 Table 9.2.1-1: PUCCH resource sets before dedicated PUCCH resource configuration */
BWPsize
=
NRRIV2BW
(
mac
->
scc_SIB
->
uplinkConfigCommon
->
initialUplinkBWP
.
genericParameters
.
locationAndBandwidth
,
MAX_BWP_SIZE
);
BWPstart
=
NRRIV2PRBOFFSET
(
mac
->
scc_SIB
->
uplinkConfigCommon
->
initialUplinkBWP
.
genericParameters
.
locationAndBandwidth
,
MAX_BWP_SIZE
);
BWPsize
=
NRRIV2BW
(
mac
->
scc_SIB
->
uplinkConfigCommon
->
initialUplinkBWP
.
genericParameters
.
locationAndBandwidth
,
MAX_BWP_SIZE
);
BWPstart
=
NRRIV2PRBOFFSET
(
mac
->
scc_SIB
->
uplinkConfigCommon
->
initialUplinkBWP
.
genericParameters
.
locationAndBandwidth
,
MAX_BWP_SIZE
);
int
RB_BWP_offset
;
if
(
initial_pucch_id
==
15
)
{
RB_BWP_offset
=
BWPsize
/
4
;
...
...
@@ -601,9 +599,8 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_
else
if
((
pucch_resource_set
!=
MAX_NB_OF_PUCCH_RESOURCE_SETS
)
&&
(
pucch_resource_id
!=
MAX_NB_OF_PUCCH_RESOURCES
))
{
/* check that current configuration is supported */
if
(
mac
->
cg
&&
mac
->
cg
->
physicalCellGroupConfig
&&
(
mac
->
cg
->
physicalCellGroupConfig
->
harq_ACK_SpatialBundlingPUCCH
!=
NULL
||
mac
->
cg
->
physicalCellGroupConfig
->
pdsch_HARQ_ACK_Codebook
!=
1
))
{
mac
->
cg
->
physicalCellGroupConfig
&&
(
mac
->
cg
->
physicalCellGroupConfig
->
harq_ACK_SpatialBundlingPUCCH
!=
NULL
||
mac
->
cg
->
physicalCellGroupConfig
->
pdsch_HARQ_ACK_Codebook
!=
1
))
{
LOG_E
(
PHY
,
"PUCCH Unsupported cell group configuration : at line %d in function %s of file %s
\n
"
,
LINE_FILE
,
__func__
,
FILE_NAME
);
return
(
FALSE
);
}
...
...
@@ -618,17 +615,17 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_
}
NR_PUCCH_Config_t
*
pucch_Config
;
if
(
bwp_id
>
0
&&
mac
->
ULbwp
[
bwp_id
-
1
]
&&
mac
->
ULbwp
[
bwp_id
-
1
]
->
bwp_Dedicated
&&
mac
->
ULbwp
[
bwp_id
-
1
]
&&
mac
->
ULbwp
[
bwp_id
-
1
]
->
bwp_Dedicated
&&
mac
->
ULbwp
[
bwp_id
-
1
]
->
bwp_Dedicated
->
pucch_Config
&&
mac
->
ULbwp
[
bwp_id
-
1
]
->
bwp_Dedicated
->
pucch_Config
->
choice
.
setup
)
pucch_Config
=
mac
->
ULbwp
[
bwp_id
-
1
]
->
bwp_Dedicated
->
pucch_Config
->
choice
.
setup
;
else
if
(
bwp_id
==
0
&&
mac
->
cg
&&
mac
->
cg
->
spCellConfig
&&
mac
->
cg
->
spCellConfig
->
spCellConfigDedicated
&&
mac
->
cg
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
&&
mac
->
cg
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
initialUplinkBWP
&&
mac
->
cg
&&
mac
->
cg
->
spCellConfig
&&
mac
->
cg
->
spCellConfig
->
spCellConfigDedicated
&&
mac
->
cg
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
&&
mac
->
cg
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
initialUplinkBWP
&&
mac
->
cg
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
initialUplinkBWP
->
pucch_Config
&&
mac
->
cg
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
initialUplinkBWP
->
pucch_Config
->
choice
.
setup
)
{
pucch_Config
=
mac
->
cg
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
initialUplinkBWP
->
pucch_Config
->
choice
.
setup
;
...
...
@@ -683,9 +680,7 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_
int
O_CRC
=
0
;
nb_symbols
=
nb_symbols_total
;
/* by default, it can be reduced due to symbols reserved for dmrs */
pucch_resource
=
format
>
1
?
mac
->
ULbwp
[
bwp_id
-
1
]
->
bwp_Dedicated
->
pucch_Config
->
choice
.
setup
->
resourceToAddModList
->
list
.
array
[
pucch_resource_id
]
:
0
;
pucch_resource
=
format
>
1
?
mac
->
ULbwp
[
bwp_id
-
1
]
->
bwp_Dedicated
->
pucch_Config
->
choice
.
setup
->
resourceToAddModList
->
list
.
array
[
pucch_resource_id
]
:
0
;
switch
(
format
)
{
case
pucch_format0_nr
:
...
...
@@ -864,13 +859,13 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_
case
pucch_format0_nr
:
{
int
pucch_GroupHopping
=
mac
->
ULbwp
[
bwp_id
-
1
]
?
mac
->
ULbwp
[
bwp_id
-
1
]
->
bwp_Common
->
pucch_ConfigCommon
->
choice
.
setup
->
pucch_GroupHopping
:
mac
->
scc_SIB
->
uplinkConfigCommon
->
initialUplinkBWP
.
pucch_ConfigCommon
->
choice
.
setup
->
pucch_GroupHopping
;
mac
->
ULbwp
[
bwp_id
-
1
]
->
bwp_Common
->
pucch_ConfigCommon
->
choice
.
setup
->
pucch_GroupHopping
:
mac
->
scc_SIB
->
uplinkConfigCommon
->
initialUplinkBWP
.
pucch_ConfigCommon
->
choice
.
setup
->
pucch_GroupHopping
;
int
hoppingId
=
mac
->
ULbwp
[
bwp_id
-
1
]
?
mac
->
ULbwp
[
bwp_id
-
1
]
->
bwp_Common
->
pucch_ConfigCommon
->
choice
.
setup
->
hoppingId
[
0
]
:
(
mac
->
scc_SIB
->
uplinkConfigCommon
->
initialUplinkBWP
.
pucch_ConfigCommon
->
choice
.
setup
->
hoppingId
?
mac
->
scc_SIB
->
uplinkConfigCommon
->
initialUplinkBWP
.
pucch_ConfigCommon
->
choice
.
setup
->
hoppingId
[
0
]
:
mac
->
physCellId
);
mac
->
ULbwp
[
bwp_id
-
1
]
->
bwp_Common
->
pucch_ConfigCommon
->
choice
.
setup
->
hoppingId
[
0
]
:
(
mac
->
scc_SIB
->
uplinkConfigCommon
->
initialUplinkBWP
.
pucch_ConfigCommon
->
choice
.
setup
->
hoppingId
?
mac
->
scc_SIB
->
uplinkConfigCommon
->
initialUplinkBWP
.
pucch_ConfigCommon
->
choice
.
setup
->
hoppingId
[
0
]
:
mac
->
physCellId
);
nr_generate_pucch0
(
ue
,
ue
->
common_vars
.
txdataF
,
&
ue
->
frame_parms
,
pucch_GroupHopping
,
...
...
@@ -1319,7 +1314,7 @@ boolean_t select_pucch_resource(PHY_VARS_NR_UE *ue, NR_UE_MAC_INST_t *mac, uint8
current_resource_id
=
r_PUCCH
;
}
else
{
current_resource_id
=
resourceSetToAddModList
->
list
.
array
[
pucch_resource_set_id
]
->
resourceList
.
list
.
array
[
pucch_resource_indicator
][
0
];
current_resource_id
=
resourceSetToAddModList
->
list
.
array
[
pucch_resource_set_id
]
->
resourceList
.
list
.
array
[
pucch_resource_indicator
][
0
];
}
}
...
...
openair2/F1AP/f1ap_cu_interface_management.c
View file @
0ef6ef2b
...
...
@@ -349,58 +349,55 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance,
/* optional */
/* - nRPCI */
if
(
1
)
{
cells_to_be_activated_list_item
.
nRPCI
=
(
F1AP_NRPCI_t
*
)
calloc
(
1
,
sizeof
(
F1AP_NRPCI_t
));
*
cells_to_be_activated_list_item
.
nRPCI
=
f1ap_setup_resp
->
cells_to_activate
[
i
].
nrpci
;
// int 0..1007
cells_to_be_activated_list_item
.
nRPCI
=
(
F1AP_NRPCI_t
*
)
calloc
(
1
,
sizeof
(
F1AP_NRPCI_t
));
*
cells_to_be_activated_list_item
.
nRPCI
=
f1ap_setup_resp
->
cells_to_activate
[
i
].
nrpci
;
// int 0..1007
}
/* optional */
/* - gNB-CU System Information */
if
(
1
)
{
/* 3.1.2 gNB-CUSystem Information */
F1AP_Cells_to_be_Activated_List_ItemExtIEs_t
*
cells_to_be_activated_list_itemExtIEs
;
cells_to_be_activated_list_itemExtIEs
=
(
F1AP_Cells_to_be_Activated_List_ItemExtIEs_t
*
)
calloc
(
1
,
sizeof
(
F1AP_Cells_to_be_Activated_List_ItemExtIEs_t
));
cells_to_be_activated_list_itemExtIEs
->
id
=
F1AP_ProtocolIE_ID_id_gNB_CUSystemInformation
;
cells_to_be_activated_list_itemExtIEs
->
criticality
=
F1AP_Criticality_reject
;
cells_to_be_activated_list_itemExtIEs
->
extensionValue
.
present
=
F1AP_Cells_to_be_Activated_List_ItemExtIEs__extensionValue_PR_GNB_CUSystemInformation
;
F1AP_GNB_CUSystemInformation_t
*
gNB_CUSystemInformation
=
(
F1AP_GNB_CUSystemInformation_t
*
)
calloc
(
1
,
sizeof
(
F1AP_GNB_CUSystemInformation_t
));
//LOG_I(F1AP, "%s() SI %d size %d: ", __func__, i, f1ap_setup_resp->SI_container_length[i][0]);
//for (int n = 0; n < f1ap_setup_resp->SI_container_length[i][0]; n++)
// printf("%02x ", f1ap_setup_resp->SI_container[i][0][n]);
//printf("\n");
// for (int sIBtype=2;sIBtype<33;sIBtype++) { //21 ? 33 ?
for
(
int
sIBtype
=
2
;
sIBtype
<
21
;
sIBtype
++
)
{
if
(
f1ap_setup_resp
->
cells_to_activate
[
i
].
SI_container
[
sIBtype
]
!=
NULL
)
{
AssertFatal
(
sIBtype
<
6
||
sIBtype
==
9
,
"Illegal SI type %d
\n
"
,
sIBtype
);
F1AP_SibtypetobeupdatedListItem_t
*
sib_item
=
calloc
(
1
,
sizeof
(
*
sib_item
));
memset
((
void
*
)
sib_item
,
0
,
sizeof
(
*
sib_item
));
sib_item
->
sIBtype
=
sIBtype
;
OCTET_STRING_fromBuf
(
&
sib_item
->
sIBmessage
,
(
const
char
*
)
f1ap_setup_resp
->
cells_to_activate
[
i
].
SI_container
[
sIBtype
],
f1ap_setup_resp
->
cells_to_activate
[
i
].
SI_container_length
[
sIBtype
]);
LOG_D
(
F1AP
,
"f1ap_setup_resp->SI_container_length[%d][%d] = %d
\n
"
,
i
,
sIBtype
,
f1ap_setup_resp
->
cells_to_activate
[
i
].
SI_container_length
[
sIBtype
]);
ASN_SEQUENCE_ADD
(
&
gNB_CUSystemInformation
->
sibtypetobeupdatedlist
.
list
,
sib_item
);
}
}
cells_to_be_activated_list_itemExtIEs
->
extensionValue
.
choice
.
GNB_CUSystemInformation
=
*
gNB_CUSystemInformation
;
F1AP_ProtocolExtensionContainer_154P112_t
p_154P112_t
;
memset
((
void
*
)
&
p_154P112_t
,
0
,
sizeof
(
F1AP_ProtocolExtensionContainer_154P112_t
));
ASN_SEQUENCE_ADD
(
&
p_154P112_t
.
list
,
cells_to_be_activated_list_itemExtIEs
);
cells_to_be_activated_list_item
.
iE_Extensions
=
(
struct
F1AP_ProtocolExtensionContainer
*
)
&
p_154P112_t
;
free
(
gNB_CUSystemInformation
);
gNB_CUSystemInformation
=
NULL
;
/* 3.1.2 gNB-CUSystem Information */
F1AP_Cells_to_be_Activated_List_ItemExtIEs_t
*
cells_to_be_activated_list_itemExtIEs
;
cells_to_be_activated_list_itemExtIEs
=
(
F1AP_Cells_to_be_Activated_List_ItemExtIEs_t
*
)
calloc
(
1
,
sizeof
(
F1AP_Cells_to_be_Activated_List_ItemExtIEs_t
));
cells_to_be_activated_list_itemExtIEs
->
id
=
F1AP_ProtocolIE_ID_id_gNB_CUSystemInformation
;
cells_to_be_activated_list_itemExtIEs
->
criticality
=
F1AP_Criticality_reject
;
cells_to_be_activated_list_itemExtIEs
->
extensionValue
.
present
=
F1AP_Cells_to_be_Activated_List_ItemExtIEs__extensionValue_PR_GNB_CUSystemInformation
;
F1AP_GNB_CUSystemInformation_t
*
gNB_CUSystemInformation
=
(
F1AP_GNB_CUSystemInformation_t
*
)
calloc
(
1
,
sizeof
(
F1AP_GNB_CUSystemInformation_t
));
//LOG_I(F1AP, "%s() SI %d size %d: ", __func__, i, f1ap_setup_resp->SI_container_length[i][0]);
//for (int n = 0; n < f1ap_setup_resp->SI_container_length[i][0]; n++)
// printf("%02x ", f1ap_setup_resp->SI_container[i][0][n]);
//printf("\n");
// for (int sIBtype=2;sIBtype<33;sIBtype++) { //21 ? 33 ?
for
(
int
sIBtype
=
2
;
sIBtype
<
21
;
sIBtype
++
)
{
if
(
f1ap_setup_resp
->
cells_to_activate
[
i
].
SI_container
[
sIBtype
]
!=
NULL
)
{
AssertFatal
(
sIBtype
<
6
||
sIBtype
==
9
,
"Illegal SI type %d
\n
"
,
sIBtype
);
F1AP_SibtypetobeupdatedListItem_t
*
sib_item
=
calloc
(
1
,
sizeof
(
*
sib_item
));
memset
((
void
*
)
sib_item
,
0
,
sizeof
(
*
sib_item
));
sib_item
->
sIBtype
=
sIBtype
;
OCTET_STRING_fromBuf
(
&
sib_item
->
sIBmessage
,
(
const
char
*
)
f1ap_setup_resp
->
cells_to_activate
[
i
].
SI_container
[
sIBtype
],
f1ap_setup_resp
->
cells_to_activate
[
i
].
SI_container_length
[
sIBtype
]);
LOG_D
(
F1AP
,
"f1ap_setup_resp->SI_container_length[%d][%d] = %d
\n
"
,
i
,
sIBtype
,
f1ap_setup_resp
->
cells_to_activate
[
i
].
SI_container_length
[
sIBtype
]);
ASN_SEQUENCE_ADD
(
&
gNB_CUSystemInformation
->
sibtypetobeupdatedlist
.
list
,
sib_item
);
}
}
cells_to_be_activated_list_itemExtIEs
->
extensionValue
.
choice
.
GNB_CUSystemInformation
=
*
gNB_CUSystemInformation
;
F1AP_ProtocolExtensionContainer_154P112_t
p_154P112_t
;
memset
((
void
*
)
&
p_154P112_t
,
0
,
sizeof
(
F1AP_ProtocolExtensionContainer_154P112_t
));
ASN_SEQUENCE_ADD
(
&
p_154P112_t
.
list
,
cells_to_be_activated_list_itemExtIEs
);
cells_to_be_activated_list_item
.
iE_Extensions
=
(
struct
F1AP_ProtocolExtensionContainer
*
)
&
p_154P112_t
;
free
(
gNB_CUSystemInformation
);
gNB_CUSystemInformation
=
NULL
;
}
/* ADD */
cells_to_be_activated_list_item_ies
->
value
.
choice
.
Cells_to_be_Activated_List_Item
=
cells_to_be_activated_list_item
;
ASN_SEQUENCE_ADD
(
&
ie
->
value
.
choice
.
Cells_to_be_Activated_List
.
list
,
cells_to_be_activated_list_item_ies
);
ASN_SEQUENCE_ADD
(
&
ie
->
value
.
choice
.
Cells_to_be_Activated_List
.
list
,
cells_to_be_activated_list_item_ies
);
}
ASN_SEQUENCE_ADD
(
&
out
->
protocolIEs
.
list
,
ie
);
}
...
...
@@ -571,9 +568,7 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu
ie
->
criticality
=
F1AP_Criticality_reject
;
ie
->
value
.
present
=
F1AP_GNBCUConfigurationUpdateIEs__value_PR_Cells_to_be_Activated_List
;
for
(
i
=
0
;
i
<
f1ap_gnb_cu_configuration_update
->
num_cells_to_activate
;
i
++
)
{
for
(
i
=
0
;
i
<
f1ap_gnb_cu_configuration_update
->
num_cells_to_activate
;
i
++
)
{
F1AP_Cells_to_be_Activated_List_ItemIEs_t
*
cells_to_be_activated_list_item_ies
;
cells_to_be_activated_list_item_ies
=
(
F1AP_Cells_to_be_Activated_List_ItemIEs_t
*
)
calloc
(
1
,
sizeof
(
F1AP_Cells_to_be_Activated_List_ItemIEs_t
));
...
...
@@ -833,8 +828,6 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu
gnb_cu_tnl_association_to_update_item_ies);
}
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
*/
/*
...
...
@@ -942,8 +935,8 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu
LOG_E
(
F1AP
,
"Failed to encode F1 gNB-CU CONFIGURATION UPDATE
\n
"
);
return
-
1
;
}
printf
(
"F1AP gNB-CU CONFIGURATION UPDATE : "
);
LOG_I
(
F1AP
,
"F1AP gNB-CU CONFIGURATION UPDATE : "
);
for
(
int
i
=
0
;
i
<
len
;
i
++
)
printf
(
"%02x "
,
buffer
[
i
]);
printf
(
"
\n
"
);
cu_f1ap_itti_send_sctp_data_req
(
instance
,
f1ap_du_data_from_du
->
assoc_id
,
buffer
,
len
,
0
);
...
...
openair2/F1AP/f1ap_cu_rrc_message_transfer.c
View file @
0ef6ef2b
...
...
@@ -169,7 +169,6 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
}
}
}
AssertFatal
(
rrc_inst
>=
0
,
"couldn't find an RRC instance for nr_cell %llu
\n
"
,(
unsigned
long
long
int
)
nr_cellid
);
int
f1ap_uid
=
f1ap_add_ue
(
&
f1ap_cu_inst
[
rrc_inst
],
rrc_inst
,
CC_id
,
0
,
rnti
);
...
...
@@ -344,7 +343,7 @@ int CU_handle_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
F1AP_ULRRCMessageTransfer_t
*
container
;
F1AP_ULRRCMessageTransferIEs_t
*
ie
;
uint64_t
cu_ue_f1ap_id
;
uint64_t
du_ue_f1ap_id
;
uint64_t
srb_id
;
...
...
openair2/F1AP/f1ap_cu_ue_context_management.c
View file @
0ef6ef2b
...
...
@@ -440,7 +440,6 @@ if (0) {
DRB_Information
->
dRB_QoS
.
qoS_Characteristics
.
choice
.
dynamic_5QI
->
packetErrorRate
.
pER_Scalar
=
1L
;
DRB_Information
->
dRB_QoS
.
qoS_Characteristics
.
choice
.
dynamic_5QI
->
packetErrorRate
.
pER_Exponent
=
6L
;
/* OPTIONAL */
/* delayCritical */
if
(
0
)
{
...
...
@@ -582,8 +581,9 @@ if (0) {
/* packetErrorRate */
flows_mapped_to_drb_item
.
qoSFlowLevelQoSParameters
.
qoS_Characteristics
.
choice
.
dynamic_5QI
->
packetErrorRate
.
pER_Scalar
=
1L
;
flows_mapped_to_drb_item
.
qoSFlowLevelQoSParameters
.
qoS_Characteristics
.
choice
.
dynamic_5QI
->
packetErrorRate
.
pER_Exponent
=
6L
;
/* OPTIONAL */
flows_mapped_to_drb_item
.
qoSFlowLevelQoSParameters
.
qoS_Characteristics
.
choice
.
dynamic_5QI
->
packetErrorRate
.
pER_Exponent
=
6L
;
/* OPTIONAL */
/* delayCritical */
if
(
0
)
{
flows_mapped_to_drb_item
.
qoSFlowLevelQoSParameters
.
qoS_Characteristics
.
choice
.
dynamic_5QI
->
delayCritical
=
(
long
*
)
calloc
(
1
,
sizeof
(
long
));
...
...
Prev
1
2
3
Next
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