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
435dfd57
Commit
435dfd57
authored
Oct 14, 2025
by
Bartosz Podrygajlo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RFsim: Optimization for operation without chanmod
parent
643be878
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
6 deletions
+16
-6
radio/rfsimulator/simulator.cpp
radio/rfsimulator/simulator.cpp
+16
-6
No files found.
radio/rfsimulator/simulator.cpp
View file @
435dfd57
...
...
@@ -1167,7 +1167,7 @@ static void rfsimulator_read_internal(rfsimulator_state_t *t,
int
rx_beam_id
)
{
cf_t
temp_array
[
nbAnt
][
nsamps
];
memset
(
temp_array
,
0
,
sizeof
(
temp_array
))
;
bool
channel_modelling
=
false
;
// Add all input nodes signal in the output buffer
for
(
int
sock
=
0
;
sock
<
MAX_FD_RFSIMU
;
sock
++
)
{
buffer_t
*
ptr
=
&
t
->
buf
[
sock
];
...
...
@@ -1182,6 +1182,10 @@ static void rfsimulator_read_internal(rfsimulator_state_t *t,
random_channel
(
ptr
->
channel_model
,
0
);
if
(
ptr
->
channel_model
!=
NULL
)
{
// apply a channel model
if
(
!
channel_modelling
)
{
memset
(
temp_array
,
0
,
sizeof
(
temp_array
));
channel_modelling
=
true
;
}
const
uint64_t
dd
=
ptr
->
channel_model
->
channel_offset
;
const
uint64_t
channel_length
=
ptr
->
channel_model
->
channel_length
;
std
::
vector
<
std
::
vector
<
c16_t
>>
ant_buffers
=
combine_received_beams
(
t
,
...
...
@@ -1220,19 +1224,25 @@ static void rfsimulator_read_internal(rfsimulator_state_t *t,
bool
apply_global_noise
=
get_noise_power_dBFS
()
!=
INVALID_DBFS_VALUE
;
if
(
apply_global_noise
)
{
if
(
!
channel_modelling
)
{
memset
(
temp_array
,
0
,
sizeof
(
temp_array
));
channel_modelling
=
true
;
}
int16_t
noise_power
=
(
int16_t
)(
32767.0
/
powf
(
10.0
,
.05
*
-
get_noise_power_dBFS
()));
for
(
int
a
=
0
;
a
<
nbAnt
;
a
++
)
{
for
(
int
i
=
0
;
i
<
nsamps
;
i
++
)
{
int16_t
noise_power
=
(
int16_t
)(
32767.0
/
powf
(
10.0
,
.05
*
-
get_noise_power_dBFS
()));
temp_array
[
a
][
i
].
r
+=
noise_power
+
gaussZiggurat
(
0.0
,
1.0
);
temp_array
[
a
][
i
].
i
+=
noise_power
*
gaussZiggurat
(
0.0
,
1.0
);
}
}
}
for
(
int
a
=
0
;
a
<
nbAnt
;
a
++
)
{
for
(
int
i
=
0
;
i
<
nsamps
;
i
++
)
{
samples
[
a
][
i
].
r
+=
lroundf
(
temp_array
[
a
][
i
].
r
);
samples
[
a
][
i
].
i
+=
lroundf
(
temp_array
[
a
][
i
].
i
);
if
(
channel_modelling
)
{
for
(
int
a
=
0
;
a
<
nbAnt
;
a
++
)
{
for
(
int
i
=
0
;
i
<
nsamps
;
i
++
)
{
samples
[
a
][
i
].
r
+=
lroundf
(
temp_array
[
a
][
i
].
r
);
samples
[
a
][
i
].
i
+=
lroundf
(
temp_array
[
a
][
i
].
i
);
}
}
}
}
...
...
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