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
77 #define EVENT_MAC_UE_DELETE_REQ 212
78 #define EVENT_MAC_UE_DELETE_RSP 213
80 #define BSR_PERIODIC_TIMER_SF_10 10
81 #define BSR_RETX_TIMER_SF_320 320
82 #define BSR_SR_DELAY_TMR_2560 2560
105 MAC_GEN_FULL_PBCH_PAYLD, /* MAC generated the full PBCH Payload */
106 PHY_GEN_TIMING_PBCH_BIT, /* PHY generates the timing PBCH bits */
107 PHY_GEN_FULL_PBCH_PAYLD /* PHY generates full PBCH payload */
119 RESTRICTED_SET_TYPE_A,
120 RESTRICTED_SET_TYPE_B
152 /* Enums for Ue Create Request */
154 /* SR PROHIBIT TIMER */
181 TIME_ALIGNMENT_TIMER_MS_500,
182 TIME_ALIGNMENT_TIMER_MS_750,
183 TIME_ALIGNMENT_TIMER_MS_1280,
184 TIME_ALIGNMENT_TIMER_MS_1920,
185 TIME_ALIGNMENT_TIMER_MS_2560,
186 TIME_ALIGNMENT_TIMER_MS_5120,
187 TIME_ALIGNMENT_TIMER_MS_10240,
188 TIME_ALIGNMENT_TIMER_INFINITY
193 PHR_PERIODIC_TIMER_SF_10,
194 PHR_PERIODIC_TIMER_SF_20,
195 PHR_PERIODIC_TIMER_SF_50,
196 PHR_PERIODIC_TIMER_SF_100,
197 PHR_PERIODIC_TIMER_SF_200,
198 PHR_PERIODIC_TIMER_SF_500,
199 PHR_PERIODIC_TIMER_SF_1000,
200 PHR_PERIODIC_TIMER_INFINITY
205 PHR_PROHIBIT_TIMER_SF_0,
206 PHR_PROHIBIT_TIMER_SF_10,
207 PHR_PROHIBIT_TIMER_SF_20,
208 PHR_PROHIBIT_TIMER_SF_50,
209 PHR_PROHIBIT_TIMER_SF_100,
210 PHR_PROHIBIT_TIMER_SF_200,
211 PHR_PROHIBIT_TIMER_SF_500,
212 PHR_PROHIBIT_TIMER_SF_1000
217 PHR_TX_PWR_FACTOR_CHANGE_DB_1,
218 PHR_TX_PWR_FACTOR_CHANGE_DB_3,
219 PHR_TX_PWR_FACTOR_CHANGE_DB_6,
220 PHR_TX_PWR_FACTOR_CHANGE_INFINITY
221 }PhrTxPwrFactorChange;
225 PHR_MODE_OTHER_CG_REAL,
226 PHR_MODE_OTHER_CG_VIRTUAL
231 PDSCH_HARQ_ACK_CODEBOOK_SEMISTATIC,
232 PDSCH_HARQ_ACK_CODEBOOK_DYNAMIC
233 }PdschHarqAckCodebook;
237 NUM_HARQ_PROC_FOR_PDSCH_N_2,
238 NUM_HARQ_PROC_FOR_PDSCH_N_4,
239 NUM_HARQ_PROC_FOR_PDSCH_N_6,
240 NUM_HARQ_PROC_FOR_PDSCH_N_10,
241 NUM_HARQ_PROC_FOR_PDSCH_N_16
242 }NumHarqProcForPdsch;
246 MAX_CODE_BLOCK_GROUP_PER_TB_N_2,
247 MAX_CODE_BLOCK_GROUP_PER_TB_N_4,
248 MAX_CODE_BLOCK_GROUP_PER_TB_N_6,
249 MAX_CODE_BLOCK_GROUP_PER_TB_N_8
261 TRANSFORM_PRECODER_ENABLED,
262 TRANSFORM_PRECODER_DISABLED
267 CCE_REG_MAPPINGTYPE_PR_INTERLEAVED = 1,
268 CCE_REG_MAPPINGTYPE_PR_NONINTERLEAVED
273 SLOTPERIODICITYANDOFFSET_PR_SL1 = 1,
274 SLOTPERIODICITYANDOFFSET_PR_SL2,
275 SLOTPERIODICITYANDOFFSET_PR_SL4,
276 SLOTPERIODICITYANDOFFSET_PR_SL5,
277 SLOTPERIODICITYANDOFFSET_PR_SL8,
278 SLOTPERIODICITYANDOFFSET_PR_SL10,
279 SLOTPERIODICITYANDOFFSET_PR_SL16,
280 SLOTPERIODICITYANDOFFSET_PR_SL20,
281 SLOTPERIODICITYANDOFFSET_PR_SL40,
282 SLOTPERIODICITYANDOFFSET_PR_SL80,
283 SLOTPERIODICITYANDOFFSET_PR_SL160,
284 SLOTPERIODICITYANDOFFSET_PR_SL320,
285 SLOTPERIODICITYANDOFFSET_PR_SL640,
286 SLOTPERIODICITYANDOFFSET_PR_SL1280,
287 SLOTPERIODICITYANDOFFSET_PR_SL2560
288 }MSlotPeriodAndOffset;
298 SEARCHSPACETYPE_PR_COMMON = 1,
299 SEARCHSPACETYPE_PR_UE_SPECIFIC
310 AGGREGATIONLEVEL_N0 = 0,
311 AGGREGATIONLEVEL_N1 = 1,
312 AGGREGATIONLEVEL_N2 = 2,
313 AGGREGATIONLEVEL_N3 = 3,
314 AGGREGATIONLEVEL_N4 = 4,
315 AGGREGATIONLEVEL_N5 = 5,
316 AGGREGATIONLEVEL_N6 = 6,
317 AGGREGATIONLEVEL_N8 = 7
322 ADDITIONALPOSITION_POS0,
323 ADDITIONALPOSITION_POS1,
324 ADDITIONALPOSITION_POS3
335 RESOURCEALLOCATION_TYPE0,
336 RESOURCEALLOCATION_TYPE1,
337 RESOURCEALLOCATION_DYNAMICSWITCH
348 CODEWORDS_SCHED_BY_DCI_N1,
349 CODEWORDS_SCHED_BY_DCI_N2
354 TYPE_STATIC_BUNDLING = 1,
355 TYPE_DYNAMIC_BUNDLING
368 SET1_SIZE_N2_WIDEBAND,
369 SET1_SIZE_N4_WIDEBAND
423 TRANSPORT_LAYER_FAIL,
430 UNSPECIFIED_RADIO_NW_CAUSE,
432 UNKNOWN_GNB_CU_UE_F1AP_ID,
433 ALREADY_ALLOCATED_GNB_CU_UE_F1AP_ID,
434 UNKNOWN_GNB_DU_UE_F1AP_ID,
435 ALREADY_ALLOCATED_GNB_DU_UE_F1AP_ID,
436 UNKNOWN_UE_F1AP_ID_PAIR,
437 INCONSISTENT_UE_F1AP_ID_PAIR,
438 INTERACTION_WITH_OTHER_PROCEDURE,
440 ACTION_REQUIRED_FOR_RADIO_REASONS,
441 RADIO_RESOURCES_UNAVAILABLE,
447 RESOURCES_UNAVAILABLE_FOR_SLICE
452 UNSPECIFIED_TRANSPORT_LAYER_CAUSE,
453 TRANSPORT_RESOURCE_UNAVAILABLE
458 TRANSFER_SYNTAX_ERROR,
459 ABSTRACT_SYNTAX_ERROR_REJECT,
460 ABSTRACT_SYNTAX_ERROR_IGNORE_AND_REJECT,
461 INCOMPATIBLE_MESSAGE_FOR_RECEIVER_STATE,
463 ABSTRAXCT_SYNTAX_ERROR_FALSELY_CONSTRUCTED_MSG,
464 UNSPECIFIED_PROTOCOL_CAUSE
469 CONTROL_PROCESSING_OVERLOAD,
471 PLANE_PROCESSING_RESOURCES,
473 INTERVENTION_BY_O_AND_M,
474 UNSPECIFIED_MISC_CAUSE
481 MCS_TABLE_QAM64_LOW_SE
484 typedef struct failureCause
489 RadioNwLyrCause radioNwCause;
490 TransLyrCause transportCause;
491 ProtCause protcolCause;
492 MiscFailCause miscCause;
496 typedef struct carrierCfg
499 uint32_t bw; /* DL/UL bandwidth */
500 uint32_t freq; /* Absolute frequency of DL/UL point A in KHz */
501 uint16_t k0[NUM_NUMEROLOGY]; /* K0 for DL/UL */
502 uint16_t gridSize[NUM_NUMEROLOGY]; /* DL/UL Grid size for each numerologies */
503 uint16_t numAnt; /* Number of Tx/Rx antennas */
506 typedef struct ssbCfg
508 uint32_t ssbPbchPwr; /* SSB block power */
509 BchPduOpt bchPayloadFlag; /* Options for generation of payload */
510 uint8_t scsCmn; /* subcarrier spacing for common */
511 uint16_t ssbOffsetPointA; /* SSB subcarrier offset from point A */
513 SSBPeriod ssbPeriod; /* SSB Periodicity in msec */
514 uint8_t ssbScOffset; /* Subcarrier Offset */
515 uint8_t mibPdu[3]; /* MIB payload */
516 uint32_t ssbMask[SSB_MASK_SIZE]; /* Bitmap for actually transmitted SSB. */
517 uint8_t beamId[NUM_SSB];
518 bool multCarrBand; /* Multiple carriers in a band */
519 bool multCellCarr; /* Multiple cells in single carrier */
522 typedef struct fdmInfo
524 uint16_t rootSeqIdx; /* Root sequence index */
525 uint8_t numRootSeq; /* Number of root sequences required for FD */
526 uint16_t k1; /* Frequency Offset for each FD */
527 uint8_t zeroCorrZoneCfg; /* Zero correlation zone cofig */
528 uint8_t numUnusedRootSeq; /* Number of unused root sequence */
529 uint8_t *unsuedRootSeq; /* Unused root sequence per FD */
532 typedef struct prachCfg
535 uint8_t prachCfgIdx; /* PRACH Cfg Index */
536 PrachSeqLen prachSeqLen; /* RACH Sequence length: Long/short */
537 uint8_t prachSubcSpacing; /* Subcarrier spacing of RACH */
538 RstSetCfg prachRstSetCfg; /* PRACH restricted set config */
539 uint16_t msg1FreqStart; /* Msg1-FrequencyStart */
540 uint8_t msg1Fdm; /* PRACH FDM (1,2,4,8) */
541 uint8_t rootSeqLen; /* Root sequence length */
542 PrachFdmInfo fdm[8]; /* FDM info */
543 uint8_t ssbPerRach; /* SSB per RACH occassion */
544 bool prachMultCarrBand; /* Multiple carriers in Band */
545 uint8_t prachRestrictedSet; /* Support for PRACH restricted set */
546 uint8_t raContResTmr; /* RA Contention Resoultion Timer */
547 uint8_t rsrpThreshSsb; /* RSRP Threshold SSB */
548 uint8_t raRspWindow; /* RA Response Window */
551 typedef struct sib1CellCfg
555 uint16_t sib1RepetitionPeriod;
556 uint8_t coresetZeroIndex; /* derived from 4 LSB of pdcchSib1 present in MIB */
557 uint8_t searchSpaceZeroIndex; /* derived from 4 MSB of pdcchSib1 present in MIB */
561 typedef struct bwpParams
566 uint8_t cyclicPrefix;
569 typedef struct candidatesInfo
578 typedef struct searchSpaceCfg
580 uint8_t searchSpaceId;
582 uint16_t monitoringSlot;
584 uint16_t monitoringSymbol;
585 CandidatesInfo candidate;
588 typedef struct pdcchConfigCommon
590 /* only one search space is configured during SIB1 */
591 SearchSpaceCfg commonSearchSpace;
592 uint8_t raSearchSpaceId;
595 typedef struct pdschConfigCommon
600 uint8_t lengthSymbol;
603 typedef struct pucchConfigCommon
605 uint8_t pucchResourceCommon;
606 uint8_t pucchGroupHopping;
609 typedef struct puschConfigCommon
611 /* PUSCH-TimeDomainResourceAllocation info */
615 uint8_t lengthSymbol;
618 typedef struct bwpDlConfig
621 PdcchConfigCommon pdcchCommon;
622 PdschConfigCommon pdschCommon;
625 typedef struct bwpUlConfig
628 // rach config common sent in PrachCfg
629 PucchConfigCommon pucchCommon;
630 PuschConfigCommon puschCommon;
633 typedef struct macCellCfg
635 uint16_t cellId; /* Cell Id */
636 uint8_t carrierId; /* Carrired Index */
637 uint16_t phyCellId; /* Physical cell id */
638 uint8_t numerology; /* Supported numerology */
639 DuplexMode dupType; /* Duplex type: TDD/FDD */
640 CarrierCfg dlCarrCfg; /* DL Carrier configuration */
641 CarrierCfg ulCarrCfg; /* UL Carrier configuration */
642 bool freqShft; /* Indicates presence of 7.5kHz frequency shift */
643 SsbCfg ssbCfg; /* SSB configuration */
644 PrachCfg prachCfg; /* PRACH Configuration */
646 TDDCfg tddCfg; /* TDD periodicity and slot configuration */
648 RSSIMeasUnit rssiUnit; /* RSSI measurement unit */
649 Sib1CellCfg sib1Cfg; /* SIB1 config */
650 BwpDlConfig initialDlBwp; /* Initial DL BWP */
651 BwpUlConfig initialUlBwp; /* Initial UL BWP */
652 uint8_t dmrsTypeAPos; /* DMRS Type A position */
655 typedef struct macCellCfgCfm
661 typedef struct ulCcchInd
665 uint16_t ulCcchMsgLen;
669 typedef struct dlCcchInd
673 DlCcchMsgType msgType;
674 uint16_t dlCcchMsgLen;
678 typedef struct bsrTmrCfg
680 uint16_t periodicTimer;
682 uint16_t srDelayTimer;
686 /* Info of Scheduling Request to Add/Modify */
687 typedef struct schedReqInfo
690 SrProhibitTimer srProhibitTmr;
691 SrTransMax srTransMax;
694 /* Scheduling Request Configuration */
695 typedef struct schedReqCfg
697 uint8_t addModListCount;
698 SchedReqInfo addModList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* List of Scheduling req to be added/modified */
699 uint8_t relListCount;
700 uint8_t relList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* list of scheduling request Id to be deleted */
703 typedef struct tagInfo
706 TimeAlignmentTimer timeAlignTimer;
709 typedef struct tagCfg
711 uint8_t addModListCount;
712 TagInfo addModList[MAC_NUM_TAGS]; /* List of Tag to Add/Modify */
713 uint8_t relListCount;
714 uint8_t relList[MAC_NUM_TAGS]; /* list of Tag Id to release */
717 typedef struct phrCfg
719 PhrPeriodicTimer periodicTimer;
720 PhrProhibitTimer prohibitTimer;
721 PhrTxPwrFactorChange txPowerFactor;
724 bool phrType2OtherCell;
725 PhrModeOtherCG phrOtherCG;
728 typedef struct macCellGrpCfg
730 SchedReqCfg schReqCfg;
733 bool phrCfgSetupPres; /* true/false: phrCfgSetup/phrCfgRelease */
737 typedef struct phyCellGrpCfg
739 PdschHarqAckCodebook pdschHarqAckCodebook;
743 /* Control resource set info */
744 typedef struct controlRsrcSet
746 uint8_t cRSetId; /* Control resource set id */
747 uint8_t freqDomainRsrc[FREQ_DOM_RSRC_SIZE]; /* Frequency domain resource */
749 REGMappingType cceRegMappingType;
750 PrecoderGranul precoderGranularity;
751 uint16_t dmrsScramblingId;
754 /* Search Space info */
755 typedef struct searchSpace
757 uint8_t searchSpaceId;
759 MSlotPeriodAndOffset mSlotPeriodicityAndOffset;
760 uint8_t mSymbolsWithinSlot[MONITORING_SYMB_WITHIN_SLOT_SIZE];
761 AggrLevel numCandidatesAggLevel1; /* Number of candidates for aggregation level 1 */
762 AggrLevel numCandidatesAggLevel2; /* Number of candidates for aggregation level 2 */
763 AggrLevel numCandidatesAggLevel4; /* Number of candidates for aggregation level 4 */
764 AggrLevel numCandidatesAggLevel8; /* Number of candidates for aggregation level 8 */
765 AggrLevel numCandidatesAggLevel16; /* Number of candidates for aggregation level 16 */
766 SearchSpaceType searchSpaceType;
767 uint8_t ueSpecificDciFormat;
770 /* PDCCH cofniguration */
771 typedef struct pdcchConfig
773 uint8_t numCRsetToAddMod;
774 ControlRsrcSet cRSetToAddModList[MAX_NUM_CRSET]; /* List of control resource set to add/modify */
775 uint8_t numCRsetToRel;
776 uint8_t cRSetToRelList[MAX_NUM_CRSET]; /* List of control resource set to release */
777 uint8_t numSearchSpcToAddMod;
778 SearchSpace searchSpcToAddModList[MAX_NUM_SEARCH_SPC]; /* List of search space to add/modify */
779 uint8_t numSearchSpcToRel;
780 uint8_t searchSpcToRelList[MAX_NUM_SEARCH_SPC]; /* List of search space to release */
783 /* PDSCH time domain resource allocation */
784 typedef struct pdschTimeDomRsrcAlloc
786 CommonMappingType mappingType;
788 uint8_t symbolLength;
789 uint8_t startSymbolAndLength;
790 }PdschTimeDomRsrcAlloc;
793 typedef struct pdschBundling
795 struct staticBundling
797 BundlingSizeSet2 size;
799 struct dynamicBundling
801 BundlingSizeSet1 sizeSet1;
802 BundlingSizeSet2 sizeSet2;
806 /* DMRS downlink configuration */
807 typedef struct dmrsDlCfg
809 AddPosType addPos; /* DMRS additional position */
812 /* PDSCH Configuration */
813 typedef struct pdschConfig
815 DmrsDlCfg dmrsDlCfgForPdschMapTypeA;
816 ResAllocType resourceAllocType;
817 uint8_t numTimeDomRsrcAlloc;
818 PdschTimeDomRsrcAlloc timeDomRsrcAllociList[MAX_NUM_DL_ALLOC]; /* PDSCH time domain DL resource allocation list */
820 CodeWordsSchedDci numCodeWordsSchByDci; /* Number of code words scheduled by DCI */
821 BundlingType bundlingType;
822 PdschBundling bundlingInfo;
825 /* Initial Downlink BWP */
826 typedef struct initialDlBwp
829 PdcchConfig pdcchCfg;
831 PdschConfig pdschCfg;
834 /* BWP Downlink common */
835 typedef struct bwpDlCommon
839 /* Downlink BWP information */
840 typedef struct dlBwpInfo
845 /* PDCCH Serving Cell configuration */
846 typedef struct pdschServCellCfg
848 uint8_t *maxMimoLayers;
849 NumHarqProcForPdsch numHarqProcForPdsch;
850 MaxCodeBlkGrpPerTB *maxCodeBlkGrpPerTb;
851 bool *codeBlkGrpFlushInd;
852 PdschXOverhead *xOverhead;
855 /* PUCCH Configuration */
857 typedef struct pucchResrcSetInfo
860 uint8_t resrcListCount;
861 uint8_t resrcList[MAX_NUM_PUCCH_PER_RESRC_SET];
862 uint8_t maxPayLoadSize;
865 typedef struct pucchResrcSetCfg
867 uint8_t resrcSetToAddModListCount;
868 PucchResrcSetInfo resrcSetToAddModList[MAX_NUM_PUCCH_RESRC_SET];
869 uint8_t resrcSetToRelListCount;
870 uint8_t resrcSetToRelList[MAX_NUM_PUCCH_RESRC];
873 typedef struct pucchFormat0
875 uint8_t initialCyclicShift;
877 uint8_t startSymbolIdx;
880 typedef struct pucchFormat1
882 uint8_t initialCyclicShift;
884 uint8_t startSymbolIdx;
888 typedef struct pucchFormat2_3
892 uint8_t startSymbolIdx;
895 typedef struct pucchFormat4
900 uint8_t startSymbolIdx;
903 typedef struct pucchResrcInfo
907 uint8_t intraFreqHop;
908 uint16_t secondPrbHop;
912 PucchFormat0 *format0;
913 PucchFormat1 *format1;
914 PucchFormat2_3 *format2;
915 PucchFormat2_3 *format3;
916 PucchFormat4 *format4;
920 typedef struct pucchResrcCfg
922 uint8_t resrcToAddModListCount;
923 PucchResrcInfo resrcToAddModList[MAX_NUM_PUCCH_RESRC];
924 uint8_t resrcToRelListCount;
925 uint8_t resrcToRelList[MAX_NUM_PUCCH_RESRC];
928 typedef struct pucchFormatCfg
930 uint8_t interSlotFreqHop;
938 typedef struct schedReqResrcInfo
947 typedef struct pucchSchedReqCfg
949 uint8_t schedAddModListCount;
950 SchedReqResrcInfo schedAddModList[MAX_NUM_SR_CFG_PER_CELL_GRP];
951 uint8_t schedRelListCount;
952 uint8_t schedRelList[MAX_NUM_SR_CFG_PER_CELL_GRP];
955 typedef struct spatialRelationInfo
957 uint8_t spatialRelationId;
959 uint8_t pathLossRefRSId;
961 uint8_t closeLoopIdx;
962 }SpatialRelationInfo;
964 typedef struct pucchSpatialCfg
966 uint8_t spatialAddModListCount;
967 SpatialRelationInfo spatialAddModList[MAX_NUM_SPATIAL_RELATIONS];
968 uint8_t spatialRelListCount;
969 uint8_t spatialRelList[MAX_NUM_SPATIAL_RELATIONS];
972 typedef struct p0PucchCfg
978 typedef struct pathLossRefRSCfg
980 uint8_t pathLossRefRSId;
983 typedef struct pucchMultiCsiCfg
985 uint8_t multiCsiResrcListCount;
986 uint8_t multiCsiResrcList[MAX_NUM_PUCCH_RESRC-1];
989 typedef struct pucchDlDataToUlAck
991 uint8_t dlDataToUlAckListCount;
992 uint8_t dlDataToUlAckList[MAX_NUM_DL_DATA_TO_UL_ACK];
995 typedef struct pucchPowerControl
1003 P0PucchCfg p0Set[MAX_NUM_PUCCH_P0_PER_SET];
1004 uint8_t pathLossRefRSListCount;
1005 PathLossRefRSCfg pathLossRefRSList[MAX_NUM_PATH_LOSS_REF_RS];
1008 typedef struct pucchCfg
1010 PucchResrcSetCfg *resrcSet;
1011 PucchResrcCfg *resrc;
1012 PucchFormatCfg *format1;
1013 PucchFormatCfg *format2;
1014 PucchFormatCfg *format3;
1015 PucchFormatCfg *format4;
1016 PucchSchedReqCfg *schedReq;
1017 PucchMultiCsiCfg *multiCsiCfg;
1018 PucchSpatialCfg *spatialInfo;
1019 PucchDlDataToUlAck *dlDataToUlAck;
1020 PucchPowerControl *powerControl;
1023 /* Transform precoding disabled */
1024 typedef struct transPrecodDisabled
1026 uint16_t scramblingId0;
1027 }TransPrecodDisabled;
1029 /* DMRS Uplink configuration */
1030 typedef struct dmrsUlCfg
1032 AddPosType addPos; /* DMRS additional position */
1033 TransPrecodDisabled transPrecodDisabled; /* Transform precoding disabled */
1036 /* PUSCH Time Domain Resource Allocation */
1037 typedef struct puschTimeDomRsrcAlloc
1040 CommonMappingType mappingType;
1041 uint8_t startSymbol;
1042 uint8_t symbolLength;
1043 uint8_t startSymbolAndLength;
1044 }PuschTimeDomRsrcAlloc;
1046 /* PUSCH Configuration */
1047 typedef struct puschCfg
1049 uint8_t dataScramblingId;
1050 DmrsUlCfg dmrsUlCfgForPuschMapTypeA;
1051 ResAllocType resourceAllocType;
1052 uint8_t numTimeDomRsrcAlloc;
1053 PuschTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_UL_ALLOC]; /* PUSCH time domain UL resource allocation list */
1054 TransformPrecoder transformPrecoder;
1057 /* Initial Uplink BWP */
1058 typedef struct initialUlBwp
1066 /* Uplink BWP information */
1067 typedef struct ulBwpInfo
1072 /* Serving cell configuration */
1073 typedef struct servCellCfgInfo
1075 InitialDlBwp initDlBwp;
1076 uint8_t numDlBwpToAdd;
1077 DlBwpInfo DlBwpToAddList[MAX_NUM_BWP];
1078 uint8_t firstActvDlBwpId;
1079 uint8_t defaultDlBwpId;
1080 uint8_t *bwpInactivityTmr;
1081 PdschServCellCfg pdschServCellCfg;
1082 InitialUlBwp initUlBwp;
1083 uint8_t numUlBwpToAdd;
1084 UlBwpInfo UlBwpToAddList[MAX_NUM_BWP];
1085 uint8_t firstActvUlBwpId;
1088 /* Special cell configuration */
1089 typedef struct spCellCfg
1091 uint8_t servCellIdx;
1092 ServCellCfgInfo servCellCfg;
1095 typedef struct ambrCfg
1097 uint32_t ulBr; /* UL Bit rate */
1100 /* Single Network Slice Selection assistance Info */
1101 typedef struct snssai
1103 uint8_t sst; /* Slice Type */
1104 uint8_t sd[SD_SIZE]; /* Slice Differentiator */
1107 typedef struct nonDynFiveQi
1112 uint16_t maxDataBurstVol;
1115 typedef struct dynFiveQi
1118 uint16_t packetDelayBudget;
1119 uint8_t packetErrRateScalar;
1120 uint8_t packetErrRateExp;
1122 uint8_t delayCritical;
1124 uint16_t maxDataBurstVol;
1127 typedef struct ngRanAllocAndRetPri
1129 uint8_t priorityLevel;
1130 uint8_t preEmptionCap;
1131 uint8_t preEmptionVul;
1132 }NgRanAllocAndRetPri;
1134 typedef struct grbQosInfo
1136 uint32_t maxFlowBitRateDl;
1137 uint32_t maxFlowBitRateUl;
1138 uint32_t guarFlowBitRateDl;
1139 uint32_t guarFlowBitRateUl;
1142 typedef struct drbQos
1144 QosType fiveQiType; /* Dynamic or non-dynamic */
1147 NonDynFiveQi nonDyn5Qi;
1150 NgRanAllocAndRetPri ngRanRetPri;
1151 GrbQosInfo grbQosInfo;
1152 uint16_t pduSessionId;
1153 uint32_t ulPduSessAggMaxBitRate;
1156 typedef struct ulLcCfg
1161 PBitRate pbr; // prioritisedBitRate
1162 BucketSizeDur bsd; // bucketSizeDuration
1165 typedef struct duLcCfg
1167 LcPriority lcp; // logical Channel Prioritization
1170 typedef struct lcCfg
1172 ConfigType configType;
1181 typedef struct modulationInfo
1183 uint8_t modOrder; /* Modulation order */
1184 uint8_t mcsIndex; /* MCS Index */
1185 McsTable mcsTable; /* MCS table */
1188 typedef struct macUeCfg
1193 bool macCellGrpCfgPres;
1194 MacCellGrpCfg macCellGrpCfg;
1195 bool phyCellGrpCfgPres;
1196 PhyCellGrpCfg phyCellGrpCfg;
1198 SpCellCfg spCellCfg;
1200 ModulationInfo dlModInfo; /* DL modulation info */
1201 ModulationInfo ulModInfo; /* UL modulation info */
1203 LcCfg lcCfgList[MAX_NUM_LC];
1204 UeCfgState macUeCfgState; /* InActive / Completed */
1207 typedef struct nrcgi
1213 typedef struct srbFailInfo
1219 typedef struct drbFailInfo
1225 typedef struct sCellFailInfo
1231 typedef struct ueCfgRsp
1236 uint8_t numSRBFailed; /* valid values : 0 to MAX_NUM_SRB */
1237 SRBFailInfo *failedSRBlisti;
1238 uint8_t numDRBFailed; /* valid values : 0 to MAX_NUM_DRB */
1239 DRBFailInfo *failedDRBlist;
1240 uint8_t numSCellFailed; /* valid values : 0 to MAX_NUM_SCELL */
1241 SCellFailInfo *failedSCellList;
1244 typedef struct ueDelete
1251 typedef struct ueDeleteRsp
1255 UeDeleteStatus result;
1258 /* Functions for slot Ind from MAC to DU APP*/
1259 typedef uint8_t (*DuMacCellUpInd) ARGS((
1261 OduCellId *cellId ));
1263 /* Functions for stop Ind from MAC to DU APP*/
1264 typedef uint8_t (*DuMacStopInd) ARGS((
1266 OduCellId *cellId ));
1268 /* Functions for mac cell start req */
1269 typedef uint8_t (*DuMacCellStart) ARGS((
1271 OduCellId *cellId));
1273 /* Functions for mac cell stop request */
1274 typedef uint8_t (*DuMacCellStop) ARGS((
1276 OduCellId *cellId ));
1278 /* Function pointers for packing macCellCfg Request and Confirm */
1279 typedef uint8_t (*packMacCellCfgReq) ARGS((
1281 MacCellCfg *macCellCfg ));
1283 typedef uint8_t (*packMacCellCfgConfirm) ARGS((
1285 MacCellCfgCfm *macCellCfgCfm ));
1287 typedef uint8_t (*DuMacCellCfgReq) ARGS((
1289 MacCellCfg *macCellCfg));
1291 typedef uint8_t (*DuMacCellCfgCfm) ARGS((
1293 MacCellCfgCfm *macCellCfgCfm ));
1295 /* Functions for UL CCCH Ind from MAC to DU APP*/
1296 typedef uint8_t (*DuMacUlCcchInd) ARGS((
1298 UlCcchIndInfo *ulCcchIndInfo ));
1300 /* Functions for DL CCCH Ind from DU APP to MAC*/
1301 typedef uint8_t (*DuMacDlCcchInd) ARGS((
1303 DlCcchIndInfo *dlCcchIndInfo ));
1305 /* UE create Request from DU APP to MAC*/
1306 typedef uint8_t (*DuMacUeCreateReq) ARGS((
1310 /* UE create Response from MAC to DU APP */
1311 typedef uint8_t (*MacDuUeCfgRspFunc) ARGS((
1313 MacUeCfgRsp *cfgRsp));
1315 /* UE Reconfig Request from DU APP to MAC*/
1316 typedef uint8_t (*DuMacUeReconfigReq) ARGS((
1320 typedef uint8_t (*DuMacUeDeleteReq) ARGS((
1322 MacUeDelete *ueDel ));
1324 typedef uint8_t (*MacDuUeDeleteRspFunc) ARGS((
1326 MacUeDeleteRsp *deleteRsp));
1329 uint8_t packMacCellUpInd(Pst *pst, OduCellId *cellId);
1330 uint8_t unpackMacCellUpInd(DuMacCellUpInd func, Pst *pst, Buffer *mBuf);
1331 uint8_t duHandleCellUpInd(Pst *pst, OduCellId *cellId);
1332 uint8_t packMacCellStart(Pst *pst, OduCellId *cellId);
1333 uint8_t unpackMacCellStart(DuMacCellStart func, Pst *pst, Buffer *mBuf);
1334 uint8_t MacProcCellStart(Pst *pst, OduCellId *cellId);
1335 uint8_t packMacCellStop(Pst *pst, OduCellId *cellId);
1336 uint8_t unpackMacCellStop(DuMacCellStop func, Pst *pst, Buffer *mBuf);
1337 uint8_t MacProcCellStop(Pst *pst, OduCellId *cellId);
1338 uint8_t packMacCellCfg(Pst *pst, MacCellCfg *macCellCfg);
1339 uint8_t unpackDuMacCellCfg(DuMacCellCfgReq func, Pst *pst, Buffer *mBuf);
1340 uint8_t MacProcCellCfgReq(Pst *pst, MacCellCfg *macCellCfg);
1341 uint8_t packMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm);
1342 uint8_t unpackMacCellCfgCfm(DuMacCellCfgCfm func, Pst *pst, Buffer *mBuf);
1343 uint8_t duHandleMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm);
1344 uint8_t packMacStopInd(Pst *pst, OduCellId *cellId);
1345 uint8_t unpackMacStopInd(DuMacStopInd func, Pst *pst, Buffer *mBuf);
1346 uint8_t duHandleStopInd(Pst *pst, OduCellId *cellId);
1347 uint8_t packMacUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo);
1348 uint8_t unpackMacUlCcchInd(DuMacUlCcchInd func, Pst *pst, Buffer *mBuf);
1349 uint8_t duHandleUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo);
1350 uint8_t packMacDlCcchInd(Pst *pst, DlCcchIndInfo *dlCcchIndInfo);
1351 uint8_t unpackMacDlCcchInd(DuMacDlCcchInd func, Pst *pst, Buffer *mBuf);
1352 uint8_t MacProcDlCcchInd(Pst *pst, DlCcchIndInfo *dlCcchIndInfo);
1353 uint8_t packDuMacUeCreateReq(Pst *pst, MacUeCfg *ueCfg);
1354 uint8_t unpackMacUeCreateReq(DuMacUeCreateReq func, Pst *pst, Buffer *mBuf);
1355 uint8_t MacProcUeCreateReq(Pst *pst, MacUeCfg *ueCfg);
1356 uint8_t sendStopIndMacToDuApp(uint16_t cellId);
1357 uint8_t packDuMacUeCfgRsp(Pst *pst, MacUeCfgRsp *cfgRsp);
1358 uint8_t unpackDuMacUeCfgRsp(MacDuUeCfgRspFunc func, Pst *pst, Buffer *mBuf);
1359 uint8_t DuProcMacUeCfgRsp(Pst *pst, MacUeCfgRsp *cfgRsp);
1360 uint8_t packDuMacUeReconfigReq(Pst *pst, MacUeCfg *ueCfg);
1361 uint8_t unpackMacUeReconfigReq(DuMacUeReconfigReq func, Pst *pst, Buffer *mBuf);
1362 uint8_t MacProcUeReconfigReq(Pst *pst, MacUeCfg *ueCfg);
1363 uint8_t packDuMacUeDeleteReq(Pst *pst, MacUeDelete *ueDelete);
1364 uint8_t MacProcUeDeleteReq(Pst *pst, MacUeDelete *ueDelete);
1365 uint8_t unpackMacUeDeleteReq(DuMacUeDeleteReq func, Pst *pst, Buffer *mBuf);
1366 uint8_t packDuMacUeDeleteRsp(Pst *pst, MacUeDeleteRsp *deleteRsp);
1367 uint8_t DuProcMacUeDeleteRsp(Pst *pst, MacUeDeleteRsp *deleteRsp);
1368 uint8_t unpackDuMacUeDeleteRsp(MacDuUeDeleteRspFunc func, Pst *pst, Buffer *mBuf);
1372 /**********************************************************************
1374 **********************************************************************/