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
zzha zzha
OpenXG-RAN
Commits
0eed3534
Commit
0eed3534
authored
Sep 22, 2022
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/fix_ulprbbl_based_on_srs' into integration_2022_wk38
parents
678b8a23
051fa6ec
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
59 additions
and
39 deletions
+59
-39
openair1/PHY/defs_gNB.h
openair1/PHY/defs_gNB.h
+1
-0
openair1/SCHED_NR/phy_procedures_nr_gNB.c
openair1/SCHED_NR/phy_procedures_nr_gNB.c
+32
-23
openair2/GNB_APP/L1_nr_paramdef.h
openair2/GNB_APP/L1_nr_paramdef.h
+4
-1
openair2/GNB_APP/gnb_config.c
openair2/GNB_APP/gnb_config.c
+1
-0
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+18
-11
targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.fr1.273PRB.2x2.usrpn300.conf
...IC-NR-5GC/CONF/gnb.sa.band77.fr1.273PRB.2x2.usrpn300.conf
+1
-1
targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.2x2.usrpn300.conf
...IC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.2x2.usrpn300.conf
+1
-2
targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf
...ENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf
+0
-1
targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.162PRB.2x2.usrpn300.conf
...IC-NR-5GC/CONF/gnb.sa.band78.fr1.162PRB.2x2.usrpn300.conf
+1
-0
No files found.
openair1/PHY/defs_gNB.h
View file @
0eed3534
...
...
@@ -841,6 +841,7 @@ typedef struct PHY_VARS_gNB_s {
int
pucch0_thres
;
int
pusch_thres
;
int
prach_thres
;
int
srs_thres
;
uint64_t
bad_pucch
;
int
num_ulprbbl
;
int
ulprbbl
[
275
];
...
...
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
0eed3534
...
...
@@ -822,7 +822,7 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
generate_srs_nr
(
srs_pdu
,
frame_parms
,
gNB
->
nr_srs_info
[
i
]
->
srs_generated_signal
,
0
,
gNB
->
nr_srs_info
[
i
],
AMP
,
frame_rx
,
slot_rx
);
}
const
int
srs_est
=
nr_get_srs_signal
(
gNB
,
frame_rx
,
slot_rx
,
srs_pdu
,
gNB
->
nr_srs_info
[
i
],
srs_received_signal
);
int
srs_est
=
nr_get_srs_signal
(
gNB
,
frame_rx
,
slot_rx
,
srs_pdu
,
gNB
->
nr_srs_info
[
i
],
srs_received_signal
);
if
(
srs_est
>=
0
)
{
nr_srs_channel_estimation
(
gNB
,
...
...
@@ -843,31 +843,41 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
&
snr
);
}
T
(
T_GNB_PHY_UL_FREQ_CHANNEL_ESTIMATE
,
T_INT
(
0
),
T_INT
(
srs_pdu
->
rnti
),
T_INT
(
frame_rx
),
T_INT
(
0
),
T_INT
(
0
),
T_BUFFER
(
srs_estimated_channel_freq
[
0
][
0
],
frame_parms
->
ofdm_symbol_size
*
sizeof
(
int32_t
)));
if
((
snr
*
10
)
<
gNB
->
srs_thres
)
{
srs_est
=
-
1
;
}
T
(
T_GNB_PHY_UL_TIME_CHANNEL_ESTIMATE
,
T_INT
(
0
),
T_INT
(
srs_pdu
->
rnti
),
T_INT
(
frame_rx
),
T_INT
(
0
),
T_INT
(
0
),
T_BUFFER
(
srs_estimated_channel_time_shifted
[
0
][
0
],
frame_parms
->
ofdm_symbol_size
*
sizeof
(
int32_t
)));
T
(
T_GNB_PHY_UL_FREQ_CHANNEL_ESTIMATE
,
T_INT
(
0
),
T_INT
(
srs_pdu
->
rnti
),
T_INT
(
frame_rx
),
T_INT
(
0
),
T_INT
(
0
),
T_BUFFER
(
srs_estimated_channel_freq
[
0
][
0
],
frame_parms
->
ofdm_symbol_size
*
sizeof
(
int32_t
)));
T
(
T_GNB_PHY_UL_TIME_CHANNEL_ESTIMATE
,
T_INT
(
0
),
T_INT
(
srs_pdu
->
rnti
),
T_INT
(
frame_rx
),
T_INT
(
0
),
T_INT
(
0
),
T_BUFFER
(
srs_estimated_channel_time_shifted
[
0
][
0
],
frame_parms
->
ofdm_symbol_size
*
sizeof
(
int32_t
)));
const
uint16_t
num_srs
=
gNB
->
UL_INFO
.
srs_ind
.
number_of_pdus
;
gNB
->
UL_INFO
.
srs_ind
.
pdu_list
=
&
gNB
->
srs_pdu_list
[
0
];
gNB
->
UL_INFO
.
srs_ind
.
sfn
=
frame_rx
;
gNB
->
UL_INFO
.
srs_ind
.
slot
=
slot_rx
;
gNB
->
srs_pdu_list
[
num_srs
].
handle
=
srs_pdu
->
handle
;
gNB
->
srs_pdu_list
[
num_srs
].
rnti
=
srs_pdu
->
rnti
;
gNB
->
srs_pdu_list
[
num_srs
].
timing_advance
=
srs_est
>=
0
?
nr_est_timing_advance_srs
(
frame_parms
,
srs_estimated_channel_time
[
0
])
:
0xFFFF
;
gNB
->
srs_pdu_list
[
num_srs
].
num_symbols
=
1
<<
srs_pdu
->
num_symbols
;
gNB
->
srs_pdu_list
[
num_srs
].
wide_band_snr
=
srs_est
>=
0
?
(
snr
+
64
)
<<
1
:
0xFF
;
// 0xFF will be set if this field is invalid
gNB
->
srs_pdu_list
[
num_srs
].
num_reported_symbols
=
1
<<
srs_pdu
->
num_symbols
;
if
(
!
gNB
->
srs_pdu_list
[
num_srs
].
reported_symbol_list
)
{
gNB
->
srs_pdu_list
[
num_srs
].
reported_symbol_list
=
(
nfapi_nr_srs_indication_reported_symbol_t
*
)
calloc
(
1
,
gNB
->
srs_pdu_list
[
num_srs
].
num_reported_symbols
*
sizeof
(
nfapi_nr_srs_indication_reported_symbol_t
));
nfapi_nr_srs_indication_pdu_t
*
srs_indication
=
&
gNB
->
srs_pdu_list
[
gNB
->
UL_INFO
.
srs_ind
.
number_of_pdus
];
srs_indication
->
handle
=
srs_pdu
->
handle
;
srs_indication
->
rnti
=
srs_pdu
->
rnti
;
srs_indication
->
timing_advance
=
srs_est
>=
0
?
nr_est_timing_advance_srs
(
frame_parms
,
srs_estimated_channel_time
[
0
])
:
0xFFFF
;
srs_indication
->
num_symbols
=
1
<<
srs_pdu
->
num_symbols
;
srs_indication
->
wide_band_snr
=
srs_est
>=
0
?
(
snr
+
64
)
<<
1
:
0xFF
;
// 0xFF will be set if this field is invalid
srs_indication
->
num_reported_symbols
=
1
<<
srs_pdu
->
num_symbols
;
if
(
!
srs_indication
->
reported_symbol_list
)
{
srs_indication
->
reported_symbol_list
=
(
nfapi_nr_srs_indication_reported_symbol_t
*
)
calloc
(
1
,
srs_indication
->
num_reported_symbols
*
sizeof
(
nfapi_nr_srs_indication_reported_symbol_t
));
}
fill_srs_reported_symbol_list
(
&
gNB
->
srs_pdu_list
[
num_srs
].
reported_symbol_list
[
0
],
srs_pdu
,
frame_parms
->
N_RB_UL
,
snr_per_rb
,
srs_est
);
fill_srs_reported_symbol_list
(
&
srs_indication
->
reported_symbol_list
[
0
],
srs_pdu
,
frame_parms
->
N_RB_UL
,
snr_per_rb
,
srs_est
);
gNB
->
UL_INFO
.
srs_ind
.
number_of_pdus
+=
1
;
...
...
@@ -880,9 +890,8 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
LOG_I
(
NR_PHY
,
"gNB->srs_pdu_list[%i].wide_band_snr = %i
\n
"
,
num_srs
,
gNB
->
srs_pdu_list
[
num_srs
].
wide_band_snr
);
LOG_I
(
NR_PHY
,
"gNB->srs_pdu_list[%i].num_reported_symbols = %i
\n
"
,
num_srs
,
gNB
->
srs_pdu_list
[
num_srs
].
num_reported_symbols
);
LOG_I
(
NR_PHY
,
"gNB->srs_pdu_list[%i].reported_symbol_list[0].num_rbs = %i
\n
"
,
num_srs
,
gNB
->
srs_pdu_list
[
num_srs
].
reported_symbol_list
[
0
].
num_rbs
);
for
(
int
rb
=
0
;
rb
<
gNB
->
srs_pdu_list
[
num_srs
].
reported_symbol_list
[
0
].
num_rbs
;
rb
++
)
{
LOG_I
(
NR_PHY
,
"gNB->srs_pdu_list[%i].reported_symbol_list[0].rb_list[%3i].rb_snr = %i
\n
"
,
num_srs
,
rb
,
gNB
->
srs_pdu_list
[
num_srs
].
reported_symbol_list
[
0
].
rb_list
[
rb
].
rb_snr
);
for
(
int
rb
=
0
;
rb
<
gNB
->
srs_pdu_list
[
num_srs
].
reported_symbol_list
[
0
].
num_rbs
;
rb
++
)
{
LOG_I
(
NR_PHY
,
"gNB->srs_pdu_list[%i].reported_symbol_list[0].rb_list[%3i].rb_snr = %i
\n
"
,
num_srs
,
rb
,
gNB
->
srs_pdu_list
[
num_srs
].
reported_symbol_list
[
0
].
rb_list
[
rb
].
rb_snr
);
}
#endif
...
...
openair2/GNB_APP/L1_nr_paramdef.h
View file @
0eed3534
...
...
@@ -51,6 +51,7 @@
#define CONFIG_STRING_L1_PUCCH0_DTX_THRESHOLD "pucch0_dtx_threshold"
#define CONFIG_STRING_L1_PRACH_DTX_THRESHOLD "prach_dtx_threshold"
#define CONFIG_STRING_L1_PUSCH_DTX_THRESHOLD "pusch_dtx_threshold"
#define CONFIG_STRING_L1_SRS_DTX_THRESHOLD "srs_dtx_threshold"
#define CONFIG_STRING_L1_MAX_LDPC_ITERATIONS "max_ldpc_iterations"
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/
/* L1 configuration parameters */
...
...
@@ -71,6 +72,7 @@
{CONFIG_STRING_L1_PUCCH0_DTX_THRESHOLD, NULL, 0, uptr:NULL, defintval:100, TYPE_UINT, 0}, \
{CONFIG_STRING_L1_PRACH_DTX_THRESHOLD, NULL, 0, uptr:NULL, defintval:150, TYPE_UINT, 0}, \
{CONFIG_STRING_L1_PUSCH_DTX_THRESHOLD, NULL, 0, uptr:NULL, defintval:50, TYPE_UINT, 0}, \
{CONFIG_STRING_L1_SRS_DTX_THRESHOLD, NULL, 0, uptr:NULL, defintval:50, TYPE_UINT, 0}, \
{CONFIG_STRING_L1_MAX_LDPC_ITERATIONS, NULL, 0, uptr:NULL, defintval:5, TYPE_UINT, 0}, \
}
#define L1_CC_IDX 0
...
...
@@ -87,7 +89,8 @@
#define L1_PUCCH0_DTX_THRESHOLD 11
#define L1_PRACH_DTX_THRESHOLD 12
#define L1_PUSCH_DTX_THRESHOLD 13
#define L1_MAX_LDPC_ITERATIONS 14
#define L1_SRS_DTX_THRESHOLD 14
#define L1_MAX_LDPC_ITERATIONS 15
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/
#endif
openair2/GNB_APP/gnb_config.c
View file @
0eed3534
...
...
@@ -731,6 +731,7 @@ void RCconfig_NR_L1(void) {
RC
.
gNB
[
j
]
->
pucch0_thres
=
*
(
L1_ParamList
.
paramarray
[
j
][
L1_PUCCH0_DTX_THRESHOLD
].
uptr
);
RC
.
gNB
[
j
]
->
prach_thres
=
*
(
L1_ParamList
.
paramarray
[
j
][
L1_PRACH_DTX_THRESHOLD
].
uptr
);
RC
.
gNB
[
j
]
->
pusch_thres
=
*
(
L1_ParamList
.
paramarray
[
j
][
L1_PUSCH_DTX_THRESHOLD
].
uptr
);
RC
.
gNB
[
j
]
->
srs_thres
=
*
(
L1_ParamList
.
paramarray
[
j
][
L1_SRS_DTX_THRESHOLD
].
uptr
);
RC
.
gNB
[
j
]
->
max_ldpc_iterations
=
*
(
L1_ParamList
.
paramarray
[
j
][
L1_MAX_LDPC_ITERATIONS
].
uptr
);
RC
.
gNB
[
j
]
->
num_ulprbbl
=
num_prbbl
;
RC
.
gNB
[
j
]
->
ap_N1
=
N1
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
0eed3534
...
...
@@ -795,8 +795,8 @@ void handle_nr_srs_measurements(const module_id_t module_id,
const
uint8_t
num_symbols
,
const
uint8_t
wide_band_snr
,
const
uint8_t
num_reported_symbols
,
nfapi_nr_srs_indication_reported_symbol_t
*
reported_symbol_list
)
{
nfapi_nr_srs_indication_reported_symbol_t
*
reported_symbol_list
)
{
LOG_D
(
NR_MAC
,
"(%d.%d) Received SRS indication for rnti: 0x%04x
\n
"
,
frame
,
slot
,
rnti
);
#ifdef SRS_IND_DEBUG
...
...
@@ -805,32 +805,39 @@ void handle_nr_srs_measurements(const module_id_t module_id,
LOG_I
(
NR_MAC
,
"rnti = 0x%04x
\n
"
,
rnti
);
LOG_I
(
NR_MAC
,
"timing_advance = %i
\n
"
,
timing_advance
);
LOG_I
(
NR_MAC
,
"num_symbols = %i
\n
"
,
num_symbols
);
LOG_I
(
NR_MAC
,
"wide_band_snr = %i (%i dB)
\n
"
,
wide_band_snr
,
(
wide_band_snr
>>
1
)
-
64
);
LOG_I
(
NR_MAC
,
"wide_band_snr = %i (%i dB)
\n
"
,
wide_band_snr
,
(
wide_band_snr
>>
1
)
-
64
);
LOG_I
(
NR_MAC
,
"num_reported_symbols = %i
\n
"
,
num_reported_symbols
);
LOG_I
(
NR_MAC
,
"reported_symbol_list[0].num_rbs = %i
\n
"
,
reported_symbol_list
[
0
].
num_rbs
);
for
(
int
rb
=
0
;
rb
<
reported_symbol_list
[
0
].
num_rbs
;
rb
++
)
{
LOG_I
(
NR_MAC
,
"reported_symbol_list[0].rb_list[%3i].rb_snr = %i (%i dB)
\n
"
,
rb
,
reported_symbol_list
[
0
].
rb_list
[
rb
].
rb_snr
,
(
reported_symbol_list
[
0
].
rb_list
[
rb
].
rb_snr
>>
1
)
-
64
);
for
(
int
rb
=
0
;
rb
<
reported_symbol_list
[
0
].
num_rbs
;
rb
++
)
{
LOG_I
(
NR_MAC
,
"reported_symbol_list[0].rb_list[%3i].rb_snr = %i (%i dB)
\n
"
,
rb
,
reported_symbol_list
[
0
].
rb_list
[
rb
].
rb_snr
,
(
reported_symbol_list
[
0
].
rb_list
[
rb
].
rb_snr
>>
1
)
-
64
);
}
#endif
NR_UE_info_t
*
UE
=
find_nr_UE
(
&
RC
.
nrmac
[
module_id
]
->
UE_info
,
rnti
);
if
(
!
UE
)
{
LOG_W
(
NR_MAC
,
"Could not find UE for RNTI 0x%04x
\n
"
,
rnti
);
LOG_E
(
NR_MAC
,
"Could not find UE for RNTI %04x
\n
"
,
rnti
);
return
;
}
if
(
wide_band_snr
==
0xFF
)
{
LOG_W
(
NR_MAC
,
"Invalid wide_band_snr for RNTI %04x
\n
"
,
rnti
);
return
;
}
int
wide_band_snr_dB
=
(
wide_band_snr
>>
1
)
-
64
;
gNB_MAC_INST
*
nr_mac
=
RC
.
nrmac
[
module_id
];
NR_mac_stats_t
*
stats
=
&
UE
->
mac_stats
;
stats
->
srs_wide_band_snr
=
(
wide_band_snr
>>
1
)
-
64
;
stats
->
srs_wide_band_snr
=
wide_band_snr_dB
;
const
int
ul_prbblack_SNR_threshold
=
nr_mac
->
ul_prbblack_SNR_threshold
;
uint16_t
*
ulprbbl
=
nr_mac
->
ulprbbl
;
memset
(
ulprbbl
,
0
,
reported_symbol_list
[
0
].
num_rbs
*
sizeof
(
uint16_t
));
memset
(
ulprbbl
,
0
,
reported_symbol_list
[
0
].
num_rbs
*
sizeof
(
uint16_t
));
for
(
int
rb
=
0
;
rb
<
reported_symbol_list
[
0
].
num_rbs
;
rb
++
)
{
int
snr
=
(
reported_symbol_list
[
0
].
rb_list
[
rb
].
rb_snr
>>
1
)
-
64
;
if
(
snr
<
ul_prbblack_SNR_threshold
)
{
int
snr
=
(
reported_symbol_list
[
0
].
rb_list
[
rb
].
rb_snr
>>
1
)
-
64
;
if
(
snr
<
wide_band_snr_dB
-
ul_prbblack_SNR_threshold
)
{
ulprbbl
[
rb
]
=
0x3FFF
;
// all symbols taken
}
LOG_D
(
NR_MAC
,
"ulprbbl[%3i] = 0x%x
\n
"
,
rb
,
ulprbbl
[
rb
]);
...
...
targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.fr1.273PRB.2x2.usrpn300.conf
View file @
0eed3534
...
...
@@ -19,7 +19,7 @@ gNBs = (
pdsch_AntennaPorts_XP
=
2
;
pusch_AntennaPorts
=
2
;
do_CSIRS
=
1
;
do_SRS
=
0
;
do_SRS
=
1
;
ul_prbblacklist
=
"135,136,137,138"
pdcch_ConfigSIB1
= ({
...
...
targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.2x2.usrpn300.conf
View file @
0eed3534
...
...
@@ -17,7 +17,7 @@ gNBs =
//////////
Physical
parameters
:
pdsch_AntennaPorts_
N1
=
2
;
pdsch_AntennaPorts_
XP
=
2
;
pusch_AntennaPorts
=
2
;
do_CSIRS
=
1
;
do_SRS
=
1
;
...
...
@@ -254,7 +254,6 @@ MACRLCs = (
tr_n_preference
=
"local_RRC"
;
#pusch_TargetSNRx10 = 150;
#pucch_TargetSNRx10 = 200;
ul_prbblack_SNR_threshold
=
10
;
ulsch_max_frame_inactivity
=
0
;
}
);
...
...
targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf
View file @
0eed3534
...
...
@@ -251,7 +251,6 @@ MACRLCs = (
tr_n_preference
=
"local_RRC"
;
pusch_TargetSNRx10
=
150
;
pucch_TargetSNRx10
=
200
;
ul_prbblack_SNR_threshold
=
10
;
ulsch_max_frame_inactivity
=
0
;
}
);
...
...
targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.162PRB.2x2.usrpn300.conf
View file @
0eed3534
...
...
@@ -20,6 +20,7 @@ gNBs =
pdsch_AntennaPorts_XP
=
2
;
pusch_AntennaPorts
=
2
;
do_CSIRS
=
1
;
do_SRS
=
1
;
pdcch_ConfigSIB1
= (
{
...
...
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