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 */
24 #define MAXIMUM_TDD_PERIODICITY 5
25 #define MAX_SYMB_PER_SLOT 14
27 #define NUM_SSB 1 /* max value is 64 */
28 #define SSB_MASK_SIZE 1 /* SSB mask size is 32bit for sub6 */
29 #define SIB1_NEW_TX_PERIOD 160
30 #define SIB1_REPETITION_PERIOD 20
31 #define CORESET_0_INDEX 0
32 #define CORESET_1_INDEX 1
33 #define CORESET_2_INDEX 2
34 #define CORESET_3_INDEX 3
35 #define CORESET_4_INDEX 4
36 #define SEARCHSPACE_0_INDEX 0
37 #define SEARCHSPACE_1_INDEX 1
38 #define SEARCHSPACE_2_INDEX 2
39 #define SEARCHSPACE_3_INDEX 3
40 #define SEARCHSPACE_4_INDEX 4
41 #define SS_MONITORING_SLOT_SL1 0 /* all slots */
42 #define SS_MONITORING_SYMBOL 0x2000; /* symbol-0, set 14th bit */
45 /* Macro for Ue Context */
46 #define MAX_NUM_SR_CFG_PER_CELL_GRP 8 /* Max number of scheduling request config per cell group */
47 #define MAC_NUM_TAGS 4 /* Max number of timing advance groups */
48 #define MAX_NUM_BWP 4 /* Max number of BWP per serving cell */
49 #define MAX_NUM_CRSET 3 /* Max number of control resource set in add/modify/release list */
50 #define MAX_NUM_SEARCH_SPC 10 /* Max number of search space in add/modify/release list */
51 #define MONITORING_SYMB_WITHIN_SLOT_SIZE 2 /* i.e. 2 bytes because size of monitoring symbols within slot is 14 bits */
52 #define MAX_NUM_DL_ALLOC 16 /* Max number of pdsch time domain downlink allocation */
53 #define MAX_NUM_UL_ALLOC 16 /* Max number of pusch time domain uplink allocation */
54 #define SD_SIZE 3 /* Max size of Slice Differentiator in S-NSSAI */
57 #define MAX_NUM_DRB 64
58 #define MAX_NUM_SCELL 32
61 #define EVENT_MAC_CELL_CONFIG_REQ 200
62 #define EVENT_MAC_CELL_CONFIG_CFM 201
63 #define EVENT_MAC_CELL_START_REQ 202
64 #define EVENT_MAC_CELL_STOP_REQ 203
65 #define EVENT_MAC_SLOT_IND 204
66 #define EVENT_MAC_STOP_IND 205
67 #define EVENT_MAC_UL_CCCH_IND 206
68 #define EVENT_MAC_DL_CCCH_IND 207
69 #define EVENT_MAC_UE_CONFIG_REQ 208
70 #define EVENT_MAC_UE_CONFIG_RSP 209
71 #define EVENT_MAC_UE_RECONFIG_REQ 210
72 #define EVENT_MAC_UE_RECONFIG_RSP 211
88 MAC_GEN_FULL_PBCH_PAYLD, /* MAC generated the full PBCH Payload */
89 PHY_GEN_TIMING_PBCH_BIT, /* PHY generates the timing PBCH bits */
90 PHY_GEN_FULL_PBCH_PAYLD /* PHY generates full PBCH payload */
102 RESTRICTED_SET_TYPE_A,
103 RESTRICTED_SET_TYPE_B
154 /* Enums for Ue Create Request */
156 /* SR PROHIBIT TIMER */
183 TIME_ALIGNMENT_TIMER_MS_500,
184 TIME_ALIGNMENT_TIMER_MS_750,
185 TIME_ALIGNMENT_TIMER_MS_1280,
186 TIME_ALIGNMENT_TIMER_MS_1920,
187 TIME_ALIGNMENT_TIMER_MS_2560,
188 TIME_ALIGNMENT_TIMER_MS_5120,
189 TIME_ALIGNMENT_TIMER_MS_10240,
190 TIME_ALIGNMENT_TIMER_INFINITY
195 BSR_PERIODIC_TIMER_SF_1,
196 BSR_PERIODIC_TIMER_SF_5,
197 BSR_PERIODIC_TIMER_SF_10,
198 BSR_PERIODIC_TIMER_SF_16,
199 BSR_PERIODIC_TIMER_SF_20,
200 BSR_PERIODIC_TIMER_SF_32,
201 BSR_PERIODIC_TIMER_SF_40,
202 BSR_PERIODIC_TIMER_SF_64,
203 BSR_PERIODIC_TIMER_SF_80,
204 BSR_PERIODIC_TIMER_SF_128,
205 BSR_PERIODIC_TIMER_SF_160,
206 BSR_PERIODIC_TIMER_SF_320,
207 BSR_PERIODIC_TIMER_SF_640,
208 BSR_PERIODIC_TIMER_SF_1280,
209 BSR_PERIODIC_TIMER_SF_2560,
210 BSR_PERIODIC_TIMER_INFINITY
215 BSR_RETX_TIMER_SF_10,
216 BSR_RETX_TIMER_SF_20,
217 BSR_RETX_TIMER_SF_40,
218 BSR_RETX_TIMER_SF_80,
219 BSR_RETX_TIMER_SF_160,
220 BSR_RETX_TIMER_SF_320,
221 BSR_RETX_TIMER_SF_640,
222 BSR_RETX_TIMER_SF_1280,
223 BSR_RETX_TIMER_SF_2560,
224 BSR_RETX_TIMER_SF_5120,
225 BSR_RETX_TIMER_SF_10240,
226 BSR_RETX_TIMER_SPARE_5,
227 BSR_RETX_TIMER_SPARE_4,
228 BSR_RETX_TIMER_SPARE_3,
229 BSR_RETX_TIMER_SPARE_2,
230 BSR_RETX_TIMER_SPARE_1
238 BSR_SR_DELAY_TMR_128,
239 BSR_SR_DELAY_TMR_512,
240 BSR_SR_DELAY_TMR_1024,
241 BSR_SR_DELAY_TMR_2560,
242 BSR_SR_DELAY_TMR_SPARE_1
246 PHR_PERIODIC_TIMER_SF_10,
247 PHR_PERIODIC_TIMER_SF_20,
248 PHR_PERIODIC_TIMER_SF_50,
249 PHR_PERIODIC_TIMER_SF_100,
250 PHR_PERIODIC_TIMER_SF_200,
251 PHR_PERIODIC_TIMER_SF_500,
252 PHR_PERIODIC_TIMER_SF_1000,
253 PHR_PERIODIC_TIMER_INFINITY
258 PHR_PROHIBIT_TIMER_SF_0,
259 PHR_PROHIBIT_TIMER_SF_10,
260 PHR_PROHIBIT_TIMER_SF_20,
261 PHR_PROHIBIT_TIMER_SF_50,
262 PHR_PROHIBIT_TIMER_SF_100,
263 PHR_PROHIBIT_TIMER_SF_200,
264 PHR_PROHIBIT_TIMER_SF_500,
265 PHR_PROHIBIT_TIMER_SF_1000
270 PHR_TX_PWR_FACTOR_CHANGE_DB_1,
271 PHR_TX_PWR_FACTOR_CHANGE_DB_3,
272 PHR_TX_PWR_FACTOR_CHANGE_DB_6,
273 PHR_TX_PWR_FACTOR_CHANGE_INFINITY
274 }PhrTxPwrFactorChange;
278 PHR_MODE_OTHER_CG_REAL,
279 PHR_MODE_OTHER_CG_VIRTUAL
284 PDSCH_HARQ_ACK_CODEBOOK_SEMISTATIC,
285 PDSCH_HARQ_ACK_CODEBOOK_DYNAMIC
286 }PdschHarqAckCodebook;
290 NUM_HARQ_PROC_FOR_PDSCH_N_2,
291 NUM_HARQ_PROC_FOR_PDSCH_N_4,
292 NUM_HARQ_PROC_FOR_PDSCH_N_6,
293 NUM_HARQ_PROC_FOR_PDSCH_N_10,
294 NUM_HARQ_PROC_FOR_PDSCH_N_16
295 }NumHarqProcForPdsch;
299 MAX_CODE_BLOCK_GROUP_PER_TB_N_2,
300 MAX_CODE_BLOCK_GROUP_PER_TB_N_4,
301 MAX_CODE_BLOCK_GROUP_PER_TB_N_6,
302 MAX_CODE_BLOCK_GROUP_PER_TB_N_8
314 TRANSFORM_PRECODER_ENABLED,
315 TRANSFORM_PRECODER_DISABLED
320 CCE_REG_MAPPINGTYPE_PR_INTERLEAVED = 1,
321 CCE_REG_MAPPINGTYPE_PR_NONINTERLEAVED
326 SLOTPERIODICITYANDOFFSET_PR_SL1 = 1,
327 SLOTPERIODICITYANDOFFSET_PR_SL2,
328 SLOTPERIODICITYANDOFFSET_PR_SL4,
329 SLOTPERIODICITYANDOFFSET_PR_SL5,
330 SLOTPERIODICITYANDOFFSET_PR_SL8,
331 SLOTPERIODICITYANDOFFSET_PR_SL10,
332 SLOTPERIODICITYANDOFFSET_PR_SL16,
333 SLOTPERIODICITYANDOFFSET_PR_SL20,
334 SLOTPERIODICITYANDOFFSET_PR_SL40,
335 SLOTPERIODICITYANDOFFSET_PR_SL80,
336 SLOTPERIODICITYANDOFFSET_PR_SL160,
337 SLOTPERIODICITYANDOFFSET_PR_SL320,
338 SLOTPERIODICITYANDOFFSET_PR_SL640,
339 SLOTPERIODICITYANDOFFSET_PR_SL1280,
340 SLOTPERIODICITYANDOFFSET_PR_SL2560
341 }MSlotPeriodAndOffset;
351 SEARCHSPACETYPE_PR_COMMON = 1,
352 SEARCHSPACETYPE_PR_UE_SPECIFIC
363 AGGREGATIONLEVEL_N0 = 0,
364 AGGREGATIONLEVEL_N1 = 1,
365 AGGREGATIONLEVEL_N2 = 2,
366 AGGREGATIONLEVEL_N3 = 3,
367 AGGREGATIONLEVEL_N4 = 4,
368 AGGREGATIONLEVEL_N5 = 5,
369 AGGREGATIONLEVEL_N6 = 6,
370 AGGREGATIONLEVEL_N8 = 7
375 ADDITIONALPOSITION_POS0,
376 ADDITIONALPOSITION_POS1,
377 ADDITIONALPOSITION_POS3
388 RESOURCEALLOCATION_TYPE0,
389 RESOURCEALLOCATION_TYPE1,
390 RESOURCEALLOCATION_DYNAMICSWITCH
401 CODEWORDS_SCHED_BY_DCI_N1,
402 CODEWORDS_SCHED_BY_DCI_N2
407 TYPE_STATIC_BUNDLING = 1,
408 TYPE_DYNAMIC_BUNDLING
421 SET1_SIZE_N2_WIDEBAND,
422 SET1_SIZE_N4_WIDEBAND
476 TRANSPORT_LAYER_FAIL,
483 UNSPECIFIED_RADIO_NW_CAUSE,
485 UNKNOWN_GNB_CU_UE_F1AP_ID,
486 ALREADY_ALLOCATED_GNB_CU_UE_F1AP_ID,
487 UNKNOWN_GNB_DU_UE_F1AP_ID,
488 ALREADY_ALLOCATED_GNB_DU_UE_F1AP_ID,
489 UNKNOWN_UE_F1AP_ID_PAIR,
490 INCONSISTENT_UE_F1AP_ID_PAIR,
491 INTERACTION_WITH_OTHER_PROCEDURE,
493 ACTION_REQUIRED_FOR_RADIO_REASONS,
494 RADIO_RESOURCES_UNAVAILABLE,
500 RESOURCES_UNAVAILABLE_FOR_SLICE
505 UNSPECIFIED_TRANSPORT_LAYER_CAUSE,
506 TRANSPORT_RESOURCE_UNAVAILABLE
511 TRANSFER_SYNTAX_ERROR,
512 ABSTRACT_SYNTAX_ERROR_REJECT,
513 ABSTRACT_SYNTAX_ERROR_IGNORE_AND_REJECT,
514 INCOMPATIBLE_MESSAGE_FOR_RECEIVER_STATE,
516 ABSTRAXCT_SYNTAX_ERROR_FALSELY_CONSTRUCTED_MSG,
517 UNSPECIFIED_PROTOCOL_CAUSE
522 CONTROL_PROCESSING_OVERLOAD,
524 PLANE_PROCESSING_RESOURCES,
526 INTERVENTION_BY_O_AND_M,
527 UNSPECIFIED_MISC_CAUSE
530 typedef struct failureCause
535 RadioNwLyrCause radioNwCause;
536 TransLyrCause transportCause;
537 ProtCause protcolCause;
538 MiscFailCause miscCause;
542 typedef struct carrierCfg
545 uint16_t bw; /* DL/UL bandwidth */
546 uint32_t freq; /* Absolute frequency of DL/UL point A in KHz */
547 uint16_t k0[NUM_NUMEROLOGY]; /* K0 for DL/UL */
548 uint16_t gridSize[NUM_NUMEROLOGY]; /* DL/UL Grid size for each numerologies */
549 uint16_t numAnt; /* Number of Tx/Rx antennas */
552 typedef struct ssbCfg
554 uint32_t ssbPbchPwr; /* SSB block power */
555 BchPduOpt bchPayloadFlag; /* Options for generation of payload */
556 uint8_t scsCmn; /* subcarrier spacing for common */
557 uint16_t ssbOffsetPointA; /* SSB subcarrier offset from point A */
559 SSBPeriod ssbPeriod; /* SSB Periodicity in msec */
560 uint8_t ssbScOffset; /* Subcarrier Offset */
561 uint8_t mibPdu[3]; /* MIB payload */
562 uint32_t ssbMask[SSB_MASK_SIZE]; /* Bitmap for actually transmitted SSB. */
563 uint8_t beamId[NUM_SSB];
564 bool multCarrBand; /* Multiple carriers in a band */
565 bool multCellCarr; /* Multiple cells in single carrier */
568 typedef struct fdmInfo
570 uint16_t rootSeqIdx; /* Root sequence index */
571 uint8_t numRootSeq; /* Number of root sequences required for FD */
572 uint16_t k1; /* Frequency Offset for each FD */
573 uint8_t zeroCorrZoneCfg; /* Zero correlation zone cofig */
574 uint8_t numUnusedRootSeq; /* Number of unused root sequence */
575 uint8_t *unsuedRootSeq; /* Unused root sequence per FD */
578 typedef struct prachCfg
581 uint8_t prachCfgIdx; /* PRACH Cfg Index */
582 PrachSeqLen prachSeqLen; /* RACH Sequence length: Long/short */
583 uint8_t prachSubcSpacing; /* Subcarrier spacing of RACH */
584 RstSetCfg prachRstSetCfg; /* PRACH restricted set config */
585 uint16_t msg1FreqStart; /* Msg1-FrequencyStart */
586 uint8_t msg1Fdm; /* PRACH FDM (1,2,4,8) */
587 uint8_t rootSeqLen; /* Root sequence length */
588 PrachFdmInfo fdm[8]; /* FDM info */
589 uint8_t ssbPerRach; /* SSB per RACH occassion */
590 bool prachMultCarrBand; /* Multiple carriers in Band */
591 uint8_t prachRestrictedSet; /* Support for PRACH restricted set */
592 uint8_t raContResTmr; /* RA Contention Resoultion Timer */
593 uint8_t rsrpThreshSsb; /* RSRP Threshold SSB */
594 uint8_t raRspWindow; /* RA Response Window */
597 typedef struct tddCfg
600 DlUlTxPeriodicity tddPeriod; /* DL UL Transmission periodicity */
601 SlotConfig slotCfg[MAXIMUM_TDD_PERIODICITY][MAX_SYMB_PER_SLOT];
604 typedef struct sib1CellCfg
608 uint16_t sib1NewTxPeriod;
609 uint16_t sib1RepetitionPeriod;
610 uint8_t coresetZeroIndex; /* derived from 4 LSB of pdcchSib1 present in MIB */
611 uint8_t searchSpaceZeroIndex; /* derived from 4 MSB of pdcchSib1 present in MIB */
615 typedef struct bwpParams
620 uint8_t cyclicPrefix;
623 typedef struct candidatesInfo
632 typedef struct searchSpaceCfg
634 uint8_t searchSpaceId;
636 uint16_t monitoringSlot;
638 uint16_t monitoringSymbol;
639 CandidatesInfo candidate;
642 typedef struct pdcchConfigCommon
644 /* only one search space is configured during SIB1 */
645 SearchSpaceCfg commonSearchSpace;
646 uint8_t raSearchSpaceId;
649 typedef struct pdschConfigCommon
654 uint8_t lengthSymbol;
657 typedef struct pucchConfigCommon
659 uint8_t pucchResourceCommon;
660 uint8_t pucchGroupHopping;
663 typedef struct puschConfigCommon
665 /* PUSCH-TimeDomainResourceAllocation info */
669 uint8_t lengthSymbol;
672 typedef struct bwpDlConfig
675 PdcchConfigCommon pdcchCommon;
676 PdschConfigCommon pdschCommon;
679 typedef struct bwpUlConfig
682 // rach config common sent in PrachCfg
683 PucchConfigCommon pucchCommon;
684 PuschConfigCommon puschCommon;
687 typedef struct macCellCfg
689 uint16_t cellId; /* Cell Id */
690 uint8_t numTlv; /* Number of configuration TLVs */
691 uint8_t carrierId; /* Carrired Index */
692 uint16_t phyCellId; /* Physical cell id */
693 DuplexMode dupType; /* Duplex type: TDD/FDD */
694 CarrierCfg dlCarrCfg; /* DL Carrier configuration */
695 CarrierCfg ulCarrCfg; /* UL Carrier configuration */
696 bool freqShft; /* Indicates presence of 7.5kHz frequency shift */
697 SsbCfg ssbCfg; /* SSB configuration */
698 PrachCfg prachCfg; /* PRACH Configuration */
699 TDDCfg tddCfg; /* TDD periodicity and slot configuration */
700 RSSIMeasUnit rssiUnit; /* RSSI measurement unit */
701 Sib1CellCfg sib1Cfg; /* SIB1 config */
702 BwpDlConfig initialDlBwp; /* Initial DL BWP */
703 BwpUlConfig initialUlBwp; /* Initial UL BWP */
704 uint8_t dmrsTypeAPos; /* DMRS Type A position */
707 typedef struct macCellCfgCfm
713 typedef struct macCellStartInfo
718 typedef struct macCellStopInfo
723 typedef struct ulCcchInd
727 uint16_t ulCcchMsgLen;
731 typedef struct dlCcchInd
735 DlCcchMsgType msgType;
736 uint16_t dlCcchMsgLen;
740 typedef struct bsrTmrCfg
742 BsrPeriodicTimer periodicTimer;
743 BsrReTxTimer retxTimer;
744 BsrSrDelayTimer srDelayTimer;
748 /* Info of Scheduling Request to Add/Modify */
749 typedef struct schedReqInfo
752 SrProhibitTimer srProhibitTmr;
753 SrTransMax srTransMax;
756 /* Scheduling Request Configuration */
757 typedef struct schedReqCfg
759 uint8_t addModListCount;
760 SchedReqInfo addModList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* List of Scheduling req to be added/modified */
761 uint8_t relListCount;
762 uint8_t relList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* list of scheduling request Id to be deleted */
765 typedef struct tagInfo
768 TimeAlignmentTimer timeAlignTimer;
771 typedef struct tagCfg
773 uint8_t addModListCount;
774 TagInfo addModList[MAC_NUM_TAGS]; /* List of Tag to Add/Modify */
775 uint8_t relListCount;
776 uint8_t relList[MAC_NUM_TAGS]; /* list of Tag Id to release */
779 typedef struct phrCfg
781 PhrPeriodicTimer periodicTimer;
782 PhrProhibitTimer prohibitTimer;
783 PhrTxPwrFactorChange txPowerFactor;
786 bool phrType2OtherCell;
787 PhrModeOtherCG phrOtherCG;
790 typedef struct macCellGrpCfg
792 SchedReqCfg schReqCfg;
795 bool phrCfgSetupPres; /* true/false: phrCfgSetup/phrCfgRelease */
799 typedef struct phyCellGrpCfg
801 PdschHarqAckCodebook pdschHarqAckCodebook;
805 /* Control resource set info */
806 typedef struct controlRsrcSet
808 uint8_t cRSetId; /* Control resource set id */
809 uint8_t freqDomainRsrc[FREQ_DOM_RSRC_SIZE]; /* Frequency domain resource */
811 REGMappingType cceRegMappingType;
812 PrecoderGranul precoderGranularity;
813 uint16_t dmrsScramblingId;
816 /* Search Space info */
817 typedef struct searchSpace
819 uint8_t searchSpaceId;
821 MSlotPeriodAndOffset mSlotPeriodicityAndOffset;
822 uint8_t mSymbolsWithinSlot[MONITORING_SYMB_WITHIN_SLOT_SIZE];
823 AggrLevel numCandidatesAggLevel1; /* Number of candidates for aggregation level 1 */
824 AggrLevel numCandidatesAggLevel2; /* Number of candidates for aggregation level 2 */
825 AggrLevel numCandidatesAggLevel4; /* Number of candidates for aggregation level 4 */
826 AggrLevel numCandidatesAggLevel8; /* Number of candidates for aggregation level 8 */
827 AggrLevel numCandidatesAggLevel16; /* Number of candidates for aggregation level 16 */
828 SearchSpaceType searchSpaceType;
829 uint8_t ueSpecificDciFormat;
832 /* PDCCH cofniguration */
833 typedef struct pdcchConfig
835 uint8_t numCRsetToAddMod;
836 ControlRsrcSet cRSetToAddModList[MAX_NUM_CRSET]; /* List of control resource set to add/modify */
837 uint8_t numCRsetToRel;
838 uint8_t cRSetToRelList[MAX_NUM_CRSET]; /* List of control resource set to release */
839 uint8_t numSearchSpcToAddMod;
840 SearchSpace searchSpcToAddModList[MAX_NUM_SEARCH_SPC]; /* List of search space to add/modify */
841 uint8_t numSearchSpcToRel;
842 uint8_t searchSpcToRelList[MAX_NUM_SEARCH_SPC]; /* List of search space to release */
845 /* PDSCH time domain resource allocation */
846 typedef struct pdschTimeDomRsrcAlloc
848 CommonMappingType mappingType;
850 uint8_t symbolLength;
851 uint8_t startSymbolAndLength;
852 }PdschTimeDomRsrcAlloc;
855 typedef struct pdschBundling
857 struct staticBundling
859 BundlingSizeSet2 size;
861 struct dynamicBundling
863 BundlingSizeSet1 sizeSet1;
864 BundlingSizeSet2 sizeSet2;
868 /* DMRS downlink configuration */
869 typedef struct dmrsDlCfg
871 AddPosType addPos; /* DMRS additional position */
874 /* PDSCH Configuration */
875 typedef struct pdschConfig
877 DmrsDlCfg dmrsDlCfgForPdschMapTypeA;
878 ResAllocType resourceAllocType;
879 uint8_t numTimeDomRsrcAlloc;
880 PdschTimeDomRsrcAlloc timeDomRsrcAllociList[MAX_NUM_DL_ALLOC]; /* PDSCH time domain DL resource allocation list */
882 CodeWordsSchedDci numCodeWordsSchByDci; /* Number of code words scheduled by DCI */
883 BundlingType bundlingType;
884 PdschBundling bundlingInfo;
887 /* Initial Downlink BWP */
888 typedef struct initialDlBwp
891 PdcchConfig pdcchCfg;
893 PdschConfig pdschCfg;
896 /* BWP Downlink common */
897 typedef struct bwpDlCommon
901 /* Downlink BWP information */
902 typedef struct dlBwpInfo
907 /* PDCCH Serving Cell configuration */
908 typedef struct pdschServCellCfg
910 uint8_t *maxMimoLayers;
911 NumHarqProcForPdsch numHarqProcForPdsch;
912 MaxCodeBlkGrpPerTB *maxCodeBlkGrpPerTb;
913 bool *codeBlkGrpFlushInd;
914 PdschXOverhead *xOverhead;
917 /* PUCCH Configuration */
918 typedef struct pucchCfg
920 /* TODO : Not used currently */
923 /* Transform precoding disabled */
924 typedef struct transPrecodDisabled
926 uint16_t scramblingId0;
927 }TransPrecodDisabled;
929 /* DMRS Uplink configuration */
930 typedef struct dmrsUlCfg
932 AddPosType addPos; /* DMRS additional position */
933 TransPrecodDisabled transPrecodDisabled; /* Transform precoding disabled */
936 /* PUSCH Time Domain Resource Allocation */
937 typedef struct puschTimeDomRsrcAlloc
940 CommonMappingType mappingType;
942 uint8_t symbolLength;
943 uint8_t startSymbolAndLength;
944 }PuschTimeDomRsrcAlloc;
946 /* PUSCH Configuration */
947 typedef struct puschCfg
949 uint8_t dataScramblingId;
950 DmrsUlCfg dmrsUlCfgForPuschMapTypeA;
951 ResAllocType resourceAllocType;
952 uint8_t numTimeDomRsrcAlloc;
953 PuschTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_UL_ALLOC]; /* PUSCH time domain UL resource allocation list */
954 TransformPrecoder transformPrecoder;
957 /* Initial Uplink BWP */
958 typedef struct initialUlBwp
966 /* Uplink BWP information */
967 typedef struct ulBwpInfo
972 /* Serving cell configuration */
973 typedef struct servCellCfgInfo
975 InitialDlBwp initDlBwp;
976 uint8_t numDlBwpToAdd;
977 DlBwpInfo DlBwpToAddList[MAX_NUM_BWP];
978 uint8_t firstActvDlBwpId;
979 uint8_t defaultDlBwpId;
980 uint8_t *bwpInactivityTmr;
981 PdschServCellCfg pdschServCellCfg;
982 InitialUlBwp initUlBwp;
983 uint8_t numUlBwpToAdd;
984 UlBwpInfo UlBwpToAddList[MAX_NUM_BWP];
985 uint8_t firstActvUlBwpId;
988 /* Special cell configuration */
989 typedef struct spCellCfg
992 ServCellCfgInfo servCellCfg;
995 typedef struct maxAggrBitRate
1001 /* Single Network Slice Selection assistance Info */
1002 typedef struct snssai
1004 uint8_t sst; /* Slice Type */
1005 uint8_t sd[SD_SIZE]; /* Slice Differentiator */
1008 typedef struct nonDynFiveQi
1013 uint16_t maxDataBurstVol;
1016 typedef struct dynFiveQi
1019 uint16_t packetDelayBudget;
1020 uint8_t packetErrRateScalar;
1021 uint8_t packetErrRateExp;
1023 uint8_t delayCritical;
1025 uint16_t maxDataBurstVol;
1028 typedef struct ngRanAllocAndRetPri
1030 uint8_t priorityLevel;
1031 uint8_t preEmptionCap;
1032 uint8_t preEmptionVul;
1033 }NgRanAllocAndRetPri;
1035 typedef struct grbQosInfo
1037 uint32_t maxFlowBitRateDl;
1038 uint32_t maxFlowBitRateUl;
1039 uint32_t guarFlowBitRateDl;
1040 uint32_t guarFlowBitRateUl;
1043 typedef struct drbQos
1045 QosType fiveQiType; /* Dynamic or non-dynamic */
1048 NonDynFiveQi nonDyn5Qi;
1051 NgRanAllocAndRetPri ngRanRetPri;
1052 GrbQosInfo grbQosInfo;
1053 uint16_t pduSessionId;
1054 uint32_t ulPduSessAggMaxBitRate;
1057 typedef struct ulLcCfg
1062 PBitRate pbr; // prioritisedBitRate
1063 BucketSizeDur bsd; // bucketSizeDuration
1066 typedef struct duLcCfg
1068 LcPriority lcp; // logical Channel Prioritization
1071 typedef struct lcCfg
1073 ConfigType configType;
1082 typedef struct macUeCfg
1087 MacCellGrpCfg macCellGrpCfg;
1088 PhyCellGrpCfg phyCellGrpCfg;
1089 SpCellCfg spCellCfg;
1090 MaxAggrBitRate *maxAggrBitRate;
1092 LcCfg lcCfgList[MAX_NUM_LC];
1093 UeCfgState macUeCfgState; /* InActive / Completed */
1096 typedef struct nrcgi
1102 typedef struct srbFailInfo
1108 typedef struct drbFailInfo
1114 typedef struct sCellFailInfo
1120 typedef struct ueCfgRsp
1125 uint8_t numSRBFailed; /* valid values : 0 to MAX_NUM_SRB */
1126 SRBFailInfo *failedSRBlisti;
1127 uint8_t numDRBFailed; /* valid values : 0 to MAX_NUM_DRB */
1128 DRBFailInfo *failedDRBlist;
1129 uint8_t numSCellFailed; /* valid values : 0 to MAX_NUM_SCELL */
1130 SCellFailInfo *failedSCellList;
1133 /* Functions for slot Ind from MAC to DU APP*/
1134 typedef uint8_t (*DuMacSlotInd) ARGS((
1136 SlotIndInfo *slotInfo ));
1138 /* Functions for stop Ind from MAC to DU APP*/
1139 typedef uint8_t (*DuMacStopInd) ARGS((
1141 MacCellStopInfo *cellId ));
1143 /* Functions for mac cell start req */
1144 typedef uint8_t (*DuMacCellStartReq) ARGS((
1146 MacCellStartInfo *cellStartInfo ));
1148 /* Functions for mac cell stop request */
1149 typedef uint8_t (*DuMacCellStopReq) ARGS((
1151 MacCellStopInfo *cellStopInfo ));
1153 /* Function pointers for packing macCellCfg Request and Confirm */
1154 typedef uint8_t (*packMacCellCfgReq) ARGS((
1156 MacCellCfg *macCellCfg ));
1158 typedef uint8_t (*packMacCellCfgConfirm) ARGS((
1160 MacCellCfgCfm *macCellCfgCfm ));
1162 typedef uint8_t (*DuMacCellCfgReq) ARGS((
1164 MacCellCfg *macCellCfg));
1166 typedef uint8_t (*DuMacCellCfgCfm) ARGS((
1168 MacCellCfgCfm *macCellCfgCfm ));
1170 /* Functions for UL CCCH Ind from MAC to DU APP*/
1171 typedef uint8_t (*DuMacUlCcchInd) ARGS((
1173 UlCcchIndInfo *ulCcchIndInfo ));
1175 /* Functions for DL CCCH Ind from DU APP to MAC*/
1176 typedef uint8_t (*DuMacDlCcchInd) ARGS((
1178 DlCcchIndInfo *dlCcchIndInfo ));
1180 /* UE create Request from DU APP to MAC*/
1181 typedef uint8_t (*DuMacUeCreateReq) ARGS((
1185 /* UE create Response from MAC to DU APP */
1186 typedef uint8_t (*MacDuUeCfgRspFunc) ARGS((
1188 MacUeCfgRsp *cfgRsp));
1190 /* UE Reconfig Request from DU APP to MAC*/
1191 typedef uint8_t (*DuMacUeReconfigReq) ARGS((
1195 uint8_t packMacSlotInd(Pst *pst, SlotIndInfo *slotInfo );
1196 uint8_t unpackMacSlotInd(DuMacSlotInd func, Pst *pst, Buffer *mBuf);
1197 uint8_t duHandleSlotInd(Pst *pst, SlotIndInfo *slotInfo);
1198 uint8_t packMacCellStartReq(Pst *pst, MacCellStartInfo *cellStartInfo);
1199 uint8_t unpackMacCellStartReq(DuMacCellStartReq func, Pst *pst, Buffer *mBuf);
1200 uint8_t MacProcCellStartReq(Pst *pst, MacCellStartInfo *cellStartInfo);
1201 uint8_t packMacCellStopReq(Pst *pst, MacCellStopInfo *cellStopInfo);
1202 uint8_t unpackMacCellStopReq(DuMacCellStopReq func, Pst *pst, Buffer *mBuf);
1203 uint8_t MacProcCellStopReq(Pst *pst, MacCellStopInfo *cellStopInfo);
1204 uint8_t packMacCellCfg(Pst *pst, MacCellCfg *macCellCfg);
1205 uint8_t unpackDuMacCellCfg(DuMacCellCfgReq func, Pst *pst, Buffer *mBuf);
1206 uint8_t MacProcCellCfgReq(Pst *pst, MacCellCfg *macCellCfg);
1207 uint8_t packMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm);
1208 uint8_t unpackMacCellCfgCfm(DuMacCellCfgCfm func, Pst *pst, Buffer *mBuf);
1209 uint8_t duHandleMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm);
1210 uint8_t packMacStopInd(Pst *pst, MacCellStopInfo *cellId);
1211 uint8_t unpackMacStopInd(DuMacStopInd func, Pst *pst, Buffer *mBuf);
1212 uint8_t duHandleStopInd(Pst *pst, MacCellStopInfo *cellId);
1213 uint8_t packMacUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo);
1214 uint8_t unpackMacUlCcchInd(DuMacUlCcchInd func, Pst *pst, Buffer *mBuf);
1215 uint8_t duHandleUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo);
1216 uint8_t packMacDlCcchInd(Pst *pst, DlCcchIndInfo *dlCcchIndInfo);
1217 uint8_t unpackMacDlCcchInd(DuMacDlCcchInd func, Pst *pst, Buffer *mBuf);
1218 uint8_t MacProcDlCcchInd(Pst *pst, DlCcchIndInfo *dlCcchIndInfo);
1219 uint8_t packDuMacUeCreateReq(Pst *pst, MacUeCfg *ueCfg);
1220 uint8_t unpackMacUeCreateReq(DuMacUeCreateReq func, Pst *pst, Buffer *mBuf);
1221 uint8_t MacProcUeCreateReq(Pst *pst, MacUeCfg *ueCfg);
1222 uint8_t sendStopIndMacToDuApp(uint16_t cellId);
1223 uint8_t packDuMacUeCfgRsp(Pst *pst, MacUeCfgRsp *cfgRsp);
1224 uint8_t unpackDuMacUeCfgRsp(MacDuUeCfgRspFunc func, Pst *pst, Buffer *mBuf);
1225 uint8_t DuProcMacUeCfgRsp(Pst *pst, MacUeCfgRsp *cfgRsp);
1226 uint8_t packDuMacUeReconfigReq(Pst *pst, MacUeCfg *ueCfg);
1227 uint8_t unpackMacUeReconfigReq(DuMacUeReconfigReq func, Pst *pst, Buffer *mBuf);
1228 uint8_t MacProcUeReconfigReq(Pst *pst, MacUeCfg *ueCfg);
1232 /**********************************************************************
1234 **********************************************************************/