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
spbro
OpenXG-RAN
Commits
d5a04555
Commit
d5a04555
authored
May 03, 2024
by
Thomas Schlichter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix error of taking the absolute value of 'uint64_t'
parent
5ac881b7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
11 deletions
+10
-11
openair1/SIMULATION/TOOLS/multipath_channel.c
openair1/SIMULATION/TOOLS/multipath_channel.c
+4
-5
openair1/SIMULATION/TOOLS/multipath_tv_channel.c
openair1/SIMULATION/TOOLS/multipath_tv_channel.c
+5
-5
radio/rfsimulator/apply_channelmod.c
radio/rfsimulator/apply_channelmod.c
+1
-1
No files found.
openair1/SIMULATION/TOOLS/multipath_channel.c
View file @
d5a04555
...
...
@@ -55,12 +55,12 @@ void __attribute__ ((no_sanitize_address)) multipath_channel(channel_desc_t *des
tx128_re
,
tx128_im
,
ch128_x
,
ch128_y
,
pathloss128
;
double
path_loss
=
pow
(
10
,
desc
->
path_loss_dB
/
20
);
int
dd
=
abs
(
desc
->
channel_offset
)
;
uint64_t
dd
=
desc
->
channel_offset
;
pathloss128
=
simde_mm_set1_pd
(
path_loss
);
#ifdef DEBUG_CH
printf
(
"[CHANNEL] keep = %d : path_loss = %g (%f), nb_rx %d, nb_tx %d, dd %
d
, len %d
\n
"
,
keep_channel
,
path_loss
,
desc
->
path_loss_dB
,
desc
->
nb_rx
,
desc
->
nb_tx
,
dd
,
desc
->
channel_length
);
printf
(
"[CHANNEL] keep = %d : path_loss = %g (%f), nb_rx %d, nb_tx %d, dd %
lu
, len %d
\n
"
,
keep_channel
,
path_loss
,
desc
->
path_loss_dB
,
desc
->
nb_rx
,
desc
->
nb_tx
,
dd
,
desc
->
channel_length
);
#endif
if
(
keep_channel
)
{
...
...
@@ -184,11 +184,10 @@ void __attribute__ ((no_sanitize_address)) multipath_channel(channel_desc_t *des
{
double
path_loss
=
pow
(
10
,
desc
->
path_loss_dB
/
20
);
int
dd
;
dd
=
abs
(
desc
->
channel_offset
);
uint64_t
dd
=
desc
->
channel_offset
;
#ifdef DEBUG_CH
printf
(
"[CHANNEL] keep = %d : path_loss = %g (%f), nb_rx %d, nb_tx %d, dd %
d
, len %d
\n
"
,
printf
(
"[CHANNEL] keep = %d : path_loss = %g (%f), nb_rx %d, nb_tx %d, dd %
lu
, len %d
\n
"
,
keep_channel
,
path_loss
,
desc
->
path_loss_dB
,
desc
->
nb_rx
,
desc
->
nb_tx
,
dd
,
desc
->
channel_length
);
#endif
...
...
openair1/SIMULATION/TOOLS/multipath_tv_channel.c
View file @
d5a04555
...
...
@@ -29,7 +29,7 @@
void
tv_channel
(
channel_desc_t
*
desc
,
double
complex
***
H
,
uint32_t
length
);
double
frand_a_b
(
double
a
,
double
b
);
void
tv_conv
(
double
complex
**
h
,
double
complex
*
x
,
double
complex
*
y
,
uint32_t
nb_samples
,
uint8_t
nb_taps
,
in
t
delay
);
void
tv_conv
(
double
complex
**
h
,
double
complex
*
x
,
double
complex
*
y
,
uint32_t
nb_samples
,
uint8_t
nb_taps
,
uint64_
t
delay
);
void
multipath_tv_channel
(
channel_desc_t
*
desc
,
double
**
tx_sig_re
,
...
...
@@ -42,10 +42,10 @@ void multipath_tv_channel(channel_desc_t *desc,
double
complex
**
tx
,
**
rx
,
***
H_t
;
double
path_loss
=
pow
(
10
,
desc
->
path_loss_dB
/
20
);
int
i
,
j
,
dd
;
dd
=
abs
(
desc
->
channel_offset
)
;
int
i
,
j
;
uint64_t
dd
=
desc
->
channel_offset
;
#ifdef DEBUG_CH
printf
(
"[TV CHANNEL] keep = %d : path_loss = %g (%f), nb_rx %d, nb_tx %d, dd %
d
, len %d max_doppler %g
\n
"
,
keep_channel
,
path_loss
,
desc
->
path_loss_dB
,
desc
->
nb_rx
,
desc
->
nb_tx
,
dd
,
desc
->
channel_length
,
printf
(
"[TV CHANNEL] keep = %d : path_loss = %g (%f), nb_rx %d, nb_tx %d, dd %
lu
, len %d max_doppler %g
\n
"
,
keep_channel
,
path_loss
,
desc
->
path_loss_dB
,
desc
->
nb_rx
,
desc
->
nb_tx
,
dd
,
desc
->
channel_length
,
desc
->
max_Doppler
);
#endif
tx
=
(
double
complex
**
)
malloc
(
desc
->
nb_tx
*
sizeof
(
double
complex
*
));
...
...
@@ -190,7 +190,7 @@ void tv_channel(channel_desc_t *desc,double complex ***H,uint32_t length){
}
// time varying convolution
void
tv_conv
(
double
complex
**
h
,
double
complex
*
x
,
double
complex
*
y
,
uint32_t
nb_samples
,
uint8_t
nb_taps
,
in
t
dd
)
void
tv_conv
(
double
complex
**
h
,
double
complex
*
x
,
double
complex
*
y
,
uint32_t
nb_samples
,
uint8_t
nb_taps
,
uint64_
t
dd
)
{
for
(
int
i
=
0
;
i
<
((
int
)
nb_samples
-
dd
);
i
++
)
{
for
(
int
j
=
0
;
j
<
nb_taps
;
j
++
)
{
...
...
radio/rfsimulator/apply_channelmod.c
View file @
d5a04555
...
...
@@ -68,7 +68,7 @@ void rxAddInput( const c16_t *input_sig,
// Energy in one sample to calibrate input noise
// the normalized OAI value seems to be 256 as average amplitude (numerical amplification = 1)
const
double
noise_per_sample
=
pow
(
10
,
channelDesc
->
noise_power_dB
/
10
.
0
)
*
256
;
const
int
dd
=
abs
(
channelDesc
->
channel_offset
)
;
const
uint64_t
dd
=
channelDesc
->
channel_offset
;
const
int
nbTx
=
channelDesc
->
nb_tx
;
for
(
int
i
=
0
;
i
<
nbSamples
;
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