Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
openairinterface5G
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor 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
Parmentelat
openairinterface5G
Commits
456572c9
Commit
456572c9
authored
8 years ago
by
knopp
Browse files
Options
Downloads
Patches
Plain Diff
ExMIMO2 RX gain calibration
parent
19922715
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
targets/ARCH/EXMIMO/USERSPACE/LIB/openair0_lib.c
+29
-1
29 additions, 1 deletion
targets/ARCH/EXMIMO/USERSPACE/LIB/openair0_lib.c
with
29 additions
and
1 deletion
targets/ARCH/EXMIMO/USERSPACE/LIB/openair0_lib.c
+
29
−
1
View file @
456572c9
...
@@ -670,6 +670,13 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg) {
...
@@ -670,6 +670,13 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg) {
return
(
0
);
return
(
0
);
}
}
unsigned
int
rxg_max
[
4
]
=
{
128
,
128
,
128
,
126
};
unsigned
int
rxg_med
[
4
]
=
{
122
,
123
,
123
,
120
};
unsigned
int
rxg_byp
[
4
]
=
{
116
,
117
,
116
,
116
};
unsigned
int
nf_max
[
4
]
=
{
7
,
9
,
16
,
12
};
unsigned
int
nf_med
[
4
]
=
{
12
,
13
,
22
,
17
};
unsigned
int
nf_byp
[
4
]
=
{
15
,
20
,
29
,
23
};
int
openair0_config
(
openair0_config_t
*
openair0_cfg
,
int
UE_flag
)
int
openair0_config
(
openair0_config_t
*
openair0_cfg
,
int
UE_flag
)
{
{
int
ret
;
int
ret
;
...
@@ -760,21 +767,42 @@ int openair0_config(openair0_config_t *openair0_cfg, int UE_flag)
...
@@ -760,21 +767,42 @@ int openair0_config(openair0_config_t *openair0_cfg, int UE_flag)
p_exmimo_config
->
rf
.
rf_mode
[
ant
]
+=
(
RXEN
+
DMAMODE_RX
+
RXLPFNORM
+
RXLPFEN
+
rx_filter
);
p_exmimo_config
->
rf
.
rf_mode
[
ant
]
+=
(
RXEN
+
DMAMODE_RX
+
RXLPFNORM
+
RXLPFEN
+
rx_filter
);
p_exmimo_config
->
rf
.
rf_freq_rx
[
ant
]
=
(
unsigned
int
)
openair0_cfg
[
card
].
rx_freq
[
ant
];
p_exmimo_config
->
rf
.
rf_freq_rx
[
ant
]
=
(
unsigned
int
)
openair0_cfg
[
card
].
rx_freq
[
ant
];
p_exmimo_config
->
rf
.
rx_gain
[
ant
][
0
]
=
(
unsigned
int
)
openair0_cfg
[
card
].
rx_gain
[
ant
];
printf
(
"openair0 : programming card %d RX antenna %d (freq %u, gain %d)
\n
"
,
card
,
ant
,
p_exmimo_config
->
rf
.
rf_freq_rx
[
ant
],
p_exmimo_config
->
rf
.
rx_gain
[
ant
][
0
]);
printf
(
"openair0 : programming card %d RX antenna %d (freq %u, gain %d)
\n
"
,
card
,
ant
,
p_exmimo_config
->
rf
.
rf_freq_rx
[
ant
],
p_exmimo_config
->
rf
.
rx_gain
[
ant
][
0
]);
switch
(
openair0_cfg
[
card
].
rxg_mode
[
ant
])
{
switch
(
openair0_cfg
[
card
].
rxg_mode
[
ant
])
{
default:
default:
case
max_gain
:
case
max_gain
:
p_exmimo_config
->
rf
.
rf_mode
[
ant
]
+=
LNAMax
;
p_exmimo_config
->
rf
.
rf_mode
[
ant
]
+=
LNAMax
;
if
(
rxg_max
[
ant
]
>=
(
int
)
openair0_cfg
[
card
].
rx_gain
[
ant
])
{
p_exmimo_config
->
rf
.
rx_gain
[
ant
][
0
]
=
30
-
(
rxg_max
[
ant
]
-
(
int
)
openair0_cfg
[
card
].
rx_gain
[
ant
]);
//was measured at rxgain=30;
}
else
{
printf
(
"openair0: RX RF gain too high, reduce by %d dB
\n
"
,
(
int
)
openair0_cfg
[
card
].
rx_gain
[
ant
]
-
rxg_max
[
ant
]);
exit
(
-
1
);
}
break
;
break
;
case
med_gain
:
case
med_gain
:
p_exmimo_config
->
rf
.
rf_mode
[
ant
]
+=
LNAMed
;
p_exmimo_config
->
rf
.
rf_mode
[
ant
]
+=
LNAMed
;
if
(
rxg_med
[
ant
]
>=
(
int
)
openair0_cfg
[
card
].
rx_gain
[
ant
])
{
p_exmimo_config
->
rf
.
rx_gain
[
ant
][
0
]
=
30
-
(
rxg_med
[
ant
]
-
(
int
)
openair0_cfg
[
card
].
rx_gain
[
ant
]);
//was measured at rxgain=30;
}
else
{
printf
(
"openair0: RX RF gain too high, reduce by %d dB
\n
"
,
(
int
)
openair0_cfg
[
card
].
rx_gain
[
ant
]
-
rxg_med
[
ant
]);
exit
(
-
1
);
}
break
;
break
;
case
byp_gain
:
case
byp_gain
:
p_exmimo_config
->
rf
.
rf_mode
[
ant
]
+=
LNAByp
;
p_exmimo_config
->
rf
.
rf_mode
[
ant
]
+=
LNAByp
;
if
(
rxg_byp
[
ant
]
>=
(
int
)
openair0_cfg
[
card
].
rx_gain
[
ant
])
{
p_exmimo_config
->
rf
.
rx_gain
[
ant
][
0
]
=
30
-
(
rxg_byp
[
ant
]
-
(
int
)
openair0_cfg
[
card
].
rx_gain
[
ant
]);
//was measured at rxgain=30;
}
else
{
printf
(
"openair0: RX RF gain too high, reduce by %d dB
\n
"
,
(
int
)
openair0_cfg
[
card
].
rx_gain
[
ant
]
-
rxg_byp
[
ant
]);
exit
(
-
1
);
}
break
;
break
;
}
}
}
else
{
}
else
{
...
...
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