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
43afdc90
Commit
43afdc90
authored
Jan 29, 2024
by
lfq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add log
parent
321e76e8
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
94 additions
and
7 deletions
+94
-7
openair1/PHY/MODULATION/modulation_UE.h
openair1/PHY/MODULATION/modulation_UE.h
+1
-0
openair1/PHY/MODULATION/slot_fep_nr.c
openair1/PHY/MODULATION/slot_fep_nr.c
+13
-0
openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
+15
-0
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
+9
-0
openair2/GNB_APP/MACRLC_nr_paramdef.h
openair2/GNB_APP/MACRLC_nr_paramdef.h
+13
-0
openair2/GNB_APP/gnb_config.c
openair2/GNB_APP/gnb_config.c
+8
-2
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
+7
-3
openair2/LAYER2/NR_MAC_gNB/main.c
openair2/LAYER2/NR_MAC_gNB/main.c
+20
-0
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
+3
-0
targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.273PRB.oxgrf.conf
...S/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.273PRB.oxgrf.conf
+5
-2
No files found.
openair1/PHY/MODULATION/modulation_UE.h
View file @
43afdc90
...
...
@@ -40,6 +40,7 @@
\param no_prefix if 1 prefix is removed by HW
\param reset_freq_est if non-zero it resets the frequency offset estimation loop
*/
uint
cal_amp
(
int16_t
*
dataIn
,
int
len
);
int
slot_fep
(
PHY_VARS_UE
*
phy_vars_ue
,
unsigned
char
l
,
...
...
openair1/PHY/MODULATION/slot_fep_nr.c
View file @
43afdc90
...
...
@@ -34,6 +34,19 @@
#define LOG_I(A,B...) printf(A)
#endif*/
uint
cal_amp
(
int16_t
*
dataIn
,
int
len
)
{
int
i
;
uint
sumA
=
0
;
for
(
i
=
0
;
i
<
len
;
i
++
)
{
sumA
+=
abs
(
dataIn
[
i
]);
}
sumA
=
sumA
/
len
;
return
sumA
;
}
int
nr_slot_fep
(
PHY_VARS_NR_UE
*
ue
,
UE_nr_rxtx_proc_t
*
proc
,
unsigned
char
symbol
,
...
...
openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
View file @
43afdc90
...
...
@@ -1297,6 +1297,21 @@ static void inner_rx(PHY_VARS_gNB *gNB,
frame_parms
);
}
}
unsigned
int
pusch_amp
;
if
(
symbol
==
(
rel15_ul
->
start_symbol_index
+
rel15_ul
->
nr_of_symbols
-
1
))
{
static
int
cnt
=
0
;
if
(((
cnt
&
0x7F
)
==
0
)
||
(
cnt
<
0x80
))
//if ( (cnt < 0x100))
{
pusch_amp
=
cal_amp
(
&
rxFext
[
0
][
0
],
rel15_ul
->
rb_size
*
NR_NB_SC_PER_RB
);
//LOG_I(PHY, "UL AMP frame %d %d, symbol %d, rbs %d, res %d, time %d, freq %d \n", frame, slot, symbol, nb_re_pusch/12, nb_re_pusch, g_ul_time_amp[symbol], g_ul_freq_amp[symbol], pusch_amp);
LOG_I
(
PHY
,
"UL AMP frame %d %d, symbol %d, rbs %d, pusch amp %d
\n
"
,
0
,
slot
,
symbol
,
rel15_ul
->
rb_size
,
pusch_amp
);
}
cnt
++
;
}
c16_t
rho
[
nb_layer
][
nb_layer
][
buffer_length
]
__attribute__
((
aligned
(
32
)));
c16_t
rxF_ch_maga
[
nb_layer
][
buffer_length
]
__attribute__
((
aligned
(
32
)));
c16_t
rxF_ch_magb
[
nb_layer
][
buffer_length
]
__attribute__
((
aligned
(
32
)));
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
View file @
43afdc90
...
...
@@ -420,6 +420,12 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
frame_parms
,
dlsch
[
0
].
dlsch_config
.
dlDmrsSymbPos
,
ue
->
chest_time
);
if
((
pilots
==
0
)
&
((
symbol
==
(
startSymbIdx
+
nbSymb
-
1
))))
{
unsigned
int
pdsch_amp
;
pdsch_amp
=
cal_amp
((
int16_t
*
)
&
rxdataF_ext
[
0
][
0
],
nb_rb_pdsch
*
12
);
LOG_I
(
PHY
,
"frame %d %d, symbol %d pdsch_amp %d, rb %d
\n
"
,
frame
,
nr_slot_rx
,
symbol
,
pdsch_amp
,
nb_rb_pdsch
);
}
if
(
meas_enabled
)
{
stop_meas
(
&
meas
);
LOG_D
(
PHY
,
...
...
@@ -647,6 +653,9 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
codeword_TB0
,
codeword_TB1
,
layer_llr
);
// if (llr[0][0]) abort();
for
(
int
i
=
0
;
i
<
NR_MAX_NB_LAYERS
;
i
++
)
free
(
layer_llr
[
i
]);
...
...
openair2/GNB_APP/MACRLC_nr_paramdef.h
View file @
43afdc90
...
...
@@ -71,6 +71,9 @@
#define CONFIG_STRING_MACRLC_MIN_GRANT_PRB "min_grant_prb"
#define CONFIG_STRING_MACRLC_MIN_GRANT_MCS "min_grant_mcs"
#define CONFIG_STRING_MACRLC_IDENTITY_PM "identity_precoding_matrix"
#define CONFIG_STRING_MACRLC_TARGET_DL_RB "target_dl_rb"
#define CONFIG_STRING_MACRLC_TARGET_DL_MCS "target_dl_mcs"
#define CONFIG_STRING_MACRLC_TARGET_DL_SLOT_MAP "target_dl_slotmap"
#define HLP_MACRLC_UL_PRBBLACK "SNR threshold to decide whether a PRB will be blacklisted or not"
#define HLP_MACRLC_DL_BLER_UP "Upper threshold of BLER to decrease DL MCS"
...
...
@@ -125,6 +128,9 @@
{CONFIG_STRING_MACRLC_MIN_GRANT_PRB, HLP_MACRLC_MIN_GRANT_PRB, 0, .u8ptr=NULL, .defintval=5, TYPE_UINT8, 0}, \
{CONFIG_STRING_MACRLC_MIN_GRANT_MCS, HLP_MACRLC_MIN_GRANT_MCS, 0, .u8ptr=NULL, .defintval=9, TYPE_UINT8, 0}, \
{CONFIG_STRING_MACRLC_IDENTITY_PM, HLP_MACRLC_IDENTITY_PM, PARAMFLAG_BOOL, .u8ptr=NULL, .defintval=0, TYPE_UINT8, 0}, \
{CONFIG_STRING_MACRLC_TARGET_DL_RB, NULL, 0, .iptr=NULL, .defintval=50, TYPE_INT, 0}, \
{CONFIG_STRING_MACRLC_TARGET_DL_MCS, NULL, 0, .u8ptr=NULL, .defintval=9, TYPE_UINT8, 0}, \
{CONFIG_STRING_MACRLC_TARGET_DL_SLOT_MAP, NULL, 0, .u64ptr=NULL, .defintval=9, TYPE_INT, 0}, \
}
// clang-format off
...
...
@@ -162,6 +168,10 @@
#define MACRLC_MIN_GRANT_PRB_IDX 31
#define MACRLC_MIN_GRANT_MCS_IDX 32
#define MACRLC_IDENTITY_PM_IDX 33
#define MACRLC_TARGET_DL_RB_IDX 34
#define MACRLC_TARGET_DL_MCS_IDX 35
#define MACRLC_TARGET_DL_SLOTMAP_IDX 36
#define MACRLCPARAMS_CHECK { \
{ .s5 = { NULL } }, \
...
...
@@ -198,6 +208,9 @@
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s2 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
{ .s5 = { NULL } }, \
}
/*---------------------------------------------------------------------------------------------------------------------------------------------------------*/
...
...
openair2/GNB_APP/gnb_config.c
View file @
43afdc90
...
...
@@ -1257,13 +1257,19 @@ void RCconfig_nr_macrlc(configmodule_interface_t *cfg)
RC
.
nrmac
[
j
]
->
ul_prbblack_SNR_threshold
=
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_UL_PRBBLACK_SNR_THRESHOLD_IDX
].
iptr
);
RC
.
nrmac
[
j
]
->
pucch_failure_thres
=
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_PUCCHFAILURETHRES_IDX
].
iptr
);
RC
.
nrmac
[
j
]
->
pusch_failure_thres
=
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_PUSCHFAILURETHRES_IDX
].
iptr
);
RC
.
nrmac
[
j
]
->
target_dl_mcs
=
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_TARGET_DL_MCS_IDX
].
iptr
);
RC
.
nrmac
[
j
]
->
target_dl_rb
=
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_TARGET_DL_RB_IDX
].
iptr
);
RC
.
nrmac
[
j
]
->
target_dl_slotmap
=
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_TARGET_DL_SLOTMAP_IDX
].
iptr
);
LOG_I
(
NR_MAC
,
"PUSCH Target %d, PUCCH Target %d, PUCCH Failure %d, PUSCH Failure %d
\n
"
,
"PUSCH Target %d, PUCCH Target %d, PUCCH Failure %d, PUSCH Failure %d
, target dl mcs %d rb %d slotmap %x
\n
"
,
RC
.
nrmac
[
j
]
->
pusch_target_snrx10
,
RC
.
nrmac
[
j
]
->
pucch_target_snrx10
,
RC
.
nrmac
[
j
]
->
pucch_failure_thres
,
RC
.
nrmac
[
j
]
->
pusch_failure_thres
);
RC
.
nrmac
[
j
]
->
pusch_failure_thres
,
RC
.
nrmac
[
j
]
->
target_dl_mcs
,
RC
.
nrmac
[
j
]
->
target_dl_rb
,
(
unsigned
int
)
RC
.
nrmac
[
j
]
->
target_dl_slotmap
);
if
(
strcmp
(
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_TRANSPORT_N_PREFERENCE_IDX
].
strptr
),
"local_RRC"
)
==
0
)
{
// check number of instances is same as RRC/PDCP
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
View file @
43afdc90
...
...
@@ -51,6 +51,10 @@ void nr_preprocessor_phytest(module_id_t module_id,
sub_frame_t
slot
)
{
/* already mutex protected: held in gNB_dlsch_ulsch_scheduler() */
gNB_MAC_INST
*
gNB_mac
=
RC
.
nrmac
[
module_id
];
target_dl_bw
=
gNB_mac
->
target_dl_rb
;
dlsch_slot_bitmap
=
gNB_mac
->
target_dl_slotmap
;
if
(
!
is_xlsch_in_slot
(
dlsch_slot_bitmap
,
slot
))
return
;
NR_UE_info_t
*
UE
=
RC
.
nrmac
[
module_id
]
->
UE_info
.
list
[
0
];
...
...
@@ -161,11 +165,11 @@ void nr_preprocessor_phytest(module_id_t module_id,
&
tda_info
,
target_dl_Nl
);
sched_pdsch
->
mcs
=
target_dl_mcs
;
sched_pdsch
->
mcs
=
gNB_mac
->
target_dl_mcs
;
sched_pdsch
->
nrOfLayers
=
target_dl_Nl
;
sched_pdsch
->
Qm
=
nr_get_Qm_dl
(
sched_pdsch
->
mcs
,
dl_bwp
->
mcsTableIdx
);
sched_pdsch
->
R
=
nr_get_code_rate_dl
(
sched_pdsch
->
mcs
,
dl_bwp
->
mcsTableIdx
);
sched_ctrl
->
dl_bler_stats
.
mcs
=
target_dl_mcs
;
/* for logging output */
sched_ctrl
->
dl_bler_stats
.
mcs
=
gNB_mac
->
target_dl_mcs
;
/* for logging output */
sched_pdsch
->
tb_size
=
nr_compute_tbs
(
sched_pdsch
->
Qm
,
sched_pdsch
->
R
,
sched_pdsch
->
rbSize
,
...
...
@@ -183,7 +187,7 @@ void nr_preprocessor_phytest(module_id_t module_id,
for
(
int
rb
=
0
;
rb
<
sched_pdsch
->
rbSize
;
rb
++
)
vrb_map
[
rb
+
sched_pdsch
->
rbStart
+
BWPStart
]
=
SL_to_bitmap
(
tda_info
.
startSymbolIndex
,
tda_info
.
nrOfSymbols
);
if
((
frame
&
127
)
==
0
)
LOG_
D
(
MAC
,
"phytest: %d.%d DL mcs %d, DL rbStart %d, DL rbSize %d
\n
"
,
frame
,
slot
,
sched_pdsch
->
mcs
,
rbStart
,
rbSize
);
if
((
frame
&
127
)
==
0
)
LOG_
I
(
MAC
,
"phytest: %d.%d rnti %d, DL mcs %d(qm %d, tbsize %d), DL rbStart %d, DL rbSize %d
\n
"
,
frame
,
slot
,
UE
->
rnti
,
sched_pdsch
->
mcs
,
sched_pdsch
->
Qm
,
sched_pdsch
->
tb_size
,
rbStart
,
rbSize
);
}
uint32_t
target_ul_mcs
=
9
;
...
...
openair2/LAYER2/NR_MAC_gNB/main.c
View file @
43afdc90
...
...
@@ -89,6 +89,10 @@ size_t dump_mac_stats(gNB_MAC_INST *gNB, char *output, size_t strlen, bool reset
const
char
*
begin
=
output
;
const
char
*
end
=
output
+
strlen
;
static
uint64_t
dl_bytes_old
=
0
;
static
uint64_t
ul_bytes_old
=
0
;
uint64_t
dl_bytes_new
=
0
;
uint64_t
ul_bytes_new
=
0
;
/* this function is called from gNB_dlsch_ulsch_scheduler(), so assumes the
* scheduler to be locked*/
NR_SCHED_ENSURE_LOCKED
(
&
gNB
->
sched_lock
);
...
...
@@ -99,6 +103,8 @@ size_t dump_mac_stats(gNB_MAC_INST *gNB, char *output, size_t strlen, bool reset
NR_mac_stats_t
*
stats
=
&
UE
->
mac_stats
;
const
int
avg_rsrp
=
stats
->
num_rsrp_meas
>
0
?
stats
->
cumul_rsrp
/
stats
->
num_rsrp_meas
:
0
;
dl_bytes_new
=
stats
->
dl
.
total_bytes
;
ul_bytes_new
=
stats
->
ul
.
total_bytes
;
output
+=
snprintf
(
output
,
end
-
output
,
"UE RNTI %04x (%d) PH %d dB PCMAX %d dBm, average RSRP %d (%d meas)
\n
"
,
...
...
@@ -175,6 +181,20 @@ size_t dump_mac_stats(gNB_MAC_INST *gNB, char *output, size_t strlen, bool reset
stats
->
dl
.
lc_bytes
[
lc_id
],
stats
->
ul
.
lc_bytes
[
lc_id
]);
}
output
+=
snprintf
(
output
,
end
-
output
,
"UE %04x: dl thoughtput %"
PRIu64
" kbps, dl_bytes_old %"
PRIu64
"dl_bytes_new %"
PRIu64
"
\n
"
,
UE
->
rnti
,
(
uint64_t
)((
dl_bytes_new
-
dl_bytes_old
)
*
25
/
4000
),
dl_bytes_old
,
dl_bytes_new
);
output
+=
snprintf
(
output
,
end
-
output
,
"UE %04x: ul thoughtput %"
PRIu64
" kbps, ul_bytes_old %"
PRIu64
"ul_bytes_new %"
PRIu64
"
\n
"
,
UE
->
rnti
,
(
uint64_t
)((
ul_bytes_new
-
ul_bytes_old
)
*
25
/
4000
),
ul_bytes_old
,
ul_bytes_new
);
if
(
true
==
reset_rsrp
)
{
dl_bytes_old
=
dl_bytes_new
;
ul_bytes_old
=
ul_bytes_new
;
}
}
NR_SCHED_UNLOCK
(
&
gNB
->
UE_info
.
mutex
);
return
output
-
begin
;
...
...
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
View file @
43afdc90
...
...
@@ -759,6 +759,9 @@ typedef struct gNB_MAC_INST_s {
/// Subcarrier Offset
int
ssb_SubcarrierOffset
;
int
ssb_OffsetPointA
;
int
target_dl_mcs
;
int
target_dl_rb
;
uint64_t
target_dl_slotmap
;
/// Common cell resources
NR_COMMON_channels_t
common_channels
[
NFAPI_CC_MAX
];
...
...
targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.273PRB.oxgrf.conf
View file @
43afdc90
...
...
@@ -192,6 +192,9 @@ MACRLCs = (
pusch_FailureThres
=
1000
;
ulsch_max_frame_inactivity
=
0
;
ul_max_mcs
=
28
;
target_dl_rb
=
100
;
target_dl_mcs
=
18
;
target_dl_slotmap
=
4
;
}
);
...
...
@@ -209,7 +212,7 @@ RUs = (
local_rf
=
"yes"
nb_tx
=
1
nb_rx
=
1
att_tx
=
0
;
att_tx
=
3
0
;
att_rx
=
0
;
bands
= [
78
];
max_pdschReferenceSignalPower
= -
27
;
...
...
@@ -217,7 +220,7 @@ RUs = (
eNB_instances
= [
0
];
#beamforming 1x4 matrix:
bf_weights
= [
0
x00007fff
,
0
x0000
,
0
x0000
,
0
x0000
];
sdr_addrs
=
"dev=pciex:0,auxdac1=1
508
"
;
sdr_addrs
=
"dev=pciex:0,auxdac1=1
660
"
;
clock_src
=
"internal"
;
}
);
...
...
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