X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fcm%2Fmac_sch_interface.h;h=daf8815193240c1c1ee21b4d1cbe7e998511701b;hb=eb178a8cc45a9cebc65df73f128f88b3a3dfefbb;hp=78faf021af2f040624b58580e73ca97f5d9df106;hpb=6f769128e3fa5a83ee92e668ef9ac152c96b3200;p=o-du%2Fl2.git diff --git a/src/cm/mac_sch_interface.h b/src/cm/mac_sch_interface.h index 78faf021a..daf881519 100644 --- a/src/cm/mac_sch_interface.h +++ b/src/cm/mac_sch_interface.h @@ -25,10 +25,6 @@ #define EVENT_CRC_IND_TO_SCH 6 #define EVENT_DL_RLC_BO_INFO_TO_SCH 7 -/* selector */ -#define MAC_SCH_LC_SELECTOR 0 -#define MAC_SCH_TC_SELECTOR 1 -#define MAC_SCH_LWLC_SELECTOR 2 /*macros*/ #define NO_SSB 0 @@ -79,6 +75,19 @@ typedef enum RSP_NOK }schMacRsp; +typedef struct timeDomainAlloc +{ + uint16_t startSymb; + uint16_t numSymb; +}TimeDomainAlloc; + +typedef struct freqDomainAlloc +{ + uint16_t startPrb; + uint16_t numPrb; +}FreqDomainAlloc; + + typedef struct { uint32_t ssbPbchPwr; /* SSB block power */ @@ -91,10 +100,9 @@ typedef struct typedef struct bwpCfg { - uint8_t subcarrierSpacing; - uint8_t cyclicPrefix; - uint16_t BWPSize; - uint16_t BWPStart; + uint8_t subcarrierSpacing; + uint8_t cyclicPrefix; + FreqDomainAlloc freqAlloc; }BwpCfg; typedef struct prg @@ -131,22 +139,23 @@ typedef struct dmrsInfo uint8_t scid; uint8_t numDmrsCdmGrpsNoData; uint16_t dmrsPorts; + uint8_t mappingType; + uint8_t nrOfDmrsSymbols; + uint8_t dmrsAddPos; } DmrsInfo; typedef struct pdschFreqAlloc { - uint8_t resourceAlloc; + uint8_t resourceAllocType; /* since we are using type-1, hence rbBitmap excluded */ - uint16_t rbStart; - uint16_t rbSize; + FreqDomainAlloc freqAlloc; uint8_t vrbPrbMapping; } PdschFreqAlloc; typedef struct pdschTimeAlloc { - uint8_t rowIndex; - uint8_t startSymbolIndex; - uint8_t numSymbols; + uint8_t rowIndex; + TimeDomainAlloc timeAlloc; } PdschTimeAlloc; typedef struct txPowerPdschInfo @@ -157,19 +166,19 @@ typedef struct txPowerPdschInfo typedef struct pdschCfg { - uint16_t pduBitmap; - uint16_t rnti; - uint16_t pduIndex; - uint8_t numCodewords; - CodewordInfo codeword[MAX_CODEWORDS]; - uint16_t dataScramblingId; - uint8_t numLayers; - uint8_t transmissionScheme; - uint8_t refPoint; - DmrsInfo dmrs; - PdschFreqAlloc freqAlloc; - PdschTimeAlloc timeAlloc; - BeamformingInfo beamPdschInfo; + uint16_t pduBitmap; + uint16_t rnti; + uint16_t pduIndex; + uint8_t numCodewords; + CodewordInfo codeword[MAX_CODEWORDS]; + uint16_t dataScramblingId; + uint8_t numLayers; + uint8_t transmissionScheme; + uint8_t refPoint; + DmrsInfo dmrs; + PdschFreqAlloc pdschFreqAlloc; + PdschTimeAlloc pdschTimeAlloc; + BeamformingInfo beamPdschInfo; TxPowerPdschInfo txPdschPower; } PdschCfg; /* SIB1 PDSCH structures end */ @@ -239,26 +248,26 @@ typedef struct typedef struct schRachCfg { - uint8_t prachCfgIdx; /* PRACH config idx */ - uint8_t prachSubcSpacing; /* Subcarrier spacing of RACH */ + uint8_t prachCfgIdx; /* PRACH config idx */ + uint8_t prachSubcSpacing; /* Subcarrier spacing of RACH */ uint16_t msg1FreqStart; /* Msg1-FrequencyStart */ - uint8_t msg1Fdm; /* PRACH FDM (1,2,4,8) */ + uint8_t msg1Fdm; /* PRACH FDM (1,2,4,8) */ + uint8_t rootSeqLen; /* root sequence length */ uint16_t rootSeqIdx; /* Root sequence index */ uint8_t numRootSeq; /* Number of root sequences required for FD */ uint16_t k1; /* Frequency Offset for each FD */ - uint8_t ssbPerRach; /* SSB per RACH occassion */ - uint8_t prachMultCarrBand; /* Presence of Multiple carriers in Band */ - uint8_t raContResTmr; /* RA Contention Resoultion Timer */ - uint8_t rsrpThreshSsb; /* RSRP Threshold SSB */ - uint8_t raRspWindow; /* RA Response Window */ + uint8_t ssbPerRach; /* SSB per RACH occassion */ + uint8_t prachMultCarrBand; /* Presence of Multiple carriers in Band */ + uint8_t raContResTmr; /* RA Contention Resoultion Timer */ + uint8_t rsrpThreshSsb; /* RSRP Threshold SSB */ + uint8_t raRspWindow; /* RA Response Window */ }SchRachCfg; typedef struct schBwpParams { - uint16_t firstPrb; - uint16_t numPrb; - uint8_t scs; - uint8_t cyclicPrefix; + FreqDomainAlloc freqAlloc; + uint8_t scs; + uint8_t cyclicPrefix; }SchBwpParams; typedef struct schCandidatesInfo @@ -294,6 +303,12 @@ typedef struct schPdschCfgCmn uint8_t lengthSymbol; }SchPdschCfgCmn; +typedef struct schPucchCfgCmn +{ + uint8_t pucchResourceCommon; + uint8_t pucchGroupHopping; +}SchPucchCfgCmn; + typedef struct schPuschCfgCmn { uint8_t k2; @@ -312,21 +327,22 @@ typedef struct schBwpDlCfg typedef struct schBwpUlCfg { SchBwpParams bwp; + SchPucchCfgCmn pucchCommon; SchPuschCfgCmn puschCommon; }SchBwpUlCfg; typedef struct schCellCfg { - uint16_t cellId; /* Cell Id */ - uint16_t phyCellId; /* Physical cell id */ - uint8_t bandwidth; /* Supported B/W */ - DuplexMode dupMode; /* Duplex type: TDD/FDD */ - SchSsbCfg ssbSchCfg; /* SSB config */ - SchSib1Cfg sib1SchCfg; /* SIB1 config */ - SchRachCfg schRachCfg; /* PRACH config */ - SchBwpDlCfg schInitialDlBwp; /* Initial DL BWP */ - SchBwpUlCfg schInitialUlBwp; /* Initial UL BWP */ - uint8_t puschMu; /* PUSCH MU */ + uint16_t cellId; /* Cell Id */ + uint16_t phyCellId; /* Physical cell id */ + uint8_t bandwidth; /* Supported B/W */ + DuplexMode dupMode; /* Duplex type: TDD/FDD */ + SchSsbCfg ssbSchCfg; /* SSB config */ + SchSib1Cfg sib1SchCfg; /* SIB1 config */ + SchRachCfg schRachCfg; /* PRACH config */ + SchBwpDlCfg schInitialDlBwp; /* Initial DL BWP */ + SchBwpUlCfg schInitialUlBwp; /* Initial UL BWP */ + uint8_t puschMu; /* PUSCH MU */ }SchCellCfg; typedef struct schCellCfgCfm @@ -335,21 +351,9 @@ typedef struct schCellCfgCfm schMacRsp rsp; }SchCellCfgCfm; -typedef struct timeDomainAlloc -{ - uint16_t startSymb; - uint16_t numSymb; -}TimeDomainAlloc; - -typedef struct freqDomainAlloc -{ - uint16_t startPrb; - uint16_t numPrb; -}FreqDomainAlloc; - typedef struct ssbInfo { - uint8_t ssbIdx; /* SSB Index */ + uint8_t ssbIdx; /* SSB Index */ TimeDomainAlloc tdAlloc; /* Time domain allocation */ FreqDomainAlloc fdAlloc; /* Freq domain allocation */ }SsbInfo; @@ -389,14 +393,13 @@ typedef struct dlBrdcstAlloc typedef struct rarInfo { - uint16_t raRnti; - uint8_t RAPID; - uint16_t ta; - uint16_t msg3StartRb; - uint8_t msg3NumRb; - uint16_t tcrnti; - uint8_t rarPdu[8]; - uint8_t rarPduLen; + uint16_t raRnti; + uint8_t RAPID; + uint16_t ta; + FreqDomainAlloc msg3FreqAlloc; + uint16_t tcrnti; + uint8_t rarPdu[8]; + uint8_t rarPduLen; }RarInfo; typedef struct rarAlloc @@ -409,6 +412,7 @@ typedef struct rarAlloc typedef struct msg4Info { + uint16_t crnti; uint8_t ndi; uint8_t harqProcNum; uint8_t dlAssignIdx; @@ -416,9 +420,8 @@ typedef struct msg4Info uint8_t pucchResInd; uint8_t harqFeedbackInd; uint8_t dciFormatId; - uint16_t crnti; uint8_t *msg4Pdu; - uint8_t msg4PduLen; + uint16_t msg4PduLen; }Msg4Info; typedef struct msg4Alloc @@ -470,8 +473,23 @@ typedef struct schPuschInfo FreqDomainAlloc fdAlloc; /* Freq domain allocation */ TimeDomainAlloc tdAlloc; /* Time domain allocation */ TbInfo tbInfo; /* TB info */ + uint8_t dmrsMappingType; + uint8_t nrOfDmrsSymbols; + uint8_t dmrsAddPos; }SchPuschInfo; +typedef struct schPucchInfo +{ + uint16_t rnti; + uint8_t pucchFormat; + FreqDomainAlloc fdAlloc; /* Freq domain allocation */ + TimeDomainAlloc tdAlloc; /* Time domain allocation */ + uint8_t srFlag; + uint8_t harqFlag; + uint8_t numHarqBits; + uint8_t uciFlag; + uint8_t numUciBits; +}SchPucchInfo; typedef struct ulSchedInfo { @@ -481,6 +499,7 @@ typedef struct ulSchedInfo uint8_t dataType; /* Type of info being scheduled */ PrachSchInfo prachSchInfo; /* Prach scheduling info */ SchPuschInfo schPuschInfo; /* Pusch scheduling info */ + SchPucchInfo schPucchInfo; /* Pusch scheduling info */ }UlSchedInfo; typedef struct rachIndInfo