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
wangjie
OpenXG-RAN
Commits
b232c434
Commit
b232c434
authored
Mar 16, 2021
by
Mahesh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Uplink improvement
parent
39577ba0
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
172 additions
and
122 deletions
+172
-122
executables/nr-gnb.c
executables/nr-gnb.c
+22
-14
executables/nr-ru.c
executables/nr-ru.c
+7
-1
nfapi/oai_integration/nfapi_pnf.c
nfapi/oai_integration/nfapi_pnf.c
+1
-0
nfapi/open-nFAPI/pnf/src/pnf_p7.c
nfapi/open-nFAPI/pnf/src/pnf_p7.c
+34
-19
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
+4
-4
openair1/PHY/NR_TRANSPORT/pucch_rx.c
openair1/PHY/NR_TRANSPORT/pucch_rx.c
+12
-5
openair1/SCHED_NR/phy_procedures_nr_gNB.c
openair1/SCHED_NR/phy_procedures_nr_gNB.c
+6
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
+74
-67
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
+12
-11
No files found.
executables/nr-gnb.c
View file @
b232c434
...
@@ -253,25 +253,33 @@ static inline int rxtx(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, int frame_t
...
@@ -253,25 +253,33 @@ static inline int rxtx(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, int frame_t
// RX processing
// RX processing
int
tx_slot_type
;
int
rx_slot_type
;
int
tx_slot_type
;
int
rx_slot_type
;
if
(
NFAPI_MODE
==
NFAPI_MODE_VNF
)
{
if
(
NFAPI_MODE
!=
NFAPI_MONOLITHIC
)
{
//slot selection routines not working properly in nfapi, so temporarily hardcoding
if
((
slot_tx
==
8
)
||
(
slot_rx
==
8
)
||
(
slot_tx
==
9
)
||
(
slot_rx
==
9
)
||
(
slot_tx
==
18
)
||
(
slot_rx
==
18
)
||
(
slot_tx
==
19
)
||
(
slot_rx
==
19
))
{
if
((
slot_tx
==
8
)
||
(
slot_tx
==
9
)
||
(
slot_tx
==
18
)
||
(
slot_tx
==
19
))
{
//tx slot config
tx_slot_type
=
NR_UPLINK_SLOT
;
tx_slot_type
=
NR_UPLINK_SLOT
;
rx_slot_type
=
NR_UPLINK_SLOT
;
}
}
else
if
((
slot_tx
==
7
)
||
(
slot_rx
==
7
)
||
(
slot_tx
==
17
)
||
(
slot_r
x
==
17
))
{
else
if
((
slot_tx
==
7
)
||
(
slot_t
x
==
17
))
{
tx_slot_type
=
NR_MIXED_SLOT
;
tx_slot_type
=
NR_MIXED_SLOT
;
}
else
{
tx_slot_type
=
NR_DOWNLINK_SLOT
;;
}
if
((
slot_rx
==
8
)
||
(
slot_rx
==
9
)
||
(
slot_rx
==
18
)
||
(
slot_rx
==
19
))
{
// rx slot config
rx_slot_type
=
NR_UPLINK_SLOT
;
}
else
if
((
slot_rx
==
7
)
||
(
slot_rx
==
17
))
{
rx_slot_type
=
NR_MIXED_SLOT
;
rx_slot_type
=
NR_MIXED_SLOT
;
}
}
else
{
else
{
tx_slot_type
=
NR_DOWNLINK_SLOT
;
rx_slot_type
=
NR_DOWNLINK_SLOT
;;
rx_slot_type
=
NR_DOWNLINK_SLOT
;
}
}
}
}
else
{
else
{
tx_slot_type
=
nr_slot_select
(
cfg
,
frame_tx
,
slot_tx
);
tx_slot_type
=
nr_slot_select
(
cfg
,
frame_tx
,
slot_tx
);
rx_slot_type
=
nr_slot_select
(
cfg
,
frame_rx
,
slot_rx
);
rx_slot_type
=
nr_slot_select
(
cfg
,
frame_rx
,
slot_rx
);
}
}
if
(
rx_slot_type
==
NR_UPLINK_SLOT
||
rx_slot_type
==
NR_MIXED_SLOT
)
{
if
(
rx_slot_type
==
NR_UPLINK_SLOT
||
rx_slot_type
==
NR_MIXED_SLOT
)
{
// UE-specific RX processing for subframe n
// UE-specific RX processing for subframe n
// TODO: check if this is correct for PARALLEL_RU_L1_TRX_SPLIT
// TODO: check if this is correct for PARALLEL_RU_L1_TRX_SPLIT
...
...
executables/nr-ru.c
View file @
b232c434
...
@@ -1607,7 +1607,13 @@ void *ru_thread( void *param ) {
...
@@ -1607,7 +1607,13 @@ void *ru_thread( void *param ) {
// do RX front-end processing (frequency-shift, dft) if needed
// do RX front-end processing (frequency-shift, dft) if needed
int
slot_type
=
nr_slot_select
(
cfg
,
proc
->
frame_rx
,
proc
->
tti_rx
);
//int slot_type = nr_slot_select(cfg,proc->frame_rx,proc->tti_rx);
//if (NFAPI_MODE == NFAPI_MODE_PNF)
int
slot_type
;
if
(
slot
==
7
)
slot_type
=
NR_MIXED_SLOT
;
if
(
slot
==
8
)
slot_type
=
NR_UPLINK_SLOT
;
if
(
slot_type
==
NR_UPLINK_SLOT
||
slot_type
==
NR_MIXED_SLOT
)
{
if
(
slot_type
==
NR_UPLINK_SLOT
||
slot_type
==
NR_MIXED_SLOT
)
{
//if (proc->tti_rx==8) {
//if (proc->tti_rx==8) {
...
...
nfapi/oai_integration/nfapi_pnf.c
View file @
b232c434
...
@@ -1475,6 +1475,7 @@ int pnf_phy_ul_tti_req(gNB_L1_rxtx_proc_t *proc, nfapi_pnf_p7_config_t *pnf_p7,
...
@@ -1475,6 +1475,7 @@ int pnf_phy_ul_tti_req(gNB_L1_rxtx_proc_t *proc, nfapi_pnf_p7_config_t *pnf_p7,
switch
(
ul_tti_pdu_list
[
i
].
pdu_type
)
{
switch
(
ul_tti_pdu_list
[
i
].
pdu_type
)
{
case
NFAPI_NR_UL_CONFIG_PUSCH_PDU_TYPE
:
case
NFAPI_NR_UL_CONFIG_PUSCH_PDU_TYPE
:
//LOG_D(PHY,"frame %d, slot %d, Got NFAPI_NR_UL_TTI_PUSCH_PDU_TYPE for %d.%d\n", frame, slot, UL_tti_req->SFN, UL_tti_req->Slot);
//LOG_D(PHY,"frame %d, slot %d, Got NFAPI_NR_UL_TTI_PUSCH_PDU_TYPE for %d.%d\n", frame, slot, UL_tti_req->SFN, UL_tti_req->Slot);
//curr_sfn = curr_sfn + 3; //Gokul
nr_fill_ulsch
(
gNB
,
curr_sfn
,
curr_slot
,
&
ul_tti_pdu_list
[
i
].
pusch_pdu
);
nr_fill_ulsch
(
gNB
,
curr_sfn
,
curr_slot
,
&
ul_tti_pdu_list
[
i
].
pusch_pdu
);
break
;
break
;
case
NFAPI_NR_UL_CONFIG_PUCCH_PDU_TYPE
:
case
NFAPI_NR_UL_CONFIG_PUCCH_PDU_TYPE
:
...
...
nfapi/open-nFAPI/pnf/src/pnf_p7.c
View file @
b232c434
...
@@ -1026,17 +1026,15 @@ int pnf_p7_slot_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn, uint16_t sl
...
@@ -1026,17 +1026,15 @@ int pnf_p7_slot_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn, uint16_t sl
(
pnf_p7
->
_public
.
tx_data_req_fn
)(
&
(
pnf_p7
->
_public
),
pnf_p7
->
_public
.
dummy_slot
.
tx_data_req
);
(
pnf_p7
->
_public
.
tx_data_req_fn
)(
&
(
pnf_p7
->
_public
),
pnf_p7
->
_public
.
dummy_slot
.
tx_data_req
);
}
}
}
}
//}
if
(
tx_slot_buffer
->
dl_tti_req
!=
0
)
// ADDED & TO BYPASS ERROR
if
(
tx_slot_buffer
->
dl_tti_req
!=
0
)
{
{
if
(
pnf_p7
->
_public
.
dl_tti_req_fn
)
if
(
pnf_p7
->
_public
.
dl_tti_req_fn
)
{
{
(
pnf_p7
->
_public
.
dl_tti_req_fn
)(
NULL
,
&
(
pnf_p7
->
_public
),
tx_slot_buffer
->
dl_tti_req
);
(
pnf_p7
->
_public
.
dl_tti_req_fn
)(
NULL
,
&
(
pnf_p7
->
_public
),
tx_slot_buffer
->
dl_tti_req
);
}
}
}
}
else
else
{
{
// send dummy
// send dummy
...
@@ -1048,6 +1046,7 @@ int pnf_p7_slot_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn, uint16_t sl
...
@@ -1048,6 +1046,7 @@ int pnf_p7_slot_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn, uint16_t sl
}
}
}
}
if
(
tx_slot_buffer
->
ul_dci_req
!=
0
)
if
(
tx_slot_buffer
->
ul_dci_req
!=
0
)
{
{
if
(
pnf_p7
->
_public
.
ul_dci_req_fn
)
if
(
pnf_p7
->
_public
.
ul_dci_req_fn
)
...
@@ -1065,6 +1064,23 @@ int pnf_p7_slot_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn, uint16_t sl
...
@@ -1065,6 +1064,23 @@ int pnf_p7_slot_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn, uint16_t sl
(
pnf_p7
->
_public
.
ul_dci_req_fn
)(
NULL
,
&
(
pnf_p7
->
_public
),
pnf_p7
->
_public
.
dummy_slot
.
ul_dci_req
);
(
pnf_p7
->
_public
.
ul_dci_req_fn
)(
NULL
,
&
(
pnf_p7
->
_public
),
pnf_p7
->
_public
.
dummy_slot
.
ul_dci_req
);
}
}
}
}
if
(
tx_slot_buffer
->
ul_tti_req
!=
0
)
{
if
(
pnf_p7
->
_public
.
ul_tti_req_fn
)
{
(
pnf_p7
->
_public
.
ul_tti_req_fn
)(
NULL
,
&
(
pnf_p7
->
_public
),
tx_slot_buffer
->
ul_tti_req
);
}
}
else
{
// send dummy
if
(
pnf_p7
->
_public
.
ul_tti_req_fn
&&
pnf_p7
->
_public
.
dummy_slot
.
ul_tti_req
)
{
pnf_p7
->
_public
.
dummy_slot
.
ul_tti_req
->
SFN
=
sfn_tx
;
pnf_p7
->
_public
.
dummy_slot
.
ul_tti_req
->
Slot
=
slot_tx
;
(
pnf_p7
->
_public
.
ul_tti_req_fn
)(
NULL
,
&
(
pnf_p7
->
_public
),
pnf_p7
->
_public
.
dummy_slot
.
ul_tti_req
);
}
}
if
(
tx_slot_buffer
->
dl_tti_req
!=
0
)
if
(
tx_slot_buffer
->
dl_tti_req
!=
0
)
{
{
deallocate_nfapi_dl_tti_request
(
tx_slot_buffer
->
dl_tti_req
,
pnf_p7
);
deallocate_nfapi_dl_tti_request
(
tx_slot_buffer
->
dl_tti_req
,
pnf_p7
);
...
@@ -1101,7 +1117,6 @@ int pnf_p7_slot_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn, uint16_t sl
...
@@ -1101,7 +1117,6 @@ int pnf_p7_slot_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn, uint16_t sl
{
{
(
pnf_p7
->
_public
.
ul_tti_req_fn
)(
NULL
,
&
(
pnf_p7
->
_public
),
slot_buffer
->
ul_tti_req
);
(
pnf_p7
->
_public
.
ul_tti_req_fn
)(
NULL
,
&
(
pnf_p7
->
_public
),
slot_buffer
->
ul_tti_req
);
}
}
//deallocate_nfapi_ul_config_request(subframe_buffer->ul_config_req, pnf_p7);
}
}
else
else
{
{
...
...
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
View file @
b232c434
...
@@ -430,14 +430,14 @@ void nr_processULSegment(void* arg) {
...
@@ -430,14 +430,14 @@ void nr_processULSegment(void* arg) {
p_procTime
);
p_procTime
);
if
(
check_crc
((
uint8_t
*
)
llrProcBuf
,
length_dec
,
ulsch_harq
->
F
,
crc_type
))
{
if
(
check_crc
((
uint8_t
*
)
llrProcBuf
,
length_dec
,
ulsch_harq
->
F
,
crc_type
))
{
#ifdef PRINT_CRC_CHECK
//
#ifdef PRINT_CRC_CHECK
LOG_I
(
PHY
,
"Segment %d CRC OK
\n
"
,
r
);
LOG_I
(
PHY
,
"Segment %d CRC OK
\n
"
,
r
);
#endif
//
#endif
rdata
->
decodeIterations
=
no_iteration_ldpc
;
rdata
->
decodeIterations
=
no_iteration_ldpc
;
}
else
{
}
else
{
#ifdef PRINT_CRC_CHECK
//
#ifdef PRINT_CRC_CHECK
LOG_I
(
PHY
,
"CRC NOK
\n
"
);
LOG_I
(
PHY
,
"CRC NOK
\n
"
);
#endif
//
#endif
rdata
->
decodeIterations
=
max_ldpc_iterations
+
1
;
rdata
->
decodeIterations
=
max_ldpc_iterations
+
1
;
}
}
...
...
openair1/PHY/NR_TRANSPORT/pucch_rx.c
View file @
b232c434
...
@@ -47,6 +47,7 @@
...
@@ -47,6 +47,7 @@
#include "PHY/NR_REFSIG/nr_refsig.h"
#include "PHY/NR_REFSIG/nr_refsig.h"
#include "common/utils/LOG/log.h"
#include "common/utils/LOG/log.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "nfapi/oai_integration/vendor_ext.h"
#include "T.h"
#include "T.h"
...
@@ -86,7 +87,8 @@ void nr_fill_pucch(PHY_VARS_gNB *gNB,
...
@@ -86,7 +87,8 @@ void nr_fill_pucch(PHY_VARS_gNB *gNB,
int
frame
,
int
frame
,
int
slot
,
int
slot
,
nfapi_nr_pucch_pdu_t
*
pucch_pdu
)
{
nfapi_nr_pucch_pdu_t
*
pucch_pdu
)
{
if
(
NFAPI_MODE
==
NFAPI_MODE_PNF
)
gNB
->
pucch
[
0
]
->
active
=
0
;
//check if ture in monolithic mode
int
id
=
nr_find_pucch
(
pucch_pdu
->
rnti
,
frame
,
slot
,
gNB
);
int
id
=
nr_find_pucch
(
pucch_pdu
->
rnti
,
frame
,
slot
,
gNB
);
AssertFatal
(
(
id
>=
0
)
&&
(
id
<
NUMBER_OF_NR_PUCCH_MAX
),
AssertFatal
(
(
id
>=
0
)
&&
(
id
<
NUMBER_OF_NR_PUCCH_MAX
),
"invalid id found for pucch !!! rnti %04x id %d
\n
"
,
pucch_pdu
->
rnti
,
id
);
"invalid id found for pucch !!! rnti %04x id %d
\n
"
,
pucch_pdu
->
rnti
,
id
);
...
@@ -164,10 +166,15 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
...
@@ -164,10 +166,15 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
int
slot
,
int
slot
,
nfapi_nr_uci_pucch_pdu_format_0_1_t
*
uci_pdu
,
nfapi_nr_uci_pucch_pdu_format_0_1_t
*
uci_pdu
,
nfapi_nr_pucch_pdu_t
*
pucch_pdu
)
{
nfapi_nr_pucch_pdu_t
*
pucch_pdu
)
{
printf
(
"Inside nr_decode_pucch0.
\n
"
);
int32_t
**
rxdataF
=
gNB
->
common_vars
.
rxdataF
;
int32_t
**
rxdataF
=
gNB
->
common_vars
.
rxdataF
;
NR_DL_FRAME_PARMS
*
frame_parms
=
&
gNB
->
frame_parms
;
NR_DL_FRAME_PARMS
*
frame_parms
=
&
gNB
->
frame_parms
;
//Gokul
// printf("rxdataf buff: \n");
// for(int i = 1;i<=5*7*14*512;++i){
// if(gNB->RU_list[0]->common.rxdataF[0][i] != 0)
// printf("%d ",gNB->RU_list[0]->common.rxdataF[0][i]);
// }
int
nr_sequences
;
int
nr_sequences
;
const
uint8_t
*
mcs
;
const
uint8_t
*
mcs
;
...
@@ -1085,7 +1092,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
...
@@ -1085,7 +1092,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
int
slot
,
int
slot
,
nfapi_nr_uci_pucch_pdu_format_2_3_4_t
*
uci_pdu
,
nfapi_nr_uci_pucch_pdu_format_2_3_4_t
*
uci_pdu
,
nfapi_nr_pucch_pdu_t
*
pucch_pdu
)
{
nfapi_nr_pucch_pdu_t
*
pucch_pdu
)
{
printf
(
"Inside nr_decode_pucch2.
\n
"
);
int32_t
**
rxdataF
=
gNB
->
common_vars
.
rxdataF
;
int32_t
**
rxdataF
=
gNB
->
common_vars
.
rxdataF
;
NR_DL_FRAME_PARMS
*
frame_parms
=
&
gNB
->
frame_parms
;
NR_DL_FRAME_PARMS
*
frame_parms
=
&
gNB
->
frame_parms
;
//pucch_GroupHopping_t pucch_GroupHopping = pucch_pdu->group_hop_flag + (pucch_pdu->sequence_hop_flag<<1);
//pucch_GroupHopping_t pucch_GroupHopping = pucch_pdu->group_hop_flag + (pucch_pdu->sequence_hop_flag<<1);
...
@@ -1465,7 +1472,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
...
@@ -1465,7 +1472,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
}
}
}
// cw loop
}
// cw loop
corr_dB
=
dB_fixed64
((
uint64_t
)
corr
);
corr_dB
=
dB_fixed64
((
uint64_t
)
corr
);
LOG_
D
(
PHY
,
"cw_ML %d, metric %d dB
\n
"
,
cw_ML
,
corr_dB
);
LOG_
I
(
PHY
,
"cw_ML %d, metric %d dB
\n
"
,
cw_ML
,
corr_dB
);
decodedPayload
[
0
]
=
(
uint64_t
)
cw_ML
;
decodedPayload
[
0
]
=
(
uint64_t
)
cw_ML
;
}
}
else
{
// polar coded case
else
{
// polar coded case
...
...
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
b232c434
...
@@ -560,6 +560,8 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx)
...
@@ -560,6 +560,8 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx)
for
(
int
i
=
0
;
i
<
NUMBER_OF_NR_PUCCH_MAX
;
i
++
){
for
(
int
i
=
0
;
i
<
NUMBER_OF_NR_PUCCH_MAX
;
i
++
){
NR_gNB_PUCCH_t
*
pucch
=
gNB
->
pucch
[
i
];
NR_gNB_PUCCH_t
*
pucch
=
gNB
->
pucch
[
i
];
if
(
pucch
)
{
if
(
pucch
)
{
if
(
NFAPI_MODE
==
NFAPI_MODE_PNF
)
pucch
->
frame
=
frame_rx
;
if
((
pucch
->
active
==
1
)
&&
if
((
pucch
->
active
==
1
)
&&
(
pucch
->
frame
==
frame_rx
)
&&
(
pucch
->
frame
==
frame_rx
)
&&
(
pucch
->
slot
==
slot_rx
)
)
{
(
pucch
->
slot
==
slot_rx
)
)
{
...
@@ -620,12 +622,15 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx)
...
@@ -620,12 +622,15 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx)
for
(
harq_pid
=
0
;
harq_pid
<
NR_MAX_ULSCH_HARQ_PROCESSES
;
harq_pid
++
)
{
for
(
harq_pid
=
0
;
harq_pid
<
NR_MAX_ULSCH_HARQ_PROCESSES
;
harq_pid
++
)
{
ulsch_harq
=
ulsch
->
harq_processes
[
harq_pid
];
ulsch_harq
=
ulsch
->
harq_processes
[
harq_pid
];
AssertFatal
(
ulsch_harq
!=
NULL
,
"harq_pid %d is not allocated
\n
"
,
harq_pid
);
AssertFatal
(
ulsch_harq
!=
NULL
,
"harq_pid %d is not allocated
\n
"
,
harq_pid
);
//printf("ulsch_harq->frame = %d, frame_rx = %d \n", ulsch_harq->frame, frame_rx);
if
(
NFAPI_MODE
==
NFAPI_MODE_PNF
)
ulsch_harq
->
frame
=
frame_rx
;
if
((
ulsch_harq
->
status
==
NR_ACTIVE
)
&&
if
((
ulsch_harq
->
status
==
NR_ACTIVE
)
&&
(
ulsch_harq
->
frame
==
frame_rx
)
&&
(
ulsch_harq
->
frame
==
frame_rx
)
&&
(
ulsch_harq
->
slot
==
slot_rx
)
&&
(
ulsch_harq
->
slot
==
slot_rx
)
&&
(
ulsch_harq
->
handled
==
0
)){
(
ulsch_harq
->
handled
==
0
)){
LOG_
D
(
PHY
,
"PUSCH detection started in frame %d slot %d
\n
"
,
LOG_
I
(
PHY
,
"PUSCH detection started in frame %d slot %d
\n
"
,
frame_rx
,
slot_rx
);
frame_rx
,
slot_rx
);
#ifdef DEBUG_RXDATA
#ifdef DEBUG_RXDATA
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
View file @
b232c434
...
@@ -318,13 +318,15 @@ void handle_nr_uci_pucch_0_1(module_id_t mod_id,
...
@@ -318,13 +318,15 @@ void handle_nr_uci_pucch_0_1(module_id_t mod_id,
frame_t
frame
,
frame_t
frame
,
sub_frame_t
slot
,
sub_frame_t
slot
,
const
nfapi_nr_uci_pucch_pdu_format_0_1_t
*
uci_01
)
const
nfapi_nr_uci_pucch_pdu_format_0_1_t
*
uci_01
)
{
{
NR_UE_info_t
*
UE_info
=
&
RC
.
nrmac
[
mod_id
]
->
UE_info
;
UE_info
->
active
[
0
]
=
1
;
UE_info
->
rnti
[
0
]
=
uci_01
->
rnti
;
int
UE_id
=
find_nr_UE_id
(
mod_id
,
uci_01
->
rnti
);
int
UE_id
=
find_nr_UE_id
(
mod_id
,
uci_01
->
rnti
);
if
(
UE_id
<
0
)
{
if
(
UE_id
<
0
)
{
LOG_E
(
MAC
,
"%s(): unknown RNTI %04x in PUCCH UCI
\n
"
,
__func__
,
uci_01
->
rnti
);
LOG_E
(
MAC
,
"%s(): unknown RNTI %04x in PUCCH UCI
\n
"
,
__func__
,
uci_01
->
rnti
);
return
;
return
;
}
}
NR_UE_info_t
*
UE_info
=
&
RC
.
nrmac
[
mod_id
]
->
UE_info
;
//
NR_UE_info_t *UE_info = &RC.nrmac[mod_id]->UE_info;
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
];
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
];
// tpc (power control)
// tpc (power control)
...
@@ -332,51 +334,55 @@ void handle_nr_uci_pucch_0_1(module_id_t mod_id,
...
@@ -332,51 +334,55 @@ void handle_nr_uci_pucch_0_1(module_id_t mod_id,
uci_01
->
ul_cqi
,
uci_01
->
ul_cqi
,
30
);
30
);
NR_ServingCellConfigCommon_t
*
scc
=
RC
.
nrmac
[
mod_id
]
->
common_channels
->
ServingCellConfigCommon
;
// NR_ServingCellConfigCommon_t *scc = RC.nrmac[mod_id]->common_channels->ServingCellConfigCommon;
const
int
num_slots
=
nr_slots_per_frame
[
*
scc
->
ssbSubcarrierSpacing
];
// const int num_slots = nr_slots_per_frame[*scc->ssbSubcarrierSpacing];
if
(((
uci_01
->
pduBitmap
>>
1
)
&
0x01
))
{
const
int
num_slots
=
20
;
// iterate over received harq bits
for
(
int
harq_bit
=
0
;
harq_bit
<
uci_01
->
harq
->
num_harq
;
harq_bit
++
)
{
// if (((uci_01->pduBitmap >> 1) & 0x01)) {
const
uint8_t
harq_value
=
uci_01
->
harq
->
harq_list
[
harq_bit
].
harq_value
;
// // iterate over received harq bits
const
uint8_t
harq_confidence
=
uci_01
->
harq
->
harq_confidence_level
;
// for (int harq_bit = 0; harq_bit < uci_01->harq->num_harq; harq_bit++) {
const
int
feedback_slot
=
(
slot
-
1
+
num_slots
)
%
num_slots
;
// const uint8_t harq_value = uci_01->harq->harq_list[harq_bit].harq_value;
/* In case of realtime problems: we can only identify a HARQ process by
// const uint8_t harq_confidence = uci_01->harq->harq_confidence_level;
* timing. If the HARQ process's feedback_slot is not the one we
// const int feedback_slot = (slot - 1 + num_slots) % num_slots;
* expected, we assume that processing has been aborted and we need to
// /* In case of realtime problems: we can only identify a HARQ process by
* skip this HARQ process, which is what happens in the loop below. If
// * timing. If the HARQ process's feedback_slot is not the one we
* you don't experience real-time problems, you might simply revert the
// * expected, we assume that processing has been aborted and we need to
* commit that introduced these changes. */
// * skip this HARQ process, which is what happens in the loop below. If
int8_t
pid
=
sched_ctrl
->
feedback_dl_harq
.
head
;
// * you don't experience real-time problems, you might simply revert the
DevAssert
(
pid
>=
0
);
// * commit that introduced these changes. */
while
(
sched_ctrl
->
harq_processes
[
pid
].
feedback_slot
!=
feedback_slot
)
{
// int8_t pid = sched_ctrl->feedback_dl_harq.head;
LOG_W
(
MAC
,
// DevAssert(pid >= 0);
"expected feedback slot %d, but found %d instead
\n
"
,
// while (sched_ctrl->harq_processes[pid].feedback_slot != feedback_slot) {
sched_ctrl
->
harq_processes
[
pid
].
feedback_slot
,
// LOG_W(MAC,
feedback_slot
);
// "expected feedback slot %d, but found %d instead\n",
remove_front_nr_list
(
&
sched_ctrl
->
feedback_dl_harq
);
// sched_ctrl->harq_processes[pid].feedback_slot,
handle_dl_harq
(
mod_id
,
UE_id
,
pid
,
0
);
// feedback_slot);
pid
=
sched_ctrl
->
feedback_dl_harq
.
head
;
// remove_front_nr_list(&sched_ctrl->feedback_dl_harq);
DevAssert
(
pid
>=
0
);
// handle_dl_harq(mod_id, UE_id, pid, 0);
}
// pid = sched_ctrl->feedback_dl_harq.head;
remove_front_nr_list
(
&
sched_ctrl
->
feedback_dl_harq
);
// DevAssert(pid >= 0);
NR_UE_harq_t
*
harq
=
&
sched_ctrl
->
harq_processes
[
pid
];
// }
DevAssert
(
harq
->
is_waiting
);
// remove_front_nr_list(&sched_ctrl->feedback_dl_harq);
handle_dl_harq
(
mod_id
,
UE_id
,
pid
,
harq_value
==
1
&&
harq_confidence
==
0
);
// NR_UE_harq_t *harq = &sched_ctrl->harq_processes[pid];
}
// DevAssert(harq->is_waiting);
}
// handle_dl_harq(mod_id, UE_id, pid, harq_value == 1 && harq_confidence == 0);
// }
// }
}
}
void
handle_nr_uci_pucch_2_3_4
(
module_id_t
mod_id
,
void
handle_nr_uci_pucch_2_3_4
(
module_id_t
mod_id
,
frame_t
frame
,
frame_t
frame
,
sub_frame_t
slot
,
sub_frame_t
slot
,
const
nfapi_nr_uci_pucch_pdu_format_2_3_4_t
*
uci_234
)
const
nfapi_nr_uci_pucch_pdu_format_2_3_4_t
*
uci_234
)
{
{
NR_UE_info_t
*
UE_info
=
&
RC
.
nrmac
[
mod_id
]
->
UE_info
;
UE_info
->
active
[
0
]
=
1
;
UE_info
->
rnti
[
0
]
=
uci_234
->
rnti
;
int
UE_id
=
find_nr_UE_id
(
mod_id
,
uci_234
->
rnti
);
int
UE_id
=
find_nr_UE_id
(
mod_id
,
uci_234
->
rnti
);
if
(
UE_id
<
0
)
{
if
(
UE_id
<
0
)
{
LOG_E
(
MAC
,
"%s(): unknown RNTI %04x in PUCCH UCI
\n
"
,
__func__
,
uci_234
->
rnti
);
LOG_E
(
MAC
,
"%s(): unknown RNTI %04x in PUCCH UCI
\n
"
,
__func__
,
uci_234
->
rnti
);
return
;
return
;
}
}
NR_UE_info_t
*
UE_info
=
&
RC
.
nrmac
[
mod_id
]
->
UE_info
;
//
NR_UE_info_t *UE_info = &RC.nrmac[mod_id]->UE_info;
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
];
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
];
// tpc (power control)
// tpc (power control)
...
@@ -384,37 +390,38 @@ void handle_nr_uci_pucch_2_3_4(module_id_t mod_id,
...
@@ -384,37 +390,38 @@ void handle_nr_uci_pucch_2_3_4(module_id_t mod_id,
uci_234
->
ul_cqi
,
uci_234
->
ul_cqi
,
30
);
30
);
NR_ServingCellConfigCommon_t
*
scc
=
RC
.
nrmac
[
mod_id
]
->
common_channels
->
ServingCellConfigCommon
;
// NR_ServingCellConfigCommon_t *scc = RC.nrmac[mod_id]->common_channels->ServingCellConfigCommon;
const
int
num_slots
=
nr_slots_per_frame
[
*
scc
->
ssbSubcarrierSpacing
];
// const int num_slots = nr_slots_per_frame[*scc->ssbSubcarrierSpacing];
if
((
uci_234
->
pduBitmap
>>
1
)
&
0x01
)
{
const
int
num_slots
=
20
;
// iterate over received harq bits
// if ((uci_234->pduBitmap >> 1) & 0x01) {
for
(
int
harq_bit
=
0
;
harq_bit
<
uci_234
->
harq
.
harq_bit_len
;
harq_bit
++
)
{
// // iterate over received harq bits
const
int
acknack
=
((
uci_234
->
harq
.
harq_payload
[
harq_bit
>>
3
])
>>
harq_bit
)
&
0x01
;
// for (int harq_bit = 0; harq_bit < uci_234->harq.harq_bit_len; harq_bit++) {
const
int
feedback_slot
=
(
slot
-
1
+
num_slots
)
%
num_slots
;
// const int acknack = ((uci_234->harq.harq_payload[harq_bit >> 3]) >> harq_bit) & 0x01;
/* In case of realtime problems: we can only identify a HARQ process by
// const int feedback_slot = (slot - 1 + num_slots) % num_slots;
* timing. If the HARQ process's feedback_slot is not the one we
// /* In case of realtime problems: we can only identify a HARQ process by
* expected, we assume that processing has been aborted and we need to
// * timing. If the HARQ process's feedback_slot is not the one we
* skip this HARQ process, which is what happens in the loop below. If
// * expected, we assume that processing has been aborted and we need to
* you don't experience real-time problems, you might simply revert the
// * skip this HARQ process, which is what happens in the loop below. If
* commit that introduced these changes. */
// * you don't experience real-time problems, you might simply revert the
int8_t
pid
=
sched_ctrl
->
feedback_dl_harq
.
head
;
// * commit that introduced these changes. */
DevAssert
(
pid
>=
0
);
// int8_t pid = sched_ctrl->feedback_dl_harq.head;
while
(
sched_ctrl
->
harq_processes
[
pid
].
feedback_slot
!=
feedback_slot
)
{
// DevAssert(pid >= 0);
LOG_W
(
MAC
,
// while (sched_ctrl->harq_processes[pid].feedback_slot != feedback_slot) {
"expected feedback slot %d, but found %d instead
\n
"
,
// LOG_W(MAC,
sched_ctrl
->
harq_processes
[
pid
].
feedback_slot
,
// "expected feedback slot %d, but found %d instead\n",
feedback_slot
);
// sched_ctrl->harq_processes[pid].feedback_slot,
remove_front_nr_list
(
&
sched_ctrl
->
feedback_dl_harq
);
// feedback_slot);
handle_dl_harq
(
mod_id
,
UE_id
,
pid
,
0
);
// remove_front_nr_list(&sched_ctrl->feedback_dl_harq);
pid
=
sched_ctrl
->
feedback_dl_harq
.
head
;
// handle_dl_harq(mod_id, UE_id, pid, 0);
DevAssert
(
pid
>=
0
);
// pid = sched_ctrl->feedback_dl_harq.head;
}
// DevAssert(pid >= 0);
remove_front_nr_list
(
&
sched_ctrl
->
feedback_dl_harq
);
// }
NR_UE_harq_t
*
harq
=
&
sched_ctrl
->
harq_processes
[
pid
];
// remove_front_nr_list(&sched_ctrl->feedback_dl_harq);
DevAssert
(
harq
->
is_waiting
);
// NR_UE_harq_t *harq = &sched_ctrl->harq_processes[pid];
handle_dl_harq
(
mod_id
,
UE_id
,
pid
,
uci_234
->
harq
.
harq_crc
!=
1
&&
acknack
);
// DevAssert(harq->is_waiting);
}
// handle_dl_harq(mod_id, UE_id, pid, uci_234->harq.harq_crc != 1 && acknack);
}
// }
// }
}
}
...
...
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
View file @
b232c434
...
@@ -139,17 +139,18 @@ void handle_nr_ulsch(NR_UL_IND_t *UL_info)
...
@@ -139,17 +139,18 @@ void handle_nr_ulsch(NR_UL_IND_t *UL_info)
crc
->
tb_crc_status
);
crc
->
tb_crc_status
);
/* if CRC passes, pass PDU, otherwise pass NULL as error indication */
/* if CRC passes, pass PDU, otherwise pass NULL as error indication */
nr_rx_sdu
(
UL_info
->
module_id
,
//Gokul
UL_info
->
CC_id
,
// nr_rx_sdu(UL_info->module_id,
UL_info
->
rx_ind
.
sfn
,
// UL_info->CC_id,
UL_info
->
rx_ind
.
slot
,
// UL_info->rx_ind.sfn,
rx
->
rnti
,
// UL_info->rx_ind.slot,
crc
->
tb_crc_status
?
NULL
:
rx
->
pdu
,
// rx->rnti,
rx
->
pdu_length
,
// crc->tb_crc_status ? NULL : rx->pdu,
rx
->
timing_advance
,
// rx->pdu_length,
rx
->
ul_cqi
,
// rx->timing_advance,
rx
->
rssi
);
// rx->ul_cqi,
handle_nr_ul_harq
(
UL_info
->
module_id
,
UL_info
->
frame
,
UL_info
->
slot
,
crc
);
// rx->rssi);
//handle_nr_ul_harq(UL_info->module_id, UL_info->frame, UL_info->slot, crc);
break
;
break
;
}
// for (j=0;j<UL_info->crc_ind.number_crcs;j++)
}
// for (j=0;j<UL_info->crc_ind.number_crcs;j++)
}
// for (i=0;i<UL_info->rx_ind.number_of_pdus;i++)
}
// for (i=0;i<UL_info->rx_ind.number_of_pdus;i++)
...
...
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