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
e198b741
Commit
e198b741
authored
Jun 15, 2023
by
francescomani
Committed by
Laurent THOMAS
Jul 13, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes running FR2 test with sanitize
parent
cf387a48
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
37 additions
and
28 deletions
+37
-28
executables/nr-gnb.c
executables/nr-gnb.c
+18
-11
executables/nr-ru.c
executables/nr-ru.c
+7
-4
openair1/PHY/INIT/nr_parms.c
openair1/PHY/INIT/nr_parms.c
+1
-1
openair1/PHY/MODULATION/slot_fep_nr.c
openair1/PHY/MODULATION/slot_fep_nr.c
+1
-1
openair2/LAYER2/NR_MAC_UE/config_ue.c
openair2/LAYER2/NR_MAC_UE/config_ue.c
+3
-3
openair2/LAYER2/NR_MAC_gNB/config.c
openair2/LAYER2/NR_MAC_gNB/config.c
+3
-3
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
+2
-3
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
+2
-2
No files found.
executables/nr-gnb.c
View file @
e198b741
...
@@ -112,25 +112,28 @@ time_stats_t softmodem_stats_rx_sf; // total rx time
...
@@ -112,25 +112,28 @@ time_stats_t softmodem_stats_rx_sf; // total rx time
void
tx_func
(
void
*
param
)
void
tx_func
(
void
*
param
)
{
{
processingData_L1tx_t
*
info
=
(
processingData_L1tx_t
*
)
param
;
processingData_L1tx_t
*
info
=
(
processingData_L1tx_t
*
)
param
;
PHY_VARS_gNB
*
gNB
=
info
->
gNB
;
int
frame_tx
=
info
->
frame
;
int
frame_tx
=
info
->
frame
;
int
slot_tx
=
info
->
slot
;
int
slot_tx
=
info
->
slot
;
int
cumul_samples
=
gNB
->
frame_parms
.
get_samples_per_slot
(
0
,
&
gNB
->
frame_parms
);
int
absslot_tx
=
info
->
timestamp_tx
/
info
->
gNB
->
frame_parms
.
get_samples_per_slot
(
slot_tx
,
&
info
->
gNB
->
frame_parms
);
int
i
=
0
;
int
absslot_rx
=
absslot_tx
-
info
->
gNB
->
RU_list
[
0
]
->
sl_ahead
;
for
(
i
=
1
;
i
<
gNB
->
frame_parms
.
slots_per_subframe
/
2
;
i
++
)
cumul_samples
+=
gNB
->
frame_parms
.
get_samples_per_slot
(
i
,
&
gNB
->
frame_parms
);
int
samples
=
cumul_samples
/
(
i
+
1
);
int
absslot_tx
=
info
->
timestamp_tx
/
samples
;
int
absslot_rx
=
absslot_tx
-
gNB
->
RU_list
[
0
]
->
sl_ahead
;
int
rt_prof_idx
=
absslot_rx
%
RT_PROF_DEPTH
;
int
rt_prof_idx
=
absslot_rx
%
RT_PROF_DEPTH
;
start_meas
(
&
info
->
gNB
->
phy_proc_tx
);
start_meas
(
&
gNB
->
phy_proc_tx
);
clock_gettime
(
CLOCK_MONOTONIC
,
&
info
->
gNB
->
rt_L1_profiling
.
start_L1_TX
[
rt_prof_idx
]);
clock_gettime
(
CLOCK_MONOTONIC
,
&
gNB
->
rt_L1_profiling
.
start_L1_TX
[
rt_prof_idx
]);
phy_procedures_gNB_TX
(
info
,
phy_procedures_gNB_TX
(
info
,
frame_tx
,
frame_tx
,
slot_tx
,
slot_tx
,
1
);
1
);
clock_gettime
(
CLOCK_MONOTONIC
,
&
info
->
gNB
->
rt_L1_profiling
.
return_L1_TX
[
rt_prof_idx
]);
clock_gettime
(
CLOCK_MONOTONIC
,
&
gNB
->
rt_L1_profiling
.
return_L1_TX
[
rt_prof_idx
]);
if
(
get_softmodem_params
()
->
reorder_thread_disable
)
{
if
(
get_softmodem_params
()
->
reorder_thread_disable
)
{
PHY_VARS_gNB
*
gNB
=
info
->
gNB
;
processingData_RU_t
syncMsgRU
;
processingData_RU_t
syncMsgRU
;
syncMsgRU
.
frame_tx
=
frame_tx
;
syncMsgRU
.
frame_tx
=
frame_tx
;
syncMsgRU
.
slot_tx
=
slot_tx
;
syncMsgRU
.
slot_tx
=
slot_tx
;
...
@@ -141,7 +144,7 @@ void tx_func(void *param)
...
@@ -141,7 +144,7 @@ void tx_func(void *param)
}
}
/* this thread is done with the sched_info, decrease the reference counter */
/* this thread is done with the sched_info, decrease the reference counter */
deref_sched_response
(
info
->
sched_response_id
);
deref_sched_response
(
info
->
sched_response_id
);
stop_meas
(
&
info
->
gNB
->
phy_proc_tx
);
stop_meas
(
&
gNB
->
phy_proc_tx
);
}
}
...
@@ -180,10 +183,14 @@ void rx_func(void *param)
...
@@ -180,10 +183,14 @@ void rx_func(void *param)
int
slot_tx
=
info
->
slot_tx
;
int
slot_tx
=
info
->
slot_tx
;
nfapi_nr_config_request_scf_t
*
cfg
=
&
gNB
->
gNB_config
;
nfapi_nr_config_request_scf_t
*
cfg
=
&
gNB
->
gNB_config
;
int
absslot_tx
=
info
->
timestamp_tx
/
gNB
->
frame_parms
.
get_samples_per_slot
(
slot_rx
,
&
gNB
->
frame_parms
);
int
cumul_samples
=
gNB
->
frame_parms
.
get_samples_per_slot
(
0
,
&
gNB
->
frame_parms
);
int
i
=
0
;
for
(
i
=
1
;
i
<
gNB
->
frame_parms
.
slots_per_subframe
/
2
;
i
++
)
cumul_samples
+=
gNB
->
frame_parms
.
get_samples_per_slot
(
i
,
&
gNB
->
frame_parms
);
int
samples
=
cumul_samples
/
(
i
+
1
);
int
absslot_tx
=
info
->
timestamp_tx
/
samples
;
int
absslot_rx
=
absslot_tx
-
gNB
->
RU_list
[
0
]
->
sl_ahead
;
int
absslot_rx
=
absslot_tx
-
gNB
->
RU_list
[
0
]
->
sl_ahead
;
int
rt_prof_idx
=
absslot_rx
%
RT_PROF_DEPTH
;
int
rt_prof_idx
=
absslot_rx
%
RT_PROF_DEPTH
;
clock_gettime
(
CLOCK_MONOTONIC
,
&
info
->
gNB
->
rt_L1_profiling
.
start_L1_RX
[
rt_prof_idx
]);
clock_gettime
(
CLOCK_MONOTONIC
,
&
info
->
gNB
->
rt_L1_profiling
.
start_L1_RX
[
rt_prof_idx
]);
start_meas
(
&
softmodem_stats_rxtx_sf
);
start_meas
(
&
softmodem_stats_rxtx_sf
);
...
...
executables/nr-ru.c
View file @
e198b741
...
@@ -1015,10 +1015,13 @@ void ru_tx_func(void *param) {
...
@@ -1015,10 +1015,13 @@ void ru_tx_func(void *param) {
int
print_frame
=
8
;
int
print_frame
=
8
;
char
filename
[
40
];
char
filename
[
40
];
int
cumul_samples
=
fp
->
get_samples_per_slot
(
0
,
fp
);
// note that this will break for 60/120 kHz, to be handled
int
i
=
0
;
int
absslot_tx
=
info
->
timestamp_tx
/
fp
->
get_samples_per_slot
(
slot_tx
,
fp
);
for
(
i
=
1
;
i
<
fp
->
slots_per_subframe
/
2
;
i
++
)
int
absslot_rx
=
absslot_tx
-
ru
->
sl_ahead
;
cumul_samples
+=
fp
->
get_samples_per_slot
(
i
,
fp
);
int
samples
=
cumul_samples
/
(
i
+
1
);
int
absslot_tx
=
info
->
timestamp_tx
/
samples
;
int
absslot_rx
=
absslot_tx
-
ru
->
sl_ahead
;
int
rt_prof_idx
=
absslot_rx
%
RT_PROF_DEPTH
;
int
rt_prof_idx
=
absslot_rx
%
RT_PROF_DEPTH
;
clock_gettime
(
CLOCK_MONOTONIC
,
&
ru
->
rt_ru_profiling
.
start_RU_TX
[
rt_prof_idx
]);
clock_gettime
(
CLOCK_MONOTONIC
,
&
ru
->
rt_ru_profiling
.
start_RU_TX
[
rt_prof_idx
]);
// do TX front-end processing if needed (precoding and/or IDFTs)
// do TX front-end processing if needed (precoding and/or IDFTs)
...
...
openair1/PHY/INIT/nr_parms.c
View file @
e198b741
...
@@ -180,7 +180,7 @@ uint32_t get_samples_per_slot(int slot, NR_DL_FRAME_PARMS* fp)
...
@@ -180,7 +180,7 @@ uint32_t get_samples_per_slot(int slot, NR_DL_FRAME_PARMS* fp)
if
(
fp
->
numerology_index
==
0
)
if
(
fp
->
numerology_index
==
0
)
samp_count
=
fp
->
samples_per_subframe
;
samp_count
=
fp
->
samples_per_subframe
;
else
else
samp_count
=
(
slot
%
(
fp
->
slots_per_subframe
/
2
))
?
fp
->
samples_per_slotN0
:
fp
->
samples_per_slot0
;
samp_count
=
(
slot
%
(
fp
->
slots_per_subframe
/
2
))
?
fp
->
samples_per_slotN0
:
fp
->
samples_per_slot0
;
return
samp_count
;
return
samp_count
;
}
}
...
...
openair1/PHY/MODULATION/slot_fep_nr.c
View file @
e198b741
...
@@ -229,7 +229,7 @@ int nr_slot_fep_ul(NR_DL_FRAME_PARMS *frame_parms,
...
@@ -229,7 +229,7 @@ int nr_slot_fep_ul(NR_DL_FRAME_PARMS *frame_parms,
{
{
unsigned
int
nb_prefix_samples
=
frame_parms
->
nb_prefix_samples
;
unsigned
int
nb_prefix_samples
=
frame_parms
->
nb_prefix_samples
;
unsigned
int
nb_prefix_samples0
=
frame_parms
->
nb_prefix_samples0
;
unsigned
int
nb_prefix_samples0
=
frame_parms
->
nb_prefix_samples0
;
dft_size_idx_t
dftsize
=
get_dft
(
frame_parms
->
ofdm_symbol_size
);
dft_size_idx_t
dftsize
=
get_dft
(
frame_parms
->
ofdm_symbol_size
);
// This is for misalignment issues
// This is for misalignment issues
int32_t
tmp_dft_in
[
8192
]
__attribute__
((
aligned
(
32
)));
int32_t
tmp_dft_in
[
8192
]
__attribute__
((
aligned
(
32
)));
...
...
openair2/LAYER2/NR_MAC_UE/config_ue.c
View file @
e198b741
...
@@ -355,7 +355,7 @@ void config_common_ue(NR_UE_MAC_INST_t *mac,
...
@@ -355,7 +355,7 @@ void config_common_ue(NR_UE_MAC_INST_t *mac,
switch
(
scc
->
ssb_PositionsInBurst
->
present
)
{
switch
(
scc
->
ssb_PositionsInBurst
->
present
)
{
case
1
:
case
1
:
cfg
->
ssb_table
.
ssb_mask_list
[
0
].
ssb_mask
=
scc
->
ssb_PositionsInBurst
->
choice
.
shortBitmap
.
buf
[
0
]
<<
24
;
cfg
->
ssb_table
.
ssb_mask_list
[
0
].
ssb_mask
=
scc
->
ssb_PositionsInBurst
->
choice
.
shortBitmap
.
buf
[
0
]
<<
24
;
cfg
->
ssb_table
.
ssb_mask_list
[
1
].
ssb_mask
=
0
;
cfg
->
ssb_table
.
ssb_mask_list
[
1
].
ssb_mask
=
0
;
break
;
break
;
case
2
:
case
2
:
...
@@ -366,8 +366,8 @@ void config_common_ue(NR_UE_MAC_INST_t *mac,
...
@@ -366,8 +366,8 @@ void config_common_ue(NR_UE_MAC_INST_t *mac,
cfg
->
ssb_table
.
ssb_mask_list
[
0
].
ssb_mask
=
0
;
cfg
->
ssb_table
.
ssb_mask_list
[
0
].
ssb_mask
=
0
;
cfg
->
ssb_table
.
ssb_mask_list
[
1
].
ssb_mask
=
0
;
cfg
->
ssb_table
.
ssb_mask_list
[
1
].
ssb_mask
=
0
;
for
(
int
i
=
0
;
i
<
4
;
i
++
)
{
for
(
int
i
=
0
;
i
<
4
;
i
++
)
{
cfg
->
ssb_table
.
ssb_mask_list
[
0
].
ssb_mask
+=
(
scc
->
ssb_PositionsInBurst
->
choice
.
longBitmap
.
buf
[
3
-
i
]
<<
i
*
8
);
cfg
->
ssb_table
.
ssb_mask_list
[
0
].
ssb_mask
+=
(
(
uint32_t
)
scc
->
ssb_PositionsInBurst
->
choice
.
longBitmap
.
buf
[
3
-
i
]
<<
i
*
8
);
cfg
->
ssb_table
.
ssb_mask_list
[
1
].
ssb_mask
+=
(
scc
->
ssb_PositionsInBurst
->
choice
.
longBitmap
.
buf
[
7
-
i
]
<<
i
*
8
);
cfg
->
ssb_table
.
ssb_mask_list
[
1
].
ssb_mask
+=
(
(
uint32_t
)
scc
->
ssb_PositionsInBurst
->
choice
.
longBitmap
.
buf
[
7
-
i
]
<<
i
*
8
);
}
}
break
;
break
;
default:
default:
...
...
openair2/LAYER2/NR_MAC_gNB/config.c
View file @
e198b741
...
@@ -331,7 +331,7 @@ static void config_common(gNB_MAC_INST *nrmac, int pdsch_AntennaPorts, int pusch
...
@@ -331,7 +331,7 @@ static void config_common(gNB_MAC_INST *nrmac, int pdsch_AntennaPorts, int pusch
switch
(
scc
->
ssb_PositionsInBurst
->
present
)
{
switch
(
scc
->
ssb_PositionsInBurst
->
present
)
{
case
1
:
case
1
:
cfg
->
ssb_table
.
ssb_mask_list
[
0
].
ssb_mask
.
value
=
scc
->
ssb_PositionsInBurst
->
choice
.
shortBitmap
.
buf
[
0
]
<<
24
;
cfg
->
ssb_table
.
ssb_mask_list
[
0
].
ssb_mask
.
value
=
scc
->
ssb_PositionsInBurst
->
choice
.
shortBitmap
.
buf
[
0
]
<<
24
;
cfg
->
ssb_table
.
ssb_mask_list
[
1
].
ssb_mask
.
value
=
0
;
cfg
->
ssb_table
.
ssb_mask_list
[
1
].
ssb_mask
.
value
=
0
;
break
;
break
;
case
2
:
case
2
:
...
@@ -342,8 +342,8 @@ static void config_common(gNB_MAC_INST *nrmac, int pdsch_AntennaPorts, int pusch
...
@@ -342,8 +342,8 @@ static void config_common(gNB_MAC_INST *nrmac, int pdsch_AntennaPorts, int pusch
cfg
->
ssb_table
.
ssb_mask_list
[
0
].
ssb_mask
.
value
=
0
;
cfg
->
ssb_table
.
ssb_mask_list
[
0
].
ssb_mask
.
value
=
0
;
cfg
->
ssb_table
.
ssb_mask_list
[
1
].
ssb_mask
.
value
=
0
;
cfg
->
ssb_table
.
ssb_mask_list
[
1
].
ssb_mask
.
value
=
0
;
for
(
int
i
=
0
;
i
<
4
;
i
++
)
{
for
(
int
i
=
0
;
i
<
4
;
i
++
)
{
cfg
->
ssb_table
.
ssb_mask_list
[
0
].
ssb_mask
.
value
+=
(
scc
->
ssb_PositionsInBurst
->
choice
.
longBitmap
.
buf
[
3
-
i
]
<<
i
*
8
);
cfg
->
ssb_table
.
ssb_mask_list
[
0
].
ssb_mask
.
value
+=
(
(
uint32_t
)
scc
->
ssb_PositionsInBurst
->
choice
.
longBitmap
.
buf
[
3
-
i
]
<<
i
*
8
);
cfg
->
ssb_table
.
ssb_mask_list
[
1
].
ssb_mask
.
value
+=
(
scc
->
ssb_PositionsInBurst
->
choice
.
longBitmap
.
buf
[
7
-
i
]
<<
i
*
8
);
cfg
->
ssb_table
.
ssb_mask_list
[
1
].
ssb_mask
.
value
+=
(
(
uint32_t
)
scc
->
ssb_PositionsInBurst
->
choice
.
longBitmap
.
buf
[
7
-
i
]
<<
i
*
8
);
}
}
break
;
break
;
default:
default:
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
View file @
e198b741
...
@@ -99,10 +99,9 @@ static void fill_ssb_vrb_map(NR_COMMON_channels_t *cc, int rbStart, int ssb_subc
...
@@ -99,10 +99,9 @@ static void fill_ssb_vrb_map(NR_COMMON_channels_t *cc, int rbStart, int ssb_subc
"240kHZ subcarrier won't work with current VRB map because a single SSB might be across 2 slots
\n
"
);
"240kHZ subcarrier won't work with current VRB map because a single SSB might be across 2 slots
\n
"
);
uint16_t
*
vrb_map
=
cc
[
CC_id
].
vrb_map
;
uint16_t
*
vrb_map
=
cc
[
CC_id
].
vrb_map
;
const
int
extra_prb
=
ssb_subcarrier_offset
>
0
;
const
int
extra_prb
=
ssb_subcarrier_offset
>
0
;
for
(
int
rb
=
0
;
rb
<
20
+
extra_prb
;
rb
++
)
for
(
int
rb
=
0
;
rb
<
20
+
extra_prb
;
rb
++
)
vrb_map
[
rbStart
+
rb
]
=
SL_to_bitmap
(
symStart
,
4
);
vrb_map
[
rbStart
+
rb
]
=
SL_to_bitmap
(
symStart
%
14
,
4
);
}
}
void
schedule_nr_mib
(
module_id_t
module_idP
,
frame_t
frameP
,
sub_frame_t
slotP
,
nfapi_nr_dl_tti_request_t
*
DL_req
)
void
schedule_nr_mib
(
module_id_t
module_idP
,
frame_t
frameP
,
sub_frame_t
slotP
,
nfapi_nr_dl_tti_request_t
*
DL_req
)
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
View file @
e198b741
...
@@ -636,12 +636,12 @@ static void evaluate_rsrp_report(NR_UE_info_t *UE,
...
@@ -636,12 +636,12 @@ static void evaluate_rsrp_report(NR_UE_info_t *UE,
if
(
NR_CSI_ReportConfig__reportQuantity_PR_ssb_Index_RSRP
==
reportQuantity_type
)
{
if
(
NR_CSI_ReportConfig__reportQuantity_PR_ssb_Index_RSRP
==
reportQuantity_type
)
{
sched_ctrl
->
CSI_report
.
ssb_cri_report
.
CRI_SSBRI
[
csi_ssb_idx
]
=
sched_ctrl
->
CSI_report
.
ssb_cri_report
.
CRI_SSBRI
[
csi_ssb_idx
]
=
*
(
csi_report
->
SSB_Index_list
[
cri_ssbri_bitlen
>
0
?
((
curr_payload
)
&~
(
~
1
<<
(
cri_ssbri_bitlen
-
1
)))
:
cri_ssbri_bitlen
]);
*
(
csi_report
->
SSB_Index_list
[
cri_ssbri_bitlen
>
0
?
((
curr_payload
)
&~
(
~
1
U
<<
(
cri_ssbri_bitlen
-
1
)))
:
cri_ssbri_bitlen
]);
LOG_D
(
MAC
,
"SSB_index = %d
\n
"
,
sched_ctrl
->
CSI_report
.
ssb_cri_report
.
CRI_SSBRI
[
csi_ssb_idx
]);
LOG_D
(
MAC
,
"SSB_index = %d
\n
"
,
sched_ctrl
->
CSI_report
.
ssb_cri_report
.
CRI_SSBRI
[
csi_ssb_idx
]);
}
}
else
{
else
{
sched_ctrl
->
CSI_report
.
ssb_cri_report
.
CRI_SSBRI
[
csi_ssb_idx
]
=
sched_ctrl
->
CSI_report
.
ssb_cri_report
.
CRI_SSBRI
[
csi_ssb_idx
]
=
*
(
csi_report
->
CSI_Index_list
[
cri_ssbri_bitlen
>
0
?
((
curr_payload
)
&~
(
~
1
<<
(
cri_ssbri_bitlen
-
1
)))
:
cri_ssbri_bitlen
]);
*
(
csi_report
->
CSI_Index_list
[
cri_ssbri_bitlen
>
0
?
((
curr_payload
)
&~
(
~
1
U
<<
(
cri_ssbri_bitlen
-
1
)))
:
cri_ssbri_bitlen
]);
LOG_D
(
MAC
,
"CSI-RS Resource Indicator = %d
\n
"
,
sched_ctrl
->
CSI_report
.
ssb_cri_report
.
CRI_SSBRI
[
csi_ssb_idx
]);
LOG_D
(
MAC
,
"CSI-RS Resource Indicator = %d
\n
"
,
sched_ctrl
->
CSI_report
.
ssb_cri_report
.
CRI_SSBRI
[
csi_ssb_idx
]);
}
}
*
cumul_bits
+=
cri_ssbri_bitlen
;
*
cumul_bits
+=
cri_ssbri_bitlen
;
...
...
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