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
efeb5384
Commit
efeb5384
authored
Apr 23, 2024
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
harmonize usage of frequency range structures
parent
8a3c329e
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
18 additions
and
23 deletions
+18
-23
common/utils/nr/nr_common.h
common/utils/nr/nr_common.h
+0
-5
executables/nr-ru.c
executables/nr-ru.c
+1
-1
openair1/PHY/INIT/nr_parms.c
openair1/PHY/INIT/nr_parms.c
+6
-6
openair1/PHY/NR_UE_ESTIMATION/nr_adjust_synch_ue.c
openair1/PHY/NR_UE_ESTIMATION/nr_adjust_synch_ue.c
+1
-1
openair1/PHY/defs_nr_common.h
openair1/PHY/defs_nr_common.h
+1
-1
openair1/SCHED_NR/phy_procedures_nr_gNB.c
openair1/SCHED_NR/phy_procedures_nr_gNB.c
+4
-4
openair1/SIMULATION/NR_PHY/pbchsim.c
openair1/SIMULATION/NR_PHY/pbchsim.c
+3
-3
openair1/SIMULATION/NR_PHY/prachsim.c
openair1/SIMULATION/NR_PHY/prachsim.c
+2
-2
No files found.
common/utils/nr/nr_common.h
View file @
efeb5384
...
...
@@ -79,11 +79,6 @@ static inline const char *rnti_types(nr_rnti_type_t rr)
#define NR_MAX_NB_LAYERS 4 // 8
typedef
enum
{
nr_FR1
=
0
,
nr_FR2
}
nr_frequency_range_e
;
typedef
struct
nr_bandentry_s
{
int16_t
band
;
uint64_t
ul_min
;
...
...
executables/nr-ru.c
View file @
efeb5384
...
...
@@ -841,7 +841,7 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) {
flags_burst
=
proc
->
first_tx
==
1
?
TX_BURST_START
:
TX_BURST_MIDDLE
;
}
if
(
fp
->
freq_range
==
nr_
FR2
)
if
(
fp
->
freq_range
==
FR2
)
flags_gpio
=
get_gpio_flags
(
ru
,
slot
);
const
int
flags
=
flags_burst
|
(
flags_gpio
<<
4
);
...
...
openair1/PHY/INIT/nr_parms.c
View file @
efeb5384
...
...
@@ -252,7 +252,7 @@ void nr_init_frame_parms(nfapi_nr_config_request_scf_t* cfg, NR_DL_FRAME_PARMS *
fp
->
get_samples_slot_timestamp
=
&
get_samples_slot_timestamp
;
fp
->
get_slot_from_timestamp
=
&
get_slot_from_timestamp
;
fp
->
samples_per_frame
=
10
*
fp
->
samples_per_subframe
;
fp
->
freq_range
=
(
fp
->
dl_CarrierFreq
<
6e9
)
?
nr_FR1
:
nr_
FR2
;
fp
->
freq_range
=
(
fp
->
dl_CarrierFreq
<
6e9
)
?
FR1
:
FR2
;
fp
->
Ncp
=
Ncp
;
...
...
@@ -341,12 +341,12 @@ int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *fp,
fp
->
get_samples_per_slot
=
&
get_samples_per_slot
;
fp
->
get_samples_slot_timestamp
=
&
get_samples_slot_timestamp
;
fp
->
samples_per_frame
=
10
*
fp
->
samples_per_subframe
;
fp
->
freq_range
=
(
fp
->
dl_CarrierFreq
<
6e9
)
?
nr_FR1
:
nr_
FR2
;
fp
->
freq_range
=
(
fp
->
dl_CarrierFreq
<
6e9
)
?
FR1
:
FR2
;
uint8_t
sco
=
0
;
if
(((
fp
->
freq_range
==
nr_
FR1
)
&&
(
config
->
ssb_table
.
ssb_subcarrier_offset
<
24
))
||
((
fp
->
freq_range
==
nr_
FR2
)
&&
(
config
->
ssb_table
.
ssb_subcarrier_offset
<
12
)))
{
if
(
fp
->
freq_range
==
nr_
FR1
)
if
(((
fp
->
freq_range
==
FR1
)
&&
(
config
->
ssb_table
.
ssb_subcarrier_offset
<
24
))
||
((
fp
->
freq_range
==
FR2
)
&&
(
config
->
ssb_table
.
ssb_subcarrier_offset
<
12
)))
{
if
(
fp
->
freq_range
==
FR1
)
sco
=
config
->
ssb_table
.
ssb_subcarrier_offset
>>
config
->
ssb_config
.
scs_common
;
else
sco
=
config
->
ssb_table
.
ssb_subcarrier_offset
;
...
...
@@ -379,7 +379,7 @@ void nr_init_frame_parms_ue_sa(NR_DL_FRAME_PARMS *frame_parms, uint64_t downlink
frame_parms
->
numerology_index
=
mu
;
frame_parms
->
dl_CarrierFreq
=
downlink_frequency
;
frame_parms
->
ul_CarrierFreq
=
downlink_frequency
+
delta_duplex
;
frame_parms
->
freq_range
=
(
frame_parms
->
dl_CarrierFreq
<
6e9
)
?
nr_FR1
:
nr_
FR2
;
frame_parms
->
freq_range
=
(
frame_parms
->
dl_CarrierFreq
<
6e9
)
?
FR1
:
FR2
;
frame_parms
->
N_RB_UL
=
frame_parms
->
N_RB_DL
;
frame_parms
->
nr_band
=
nr_band
;
...
...
openair1/PHY/NR_UE_ESTIMATION/nr_adjust_synch_ue.c
View file @
efeb5384
...
...
@@ -71,7 +71,7 @@ int nr_adjust_synch_ue(NR_DL_FRAME_PARMS *frame_parms,
int
diff
=
ue
->
max_pos_avg
>>
15
;
if
(
frame_parms
->
freq_range
==
nr_FR2
)
if
(
frame_parms
->
freq_range
==
FR2
)
sync_offset
=
2
;
else
sync_offset
=
0
;
...
...
openair1/PHY/defs_nr_common.h
View file @
efeb5384
...
...
@@ -139,7 +139,7 @@ typedef uint32_t (*get_samples_slot_timestamp_t)(int slot, const NR_DL_FRAME_PAR
struct
NR_DL_FRAME_PARMS
{
/// frequency range
nr_frequency_range_e
freq_range
;
frequency_range_t
freq_range
;
// /// Placeholder to replace overlapping fields below
// nfapi_nr_rf_config_t rf_config;
/// Placeholder to replace SSB overlapping fields below
...
...
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
efeb5384
...
...
@@ -71,10 +71,10 @@ void nr_common_signal_procedures(PHY_VARS_gNB *gNB,int frame,int slot, nfapi_nr_
// for FR2 offsetToPointA is expressed in terms of 60 kHz SCS and k_SSB expressed in terms of the subcarrier spacing provided
// by the higher-layer parameter subCarrierSpacingCommon
const
int
scs
=
cfg
->
ssb_config
.
scs_common
.
value
;
const
int
prb_offset
=
(
fp
->
freq_range
==
nr_
FR1
)
?
ssb_pdu
.
ssb_pdu_rel15
.
ssbOffsetPointA
>>
scs
:
ssb_pdu
.
ssb_pdu_rel15
.
ssbOffsetPointA
>>
(
scs
-
2
);
const
int
prb_offset
=
(
fp
->
freq_range
==
FR1
)
?
ssb_pdu
.
ssb_pdu_rel15
.
ssbOffsetPointA
>>
scs
:
ssb_pdu
.
ssb_pdu_rel15
.
ssbOffsetPointA
>>
(
scs
-
2
);
const
int
sc_offset
=
(
fp
->
freq_range
==
nr_
FR1
)
?
ssb_pdu
.
ssb_pdu_rel15
.
SsbSubcarrierOffset
>>
scs
:
ssb_pdu
.
ssb_pdu_rel15
.
SsbSubcarrierOffset
;
(
fp
->
freq_range
==
FR1
)
?
ssb_pdu
.
ssb_pdu_rel15
.
SsbSubcarrierOffset
>>
scs
:
ssb_pdu
.
ssb_pdu_rel15
.
SsbSubcarrierOffset
;
fp
->
ssb_start_subcarrier
=
(
12
*
prb_offset
+
sc_offset
);
if
(
fp
->
print_ue_help_cmdline_log
&&
get_softmodem_params
()
->
sa
)
{
...
...
@@ -134,7 +134,7 @@ void nr_common_signal_procedures(PHY_VARS_gNB *gNB,int frame,int slot, nfapi_nr_
#endif
// Beam_id is currently used only for FR2
if
(
fp
->
freq_range
==
nr_
FR2
){
if
(
fp
->
freq_range
==
FR2
){
LOG_D
(
PHY
,
"slot %d, ssb_index %d, beam %d
\n
"
,
slot
,
ssb_index
,
cfg
->
ssb_table
.
ssb_beam_id_list
[
ssb_index
].
beam_id
.
value
);
for
(
int
j
=
0
;
j
<
fp
->
symbols_per_slot
;
j
++
)
gNB
->
common_vars
.
beam_id
[
0
][
slot
*
fp
->
symbols_per_slot
+
j
]
=
cfg
->
ssb_table
.
ssb_beam_id_list
[
ssb_index
].
beam_id
.
value
;
...
...
openair1/SIMULATION/NR_PHY/pbchsim.c
View file @
efeb5384
...
...
@@ -487,7 +487,7 @@ int main(int argc, char **argv)
frame_parms
->
N_RB_DL
=
N_RB_DL
;
frame_parms
->
Nid_cell
=
Nid_cell
;
frame_parms
->
ssb_type
=
nr_ssb_type_C
;
frame_parms
->
freq_range
=
mu
<
2
?
nr_FR1
:
nr_
FR2
;
frame_parms
->
freq_range
=
mu
<
2
?
FR1
:
FR2
;
nr_phy_config_request_sim_pbchsim
(
gNB
,
N_RB_DL
,
N_RB_DL
,
mu
,
Nid_cell
,
SSB_positions
);
gNB
->
gNB_config
.
tdd_table
.
tdd_period
.
value
=
6
;
...
...
@@ -620,8 +620,8 @@ int main(int argc, char **argv)
for
(
i
=
0
;
i
<
frame_parms
->
Lmax
;
i
++
)
{
if
((
SSB_positions
>>
i
)
&
0x01
)
{
const
int
sc_offset
=
frame_parms
->
freq_range
==
nr_
FR1
?
ssb_subcarrier_offset
<<
mu
:
ssb_subcarrier_offset
;
const
int
prb_offset
=
frame_parms
->
freq_range
==
nr_
FR1
?
gNB
->
gNB_config
.
ssb_table
.
ssb_offset_point_a
.
value
<<
mu
:
gNB
->
gNB_config
.
ssb_table
.
ssb_offset_point_a
.
value
<<
(
mu
-
2
);
const
int
sc_offset
=
frame_parms
->
freq_range
==
FR1
?
ssb_subcarrier_offset
<<
mu
:
ssb_subcarrier_offset
;
const
int
prb_offset
=
frame_parms
->
freq_range
==
FR1
?
gNB
->
gNB_config
.
ssb_table
.
ssb_offset_point_a
.
value
<<
mu
:
gNB
->
gNB_config
.
ssb_table
.
ssb_offset_point_a
.
value
<<
(
mu
-
2
);
msgDataTx
.
ssb
[
i
].
ssb_pdu
.
ssb_pdu_rel15
.
bchPayload
=
0x55dd33
;
msgDataTx
.
ssb
[
i
].
ssb_pdu
.
ssb_pdu_rel15
.
SsbBlockIndex
=
i
;
msgDataTx
.
ssb
[
i
].
ssb_pdu
.
ssb_pdu_rel15
.
SsbSubcarrierOffset
=
sc_offset
;
...
...
openair1/SIMULATION/NR_PHY/prachsim.c
View file @
efeb5384
...
...
@@ -422,7 +422,7 @@ int main(int argc, char **argv){
frame_parms
->
N_RB_UL
=
N_RB_UL
;
frame_parms
->
threequarter_fs
=
threequarter_fs
;
frame_parms
->
frame_type
=
TDD
;
frame_parms
->
freq_range
=
(
mu
!=
3
?
nr_FR1
:
nr_
FR2
);
frame_parms
->
freq_range
=
(
mu
!=
3
?
FR1
:
FR2
);
frame_parms
->
numerology_index
=
mu
;
nr_phy_config_request_sim
(
gNB
,
N_RB_UL
,
N_RB_UL
,
mu
,
Nid_cell
,
SSB_positions
);
...
...
@@ -447,7 +447,7 @@ int main(int argc, char **argv){
frame_parms
->
Ncp
,
frame_parms
->
samples_per_subframe
,
frame_parms
->
frame_type
==
FDD
?
"FDD"
:
"TDD"
,
frame_parms
->
freq_range
==
nr_
FR1
?
"FR1"
:
"FR2"
);
frame_parms
->
freq_range
==
FR1
?
"FR1"
:
"FR2"
);
ru
->
nr_frame_parms
=
frame_parms
;
ru
->
if_south
=
LOCAL_RF
;
...
...
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