1 /*******************************************************************************
2 ################################################################################
3 # Copyright (c) [2017-2019] [Radisys] #
5 # Licensed under the Apache License, Version 2.0 (the "License"); #
6 # you may not use this file except in compliance with the License. #
7 # You may obtain a copy of the License at #
9 # http://www.apache.org/licenses/LICENSE-2.0 #
11 # Unless required by applicable law or agreed to in writing, software #
12 # distributed under the License is distributed on an "AS IS" BASIS, #
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
14 # See the License for the specific language governing permissions and #
15 # limitations under the License. #
16 ################################################################################
17 *******************************************************************************/
19 /* Defines APIs exchanged between du_app and cl module of MAC */
23 #define NUM_NUMEROLOGY 5 /* Number of numerology */
25 #define NUM_SSB 1 /* max value is 64 */
26 #define SSB_MASK_SIZE 1 /* SSB mask size is 32bit for sub6 */
27 #define SIB1_REPETITION_PERIOD 20
28 #define CORESET_0_INDEX 0
29 #define CORESET_1_INDEX 1
30 #define CORESET_2_INDEX 2
31 #define CORESET_3_INDEX 3
32 #define CORESET_4_INDEX 4
33 #define SEARCHSPACE_0_INDEX 0
34 #define SEARCHSPACE_1_INDEX 1
35 #define SEARCHSPACE_2_INDEX 2
36 #define SEARCHSPACE_3_INDEX 3
37 #define SEARCHSPACE_4_INDEX 4
38 #define SS_MONITORING_SLOT_SL1 0 /* all slots */
39 #define SS_MONITORING_SYMBOL 0x2000; /* symbol-0, set 14th bit */
41 /* Macro for Ue Context */
42 #define MAX_NUM_SR_CFG_PER_CELL_GRP 8 /* Max number of scheduling request config per cell group */
43 #define MAC_NUM_TAGS 4 /* Max number of timing advance groups */
44 #define MAX_NUM_BWP 4 /* Max number of BWP per serving cell */
45 #define MAX_NUM_CRSET 3 /* Max number of control resource set in add/modify/release list */
46 #define MAX_NUM_SEARCH_SPC 10 /* Max number of search space in add/modify/release list */
47 #define MONITORING_SYMB_WITHIN_SLOT_SIZE 2 /* i.e. 2 bytes because size of monitoring symbols within slot is 14 bits */
48 #define MAX_NUM_DL_ALLOC 16 /* Max number of pdsch time domain downlink allocation */
49 #define MAX_NUM_UL_ALLOC 16 /* Max number of pusch time domain uplink allocation */
50 #define MAX_NUM_SCELL 32
52 /* PUCCH Configuration Macro */
53 #define MAX_NUM_PUCCH_RESRC 128
54 #define MAX_NUM_PUCCH_RESRC_SET 4
55 #define MAX_NUM_PUCCH_PER_RESRC_SET 32
56 #define MAX_NUM_SPATIAL_RELATIONS 8
57 #define MAX_NUM_PUCCH_P0_PER_SET 8
58 #define MAX_NUM_PATH_LOSS_REF_RS 4
59 #define MAX_NUM_DL_DATA_TO_UL_ACK 15
62 #define EVENT_MAC_CELL_CONFIG_REQ 200
63 #define EVENT_MAC_CELL_CONFIG_CFM 201
64 #define EVENT_MAC_CELL_START 202
65 #define EVENT_MAC_CELL_STOP 203
66 #define EVENT_MAC_CELL_UP_IND 204
67 #define EVENT_MAC_STOP_IND 205
68 #define EVENT_MAC_UL_CCCH_IND 206
69 #define EVENT_MAC_DL_CCCH_IND 207
70 #define EVENT_MAC_UE_CREATE_REQ 208
71 #define EVENT_MAC_UE_CREATE_RSP 209
72 #define EVENT_MAC_UE_RECONFIG_REQ 210
73 #define EVENT_MAC_UE_RECONFIG_RSP 211
74 #define EVENT_MAC_UE_DELETE_REQ 212
75 #define EVENT_MAC_UE_DELETE_RSP 213
76 #define EVENT_MAC_CELL_DELETE_REQ 214
77 #define EVENT_MAC_CELL_DELETE_RSP 215
78 #define EVENT_MAC_SLICE_CFG_REQ 216
79 #define EVENT_MAC_SLICE_CFG_RSP 217
80 #define EVENT_MAC_SLICE_RECFG_REQ 218
81 #define EVENT_MAC_SLICE_RECFG_RSP 219
83 #define BSR_PERIODIC_TIMER_SF_10 10
84 #define BSR_RETX_TIMER_SF_320 320
85 #define BSR_SR_DELAY_TMR_2560 2560
120 MAC_GEN_FULL_PBCH_PAYLD, /* MAC generated the full PBCH Payload */
121 PHY_GEN_TIMING_PBCH_BIT, /* PHY generates the timing PBCH bits */
122 PHY_GEN_FULL_PBCH_PAYLD /* PHY generates full PBCH payload */
134 RESTRICTED_SET_TYPE_A,
135 RESTRICTED_SET_TYPE_B
167 /* Enums for Ue Create Request */
169 /* SR PROHIBIT TIMER */
196 TIME_ALIGNMENT_TIMER_MS_500,
197 TIME_ALIGNMENT_TIMER_MS_750,
198 TIME_ALIGNMENT_TIMER_MS_1280,
199 TIME_ALIGNMENT_TIMER_MS_1920,
200 TIME_ALIGNMENT_TIMER_MS_2560,
201 TIME_ALIGNMENT_TIMER_MS_5120,
202 TIME_ALIGNMENT_TIMER_MS_10240,
203 TIME_ALIGNMENT_TIMER_INFINITY
208 PHR_PERIODIC_TIMER_SF_10,
209 PHR_PERIODIC_TIMER_SF_20,
210 PHR_PERIODIC_TIMER_SF_50,
211 PHR_PERIODIC_TIMER_SF_100,
212 PHR_PERIODIC_TIMER_SF_200,
213 PHR_PERIODIC_TIMER_SF_500,
214 PHR_PERIODIC_TIMER_SF_1000,
215 PHR_PERIODIC_TIMER_INFINITY
220 PHR_PROHIBIT_TIMER_SF_0,
221 PHR_PROHIBIT_TIMER_SF_10,
222 PHR_PROHIBIT_TIMER_SF_20,
223 PHR_PROHIBIT_TIMER_SF_50,
224 PHR_PROHIBIT_TIMER_SF_100,
225 PHR_PROHIBIT_TIMER_SF_200,
226 PHR_PROHIBIT_TIMER_SF_500,
227 PHR_PROHIBIT_TIMER_SF_1000
232 PHR_TX_PWR_FACTOR_CHANGE_DB_1,
233 PHR_TX_PWR_FACTOR_CHANGE_DB_3,
234 PHR_TX_PWR_FACTOR_CHANGE_DB_6,
235 PHR_TX_PWR_FACTOR_CHANGE_INFINITY
236 }PhrTxPwrFactorChange;
240 PHR_MODE_OTHER_CG_REAL,
241 PHR_MODE_OTHER_CG_VIRTUAL
246 PDSCH_HARQ_ACK_CODEBOOK_SEMISTATIC,
247 PDSCH_HARQ_ACK_CODEBOOK_DYNAMIC
248 }PdschHarqAckCodebook;
252 NUM_HARQ_PROC_FOR_PDSCH_N_2,
253 NUM_HARQ_PROC_FOR_PDSCH_N_4,
254 NUM_HARQ_PROC_FOR_PDSCH_N_6,
255 NUM_HARQ_PROC_FOR_PDSCH_N_10,
256 NUM_HARQ_PROC_FOR_PDSCH_N_16
257 }NumHarqProcForPdsch;
261 MAX_CODE_BLOCK_GROUP_PER_TB_N_2,
262 MAX_CODE_BLOCK_GROUP_PER_TB_N_4,
263 MAX_CODE_BLOCK_GROUP_PER_TB_N_6,
264 MAX_CODE_BLOCK_GROUP_PER_TB_N_8
276 TRANSFORM_PRECODER_ENABLED,
277 TRANSFORM_PRECODER_DISABLED
282 CCE_REG_MAPPINGTYPE_PR_INTERLEAVED = 1,
283 CCE_REG_MAPPINGTYPE_PR_NONINTERLEAVED
288 SLOTPERIODICITYANDOFFSET_PR_SL1 = 1,
289 SLOTPERIODICITYANDOFFSET_PR_SL2,
290 SLOTPERIODICITYANDOFFSET_PR_SL4,
291 SLOTPERIODICITYANDOFFSET_PR_SL5,
292 SLOTPERIODICITYANDOFFSET_PR_SL8,
293 SLOTPERIODICITYANDOFFSET_PR_SL10,
294 SLOTPERIODICITYANDOFFSET_PR_SL16,
295 SLOTPERIODICITYANDOFFSET_PR_SL20,
296 SLOTPERIODICITYANDOFFSET_PR_SL40,
297 SLOTPERIODICITYANDOFFSET_PR_SL80,
298 SLOTPERIODICITYANDOFFSET_PR_SL160,
299 SLOTPERIODICITYANDOFFSET_PR_SL320,
300 SLOTPERIODICITYANDOFFSET_PR_SL640,
301 SLOTPERIODICITYANDOFFSET_PR_SL1280,
302 SLOTPERIODICITYANDOFFSET_PR_SL2560
303 }MSlotPeriodAndOffset;
313 SEARCHSPACETYPE_PR_COMMON = 1,
314 SEARCHSPACETYPE_PR_UE_SPECIFIC
325 AGGREGATIONLEVEL_N0 = 0,
326 AGGREGATIONLEVEL_N1 = 1,
327 AGGREGATIONLEVEL_N2 = 2,
328 AGGREGATIONLEVEL_N3 = 3,
329 AGGREGATIONLEVEL_N4 = 4,
330 AGGREGATIONLEVEL_N5 = 5,
331 AGGREGATIONLEVEL_N6 = 6,
332 AGGREGATIONLEVEL_N8 = 7
337 ADDITIONALPOSITION_POS0,
338 ADDITIONALPOSITION_POS1,
339 ADDITIONALPOSITION_POS3
350 RESOURCEALLOCATION_TYPE0,
351 RESOURCEALLOCATION_TYPE1,
352 RESOURCEALLOCATION_DYNAMICSWITCH
363 CODEWORDS_SCHED_BY_DCI_N1,
364 CODEWORDS_SCHED_BY_DCI_N2
369 TYPE_STATIC_BUNDLING = 1,
370 TYPE_DYNAMIC_BUNDLING
383 SET1_SIZE_N2_WIDEBAND,
384 SET1_SIZE_N4_WIDEBAND
438 TRANSPORT_LAYER_FAIL,
445 UNSPECIFIED_RADIO_NW_CAUSE,
447 UNKNOWN_GNB_CU_UE_F1AP_ID,
448 ALREADY_ALLOCATED_GNB_CU_UE_F1AP_ID,
449 UNKNOWN_GNB_DU_UE_F1AP_ID,
450 ALREADY_ALLOCATED_GNB_DU_UE_F1AP_ID,
451 UNKNOWN_UE_F1AP_ID_PAIR,
452 INCONSISTENT_UE_F1AP_ID_PAIR,
453 INTERACTION_WITH_OTHER_PROCEDURE,
455 ACTION_REQUIRED_FOR_RADIO_REASONS,
456 RADIO_RESOURCES_UNAVAILABLE,
462 RESOURCES_UNAVAILABLE_FOR_SLICE
467 UNSPECIFIED_TRANSPORT_LAYER_CAUSE,
468 TRANSPORT_RESOURCE_UNAVAILABLE
473 TRANSFER_SYNTAX_ERROR,
474 ABSTRACT_SYNTAX_ERROR_REJECT,
475 ABSTRACT_SYNTAX_ERROR_IGNORE_AND_REJECT,
476 INCOMPATIBLE_MESSAGE_FOR_RECEIVER_STATE,
478 ABSTRAXCT_SYNTAX_ERROR_FALSELY_CONSTRUCTED_MSG,
479 UNSPECIFIED_PROTOCOL_CAUSE
484 CONTROL_PROCESSING_OVERLOAD,
486 PLANE_PROCESSING_RESOURCES,
488 INTERVENTION_BY_O_AND_M,
489 UNSPECIFIED_MISC_CAUSE
496 MCS_TABLE_QAM64_LOW_SE
503 RSRC_RRC_CONNECTED_USERS
506 typedef struct failureCause
511 RadioNwLyrCause radioNwCause;
512 TransLyrCause transportCause;
513 ProtCause protcolCause;
514 MiscFailCause miscCause;
518 typedef struct carrierCfg
521 uint32_t bw; /* DL/UL bandwidth */
522 uint32_t freq; /* Absolute frequency of DL/UL point A in KHz */
523 uint16_t k0[NUM_NUMEROLOGY]; /* K0 for DL/UL */
524 uint16_t gridSize[NUM_NUMEROLOGY]; /* DL/UL Grid size for each numerologies */
525 uint16_t numAnt; /* Number of Tx/Rx antennas */
528 typedef struct ssbCfg
530 uint32_t ssbPbchPwr; /* SSB block power */
531 BchPduOpt bchPayloadFlag; /* Options for generation of payload */
532 uint8_t scsCmn; /* subcarrier spacing for common */
533 uint16_t ssbOffsetPointA; /* SSB subcarrier offset from point A */
535 SSBPeriod ssbPeriod; /* SSB Periodicity in msec */
536 uint8_t ssbScOffset; /* Subcarrier Offset */
537 uint8_t mibPdu[3]; /* MIB payload */
538 uint32_t ssbMask[SSB_MASK_SIZE]; /* Bitmap for actually transmitted SSB. */
539 uint8_t beamId[NUM_SSB];
540 bool multCarrBand; /* Multiple carriers in a band */
541 bool multCellCarr; /* Multiple cells in single carrier */
544 typedef struct fdmInfo
546 uint16_t rootSeqIdx; /* Root sequence index */
547 uint8_t numRootSeq; /* Number of root sequences required for FD */
548 uint16_t k1; /* Frequency Offset for each FD */
549 uint8_t zeroCorrZoneCfg; /* Zero correlation zone cofig */
550 uint8_t numUnusedRootSeq; /* Number of unused root sequence */
551 uint8_t *unsuedRootSeq; /* Unused root sequence per FD */
554 typedef struct prachCfg
557 uint8_t prachCfgIdx; /* PRACH Cfg Index */
558 PrachSeqLen prachSeqLen; /* RACH Sequence length: Long/short */
559 uint8_t prachSubcSpacing; /* Subcarrier spacing of RACH */
560 RstSetCfg prachRstSetCfg; /* PRACH restricted set config */
561 uint16_t msg1FreqStart; /* Msg1-FrequencyStart */
562 uint8_t msg1Fdm; /* PRACH FDM (1,2,4,8) */
563 uint8_t rootSeqLen; /* Root sequence length */
564 PrachFdmInfo fdm[8]; /* FDM info */
565 uint8_t ssbPerRach; /* SSB per RACH occassion */
566 bool prachMultCarrBand; /* Multiple carriers in Band */
567 uint8_t prachRestrictedSet; /* Support for PRACH restricted set */
568 uint8_t raContResTmr; /* RA Contention Resoultion Timer */
569 uint8_t rsrpThreshSsb; /* RSRP Threshold SSB */
570 uint8_t raRspWindow; /* RA Response Window */
573 typedef struct sib1CellCfg
577 uint16_t sib1RepetitionPeriod;
578 uint8_t coresetZeroIndex; /* derived from 4 LSB of pdcchSib1 present in MIB */
579 uint8_t searchSpaceZeroIndex; /* derived from 4 MSB of pdcchSib1 present in MIB */
583 typedef struct bwpParams
588 uint8_t cyclicPrefix;
591 typedef struct candidatesInfo
600 typedef struct searchSpaceCfg
602 uint8_t searchSpaceId;
604 uint16_t monitoringSlot;
606 uint16_t monitoringSymbol;
607 CandidatesInfo candidate;
610 typedef struct pdcchConfigCommon
612 /* only one search space is configured during SIB1 */
613 SearchSpaceCfg commonSearchSpace;
614 uint8_t raSearchSpaceId;
617 typedef struct pdschCfgCommTimeDomRsrcAlloc
622 uint8_t lengthSymbol;
623 }PdschCfgCommTimeDomRsrcAlloc;
625 typedef struct pdschConfigCommon
627 uint8_t numTimeDomAlloc;
628 /* PDSCH time domain DL resource allocation list */
629 PdschCfgCommTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_DL_ALLOC];
632 typedef struct pucchConfigCommon
634 uint8_t pucchResourceCommon;
635 uint8_t pucchGroupHopping;
638 /* PUSCH Time Domain Resource Allocation */
639 typedef struct puschTimeDomRsrcAlloc
642 CommonMappingType mappingType;
644 uint8_t symbolLength;
645 uint8_t startSymbolAndLength;
646 }PuschTimeDomRsrcAlloc;
649 typedef struct puschConfigCommon
651 /* PUSCH-TimeDomainResourceAllocation info */
652 uint8_t numTimeDomRsrcAlloc;
653 PuschTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_UL_ALLOC]; /* PUSCH time domain UL resource allocation list */
656 typedef struct bwpDlConfig
659 PdcchConfigCommon pdcchCommon;
660 PdschConfigCommon pdschCommon;
663 typedef struct bwpUlConfig
666 // rach config common sent in PrachCfg
667 PucchConfigCommon pucchCommon;
668 PuschConfigCommon puschCommon;
671 typedef struct plmnInfoList
674 uint8_t numSupportedSlice; /* Total slice supporting */
675 Snssai **snssai; /* List of supporting snssai*/
678 typedef struct macCellCfg
680 uint16_t cellId; /* Cell Id */
681 uint8_t carrierId; /* Carrired Index */
682 uint16_t phyCellId; /* Physical cell id */
683 uint8_t numerology; /* Supported numerology */
684 DuplexMode dupType; /* Duplex type: TDD/FDD */
685 CarrierCfg dlCarrCfg; /* DL Carrier configuration */
686 CarrierCfg ulCarrCfg; /* UL Carrier configuration */
687 bool freqShft; /* Indicates presence of 7.5kHz frequency shift */
688 SsbCfg ssbCfg; /* SSB configuration */
689 PrachCfg prachCfg; /* PRACH Configuration */
691 TDDCfg tddCfg; /* TDD periodicity and slot configuration */
693 RSSIMeasUnit rssiUnit; /* RSSI measurement unit */
694 Sib1CellCfg sib1Cfg; /* SIB1 config */
695 BwpDlConfig initialDlBwp; /* Initial DL BWP */
696 BwpUlConfig initialUlBwp; /* Initial UL BWP */
697 uint8_t dmrsTypeAPos; /* DMRS Type A position */
698 PlmnInfoList plmnInfoList; /* Consits of PlmnId and Snssai list */
699 //RrmPolicy *rrmPolicy; /* RRM policy details */
702 typedef struct macCellCfgCfm
708 typedef struct ulCcchInd
712 uint16_t ulCcchMsgLen;
716 typedef struct dlCcchInd
720 DlCcchMsgType msgType;
721 uint16_t dlCcchMsgLen;
725 typedef struct bsrTmrCfg
727 uint16_t periodicTimer;
729 uint16_t srDelayTimer;
733 /* Info of Scheduling Request to Add/Modify */
734 typedef struct schedReqInfo
737 SrProhibitTimer srProhibitTmr;
738 SrTransMax srTransMax;
741 /* Scheduling Request Configuration */
742 typedef struct schedReqCfg
744 uint8_t addModListCount;
745 SchedReqInfo addModList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* List of Scheduling req to be added/modified */
746 uint8_t relListCount;
747 uint8_t relList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* list of scheduling request Id to be deleted */
750 typedef struct tagInfo
753 TimeAlignmentTimer timeAlignTimer;
756 typedef struct tagCfg
758 uint8_t addModListCount;
759 TagInfo addModList[MAC_NUM_TAGS]; /* List of Tag to Add/Modify */
760 uint8_t relListCount;
761 uint8_t relList[MAC_NUM_TAGS]; /* list of Tag Id to release */
764 typedef struct phrCfg
766 PhrPeriodicTimer periodicTimer;
767 PhrProhibitTimer prohibitTimer;
768 PhrTxPwrFactorChange txPowerFactor;
771 bool phrType2OtherCell;
772 PhrModeOtherCG phrOtherCG;
775 typedef struct macCellGrpCfg
777 SchedReqCfg schReqCfg;
780 bool phrCfgSetupPres; /* true/false: phrCfgSetup/phrCfgRelease */
784 typedef struct phyCellGrpCfg
786 PdschHarqAckCodebook pdschHarqAckCodebook;
790 /* Control resource set info */
791 typedef struct controlRsrcSet
793 uint8_t cRSetId; /* Control resource set id */
794 uint8_t freqDomainRsrc[FREQ_DOM_RSRC_SIZE]; /* Frequency domain resource */
796 REGMappingType cceRegMappingType;
797 PrecoderGranul precoderGranularity;
798 uint16_t dmrsScramblingId;
801 /* Search Space info */
802 typedef struct searchSpace
804 uint8_t searchSpaceId;
806 MSlotPeriodAndOffset mSlotPeriodicityAndOffset;
807 uint8_t mSymbolsWithinSlot[MONITORING_SYMB_WITHIN_SLOT_SIZE];
808 AggrLevel numCandidatesAggLevel1; /* Number of candidates for aggregation level 1 */
809 AggrLevel numCandidatesAggLevel2; /* Number of candidates for aggregation level 2 */
810 AggrLevel numCandidatesAggLevel4; /* Number of candidates for aggregation level 4 */
811 AggrLevel numCandidatesAggLevel8; /* Number of candidates for aggregation level 8 */
812 AggrLevel numCandidatesAggLevel16; /* Number of candidates for aggregation level 16 */
813 SearchSpaceType searchSpaceType;
814 uint8_t ueSpecificDciFormat;
817 /* PDCCH cofniguration */
818 typedef struct pdcchConfig
820 uint8_t numCRsetToAddMod;
821 ControlRsrcSet cRSetToAddModList[MAX_NUM_CRSET]; /* List of control resource set to add/modify */
822 uint8_t numCRsetToRel;
823 uint8_t cRSetToRelList[MAX_NUM_CRSET]; /* List of control resource set to release */
824 uint8_t numSearchSpcToAddMod;
825 SearchSpace searchSpcToAddModList[MAX_NUM_SEARCH_SPC]; /* List of search space to add/modify */
826 uint8_t numSearchSpcToRel;
827 uint8_t searchSpcToRelList[MAX_NUM_SEARCH_SPC]; /* List of search space to release */
830 /* PDSCH time domain resource allocation */
831 typedef struct pdschTimeDomRsrcAlloc
834 CommonMappingType mappingType;
836 uint8_t symbolLength;
837 uint8_t startSymbolAndLength;
838 }PdschTimeDomRsrcAlloc;
841 typedef struct pdschBundling
843 struct staticBundling
845 BundlingSizeSet2 size;
847 struct dynamicBundling
849 BundlingSizeSet1 sizeSet1;
850 BundlingSizeSet2 sizeSet2;
854 /* DMRS downlink configuration */
855 typedef struct dmrsDlCfg
857 AddPosType addPos; /* DMRS additional position */
860 /* PDSCH Configuration */
861 typedef struct pdschConfig
863 DmrsDlCfg dmrsDlCfgForPdschMapTypeA;
864 ResAllocType resourceAllocType;
865 uint8_t numTimeDomRsrcAlloc;
866 PdschTimeDomRsrcAlloc timeDomRsrcAllociList[MAX_NUM_DL_ALLOC]; /* PDSCH time domain DL resource allocation list */
868 CodeWordsSchedDci numCodeWordsSchByDci; /* Number of code words scheduled by DCI */
869 BundlingType bundlingType;
870 PdschBundling bundlingInfo;
873 /* Initial Downlink BWP */
874 typedef struct initialDlBwp
877 PdcchConfig pdcchCfg;
879 PdschConfig pdschCfg;
882 /* BWP Downlink common */
883 typedef struct bwpDlCommon
887 /* Downlink BWP information */
888 typedef struct dlBwpInfo
893 /* PDCCH Serving Cell configuration */
894 typedef struct pdschServCellCfg
896 uint8_t *maxMimoLayers;
897 NumHarqProcForPdsch numHarqProcForPdsch;
898 MaxCodeBlkGrpPerTB *maxCodeBlkGrpPerTb;
899 bool *codeBlkGrpFlushInd;
900 PdschXOverhead *xOverhead;
903 /* PUCCH Configuration */
905 typedef struct pucchResrcSetInfo
908 uint8_t resrcListCount;
909 uint8_t resrcList[MAX_NUM_PUCCH_PER_RESRC_SET];
910 uint8_t maxPayLoadSize;
913 typedef struct pucchResrcSetCfg
915 uint8_t resrcSetToAddModListCount;
916 PucchResrcSetInfo resrcSetToAddModList[MAX_NUM_PUCCH_RESRC_SET];
917 uint8_t resrcSetToRelListCount;
918 uint8_t resrcSetToRelList[MAX_NUM_PUCCH_RESRC];
921 typedef struct pucchFormat0
923 uint8_t initialCyclicShift;
925 uint8_t startSymbolIdx;
928 typedef struct pucchFormat1
930 uint8_t initialCyclicShift;
932 uint8_t startSymbolIdx;
936 typedef struct pucchFormat2_3
940 uint8_t startSymbolIdx;
943 typedef struct pucchFormat4
948 uint8_t startSymbolIdx;
951 typedef struct pucchResrcInfo
955 uint8_t intraFreqHop;
956 uint16_t secondPrbHop;
960 PucchFormat0 *format0;
961 PucchFormat1 *format1;
962 PucchFormat2_3 *format2;
963 PucchFormat2_3 *format3;
964 PucchFormat4 *format4;
968 typedef struct pucchResrcCfg
970 uint8_t resrcToAddModListCount;
971 PucchResrcInfo resrcToAddModList[MAX_NUM_PUCCH_RESRC];
972 uint8_t resrcToRelListCount;
973 uint8_t resrcToRelList[MAX_NUM_PUCCH_RESRC];
976 typedef struct pucchFormatCfg
978 uint8_t interSlotFreqHop;
986 typedef struct schedReqResrcInfo
995 typedef struct pucchSchedReqCfg
997 uint8_t schedAddModListCount;
998 SchedReqResrcInfo schedAddModList[MAX_NUM_SR_CFG_PER_CELL_GRP];
999 uint8_t schedRelListCount;
1000 uint8_t schedRelList[MAX_NUM_SR_CFG_PER_CELL_GRP];
1003 typedef struct spatialRelationInfo
1005 uint8_t spatialRelationId;
1006 uint8_t servCellIdx;
1007 uint8_t pathLossRefRSId;
1009 uint8_t closeLoopIdx;
1010 }SpatialRelationInfo;
1012 typedef struct pucchSpatialCfg
1014 uint8_t spatialAddModListCount;
1015 SpatialRelationInfo spatialAddModList[MAX_NUM_SPATIAL_RELATIONS];
1016 uint8_t spatialRelListCount;
1017 uint8_t spatialRelList[MAX_NUM_SPATIAL_RELATIONS];
1020 typedef struct p0PucchCfg
1026 typedef struct pathLossRefRSCfg
1028 uint8_t pathLossRefRSId;
1031 typedef struct pucchMultiCsiCfg
1033 uint8_t multiCsiResrcListCount;
1034 uint8_t multiCsiResrcList[MAX_NUM_PUCCH_RESRC-1];
1037 typedef struct pucchDlDataToUlAck
1039 uint8_t dlDataToUlAckListCount;
1040 uint8_t dlDataToUlAckList[MAX_NUM_DL_DATA_TO_UL_ACK];
1041 }PucchDlDataToUlAck;
1043 typedef struct pucchPowerControl
1051 P0PucchCfg p0Set[MAX_NUM_PUCCH_P0_PER_SET];
1052 uint8_t pathLossRefRSListCount;
1053 PathLossRefRSCfg pathLossRefRSList[MAX_NUM_PATH_LOSS_REF_RS];
1056 typedef struct pucchCfg
1058 PucchResrcSetCfg *resrcSet;
1059 PucchResrcCfg *resrc;
1060 PucchFormatCfg *format1;
1061 PucchFormatCfg *format2;
1062 PucchFormatCfg *format3;
1063 PucchFormatCfg *format4;
1064 PucchSchedReqCfg *schedReq;
1065 PucchMultiCsiCfg *multiCsiCfg;
1066 PucchSpatialCfg *spatialInfo;
1067 PucchDlDataToUlAck *dlDataToUlAck;
1068 PucchPowerControl *powerControl;
1071 /* Transform precoding disabled */
1072 typedef struct transPrecodDisabled
1074 uint16_t scramblingId0;
1075 }TransPrecodDisabled;
1077 /* DMRS Uplink configuration */
1078 typedef struct dmrsUlCfg
1080 AddPosType addPos; /* DMRS additional position */
1081 TransPrecodDisabled transPrecodDisabled; /* Transform precoding disabled */
1084 /* PUSCH Configuration */
1085 typedef struct puschCfg
1087 uint8_t dataScramblingId;
1088 DmrsUlCfg dmrsUlCfgForPuschMapTypeA;
1089 ResAllocType resourceAllocType;
1090 uint8_t numTimeDomRsrcAlloc;
1091 PuschTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_UL_ALLOC]; /* PUSCH time domain UL resource allocation list */
1092 TransformPrecoder transformPrecoder;
1095 /* Initial Uplink BWP */
1096 typedef struct initialUlBwp
1104 /* Uplink BWP information */
1105 typedef struct ulBwpInfo
1110 /* Serving cell configuration */
1111 typedef struct servCellCfgInfo
1113 InitialDlBwp initDlBwp;
1114 uint8_t numDlBwpToAdd;
1115 DlBwpInfo DlBwpToAddList[MAX_NUM_BWP];
1116 uint8_t firstActvDlBwpId;
1117 uint8_t defaultDlBwpId;
1118 uint8_t *bwpInactivityTmr;
1119 PdschServCellCfg pdschServCellCfg;
1120 InitialUlBwp initUlBwp;
1121 uint8_t numUlBwpToAdd;
1122 UlBwpInfo UlBwpToAddList[MAX_NUM_BWP];
1123 uint8_t firstActvUlBwpId;
1126 /* Special cell configuration */
1127 typedef struct spCellCfg
1129 uint8_t servCellIdx;
1130 ServCellCfgInfo servCellCfg;
1133 typedef struct ambrCfg
1135 uint32_t ulBr; /* UL Bit rate */
1138 typedef struct nonDynFiveQi
1143 uint16_t maxDataBurstVol;
1146 typedef struct dynFiveQi
1149 uint16_t packetDelayBudget;
1150 uint8_t packetErrRateScalar;
1151 uint8_t packetErrRateExp;
1153 uint8_t delayCritical;
1155 uint16_t maxDataBurstVol;
1158 typedef struct ngRanAllocAndRetPri
1160 uint8_t priorityLevel;
1161 uint8_t preEmptionCap;
1162 uint8_t preEmptionVul;
1163 }NgRanAllocAndRetPri;
1165 typedef struct grbQosInfo
1167 uint32_t maxFlowBitRateDl;
1168 uint32_t maxFlowBitRateUl;
1169 uint32_t guarFlowBitRateDl;
1170 uint32_t guarFlowBitRateUl;
1173 typedef struct drbQos
1175 QosType fiveQiType; /* Dynamic or non-dynamic */
1178 NonDynFiveQi nonDyn5Qi;
1181 NgRanAllocAndRetPri ngRanRetPri;
1182 GrbQosInfo grbQosInfo;
1183 uint16_t pduSessionId;
1184 uint32_t ulPduSessAggMaxBitRate;
1187 typedef struct ulLcCfg
1192 PBitRate pbr; // prioritisedBitRate
1193 BucketSizeDur bsd; // bucketSizeDuration
1196 typedef struct duLcCfg
1198 LcPriority lcp; // logical Channel Prioritization
1201 typedef struct lcCfg
1203 ConfigType configType;
1212 typedef struct modulationInfo
1214 uint8_t modOrder; /* Modulation order */
1215 uint8_t mcsIndex; /* MCS Index */
1216 McsTable mcsTable; /* MCS table */
1219 typedef struct macUeCfg
1224 bool macCellGrpCfgPres;
1225 MacCellGrpCfg macCellGrpCfg;
1226 bool phyCellGrpCfgPres;
1227 PhyCellGrpCfg phyCellGrpCfg;
1229 SpCellCfg spCellCfg;
1231 ModulationInfo dlModInfo; /* DL modulation info */
1232 ModulationInfo ulModInfo; /* UL modulation info */
1234 LcCfg lcCfgList[MAX_NUM_LC];
1235 UeCfgState macUeCfgState; /* InActive / Completed */
1238 typedef struct nrcgi
1244 typedef struct srbFailInfo
1250 typedef struct drbFailInfo
1256 typedef struct sCellFailInfo
1262 typedef struct ueCfgRsp
1267 uint8_t numSRBFailed; /* valid values : 0 to MAX_NUM_SRB */
1268 SRBFailInfo *failedSRBlisti;
1269 uint8_t numDRBFailed; /* valid values : 0 to MAX_NUM_DRB */
1270 DRBFailInfo *failedDRBlist;
1271 uint8_t numSCellFailed; /* valid values : 0 to MAX_NUM_SCELL */
1272 SCellFailInfo *failedSCellList;
1275 typedef struct ueDelete
1282 typedef struct ueDeleteRsp
1286 UeDeleteStatus result;
1289 typedef struct macCellDelete
1294 typedef struct macCellDeleteRsp
1297 CellDeleteStatus result;
1300 typedef struct macSliceRsp
1307 typedef struct rrmPolicyRatio
1309 uint8_t policyMaxRatio;
1310 uint8_t policyMinRatio;
1311 uint8_t policyDedicatedRatio;
1314 typedef struct macSliceRrmPolicy
1317 RrmPolicyRatio *rrmPolicyRatio;
1320 typedef struct macSliceCfgReq
1322 uint8_t numOfConfiguredSlice;
1323 MacSliceRrmPolicy **listOfSliceCfg;
1326 typedef struct macSliceCfgRsp
1328 uint8_t numSliceCfgRsp;
1329 MacSliceRsp **listOfSliceCfgRsp;
1332 /* Functions for slot Ind from MAC to DU APP*/
1333 typedef uint8_t (*DuMacCellUpInd) ARGS((
1335 OduCellId *cellId ));
1337 /* Functions for stop Ind from MAC to DU APP*/
1338 typedef uint8_t (*DuMacStopInd) ARGS((
1340 OduCellId *cellId ));
1342 /* Functions for mac cell start req */
1343 typedef uint8_t (*DuMacCellStart) ARGS((
1345 OduCellId *cellId));
1347 /* Functions for mac cell stop request */
1348 typedef uint8_t (*DuMacCellStop) ARGS((
1350 OduCellId *cellId ));
1352 /* Function pointers for packing macCellCfg Request and Confirm */
1353 typedef uint8_t (*packMacCellCfgReq) ARGS((
1355 MacCellCfg *macCellCfg ));
1357 typedef uint8_t (*packMacCellCfgConfirm) ARGS((
1359 MacCellCfgCfm *macCellCfgCfm ));
1361 typedef uint8_t (*DuMacCellCfgReq) ARGS((
1363 MacCellCfg *macCellCfg));
1365 typedef uint8_t (*DuMacCellCfgCfm) ARGS((
1367 MacCellCfgCfm *macCellCfgCfm ));
1369 /* Functions for UL CCCH Ind from MAC to DU APP*/
1370 typedef uint8_t (*DuMacUlCcchInd) ARGS((
1372 UlCcchIndInfo *ulCcchIndInfo ));
1374 /* Functions for DL CCCH Ind from DU APP to MAC*/
1375 typedef uint8_t (*DuMacDlCcchInd) ARGS((
1377 DlCcchIndInfo *dlCcchIndInfo ));
1379 /* UE create Request from DU APP to MAC*/
1380 typedef uint8_t (*DuMacUeCreateReq) ARGS((
1384 /* UE create Response from MAC to DU APP */
1385 typedef uint8_t (*MacDuUeCfgRspFunc) ARGS((
1387 MacUeCfgRsp *cfgRsp));
1389 /* UE Reconfig Request from DU APP to MAC*/
1390 typedef uint8_t (*DuMacUeReconfigReq) ARGS((
1394 /* UE Delete Request from DU APP to MAC*/
1395 typedef uint8_t (*DuMacUeDeleteReq) ARGS((
1397 MacUeDelete *ueDel ));
1399 /* UE Delete Response from MAC to DU APP*/
1400 typedef uint8_t (*MacDuUeDeleteRspFunc) ARGS((
1402 MacUeDeleteRsp *deleteRsp));
1404 /* Cell Delete Request from DU APP to MAC*/
1405 typedef uint8_t (*DuMacCellDeleteReq) ARGS((
1407 MacCellDelete *cellDelete ));
1409 /* Cell Delete Response from MAC to DU APP*/
1410 typedef uint8_t (*MacDuCellDeleteRspFunc) ARGS((
1412 MacCellDeleteRsp *cellDeleteRsp));
1414 /* Slice Cfg Request from DU APP to MAC*/
1415 typedef uint8_t (*DuMacSliceCfgReq) ARGS((
1417 MacSliceCfgReq *CfgReq));
1419 /* Slice Cfg Response from MAC to DU APP */
1420 typedef uint8_t (*MacDuSliceCfgRspFunc) ARGS((
1422 MacSliceCfgRsp *cfgRsp));
1424 /* Slice ReReCfg Request from DU APP to MAC*/
1425 typedef uint8_t (*DuMacSliceRecfgReq) ARGS((
1427 MacSliceCfgReq *CfgReq));
1429 /* Slice ReReCfg Response from MAC to DU APP */
1430 typedef uint8_t (*MacDuSliceReCfgRspFunc) ARGS((
1432 MacSliceCfgRsp *cfgRsp));
1435 uint8_t packMacCellUpInd(Pst *pst, OduCellId *cellId);
1436 uint8_t unpackMacCellUpInd(DuMacCellUpInd func, Pst *pst, Buffer *mBuf);
1437 uint8_t duHandleCellUpInd(Pst *pst, OduCellId *cellId);
1438 uint8_t packMacCellStart(Pst *pst, OduCellId *cellId);
1439 uint8_t unpackMacCellStart(DuMacCellStart func, Pst *pst, Buffer *mBuf);
1440 uint8_t MacProcCellStart(Pst *pst, OduCellId *cellId);
1441 uint8_t packMacCellStop(Pst *pst, OduCellId *cellId);
1442 uint8_t unpackMacCellStop(DuMacCellStop func, Pst *pst, Buffer *mBuf);
1443 uint8_t MacProcCellStop(Pst *pst, OduCellId *cellId);
1444 uint8_t packMacCellCfg(Pst *pst, MacCellCfg *macCellCfg);
1445 uint8_t unpackDuMacCellCfg(DuMacCellCfgReq func, Pst *pst, Buffer *mBuf);
1446 uint8_t MacProcCellCfgReq(Pst *pst, MacCellCfg *macCellCfg);
1447 uint8_t packMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm);
1448 uint8_t unpackMacCellCfgCfm(DuMacCellCfgCfm func, Pst *pst, Buffer *mBuf);
1449 uint8_t duHandleMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm);
1450 uint8_t packMacStopInd(Pst *pst, OduCellId *cellId);
1451 uint8_t unpackMacStopInd(DuMacStopInd func, Pst *pst, Buffer *mBuf);
1452 uint8_t duHandleStopInd(Pst *pst, OduCellId *cellId);
1453 uint8_t packMacUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo);
1454 uint8_t unpackMacUlCcchInd(DuMacUlCcchInd func, Pst *pst, Buffer *mBuf);
1455 uint8_t duHandleUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo);
1456 uint8_t packMacDlCcchInd(Pst *pst, DlCcchIndInfo *dlCcchIndInfo);
1457 uint8_t unpackMacDlCcchInd(DuMacDlCcchInd func, Pst *pst, Buffer *mBuf);
1458 uint8_t MacProcDlCcchInd(Pst *pst, DlCcchIndInfo *dlCcchIndInfo);
1459 uint8_t packDuMacUeCreateReq(Pst *pst, MacUeCfg *ueCfg);
1460 uint8_t unpackMacUeCreateReq(DuMacUeCreateReq func, Pst *pst, Buffer *mBuf);
1461 uint8_t MacProcUeCreateReq(Pst *pst, MacUeCfg *ueCfg);
1462 uint8_t sendStopIndMacToDuApp(uint16_t cellId);
1463 uint8_t packDuMacUeCfgRsp(Pst *pst, MacUeCfgRsp *cfgRsp);
1464 uint8_t unpackDuMacUeCfgRsp(MacDuUeCfgRspFunc func, Pst *pst, Buffer *mBuf);
1465 uint8_t DuProcMacUeCfgRsp(Pst *pst, MacUeCfgRsp *cfgRsp);
1466 uint8_t packDuMacUeReconfigReq(Pst *pst, MacUeCfg *ueCfg);
1467 uint8_t unpackMacUeReconfigReq(DuMacUeReconfigReq func, Pst *pst, Buffer *mBuf);
1468 uint8_t MacProcUeReconfigReq(Pst *pst, MacUeCfg *ueCfg);
1469 uint8_t packDuMacUeDeleteReq(Pst *pst, MacUeDelete *ueDelete);
1470 uint8_t MacProcUeDeleteReq(Pst *pst, MacUeDelete *ueDelete);
1471 uint8_t unpackMacUeDeleteReq(DuMacUeDeleteReq func, Pst *pst, Buffer *mBuf);
1472 uint8_t packDuMacUeDeleteRsp(Pst *pst, MacUeDeleteRsp *deleteRsp);
1473 uint8_t DuProcMacUeDeleteRsp(Pst *pst, MacUeDeleteRsp *deleteRsp);
1474 uint8_t unpackDuMacUeDeleteRsp(MacDuUeDeleteRspFunc func, Pst *pst, Buffer *mBuf);
1475 uint8_t packDuMacCellDeleteReq(Pst *pst, MacCellDelete *cellDelete);
1476 uint8_t MacProcCellDeleteReq(Pst *pst, MacCellDelete *cellDelete);
1477 uint8_t unpackMacCellDeleteReq(DuMacCellDeleteReq func, Pst *pst, Buffer *mBuf);
1478 uint8_t packDuMacCellDeleteRsp(Pst *pst, MacCellDeleteRsp *cellDeleteRsp);
1479 uint8_t DuProcMacCellDeleteRsp(Pst *pst, MacCellDeleteRsp *cellDeleteRsp);
1480 uint8_t unpackDuMacCellDeleteRsp(MacDuCellDeleteRspFunc func, Pst *pst, Buffer *mBuf);
1481 uint8_t packDuMacSliceCfgReq(Pst *pst, MacSliceCfgReq *sliceCfgReq);
1482 uint8_t MacProcSliceCfgReq(Pst *pst, MacSliceCfgReq *sliceCfgReq);
1483 uint8_t unpackMacSliceCfgReq(DuMacSliceCfgReq func, Pst *pst, Buffer *mBuf);
1484 uint8_t DuProcMacSliceCfgRsp(Pst *pst, MacSliceCfgRsp *cfgRsp);
1485 uint8_t packDuMacSliceCfgRsp(Pst *pst, MacSliceCfgRsp *cfgRsp);
1486 uint8_t unpackDuMacSliceCfgRsp(MacDuSliceCfgRspFunc func, Pst *pst, Buffer *mBuf);
1487 uint8_t packDuMacSliceRecfgReq(Pst *pst, MacSliceCfgReq *sliceReCfgReq);
1488 uint8_t MacProcSliceReCfgReq(Pst *pst, MacSliceCfgReq *sliceReCfgReq);
1489 uint8_t unpackMacSliceReCfgReq(DuMacSliceRecfgReq func, Pst *pst, Buffer *mBuf);
1490 uint8_t DuProcMacSliceReCfgRsp(Pst *pst, MacSliceCfgRsp *cfgRsp);
1491 uint8_t packDuMacSliceReCfgRsp(Pst *pst, MacSliceCfgRsp *cfgRsp);
1492 uint8_t unpackDuMacSliceReCfgRsp(MacDuSliceReCfgRspFunc func, Pst *pst, Buffer *mBuf);
1497 /**********************************************************************
1499 **********************************************************************/