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
79 #define EVENT_MAC_CELL_DELETE_REQ 214
80 #define EVENT_MAC_CELL_DELETE_RSP 215
82 #define BSR_PERIODIC_TIMER_SF_10 10
83 #define BSR_RETX_TIMER_SF_320 320
84 #define BSR_SR_DELAY_TMR_2560 2560
113 MAC_GEN_FULL_PBCH_PAYLD, /* MAC generated the full PBCH Payload */
114 PHY_GEN_TIMING_PBCH_BIT, /* PHY generates the timing PBCH bits */
115 PHY_GEN_FULL_PBCH_PAYLD /* PHY generates full PBCH payload */
127 RESTRICTED_SET_TYPE_A,
128 RESTRICTED_SET_TYPE_B
160 /* Enums for Ue Create Request */
162 /* SR PROHIBIT TIMER */
189 TIME_ALIGNMENT_TIMER_MS_500,
190 TIME_ALIGNMENT_TIMER_MS_750,
191 TIME_ALIGNMENT_TIMER_MS_1280,
192 TIME_ALIGNMENT_TIMER_MS_1920,
193 TIME_ALIGNMENT_TIMER_MS_2560,
194 TIME_ALIGNMENT_TIMER_MS_5120,
195 TIME_ALIGNMENT_TIMER_MS_10240,
196 TIME_ALIGNMENT_TIMER_INFINITY
201 PHR_PERIODIC_TIMER_SF_10,
202 PHR_PERIODIC_TIMER_SF_20,
203 PHR_PERIODIC_TIMER_SF_50,
204 PHR_PERIODIC_TIMER_SF_100,
205 PHR_PERIODIC_TIMER_SF_200,
206 PHR_PERIODIC_TIMER_SF_500,
207 PHR_PERIODIC_TIMER_SF_1000,
208 PHR_PERIODIC_TIMER_INFINITY
213 PHR_PROHIBIT_TIMER_SF_0,
214 PHR_PROHIBIT_TIMER_SF_10,
215 PHR_PROHIBIT_TIMER_SF_20,
216 PHR_PROHIBIT_TIMER_SF_50,
217 PHR_PROHIBIT_TIMER_SF_100,
218 PHR_PROHIBIT_TIMER_SF_200,
219 PHR_PROHIBIT_TIMER_SF_500,
220 PHR_PROHIBIT_TIMER_SF_1000
225 PHR_TX_PWR_FACTOR_CHANGE_DB_1,
226 PHR_TX_PWR_FACTOR_CHANGE_DB_3,
227 PHR_TX_PWR_FACTOR_CHANGE_DB_6,
228 PHR_TX_PWR_FACTOR_CHANGE_INFINITY
229 }PhrTxPwrFactorChange;
233 PHR_MODE_OTHER_CG_REAL,
234 PHR_MODE_OTHER_CG_VIRTUAL
239 PDSCH_HARQ_ACK_CODEBOOK_SEMISTATIC,
240 PDSCH_HARQ_ACK_CODEBOOK_DYNAMIC
241 }PdschHarqAckCodebook;
245 NUM_HARQ_PROC_FOR_PDSCH_N_2,
246 NUM_HARQ_PROC_FOR_PDSCH_N_4,
247 NUM_HARQ_PROC_FOR_PDSCH_N_6,
248 NUM_HARQ_PROC_FOR_PDSCH_N_10,
249 NUM_HARQ_PROC_FOR_PDSCH_N_16
250 }NumHarqProcForPdsch;
254 MAX_CODE_BLOCK_GROUP_PER_TB_N_2,
255 MAX_CODE_BLOCK_GROUP_PER_TB_N_4,
256 MAX_CODE_BLOCK_GROUP_PER_TB_N_6,
257 MAX_CODE_BLOCK_GROUP_PER_TB_N_8
269 TRANSFORM_PRECODER_ENABLED,
270 TRANSFORM_PRECODER_DISABLED
275 CCE_REG_MAPPINGTYPE_PR_INTERLEAVED = 1,
276 CCE_REG_MAPPINGTYPE_PR_NONINTERLEAVED
281 SLOTPERIODICITYANDOFFSET_PR_SL1 = 1,
282 SLOTPERIODICITYANDOFFSET_PR_SL2,
283 SLOTPERIODICITYANDOFFSET_PR_SL4,
284 SLOTPERIODICITYANDOFFSET_PR_SL5,
285 SLOTPERIODICITYANDOFFSET_PR_SL8,
286 SLOTPERIODICITYANDOFFSET_PR_SL10,
287 SLOTPERIODICITYANDOFFSET_PR_SL16,
288 SLOTPERIODICITYANDOFFSET_PR_SL20,
289 SLOTPERIODICITYANDOFFSET_PR_SL40,
290 SLOTPERIODICITYANDOFFSET_PR_SL80,
291 SLOTPERIODICITYANDOFFSET_PR_SL160,
292 SLOTPERIODICITYANDOFFSET_PR_SL320,
293 SLOTPERIODICITYANDOFFSET_PR_SL640,
294 SLOTPERIODICITYANDOFFSET_PR_SL1280,
295 SLOTPERIODICITYANDOFFSET_PR_SL2560
296 }MSlotPeriodAndOffset;
306 SEARCHSPACETYPE_PR_COMMON = 1,
307 SEARCHSPACETYPE_PR_UE_SPECIFIC
318 AGGREGATIONLEVEL_N0 = 0,
319 AGGREGATIONLEVEL_N1 = 1,
320 AGGREGATIONLEVEL_N2 = 2,
321 AGGREGATIONLEVEL_N3 = 3,
322 AGGREGATIONLEVEL_N4 = 4,
323 AGGREGATIONLEVEL_N5 = 5,
324 AGGREGATIONLEVEL_N6 = 6,
325 AGGREGATIONLEVEL_N8 = 7
330 ADDITIONALPOSITION_POS0,
331 ADDITIONALPOSITION_POS1,
332 ADDITIONALPOSITION_POS3
343 RESOURCEALLOCATION_TYPE0,
344 RESOURCEALLOCATION_TYPE1,
345 RESOURCEALLOCATION_DYNAMICSWITCH
356 CODEWORDS_SCHED_BY_DCI_N1,
357 CODEWORDS_SCHED_BY_DCI_N2
362 TYPE_STATIC_BUNDLING = 1,
363 TYPE_DYNAMIC_BUNDLING
376 SET1_SIZE_N2_WIDEBAND,
377 SET1_SIZE_N4_WIDEBAND
431 TRANSPORT_LAYER_FAIL,
438 UNSPECIFIED_RADIO_NW_CAUSE,
440 UNKNOWN_GNB_CU_UE_F1AP_ID,
441 ALREADY_ALLOCATED_GNB_CU_UE_F1AP_ID,
442 UNKNOWN_GNB_DU_UE_F1AP_ID,
443 ALREADY_ALLOCATED_GNB_DU_UE_F1AP_ID,
444 UNKNOWN_UE_F1AP_ID_PAIR,
445 INCONSISTENT_UE_F1AP_ID_PAIR,
446 INTERACTION_WITH_OTHER_PROCEDURE,
448 ACTION_REQUIRED_FOR_RADIO_REASONS,
449 RADIO_RESOURCES_UNAVAILABLE,
455 RESOURCES_UNAVAILABLE_FOR_SLICE
460 UNSPECIFIED_TRANSPORT_LAYER_CAUSE,
461 TRANSPORT_RESOURCE_UNAVAILABLE
466 TRANSFER_SYNTAX_ERROR,
467 ABSTRACT_SYNTAX_ERROR_REJECT,
468 ABSTRACT_SYNTAX_ERROR_IGNORE_AND_REJECT,
469 INCOMPATIBLE_MESSAGE_FOR_RECEIVER_STATE,
471 ABSTRAXCT_SYNTAX_ERROR_FALSELY_CONSTRUCTED_MSG,
472 UNSPECIFIED_PROTOCOL_CAUSE
477 CONTROL_PROCESSING_OVERLOAD,
479 PLANE_PROCESSING_RESOURCES,
481 INTERVENTION_BY_O_AND_M,
482 UNSPECIFIED_MISC_CAUSE
489 MCS_TABLE_QAM64_LOW_SE
492 typedef struct failureCause
497 RadioNwLyrCause radioNwCause;
498 TransLyrCause transportCause;
499 ProtCause protcolCause;
500 MiscFailCause miscCause;
504 typedef struct carrierCfg
507 uint32_t bw; /* DL/UL bandwidth */
508 uint32_t freq; /* Absolute frequency of DL/UL point A in KHz */
509 uint16_t k0[NUM_NUMEROLOGY]; /* K0 for DL/UL */
510 uint16_t gridSize[NUM_NUMEROLOGY]; /* DL/UL Grid size for each numerologies */
511 uint16_t numAnt; /* Number of Tx/Rx antennas */
514 typedef struct ssbCfg
516 uint32_t ssbPbchPwr; /* SSB block power */
517 BchPduOpt bchPayloadFlag; /* Options for generation of payload */
518 uint8_t scsCmn; /* subcarrier spacing for common */
519 uint16_t ssbOffsetPointA; /* SSB subcarrier offset from point A */
521 SSBPeriod ssbPeriod; /* SSB Periodicity in msec */
522 uint8_t ssbScOffset; /* Subcarrier Offset */
523 uint8_t mibPdu[3]; /* MIB payload */
524 uint32_t ssbMask[SSB_MASK_SIZE]; /* Bitmap for actually transmitted SSB. */
525 uint8_t beamId[NUM_SSB];
526 bool multCarrBand; /* Multiple carriers in a band */
527 bool multCellCarr; /* Multiple cells in single carrier */
530 typedef struct fdmInfo
532 uint16_t rootSeqIdx; /* Root sequence index */
533 uint8_t numRootSeq; /* Number of root sequences required for FD */
534 uint16_t k1; /* Frequency Offset for each FD */
535 uint8_t zeroCorrZoneCfg; /* Zero correlation zone cofig */
536 uint8_t numUnusedRootSeq; /* Number of unused root sequence */
537 uint8_t *unsuedRootSeq; /* Unused root sequence per FD */
540 typedef struct prachCfg
543 uint8_t prachCfgIdx; /* PRACH Cfg Index */
544 PrachSeqLen prachSeqLen; /* RACH Sequence length: Long/short */
545 uint8_t prachSubcSpacing; /* Subcarrier spacing of RACH */
546 RstSetCfg prachRstSetCfg; /* PRACH restricted set config */
547 uint16_t msg1FreqStart; /* Msg1-FrequencyStart */
548 uint8_t msg1Fdm; /* PRACH FDM (1,2,4,8) */
549 uint8_t rootSeqLen; /* Root sequence length */
550 PrachFdmInfo fdm[8]; /* FDM info */
551 uint8_t ssbPerRach; /* SSB per RACH occassion */
552 bool prachMultCarrBand; /* Multiple carriers in Band */
553 uint8_t prachRestrictedSet; /* Support for PRACH restricted set */
554 uint8_t raContResTmr; /* RA Contention Resoultion Timer */
555 uint8_t rsrpThreshSsb; /* RSRP Threshold SSB */
556 uint8_t raRspWindow; /* RA Response Window */
559 typedef struct sib1CellCfg
563 uint16_t sib1RepetitionPeriod;
564 uint8_t coresetZeroIndex; /* derived from 4 LSB of pdcchSib1 present in MIB */
565 uint8_t searchSpaceZeroIndex; /* derived from 4 MSB of pdcchSib1 present in MIB */
569 typedef struct bwpParams
574 uint8_t cyclicPrefix;
577 typedef struct candidatesInfo
586 typedef struct searchSpaceCfg
588 uint8_t searchSpaceId;
590 uint16_t monitoringSlot;
592 uint16_t monitoringSymbol;
593 CandidatesInfo candidate;
596 typedef struct pdcchConfigCommon
598 /* only one search space is configured during SIB1 */
599 SearchSpaceCfg commonSearchSpace;
600 uint8_t raSearchSpaceId;
603 typedef struct pdschCfgCommTimeDomRsrcAlloc
608 uint8_t lengthSymbol;
609 }PdschCfgCommTimeDomRsrcAlloc;
611 typedef struct pdschConfigCommon
613 uint8_t numTimeDomAlloc;
614 /* PDSCH time domain DL resource allocation list */
615 PdschCfgCommTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_DL_ALLOC];
618 typedef struct pucchConfigCommon
620 uint8_t pucchResourceCommon;
621 uint8_t pucchGroupHopping;
624 typedef struct puschConfigCommon
626 /* PUSCH-TimeDomainResourceAllocation info */
630 uint8_t lengthSymbol;
633 typedef struct bwpDlConfig
636 PdcchConfigCommon pdcchCommon;
637 PdschConfigCommon pdschCommon;
640 typedef struct bwpUlConfig
643 // rach config common sent in PrachCfg
644 PucchConfigCommon pucchCommon;
645 PuschConfigCommon puschCommon;
648 typedef struct macCellCfg
650 uint16_t cellId; /* Cell Id */
651 uint8_t carrierId; /* Carrired Index */
652 uint16_t phyCellId; /* Physical cell id */
653 uint8_t numerology; /* Supported numerology */
654 DuplexMode dupType; /* Duplex type: TDD/FDD */
655 CarrierCfg dlCarrCfg; /* DL Carrier configuration */
656 CarrierCfg ulCarrCfg; /* UL Carrier configuration */
657 bool freqShft; /* Indicates presence of 7.5kHz frequency shift */
658 SsbCfg ssbCfg; /* SSB configuration */
659 PrachCfg prachCfg; /* PRACH Configuration */
661 TDDCfg tddCfg; /* TDD periodicity and slot configuration */
663 RSSIMeasUnit rssiUnit; /* RSSI measurement unit */
664 Sib1CellCfg sib1Cfg; /* SIB1 config */
665 BwpDlConfig initialDlBwp; /* Initial DL BWP */
666 BwpUlConfig initialUlBwp; /* Initial UL BWP */
667 uint8_t dmrsTypeAPos; /* DMRS Type A position */
670 typedef struct macCellCfgCfm
676 typedef struct ulCcchInd
680 uint16_t ulCcchMsgLen;
684 typedef struct dlCcchInd
688 DlCcchMsgType msgType;
689 uint16_t dlCcchMsgLen;
693 typedef struct bsrTmrCfg
695 uint16_t periodicTimer;
697 uint16_t srDelayTimer;
701 /* Info of Scheduling Request to Add/Modify */
702 typedef struct schedReqInfo
705 SrProhibitTimer srProhibitTmr;
706 SrTransMax srTransMax;
709 /* Scheduling Request Configuration */
710 typedef struct schedReqCfg
712 uint8_t addModListCount;
713 SchedReqInfo addModList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* List of Scheduling req to be added/modified */
714 uint8_t relListCount;
715 uint8_t relList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* list of scheduling request Id to be deleted */
718 typedef struct tagInfo
721 TimeAlignmentTimer timeAlignTimer;
724 typedef struct tagCfg
726 uint8_t addModListCount;
727 TagInfo addModList[MAC_NUM_TAGS]; /* List of Tag to Add/Modify */
728 uint8_t relListCount;
729 uint8_t relList[MAC_NUM_TAGS]; /* list of Tag Id to release */
732 typedef struct phrCfg
734 PhrPeriodicTimer periodicTimer;
735 PhrProhibitTimer prohibitTimer;
736 PhrTxPwrFactorChange txPowerFactor;
739 bool phrType2OtherCell;
740 PhrModeOtherCG phrOtherCG;
743 typedef struct macCellGrpCfg
745 SchedReqCfg schReqCfg;
748 bool phrCfgSetupPres; /* true/false: phrCfgSetup/phrCfgRelease */
752 typedef struct phyCellGrpCfg
754 PdschHarqAckCodebook pdschHarqAckCodebook;
758 /* Control resource set info */
759 typedef struct controlRsrcSet
761 uint8_t cRSetId; /* Control resource set id */
762 uint8_t freqDomainRsrc[FREQ_DOM_RSRC_SIZE]; /* Frequency domain resource */
764 REGMappingType cceRegMappingType;
765 PrecoderGranul precoderGranularity;
766 uint16_t dmrsScramblingId;
769 /* Search Space info */
770 typedef struct searchSpace
772 uint8_t searchSpaceId;
774 MSlotPeriodAndOffset mSlotPeriodicityAndOffset;
775 uint8_t mSymbolsWithinSlot[MONITORING_SYMB_WITHIN_SLOT_SIZE];
776 AggrLevel numCandidatesAggLevel1; /* Number of candidates for aggregation level 1 */
777 AggrLevel numCandidatesAggLevel2; /* Number of candidates for aggregation level 2 */
778 AggrLevel numCandidatesAggLevel4; /* Number of candidates for aggregation level 4 */
779 AggrLevel numCandidatesAggLevel8; /* Number of candidates for aggregation level 8 */
780 AggrLevel numCandidatesAggLevel16; /* Number of candidates for aggregation level 16 */
781 SearchSpaceType searchSpaceType;
782 uint8_t ueSpecificDciFormat;
785 /* PDCCH cofniguration */
786 typedef struct pdcchConfig
788 uint8_t numCRsetToAddMod;
789 ControlRsrcSet cRSetToAddModList[MAX_NUM_CRSET]; /* List of control resource set to add/modify */
790 uint8_t numCRsetToRel;
791 uint8_t cRSetToRelList[MAX_NUM_CRSET]; /* List of control resource set to release */
792 uint8_t numSearchSpcToAddMod;
793 SearchSpace searchSpcToAddModList[MAX_NUM_SEARCH_SPC]; /* List of search space to add/modify */
794 uint8_t numSearchSpcToRel;
795 uint8_t searchSpcToRelList[MAX_NUM_SEARCH_SPC]; /* List of search space to release */
798 /* PDSCH time domain resource allocation */
799 typedef struct pdschTimeDomRsrcAlloc
802 CommonMappingType mappingType;
804 uint8_t symbolLength;
805 uint8_t startSymbolAndLength;
806 }PdschTimeDomRsrcAlloc;
809 typedef struct pdschBundling
811 struct staticBundling
813 BundlingSizeSet2 size;
815 struct dynamicBundling
817 BundlingSizeSet1 sizeSet1;
818 BundlingSizeSet2 sizeSet2;
822 /* DMRS downlink configuration */
823 typedef struct dmrsDlCfg
825 AddPosType addPos; /* DMRS additional position */
828 /* PDSCH Configuration */
829 typedef struct pdschConfig
831 DmrsDlCfg dmrsDlCfgForPdschMapTypeA;
832 ResAllocType resourceAllocType;
833 uint8_t numTimeDomRsrcAlloc;
834 PdschTimeDomRsrcAlloc timeDomRsrcAllociList[MAX_NUM_DL_ALLOC]; /* PDSCH time domain DL resource allocation list */
836 CodeWordsSchedDci numCodeWordsSchByDci; /* Number of code words scheduled by DCI */
837 BundlingType bundlingType;
838 PdschBundling bundlingInfo;
841 /* Initial Downlink BWP */
842 typedef struct initialDlBwp
845 PdcchConfig pdcchCfg;
847 PdschConfig pdschCfg;
850 /* BWP Downlink common */
851 typedef struct bwpDlCommon
855 /* Downlink BWP information */
856 typedef struct dlBwpInfo
861 /* PDCCH Serving Cell configuration */
862 typedef struct pdschServCellCfg
864 uint8_t *maxMimoLayers;
865 NumHarqProcForPdsch numHarqProcForPdsch;
866 MaxCodeBlkGrpPerTB *maxCodeBlkGrpPerTb;
867 bool *codeBlkGrpFlushInd;
868 PdschXOverhead *xOverhead;
871 /* PUCCH Configuration */
873 typedef struct pucchResrcSetInfo
876 uint8_t resrcListCount;
877 uint8_t resrcList[MAX_NUM_PUCCH_PER_RESRC_SET];
878 uint8_t maxPayLoadSize;
881 typedef struct pucchResrcSetCfg
883 uint8_t resrcSetToAddModListCount;
884 PucchResrcSetInfo resrcSetToAddModList[MAX_NUM_PUCCH_RESRC_SET];
885 uint8_t resrcSetToRelListCount;
886 uint8_t resrcSetToRelList[MAX_NUM_PUCCH_RESRC];
889 typedef struct pucchFormat0
891 uint8_t initialCyclicShift;
893 uint8_t startSymbolIdx;
896 typedef struct pucchFormat1
898 uint8_t initialCyclicShift;
900 uint8_t startSymbolIdx;
904 typedef struct pucchFormat2_3
908 uint8_t startSymbolIdx;
911 typedef struct pucchFormat4
916 uint8_t startSymbolIdx;
919 typedef struct pucchResrcInfo
923 uint8_t intraFreqHop;
924 uint16_t secondPrbHop;
928 PucchFormat0 *format0;
929 PucchFormat1 *format1;
930 PucchFormat2_3 *format2;
931 PucchFormat2_3 *format3;
932 PucchFormat4 *format4;
936 typedef struct pucchResrcCfg
938 uint8_t resrcToAddModListCount;
939 PucchResrcInfo resrcToAddModList[MAX_NUM_PUCCH_RESRC];
940 uint8_t resrcToRelListCount;
941 uint8_t resrcToRelList[MAX_NUM_PUCCH_RESRC];
944 typedef struct pucchFormatCfg
946 uint8_t interSlotFreqHop;
954 typedef struct schedReqResrcInfo
963 typedef struct pucchSchedReqCfg
965 uint8_t schedAddModListCount;
966 SchedReqResrcInfo schedAddModList[MAX_NUM_SR_CFG_PER_CELL_GRP];
967 uint8_t schedRelListCount;
968 uint8_t schedRelList[MAX_NUM_SR_CFG_PER_CELL_GRP];
971 typedef struct spatialRelationInfo
973 uint8_t spatialRelationId;
975 uint8_t pathLossRefRSId;
977 uint8_t closeLoopIdx;
978 }SpatialRelationInfo;
980 typedef struct pucchSpatialCfg
982 uint8_t spatialAddModListCount;
983 SpatialRelationInfo spatialAddModList[MAX_NUM_SPATIAL_RELATIONS];
984 uint8_t spatialRelListCount;
985 uint8_t spatialRelList[MAX_NUM_SPATIAL_RELATIONS];
988 typedef struct p0PucchCfg
994 typedef struct pathLossRefRSCfg
996 uint8_t pathLossRefRSId;
999 typedef struct pucchMultiCsiCfg
1001 uint8_t multiCsiResrcListCount;
1002 uint8_t multiCsiResrcList[MAX_NUM_PUCCH_RESRC-1];
1005 typedef struct pucchDlDataToUlAck
1007 uint8_t dlDataToUlAckListCount;
1008 uint8_t dlDataToUlAckList[MAX_NUM_DL_DATA_TO_UL_ACK];
1009 }PucchDlDataToUlAck;
1011 typedef struct pucchPowerControl
1019 P0PucchCfg p0Set[MAX_NUM_PUCCH_P0_PER_SET];
1020 uint8_t pathLossRefRSListCount;
1021 PathLossRefRSCfg pathLossRefRSList[MAX_NUM_PATH_LOSS_REF_RS];
1024 typedef struct pucchCfg
1026 PucchResrcSetCfg *resrcSet;
1027 PucchResrcCfg *resrc;
1028 PucchFormatCfg *format1;
1029 PucchFormatCfg *format2;
1030 PucchFormatCfg *format3;
1031 PucchFormatCfg *format4;
1032 PucchSchedReqCfg *schedReq;
1033 PucchMultiCsiCfg *multiCsiCfg;
1034 PucchSpatialCfg *spatialInfo;
1035 PucchDlDataToUlAck *dlDataToUlAck;
1036 PucchPowerControl *powerControl;
1039 /* Transform precoding disabled */
1040 typedef struct transPrecodDisabled
1042 uint16_t scramblingId0;
1043 }TransPrecodDisabled;
1045 /* DMRS Uplink configuration */
1046 typedef struct dmrsUlCfg
1048 AddPosType addPos; /* DMRS additional position */
1049 TransPrecodDisabled transPrecodDisabled; /* Transform precoding disabled */
1052 /* PUSCH Time Domain Resource Allocation */
1053 typedef struct puschTimeDomRsrcAlloc
1056 CommonMappingType mappingType;
1057 uint8_t startSymbol;
1058 uint8_t symbolLength;
1059 uint8_t startSymbolAndLength;
1060 }PuschTimeDomRsrcAlloc;
1062 /* PUSCH Configuration */
1063 typedef struct puschCfg
1065 uint8_t dataScramblingId;
1066 DmrsUlCfg dmrsUlCfgForPuschMapTypeA;
1067 ResAllocType resourceAllocType;
1068 uint8_t numTimeDomRsrcAlloc;
1069 PuschTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_UL_ALLOC]; /* PUSCH time domain UL resource allocation list */
1070 TransformPrecoder transformPrecoder;
1073 /* Initial Uplink BWP */
1074 typedef struct initialUlBwp
1082 /* Uplink BWP information */
1083 typedef struct ulBwpInfo
1088 /* Serving cell configuration */
1089 typedef struct servCellCfgInfo
1091 InitialDlBwp initDlBwp;
1092 uint8_t numDlBwpToAdd;
1093 DlBwpInfo DlBwpToAddList[MAX_NUM_BWP];
1094 uint8_t firstActvDlBwpId;
1095 uint8_t defaultDlBwpId;
1096 uint8_t *bwpInactivityTmr;
1097 PdschServCellCfg pdschServCellCfg;
1098 InitialUlBwp initUlBwp;
1099 uint8_t numUlBwpToAdd;
1100 UlBwpInfo UlBwpToAddList[MAX_NUM_BWP];
1101 uint8_t firstActvUlBwpId;
1104 /* Special cell configuration */
1105 typedef struct spCellCfg
1107 uint8_t servCellIdx;
1108 ServCellCfgInfo servCellCfg;
1111 typedef struct ambrCfg
1113 uint32_t ulBr; /* UL Bit rate */
1116 /* Single Network Slice Selection assistance Info */
1117 typedef struct snssai
1119 uint8_t sst; /* Slice Type */
1120 uint8_t sd[SD_SIZE]; /* Slice Differentiator */
1123 typedef struct nonDynFiveQi
1128 uint16_t maxDataBurstVol;
1131 typedef struct dynFiveQi
1134 uint16_t packetDelayBudget;
1135 uint8_t packetErrRateScalar;
1136 uint8_t packetErrRateExp;
1138 uint8_t delayCritical;
1140 uint16_t maxDataBurstVol;
1143 typedef struct ngRanAllocAndRetPri
1145 uint8_t priorityLevel;
1146 uint8_t preEmptionCap;
1147 uint8_t preEmptionVul;
1148 }NgRanAllocAndRetPri;
1150 typedef struct grbQosInfo
1152 uint32_t maxFlowBitRateDl;
1153 uint32_t maxFlowBitRateUl;
1154 uint32_t guarFlowBitRateDl;
1155 uint32_t guarFlowBitRateUl;
1158 typedef struct drbQos
1160 QosType fiveQiType; /* Dynamic or non-dynamic */
1163 NonDynFiveQi nonDyn5Qi;
1166 NgRanAllocAndRetPri ngRanRetPri;
1167 GrbQosInfo grbQosInfo;
1168 uint16_t pduSessionId;
1169 uint32_t ulPduSessAggMaxBitRate;
1172 typedef struct ulLcCfg
1177 PBitRate pbr; // prioritisedBitRate
1178 BucketSizeDur bsd; // bucketSizeDuration
1181 typedef struct duLcCfg
1183 LcPriority lcp; // logical Channel Prioritization
1186 typedef struct lcCfg
1188 ConfigType configType;
1197 typedef struct modulationInfo
1199 uint8_t modOrder; /* Modulation order */
1200 uint8_t mcsIndex; /* MCS Index */
1201 McsTable mcsTable; /* MCS table */
1204 typedef struct macUeCfg
1209 bool macCellGrpCfgPres;
1210 MacCellGrpCfg macCellGrpCfg;
1211 bool phyCellGrpCfgPres;
1212 PhyCellGrpCfg phyCellGrpCfg;
1214 SpCellCfg spCellCfg;
1216 ModulationInfo dlModInfo; /* DL modulation info */
1217 ModulationInfo ulModInfo; /* UL modulation info */
1219 LcCfg lcCfgList[MAX_NUM_LC];
1220 UeCfgState macUeCfgState; /* InActive / Completed */
1223 typedef struct nrcgi
1229 typedef struct srbFailInfo
1235 typedef struct drbFailInfo
1241 typedef struct sCellFailInfo
1247 typedef struct ueCfgRsp
1252 uint8_t numSRBFailed; /* valid values : 0 to MAX_NUM_SRB */
1253 SRBFailInfo *failedSRBlisti;
1254 uint8_t numDRBFailed; /* valid values : 0 to MAX_NUM_DRB */
1255 DRBFailInfo *failedDRBlist;
1256 uint8_t numSCellFailed; /* valid values : 0 to MAX_NUM_SCELL */
1257 SCellFailInfo *failedSCellList;
1260 typedef struct ueDelete
1267 typedef struct ueDeleteRsp
1271 UeDeleteStatus result;
1274 typedef struct macCellDelete
1279 typedef struct macCellDeleteRsp
1282 CellDeleteStatus result;
1285 /* Functions for slot Ind from MAC to DU APP*/
1286 typedef uint8_t (*DuMacCellUpInd) ARGS((
1288 OduCellId *cellId ));
1290 /* Functions for stop Ind from MAC to DU APP*/
1291 typedef uint8_t (*DuMacStopInd) ARGS((
1293 OduCellId *cellId ));
1295 /* Functions for mac cell start req */
1296 typedef uint8_t (*DuMacCellStart) ARGS((
1298 OduCellId *cellId));
1300 /* Functions for mac cell stop request */
1301 typedef uint8_t (*DuMacCellStop) ARGS((
1303 OduCellId *cellId ));
1305 /* Function pointers for packing macCellCfg Request and Confirm */
1306 typedef uint8_t (*packMacCellCfgReq) ARGS((
1308 MacCellCfg *macCellCfg ));
1310 typedef uint8_t (*packMacCellCfgConfirm) ARGS((
1312 MacCellCfgCfm *macCellCfgCfm ));
1314 typedef uint8_t (*DuMacCellCfgReq) ARGS((
1316 MacCellCfg *macCellCfg));
1318 typedef uint8_t (*DuMacCellCfgCfm) ARGS((
1320 MacCellCfgCfm *macCellCfgCfm ));
1322 /* Functions for UL CCCH Ind from MAC to DU APP*/
1323 typedef uint8_t (*DuMacUlCcchInd) ARGS((
1325 UlCcchIndInfo *ulCcchIndInfo ));
1327 /* Functions for DL CCCH Ind from DU APP to MAC*/
1328 typedef uint8_t (*DuMacDlCcchInd) ARGS((
1330 DlCcchIndInfo *dlCcchIndInfo ));
1332 /* UE create Request from DU APP to MAC*/
1333 typedef uint8_t (*DuMacUeCreateReq) ARGS((
1337 /* UE create Response from MAC to DU APP */
1338 typedef uint8_t (*MacDuUeCfgRspFunc) ARGS((
1340 MacUeCfgRsp *cfgRsp));
1342 /* UE Reconfig Request from DU APP to MAC*/
1343 typedef uint8_t (*DuMacUeReconfigReq) ARGS((
1347 /* UE Delete Request from DU APP to MAC*/
1348 typedef uint8_t (*DuMacUeDeleteReq) ARGS((
1350 MacUeDelete *ueDel ));
1352 /* UE Delete Response from MAC to DU APP*/
1353 typedef uint8_t (*MacDuUeDeleteRspFunc) ARGS((
1355 MacUeDeleteRsp *deleteRsp));
1357 /* Cell Delete Request from DU APP to MAC*/
1358 typedef uint8_t (*DuMacCellDeleteReq) ARGS((
1360 MacCellDelete *cellDelete ));
1362 /* Cell Delete Response from MAC to DU APP*/
1363 typedef uint8_t (*MacDuCellDeleteRspFunc) ARGS((
1365 MacCellDeleteRsp *cellDeleteRsp));
1367 uint8_t packMacCellUpInd(Pst *pst, OduCellId *cellId);
1368 uint8_t unpackMacCellUpInd(DuMacCellUpInd func, Pst *pst, Buffer *mBuf);
1369 uint8_t duHandleCellUpInd(Pst *pst, OduCellId *cellId);
1370 uint8_t packMacCellStart(Pst *pst, OduCellId *cellId);
1371 uint8_t unpackMacCellStart(DuMacCellStart func, Pst *pst, Buffer *mBuf);
1372 uint8_t MacProcCellStart(Pst *pst, OduCellId *cellId);
1373 uint8_t packMacCellStop(Pst *pst, OduCellId *cellId);
1374 uint8_t unpackMacCellStop(DuMacCellStop func, Pst *pst, Buffer *mBuf);
1375 uint8_t MacProcCellStop(Pst *pst, OduCellId *cellId);
1376 uint8_t packMacCellCfg(Pst *pst, MacCellCfg *macCellCfg);
1377 uint8_t unpackDuMacCellCfg(DuMacCellCfgReq func, Pst *pst, Buffer *mBuf);
1378 uint8_t MacProcCellCfgReq(Pst *pst, MacCellCfg *macCellCfg);
1379 uint8_t packMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm);
1380 uint8_t unpackMacCellCfgCfm(DuMacCellCfgCfm func, Pst *pst, Buffer *mBuf);
1381 uint8_t duHandleMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm);
1382 uint8_t packMacStopInd(Pst *pst, OduCellId *cellId);
1383 uint8_t unpackMacStopInd(DuMacStopInd func, Pst *pst, Buffer *mBuf);
1384 uint8_t duHandleStopInd(Pst *pst, OduCellId *cellId);
1385 uint8_t packMacUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo);
1386 uint8_t unpackMacUlCcchInd(DuMacUlCcchInd func, Pst *pst, Buffer *mBuf);
1387 uint8_t duHandleUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo);
1388 uint8_t packMacDlCcchInd(Pst *pst, DlCcchIndInfo *dlCcchIndInfo);
1389 uint8_t unpackMacDlCcchInd(DuMacDlCcchInd func, Pst *pst, Buffer *mBuf);
1390 uint8_t MacProcDlCcchInd(Pst *pst, DlCcchIndInfo *dlCcchIndInfo);
1391 uint8_t packDuMacUeCreateReq(Pst *pst, MacUeCfg *ueCfg);
1392 uint8_t unpackMacUeCreateReq(DuMacUeCreateReq func, Pst *pst, Buffer *mBuf);
1393 uint8_t MacProcUeCreateReq(Pst *pst, MacUeCfg *ueCfg);
1394 uint8_t sendStopIndMacToDuApp(uint16_t cellId);
1395 uint8_t packDuMacUeCfgRsp(Pst *pst, MacUeCfgRsp *cfgRsp);
1396 uint8_t unpackDuMacUeCfgRsp(MacDuUeCfgRspFunc func, Pst *pst, Buffer *mBuf);
1397 uint8_t DuProcMacUeCfgRsp(Pst *pst, MacUeCfgRsp *cfgRsp);
1398 uint8_t packDuMacUeReconfigReq(Pst *pst, MacUeCfg *ueCfg);
1399 uint8_t unpackMacUeReconfigReq(DuMacUeReconfigReq func, Pst *pst, Buffer *mBuf);
1400 uint8_t MacProcUeReconfigReq(Pst *pst, MacUeCfg *ueCfg);
1401 uint8_t packDuMacUeDeleteReq(Pst *pst, MacUeDelete *ueDelete);
1402 uint8_t MacProcUeDeleteReq(Pst *pst, MacUeDelete *ueDelete);
1403 uint8_t unpackMacUeDeleteReq(DuMacUeDeleteReq func, Pst *pst, Buffer *mBuf);
1404 uint8_t packDuMacUeDeleteRsp(Pst *pst, MacUeDeleteRsp *deleteRsp);
1405 uint8_t DuProcMacUeDeleteRsp(Pst *pst, MacUeDeleteRsp *deleteRsp);
1406 uint8_t unpackDuMacUeDeleteRsp(MacDuUeDeleteRspFunc func, Pst *pst, Buffer *mBuf);
1407 uint8_t packDuMacCellDeleteReq(Pst *pst, MacCellDelete *cellDelete);
1408 uint8_t MacProcCellDeleteReq(Pst *pst, MacCellDelete *cellDelete);
1409 uint8_t unpackMacCellDeleteReq(DuMacCellDeleteReq func, Pst *pst, Buffer *mBuf);
1410 uint8_t packDuMacCellDeleteRsp(Pst *pst, MacCellDeleteRsp *cellDeleteRsp);
1411 uint8_t DuProcMacCellDeleteRsp(Pst *pst, MacCellDeleteRsp *cellDeleteRsp);
1412 uint8_t unpackDuMacCellDeleteRsp(MacDuCellDeleteRspFunc func, Pst *pst, Buffer *mBuf);
1417 /**********************************************************************
1419 **********************************************************************/