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
Michael Black
OpenXG-RAN
Commits
c6fd2419
Commit
c6fd2419
authored
Sep 19, 2022
by
Sakthivel Velumani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove ue->pucch_vars and scheduler call cleanup
parent
0fe3a775
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
82 additions
and
111 deletions
+82
-111
executables/nr-ue.c
executables/nr-ue.c
+42
-43
openair1/PHY/INIT/nr_init_ue.c
openair1/PHY/INIT/nr_init_ue.c
+0
-23
openair1/PHY/NR_UE_TRANSPORT/nr_prach.c
openair1/PHY/NR_UE_TRANSPORT/nr_prach.c
+3
-2
openair1/PHY/defs_nr_UE.h
openair1/PHY/defs_nr_UE.h
+3
-3
openair1/PHY/thread_NR_UE.h
openair1/PHY/thread_NR_UE.h
+3
-0
openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
+1
-1
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
+2
-13
openair1/SCHED_NR_UE/pucch_uci_ue_nr.c
openair1/SCHED_NR_UE/pucch_uci_ue_nr.c
+3
-2
openair1/SCHED_NR_UE/pucch_uci_ue_nr.h
openair1/SCHED_NR_UE/pucch_uci_ue_nr.h
+2
-1
openair2/LAYER2/NR_MAC_UE/mac_proto.h
openair2/LAYER2/NR_MAC_UE/mac_proto.h
+1
-1
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
+2
-2
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
+17
-17
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.h
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.h
+3
-3
No files found.
executables/nr-ue.c
View file @
c6fd2419
...
...
@@ -326,7 +326,7 @@ static void check_nr_prach(NR_UE_MAC_INST_t *mac, nr_uplink_indication_t *ul_inf
{
L1_nsa_prach_procedures
(
ul_info
->
frame_tx
,
ul_info
->
slot_tx
,
prach_pdu
);
ul_config
->
number_pdus
=
0
;
ul_info
->
ue_sched_mode
=
SCHED_
ALL
;
ul_info
->
ue_sched_mode
=
SCHED_
PUSCH
;
}
else
if
(
nr_prach
==
2
)
{
...
...
@@ -426,7 +426,7 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg)
ul_info
.
slot_rx
=
slot
;
ul_info
.
slot_tx
=
(
slot
+
slot_ahead
)
%
slots_per_frame
;
ul_info
.
frame_tx
=
(
ul_info
.
slot_rx
+
slot_ahead
>=
slots_per_frame
)
?
ul_info
.
frame_rx
+
1
:
ul_info
.
frame_rx
;
ul_info
.
ue_sched_mode
=
SCHED_
ALL
;
ul_info
.
ue_sched_mode
=
SCHED_
PUSCH
;
if
(
pthread_mutex_lock
(
&
mac
->
mutex_dl_info
))
abort
();
...
...
@@ -458,7 +458,7 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg)
LOG_D
(
NR_MAC
,
"Slot %d. calling nr_ue_ul_ind() and nr_ue_pucch_scheduler() from %s
\n
"
,
ul_info
.
slot_tx
,
__FUNCTION__
);
nr_ue_scheduler
(
NULL
,
&
ul_info
);
nr_ue_prach_scheduler
(
mod_id
,
ul_info
.
frame_tx
,
ul_info
.
slot_tx
,
ul_info
.
thread_id
);
nr_ue_pucch_scheduler
(
mod_id
,
ul_info
.
frame_tx
,
ul_info
.
slot_tx
,
ul_info
.
thread_id
);
nr_ue_pucch_scheduler
(
mod_id
,
ul_info
.
frame_tx
,
ul_info
.
slot_tx
,
ul_info
.
thread_id
,
NULL
);
check_nr_prach
(
mac
,
&
ul_info
,
&
prach_resources
);
}
if
(
!
IS_SOFTMODEM_NOS1
&&
get_softmodem_params
()
->
sa
)
{
...
...
@@ -610,12 +610,9 @@ void processSlotTX(void *arg) {
nr_rxtx_thread_data_t
*
rxtxD
=
(
nr_rxtx_thread_data_t
*
)
arg
;
UE_nr_rxtx_proc_t
*
proc
=
&
rxtxD
->
proc
;
PHY_VARS_NR_UE
*
UE
=
rxtxD
->
UE
;
fapi_nr_config_request_t
*
cfg
=
&
UE
->
nrUE_config
;
int
tx_slot_type
=
nr_ue_slot_select
(
cfg
,
proc
->
frame_tx
,
proc
->
nr_slot_tx
);
uint8_t
gNB_id
=
0
;
LOG_D
(
PHY
,
"
processSlotTX %d.%d => slot type %d
\n
"
,
proc
->
frame_tx
,
proc
->
nr_slot_tx
,
tx_slot_type
);
if
(
tx_slot_type
==
NR_UPLINK_SLOT
||
tx_slot_type
==
NR_MIXED_SLOT
){
LOG_D
(
PHY
,
"
%d.%d => slot type %d
\n
"
,
proc
->
frame_tx
,
proc
->
nr_slot_tx
,
proc
->
tx_slot_type
);
if
(
proc
->
tx_slot_type
==
NR_UPLINK_SLOT
||
proc
->
tx_slot_type
==
NR_MIXED_SLOT
){
// trigger L2 to run ue_scheduler thru IF module
// [TODO] mapping right after NR initial sync
...
...
@@ -625,7 +622,7 @@ void processSlotTX(void *arg) {
memset
((
void
*
)
&
ul_indication
,
0
,
sizeof
(
ul_indication
));
ul_indication
.
module_id
=
UE
->
Mod_id
;
ul_indication
.
gNB_index
=
gNB_id
;
ul_indication
.
gNB_index
=
proc
->
gNB_id
;
ul_indication
.
cc_id
=
UE
->
CC_id
;
ul_indication
.
frame_rx
=
proc
->
frame_rx
;
ul_indication
.
slot_rx
=
proc
->
nr_slot_rx
;
...
...
@@ -638,20 +635,15 @@ void processSlotTX(void *arg) {
stop_meas
(
&
UE
->
ue_ul_indication_stats
);
}
if
(
rxtxD
->
ue_sched_mode
!=
NOT_PUSCH
)
{
phy_procedures_nrUE_TX
(
UE
,
proc
,
0
);
}
phy_procedures_nrUE_TX
(
UE
,
proc
,
proc
->
gNB_id
);
}
}
void
processSlotRX
(
void
*
arg
)
{
void
UE_processing
(
void
*
arg
)
{
nr_rxtx_thread_data_t
*
rxtxD
=
(
nr_rxtx_thread_data_t
*
)
arg
;
UE_nr_rxtx_proc_t
*
proc
=
&
rxtxD
->
proc
;
PHY_VARS_NR_UE
*
UE
=
rxtxD
->
UE
;
fapi_nr_config_request_t
*
cfg
=
&
UE
->
nrUE_config
;
int
rx_slot_type
=
nr_ue_slot_select
(
cfg
,
proc
->
frame_rx
,
proc
->
nr_slot_rx
);
int
tx_slot_type
=
nr_ue_slot_select
(
cfg
,
proc
->
frame_tx
,
proc
->
nr_slot_tx
);
uint8_t
gNB_id
=
0
;
NR_UE_PDCCH_CONFIG
phy_pdcch_config
=
{
0
};
...
...
@@ -665,7 +657,7 @@ void processSlotRX(void *arg) {
}
}
if
(
rx_slot_type
==
NR_DOWNLINK_SLOT
||
rx_slot_type
==
NR_MIXED_SLOT
){
if
(
proc
->
rx_slot_type
==
NR_DOWNLINK_SLOT
||
proc
->
rx_slot_type
==
NR_MIXED_SLOT
){
if
(
UE
->
if_inst
!=
NULL
&&
UE
->
if_inst
->
dl_indication
!=
NULL
)
{
nr_downlink_indication_t
dl_indication
;
...
...
@@ -695,35 +687,39 @@ void processSlotRX(void *arg) {
if
(
res
==
NULL
)
return
;
// Tpool has been stopped
delNotifiedFIFO_elt
(
res
);
// calling UL_indication to schedule things other than PUSCH (eg, PUCCH)
rxtxD
->
ue_sched_mode
=
NOT_PUSCH
;
processSlotTX
(
rxtxD
);
}
else
{
rxtxD
->
ue_sched_mode
=
SCHED_ALL
;
processSlotTX
(
rxtxD
);
}
if
(
tx_slot_type
==
NR_UPLINK_SLOT
||
tx_slot_type
==
NR_MIXED_SLOT
){
if
(
proc
->
tx_slot_type
==
NR_UPLINK_SLOT
||
proc
->
tx_slot_type
==
NR_MIXED_SLOT
)
{
nr_phy_data_t
phy_data
=
{
0
};
if
(
UE
->
if_inst
!=
NULL
&&
UE
->
if_inst
->
ul_indication
!=
NULL
)
{
nr_uplink_indication_t
ul_indication
;
memset
((
void
*
)
&
ul_indication
,
0
,
sizeof
(
ul_indication
));
ul_indication
.
module_id
=
UE
->
Mod_id
;
ul_indication
.
gNB_index
=
gNB_id
;
ul_indication
.
cc_id
=
UE
->
CC_id
;
ul_indication
.
frame_rx
=
proc
->
frame_rx
;
ul_indication
.
slot_rx
=
proc
->
nr_slot_rx
;
ul_indication
.
frame_tx
=
proc
->
frame_tx
;
ul_indication
.
slot_tx
=
proc
->
nr_slot_tx
;
ul_indication
.
ue_sched_mode
=
SCHED_PUCCH
;
ul_indication
.
phy_data
=
&
phy_data
;
UE
->
if_inst
->
ul_indication
(
&
ul_indication
);
}
if
(
UE
->
UE_mode
[
gNB_id
]
<=
PUSCH
)
{
if
(
get_softmodem_params
()
->
usim_test
==
0
)
{
pucch_procedures_ue_nr
(
UE
,
gNB_id
,
proc
);
}
LOG_D
(
PHY
,
"Sending Uplink data
\n
"
);
nr_ue_pusch_common_procedures
(
UE
,
proc
->
nr_slot_tx
,
&
UE
->
frame_parms
,
UE
->
frame_parms
.
nb_antennas_tx
);
pucch_procedures_ue_nr
(
UE
,
gNB_id
,
proc
,
&
phy_data
);
}
if
(
UE
->
UE_mode
[
gNB_id
]
>
NOT_SYNCHED
&&
UE
->
UE_mode
[
gNB_id
]
<
PUSCH
)
{
nr_ue_prach_procedures
(
UE
,
proc
,
gNB_id
);
}
LOG_D
(
PHY
,
"****** end TX-Chain for AbsSubframe %d.%d ******
\n
"
,
proc
->
frame_tx
,
proc
->
nr_slot_tx
);
LOG_D
(
PHY
,
"Sending Uplink data
\n
"
);
nr_ue_pusch_common_procedures
(
UE
,
proc
->
nr_slot_tx
,
&
UE
->
frame_parms
,
UE
->
frame_parms
.
nb_antennas_tx
);
if
(
UE
->
UE_mode
[
gNB_id
]
>
NOT_SYNCHED
&&
UE
->
UE_mode
[
gNB_id
]
<
PUSCH
)
nr_ue_prach_procedures
(
UE
,
proc
,
proc
->
gNB_id
);
}
ue_ta_procedures
(
UE
,
proc
->
nr_slot_tx
,
proc
->
frame_tx
);
...
...
@@ -832,6 +828,7 @@ void *UE_thread(void *arg) {
openair0_timestamp
timestamp
,
writeTimestamp
;
void
*
rxp
[
NB_ANTENNAS_RX
],
*
txp
[
NB_ANTENNAS_TX
];
int
start_rx_stream
=
0
;
fapi_nr_config_request_t
*
cfg
=
&
UE
->
nrUE_config
;
AssertFatal
(
0
==
openair0_device_load
(
&
(
UE
->
rfdevice
),
&
openair0_cfg
[
0
]),
""
);
UE
->
rfdevice
.
host_type
=
RAU_HOST
;
UE
->
lost_sync
=
0
;
...
...
@@ -854,7 +851,7 @@ void *UE_thread(void *arg) {
int
absolute_slot
=
0
,
decoded_frame_rx
=
INT_MAX
,
trashed_frames
=
0
;
for
(
int
i
=
0
;
i
<
NR_RX_NB_TH
+
1
;
i
++
)
{
// NR_RX_NB_TH working + 1 we are making to be pushed
notifiedFIFO_elt_t
*
newElt
=
newNotifiedFIFO_elt
(
sizeof
(
nr_rxtx_thread_data_t
),
RX_JOB_ID
,
&
nf
,
processSlotRX
);
notifiedFIFO_elt_t
*
newElt
=
newNotifiedFIFO_elt
(
sizeof
(
nr_rxtx_thread_data_t
),
RX_JOB_ID
,
&
nf
,
UE_processing
);
nr_rxtx_thread_data_t
*
curMsg
=
(
nr_rxtx_thread_data_t
*
)
NotifiedFifoData
(
newElt
);
initNotifiedFIFO
(
&
curMsg
->
txFifo
);
pushNotifiedFIFO_nothreadSafe
(
&
freeBlocks
,
newElt
);
...
...
@@ -866,7 +863,7 @@ void *UE_thread(void *arg) {
nb
+=
abortNotifiedFIFOJob
(
&
nf
,
RX_JOB_ID
);
LOG_I
(
PHY
,
"Number of aborted slots %d
\n
"
,
nb
);
for
(
int
i
=
0
;
i
<
nb
;
i
++
)
pushNotifiedFIFO_nothreadSafe
(
&
freeBlocks
,
newNotifiedFIFO_elt
(
sizeof
(
nr_rxtx_thread_data_t
),
RX_JOB_ID
,
&
nf
,
processSlotRX
));
pushNotifiedFIFO_nothreadSafe
(
&
freeBlocks
,
newNotifiedFIFO_elt
(
sizeof
(
nr_rxtx_thread_data_t
),
RX_JOB_ID
,
&
nf
,
UE_processing
));
nbSlotProcessing
=
0
;
UE
->
is_synchronized
=
0
;
UE
->
lost_sync
=
0
;
...
...
@@ -946,6 +943,8 @@ void *UE_thread(void *arg) {
curMsg
->
proc
.
nr_slot_tx
=
(
absolute_slot
+
DURATION_RX_TO_TX
)
%
nb_slot_frame
;
curMsg
->
proc
.
frame_rx
=
(
absolute_slot
/
nb_slot_frame
)
%
MAX_FRAME_NUMBER
;
curMsg
->
proc
.
frame_tx
=
((
absolute_slot
+
DURATION_RX_TO_TX
)
/
nb_slot_frame
)
%
MAX_FRAME_NUMBER
;
curMsg
->
proc
.
rx_slot_type
=
nr_ue_slot_select
(
cfg
,
curMsg
->
proc
.
frame_rx
,
curMsg
->
proc
.
nr_slot_rx
);
curMsg
->
proc
.
tx_slot_type
=
nr_ue_slot_select
(
cfg
,
curMsg
->
proc
.
frame_tx
,
curMsg
->
proc
.
nr_slot_tx
);
curMsg
->
proc
.
decoded_frame_rx
=-
1
;
//LOG_I(PHY,"Process slot %d thread Idx %d total gain %d\n", slot_nr, thread_idx, UE->rx_total_gain_dB);
...
...
openair1/PHY/INIT/nr_init_ue.c
View file @
c6fd2419
...
...
@@ -180,16 +180,6 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB)
// init NR modulation lookup tables
nr_generate_modulation_table
();
/////////////////////////PUCCH init/////////////////////////
///////////
for
(
th_id
=
0
;
th_id
<
RX_NB_TH_MAX
;
th_id
++
)
{
for
(
gNB_id
=
0
;
gNB_id
<
ue
->
n_connected_gNB
;
gNB_id
++
)
{
ue
->
pucch_vars
[
th_id
][
gNB_id
]
=
(
NR_UE_PUCCH
*
)
malloc16
(
sizeof
(
NR_UE_PUCCH
));
for
(
i
=
0
;
i
<
2
;
i
++
)
ue
->
pucch_vars
[
th_id
][
gNB_id
]
->
active
[
i
]
=
false
;
}
}
///////////
////////////////////////////////////////////////////////////////////////////////////////////
...
...
@@ -351,10 +341,6 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB)
ue
->
nr_srs_info
=
(
nr_srs_info_t
*
)
malloc16_clear
(
sizeof
(
nr_srs_info_t
));
// RACH
prach_vars
[
gNB_id
]
->
prachF
=
(
int16_t
*
)
malloc16_clear
(
sizeof
(
int
)
*
(
7
*
2
*
sizeof
(
int
)
*
(
fp
->
ofdm_symbol_size
*
12
))
);
prach_vars
[
gNB_id
]
->
prach
=
(
int16_t
*
)
malloc16_clear
(
sizeof
(
int
)
*
(
7
*
2
*
sizeof
(
int
)
*
(
fp
->
ofdm_symbol_size
*
12
))
);
}
ue
->
sinr_CQI_dB
=
(
double
*
)
malloc16_clear
(
fp
->
N_RB_DL
*
12
*
sizeof
(
double
)
);
...
...
@@ -382,12 +368,6 @@ void term_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB)
const
NR_DL_FRAME_PARMS
*
fp
=
&
ue
->
frame_parms
;
phy_term_nr_top
();
for
(
int
th_id
=
0
;
th_id
<
RX_NB_TH_MAX
;
th_id
++
)
{
for
(
int
gNB_id
=
0
;
gNB_id
<
ue
->
n_connected_gNB
;
gNB_id
++
)
{
free_and_zero
(
ue
->
pucch_vars
[
th_id
][
gNB_id
]);
}
}
for
(
int
slot
=
0
;
slot
<
fp
->
slots_per_frame
;
slot
++
)
{
for
(
int
symb
=
0
;
symb
<
fp
->
symbols_per_slot
;
symb
++
)
{
for
(
int
q
=
0
;
q
<
NR_NB_NSCID
;
q
++
)
...
...
@@ -468,9 +448,6 @@ void term_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB)
free_and_zero
(
ue
->
srs_vars
[
gNB_id
]);
free_and_zero
(
ue
->
pbch_vars
[
gNB_id
]);
free_and_zero
(
ue
->
prach_vars
[
gNB_id
]
->
prachF
);
free_and_zero
(
ue
->
prach_vars
[
gNB_id
]
->
prach
);
free_and_zero
(
ue
->
prach_vars
[
gNB_id
]);
}
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_prach.c
View file @
c6fd2419
...
...
@@ -67,7 +67,8 @@ int32_t generate_nr_prach(PHY_VARS_NR_UE *ue, uint8_t gNB_id, int frame, uint8_t
uint8_t
Mod_id
,
fd_occasion
,
preamble_index
,
restricted_set
,
not_found
;
uint16_t
rootSequenceIndex
,
prach_fmt_id
,
NCS
,
*
prach_root_sequence_map
,
preamble_offset
=
0
;
uint16_t
preamble_shift
=
0
,
preamble_index0
,
n_shift_ra
,
n_shift_ra_bar
,
d_start
=
INT16_MAX
,
numshift
,
N_ZC
,
u
,
offset
,
offset2
,
first_nonzero_root_idx
;
int16_t
prach_tmp
[(
4688
+
4
*
24576
)
*
4
*
2
]
__attribute__
((
aligned
(
32
)));
int16_t
prach_tmp
[(
4688
+
4
*
24576
)
*
4
*
2
]
__attribute__
((
aligned
(
32
)))
=
{
0
};
int16_t
prachF_tmp
[(
4688
+
4
*
24576
)
*
4
*
2
]
__attribute__
((
aligned
(
32
)))
=
{
0
};
int16_t
Ncp
=
0
,
amp
,
*
prach
,
*
prach2
,
*
prachF
,
*
Xu
;
int32_t
Xu_re
,
Xu_im
;
...
...
@@ -79,8 +80,8 @@ int32_t generate_nr_prach(PHY_VARS_NR_UE *ue, uint8_t gNB_id, int frame, uint8_t
dftlen
=
0
;
first_nonzero_root_idx
=
0
;
prach
=
prach_tmp
;
prachF
=
ue
->
prach_vars
[
gNB_id
]
->
prachF
;
amp
=
ue
->
prach_vars
[
gNB_id
]
->
amp
;
prachF
=
prachF_tmp
;
Mod_id
=
ue
->
Mod_id
;
prach_sequence_length
=
nrUE_config
->
prach_config
.
prach_sequence_length
;
N_ZC
=
(
prach_sequence_length
==
0
)
?
839
:
139
;
...
...
openair1/PHY/defs_nr_UE.h
View file @
c6fd2419
...
...
@@ -586,8 +586,6 @@ typedef struct {
typedef
struct
{
int16_t
amp
;
int16_t
*
prachF
;
int16_t
*
prach
;
fapi_nr_ul_config_prach_pdu
prach_pdu
;
}
NR_UE_PRACH
;
...
...
@@ -716,7 +714,6 @@ typedef struct {
NR_UE_CSI_IM
*
csiim_vars
[
NUMBER_OF_CONNECTED_gNB_MAX
];
NR_UE_CSI_RS
*
csirs_vars
[
NUMBER_OF_CONNECTED_gNB_MAX
];
NR_UE_SRS
*
srs_vars
[
NUMBER_OF_CONNECTED_gNB_MAX
];
NR_UE_PUCCH
*
pucch_vars
[
RX_NB_TH_MAX
][
NUMBER_OF_CONNECTED_gNB_MAX
];
NR_UE_DLSCH_t
*
dlsch
[
RX_NB_TH_MAX
][
NUMBER_OF_CONNECTED_gNB_MAX
][
NR_MAX_NB_LAYERS
>
4
?
2
:
1
];
// two RxTx Threads
NR_UE_ULSCH_t
*
ulsch
[
RX_NB_TH_MAX
][
NUMBER_OF_CONNECTED_gNB_MAX
];
NR_UE_DLSCH_t
*
dlsch_SI
[
NUMBER_OF_CONNECTED_gNB_MAX
];
...
...
@@ -979,6 +976,9 @@ typedef struct {
void
*
scopeData
;
}
PHY_VARS_NR_UE
;
typedef
struct
nr_phy_data_s
{
NR_UE_PUCCH
pucch_vars
;
}
nr_phy_data_t
;
/* this structure is used to pass both UE phy vars and
* proc to the function UE_thread_rxn_txnp4
*/
...
...
openair1/PHY/thread_NR_UE.h
View file @
c6fd2419
...
...
@@ -11,10 +11,13 @@ typedef struct {
/// timestamp transmitted to HW
openair0_timestamp
timestamp_tx
;
//#ifdef UE_NR_PHY_DEMO
int
gNB_id
;
/// NR slot index within frame_tx [0 .. slots_per_frame - 1] to act upon for transmission
int
nr_slot_tx
;
int
rx_slot_type
;
/// NR slot index within frame_rx [0 .. slots_per_frame - 1] to act upon for transmission
int
nr_slot_rx
;
int
tx_slot_type
;
//#endif
/// frame to act upon for transmission
int
frame_tx
;
...
...
openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
View file @
c6fd2419
...
...
@@ -359,7 +359,7 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){
thread_id
=
scheduled_response
->
thread_id
;
NR_UE_DLSCH_t
*
dlsch0
=
NULL
;
NR_UE_ULSCH_t
*
ulsch
=
PHY_vars_UE_g
[
module_id
][
cc_id
]
->
ulsch
[
thread_id
][
0
];
NR_UE_PUCCH
*
pucch_vars
=
PHY_vars_UE_g
[
module_id
][
cc_id
]
->
pucch_vars
[
thread_id
][
0
]
;
NR_UE_PUCCH
*
pucch_vars
=
&
((
nr_phy_data_t
*
)
scheduled_response
->
phy_data
)
->
pucch_vars
;
NR_UE_CSI_IM
*
csiim_vars
=
PHY_vars_UE_g
[
module_id
][
cc_id
]
->
csiim_vars
[
0
];
NR_UE_CSI_RS
*
csirs_vars
=
PHY_vars_UE_g
[
module_id
][
cc_id
]
->
csirs_vars
[
0
];
NR_UE_PDCCH_CONFIG
*
phy_pdcch_config
=
NULL
;
...
...
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
View file @
c6fd2419
...
...
@@ -307,11 +307,10 @@ void phy_procedures_nrUE_TX(PHY_VARS_NR_UE *ue,
if
(
ue
->
UE_mode
[
gNB_id
]
==
PUSCH
)
{
ue_srs_procedures_nr
(
ue
,
proc
,
gNB_id
);
}
LOG_D
(
PHY
,
"****** end TX-Chain for AbsSubframe %d.%d ******
\n
"
,
proc
->
frame_tx
,
proc
->
nr_slot_tx
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX
,
VCD_FUNCTION_OUT
);
stop_meas
(
&
ue
->
phy_proc_tx
);
}
void
nr_ue_measurement_procedures
(
uint16_t
l
,
...
...
@@ -759,16 +758,6 @@ bool nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
if
(
frame_rx
<
*
dlsch_errors
)
*
dlsch_errors
=
0
;
if
(
pdsch
==
RA_PDSCH
)
{
if
(
ue
->
prach_resources
[
gNB_id
]
!=
NULL
)
dlsch0
->
rnti
=
ue
->
prach_resources
[
gNB_id
]
->
ra_RNTI
;
else
{
LOG_E
(
PHY
,
"[UE %d] Frame %d, nr_slot_rx %d: FATAL, prach_resources is NULL
\n
"
,
ue
->
Mod_id
,
frame_rx
,
nr_slot_rx
);
//mac_xface->macphy_exit("prach_resources is NULL");
return
false
;
}
}
// exit dlsch procedures as there are no active dlsch
if
(
is_cw0_active
!=
ACTIVE
&&
is_cw1_active
!=
ACTIVE
)
return
false
;
...
...
@@ -1519,7 +1508,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
nr_rxtx_thread_data_t
*
curMsg
=
(
nr_rxtx_thread_data_t
*
)
NotifiedFifoData
(
newElt
);
curMsg
->
proc
=
*
proc
;
curMsg
->
UE
=
ue
;
curMsg
->
ue_sched_mode
=
ONLY
_PUSCH
;
curMsg
->
ue_sched_mode
=
SCHED
_PUSCH
;
pushTpool
(
&
(
get_nrUE_params
()
->
Tpool
),
newElt
);
start_meas
(
&
ue
->
generic_stat
);
// do procedures for C-RNTI
...
...
openair1/SCHED_NR_UE/pucch_uci_ue_nr.c
View file @
c6fd2419
...
...
@@ -203,11 +203,12 @@ void nr_generate_pucch3_4(int32_t **txdataF,
void
pucch_procedures_ue_nr
(
PHY_VARS_NR_UE
*
ue
,
uint8_t
gNB_id
,
UE_nr_rxtx_proc_t
*
proc
)
{
UE_nr_rxtx_proc_t
*
proc
,
nr_phy_data_t
*
phy_data
)
{
int
nr_slot_tx
=
proc
->
nr_slot_tx
;
fapi_nr_ul_config_pucch_pdu
*
pucch_pdu
;
NR_UE_PUCCH
*
pucch_vars
=
ue
->
pucch_vars
[
proc
->
thread_id
][
gNB_id
]
;
NR_UE_PUCCH
*
pucch_vars
=
&
phy_data
->
pucch_vars
;
for
(
int
i
=
0
;
i
<
2
;
i
++
)
{
if
(
pucch_vars
->
active
[
i
])
{
...
...
openair1/SCHED_NR_UE/pucch_uci_ue_nr.h
View file @
c6fd2419
...
...
@@ -61,7 +61,8 @@
void
pucch_procedures_ue_nr
(
PHY_VARS_NR_UE
*
ue
,
uint8_t
gNB_id
,
UE_nr_rxtx_proc_t
*
proc
);
UE_nr_rxtx_proc_t
*
proc
,
nr_phy_data_t
*
phy_data
);
void
set_csi_nr
(
int
csi_status
,
uint32_t
csi_payload
);
...
...
openair2/LAYER2/NR_MAC_UE/mac_proto.h
View file @
c6fd2419
...
...
@@ -357,7 +357,7 @@ and fills the PRACH PDU per each FD occasion.
@returns void
*/
void
nr_ue_prach_scheduler
(
module_id_t
module_idP
,
frame_t
frameP
,
sub_frame_t
slotP
,
int
thread_id
);
void
nr_ue_pucch_scheduler
(
module_id_t
module_idP
,
frame_t
frameP
,
int
slotP
,
int
thread_id
);
void
nr_ue_pucch_scheduler
(
module_id_t
module_idP
,
frame_t
frameP
,
int
slotP
,
int
thread_id
,
void
*
phy_data
);
void
nr_schedule_csirs_reception
(
NR_UE_MAC_INST_t
*
mac
,
int
frame
,
int
slot
);
void
nr_schedule_csi_for_im
(
NR_UE_MAC_INST_t
*
mac
,
int
frame
,
int
slot
);
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
View file @
c6fd2419
...
...
@@ -2318,7 +2318,7 @@ void build_ssb_to_ro_map(NR_UE_MAC_INST_t *mac) {
}
void
nr_ue_pucch_scheduler
(
module_id_t
module_idP
,
frame_t
frameP
,
int
slotP
,
int
thread_id
)
{
void
nr_ue_pucch_scheduler
(
module_id_t
module_idP
,
frame_t
frameP
,
int
slotP
,
int
thread_id
,
void
*
phy_data
)
{
NR_UE_MAC_INST_t
*
mac
=
get_mac_inst
(
module_idP
);
int
O_SR
=
0
;
...
...
@@ -2410,7 +2410,7 @@ void nr_ue_pucch_scheduler(module_id_t module_idP, frame_t frameP, int slotP, in
O_SR
,
O_ACK
,
O_CSI
);
LOG_D
(
NR_MAC
,
"Configuring pucch, is_common = %d
\n
"
,
pucch
.
is_common
);
nr_scheduled_response_t
scheduled_response
;
fill_scheduled_response
(
&
scheduled_response
,
NULL
,
ul_config
,
NULL
,
module_idP
,
0
/*TBR fix*/
,
frameP
,
slotP
,
thread_id
,
NULL
);
fill_scheduled_response
(
&
scheduled_response
,
NULL
,
ul_config
,
NULL
,
module_idP
,
0
/*TBR fix*/
,
frameP
,
slotP
,
thread_id
,
phy_data
);
if
(
mac
->
if_module
!=
NULL
&&
mac
->
if_module
->
scheduled_response
!=
NULL
)
mac
->
if_module
->
scheduled_response
(
&
scheduled_response
);
}
...
...
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
View file @
c6fd2419
...
...
@@ -762,7 +762,7 @@ void check_and_process_dci(nfapi_nr_dl_tti_request_t *dl_tti_request,
ul_info
.
slot_rx
=
slot
;
ul_info
.
slot_tx
=
(
slot
+
slot_ahead
)
%
slots_per_frame
;
ul_info
.
frame_tx
=
(
ul_info
.
slot_rx
+
slot_ahead
>=
slots_per_frame
)
?
ul_info
.
frame_rx
+
1
:
ul_info
.
frame_rx
;
ul_info
.
ue_sched_mode
=
SCHED_
ALL
;
ul_info
.
ue_sched_mode
=
SCHED_
PUSCH
;
if
(
mac
->
scc
||
mac
->
scc_SIB
)
{
if
(
is_nr_UL_slot
(
mac
->
scc
?
...
...
@@ -1129,24 +1129,24 @@ int nr_ue_ul_indication(nr_uplink_indication_t *ul_info){
module_id_t
module_id
=
ul_info
->
module_id
;
NR_UE_MAC_INST_t
*
mac
=
get_mac_inst
(
module_id
);
if
(
ul_info
->
ue_sched_mode
==
ONLY_PUSCH
)
{
ret
=
nr_ue_scheduler
(
NULL
,
ul_info
);
return
0
;
}
if
(
ul_info
->
ue_sched_mode
==
SCHED_ALL
)
{
ret
=
nr_ue_scheduler
(
NULL
,
ul_info
);
}
else
LOG_T
(
NR_MAC
,
"In %s():%d not calling scheduler. sched mode = %d and mac->ra.ra_state = %d
\n
"
,
__FUNCTION__
,
__LINE__
,
ul_info
->
ue_sched_mode
,
mac
->
ra
.
ra_state
);
NR_TDD_UL_DL_ConfigCommon_t
*
tdd_UL_DL_ConfigurationCommon
=
mac
->
scc
!=
NULL
?
mac
->
scc
->
tdd_UL_DL_ConfigurationCommon
:
mac
->
scc_SIB
->
tdd_UL_DL_ConfigurationCommon
;
if
(
is_nr_UL_slot
(
tdd_UL_DL_ConfigurationCommon
,
ul_info
->
slot_tx
,
mac
->
frame_type
)
&&
!
get_softmodem_params
()
->
phy_test
)
nr_ue_prach_scheduler
(
module_id
,
ul_info
->
frame_tx
,
ul_info
->
slot_tx
,
ul_info
->
thread_id
);
if
(
is_nr_UL_slot
(
tdd_UL_DL_ConfigurationCommon
,
ul_info
->
slot_tx
,
mac
->
frame_type
))
nr_ue_pucch_scheduler
(
module_id
,
ul_info
->
frame_tx
,
ul_info
->
slot_tx
,
ul_info
->
thread_id
);
switch
(
ul_info
->
ue_sched_mode
)
{
case
SCHED_PUSCH
:
ret
=
nr_ue_scheduler
(
NULL
,
ul_info
);
if
(
is_nr_UL_slot
(
tdd_UL_DL_ConfigurationCommon
,
ul_info
->
slot_tx
,
mac
->
frame_type
)
&&
!
get_softmodem_params
()
->
phy_test
)
nr_ue_prach_scheduler
(
module_id
,
ul_info
->
frame_tx
,
ul_info
->
slot_tx
,
ul_info
->
thread_id
);
LOG_T
(
NR_MAC
,
"In %s():%d not calling scheduler. sched mode = %d and mac->ra.ra_state = %d
\n
"
,
__FUNCTION__
,
__LINE__
,
ul_info
->
ue_sched_mode
,
mac
->
ra
.
ra_state
);
break
;
case
SCHED_PUCCH
:
if
(
is_nr_UL_slot
(
tdd_UL_DL_ConfigurationCommon
,
ul_info
->
slot_tx
,
mac
->
frame_type
))
nr_ue_pucch_scheduler
(
module_id
,
ul_info
->
frame_tx
,
ul_info
->
slot_tx
,
ul_info
->
thread_id
,
ul_info
->
phy_data
);
LOG_T
(
NR_MAC
,
"In %s():%d not calling scheduler. sched mode = %d and mac->ra.ra_state = %d
\n
"
,
__FUNCTION__
,
__LINE__
,
ul_info
->
ue_sched_mode
,
mac
->
ra
.
ra_state
);
break
;
}
switch
(
ret
){
case
UE_CONNECTION_OK
:
...
...
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.h
View file @
c6fd2419
...
...
@@ -47,9 +47,8 @@ extern slot_rnti_mcs_s slot_rnti_mcs[NUM_NFAPI_SLOT];
typedef
struct
NR_UL_TIME_ALIGNMENT
NR_UL_TIME_ALIGNMENT_t
;
typedef
enum
{
ONLY_PUSCH
,
NOT_PUSCH
,
SCHED_ALL
,
SCHED_PUSCH
,
SCHED_PUCCH
,
}
NR_UE_SCHED_MODE_t
;
typedef
struct
{
...
...
@@ -118,6 +117,7 @@ typedef struct {
fapi_nr_dci_indication_t
*
dci_ind
;
NR_UE_SCHED_MODE_t
ue_sched_mode
;
void
*
phy_data
;
}
nr_uplink_indication_t
;
...
...
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