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 *******************************************************************************/
20 #define EVENT_SCH_GEN_CFG 1
21 #define EVENT_SCH_CELL_CFG 2
22 #define EVENT_SCH_CELL_CFG_CFM 3
23 #define EVENT_DL_SCH_INFO 4
24 #define EVENT_UL_SCH_INFO 5
25 #define EVENT_RACH_IND_TO_SCH 6
26 #define EVENT_CRC_IND_TO_SCH 7
27 #define EVENT_DL_RLC_BO_INFO_TO_SCH 8
28 #define EVENT_ADD_UE_CONFIG_REQ_TO_SCH 9
29 #define EVENT_UE_CONFIG_RSP_TO_MAC 10
30 #define EVENT_SLOT_IND_TO_SCH 11
31 #define EVENT_SHORT_BSR 12
32 #define EVENT_UCI_IND_TO_SCH 13
33 #define EVENT_MODIFY_UE_CONFIG_REQ_TO_SCH 14
34 #define EVENT_UE_RECONFIG_RSP_TO_MAC 15
35 #define EVENT_UE_DELETE_REQ_TO_SCH 16
36 #define EVENT_UE_DELETE_RSP_TO_MAC 17
37 #define EVENT_CELL_DELETE_REQ_TO_SCH 18
38 #define EVENT_CELL_DELETE_RSP_TO_MAC 19
39 #define EVENT_LONG_BSR 20
40 #define EVENT_SLICE_CFG_REQ_TO_SCH 21
41 #define EVENT_SLICE_CFG_RSP_TO_MAC 22
42 #define EVENT_SLICE_RECFG_REQ_TO_SCH 23
43 #define EVENT_SLICE_RECFG_RSP_TO_MAC 24
44 #define EVENT_RACH_RESOURCE_REQUEST_TO_SCH 25
45 #define EVENT_RACH_RESOURCE_RESPONSE_TO_MAC 26
46 #define EVENT_RACH_RESOURCE_RELEASE_TO_SCH 27
47 #define EVENT_PAGING_IND_TO_SCH 28
48 #define EVENT_DL_PAGING_ALLOC 29
49 #define EVENT_DL_REL_HQ_PROC 30
50 #define EVENT_DL_HARQ_IND_TO_SCH 31
52 #define MAX_SSB_IDX 1 /* forcing it as 1 for now. Right value is 64 */
53 #define SCH_SSB_MASK_SIZE 1
55 #define MAX_NUM_PRG 1 /* max value should be later 275 */
56 #define MAX_DIG_BF_INTERFACES 0 /* max value should be later 255 */
57 #define MAX_CODEWORDS 1 /* max should be 2 */
58 #define SCH_HARQ_PROC_ID 1 /* harq proc id */
59 #define SCH_ALLOC_TYPE_1 1 /*sch res alloc type */
61 /* Datatype in UL SCH Info */
62 #define SCH_DATATYPE_PUSCH 1
63 #define SCH_DATATYPE_PUSCH_UCI 2
64 #define SCH_DATATYPE_UCI 4
65 #define SCH_DATATYPE_SRS 8
66 #define SCH_DATATYPE_PRACH 16
68 #define MAX_NUMBER_OF_CRC_IND_BITS 1
69 #define MAX_NUMBER_OF_UCI_IND_BITS 1
70 #define MAX_SR_BITS_IN_BYTES 1
71 #define MAX_HARQ_BITS_IN_BYTES 1
72 #define MAX_NUM_LOGICAL_CHANNEL_GROUPS 8
73 #define MAX_NUM_SR_CFG_PER_CELL_GRP 8 /* Max number of scheduling request config per cell group */
74 #define MAX_NUM_TAGS 4 /* Max number of timing advance groups */
75 #define MAX_NUM_BWP 4 /* Max number of BWP per serving cell */
76 #define MAX_NUM_CRSET 3 /* Max number of control resource set in add/modify/release list */
77 #define MAX_NUM_SEARCH_SPC 10 /* Max number of search space in add/modify/release list */
78 #define FREQ_DOM_RSRC_SIZE 6 /* i.e. 6 bytes because Size of frequency domain resource is 45 bits */
79 #define MONITORING_SYMB_WITHIN_SLOT_SIZE 2 /* i.e. 2 bytes because size of monitoring symbols within slot is 14 bits */
80 #define MAX_NUM_DL_ALLOC 16 /* Max number of pdsch time domain downlink allocation */
81 #define MAX_NUM_UL_ALLOC 16 /* Max number of pusch time domain uplink allocation */
83 /* PUCCH Configuration Macro */
84 #define MAX_NUM_PUCCH_RESRC 128
85 #define MAX_NUM_PUCCH_RESRC_SET 4
86 #define MAX_NUM_PUCCH_PER_RESRC_SET 32
87 #define MAX_NUM_SPATIAL_RELATIONS 8
88 #define MAX_NUM_PUCCH_P0_PER_SET 8
89 #define MAX_NUM_PATH_LOSS_REF_RS 4
90 #define MAX_NUM_DL_DATA_TO_UL_ACK 15
91 #define QPSK_MODULATION 2
93 #define RAR_PAYLOAD_SIZE 10 /* As per spec 38.321, sections 6.1.5 and 6.2.3, RAR PDU is 8 bytes long and 2 bytes of padding */
94 #define TX_PAYLOAD_HDR_LEN 32 /* Intel L1 requires adding a 32 byte header to transmitted payload */
95 #define UL_TX_BUFFER_SIZE 5
97 #define MAX_NUM_CONFIG_SLOTS 160 /*Max number of slots as per the numerology*/
98 #define MAX_NUM_K0_IDX 16 /* Max number of pdsch time domain downlink allocation */
99 #define MAX_NUM_K1_IDX 8 /* As per spec 38.213 section 9.2.3 Max number of PDSCH-to-HARQ resource indication */
100 #define MIN_NUM_K1_IDX 4 /* Min K1 values */
101 #define MAX_NUM_K2_IDX 16 /* PUSCH time domain UL resource allocation list */
102 #define DEFAULT_K0_VALUE 0 /* As per 38.331, PDSCH-TimeDomainResourceAllocation field descriptions */
103 /* As per 38.331, PUSCH-TimeDomainResourceAllocationList field descriptions */
104 #define DEFAULT_K2_VALUE_FOR_SCS15 1
105 #define DEFAULT_K2_VALUE_FOR_SCS30 1
106 #define DEFAULT_K2_VALUE_FOR_SCS60 2
107 #define DEFAULT_K2_VALUE_FOR_SCS120 3
110 #define DL_DMRS_SYMBOL_POS 4 /* Bitmap value 00000000000100 i.e. using 3rd symbol for PDSCH DMRS */
112 #define ADD_DELTA_TO_TIME(crntTime, toFill, incr, numOfSlot) \
114 if ((crntTime.slot + incr) > (numOfSlot - 1)) \
116 toFill.sfn = (crntTime.sfn + 1); \
120 toFill.sfn = crntTime.sfn; \
122 toFill.slot = (crntTime.slot + incr) % numOfSlot; \
123 if (toFill.sfn >= MAX_SFN) \
125 toFill.sfn%=MAX_SFN; \
133 RRC_CONNECTED_USERS_RSRC
153 RESOURCE_UNAVAILABLE,
190 TIME_ALIGNMENT_TIMER_MS500,
191 TIME_ALIGNMENT_TIMER_MS750,
192 TIME_ALIGNMENT_TIMER_MS1280,
193 TIME_ALIGNMENT_TIMER_MS1920,
194 TIME_ALIGNMENT_TIMER_MS2560,
195 TIME_ALIGNMENT_TIMER_MS5120,
196 TIME_ALIGNMENT_TIMER_MS10240,
197 TIME_ALIGNMENT_TIMER_INFINITE
198 }SchTimeAlignmentTimer;
202 PHR_PERIODIC_TIMER_SF10,
203 PHR_PERIODIC_TIMER_SF20,
204 PHR_PERIODIC_TIMER_SF50,
205 PHR_PERIODIC_TIMER_SF100,
206 PHR_PERIODIC_TIMER_SF200,
207 PHR_PERIODIC_TIMER_SF500,
208 PHR_PERIODIC_TIMER_SF1000,
209 PHR_PERIODIC_TIMER_INFINITE
210 }SchPhrPeriodicTimer;
214 PHR_PROHIBIT_TIMER_SF0,
215 PHR_PROHIBIT_TIMER_SF10,
216 PHR_PROHIBIT_TIMER_SF20,
217 PHR_PROHIBIT_TIMER_SF50,
218 PHR_PROHIBIT_TIMER_SF100,
219 PHR_PROHIBIT_TIMER_SF200,
220 PHR_PROHIBIT_TIMER_SF500,
221 PHR_PROHIBIT_TIMER_SF1000
222 }SchPhrProhibitTimer;
226 PHR_TX_PWR_FACTOR_CHANGE_DB1,
227 PHR_TX_PWR_FACTOR_CHANGE_DB3,
228 PHR_TX_PWR_FACTOR_CHANGE_DB6,
229 PHR_TX_PWR_FACTOR_CHANGE_INFINITE
230 }SchPhrTxPwrFactorChange;
240 HARQ_ACK_CODEBOOK_SEMISTATIC,
241 HARQ_ACK_CODEBOOK_DYNAMIC
242 }SchPdschHarqAckCodebook;
246 NUM_HARQ_PROC_FOR_PDSCH_N2,
247 NUM_HARQ_PROC_FOR_PDSCH_N4,
248 NUM_HARQ_PROC_FOR_PDSCH_N6,
249 NUM_HARQ_PROC_FOR_PDSCH_N10,
250 NUM_HARQ_PROC_FOR_PDSCH_N16
251 }SchNumHarqProcForPdsch;
255 MAX_CODE_BLOCK_GROUP_PER_TB_N2,
256 MAX_CODE_BLOCK_GROUP_PER_TB_N4,
257 MAX_CODE_BLOCK_GROUP_PER_TB_N6,
258 MAX_CODE_BLOCK_GROUP_PER_TB_N8
259 }SchMaxCodeBlkGrpPerTB;
263 PDSCH_X_OVERHEAD_XOH_6,
264 PDSCH_X_OVERHEAD_XOH_12,
265 PDSCH_X_OVERHEAD_XOH_18
270 DMRS_ADDITIONAL_POS0,
271 DMRS_ADDITIONAL_POS1,
273 }SchDmrsAdditionPosition;
277 RESOURCE_ALLOCTION_TYPE_0,
278 RESOURCE_ALLOCTION_TYPE_1,
279 RESOURCE_ALLOCTION_DYN_SWITCH
280 }SchResourceAllocType;
284 TIME_DOMAIN_RSRC_ALLOC_MAPPING_TYPE_A,
285 TIME_DOMAIN_RSRC_ALLOC_MAPPING_TYPE_B
286 }SchTimeDomRsrcAllocMappingType;
290 ENABLED_TRANSFORM_PRECODER,
291 DISABLED_TRANSFORM_PRECODER
292 }SchTransformPrecoder;
296 INTERLEAVED_CCE_REG_MAPPING = 1,
297 NONINTERLEAVED_CCE_REG_MAPPING
302 SLOT_PERIODICITY_AND_OFFSET_SL_1 = 1,
303 SLOT_PERIODICITY_AND_OFFSET_SL_2,
304 SLOT_PERIODICITY_AND_OFFSET_SL_4,
305 SLOT_PERIODICITY_AND_OFFSET_SL_5,
306 SLOT_PERIODICITY_AND_OFFSET_SL_8,
307 SLOT_PERIODICITY_AND_OFFSET_SL_10,
308 SLOT_PERIODICITY_AND_OFFSET_SL_16,
309 SLOT_PERIODICITY_AND_OFFSET_SL_20,
310 SLOT_PERIODICITY_AND_OFFSET_SL_40,
311 SLOT_PERIODICITY_AND_OFFSET_SL_80,
312 SLOT_PERIODICITY_AND_OFFSET_SL_160,
313 SLOT_PERIODICITY_AND_OFFSET_SL_320,
314 SLOT_PERIODICITY_AND_OFFSET_SL_640,
315 SLOT_PERIODICITY_AND_OFFSET_SL_1280,
316 SLOT_PERIODICITY_AND_OFFSET_SL_2560
317 }SchMSlotPeriodAndOffset;
327 SEARCH_SPACE_TYPE_COMMON = 1,
328 SEARCH_SPACE_TYPE_UE_SPECIFIC
333 SCH_QOS_NON_DYNAMIC = 1,
339 AGGREGATION_LEVEL_N0,
340 AGGREGATION_LEVEL_N1,
341 AGGREGATION_LEVEL_N2,
342 AGGREGATION_LEVEL_N3,
343 AGGREGATION_LEVEL_N4,
344 AGGREGATION_LEVEL_N5,
345 AGGREGATION_LEVEL_N6,
357 CODE_WORDS_SCHED_BY_DCI_N1,
358 CODE_WORDS_SCHED_BY_DCI_N2
359 }SchCodeWordsSchedByDci;
363 STATIC_BUNDLING_TYPE = 1,
364 DYNAMIC_BUNDLING_TYPE
370 SCH_SET1_SIZE_WIDEBAND,
371 SCH_SET1_SIZE_N2_WIDEBAND,
372 SCH_SET1_SIZE_N4_WIDEBAND
373 }SchBundlingSizeSet1;
378 SCH_SET2_SIZE_WIDEBAND
379 }SchBundlingSizeSet2;
421 SCH_MCS_TABLE_QAM_64,
422 SCH_MCS_TABLE_QAM_256,
423 SCH_MCS_TABLE_QAM_64_LOW_SE
436 DATA_TRANSMISSION_ALLOWED,
437 STOP_DATA_TRANSMISSION,
438 RESTART_DATA_TRANSMISSION
439 }SchDataTransmission;
442 typedef struct timeDomainAlloc
448 typedef struct resAllocType0
450 uint8_t rbBitmap[36];
453 typedef struct resAllocType1
459 typedef struct resAllocType1 FreqDomainRsrc;
461 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-32 BWP Information */
462 typedef struct bwpCfg
464 uint8_t subcarrierSpacing;
465 uint8_t cyclicPrefix;
466 FreqDomainRsrc freqAlloc;
472 uint16_t beamIdx[MAX_DIG_BF_INTERFACES];
475 typedef struct beamformingInfo
479 uint8_t digBfInterfaces;
480 Prg prg[MAX_NUM_PRG];
483 /* SIB1 PDSCH structures */
485 typedef struct codewordinfo
487 uint16_t targetCodeRate;
495 typedef struct dmrsInfo
497 uint16_t dlDmrsSymbPos;
498 uint8_t dmrsConfigType;
499 uint16_t dlDmrsScramblingId;
501 uint8_t numDmrsCdmGrpsNoData;
504 uint8_t nrOfDmrsSymbols;
508 typedef struct pdschFreqAlloc
510 uint8_t resourceAllocType;
511 /* since we are using type-1, rbBitmap excluded */
512 uint8_t rbBitmap[36];
515 uint8_t vrbPrbMapping;
518 typedef struct pdschTimeAlloc
525 typedef struct txPowerPdschInfo
527 uint8_t powerControlOffset;
528 uint8_t powerControlOffsetSS;
531 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-43 PDSCH Configuration */
532 typedef struct pdschCfg
537 uint8_t numCodewords;
538 CodewordInfo codeword[MAX_CODEWORDS];
539 uint16_t dataScramblingId;
541 uint8_t transmissionScheme;
544 PdschFreqAlloc pdschFreqAlloc;
545 PdschTimeAlloc pdschTimeAlloc;
546 BeamformingInfo beamPdschInfo;
547 TxPowerPdschInfo txPdschPower;
549 /* SIB1 PDSCH structures end */
551 /* SIB1 interface structure */
553 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-35 CORESET Configuration */
554 typedef struct coresetCfg
557 uint8_t startSymbolIndex;
558 uint8_t durationSymbols;
559 uint8_t freqDomainResource[6];
560 uint8_t cceRegMappingType;
561 uint8_t regBundleSize;
562 uint8_t interleaverSize;
565 uint8_t coresetPoolIndex;
566 uint8_t precoderGranularity;
568 uint8_t aggregationLevel;
571 typedef struct txPowerPdcchInfo
573 uint8_t beta_pdcch_1_0;
574 uint8_t powerControlOffsetSS;
577 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-42 DL-DCI Configuration */
581 uint16_t scramblingId;
582 uint16_t scramblingRnti;
585 BeamformingInfo beamPdcchInfo;
586 TxPowerPdcchInfo txPdcchPower;
590 typedef struct pdcchCfg
592 /* coreset-0 configuration */
593 CoresetCfg coresetCfg;
595 DlDCI dci; /* as of now its only one DCI, later it will be numDlCi */
597 /* end of SIB1 PDCCH structures */
599 typedef struct schPcchCfg
601 uint8_t numPO; /*Derived from Ns*/
602 bool poPresent; /*FirstPDCCH-MonitoringPO is present or not*/
603 uint16_t pagingOcc[MAX_PO_PER_PF]; /*FirstPDCCH-Monitoring Paging Occasion*/
606 typedef struct schPdcchConfigSib1
608 uint8_t coresetZeroIndex; /* derived from 4 LSB of pdcchSib1 present in MIB */
609 uint8_t searchSpaceZeroIndex; /* derived from 4 MSB of pdcchSib1 present in MIB */
612 typedef struct schRachCfgGeneric
614 uint8_t prachCfgIdx; /* PRACH config idx */
615 uint8_t msg1Fdm; /* PRACH FDM (1,2,4,8) */
616 uint16_t msg1FreqStart; /* Msg1-FrequencyStart */
617 uint8_t zeroCorrZoneCfg; /* Zero correlation zone cofig */
618 int16_t preambleRcvdTargetPower;
619 uint8_t preambleTransMax;
620 uint8_t pwrRampingStep;
621 uint8_t raRspWindow; /* RA Response Window */
624 typedef struct schRachCfg
626 SchRachCfgGeneric prachCfgGeneric;
627 uint8_t totalNumRaPreamble; /* Total number of RA preambles */
628 uint8_t ssbPerRach; /* SSB per RACH occassion */
629 uint8_t numCbPreamblePerSsb; /* Number of CB preamble per SSB */
630 uint8_t raContResTmr; /* RA Contention Resoultion Timer */
631 uint8_t rsrpThreshSsb; /* RSRP Threshold SSB */
632 uint16_t rootSeqIdx; /* Root sequence index */
633 uint16_t rootSeqLen; /* root sequence length */
634 uint8_t numRootSeq; /* Number of root sequences required for FD */
635 uint8_t msg1SubcSpacing; /* Subcarrier spacing of RACH */
638 typedef struct schBwpParams
640 FreqDomainRsrc freqAlloc;
642 uint8_t cyclicPrefix;
645 typedef struct schCandidatesInfo
654 typedef struct schSearchSpaceCfg
656 uint8_t searchSpaceId;
658 uint8_t freqDomainRsrc[FREQ_DOM_RSRC_SIZE]; /* Frequency domain resource */
659 uint16_t monitoringSlot;
661 uint16_t monitoringSymbol;
662 SchCandidatesInfo candidate;
665 typedef struct schPdcchCfgCmn
667 SchSearchSpaceCfg commonSearchSpace;
668 uint8_t raSearchSpaceId;
671 typedef struct schPdschCfgCmnTimeDomRsrcAlloc
676 uint8_t lengthSymbol;
677 }SchPdschCfgCmnTimeDomRsrcAlloc;
679 typedef struct schPdschCfgCmn
681 uint8_t numTimeDomAlloc;
682 SchPdschCfgCmnTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_DL_ALLOC];
685 typedef struct schPucchCfgCmn
687 uint8_t pucchResourceCommon;
688 uint8_t pucchGroupHopping;
691 /* PUSCH Time Domain Resource Allocation */
692 typedef struct schPuschTimeDomRsrcAlloc
695 SchTimeDomRsrcAllocMappingType mappingType;
697 uint8_t symbolLength;
698 }SchPuschTimeDomRsrcAlloc;
700 typedef struct schPuschCfgCmn
702 uint8_t numTimeDomRsrcAlloc;
703 SchPuschTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_UL_ALLOC]; /* PUSCH time domain UL resource allocation list */
706 typedef struct schK1TimingInfo
709 uint8_t k1Indexes[MAX_NUM_K1_IDX];
712 typedef struct schK0TimingInfo
715 SchK1TimingInfo k1TimingInfo;
718 typedef struct schK0K1TimingInfo
721 SchK0TimingInfo k0Indexes[MAX_NUM_K0_IDX];
724 typedef struct schK0K1TimingInfoTbl
727 SchK0K1TimingInfo k0k1TimingInfo[MAX_NUM_CONFIG_SLOTS];
728 }SchK0K1TimingInfoTbl;
730 typedef struct schBwpDlCfg
733 SchPdcchCfgCmn pdcchCommon;
734 SchPdschCfgCmn pdschCommon;
737 typedef struct schK2TimingInfo
740 uint8_t k2Indexes[MAX_NUM_K2_IDX];
743 typedef struct schK2TimingInfoTbl
746 SchK2TimingInfo k2TimingInfo[MAX_NUM_CONFIG_SLOTS];
749 typedef struct schBwpUlCfg
752 SchRachCfg schRachCfg; /* PRACH config */
753 SchPucchCfgCmn pucchCommon;
754 SchPuschCfgCmn puschCommon;
757 typedef struct schPlmnInfoList
760 uint8_t numSliceSupport; /* Total slice supporting */
761 Snssai **snssai; /* List of supporting snssai*/
765 /* The following list of structures is taken from the DRX-Config section of specification 33.331. */
767 typedef struct schDrxOnDurationTimer
769 bool onDurationTimerValInMs;
772 uint8_t subMilliSeconds;
773 uint16_t milliSeconds;
774 }onDurationtimerValue;
775 }SchDrxOnDurationTimer;
777 typedef struct schDrxLongCycleStartOffset
779 uint16_t drxLongCycleStartOffsetChoice;
780 uint16_t drxLongCycleStartOffsetVal;
781 }SchDrxLongCycleStartOffset;
783 typedef struct schShortDrx
785 uint16_t drxShortCycle;
786 uint8_t drxShortCycleTimer;
789 typedef struct schDrxCfg
791 SchDrxOnDurationTimer drxOnDurationTimer;
792 uint16_t drxInactivityTimer;
793 uint8_t drxHarqRttTimerDl;
794 uint8_t drxHarqRttTimerUl;
795 uint16_t drxRetransmissionTimerDl;
796 uint16_t drxRetransmissionTimerUl;
797 SchDrxLongCycleStartOffset drxLongCycleStartOffset;
799 SchShortDrx shortDrx;
800 uint8_t drxSlotOffset;
804 /*Spec 38.331 'NrNsPmaxList'*/
805 typedef struct schNrNsPmaxList
808 long additionalSpectrumEmission;
811 /*Spec 38.331 'FrequencyInfoDL-SIB'*/
812 typedef struct schMultiFreqBandListSib
815 SchNrNsPmaxList nrNsPmaxList[1];
816 }SchMultiFreqBandListSib;
818 /*Spec 38.331 'SCS-SpecificCarrier'*/
819 typedef struct schScsSpecificCarrier
821 uint16_t offsetToCarrier;
822 uint8_t subCarrierSpacing;
824 uint16_t txDirectCurrentLoc;
825 }SchScsSpecificCarrier;
827 /*Spec 38.331 'FrequencyInfoDL-SIB'*/
828 typedef struct schFreqInfoDlSib
830 SchMultiFreqBandListSib mutiFreqBandList[1];
831 uint16_t offsetToPointA;
832 SchScsSpecificCarrier schSpcCarrier[1];
835 typedef struct schBcchCfg
840 /*Spec 38.331 'DownlinkConfigCommonSIB'*/
841 typedef struct schDlCfgCommon
843 SchFreqInfoDlSib schFreqInfoDlSib;
844 SchBwpDlCfg schInitialDlBwp; /* Initial DL BWP */
845 SchBcchCfg schBcchCfg;
846 SchPcchCfg schPcchCfg;
849 /*Spec 38.331 'FrequencyInfoUL-SIB'*/
850 typedef struct schFreqInfoUlSib
852 SchMultiFreqBandListSib mutiFreqBandList[1];
853 uint16_t absoluteFreqPointA;
854 SchScsSpecificCarrier schSpcCarrier[1];
856 bool frequencyShift7p5khz;
859 /*Spec 38.331 'UplinkConfigCommonSIB '*/
860 typedef struct schUlCfgCommon
862 SchFreqInfoUlSib schFreqInfoUlSib;
863 SchBwpUlCfg schInitialUlBwp; /* Initial DL BWP */
864 uint16_t schTimeAlignTimer;
867 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.3.2.1*/
868 typedef struct schCellCfg
870 uint16_t cellId; /* Cell Id */
874 uint16_t phyCellId; /* Physical cell id */
875 SchPlmnInfoList plmnInfoList[MAX_PLMN]; /* Consits of PlmnId and Snssai list */
876 SchDuplexMode dupMode; /* Duplex type: TDD/FDD */
877 uint8_t numerology; /* Supported numerology */
878 uint8_t dlBandwidth; /* Supported B/W */
879 uint8_t ulBandwidth; /* Supported B/W */
880 SchDlCfgCommon dlCfgCommon; /*Spec 38.331 DownlinkConfigCommonSIB*/
881 SchUlCfgCommon ulCfgCommon; /*Spec 38.331 UplinkConfigCommonSIB*/
883 TDDCfg tddCfg; /* Spec 38.331 tdd-UL-DL-ConfigurationCommon */
886 /*Ref:Spec 38.331 "ssb-PositionsInBurst", Value 0 in Bitmap => corresponding SS/PBCH block is not transmitted
887 *value 1 => corresponding SS/PBCH block is transmitted*/
888 uint32_t ssbPosInBurst[SCH_SSB_MASK_SIZE]; /* Bitmap for actually transmitted SSB. */
889 SchSSBPeriod ssbPeriod; /* SSB Periodicity in msec */
890 uint32_t ssbFrequency; /* SB frequency in kHz*/
891 uint8_t dmrsTypeAPos;
892 uint8_t scsCommon; /* subcarrier spacing for common [0-3]*/
893 SchPdcchConfigSib1 pdcchCfgSib1; /* Req to configure CORESET#0 and SearchSpace#0*/
894 uint32_t ssbPbchPwr; /* SSB block power */
895 uint8_t ssbSubcOffset; /* Subcarrier Offset(Kssb) */
899 typedef struct schCellCfgCfm
901 uint16_t cellId; /* Cell Id */
903 SchFailureCause cause;
906 typedef struct ssbInfo
908 uint8_t ssbIdx; /* SSB Index */
909 TimeDomainAlloc tdAlloc; /* Time domain allocation */
910 FreqDomainRsrc fdAlloc; /* Freq domain allocation */
913 typedef struct sib1AllocInfo
916 PdcchCfg *sib1PdcchCfg;
919 typedef struct prachSchInfo
921 uint8_t numPrachOcas; /* Num Prach Ocassions */
922 uint8_t prachFormat; /* PRACH Format */
923 uint8_t numRa; /* Freq domain ocassion */
924 uint8_t prachStartSymb; /* Freq domain ocassion */
927 /* Interface structure signifying DL broadcast allocation for SSB, SIB1 */
928 typedef struct dlBrdcstAlloc
930 uint16_t crnti; /* SI-RNTI */
931 /* Ssb transmission is determined as follows:
932 * 0 : No tranamission
933 * 1 : SSB Transmission
934 * 2 : SSB Repetition */
935 uint8_t ssbTransmissionMode;
936 uint8_t ssbIdxSupported;
937 SsbInfo ssbInfo[MAX_SSB_IDX];
938 bool systemInfoIndicator;
940 /* Sib1 transmission is determined as follows:
941 * 0 : No tranamission
942 * 1 : SIB1 Transmission
943 * 2 : SIB1 Repetition */
944 uint8_t sib1TransmissionMode;
945 Sib1AllocInfo sib1Alloc;
948 typedef struct msg3UlGrant
952 FreqDomainRsrc msg3FreqAlloc;
959 typedef struct rarInfo
965 uint8_t rarPdu[RAR_PAYLOAD_SIZE];
969 typedef struct rarAlloc
974 PdcchCfg *rarPdcchCfg;
975 PdschCfg *rarPdschCfg;
978 typedef struct lcSchInfo
984 typedef struct ceSchInfo
990 typedef struct freqDomainAlloc
992 uint8_t resAllocType; /* Resource allocation type */
1000 typedef struct transportBlock
1007 CeSchInfo ceSchInfo[MAX_NUM_LC];
1009 LcSchInfo lcSchInfo[MAX_NUM_LC];
1012 typedef struct dlMsgSchedInfo
1015 uint8_t dciFormatId;
1016 uint8_t harqProcNum;
1018 uint8_t dlAssignIdx;
1020 uint8_t pucchResInd;
1021 uint8_t harqFeedbackInd;
1022 uint16_t dlMsgPduLen;
1024 FreqDomainAlloc freqAlloc;
1025 TimeDomainAlloc timeAlloc;
1027 TransportBlock transportBlock[2];
1029 PdcchCfg *dlMsgPdcchCfg;
1030 PdschCfg *dlMsgPdschCfg;
1033 typedef struct schSlotValue
1035 SlotTimingInfo currentTime;
1036 SlotTimingInfo broadcastTime;
1037 SlotTimingInfo rarTime;
1038 SlotTimingInfo dlMsgTime;
1039 SlotTimingInfo ulDciTime;
1043 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-36 DCI Format0_0 Configuration */
1044 typedef struct format0_0
1046 uint8_t resourceAllocType;
1047 FreqDomainAlloc freqAlloc;
1048 TimeDomainAlloc timeAlloc;
1059 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-40 DCI Format 0_1 Configuration */
1060 typedef struct format0_1
1062 uint8_t carrierIndicator;
1064 uint8_t bwpIndicator;
1065 uint8_t resourceAlloc;
1066 FreqDomainRsrc freqAlloc;
1067 TimeDomainAlloc timeAlloc;
1074 uint8_t firstDownlinkAssignmentIndex;
1075 uint8_t secondDownlinkAssignmentIndex;
1077 uint8_t srsResourceSetIndicator;
1078 uint8_t srsResourceIndicator;
1080 uint8_t antennaPorts;
1083 uint8_t cbgTransmissionInfo;
1085 uint8_t betaOffsetIndicator;
1086 bool dmrsSequenceInitialization;
1087 bool ulschIndicatior;
1090 typedef struct dciFormat
1092 FormatType formatType; /* DCI Format */
1095 Format0_0 format0_0; /* Format 0_0 */
1096 Format0_1 format0_1; /* Format 0_1 */
1100 typedef struct dciInfo
1102 uint16_t crnti; /* CRNTI */
1103 BwpCfg bwpCfg; /* BWP Cfg */
1104 CoresetCfg coresetCfg; /* Coreset1 Cfg */
1105 DciFormat dciFormatInfo; /* Dci Format */
1106 DlDCI dciInfo; /* DlDCI */
1110 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Section 11.2.4.3.8 DL Scheduling Information */
1111 typedef struct dlSchedInfo
1113 uint16_t cellId; /* Cell Id */
1114 SchSlotValue schSlotValue;
1116 /* Allocation for broadcast messages */
1117 bool isBroadcastPres;
1118 DlBrdcstAlloc brdcstAlloc;
1120 /* Allocation for RAR message */
1121 RarAlloc *rarAlloc[MAX_NUM_UE];
1123 /* UL grant in response to BSR */
1126 /* Allocation from dedicated DL msg */
1127 DlMsgSchInfo *dlMsgAlloc[MAX_NUM_UE];
1131 /*Reference: O-RAN.WG8.AAD.v7.0.0, Sec 11.2.3.3.13 Downlink Paging Allocation*/
1132 typedef struct interleaved_t
1134 uint8_t regBundleSize;
1135 uint8_t interleaverSize;
1136 uint16_t shiftIndex;
1139 typedef struct pageDlDci
1141 uint8_t freqDomainResource[6];
1142 uint8_t durationSymbols;
1143 uint8_t cceRegMappingType;
1146 Interleaved interleaved;
1147 uint8_t nonInterleaved;
1149 uint8_t ssStartSymbolIndex;
1151 uint8_t aggregLevel;
1152 uint8_t precoderGranularity;
1153 uint8_t coreSetSize;
1156 typedef struct resAllocType1 PageFreqDomainAlloc;
1158 typedef struct pageTimeDomainAlloc
1160 uint8_t mappingType;
1163 }PageTimeDomainAlloc;
1165 typedef struct pageDmrsConfig
1169 uint8_t nrOfDmrsSymbols;
1172 typedef struct pageTbInfo
1178 typedef struct pageDlSch
1180 PageFreqDomainAlloc freqAlloc;
1181 PageTimeDomainAlloc timeAlloc;
1182 PageDmrsConfig dmrs;
1183 uint8_t vrbPrbMapping;
1186 uint16_t dlPagePduLen;
1190 typedef struct dlPageAlloc
1193 SlotTimingInfo dlPageTime;
1198 PageDlDci pageDlDci;
1199 PageDlSch pageDlSch;
1202 typedef struct tbInfo
1204 uint8_t mcs; /* MCS */
1205 uint8_t ndi; /* NDI */
1206 uint8_t rv; /* Redundancy Version */
1207 uint16_t tbSize; /* TB Size */
1208 uint8_t qamOrder; /* Modulation Order */
1209 SchMcsTable mcsTable; /* MCS Table */
1212 typedef struct schPuschInfo
1214 uint8_t harqProcId; /* HARQ Process ID */
1215 FreqDomainAlloc fdAlloc; /* Freq domain allocation */
1216 TimeDomainAlloc tdAlloc; /* Time domain allocation */
1217 TbInfo tbInfo; /* TB info */
1219 uint8_t dmrsMappingType;
1220 uint8_t nrOfDmrsSymbols;
1225 typedef struct harqInfo
1227 uint16_t harqAckBitLength;
1228 uint8_t betaOffsetHarqAck;
1231 typedef struct csiInfo
1234 uint8_t betaOffsetCsi;
1237 typedef struct harqAckInfo
1239 uint16_t harqBitLength;
1242 typedef struct csiPartInfo
1247 typedef struct schPucchFormatCfg
1249 uint8_t interSlotFreqHop;
1251 uint8_t maxCodeRate;
1257 typedef struct schPucchInfo
1259 FreqDomainAlloc fdAlloc;
1260 TimeDomainAlloc tdAlloc;
1262 HarqFdbkInfo harqInfo;
1263 csiFdbkInfo csiInfo;
1264 BeamformingInfo beamPucchInfo;
1265 uint8_t pucchFormat;
1266 uint8_t intraFreqHop;
1267 uint16_t secondPrbHop;
1268 uint8_t initialCyclicShift;
1276 typedef struct schPuschUci
1278 uint8_t harqProcId; /* HARQ Process ID */
1279 FreqDomainAlloc fdAlloc; /* Freq domain allocation */
1280 TimeDomainAlloc tdAlloc; /* Time domain allocation */
1281 TbInfo tbInfo; /* TB information */
1282 HarqInfo harqInfo; /* Harq Information */
1283 CsiInfo csiInfo; /* Csi information*/
1286 typedef struct ulSchedInfo
1288 uint16_t cellId; /* Cell Id */
1289 uint16_t crnti; /* CRNI */
1290 SlotTimingInfo slotIndInfo; /* Slot Info: sfn, slot number */
1291 uint8_t dataType; /* Type of info being scheduled */
1292 SchPrachInfo prachSchInfo; /* Prach scheduling info */
1293 SchPuschInfo schPuschInfo; /* Pusch scheduling info */
1294 SchPuschUci schPuschUci; /* Pusch Uci */
1295 SchPucchInfo schPucchInfo; /* Pucch and Uci scheduling info */
1298 typedef struct rachIndInfo
1302 SlotTimingInfo timingInfo;
1306 uint8_t preambleIdx;
1311 typedef struct crcIndInfo
1315 SlotTimingInfo timingInfo;
1317 uint8_t crcInd[MAX_NUMBER_OF_CRC_IND_BITS];
1320 typedef struct boInfo
1323 uint32_t dataVolume;
1326 typedef struct dlRlcBOInfo
1331 uint32_t dataVolume;
1334 /* Info of Scheduling Request to Add/Modify */
1335 typedef struct schSchedReqInfo
1338 SchSrProhibitTimer srProhibitTmr;
1339 SchSrTransMax srTransMax;
1342 /* Scheduling Request Configuration */
1343 typedef struct schSchedReqCfg
1345 uint8_t addModListCount;
1346 SchSchedReqInfo addModList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* List of Scheduling req to be added/modified */
1347 uint8_t relListCount;
1348 uint8_t relList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* list of scheduling request Id to be deleted */
1351 /* Info of Tag to Add/Modify */
1352 typedef struct schTagInfo
1355 SchTimeAlignmentTimer timeAlignmentTmr;
1358 /* Timing Advance Group Configuration */
1359 typedef struct schTagCfg
1361 uint8_t addModListCount;
1362 SchTagInfo addModList[MAX_NUM_TAGS]; /* List of Tag to Add/Modify */
1363 uint8_t relListCount;
1364 uint8_t relList[MAX_NUM_TAGS]; /* list of Tag Id to release */
1367 /* Configuration for Power headroom reporting */
1368 typedef struct schPhrCfg
1370 SchPhrPeriodicTimer periodicTmr;
1371 SchPhrProhibitTimer prohibitTmr;
1372 SchPhrTxPwrFactorChange txpowerFactorChange;
1375 bool type2OtherCell;
1376 SchPhrModeOtherCG modeOtherCG;
1379 /* MAC cell Group configuration */
1380 typedef struct schMacCellGrpCfg
1382 SchSchedReqCfg schedReqCfg;
1384 SchPhrCfg phrCfg; /* To be used only if phrCfgSetupPres is true */
1387 SchDrxCfg drxCfg; /* Drx configuration */
1391 /* Physical Cell Group Configuration */
1392 typedef struct schPhyCellGrpCfg
1394 SchPdschHarqAckCodebook pdschHarqAckCodebook;
1398 /* Control resource set info */
1399 typedef struct schControlRsrcSet
1401 uint8_t cRSetId; /* Control resource set id */
1402 uint8_t freqDomainRsrc[FREQ_DOM_RSRC_SIZE]; /* Frequency domain resource */
1404 SchREGMappingType cceRegMappingType;
1405 SchPrecoderGranul precoderGranularity;
1406 uint16_t dmrsScramblingId;
1409 /* Search Space info */
1410 typedef struct schSearchSpace
1412 uint8_t searchSpaceId;
1414 SchMSlotPeriodAndOffset mSlotPeriodicityAndOffset;
1415 uint8_t mSymbolsWithinSlot[MONITORING_SYMB_WITHIN_SLOT_SIZE];
1416 SchAggrLevel numCandidatesAggLevel1; /* Number of candidates for aggregation level 1 */
1417 SchAggrLevel numCandidatesAggLevel2; /* Number of candidates for aggregation level 2 */
1418 SchAggrLevel numCandidatesAggLevel4; /* Number of candidates for aggregation level 4 */
1419 SchAggrLevel numCandidatesAggLevel8; /* Number of candidates for aggregation level 8 */
1420 SchAggrLevel numCandidatesAggLevel16; /* Number of candidates for aggregation level 16 */
1421 SchSearchSpaceType searchSpaceType;
1422 uint8_t ueSpecificDciFormat;
1425 /* PDCCH cofniguration */
1426 typedef struct schPdcchConfig
1428 uint8_t numCRsetToAddMod;
1429 SchControlRsrcSet cRSetToAddModList[MAX_NUM_CRSET]; /* List of control resource set to add/modify */
1430 uint8_t numCRsetToRel;
1431 uint8_t cRSetToRelList[MAX_NUM_CRSET]; /* List of control resource set to release */
1432 uint8_t numSearchSpcToAddMod;
1433 SchSearchSpace searchSpcToAddModList[MAX_NUM_SEARCH_SPC]; /* List of search space to add/modify */
1434 uint8_t numSearchSpcToRel;
1435 uint8_t searchSpcToRelList[MAX_NUM_SEARCH_SPC]; /* List of search space to release */
1438 /* PDSCH time domain resource allocation */
1439 typedef struct schPdschTimeDomRsrcAlloc
1442 SchTimeDomRsrcAllocMappingType mappingType;
1443 uint8_t startSymbol;
1444 uint8_t symbolLength;
1445 }SchPdschTimeDomRsrcAlloc;
1448 typedef struct schPdschBundling
1450 struct schStaticBundling
1452 SchBundlingSizeSet2 size;
1454 struct schDynamicBundling
1456 SchBundlingSizeSet1 sizeSet1;
1457 SchBundlingSizeSet2 sizeSet2;
1458 }SchDynamicBundling;
1461 /* DMRS downlink configuration */
1462 typedef struct schDmrsDlCfg
1464 SchDmrsAdditionPosition addPos; /* DMRS additional position */
1467 /* PDSCH Configuration */
1468 typedef struct schPdschConfig
1470 SchDmrsDlCfg dmrsDlCfgForPdschMapTypeA;
1471 SchResourceAllocType resourceAllocType;
1472 uint8_t numTimeDomRsrcAlloc;
1473 SchPdschTimeDomRsrcAlloc timeDomRsrcAllociList[MAX_NUM_DL_ALLOC]; /* PDSCH time domain DL resource allocation list */
1475 SchCodeWordsSchedByDci numCodeWordsSchByDci; /* Number of code words scheduled by DCI */
1476 SchBundlingType bundlingType;
1477 SchPdschBundling bundlingInfo;
1480 /* Initial Downlink BWP */
1481 typedef struct schInitalDlBwp
1484 SchPdcchConfig pdcchCfg;
1486 SchPdschConfig pdschCfg;
1488 SchK0K1TimingInfoTbl k0K1InfoTbl;
1491 /* BWP Downlink common */
1492 typedef struct schBwpDlCommon
1496 /* Downlink BWP information */
1497 typedef struct schDlBwpInfo
1502 /* PDCCH Serving Cell configuration */
1503 typedef struct schPdschServCellCfg
1505 uint8_t *maxMimoLayers;
1506 SchNumHarqProcForPdsch numHarqProcForPdsch;
1507 SchMaxCodeBlkGrpPerTB *maxCodeBlkGrpPerTb;
1508 bool *codeBlkGrpFlushInd;
1509 SchPdschXOverhead *xOverhead;
1510 }SchPdschServCellCfg;
1512 /* PUCCH Configuration */
1513 typedef struct schPucchResrcSetInfo
1516 uint8_t resrcListCount;
1517 uint8_t resrcList[MAX_NUM_PUCCH_PER_RESRC_SET];
1518 uint8_t maxPayLoadSize;
1519 }SchPucchResrcSetInfo;
1521 typedef struct schPucchResrcSetCfg
1523 uint8_t resrcSetToAddModListCount;
1524 SchPucchResrcSetInfo resrcSetToAddModList[MAX_NUM_PUCCH_RESRC_SET];
1525 uint8_t resrcSetToRelListCount;
1526 uint8_t resrcSetToRelList[MAX_NUM_PUCCH_RESRC];
1527 }SchPucchResrcSetCfg;
1529 typedef struct schPucchFormat0
1531 uint8_t initialCyclicShift;
1533 uint8_t startSymbolIdx;
1536 typedef struct schPucchFormat1
1538 uint8_t initialCyclicShift;
1540 uint8_t startSymbolIdx;
1544 typedef struct schPucchFormat2_3
1548 uint8_t startSymbolIdx;
1551 typedef struct schPucchFormat4
1556 uint8_t startSymbolIdx;
1559 typedef struct schPucchResrcInfo
1563 uint8_t intraFreqHop;
1564 uint16_t secondPrbHop;
1565 uint8_t pucchFormat;
1567 SchPucchFormat0 *format0;
1568 SchPucchFormat1 *format1;
1569 SchPucchFormat2_3 *format2;
1570 SchPucchFormat2_3 *format3;
1571 SchPucchFormat4 *format4;
1575 typedef struct schPucchResrcCfg
1577 uint8_t resrcToAddModListCount;
1578 SchPucchResrcInfo resrcToAddModList[MAX_NUM_PUCCH_RESRC];
1579 uint8_t resrcToRelListCount;
1580 uint8_t resrcToRelList[MAX_NUM_PUCCH_RESRC];
1584 typedef struct schSchedReqResrcInfo
1588 uint8_t periodicity;
1591 }SchSchedReqResrcInfo;
1593 typedef struct schPucchSchedReqCfg
1595 uint8_t schedAddModListCount;
1596 SchSchedReqResrcInfo schedAddModList[MAX_NUM_SR_CFG_PER_CELL_GRP];
1597 uint8_t schedRelListCount;
1598 uint8_t schedRelList[MAX_NUM_SR_CFG_PER_CELL_GRP];
1599 }SchPucchSchedReqCfg;
1601 typedef struct schSpatialRelationInfo
1603 uint8_t spatialRelationId;
1604 uint8_t servCellIdx;
1605 uint8_t pathLossRefRSId;
1607 uint8_t closeLoopIdx;
1608 }SchSpatialRelationInfo;
1610 typedef struct schPucchSpatialCfg
1612 uint8_t spatialAddModListCount;
1613 SchSpatialRelationInfo spatialAddModList[MAX_NUM_SPATIAL_RELATIONS];
1614 uint8_t spatialRelListCount;
1615 uint8_t spatialRelList[MAX_NUM_SPATIAL_RELATIONS];
1616 }SchPucchSpatialCfg;
1618 typedef struct schP0PucchCfg
1624 typedef struct schPathLossRefRSCfg
1626 uint8_t pathLossRefRSId;
1627 }SchPathLossRefRSCfg;
1629 typedef struct schPucchMultiCsiCfg
1631 uint8_t multiCsiResrcListCount;
1632 uint8_t multiCsiResrcList[MAX_NUM_PUCCH_RESRC-1];
1633 }SchPucchMultiCsiCfg;
1635 typedef struct schPucchDlDataToUlAck
1637 uint8_t dlDataToUlAckListCount;
1638 uint8_t dlDataToUlAckList[MAX_NUM_DL_DATA_TO_UL_ACK];
1639 }SchPucchDlDataToUlAck;
1641 typedef struct schPucchPowerControl
1649 SchP0PucchCfg p0Set[MAX_NUM_PUCCH_P0_PER_SET];
1650 uint8_t pathLossRefRSListCount;
1651 SchPathLossRefRSCfg pathLossRefRSList[MAX_NUM_PATH_LOSS_REF_RS];
1652 }SchPucchPowerControl;
1654 typedef struct schPucchCfg
1656 SchPucchResrcSetCfg *resrcSet;
1657 SchPucchResrcCfg *resrc;
1658 SchPucchFormatCfg *format1;
1659 SchPucchFormatCfg *format2;
1660 SchPucchFormatCfg *format3;
1661 SchPucchFormatCfg *format4;
1662 SchPucchSchedReqCfg *schedReq;
1663 SchPucchMultiCsiCfg *multiCsiCfg;
1664 SchPucchSpatialCfg *spatialInfo;
1665 SchPucchDlDataToUlAck *dlDataToUlAck;
1666 SchPucchPowerControl *powerControl;
1669 /* Transform precoding disabled */
1670 typedef struct schTransPrecodDisabled
1672 uint16_t scramblingId0;
1673 }SchTransPrecodDisabled;
1675 /* DMRS Uplink configuration */
1676 typedef struct SchDmrsUlCfg
1678 SchDmrsAdditionPosition addPos; /* DMRS additional position */
1679 SchTransPrecodDisabled transPrecodDisabled; /* Transform precoding disabled */
1682 /* PUSCH Configuration */
1683 typedef struct schPuschCfg
1685 uint8_t dataScramblingId;
1686 SchDmrsUlCfg dmrsUlCfgForPuschMapTypeA;
1687 SchResourceAllocType resourceAllocType;
1688 uint8_t numTimeDomRsrcAlloc;
1689 SchPuschTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_UL_ALLOC]; /* PUSCH time domain UL resource allocation list */
1690 SchTransformPrecoder transformPrecoder;
1693 /* Initial Uplink BWP */
1694 typedef struct schInitialUlBwp
1697 SchPucchCfg pucchCfg;
1699 SchPuschCfg puschCfg;
1701 SchK2TimingInfoTbl k2InfoTbl;
1704 /* Uplink BWP information */
1705 typedef struct schUlBwpInfo
1710 /* Serving cell configuration */
1711 typedef struct schServCellRecfgInfo
1713 SchInitalDlBwp initDlBwp;
1714 uint8_t numDlBwpToAddOrMod;
1715 SchDlBwpInfo dlBwpToAddOrModList[MAX_NUM_BWP];
1716 uint8_t numDlBwpToRel;
1717 SchDlBwpInfo dlBwpToRelList[MAX_NUM_BWP];
1718 uint8_t firstActvDlBwpId;
1719 uint8_t defaultDlBwpId;
1720 uint8_t *bwpInactivityTmr;
1721 SchPdschServCellCfg pdschServCellCfg;
1722 SchInitialUlBwp initUlBwp;
1723 uint8_t numUlBwpToAddOrMod;
1724 SchUlBwpInfo ulBwpToAddOrModList[MAX_NUM_BWP];
1725 uint8_t numUlBwpToRel;
1726 SchUlBwpInfo ulBwpToRelList[MAX_NUM_BWP];
1727 uint8_t firstActvUlBwpId;
1728 }SchServCellRecfgInfo;
1730 /* Serving cell configuration */
1731 typedef struct schServCellCfgInfo
1733 SchInitalDlBwp initDlBwp;
1734 uint8_t numDlBwpToAdd;
1735 SchDlBwpInfo dlBwpToAddList[MAX_NUM_BWP];
1736 uint8_t firstActvDlBwpId;
1737 uint8_t defaultDlBwpId;
1738 uint8_t *bwpInactivityTmr;
1739 SchPdschServCellCfg pdschServCellCfg;
1740 SchInitialUlBwp initUlBwp;
1741 uint8_t numUlBwpToAdd;
1742 SchUlBwpInfo ulBwpToAddList[MAX_NUM_BWP];
1743 uint8_t firstActvUlBwpId;
1744 }SchServCellCfgInfo;
1746 typedef struct schNonDynFiveQi
1751 uint16_t maxDataBurstVol;
1754 typedef struct schDynFiveQi
1757 uint16_t packetDelayBudget;
1758 uint8_t packetErrRateScalar;
1759 uint8_t packetErrRateExp;
1761 uint8_t delayCritical;
1763 uint16_t maxDataBurstVol;
1766 typedef struct schNgRanAllocAndRetPri
1768 uint8_t priorityLevel;
1769 uint8_t preEmptionCap;
1770 uint8_t preEmptionVul;
1771 }SchNgRanAllocAndRetPri;
1773 typedef struct schGrbQosFlowInfo
1775 uint32_t maxFlowBitRateDl;
1776 uint32_t maxFlowBitRateUl;
1777 uint32_t guarFlowBitRateDl;
1778 uint32_t guarFlowBitRateUl;
1782 typedef struct schDrbQos
1784 SchQosType fiveQiType; /* Dynamic or non-dynamic */
1787 SchNonDynFiveQi nonDyn5Qi;
1788 SchDynFiveQi dyn5Qi;
1790 SchNgRanAllocAndRetPri ngRanRetPri;
1791 SchGrbQosFlowInfo grbQosFlowInfo;
1792 uint16_t pduSessionId;
1793 uint32_t ulPduSessAggMaxBitRate; /* UL PDU Session Aggregate max bit rate */
1796 /* Special cell configuration */
1797 typedef struct schSpCellCfg
1799 uint8_t servCellIdx;
1800 SchServCellCfgInfo servCellCfg;
1803 /* Special cell Reconfiguration */
1804 typedef struct schSpCellRecfg
1806 uint8_t servCellIdx;
1807 SchServCellRecfgInfo servCellRecfg;
1810 /* Uplink logical channel configuration */
1811 typedef struct SchUlLcCfg
1816 uint8_t pbr; // prioritisedBitRate
1817 uint8_t bsd; // bucketSizeDuration
1820 /* Downlink logical channel configuration */
1821 typedef struct schDlLcCfg
1823 uint8_t lcp; // logical Channel Prioritization
1826 /* Logical Channel configuration */
1827 typedef struct schLcCfg
1831 SchDrbQosInfo *drbQos;
1836 /* Aggregate max bit rate */
1837 typedef struct schAmbrCfg
1839 uint32_t ulBr; /* Ul BitRate */
1842 typedef struct schModulationInfo
1846 SchMcsTable mcsTable;
1849 /* UE configuration */
1850 typedef struct schUeCfgReq
1856 bool macCellGrpCfgPres;
1857 SchMacCellGrpCfg macCellGrpCfg;
1858 bool phyCellGrpCfgPres;
1859 SchPhyCellGrpCfg phyCellGrpCfg;
1861 SchSpCellCfg spCellCfg;
1862 SchAmbrCfg *ambrCfg;
1863 SchModulationInfo dlModInfo;
1864 SchModulationInfo ulModInfo;
1865 uint8_t numLcsToAdd;
1866 SchLcCfg schLcCfg[MAX_NUM_LC];
1869 /* UE Re-configuration */
1870 typedef struct schUeRecfgReq
1876 bool macCellGrpRecfgPres;
1877 SchMacCellGrpCfg macCellGrpRecfg;
1878 bool phyCellGrpRecfgPres;
1879 SchPhyCellGrpCfg phyCellGrpRecfg;
1880 bool spCellRecfgPres;
1881 SchSpCellRecfg spCellRecfg;
1882 SchAmbrCfg *ambrRecfg;
1883 SchModulationInfo dlModInfo;
1884 SchModulationInfo ulModInfo;
1885 uint8_t numLcsToAdd;
1886 SchLcCfg schLcCfgAdd[MAX_NUM_LC];
1887 uint8_t numLcsToDel;
1888 uint8_t lcIdToDel[MAX_NUM_LC];
1889 uint8_t numLcsToMod;
1890 SchLcCfg schLcCfgMod[MAX_NUM_LC];
1891 SchDataTransmission dataTransmissionInfo;
1893 bool drxConfigIndicatorRelease;
1897 typedef struct schUeCfgRsp
1904 SchFailureCause cause;
1907 /*As per WG8, UE ReCFG and UECFG have same structure definition*/
1908 typedef struct schUeCfgRsp SchUeRecfgRsp;
1910 typedef struct schRachRsrcReq
1912 SlotTimingInfo slotInd;
1916 uint8_t ssbIdx[MAX_NUM_SSB];
1919 typedef struct schCfraSsbResource
1922 uint8_t raPreambleIdx;
1923 }SchCfraSsbResource;
1925 typedef struct schCfraRsrc
1928 SchCfraSsbResource ssbResource[MAX_NUM_SSB];
1931 typedef struct schRachRsrcRsp
1936 SchCfraResource cfraResource;
1939 typedef struct schRachRsrcRel
1941 SlotTimingInfo slotInd;
1944 SchCfraResource cfraResource;
1947 typedef struct schUeDelete
1953 typedef struct schUeDeleteRsp
1961 typedef struct schCellDeleteReq
1967 typedef struct schCellDeleteRsp
1971 SchFailureCause cause;
1974 typedef struct dataVolInfo
1980 typedef struct ulBufferStatusRptInd
1986 DataVolInfo dataVolInfo[MAX_NUM_LOGICAL_CHANNEL_GROUPS];
1987 }UlBufferStatusRptInd;
1989 typedef struct srUciIndInfo
1993 SlotTimingInfo slotInd;
1995 uint8_t srPayload[MAX_SR_BITS_IN_BYTES];
1998 typedef struct dlHarqInd
2002 SlotTimingInfo slotInd;
2004 uint8_t harqPayload[MAX_HARQ_BITS_IN_BYTES];
2007 typedef struct schRrmPolicyRatio
2011 uint8_t dedicatedRatio;
2014 typedef struct schRrmPolicyOfSlice
2017 SchRrmPolicyRatio rrmPolicyRatioInfo;
2018 }SchRrmPolicyOfSlice;
2020 typedef struct schSliceCfgReq
2022 uint8_t numOfConfiguredSlice;
2023 SchRrmPolicyOfSlice **listOfSlices;
2026 typedef struct sliceRsp
2033 typedef struct schSliceCfgRsp
2035 uint8_t numSliceCfgRsp;
2036 SliceRsp **listOfSliceCfgRsp;
2039 /*As per ORAN-WG8, Slice Cfg and Recfg are same structures*/
2040 typedef struct schSliceCfgReq SchSliceRecfgReq;
2041 typedef struct schSliceCfgRsp SchSliceRecfgRsp;
2043 typedef struct schPageInd
2052 typedef struct schUeHqInfo
2058 typedef struct schRlsHqInfo
2062 SchUeHqInfo *ueHqInfo;
2065 /* function declarations */
2066 uint8_t schActvInit(Ent entity, Inst instId, Region region, Reason reason);
2067 uint8_t MacMessageRouter(Pst *pst, void *msg);
2068 uint8_t SchMessageRouter(Pst *pst, void *msg);
2070 /**********************************************************************
2072 **********************************************************************/