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
wangjie
OpenXG-RAN
Commits
453b2fd2
Commit
453b2fd2
authored
Dec 22, 2016
by
Xiwen JIANG
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add getenv for calib file
parent
32afd574
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
8 deletions
+19
-8
openair1/PHY/INIT/lte_init.c
openair1/PHY/INIT/lte_init.c
+1
-1
openair1/PHY/MODULATION/compute_bf_weights.c
openair1/PHY/MODULATION/compute_bf_weights.c
+16
-5
openair1/PHY/MODULATION/defs.h
openair1/PHY/MODULATION/defs.h
+1
-1
openair1/SIMULATION/LTE_PHY/dlsim_tm7.c
openair1/SIMULATION/LTE_PHY/dlsim_tm7.c
+1
-1
No files found.
openair1/PHY/INIT/lte_init.c
View file @
453b2fd2
...
...
@@ -1398,7 +1398,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
}
//eNB_id
// Read TDD calibration coefficients
read_calibration_matrix
(
eNB
->
common_vars
.
tdd_calib_coeffs
[
0
],
"
PROJECTS/TDDREC/results/
calibF.m"
,
fp
);
read_calibration_matrix
(
eNB
->
common_vars
.
tdd_calib_coeffs
[
0
],
"calibF.m"
,
fp
);
// Create thread pool
eNB
->
pool
=
new_thread_pool
(
do_OFDM_mod_thread
,
eNB
);
...
...
openair1/PHY/MODULATION/compute_bf_weights.c
View file @
453b2fd2
#include <stdio.h>
#include <stdlib.h> // contains the header information or prototype of the malloc
#include <string.h>
#include "UTIL/LOG/log.h"
#include "PHY/impl_defs_lte.h"
int
read_calibration_matrix
(
int32_t
**
tdd_calib_coeffs
,
char
*
calibF_fname
,
LTE_DL_FRAME_PARMS
*
frame_parms
)
{
FILE
*
calibF_fd
;
FILE
*
calibF_fd
;
char
calibF_file_name
[
1024
];
int
aa
,
re
,
calibF_e
;
char
*
openair_dir
=
getenv
(
"OPENAIR_DIR"
);
//printf("Number of antennas = %d\n", frame_parms->nb_antennas_tx) ;
//printf("OFDM symbol size = %d\n", frame_parms->ofdm_symbol_size) ;
calibF_fd
=
fopen
(
calibF_fname
,
"r"
)
;
if
(
openair_dir
==
NULL
)
{
printf
(
"ERR: OPENAIR_DIR not defined (did you source oaienv?)
\n
"
);
exit
(
1
);
}
sprintf
(
calibF_file_name
,
"%s/targets/PROJECTS/TDDREC/results/%s"
,
openair_dir
,
calibF_fname
);
calibF_fd
=
fopen
(
calibF_file_name
,
"r"
)
;
if
(
calibF_fd
==
NULL
)
{
printf
(
"
ERR
: %s not found, running with defaults
\n
"
,
calibF_fname
);
printf
(
"
Warning
: %s not found, running with defaults
\n
"
,
calibF_fname
);
return
(
1
);
}
printf
(
"Loading Calibration matrix from %s
\n
"
,
calibF_fname
);
printf
(
"Loading Calibration matrix from %s
\n
"
,
calibF_f
ile_
name
);
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_tx
;
aa
++
)
{
for
(
re
=
0
;
re
<
frame_parms
->
N_RB_DL
*
12
;
re
++
)
{
...
...
@@ -31,7 +42,7 @@ int read_calibration_matrix(int32_t **tdd_calib_coeffs, char *calibF_fname, LTE_
}
}
int
estimate_DLCSI_from_ULCSI
(
int32_t
**
calib_dl_ch_estimates
,
int32_t
**
ul_ch_estimates
,
int32_t
**
tdd_calib_coeffs
,
LTE_DL_FRAME_PARMS
*
frame_parms
)
{
void
estimate_DLCSI_from_ULCSI
(
int32_t
**
calib_dl_ch_estimates
,
int32_t
**
ul_ch_estimates
,
int32_t
**
tdd_calib_coeffs
,
LTE_DL_FRAME_PARMS
*
frame_parms
)
{
int
aa
,
re
;
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_tx
;
aa
++
)
{
...
...
openair1/PHY/MODULATION/defs.h
View file @
453b2fd2
...
...
@@ -123,7 +123,7 @@ int beam_precoding(int32_t **txdataF,
int
read_calibration_matrix
(
int32_t
**
tdd_calib_coeffs
,
char
*
calibF_fname
,
LTE_DL_FRAME_PARMS
*
frame_parms
);
int
estimate_DLCSI_from_ULCSI
(
int32_t
**
calib_dl_ch_estimates
,
int32_t
**
ul_ch_estimates
,
int32_t
**
tdd_calib_coeffs
,
LTE_DL_FRAME_PARMS
*
frame_parms
);
void
estimate_DLCSI_from_ULCSI
(
int32_t
**
calib_dl_ch_estimates
,
int32_t
**
ul_ch_estimates
,
int32_t
**
tdd_calib_coeffs
,
LTE_DL_FRAME_PARMS
*
frame_parms
);
int
compute_BF_weights
(
int32_t
**
beam_weights
,
int32_t
**
calib_dl_ch_estimates
,
PRECODE_TYPE_t
precode_type
,
LTE_DL_FRAME_PARMS
*
frame_parms
);
...
...
openair1/SIMULATION/LTE_PHY/dlsim_tm7.c
View file @
453b2fd2
...
...
@@ -2160,7 +2160,7 @@ PMI_FEEDBACK:
if
(
awgn_flag
==
0
)
{
((
int16_t
*
)(
eNB
->
pusch_vars
[
0
]
->
drs_ch_estimates
[
0
][
aarx
]))[(
l
*
frame_parms
->
N_RB_DL
*
12
+
i
)
*
2
]
=
(
int16_t
)(
eNB2UE
[
round
]
->
chF
[
aarx
][
i
].
x
*
AMP
);
((
int16_t
*
)(
eNB
->
pusch_vars
[
0
]
->
drs_ch_estimates
[
0
][
aarx
]))[(
l
*
frame_parms
->
N_RB_DL
*
12
+
i
)
*
2
+
1
]
=
(
int16_t
)(
eNB2UE
[
round
]
->
chF
[
aarx
][
i
].
y
*
AMP
);
printf
(
"x=%d, y=%d,AMP=%d
\n
"
,
eNB2UE
[
round
]
->
chF
[
aarx
][
i
].
x
,
eNB2UE
[
round
]
->
chF
[
aarx
][
i
].
y
,
AMP
);
//
printf("x=%d, y=%d,AMP=%d\n",eNB2UE[round]->chF[aarx][i].x,eNB2UE[round]->chF[aarx][i].y,AMP);
}
else
{
((
int16_t
*
)(
eNB
->
pusch_vars
[
0
]
->
drs_ch_estimates
[
0
][
aarx
]))[(
l
*
frame_parms
->
N_RB_DL
*
12
+
i
)
*
2
]
=
(
short
)(
AMP
);
((
int16_t
*
)(
eNB
->
pusch_vars
[
0
]
->
drs_ch_estimates
[
0
][
aarx
]))[(
l
*
frame_parms
->
N_RB_DL
*
12
+
i
)
*
2
+
1
]
=
0
/
2
;
...
...
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