1 /*******************************************************************************
2 ################################################################################
3 # Copyright (c) [2017-2019] [Radisys] #
5 # Licensed under the Apache License, Version 2.0 (the "License"); #
6 # you may not use this file except in compliance with the License. #
7 # You may obtain a copy of the License at #
9 # http://www.apache.org/licenses/LICENSE-2.0 #
11 # Unless required by applicable law or agreed to in writing, software #
12 # distributed under the License is distributed on an "AS IS" BASIS, #
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
14 # See the License for the specific language governing permissions and #
15 # limitations under the License. #
16 ################################################################################
17 *******************************************************************************/
19 /* Defines APIs exchanged between du_app and cl module of MAC */
23 #define NUM_NUMEROLOGY 5 /* Number of numerology */
25 #define NUM_SSB 1 /* max value is 64 */
26 #define SSB_MASK_SIZE 1 /* SSB mask size is 32bit for sub6 */
27 #define SIB1_REPETITION_PERIOD 20
28 #define CORESET_0_INDEX 0
29 #define CORESET_1_INDEX 1
30 #define CORESET_2_INDEX 2
31 #define CORESET_3_INDEX 3
32 #define CORESET_4_INDEX 4
33 #define SEARCHSPACE_0_INDEX 0
34 #define SEARCHSPACE_1_INDEX 1
35 #define SEARCHSPACE_2_INDEX 2
36 #define SEARCHSPACE_3_INDEX 3
37 #define SEARCHSPACE_4_INDEX 4
38 #define SS_MONITORING_SLOT_SL1 0 /* all slots */
39 #define SS_MONITORING_SYMBOL 0x2000; /* symbol-0, set 14th bit */
41 /* Macro for Ue Context */
42 #define MAX_NUM_SR_CFG_PER_CELL_GRP 8 /* Max number of scheduling request config per cell group */
43 #define MAC_NUM_TAGS 4 /* Max number of timing advance groups */
44 #define MAX_NUM_BWP 4 /* Max number of BWP per serving cell */
45 #define MAX_NUM_CRSET 3 /* Max number of control resource set in add/modify/release list */
46 #define MAX_NUM_SEARCH_SPC 10 /* Max number of search space in add/modify/release list */
47 #define MONITORING_SYMB_WITHIN_SLOT_SIZE 2 /* i.e. 2 bytes because size of monitoring symbols within slot is 14 bits */
48 #define MAX_NUM_DL_ALLOC 16 /* Max number of pdsch time domain downlink allocation */
49 #define MAX_NUM_UL_ALLOC 16 /* Max number of pusch time domain uplink allocation */
50 #define MAX_NUM_SCELL 32
52 /* PUCCH Configuration Macro */
53 #define MAX_NUM_PUCCH_RESRC 128
54 #define MAX_NUM_PUCCH_RESRC_SET 4
55 #define MAX_NUM_PUCCH_PER_RESRC_SET 32
56 #define MAX_NUM_SPATIAL_RELATIONS 8
57 #define MAX_NUM_PUCCH_P0_PER_SET 8
58 #define MAX_NUM_PATH_LOSS_REF_RS 4
59 #define MAX_NUM_DL_DATA_TO_UL_ACK 15
62 #define EVENT_MAC_CELL_CONFIG_REQ 200
63 #define EVENT_MAC_CELL_CONFIG_CFM 201
64 #define EVENT_MAC_CELL_START 202
65 #define EVENT_MAC_CELL_STOP 203
66 #define EVENT_MAC_CELL_UP_IND 204
67 #define EVENT_MAC_STOP_IND 205
68 #define EVENT_MAC_UL_CCCH_IND 206
69 #define EVENT_MAC_DL_CCCH_IND 207
70 #define EVENT_MAC_UE_CREATE_REQ 208
71 #define EVENT_MAC_UE_CREATE_RSP 209
72 #define EVENT_MAC_UE_RECONFIG_REQ 210
73 #define EVENT_MAC_UE_RECONFIG_RSP 211
74 #define EVENT_MAC_UE_DELETE_REQ 212
75 #define EVENT_MAC_UE_DELETE_RSP 213
76 #define EVENT_MAC_CELL_DELETE_REQ 214
77 #define EVENT_MAC_CELL_DELETE_RSP 215
78 #define EVENT_MAC_SLICE_CFG_REQ 216
79 #define EVENT_MAC_SLICE_CFG_RSP 217
80 #define EVENT_MAC_SLICE_RECFG_REQ 218
81 #define EVENT_MAC_SLICE_RECFG_RSP 219
82 #define EVENT_MAC_SLOT_IND 220
84 #define BSR_PERIODIC_TIMER_SF_10 10
85 #define BSR_RETX_TIMER_SF_320 320
86 #define BSR_SR_DELAY_TMR_2560 2560
88 #define GET_PAGING_CYCLE(enmValue, T) { \
89 if (enmValue == 0) T = 32; \
90 else if (enmValue == 1) T = 64; \
91 else if (enmValue == 2) T = 128; \
92 else if (enmValue == 3) T = 256; \
96 #define GET_NUM_PAGING_OCC(enmValue, PO) { \
97 if (enmValue == 0) PO = 4; \
98 else if (enmValue == 1) PO = 2; \
99 else if (enmValue == 2) PO = 1; \
103 #define PAGING_SCHED_DELTA 4
138 MAC_GEN_FULL_PBCH_PAYLD, /* MAC generated the full PBCH Payload */
139 PHY_GEN_TIMING_PBCH_BIT, /* PHY generates the timing PBCH bits */
140 PHY_GEN_FULL_PBCH_PAYLD /* PHY generates full PBCH payload */
152 RESTRICTED_SET_TYPE_A,
153 RESTRICTED_SET_TYPE_B
185 /* Enums for Ue Create Request */
187 /* SR PROHIBIT TIMER */
214 TIME_ALIGNMENT_TIMER_MS_500,
215 TIME_ALIGNMENT_TIMER_MS_750,
216 TIME_ALIGNMENT_TIMER_MS_1280,
217 TIME_ALIGNMENT_TIMER_MS_1920,
218 TIME_ALIGNMENT_TIMER_MS_2560,
219 TIME_ALIGNMENT_TIMER_MS_5120,
220 TIME_ALIGNMENT_TIMER_MS_10240,
221 TIME_ALIGNMENT_TIMER_INFINITY
226 PHR_PERIODIC_TIMER_SF_10,
227 PHR_PERIODIC_TIMER_SF_20,
228 PHR_PERIODIC_TIMER_SF_50,
229 PHR_PERIODIC_TIMER_SF_100,
230 PHR_PERIODIC_TIMER_SF_200,
231 PHR_PERIODIC_TIMER_SF_500,
232 PHR_PERIODIC_TIMER_SF_1000,
233 PHR_PERIODIC_TIMER_INFINITY
238 PHR_PROHIBIT_TIMER_SF_0,
239 PHR_PROHIBIT_TIMER_SF_10,
240 PHR_PROHIBIT_TIMER_SF_20,
241 PHR_PROHIBIT_TIMER_SF_50,
242 PHR_PROHIBIT_TIMER_SF_100,
243 PHR_PROHIBIT_TIMER_SF_200,
244 PHR_PROHIBIT_TIMER_SF_500,
245 PHR_PROHIBIT_TIMER_SF_1000
250 PHR_TX_PWR_FACTOR_CHANGE_DB_1,
251 PHR_TX_PWR_FACTOR_CHANGE_DB_3,
252 PHR_TX_PWR_FACTOR_CHANGE_DB_6,
253 PHR_TX_PWR_FACTOR_CHANGE_INFINITY
254 }PhrTxPwrFactorChange;
258 PHR_MODE_OTHER_CG_REAL,
259 PHR_MODE_OTHER_CG_VIRTUAL
264 PDSCH_HARQ_ACK_CODEBOOK_SEMISTATIC,
265 PDSCH_HARQ_ACK_CODEBOOK_DYNAMIC
266 }PdschHarqAckCodebook;
270 NUM_HARQ_PROC_FOR_PDSCH_N_2,
271 NUM_HARQ_PROC_FOR_PDSCH_N_4,
272 NUM_HARQ_PROC_FOR_PDSCH_N_6,
273 NUM_HARQ_PROC_FOR_PDSCH_N_10,
274 NUM_HARQ_PROC_FOR_PDSCH_N_16
275 }NumHarqProcForPdsch;
279 MAX_CODE_BLOCK_GROUP_PER_TB_N_2,
280 MAX_CODE_BLOCK_GROUP_PER_TB_N_4,
281 MAX_CODE_BLOCK_GROUP_PER_TB_N_6,
282 MAX_CODE_BLOCK_GROUP_PER_TB_N_8
294 TRANSFORM_PRECODER_ENABLED,
295 TRANSFORM_PRECODER_DISABLED
300 CCE_REG_MAPPINGTYPE_PR_INTERLEAVED = 1,
301 CCE_REG_MAPPINGTYPE_PR_NONINTERLEAVED
306 SLOTPERIODICITYANDOFFSET_PR_SL1 = 1,
307 SLOTPERIODICITYANDOFFSET_PR_SL2,
308 SLOTPERIODICITYANDOFFSET_PR_SL4,
309 SLOTPERIODICITYANDOFFSET_PR_SL5,
310 SLOTPERIODICITYANDOFFSET_PR_SL8,
311 SLOTPERIODICITYANDOFFSET_PR_SL10,
312 SLOTPERIODICITYANDOFFSET_PR_SL16,
313 SLOTPERIODICITYANDOFFSET_PR_SL20,
314 SLOTPERIODICITYANDOFFSET_PR_SL40,
315 SLOTPERIODICITYANDOFFSET_PR_SL80,
316 SLOTPERIODICITYANDOFFSET_PR_SL160,
317 SLOTPERIODICITYANDOFFSET_PR_SL320,
318 SLOTPERIODICITYANDOFFSET_PR_SL640,
319 SLOTPERIODICITYANDOFFSET_PR_SL1280,
320 SLOTPERIODICITYANDOFFSET_PR_SL2560
321 }MSlotPeriodAndOffset;
331 SEARCHSPACETYPE_PR_COMMON = 1,
332 SEARCHSPACETYPE_PR_UE_SPECIFIC
343 AGGREGATIONLEVEL_N0 = 0,
344 AGGREGATIONLEVEL_N1 = 1,
345 AGGREGATIONLEVEL_N2 = 2,
346 AGGREGATIONLEVEL_N3 = 3,
347 AGGREGATIONLEVEL_N4 = 4,
348 AGGREGATIONLEVEL_N5 = 5,
349 AGGREGATIONLEVEL_N6 = 6,
350 AGGREGATIONLEVEL_N8 = 7
355 ADDITIONALPOSITION_POS0,
356 ADDITIONALPOSITION_POS1,
357 ADDITIONALPOSITION_POS3
368 RESOURCEALLOCATION_TYPE0,
369 RESOURCEALLOCATION_TYPE1,
370 RESOURCEALLOCATION_DYNAMICSWITCH
381 CODEWORDS_SCHED_BY_DCI_N1,
382 CODEWORDS_SCHED_BY_DCI_N2
387 TYPE_STATIC_BUNDLING = 1,
388 TYPE_DYNAMIC_BUNDLING
401 SET1_SIZE_N2_WIDEBAND,
402 SET1_SIZE_N4_WIDEBAND
456 TRANSPORT_LAYER_FAIL,
463 UNSPECIFIED_RADIO_NW_CAUSE,
465 UNKNOWN_GNB_CU_UE_F1AP_ID,
466 ALREADY_ALLOCATED_GNB_CU_UE_F1AP_ID,
467 UNKNOWN_GNB_DU_UE_F1AP_ID,
468 ALREADY_ALLOCATED_GNB_DU_UE_F1AP_ID,
469 UNKNOWN_UE_F1AP_ID_PAIR,
470 INCONSISTENT_UE_F1AP_ID_PAIR,
471 INTERACTION_WITH_OTHER_PROCEDURE,
473 ACTION_REQUIRED_FOR_RADIO_REASONS,
474 RADIO_RESOURCES_UNAVAILABLE,
480 RESOURCES_UNAVAILABLE_FOR_SLICE
485 UNSPECIFIED_TRANSPORT_LAYER_CAUSE,
486 TRANSPORT_RESOURCE_UNAVAILABLE
491 TRANSFER_SYNTAX_ERROR,
492 ABSTRACT_SYNTAX_ERROR_REJECT,
493 ABSTRACT_SYNTAX_ERROR_IGNORE_AND_REJECT,
494 INCOMPATIBLE_MESSAGE_FOR_RECEIVER_STATE,
496 ABSTRAXCT_SYNTAX_ERROR_FALSELY_CONSTRUCTED_MSG,
497 UNSPECIFIED_PROTOCOL_CAUSE
502 CONTROL_PROCESSING_OVERLOAD,
504 PLANE_PROCESSING_RESOURCES,
506 INTERVENTION_BY_O_AND_M,
507 UNSPECIFIED_MISC_CAUSE
514 MCS_TABLE_QAM64_LOW_SE
521 RSRC_RRC_CONNECTED_USERS
524 typedef struct failureCause
529 RadioNwLyrCause radioNwCause;
530 TransLyrCause transportCause;
531 ProtCause protcolCause;
532 MiscFailCause miscCause;
536 typedef struct carrierCfg
539 uint32_t bw; /* DL/UL bandwidth */
540 uint32_t freq; /* Absolute frequency of DL/UL point A in KHz */
541 uint16_t k0[NUM_NUMEROLOGY]; /* K0 for DL/UL */
542 uint16_t gridSize[NUM_NUMEROLOGY]; /* DL/UL Grid size for each numerologies */
543 uint16_t numAnt; /* Number of Tx/Rx antennas */
546 typedef struct ssbCfg
548 uint32_t ssbPbchPwr; /* SSB block power */
549 BchPduOpt bchPayloadFlag; /* Options for generation of payload */
550 uint8_t scsCmn; /* subcarrier spacing for common */
551 uint16_t ssbOffsetPointA; /* SSB subcarrier offset from point A */
553 SSBPeriod ssbPeriod; /* SSB Periodicity in msec */
554 uint8_t ssbScOffset; /* Subcarrier Offset */
555 uint8_t mibPdu[3]; /* MIB payload */
556 uint32_t ssbMask[SSB_MASK_SIZE]; /* Bitmap for actually transmitted SSB. */
557 uint8_t beamId[NUM_SSB];
558 bool multCarrBand; /* Multiple carriers in a band */
559 bool multCellCarr; /* Multiple cells in single carrier */
562 typedef struct fdmInfo
564 uint16_t rootSeqIdx; /* Root sequence index */
565 uint8_t numRootSeq; /* Number of root sequences required for FD */
566 uint16_t k1; /* Frequency Offset for each FD */
567 uint8_t zeroCorrZoneCfg; /* Zero correlation zone cofig */
568 uint8_t numUnusedRootSeq; /* Number of unused root sequence */
569 uint8_t *unsuedRootSeq; /* Unused root sequence per FD */
572 typedef struct prachCfg
575 uint8_t prachCfgIdx; /* PRACH Cfg Index */
576 PrachSeqLen prachSeqLen; /* RACH Sequence length: Long/short */
577 uint8_t prachSubcSpacing; /* Subcarrier spacing of RACH */
578 RstSetCfg prachRstSetCfg; /* PRACH restricted set config */
579 uint16_t msg1FreqStart; /* Msg1-FrequencyStart */
580 uint8_t msg1Fdm; /* PRACH FDM (1,2,4,8) */
581 uint8_t rootSeqLen; /* Root sequence length */
582 PrachFdmInfo fdm[8]; /* FDM info */
583 uint8_t ssbPerRach; /* SSB per RACH occassion */
584 bool prachMultCarrBand; /* Multiple carriers in Band */
585 uint8_t prachRestrictedSet; /* Support for PRACH restricted set */
586 uint8_t raContResTmr; /* RA Contention Resoultion Timer */
587 uint8_t rsrpThreshSsb; /* RSRP Threshold SSB */
588 uint8_t raRspWindow; /* RA Response Window */
591 typedef struct schPageCfg
593 uint8_t numPO; /*Derived from Ns*/
594 bool poPresent; /*Whether FirstPDCCH-MonitoringPO is present or not*/
595 uint16_t pagingOcc[MAX_PO_PER_PF]; /*FirstPDCCH-Monitoring Paging Occasion*/
598 typedef struct sib1CellCfg
602 uint16_t sib1RepetitionPeriod;
603 uint8_t coresetZeroIndex; /* derived from 4 LSB of pdcchSib1 present in MIB */
604 uint8_t searchSpaceZeroIndex; /* derived from 4 MSB of pdcchSib1 present in MIB */
606 SchPageCfg pagingCfg;
609 typedef struct bwpParams
614 uint8_t cyclicPrefix;
617 typedef struct candidatesInfo
626 typedef struct searchSpaceCfg
628 uint8_t searchSpaceId;
630 uint16_t monitoringSlot;
632 uint16_t monitoringSymbol;
633 CandidatesInfo candidate;
636 typedef struct pdcchConfigCommon
638 /* only one search space is configured during SIB1 */
639 SearchSpaceCfg commonSearchSpace;
640 uint8_t raSearchSpaceId;
643 typedef struct pdschCfgCommTimeDomRsrcAlloc
648 uint8_t lengthSymbol;
649 }PdschCfgCommTimeDomRsrcAlloc;
651 typedef struct pdschConfigCommon
653 uint8_t numTimeDomAlloc;
654 /* PDSCH time domain DL resource allocation list */
655 PdschCfgCommTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_DL_ALLOC];
658 typedef struct pucchConfigCommon
660 uint8_t pucchResourceCommon;
661 uint8_t pucchGroupHopping;
664 /* PUSCH Time Domain Resource Allocation */
665 typedef struct puschTimeDomRsrcAlloc
668 CommonMappingType mappingType;
670 uint8_t symbolLength;
671 uint8_t startSymbolAndLength;
672 }PuschTimeDomRsrcAlloc;
675 typedef struct puschConfigCommon
677 /* PUSCH-TimeDomainResourceAllocation info */
678 uint8_t numTimeDomRsrcAlloc;
679 PuschTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_UL_ALLOC]; /* PUSCH time domain UL resource allocation list */
682 typedef struct bwpDlConfig
685 PdcchConfigCommon pdcchCommon;
686 PdschConfigCommon pdschCommon;
689 typedef struct bwpUlConfig
692 // rach config common sent in PrachCfg
693 PucchConfigCommon pucchCommon;
694 PuschConfigCommon puschCommon;
697 typedef struct plmnInfoList
700 uint8_t numSupportedSlice; /* Total slice supporting */
701 Snssai **snssai; /* List of supporting snssai*/
704 typedef struct macCellCfg
706 uint16_t cellId; /* Cell Id */
707 uint8_t carrierId; /* Carrired Index */
708 uint16_t phyCellId; /* Physical cell id */
709 uint8_t numerology; /* Supported numerology */
710 DuplexMode dupType; /* Duplex type: TDD/FDD */
711 CarrierCfg dlCarrCfg; /* DL Carrier configuration */
712 CarrierCfg ulCarrCfg; /* UL Carrier configuration */
713 bool freqShft; /* Indicates presence of 7.5kHz frequency shift */
714 SsbCfg ssbCfg; /* SSB configuration */
715 PrachCfg prachCfg; /* PRACH Configuration */
717 TDDCfg tddCfg; /* TDD periodicity and slot configuration */
719 RSSIMeasUnit rssiUnit; /* RSSI measurement unit */
720 Sib1CellCfg sib1Cfg; /* SIB1 config */
721 BwpDlConfig initialDlBwp; /* Initial DL BWP */
722 BwpUlConfig initialUlBwp; /* Initial UL BWP */
723 uint8_t dmrsTypeAPos; /* DMRS Type A position */
724 PlmnInfoList plmnInfoList; /* Consits of PlmnId and Snssai list */
725 //RrmPolicy *rrmPolicy; /* RRM policy details */
728 typedef struct macCellCfgCfm
734 typedef struct ulCcchInd
738 uint16_t ulCcchMsgLen;
742 typedef struct dlCcchInd
746 DlCcchMsgType msgType;
747 uint16_t dlCcchMsgLen;
751 typedef struct bsrTmrCfg
753 uint16_t periodicTimer;
755 uint16_t srDelayTimer;
759 /* Info of Scheduling Request to Add/Modify */
760 typedef struct schedReqInfo
763 SrProhibitTimer srProhibitTmr;
764 SrTransMax srTransMax;
767 /* Scheduling Request Configuration */
768 typedef struct schedReqCfg
770 uint8_t addModListCount;
771 SchedReqInfo addModList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* List of Scheduling req to be added/modified */
772 uint8_t relListCount;
773 uint8_t relList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* list of scheduling request Id to be deleted */
776 typedef struct tagInfo
779 TimeAlignmentTimer timeAlignTimer;
782 typedef struct tagCfg
784 uint8_t addModListCount;
785 TagInfo addModList[MAC_NUM_TAGS]; /* List of Tag to Add/Modify */
786 uint8_t relListCount;
787 uint8_t relList[MAC_NUM_TAGS]; /* list of Tag Id to release */
790 typedef struct phrCfg
792 PhrPeriodicTimer periodicTimer;
793 PhrProhibitTimer prohibitTimer;
794 PhrTxPwrFactorChange txPowerFactor;
797 bool phrType2OtherCell;
798 PhrModeOtherCG phrOtherCG;
801 typedef struct macCellGrpCfg
803 SchedReqCfg schReqCfg;
806 bool phrCfgSetupPres; /* true/false: phrCfgSetup/phrCfgRelease */
810 typedef struct phyCellGrpCfg
812 PdschHarqAckCodebook pdschHarqAckCodebook;
816 /* Control resource set info */
817 typedef struct controlRsrcSet
819 uint8_t cRSetId; /* Control resource set id */
820 uint8_t freqDomainRsrc[FREQ_DOM_RSRC_SIZE]; /* Frequency domain resource */
822 REGMappingType cceRegMappingType;
823 PrecoderGranul precoderGranularity;
824 uint16_t dmrsScramblingId;
827 /* Search Space info */
828 typedef struct searchSpace
830 uint8_t searchSpaceId;
832 MSlotPeriodAndOffset mSlotPeriodicityAndOffset;
833 uint8_t mSymbolsWithinSlot[MONITORING_SYMB_WITHIN_SLOT_SIZE];
834 AggrLevel numCandidatesAggLevel1; /* Number of candidates for aggregation level 1 */
835 AggrLevel numCandidatesAggLevel2; /* Number of candidates for aggregation level 2 */
836 AggrLevel numCandidatesAggLevel4; /* Number of candidates for aggregation level 4 */
837 AggrLevel numCandidatesAggLevel8; /* Number of candidates for aggregation level 8 */
838 AggrLevel numCandidatesAggLevel16; /* Number of candidates for aggregation level 16 */
839 SearchSpaceType searchSpaceType;
840 uint8_t ueSpecificDciFormat;
843 /* PDCCH cofniguration */
844 typedef struct pdcchConfig
846 uint8_t numCRsetToAddMod;
847 ControlRsrcSet cRSetToAddModList[MAX_NUM_CRSET]; /* List of control resource set to add/modify */
848 uint8_t numCRsetToRel;
849 uint8_t cRSetToRelList[MAX_NUM_CRSET]; /* List of control resource set to release */
850 uint8_t numSearchSpcToAddMod;
851 SearchSpace searchSpcToAddModList[MAX_NUM_SEARCH_SPC]; /* List of search space to add/modify */
852 uint8_t numSearchSpcToRel;
853 uint8_t searchSpcToRelList[MAX_NUM_SEARCH_SPC]; /* List of search space to release */
856 /* PDSCH time domain resource allocation */
857 typedef struct pdschTimeDomRsrcAlloc
860 CommonMappingType mappingType;
862 uint8_t symbolLength;
863 uint8_t startSymbolAndLength;
864 }PdschTimeDomRsrcAlloc;
867 typedef struct pdschBundling
869 struct staticBundling
871 BundlingSizeSet2 size;
873 struct dynamicBundling
875 BundlingSizeSet1 sizeSet1;
876 BundlingSizeSet2 sizeSet2;
880 /* DMRS downlink configuration */
881 typedef struct dmrsDlCfg
883 AddPosType addPos; /* DMRS additional position */
886 /* PDSCH Configuration */
887 typedef struct pdschConfig
889 DmrsDlCfg dmrsDlCfgForPdschMapTypeA;
890 ResAllocType resourceAllocType;
891 uint8_t numTimeDomRsrcAlloc;
892 PdschTimeDomRsrcAlloc timeDomRsrcAllociList[MAX_NUM_DL_ALLOC]; /* PDSCH time domain DL resource allocation list */
894 CodeWordsSchedDci numCodeWordsSchByDci; /* Number of code words scheduled by DCI */
895 BundlingType bundlingType;
896 PdschBundling bundlingInfo;
899 /* Initial Downlink BWP */
900 typedef struct initialDlBwp
903 PdcchConfig pdcchCfg;
905 PdschConfig pdschCfg;
908 /* BWP Downlink common */
909 typedef struct bwpDlCommon
913 /* Downlink BWP information */
914 typedef struct dlBwpInfo
919 /* PDCCH Serving Cell configuration */
920 typedef struct pdschServCellCfg
922 uint8_t *maxMimoLayers;
923 NumHarqProcForPdsch numHarqProcForPdsch;
924 MaxCodeBlkGrpPerTB *maxCodeBlkGrpPerTb;
925 bool *codeBlkGrpFlushInd;
926 PdschXOverhead *xOverhead;
929 /* PUCCH Configuration */
931 typedef struct pucchResrcSetInfo
934 uint8_t resrcListCount;
935 uint8_t resrcList[MAX_NUM_PUCCH_PER_RESRC_SET];
936 uint8_t maxPayLoadSize;
939 typedef struct pucchResrcSetCfg
941 uint8_t resrcSetToAddModListCount;
942 PucchResrcSetInfo resrcSetToAddModList[MAX_NUM_PUCCH_RESRC_SET];
943 uint8_t resrcSetToRelListCount;
944 uint8_t resrcSetToRelList[MAX_NUM_PUCCH_RESRC];
947 typedef struct pucchFormat0
949 uint8_t initialCyclicShift;
951 uint8_t startSymbolIdx;
954 typedef struct pucchFormat1
956 uint8_t initialCyclicShift;
958 uint8_t startSymbolIdx;
962 typedef struct pucchFormat2_3
966 uint8_t startSymbolIdx;
969 typedef struct pucchFormat4
974 uint8_t startSymbolIdx;
977 typedef struct pucchResrcInfo
981 uint8_t intraFreqHop;
982 uint16_t secondPrbHop;
986 PucchFormat0 *format0;
987 PucchFormat1 *format1;
988 PucchFormat2_3 *format2;
989 PucchFormat2_3 *format3;
990 PucchFormat4 *format4;
994 typedef struct pucchResrcCfg
996 uint8_t resrcToAddModListCount;
997 PucchResrcInfo resrcToAddModList[MAX_NUM_PUCCH_RESRC];
998 uint8_t resrcToRelListCount;
999 uint8_t resrcToRelList[MAX_NUM_PUCCH_RESRC];
1002 typedef struct pucchFormatCfg
1004 bool interSlotFreqHop;
1006 uint8_t maxCodeRate;
1012 typedef struct schedReqResrcInfo
1016 uint8_t periodicity;
1021 typedef struct pucchSchedReqCfg
1023 uint8_t schedAddModListCount;
1024 SchedReqResrcInfo schedAddModList[MAX_NUM_SR_CFG_PER_CELL_GRP];
1025 uint8_t schedRelListCount;
1026 uint8_t schedRelList[MAX_NUM_SR_CFG_PER_CELL_GRP];
1029 typedef struct spatialRelationInfo
1031 uint8_t spatialRelationId;
1032 uint8_t servCellIdx;
1033 uint8_t pathLossRefRSId;
1035 uint8_t closeLoopIdx;
1036 }SpatialRelationInfo;
1038 typedef struct pucchSpatialCfg
1040 uint8_t spatialAddModListCount;
1041 SpatialRelationInfo spatialAddModList[MAX_NUM_SPATIAL_RELATIONS];
1042 uint8_t spatialRelListCount;
1043 uint8_t spatialRelList[MAX_NUM_SPATIAL_RELATIONS];
1046 typedef struct p0PucchCfg
1052 typedef struct pathLossRefRSCfg
1054 uint8_t pathLossRefRSId;
1057 typedef struct pucchMultiCsiCfg
1059 uint8_t multiCsiResrcListCount;
1060 uint8_t multiCsiResrcList[MAX_NUM_PUCCH_RESRC-1];
1063 typedef struct pucchDlDataToUlAck
1065 uint8_t dlDataToUlAckListCount;
1066 uint8_t dlDataToUlAckList[MAX_NUM_DL_DATA_TO_UL_ACK];
1067 }PucchDlDataToUlAck;
1069 typedef struct pucchPowerControl
1077 P0PucchCfg p0Set[MAX_NUM_PUCCH_P0_PER_SET];
1078 uint8_t pathLossRefRSListCount;
1079 PathLossRefRSCfg pathLossRefRSList[MAX_NUM_PATH_LOSS_REF_RS];
1082 typedef struct pucchCfg
1084 PucchResrcSetCfg *resrcSet;
1085 PucchResrcCfg *resrc;
1086 PucchFormatCfg *format1;
1087 PucchFormatCfg *format2;
1088 PucchFormatCfg *format3;
1089 PucchFormatCfg *format4;
1090 PucchSchedReqCfg *schedReq;
1091 PucchMultiCsiCfg *multiCsiCfg;
1092 PucchSpatialCfg *spatialInfo;
1093 PucchDlDataToUlAck *dlDataToUlAck;
1094 PucchPowerControl *powerControl;
1097 /* Transform precoding disabled */
1098 typedef struct transPrecodDisabled
1100 uint16_t scramblingId0;
1101 }TransPrecodDisabled;
1103 /* DMRS Uplink configuration */
1104 typedef struct dmrsUlCfg
1106 AddPosType addPos; /* DMRS additional position */
1107 TransPrecodDisabled transPrecodDisabled; /* Transform precoding disabled */
1110 /* PUSCH Configuration */
1111 typedef struct puschCfg
1113 uint8_t dataScramblingId;
1114 DmrsUlCfg dmrsUlCfgForPuschMapTypeA;
1115 ResAllocType resourceAllocType;
1116 uint8_t numTimeDomRsrcAlloc;
1117 PuschTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_UL_ALLOC]; /* PUSCH time domain UL resource allocation list */
1118 TransformPrecoder transformPrecoder;
1121 /* Initial Uplink BWP */
1122 typedef struct initialUlBwp
1130 /* Uplink BWP information */
1131 typedef struct ulBwpInfo
1136 /* Serving cell configuration */
1137 typedef struct servCellCfgInfo
1139 InitialDlBwp initDlBwp;
1140 uint8_t numDlBwpToAdd;
1141 DlBwpInfo DlBwpToAddList[MAX_NUM_BWP];
1142 uint8_t firstActvDlBwpId;
1143 uint8_t defaultDlBwpId;
1144 uint8_t *bwpInactivityTmr;
1145 PdschServCellCfg pdschServCellCfg;
1146 InitialUlBwp initUlBwp;
1147 uint8_t numUlBwpToAdd;
1148 UlBwpInfo UlBwpToAddList[MAX_NUM_BWP];
1149 uint8_t firstActvUlBwpId;
1152 /* Special cell configuration */
1153 typedef struct spCellCfg
1155 uint8_t servCellIdx;
1156 ServCellCfgInfo servCellCfg;
1159 typedef struct ambrCfg
1161 uint32_t ulBr; /* UL Bit rate */
1164 typedef struct nonDynFiveQi
1169 uint16_t maxDataBurstVol;
1172 typedef struct dynFiveQi
1175 uint16_t packetDelayBudget;
1176 uint8_t packetErrRateScalar;
1177 uint8_t packetErrRateExp;
1179 uint8_t delayCritical;
1181 uint16_t maxDataBurstVol;
1184 typedef struct ngRanAllocAndRetPri
1186 uint8_t priorityLevel;
1187 uint8_t preEmptionCap;
1188 uint8_t preEmptionVul;
1189 }NgRanAllocAndRetPri;
1191 typedef struct grbQosInfo
1193 uint32_t maxFlowBitRateDl;
1194 uint32_t maxFlowBitRateUl;
1195 uint32_t guarFlowBitRateDl;
1196 uint32_t guarFlowBitRateUl;
1199 typedef struct drbQos
1201 QosType fiveQiType; /* Dynamic or non-dynamic */
1204 NonDynFiveQi nonDyn5Qi;
1207 NgRanAllocAndRetPri ngRanRetPri;
1208 GrbQosInfo grbQosInfo;
1209 uint16_t pduSessionId;
1210 uint32_t ulPduSessAggMaxBitRate;
1213 typedef struct ulLcCfg
1218 PBitRate pbr; // prioritisedBitRate
1219 BucketSizeDur bsd; // bucketSizeDuration
1222 typedef struct duLcCfg
1224 LcPriority lcp; // logical Channel Prioritization
1227 typedef struct lcCfg
1229 ConfigType configType;
1238 typedef struct modulationInfo
1240 uint8_t modOrder; /* Modulation order */
1241 uint8_t mcsIndex; /* MCS Index */
1242 McsTable mcsTable; /* MCS table */
1245 typedef struct macUeCfg
1250 bool macCellGrpCfgPres;
1251 MacCellGrpCfg macCellGrpCfg;
1252 bool phyCellGrpCfgPres;
1253 PhyCellGrpCfg phyCellGrpCfg;
1255 SpCellCfg spCellCfg;
1257 ModulationInfo dlModInfo; /* DL modulation info */
1258 ModulationInfo ulModInfo; /* UL modulation info */
1260 LcCfg lcCfgList[MAX_NUM_LC];
1261 UeCfgState macUeCfgState; /* InActive / Completed */
1264 typedef struct nrcgi
1270 typedef struct srbFailInfo
1276 typedef struct drbFailInfo
1282 typedef struct sCellFailInfo
1288 typedef struct ueCfgRsp
1293 uint8_t numSRBFailed; /* valid values : 0 to MAX_NUM_SRB */
1294 SRBFailInfo *failedSRBlisti;
1295 uint8_t numDRBFailed; /* valid values : 0 to MAX_NUM_DRB */
1296 DRBFailInfo *failedDRBlist;
1297 uint8_t numSCellFailed; /* valid values : 0 to MAX_NUM_SCELL */
1298 SCellFailInfo *failedSCellList;
1301 typedef struct ueDelete
1308 typedef struct ueDeleteRsp
1312 UeDeleteStatus result;
1315 typedef struct macCellDelete
1320 typedef struct macCellDeleteRsp
1323 CellDeleteStatus result;
1326 typedef struct macSliceRsp
1333 typedef struct rrmPolicyRatio
1335 uint8_t policyMaxRatio;
1336 uint8_t policyMinRatio;
1337 uint8_t policyDedicatedRatio;
1340 typedef struct macSliceRrmPolicy
1343 RrmPolicyRatio *rrmPolicyRatio;
1346 typedef struct macSliceCfgReq
1348 uint8_t numOfConfiguredSlice;
1349 MacSliceRrmPolicy **listOfSliceCfg;
1352 typedef struct macSliceCfgRsp
1354 uint8_t numSliceCfgRsp;
1355 MacSliceRsp **listOfSliceCfgRsp;
1358 /* Functions for slot Ind from MAC to DU APP*/
1359 typedef uint8_t (*DuMacCellUpInd) ARGS((
1361 OduCellId *cellId ));
1363 /* Functions for slot Ind from MAC to DU APP*/
1364 typedef uint8_t (*DuMacSlotInd) ARGS((
1366 SlotTimingInfo *slotIndInfo));
1368 /* Functions for stop Ind from MAC to DU APP*/
1369 typedef uint8_t (*DuMacStopInd) ARGS((
1371 OduCellId *cellId ));
1373 /* Functions for mac cell start req */
1374 typedef uint8_t (*DuMacCellStart) ARGS((
1376 OduCellId *cellId));
1378 /* Functions for mac cell stop request */
1379 typedef uint8_t (*DuMacCellStop) ARGS((
1381 OduCellId *cellId ));
1383 /* Function pointers for packing macCellCfg Request and Confirm */
1384 typedef uint8_t (*packMacCellCfgReq) ARGS((
1386 MacCellCfg *macCellCfg ));
1388 typedef uint8_t (*packMacCellCfgConfirm) ARGS((
1390 MacCellCfgCfm *macCellCfgCfm ));
1392 typedef uint8_t (*DuMacCellCfgReq) ARGS((
1394 MacCellCfg *macCellCfg));
1396 typedef uint8_t (*DuMacCellCfgCfm) ARGS((
1398 MacCellCfgCfm *macCellCfgCfm ));
1400 /* Functions for UL CCCH Ind from MAC to DU APP*/
1401 typedef uint8_t (*DuMacUlCcchInd) ARGS((
1403 UlCcchIndInfo *ulCcchIndInfo ));
1405 /* Functions for DL CCCH Ind from DU APP to MAC*/
1406 typedef uint8_t (*DuMacDlCcchInd) ARGS((
1408 DlCcchIndInfo *dlCcchIndInfo ));
1410 /* UE create Request from DU APP to MAC*/
1411 typedef uint8_t (*DuMacUeCreateReq) ARGS((
1415 /* UE create Response from MAC to DU APP */
1416 typedef uint8_t (*MacDuUeCfgRspFunc) ARGS((
1418 MacUeCfgRsp *cfgRsp));
1420 /* UE Reconfig Request from DU APP to MAC*/
1421 typedef uint8_t (*DuMacUeReconfigReq) ARGS((
1425 /* UE Delete Request from DU APP to MAC*/
1426 typedef uint8_t (*DuMacUeDeleteReq) ARGS((
1428 MacUeDelete *ueDel ));
1430 /* UE Delete Response from MAC to DU APP*/
1431 typedef uint8_t (*MacDuUeDeleteRspFunc) ARGS((
1433 MacUeDeleteRsp *deleteRsp));
1435 /* Cell Delete Request from DU APP to MAC*/
1436 typedef uint8_t (*DuMacCellDeleteReq) ARGS((
1438 MacCellDelete *cellDelete ));
1440 /* Cell Delete Response from MAC to DU APP*/
1441 typedef uint8_t (*MacDuCellDeleteRspFunc) ARGS((
1443 MacCellDeleteRsp *cellDeleteRsp));
1445 /* Slice Cfg Request from DU APP to MAC*/
1446 typedef uint8_t (*DuMacSliceCfgReq) ARGS((
1448 MacSliceCfgReq *CfgReq));
1450 /* Slice Cfg Response from MAC to DU APP */
1451 typedef uint8_t (*MacDuSliceCfgRspFunc) ARGS((
1453 MacSliceCfgRsp *cfgRsp));
1455 /* Slice ReReCfg Request from DU APP to MAC*/
1456 typedef uint8_t (*DuMacSliceRecfgReq) ARGS((
1458 MacSliceCfgReq *CfgReq));
1460 /* Slice ReReCfg Response from MAC to DU APP */
1461 typedef uint8_t (*MacDuSliceReCfgRspFunc) ARGS((
1463 MacSliceCfgRsp *cfgRsp));
1466 uint8_t packMacCellUpInd(Pst *pst, OduCellId *cellId);
1467 uint8_t unpackMacCellUpInd(DuMacCellUpInd func, Pst *pst, Buffer *mBuf);
1468 uint8_t duHandleCellUpInd(Pst *pst, OduCellId *cellId);
1469 uint8_t packMacCellStart(Pst *pst, OduCellId *cellId);
1470 uint8_t unpackMacCellStart(DuMacCellStart func, Pst *pst, Buffer *mBuf);
1471 uint8_t MacProcCellStart(Pst *pst, OduCellId *cellId);
1472 uint8_t packMacCellStop(Pst *pst, OduCellId *cellId);
1473 uint8_t unpackMacCellStop(DuMacCellStop func, Pst *pst, Buffer *mBuf);
1474 uint8_t MacProcCellStop(Pst *pst, OduCellId *cellId);
1475 uint8_t packMacCellCfg(Pst *pst, MacCellCfg *macCellCfg);
1476 uint8_t unpackDuMacCellCfg(DuMacCellCfgReq func, Pst *pst, Buffer *mBuf);
1477 uint8_t MacProcCellCfgReq(Pst *pst, MacCellCfg *macCellCfg);
1478 uint8_t packMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm);
1479 uint8_t unpackMacCellCfgCfm(DuMacCellCfgCfm func, Pst *pst, Buffer *mBuf);
1480 uint8_t duHandleMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm);
1481 uint8_t packMacStopInd(Pst *pst, OduCellId *cellId);
1482 uint8_t unpackMacStopInd(DuMacStopInd func, Pst *pst, Buffer *mBuf);
1483 uint8_t duHandleStopInd(Pst *pst, OduCellId *cellId);
1484 uint8_t packMacUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo);
1485 uint8_t unpackMacUlCcchInd(DuMacUlCcchInd func, Pst *pst, Buffer *mBuf);
1486 uint8_t duHandleUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo);
1487 uint8_t packMacDlCcchInd(Pst *pst, DlCcchIndInfo *dlCcchIndInfo);
1488 uint8_t unpackMacDlCcchInd(DuMacDlCcchInd func, Pst *pst, Buffer *mBuf);
1489 uint8_t MacProcDlCcchInd(Pst *pst, DlCcchIndInfo *dlCcchIndInfo);
1490 uint8_t packDuMacUeCreateReq(Pst *pst, MacUeCfg *ueCfg);
1491 uint8_t unpackMacUeCreateReq(DuMacUeCreateReq func, Pst *pst, Buffer *mBuf);
1492 uint8_t MacProcUeCreateReq(Pst *pst, MacUeCfg *ueCfg);
1493 uint8_t sendStopIndMacToDuApp(uint16_t cellId);
1494 uint8_t packDuMacUeCfgRsp(Pst *pst, MacUeCfgRsp *cfgRsp);
1495 uint8_t unpackDuMacUeCfgRsp(MacDuUeCfgRspFunc func, Pst *pst, Buffer *mBuf);
1496 uint8_t DuProcMacUeCfgRsp(Pst *pst, MacUeCfgRsp *cfgRsp);
1497 uint8_t packDuMacUeReconfigReq(Pst *pst, MacUeCfg *ueCfg);
1498 uint8_t unpackMacUeReconfigReq(DuMacUeReconfigReq func, Pst *pst, Buffer *mBuf);
1499 uint8_t MacProcUeReconfigReq(Pst *pst, MacUeCfg *ueCfg);
1500 uint8_t packDuMacUeDeleteReq(Pst *pst, MacUeDelete *ueDelete);
1501 uint8_t MacProcUeDeleteReq(Pst *pst, MacUeDelete *ueDelete);
1502 uint8_t unpackMacUeDeleteReq(DuMacUeDeleteReq func, Pst *pst, Buffer *mBuf);
1503 uint8_t packDuMacUeDeleteRsp(Pst *pst, MacUeDeleteRsp *deleteRsp);
1504 uint8_t DuProcMacUeDeleteRsp(Pst *pst, MacUeDeleteRsp *deleteRsp);
1505 uint8_t unpackDuMacUeDeleteRsp(MacDuUeDeleteRspFunc func, Pst *pst, Buffer *mBuf);
1506 uint8_t packDuMacCellDeleteReq(Pst *pst, MacCellDelete *cellDelete);
1507 uint8_t MacProcCellDeleteReq(Pst *pst, MacCellDelete *cellDelete);
1508 uint8_t unpackMacCellDeleteReq(DuMacCellDeleteReq func, Pst *pst, Buffer *mBuf);
1509 uint8_t packDuMacCellDeleteRsp(Pst *pst, MacCellDeleteRsp *cellDeleteRsp);
1510 uint8_t DuProcMacCellDeleteRsp(Pst *pst, MacCellDeleteRsp *cellDeleteRsp);
1511 uint8_t unpackDuMacCellDeleteRsp(MacDuCellDeleteRspFunc func, Pst *pst, Buffer *mBuf);
1512 uint8_t packDuMacSliceCfgReq(Pst *pst, MacSliceCfgReq *sliceCfgReq);
1513 uint8_t MacProcSliceCfgReq(Pst *pst, MacSliceCfgReq *sliceCfgReq);
1514 uint8_t unpackMacSliceCfgReq(DuMacSliceCfgReq func, Pst *pst, Buffer *mBuf);
1515 uint8_t DuProcMacSliceCfgRsp(Pst *pst, MacSliceCfgRsp *cfgRsp);
1516 uint8_t packDuMacSliceCfgRsp(Pst *pst, MacSliceCfgRsp *cfgRsp);
1517 uint8_t unpackDuMacSliceCfgRsp(MacDuSliceCfgRspFunc func, Pst *pst, Buffer *mBuf);
1518 uint8_t packDuMacSliceRecfgReq(Pst *pst, MacSliceCfgReq *sliceReCfgReq);
1519 uint8_t MacProcSliceReCfgReq(Pst *pst, MacSliceCfgReq *sliceReCfgReq);
1520 uint8_t unpackMacSliceReCfgReq(DuMacSliceRecfgReq func, Pst *pst, Buffer *mBuf);
1521 uint8_t DuProcMacSliceReCfgRsp(Pst *pst, MacSliceCfgRsp *cfgRsp);
1522 uint8_t packDuMacSliceReCfgRsp(Pst *pst, MacSliceCfgRsp *cfgRsp);
1523 uint8_t unpackDuMacSliceReCfgRsp(MacDuSliceReCfgRspFunc func, Pst *pst, Buffer *mBuf);
1524 uint8_t duHandleSlotInd(Pst *pst, SlotTimingInfo *slotIndInfo);
1525 uint8_t packMacSlotInd(Pst *pst, SlotTimingInfo *slotIndInfo);
1526 uint8_t unpackDuMacSlotInd(DuMacSlotInd func, Pst *pst, Buffer *mBuf);
1531 /**********************************************************************
1533 **********************************************************************/