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 */
55 #define MAX_NUM_DRB 64
56 #define MAX_NUM_SCELL 32
58 /* PUCCH Configuration Macro */
59 #define MAX_NUM_PUCCH_RESRC 128
60 #define MAX_NUM_PUCCH_RESRC_SET 4
61 #define MAX_NUM_PUCCH_PER_RESRC_SET 32
62 #define MAX_NUM_SPATIAL_RELATIONS 8
63 #define MAX_NUM_PUCCH_P0_PER_SET 8
64 #define MAX_NUM_PATH_LOSS_REF_RS 4
65 #define MAX_NUM_DL_DATA_TO_UL_ACK 15
68 #define EVENT_MAC_CELL_CONFIG_REQ 200
69 #define EVENT_MAC_CELL_CONFIG_CFM 201
70 #define EVENT_MAC_CELL_START 202
71 #define EVENT_MAC_CELL_STOP 203
72 #define EVENT_MAC_CELL_UP_IND 204
73 #define EVENT_MAC_STOP_IND 205
74 #define EVENT_MAC_UL_CCCH_IND 206
75 #define EVENT_MAC_DL_CCCH_IND 207
76 #define EVENT_MAC_UE_CREATE_REQ 208
77 #define EVENT_MAC_UE_CREATE_RSP 209
78 #define EVENT_MAC_UE_RECONFIG_REQ 210
79 #define EVENT_MAC_UE_RECONFIG_RSP 211
81 #define BSR_PERIODIC_TIMER_SF_10 10
82 #define BSR_RETX_TIMER_SF_320 320
83 #define BSR_SR_DELAY_TMR_2560 2560
99 MAC_GEN_FULL_PBCH_PAYLD, /* MAC generated the full PBCH Payload */
100 PHY_GEN_TIMING_PBCH_BIT, /* PHY generates the timing PBCH bits */
101 PHY_GEN_FULL_PBCH_PAYLD /* PHY generates full PBCH payload */
113 RESTRICTED_SET_TYPE_A,
114 RESTRICTED_SET_TYPE_B
146 /* Enums for Ue Create Request */
148 /* SR PROHIBIT TIMER */
175 TIME_ALIGNMENT_TIMER_MS_500,
176 TIME_ALIGNMENT_TIMER_MS_750,
177 TIME_ALIGNMENT_TIMER_MS_1280,
178 TIME_ALIGNMENT_TIMER_MS_1920,
179 TIME_ALIGNMENT_TIMER_MS_2560,
180 TIME_ALIGNMENT_TIMER_MS_5120,
181 TIME_ALIGNMENT_TIMER_MS_10240,
182 TIME_ALIGNMENT_TIMER_INFINITY
187 PHR_PERIODIC_TIMER_SF_10,
188 PHR_PERIODIC_TIMER_SF_20,
189 PHR_PERIODIC_TIMER_SF_50,
190 PHR_PERIODIC_TIMER_SF_100,
191 PHR_PERIODIC_TIMER_SF_200,
192 PHR_PERIODIC_TIMER_SF_500,
193 PHR_PERIODIC_TIMER_SF_1000,
194 PHR_PERIODIC_TIMER_INFINITY
199 PHR_PROHIBIT_TIMER_SF_0,
200 PHR_PROHIBIT_TIMER_SF_10,
201 PHR_PROHIBIT_TIMER_SF_20,
202 PHR_PROHIBIT_TIMER_SF_50,
203 PHR_PROHIBIT_TIMER_SF_100,
204 PHR_PROHIBIT_TIMER_SF_200,
205 PHR_PROHIBIT_TIMER_SF_500,
206 PHR_PROHIBIT_TIMER_SF_1000
211 PHR_TX_PWR_FACTOR_CHANGE_DB_1,
212 PHR_TX_PWR_FACTOR_CHANGE_DB_3,
213 PHR_TX_PWR_FACTOR_CHANGE_DB_6,
214 PHR_TX_PWR_FACTOR_CHANGE_INFINITY
215 }PhrTxPwrFactorChange;
219 PHR_MODE_OTHER_CG_REAL,
220 PHR_MODE_OTHER_CG_VIRTUAL
225 PDSCH_HARQ_ACK_CODEBOOK_SEMISTATIC,
226 PDSCH_HARQ_ACK_CODEBOOK_DYNAMIC
227 }PdschHarqAckCodebook;
231 NUM_HARQ_PROC_FOR_PDSCH_N_2,
232 NUM_HARQ_PROC_FOR_PDSCH_N_4,
233 NUM_HARQ_PROC_FOR_PDSCH_N_6,
234 NUM_HARQ_PROC_FOR_PDSCH_N_10,
235 NUM_HARQ_PROC_FOR_PDSCH_N_16
236 }NumHarqProcForPdsch;
240 MAX_CODE_BLOCK_GROUP_PER_TB_N_2,
241 MAX_CODE_BLOCK_GROUP_PER_TB_N_4,
242 MAX_CODE_BLOCK_GROUP_PER_TB_N_6,
243 MAX_CODE_BLOCK_GROUP_PER_TB_N_8
255 TRANSFORM_PRECODER_ENABLED,
256 TRANSFORM_PRECODER_DISABLED
261 CCE_REG_MAPPINGTYPE_PR_INTERLEAVED = 1,
262 CCE_REG_MAPPINGTYPE_PR_NONINTERLEAVED
267 SLOTPERIODICITYANDOFFSET_PR_SL1 = 1,
268 SLOTPERIODICITYANDOFFSET_PR_SL2,
269 SLOTPERIODICITYANDOFFSET_PR_SL4,
270 SLOTPERIODICITYANDOFFSET_PR_SL5,
271 SLOTPERIODICITYANDOFFSET_PR_SL8,
272 SLOTPERIODICITYANDOFFSET_PR_SL10,
273 SLOTPERIODICITYANDOFFSET_PR_SL16,
274 SLOTPERIODICITYANDOFFSET_PR_SL20,
275 SLOTPERIODICITYANDOFFSET_PR_SL40,
276 SLOTPERIODICITYANDOFFSET_PR_SL80,
277 SLOTPERIODICITYANDOFFSET_PR_SL160,
278 SLOTPERIODICITYANDOFFSET_PR_SL320,
279 SLOTPERIODICITYANDOFFSET_PR_SL640,
280 SLOTPERIODICITYANDOFFSET_PR_SL1280,
281 SLOTPERIODICITYANDOFFSET_PR_SL2560
282 }MSlotPeriodAndOffset;
292 SEARCHSPACETYPE_PR_COMMON = 1,
293 SEARCHSPACETYPE_PR_UE_SPECIFIC
304 AGGREGATIONLEVEL_N0 = 0,
305 AGGREGATIONLEVEL_N1 = 1,
306 AGGREGATIONLEVEL_N2 = 2,
307 AGGREGATIONLEVEL_N3 = 3,
308 AGGREGATIONLEVEL_N4 = 4,
309 AGGREGATIONLEVEL_N5 = 5,
310 AGGREGATIONLEVEL_N6 = 6,
311 AGGREGATIONLEVEL_N8 = 7
316 ADDITIONALPOSITION_POS0,
317 ADDITIONALPOSITION_POS1,
318 ADDITIONALPOSITION_POS3
329 RESOURCEALLOCATION_TYPE0,
330 RESOURCEALLOCATION_TYPE1,
331 RESOURCEALLOCATION_DYNAMICSWITCH
342 CODEWORDS_SCHED_BY_DCI_N1,
343 CODEWORDS_SCHED_BY_DCI_N2
348 TYPE_STATIC_BUNDLING = 1,
349 TYPE_DYNAMIC_BUNDLING
362 SET1_SIZE_N2_WIDEBAND,
363 SET1_SIZE_N4_WIDEBAND
417 TRANSPORT_LAYER_FAIL,
424 UNSPECIFIED_RADIO_NW_CAUSE,
426 UNKNOWN_GNB_CU_UE_F1AP_ID,
427 ALREADY_ALLOCATED_GNB_CU_UE_F1AP_ID,
428 UNKNOWN_GNB_DU_UE_F1AP_ID,
429 ALREADY_ALLOCATED_GNB_DU_UE_F1AP_ID,
430 UNKNOWN_UE_F1AP_ID_PAIR,
431 INCONSISTENT_UE_F1AP_ID_PAIR,
432 INTERACTION_WITH_OTHER_PROCEDURE,
434 ACTION_REQUIRED_FOR_RADIO_REASONS,
435 RADIO_RESOURCES_UNAVAILABLE,
441 RESOURCES_UNAVAILABLE_FOR_SLICE
446 UNSPECIFIED_TRANSPORT_LAYER_CAUSE,
447 TRANSPORT_RESOURCE_UNAVAILABLE
452 TRANSFER_SYNTAX_ERROR,
453 ABSTRACT_SYNTAX_ERROR_REJECT,
454 ABSTRACT_SYNTAX_ERROR_IGNORE_AND_REJECT,
455 INCOMPATIBLE_MESSAGE_FOR_RECEIVER_STATE,
457 ABSTRAXCT_SYNTAX_ERROR_FALSELY_CONSTRUCTED_MSG,
458 UNSPECIFIED_PROTOCOL_CAUSE
463 CONTROL_PROCESSING_OVERLOAD,
465 PLANE_PROCESSING_RESOURCES,
467 INTERVENTION_BY_O_AND_M,
468 UNSPECIFIED_MISC_CAUSE
475 MCS_TABLE_QAM64_LOW_SE
478 typedef struct failureCause
483 RadioNwLyrCause radioNwCause;
484 TransLyrCause transportCause;
485 ProtCause protcolCause;
486 MiscFailCause miscCause;
490 typedef struct carrierCfg
493 uint32_t bw; /* DL/UL bandwidth */
494 uint32_t freq; /* Absolute frequency of DL/UL point A in KHz */
495 uint16_t k0[NUM_NUMEROLOGY]; /* K0 for DL/UL */
496 uint16_t gridSize[NUM_NUMEROLOGY]; /* DL/UL Grid size for each numerologies */
497 uint16_t numAnt; /* Number of Tx/Rx antennas */
500 typedef struct ssbCfg
502 uint32_t ssbPbchPwr; /* SSB block power */
503 BchPduOpt bchPayloadFlag; /* Options for generation of payload */
504 uint8_t scsCmn; /* subcarrier spacing for common */
505 uint16_t ssbOffsetPointA; /* SSB subcarrier offset from point A */
507 SSBPeriod ssbPeriod; /* SSB Periodicity in msec */
508 uint8_t ssbScOffset; /* Subcarrier Offset */
509 uint8_t mibPdu[3]; /* MIB payload */
510 uint32_t ssbMask[SSB_MASK_SIZE]; /* Bitmap for actually transmitted SSB. */
511 uint8_t beamId[NUM_SSB];
512 bool multCarrBand; /* Multiple carriers in a band */
513 bool multCellCarr; /* Multiple cells in single carrier */
516 typedef struct fdmInfo
518 uint16_t rootSeqIdx; /* Root sequence index */
519 uint8_t numRootSeq; /* Number of root sequences required for FD */
520 uint16_t k1; /* Frequency Offset for each FD */
521 uint8_t zeroCorrZoneCfg; /* Zero correlation zone cofig */
522 uint8_t numUnusedRootSeq; /* Number of unused root sequence */
523 uint8_t *unsuedRootSeq; /* Unused root sequence per FD */
526 typedef struct prachCfg
529 uint8_t prachCfgIdx; /* PRACH Cfg Index */
530 PrachSeqLen prachSeqLen; /* RACH Sequence length: Long/short */
531 uint8_t prachSubcSpacing; /* Subcarrier spacing of RACH */
532 RstSetCfg prachRstSetCfg; /* PRACH restricted set config */
533 uint16_t msg1FreqStart; /* Msg1-FrequencyStart */
534 uint8_t msg1Fdm; /* PRACH FDM (1,2,4,8) */
535 uint8_t rootSeqLen; /* Root sequence length */
536 PrachFdmInfo fdm[8]; /* FDM info */
537 uint8_t ssbPerRach; /* SSB per RACH occassion */
538 bool prachMultCarrBand; /* Multiple carriers in Band */
539 uint8_t prachRestrictedSet; /* Support for PRACH restricted set */
540 uint8_t raContResTmr; /* RA Contention Resoultion Timer */
541 uint8_t rsrpThreshSsb; /* RSRP Threshold SSB */
542 uint8_t raRspWindow; /* RA Response Window */
545 typedef struct sib1CellCfg
549 uint16_t sib1NewTxPeriod;
550 uint16_t sib1RepetitionPeriod;
551 uint8_t coresetZeroIndex; /* derived from 4 LSB of pdcchSib1 present in MIB */
552 uint8_t searchSpaceZeroIndex; /* derived from 4 MSB of pdcchSib1 present in MIB */
556 typedef struct bwpParams
561 uint8_t cyclicPrefix;
564 typedef struct candidatesInfo
573 typedef struct searchSpaceCfg
575 uint8_t searchSpaceId;
577 uint16_t monitoringSlot;
579 uint16_t monitoringSymbol;
580 CandidatesInfo candidate;
583 typedef struct pdcchConfigCommon
585 /* only one search space is configured during SIB1 */
586 SearchSpaceCfg commonSearchSpace;
587 uint8_t raSearchSpaceId;
590 typedef struct pdschConfigCommon
595 uint8_t lengthSymbol;
598 typedef struct pucchConfigCommon
600 uint8_t pucchResourceCommon;
601 uint8_t pucchGroupHopping;
604 typedef struct puschConfigCommon
606 /* PUSCH-TimeDomainResourceAllocation info */
610 uint8_t lengthSymbol;
613 typedef struct bwpDlConfig
616 PdcchConfigCommon pdcchCommon;
617 PdschConfigCommon pdschCommon;
620 typedef struct bwpUlConfig
623 // rach config common sent in PrachCfg
624 PucchConfigCommon pucchCommon;
625 PuschConfigCommon puschCommon;
628 typedef struct macCellCfg
630 uint16_t cellId; /* Cell Id */
631 uint8_t carrierId; /* Carrired Index */
632 uint16_t phyCellId; /* Physical cell id */
633 uint8_t numerology; /* Supported numerology */
634 DuplexMode dupType; /* Duplex type: TDD/FDD */
635 CarrierCfg dlCarrCfg; /* DL Carrier configuration */
636 CarrierCfg ulCarrCfg; /* UL Carrier configuration */
637 bool freqShft; /* Indicates presence of 7.5kHz frequency shift */
638 SsbCfg ssbCfg; /* SSB configuration */
639 PrachCfg prachCfg; /* PRACH Configuration */
641 TDDCfg tddCfg; /* TDD periodicity and slot configuration */
643 RSSIMeasUnit rssiUnit; /* RSSI measurement unit */
644 Sib1CellCfg sib1Cfg; /* SIB1 config */
645 BwpDlConfig initialDlBwp; /* Initial DL BWP */
646 BwpUlConfig initialUlBwp; /* Initial UL BWP */
647 uint8_t dmrsTypeAPos; /* DMRS Type A position */
650 typedef struct macCellCfgCfm
656 typedef struct ulCcchInd
660 uint16_t ulCcchMsgLen;
664 typedef struct dlCcchInd
668 DlCcchMsgType msgType;
669 uint16_t dlCcchMsgLen;
673 typedef struct bsrTmrCfg
675 uint16_t periodicTimer;
677 uint16_t srDelayTimer;
681 /* Info of Scheduling Request to Add/Modify */
682 typedef struct schedReqInfo
685 SrProhibitTimer srProhibitTmr;
686 SrTransMax srTransMax;
689 /* Scheduling Request Configuration */
690 typedef struct schedReqCfg
692 uint8_t addModListCount;
693 SchedReqInfo addModList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* List of Scheduling req to be added/modified */
694 uint8_t relListCount;
695 uint8_t relList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* list of scheduling request Id to be deleted */
698 typedef struct tagInfo
701 TimeAlignmentTimer timeAlignTimer;
704 typedef struct tagCfg
706 uint8_t addModListCount;
707 TagInfo addModList[MAC_NUM_TAGS]; /* List of Tag to Add/Modify */
708 uint8_t relListCount;
709 uint8_t relList[MAC_NUM_TAGS]; /* list of Tag Id to release */
712 typedef struct phrCfg
714 PhrPeriodicTimer periodicTimer;
715 PhrProhibitTimer prohibitTimer;
716 PhrTxPwrFactorChange txPowerFactor;
719 bool phrType2OtherCell;
720 PhrModeOtherCG phrOtherCG;
723 typedef struct macCellGrpCfg
725 SchedReqCfg schReqCfg;
728 bool phrCfgSetupPres; /* true/false: phrCfgSetup/phrCfgRelease */
732 typedef struct phyCellGrpCfg
734 PdschHarqAckCodebook pdschHarqAckCodebook;
738 /* Control resource set info */
739 typedef struct controlRsrcSet
741 uint8_t cRSetId; /* Control resource set id */
742 uint8_t freqDomainRsrc[FREQ_DOM_RSRC_SIZE]; /* Frequency domain resource */
744 REGMappingType cceRegMappingType;
745 PrecoderGranul precoderGranularity;
746 uint16_t dmrsScramblingId;
749 /* Search Space info */
750 typedef struct searchSpace
752 uint8_t searchSpaceId;
754 MSlotPeriodAndOffset mSlotPeriodicityAndOffset;
755 uint8_t mSymbolsWithinSlot[MONITORING_SYMB_WITHIN_SLOT_SIZE];
756 AggrLevel numCandidatesAggLevel1; /* Number of candidates for aggregation level 1 */
757 AggrLevel numCandidatesAggLevel2; /* Number of candidates for aggregation level 2 */
758 AggrLevel numCandidatesAggLevel4; /* Number of candidates for aggregation level 4 */
759 AggrLevel numCandidatesAggLevel8; /* Number of candidates for aggregation level 8 */
760 AggrLevel numCandidatesAggLevel16; /* Number of candidates for aggregation level 16 */
761 SearchSpaceType searchSpaceType;
762 uint8_t ueSpecificDciFormat;
765 /* PDCCH cofniguration */
766 typedef struct pdcchConfig
768 uint8_t numCRsetToAddMod;
769 ControlRsrcSet cRSetToAddModList[MAX_NUM_CRSET]; /* List of control resource set to add/modify */
770 uint8_t numCRsetToRel;
771 uint8_t cRSetToRelList[MAX_NUM_CRSET]; /* List of control resource set to release */
772 uint8_t numSearchSpcToAddMod;
773 SearchSpace searchSpcToAddModList[MAX_NUM_SEARCH_SPC]; /* List of search space to add/modify */
774 uint8_t numSearchSpcToRel;
775 uint8_t searchSpcToRelList[MAX_NUM_SEARCH_SPC]; /* List of search space to release */
778 /* PDSCH time domain resource allocation */
779 typedef struct pdschTimeDomRsrcAlloc
781 CommonMappingType mappingType;
783 uint8_t symbolLength;
784 uint8_t startSymbolAndLength;
785 }PdschTimeDomRsrcAlloc;
788 typedef struct pdschBundling
790 struct staticBundling
792 BundlingSizeSet2 size;
794 struct dynamicBundling
796 BundlingSizeSet1 sizeSet1;
797 BundlingSizeSet2 sizeSet2;
801 /* DMRS downlink configuration */
802 typedef struct dmrsDlCfg
804 AddPosType addPos; /* DMRS additional position */
807 /* PDSCH Configuration */
808 typedef struct pdschConfig
810 DmrsDlCfg dmrsDlCfgForPdschMapTypeA;
811 ResAllocType resourceAllocType;
812 uint8_t numTimeDomRsrcAlloc;
813 PdschTimeDomRsrcAlloc timeDomRsrcAllociList[MAX_NUM_DL_ALLOC]; /* PDSCH time domain DL resource allocation list */
815 CodeWordsSchedDci numCodeWordsSchByDci; /* Number of code words scheduled by DCI */
816 BundlingType bundlingType;
817 PdschBundling bundlingInfo;
820 /* Initial Downlink BWP */
821 typedef struct initialDlBwp
824 PdcchConfig pdcchCfg;
826 PdschConfig pdschCfg;
829 /* BWP Downlink common */
830 typedef struct bwpDlCommon
834 /* Downlink BWP information */
835 typedef struct dlBwpInfo
840 /* PDCCH Serving Cell configuration */
841 typedef struct pdschServCellCfg
843 uint8_t *maxMimoLayers;
844 NumHarqProcForPdsch numHarqProcForPdsch;
845 MaxCodeBlkGrpPerTB *maxCodeBlkGrpPerTb;
846 bool *codeBlkGrpFlushInd;
847 PdschXOverhead *xOverhead;
850 /* PUCCH Configuration */
852 typedef struct pucchResrcSetInfo
855 uint8_t resrcListCount;
856 uint8_t resrcList[MAX_NUM_PUCCH_PER_RESRC_SET];
857 uint8_t maxPayLoadSize;
860 typedef struct pucchResrcSetCfg
862 uint8_t resrcSetToAddModListCount;
863 PucchResrcSetInfo resrcSetToAddModList[MAX_NUM_PUCCH_RESRC_SET];
864 uint8_t resrcSetToRelListCount;
865 uint8_t resrcSetToRelList[MAX_NUM_PUCCH_RESRC];
868 typedef struct pucchFormat0
870 uint8_t initialCyclicShift;
872 uint8_t startSymbolIdx;
875 typedef struct pucchFormat1
877 uint8_t initialCyclicShift;
879 uint8_t startSymbolIdx;
883 typedef struct pucchFormat2_3
887 uint8_t startSymbolIdx;
890 typedef struct pucchFormat4
895 uint8_t startSymbolIdx;
898 typedef struct pucchResrcInfo
902 uint8_t intraFreqHop;
903 uint16_t secondPrbHop;
907 PucchFormat0 *format0;
908 PucchFormat1 *format1;
909 PucchFormat2_3 *format2;
910 PucchFormat2_3 *format3;
911 PucchFormat4 *format4;
915 typedef struct pucchResrcCfg
917 uint8_t resrcToAddModListCount;
918 PucchResrcInfo resrcToAddModList[MAX_NUM_PUCCH_RESRC];
919 uint8_t resrcToRelListCount;
920 uint8_t resrcToRelList[MAX_NUM_PUCCH_RESRC];
923 typedef struct pucchFormatCfg
925 uint8_t interSlotFreqHop;
933 typedef struct schedReqResrcInfo
942 typedef struct pucchSchedReqCfg
944 uint8_t schedAddModListCount;
945 SchedReqResrcInfo schedAddModList[MAX_NUM_SR_CFG_PER_CELL_GRP];
946 uint8_t schedRelListCount;
947 uint8_t schedRelList[MAX_NUM_SR_CFG_PER_CELL_GRP];
950 typedef struct spatialRelationInfo
952 uint8_t spatialRelationId;
954 uint8_t pathLossRefRSId;
956 uint8_t closeLoopIdx;
957 }SpatialRelationInfo;
959 typedef struct pucchSpatialCfg
961 uint8_t spatialAddModListCount;
962 SpatialRelationInfo spatialAddModList[MAX_NUM_SPATIAL_RELATIONS];
963 uint8_t spatialRelListCount;
964 uint8_t spatialRelList[MAX_NUM_SPATIAL_RELATIONS];
967 typedef struct p0PucchCfg
973 typedef struct pathLossRefRSCfg
975 uint8_t pathLossRefRSId;
978 typedef struct pucchMultiCsiCfg
980 uint8_t multiCsiResrcListCount;
981 uint8_t multiCsiResrcList[MAX_NUM_PUCCH_RESRC-1];
984 typedef struct pucchDlDataToUlAck
986 uint8_t dlDataToUlAckListCount;
987 uint8_t dlDataToUlAckList[MAX_NUM_DL_DATA_TO_UL_ACK];
990 typedef struct pucchPowerControl
998 P0PucchCfg p0Set[MAX_NUM_PUCCH_P0_PER_SET];
999 uint8_t pathLossRefRSListCount;
1000 PathLossRefRSCfg pathLossRefRSList[MAX_NUM_PATH_LOSS_REF_RS];
1003 typedef struct pucchCfg
1005 PucchResrcSetCfg *resrcSet;
1006 PucchResrcCfg *resrc;
1007 PucchFormatCfg *format1;
1008 PucchFormatCfg *format2;
1009 PucchFormatCfg *format3;
1010 PucchFormatCfg *format4;
1011 PucchSchedReqCfg *schedReq;
1012 PucchMultiCsiCfg *multiCsiCfg;
1013 PucchSpatialCfg *spatialInfo;
1014 PucchDlDataToUlAck *dlDataToUlAck;
1015 PucchPowerControl *powerControl;
1018 /* Transform precoding disabled */
1019 typedef struct transPrecodDisabled
1021 uint16_t scramblingId0;
1022 }TransPrecodDisabled;
1024 /* DMRS Uplink configuration */
1025 typedef struct dmrsUlCfg
1027 AddPosType addPos; /* DMRS additional position */
1028 TransPrecodDisabled transPrecodDisabled; /* Transform precoding disabled */
1031 /* PUSCH Time Domain Resource Allocation */
1032 typedef struct puschTimeDomRsrcAlloc
1035 CommonMappingType mappingType;
1036 uint8_t startSymbol;
1037 uint8_t symbolLength;
1038 uint8_t startSymbolAndLength;
1039 }PuschTimeDomRsrcAlloc;
1041 /* PUSCH Configuration */
1042 typedef struct puschCfg
1044 uint8_t dataScramblingId;
1045 DmrsUlCfg dmrsUlCfgForPuschMapTypeA;
1046 ResAllocType resourceAllocType;
1047 uint8_t numTimeDomRsrcAlloc;
1048 PuschTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_UL_ALLOC]; /* PUSCH time domain UL resource allocation list */
1049 TransformPrecoder transformPrecoder;
1052 /* Initial Uplink BWP */
1053 typedef struct initialUlBwp
1061 /* Uplink BWP information */
1062 typedef struct ulBwpInfo
1067 /* Serving cell configuration */
1068 typedef struct servCellCfgInfo
1070 InitialDlBwp initDlBwp;
1071 uint8_t numDlBwpToAdd;
1072 DlBwpInfo DlBwpToAddList[MAX_NUM_BWP];
1073 uint8_t firstActvDlBwpId;
1074 uint8_t defaultDlBwpId;
1075 uint8_t *bwpInactivityTmr;
1076 PdschServCellCfg pdschServCellCfg;
1077 InitialUlBwp initUlBwp;
1078 uint8_t numUlBwpToAdd;
1079 UlBwpInfo UlBwpToAddList[MAX_NUM_BWP];
1080 uint8_t firstActvUlBwpId;
1083 /* Special cell configuration */
1084 typedef struct spCellCfg
1086 uint8_t servCellIdx;
1087 ServCellCfgInfo servCellCfg;
1090 typedef struct ambrCfg
1092 uint32_t ulBr; /* UL Bit rate */
1093 uint32_t dlBr; /* DL Bit rate */
1096 /* Single Network Slice Selection assistance Info */
1097 typedef struct snssai
1099 uint8_t sst; /* Slice Type */
1100 uint8_t sd[SD_SIZE]; /* Slice Differentiator */
1103 typedef struct nonDynFiveQi
1108 uint16_t maxDataBurstVol;
1111 typedef struct dynFiveQi
1114 uint16_t packetDelayBudget;
1115 uint8_t packetErrRateScalar;
1116 uint8_t packetErrRateExp;
1118 uint8_t delayCritical;
1120 uint16_t maxDataBurstVol;
1123 typedef struct ngRanAllocAndRetPri
1125 uint8_t priorityLevel;
1126 uint8_t preEmptionCap;
1127 uint8_t preEmptionVul;
1128 }NgRanAllocAndRetPri;
1130 typedef struct grbQosInfo
1132 uint32_t maxFlowBitRateDl;
1133 uint32_t maxFlowBitRateUl;
1134 uint32_t guarFlowBitRateDl;
1135 uint32_t guarFlowBitRateUl;
1138 typedef struct drbQos
1140 QosType fiveQiType; /* Dynamic or non-dynamic */
1143 NonDynFiveQi nonDyn5Qi;
1146 NgRanAllocAndRetPri ngRanRetPri;
1147 GrbQosInfo grbQosInfo;
1148 uint16_t pduSessionId;
1149 uint32_t ulPduSessAggMaxBitRate;
1152 typedef struct ulLcCfg
1157 PBitRate pbr; // prioritisedBitRate
1158 BucketSizeDur bsd; // bucketSizeDuration
1161 typedef struct duLcCfg
1163 LcPriority lcp; // logical Channel Prioritization
1166 typedef struct lcCfg
1168 ConfigType configType;
1177 typedef struct modulationInfo
1179 uint8_t modOrder; /* Modulation order */
1180 uint8_t mcsIndex; /* MCS Index */
1181 McsTable mcsTable; /* MCS table */
1184 typedef struct macUeCfg
1189 MacCellGrpCfg macCellGrpCfg;
1190 PhyCellGrpCfg phyCellGrpCfg;
1191 SpCellCfg spCellCfg;
1193 ModulationInfo dlModInfo; /* DL modulation info */
1194 ModulationInfo ulModInfo; /* UL modulation info */
1196 LcCfg lcCfgList[MAX_NUM_LC];
1197 UeCfgState macUeCfgState; /* InActive / Completed */
1200 typedef struct nrcgi
1206 typedef struct srbFailInfo
1212 typedef struct drbFailInfo
1218 typedef struct sCellFailInfo
1224 typedef struct ueCfgRsp
1229 uint8_t numSRBFailed; /* valid values : 0 to MAX_NUM_SRB */
1230 SRBFailInfo *failedSRBlisti;
1231 uint8_t numDRBFailed; /* valid values : 0 to MAX_NUM_DRB */
1232 DRBFailInfo *failedDRBlist;
1233 uint8_t numSCellFailed; /* valid values : 0 to MAX_NUM_SCELL */
1234 SCellFailInfo *failedSCellList;
1237 /* Functions for slot Ind from MAC to DU APP*/
1238 typedef uint8_t (*DuMacCellUpInd) ARGS((
1240 OduCellId *cellId ));
1242 /* Functions for stop Ind from MAC to DU APP*/
1243 typedef uint8_t (*DuMacStopInd) ARGS((
1245 OduCellId *cellId ));
1247 /* Functions for mac cell start req */
1248 typedef uint8_t (*DuMacCellStart) ARGS((
1250 OduCellId *cellId));
1252 /* Functions for mac cell stop request */
1253 typedef uint8_t (*DuMacCellStop) ARGS((
1255 OduCellId *cellId ));
1257 /* Function pointers for packing macCellCfg Request and Confirm */
1258 typedef uint8_t (*packMacCellCfgReq) ARGS((
1260 MacCellCfg *macCellCfg ));
1262 typedef uint8_t (*packMacCellCfgConfirm) ARGS((
1264 MacCellCfgCfm *macCellCfgCfm ));
1266 typedef uint8_t (*DuMacCellCfgReq) ARGS((
1268 MacCellCfg *macCellCfg));
1270 typedef uint8_t (*DuMacCellCfgCfm) ARGS((
1272 MacCellCfgCfm *macCellCfgCfm ));
1274 /* Functions for UL CCCH Ind from MAC to DU APP*/
1275 typedef uint8_t (*DuMacUlCcchInd) ARGS((
1277 UlCcchIndInfo *ulCcchIndInfo ));
1279 /* Functions for DL CCCH Ind from DU APP to MAC*/
1280 typedef uint8_t (*DuMacDlCcchInd) ARGS((
1282 DlCcchIndInfo *dlCcchIndInfo ));
1284 /* UE create Request from DU APP to MAC*/
1285 typedef uint8_t (*DuMacUeCreateReq) ARGS((
1289 /* UE create Response from MAC to DU APP */
1290 typedef uint8_t (*MacDuUeCfgRspFunc) ARGS((
1292 MacUeCfgRsp *cfgRsp));
1294 /* UE Reconfig Request from DU APP to MAC*/
1295 typedef uint8_t (*DuMacUeReconfigReq) ARGS((
1299 uint8_t packMacCellUpInd(Pst *pst, OduCellId *cellId);
1300 uint8_t unpackMacCellUpInd(DuMacCellUpInd func, Pst *pst, Buffer *mBuf);
1301 uint8_t duHandleCellUpInd(Pst *pst, OduCellId *cellId);
1302 uint8_t packMacCellStart(Pst *pst, OduCellId *cellId);
1303 uint8_t unpackMacCellStart(DuMacCellStart func, Pst *pst, Buffer *mBuf);
1304 uint8_t MacProcCellStart(Pst *pst, OduCellId *cellId);
1305 uint8_t packMacCellStop(Pst *pst, OduCellId *cellId);
1306 uint8_t unpackMacCellStop(DuMacCellStop func, Pst *pst, Buffer *mBuf);
1307 uint8_t MacProcCellStop(Pst *pst, OduCellId *cellId);
1308 uint8_t packMacCellCfg(Pst *pst, MacCellCfg *macCellCfg);
1309 uint8_t unpackDuMacCellCfg(DuMacCellCfgReq func, Pst *pst, Buffer *mBuf);
1310 uint8_t MacProcCellCfgReq(Pst *pst, MacCellCfg *macCellCfg);
1311 uint8_t packMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm);
1312 uint8_t unpackMacCellCfgCfm(DuMacCellCfgCfm func, Pst *pst, Buffer *mBuf);
1313 uint8_t duHandleMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm);
1314 uint8_t packMacStopInd(Pst *pst, OduCellId *cellId);
1315 uint8_t unpackMacStopInd(DuMacStopInd func, Pst *pst, Buffer *mBuf);
1316 uint8_t duHandleStopInd(Pst *pst, OduCellId *cellId);
1317 uint8_t packMacUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo);
1318 uint8_t unpackMacUlCcchInd(DuMacUlCcchInd func, Pst *pst, Buffer *mBuf);
1319 uint8_t duHandleUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo);
1320 uint8_t packMacDlCcchInd(Pst *pst, DlCcchIndInfo *dlCcchIndInfo);
1321 uint8_t unpackMacDlCcchInd(DuMacDlCcchInd func, Pst *pst, Buffer *mBuf);
1322 uint8_t MacProcDlCcchInd(Pst *pst, DlCcchIndInfo *dlCcchIndInfo);
1323 uint8_t packDuMacUeCreateReq(Pst *pst, MacUeCfg *ueCfg);
1324 uint8_t unpackMacUeCreateReq(DuMacUeCreateReq func, Pst *pst, Buffer *mBuf);
1325 uint8_t MacProcUeCreateReq(Pst *pst, MacUeCfg *ueCfg);
1326 uint8_t sendStopIndMacToDuApp(uint16_t cellId);
1327 uint8_t packDuMacUeCfgRsp(Pst *pst, MacUeCfgRsp *cfgRsp);
1328 uint8_t unpackDuMacUeCfgRsp(MacDuUeCfgRspFunc func, Pst *pst, Buffer *mBuf);
1329 uint8_t DuProcMacUeCfgRsp(Pst *pst, MacUeCfgRsp *cfgRsp);
1330 uint8_t packDuMacUeReconfigReq(Pst *pst, MacUeCfg *ueCfg);
1331 uint8_t unpackMacUeReconfigReq(DuMacUeReconfigReq func, Pst *pst, Buffer *mBuf);
1332 uint8_t MacProcUeReconfigReq(Pst *pst, MacUeCfg *ueCfg);
1336 /**********************************************************************
1338 **********************************************************************/