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
wangjie
OpenXG-RAN
Commits
2b85c360
Commit
2b85c360
authored
Jul 13, 2021
by
Fang-WANG
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change center freq
parent
dc5993be
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
126 additions
and
18 deletions
+126
-18
nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
+1
-0
openair1/PHY/NR_TRANSPORT/nr_dci.c
openair1/PHY/NR_TRANSPORT/nr_dci.c
+3
-3
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
+1
-1
openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h
openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h
+1
-0
openair1/PHY/NR_UE_TRANSPORT/nr_ue_rf_helpers.c
openair1/PHY/NR_UE_TRANSPORT/nr_ue_rf_helpers.c
+50
-0
openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
+35
-0
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
+1
-1
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
+1
-1
openair2/LAYER2/NR_MAC_UE/config_ue.c
openair2/LAYER2/NR_MAC_UE/config_ue.c
+26
-6
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+2
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
+5
-5
No files found.
nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
View file @
2b85c360
...
@@ -951,6 +951,7 @@ typedef struct
...
@@ -951,6 +951,7 @@ typedef struct
{
{
uint16_t
dl_bandwidth
;
//Carrier bandwidth for DL in MHz [38.104, sec 5.3.2] Values: 5, 10, 15, 20, 25, 30, 40,50, 60, 70, 80,90,100,200,400
uint16_t
dl_bandwidth
;
//Carrier bandwidth for DL in MHz [38.104, sec 5.3.2] Values: 5, 10, 15, 20, 25, 30, 40,50, 60, 70, 80,90,100,200,400
uint32_t
dl_frequency
;
//Absolute frequency of DL point A in KHz [38.104, sec5.2 and 38.211 sec 4.4.4.2] Value: 450000 -> 52600000
uint32_t
dl_frequency
;
//Absolute frequency of DL point A in KHz [38.104, sec5.2 and 38.211 sec 4.4.4.2] Value: 450000 -> 52600000
uint32_t
halfbw
;
//Absolute frequency of DL point A in KHz [38.104, sec5.2 and 38.211 sec 4.4.4.2] Value: 450000 -> 52600000
uint16_t
dl_k0
[
5
];
//𝑘_{0}^{𝜇} for each of the numerologies [38.211, sec 5.3.1] Value: 0 ->23699
uint16_t
dl_k0
[
5
];
//𝑘_{0}^{𝜇} for each of the numerologies [38.211, sec 5.3.1] Value: 0 ->23699
uint16_t
dl_grid_size
[
5
];
//Grid size 𝑁_{𝑔𝑟𝑖𝑑}^{𝑠𝑖𝑧𝑒,𝜇} for each of the numerologies [38.211, sec 4.4.2] Value: 0->275 0 = this numerology not used
uint16_t
dl_grid_size
[
5
];
//Grid size 𝑁_{𝑔𝑟𝑖𝑑}^{𝑠𝑖𝑧𝑒,𝜇} for each of the numerologies [38.211, sec 4.4.2] Value: 0->275 0 = this numerology not used
uint16_t
num_tx_ant
;
//Number of Tx antennas
uint16_t
num_tx_ant
;
//Number of Tx antennas
...
...
openair1/PHY/NR_TRANSPORT/nr_dci.c
View file @
2b85c360
...
@@ -94,12 +94,12 @@ void nr_generate_dci(PHY_VARS_gNB *gNB,
...
@@ -94,12 +94,12 @@ void nr_generate_dci(PHY_VARS_gNB *gNB,
* in time: by its first slot and its first symbol*/
* in time: by its first slot and its first symbol*/
const
nfapi_nr_dl_dci_pdu_t
*
dci_pdu
=
&
pdcch_pdu_rel15
->
dci_pdu
[
d
];
const
nfapi_nr_dl_dci_pdu_t
*
dci_pdu
=
&
pdcch_pdu_rel15
->
dci_pdu
[
d
];
LOG_
I
(
PHY
,
"DCI pdu %d, rnti %x, aggregation %d CCE %d Scrambling_Id %x ScramblingRNTI %x PayloadSizeBits %d
\n
"
,
d
,
dci_pdu
->
RNTI
,
dci_pdu
->
AggregationLevel
,
dci_pdu
->
CceIndex
,
dci_pdu
->
ScramblingId
,
dci_pdu
->
ScramblingRNTI
,
dci_pdu
->
PayloadSizeBits
);
LOG_
D
(
PHY
,
"DCI pdu %d, rnti %x, aggregation %d CCE %d Scrambling_Id %x ScramblingRNTI %x PayloadSizeBits %d
\n
"
,
d
,
dci_pdu
->
RNTI
,
dci_pdu
->
AggregationLevel
,
dci_pdu
->
CceIndex
,
dci_pdu
->
ScramblingId
,
dci_pdu
->
ScramblingRNTI
,
dci_pdu
->
PayloadSizeBits
);
cset_start_symb
=
pdcch_pdu_rel15
->
StartSymbolIndex
;
cset_start_symb
=
pdcch_pdu_rel15
->
StartSymbolIndex
;
cset_nsymb
=
pdcch_pdu_rel15
->
DurationSymbols
;
cset_nsymb
=
pdcch_pdu_rel15
->
DurationSymbols
;
dci_idx
=
0
;
dci_idx
=
0
;
LOG_
I
(
PHY
,
"Coreset rb_offset %d, nb_rb %d BWP Start %d
\n
"
,
rb_offset
,
n_rb
,
pdcch_pdu_rel15
->
BWPStart
);
LOG_
D
(
PHY
,
"Coreset rb_offset %d, nb_rb %d BWP Start %d
\n
"
,
rb_offset
,
n_rb
,
pdcch_pdu_rel15
->
BWPStart
);
LOG_
I
(
PHY
,
"Coreset starting subcarrier %d on symbol %d (%d symbols)
\n
"
,
cset_start_sc
,
cset_start_symb
,
cset_nsymb
);
LOG_
D
(
PHY
,
"Coreset starting subcarrier %d on symbol %d (%d symbols)
\n
"
,
cset_start_sc
,
cset_start_symb
,
cset_nsymb
);
// DMRS length is per OFDM symbol
// DMRS length is per OFDM symbol
uint32_t
dmrs_length
=
n_rb
*
6
;
//2(QPSK)*3(per RB)*6(REG per CCE)
uint32_t
dmrs_length
=
n_rb
*
6
;
//2(QPSK)*3(per RB)*6(REG per CCE)
uint32_t
encoded_length
=
dci_pdu
->
AggregationLevel
*
108
;
//2(QPSK)*9(per RB)*6(REG per CCE)
uint32_t
encoded_length
=
dci_pdu
->
AggregationLevel
*
108
;
//2(QPSK)*9(per RB)*6(REG per CCE)
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
View file @
2b85c360
...
@@ -645,7 +645,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
...
@@ -645,7 +645,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
return
((
1
+
dlsch
->
max_ldpc_iterations
));
return
((
1
+
dlsch
->
max_ldpc_iterations
));
}
else
{
}
else
{
LOG_
I
(
PHY
,
"[UE %d] DLSCH: Setting ACK for frame nr_slot_rx %d TBS %d mcs %d nb_rb %d harq_process->round %d
\n
"
,
LOG_
D
(
PHY
,
"[UE %d] DLSCH: Setting ACK for frame nr_slot_rx %d TBS %d mcs %d nb_rb %d harq_process->round %d
\n
"
,
phy_vars_ue
->
Mod_id
,
nr_slot_rx
,
harq_process
->
TBS
,
harq_process
->
mcs
,
harq_process
->
nb_rb
,
harq_process
->
round
);
phy_vars_ue
->
Mod_id
,
nr_slot_rx
,
harq_process
->
TBS
,
harq_process
->
mcs
,
harq_process
->
nb_rb
,
harq_process
->
round
);
harq_process
->
status
=
SCH_IDLE
;
harq_process
->
status
=
SCH_IDLE
;
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h
View file @
2b85c360
...
@@ -1467,6 +1467,7 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc,
...
@@ -1467,6 +1467,7 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc,
void
nr_get_carrier_frequencies
(
NR_DL_FRAME_PARMS
*
fp
,
void
nr_get_carrier_frequencies
(
NR_DL_FRAME_PARMS
*
fp
,
uint64_t
*
dl_Carrier
,
uint64_t
*
dl_Carrier
,
uint64_t
*
ul_Carrier
);
uint64_t
*
ul_Carrier
);
void
nr_set_carrier_frequencies
(
NR_DL_FRAME_PARMS
*
fp
,
uint64_t
dl_carrier
);
/*!
/*!
\brief This function sets the OAI RF card rx/tx params
\brief This function sets the OAI RF card rx/tx params
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_ue_rf_helpers.c
View file @
2b85c360
...
@@ -33,6 +33,8 @@
...
@@ -33,6 +33,8 @@
#include "nr_transport_proto_ue.h"
#include "nr_transport_proto_ue.h"
#include "executables/softmodem-common.h"
#include "executables/softmodem-common.h"
extern
openair0_config_t
openair0_cfg
[];
void
nr_get_carrier_frequencies
(
NR_DL_FRAME_PARMS
*
fp
,
uint64_t
*
dl_carrier
,
uint64_t
*
ul_carrier
){
void
nr_get_carrier_frequencies
(
NR_DL_FRAME_PARMS
*
fp
,
uint64_t
*
dl_carrier
,
uint64_t
*
ul_carrier
){
if
(
get_softmodem_params
()
->
phy_test
==
1
||
get_softmodem_params
()
->
do_ra
==
1
||
!
downlink_frequency
[
0
][
0
])
{
if
(
get_softmodem_params
()
->
phy_test
==
1
||
get_softmodem_params
()
->
do_ra
==
1
||
!
downlink_frequency
[
0
][
0
])
{
...
@@ -48,6 +50,54 @@ void nr_get_carrier_frequencies(NR_DL_FRAME_PARMS *fp, uint64_t *dl_carrier, uin
...
@@ -48,6 +50,54 @@ void nr_get_carrier_frequencies(NR_DL_FRAME_PARMS *fp, uint64_t *dl_carrier, uin
}
}
void
nr_set_carrier_frequencies
(
NR_DL_FRAME_PARMS
*
fp
,
uint64_t
dl_carrier
){
uint8_t
mod_id
=
0
;
uint8_t
cc_id
=
0
;
PHY_VARS_NR_UE
*
ue
=
PHY_vars_UE_g
[
mod_id
][
cc_id
];
int
rf_chain
=
ue
->
rf_map
.
chain
;
uint64_t
ul_carrier
;
if
(
get_softmodem_params
()
->
phy_test
==
1
||
get_softmodem_params
()
->
do_ra
==
1
||
!
downlink_frequency
[
0
][
0
])
{
fp
->
dl_CarrierFreq
=
dl_carrier
;
}
else
{
downlink_frequency
[
0
][
0
]
=
dl_carrier
;
}
LOG_I
(
PHY
,
"downlink_frequency %ld, dl_carrier %ld
\n
"
,
downlink_frequency
[
0
][
0
],
dl_carrier
);
if
(
uplink_frequency_offset
[
0
][
0
])
ul_carrier
=
dl_carrier
+
uplink_frequency_offset
[
0
][
0
];
else
ul_carrier
=
dl_carrier
+
fp
->
ul_CarrierFreq
-
fp
->
dl_CarrierFreq
;
for
(
int
i
=
rf_chain
;
i
<
rf_chain
+
4
;
i
++
)
{
if
(
i
<
openair0_cfg
->
rx_num_channels
)
openair0_cfg
->
rx_freq
[
i
+
rf_chain
]
=
dl_carrier
+
ue
->
common_vars
.
freq_offset
;
else
openair0_cfg
->
rx_freq
[
i
]
=
0
.
0
;
if
(
i
<
openair0_cfg
->
tx_num_channels
)
openair0_cfg
->
tx_freq
[
i
]
=
ul_carrier
+
ue
->
common_vars
.
freq_offset
;
else
openair0_cfg
->
tx_freq
[
i
]
=
0
.
0
;
if
(
i
<
openair0_cfg
->
rx_num_channels
)
{
LOG_I
(
PHY
,
"new HW: Configuring channel %d (rf_chain %d): setting tx_gain %f, rx_gain %f, tx_freq %f Hz, rx_freq %f Hz
\n
"
,
i
,
rf_chain
,
openair0_cfg
->
tx_gain
[
i
],
openair0_cfg
->
rx_gain
[
i
],
openair0_cfg
->
tx_freq
[
i
],
openair0_cfg
->
rx_freq
[
i
]);
}
ue
->
rfdevice
.
trx_set_freq_func
(
&
ue
->
rfdevice
,
&
openair0_cfg
[
0
],
0
);
}
}
void
nr_rf_card_config
(
openair0_config_t
*
openair0_cfg
,
void
nr_rf_card_config
(
openair0_config_t
*
openair0_cfg
,
double
rx_gain_offset
,
double
rx_gain_offset
,
uint64_t
ul_carrier
,
uint64_t
ul_carrier
,
...
...
openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
View file @
2b85c360
...
@@ -40,6 +40,8 @@
...
@@ -40,6 +40,8 @@
#include "PHY/defs_nr_UE.h"
#include "PHY/defs_nr_UE.h"
#include "PHY/impl_defs_nr.h"
#include "PHY/impl_defs_nr.h"
#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
extern
PHY_VARS_NR_UE
***
PHY_vars_UE_g
;
extern
PHY_VARS_NR_UE
***
PHY_vars_UE_g
;
const
char
*
dl_pdu_type
[]
=
{
"DCI"
,
"DLSCH"
,
"RA_DLSCH"
,
"SI_DLSCH"
,
"P_DLSCH"
};
const
char
*
dl_pdu_type
[]
=
{
"DCI"
,
"DLSCH"
,
"RA_DLSCH"
,
"SI_DLSCH"
,
"P_DLSCH"
};
...
@@ -269,12 +271,45 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){
...
@@ -269,12 +271,45 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){
int8_t
nr_ue_phy_config_request
(
nr_phy_config_t
*
phy_config
){
int8_t
nr_ue_phy_config_request
(
nr_phy_config_t
*
phy_config
){
NR_DL_FRAME_PARMS
*
fp
=
&
PHY_vars_UE_g
[
0
][
0
]
->
frame_parms
;
uint64_t
centreFreq
;
uint8_t
kssb
;
fapi_nr_config_request_t
*
nrUE_config
=
&
PHY_vars_UE_g
[
phy_config
->
Mod_id
][
phy_config
->
CC_id
]
->
nrUE_config
;
fapi_nr_config_request_t
*
nrUE_config
=
&
PHY_vars_UE_g
[
phy_config
->
Mod_id
][
phy_config
->
CC_id
]
->
nrUE_config
;
int
freq_changed
=
0
;
//if (phy_config->config_req.ssb_table.ssb_subcarrier_offset != nrUE_config->ssb_table.ssb_subcarrier_offset)
{
kssb
=
nrUE_config
->
ssb_table
.
ssb_subcarrier_offset
;
LOG_I
(
PHY
,
"save the kssb %d
\n
"
,
kssb
);
}
//else
{
// kssb = phy_config->config_req.ssb_table.ssb_subcarrier_offset;
}
if
(
phy_config
->
config_req
.
ssb_table
.
ssb_offset_point_a
!=
nrUE_config
->
ssb_table
.
ssb_offset_point_a
)
{
freq_changed
=
1
;
LOG_I
(
PHY
,
"dlfrequency %ld %ld, pointA %d %d, ssb offset %d %d
\n
"
,
phy_config
->
config_req
.
carrier_config
.
dl_frequency
,
nrUE_config
->
carrier_config
.
dl_frequency
,
phy_config
->
config_req
.
ssb_table
.
ssb_offset_point_a
,
nrUE_config
->
ssb_table
.
ssb_offset_point_a
,
phy_config
->
config_req
.
ssb_table
.
ssb_subcarrier_offset
,
nrUE_config
->
ssb_table
.
ssb_subcarrier_offset
);
}
if
(
phy_config
!=
NULL
)
{
if
(
phy_config
!=
NULL
)
{
memcpy
(
nrUE_config
,
&
phy_config
->
config_req
,
sizeof
(
fapi_nr_config_request_t
));
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
)
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
;
}
if
(
freq_changed
)
{
nrUE_config
->
ssb_table
.
ssb_subcarrier_offset
=
kssb
;
centreFreq
=
phy_config
->
config_req
.
carrier_config
.
dl_frequency
+
phy_config
->
config_req
.
carrier_config
.
halfbw
+
nrUE_config
->
ssb_table
.
ssb_subcarrier_offset
*
15
;
nr_set_carrier_frequencies
(
fp
,
centreFreq
);
}
}
return
0
;
return
0
;
}
}
...
...
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
View file @
2b85c360
...
@@ -363,7 +363,7 @@ void nr_ue_pbch_procedures(uint8_t gNB_id,
...
@@ -363,7 +363,7 @@ void nr_ue_pbch_procedures(uint8_t gNB_id,
if
(
ret
==
0
)
{
if
(
ret
==
0
)
{
LOG_
I
(
PHY
,
"[UE %d] frame %d, nr_slot_rx %d, OK decoding PBCH!
\n
"
,
LOG_
D
(
PHY
,
"[UE %d] frame %d, nr_slot_rx %d, OK decoding PBCH!
\n
"
,
ue
->
Mod_id
,
frame_rx
,
nr_slot_rx
);
ue
->
Mod_id
,
frame_rx
,
nr_slot_rx
);
ue
->
pbch_vars
[
gNB_id
]
->
pdu_errors_conseq
=
0
;
ue
->
pbch_vars
[
gNB_id
]
->
pdu_errors_conseq
=
0
;
...
...
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
View file @
2b85c360
...
@@ -3396,7 +3396,7 @@ void get_type0_PDCCH_CSS_config_parameters(NR_Type0_PDCCH_CSS_config_t *type0_PD
...
@@ -3396,7 +3396,7 @@ void get_type0_PDCCH_CSS_config_parameters(NR_Type0_PDCCH_CSS_config_t *type0_PD
break
;
break
;
}
}
LOG_
I
(
MAC
,
"Coreset0: index_4msb=%d, num_rbs=%d, num_symb=%d, rb_offset=%d
\n
"
,
LOG_
D
(
MAC
,
"Coreset0: index_4msb=%d, num_rbs=%d, num_symb=%d, rb_offset=%d
\n
"
,
index_4msb
,
type0_PDCCH_CSS_config
->
num_rbs
,
type0_PDCCH_CSS_config
->
num_symbols
,
type0_PDCCH_CSS_config
->
rb_offset
);
index_4msb
,
type0_PDCCH_CSS_config
->
num_rbs
,
type0_PDCCH_CSS_config
->
num_symbols
,
type0_PDCCH_CSS_config
->
rb_offset
);
AssertFatal
(
type0_PDCCH_CSS_config
->
num_rbs
!=
-
1
,
"Type0 PDCCH coreset num_rbs undefined"
);
AssertFatal
(
type0_PDCCH_CSS_config
->
num_rbs
!=
-
1
,
"Type0 PDCCH coreset num_rbs undefined"
);
...
...
openair2/LAYER2/NR_MAC_UE/config_ue.c
View file @
2b85c360
...
@@ -337,8 +337,18 @@ void config_common_ue(NR_UE_MAC_INST_t *mac,
...
@@ -337,8 +337,18 @@ void config_common_ue(NR_UE_MAC_INST_t *mac,
scc_SIB
->
downlinkConfigCommon
.
frequencyInfoDL
.
scs_SpecificCarrierList
.
list
.
array
[
0
]
->
carrierBandwidth
,
scc_SIB
->
downlinkConfigCommon
.
frequencyInfoDL
.
scs_SpecificCarrierList
.
list
.
array
[
0
]
->
carrierBandwidth
,
*
scc_SIB
->
downlinkConfigCommon
.
frequencyInfoDL
.
frequencyBandList
.
list
.
array
[
0
]
->
freqBandIndicatorNR
);
*
scc_SIB
->
downlinkConfigCommon
.
frequencyInfoDL
.
frequencyBandList
.
list
.
array
[
0
]
->
freqBandIndicatorNR
);
cfg
->
carrier_config
.
dl_frequency
=
downlink_frequency
[
0
][
0
]
-
(
10
+
scc_SIB
->
downlinkConfigCommon
.
frequencyInfoDL
.
offsetToPointA
)
*
(
15
<<
scc_SIB
->
downlinkConfigCommon
.
frequencyInfoDL
.
scs_SpecificCarrierList
.
list
.
array
[
0
]
->
subcarrierSpacing
);
cfg
->
carrier_config
.
dl_frequency
=
downlink_frequency
[
0
][
0
]
-
(
10
+
scc_SIB
->
downlinkConfigCommon
.
frequencyInfoDL
.
offsetToPointA
/
2
)
*
(
15
<<
scc_SIB
->
downlinkConfigCommon
.
frequencyInfoDL
.
scs_SpecificCarrierList
.
list
.
array
[
0
]
->
subcarrierSpacing
)
*
12
;
LOG_I
(
PHY
,
"downlink_frequency old : %ld, new : %ld
\n
"
,
downlink_frequency
[
0
][
0
],
cfg
->
carrier_config
.
dl_frequency
);
cfg
->
carrier_config
.
halfbw
=
(
15
<<
scc_SIB
->
downlinkConfigCommon
.
frequencyInfoDL
.
scs_SpecificCarrierList
.
list
.
array
[
0
]
->
subcarrierSpacing
)
*
scc_SIB
->
downlinkConfigCommon
.
frequencyInfoDL
.
scs_SpecificCarrierList
.
list
.
array
[
0
]
->
carrierBandwidth
*
6
;
cfg
->
ssb_table
.
ssb_subcarrier_offset
=
0
;
// shoule take consider the ssb offset at the end.
for
(
i
=
0
;
i
<
5
;
i
++
)
{
for
(
i
=
0
;
i
<
5
;
i
++
)
{
if
(
i
==
scc_SIB
->
downlinkConfigCommon
.
frequencyInfoDL
.
scs_SpecificCarrierList
.
list
.
array
[
0
]
->
subcarrierSpacing
)
{
if
(
i
==
scc_SIB
->
downlinkConfigCommon
.
frequencyInfoDL
.
scs_SpecificCarrierList
.
list
.
array
[
0
]
->
subcarrierSpacing
)
{
cfg
->
carrier_config
.
dl_grid_size
[
i
]
=
scc_SIB
->
downlinkConfigCommon
.
frequencyInfoDL
.
scs_SpecificCarrierList
.
list
.
array
[
0
]
->
carrierBandwidth
;
cfg
->
carrier_config
.
dl_grid_size
[
i
]
=
scc_SIB
->
downlinkConfigCommon
.
frequencyInfoDL
.
scs_SpecificCarrierList
.
list
.
array
[
0
]
->
carrierBandwidth
;
...
@@ -390,11 +400,18 @@ void config_common_ue(NR_UE_MAC_INST_t *mac,
...
@@ -390,11 +400,18 @@ void config_common_ue(NR_UE_MAC_INST_t *mac,
// SSB Table config
// SSB Table config
cfg
->
ssb_table
.
ssb_offset_point_a
=
scc_SIB
->
downlinkConfigCommon
.
frequencyInfoDL
.
offsetToPointA
;
cfg
->
ssb_table
.
ssb_offset_point_a
=
scc_SIB
->
downlinkConfigCommon
.
frequencyInfoDL
.
offsetToPointA
/
2
;
cfg
->
ssb_table
.
ssb_period
=
scc_SIB
->
ssb_PeriodicityServingCell
;
cfg
->
ssb_table
.
ssb_period
=
scc_SIB
->
ssb_PeriodicityServingCell
;
//cfg->ssb_table.ssb_subcarrier_offset = 0; // TODO currently not in RRC?
//cfg->ssb_table.ssb_subcarrier_offset = 0; // TODO currently not in RRC?
LOG_I
(
PHY
,
"in SIB, ssb_offset_point_a %d, ssb_subcarrier_offset %d
\n
"
,
cfg
->
ssb_table
.
ssb_offset_point_a
,
cfg
->
ssb_table
.
ssb_subcarrier_offset
);
LOG_I
(
PHY
,
"in SIB, addr %p ssb_offset_point_a %d, ssb_subcarrier_offset %d, bw %d, sibscs %d, freqPointA %ld, bw %d
\n
"
,
cfg
,
cfg
->
ssb_table
.
ssb_offset_point_a
,
cfg
->
ssb_table
.
ssb_subcarrier_offset
,
scc_SIB
->
downlinkConfigCommon
.
frequencyInfoDL
.
scs_SpecificCarrierList
.
list
.
array
[
0
]
->
carrierBandwidth
,
scc_SIB
->
uplinkConfigCommon
->
frequencyInfoUL
.
scs_SpecificCarrierList
.
list
.
array
[
0
]
->
subcarrierSpacing
,
cfg
->
carrier_config
.
dl_frequency
,
scc_SIB
->
downlinkConfigCommon
.
frequencyInfoDL
.
scs_SpecificCarrierList
.
list
.
array
[
0
]
->
carrierBandwidth
);
AssertFatal
(
scc_SIB
->
ssb_PositionsInBurst
.
groupPresence
==
NULL
,
"Cannot handle more than 8 SSBs for now (%x.%x.%x.%x.%x.%x.%x.%x)
\n
"
,
AssertFatal
(
scc_SIB
->
ssb_PositionsInBurst
.
groupPresence
==
NULL
,
"Cannot handle more than 8 SSBs for now (%x.%x.%x.%x.%x.%x.%x.%x)
\n
"
,
scc_SIB
->
ssb_PositionsInBurst
.
groupPresence
->
buf
[
0
],
scc_SIB
->
ssb_PositionsInBurst
.
groupPresence
->
buf
[
0
],
scc_SIB
->
ssb_PositionsInBurst
.
groupPresence
->
buf
[
1
],
scc_SIB
->
ssb_PositionsInBurst
.
groupPresence
->
buf
[
1
],
...
@@ -699,9 +716,9 @@ int nr_rrc_mac_config_req_ue(
...
@@ -699,9 +716,9 @@ int nr_rrc_mac_config_req_ue(
mac
->
mib
=
mibP
;
// update by every reception
mac
->
mib
=
mibP
;
// update by every reception
mac
->
phy_config
.
Mod_id
=
module_id
;
mac
->
phy_config
.
Mod_id
=
module_id
;
mac
->
phy_config
.
CC_id
=
cc_idP
;
mac
->
phy_config
.
CC_id
=
cc_idP
;
mac
->
phy_config
.
config_req
.
ssb_table
.
ssb_subcarrier_offset
=
0
;
// TODO currently not in RRC?
//
mac->phy_config.config_req.ssb_table.ssb_subcarrier_offset = 0; // TODO currently not in RRC?
mac
->
phy_config
.
config_req
.
tdd_table
.
tdd_period_in_slots
=
5
<<
get_softmodem_params
()
->
numerology
;
mac
->
phy_config
.
config_req
.
tdd_table
.
tdd_period_in_slots
=
5
<<
get_softmodem_params
()
->
numerology
;
mac
->
phy_config
.
config_req
.
ssb_table
.
ssb_offset_point_a
=
(
N_RB_DL
-
20
)
>>
1
;
//
mac->phy_config.config_req.ssb_table.ssb_offset_point_a = (N_RB_DL-20)>>1;
}
}
AssertFatal
(
scell_group_config
==
NULL
||
cell_group_config
==
NULL
,
AssertFatal
(
scell_group_config
==
NULL
||
cell_group_config
==
NULL
,
"both scell_group_config and cell_group_config cannot be non-NULL
\n
"
);
"both scell_group_config and cell_group_config cannot be non-NULL
\n
"
);
...
@@ -711,12 +728,15 @@ int nr_rrc_mac_config_req_ue(
...
@@ -711,12 +728,15 @@ int nr_rrc_mac_config_req_ue(
mac
->
scc_SIB
=
sccP
;
mac
->
scc_SIB
=
sccP
;
LOG_I
(
MAC
,
"Keeping ServingCellConfigCommonSIB
\n
"
);
LOG_I
(
MAC
,
"Keeping ServingCellConfigCommonSIB
\n
"
);
config_common_ue
(
mac
,
module_id
,
cc_idP
);
config_common_ue
(
mac
,
module_id
,
cc_idP
);
int
num_slots_ul
=
mac
->
scc_SIB
->
tdd_UL_DL_ConfigurationCommon
->
pattern1
.
nrofUplinkSlots
;
int
num_slots_ul
=
mac
->
scc_SIB
->
tdd_UL_DL_ConfigurationCommon
->
pattern1
.
nrofUplinkSlots
;
if
(
mac
->
scc_SIB
->
tdd_UL_DL_ConfigurationCommon
->
pattern1
.
nrofUplinkSymbols
>
0
)
num_slots_ul
++
;
if
(
mac
->
scc_SIB
->
tdd_UL_DL_ConfigurationCommon
->
pattern1
.
nrofUplinkSymbols
>
0
)
num_slots_ul
++
;
LOG_I
(
MAC
,
"Initializing ul_config_request. num_slots_ul = %d
\n
"
,
num_slots_ul
);
LOG_I
(
MAC
,
"Initializing ul_config_request. num_slots_ul = %d
\n
"
,
num_slots_ul
);
mac
->
ul_config_request
=
(
fapi_nr_ul_config_request_t
*
)
calloc
(
num_slots_ul
,
sizeof
(
fapi_nr_ul_config_request_t
));
mac
->
ul_config_request
=
(
fapi_nr_ul_config_request_t
*
)
calloc
(
num_slots_ul
,
sizeof
(
fapi_nr_ul_config_request_t
));
// Setup the SSB to Rach Occasions mapping according to the config
// Setup the SSB to Rach Occasions mapping according to the config
build_ssb_to_ro_map
(
mac
);
//->scc, mac->phy_config.config_req.cell_config.frame_duplex_type);
build_ssb_to_ro_map
(
mac
);
//->scc, mac->phy_config.config_req.cell_config.frame_duplex_type);
mac
->
if_module
->
phy_config_request
(
&
mac
->
phy_config
);
mac
->
if_module
->
phy_config_request
(
&
mac
->
phy_config
);
mac
->
common_configuration_complete
=
1
;
mac
->
common_configuration_complete
=
1
;
}
}
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
View file @
2b85c360
...
@@ -173,7 +173,8 @@ int8_t nr_ue_decode_mib(module_id_t module_id,
...
@@ -173,7 +173,8 @@ int8_t nr_ue_decode_mib(module_id_t module_id,
ssb_index
,
ssb_index
,
ssb_offset_point_a
);
ssb_offset_point_a
);
LOG_I
(
MAC
,
"in mib : ssb_start_subcarrier %d, ssb_subcarrier_offset %d, ssb_offset_point_a %d
\n
"
,
LOG_D
(
MAC
,
"in mib : ssb_start_subcarrier %d, ssb_subcarrier_offset %d, ssb_offset_point_a %d
\n
"
,
ssb_start_subcarrier
,
ssb_subcarrier_offset
,
ssb_offset_point_a
);
ssb_start_subcarrier
,
ssb_subcarrier_offset
,
ssb_offset_point_a
);
mac
->
type0_pdcch_ss_mux_pattern
=
mac
->
type0_PDCCH_CSS_config
.
type0_pdcch_ss_mux_pattern
;
mac
->
type0_pdcch_ss_mux_pattern
=
mac
->
type0_PDCCH_CSS_config
.
type0_pdcch_ss_mux_pattern
;
mac
->
type0_pdcch_ss_sfn_c
=
mac
->
type0_PDCCH_CSS_config
.
sfn_c
;
mac
->
type0_pdcch_ss_sfn_c
=
mac
->
type0_PDCCH_CSS_config
.
sfn_c
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
View file @
2b85c360
...
@@ -353,7 +353,7 @@ void schedule_control_sib1(module_id_t module_id,
...
@@ -353,7 +353,7 @@ void schedule_control_sib1(module_id_t module_id,
const
uint16_t
bwpSize
=
type0_PDCCH_CSS_config
->
num_rbs
;
const
uint16_t
bwpSize
=
type0_PDCCH_CSS_config
->
num_rbs
;
int
rbStart
=
0
;
//type0_PDCCH_CSS_config->cset_start_rb;
int
rbStart
=
0
;
//type0_PDCCH_CSS_config->cset_start_rb;
LOG_
I
(
PHY
,
"cset_start_rb is %d, ccdindex %d
\n
"
,
type0_PDCCH_CSS_config
->
cset_start_rb
,
gNB_mac
->
sched_ctrlCommon
->
cce_index
);
LOG_
D
(
PHY
,
"cset_start_rb is %d, ccdindex %d
\n
"
,
type0_PDCCH_CSS_config
->
cset_start_rb
,
gNB_mac
->
sched_ctrlCommon
->
cce_index
);
int
startSymbolIndex
=
0
;
int
startSymbolIndex
=
0
;
int
nrOfSymbols
=
0
;
int
nrOfSymbols
=
0
;
...
@@ -394,8 +394,8 @@ void schedule_control_sib1(module_id_t module_id,
...
@@ -394,8 +394,8 @@ void schedule_control_sib1(module_id_t module_id,
LOG_D
(
MAC
,
"startSymbolIndex = %i
\n
"
,
startSymbolIndex
);
LOG_D
(
MAC
,
"startSymbolIndex = %i
\n
"
,
startSymbolIndex
);
LOG_D
(
MAC
,
"nrOfSymbols = %i
\n
"
,
nrOfSymbols
);
LOG_D
(
MAC
,
"nrOfSymbols = %i
\n
"
,
nrOfSymbols
);
LOG_
I
(
MAC
,
"rbSize = %i, %d, bwp %d %d
\n
"
,
rbStart
,
gNB_mac
->
sched_ctrlCommon
->
sched_pdsch
.
rbSize
,
type0_PDCCH_CSS_config
->
cset_start_rb
,
bwpSize
);
LOG_
D
(
MAC
,
"rbSize = %i, %d, bwp %d %d
\n
"
,
rbStart
,
gNB_mac
->
sched_ctrlCommon
->
sched_pdsch
.
rbSize
,
type0_PDCCH_CSS_config
->
cset_start_rb
,
bwpSize
);
LOG_
I
(
MAC
,
"TBS = %i, totalbyte %d
\n
"
,
TBS
,
gNB_mac
->
sched_ctrlCommon
->
num_total_bytes
);
LOG_
D
(
MAC
,
"TBS = %i, totalbyte %d
\n
"
,
TBS
,
gNB_mac
->
sched_ctrlCommon
->
num_total_bytes
);
LOG_D
(
MAC
,
"dmrs_length %d
\n
"
,
dmrs_length
);
LOG_D
(
MAC
,
"dmrs_length %d
\n
"
,
dmrs_length
);
LOG_D
(
MAC
,
"N_PRB_DMRS = %d
\n
"
,
N_PRB_DMRS
);
LOG_D
(
MAC
,
"N_PRB_DMRS = %d
\n
"
,
N_PRB_DMRS
);
LOG_D
(
MAC
,
"mappingtype = %d
\n
"
,
mappingtype
);
LOG_D
(
MAC
,
"mappingtype = %d
\n
"
,
mappingtype
);
...
@@ -537,7 +537,7 @@ void nr_fill_nfapi_dl_sib1_pdu(int Mod_idP,
...
@@ -537,7 +537,7 @@ void nr_fill_nfapi_dl_sib1_pdu(int Mod_idP,
LOG_D
(
MAC
,
"CyclicPrefix: %i
\n
"
,
pdcch_pdu_rel15
->
CyclicPrefix
);
LOG_D
(
MAC
,
"CyclicPrefix: %i
\n
"
,
pdcch_pdu_rel15
->
CyclicPrefix
);
LOG_D
(
MAC
,
"StartSymbolIndex: %i
\n
"
,
pdcch_pdu_rel15
->
StartSymbolIndex
);
LOG_D
(
MAC
,
"StartSymbolIndex: %i
\n
"
,
pdcch_pdu_rel15
->
StartSymbolIndex
);
LOG_D
(
MAC
,
"DurationSymbols: %i
\n
"
,
pdcch_pdu_rel15
->
DurationSymbols
);
LOG_D
(
MAC
,
"DurationSymbols: %i
\n
"
,
pdcch_pdu_rel15
->
DurationSymbols
);
for
(
int
n
=
0
;
n
<
6
;
n
++
)
LOG_
I
(
MAC
,
"FreqDomainResource[%i]: %x
\n
"
,
n
,
pdcch_pdu_rel15
->
FreqDomainResource
[
n
]);
for
(
int
n
=
0
;
n
<
6
;
n
++
)
LOG_
D
(
MAC
,
"FreqDomainResource[%i]: %x
\n
"
,
n
,
pdcch_pdu_rel15
->
FreqDomainResource
[
n
]);
LOG_D
(
MAC
,
"CceRegMappingType: %i
\n
"
,
pdcch_pdu_rel15
->
CceRegMappingType
);
LOG_D
(
MAC
,
"CceRegMappingType: %i
\n
"
,
pdcch_pdu_rel15
->
CceRegMappingType
);
LOG_D
(
MAC
,
"RegBundleSize: %i
\n
"
,
pdcch_pdu_rel15
->
RegBundleSize
);
LOG_D
(
MAC
,
"RegBundleSize: %i
\n
"
,
pdcch_pdu_rel15
->
RegBundleSize
);
LOG_D
(
MAC
,
"InterleaverSize: %i
\n
"
,
pdcch_pdu_rel15
->
InterleaverSize
);
LOG_D
(
MAC
,
"InterleaverSize: %i
\n
"
,
pdcch_pdu_rel15
->
InterleaverSize
);
...
@@ -585,7 +585,7 @@ void schedule_nr_sib1(module_id_t module_idP, frame_t frameP, sub_frame_t slotP)
...
@@ -585,7 +585,7 @@ void schedule_nr_sib1(module_id_t module_idP, frame_t frameP, sub_frame_t slotP)
(
type0_PDCCH_CSS_config
->
num_rbs
>
0
)
&&
(
type0_PDCCH_CSS_config
->
num_rbs
>
0
)
&&
(
type0_PDCCH_CSS_config
->
active
==
true
))
{
(
type0_PDCCH_CSS_config
->
active
==
true
))
{
LOG_
I
(
NR_MAC
,
"(%d.%d) SIB1 transmission: ssb_index %d
\n
"
,
frameP
,
slotP
,
type0_PDCCH_CSS_config
->
ssb_index
);
LOG_
D
(
NR_MAC
,
"(%d.%d) SIB1 transmission: ssb_index %d
\n
"
,
frameP
,
slotP
,
type0_PDCCH_CSS_config
->
ssb_index
);
// Get SIB1
// Get SIB1
uint8_t
sib1_payload
[
NR_MAX_SIB_LENGTH
/
8
];
uint8_t
sib1_payload
[
NR_MAX_SIB_LENGTH
/
8
];
...
...
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