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
littleBu
OpenXG-RAN
Commits
586a4b76
Commit
586a4b76
authored
Oct 01, 2024
by
Raghavendra Dinavahi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update pbchsim to work with other numerologies
parent
65d8d410
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
98 deletions
+12
-98
openair1/SIMULATION/NR_PHY/pbchsim.c
openair1/SIMULATION/NR_PHY/pbchsim.c
+12
-98
No files found.
openair1/SIMULATION/NR_PHY/pbchsim.c
View file @
586a4b76
...
...
@@ -125,55 +125,6 @@ int nr_ue_pdcch_procedures(PHY_VARS_NR_UE *ue,
return
0
;
}
void
nr_phy_config_request_sim_pbchsim
(
PHY_VARS_gNB
*
gNB
,
int
N_RB_DL
,
int
N_RB_UL
,
int
mu
,
int
Nid_cell
,
uint64_t
position_in_burst
)
{
NR_DL_FRAME_PARMS
*
fp
=
&
gNB
->
frame_parms
;
nfapi_nr_config_request_scf_t
*
gNB_config
=
&
gNB
->
gNB_config
;
//overwrite for new NR parameters
uint64_t
rev_burst
=
0
;
for
(
int
i
=
0
;
i
<
64
;
i
++
)
rev_burst
|=
(((
position_in_burst
>>
(
63
-
i
))
&
0x01
)
<<
i
);
gNB_config
->
cell_config
.
phy_cell_id
.
value
=
Nid_cell
;
gNB_config
->
ssb_config
.
scs_common
.
value
=
mu
;
gNB_config
->
ssb_table
.
ssb_subcarrier_offset
.
value
=
0
;
gNB_config
->
ssb_table
.
ssb_offset_point_a
.
value
=
(
N_RB_DL
-
20
)
>>
1
;
gNB_config
->
ssb_table
.
ssb_mask_list
[
1
].
ssb_mask
.
value
=
(
rev_burst
)
&
(
0xFFFFFFFF
);
gNB_config
->
ssb_table
.
ssb_mask_list
[
0
].
ssb_mask
.
value
=
(
rev_burst
>>
32
)
&
(
0xFFFFFFFF
);
gNB_config
->
cell_config
.
frame_duplex_type
.
value
=
TDD
;
gNB_config
->
ssb_table
.
ssb_period
.
value
=
1
;
//10ms
gNB_config
->
carrier_config
.
dl_grid_size
[
mu
].
value
=
N_RB_DL
;
gNB_config
->
carrier_config
.
ul_grid_size
[
mu
].
value
=
N_RB_UL
;
gNB_config
->
carrier_config
.
num_tx_ant
.
value
=
fp
->
nb_antennas_tx
;
gNB_config
->
carrier_config
.
num_rx_ant
.
value
=
fp
->
nb_antennas_rx
;
gNB_config
->
tdd_table
.
tdd_period
.
value
=
0
;
//gNB_config->subframe_config.dl_cyclic_prefix_type.value = (fp->Ncp == NORMAL) ? NFAPI_CP_NORMAL : NFAPI_CP_EXTENDED;
fp
->
dl_CarrierFreq
=
3600000000
;
//from_nrarfcn(gNB_config->nfapi_config.rf_bands.rf_band[0],gNB_config->nfapi_config.nrarfcn.value);
fp
->
ul_CarrierFreq
=
3600000000
;
//fp->dl_CarrierFreq - (get_uldl_offset(gNB_config->nfapi_config.rf_bands.rf_band[0])*100000);
if
(
mu
>
2
)
fp
->
nr_band
=
257
;
else
fp
->
nr_band
=
78
;
fp
->
threequarter_fs
=
0
;
frequency_range_t
frequency_range
=
fp
->
nr_band
>
256
?
FR2
:
FR1
;
int
bw_index
=
get_supported_band_index
(
mu
,
frequency_range
,
N_RB_DL
);
gNB_config
->
carrier_config
.
dl_bandwidth
.
value
=
get_supported_bw_mhz
(
frequency_range
,
bw_index
);
fp
->
ofdm_offset_divisor
=
UINT_MAX
;
nr_init_frame_parms
(
gNB_config
,
fp
);
init_timeshift_rotation
(
fp
);
init_symbol_rotation
(
fp
);
gNB
->
configured
=
1
;
LOG_I
(
PHY
,
"gNB configured
\n
"
);
}
configmodule_interface_t
*
uniqCfg
=
NULL
;
int
main
(
int
argc
,
char
**
argv
)
{
...
...
@@ -499,9 +450,14 @@ int main(int argc, char **argv)
frame_parms
->
ssb_type
=
nr_ssb_type_C
;
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
);
nr_phy_config_request_sim
(
gNB
,
N_RB_DL
,
N_RB_DL
,
mu
,
Nid_cell
,
SSB_positions
);
gNB
->
gNB_config
.
tdd_table
.
tdd_period
.
value
=
6
;
set_tdd_config_nr
(
&
gNB
->
gNB_config
,
mu
,
7
,
6
,
2
,
4
);
if
(
mu
==
0
)
set_tdd_config_nr
(
&
gNB
->
gNB_config
,
mu
,
3
,
6
,
1
,
4
);
else
if
(
mu
==
1
)
set_tdd_config_nr
(
&
gNB
->
gNB_config
,
mu
,
7
,
6
,
2
,
4
);
else
if
(
mu
==
3
)
set_tdd_config_nr
(
&
gNB
->
gNB_config
,
mu
,
27
,
6
,
12
,
4
);
phy_init_nr_gNB
(
gNB
);
frame_parms
->
ssb_start_subcarrier
=
12
*
gNB
->
gNB_config
.
ssb_table
.
ssb_offset_point_a
.
value
+
ssb_subcarrier_offset
;
initFloatingCoresTpool
(
ssb_scan_threads
,
&
nrUE_params
.
Tpool
,
false
,
"UE-tpool"
);
...
...
@@ -511,40 +467,10 @@ int main(int argc, char **argv)
double
fs
=
0
,
eps
;
double
scs
=
30000
;
double
bw
=
100e6
;
switch
(
mu
)
{
case
1
:
scs
=
30000
;
frame_parms
->
Lmax
=
8
;
if
(
N_RB_DL
==
217
)
{
fs
=
122.88e6
;
bw
=
80e6
;
}
else
if
(
N_RB_DL
==
245
)
{
fs
=
122.88e6
;
bw
=
90e6
;
}
else
if
(
N_RB_DL
==
273
)
{
fs
=
122.88e6
;
bw
=
100e6
;
}
else
if
(
N_RB_DL
==
106
)
{
fs
=
61.44e6
;
bw
=
40e6
;
}
else
AssertFatal
(
1
==
0
,
"Unsupported numerology for mu %d, N_RB %d
\n
"
,
mu
,
N_RB_DL
);
break
;
case
3
:
frame_parms
->
Lmax
=
64
;
scs
=
120000
;
if
(
N_RB_DL
==
66
)
{
fs
=
122.88e6
;
bw
=
100e6
;
}
else
AssertFatal
(
1
==
0
,
"Unsupported numerology for mu %d, N_RB %d
\n
"
,
mu
,
N_RB_DL
);
break
;
}
double
txbw
,
rxbw
;
uint32_t
samples
;
get_samplerate_and_bw
(
mu
,
N_RB_DL
,
frame_parms
->
threequarter_fs
,
&
fs
,
&
samples
,
&
txbw
,
&
rxbw
);
// cfo with respect to sub-carrier spacing
eps
=
cfo
/
scs
;
...
...
@@ -560,19 +486,7 @@ int main(int argc, char **argv)
printf
(
"FFO = %lf; IFO = %d
\n
"
,
eps
-
IFO
,
IFO
);
}
gNB2UE
=
new_channel_desc_scm
(
n_tx
,
n_rx
,
channel_model
,
fs
,
0
,
bw
,
300e-9
,
0
.
0
,
CORR_LEVEL_LOW
,
0
,
0
,
0
,
0
);
gNB2UE
=
new_channel_desc_scm
(
n_tx
,
n_rx
,
channel_model
,
fs
,
0
,
txbw
,
300e-9
,
0
.
0
,
CORR_LEVEL_LOW
,
0
,
0
,
0
,
0
);
if
(
gNB2UE
==
NULL
)
{
printf
(
"Problem generating channel model. Exiting.
\n
"
);
...
...
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