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_NEW_TX_PERIOD 160
28 #define SIB1_REPETITION_PERIOD 20
29 #define CORESET_0_INDEX 0
30 #define CORESET_1_INDEX 1
31 #define CORESET_2_INDEX 2
32 #define CORESET_3_INDEX 3
33 #define CORESET_4_INDEX 4
34 #define SEARCHSPACE_0_INDEX 0
35 #define SEARCHSPACE_1_INDEX 1
36 #define SEARCHSPACE_2_INDEX 2
37 #define SEARCHSPACE_3_INDEX 3
38 #define SEARCHSPACE_4_INDEX 4
39 #define SS_MONITORING_SLOT_SL1 0 /* all slots */
40 #define SS_MONITORING_SYMBOL 0x2000; /* symbol-0, set 14th bit */
43 /* Macro for Ue Context */
44 #define MAX_NUM_SR_CFG_PER_CELL_GRP 8 /* Max number of scheduling request config per cell group */
45 #define MAC_NUM_TAGS 4 /* Max number of timing advance groups */
46 #define MAX_NUM_BWP 4 /* Max number of BWP per serving cell */
47 #define MAX_NUM_CRSET 3 /* Max number of control resource set in add/modify/release list */
48 #define MAX_NUM_SEARCH_SPC 10 /* Max number of search space in add/modify/release list */
49 #define MONITORING_SYMB_WITHIN_SLOT_SIZE 2 /* i.e. 2 bytes because size of monitoring symbols within slot is 14 bits */
50 #define MAX_NUM_DL_ALLOC 16 /* Max number of pdsch time domain downlink allocation */
51 #define MAX_NUM_UL_ALLOC 16 /* Max number of pusch time domain uplink allocation */
52 #define SD_SIZE 3 /* Max size of Slice Differentiator in S-NSSAI */
54 #define MAX_NUM_SCELL 32
56 /* PUCCH Configuration Macro */
57 #define MAX_NUM_PUCCH_RESRC 128
58 #define MAX_NUM_PUCCH_RESRC_SET 4
59 #define MAX_NUM_PUCCH_PER_RESRC_SET 32
60 #define MAX_NUM_SPATIAL_RELATIONS 8
61 #define MAX_NUM_PUCCH_P0_PER_SET 8
62 #define MAX_NUM_PATH_LOSS_REF_RS 4
63 #define MAX_NUM_DL_DATA_TO_UL_ACK 15
66 #define EVENT_MAC_CELL_CONFIG_REQ 200
67 #define EVENT_MAC_CELL_CONFIG_CFM 201
68 #define EVENT_MAC_CELL_START 202
69 #define EVENT_MAC_CELL_STOP 203
70 #define EVENT_MAC_CELL_UP_IND 204
71 #define EVENT_MAC_STOP_IND 205
72 #define EVENT_MAC_UL_CCCH_IND 206
73 #define EVENT_MAC_DL_CCCH_IND 207
74 #define EVENT_MAC_UE_CREATE_REQ 208
75 #define EVENT_MAC_UE_CREATE_RSP 209
76 #define EVENT_MAC_UE_RECONFIG_REQ 210
77 #define EVENT_MAC_UE_RECONFIG_RSP 211
79 #define BSR_PERIODIC_TIMER_SF_10 10
80 #define BSR_RETX_TIMER_SF_320 320
81 #define BSR_SR_DELAY_TMR_2560 2560
97 MAC_GEN_FULL_PBCH_PAYLD, /* MAC generated the full PBCH Payload */
98 PHY_GEN_TIMING_PBCH_BIT, /* PHY generates the timing PBCH bits */
99 PHY_GEN_FULL_PBCH_PAYLD /* PHY generates full PBCH payload */
111 RESTRICTED_SET_TYPE_A,
112 RESTRICTED_SET_TYPE_B
144 /* Enums for Ue Create Request */
146 /* SR PROHIBIT TIMER */
173 TIME_ALIGNMENT_TIMER_MS_500,
174 TIME_ALIGNMENT_TIMER_MS_750,
175 TIME_ALIGNMENT_TIMER_MS_1280,
176 TIME_ALIGNMENT_TIMER_MS_1920,
177 TIME_ALIGNMENT_TIMER_MS_2560,
178 TIME_ALIGNMENT_TIMER_MS_5120,
179 TIME_ALIGNMENT_TIMER_MS_10240,
180 TIME_ALIGNMENT_TIMER_INFINITY
185 PHR_PERIODIC_TIMER_SF_10,
186 PHR_PERIODIC_TIMER_SF_20,
187 PHR_PERIODIC_TIMER_SF_50,
188 PHR_PERIODIC_TIMER_SF_100,
189 PHR_PERIODIC_TIMER_SF_200,
190 PHR_PERIODIC_TIMER_SF_500,
191 PHR_PERIODIC_TIMER_SF_1000,
192 PHR_PERIODIC_TIMER_INFINITY
197 PHR_PROHIBIT_TIMER_SF_0,
198 PHR_PROHIBIT_TIMER_SF_10,
199 PHR_PROHIBIT_TIMER_SF_20,
200 PHR_PROHIBIT_TIMER_SF_50,
201 PHR_PROHIBIT_TIMER_SF_100,
202 PHR_PROHIBIT_TIMER_SF_200,
203 PHR_PROHIBIT_TIMER_SF_500,
204 PHR_PROHIBIT_TIMER_SF_1000
209 PHR_TX_PWR_FACTOR_CHANGE_DB_1,
210 PHR_TX_PWR_FACTOR_CHANGE_DB_3,
211 PHR_TX_PWR_FACTOR_CHANGE_DB_6,
212 PHR_TX_PWR_FACTOR_CHANGE_INFINITY
213 }PhrTxPwrFactorChange;
217 PHR_MODE_OTHER_CG_REAL,
218 PHR_MODE_OTHER_CG_VIRTUAL
223 PDSCH_HARQ_ACK_CODEBOOK_SEMISTATIC,
224 PDSCH_HARQ_ACK_CODEBOOK_DYNAMIC
225 }PdschHarqAckCodebook;
229 NUM_HARQ_PROC_FOR_PDSCH_N_2,
230 NUM_HARQ_PROC_FOR_PDSCH_N_4,
231 NUM_HARQ_PROC_FOR_PDSCH_N_6,
232 NUM_HARQ_PROC_FOR_PDSCH_N_10,
233 NUM_HARQ_PROC_FOR_PDSCH_N_16
234 }NumHarqProcForPdsch;
238 MAX_CODE_BLOCK_GROUP_PER_TB_N_2,
239 MAX_CODE_BLOCK_GROUP_PER_TB_N_4,
240 MAX_CODE_BLOCK_GROUP_PER_TB_N_6,
241 MAX_CODE_BLOCK_GROUP_PER_TB_N_8
253 TRANSFORM_PRECODER_ENABLED,
254 TRANSFORM_PRECODER_DISABLED
259 CCE_REG_MAPPINGTYPE_PR_INTERLEAVED = 1,
260 CCE_REG_MAPPINGTYPE_PR_NONINTERLEAVED
265 SLOTPERIODICITYANDOFFSET_PR_SL1 = 1,
266 SLOTPERIODICITYANDOFFSET_PR_SL2,
267 SLOTPERIODICITYANDOFFSET_PR_SL4,
268 SLOTPERIODICITYANDOFFSET_PR_SL5,
269 SLOTPERIODICITYANDOFFSET_PR_SL8,
270 SLOTPERIODICITYANDOFFSET_PR_SL10,
271 SLOTPERIODICITYANDOFFSET_PR_SL16,
272 SLOTPERIODICITYANDOFFSET_PR_SL20,
273 SLOTPERIODICITYANDOFFSET_PR_SL40,
274 SLOTPERIODICITYANDOFFSET_PR_SL80,
275 SLOTPERIODICITYANDOFFSET_PR_SL160,
276 SLOTPERIODICITYANDOFFSET_PR_SL320,
277 SLOTPERIODICITYANDOFFSET_PR_SL640,
278 SLOTPERIODICITYANDOFFSET_PR_SL1280,
279 SLOTPERIODICITYANDOFFSET_PR_SL2560
280 }MSlotPeriodAndOffset;
290 SEARCHSPACETYPE_PR_COMMON = 1,
291 SEARCHSPACETYPE_PR_UE_SPECIFIC
302 AGGREGATIONLEVEL_N0 = 0,
303 AGGREGATIONLEVEL_N1 = 1,
304 AGGREGATIONLEVEL_N2 = 2,
305 AGGREGATIONLEVEL_N3 = 3,
306 AGGREGATIONLEVEL_N4 = 4,
307 AGGREGATIONLEVEL_N5 = 5,
308 AGGREGATIONLEVEL_N6 = 6,
309 AGGREGATIONLEVEL_N8 = 7
314 ADDITIONALPOSITION_POS0,
315 ADDITIONALPOSITION_POS1,
316 ADDITIONALPOSITION_POS3
327 RESOURCEALLOCATION_TYPE0,
328 RESOURCEALLOCATION_TYPE1,
329 RESOURCEALLOCATION_DYNAMICSWITCH
340 CODEWORDS_SCHED_BY_DCI_N1,
341 CODEWORDS_SCHED_BY_DCI_N2
346 TYPE_STATIC_BUNDLING = 1,
347 TYPE_DYNAMIC_BUNDLING
360 SET1_SIZE_N2_WIDEBAND,
361 SET1_SIZE_N4_WIDEBAND
415 TRANSPORT_LAYER_FAIL,
422 UNSPECIFIED_RADIO_NW_CAUSE,
424 UNKNOWN_GNB_CU_UE_F1AP_ID,
425 ALREADY_ALLOCATED_GNB_CU_UE_F1AP_ID,
426 UNKNOWN_GNB_DU_UE_F1AP_ID,
427 ALREADY_ALLOCATED_GNB_DU_UE_F1AP_ID,
428 UNKNOWN_UE_F1AP_ID_PAIR,
429 INCONSISTENT_UE_F1AP_ID_PAIR,
430 INTERACTION_WITH_OTHER_PROCEDURE,
432 ACTION_REQUIRED_FOR_RADIO_REASONS,
433 RADIO_RESOURCES_UNAVAILABLE,
439 RESOURCES_UNAVAILABLE_FOR_SLICE
444 UNSPECIFIED_TRANSPORT_LAYER_CAUSE,
445 TRANSPORT_RESOURCE_UNAVAILABLE
450 TRANSFER_SYNTAX_ERROR,
451 ABSTRACT_SYNTAX_ERROR_REJECT,
452 ABSTRACT_SYNTAX_ERROR_IGNORE_AND_REJECT,
453 INCOMPATIBLE_MESSAGE_FOR_RECEIVER_STATE,
455 ABSTRAXCT_SYNTAX_ERROR_FALSELY_CONSTRUCTED_MSG,
456 UNSPECIFIED_PROTOCOL_CAUSE
461 CONTROL_PROCESSING_OVERLOAD,
463 PLANE_PROCESSING_RESOURCES,
465 INTERVENTION_BY_O_AND_M,
466 UNSPECIFIED_MISC_CAUSE
473 MCS_TABLE_QAM64_LOW_SE
476 typedef struct failureCause
481 RadioNwLyrCause radioNwCause;
482 TransLyrCause transportCause;
483 ProtCause protcolCause;
484 MiscFailCause miscCause;
488 typedef struct carrierCfg
491 uint32_t bw; /* DL/UL bandwidth */
492 uint32_t freq; /* Absolute frequency of DL/UL point A in KHz */
493 uint16_t k0[NUM_NUMEROLOGY]; /* K0 for DL/UL */
494 uint16_t gridSize[NUM_NUMEROLOGY]; /* DL/UL Grid size for each numerologies */
495 uint16_t numAnt; /* Number of Tx/Rx antennas */
498 typedef struct ssbCfg
500 uint32_t ssbPbchPwr; /* SSB block power */
501 BchPduOpt bchPayloadFlag; /* Options for generation of payload */
502 uint8_t scsCmn; /* subcarrier spacing for common */
503 uint16_t ssbOffsetPointA; /* SSB subcarrier offset from point A */
505 SSBPeriod ssbPeriod; /* SSB Periodicity in msec */
506 uint8_t ssbScOffset; /* Subcarrier Offset */
507 uint8_t mibPdu[3]; /* MIB payload */
508 uint32_t ssbMask[SSB_MASK_SIZE]; /* Bitmap for actually transmitted SSB. */
509 uint8_t beamId[NUM_SSB];
510 bool multCarrBand; /* Multiple carriers in a band */
511 bool multCellCarr; /* Multiple cells in single carrier */
514 typedef struct fdmInfo
516 uint16_t rootSeqIdx; /* Root sequence index */
517 uint8_t numRootSeq; /* Number of root sequences required for FD */
518 uint16_t k1; /* Frequency Offset for each FD */
519 uint8_t zeroCorrZoneCfg; /* Zero correlation zone cofig */
520 uint8_t numUnusedRootSeq; /* Number of unused root sequence */
521 uint8_t *unsuedRootSeq; /* Unused root sequence per FD */
524 typedef struct prachCfg
527 uint8_t prachCfgIdx; /* PRACH Cfg Index */
528 PrachSeqLen prachSeqLen; /* RACH Sequence length: Long/short */
529 uint8_t prachSubcSpacing; /* Subcarrier spacing of RACH */
530 RstSetCfg prachRstSetCfg; /* PRACH restricted set config */
531 uint16_t msg1FreqStart; /* Msg1-FrequencyStart */
532 uint8_t msg1Fdm; /* PRACH FDM (1,2,4,8) */
533 uint8_t rootSeqLen; /* Root sequence length */
534 PrachFdmInfo fdm[8]; /* FDM info */
535 uint8_t ssbPerRach; /* SSB per RACH occassion */
536 bool prachMultCarrBand; /* Multiple carriers in Band */
537 uint8_t prachRestrictedSet; /* Support for PRACH restricted set */
538 uint8_t raContResTmr; /* RA Contention Resoultion Timer */
539 uint8_t rsrpThreshSsb; /* RSRP Threshold SSB */
540 uint8_t raRspWindow; /* RA Response Window */
543 typedef struct sib1CellCfg
547 uint16_t sib1NewTxPeriod;
548 uint16_t sib1RepetitionPeriod;
549 uint8_t coresetZeroIndex; /* derived from 4 LSB of pdcchSib1 present in MIB */
550 uint8_t searchSpaceZeroIndex; /* derived from 4 MSB of pdcchSib1 present in MIB */
554 typedef struct bwpParams
559 uint8_t cyclicPrefix;
562 typedef struct candidatesInfo
571 typedef struct searchSpaceCfg
573 uint8_t searchSpaceId;
575 uint16_t monitoringSlot;
577 uint16_t monitoringSymbol;
578 CandidatesInfo candidate;
581 typedef struct pdcchConfigCommon
583 /* only one search space is configured during SIB1 */
584 SearchSpaceCfg commonSearchSpace;
585 uint8_t raSearchSpaceId;
588 typedef struct pdschConfigCommon
593 uint8_t lengthSymbol;
596 typedef struct pucchConfigCommon
598 uint8_t pucchResourceCommon;
599 uint8_t pucchGroupHopping;
602 typedef struct puschConfigCommon
604 /* PUSCH-TimeDomainResourceAllocation info */
608 uint8_t lengthSymbol;
611 typedef struct bwpDlConfig
614 PdcchConfigCommon pdcchCommon;
615 PdschConfigCommon pdschCommon;
618 typedef struct bwpUlConfig
621 // rach config common sent in PrachCfg
622 PucchConfigCommon pucchCommon;
623 PuschConfigCommon puschCommon;
626 typedef struct macCellCfg
628 uint16_t cellId; /* Cell Id */
629 uint8_t carrierId; /* Carrired Index */
630 uint16_t phyCellId; /* Physical cell id */
631 uint8_t numerology; /* Supported numerology */
632 DuplexMode dupType; /* Duplex type: TDD/FDD */
633 CarrierCfg dlCarrCfg; /* DL Carrier configuration */
634 CarrierCfg ulCarrCfg; /* UL Carrier configuration */
635 bool freqShft; /* Indicates presence of 7.5kHz frequency shift */
636 SsbCfg ssbCfg; /* SSB configuration */
637 PrachCfg prachCfg; /* PRACH Configuration */
639 TDDCfg tddCfg; /* TDD periodicity and slot configuration */
641 RSSIMeasUnit rssiUnit; /* RSSI measurement unit */
642 Sib1CellCfg sib1Cfg; /* SIB1 config */
643 BwpDlConfig initialDlBwp; /* Initial DL BWP */
644 BwpUlConfig initialUlBwp; /* Initial UL BWP */
645 uint8_t dmrsTypeAPos; /* DMRS Type A position */
648 typedef struct macCellCfgCfm
654 typedef struct ulCcchInd
658 uint16_t ulCcchMsgLen;
662 typedef struct dlCcchInd
666 DlCcchMsgType msgType;
667 uint16_t dlCcchMsgLen;
671 typedef struct bsrTmrCfg
673 uint16_t periodicTimer;
675 uint16_t srDelayTimer;
679 /* Info of Scheduling Request to Add/Modify */
680 typedef struct schedReqInfo
683 SrProhibitTimer srProhibitTmr;
684 SrTransMax srTransMax;
687 /* Scheduling Request Configuration */
688 typedef struct schedReqCfg
690 uint8_t addModListCount;
691 SchedReqInfo addModList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* List of Scheduling req to be added/modified */
692 uint8_t relListCount;
693 uint8_t relList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* list of scheduling request Id to be deleted */
696 typedef struct tagInfo
699 TimeAlignmentTimer timeAlignTimer;
702 typedef struct tagCfg
704 uint8_t addModListCount;
705 TagInfo addModList[MAC_NUM_TAGS]; /* List of Tag to Add/Modify */
706 uint8_t relListCount;
707 uint8_t relList[MAC_NUM_TAGS]; /* list of Tag Id to release */
710 typedef struct phrCfg
712 PhrPeriodicTimer periodicTimer;
713 PhrProhibitTimer prohibitTimer;
714 PhrTxPwrFactorChange txPowerFactor;
717 bool phrType2OtherCell;
718 PhrModeOtherCG phrOtherCG;
721 typedef struct macCellGrpCfg
723 SchedReqCfg schReqCfg;
726 bool phrCfgSetupPres; /* true/false: phrCfgSetup/phrCfgRelease */
730 typedef struct phyCellGrpCfg
732 PdschHarqAckCodebook pdschHarqAckCodebook;
736 /* Control resource set info */
737 typedef struct controlRsrcSet
739 uint8_t cRSetId; /* Control resource set id */
740 uint8_t freqDomainRsrc[FREQ_DOM_RSRC_SIZE]; /* Frequency domain resource */
742 REGMappingType cceRegMappingType;
743 PrecoderGranul precoderGranularity;
744 uint16_t dmrsScramblingId;
747 /* Search Space info */
748 typedef struct searchSpace
750 uint8_t searchSpaceId;
752 MSlotPeriodAndOffset mSlotPeriodicityAndOffset;
753 uint8_t mSymbolsWithinSlot[MONITORING_SYMB_WITHIN_SLOT_SIZE];
754 AggrLevel numCandidatesAggLevel1; /* Number of candidates for aggregation level 1 */
755 AggrLevel numCandidatesAggLevel2; /* Number of candidates for aggregation level 2 */
756 AggrLevel numCandidatesAggLevel4; /* Number of candidates for aggregation level 4 */
757 AggrLevel numCandidatesAggLevel8; /* Number of candidates for aggregation level 8 */
758 AggrLevel numCandidatesAggLevel16; /* Number of candidates for aggregation level 16 */
759 SearchSpaceType searchSpaceType;
760 uint8_t ueSpecificDciFormat;
763 /* PDCCH cofniguration */
764 typedef struct pdcchConfig
766 uint8_t numCRsetToAddMod;
767 ControlRsrcSet cRSetToAddModList[MAX_NUM_CRSET]; /* List of control resource set to add/modify */
768 uint8_t numCRsetToRel;
769 uint8_t cRSetToRelList[MAX_NUM_CRSET]; /* List of control resource set to release */
770 uint8_t numSearchSpcToAddMod;
771 SearchSpace searchSpcToAddModList[MAX_NUM_SEARCH_SPC]; /* List of search space to add/modify */
772 uint8_t numSearchSpcToRel;
773 uint8_t searchSpcToRelList[MAX_NUM_SEARCH_SPC]; /* List of search space to release */
776 /* PDSCH time domain resource allocation */
777 typedef struct pdschTimeDomRsrcAlloc
779 CommonMappingType mappingType;
781 uint8_t symbolLength;
782 uint8_t startSymbolAndLength;
783 }PdschTimeDomRsrcAlloc;
786 typedef struct pdschBundling
788 struct staticBundling
790 BundlingSizeSet2 size;
792 struct dynamicBundling
794 BundlingSizeSet1 sizeSet1;
795 BundlingSizeSet2 sizeSet2;
799 /* DMRS downlink configuration */
800 typedef struct dmrsDlCfg
802 AddPosType addPos; /* DMRS additional position */
805 /* PDSCH Configuration */
806 typedef struct pdschConfig
808 DmrsDlCfg dmrsDlCfgForPdschMapTypeA;
809 ResAllocType resourceAllocType;
810 uint8_t numTimeDomRsrcAlloc;
811 PdschTimeDomRsrcAlloc timeDomRsrcAllociList[MAX_NUM_DL_ALLOC]; /* PDSCH time domain DL resource allocation list */
813 CodeWordsSchedDci numCodeWordsSchByDci; /* Number of code words scheduled by DCI */
814 BundlingType bundlingType;
815 PdschBundling bundlingInfo;
818 /* Initial Downlink BWP */
819 typedef struct initialDlBwp
822 PdcchConfig pdcchCfg;
824 PdschConfig pdschCfg;
827 /* BWP Downlink common */
828 typedef struct bwpDlCommon
832 /* Downlink BWP information */
833 typedef struct dlBwpInfo
838 /* PDCCH Serving Cell configuration */
839 typedef struct pdschServCellCfg
841 uint8_t *maxMimoLayers;
842 NumHarqProcForPdsch numHarqProcForPdsch;
843 MaxCodeBlkGrpPerTB *maxCodeBlkGrpPerTb;
844 bool *codeBlkGrpFlushInd;
845 PdschXOverhead *xOverhead;
848 /* PUCCH Configuration */
850 typedef struct pucchResrcSetInfo
853 uint8_t resrcListCount;
854 uint8_t resrcList[MAX_NUM_PUCCH_PER_RESRC_SET];
855 uint8_t maxPayLoadSize;
858 typedef struct pucchResrcSetCfg
860 uint8_t resrcSetToAddModListCount;
861 PucchResrcSetInfo resrcSetToAddModList[MAX_NUM_PUCCH_RESRC_SET];
862 uint8_t resrcSetToRelListCount;
863 uint8_t resrcSetToRelList[MAX_NUM_PUCCH_RESRC];
866 typedef struct pucchFormat0
868 uint8_t initialCyclicShift;
870 uint8_t startSymbolIdx;
873 typedef struct pucchFormat1
875 uint8_t initialCyclicShift;
877 uint8_t startSymbolIdx;
881 typedef struct pucchFormat2_3
885 uint8_t startSymbolIdx;
888 typedef struct pucchFormat4
893 uint8_t startSymbolIdx;
896 typedef struct pucchResrcInfo
900 uint8_t intraFreqHop;
901 uint16_t secondPrbHop;
905 PucchFormat0 *format0;
906 PucchFormat1 *format1;
907 PucchFormat2_3 *format2;
908 PucchFormat2_3 *format3;
909 PucchFormat4 *format4;
913 typedef struct pucchResrcCfg
915 uint8_t resrcToAddModListCount;
916 PucchResrcInfo resrcToAddModList[MAX_NUM_PUCCH_RESRC];
917 uint8_t resrcToRelListCount;
918 uint8_t resrcToRelList[MAX_NUM_PUCCH_RESRC];
921 typedef struct pucchFormatCfg
923 uint8_t interSlotFreqHop;
931 typedef struct schedReqResrcInfo
940 typedef struct pucchSchedReqCfg
942 uint8_t schedAddModListCount;
943 SchedReqResrcInfo schedAddModList[MAX_NUM_SR_CFG_PER_CELL_GRP];
944 uint8_t schedRelListCount;
945 uint8_t schedRelList[MAX_NUM_SR_CFG_PER_CELL_GRP];
948 typedef struct spatialRelationInfo
950 uint8_t spatialRelationId;
952 uint8_t pathLossRefRSId;
954 uint8_t closeLoopIdx;
955 }SpatialRelationInfo;
957 typedef struct pucchSpatialCfg
959 uint8_t spatialAddModListCount;
960 SpatialRelationInfo spatialAddModList[MAX_NUM_SPATIAL_RELATIONS];
961 uint8_t spatialRelListCount;
962 uint8_t spatialRelList[MAX_NUM_SPATIAL_RELATIONS];
965 typedef struct p0PucchCfg
971 typedef struct pathLossRefRSCfg
973 uint8_t pathLossRefRSId;
976 typedef struct pucchMultiCsiCfg
978 uint8_t multiCsiResrcListCount;
979 uint8_t multiCsiResrcList[MAX_NUM_PUCCH_RESRC-1];
982 typedef struct pucchDlDataToUlAck
984 uint8_t dlDataToUlAckListCount;
985 uint8_t dlDataToUlAckList[MAX_NUM_DL_DATA_TO_UL_ACK];
988 typedef struct pucchPowerControl
996 P0PucchCfg p0Set[MAX_NUM_PUCCH_P0_PER_SET];
997 uint8_t pathLossRefRSListCount;
998 PathLossRefRSCfg pathLossRefRSList[MAX_NUM_PATH_LOSS_REF_RS];
1001 typedef struct pucchCfg
1003 PucchResrcSetCfg *resrcSet;
1004 PucchResrcCfg *resrc;
1005 PucchFormatCfg *format1;
1006 PucchFormatCfg *format2;
1007 PucchFormatCfg *format3;
1008 PucchFormatCfg *format4;
1009 PucchSchedReqCfg *schedReq;
1010 PucchMultiCsiCfg *multiCsiCfg;
1011 PucchSpatialCfg *spatialInfo;
1012 PucchDlDataToUlAck *dlDataToUlAck;
1013 PucchPowerControl *powerControl;
1016 /* Transform precoding disabled */
1017 typedef struct transPrecodDisabled
1019 uint16_t scramblingId0;
1020 }TransPrecodDisabled;
1022 /* DMRS Uplink configuration */
1023 typedef struct dmrsUlCfg
1025 AddPosType addPos; /* DMRS additional position */
1026 TransPrecodDisabled transPrecodDisabled; /* Transform precoding disabled */
1029 /* PUSCH Time Domain Resource Allocation */
1030 typedef struct puschTimeDomRsrcAlloc
1033 CommonMappingType mappingType;
1034 uint8_t startSymbol;
1035 uint8_t symbolLength;
1036 uint8_t startSymbolAndLength;
1037 }PuschTimeDomRsrcAlloc;
1039 /* PUSCH Configuration */
1040 typedef struct puschCfg
1042 uint8_t dataScramblingId;
1043 DmrsUlCfg dmrsUlCfgForPuschMapTypeA;
1044 ResAllocType resourceAllocType;
1045 uint8_t numTimeDomRsrcAlloc;
1046 PuschTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_UL_ALLOC]; /* PUSCH time domain UL resource allocation list */
1047 TransformPrecoder transformPrecoder;
1050 /* Initial Uplink BWP */
1051 typedef struct initialUlBwp
1059 /* Uplink BWP information */
1060 typedef struct ulBwpInfo
1065 /* Serving cell configuration */
1066 typedef struct servCellCfgInfo
1068 InitialDlBwp initDlBwp;
1069 uint8_t numDlBwpToAdd;
1070 DlBwpInfo DlBwpToAddList[MAX_NUM_BWP];
1071 uint8_t firstActvDlBwpId;
1072 uint8_t defaultDlBwpId;
1073 uint8_t *bwpInactivityTmr;
1074 PdschServCellCfg pdschServCellCfg;
1075 InitialUlBwp initUlBwp;
1076 uint8_t numUlBwpToAdd;
1077 UlBwpInfo UlBwpToAddList[MAX_NUM_BWP];
1078 uint8_t firstActvUlBwpId;
1081 /* Special cell configuration */
1082 typedef struct spCellCfg
1084 uint8_t servCellIdx;
1085 ServCellCfgInfo servCellCfg;
1088 typedef struct ambrCfg
1090 uint32_t ulBr; /* UL Bit rate */
1093 /* Single Network Slice Selection assistance Info */
1094 typedef struct snssai
1096 uint8_t sst; /* Slice Type */
1097 uint8_t sd[SD_SIZE]; /* Slice Differentiator */
1100 typedef struct nonDynFiveQi
1105 uint16_t maxDataBurstVol;
1108 typedef struct dynFiveQi
1111 uint16_t packetDelayBudget;
1112 uint8_t packetErrRateScalar;
1113 uint8_t packetErrRateExp;
1115 uint8_t delayCritical;
1117 uint16_t maxDataBurstVol;
1120 typedef struct ngRanAllocAndRetPri
1122 uint8_t priorityLevel;
1123 uint8_t preEmptionCap;
1124 uint8_t preEmptionVul;
1125 }NgRanAllocAndRetPri;
1127 typedef struct grbQosInfo
1129 uint32_t maxFlowBitRateDl;
1130 uint32_t maxFlowBitRateUl;
1131 uint32_t guarFlowBitRateDl;
1132 uint32_t guarFlowBitRateUl;
1135 typedef struct drbQos
1137 QosType fiveQiType; /* Dynamic or non-dynamic */
1140 NonDynFiveQi nonDyn5Qi;
1143 NgRanAllocAndRetPri ngRanRetPri;
1144 GrbQosInfo grbQosInfo;
1145 uint16_t pduSessionId;
1146 uint32_t ulPduSessAggMaxBitRate;
1149 typedef struct ulLcCfg
1154 PBitRate pbr; // prioritisedBitRate
1155 BucketSizeDur bsd; // bucketSizeDuration
1158 typedef struct duLcCfg
1160 LcPriority lcp; // logical Channel Prioritization
1163 typedef struct lcCfg
1165 ConfigType configType;
1174 typedef struct modulationInfo
1176 uint8_t modOrder; /* Modulation order */
1177 uint8_t mcsIndex; /* MCS Index */
1178 McsTable mcsTable; /* MCS table */
1181 typedef struct macUeCfg
1186 MacCellGrpCfg macCellGrpCfg;
1187 PhyCellGrpCfg phyCellGrpCfg;
1188 SpCellCfg spCellCfg;
1190 ModulationInfo dlModInfo; /* DL modulation info */
1191 ModulationInfo ulModInfo; /* UL modulation info */
1193 LcCfg lcCfgList[MAX_NUM_LC];
1194 UeCfgState macUeCfgState; /* InActive / Completed */
1197 typedef struct nrcgi
1203 typedef struct srbFailInfo
1209 typedef struct drbFailInfo
1215 typedef struct sCellFailInfo
1221 typedef struct ueCfgRsp
1226 uint8_t numSRBFailed; /* valid values : 0 to MAX_NUM_SRB */
1227 SRBFailInfo *failedSRBlisti;
1228 uint8_t numDRBFailed; /* valid values : 0 to MAX_NUM_DRB */
1229 DRBFailInfo *failedDRBlist;
1230 uint8_t numSCellFailed; /* valid values : 0 to MAX_NUM_SCELL */
1231 SCellFailInfo *failedSCellList;
1234 /* Functions for slot Ind from MAC to DU APP*/
1235 typedef uint8_t (*DuMacCellUpInd) ARGS((
1237 OduCellId *cellId ));
1239 /* Functions for stop Ind from MAC to DU APP*/
1240 typedef uint8_t (*DuMacStopInd) ARGS((
1242 OduCellId *cellId ));
1244 /* Functions for mac cell start req */
1245 typedef uint8_t (*DuMacCellStart) ARGS((
1247 OduCellId *cellId));
1249 /* Functions for mac cell stop request */
1250 typedef uint8_t (*DuMacCellStop) ARGS((
1252 OduCellId *cellId ));
1254 /* Function pointers for packing macCellCfg Request and Confirm */
1255 typedef uint8_t (*packMacCellCfgReq) ARGS((
1257 MacCellCfg *macCellCfg ));
1259 typedef uint8_t (*packMacCellCfgConfirm) ARGS((
1261 MacCellCfgCfm *macCellCfgCfm ));
1263 typedef uint8_t (*DuMacCellCfgReq) ARGS((
1265 MacCellCfg *macCellCfg));
1267 typedef uint8_t (*DuMacCellCfgCfm) ARGS((
1269 MacCellCfgCfm *macCellCfgCfm ));
1271 /* Functions for UL CCCH Ind from MAC to DU APP*/
1272 typedef uint8_t (*DuMacUlCcchInd) ARGS((
1274 UlCcchIndInfo *ulCcchIndInfo ));
1276 /* Functions for DL CCCH Ind from DU APP to MAC*/
1277 typedef uint8_t (*DuMacDlCcchInd) ARGS((
1279 DlCcchIndInfo *dlCcchIndInfo ));
1281 /* UE create Request from DU APP to MAC*/
1282 typedef uint8_t (*DuMacUeCreateReq) ARGS((
1286 /* UE create Response from MAC to DU APP */
1287 typedef uint8_t (*MacDuUeCfgRspFunc) ARGS((
1289 MacUeCfgRsp *cfgRsp));
1291 /* UE Reconfig Request from DU APP to MAC*/
1292 typedef uint8_t (*DuMacUeReconfigReq) ARGS((
1296 uint8_t packMacCellUpInd(Pst *pst, OduCellId *cellId);
1297 uint8_t unpackMacCellUpInd(DuMacCellUpInd func, Pst *pst, Buffer *mBuf);
1298 uint8_t duHandleCellUpInd(Pst *pst, OduCellId *cellId);
1299 uint8_t packMacCellStart(Pst *pst, OduCellId *cellId);
1300 uint8_t unpackMacCellStart(DuMacCellStart func, Pst *pst, Buffer *mBuf);
1301 uint8_t MacProcCellStart(Pst *pst, OduCellId *cellId);
1302 uint8_t packMacCellStop(Pst *pst, OduCellId *cellId);
1303 uint8_t unpackMacCellStop(DuMacCellStop func, Pst *pst, Buffer *mBuf);
1304 uint8_t MacProcCellStop(Pst *pst, OduCellId *cellId);
1305 uint8_t packMacCellCfg(Pst *pst, MacCellCfg *macCellCfg);
1306 uint8_t unpackDuMacCellCfg(DuMacCellCfgReq func, Pst *pst, Buffer *mBuf);
1307 uint8_t MacProcCellCfgReq(Pst *pst, MacCellCfg *macCellCfg);
1308 uint8_t packMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm);
1309 uint8_t unpackMacCellCfgCfm(DuMacCellCfgCfm func, Pst *pst, Buffer *mBuf);
1310 uint8_t duHandleMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm);
1311 uint8_t packMacStopInd(Pst *pst, OduCellId *cellId);
1312 uint8_t unpackMacStopInd(DuMacStopInd func, Pst *pst, Buffer *mBuf);
1313 uint8_t duHandleStopInd(Pst *pst, OduCellId *cellId);
1314 uint8_t packMacUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo);
1315 uint8_t unpackMacUlCcchInd(DuMacUlCcchInd func, Pst *pst, Buffer *mBuf);
1316 uint8_t duHandleUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo);
1317 uint8_t packMacDlCcchInd(Pst *pst, DlCcchIndInfo *dlCcchIndInfo);
1318 uint8_t unpackMacDlCcchInd(DuMacDlCcchInd func, Pst *pst, Buffer *mBuf);
1319 uint8_t MacProcDlCcchInd(Pst *pst, DlCcchIndInfo *dlCcchIndInfo);
1320 uint8_t packDuMacUeCreateReq(Pst *pst, MacUeCfg *ueCfg);
1321 uint8_t unpackMacUeCreateReq(DuMacUeCreateReq func, Pst *pst, Buffer *mBuf);
1322 uint8_t MacProcUeCreateReq(Pst *pst, MacUeCfg *ueCfg);
1323 uint8_t sendStopIndMacToDuApp(uint16_t cellId);
1324 uint8_t packDuMacUeCfgRsp(Pst *pst, MacUeCfgRsp *cfgRsp);
1325 uint8_t unpackDuMacUeCfgRsp(MacDuUeCfgRspFunc func, Pst *pst, Buffer *mBuf);
1326 uint8_t DuProcMacUeCfgRsp(Pst *pst, MacUeCfgRsp *cfgRsp);
1327 uint8_t packDuMacUeReconfigReq(Pst *pst, MacUeCfg *ueCfg);
1328 uint8_t unpackMacUeReconfigReq(DuMacUeReconfigReq func, Pst *pst, Buffer *mBuf);
1329 uint8_t MacProcUeReconfigReq(Pst *pst, MacUeCfg *ueCfg);
1333 /**********************************************************************
1335 **********************************************************************/