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
58063acf
Commit
58063acf
authored
Jul 12, 2021
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rx_gain = 0 in rfsimulator
parent
8ad3b40c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
47 additions
and
23 deletions
+47
-23
executables/nr-ue.c
executables/nr-ue.c
+2
-3
executables/nr-uesoftmodem.c
executables/nr-uesoftmodem.c
+2
-1
openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h
openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h
+7
-5
openair1/PHY/NR_UE_TRANSPORT/nr_ue_rf_helpers.c
openair1/PHY/NR_UE_TRANSPORT/nr_ue_rf_helpers.c
+35
-14
targets/ARCH/rfsimulator/simulator.c
targets/ARCH/rfsimulator/simulator.c
+1
-0
No files found.
executables/nr-ue.c
View file @
58063acf
...
...
@@ -220,7 +220,6 @@ static void UE_synch(void *arg) {
LOG_I
(
PHY
,
"[UE thread Synch] Running Initial Synch (mode %d)
\n
"
,
UE
->
mode
);
uint64_t
dl_carrier
,
ul_carrier
;
double
rx_gain_off
=
0
;
nr_get_carrier_frequencies
(
&
UE
->
frame_parms
,
&
dl_carrier
,
&
ul_carrier
);
if
(
nr_initial_sync
(
&
syncD
->
proc
,
UE
,
2
)
==
0
)
{
...
...
@@ -230,7 +229,7 @@ static void UE_synch(void *arg) {
// rerun with new cell parameters and frequency-offset
// todo: the freq_offset computed on DL shall be scaled before being applied to UL
nr_rf_card_config
(
&
openair0_cfg
[
UE
->
rf_map
.
card
],
rx_gain_off
,
ul_carrier
,
dl_carrier
,
freq_offset
);
nr_rf_card_config
_freq
(
&
openair0_cfg
[
UE
->
rf_map
.
card
]
,
ul_carrier
,
dl_carrier
,
freq_offset
);
LOG_I
(
PHY
,
"Got synch: hw_slot_offset %d, carrier off %d Hz, rxgain %f (DL %f Hz, UL %f Hz)
\n
"
,
hw_slot_offset
,
...
...
@@ -264,7 +263,7 @@ static void UE_synch(void *arg) {
freq_offset
*=
-
1
;
nr_rf_card_config
(
&
openair0_cfg
[
UE
->
rf_map
.
card
],
rx_gain_off
,
ul_carrier
,
dl_carrier
,
freq_offset
);
nr_rf_card_config
_freq
(
&
openair0_cfg
[
UE
->
rf_map
.
card
]
,
ul_carrier
,
dl_carrier
,
freq_offset
);
LOG_I
(
PHY
,
"Initial sync failed: trying carrier off %d Hz
\n
"
,
freq_offset
);
...
...
executables/nr-uesoftmodem.c
View file @
58063acf
...
...
@@ -376,7 +376,8 @@ void init_openair0(void) {
nr_get_carrier_frequencies
(
frame_parms
,
&
dl_carrier
,
&
ul_carrier
);
nr_rf_card_config
(
&
openair0_cfg
[
card
],
rx_gain_off
,
ul_carrier
,
dl_carrier
,
freq_off
);
nr_rf_card_config_freq
(
&
openair0_cfg
[
card
],
ul_carrier
,
dl_carrier
,
freq_off
);
nr_rf_card_config_gain
(
&
openair0_cfg
[
card
],
rx_gain_off
);
openair0_cfg
[
card
].
configFilename
=
get_softmodem_params
()
->
rf_config_file
;
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h
View file @
58063acf
...
...
@@ -1477,11 +1477,13 @@ void nr_get_carrier_frequencies(NR_DL_FRAME_PARMS *fp,
@param dl_Carrier DL carrier to be set
@param freq_offset Freq offset to be set
*/
void
nr_rf_card_config
(
openair0_config_t
*
openair0_cfg
,
double
rx_gain_off
,
uint64_t
ul_Carrier
,
uint64_t
dl_Carrier
,
int
freq_offset
);
void
nr_rf_card_config_gain
(
openair0_config_t
*
openair0_cfg
,
double
rx_gain_off
);
void
nr_rf_card_config_freq
(
openair0_config_t
*
openair0_cfg
,
uint64_t
ul_Carrier
,
uint64_t
dl_Carrier
,
int
freq_offset
);
void
print_CQI
(
void
*
o
,
UCI_format_t
uci_format
,
uint8_t
eNB_id
,
int
N_RB_DL
);
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_ue_rf_helpers.c
View file @
58063acf
...
...
@@ -48,11 +48,9 @@ void nr_get_carrier_frequencies(NR_DL_FRAME_PARMS *fp, uint64_t *dl_carrier, uin
}
void
nr_rf_card_config
(
openair0_config_t
*
openair0_cfg
,
double
rx_gain_offset
,
uint64_t
ul_carrier
,
uint64_t
dl_carrier
,
int
freq_offset
){
void
nr_rf_card_config_gain
(
openair0_config_t
*
openair0_cfg
,
double
rx_gain_off
){
uint8_t
mod_id
=
0
;
uint8_t
cc_id
=
0
;
...
...
@@ -61,6 +59,36 @@ void nr_rf_card_config(openair0_config_t *openair0_cfg,
double
rx_gain
=
ue
->
rx_total_gain_dB
;
double
tx_gain
=
ue
->
tx_total_gain_dB
;
for
(
int
i
=
rf_chain
;
i
<
rf_chain
+
4
;
i
++
)
{
if
(
tx_gain
)
openair0_cfg
->
tx_gain
[
i
]
=
tx_gain
;
if
(
rx_gain
)
openair0_cfg
->
rx_gain
[
i
]
=
rx_gain
-
rx_gain_off
;
openair0_cfg
->
autocal
[
i
]
=
1
;
if
(
i
<
openair0_cfg
->
rx_num_channels
)
{
LOG_I
(
PHY
,
"HW: Configuring channel %d (rf_chain %d): setting tx_gain %f, rx_gain %f
\n
"
,
i
,
rf_chain
,
openair0_cfg
->
tx_gain
[
i
],
openair0_cfg
->
rx_gain
[
i
]);
}
}
}
void
nr_rf_card_config_freq
(
openair0_config_t
*
openair0_cfg
,
uint64_t
ul_carrier
,
uint64_t
dl_carrier
,
int
freq_offset
){
uint8_t
mod_id
=
0
;
uint8_t
cc_id
=
0
;
PHY_VARS_NR_UE
*
ue
=
PHY_vars_UE_g
[
mod_id
][
cc_id
];
int
rf_chain
=
ue
->
rf_map
.
chain
;
for
(
int
i
=
rf_chain
;
i
<
rf_chain
+
4
;
i
++
)
{
if
(
i
<
openair0_cfg
->
rx_num_channels
)
...
...
@@ -73,22 +101,15 @@ void nr_rf_card_config(openair0_config_t *openair0_cfg,
else
openair0_cfg
->
tx_freq
[
i
]
=
0
.
0
;
if
(
tx_gain
)
openair0_cfg
->
tx_gain
[
i
]
=
tx_gain
;
if
(
rx_gain
)
openair0_cfg
->
rx_gain
[
i
]
=
rx_gain
-
rx_gain_offset
;
openair0_cfg
->
autocal
[
i
]
=
1
;
if
(
i
<
openair0_cfg
->
rx_num_channels
)
{
LOG_I
(
PHY
,
"HW: Configuring channel %d (rf_chain %d): setting tx_
gain %f, rx_gain %f, tx_
freq %f Hz, rx_freq %f Hz
\n
"
,
LOG_I
(
PHY
,
"HW: Configuring channel %d (rf_chain %d): setting tx_freq %f Hz, rx_freq %f Hz
\n
"
,
i
,
rf_chain
,
openair0_cfg
->
tx_gain
[
i
],
openair0_cfg
->
rx_gain
[
i
],
openair0_cfg
->
tx_freq
[
i
],
openair0_cfg
->
rx_freq
[
i
]);
}
}
}
\ No newline at end of file
}
targets/ARCH/rfsimulator/simulator.c
View file @
58063acf
...
...
@@ -805,6 +805,7 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg) {
device
->
trx_read_func
=
rfsimulator_read
;
/* let's pretend to be a b2x0 */
device
->
type
=
RFSIMULATOR
;
openair0_cfg
[
0
].
rx_gain
[
0
]
=
0
;
device
->
openair0_cfg
=&
openair0_cfg
[
0
];
device
->
priv
=
rfsimulator
;
device
->
trx_write_init
=
rfsimulator_write_init
;
...
...
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