Commit fe613541 authored by Robert Schmidt's avatar Robert Schmidt

Merge branch 'NR_SL_FAPI' into 'develop'

Sidelink MAC-PHY interface definition

See merge request oai/openairinterface5g!2234
parents 578fbfb9 e4594551
This diff is collapsed.
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
#include "nfapi_nr_interface_scf.h" #include "nfapi_nr_interface_scf.h"
#include "openair2/NR_PHY_INTERFACE/NR_IF_Module.h" #include "openair2/NR_PHY_INTERFACE/NR_IF_Module.h"
#include "NR_Packet_Drop.h" #include "NR_Packet_Drop.h"
#include "nfapi/open-nFAPI/nfapi/public_inc/sidelink_nr_ue_interface.h"
extern slot_rnti_mcs_s slot_rnti_mcs[NUM_NFAPI_SLOT]; extern slot_rnti_mcs_s slot_rnti_mcs[NUM_NFAPI_SLOT];
...@@ -110,6 +111,35 @@ typedef struct { ...@@ -110,6 +111,35 @@ typedef struct {
} nr_uplink_indication_t; } nr_uplink_indication_t;
typedef struct {
/// module id
module_id_t module_id;
/// gNB index
uint32_t gNB_index;
/// component carrier id
int cc_id;
/// frame
frame_t frame_rx;
/// slot rx
uint32_t slot_rx;
/// frame tx
frame_t frame_tx;
/// slot tx
uint32_t slot_tx;
/// NR UE FAPI-like P7 message, direction: L1 to L2
/// data reception indication structure
sl_nr_rx_indication_t *rx_ind;
//SCI received by PHY sent to MAC here
sl_nr_sci_indication_t *sci_ind;
/// PHY specific data structure that can be passed on to L2 via nr_sidelink_indication_t and
/// back to L1 via the nr_scheduled_response_t
void *phy_data;
} nr_sidelink_indication_t;
// Downlink subframe P7 // Downlink subframe P7
...@@ -130,6 +160,12 @@ typedef struct { ...@@ -130,6 +160,12 @@ typedef struct {
/// uplink transmission configuration request structure /// uplink transmission configuration request structure
fapi_nr_ul_config_request_t *ul_config; fapi_nr_ul_config_request_t *ul_config;
// Sidelink RX configuration request
sl_nr_rx_config_request_t *sl_rx_config;
// Sidelink TX configuration request
sl_nr_tx_config_request_t *sl_tx_config;
/// data transmission request structure /// data transmission request structure
fapi_nr_tx_request_t *tx_request; fapi_nr_tx_request_t *tx_request;
...@@ -150,6 +186,18 @@ typedef struct { ...@@ -150,6 +186,18 @@ typedef struct {
} nr_phy_config_t; } nr_phy_config_t;
typedef struct {
/// module id
uint8_t Mod_id;
/// component carrier id
uint8_t CC_id;
/// NR UE FAPI-like P5 message
/// physical layer configuration request structure
sl_nr_phy_config_request_t sl_config_req;
} nr_sl_phy_config_t;
typedef struct { typedef struct {
/// module id /// module id
uint8_t Mod_id; uint8_t Mod_id;
...@@ -170,6 +218,15 @@ typedef struct { ...@@ -170,6 +218,15 @@ typedef struct {
*/ */
typedef int8_t (nr_ue_scheduled_response_f)(nr_scheduled_response_t *scheduled_response); typedef int8_t (nr_ue_scheduled_response_f)(nr_scheduled_response_t *scheduled_response);
/*
* Generic type of an application-defined callback to return various
* types of data to the application.
* EXPECTED RETURN VALUES:
* -1: Failed to consume bytes. Abort the mission.
* Non-negative return values indicate success, and ignored.
*/
typedef int8_t (nr_sl_ue_scheduled_response_f)(nr_scheduled_response_t *sl_scheduled_response);
/* /*
* Generic type of an application-defined callback to return various * Generic type of an application-defined callback to return various
...@@ -180,6 +237,15 @@ typedef int8_t (nr_ue_scheduled_response_f)(nr_scheduled_response_t *scheduled_r ...@@ -180,6 +237,15 @@ typedef int8_t (nr_ue_scheduled_response_f)(nr_scheduled_response_t *scheduled_r
*/ */
typedef int8_t (nr_ue_phy_config_request_f)(nr_phy_config_t *phy_config); typedef int8_t (nr_ue_phy_config_request_f)(nr_phy_config_t *phy_config);
/*
* Generic type of an application-defined callback to return various
* types of data to the application.
* EXPECTED RETURN VALUES:
* -1: Failed to consume bytes. Abort the mission.
* Non-negative return values indicate success, and ignored.
*/
typedef int8_t (nr_sl_ue_phy_config_request_f)(nr_sl_phy_config_t *sl_phy_config);
/* /*
* Generic type of an application-defined callback to return various * Generic type of an application-defined callback to return various
* types of data to the application. * types of data to the application.
...@@ -205,6 +271,16 @@ typedef int (nr_ue_dl_indication_f)(nr_downlink_indication_t *dl_info); ...@@ -205,6 +271,16 @@ typedef int (nr_ue_dl_indication_f)(nr_downlink_indication_t *dl_info);
*/ */
typedef int (nr_ue_ul_indication_f)(nr_uplink_indication_t *ul_info); typedef int (nr_ue_ul_indication_f)(nr_uplink_indication_t *ul_info);
/*
* Generic type of an application-defined callback to return various
* types of data to the application.
* EXPECTED RETURN VALUES:
* -1: Failed to consume bytes. Abort the mission.
* Non-negative return values indicate success, and ignored.
*/
typedef int (nr_ue_sl_indication_f)(nr_sidelink_indication_t *sl_info);
// TODO check this stuff can be reuse of need modification // TODO check this stuff can be reuse of need modification
typedef struct nr_ue_if_module_s { typedef struct nr_ue_if_module_s {
nr_ue_scheduled_response_f *scheduled_response; nr_ue_scheduled_response_f *scheduled_response;
...@@ -212,6 +288,7 @@ typedef struct nr_ue_if_module_s { ...@@ -212,6 +288,7 @@ typedef struct nr_ue_if_module_s {
nr_ue_synch_request_f *synch_request; nr_ue_synch_request_f *synch_request;
nr_ue_dl_indication_f *dl_indication; nr_ue_dl_indication_f *dl_indication;
nr_ue_ul_indication_f *ul_indication; nr_ue_ul_indication_f *ul_indication;
nr_ue_sl_indication_f *sl_indication;
uint32_t cc_mask; uint32_t cc_mask;
uint32_t current_frame; uint32_t current_frame;
uint32_t current_slot; uint32_t current_slot;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment