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
7a3bb1fd
Commit
7a3bb1fd
authored
Jul 16, 2020
by
Sakthivel Velumani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added hongzhi's rsrp measurements
parent
48ef98d5
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
126 additions
and
3 deletions
+126
-3
openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h
openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h
+4
-0
openair1/PHY/NR_UE_ESTIMATION/nr_ue_measurements.c
openair1/PHY/NR_UE_ESTIMATION/nr_ue_measurements.c
+102
-1
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
+14
-2
openair2/LAYER2/NR_MAC_UE/mac_defs.h
openair2/LAYER2/NR_MAC_UE/mac_defs.h
+6
-0
No files found.
openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h
View file @
7a3bb1fd
...
...
@@ -87,6 +87,10 @@ void nr_ue_measurements(PHY_VARS_NR_UE *ue,
unsigned
char
rank_adaptation
,
uint8_t
subframe
);
void
nr_ue_rrc_measurements
(
PHY_VARS_NR_UE
*
ue
,
uint8_t
slot
,
uint8_t
abstraction_flag
);
void
phy_adjust_gain_nr
(
PHY_VARS_NR_UE
*
ue
,
uint32_t
rx_power_fil_dB
,
uint8_t
eNB_id
);
...
...
openair1/PHY/NR_UE_ESTIMATION/nr_ue_measurements.c
View file @
7a3bb1fd
...
...
@@ -23,6 +23,7 @@
#include "PHY/phy_extern_nr_ue.h"
#include "common/utils/LOG/log.h"
#include "PHY/sse_intrin.h"
#include "openair2/LAYER2/NR_MAC_UE/mac_proto.h"
//#define k1 1000
#define k1 ((long long int) 1000)
...
...
@@ -76,6 +77,35 @@ int16_t get_nr_PL(uint8_t Mod_id, uint8_t CC_id, uint8_t gNB_index){
//(ue->frame_parms.pdsch_config_common.referenceSignalPower*10))/10));
}
uint32_t
get_nr_rx_total_gain_dB
(
module_id_t
Mod_id
,
uint8_t
CC_id
)
{
PHY_VARS_NR_UE
*
ue
=
PHY_vars_UE_g
[
Mod_id
][
CC_id
];
if
(
ue
)
return
ue
->
rx_total_gain_dB
;
return
0xFFFFFFFF
;
}
double
get_nr_RSRP
(
module_id_t
Mod_id
,
uint8_t
CC_id
,
uint8_t
gNB_index
)
{
AssertFatal
(
PHY_vars_UE_g
!=
NULL
,
"PHY_vars_UE_g is null
\n
"
);
AssertFatal
(
PHY_vars_UE_g
[
Mod_id
]
!=
NULL
,
"PHY_vars_UE_g[%d] is null
\n
"
,
Mod_id
);
AssertFatal
(
PHY_vars_UE_g
[
Mod_id
][
CC_id
]
!=
NULL
,
"PHY_vars_UE_g[%d][%d] is null
\n
"
,
Mod_id
,
CC_id
);
PHY_VARS_NR_UE
*
ue
=
PHY_vars_UE_g
[
Mod_id
][
CC_id
];
if
(
ue
)
return
((
dB_fixed_times10
(
ue
->
measurements
.
rsrp
[
gNB_index
]))
/
10
.
0
-
get_nr_rx_total_gain_dB
(
Mod_id
,
0
)
-
10
*
log10
(
20
*
12
));
return
-
140
.
0
;
}
void
nr_ue_measurements
(
PHY_VARS_NR_UE
*
ue
,
unsigned
int
subframe_offset
,
unsigned
char
N0_symbol
,
...
...
@@ -192,3 +222,74 @@ void nr_ue_measurements(PHY_VARS_NR_UE *ue,
_m_empty
();
#endif
}
void
nr_ue_rrc_measurements
(
PHY_VARS_NR_UE
*
ue
,
uint8_t
slot
,
uint8_t
abstraction_flag
)
{
int
aarx
,
rb
;
int16_t
*
rxF
;
uint16_t
Nid_cell
=
ue
->
frame_parms
.
Nid_cell
;
uint8_t
eNB_offset
=
0
,
l
,
nushift
;
uint16_t
off
,
nb_rb
;
NR_UE_MAC_INST_t
*
mac
=
get_mac_inst
(
0
);
nushift
=
ue
->
frame_parms
.
Nid_cell
%
4
;
ue
->
frame_parms
.
nushift
=
nushift
;
unsigned
int
ssb_offset
=
ue
->
frame_parms
.
first_carrier_offset
+
ue
->
frame_parms
.
ssb_start_subcarrier
;
if
(
ssb_offset
>=
ue
->
frame_parms
.
ofdm_symbol_size
)
ssb_offset
-=
ue
->
frame_parms
.
ofdm_symbol_size
;
ue
->
measurements
.
rsrp
[
eNB_offset
]
=
0
;
if
(
mac
->
csirc
->
reportQuantity
.
choice
.
ssb_Index_RSRP
){
nb_rb
=
60
;
}
else
{
LOG_E
(
PHY
,
"report quantity not supported
\n
"
);
}
if
(
abstraction_flag
==
0
)
{
for
(
l
=
0
;
l
<
1
;
l
++
)
{
LOG_D
(
PHY
,
"[UE %d] slot %d Doing ue_rrc_measurements rsrp/rssi (Nid_cell %d, nushift %d, eNB_offset %d, l %d)
\n
"
,
ue
->
Mod_id
,
slot
,
Nid_cell
,
nushift
,
eNB_offset
,
l
);
for
(
aarx
=
0
;
aarx
<
ue
->
frame_parms
.
nb_antennas_rx
;
aarx
++
)
{
rxF
=
(
int16_t
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
slot
]].
rxdataF
[
aarx
][(
l
*
ue
->
frame_parms
.
ofdm_symbol_size
)];
off
=
ssb_offset
+
nushift
;
if
(
l
==
0
)
{
for
(
rb
=
0
;
rb
<
nb_rb
;
rb
++
)
{
ue
->
measurements
.
rsrp
[
eNB_offset
]
+=
(((
int32_t
)(
rxF
[
off
])
*
rxF
[
off
])
+
((
int32_t
)(
rxF
[
off
+
1
])
*
rxF
[
off
+
1
]));
// printf("rb %d, off %d : %d\n",rb,off,((((int32_t)rxF[off])*rxF[off])+((int32_t)(rxF[off+1])*rxF[off+1])));
off
=
(
off
+
4
)
%
ue
->
frame_parms
.
ofdm_symbol_size
;
}
}
}
}
ue
->
measurements
.
rsrp
[
eNB_offset
]
/=
nb_rb
;
LOG_I
(
PHY
,
"eNB: %d, RSRP: %d
\n
"
,
eNB_offset
,
ue
->
measurements
.
rsrp
[
eNB_offset
]);
}
else
{
ue
->
measurements
.
rsrp
[
eNB_offset
]
=
-
93
;
}
if
(
eNB_offset
==
0
)
LOG_I
(
PHY
,
"[UE %d] slot %d RRC Measurements (idx %d, Cell id %d) => rsrp: %3.1f dBm/RE (%d), rsrq: %3.1f dB
\n
"
,
ue
->
Mod_id
,
slot
,
eNB_offset
,
(
eNB_offset
>
0
)
?
ue
->
measurements
.
adj_cell_id
[
eNB_offset
-
1
]
:
ue
->
frame_parms
.
Nid_cell
,
10
*
log10
(
ue
->
measurements
.
rsrp
[
eNB_offset
])
-
ue
->
rx_total_gain_dB
,
ue
->
measurements
.
rsrp
[
eNB_offset
],
(
10
*
log10
(
ue
->
measurements
.
rsrq
[
eNB_offset
])));
}
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
View file @
7a3bb1fd
...
...
@@ -55,6 +55,8 @@
#include "SCHED/phy_procedures_emos.h"
#endif
#include "executables/softmodem-common.h"
#include "openair2/LAYER2/NR_MAC_UE/mac_proto.h"
//#define DEBUG_PHY_PROC
#define NR_PDCCH_SCHED
...
...
@@ -4036,6 +4038,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
uint8_t
nb_symb_pdcch
=
pdcch_vars
->
nb_search_space
>
0
?
pdcch_vars
->
pdcch_config
[
0
].
coreset
.
duration
:
0
;
uint8_t
dci_cnt
=
0
;
NR_DL_FRAME_PARMS
*
fp
=
&
ue
->
frame_parms
;
NR_UE_MAC_INST_t
*
mac
=
get_mac_inst
(
0
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_RX
,
VCD_FUNCTION_IN
);
...
...
@@ -4075,8 +4078,17 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
#endif
}
if
(
mac
->
csirc
->
reportQuantity
.
choice
.
ssb_Index_RSRP
){
printf
(
"first measurement ue->symbol_offset %d
\n
"
,
ue
->
symbol_offset
);
nr_ue_rrc_measurements
(
ue
,
nr_tti_rx
,
0
);
}
nr_ue_pbch_procedures
(
eNB_id
,
ue
,
proc
,
0
);
if
(
ue
->
no_timing_correction
==
0
)
{
LOG_I
(
PHY
,
"start adjust sync slot = %d no timing %d
\n
"
,
nr_tti_rx
,
ue
->
no_timing_correction
);
nr_adjust_synch_ue
(
fp
,
...
...
openair2/LAYER2/NR_MAC_UE/mac_defs.h
View file @
7a3bb1fd
...
...
@@ -64,6 +64,11 @@
#include "NR_CellGroupConfig.h"
#include "NR_ServingCellConfig.h"
#include "NR_MeasConfig.h"
#include "fapi_nr_ue_interface.h"
#include "NR_IF_Module.h"
#include "PHY/defs_nr_common.h"
#include "openair2/LAYER2/NR_MAC_COMMON/nr_mac.h"
#define NB_NR_UE_MAC_INST 1
/*!\brief Maximum number of logical channl group IDs */
...
...
@@ -158,6 +163,7 @@ typedef struct {
NR_CellGroupConfig_t
*
scg
;
NR_RACH_ConfigDedicated_t
*
rach_ConfigDedicated
;
int
servCellIndex
;
NR_CSI_ReportConfig_t
*
csirc
;
//// MAC config
NR_DRX_Config_t
*
drx_Config
;
NR_SchedulingRequestConfig_t
*
schedulingRequestConfig
;
...
...
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