Commit 767e2438 authored by Florian Kaltenberger's avatar Florian Kaltenberger

Merge branch 'feature-31-ff-scheduler-api' of...

Merge branch 'feature-31-ff-scheduler-api' of https://gitlab.eurecom.fr/oai/openairinterface5g into feature-31-ff-scheduler-api
parents 0a37b83f f905b4fb
......@@ -201,7 +201,7 @@ printf("MAC CONFIG lcid %d group %d\n", (int)logicalChannelIdentity, (int)*logic
lc.nr_vendorSpecificList = 0;
lc.vendorSpecificList = NULL;
lcs.logicalChannelIdentity = 1;
lcs.logicalChannelIdentity = logicalChannelIdentity;
lcs.logicalChannelGroup = *logicalChannelConfig->ul_SpecificParameters->logicalChannelGroup;
lcs.direction = DIR_BOTH; /* TODO: not necessarily */
lcs.qosBearerType = QBT_NON_GBR; /* TODO: not necessarily */
......
......@@ -71,7 +71,7 @@
#include "SCellToAddMod-r10.h"
#endif
#ifdef FAPI
#if FAPI
#include "ff-mac.h"
#endif
......@@ -920,7 +920,7 @@ typedef struct {
/// processing time of eNB ULSCH reception
time_stats_t rx_ulsch_sdu; // include rlc_data_ind
#ifdef FAPI
#if FAPI
/// fapi interface handler
fapi_interface_t *fapi;
#endif
......
......@@ -187,6 +187,7 @@ static struct {
/* TODO: do it per CC */
static struct {
struct {
int reception_frame; /* the frame where the ACK/NACK has been received */
int reception_subframe; /* the subframe where the ACK/NACK has been received */
int rnti;
int ack;
......@@ -229,6 +230,7 @@ printf("GOT UPLINK ack %d for rnti %x (f/sf %d/%d)\n", ack, rnti, frame, subfram
LOG_E(MAC, "fapi_ul_ack_nack: full! (f/sf %d/%d)\n", frame, subframe);
abort();
}
fapi_ul_ack_nack_data[subframe].ack[pos].reception_frame = frame;
fapi_ul_ack_nack_data[subframe].ack[pos].reception_subframe = subframe;
fapi_ul_ack_nack_data[subframe].ack[pos].rnti = rnti;
fapi_ul_ack_nack_data[subframe].ack[pos].ack = ack;
......@@ -978,7 +980,8 @@ printf("FAPI to MAC downlink DCI_pdu[%d]->num_pdcch_symbols %d f/sf %d/%d\n", cc
ulreq.ulInfoList = ulinfo;
for (i = 0; i < ulreq.nr_ulInfoList; i++) {
printf("MAC to FAPI uplink acknack ue %x f/sf %d/%d ulsf %d [reception_subframe %d] ack %d\n", fapi_ul_ack_nack_data[ulsf].ack[i].rnti, frameP, subframeP, ulsf, fapi_ul_ack_nack_data[ulsf].ack[i].reception_subframe, fapi_ul_ack_nack_data[ulsf].ack[i].ack);
ulinfo[i].puschTransmissionTimestamp = fapi_ul_ack_nack_data[ulsf].ack[i].reception_subframe;
ulinfo[i].puschTransmissionTimestamp = fapi_ul_ack_nack_data[ulsf].ack[i].reception_frame * 16
+ fapi_ul_ack_nack_data[ulsf].ack[i].reception_subframe;
ulinfo[i].rnti = fapi_ul_ack_nack_data[ulsf].ack[i].rnti;
ulinfo[i].receptionStatus = fapi_ul_ack_nack_data[ulsf].ack[i].ack == 1 ? Ok : NotOk;
ulinfo[i].tpc = 0; /* TODO */
......
......@@ -65,7 +65,7 @@
# include "intertask_interface.h"
#endif
#ifdef FAPI
#if FAPI
#include "ff-mac.h"
#endif
......@@ -419,7 +419,7 @@ set_ul_DAI(
}
}
#ifdef FAPI
#if FAPI
//------------------------------------------------------------------------------
void
......@@ -447,30 +447,6 @@ schedule_ue_spec(
void *DLSCH_dci;
DCI_PDU *DCI_pdu = &eNB->common_channels[0 /* CC_id */].DCI_pdu;
int loop = 10 * 20;
while (loop) {
req.sfnSf = frameP * 16 + subframeP;
req.nr_dlInfoList = 0;
req.dlInfoList = NULL;
req.nr_vendorSpecificList = 0;
req.vendorSpecificList = NULL;
LOG_I(MAC, "calling SchedDlTriggerReq\n");
SchedDlTriggerReq(fapi->sched, &req);
LOG_I(MAC, "calling SchedDlConfigInd\n");
SchedDlConfigInd(fapi, &ind);
LOG_I(MAC, "SchedDlConfigInd returns ind.nr_buildDataList %d\n", ind.nr_buildDataList);
LOG_I(MAC, "SchedDlConfigInd returns ind.nr_buildRARList %d\n", ind.nr_buildRARList);
LOG_I(MAC, "SchedDlConfigInd returns ind.nr_buildBroadcastList %d\n", ind.nr_buildBroadcastList);
subframeP++;
if (subframeP == 10) {
subframeP = 0;
frameP++;
if (frameP == 1024) frameP = 0;
}
loop--;
}
exit(0);
/* let's only schedule subframe 2 for the moment */
if (subframeP != 2) return;
......@@ -1674,7 +1650,7 @@ schedule_ue_spec(
//------------------------------------------------------------------------------
void
#ifdef FAPI
#if FAPI
fill_DLSCH_dci_old(
#else
fill_DLSCH_dci(
......@@ -1995,7 +1971,7 @@ fill_DLSCH_dci(
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_FILL_DLSCH_DCI,VCD_FUNCTION_OUT);
}
#ifdef FAPI
#if FAPI
//------------------------------------------------------------------------------
void
......
#ifndef FF_MAC_CALLBACK_H
#define FF_MAC_CALLBACK_H
/*!
* @ingroup _fapi
*/
#if defined (__cplusplus)
extern "C" {
#endif
/* these are the callback function types from the scheduler to openair */
/* sched */
typedef void (SchedDlConfigInd_callback_t)(void *callback_data, const struct SchedDlConfigIndParameters *params);
typedef void (SchedUlConfigInd_callback_t)(void *callback_data, const struct SchedUlConfigIndParameters *params);
/* csched */
typedef void (CschedCellConfigCnf_callback_t)(void *callback_data, const struct CschedCellConfigCnfParameters *params);
typedef void (CschedUeConfigCnf_callback_t)(void *callback_data, const struct CschedUeConfigCnfParameters *params);
typedef void (CschedLcConfigCnf_callback_t)(void *callback_data, const struct CschedLcConfigCnfParameters *params);
typedef void (CschedLcReleaseCnf_callback_t)(void *callback_data, const struct CschedLcReleaseCnfParameters *params);
typedef void (CschedUeReleaseCnf_callback_t)(void *callback_data, const struct CschedUeReleaseCnfParameters *params);
typedef void (CschedUeConfigUpdateInd_callback_t)(void *callback_data, const struct CschedUeConfigUpdateIndParameters *params);
typedef void (CschedCellConfigUpdateInd_callback_t)(void *callback_data, const struct CschedCellConfigUpdateIndParameters *params);
#if defined (__cplusplus)
}
#endif
#endif /* FF_MAC_CALLBACK_H */
#ifndef FF_MAC_CALLBACK_H
#define FF_MAC_CALLBACK_H
/*!
* @ingroup _fapi
*/
#if defined (__cplusplus)
extern "C" {
#endif
/* these are the callback function types from the scheduler to openair */
/* sched */
typedef void (SchedDlConfigInd_callback_t)(void *callback_data, const struct SchedDlConfigIndParameters *params);
typedef void (SchedUlConfigInd_callback_t)(void *callback_data, const struct SchedUlConfigIndParameters *params);
/* csched */
typedef void (CschedCellConfigCnf_callback_t)(void *callback_data, const struct CschedCellConfigCnfParameters *params);
typedef void (CschedUeConfigCnf_callback_t)(void *callback_data, const struct CschedUeConfigCnfParameters *params);
typedef void (CschedLcConfigCnf_callback_t)(void *callback_data, const struct CschedLcConfigCnfParameters *params);
typedef void (CschedLcReleaseCnf_callback_t)(void *callback_data, const struct CschedLcReleaseCnfParameters *params);
typedef void (CschedUeReleaseCnf_callback_t)(void *callback_data, const struct CschedUeReleaseCnfParameters *params);
typedef void (CschedUeConfigUpdateInd_callback_t)(void *callback_data, const struct CschedUeConfigUpdateIndParameters *params);
typedef void (CschedCellConfigUpdateInd_callback_t)(void *callback_data, const struct CschedCellConfigUpdateIndParameters *params);
#if defined (__cplusplus)
}
#endif
#endif /* FF_MAC_CALLBACK_H */
......@@ -32,7 +32,7 @@
* \date March 2015
* \version 1.0
* \email: florian.kaltenberger@eurecom.fr
* @ingroup _fapi
* @ingroup _fapi
*/
......@@ -314,7 +314,9 @@ struct BuildBroadcastListElement_s
*/
struct UlInfoListElement_s
{
uint16_t puschTransmissionTimestamp; //this timestamp identifies PUSCH transmission to which below information relates to
uint16_t puschTransmissionTimestamp; //this timestamp identifies PUSCH transmission
//to which below information relates to
//format is frame*16+subframe
uint16_t rnti;
uint16_t ulReception[MAX_LC_LIST+1];
enum ReceptionStatus_e
......
......@@ -356,7 +356,7 @@ int mac_top_init(int eMBMS_active, char *uecap_xer, uint8_t cba_group_active, ui
#endif
//end ALU's algo
#ifdef FAPI
#if FAPI
/* setup FAPI interface */
/* this should be done differently/somewhere else */
const Enb_properties_array_t *conf = enb_config_get();
......
......@@ -64,7 +64,7 @@ eNBs =
srs_ackNackST =;
srs_MaxUpPts =;*/
pusch_p0_Nominal = -108;
pusch_p0_Nominal = -90; //108;
pusch_alpha = "AL1";
pucch_p0_Nominal = -96; //-108;
msg3_delta_Preamble = 6;
......
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