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
canghaiwuhen
OpenXG-RAN
Commits
d6bbce21
Commit
d6bbce21
authored
May 17, 2018
by
Guy De Souza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor changes: loop declarations
parent
382348ad
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
16 deletions
+16
-16
openair1/PHY/NR_TRANSPORT/nr_pbch.c
openair1/PHY/NR_TRANSPORT/nr_pbch.c
+7
-7
openair1/PHY/NR_TRANSPORT/nr_pss.c
openair1/PHY/NR_TRANSPORT/nr_pss.c
+4
-4
openair1/PHY/NR_TRANSPORT/nr_sss.c
openair1/PHY/NR_TRANSPORT/nr_sss.c
+5
-5
No files found.
openair1/PHY/NR_TRANSPORT/nr_pbch.c
View file @
d6bbce21
...
...
@@ -45,14 +45,14 @@ int nr_generate_pbch_dmrs(uint32_t *gold_pbch_dmrs,
nfapi_config_request_t
*
config
,
NR_DL_FRAME_PARMS
*
frame_parms
)
{
int
m
,
k
,
l
;
int
a
,
a
a
;
int
k
,
l
;
int
16_t
a
;
int16_t
mod_dmrs
[
2
*
NR_PBCH_DMRS_LENGTH
];
LOG_I
(
PHY
,
"PBCH DMRS mapping started at symbol %d shift %d
\n
"
,
ssb_start_symbol
+
1
,
nu
);
/// BPSK modulation
for
(
m
=
0
;
m
<
NR_PBCH_DMRS_LENGTH
;
m
++
)
{
for
(
int
m
=
0
;
m
<
NR_PBCH_DMRS_LENGTH
;
m
++
)
{
mod_dmrs
[
m
<<
1
]
=
nr_mod_table
[((
NR_MOD_TABLE_BPSK_OFFSET
+
((
gold_pbch_dmrs
[
m
>>
5
]
&
(
1
<<
(
m
&
0x1f
)))
>>
(
m
&
0x1f
)))
<<
1
)];
mod_dmrs
[(
m
<<
1
)
+
1
]
=
nr_mod_table
[((
NR_MOD_TABLE_BPSK_OFFSET
+
((
gold_pbch_dmrs
[
m
>>
5
]
&
(
1
<<
(
m
&
0x1f
)))
>>
(
m
&
0x1f
)))
<<
1
)
+
1
];
#ifdef DEBUG_PBCH
...
...
@@ -63,7 +63,7 @@ int nr_generate_pbch_dmrs(uint32_t *gold_pbch_dmrs,
/// Resource mapping
a
=
(
config
->
rf_config
.
tx_antenna_ports
.
value
==
1
)
?
amp
:
(
amp
*
ONE_OVER_SQRT2_Q15
)
>>
15
;
for
(
aa
=
0
;
aa
<
config
->
rf_config
.
tx_antenna_ports
.
value
;
aa
++
)
for
(
int
aa
=
0
;
aa
<
config
->
rf_config
.
tx_antenna_ports
.
value
;
aa
++
)
{
// PBCH DMRS are mapped within the SSB block on every fourth subcarrier starting from nu of symbols 1, 2, 3
...
...
@@ -71,7 +71,7 @@ int nr_generate_pbch_dmrs(uint32_t *gold_pbch_dmrs,
k
=
frame_parms
->
first_carrier_offset
+
frame_parms
->
ssb_start_subcarrier
+
nu
;
l
=
ssb_start_symbol
+
1
;
for
(
m
=
0
;
m
<
60
;
m
++
)
{
for
(
int
m
=
0
;
m
<
60
;
m
++
)
{
#ifdef DEBUG_PBCH
printf
(
"m %d at k %d of l %d
\n
"
,
m
,
k
,
l
);
#endif
...
...
@@ -87,7 +87,7 @@ int nr_generate_pbch_dmrs(uint32_t *gold_pbch_dmrs,
k
=
frame_parms
->
first_carrier_offset
+
frame_parms
->
ssb_start_subcarrier
+
nu
;
l
++
;
for
(
m
=
60
;
m
<
84
;
m
++
)
{
for
(
int
m
=
60
;
m
<
84
;
m
++
)
{
#ifdef DEBUG_PBCH
printf
(
"m %d at k %d of l %d
\n
"
,
m
,
k
,
l
);
#endif
...
...
@@ -103,7 +103,7 @@ int nr_generate_pbch_dmrs(uint32_t *gold_pbch_dmrs,
k
=
frame_parms
->
first_carrier_offset
+
frame_parms
->
ssb_start_subcarrier
+
nu
;
l
++
;
for
(
m
=
84
;
m
<
NR_PBCH_DMRS_LENGTH
;
m
++
)
{
for
(
int
m
=
84
;
m
<
NR_PBCH_DMRS_LENGTH
;
m
++
)
{
#ifdef DEBUG_PBCH
printf
(
"m %d at k %d of l %d
\n
"
,
m
,
k
,
l
);
#endif
...
...
openair1/PHY/NR_TRANSPORT/nr_pss.c
View file @
d6bbce21
...
...
@@ -30,8 +30,8 @@ int nr_generate_pss( int16_t *d_pss,
nfapi_config_request_t
*
config
,
NR_DL_FRAME_PARMS
*
frame_parms
)
{
int
i
,
m
,
k
,
l
;
int16_t
a
,
aa
;
int
i
,
k
,
l
,
m
;
int16_t
a
;
int16_t
x
[
NR_PSS_LENGTH
];
const
int
x_initial
[
7
]
=
{
0
,
1
,
1
,
0
,
1
,
1
,
1
};
...
...
@@ -57,7 +57,7 @@ int nr_generate_pss( int16_t *d_pss,
/// Resource mapping
a
=
(
config
->
rf_config
.
tx_antenna_ports
.
value
==
1
)
?
amp
:
(
amp
*
ONE_OVER_SQRT2_Q15
)
>>
15
;
for
(
aa
=
0
;
aa
<
config
->
rf_config
.
tx_antenna_ports
.
value
;
aa
++
)
for
(
int
aa
=
0
;
aa
<
config
->
rf_config
.
tx_antenna_ports
.
value
;
aa
++
)
{
// PSS occupies a predefined position (subcarriers 56-182, symbol 0) within the SSB block starting from
...
...
@@ -77,5 +77,5 @@ int nr_generate_pss( int16_t *d_pss,
write_output
(
"pss_0.m"
,
"pss_0"
,
(
void
*
)
txdataF
[
0
][
2
*
l
*
frame_parms
->
ofdm_symbol_size
],
frame_parms
->
ofdm_symbol_size
,
1
,
1
);
#endif
return
(
0
)
;
return
0
;
}
openair1/PHY/NR_TRANSPORT/nr_sss.c
View file @
d6bbce21
...
...
@@ -30,10 +30,10 @@ int nr_generate_sss( int16_t *d_sss,
nfapi_config_request_t
*
config
,
NR_DL_FRAME_PARMS
*
frame_parms
)
{
int
i
,
m
,
k
,
l
;
int
i
,
k
,
l
;
int
m0
,
m1
;
int
Nid
,
Nid1
,
Nid2
;
int16_t
a
,
aa
;
int16_t
a
;
int16_t
x0
[
NR_SSS_LENGTH
],
x1
[
NR_SSS_LENGTH
];
const
int
x0_initial
[
7
]
=
{
1
,
0
,
0
,
0
,
0
,
0
,
0
};
const
int
x1_initial
[
7
]
=
{
1
,
0
,
0
,
0
,
0
,
0
,
0
};
...
...
@@ -67,14 +67,14 @@ int nr_generate_sss( int16_t *d_sss,
/// Resource mapping
a
=
(
config
->
rf_config
.
tx_antenna_ports
.
value
==
1
)
?
amp
:
(
amp
*
ONE_OVER_SQRT2_Q15
)
>>
15
;
for
(
aa
=
0
;
aa
<
config
->
rf_config
.
tx_antenna_ports
.
value
;
aa
++
)
for
(
int
aa
=
0
;
aa
<
config
->
rf_config
.
tx_antenna_ports
.
value
;
aa
++
)
{
// SSS occupies a predefined position (subcarriers 56-182, symbol 2) within the SSB block starting from
k
=
frame_parms
->
first_carrier_offset
+
frame_parms
->
ssb_start_subcarrier
+
56
;
//and
l
=
ssb_start_symbol
+
2
;
for
(
m
=
0
;
m
<
NR_SSS_LENGTH
;
m
++
)
{
for
(
int
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
++
;
...
...
@@ -86,5 +86,5 @@ int nr_generate_sss( int16_t *d_sss,
write_output
(
"sss_0.m"
,
"sss_0"
,
(
void
*
)
txdataF
[
0
][
2
*
l
*
frame_parms
->
ofdm_symbol_size
],
frame_parms
->
ofdm_symbol_size
,
1
,
1
);
#endif
return
(
0
)
;
return
0
;
}
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