Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG UE
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 UE
Commits
d50a985f
Commit
d50a985f
authored
Mar 18, 2021
by
David Kim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding nfapi_new update
parent
a7d149af
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
192 additions
and
127 deletions
+192
-127
ci-scripts/conf_files/rcc.band7.tm1.nfapi.conf
ci-scripts/conf_files/rcc.band7.tm1.nfapi.conf
+4
-4
executables/nr-gnb.c
executables/nr-gnb.c
+28
-15
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
+7
-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_primitives.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+7
-0
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.
ci-scripts/conf_files/rcc.band7.tm1.nfapi.conf
View file @
d50a985f
...
...
@@ -191,10 +191,10 @@ eNBs =
NETWORK_INTERFACES
:
{
ENB_INTERFACE_NAME_FOR_S1_MME
=
"
vpn
"
;
ENB_IPV4_ADDRESS_FOR_S1_MME
=
"10.1.
3.2
"
;
ENB_INTERFACE_NAME_FOR_S1U
=
"
vpn
"
;
ENB_IPV4_ADDRESS_FOR_S1U
=
"10.1.
3.2
"
;
ENB_INTERFACE_NAME_FOR_S1_MME
=
"
enp67s0
"
;
ENB_IPV4_ADDRESS_FOR_S1_MME
=
"10.1.
1.68
"
;
ENB_INTERFACE_NAME_FOR_S1U
=
"
enp67s0
"
;
ENB_IPV4_ADDRESS_FOR_S1U
=
"10.1.
1.68
"
;
ENB_PORT_FOR_S1U
=
2152
;
# Spec 2152
ENB_IPV4_ADDRESS_FOR_X2C
=
"127.0.0.1"
;
ENB_PORT_FOR_X2C
=
36422
;
# Spec 36422
...
...
executables/nr-gnb.c
View file @
d50a985f
...
...
@@ -253,25 +253,33 @@ static inline int rxtx(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, int frame_t
// RX processing
int
tx_slot_type
;
int
rx_slot_type
;
if
(
NFAPI_MODE
==
NFAPI_MODE_VNF
)
{
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
))
{
tx_slot_type
=
NR_UPLINK_SLOT
;
rx_slot_type
=
NR_UPLINK_SLOT
;
}
else
if
((
slot_tx
==
7
)
||
(
slot_rx
==
7
)
||
(
slot_tx
==
17
)
||
(
slot_rx
==
17
))
{
tx_slot_type
=
NR_MIXED_SLOT
;
rx_slot_type
=
NR_MIXED_SLOT
;
}
else
{
tx_slot_type
=
NR_DOWNLINK_SLOT
;
rx_slot_type
=
NR_DOWNLINK_SLOT
;
}
if
(
NFAPI_MODE
!=
NFAPI_MONOLITHIC
)
{
//slot selection routines not working properly in nfapi, so temporarily hardcoding
if
((
slot_tx
==
8
)
||
(
slot_tx
==
9
)
||
(
slot_tx
==
18
)
||
(
slot_tx
==
19
))
{
//tx slot config
tx_slot_type
=
NR_UPLINK_SLOT
;
}
else
if
((
slot_tx
==
7
)
||
(
slot_tx
==
17
))
{
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
;
}
else
{
rx_slot_type
=
NR_DOWNLINK_SLOT
;;
}
}
else
{
tx_slot_type
=
nr_slot_select
(
cfg
,
frame_tx
,
slot_tx
);
rx_slot_type
=
nr_slot_select
(
cfg
,
frame_rx
,
slot_rx
);
}
if
(
rx_slot_type
==
NR_UPLINK_SLOT
||
rx_slot_type
==
NR_MIXED_SLOT
)
{
// UE-specific RX processing for subframe n
// TODO: check if this is correct for PARALLEL_RU_L1_TRX_SPLIT
...
...
@@ -417,12 +425,17 @@ static void *gNB_L1_thread( void *param ) {
while
(
!
oai_exit
)
{
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PROC_RXTX0
,
0
);
if
(
wait_on_condition
(
&
L1_proc
->
mutex
,
&
L1_proc
->
cond
,
&
L1_proc
->
instance_cnt
,
thread_name
)
<
0
)
break
;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PROC_RXTX0
,
1
);
int
frame_rx
=
L1_proc
->
frame_rx
;
int
slot_rx
=
L1_proc
->
slot_rx
;
int
slot_rx
;
if
(
NFAPI_MODE
==
NFAPI_MODE_PNF
)
slot_rx
=
(
L1_proc
->
slot_rx
)
+
1
;
else
slot_rx
=
L1_proc
->
slot_rx
;
int
frame_tx
=
L1_proc
->
frame_tx
;
int
slot_tx
=
L1_proc
->
slot_tx
;
uint64_t
timestamp_tx
=
L1_proc
->
timestamp_tx
;
...
...
executables/nr-ru.c
View file @
d50a985f
...
...
@@ -1606,7 +1606,13 @@ void *ru_thread( void *param ) {
// 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 (proc->tti_rx==8) {
...
...
nfapi/oai_integration/nfapi_pnf.c
View file @
d50a985f
...
...
@@ -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
)
{
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);
//curr_sfn = curr_sfn + 3; //Gokul
nr_fill_ulsch
(
gNB
,
curr_sfn
,
curr_slot
,
&
ul_tti_pdu_list
[
i
].
pusch_pdu
);
break
;
case
NFAPI_NR_UL_CONFIG_PUCCH_PDU_TYPE
:
...
...
nfapi/open-nFAPI/pnf/src/pnf_p7.c
View file @
d50a985f
...
...
@@ -1007,36 +1007,34 @@ int pnf_p7_slot_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn, uint16_t sl
// if(tx_slot_buffer->slot == slot_tx && tx_slot_buffer->sfn == sfn_tx)
// {
if
(
tx_slot_buffer
->
tx_data_req
!=
0
)
{
if
(
tx_slot_buffer
->
tx_data_req
!=
0
)
{
if
(
pnf_p7
->
_public
.
tx_data_req_fn
)
{
(
pnf_p7
->
_public
.
tx_data_req_fn
)(
&
(
pnf_p7
->
_public
),
tx_slot_buffer
->
tx_data_req
);
}
if
(
pnf_p7
->
_public
.
tx_data_req_fn
)
{
(
pnf_p7
->
_public
.
tx_data_req_fn
)(
&
(
pnf_p7
->
_public
),
tx_slot_buffer
->
tx_data_req
);
}
else
}
else
{
// send dummy
if
(
pnf_p7
->
_public
.
tx_data_req_fn
&&
pnf_p7
->
_public
.
dummy_slot
.
tx_data_req
)
{
// send dummy
if
(
pnf_p7
->
_public
.
tx_data_req_fn
&&
pnf_p7
->
_public
.
dummy_slot
.
tx_data_req
)
{
pnf_p7
->
_public
.
dummy_slot
.
tx_data_req
->
SFN
=
sfn_tx
;
pnf_p7
->
_public
.
dummy_slot
.
tx_data_req
->
Slot
=
slot_tx
;
pnf_p7
->
_public
.
dummy_slot
.
tx_data_req
->
SFN
=
sfn_tx
;
pnf_p7
->
_public
.
dummy_slot
.
tx_data_req
->
Slot
=
slot_tx
;
(
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
)
{
(
pnf_p7
->
_public
.
dl_tti_req_fn
)(
NULL
,
&
(
pnf_p7
->
_public
),
tx_slot_buffer
->
dl_tti_req
);
}
}
else
{
// 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
}
}
if
(
tx_slot_buffer
->
ul_dci_req
!=
0
)
{
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
(
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
)
{
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
{
(
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
{
...
...
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
View file @
d50a985f
...
...
@@ -430,20 +430,22 @@ void nr_processULSegment(void* arg) {
p_procTime
);
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
);
#endif
//
#endif
rdata
->
decodeIterations
=
no_iteration_ldpc
;
}
else
{
#ifdef PRINT_CRC_CHECK
//
#ifdef PRINT_CRC_CHECK
LOG_I
(
PHY
,
"CRC NOK
\n
"
);
#endif
//
#endif
rdata
->
decodeIterations
=
max_ldpc_iterations
+
1
;
}
for
(
int
m
=
0
;
m
<
Kr
>>
3
;
m
++
)
{
ulsch_harq
->
c
[
r
][
m
]
=
(
uint8_t
)
llrProcBuf
[
m
];
//printf("%x ", ulsch_harq->c[r][m]);
}
//printf("\n");
//stop_meas(&phy_vars_gNB->ulsch_ldpc_decoding_stats);
}
...
...
@@ -510,6 +512,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
A
=
(
harq_process
->
TBS
)
<<
3
;
LOG_D
(
PHY
,
"ULSCH Decoding, harq_pid %d TBS %d G %d mcs %d Nl %d nb_rb %d, Qm %d, n_layers %d
\n
"
,
harq_pid
,
A
,
G
,
mcs
,
n_layers
,
nb_rb
,
Qm
,
n_layers
);
//printf("ULSCH in %d.%d \n", frame, nr_tti_rx);
if
(
R
<
1024
)
Coderate
=
(
float
)
R
/
(
float
)
1024
;
...
...
openair1/PHY/NR_TRANSPORT/pucch_rx.c
View file @
d50a985f
...
...
@@ -47,6 +47,7 @@
#include "PHY/NR_REFSIG/nr_refsig.h"
#include "common/utils/LOG/log.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "nfapi/oai_integration/vendor_ext.h"
#include "T.h"
...
...
@@ -86,7 +87,8 @@ void nr_fill_pucch(PHY_VARS_gNB *gNB,
int
frame
,
int
slot
,
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
);
AssertFatal
(
(
id
>=
0
)
&&
(
id
<
NUMBER_OF_NR_PUCCH_MAX
),
"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,
int
slot
,
nfapi_nr_uci_pucch_pdu_format_0_1_t
*
uci_pdu
,
nfapi_nr_pucch_pdu_t
*
pucch_pdu
)
{
printf
(
"Inside nr_decode_pucch0.
\n
"
);
int32_t
**
rxdataF
=
gNB
->
common_vars
.
rxdataF
;
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
;
const
uint8_t
*
mcs
;
...
...
@@ -1085,7 +1092,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
int
slot
,
nfapi_nr_uci_pucch_pdu_format_2_3_4_t
*
uci_pdu
,
nfapi_nr_pucch_pdu_t
*
pucch_pdu
)
{
printf
(
"Inside nr_decode_pucch2.
\n
"
);
int32_t
**
rxdataF
=
gNB
->
common_vars
.
rxdataF
;
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);
...
...
@@ -1465,7 +1472,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
}
}
// cw loop
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
;
}
else
{
// polar coded case
...
...
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
d50a985f
...
...
@@ -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
++
){
NR_gNB_PUCCH_t
*
pucch
=
gNB
->
pucch
[
i
];
if
(
pucch
)
{
if
(
NFAPI_MODE
==
NFAPI_MODE_PNF
)
pucch
->
frame
=
frame_rx
;
if
((
pucch
->
active
==
1
)
&&
(
pucch
->
frame
==
frame_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)
for
(
harq_pid
=
0
;
harq_pid
<
NR_MAX_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
);
//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
)
&&
(
ulsch_harq
->
frame
==
frame_rx
)
&&
(
ulsch_harq
->
slot
==
slot_rx
)
&&
(
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
);
#ifdef DEBUG_RXDATA
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
d50a985f
...
...
@@ -62,6 +62,7 @@
#include "common/ran_context.h"
extern
RAN_CONTEXT_t
RC
;
uint8_t
count
=
0
;
uint8_t
harq_pid_ul
=
-
1
;
int
flag
=
0
;
// Note the 2 scs values in the table names represent resp. scs_common and pdcch_scs
/// LUT for the number of symbols in the coreset indexed by coreset index (4 MSB rmsi_pdcch_config)
...
...
@@ -1248,6 +1249,11 @@ void fill_dci_pdu_rel15(const NR_ServingCellConfigCommon_t *scc,
case
NR_UL_DCI_FORMAT_0_1
:
switch
(
rnti_type
)
{
case
NR_RNTI_C
:
harq_pid_ul
=
(
harq_pid_ul
+
1
)
%
16
;
if
(
harq_pid_ul
==
0
)
flag
=
!
flag
;
dci_pdu_rel15
->
ndi
=
flag
;
// Indicating a DL DCI format 1bit
pos
=
1
;
*
dci_pdu
|=
((
uint64_t
)
dci_pdu_rel15
->
format_indicator
&
0x1
)
<<
(
dci_size
-
pos
);
...
...
@@ -1280,6 +1286,7 @@ void fill_dci_pdu_rel15(const NR_ServingCellConfigCommon_t *scc,
*
dci_pdu
|=
((
uint64_t
)
dci_pdu_rel15
->
rv
&
0x3
)
<<
(
dci_size
-
pos
);
// HARQ process number 4bit
pos
+=
4
;
dci_pdu_rel15
->
harq_pid
=
harq_pid_ul
;
*
dci_pdu
|=
((
uint64_t
)
dci_pdu_rel15
->
harq_pid
&
0xf
)
<<
(
dci_size
-
pos
);
// 1st Downlink assignment index
pos
+=
dci_pdu_rel15
->
dai
[
0
].
nbits
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
View file @
d50a985f
...
...
@@ -318,13 +318,15 @@ void handle_nr_uci_pucch_0_1(module_id_t mod_id,
frame_t
frame
,
sub_frame_t
slot
,
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
);
if
(
UE_id
<
0
)
{
LOG_E
(
MAC
,
"%s(): unknown RNTI %04x in PUCCH UCI
\n
"
,
__func__
,
uci_01
->
rnti
);
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
];
// tpc (power control)
...
...
@@ -332,51 +334,55 @@ void handle_nr_uci_pucch_0_1(module_id_t mod_id,
uci_01
->
ul_cqi
,
30
);
NR_ServingCellConfigCommon_t
*
scc
=
RC
.
nrmac
[
mod_id
]
->
common_channels
->
ServingCellConfigCommon
;
const
int
num_slots
=
nr_slots_per_frame
[
*
scc
->
ssbSubcarrierSpacing
];
if
(((
uci_01
->
pduBitmap
>>
1
)
&
0x01
))
{
// iterate over received harq bits
for
(
int
harq_bit
=
0
;
harq_bit
<
uci_01
->
harq
->
num_harq
;
harq_bit
++
)
{
const
uint8_t
harq_value
=
uci_01
->
harq
->
harq_list
[
harq_bit
].
harq_value
;
const
uint8_t
harq_confidence
=
uci_01
->
harq
->
harq_confidence_level
;
const
int
feedback_slot
=
(
slot
-
1
+
num_slots
)
%
num_slots
;
/* In case of realtime problems: we can only identify a HARQ process by
* timing. If the HARQ process's feedback_slot is not the one we
* expected, we assume that processing has been aborted and we need to
* skip this HARQ process, which is what happens in the loop below. If
* you don't experience real-time problems, you might simply revert the
* commit that introduced these changes. */
int8_t
pid
=
sched_ctrl
->
feedback_dl_harq
.
head
;
DevAssert
(
pid
>=
0
);
while
(
sched_ctrl
->
harq_processes
[
pid
].
feedback_slot
!=
feedback_slot
)
{
LOG_W
(
MAC
,
"expected feedback slot %d, but found %d instead
\n
"
,
sched_ctrl
->
harq_processes
[
pid
].
feedback_slot
,
feedback_slot
);
remove_front_nr_list
(
&
sched_ctrl
->
feedback_dl_harq
);
handle_dl_harq
(
mod_id
,
UE_id
,
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
];
DevAssert
(
harq
->
is_waiting
);
handle_dl_harq
(
mod_id
,
UE_id
,
pid
,
harq_value
==
1
&&
harq_confidence
==
0
);
}
}
// 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
=
20
;
// if (((uci_01->pduBitmap >> 1) & 0x01)) {
// // iterate over received harq bits
// for (int harq_bit = 0; harq_bit < uci_01->harq->num_harq; harq_bit++) {
// const uint8_t harq_value = uci_01->harq->harq_list[harq_bit].harq_value;
// const uint8_t harq_confidence = uci_01->harq->harq_confidence_level;
// const int feedback_slot = (slot - 1 + num_slots) % num_slots;
// /* In case of realtime problems: we can only identify a HARQ process by
// * timing. If the HARQ process's feedback_slot is not the one we
// * expected, we assume that processing has been aborted and we need to
// * skip this HARQ process, which is what happens in the loop below. If
// * you don't experience real-time problems, you might simply revert the
// * commit that introduced these changes. */
// int8_t pid = sched_ctrl->feedback_dl_harq.head;
// DevAssert(pid >= 0);
// while (sched_ctrl->harq_processes[pid].feedback_slot != feedback_slot) {
// LOG_W(MAC,
// "expected feedback slot %d, but found %d instead\n",
// sched_ctrl->harq_processes[pid].feedback_slot,
// feedback_slot);
// remove_front_nr_list(&sched_ctrl->feedback_dl_harq);
// handle_dl_harq(mod_id, UE_id, 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];
// 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
,
frame_t
frame
,
sub_frame_t
slot
,
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
);
if
(
UE_id
<
0
)
{
LOG_E
(
MAC
,
"%s(): unknown RNTI %04x in PUCCH UCI
\n
"
,
__func__
,
uci_234
->
rnti
);
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
];
// tpc (power control)
...
...
@@ -384,37 +390,38 @@ void handle_nr_uci_pucch_2_3_4(module_id_t mod_id,
uci_234
->
ul_cqi
,
30
);
NR_ServingCellConfigCommon_t
*
scc
=
RC
.
nrmac
[
mod_id
]
->
common_channels
->
ServingCellConfigCommon
;
const
int
num_slots
=
nr_slots_per_frame
[
*
scc
->
ssbSubcarrierSpacing
];
if
((
uci_234
->
pduBitmap
>>
1
)
&
0x01
)
{
// iterate over received harq bits
for
(
int
harq_bit
=
0
;
harq_bit
<
uci_234
->
harq
.
harq_bit_len
;
harq_bit
++
)
{
const
int
acknack
=
((
uci_234
->
harq
.
harq_payload
[
harq_bit
>>
3
])
>>
harq_bit
)
&
0x01
;
const
int
feedback_slot
=
(
slot
-
1
+
num_slots
)
%
num_slots
;
/* In case of realtime problems: we can only identify a HARQ process by
* timing. If the HARQ process's feedback_slot is not the one we
* expected, we assume that processing has been aborted and we need to
* skip this HARQ process, which is what happens in the loop below. If
* you don't experience real-time problems, you might simply revert the
* commit that introduced these changes. */
int8_t
pid
=
sched_ctrl
->
feedback_dl_harq
.
head
;
DevAssert
(
pid
>=
0
);
while
(
sched_ctrl
->
harq_processes
[
pid
].
feedback_slot
!=
feedback_slot
)
{
LOG_W
(
MAC
,
"expected feedback slot %d, but found %d instead
\n
"
,
sched_ctrl
->
harq_processes
[
pid
].
feedback_slot
,
feedback_slot
);
remove_front_nr_list
(
&
sched_ctrl
->
feedback_dl_harq
);
handle_dl_harq
(
mod_id
,
UE_id
,
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
];
DevAssert
(
harq
->
is_waiting
);
handle_dl_harq
(
mod_id
,
UE_id
,
pid
,
uci_234
->
harq
.
harq_crc
!=
1
&&
acknack
);
}
}
// 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
=
20
;
// if ((uci_234->pduBitmap >> 1) & 0x01) {
// // iterate over received harq bits
// for (int harq_bit = 0; harq_bit < uci_234->harq.harq_bit_len; harq_bit++) {
// const int acknack = ((uci_234->harq.harq_payload[harq_bit >> 3]) >> harq_bit) & 0x01;
// const int feedback_slot = (slot - 1 + num_slots) % num_slots;
// /* In case of realtime problems: we can only identify a HARQ process by
// * timing. If the HARQ process's feedback_slot is not the one we
// * expected, we assume that processing has been aborted and we need to
// * skip this HARQ process, which is what happens in the loop below. If
// * you don't experience real-time problems, you might simply revert the
// * commit that introduced these changes. */
// int8_t pid = sched_ctrl->feedback_dl_harq.head;
// DevAssert(pid >= 0);
// while (sched_ctrl->harq_processes[pid].feedback_slot != feedback_slot) {
// LOG_W(MAC,
// "expected feedback slot %d, but found %d instead\n",
// sched_ctrl->harq_processes[pid].feedback_slot,
// feedback_slot);
// remove_front_nr_list(&sched_ctrl->feedback_dl_harq);
// handle_dl_harq(mod_id, UE_id, 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];
// 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 @
d50a985f
...
...
@@ -139,17 +139,18 @@ void handle_nr_ulsch(NR_UL_IND_t *UL_info)
crc
->
tb_crc_status
);
/* if CRC passes, pass PDU, otherwise pass NULL as error indication */
nr_rx_sdu
(
UL_info
->
module_id
,
UL_info
->
CC_id
,
UL_info
->
rx_ind
.
sfn
,
UL_info
->
rx_ind
.
slot
,
rx
->
rnti
,
crc
->
tb_crc_status
?
NULL
:
rx
->
pdu
,
rx
->
pdu_length
,
rx
->
timing_advance
,
rx
->
ul_cqi
,
rx
->
rssi
);
handle_nr_ul_harq
(
UL_info
->
module_id
,
UL_info
->
frame
,
UL_info
->
slot
,
crc
);
//Gokul
// nr_rx_sdu(UL_info->module_id,
// UL_info->CC_id,
// UL_info->rx_ind.sfn,
// UL_info->rx_ind.slot,
// rx->rnti,
// crc->tb_crc_status ? NULL : rx->pdu,
// rx->pdu_length,
// rx->timing_advance,
// rx->ul_cqi,
// rx->rssi);
//handle_nr_ul_harq(UL_info->module_id, UL_info->frame, UL_info->slot, crc);
break
;
}
// for (j=0;j<UL_info->crc_ind.number_crcs;j++)
}
// 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