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
b4dbf46d
Commit
b4dbf46d
authored
Feb 15, 2022
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Provide term_freq_channel() to free memory in abstraction.c
parent
32c7795a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
3 deletions
+17
-3
openair1/SIMULATION/TOOLS/abstraction.c
openair1/SIMULATION/TOOLS/abstraction.c
+16
-3
openair1/SIMULATION/TOOLS/sim.h
openair1/SIMULATION/TOOLS/sim.h
+1
-0
No files found.
openair1/SIMULATION/TOOLS/abstraction.c
View file @
b4dbf46d
...
@@ -33,11 +33,26 @@
...
@@ -33,11 +33,26 @@
// NEW code with lookup table for sin/cos based on delay profile (TO BE TESTED)
// NEW code with lookup table for sin/cos based on delay profile (TO BE TESTED)
double
**
cos_lut
=
NULL
,
*
*
sin_lut
=
NULL
;
double
**
cos_lut
=
NULL
,
*
*
sin_lut
=
NULL
;
static
int
freq_channel_init
=
0
;
static
int
n_samples_max
=
0
;
//#if 1
//#if 1
void
term_freq_channel
(
void
)
{
for
(
int
f
=
-
(
n_samples_max
>>
1
);
f
<=
n_samples_max
>>
1
;
f
++
)
{
const
int
idx
=
f
+
(
n_samples_max
>>
1
);
if
(
cos_lut
[
idx
])
free_and_zero
(
cos_lut
[
idx
]);
if
(
sin_lut
[
idx
])
free_and_zero
(
sin_lut
[
idx
]);
}
free_and_zero
(
cos_lut
);
free_and_zero
(
sin_lut
);
freq_channel_init
=
0
;
n_samples_max
=
0
;
}
int
init_freq_channel
(
channel_desc_t
*
desc
,
uint16_t
nb_rb
,
int16_t
n_samples
,
int
scs
)
{
int
init_freq_channel
(
channel_desc_t
*
desc
,
uint16_t
nb_rb
,
int16_t
n_samples
,
int
scs
)
{
double
delta_f
,
freq
;
// 90 kHz spacing
double
delta_f
,
freq
;
// 90 kHz spacing
...
@@ -78,8 +93,6 @@ int freq_channel(channel_desc_t *desc,uint16_t nb_rb,int16_t n_samples,int scs)
...
@@ -78,8 +93,6 @@ int freq_channel(channel_desc_t *desc,uint16_t nb_rb,int16_t n_samples,int scs)
int16_t
f
,
f2
,
d
;
int16_t
f
,
f2
,
d
;
uint8_t
aarx
,
aatx
,
l
;
uint8_t
aarx
,
aatx
,
l
;
double
*
clut
,
*
slut
;
double
*
clut
,
*
slut
;
static
int
freq_channel_init
=
0
;
static
int
n_samples_max
=
0
;
// do some error checking
// do some error checking
// n_samples has to be a odd number because we assume the spectrum is symmetric around the DC and includes the DC
// n_samples has to be a odd number because we assume the spectrum is symmetric around the DC and includes the DC
...
...
openair1/SIMULATION/TOOLS/sim.h
View file @
b4dbf46d
...
@@ -479,6 +479,7 @@ void randominit(unsigned int seed_init);
...
@@ -479,6 +479,7 @@ void randominit(unsigned int seed_init);
double
uniformrandom
(
void
);
double
uniformrandom
(
void
);
int
freq_channel
(
channel_desc_t
*
desc
,
uint16_t
nb_rb
,
int16_t
n_samples
,
int
scs
);
int
freq_channel
(
channel_desc_t
*
desc
,
uint16_t
nb_rb
,
int16_t
n_samples
,
int
scs
);
int
init_freq_channel
(
channel_desc_t
*
desc
,
uint16_t
nb_rb
,
int16_t
n_samples
,
int
scs
);
int
init_freq_channel
(
channel_desc_t
*
desc
,
uint16_t
nb_rb
,
int16_t
n_samples
,
int
scs
);
void
term_freq_channel
(
void
);
uint8_t
multipath_channel_nosigconv
(
channel_desc_t
*
desc
);
uint8_t
multipath_channel_nosigconv
(
channel_desc_t
*
desc
);
void
multipath_tv_channel
(
channel_desc_t
*
desc
,
void
multipath_tv_channel
(
channel_desc_t
*
desc
,
double
**
tx_sig_re
,
double
**
tx_sig_re
,
...
...
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