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 */
24 #define MAXIMUM_TDD_PERIODICITY 10
25 #define MAX_SYMB_PER_SLOT 14
27 #define NUM_SSB 1 /* max value is 64 */
28 #define SSB_MASK_SIZE 1 /* SSB mask size is 32bit for sub6 */
29 #define SIB1_NEW_TX_PERIOD 160
30 #define SIB1_REPETITION_PERIOD 20
31 #define CORESET_0_INDEX 0
32 #define CORESET_1_INDEX 1
33 #define CORESET_2_INDEX 2
34 #define CORESET_3_INDEX 3
35 #define CORESET_4_INDEX 4
36 #define SEARCHSPACE_0_INDEX 0
37 #define SEARCHSPACE_1_INDEX 1
38 #define SEARCHSPACE_2_INDEX 2
39 #define SEARCHSPACE_3_INDEX 3
40 #define SEARCHSPACE_4_INDEX 4
41 #define SS_MONITORING_SLOT_SL1 0 /* all slots */
42 #define SS_MONITORING_SYMBOL 0x2000; /* symbol-0, set 14th bit */
45 /* Macro for Ue Context */
46 #define MAX_NUM_SR_CFG_PER_CELL_GRP 8 /* Max number of scheduling request config per cell group */
47 #define MAC_NUM_TAGS 4 /* Max number of timing advance groups */
48 #define MAX_NUM_BWP 4 /* Max number of BWP per serving cell */
49 #define MAX_NUM_CRSET 3 /* Max number of control resource set in add/modify/release list */
50 #define MAX_NUM_SEARCH_SPC 10 /* Max number of search space in add/modify/release list */
51 #define MONITORING_SYMB_WITHIN_SLOT_SIZE 2 /* i.e. 2 bytes because size of monitoring symbols within slot is 14 bits */
52 #define MAX_NUM_DL_ALLOC 16 /* Max number of pdsch time domain downlink allocation */
53 #define MAX_NUM_UL_ALLOC 16 /* Max number of pusch time domain uplink allocation */
54 #define SD_SIZE 3 /* Max size of Slice Differentiator in S-NSSAI */
57 #define MAX_NUM_DRB 64
58 #define MAX_NUM_SCELL 32
60 /* PUCCH Configuration Macro */
61 #define MAX_NUM_PUCCH_RESRC 128
62 #define MAX_NUM_PUCCH_RESRC_SET 4
63 #define MAX_NUM_PUCCH_PER_RESRC_SET 32
64 #define MAX_NUM_SPATIAL_RELATIONS 8
65 #define MAX_NUM_PUCCH_P0_PER_SET 8
66 #define MAX_NUM_PATH_LOSS_REF_RS 4
67 #define MAX_NUM_DL_DATA_TO_UL_ACK 15
70 #define EVENT_MAC_CELL_CONFIG_REQ 200
71 #define EVENT_MAC_CELL_CONFIG_CFM 201
72 #define EVENT_MAC_CELL_START 202
73 #define EVENT_MAC_CELL_STOP 203
74 #define EVENT_MAC_CELL_UP_IND 204
75 #define EVENT_MAC_STOP_IND 205
76 #define EVENT_MAC_UL_CCCH_IND 206
77 #define EVENT_MAC_DL_CCCH_IND 207
78 #define EVENT_MAC_UE_CREATE_REQ 208
79 #define EVENT_MAC_UE_CREATE_RSP 209
80 #define EVENT_MAC_UE_RECONFIG_REQ 210
81 #define EVENT_MAC_UE_RECONFIG_RSP 211
83 #define BSR_PERIODIC_TIMER_SF_10 10
84 #define BSR_RETX_TIMER_SF_320 320
85 #define BSR_SR_DELAY_TMR_2560 2560
101 MAC_GEN_FULL_PBCH_PAYLD, /* MAC generated the full PBCH Payload */
102 PHY_GEN_TIMING_PBCH_BIT, /* PHY generates the timing PBCH bits */
103 PHY_GEN_FULL_PBCH_PAYLD /* PHY generates full PBCH payload */
115 RESTRICTED_SET_TYPE_A,
116 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
499 typedef struct failureCause
504 RadioNwLyrCause radioNwCause;
505 TransLyrCause transportCause;
506 ProtCause protcolCause;
507 MiscFailCause miscCause;
511 typedef struct carrierCfg
514 uint32_t bw; /* DL/UL bandwidth */
515 uint32_t freq; /* Absolute frequency of DL/UL point A in KHz */
516 uint16_t k0[NUM_NUMEROLOGY]; /* K0 for DL/UL */
517 uint16_t gridSize[NUM_NUMEROLOGY]; /* DL/UL Grid size for each numerologies */
518 uint16_t numAnt; /* Number of Tx/Rx antennas */
521 typedef struct ssbCfg
523 uint32_t ssbPbchPwr; /* SSB block power */
524 BchPduOpt bchPayloadFlag; /* Options for generation of payload */
525 uint8_t scsCmn; /* subcarrier spacing for common */
526 uint16_t ssbOffsetPointA; /* SSB subcarrier offset from point A */
528 SSBPeriod ssbPeriod; /* SSB Periodicity in msec */
529 uint8_t ssbScOffset; /* Subcarrier Offset */
530 uint8_t mibPdu[3]; /* MIB payload */
531 uint32_t ssbMask[SSB_MASK_SIZE]; /* Bitmap for actually transmitted SSB. */
532 uint8_t beamId[NUM_SSB];
533 bool multCarrBand; /* Multiple carriers in a band */
534 bool multCellCarr; /* Multiple cells in single carrier */
537 typedef struct fdmInfo
539 uint16_t rootSeqIdx; /* Root sequence index */
540 uint8_t numRootSeq; /* Number of root sequences required for FD */
541 uint16_t k1; /* Frequency Offset for each FD */
542 uint8_t zeroCorrZoneCfg; /* Zero correlation zone cofig */
543 uint8_t numUnusedRootSeq; /* Number of unused root sequence */
544 uint8_t *unsuedRootSeq; /* Unused root sequence per FD */
547 typedef struct prachCfg
550 uint8_t prachCfgIdx; /* PRACH Cfg Index */
551 PrachSeqLen prachSeqLen; /* RACH Sequence length: Long/short */
552 uint8_t prachSubcSpacing; /* Subcarrier spacing of RACH */
553 RstSetCfg prachRstSetCfg; /* PRACH restricted set config */
554 uint16_t msg1FreqStart; /* Msg1-FrequencyStart */
555 uint8_t msg1Fdm; /* PRACH FDM (1,2,4,8) */
556 uint8_t rootSeqLen; /* Root sequence length */
557 PrachFdmInfo fdm[8]; /* FDM info */
558 uint8_t ssbPerRach; /* SSB per RACH occassion */
559 bool prachMultCarrBand; /* Multiple carriers in Band */
560 uint8_t prachRestrictedSet; /* Support for PRACH restricted set */
561 uint8_t raContResTmr; /* RA Contention Resoultion Timer */
562 uint8_t rsrpThreshSsb; /* RSRP Threshold SSB */
563 uint8_t raRspWindow; /* RA Response Window */
566 typedef struct tddCfg
569 DlUlTxPeriodicity tddPeriod; /* DL UL Transmission periodicity */
570 SlotConfig slotCfg[MAXIMUM_TDD_PERIODICITY][MAX_SYMB_PER_SLOT];
573 typedef struct sib1CellCfg
577 uint16_t sib1NewTxPeriod;
578 uint16_t sib1RepetitionPeriod;
579 uint8_t coresetZeroIndex; /* derived from 4 LSB of pdcchSib1 present in MIB */
580 uint8_t searchSpaceZeroIndex; /* derived from 4 MSB of pdcchSib1 present in MIB */
584 typedef struct bwpParams
589 uint8_t cyclicPrefix;
592 typedef struct candidatesInfo
601 typedef struct searchSpaceCfg
603 uint8_t searchSpaceId;
605 uint16_t monitoringSlot;
607 uint16_t monitoringSymbol;
608 CandidatesInfo candidate;
611 typedef struct pdcchConfigCommon
613 /* only one search space is configured during SIB1 */
614 SearchSpaceCfg commonSearchSpace;
615 uint8_t raSearchSpaceId;
618 typedef struct pdschConfigCommon
623 uint8_t lengthSymbol;
626 typedef struct pucchConfigCommon
628 uint8_t pucchResourceCommon;
629 uint8_t pucchGroupHopping;
632 typedef struct puschConfigCommon
634 /* PUSCH-TimeDomainResourceAllocation info */
638 uint8_t lengthSymbol;
641 typedef struct bwpDlConfig
644 PdcchConfigCommon pdcchCommon;
645 PdschConfigCommon pdschCommon;
648 typedef struct bwpUlConfig
651 // rach config common sent in PrachCfg
652 PucchConfigCommon pucchCommon;
653 PuschConfigCommon puschCommon;
656 typedef struct macCellCfg
658 uint16_t cellId; /* Cell Id */
659 uint8_t carrierId; /* Carrired Index */
660 uint16_t phyCellId; /* Physical cell id */
661 uint8_t numerology; /* Supported numerology */
662 DuplexMode dupType; /* Duplex type: TDD/FDD */
663 CarrierCfg dlCarrCfg; /* DL Carrier configuration */
664 CarrierCfg ulCarrCfg; /* UL Carrier configuration */
665 bool freqShft; /* Indicates presence of 7.5kHz frequency shift */
666 SsbCfg ssbCfg; /* SSB configuration */
667 PrachCfg prachCfg; /* PRACH Configuration */
668 TDDCfg tddCfg; /* TDD periodicity and slot configuration */
669 RSSIMeasUnit rssiUnit; /* RSSI measurement unit */
670 Sib1CellCfg sib1Cfg; /* SIB1 config */
671 BwpDlConfig initialDlBwp; /* Initial DL BWP */
672 BwpUlConfig initialUlBwp; /* Initial UL BWP */
673 uint8_t dmrsTypeAPos; /* DMRS Type A position */
676 typedef struct macCellCfgCfm
682 typedef struct ulCcchInd
686 uint16_t ulCcchMsgLen;
690 typedef struct dlCcchInd
694 DlCcchMsgType msgType;
695 uint16_t dlCcchMsgLen;
699 typedef struct bsrTmrCfg
701 uint16_t periodicTimer;
703 uint16_t srDelayTimer;
707 /* Info of Scheduling Request to Add/Modify */
708 typedef struct schedReqInfo
711 SrProhibitTimer srProhibitTmr;
712 SrTransMax srTransMax;
715 /* Scheduling Request Configuration */
716 typedef struct schedReqCfg
718 uint8_t addModListCount;
719 SchedReqInfo addModList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* List of Scheduling req to be added/modified */
720 uint8_t relListCount;
721 uint8_t relList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* list of scheduling request Id to be deleted */
724 typedef struct tagInfo
727 TimeAlignmentTimer timeAlignTimer;
730 typedef struct tagCfg
732 uint8_t addModListCount;
733 TagInfo addModList[MAC_NUM_TAGS]; /* List of Tag to Add/Modify */
734 uint8_t relListCount;
735 uint8_t relList[MAC_NUM_TAGS]; /* list of Tag Id to release */
738 typedef struct phrCfg
740 PhrPeriodicTimer periodicTimer;
741 PhrProhibitTimer prohibitTimer;
742 PhrTxPwrFactorChange txPowerFactor;
745 bool phrType2OtherCell;
746 PhrModeOtherCG phrOtherCG;
749 typedef struct macCellGrpCfg
751 SchedReqCfg schReqCfg;
754 bool phrCfgSetupPres; /* true/false: phrCfgSetup/phrCfgRelease */
758 typedef struct phyCellGrpCfg
760 PdschHarqAckCodebook pdschHarqAckCodebook;
764 /* Control resource set info */
765 typedef struct controlRsrcSet
767 uint8_t cRSetId; /* Control resource set id */
768 uint8_t freqDomainRsrc[FREQ_DOM_RSRC_SIZE]; /* Frequency domain resource */
770 REGMappingType cceRegMappingType;
771 PrecoderGranul precoderGranularity;
772 uint16_t dmrsScramblingId;
775 /* Search Space info */
776 typedef struct searchSpace
778 uint8_t searchSpaceId;
780 MSlotPeriodAndOffset mSlotPeriodicityAndOffset;
781 uint8_t mSymbolsWithinSlot[MONITORING_SYMB_WITHIN_SLOT_SIZE];
782 AggrLevel numCandidatesAggLevel1; /* Number of candidates for aggregation level 1 */
783 AggrLevel numCandidatesAggLevel2; /* Number of candidates for aggregation level 2 */
784 AggrLevel numCandidatesAggLevel4; /* Number of candidates for aggregation level 4 */
785 AggrLevel numCandidatesAggLevel8; /* Number of candidates for aggregation level 8 */
786 AggrLevel numCandidatesAggLevel16; /* Number of candidates for aggregation level 16 */
787 SearchSpaceType searchSpaceType;
788 uint8_t ueSpecificDciFormat;
791 /* PDCCH cofniguration */
792 typedef struct pdcchConfig
794 uint8_t numCRsetToAddMod;
795 ControlRsrcSet cRSetToAddModList[MAX_NUM_CRSET]; /* List of control resource set to add/modify */
796 uint8_t numCRsetToRel;
797 uint8_t cRSetToRelList[MAX_NUM_CRSET]; /* List of control resource set to release */
798 uint8_t numSearchSpcToAddMod;
799 SearchSpace searchSpcToAddModList[MAX_NUM_SEARCH_SPC]; /* List of search space to add/modify */
800 uint8_t numSearchSpcToRel;
801 uint8_t searchSpcToRelList[MAX_NUM_SEARCH_SPC]; /* List of search space to release */
804 /* PDSCH time domain resource allocation */
805 typedef struct pdschTimeDomRsrcAlloc
807 CommonMappingType mappingType;
809 uint8_t symbolLength;
810 uint8_t startSymbolAndLength;
811 }PdschTimeDomRsrcAlloc;
814 typedef struct pdschBundling
816 struct staticBundling
818 BundlingSizeSet2 size;
820 struct dynamicBundling
822 BundlingSizeSet1 sizeSet1;
823 BundlingSizeSet2 sizeSet2;
827 /* DMRS downlink configuration */
828 typedef struct dmrsDlCfg
830 AddPosType addPos; /* DMRS additional position */
833 /* PDSCH Configuration */
834 typedef struct pdschConfig
836 DmrsDlCfg dmrsDlCfgForPdschMapTypeA;
837 ResAllocType resourceAllocType;
838 uint8_t numTimeDomRsrcAlloc;
839 PdschTimeDomRsrcAlloc timeDomRsrcAllociList[MAX_NUM_DL_ALLOC]; /* PDSCH time domain DL resource allocation list */
841 CodeWordsSchedDci numCodeWordsSchByDci; /* Number of code words scheduled by DCI */
842 BundlingType bundlingType;
843 PdschBundling bundlingInfo;
846 /* Initial Downlink BWP */
847 typedef struct initialDlBwp
850 PdcchConfig pdcchCfg;
852 PdschConfig pdschCfg;
855 /* BWP Downlink common */
856 typedef struct bwpDlCommon
860 /* Downlink BWP information */
861 typedef struct dlBwpInfo
866 /* PDCCH Serving Cell configuration */
867 typedef struct pdschServCellCfg
869 uint8_t *maxMimoLayers;
870 NumHarqProcForPdsch numHarqProcForPdsch;
871 MaxCodeBlkGrpPerTB *maxCodeBlkGrpPerTb;
872 bool *codeBlkGrpFlushInd;
873 PdschXOverhead *xOverhead;
876 /* PUCCH Configuration */
878 typedef struct pucchResrcSetInfo
881 uint8_t resrcListCount;
882 uint8_t resrcList[MAX_NUM_PUCCH_PER_RESRC_SET];
883 uint8_t maxPayLoadSize;
886 typedef struct pucchResrcSetCfg
888 uint8_t resrcSetToAddModListCount;
889 PucchResrcSetInfo resrcSetToAddModList[MAX_NUM_PUCCH_RESRC_SET];
890 uint8_t resrcSetToRelListCount;
891 uint8_t resrcSetToRelList[MAX_NUM_PUCCH_RESRC];
894 typedef struct pucchFormat0
896 uint8_t initialCyclicShift;
898 uint8_t startSymbolIdx;
901 typedef struct pucchFormat1
903 uint8_t initialCyclicShift;
905 uint8_t startSymbolIdx;
909 typedef struct pucchFormat2_3
913 uint8_t startSymbolIdx;
916 typedef struct pucchFormat4
921 uint8_t startSymbolIdx;
924 typedef struct pucchResrcInfo
928 uint8_t intraFreqHop;
929 uint16_t secondPrbHop;
933 PucchFormat0 *format0;
934 PucchFormat1 *format1;
935 PucchFormat2_3 *format2;
936 PucchFormat2_3 *format3;
937 PucchFormat4 *format4;
941 typedef struct pucchResrcCfg
943 uint8_t resrcToAddModListCount;
944 PucchResrcInfo resrcToAddModList[MAX_NUM_PUCCH_RESRC];
945 uint8_t resrcToRelListCount;
946 uint8_t resrcToRelList[MAX_NUM_PUCCH_RESRC];
949 typedef struct pucchFormatCfg
951 uint8_t interSlotFreqHop;
959 typedef struct schedReqResrcInfo
968 typedef struct pucchSchedReqCfg
970 uint8_t schedAddModListCount;
971 SchedReqResrcInfo schedAddModList[MAX_NUM_SR_CFG_PER_CELL_GRP];
972 uint8_t schedRelListCount;
973 uint8_t schedRelList[MAX_NUM_SR_CFG_PER_CELL_GRP];
976 typedef struct spatialRelationInfo
978 uint8_t spatialRelationId;
980 uint8_t pathLossRefRSId;
982 uint8_t closeLoopIdx;
983 }SpatialRelationInfo;
985 typedef struct pucchSpatialCfg
987 uint8_t spatialAddModListCount;
988 SpatialRelationInfo spatialAddModList[MAX_NUM_SPATIAL_RELATIONS];
989 uint8_t spatialRelListCount;
990 uint8_t spatialRelList[MAX_NUM_SPATIAL_RELATIONS];
993 typedef struct p0PucchCfg
999 typedef struct pathLossRefRSCfg
1001 uint8_t pathLossRefRSId;
1004 typedef struct pucchMultiCsiCfg
1006 uint8_t multiCsiResrcListCount;
1007 uint8_t multiCsiResrcList[MAX_NUM_PUCCH_RESRC-1];
1010 typedef struct pucchDlDataToUlAck
1012 uint8_t dlDataToUlAckListCount;
1013 uint8_t dlDataToUlAckList[MAX_NUM_DL_DATA_TO_UL_ACK];
1014 }PucchDlDataToUlAck;
1016 typedef struct pucchPowerControl
1024 P0PucchCfg p0Set[MAX_NUM_PUCCH_P0_PER_SET];
1025 uint8_t pathLossRefRSListCount;
1026 PathLossRefRSCfg pathLossRefRSList[MAX_NUM_PATH_LOSS_REF_RS];
1029 typedef struct pucchCfg
1031 PucchResrcSetCfg *resrcSet;
1032 PucchResrcCfg *resrc;
1033 PucchFormatCfg *format1;
1034 PucchFormatCfg *format2;
1035 PucchFormatCfg *format3;
1036 PucchFormatCfg *format4;
1037 PucchSchedReqCfg *schedReq;
1038 PucchMultiCsiCfg *multiCsiCfg;
1039 PucchSpatialCfg *spatialInfo;
1040 PucchDlDataToUlAck *dlDataToUlAck;
1041 PucchPowerControl *powerControl;
1044 /* Transform precoding disabled */
1045 typedef struct transPrecodDisabled
1047 uint16_t scramblingId0;
1048 }TransPrecodDisabled;
1050 /* DMRS Uplink configuration */
1051 typedef struct dmrsUlCfg
1053 AddPosType addPos; /* DMRS additional position */
1054 TransPrecodDisabled transPrecodDisabled; /* Transform precoding disabled */
1057 /* PUSCH Time Domain Resource Allocation */
1058 typedef struct puschTimeDomRsrcAlloc
1061 CommonMappingType mappingType;
1062 uint8_t startSymbol;
1063 uint8_t symbolLength;
1064 uint8_t startSymbolAndLength;
1065 }PuschTimeDomRsrcAlloc;
1067 /* PUSCH Configuration */
1068 typedef struct puschCfg
1070 uint8_t dataScramblingId;
1071 DmrsUlCfg dmrsUlCfgForPuschMapTypeA;
1072 ResAllocType resourceAllocType;
1073 uint8_t numTimeDomRsrcAlloc;
1074 PuschTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_UL_ALLOC]; /* PUSCH time domain UL resource allocation list */
1075 TransformPrecoder transformPrecoder;
1078 /* Initial Uplink BWP */
1079 typedef struct initialUlBwp
1087 /* Uplink BWP information */
1088 typedef struct ulBwpInfo
1093 /* Serving cell configuration */
1094 typedef struct servCellCfgInfo
1096 InitialDlBwp initDlBwp;
1097 uint8_t numDlBwpToAdd;
1098 DlBwpInfo DlBwpToAddList[MAX_NUM_BWP];
1099 uint8_t firstActvDlBwpId;
1100 uint8_t defaultDlBwpId;
1101 uint8_t *bwpInactivityTmr;
1102 PdschServCellCfg pdschServCellCfg;
1103 InitialUlBwp initUlBwp;
1104 uint8_t numUlBwpToAdd;
1105 UlBwpInfo UlBwpToAddList[MAX_NUM_BWP];
1106 uint8_t firstActvUlBwpId;
1109 /* Special cell configuration */
1110 typedef struct spCellCfg
1112 uint8_t servCellIdx;
1113 ServCellCfgInfo servCellCfg;
1116 typedef struct ambrCfg
1118 uint32_t ulBr; /* UL Bit rate */
1119 uint32_t dlBr; /* DL Bit rate */
1122 /* Single Network Slice Selection assistance Info */
1123 typedef struct snssai
1125 uint8_t sst; /* Slice Type */
1126 uint8_t sd[SD_SIZE]; /* Slice Differentiator */
1129 typedef struct nonDynFiveQi
1134 uint16_t maxDataBurstVol;
1137 typedef struct dynFiveQi
1140 uint16_t packetDelayBudget;
1141 uint8_t packetErrRateScalar;
1142 uint8_t packetErrRateExp;
1144 uint8_t delayCritical;
1146 uint16_t maxDataBurstVol;
1149 typedef struct ngRanAllocAndRetPri
1151 uint8_t priorityLevel;
1152 uint8_t preEmptionCap;
1153 uint8_t preEmptionVul;
1154 }NgRanAllocAndRetPri;
1156 typedef struct grbQosInfo
1158 uint32_t maxFlowBitRateDl;
1159 uint32_t maxFlowBitRateUl;
1160 uint32_t guarFlowBitRateDl;
1161 uint32_t guarFlowBitRateUl;
1164 typedef struct drbQos
1166 QosType fiveQiType; /* Dynamic or non-dynamic */
1169 NonDynFiveQi nonDyn5Qi;
1172 NgRanAllocAndRetPri ngRanRetPri;
1173 GrbQosInfo grbQosInfo;
1174 uint16_t pduSessionId;
1175 uint32_t ulPduSessAggMaxBitRate;
1178 typedef struct ulLcCfg
1183 PBitRate pbr; // prioritisedBitRate
1184 BucketSizeDur bsd; // bucketSizeDuration
1187 typedef struct duLcCfg
1189 LcPriority lcp; // logical Channel Prioritization
1192 typedef struct lcCfg
1194 ConfigType configType;
1203 typedef struct modulationInfo
1205 uint8_t modOrder; /* Modulation order */
1206 uint8_t mcsIndex; /* MCS Index */
1207 McsTable mcsTable; /* MCS table */
1210 typedef struct macUeCfg
1215 MacCellGrpCfg macCellGrpCfg;
1216 PhyCellGrpCfg phyCellGrpCfg;
1217 SpCellCfg spCellCfg;
1219 ModulationInfo dlModInfo; /* DL modulation info */
1220 ModulationInfo ulModInfo; /* UL modulation info */
1222 LcCfg lcCfgList[MAX_NUM_LC];
1223 UeCfgState macUeCfgState; /* InActive / Completed */
1226 typedef struct nrcgi
1232 typedef struct srbFailInfo
1238 typedef struct drbFailInfo
1244 typedef struct sCellFailInfo
1250 typedef struct ueCfgRsp
1255 uint8_t numSRBFailed; /* valid values : 0 to MAX_NUM_SRB */
1256 SRBFailInfo *failedSRBlisti;
1257 uint8_t numDRBFailed; /* valid values : 0 to MAX_NUM_DRB */
1258 DRBFailInfo *failedDRBlist;
1259 uint8_t numSCellFailed; /* valid values : 0 to MAX_NUM_SCELL */
1260 SCellFailInfo *failedSCellList;
1263 /* Functions for slot Ind from MAC to DU APP*/
1264 typedef uint8_t (*DuMacCellUpInd) ARGS((
1266 OduCellId *cellId ));
1268 /* Functions for stop Ind from MAC to DU APP*/
1269 typedef uint8_t (*DuMacStopInd) ARGS((
1271 OduCellId *cellId ));
1273 /* Functions for mac cell start req */
1274 typedef uint8_t (*DuMacCellStart) ARGS((
1276 OduCellId *cellId));
1278 /* Functions for mac cell stop request */
1279 typedef uint8_t (*DuMacCellStop) ARGS((
1281 OduCellId *cellId ));
1283 /* Function pointers for packing macCellCfg Request and Confirm */
1284 typedef uint8_t (*packMacCellCfgReq) ARGS((
1286 MacCellCfg *macCellCfg ));
1288 typedef uint8_t (*packMacCellCfgConfirm) ARGS((
1290 MacCellCfgCfm *macCellCfgCfm ));
1292 typedef uint8_t (*DuMacCellCfgReq) ARGS((
1294 MacCellCfg *macCellCfg));
1296 typedef uint8_t (*DuMacCellCfgCfm) ARGS((
1298 MacCellCfgCfm *macCellCfgCfm ));
1300 /* Functions for UL CCCH Ind from MAC to DU APP*/
1301 typedef uint8_t (*DuMacUlCcchInd) ARGS((
1303 UlCcchIndInfo *ulCcchIndInfo ));
1305 /* Functions for DL CCCH Ind from DU APP to MAC*/
1306 typedef uint8_t (*DuMacDlCcchInd) ARGS((
1308 DlCcchIndInfo *dlCcchIndInfo ));
1310 /* UE create Request from DU APP to MAC*/
1311 typedef uint8_t (*DuMacUeCreateReq) ARGS((
1315 /* UE create Response from MAC to DU APP */
1316 typedef uint8_t (*MacDuUeCfgRspFunc) ARGS((
1318 MacUeCfgRsp *cfgRsp));
1320 /* UE Reconfig Request from DU APP to MAC*/
1321 typedef uint8_t (*DuMacUeReconfigReq) ARGS((
1325 uint8_t packMacCellUpInd(Pst *pst, OduCellId *cellId);
1326 uint8_t unpackMacCellUpInd(DuMacCellUpInd func, Pst *pst, Buffer *mBuf);
1327 uint8_t duHandleCellUpInd(Pst *pst, OduCellId *cellId);
1328 uint8_t packMacCellStart(Pst *pst, OduCellId *cellId);
1329 uint8_t unpackMacCellStart(DuMacCellStart func, Pst *pst, Buffer *mBuf);
1330 uint8_t MacProcCellStart(Pst *pst, OduCellId *cellId);
1331 uint8_t packMacCellStop(Pst *pst, OduCellId *cellId);
1332 uint8_t unpackMacCellStop(DuMacCellStop func, Pst *pst, Buffer *mBuf);
1333 uint8_t MacProcCellStop(Pst *pst, OduCellId *cellId);
1334 uint8_t packMacCellCfg(Pst *pst, MacCellCfg *macCellCfg);
1335 uint8_t unpackDuMacCellCfg(DuMacCellCfgReq func, Pst *pst, Buffer *mBuf);
1336 uint8_t MacProcCellCfgReq(Pst *pst, MacCellCfg *macCellCfg);
1337 uint8_t packMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm);
1338 uint8_t unpackMacCellCfgCfm(DuMacCellCfgCfm func, Pst *pst, Buffer *mBuf);
1339 uint8_t duHandleMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm);
1340 uint8_t packMacStopInd(Pst *pst, OduCellId *cellId);
1341 uint8_t unpackMacStopInd(DuMacStopInd func, Pst *pst, Buffer *mBuf);
1342 uint8_t duHandleStopInd(Pst *pst, OduCellId *cellId);
1343 uint8_t packMacUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo);
1344 uint8_t unpackMacUlCcchInd(DuMacUlCcchInd func, Pst *pst, Buffer *mBuf);
1345 uint8_t duHandleUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo);
1346 uint8_t packMacDlCcchInd(Pst *pst, DlCcchIndInfo *dlCcchIndInfo);
1347 uint8_t unpackMacDlCcchInd(DuMacDlCcchInd func, Pst *pst, Buffer *mBuf);
1348 uint8_t MacProcDlCcchInd(Pst *pst, DlCcchIndInfo *dlCcchIndInfo);
1349 uint8_t packDuMacUeCreateReq(Pst *pst, MacUeCfg *ueCfg);
1350 uint8_t unpackMacUeCreateReq(DuMacUeCreateReq func, Pst *pst, Buffer *mBuf);
1351 uint8_t MacProcUeCreateReq(Pst *pst, MacUeCfg *ueCfg);
1352 uint8_t sendStopIndMacToDuApp(uint16_t cellId);
1353 uint8_t packDuMacUeCfgRsp(Pst *pst, MacUeCfgRsp *cfgRsp);
1354 uint8_t unpackDuMacUeCfgRsp(MacDuUeCfgRspFunc func, Pst *pst, Buffer *mBuf);
1355 uint8_t DuProcMacUeCfgRsp(Pst *pst, MacUeCfgRsp *cfgRsp);
1356 uint8_t packDuMacUeReconfigReq(Pst *pst, MacUeCfg *ueCfg);
1357 uint8_t unpackMacUeReconfigReq(DuMacUeReconfigReq func, Pst *pst, Buffer *mBuf);
1358 uint8_t MacProcUeReconfigReq(Pst *pst, MacUeCfg *ueCfg);
1362 /**********************************************************************
1364 **********************************************************************/