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
wangwenhui
OpenXG-RAN
Commits
15f07d2b
Commit
15f07d2b
authored
Feb 21, 2019
by
Francesco Mani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
multiple SSB generation in pbchsim
parent
688830e8
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
25 deletions
+34
-25
openair1/PHY/INIT/nr_init.c
openair1/PHY/INIT/nr_init.c
+2
-2
openair1/PHY/INIT/phy_init.h
openair1/PHY/INIT/phy_init.h
+1
-1
openair1/SIMULATION/NR_PHY/pbchsim.c
openair1/SIMULATION/NR_PHY/pbchsim.c
+31
-22
No files found.
openair1/PHY/INIT/nr_init.c
View file @
15f07d2b
...
...
@@ -387,7 +387,7 @@ void install_schedule_handlers(IF_Module_t *if_inst)
/// this function is a temporary addition for NR configuration
void
nr_phy_config_request_sim
(
PHY_VARS_gNB
*
gNB
,
int
N_RB_DL
,
int
N_RB_UL
,
int
mu
,
int
Nid_cell
)
void
nr_phy_config_request_sim
(
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_t
*
gNB_config
=
&
gNB
->
gNB_config
;
...
...
@@ -404,7 +404,7 @@ void nr_phy_config_request_sim(PHY_VARS_gNB *gNB,int N_RB_DL,int N_RB_UL,int mu,
gNB_config
->
sch_config
.
n_ssb_crb
.
value
=
(
N_RB_DL
-
20
);
gNB_config
->
sch_config
.
ssb_subcarrier_offset
.
value
=
0
;
gNB_config
->
sch_config
.
physical_cell_id
.
value
=
Nid_cell
;
gNB_config
->
sch_config
.
ssb_scg_position_in_burst
.
value
=
position_in_burst
;
gNB
->
mac_enabled
=
1
;
...
...
openair1/PHY/INIT/phy_init.h
View file @
15f07d2b
...
...
@@ -383,7 +383,7 @@ void init_nr_ue_transport(PHY_VARS_NR_UE *ue,int abstraction_flag);
void
nr_dump_frame_parms
(
NR_DL_FRAME_PARMS
*
frame_parms
);
int
phy_init_nr_gNB
(
PHY_VARS_gNB
*
gNB
,
unsigned
char
is_secondary_gNB
,
unsigned
char
abstraction_flag
);
void
nr_phy_config_request
(
NR_PHY_Config_t
*
gNB
);
void
nr_phy_config_request_sim
(
PHY_VARS_gNB
*
gNB
,
int
N_RB_DL
,
int
N_RB_UL
,
int
mu
,
int
Nid_cell
);
void
nr_phy_config_request_sim
(
PHY_VARS_gNB
*
gNB
,
int
N_RB_DL
,
int
N_RB_UL
,
int
mu
,
int
Nid_cell
,
uint64_t
position_in_burst
);
void
phy_free_nr_gNB
(
PHY_VARS_gNB
*
gNB
);
int
l1_north_init_gNB
(
void
);
void
init_nr_transport
(
PHY_VARS_gNB
*
gNB
);
...
...
openair1/SIMULATION/NR_PHY/pbchsim.c
View file @
15f07d2b
...
...
@@ -105,6 +105,7 @@ int main(int argc, char **argv)
int
trial
,
n_trials
=
1
,
n_errors
=
0
,
n_errors_payload
=
0
;
uint8_t
transmission_mode
=
1
,
n_tx
=
1
,
n_rx
=
1
;
uint16_t
Nid_cell
=
0
;
uint64_t
SSB_positions
=
0x01
;
channel_desc_t
*
gNB2UE
;
...
...
@@ -280,6 +281,10 @@ int main(int argc, char **argv)
break
;
case
'M'
:
SSB_positions
=
atoi
(
optarg
);
break
;
case
'N'
:
Nid_cell
=
atoi
(
optarg
);
break
;
...
...
@@ -333,6 +338,7 @@ int main(int argc, char **argv)
printf
(
"-i Relative strength of first intefering eNB (in dB) - cell_id mod 3 = 1
\n
"
);
printf
(
"-j Relative strength of second intefering eNB (in dB) - cell_id mod 3 = 2
\n
"
);
printf
(
"-o Carrier frequency offset in Hz
\n
"
);
printf
(
"-M Multiple SSB positions in burst
\n
"
);
printf
(
"-N Nid_cell
\n
"
);
printf
(
"-R N_RB_DL
\n
"
);
printf
(
"-O oversampling factor (1,2,4,8,16)
\n
"
);
...
...
@@ -366,32 +372,34 @@ int main(int argc, char **argv)
frame_parms
->
N_RB_UL
=
N_RB_DL
;
frame_parms
->
Nid_cell
=
Nid_cell
;
nr_phy_config_request_sim
(
gNB
,
N_RB_DL
,
N_RB_DL
,
mu
,
Nid_cell
);
nr_phy_config_request_sim
(
gNB
,
N_RB_DL
,
N_RB_DL
,
mu
,
Nid_cell
,
SSB_positions
);
phy_init_nr_gNB
(
gNB
,
0
,
0
);
double
fs
,
bw
,
scs
,
eps
;
if
(
mu
==
1
&&
N_RB_DL
==
217
)
{
switch
(
mu
)
{
case
1
:
scs
=
30000
;
if
(
N_RB_DL
==
217
)
{
fs
=
122.88e6
;
bw
=
80e6
;
scs
=
30000
;
}
else
if
(
mu
==
1
&&
N_RB_DL
==
245
)
{
else
if
(
N_RB_DL
==
245
)
{
fs
=
122.88e6
;
bw
=
90e6
;
scs
=
30000
;
}
else
if
(
mu
==
1
&&
N_RB_DL
==
273
)
{
else
if
(
N_RB_DL
==
273
)
{
fs
=
122.88e6
;
bw
=
100e6
;
scs
=
30000
;
}
else
if
(
mu
==
1
&&
N_RB_DL
==
106
)
{
else
if
(
N_RB_DL
==
106
)
{
fs
=
61.44e6
;
bw
=
40e6
;
scs
=
30000
;
}
else
AssertFatal
(
1
==
0
,
"Unsupported numerology for mu %d, N_RB %d
\n
"
,
mu
,
N_RB_DL
);
break
;
}
// cfo with respect to sub-carrier spacing
eps
=
cfo
/
scs
;
...
...
@@ -476,6 +484,7 @@ int main(int argc, char **argv)
if
(
input_fd
==
NULL
)
{
gNB
->
pbch_configured
=
1
;
for
(
int
i
=
0
;
i
<
4
;
i
++
)
gNB
->
pbch_pdu
[
i
]
=
i
+
1
;
nr_common_signal_procedures
(
gNB
,
frame
,
subframe
);
LOG_M
(
"txsigF0.m"
,
"txsF0"
,
gNB
->
common_vars
.
txdataF
[
0
],
frame_length_complex_samples_no_prefix
,
1
,
1
);
...
...
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