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
lizhongxiao
OpenXG-RAN
Commits
19a05d90
Commit
19a05d90
authored
May 17, 2023
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/episys-add-complex-structs' into integration_2023_w20
parents
27c5d936
5a6516ff
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
26 deletions
+26
-26
openair1/PHY/MODULATION/modulation_common.h
openair1/PHY/MODULATION/modulation_common.h
+1
-1
openair1/PHY/MODULATION/ofdm_mod.c
openair1/PHY/MODULATION/ofdm_mod.c
+17
-17
openair1/SIMULATION/NR_PHY/pbchsim.c
openair1/SIMULATION/NR_PHY/pbchsim.c
+8
-8
No files found.
openair1/PHY/MODULATION/modulation_common.h
View file @
19a05d90
...
...
@@ -51,7 +51,7 @@ void PHY_ofdm_mod(int *input,
void
normal_prefix_mod
(
int32_t
*
txdataF
,
int32_t
*
txdata
,
uint8_t
nsymb
,
LTE_DL_FRAME_PARMS
*
frame_parms
);
void
nr_normal_prefix_mod
(
c16_t
*
txdataF
,
c16_t
*
txdata
,
uint8_t
nsymb
,
NR_DL_FRAME_PARMS
*
frame_parms
,
uint32_t
slot
);
void
do_OFDM_mod
(
int32_t
**
txdataF
,
int32
_t
**
txdata
,
uint32_t
frame
,
uint16_t
next_slot
,
LTE_DL_FRAME_PARMS
*
frame_parms
);
void
do_OFDM_mod
(
c16_t
**
txdataF
,
c16
_t
**
txdata
,
uint32_t
frame
,
uint16_t
next_slot
,
LTE_DL_FRAME_PARMS
*
frame_parms
);
/** @}*/
...
...
openair1/PHY/MODULATION/ofdm_mod.c
View file @
19a05d90
...
...
@@ -45,16 +45,16 @@ void normal_prefix_mod(int32_t *txdataF,int32_t *txdata,uint8_t nsymb,LTE_DL_FRA
PHY_ofdm_mod
(
txdataF
,
// input
txdata
,
// output
frame_parms
->
ofdm_symbol_size
,
PHY_ofdm_mod
(
(
int
*
)
txdataF
,
// input
(
int
*
)
txdata
,
// output
frame_parms
->
ofdm_symbol_size
,
1
,
// number of symbols
frame_parms
->
nb_prefix_samples0
,
// number of prefix samples
CYCLIC_PREFIX
);
PHY_ofdm_mod
(
txdataF
+
frame_parms
->
ofdm_symbol_size
,
// input
txdata
+
OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES0
,
// output
frame_parms
->
ofdm_symbol_size
,
PHY_ofdm_mod
(
(
int
*
)
txdataF
+
frame_parms
->
ofdm_symbol_size
,
// input
(
int
*
)
txdata
+
OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES0
,
// output
frame_parms
->
ofdm_symbol_size
,
nsymb
-
1
,
frame_parms
->
nb_prefix_samples
,
// number of prefix samples
CYCLIC_PREFIX
);
...
...
@@ -280,7 +280,7 @@ void PHY_ofdm_mod(int *input, /// pointer to complex input
}
void
do_OFDM_mod
(
int32_t
**
txdataF
,
int32
_t
**
txdata
,
uint32_t
frame
,
uint16_t
next_slot
,
LTE_DL_FRAME_PARMS
*
frame_parms
)
void
do_OFDM_mod
(
c16_t
**
txdataF
,
c16
_t
**
txdata
,
uint32_t
frame
,
uint16_t
next_slot
,
LTE_DL_FRAME_PARMS
*
frame_parms
)
{
int
aa
,
slot_offset
,
slot_offset_F
;
...
...
@@ -292,39 +292,39 @@ void do_OFDM_mod(int32_t **txdataF, int32_t **txdata, uint32_t frame,uint16_t ne
if
(
is_pmch_subframe
(
frame
,
next_slot
>>
1
,
frame_parms
))
{
if
((
next_slot
%
2
)
==
0
)
{
LOG_D
(
PHY
,
"Frame %d, subframe %d: Doing MBSFN modulation (slot_offset %d)
\n
"
,
frame
,
next_slot
>>
1
,
slot_offset
);
PHY_ofdm_mod
(
&
txdataF
[
aa
][
slot_offset_F
],
// input
&
txdata
[
aa
][
slot_offset
],
// output
PHY_ofdm_mod
(
(
int
*
)
&
txdataF
[
aa
][
slot_offset_F
],
// input
(
int
*
)
&
txdata
[
aa
][
slot_offset
],
// output
frame_parms
->
ofdm_symbol_size
,
12
,
// number of symbols
frame_parms
->
ofdm_symbol_size
>>
2
,
// number of prefix samples
CYCLIC_PREFIX
);
if
(
frame_parms
->
Ncp
==
EXTENDED
)
PHY_ofdm_mod
(
&
txdataF
[
aa
][
slot_offset_F
],
// input
&
txdata
[
aa
][
slot_offset
],
// output
PHY_ofdm_mod
(
(
int
*
)
&
txdataF
[
aa
][
slot_offset_F
],
// input
(
int
*
)
&
txdata
[
aa
][
slot_offset
],
// output
frame_parms
->
ofdm_symbol_size
,
2
,
// number of symbols
frame_parms
->
nb_prefix_samples
,
// number of prefix samples
CYCLIC_PREFIX
);
else
{
LOG_D
(
PHY
,
"Frame %d, subframe %d: Doing PDCCH modulation
\n
"
,
frame
,
next_slot
>>
1
);
normal_prefix_mod
(
&
txdataF
[
aa
][
slot_offset_F
],
&
txdata
[
aa
][
slot_offset
],
normal_prefix_mod
(
(
int32_t
*
)
&
txdataF
[
aa
][
slot_offset_F
],
(
int32_t
*
)
&
txdata
[
aa
][
slot_offset
],
2
,
frame_parms
);
}
}
}
else
{
if
(
frame_parms
->
Ncp
==
EXTENDED
)
PHY_ofdm_mod
(
&
txdataF
[
aa
][
slot_offset_F
],
// input
&
txdata
[
aa
][
slot_offset
],
// output
PHY_ofdm_mod
(
(
int
*
)
&
txdataF
[
aa
][
slot_offset_F
],
// input
(
int
*
)
&
txdata
[
aa
][
slot_offset
],
// output
frame_parms
->
ofdm_symbol_size
,
6
,
// number of symbols
frame_parms
->
nb_prefix_samples
,
// number of prefix samples
CYCLIC_PREFIX
);
else
{
normal_prefix_mod
(
&
txdataF
[
aa
][
slot_offset_F
],
&
txdata
[
aa
][
slot_offset
],
normal_prefix_mod
(
(
int32_t
*
)
&
txdataF
[
aa
][
slot_offset_F
],
(
int32_t
*
)
&
txdata
[
aa
][
slot_offset
],
7
,
frame_parms
);
}
...
...
openair1/SIMULATION/NR_PHY/pbchsim.c
View file @
19a05d90
...
...
@@ -191,7 +191,7 @@ int main(int argc, char **argv)
double
sigma2
,
sigma2_dB
=
10
,
SNR
,
snr0
=-
2
.
0
,
snr1
=
2
.
0
;
double
cfo
=
0
;
uint8_t
snr1set
=
0
;
in
t
**
txdata
;
c16_
t
**
txdata
;
double
**
s_re
,
**
s_im
,
**
r_re
,
**
r_im
;
//double iqim = 0.0;
double
ip
=
0
.
0
;
...
...
@@ -586,7 +586,7 @@ int main(int argc, char **argv)
s_im
=
malloc
(
2
*
sizeof
(
double
*
));
r_re
=
malloc
(
2
*
sizeof
(
double
*
));
r_im
=
malloc
(
2
*
sizeof
(
double
*
));
txdata
=
calloc
(
2
,
sizeof
(
in
t
*
));
txdata
=
calloc
(
2
,
sizeof
(
c16_
t
*
));
for
(
i
=
0
;
i
<
2
;
i
++
)
{
...
...
@@ -596,7 +596,7 @@ int main(int argc, char **argv)
r_re
[
i
]
=
malloc16_clear
(
frame_length_complex_samples
*
sizeof
(
double
));
r_im
[
i
]
=
malloc16_clear
(
frame_length_complex_samples
*
sizeof
(
double
));
printf
(
"Allocating %d samples for txdata
\n
"
,
frame_length_complex_samples
);
txdata
[
i
]
=
malloc16_clear
(
frame_length_complex_samples
*
sizeof
(
in
t
));
txdata
[
i
]
=
malloc16_clear
(
frame_length_complex_samples
*
sizeof
(
c16_
t
));
}
if
(
pbch_file_fd
!=
NULL
)
{
...
...
@@ -655,7 +655,7 @@ int main(int argc, char **argv)
12
);
PHY_ofdm_mod
((
int
*
)
gNB
->
common_vars
.
txdataF
[
aa
],
&
txdata
[
aa
][
frame_parms
->
get_samples_slot_timestamp
(
slot
,
frame_parms
,
0
)],
(
int
*
)
&
txdata
[
aa
][
frame_parms
->
get_samples_slot_timestamp
(
slot
,
frame_parms
,
0
)],
frame_parms
->
ofdm_symbol_size
,
12
,
frame_parms
->
nb_prefix_samples
,
...
...
@@ -726,8 +726,8 @@ int main(int argc, char **argv)
for
(
i
=
0
;
i
<
frame_length_complex_samples
;
i
++
)
{
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_tx
;
aa
++
)
{
r_re
[
aa
][
i
]
=
(
(
double
)(((
short
*
)
txdata
[
aa
]))[(
i
<<
1
)])
;
r_im
[
aa
][
i
]
=
(
(
double
)(((
short
*
)
txdata
[
aa
]))[(
i
<<
1
)
+
1
])
;
r_re
[
aa
][
i
]
=
(
double
)
txdata
[
aa
][
i
].
r
;
r_im
[
aa
][
i
]
=
(
double
)
txdata
[
aa
][
i
].
i
;
}
}
...
...
@@ -761,8 +761,8 @@ int main(int argc, char **argv)
for
(
i
=
0
;
i
<
frame_length_complex_samples
;
i
++
)
{
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_rx
;
aa
++
)
{
((
short
*
)
UE
->
common_vars
.
rxdata
[
aa
])[
2
*
i
]
=
(
short
)
((
r_re
[
aa
][
i
]
+
sqrt
(
sigma2
/
2
)
*
gaussdouble
(
0
.
0
,
1
.
0
)
));
((
short
*
)
UE
->
common_vars
.
rxdata
[
aa
])[
2
*
i
+
1
]
=
(
short
)
((
r_im
[
aa
][
i
]
+
sqrt
(
sigma2
/
2
)
*
gaussdouble
(
0
.
0
,
1
.
0
)
));
UE
->
common_vars
.
rxdata
[
aa
][
i
].
r
=
(
short
)(
r_re
[
aa
][
i
]
+
sqrt
(
sigma2
/
2
)
*
gaussdouble
(
0
.
0
,
1
.
0
));
UE
->
common_vars
.
rxdata
[
aa
][
i
].
i
=
(
short
)(
r_im
[
aa
][
i
]
+
sqrt
(
sigma2
/
2
)
*
gaussdouble
(
0
.
0
,
1
.
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