X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fcm%2Fdu_app_mac_inf.h;h=3b1c5585ed3c35facc1595e8e16c900ef913e768;hb=e006592159c0a16a4c2f24cc50f712ff9461a000;hp=2f2a4e67083f207b01ff3afe0285a1b382f4cf4e;hpb=80a4fa9d0aede180472530cab6efa6acc925424b;p=o-du%2Fl2.git diff --git a/src/cm/du_app_mac_inf.h b/src/cm/du_app_mac_inf.h index 2f2a4e670..3b1c5585e 100644 --- a/src/cm/du_app_mac_inf.h +++ b/src/cm/du_app_mac_inf.h @@ -30,6 +30,9 @@ #define SIB1_REPETITION_PERIOD 20 #define CORESET_0_INDEX 0 #define SEARCHSPACE_0_INDEX 0 +#define SEARCHSPACE_1_INDEX 1 +#define SS_MONITORING_SLOT_SL1 0 /* all slots */ +#define SS_MONITORING_SYMBOL 0x2000; /* symbol-0, set 14th bit */ #define SIB1_MCS 4 /* Macros for coupling */ @@ -43,6 +46,9 @@ #define EVENT_MAC_CELL_START_REQ 202 #define EVENT_MAC_CELL_STOP_REQ 203 #define EVENT_MAC_SLOT_IND 204 +#define EVENT_MAC_STOP_IND 205 +#define EVENT_MAC_UL_CCCH_IND 206 +#define EVENT_MAC_DL_CCCH_IND 207 typedef enum { @@ -112,6 +118,12 @@ typedef enum SSB_PRDCTY_MS_160 }SSBPeriod; +typedef enum +{ + RRC_REJECT, + RRC_SETUP +}DlCcchMsgType; + typedef struct carrierCfg { Bool pres; @@ -146,18 +158,24 @@ typedef struct fdmInfo U8 zeroCorrZoneCfg; /* Zero correlation zone cofig */ U8 numUnusedRootSeq; /* Number of unused root sequence */ U8 *unsuedRootSeq; /* Unused root sequence per FD */ -}FdmInfo; +}PrachFdmInfo; typedef struct prachCfg { Bool pres; + uint8_t prachCfgIdx; /* PRACH Cfg Index */ PrachSeqLen prachSeqLen; /* RACH Sequence length: Long/short */ - U8 prachSubcSpacing; /* Subcarrier spacing of RACH */ + uint8_t prachSubcSpacing; /* Subcarrier spacing of RACH */ RstSetCfg prachRstSetCfg; /* PRACH restricted set config */ - U8 prachFdm; /* PRACH FDM (1,2,4,8) */ - FdmInfo fdm[8]; - U8 ssbPerRach; /* SSB per RACH occassion */ - Bool prachMultCarrBand; /* Multiple carriers in Band */ + uint16_t msg1FreqStart; /* Msg1-FrequencyStart */ + uint8_t msg1Fdm; /* PRACH FDM (1,2,4,8) */ + PrachFdmInfo fdm[8]; /* FDM info */ + uint8_t ssbPerRach; /* SSB per RACH occassion */ + Bool prachMultCarrBand; /* Multiple carriers in Band */ + uint8_t prachRestrictedSet; /* Support for PRACH restricted set */ + uint8_t raContResTmr; /* RA Contention Resoultion Timer */ + uint8_t rsrpThreshSsb; /* RSRP Threshold SSB */ + uint8_t raRspWindow; /* RA Response Window */ }PrachCfg; typedef struct tddCfg @@ -178,6 +196,70 @@ typedef struct sib1CellCfg uint16_t sib1Mcs; } Sib1CellCfg; +typedef struct bwpParams +{ + uint16_t firstPrb; + uint16_t numPrb; + uint8_t scs; + uint8_t cyclicPrefix; +}BwpParams; + +typedef struct candidatesInfo +{ + uint8_t aggLevel1; + uint8_t aggLevel2; + uint8_t aggLevel4; + uint8_t aggLevel8; + uint8_t aggLevel16; +}CandidatesInfo; + +typedef struct searchSpaceCfg +{ + uint8_t searchSpaceId; + uint8_t coresetId; + uint16_t monitoringSlot; + uint16_t duration; + uint16_t monitoringSymbol; + CandidatesInfo candidate; +}SearchSpaceCfg; + +typedef struct pdcchConfigCommon +{ + SearchSpaceCfg raSearchSpace; +}PdcchConfigCommon; + +typedef struct pdschConfigCommon +{ + uint8_t k0; + uint8_t mappingType; + uint8_t startSymbol; + uint8_t lengthSymbol; +}PdschConfigCommon; + +typedef struct puschConfigCommon +{ + /* PUSCH-TimeDomainResourceAllocation info */ + uint8_t k2; + uint8_t mappingType; + uint8_t startSymbol; + uint8_t lengthSymbol; +}PuschConfigCommon; + +typedef struct bwpDlConfig +{ + BwpParams bwp; + PdcchConfigCommon pdcchCommon; + PdschConfigCommon pdschCommon; +}BwpDlConfig; + +typedef struct bwpUlConfig +{ + BwpParams bwp; + // rach config common sent in PrachCfg + // pucch info not required + PuschConfigCommon puschCommon; +}BwpUlConfig; + typedef struct macCellCfg { U16 transId; @@ -194,6 +276,8 @@ typedef struct macCellCfg TDDCfg tddCfg; /* TDD periodicity and slot configuration */ RSSIMeasUnit rssiUnit; /* RSSI measurement unit */ Sib1CellCfg sib1Cfg; + BwpDlConfig initialDlBwp; + BwpUlConfig initialUlBwp; }MacCellCfg; typedef struct macCellCfgCfm @@ -204,6 +288,7 @@ typedef struct macCellCfgCfm typedef struct slotInfo { + uint16_t cellId; uint16_t sfn; uint16_t slot; }SlotInfo; @@ -218,55 +303,93 @@ typedef struct macCellStopInfo uint16_t cellId; }MacCellStopInfo; +typedef struct ulCcchInd +{ + uint16_t cellId; + uint16_t crnti; + uint8_t *ulCcchMsg; +}UlCcchIndInfo; + +typedef struct dlCcchInd +{ + uint16_t cellId; + uint16_t crnti; + DlCcchMsgType msgType; + uint8_t *dlCcchMsg; +}DlCcchIndInfo; + + /* Functions for slot Ind from MAC to DU APP*/ typedef uint16_t (*DuMacSlotInd) ARGS(( Pst *pst, SlotInfo *slotInfo )); -extern uint16_t packMacSlotInd(Pst *pst, SlotInfo *slotInfo ); -extern uint16_t unpackMacSlotInd(DuMacSlotInd func, Pst *pst, Buffer *mBuf); -extern uint16_t duHandleSlotInd(Pst *pst, SlotInfo *slotInfo); +/* Functions for stop Ind from MAC to DU APP*/ +typedef uint16_t (*DuMacStopInd) ARGS(( + Pst *pst, + MacCellStopInfo *cellId )); /* Functions for mac cell start req */ typedef uint16_t (*DuMacCellStartReq) ARGS(( Pst *pst, MacCellStartInfo *cellStartInfo )); -extern uint16_t packMacCellStartReq(Pst *pst, MacCellStartInfo *cellStartInfo); -extern uint16_t unpackMacCellStartReq(DuMacCellStartReq func, Pst *pst, Buffer *mBuf); -extern uint16_t MacHdlCellStartReq(Pst *pst, MacCellStartInfo *cellStartInfo); - /* Functions for mac cell stop request */ typedef uint16_t (*DuMacCellStopReq) ARGS(( Pst *pst, MacCellStopInfo *cellStopInfo )); -extern uint16_t packMacCellStopReq(Pst *pst, MacCellStopInfo *cellStopInfo); -extern uint16_t unpackMacCellStopReq(DuMacCellStopReq func, Pst *pst, Buffer *mBuf); -extern uint16_t MacHdlCellStopReq(Pst *pst, MacCellStopInfo *cellStopInfo); - /* Function pointers for packing macCellCfg Request and Confirm */ -typedef uint16_t (*packMacCellCfgReq) ARGS(( +typedef int (*packMacCellCfgReq) ARGS(( Pst *pst, MacCellCfg *macCellCfg )); -typedef uint16_t (*packMacCellCfgConfirm) ARGS(( +typedef int (*packMacCellCfgConfirm) ARGS(( Pst *pst, MacCellCfgCfm *macCellCfgCfm )); -typedef uint16_t (*DuMacCellCfgReq) ARGS(( +typedef int (*DuMacCellCfgReq) ARGS(( Pst *pst, MacCellCfg *macCellCfg)); -typedef uint16_t (*DuMacCellCfgCfm) ARGS(( +typedef int (*DuMacCellCfgCfm) ARGS(( + Pst *pst, MacCellCfgCfm *macCellCfgCfm )); -extern uint16_t packMacCellCfg(Pst *pst, MacCellCfg *macCellCfg); +/* Functions for UL CCCH Ind from MAC to DU APP*/ +typedef uint16_t (*DuMacUlCcchInd) ARGS(( + Pst *pst, + UlCcchIndInfo *ulCcchIndInfo )); + +/* Functions for DL CCCH Ind from DU APP to MAC*/ +typedef uint16_t (*DuMacDlCcchInd) ARGS(( + Pst *pst, + DlCcchIndInfo *dlCcchIndInfo )); + +extern uint16_t packMacSlotInd(Pst *pst, SlotInfo *slotInfo ); +extern uint16_t unpackMacSlotInd(DuMacSlotInd func, Pst *pst, Buffer *mBuf); +extern uint16_t duHandleSlotInd(Pst *pst, SlotInfo *slotInfo); +extern uint16_t packMacCellStartReq(Pst *pst, MacCellStartInfo *cellStartInfo); +extern uint16_t unpackMacCellStartReq(DuMacCellStartReq func, Pst *pst, Buffer *mBuf); +extern uint16_t MacHdlCellStartReq(Pst *pst, MacCellStartInfo *cellStartInfo); +extern uint16_t packMacCellStopReq(Pst *pst, MacCellStopInfo *cellStopInfo); +extern uint16_t unpackMacCellStopReq(DuMacCellStopReq func, Pst *pst, Buffer *mBuf); +extern uint16_t MacHdlCellStopReq(Pst *pst, MacCellStopInfo *cellStopInfo); +extern int packMacCellCfg(Pst *pst, MacCellCfg *macCellCfg); extern int MacHdlCellCfgReq(Pst *pst, MacCellCfg *macCellCfg); extern void cmUnpackLwLcMacCellCfg(DuMacCellCfgReq func, Pst *pst, Buffer *mBuf); -extern uint16_t unpackMacCellCfgCfm(DuMacCellCfgCfm func, Pst *pst, Buffer *mBuf); -extern uint16_t duHandleMacCellCfgCfm(MacCellCfgCfm *macCellCfgCfm); - +extern int unpackMacCellCfgCfm(DuMacCellCfgCfm func, Pst *pst, Buffer *mBuf); +extern int duHandleMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm); +extern uint16_t packMacStopInd(Pst *pst, MacCellStopInfo *cellId); +extern uint16_t unpackMacStopInd(DuMacStopInd func, Pst *pst, Buffer *mBuf); +extern uint16_t duHandleStopInd(Pst *pst, MacCellStopInfo *cellId); +extern uint16_t packMacUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo); +extern uint16_t unpackMacUlCcchInd(DuMacUlCcchInd func, Pst *pst, Buffer *mBuf); +extern uint16_t duHandleUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo); +extern uint16_t packMacDlCcchInd(Pst *pst, DlCcchIndInfo *dlCcchIndInfo); +extern uint16_t unpackMacDlCcchInd(DuMacDlCcchInd func, Pst *pst, Buffer *mBuf); +extern uint16_t MacHdlDlCcchInd(Pst *pst, DlCcchIndInfo *dlCcchIndInfo); +uint8_t sendStopIndMacToDuApp(); #endif /**********************************************************************