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 */
42 /* Macro for Ue Context */
43 #define MAX_NUM_SR_CFG_PER_CELL_GRP 8 /* Max number of scheduling request config per cell group */
44 #define MAC_NUM_TAGS 4 /* Max number of timing advance groups */
45 #define MAX_NUM_BWP 4 /* Max number of BWP per serving cell */
46 #define MAX_NUM_CRSET 3 /* Max number of control resource set in add/modify/release list */
47 #define MAX_NUM_SEARCH_SPC 10 /* Max number of search space in add/modify/release list */
48 #define MONITORING_SYMB_WITHIN_SLOT_SIZE 2 /* i.e. 2 bytes because size of monitoring symbols within slot is 14 bits */
49 #define MAX_NUM_DL_ALLOC 16 /* Max number of pdsch time domain downlink allocation */
50 #define MAX_NUM_UL_ALLOC 16 /* Max number of pusch time domain uplink allocation */
51 #define SD_SIZE 3 /* Max size of Slice Differentiator in S-NSSAI */
53 #define MAX_NUM_SCELL 32
55 /* PUCCH Configuration Macro */
56 #define MAX_NUM_PUCCH_RESRC 128
57 #define MAX_NUM_PUCCH_RESRC_SET 4
58 #define MAX_NUM_PUCCH_PER_RESRC_SET 32
59 #define MAX_NUM_SPATIAL_RELATIONS 8
60 #define MAX_NUM_PUCCH_P0_PER_SET 8
61 #define MAX_NUM_PATH_LOSS_REF_RS 4
62 #define MAX_NUM_DL_DATA_TO_UL_ACK 15
65 #define EVENT_MAC_CELL_CONFIG_REQ 200
66 #define EVENT_MAC_CELL_CONFIG_CFM 201
67 #define EVENT_MAC_CELL_START 202
68 #define EVENT_MAC_CELL_STOP 203
69 #define EVENT_MAC_CELL_UP_IND 204
70 #define EVENT_MAC_STOP_IND 205
71 #define EVENT_MAC_UL_CCCH_IND 206
72 #define EVENT_MAC_DL_CCCH_IND 207
73 #define EVENT_MAC_UE_CREATE_REQ 208
74 #define EVENT_MAC_UE_CREATE_RSP 209
75 #define EVENT_MAC_UE_RECONFIG_REQ 210
76 #define EVENT_MAC_UE_RECONFIG_RSP 211
78 #define BSR_PERIODIC_TIMER_SF_10 10
79 #define BSR_RETX_TIMER_SF_320 320
80 #define BSR_SR_DELAY_TMR_2560 2560
96 MAC_GEN_FULL_PBCH_PAYLD, /* MAC generated the full PBCH Payload */
97 PHY_GEN_TIMING_PBCH_BIT, /* PHY generates the timing PBCH bits */
98 PHY_GEN_FULL_PBCH_PAYLD /* PHY generates full PBCH payload */
110 RESTRICTED_SET_TYPE_A,
111 RESTRICTED_SET_TYPE_B
143 /* Enums for Ue Create Request */
145 /* SR PROHIBIT TIMER */
172 TIME_ALIGNMENT_TIMER_MS_500,
173 TIME_ALIGNMENT_TIMER_MS_750,
174 TIME_ALIGNMENT_TIMER_MS_1280,
175 TIME_ALIGNMENT_TIMER_MS_1920,
176 TIME_ALIGNMENT_TIMER_MS_2560,
177 TIME_ALIGNMENT_TIMER_MS_5120,
178 TIME_ALIGNMENT_TIMER_MS_10240,
179 TIME_ALIGNMENT_TIMER_INFINITY
184 PHR_PERIODIC_TIMER_SF_10,
185 PHR_PERIODIC_TIMER_SF_20,
186 PHR_PERIODIC_TIMER_SF_50,
187 PHR_PERIODIC_TIMER_SF_100,
188 PHR_PERIODIC_TIMER_SF_200,
189 PHR_PERIODIC_TIMER_SF_500,
190 PHR_PERIODIC_TIMER_SF_1000,
191 PHR_PERIODIC_TIMER_INFINITY
196 PHR_PROHIBIT_TIMER_SF_0,
197 PHR_PROHIBIT_TIMER_SF_10,
198 PHR_PROHIBIT_TIMER_SF_20,
199 PHR_PROHIBIT_TIMER_SF_50,
200 PHR_PROHIBIT_TIMER_SF_100,
201 PHR_PROHIBIT_TIMER_SF_200,
202 PHR_PROHIBIT_TIMER_SF_500,
203 PHR_PROHIBIT_TIMER_SF_1000
208 PHR_TX_PWR_FACTOR_CHANGE_DB_1,
209 PHR_TX_PWR_FACTOR_CHANGE_DB_3,
210 PHR_TX_PWR_FACTOR_CHANGE_DB_6,
211 PHR_TX_PWR_FACTOR_CHANGE_INFINITY
212 }PhrTxPwrFactorChange;
216 PHR_MODE_OTHER_CG_REAL,
217 PHR_MODE_OTHER_CG_VIRTUAL
222 PDSCH_HARQ_ACK_CODEBOOK_SEMISTATIC,
223 PDSCH_HARQ_ACK_CODEBOOK_DYNAMIC
224 }PdschHarqAckCodebook;
228 NUM_HARQ_PROC_FOR_PDSCH_N_2,
229 NUM_HARQ_PROC_FOR_PDSCH_N_4,
230 NUM_HARQ_PROC_FOR_PDSCH_N_6,
231 NUM_HARQ_PROC_FOR_PDSCH_N_10,
232 NUM_HARQ_PROC_FOR_PDSCH_N_16
233 }NumHarqProcForPdsch;
237 MAX_CODE_BLOCK_GROUP_PER_TB_N_2,
238 MAX_CODE_BLOCK_GROUP_PER_TB_N_4,
239 MAX_CODE_BLOCK_GROUP_PER_TB_N_6,
240 MAX_CODE_BLOCK_GROUP_PER_TB_N_8
252 TRANSFORM_PRECODER_ENABLED,
253 TRANSFORM_PRECODER_DISABLED
258 CCE_REG_MAPPINGTYPE_PR_INTERLEAVED = 1,
259 CCE_REG_MAPPINGTYPE_PR_NONINTERLEAVED
264 SLOTPERIODICITYANDOFFSET_PR_SL1 = 1,
265 SLOTPERIODICITYANDOFFSET_PR_SL2,
266 SLOTPERIODICITYANDOFFSET_PR_SL4,
267 SLOTPERIODICITYANDOFFSET_PR_SL5,
268 SLOTPERIODICITYANDOFFSET_PR_SL8,
269 SLOTPERIODICITYANDOFFSET_PR_SL10,
270 SLOTPERIODICITYANDOFFSET_PR_SL16,
271 SLOTPERIODICITYANDOFFSET_PR_SL20,
272 SLOTPERIODICITYANDOFFSET_PR_SL40,
273 SLOTPERIODICITYANDOFFSET_PR_SL80,
274 SLOTPERIODICITYANDOFFSET_PR_SL160,
275 SLOTPERIODICITYANDOFFSET_PR_SL320,
276 SLOTPERIODICITYANDOFFSET_PR_SL640,
277 SLOTPERIODICITYANDOFFSET_PR_SL1280,
278 SLOTPERIODICITYANDOFFSET_PR_SL2560
279 }MSlotPeriodAndOffset;
289 SEARCHSPACETYPE_PR_COMMON = 1,
290 SEARCHSPACETYPE_PR_UE_SPECIFIC
301 AGGREGATIONLEVEL_N0 = 0,
302 AGGREGATIONLEVEL_N1 = 1,
303 AGGREGATIONLEVEL_N2 = 2,
304 AGGREGATIONLEVEL_N3 = 3,
305 AGGREGATIONLEVEL_N4 = 4,
306 AGGREGATIONLEVEL_N5 = 5,
307 AGGREGATIONLEVEL_N6 = 6,
308 AGGREGATIONLEVEL_N8 = 7
313 ADDITIONALPOSITION_POS0,
314 ADDITIONALPOSITION_POS1,
315 ADDITIONALPOSITION_POS3
326 RESOURCEALLOCATION_TYPE0,
327 RESOURCEALLOCATION_TYPE1,
328 RESOURCEALLOCATION_DYNAMICSWITCH
339 CODEWORDS_SCHED_BY_DCI_N1,
340 CODEWORDS_SCHED_BY_DCI_N2
345 TYPE_STATIC_BUNDLING = 1,
346 TYPE_DYNAMIC_BUNDLING
359 SET1_SIZE_N2_WIDEBAND,
360 SET1_SIZE_N4_WIDEBAND
414 TRANSPORT_LAYER_FAIL,
421 UNSPECIFIED_RADIO_NW_CAUSE,
423 UNKNOWN_GNB_CU_UE_F1AP_ID,
424 ALREADY_ALLOCATED_GNB_CU_UE_F1AP_ID,
425 UNKNOWN_GNB_DU_UE_F1AP_ID,
426 ALREADY_ALLOCATED_GNB_DU_UE_F1AP_ID,
427 UNKNOWN_UE_F1AP_ID_PAIR,
428 INCONSISTENT_UE_F1AP_ID_PAIR,
429 INTERACTION_WITH_OTHER_PROCEDURE,
431 ACTION_REQUIRED_FOR_RADIO_REASONS,
432 RADIO_RESOURCES_UNAVAILABLE,
438 RESOURCES_UNAVAILABLE_FOR_SLICE
443 UNSPECIFIED_TRANSPORT_LAYER_CAUSE,
444 TRANSPORT_RESOURCE_UNAVAILABLE
449 TRANSFER_SYNTAX_ERROR,
450 ABSTRACT_SYNTAX_ERROR_REJECT,
451 ABSTRACT_SYNTAX_ERROR_IGNORE_AND_REJECT,
452 INCOMPATIBLE_MESSAGE_FOR_RECEIVER_STATE,
454 ABSTRAXCT_SYNTAX_ERROR_FALSELY_CONSTRUCTED_MSG,
455 UNSPECIFIED_PROTOCOL_CAUSE
460 CONTROL_PROCESSING_OVERLOAD,
462 PLANE_PROCESSING_RESOURCES,
464 INTERVENTION_BY_O_AND_M,
465 UNSPECIFIED_MISC_CAUSE
472 MCS_TABLE_QAM64_LOW_SE
475 typedef struct failureCause
480 RadioNwLyrCause radioNwCause;
481 TransLyrCause transportCause;
482 ProtCause protcolCause;
483 MiscFailCause miscCause;
487 typedef struct carrierCfg
490 uint32_t bw; /* DL/UL bandwidth */
491 uint32_t freq; /* Absolute frequency of DL/UL point A in KHz */
492 uint16_t k0[NUM_NUMEROLOGY]; /* K0 for DL/UL */
493 uint16_t gridSize[NUM_NUMEROLOGY]; /* DL/UL Grid size for each numerologies */
494 uint16_t numAnt; /* Number of Tx/Rx antennas */
497 typedef struct ssbCfg
499 uint32_t ssbPbchPwr; /* SSB block power */
500 BchPduOpt bchPayloadFlag; /* Options for generation of payload */
501 uint8_t scsCmn; /* subcarrier spacing for common */
502 uint16_t ssbOffsetPointA; /* SSB subcarrier offset from point A */
504 SSBPeriod ssbPeriod; /* SSB Periodicity in msec */
505 uint8_t ssbScOffset; /* Subcarrier Offset */
506 uint8_t mibPdu[3]; /* MIB payload */
507 uint32_t ssbMask[SSB_MASK_SIZE]; /* Bitmap for actually transmitted SSB. */
508 uint8_t beamId[NUM_SSB];
509 bool multCarrBand; /* Multiple carriers in a band */
510 bool multCellCarr; /* Multiple cells in single carrier */
513 typedef struct fdmInfo
515 uint16_t rootSeqIdx; /* Root sequence index */
516 uint8_t numRootSeq; /* Number of root sequences required for FD */
517 uint16_t k1; /* Frequency Offset for each FD */
518 uint8_t zeroCorrZoneCfg; /* Zero correlation zone cofig */
519 uint8_t numUnusedRootSeq; /* Number of unused root sequence */
520 uint8_t *unsuedRootSeq; /* Unused root sequence per FD */
523 typedef struct prachCfg
526 uint8_t prachCfgIdx; /* PRACH Cfg Index */
527 PrachSeqLen prachSeqLen; /* RACH Sequence length: Long/short */
528 uint8_t prachSubcSpacing; /* Subcarrier spacing of RACH */
529 RstSetCfg prachRstSetCfg; /* PRACH restricted set config */
530 uint16_t msg1FreqStart; /* Msg1-FrequencyStart */
531 uint8_t msg1Fdm; /* PRACH FDM (1,2,4,8) */
532 uint8_t rootSeqLen; /* Root sequence length */
533 PrachFdmInfo fdm[8]; /* FDM info */
534 uint8_t ssbPerRach; /* SSB per RACH occassion */
535 bool prachMultCarrBand; /* Multiple carriers in Band */
536 uint8_t prachRestrictedSet; /* Support for PRACH restricted set */
537 uint8_t raContResTmr; /* RA Contention Resoultion Timer */
538 uint8_t rsrpThreshSsb; /* RSRP Threshold SSB */
539 uint8_t raRspWindow; /* RA Response Window */
542 typedef struct sib1CellCfg
546 uint16_t sib1RepetitionPeriod;
547 uint8_t coresetZeroIndex; /* derived from 4 LSB of pdcchSib1 present in MIB */
548 uint8_t searchSpaceZeroIndex; /* derived from 4 MSB of pdcchSib1 present in MIB */
552 typedef struct bwpParams
557 uint8_t cyclicPrefix;
560 typedef struct candidatesInfo
569 typedef struct searchSpaceCfg
571 uint8_t searchSpaceId;
573 uint16_t monitoringSlot;
575 uint16_t monitoringSymbol;
576 CandidatesInfo candidate;
579 typedef struct pdcchConfigCommon
581 /* only one search space is configured during SIB1 */
582 SearchSpaceCfg commonSearchSpace;
583 uint8_t raSearchSpaceId;
586 typedef struct pdschConfigCommon
591 uint8_t lengthSymbol;
594 typedef struct pucchConfigCommon
596 uint8_t pucchResourceCommon;
597 uint8_t pucchGroupHopping;
600 typedef struct puschConfigCommon
602 /* PUSCH-TimeDomainResourceAllocation info */
606 uint8_t lengthSymbol;
609 typedef struct bwpDlConfig
612 PdcchConfigCommon pdcchCommon;
613 PdschConfigCommon pdschCommon;
616 typedef struct bwpUlConfig
619 // rach config common sent in PrachCfg
620 PucchConfigCommon pucchCommon;
621 PuschConfigCommon puschCommon;
624 typedef struct macCellCfg
626 uint16_t cellId; /* Cell Id */
627 uint8_t carrierId; /* Carrired Index */
628 uint16_t phyCellId; /* Physical cell id */
629 uint8_t numerology; /* Supported numerology */
630 DuplexMode dupType; /* Duplex type: TDD/FDD */
631 CarrierCfg dlCarrCfg; /* DL Carrier configuration */
632 CarrierCfg ulCarrCfg; /* UL Carrier configuration */
633 bool freqShft; /* Indicates presence of 7.5kHz frequency shift */
634 SsbCfg ssbCfg; /* SSB configuration */
635 PrachCfg prachCfg; /* PRACH Configuration */
637 TDDCfg tddCfg; /* TDD periodicity and slot configuration */
639 RSSIMeasUnit rssiUnit; /* RSSI measurement unit */
640 Sib1CellCfg sib1Cfg; /* SIB1 config */
641 BwpDlConfig initialDlBwp; /* Initial DL BWP */
642 BwpUlConfig initialUlBwp; /* Initial UL BWP */
643 uint8_t dmrsTypeAPos; /* DMRS Type A position */
646 typedef struct macCellCfgCfm
652 typedef struct ulCcchInd
656 uint16_t ulCcchMsgLen;
660 typedef struct dlCcchInd
664 DlCcchMsgType msgType;
665 uint16_t dlCcchMsgLen;
669 typedef struct bsrTmrCfg
671 uint16_t periodicTimer;
673 uint16_t srDelayTimer;
677 /* Info of Scheduling Request to Add/Modify */
678 typedef struct schedReqInfo
681 SrProhibitTimer srProhibitTmr;
682 SrTransMax srTransMax;
685 /* Scheduling Request Configuration */
686 typedef struct schedReqCfg
688 uint8_t addModListCount;
689 SchedReqInfo addModList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* List of Scheduling req to be added/modified */
690 uint8_t relListCount;
691 uint8_t relList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* list of scheduling request Id to be deleted */
694 typedef struct tagInfo
697 TimeAlignmentTimer timeAlignTimer;
700 typedef struct tagCfg
702 uint8_t addModListCount;
703 TagInfo addModList[MAC_NUM_TAGS]; /* List of Tag to Add/Modify */
704 uint8_t relListCount;
705 uint8_t relList[MAC_NUM_TAGS]; /* list of Tag Id to release */
708 typedef struct phrCfg
710 PhrPeriodicTimer periodicTimer;
711 PhrProhibitTimer prohibitTimer;
712 PhrTxPwrFactorChange txPowerFactor;
715 bool phrType2OtherCell;
716 PhrModeOtherCG phrOtherCG;
719 typedef struct macCellGrpCfg
721 SchedReqCfg schReqCfg;
724 bool phrCfgSetupPres; /* true/false: phrCfgSetup/phrCfgRelease */
728 typedef struct phyCellGrpCfg
730 PdschHarqAckCodebook pdschHarqAckCodebook;
734 /* Control resource set info */
735 typedef struct controlRsrcSet
737 uint8_t cRSetId; /* Control resource set id */
738 uint8_t freqDomainRsrc[FREQ_DOM_RSRC_SIZE]; /* Frequency domain resource */
740 REGMappingType cceRegMappingType;
741 PrecoderGranul precoderGranularity;
742 uint16_t dmrsScramblingId;
745 /* Search Space info */
746 typedef struct searchSpace
748 uint8_t searchSpaceId;
750 MSlotPeriodAndOffset mSlotPeriodicityAndOffset;
751 uint8_t mSymbolsWithinSlot[MONITORING_SYMB_WITHIN_SLOT_SIZE];
752 AggrLevel numCandidatesAggLevel1; /* Number of candidates for aggregation level 1 */
753 AggrLevel numCandidatesAggLevel2; /* Number of candidates for aggregation level 2 */
754 AggrLevel numCandidatesAggLevel4; /* Number of candidates for aggregation level 4 */
755 AggrLevel numCandidatesAggLevel8; /* Number of candidates for aggregation level 8 */
756 AggrLevel numCandidatesAggLevel16; /* Number of candidates for aggregation level 16 */
757 SearchSpaceType searchSpaceType;
758 uint8_t ueSpecificDciFormat;
761 /* PDCCH cofniguration */
762 typedef struct pdcchConfig
764 uint8_t numCRsetToAddMod;
765 ControlRsrcSet cRSetToAddModList[MAX_NUM_CRSET]; /* List of control resource set to add/modify */
766 uint8_t numCRsetToRel;
767 uint8_t cRSetToRelList[MAX_NUM_CRSET]; /* List of control resource set to release */
768 uint8_t numSearchSpcToAddMod;
769 SearchSpace searchSpcToAddModList[MAX_NUM_SEARCH_SPC]; /* List of search space to add/modify */
770 uint8_t numSearchSpcToRel;
771 uint8_t searchSpcToRelList[MAX_NUM_SEARCH_SPC]; /* List of search space to release */
774 /* PDSCH time domain resource allocation */
775 typedef struct pdschTimeDomRsrcAlloc
777 CommonMappingType mappingType;
779 uint8_t symbolLength;
780 uint8_t startSymbolAndLength;
781 }PdschTimeDomRsrcAlloc;
784 typedef struct pdschBundling
786 struct staticBundling
788 BundlingSizeSet2 size;
790 struct dynamicBundling
792 BundlingSizeSet1 sizeSet1;
793 BundlingSizeSet2 sizeSet2;
797 /* DMRS downlink configuration */
798 typedef struct dmrsDlCfg
800 AddPosType addPos; /* DMRS additional position */
803 /* PDSCH Configuration */
804 typedef struct pdschConfig
806 DmrsDlCfg dmrsDlCfgForPdschMapTypeA;
807 ResAllocType resourceAllocType;
808 uint8_t numTimeDomRsrcAlloc;
809 PdschTimeDomRsrcAlloc timeDomRsrcAllociList[MAX_NUM_DL_ALLOC]; /* PDSCH time domain DL resource allocation list */
811 CodeWordsSchedDci numCodeWordsSchByDci; /* Number of code words scheduled by DCI */
812 BundlingType bundlingType;
813 PdschBundling bundlingInfo;
816 /* Initial Downlink BWP */
817 typedef struct initialDlBwp
820 PdcchConfig pdcchCfg;
822 PdschConfig pdschCfg;
825 /* BWP Downlink common */
826 typedef struct bwpDlCommon
830 /* Downlink BWP information */
831 typedef struct dlBwpInfo
836 /* PDCCH Serving Cell configuration */
837 typedef struct pdschServCellCfg
839 uint8_t *maxMimoLayers;
840 NumHarqProcForPdsch numHarqProcForPdsch;
841 MaxCodeBlkGrpPerTB *maxCodeBlkGrpPerTb;
842 bool *codeBlkGrpFlushInd;
843 PdschXOverhead *xOverhead;
846 /* PUCCH Configuration */
848 typedef struct pucchResrcSetInfo
851 uint8_t resrcListCount;
852 uint8_t resrcList[MAX_NUM_PUCCH_PER_RESRC_SET];
853 uint8_t maxPayLoadSize;
856 typedef struct pucchResrcSetCfg
858 uint8_t resrcSetToAddModListCount;
859 PucchResrcSetInfo resrcSetToAddModList[MAX_NUM_PUCCH_RESRC_SET];
860 uint8_t resrcSetToRelListCount;
861 uint8_t resrcSetToRelList[MAX_NUM_PUCCH_RESRC];
864 typedef struct pucchFormat0
866 uint8_t initialCyclicShift;
868 uint8_t startSymbolIdx;
871 typedef struct pucchFormat1
873 uint8_t initialCyclicShift;
875 uint8_t startSymbolIdx;
879 typedef struct pucchFormat2_3
883 uint8_t startSymbolIdx;
886 typedef struct pucchFormat4
891 uint8_t startSymbolIdx;
894 typedef struct pucchResrcInfo
898 uint8_t intraFreqHop;
899 uint16_t secondPrbHop;
903 PucchFormat0 *format0;
904 PucchFormat1 *format1;
905 PucchFormat2_3 *format2;
906 PucchFormat2_3 *format3;
907 PucchFormat4 *format4;
911 typedef struct pucchResrcCfg
913 uint8_t resrcToAddModListCount;
914 PucchResrcInfo resrcToAddModList[MAX_NUM_PUCCH_RESRC];
915 uint8_t resrcToRelListCount;
916 uint8_t resrcToRelList[MAX_NUM_PUCCH_RESRC];
919 typedef struct pucchFormatCfg
921 uint8_t interSlotFreqHop;
929 typedef struct schedReqResrcInfo
938 typedef struct pucchSchedReqCfg
940 uint8_t schedAddModListCount;
941 SchedReqResrcInfo schedAddModList[MAX_NUM_SR_CFG_PER_CELL_GRP];
942 uint8_t schedRelListCount;
943 uint8_t schedRelList[MAX_NUM_SR_CFG_PER_CELL_GRP];
946 typedef struct spatialRelationInfo
948 uint8_t spatialRelationId;
950 uint8_t pathLossRefRSId;
952 uint8_t closeLoopIdx;
953 }SpatialRelationInfo;
955 typedef struct pucchSpatialCfg
957 uint8_t spatialAddModListCount;
958 SpatialRelationInfo spatialAddModList[MAX_NUM_SPATIAL_RELATIONS];
959 uint8_t spatialRelListCount;
960 uint8_t spatialRelList[MAX_NUM_SPATIAL_RELATIONS];
963 typedef struct p0PucchCfg
969 typedef struct pathLossRefRSCfg
971 uint8_t pathLossRefRSId;
974 typedef struct pucchMultiCsiCfg
976 uint8_t multiCsiResrcListCount;
977 uint8_t multiCsiResrcList[MAX_NUM_PUCCH_RESRC-1];
980 typedef struct pucchDlDataToUlAck
982 uint8_t dlDataToUlAckListCount;
983 uint8_t dlDataToUlAckList[MAX_NUM_DL_DATA_TO_UL_ACK];
986 typedef struct pucchPowerControl
994 P0PucchCfg p0Set[MAX_NUM_PUCCH_P0_PER_SET];
995 uint8_t pathLossRefRSListCount;
996 PathLossRefRSCfg pathLossRefRSList[MAX_NUM_PATH_LOSS_REF_RS];
999 typedef struct pucchCfg
1001 PucchResrcSetCfg *resrcSet;
1002 PucchResrcCfg *resrc;
1003 PucchFormatCfg *format1;
1004 PucchFormatCfg *format2;
1005 PucchFormatCfg *format3;
1006 PucchFormatCfg *format4;
1007 PucchSchedReqCfg *schedReq;
1008 PucchMultiCsiCfg *multiCsiCfg;
1009 PucchSpatialCfg *spatialInfo;
1010 PucchDlDataToUlAck *dlDataToUlAck;
1011 PucchPowerControl *powerControl;
1014 /* Transform precoding disabled */
1015 typedef struct transPrecodDisabled
1017 uint16_t scramblingId0;
1018 }TransPrecodDisabled;
1020 /* DMRS Uplink configuration */
1021 typedef struct dmrsUlCfg
1023 AddPosType addPos; /* DMRS additional position */
1024 TransPrecodDisabled transPrecodDisabled; /* Transform precoding disabled */
1027 /* PUSCH Time Domain Resource Allocation */
1028 typedef struct puschTimeDomRsrcAlloc
1031 CommonMappingType mappingType;
1032 uint8_t startSymbol;
1033 uint8_t symbolLength;
1034 uint8_t startSymbolAndLength;
1035 }PuschTimeDomRsrcAlloc;
1037 /* PUSCH Configuration */
1038 typedef struct puschCfg
1040 uint8_t dataScramblingId;
1041 DmrsUlCfg dmrsUlCfgForPuschMapTypeA;
1042 ResAllocType resourceAllocType;
1043 uint8_t numTimeDomRsrcAlloc;
1044 PuschTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_UL_ALLOC]; /* PUSCH time domain UL resource allocation list */
1045 TransformPrecoder transformPrecoder;
1048 /* Initial Uplink BWP */
1049 typedef struct initialUlBwp
1057 /* Uplink BWP information */
1058 typedef struct ulBwpInfo
1063 /* Serving cell configuration */
1064 typedef struct servCellCfgInfo
1066 InitialDlBwp initDlBwp;
1067 uint8_t numDlBwpToAdd;
1068 DlBwpInfo DlBwpToAddList[MAX_NUM_BWP];
1069 uint8_t firstActvDlBwpId;
1070 uint8_t defaultDlBwpId;
1071 uint8_t *bwpInactivityTmr;
1072 PdschServCellCfg pdschServCellCfg;
1073 InitialUlBwp initUlBwp;
1074 uint8_t numUlBwpToAdd;
1075 UlBwpInfo UlBwpToAddList[MAX_NUM_BWP];
1076 uint8_t firstActvUlBwpId;
1079 /* Special cell configuration */
1080 typedef struct spCellCfg
1082 uint8_t servCellIdx;
1083 ServCellCfgInfo servCellCfg;
1086 typedef struct ambrCfg
1088 uint32_t ulBr; /* UL Bit rate */
1091 /* Single Network Slice Selection assistance Info */
1092 typedef struct snssai
1094 uint8_t sst; /* Slice Type */
1095 uint8_t sd[SD_SIZE]; /* Slice Differentiator */
1098 typedef struct nonDynFiveQi
1103 uint16_t maxDataBurstVol;
1106 typedef struct dynFiveQi
1109 uint16_t packetDelayBudget;
1110 uint8_t packetErrRateScalar;
1111 uint8_t packetErrRateExp;
1113 uint8_t delayCritical;
1115 uint16_t maxDataBurstVol;
1118 typedef struct ngRanAllocAndRetPri
1120 uint8_t priorityLevel;
1121 uint8_t preEmptionCap;
1122 uint8_t preEmptionVul;
1123 }NgRanAllocAndRetPri;
1125 typedef struct grbQosInfo
1127 uint32_t maxFlowBitRateDl;
1128 uint32_t maxFlowBitRateUl;
1129 uint32_t guarFlowBitRateDl;
1130 uint32_t guarFlowBitRateUl;
1133 typedef struct drbQos
1135 QosType fiveQiType; /* Dynamic or non-dynamic */
1138 NonDynFiveQi nonDyn5Qi;
1141 NgRanAllocAndRetPri ngRanRetPri;
1142 GrbQosInfo grbQosInfo;
1143 uint16_t pduSessionId;
1144 uint32_t ulPduSessAggMaxBitRate;
1147 typedef struct ulLcCfg
1152 PBitRate pbr; // prioritisedBitRate
1153 BucketSizeDur bsd; // bucketSizeDuration
1156 typedef struct duLcCfg
1158 LcPriority lcp; // logical Channel Prioritization
1161 typedef struct lcCfg
1163 ConfigType configType;
1172 typedef struct modulationInfo
1174 uint8_t modOrder; /* Modulation order */
1175 uint8_t mcsIndex; /* MCS Index */
1176 McsTable mcsTable; /* MCS table */
1179 typedef struct macUeCfg
1184 bool macCellGrpCfgPres;
1185 MacCellGrpCfg macCellGrpCfg;
1186 bool phyCellGrpCfgPres;
1187 PhyCellGrpCfg phyCellGrpCfg;
1189 SpCellCfg spCellCfg;
1191 ModulationInfo dlModInfo; /* DL modulation info */
1192 ModulationInfo ulModInfo; /* UL modulation info */
1194 LcCfg lcCfgList[MAX_NUM_LC];
1195 UeCfgState macUeCfgState; /* InActive / Completed */
1198 typedef struct nrcgi
1204 typedef struct srbFailInfo
1210 typedef struct drbFailInfo
1216 typedef struct sCellFailInfo
1222 typedef struct ueCfgRsp
1227 uint8_t numSRBFailed; /* valid values : 0 to MAX_NUM_SRB */
1228 SRBFailInfo *failedSRBlisti;
1229 uint8_t numDRBFailed; /* valid values : 0 to MAX_NUM_DRB */
1230 DRBFailInfo *failedDRBlist;
1231 uint8_t numSCellFailed; /* valid values : 0 to MAX_NUM_SCELL */
1232 SCellFailInfo *failedSCellList;
1235 /* Functions for slot Ind from MAC to DU APP*/
1236 typedef uint8_t (*DuMacCellUpInd) ARGS((
1238 OduCellId *cellId ));
1240 /* Functions for stop Ind from MAC to DU APP*/
1241 typedef uint8_t (*DuMacStopInd) ARGS((
1243 OduCellId *cellId ));
1245 /* Functions for mac cell start req */
1246 typedef uint8_t (*DuMacCellStart) ARGS((
1248 OduCellId *cellId));
1250 /* Functions for mac cell stop request */
1251 typedef uint8_t (*DuMacCellStop) ARGS((
1253 OduCellId *cellId ));
1255 /* Function pointers for packing macCellCfg Request and Confirm */
1256 typedef uint8_t (*packMacCellCfgReq) ARGS((
1258 MacCellCfg *macCellCfg ));
1260 typedef uint8_t (*packMacCellCfgConfirm) ARGS((
1262 MacCellCfgCfm *macCellCfgCfm ));
1264 typedef uint8_t (*DuMacCellCfgReq) ARGS((
1266 MacCellCfg *macCellCfg));
1268 typedef uint8_t (*DuMacCellCfgCfm) ARGS((
1270 MacCellCfgCfm *macCellCfgCfm ));
1272 /* Functions for UL CCCH Ind from MAC to DU APP*/
1273 typedef uint8_t (*DuMacUlCcchInd) ARGS((
1275 UlCcchIndInfo *ulCcchIndInfo ));
1277 /* Functions for DL CCCH Ind from DU APP to MAC*/
1278 typedef uint8_t (*DuMacDlCcchInd) ARGS((
1280 DlCcchIndInfo *dlCcchIndInfo ));
1282 /* UE create Request from DU APP to MAC*/
1283 typedef uint8_t (*DuMacUeCreateReq) ARGS((
1287 /* UE create Response from MAC to DU APP */
1288 typedef uint8_t (*MacDuUeCfgRspFunc) ARGS((
1290 MacUeCfgRsp *cfgRsp));
1292 /* UE Reconfig Request from DU APP to MAC*/
1293 typedef uint8_t (*DuMacUeReconfigReq) ARGS((
1297 uint8_t packMacCellUpInd(Pst *pst, OduCellId *cellId);
1298 uint8_t unpackMacCellUpInd(DuMacCellUpInd func, Pst *pst, Buffer *mBuf);
1299 uint8_t duHandleCellUpInd(Pst *pst, OduCellId *cellId);
1300 uint8_t packMacCellStart(Pst *pst, OduCellId *cellId);
1301 uint8_t unpackMacCellStart(DuMacCellStart func, Pst *pst, Buffer *mBuf);
1302 uint8_t MacProcCellStart(Pst *pst, OduCellId *cellId);
1303 uint8_t packMacCellStop(Pst *pst, OduCellId *cellId);
1304 uint8_t unpackMacCellStop(DuMacCellStop func, Pst *pst, Buffer *mBuf);
1305 uint8_t MacProcCellStop(Pst *pst, OduCellId *cellId);
1306 uint8_t packMacCellCfg(Pst *pst, MacCellCfg *macCellCfg);
1307 uint8_t unpackDuMacCellCfg(DuMacCellCfgReq func, Pst *pst, Buffer *mBuf);
1308 uint8_t MacProcCellCfgReq(Pst *pst, MacCellCfg *macCellCfg);
1309 uint8_t packMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm);
1310 uint8_t unpackMacCellCfgCfm(DuMacCellCfgCfm func, Pst *pst, Buffer *mBuf);
1311 uint8_t duHandleMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm);
1312 uint8_t packMacStopInd(Pst *pst, OduCellId *cellId);
1313 uint8_t unpackMacStopInd(DuMacStopInd func, Pst *pst, Buffer *mBuf);
1314 uint8_t duHandleStopInd(Pst *pst, OduCellId *cellId);
1315 uint8_t packMacUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo);
1316 uint8_t unpackMacUlCcchInd(DuMacUlCcchInd func, Pst *pst, Buffer *mBuf);
1317 uint8_t duHandleUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo);
1318 uint8_t packMacDlCcchInd(Pst *pst, DlCcchIndInfo *dlCcchIndInfo);
1319 uint8_t unpackMacDlCcchInd(DuMacDlCcchInd func, Pst *pst, Buffer *mBuf);
1320 uint8_t MacProcDlCcchInd(Pst *pst, DlCcchIndInfo *dlCcchIndInfo);
1321 uint8_t packDuMacUeCreateReq(Pst *pst, MacUeCfg *ueCfg);
1322 uint8_t unpackMacUeCreateReq(DuMacUeCreateReq func, Pst *pst, Buffer *mBuf);
1323 uint8_t MacProcUeCreateReq(Pst *pst, MacUeCfg *ueCfg);
1324 uint8_t sendStopIndMacToDuApp(uint16_t cellId);
1325 uint8_t packDuMacUeCfgRsp(Pst *pst, MacUeCfgRsp *cfgRsp);
1326 uint8_t unpackDuMacUeCfgRsp(MacDuUeCfgRspFunc func, Pst *pst, Buffer *mBuf);
1327 uint8_t DuProcMacUeCfgRsp(Pst *pst, MacUeCfgRsp *cfgRsp);
1328 uint8_t packDuMacUeReconfigReq(Pst *pst, MacUeCfg *ueCfg);
1329 uint8_t unpackMacUeReconfigReq(DuMacUeReconfigReq func, Pst *pst, Buffer *mBuf);
1330 uint8_t MacProcUeReconfigReq(Pst *pst, MacUeCfg *ueCfg);
1334 /**********************************************************************
1336 **********************************************************************/