Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
OAI-RAN-5G-sheduler_MaxTBS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MAQ5G-PFC
OAI-RAN-5G-sheduler_MaxTBS
Commits
60115531
Commit
60115531
authored
9 years ago
by
Florian Kaltenberger
Browse files
Options
Downloads
Patches
Plain Diff
fixing issue 71 (bug in freq_channel)
parent
244699fc
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
openair1/SIMULATION/TOOLS/abstraction.c
+24
-8
24 additions, 8 deletions
openair1/SIMULATION/TOOLS/abstraction.c
openair1/SIMULATION/TOOLS/defs.h
+2
-2
2 additions, 2 deletions
openair1/SIMULATION/TOOLS/defs.h
with
26 additions
and
10 deletions
openair1/SIMULATION/TOOLS/abstraction.c
+
24
−
8
View file @
60115531
...
...
@@ -45,7 +45,7 @@ double **cos_lut=NULL,**sin_lut=NULL;
void
init_freq_channel
(
channel_desc_t
*
desc
,
uint16_t
nb_rb
,
int16_t
n_samples
)
int
init_freq_channel
(
channel_desc_t
*
desc
,
uint16_t
nb_rb
,
int16_t
n_samples
)
{
...
...
@@ -54,12 +54,14 @@ void init_freq_channel(channel_desc_t *desc,uint16_t nb_rb,int16_t n_samples)
int16_t
f
;
uint8_t
l
;
if
((
n_samples
&
1
)
==
0
)
{
fprintf
(
stderr
,
"freq_channel_init: n_samples has to be odd
\n
"
);
return
(
-
1
);
}
cos_lut
=
(
double
**
)
malloc
(
n_samples
*
sizeof
(
double
*
));
sin_lut
=
(
double
**
)
malloc
(
n_samples
*
sizeof
(
double
*
));
delta_f
=
nb_rb
*
180000
/
(
n_samples
-
1
);
for
(
f
=-
(
n_samples
>>
1
);
f
<
(
n_samples
>>
1
);
f
++
)
{
...
...
@@ -81,9 +83,11 @@ void init_freq_channel(channel_desc_t *desc,uint16_t nb_rb,int16_t n_samples)
}
}
return
(
0
);
}
void
freq_channel
(
channel_desc_t
*
desc
,
uint16_t
nb_rb
,
int16_t
n_samples
)
int
freq_channel
(
channel_desc_t
*
desc
,
uint16_t
nb_rb
,
int16_t
n_samples
)
{
...
...
@@ -93,18 +97,28 @@ void freq_channel(channel_desc_t *desc,uint16_t nb_rb,int16_t n_samples)
static
int
freq_channel_init
=
0
;
static
int
n_samples_max
=
0
;
// printf("no of samples:%d,",n_samples);
// 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
if
((
n_samples
&
1
)
==
0
)
{
fprintf
(
stderr
,
"freq_channel: n_samples has to be odd
\n
"
);
return
(
-
1
);
}
// printf("no of taps:%d,",(int)desc->nb_taps);
if
(
freq_channel_init
==
0
)
{
// we are initializing the lut for the largets possible n_samples=12*nb_rb+1
// if called with n_samples<12*nb_rb+1, we decimate the lut
n_samples_max
=
12
*
nb_rb
+
1
;
init_freq_channel
(
desc
,
nb_rb
,
n_samples_max
);
freq_channel_init
=
1
;
if
(
init_freq_channel
(
desc
,
nb_rb
,
n_samples_max
)
==
0
)
freq_channel_init
=
1
;
else
return
(
-
1
);
}
d
=
n_samples_max
/
n_samples
;
d
=
(
n_samples_max
-
1
)
/
(
n_samples
-
1
);
//printf("no_samples=%d, n_samples_max=%d, d=%d\n",n_samples,n_samples_max,d);
start_meas
(
&
desc
->
interp_freq
);
...
...
@@ -129,6 +143,8 @@ void freq_channel(channel_desc_t *desc,uint16_t nb_rb,int16_t n_samples)
}
stop_meas
(
&
desc
->
interp_freq
);
return
(
0
);
}
double
compute_pbch_sinr
(
channel_desc_t
*
desc
,
...
...
This diff is collapsed.
Click to expand it.
openair1/SIMULATION/TOOLS/defs.h
+
2
−
2
View file @
60115531
...
...
@@ -354,8 +354,8 @@ int gauss(unsigned int *gauss_LUT,unsigned char Nbits);
double
gaussdouble
(
double
,
double
);
void
randominit
(
unsigned
int
seed_init
);
double
uniformrandom
(
void
);
void
freq_channel
(
channel_desc_t
*
desc
,
uint16_t
nb_rb
,
int16_t
n_samples
);
void
init_freq_channel
(
channel_desc_t
*
desc
,
uint16_t
nb_rb
,
int16_t
n_samples
);
int
freq_channel
(
channel_desc_t
*
desc
,
uint16_t
nb_rb
,
int16_t
n_samples
);
int
init_freq_channel
(
channel_desc_t
*
desc
,
uint16_t
nb_rb
,
int16_t
n_samples
);
uint8_t
multipath_channel_nosigconv
(
channel_desc_t
*
desc
);
void
multipath_tv_channel
(
channel_desc_t
*
desc
,
double
**
tx_sig_re
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment