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
047b7b17
Commit
047b7b17
authored
Apr 13, 2021
by
Mahesh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Uplink indication
parent
4454627b
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
936 additions
and
210 deletions
+936
-210
nfapi/oai_integration/nfapi_pnf.c
nfapi/oai_integration/nfapi_pnf.c
+33
-0
nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h
nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h
+6
-1
nfapi/open-nFAPI/nfapi/src/nfapi_p7.c
nfapi/open-nFAPI/nfapi/src/nfapi_p7.c
+684
-154
nfapi/open-nFAPI/pnf/src/pnf_p7_interface.c
nfapi/open-nFAPI/pnf/src/pnf_p7_interface.c
+62
-10
nfapi/open-nFAPI/vnf/src/vnf_p7.c
nfapi/open-nFAPI/vnf/src/vnf_p7.c
+106
-30
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
+45
-15
No files found.
nfapi/oai_integration/nfapi_pnf.c
View file @
047b7b17
...
@@ -2406,3 +2406,36 @@ int oai_nfapi_sr_indication(nfapi_sr_indication_t *ind) {
...
@@ -2406,3 +2406,36 @@ int oai_nfapi_sr_indication(nfapi_sr_indication_t *ind) {
//free(ind.rx_indication_body.rx_pdu_list);
//free(ind.rx_indication_body.rx_pdu_list);
return
retval
;
return
retval
;
}
}
//NR UPLINK INDICATION
int
oai_nfapi_nr_rx_data_indication
(
nfapi_nr_rx_data_indication_t
*
ind
)
{
ind
->
header
.
phy_id
=
1
;
// DJP HACK TODO FIXME - need to pass this around!!!!
ind
->
header
.
message_id
=
NFAPI_NR_PHY_MSG_TYPE_RX_DATA_INDICATION
;
return
nfapi_pnf_p7_nr_rx_data_ind
(
p7_config_g
,
ind
);
}
int
oai_nfapi_nr_crc_indication
(
nfapi_nr_crc_indication_t
*
ind
)
{
ind
->
header
.
phy_id
=
1
;
// DJP HACK TODO FIXME - need to pass this around!!!!
ind
->
header
.
message_id
=
NFAPI_NR_PHY_MSG_TYPE_CRC_INDICATION
;
return
nfapi_pnf_p7_nr_crc_ind
(
p7_config_g
,
ind
);
}
int
oai_nfapi_nr_srs_indication
(
nfapi_nr_srs_indication_t
*
ind
)
{
ind
->
header
.
phy_id
=
1
;
// DJP HACK TODO FIXME - need to pass this around!!!!
ind
->
header
.
message_id
=
NFAPI_NR_PHY_MSG_TYPE_SRS_INDICATION
;
return
nfapi_pnf_p7_nr_srs_ind
(
p7_config_g
,
ind
);
}
int
oai_nfapi_nr_uci_indication
(
nfapi_nr_uci_indication_t
*
ind
)
{
ind
->
header
.
phy_id
=
1
;
// DJP HACK TODO FIXME - need to pass this around!!!!
ind
->
header
.
message_id
=
NFAPI_NR_PHY_MSG_TYPE_UCI_INDICATION
;
return
nfapi_pnf_p7_nr_uci_ind
(
p7_config_g
,
ind
);
}
int
oai_nfapi_nr_rach_indication
(
nfapi_nr_rach_indication_t
*
ind
)
{
ind
->
header
.
phy_id
=
1
;
// DJP HACK TODO FIXME - need to pass this around!!!!
ind
->
header
.
message_id
=
NFAPI_NR_PHY_MSG_TYPE_RACH_INDICATION
;
return
nfapi_pnf_p7_nr_rach_ind
(
p7_config_g
,
ind
);
}
nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h
View file @
047b7b17
...
@@ -1516,10 +1516,11 @@ typedef struct
...
@@ -1516,10 +1516,11 @@ typedef struct
typedef
struct
typedef
struct
{
{
nfapi_p7_message_header_t
header
;
uint16_t
sfn
;
uint16_t
sfn
;
uint16_t
slot
;
uint16_t
slot
;
uint16_t
number_of_pdus
;
uint16_t
number_of_pdus
;
nfapi_nr_rx_data_pdu_t
*
pdu_list
;
nfapi_nr_rx_data_pdu_t
*
pdu_list
;
//changed from pointer to struct - gokul
}
nfapi_nr_rx_data_indication_t
;
}
nfapi_nr_rx_data_indication_t
;
...
@@ -1542,6 +1543,7 @@ typedef struct
...
@@ -1542,6 +1543,7 @@ typedef struct
typedef
struct
typedef
struct
{
{
nfapi_p7_message_header_t
header
;
uint16_t
sfn
;
uint16_t
sfn
;
uint16_t
slot
;
uint16_t
slot
;
uint16_t
number_crcs
;
uint16_t
number_crcs
;
...
@@ -1679,6 +1681,7 @@ typedef struct
...
@@ -1679,6 +1681,7 @@ typedef struct
typedef
struct
typedef
struct
{
{
nfapi_p7_message_header_t
header
;
uint16_t
sfn
;
uint16_t
sfn
;
uint16_t
slot
;
uint16_t
slot
;
uint16_t
num_ucis
;
uint16_t
num_ucis
;
...
@@ -1715,6 +1718,7 @@ typedef struct
...
@@ -1715,6 +1718,7 @@ typedef struct
typedef
struct
typedef
struct
{
{
nfapi_p7_message_header_t
header
;
uint16_t
sfn
;
uint16_t
sfn
;
uint16_t
slot
;
uint16_t
slot
;
uint8_t
number_of_pdus
;
uint8_t
number_of_pdus
;
...
@@ -1747,6 +1751,7 @@ typedef struct{
...
@@ -1747,6 +1751,7 @@ typedef struct{
typedef
struct
typedef
struct
{
{
nfapi_p7_message_header_t
header
;
uint16_t
sfn
;
uint16_t
sfn
;
uint16_t
slot
;
uint16_t
slot
;
uint8_t
number_of_pdus
;
uint8_t
number_of_pdus
;
...
...
nfapi/open-nFAPI/nfapi/src/nfapi_p7.c
View file @
047b7b17
This diff is collapsed.
Click to expand it.
nfapi/open-nFAPI/pnf/src/pnf_p7_interface.c
View file @
047b7b17
...
@@ -175,17 +175,7 @@ int nfapi_pnf_p7_rach_ind(nfapi_pnf_p7_config_t* config, nfapi_rach_indication_t
...
@@ -175,17 +175,7 @@ int nfapi_pnf_p7_rach_ind(nfapi_pnf_p7_config_t* config, nfapi_rach_indication_t
pnf_p7_t
*
_this
=
(
pnf_p7_t
*
)(
config
);
pnf_p7_t
*
_this
=
(
pnf_p7_t
*
)(
config
);
return
pnf_p7_pack_and_send_p7_message
(
_this
,
(
nfapi_p7_message_header_t
*
)
ind
,
sizeof
(
nfapi_rach_indication_t
));
return
pnf_p7_pack_and_send_p7_message
(
_this
,
(
nfapi_p7_message_header_t
*
)
ind
,
sizeof
(
nfapi_rach_indication_t
));
}
}
int
nfapi_pnf_p7_srs_ind
(
nfapi_pnf_p7_config_t
*
config
,
nfapi_srs_indication_t
*
ind
)
{
if
(
config
==
NULL
||
ind
==
NULL
)
{
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"%s: invalid input params
\n
"
,
__FUNCTION__
);
return
-
1
;
}
pnf_p7_t
*
_this
=
(
pnf_p7_t
*
)(
config
);
return
pnf_p7_pack_and_send_p7_message
(
_this
,
(
nfapi_p7_message_header_t
*
)
ind
,
sizeof
(
nfapi_srs_indication_t
));
}
int
nfapi_pnf_p7_sr_ind
(
nfapi_pnf_p7_config_t
*
config
,
nfapi_sr_indication_t
*
ind
)
int
nfapi_pnf_p7_sr_ind
(
nfapi_pnf_p7_config_t
*
config
,
nfapi_sr_indication_t
*
ind
)
{
{
if
(
config
==
NULL
||
ind
==
NULL
)
if
(
config
==
NULL
||
ind
==
NULL
)
...
@@ -265,3 +255,65 @@ int nfapi_pnf_ue_release_resp(nfapi_pnf_p7_config_t* config, nfapi_ue_release_re
...
@@ -265,3 +255,65 @@ int nfapi_pnf_ue_release_resp(nfapi_pnf_p7_config_t* config, nfapi_ue_release_re
return
pnf_p7_pack_and_send_p7_message
(
_this
,
&
(
resp
->
header
),
sizeof
(
nfapi_ue_release_response_t
));
return
pnf_p7_pack_and_send_p7_message
(
_this
,
&
(
resp
->
header
),
sizeof
(
nfapi_ue_release_response_t
));
}
}
//NR UPLINK INDICATION
int
nfapi_pnf_p7_nr_rx_data_ind
(
nfapi_pnf_p7_config_t
*
config
,
nfapi_nr_rx_data_indication_t
*
ind
)
{
if
(
config
==
NULL
||
ind
==
NULL
)
{
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"%s: invalid input params
\n
"
,
__FUNCTION__
);
return
-
1
;
}
pnf_p7_t
*
_this
=
(
pnf_p7_t
*
)(
config
);
return
pnf_nr_p7_pack_and_send_p7_message
(
_this
,
(
nfapi_p7_message_header_t
*
)
ind
,
sizeof
(
nfapi_nr_rx_data_indication_t
));
}
int
nfapi_pnf_p7_nr_crc_ind
(
nfapi_pnf_p7_config_t
*
config
,
nfapi_nr_crc_indication_t
*
ind
)
{
if
(
config
==
NULL
||
ind
==
NULL
)
{
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"%s: invalid input params
\n
"
,
__FUNCTION__
);
return
-
1
;
}
pnf_p7_t
*
_this
=
(
pnf_p7_t
*
)(
config
);
return
pnf_nr_p7_pack_and_send_p7_message
(
_this
,
(
nfapi_p7_message_header_t
*
)
ind
,
sizeof
(
nfapi_nr_crc_indication_t
));
}
int
nfapi_pnf_p7_nr_srs_ind
(
nfapi_pnf_p7_config_t
*
config
,
nfapi_nr_srs_indication_t
*
ind
)
{
if
(
config
==
NULL
||
ind
==
NULL
)
{
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"%s: invalid input params
\n
"
,
__FUNCTION__
);
return
-
1
;
}
pnf_p7_t
*
_this
=
(
pnf_p7_t
*
)(
config
);
return
pnf_nr_p7_pack_and_send_p7_message
(
_this
,
(
nfapi_p7_message_header_t
*
)
ind
,
sizeof
(
nfapi_nr_srs_indication_t
));
}
int
nfapi_pnf_p7_nr_uci_ind
(
nfapi_pnf_p7_config_t
*
config
,
nfapi_nr_uci_indication_t
*
ind
)
{
if
(
config
==
NULL
||
ind
==
NULL
)
{
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"%s: invalid input params
\n
"
,
__FUNCTION__
);
return
-
1
;
}
pnf_p7_t
*
_this
=
(
pnf_p7_t
*
)(
config
);
return
pnf_nr_p7_pack_and_send_p7_message
(
_this
,
(
nfapi_p7_message_header_t
*
)
ind
,
sizeof
(
nfapi_nr_uci_indication_t
));
}
int
nfapi_pnf_p7_nr_rach_ind
(
nfapi_pnf_p7_config_t
*
config
,
nfapi_nr_rach_indication_t
*
ind
)
{
if
(
config
==
NULL
||
ind
==
NULL
)
{
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"%s: invalid input params
\n
"
,
__FUNCTION__
);
return
-
1
;
}
pnf_p7_t
*
_this
=
(
pnf_p7_t
*
)(
config
);
return
pnf_nr_p7_pack_and_send_p7_message
(
_this
,
(
nfapi_p7_message_header_t
*
)
ind
,
sizeof
(
nfapi_nr_rach_indication_t
));
}
nfapi/open-nFAPI/vnf/src/vnf_p7.c
View file @
047b7b17
...
@@ -1455,6 +1455,102 @@ void vnf_handle_ul_node_sync(void *pRecvMsg, int recvMsgLen, vnf_p7_t* vnf_p7)
...
@@ -1455,6 +1455,102 @@ void vnf_handle_ul_node_sync(void *pRecvMsg, int recvMsgLen, vnf_p7_t* vnf_p7)
}
}
}
}
//NR HANDLES FOR UPLINK MESSAGES
void
vnf_handle_nr_rx_data_indication
(
void
*
pRecvMsg
,
int
recvMsgLen
,
vnf_p7_t
*
vnf_p7
)
{
// ensure it's valid
if
(
pRecvMsg
==
NULL
||
vnf_p7
==
NULL
)
{
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"%s: NULL parameters
\n
"
,
__FUNCTION__
);
}
else
{
nfapi_nr_rx_data_indication_t
ind
;
if
(
nfapi_nr_p7_message_unpack
(
pRecvMsg
,
recvMsgLen
,
&
ind
,
sizeof
(
ind
),
&
vnf_p7
->
_public
.
codec_config
)
<
0
)
{
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"%s: Failed to unpack message
\n
"
,
__FUNCTION__
);
}
}
}
void
vnf_handle_nr_crc_indication
(
void
*
pRecvMsg
,
int
recvMsgLen
,
vnf_p7_t
*
vnf_p7
)
{
// ensure it's valid
if
(
pRecvMsg
==
NULL
||
vnf_p7
==
NULL
)
{
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"%s: NULL parameters
\n
"
,
__FUNCTION__
);
}
else
{
nfapi_nr_crc_indication_t
ind
;
if
(
nfapi_nr_p7_message_unpack
(
pRecvMsg
,
recvMsgLen
,
&
ind
,
sizeof
(
ind
),
&
vnf_p7
->
_public
.
codec_config
)
<
0
)
{
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"%s: Failed to unpack message
\n
"
,
__FUNCTION__
);
}
}
}
void
vnf_handle_nr_srs_indication
(
void
*
pRecvMsg
,
int
recvMsgLen
,
vnf_p7_t
*
vnf_p7
)
{
// ensure it's valid
if
(
pRecvMsg
==
NULL
||
vnf_p7
==
NULL
)
{
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"%s: NULL parameters
\n
"
,
__FUNCTION__
);
}
else
{
nfapi_nr_srs_indication_t
ind
;
if
(
nfapi_nr_p7_message_unpack
(
pRecvMsg
,
recvMsgLen
,
&
ind
,
sizeof
(
ind
),
&
vnf_p7
->
_public
.
codec_config
)
<
0
)
{
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"%s: Failed to unpack message
\n
"
,
__FUNCTION__
);
}
}
}
void
vnf_handle_nr_uci_indication
(
void
*
pRecvMsg
,
int
recvMsgLen
,
vnf_p7_t
*
vnf_p7
)
{
// ensure it's valid
if
(
pRecvMsg
==
NULL
||
vnf_p7
==
NULL
)
{
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"%s: NULL parameters
\n
"
,
__FUNCTION__
);
}
else
{
nfapi_nr_uci_indication_t
ind
;
if
(
nfapi_nr_p7_message_unpack
(
pRecvMsg
,
recvMsgLen
,
&
ind
,
sizeof
(
ind
),
&
vnf_p7
->
_public
.
codec_config
)
<
0
)
{
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"%s: Failed to unpack message
\n
"
,
__FUNCTION__
);
}
}
}
void
vnf_handle_nr_rach_indication
(
void
*
pRecvMsg
,
int
recvMsgLen
,
vnf_p7_t
*
vnf_p7
)
{
// ensure it's valid
if
(
pRecvMsg
==
NULL
||
vnf_p7
==
NULL
)
{
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"%s: NULL parameters
\n
"
,
__FUNCTION__
);
}
else
{
nfapi_nr_rach_indication_t
ind
;
if
(
nfapi_nr_p7_message_unpack
(
pRecvMsg
,
recvMsgLen
,
&
ind
,
sizeof
(
ind
),
&
vnf_p7
->
_public
.
codec_config
)
<
0
)
{
NFAPI_TRACE
(
NFAPI_TRACE_ERROR
,
"%s: Failed to unpack message
\n
"
,
__FUNCTION__
);
}
}
}
void
vnf_nr_handle_ul_node_sync
(
void
*
pRecvMsg
,
int
recvMsgLen
,
vnf_p7_t
*
vnf_p7
)
void
vnf_nr_handle_ul_node_sync
(
void
*
pRecvMsg
,
int
recvMsgLen
,
vnf_p7_t
*
vnf_p7
)
{
{
//printf("received UL Node sync");
//printf("received UL Node sync");
...
@@ -2035,44 +2131,24 @@ void vnf_nr_dispatch_p7_message(void *pRecvMsg, int recvMsgLen, vnf_p7_t* vnf_p7
...
@@ -2035,44 +2131,24 @@ void vnf_nr_dispatch_p7_message(void *pRecvMsg, int recvMsgLen, vnf_p7_t* vnf_p7
vnf_nr_handle_timing_info
(
pRecvMsg
,
recvMsgLen
,
vnf_p7
);
vnf_nr_handle_timing_info
(
pRecvMsg
,
recvMsgLen
,
vnf_p7
);
break
;
break
;
case
NFAPI_
HARQ
_INDICATION
:
case
NFAPI_
NR_PHY_MSG_TYPE_RX_DATA
_INDICATION
:
vnf_handle_
harq
_indication
(
pRecvMsg
,
recvMsgLen
,
vnf_p7
);
vnf_handle_
nr_rx_data
_indication
(
pRecvMsg
,
recvMsgLen
,
vnf_p7
);
break
;
break
;
case
NFAPI_CRC_INDICATION
:
case
NFAPI_NR_PHY_MSG_TYPE_CRC_INDICATION
:
vnf_handle_crc_indication
(
pRecvMsg
,
recvMsgLen
,
vnf_p7
);
vnf_handle_nr_crc_indication
(
pRecvMsg
,
recvMsgLen
,
vnf_p7
);
break
;
case
NFAPI_RX_ULSCH_INDICATION
:
vnf_handle_rx_ulsch_indication
(
pRecvMsg
,
recvMsgLen
,
vnf_p7
);
break
;
case
NFAPI_RACH_INDICATION
:
vnf_handle_rach_indication
(
pRecvMsg
,
recvMsgLen
,
vnf_p7
);
break
;
break
;
case
NFAPI_
SRS
_INDICATION
:
case
NFAPI_
NR_PHY_MSG_TYPE_UCI
_INDICATION
:
vnf_handle_
srs
_indication
(
pRecvMsg
,
recvMsgLen
,
vnf_p7
);
vnf_handle_
nr_uci
_indication
(
pRecvMsg
,
recvMsgLen
,
vnf_p7
);
break
;
break
;
case
NFAPI_
RX_SR
_INDICATION
:
case
NFAPI_
NR_PHY_MSG_TYPE_SRS
_INDICATION
:
vnf_handle_
rx_sr
_indication
(
pRecvMsg
,
recvMsgLen
,
vnf_p7
);
vnf_handle_
nr_rach
_indication
(
pRecvMsg
,
recvMsgLen
,
vnf_p7
);
break
;
break
;
case
NFAPI_RX_CQI_INDICATION
:
case
NFAPI_NR_PHY_MSG_TYPE_RACH_INDICATION
:
vnf_handle_rx_cqi_indication
(
pRecvMsg
,
recvMsgLen
,
vnf_p7
);
vnf_handle_nr_srs_indication
(
pRecvMsg
,
recvMsgLen
,
vnf_p7
);
break
;
case
NFAPI_LBT_DL_INDICATION
:
vnf_handle_lbt_dl_indication
(
pRecvMsg
,
recvMsgLen
,
vnf_p7
);
break
;
case
NFAPI_NB_HARQ_INDICATION
:
vnf_handle_nb_harq_indication
(
pRecvMsg
,
recvMsgLen
,
vnf_p7
);
break
;
case
NFAPI_NRACH_INDICATION
:
vnf_handle_nrach_indication
(
pRecvMsg
,
recvMsgLen
,
vnf_p7
);
break
;
break
;
case
NFAPI_UE_RELEASE_RESPONSE
:
case
NFAPI_UE_RELEASE_RESPONSE
:
...
...
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
View file @
047b7b17
...
@@ -54,7 +54,14 @@ extern uint16_t sf_ahead;
...
@@ -54,7 +54,14 @@ extern uint16_t sf_ahead;
extern
uint16_t
sl_ahead
;
extern
uint16_t
sl_ahead
;
void
handle_nr_rach
(
NR_UL_IND_t
*
UL_info
)
{
void
handle_nr_rach
(
NR_UL_IND_t
*
UL_info
)
{
if
(
NFAPI_MODE
==
NFAPI_MODE_PNF
)
{
if
(
UL_info
->
rach_ind
.
number_of_pdus
>
0
)
{
//LOG_D(PHY,"UL_info->crc_ind.crc_indication_body.number_of_crcs:%d CRC_IND:SFN/SF:%d\n", UL_info->crc_ind.crc_indication_body.number_of_crcs, NFAPI_SFNSF2DEC(UL_info->crc_ind.sfn_sf));
oai_nfapi_nr_rach_indication
(
&
UL_info
->
rach_ind
);
UL_info
->
rach_ind
.
number_of_pdus
=
0
;
}
}
else
{
if
(
UL_info
->
rach_ind
.
number_of_pdus
>
0
)
{
if
(
UL_info
->
rach_ind
.
number_of_pdus
>
0
)
{
LOG_I
(
MAC
,
"UL_info[Frame %d, Slot %d] Calling initiate_ra_proc RACH:SFN/SLOT:%d/%d
\n
"
,
UL_info
->
frame
,
UL_info
->
slot
,
UL_info
->
rach_ind
.
sfn
,
UL_info
->
rach_ind
.
slot
);
LOG_I
(
MAC
,
"UL_info[Frame %d, Slot %d] Calling initiate_ra_proc RACH:SFN/SLOT:%d/%d
\n
"
,
UL_info
->
frame
,
UL_info
->
slot
,
UL_info
->
rach_ind
.
sfn
,
UL_info
->
rach_ind
.
slot
);
int
npdus
=
UL_info
->
rach_ind
.
number_of_pdus
;
int
npdus
=
UL_info
->
rach_ind
.
number_of_pdus
;
...
@@ -75,10 +82,19 @@ void handle_nr_rach(NR_UL_IND_t *UL_info) {
...
@@ -75,10 +82,19 @@ void handle_nr_rach(NR_UL_IND_t *UL_info) {
}
}
}
}
}
}
}
void
handle_nr_uci
(
NR_UL_IND_t
*
UL_info
)
void
handle_nr_uci
(
NR_UL_IND_t
*
UL_info
)
{
{
if
(
NFAPI_MODE
==
NFAPI_MODE_PNF
)
{
if
(
UL_info
->
uci_ind
.
num_ucis
>
0
)
{
//LOG_D(PHY,"UL_info->crc_ind.crc_indication_body.number_of_crcs:%d CRC_IND:SFN/SF:%d\n", UL_info->crc_ind.crc_indication_body.number_of_crcs, NFAPI_SFNSF2DEC(UL_info->crc_ind.sfn_sf));
//oai_nfapi_nr_uci_indication(&UL_info->uci_ind);
UL_info
->
uci_ind
.
num_ucis
=
0
;
}
}
else
{
const
module_id_t
mod_id
=
UL_info
->
module_id
;
const
module_id_t
mod_id
=
UL_info
->
module_id
;
const
frame_t
frame
=
UL_info
->
frame
;
const
frame_t
frame
=
UL_info
->
frame
;
const
sub_frame_t
slot
=
UL_info
->
slot
;
const
sub_frame_t
slot
=
UL_info
->
slot
;
...
@@ -110,10 +126,24 @@ void handle_nr_uci(NR_UL_IND_t *UL_info)
...
@@ -110,10 +126,24 @@ void handle_nr_uci(NR_UL_IND_t *UL_info)
// NOTE: we just assume it is BWP ID 1, to be revised for multiple BWPs
// NOTE: we just assume it is BWP ID 1, to be revised for multiple BWPs
RC
.
nrmac
[
mod_id
]
->
pucch_index_used
[
1
][
slot
]
=
0
;
RC
.
nrmac
[
mod_id
]
->
pucch_index_used
[
1
][
slot
]
=
0
;
}
}
}
void
handle_nr_ulsch
(
NR_UL_IND_t
*
UL_info
)
void
handle_nr_ulsch
(
NR_UL_IND_t
*
UL_info
)
{
{
if
(
NFAPI_MODE
==
NFAPI_MODE_PNF
)
{
if
(
UL_info
->
crc_ind
.
number_crcs
>
0
)
{
//LOG_D(PHY,"UL_info->crc_ind.crc_indication_body.number_of_crcs:%d CRC_IND:SFN/SF:%d\n", UL_info->crc_ind.crc_indication_body.number_of_crcs, NFAPI_SFNSF2DEC(UL_info->crc_ind.sfn_sf));
oai_nfapi_nr_crc_indication
(
&
UL_info
->
crc_ind
);
UL_info
->
crc_ind
.
number_crcs
=
0
;
}
if
(
UL_info
->
rx_ind
.
number_of_pdus
>
0
)
{
//LOG_D(PHY,"UL_info->rx_ind.number_of_pdus:%d RX_IND:SFN/SF:%d\n", UL_info->rx_ind.rx_indication_body.number_of_pdus, NFAPI_SFNSF2DEC(UL_info->rx_ind.sfn_sf));
oai_nfapi_nr_rx_data_indication
(
&
UL_info
->
rx_ind
);
UL_info
->
rx_ind
.
number_of_pdus
=
0
;
}
}
else
{
if
(
UL_info
->
rx_ind
.
number_of_pdus
>
0
&&
UL_info
->
crc_ind
.
number_crcs
>
0
)
{
if
(
UL_info
->
rx_ind
.
number_of_pdus
>
0
&&
UL_info
->
crc_ind
.
number_crcs
>
0
)
{
for
(
int
i
=
0
;
i
<
UL_info
->
rx_ind
.
number_of_pdus
;
i
++
)
{
for
(
int
i
=
0
;
i
<
UL_info
->
rx_ind
.
number_of_pdus
;
i
++
)
{
for
(
int
j
=
0
;
j
<
UL_info
->
crc_ind
.
number_crcs
;
j
++
)
{
for
(
int
j
=
0
;
j
<
UL_info
->
crc_ind
.
number_crcs
;
j
++
)
{
...
@@ -139,17 +169,16 @@ void handle_nr_ulsch(NR_UL_IND_t *UL_info)
...
@@ -139,17 +169,16 @@ 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 */
//Gokul
nr_rx_sdu
(
UL_info
->
module_id
,
// nr_rx_sdu(UL_info->module_id,
UL_info
->
CC_id
,
// UL_info->CC_id,
UL_info
->
rx_ind
.
sfn
,
// UL_info->rx_ind.sfn,
UL_info
->
rx_ind
.
slot
,
// UL_info->rx_ind.slot,
rx
->
rnti
,
// rx->rnti,
crc
->
tb_crc_status
?
NULL
:
rx
->
pdu
,
// crc->tb_crc_status ? NULL : rx->pdu,
rx
->
pdu_length
,
// rx->pdu_length,
rx
->
timing_advance
,
// rx->timing_advance,
rx
->
ul_cqi
,
// rx->ul_cqi,
rx
->
rssi
);
// rx->rssi);
//handle_nr_ul_harq(UL_info->module_id, UL_info->frame, UL_info->slot, crc);
//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++)
...
@@ -170,6 +199,7 @@ void handle_nr_ulsch(NR_UL_IND_t *UL_info)
...
@@ -170,6 +199,7 @@ void handle_nr_ulsch(NR_UL_IND_t *UL_info)
UL_info
->
rx_ind
.
sfn
,
UL_info
->
rx_ind
.
sfn
,
UL_info
->
rx_ind
.
slot
);
UL_info
->
rx_ind
.
slot
);
}
}
}
}
}
void
NR_UL_indication
(
NR_UL_IND_t
*
UL_info
)
{
void
NR_UL_indication
(
NR_UL_IND_t
*
UL_info
)
{
...
...
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