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
canghaiwuhen
OpenXG-RAN
Commits
963ccb9b
Commit
963ccb9b
authored
Nov 17, 2016
by
Raymond.Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some changes for tx-gain setting
parent
b018a3bb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
16 deletions
+7
-16
targets/ARCH/LMSSDR/USERSPACE/LIB/lms_lib.cpp
targets/ARCH/LMSSDR/USERSPACE/LIB/lms_lib.cpp
+6
-15
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.lmssdr.conf
...s/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.lmssdr.conf
+1
-1
No files found.
targets/ARCH/LMSSDR/USERSPACE/LIB/lms_lib.cpp
View file @
963ccb9b
...
...
@@ -131,18 +131,8 @@ void set_rx_gain_offset(openair0_config_t *openair0_cfg, int chain_index) {
*/
int
trx_lms_set_gains
(
openair0_device
*
device
,
openair0_config_t
*
openair0_cfg
)
{
/* double gv = openair0_cfg[0].rx_gain[0] - openair0_cfg[0].rx_gain_offset[0];
if (gv > 31) {
printf("RX Gain 0 too high, reduce by %f dB\n",gv-31);
gv = 31;
}
if (gv < 0) {
printf("RX Gain 0 too low, increase by %f dB\n",-gv);
gv = 0;
}
printf("[LMS] Setting 7002M G_PGA_RBB to %d\n", (uint16_t)gv);
LMS_WriteParam(lms_device,LMS7param(G_PGA_RBB),(uint16_t)gv);*/
LMS_SetNormalizedGain
(
lms_device
,
LMS_CH_TX
,
0
,
openair0_cfg
[
0
].
tx_gain
[
0
]
/
100.0
);
LMS_SetNormalizedGain
(
lms_device
,
LMS_CH_RX
,
0
,
openair0_cfg
[
0
].
rx_gain
[
0
]
/
openair0_cfg
[
0
].
rx_gain_offset
[
0
]);
return
(
0
);
}
...
...
@@ -209,10 +199,8 @@ int trx_lms_start(openair0_device *device){
LMS_SetAntenna
(
lms_device
,
LMS_CH_RX
,
0
,
3
);
LMS_SetAntenna
(
lms_device
,
LMS_CH_TX
,
0
,
2
);
trx_lms_set_gains
(
device
,
device
->
openair0_cfg
);
/*LMS_SetNormalizedGain(lms_device, LMS_CH_TX, 0, 0.175);
LMS_SetNormalizedGain(lms_device, LMS_CH_RX, 0, 0.65);*/
for
(
int
i
=
0
;
i
<
device
->
openair0_cfg
->
rx_num_channels
;
i
++
)
{
if
(
LMS_SetLPFBW
(
lms_device
,
LMS_CH_RX
,
i
,
device
->
openair0_cfg
->
rx_bw
)
!=
0
)
...
...
@@ -239,6 +227,9 @@ int trx_lms_start(openair0_device *device){
tx_stream
.
throughputVsLatency
=
0.1
;
tx_stream
.
dataFmt
=
lms_stream_t
::
LMS_FMT_I12
;
tx_stream
.
isTx
=
true
;
trx_lms_set_gains
(
device
,
device
->
openair0_cfg
);
if
(
LMS_SetupStream
(
lms_device
,
&
tx_stream
)
!=
0
)
printf
(
"TX stream setup failed %s
\n
"
,
LMS_GetLastErrorMessage
());
...
...
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.lmssdr.conf
View file @
963ccb9b
...
...
@@ -39,7 +39,7 @@ eNBs =
nb_antennas_ports
=
1
;
nb_antennas_tx
=
1
;
nb_antennas_rx
=
1
;
tx_gain
=
6
0
;
tx_gain
=
10
0
;
rx_gain
=
111
;
prach_root
=
0
;
prach_config_index
=
0
;
...
...
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