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
e3fa2192
Commit
e3fa2192
authored
Jan 24, 2022
by
Sagar Parsawar
Browse files
Options
Browse Files
Download
Plain Diff
Merge confict
parents
d42fa410
4d18f561
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
9 deletions
+32
-9
openair1/SIMULATION/NR_PHY/pbchsim.c
openair1/SIMULATION/NR_PHY/pbchsim.c
+32
-9
No files found.
openair1/SIMULATION/NR_PHY/pbchsim.c
View file @
e3fa2192
...
@@ -154,6 +154,7 @@ int main(int argc, char **argv)
...
@@ -154,6 +154,7 @@ int main(int argc, char **argv)
int
**
txdata
;
int
**
txdata
;
double
**
s_re
,
**
s_im
,
**
r_re
,
**
r_im
;
double
**
s_re
,
**
s_im
,
**
r_re
,
**
r_im
;
//double iqim = 0.0;
//double iqim = 0.0;
double
DS_TDL
=
.
03
;
double
ip
=
0
.
0
;
double
ip
=
0
.
0
;
//unsigned char pbch_pdu[6];
//unsigned char pbch_pdu[6];
// int sync_pos, sync_pos_slot;
// int sync_pos, sync_pos_slot;
...
@@ -257,6 +258,21 @@ int main(int argc, char **argv)
...
@@ -257,6 +258,21 @@ int main(int argc, char **argv)
channel_model
=
ETU
;
channel_model
=
ETU
;
break
;
break
;
case
'H'
:
channel_model
=
TDL_C
;
DS_TDL
=
.
030
;
// 30 ns
break
;
case
'I'
:
channel_model
=
TDL_C
;
DS_TDL
=
.
3
;
// 300ns
break
;
case
'J'
:
channel_model
=
TDL_D
;
DS_TDL
=
.
03
;
break
;
default:
default:
printf
(
"Unsupported channel model! Exiting.
\n
"
);
printf
(
"Unsupported channel model! Exiting.
\n
"
);
exit
(
-
1
);
exit
(
-
1
);
...
@@ -505,10 +521,8 @@ int main(int argc, char **argv)
...
@@ -505,10 +521,8 @@ int main(int argc, char **argv)
channel_model
,
channel_model
,
fs
,
fs
,
bw
,
bw
,
300e-9
,
DS_TDL
,
0
,
0
,
0
,
0
,
0
);
0
,
0
,
0
);
if
(
gNB2UE
==
NULL
)
{
if
(
gNB2UE
==
NULL
)
{
printf
(
"Problem generating channel model. Exiting.
\n
"
);
printf
(
"Problem generating channel model. Exiting.
\n
"
);
...
@@ -656,8 +670,8 @@ int main(int argc, char **argv)
...
@@ -656,8 +670,8 @@ int main(int argc, char **argv)
for
(
i
=
0
;
i
<
frame_length_complex_samples
;
i
++
)
{
for
(
i
=
0
;
i
<
frame_length_complex_samples
;
i
++
)
{
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_tx
;
aa
++
)
{
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_tx
;
aa
++
)
{
r
_re
[
aa
][
i
]
=
((
double
)(((
short
*
)
txdata
[
aa
]))[(
i
<<
1
)]);
s
_re
[
aa
][
i
]
=
((
double
)(((
short
*
)
txdata
[
aa
]))[(
i
<<
1
)]);
r
_im
[
aa
][
i
]
=
((
double
)(((
short
*
)
txdata
[
aa
]))[(
i
<<
1
)
+
1
]);
s
_im
[
aa
][
i
]
=
((
double
)(((
short
*
)
txdata
[
aa
]))[(
i
<<
1
)
+
1
]);
}
}
}
}
...
@@ -667,8 +681,17 @@ int main(int argc, char **argv)
...
@@ -667,8 +681,17 @@ int main(int argc, char **argv)
n_errors_payload
=
0
;
n_errors_payload
=
0
;
for
(
trial
=
0
;
trial
<
n_trials
;
trial
++
)
{
for
(
trial
=
0
;
trial
<
n_trials
;
trial
++
)
{
if
(
channel_model
!=
AWGN
)
{
// multipath channel
// multipath channel
//multipath_channel(gNB2UE,s_re,s_im,r_re,r_im,frame_length_complex_samples,0);
multipath_channel
(
gNB2UE
,
s_re
,
s_im
,
r_re
,
r_im
,
frame_length_complex_samples
,
0
,
0
);
}
else
{
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_tx
;
aa
++
)
{
memcpy
(
r_re
[
aa
],
s_re
[
aa
],
frame_length_complex_samples
*
sizeof
(
double
));
memcpy
(
r_im
[
aa
],
s_im
[
aa
],
frame_length_complex_samples
*
sizeof
(
double
));
}
}
//AWGN
//AWGN
sigma2_dB
=
20
*
log10
((
double
)
AMP
/
4
)
-
SNR
;
sigma2_dB
=
20
*
log10
((
double
)
AMP
/
4
)
-
SNR
;
...
...
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