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
lizhongxiao
OpenXG-RAN
Commits
2bd68a9a
Commit
2bd68a9a
authored
Sep 21, 2022
by
Marwan Hammouda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some extended KPIs for gNB added
parent
b7f958a8
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
658 additions
and
226 deletions
+658
-226
openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h
openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h
+2
-1
openair1/PHY/NR_TRANSPORT/pucch_rx.c
openair1/PHY/NR_TRANSPORT/pucch_rx.c
+0
-1
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
+2
-1
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
+52
-0
openair1/PHY/TOOLS/nr_phy_qt_scope.cpp
openair1/PHY/TOOLS/nr_phy_qt_scope.cpp
+539
-173
openair1/PHY/TOOLS/nr_phy_qt_scope.h
openair1/PHY/TOOLS/nr_phy_qt_scope.h
+20
-14
openair1/PHY/TOOLS/phy_scope_interface.h
openair1/PHY/TOOLS/phy_scope_interface.h
+41
-22
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+0
-2
openair2/LAYER2/NR_MAC_gNB/main.c
openair2/LAYER2/NR_MAC_gNB/main.c
+0
-12
targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf
.../GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf
+2
-0
No files found.
openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h
View file @
2bd68a9a
...
...
@@ -300,6 +300,7 @@ void nr_sort_asc_int16_1D_array_ind(int32_t *matrix,
void
nr_free_double_2D_array
(
double
**
input
,
uint16_t
xlen
);
#ifndef __cplusplus
void
updateLLR
(
uint8_t
listSize
,
uint16_t
row
,
uint16_t
col
,
...
...
@@ -327,7 +328,7 @@ void updatePathMetric2(double *pathMetric,
int
ylen
,
int
zlen
,
double
llr
[
xlen
][
ylen
][
zlen
]);
#endif
//Also nr_polar_rate_matcher
static
inline
void
nr_polar_interleaver
(
uint8_t
*
input
,
uint8_t
*
output
,
...
...
openair1/PHY/NR_TRANSPORT/pucch_rx.c
View file @
2bd68a9a
...
...
@@ -1691,7 +1691,6 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
}
// half_prb
}
// symb
gNBscopeCopy
(
gNB
,
pucchllr
,
llrs
,
sizeof
(
__m128i
),
2
*
pucch_pdu
->
prb_size
,
pucch_pdu
->
nr_of_symbols
);
// run polar decoder on llrs
decoderState
=
polar_decoder_int16
((
int16_t
*
)
llrs
,
decodedPayload
,
0
,
2
,
nb_bit
,
pucch_pdu
->
prb_size
);
LOG_D
(
PHY
,
"UCI decoderState %d, payload[0] %llu
\n
"
,
decoderState
,(
unsigned
long
long
)
decodedPayload
[
0
]);
...
...
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
View file @
2bd68a9a
...
...
@@ -459,7 +459,8 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue,
}
if
(
dmrss
==
2
)
UEscopeCopy
(
ue
,
pbchDlChEstimateTime
,
(
void
*
)
dl_ch_estimates_time
,
sizeof
(
struct
complex16
),
ue
->
frame_parms
.
nb_antennas_rx
,
idftsizeidx
);
UEscopeCopy
(
ue
,
pbchDlChEstimateTime
,
(
void
*
)
dl_ch_estimates_time
,
sizeof
(
struct
complex16
),
ue
->
frame_parms
.
nb_antennas_rx
,
ue
->
frame_parms
.
ofdm_symbol_size
>>
3
);
return
(
0
);
}
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
View file @
2bd68a9a
...
...
@@ -44,6 +44,7 @@
#include "executables/nr-uesoftmodem.h"
#include "PHY/CODING/nrLDPC_extern.h"
#include "common/utils/nr/nr_common.h"
#include "openair1/PHY/TOOLS/phy_scope_interface.h"
//#define ENABLE_PHY_PAYLOAD_DEBUG 1
...
...
@@ -53,10 +54,55 @@
static
uint64_t
nb_total_decod
=
0
;
static
uint64_t
nb_error_decod
=
0
;
static
int
nb_ack
=
0
;
static
int
nb_nack
=
0
;
static
uint32_t
blockSize
=
0
;
static
uint8_t
dl_mcs
=
0
;
static
uint16_t
nofRBs
=
0
;
notifiedFIFO_t
freeBlocks_dl
;
notifiedFIFO_elt_t
*
msgToPush_dl
;
int
nbDlProcessing
=
0
;
static
tpool_t
pool_dl
;
//extern double cpuf;
void
getKPIUE
(
extended_kpi_ue
*
kpiStructure
)
{
float
dl_bler
=
1
.
0
;
if
(
nb_ack
>
0
){
dl_bler
=
(
float
)
nb_nack
/
(
float
)
nb_ack
;
}
kpiStructure
->
DL_BLER
=
dl_bler
;
double
blerTerm
=
1
.
0
-
(
double
)
dl_bler
;
double
blockSieBits
=
(
double
)(
blockSize
<<
3
);
kpiStructure
->
throu
=
blerTerm
*
blockSieBits
/
0
.
1
;
kpiStructure
->
dl_mcs
=
dl_mcs
;
kpiStructure
->
nofRBs
=
nofRBs
;
}
void
init_dlsch_tpool
(
uint8_t
num_dlsch_threads
)
{
char
*
params
=
NULL
;
if
(
num_dlsch_threads
==
0
)
{
params
=
calloc
(
1
,
2
);
memcpy
(
params
,
"N"
,
1
);
}
else
{
params
=
calloc
(
1
,(
num_dlsch_threads
*
3
)
+
1
);
for
(
int
i
=
0
;
i
<
num_dlsch_threads
;
i
++
)
{
memcpy
(
params
+
(
i
*
3
),
"-1,"
,
3
);
}
}
initNamedTpool
(
params
,
&
pool_dl
,
false
,
"dlsch"
);
free
(
params
);
}
void
free_nr_ue_dlsch
(
NR_UE_DLSCH_t
**
dlschptr
,
uint16_t
N_RB_DL
)
{
uint16_t
a_segments
=
MAX_NUM_NR_DLSCH_SEGMENTS_PER_LAYER
*
NR_MAX_NB_LAYERS
;
...
...
@@ -194,6 +240,11 @@ bool nr_ue_postDecode(PHY_VARS_NR_UE *phy_vars_ue, notifiedFIFO_elt_t *req, bool
// if all segments are done
if
(
last
)
{
nb_ack
++
;
blockSize
=
harq_process
->
TBS
;
dl_mcs
=
harq_process
->
mcs
;
nofRBs
=
harq_process
->
nb_rb
;
if
(
decodeSuccess
)
{
//LOG_D(PHY,"[UE %d] DLSCH: Setting ACK for nr_slot_rx %d TBS %d mcs %d nb_rb %d harq_process->round %d\n",
// phy_vars_ue->Mod_id,nr_slot_rx,harq_process->TBS,harq_process->mcs,harq_process->nb_rb, harq_process->round);
...
...
@@ -209,6 +260,7 @@ bool nr_ue_postDecode(PHY_VARS_NR_UE *phy_vars_ue, notifiedFIFO_elt_t *req, bool
dlsch
->
last_iteration_cnt
=
rdata
->
decodeIterations
;
LOG_D
(
PHY
,
"DLSCH received ok
\n
"
);
}
else
{
nb_nack
++
;
//LOG_D(PHY,"[UE %d] DLSCH: Setting NAK for SFN/SF %d/%d (pid %d, status %d, round %d, TBS %d, mcs %d) Kr %d r %d harq_process->round %d\n",
// phy_vars_ue->Mod_id, frame, nr_slot_rx, harq_pid,harq_process->status, harq_process->round,harq_process->TBS,harq_process->mcs,Kr,r,harq_process->round);
harq_process
->
ack
=
0
;
...
...
openair1/PHY/TOOLS/nr_phy_qt_scope.cpp
View file @
2bd68a9a
This diff is collapsed.
Click to expand it.
openair1/PHY/TOOLS/nr_phy_qt_scope.h
View file @
2bd68a9a
...
...
@@ -32,13 +32,19 @@
#include <QLineSeries>
extern
"C"
{
#include <simple_executable.h>
#include <common/utils/system.h>
#include "common/ran_context.h"
#include <openair1/PHY/defs_gNB.h>
#include "PHY/defs_gNB.h"
#include "PHY/defs_nr_UE.h"
#include "PHY/defs_RU.h"
#include "executables/softmodem-common.h"
#include "phy_scope_interface.h"
#include "openair2/LAYER2/NR_MAC_gNB/mac_proto.h"
#include <openair2/LAYER2/NR_MAC_gNB/mac_proto.h>
#include "PHY/CODING/nrPolar_tools/nr_polar_defs.h"
extern
RAN_CONTEXT_t
RC
;
}
// drop-down list UE
...
...
@@ -90,16 +96,7 @@ public:
double
*
waterFallAvg
;
bool
isWaterFallTimeActive
;
enum
UEdataType
{
uePdschIQ
,
uePbchIQ
,
uePdcchIQ
,
uePdschLLR
,
uePbchLLR
,
uePdcchLLR
,
ueWaterFallTime
};
extended_kpi_ue
extendKPIUE
;
protected:
void
paintEvent
(
QPaintEvent
*
event
);
...
...
@@ -150,13 +147,18 @@ public:
QComboBox
*
parentWindow
;
extended_kpi
extendKPIgNB
;
extended_kpi_gNB
extendKPIgNB_1
;
int
idx_ULBLER
;
extended_kpi
_gNB
extendKPIgNB
;
NR_UE_info_t
*
targetUE
;
QLineSeries
*
seriesULBLER
;
QLineSeries
*
seriesULMCS
;
QLineSeries
*
seriesDLBLER
;
QLineSeries
*
seriesDLMCS
;
QLineSeries
*
seriesULThrou
;
QLineSeries
*
seriesDLThrou
;
float
ul_thr_ue
,
dl_thr_ue
;
protected:
void
paintEvent
(
QPaintEvent
*
event
);
...
...
@@ -166,12 +168,16 @@ public slots:
void
KPI_PuschLLR
();
void
KPI_ChannelResponse
();
void
KPI_UL_BLER
();
void
KPI_UL_MCS
();
void
KPI_DL_BLER
();
void
KPI_DL_MCS
();
void
KPI_UL_Throu
();
void
KPI_DL_Throu
();
private:
scopeData_t
*
p
;
int
indexToPlot
;
int
previousIndex
;
};
...
...
openair1/PHY/TOOLS/phy_scope_interface.h
View file @
2bd68a9a
...
...
@@ -29,30 +29,52 @@
* \note
* \warning
*/
#ifndef __PHY_SCOPE_INTERFACE_H
__
#define __PHY_SCOPE_INTERFACE_H
__
#ifndef __PHY_SCOPE_INTERFACE_H
#define __PHY_SCOPE_INTERFACE_H
#include <openair1/PHY/defs_gNB.h>
#include <openair1/PHY/defs_nr_UE.h>
typedef
struct
{
float
UP_BLER
;
// Uplink BLock Error Rate
float
UP_MCS
;
// Uplink MCS
// Uplink BLock Error Rate
int
idx_ULBLER
;
float
DL_BLER
;
// Downlink BLock Error Rate
float
DL_MCS
;
// Downlink MCS
}
extended_kpi
;
typedef
struct
{
float
UL_BLER
;
// Uplink BLock Error Rate
float
UL_MCS
;
// Uplink MCS
float
DL_BLER
;
// Downlink BLock Error Rate
float
DL_MCS
;
// Downlink MCS
// Uplink MCS
float
UL_MCS_max
;
int
idx_ULMCS
;
// Downlink BLock Error Rate
int
idx_DLBLER
;
// Downlink MCS
float
DL_MCS_max
;
int
idx_DLMCS
;
// UL Throughput
float
UL_Throu_max
;
int
idx_ULThrou
;
// DL Throughput
float
DL_Throu_max
;
int
idx_DLThrou
;
}
extended_kpi_gNB
;
typedef
struct
{
int
idx_BLER
;
float
DL_BLER
;
int
idx_throu
;
double
throu
;
int
idx_mcs
;
uint8_t
dl_mcs
;
int
idx_nofRBs
;
uint16_t
nofRBs
;
}
extended_kpi_ue
;
typedef
struct
{
int
*
argc
;
char
**
argv
;
...
...
@@ -61,13 +83,11 @@ typedef struct {
}
scopeParms_t
;
enum
UEdataType
{
pucchllr
,
pucchRxDataF_comp
,
pbchDlChEstimateTime
,
pbchLlr
,
pbchRxdataF_comp
,
pdcchLlr
,
pdcchRxdataF_comp
,
pdcchLlr
,
pbchRxdataF_comp
,
pbchLlr
,
UEdataTypeNumberOfItems
};
...
...
@@ -77,17 +97,16 @@ typedef struct scopeData_s {
RU_t
*
ru
;
PHY_VARS_gNB
*
gNB
;
void
*
liveData
;
void
*
liveDataUE
;
void
(
*
slotFunc
)(
int32_t
*
data
,
int
slot
,
void
*
scopeData
);
void
(
*
copyData
)(
PHY_VARS_NR_UE
*
,
enum
UEdataType
,
void
*
data
,
int
elementSz
,
int
colSz
,
int
lineSz
);
void
(
*
copyDatagNB
)(
PHY_VARS_gNB
*
,
enum
UEdataType
,
void
*
data
,
int
elementSz
,
int
colSz
,
int
lineSz
);
}
scopeData_t
;
int
load_softscope
(
char
*
exectype
,
void
*
initarg
);
int
end_forms
(
void
)
;
#define UEscopeCopy(ue, type, ...) if(ue->scopeData) ((scopeData_t*)ue->scopeData)->copyData(ue, type, ##__VA_ARGS__);
#define gNBscopeCopy(gNB, type, data, elementSZ, colSz, lineSz) if(gNB->scopeData) ((scopeData_t*)gNB->scopeData)->copyDatagNB(gNB, type, data, elementSZ, colSz, lineSz);
void
getKPI
gNB
(
extended_kpi_gNB
*
kpiStructure
);
void
getKPI
UE
(
extended_kpi_ue
*
kpiStructure
);
#endif
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
2bd68a9a
...
...
@@ -538,8 +538,6 @@ void handle_nr_ul_harq(const int CC_idP,
crc_pdu
->
rnti
);
add_tail_nr_list
(
&
sched_ctrl
->
retrans_ul_harq
,
harq_pid
);
}
printf
(
"nofBlocks: %i, nofErrors: %i, rnti: %u
\n
"
,
nofBlocks
,
nofErrors
,
crc_pdu
->
rnti
);
}
/*
...
...
openair2/LAYER2/NR_MAC_gNB/main.c
View file @
2bd68a9a
...
...
@@ -42,11 +42,7 @@
#include "common/ran_context.h"
#include "executables/softmodem-common.h"
#include "openair1/PHY/TOOLS/phy_scope_interface.h"
extern
RAN_CONTEXT_t
RC
;
static
float
DL_BLER
=
0
.
0
;
static
float
DL_MCS
=
0
.
0
;
#define MACSTATSSTRLEN 16000
...
...
@@ -77,12 +73,6 @@ void *nrmac_stats_thread(void *arg) {
return
NULL
;
}
void
getKPIgNB
(
extended_kpi_gNB
*
kpiStructure
)
{
kpiStructure
->
DL_BLER
=
DL_BLER
;
kpiStructure
->
DL_MCS
=
DL_MCS
;
}
void
clear_mac_stats
(
gNB_MAC_INST
*
gNB
)
{
UE_iterator
(
gNB
->
UE_info
.
list
,
UE
)
{
memset
(
&
UE
->
mac_stats
,
0
,
sizeof
(
UE
->
mac_stats
));
...
...
@@ -135,8 +125,6 @@ size_t dump_mac_stats(gNB_MAC_INST *gNB, char *output, size_t strlen, bool reset
sched_ctrl
->
dl_bler_stats
.
bler
,
sched_ctrl
->
dl_bler_stats
.
mcs
);
DL_BLER
=
sched_ctrl
->
dl_bler_stats
.
bler
;
DL_MCS
=
sched_ctrl
->
dl_bler_stats
.
mcs
;
if
(
reset_rsrp
)
{
stats
->
num_rsrp_meas
=
0
;
...
...
targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf
View file @
2bd68a9a
...
...
@@ -21,6 +21,8 @@ gNBs =
//////////
Physical
parameters
:
min_rxtxtime
=
6
;
servingCellConfigCommon
= (
{
#spCellConfigCommon
...
...
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