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
153b206d
Commit
153b206d
authored
Apr 26, 2018
by
Guy De Souza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DC subcarrier fix/minor changes
parent
db326bbf
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
88 additions
and
47 deletions
+88
-47
openair1/PHY/NR_TRANSPORT/nr_pss.c
openair1/PHY/NR_TRANSPORT/nr_pss.c
+2
-4
openair1/PHY/NR_TRANSPORT/nr_sss.c
openair1/PHY/NR_TRANSPORT/nr_sss.c
+2
-4
openair1/PHY/defs.h
openair1/PHY/defs.h
+11
-0
openair1/SCHED_NR/phy_procedures_nr_common.c
openair1/SCHED_NR/phy_procedures_nr_common.c
+0
-39
openair1/SCHED_NR/phy_procedures_nr_gNB.c
openair1/SCHED_NR/phy_procedures_nr_gNB.c
+73
-0
No files found.
openair1/PHY/NR_TRANSPORT/nr_pss.c
View file @
153b206d
...
...
@@ -68,12 +68,10 @@ int nr_generate_pss( int16_t *d_pss,
for
(
m
=
0
;
m
<
NR_PSS_LENGTH
;
m
++
)
{
((
int16_t
*
)
txdataF
[
aa
])[
2
*
(
l
*
frame_parms
->
ofdm_symbol_size
+
k
)]
=
(
a
*
d_pss
[
m
])
>>
15
;
k
+
=
1
;
k
+
+
;
if
(
k
>=
frame_parms
->
ofdm_symbol_size
)
{
k
++
;
//skip DC
if
(
k
>=
frame_parms
->
ofdm_symbol_size
)
k
-=
frame_parms
->
ofdm_symbol_size
;
}
}
}
...
...
openair1/PHY/NR_TRANSPORT/nr_sss.c
View file @
153b206d
...
...
@@ -78,12 +78,10 @@ int nr_generate_sss( int16_t *d_sss,
for
(
m
=
0
;
m
<
NR_SSS_LENGTH
;
m
++
)
{
((
int16_t
*
)
txdataF
[
aa
])[
2
*
(
l
*
frame_parms
->
ofdm_symbol_size
+
k
)]
=
(
a
*
d_sss
[
m
])
>>
15
;
k
+
=
1
;
k
+
+
;
if
(
k
>=
frame_parms
->
ofdm_symbol_size
)
{
k
++
;
//skip DC
if
(
k
>=
frame_parms
->
ofdm_symbol_size
)
k
-=
frame_parms
->
ofdm_symbol_size
;
}
}
}
#ifdef NR_SSS_DEBUG
...
...
openair1/PHY/defs.h
View file @
153b206d
...
...
@@ -169,6 +169,14 @@ static inline void* malloc16_clear( size_t size )
#define nr_subframe_t lte_subframe_t
typedef
enum
{
nr_ssb_type_A
=
0
,
nr_ssb_type_B
,
nr_ssb_type_C
,
nr_ssb_type_D
,
nr_ssb_type_E
}
nr_ssb_type_e
;
typedef
struct
{
/// EUTRA Band
uint8_t
eutra_band
;
...
...
@@ -204,8 +212,11 @@ typedef struct {
uint32_t
samples_per_subframe_wCP
;
/// Number of samples in a radio frame without CP
uint32_t
samples_per_frame_wCP
;
//SSB related params
/// Start in Subcarrier index of the SSB block
uint16_t
ssb_start_subcarrier
;
nr_ssb_type_e
ssb_type
;
}
NR_DL_FRAME_PARMS
;
struct
PHY_VARS_gNB_s
;
...
...
openair1/SCHED_NR/phy_procedures_nr_common.c
View file @
153b206d
...
...
@@ -40,42 +40,3 @@ nr_subframe_t nr_subframe_select(nfapi_config_request_t *cfg,unsigned char subfr
return
(
SF_DL
);
}
// First possible symbol is used with n=0
int
nr_get_ssb_start_symbol
(
nfapi_config_request_t
*
cfg
,
NR_DL_FRAME_PARMS
*
fp
)
{
int
mu
=
cfg
->
subframe_config
.
numerology_index_mu
.
value
;
int
symbol
=
0
;
switch
(
mu
)
{
case
NR_MU_0
:
symbol
=
2
;
break
;
case
NR_MU_1
:
// case B
symbol
=
4
;
break
;
case
NR_MU_3
:
symbol
=
4
;
break
;
case
NR_MU_4
:
symbol
=
8
;
break
;
default:
AssertFatal
(
0
==
1
,
"Invalid numerology index %d for the synchronization block
\n
"
,
mu
);
}
if
(
cfg
->
sch_config
.
half_frame_index
.
value
)
symbol
+=
(
5
*
fp
->
symbols_per_slot
*
fp
->
slots_per_subframe
);
return
symbol
;
}
void
nr_set_ssb_first_subcarrier
(
nfapi_config_request_t
*
cfg
,
NR_DL_FRAME_PARMS
*
fp
)
{
int
start_rb
=
cfg
->
sch_config
.
n_ssb_crb
.
value
/
pow
(
2
,
cfg
->
subframe_config
.
numerology_index_mu
.
value
);
fp
->
ssb_start_subcarrier
=
12
*
start_rb
+
cfg
->
sch_config
.
ssb_subcarrier_offset
.
value
;
}
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
153b206d
...
...
@@ -39,6 +39,79 @@
#endif
extern
uint8_t
nfapi_mode
;
/*
int return_ssb_type(nfapi_config_request_t *cfg)
{
int mu = cfg->subframe_config.numerology_index_mu.value;
nr_numerology_index_e ssb_type;
switch(mu) {
case NR_MU_0:
ssb_type = nr_ssb_type_A;
break;
case NR_MU_1:
ssb_type = nr_ssb_type_B;
break;
case NR_MU_3:
ssb_type = nr_ssb_type_D;
break;
case NR_MU_4:
ssb_type = nr_ssb_type_E;
break;
default:
AssertFatal(0==1, "Invalid numerology index %d for the synchronization block\n", mu);
}
LOG_D(PHY, "SSB type %d\n", ssb_type);
return ssb_type;
}*/
// First SSB starting symbol candidate is used and type B is chosen for 30kHz SCS
int
nr_get_ssb_start_symbol
(
nfapi_config_request_t
*
cfg
,
NR_DL_FRAME_PARMS
*
fp
)
{
int
mu
=
cfg
->
subframe_config
.
numerology_index_mu
.
value
;
int
symbol
=
0
;
switch
(
mu
)
{
case
NR_MU_0
:
symbol
=
2
;
break
;
case
NR_MU_1
:
// case B
symbol
=
4
;
break
;
case
NR_MU_3
:
symbol
=
4
;
break
;
case
NR_MU_4
:
symbol
=
8
;
break
;
default:
AssertFatal
(
0
==
1
,
"Invalid numerology index %d for the synchronization block
\n
"
,
mu
);
}
if
(
cfg
->
sch_config
.
half_frame_index
.
value
)
symbol
+=
(
5
*
fp
->
symbols_per_slot
*
fp
->
slots_per_subframe
);
return
symbol
;
}
void
nr_set_ssb_first_subcarrier
(
nfapi_config_request_t
*
cfg
,
NR_DL_FRAME_PARMS
*
fp
)
{
int
start_rb
=
cfg
->
sch_config
.
n_ssb_crb
.
value
/
pow
(
2
,
cfg
->
subframe_config
.
numerology_index_mu
.
value
);
fp
->
ssb_start_subcarrier
=
12
*
start_rb
+
cfg
->
sch_config
.
ssb_subcarrier_offset
.
value
;
LOG_D
(
PHY
,
"SSB first subcarrier %d
\n
"
,
fp
->
ssb_start_subcarrier
);
}
void
nr_common_signal_procedures
(
PHY_VARS_gNB
*
gNB
,
int
frame
,
int
subframe
)
{
...
...
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