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
zzha zzha
OpenXG-RAN
Commits
28438ab5
Commit
28438ab5
authored
Sep 04, 2023
by
rmagueta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add ptrs_bit_map input in add_noise() function
parent
a629feec
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
3 deletions
+5
-3
openair1/SIMULATION/NR_PHY/dlsim.c
openair1/SIMULATION/NR_PHY/dlsim.c
+1
-1
openair1/SIMULATION/NR_PHY/ulsim.c
openair1/SIMULATION/NR_PHY/ulsim.c
+1
-1
openair1/SIMULATION/TOOLS/multipath_channel.c
openair1/SIMULATION/TOOLS/multipath_channel.c
+2
-1
openair1/SIMULATION/TOOLS/sim.h
openair1/SIMULATION/TOOLS/sim.h
+1
-0
No files found.
openair1/SIMULATION/NR_PHY/dlsim.c
View file @
28438ab5
...
@@ -1120,7 +1120,7 @@ int main(int argc, char **argv)
...
@@ -1120,7 +1120,7 @@ int main(int argc, char **argv)
}
else
{
}
else
{
multipath_tv_channel
(
gNB2UE
,
s_re
,
s_im
,
r_re
,
r_im
,
slot_length
,
0
);
multipath_tv_channel
(
gNB2UE
,
s_re
,
s_im
,
r_re
,
r_im
,
slot_length
,
0
);
}
}
add_noise
(
UE
->
common_vars
.
rxdata
,
(
const
double
**
)
r_re
,
(
const
double
**
)
r_im
,
sigma2
,
slot_length
,
slot_offset
,
ts
,
delay
,
pdu_bit_map
,
frame_parms
->
nb_antennas_rx
);
add_noise
(
UE
->
common_vars
.
rxdata
,
(
const
double
**
)
r_re
,
(
const
double
**
)
r_im
,
sigma2
,
slot_length
,
slot_offset
,
ts
,
delay
,
pdu_bit_map
,
0x1
,
frame_parms
->
nb_antennas_rx
);
nr_ue_dcireq
(
&
dcireq
);
//to be replaced with function pointer later
nr_ue_dcireq
(
&
dcireq
);
//to be replaced with function pointer later
nr_ue_scheduled_response
(
&
scheduled_response
);
nr_ue_scheduled_response
(
&
scheduled_response
);
...
...
openair1/SIMULATION/NR_PHY/ulsim.c
View file @
28438ab5
...
@@ -1227,7 +1227,7 @@ int main(int argc, char **argv)
...
@@ -1227,7 +1227,7 @@ int main(int argc, char **argv)
}
}
multipath_channel
(
UE2gNB
,
s_re
,
s_im
,
r_re
,
r_im
,
slot_length
,
0
,
(
n_trials
==
1
)
?
1
:
0
);
multipath_channel
(
UE2gNB
,
s_re
,
s_im
,
r_re
,
r_im
,
slot_length
,
0
,
(
n_trials
==
1
)
?
1
:
0
);
add_noise
(
rxdata
,
(
const
double
**
)
r_re
,
(
const
double
**
)
r_im
,
sigma
,
slot_length
,
slot_offset
,
ts
,
delay
,
pdu_bit_map
,
frame_parms
->
nb_antennas_rx
);
add_noise
(
rxdata
,
(
const
double
**
)
r_re
,
(
const
double
**
)
r_im
,
sigma
,
slot_length
,
slot_offset
,
ts
,
delay
,
pdu_bit_map
,
PUSCH_PDU_BITMAP_PUSCH_PTRS
,
frame_parms
->
nb_antennas_rx
);
}
/*End input_fd */
}
/*End input_fd */
...
...
openair1/SIMULATION/TOOLS/multipath_channel.c
View file @
28438ab5
...
@@ -156,6 +156,7 @@ void add_noise(c16_t **rxdata,
...
@@ -156,6 +156,7 @@ void add_noise(c16_t **rxdata,
const
double
ts
,
const
double
ts
,
const
int
delay
,
const
int
delay
,
const
uint16_t
pdu_bit_map
,
const
uint16_t
pdu_bit_map
,
const
uint16_t
ptrs_bit_map
,
const
uint8_t
nb_antennas_rx
)
const
uint8_t
nb_antennas_rx
)
{
{
for
(
int
i
=
0
;
i
<
length
;
i
++
)
{
for
(
int
i
=
0
;
i
<
length
;
i
++
)
{
...
@@ -164,7 +165,7 @@ void add_noise(c16_t **rxdata,
...
@@ -164,7 +165,7 @@ void add_noise(c16_t **rxdata,
rxd
->
r
=
r_re
[
ap
][
i
]
+
sqrt
(
sigma
/
2
)
*
gaussZiggurat
(
0
.
0
,
1
.
0
);
// convert to fixed point
rxd
->
r
=
r_re
[
ap
][
i
]
+
sqrt
(
sigma
/
2
)
*
gaussZiggurat
(
0
.
0
,
1
.
0
);
// convert to fixed point
rxd
->
i
=
r_im
[
ap
][
i
]
+
sqrt
(
sigma
/
2
)
*
gaussZiggurat
(
0
.
0
,
1
.
0
);
rxd
->
i
=
r_im
[
ap
][
i
]
+
sqrt
(
sigma
/
2
)
*
gaussZiggurat
(
0
.
0
,
1
.
0
);
/* Add phase noise if enabled */
/* Add phase noise if enabled */
if
(
pdu_bit_map
&
PUSCH_PDU_BITMAP_PUSCH_PTRS
)
{
if
(
pdu_bit_map
&
ptrs_bit_map
)
{
phase_noise
(
ts
,
&
rxdata
[
ap
][
slot_offset
+
i
+
delay
].
r
,
&
rxdata
[
ap
][
slot_offset
+
i
+
delay
].
i
);
phase_noise
(
ts
,
&
rxdata
[
ap
][
slot_offset
+
i
+
delay
].
r
,
&
rxdata
[
ap
][
slot_offset
+
i
+
delay
].
i
);
}
}
}
}
...
...
openair1/SIMULATION/TOOLS/sim.h
View file @
28438ab5
...
@@ -389,6 +389,7 @@ void add_noise(c16_t **rxdata,
...
@@ -389,6 +389,7 @@ void add_noise(c16_t **rxdata,
const
double
ts
,
const
double
ts
,
const
int
delay
,
const
int
delay
,
const
uint16_t
pdu_bit_map
,
const
uint16_t
pdu_bit_map
,
const
uint16_t
ptrs_bit_map
,
const
uint8_t
nb_antennas_rx
);
const
uint8_t
nb_antennas_rx
);
/**\fn void multipath_channel(channel_desc_t *desc,
/**\fn void multipath_channel(channel_desc_t *desc,
...
...
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