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
51 #define EVENT_DL_CQI_TO_SCH 32
52 #define EVENT_UL_CQI_TO_SCH 33
53 #define EVENT_PHR_IND_TO_SCH 34
54 #define EVENT_STATISTICS_REQ_TO_SCH 35
55 #define EVENT_STATISTICS_RSP_TO_MAC 36
56 #define EVENT_STATISTICS_IND_TO_MAC 37
57 #define EVENT_STATISTICS_DELETE_REQ_TO_SCH 38
58 #define EVENT_STATISTICS_DELETE_RSP_TO_MAC 39
59 #define EVENT_STATISTICS_MODIFY_REQ_TO_SCH 40
60 #define EVENT_STATISTICS_MODIFY_RSP_TO_MAC 41
63 #define MAX_SSB_IDX 1 /* forcing it as 1 for now. Right value is 64 */
64 #define SCH_SSB_MASK_SIZE 1
66 #define MAX_NUM_PRG 1 /* max value should be later 275 */
67 #define MAX_DIG_BF_INTERFACES 0 /* max value should be later 255 */
68 #define MAX_CODEWORDS 1 /* max should be 2 */
69 #define SCH_HARQ_PROC_ID 1 /* harq proc id */
70 #define SCH_ALLOC_TYPE_1 1 /*sch res alloc type */
72 /* Datatype in UL SCH Info */
73 #define SCH_DATATYPE_PUSCH 1
74 #define SCH_DATATYPE_PUSCH_UCI 2
75 #define SCH_DATATYPE_UCI 4
76 #define SCH_DATATYPE_SRS 8
77 #define SCH_DATATYPE_PRACH 16
79 #define MAX_NUMBER_OF_CRC_IND_BITS 1
80 #define MAX_NUMBER_OF_UCI_IND_BITS 1
81 #define MAX_SR_BITS_IN_BYTES 1
82 #define MAX_HARQ_BITS_IN_BYTES 1
83 #define MAX_NUM_LOGICAL_CHANNEL_GROUPS 8
84 #define MAX_NUM_SR_CFG_PER_CELL_GRP 8 /* Max number of scheduling request config per cell group */
85 #define MAX_NUM_TAGS 4 /* Max number of timing advance groups */
86 #define MAX_NUM_BWP 4 /* Max number of BWP per serving cell */
87 #define MAX_NUM_CRSET 3 /* Max number of control resource set in add/modify/release list */
88 #define MAX_NUM_SEARCH_SPC 10 /* Max number of search space in add/modify/release list */
89 #define FREQ_DOM_RSRC_SIZE 6 /* i.e. 6 bytes because Size of frequency domain resource is 45 bits */
90 #define MONITORING_SYMB_WITHIN_SLOT_SIZE 2 /* i.e. 2 bytes because size of monitoring symbols within slot is 14 bits */
91 #define MAX_NUM_DL_ALLOC 16 /* Max number of pdsch time domain downlink allocation */
92 #define MAX_NUM_UL_ALLOC 16 /* Max number of pusch time domain uplink allocation */
94 /* PUCCH Configuration Macro */
95 #define MAX_NUM_PUCCH_RESRC 128
96 #define MAX_NUM_PUCCH_RESRC_SET 4
97 #define MAX_NUM_PUCCH_PER_RESRC_SET 32
98 #define MAX_NUM_SPATIAL_RELATIONS 8
99 #define MAX_NUM_PUCCH_P0_PER_SET 8
100 #define MAX_NUM_PATH_LOSS_REF_RS 4
101 #define MAX_NUM_DL_DATA_TO_UL_ACK 15
102 #define QPSK_MODULATION 2
104 #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 */
105 #define TX_PAYLOAD_HDR_LEN 32 /* Intel L1 requires adding a 32 byte header to transmitted payload */
106 #define UL_TX_BUFFER_SIZE 5
108 #define MAX_NUM_CONFIG_SLOTS 160 /*Max number of slots as per the numerology*/
109 #define MAX_NUM_K0_IDX 16 /* Max number of pdsch time domain downlink allocation */
110 #define MAX_NUM_K1_IDX 8 /* As per spec 38.213 section 9.2.3 Max number of PDSCH-to-HARQ resource indication */
111 #define MIN_NUM_K1_IDX 4 /* Min K1 values */
112 #define MAX_NUM_K2_IDX 16 /* PUSCH time domain UL resource allocation list */
113 #define DEFAULT_K0_VALUE 0 /* As per 38.331, PDSCH-TimeDomainResourceAllocation field descriptions */
114 /* As per 38.331, PUSCH-TimeDomainResourceAllocationList field descriptions */
115 #define DEFAULT_K2_VALUE_FOR_SCS15 1
116 #define DEFAULT_K2_VALUE_FOR_SCS30 1
117 #define DEFAULT_K2_VALUE_FOR_SCS60 2
118 #define DEFAULT_K2_VALUE_FOR_SCS120 3
121 #define DL_DMRS_SYMBOL_POS 4 /* Bitmap value 00000000000100 i.e. using 3rd symbol for PDSCH DMRS */
123 #define MAX_PHR_REPORT 1 /*TODO: Range of PHR reports in multiple PHR.*/
124 #define MAX_FAILURE_DET_RESOURCES 10 /*Spec 38.331 'maxNrofFailureDetectionResources'*/
126 #define ADD_DELTA_TO_TIME(crntTime, toFill, incr, numOfSlot) \
128 if ((crntTime.slot + incr) > (numOfSlot - 1)) \
130 toFill.sfn = (crntTime.sfn + 1); \
134 toFill.sfn = crntTime.sfn; \
136 toFill.slot = (crntTime.slot + incr) % numOfSlot; \
137 if (toFill.sfn >= MAX_SFN) \
139 toFill.sfn%=MAX_SFN; \
147 RRC_CONNECTED_USERS_RSRC
183 TIME_ALIGNMENT_TIMER_MS500,
184 TIME_ALIGNMENT_TIMER_MS750,
185 TIME_ALIGNMENT_TIMER_MS1280,
186 TIME_ALIGNMENT_TIMER_MS1920,
187 TIME_ALIGNMENT_TIMER_MS2560,
188 TIME_ALIGNMENT_TIMER_MS5120,
189 TIME_ALIGNMENT_TIMER_MS10240,
190 TIME_ALIGNMENT_TIMER_INFINITE
191 }SchTimeAlignmentTimer;
195 PHR_PERIODIC_TIMER_SF10,
196 PHR_PERIODIC_TIMER_SF20,
197 PHR_PERIODIC_TIMER_SF50,
198 PHR_PERIODIC_TIMER_SF100,
199 PHR_PERIODIC_TIMER_SF200,
200 PHR_PERIODIC_TIMER_SF500,
201 PHR_PERIODIC_TIMER_SF1000,
202 PHR_PERIODIC_TIMER_INFINITE
203 }SchPhrPeriodicTimer;
207 PHR_PROHIBIT_TIMER_SF0,
208 PHR_PROHIBIT_TIMER_SF10,
209 PHR_PROHIBIT_TIMER_SF20,
210 PHR_PROHIBIT_TIMER_SF50,
211 PHR_PROHIBIT_TIMER_SF100,
212 PHR_PROHIBIT_TIMER_SF200,
213 PHR_PROHIBIT_TIMER_SF500,
214 PHR_PROHIBIT_TIMER_SF1000
215 }SchPhrProhibitTimer;
219 PHR_TX_PWR_FACTOR_CHANGE_DB1,
220 PHR_TX_PWR_FACTOR_CHANGE_DB3,
221 PHR_TX_PWR_FACTOR_CHANGE_DB6,
222 PHR_TX_PWR_FACTOR_CHANGE_INFINITE
223 }SchPhrTxPwrFactorChange;
233 HARQ_ACK_CODEBOOK_SEMISTATIC,
234 HARQ_ACK_CODEBOOK_DYNAMIC
235 }SchPdschHarqAckCodebook;
239 NUM_HARQ_PROC_FOR_PDSCH_N2,
240 NUM_HARQ_PROC_FOR_PDSCH_N4,
241 NUM_HARQ_PROC_FOR_PDSCH_N6,
242 NUM_HARQ_PROC_FOR_PDSCH_N10,
243 NUM_HARQ_PROC_FOR_PDSCH_N16
244 }SchNumHarqProcForPdsch;
248 MAX_CODE_BLOCK_GROUP_PER_TB_N2,
249 MAX_CODE_BLOCK_GROUP_PER_TB_N4,
250 MAX_CODE_BLOCK_GROUP_PER_TB_N6,
251 MAX_CODE_BLOCK_GROUP_PER_TB_N8
252 }SchMaxCodeBlkGrpPerTB;
256 PDSCH_X_OVERHEAD_XOH_6,
257 PDSCH_X_OVERHEAD_XOH_12,
258 PDSCH_X_OVERHEAD_XOH_18
263 DMRS_ADDITIONAL_POS0,
264 DMRS_ADDITIONAL_POS1,
266 }SchDmrsAdditionPosition;
270 RESOURCE_ALLOCTION_TYPE_0,
271 RESOURCE_ALLOCTION_TYPE_1,
272 RESOURCE_ALLOCTION_DYN_SWITCH
273 }SchResourceAllocType;
277 TIME_DOMAIN_RSRC_ALLOC_MAPPING_TYPE_A,
278 TIME_DOMAIN_RSRC_ALLOC_MAPPING_TYPE_B
279 }SchTimeDomRsrcAllocMappingType;
283 ENABLED_TRANSFORM_PRECODER,
284 DISABLED_TRANSFORM_PRECODER
285 }SchTransformPrecoder;
289 INTERLEAVED_CCE_REG_MAPPING = 1,
290 NONINTERLEAVED_CCE_REG_MAPPING
295 SLOT_PERIODICITY_SL_1 = 1,
296 SLOT_PERIODICITY_SL_2,
297 SLOT_PERIODICITY_SL_4,
298 SLOT_PERIODICITY_SL_5,
299 SLOT_PERIODICITY_SL_8,
300 SLOT_PERIODICITY_SL_10,
301 SLOT_PERIODICITY_SL_16,
302 SLOT_PERIODICITY_SL_20,
303 SLOT_PERIODICITY_SL_40,
304 SLOT_PERIODICITY_SL_80,
305 SLOT_PERIODICITY_SL_160,
306 SLOT_PERIODICITY_SL_320,
307 SLOT_PERIODICITY_SL_640,
308 SLOT_PERIODICITY_SL_1280,
309 SLOT_PERIODICITY_SL_2560
310 }SchMSlotPeriodicity;
320 SEARCH_SPACE_TYPE_COMMON = 1,
321 SEARCH_SPACE_TYPE_UE_SPECIFIC
326 SCH_QOS_NON_DYNAMIC = 1,
332 AGGREGATION_LEVEL_N0,
333 AGGREGATION_LEVEL_N1,
334 AGGREGATION_LEVEL_N2,
335 AGGREGATION_LEVEL_N3,
336 AGGREGATION_LEVEL_N4,
337 AGGREGATION_LEVEL_N5,
338 AGGREGATION_LEVEL_N6,
350 CODE_WORDS_SCHED_BY_DCI_N1,
351 CODE_WORDS_SCHED_BY_DCI_N2
352 }SchCodeWordsSchedByDci;
356 STATIC_BUNDLING_TYPE = 1,
357 DYNAMIC_BUNDLING_TYPE
363 SCH_SET1_SIZE_WIDEBAND,
364 SCH_SET1_SIZE_N2_WIDEBAND,
365 SCH_SET1_SIZE_N4_WIDEBAND
366 }SchBundlingSizeSet1;
371 SCH_SET2_SIZE_WIDEBAND
372 }SchBundlingSizeSet2;
426 SCH_MCS_TABLE_QAM_64,
427 SCH_MCS_TABLE_QAM_256,
428 SCH_MCS_TABLE_QAM_64_LOW_SE
441 DATA_TRANSMISSION_ALLOWED,
442 STOP_DATA_TRANSMISSION,
443 RESTART_DATA_TRANSMISSION
444 }SchDataTransmission;
451 }SchPurposeOfFailureDet;
459 /* Performance measurements from 3GPP TS 28.552 Release 15 */
462 SCH_DL_TOTAL_PRB_USAGE,
463 SCH_UL_TOTAL_PRB_USAGE
467 typedef struct timeDomainAlloc
473 typedef struct resAllocType0
475 uint8_t rbBitmap[36];
478 typedef struct resAllocType1
484 typedef struct resAllocType1 FreqDomainRsrc;
486 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-32 BWP Information */
487 typedef struct bwpCfg
489 uint8_t subcarrierSpacing;
490 uint8_t cyclicPrefix;
491 FreqDomainRsrc freqAlloc;
497 uint16_t beamIdx[MAX_DIG_BF_INTERFACES];
500 typedef struct beamformingInfo
504 uint8_t digBfInterfaces;
505 Prg prg[MAX_NUM_PRG];
508 /* SIB1 PDSCH structures */
510 typedef struct codewordinfo
512 uint16_t targetCodeRate;
520 typedef struct dmrsInfo
522 uint16_t dlDmrsSymbPos;
523 uint8_t dmrsConfigType;
524 uint16_t dlDmrsScramblingId;
526 uint8_t numDmrsCdmGrpsNoData;
529 uint8_t nrOfDmrsSymbols;
533 typedef struct pdschFreqAlloc
535 uint8_t resourceAllocType;
536 /* since we are using type-1, rbBitmap excluded */
537 uint8_t rbBitmap[36];
540 uint8_t vrbPrbMapping;
543 typedef struct pdschTimeAlloc
550 typedef struct txPowerPdschInfo
552 uint8_t powerControlOffset;
553 uint8_t powerControlOffsetSS;
556 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-43 PDSCH Configuration */
557 typedef struct pdschCfg
562 uint8_t numCodewords;
563 CodewordInfo codeword[MAX_CODEWORDS];
564 uint16_t dataScramblingId;
566 uint8_t transmissionScheme;
569 PdschFreqAlloc pdschFreqAlloc;
570 PdschTimeAlloc pdschTimeAlloc;
571 BeamformingInfo beamPdschInfo;
572 TxPowerPdschInfo txPdschPower;
574 /* SIB1 PDSCH structures end */
576 /* SIB1 interface structure */
578 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-35 CORESET Configuration */
579 typedef struct coresetCfg
582 uint8_t startSymbolIndex;
583 uint8_t durationSymbols;
584 uint8_t freqDomainResource[6];
585 uint8_t cceRegMappingType;
586 uint8_t regBundleSize;
587 uint8_t interleaverSize;
590 uint8_t coresetPoolIndex;
591 uint8_t precoderGranularity;
593 uint8_t aggregationLevel;
596 typedef struct txPowerPdcchInfo
598 uint8_t beta_pdcch_1_0;
599 uint8_t powerControlOffsetSS;
602 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-42 DL-DCI Configuration */
606 uint16_t scramblingId;
607 uint16_t scramblingRnti;
610 BeamformingInfo beamPdcchInfo;
611 TxPowerPdcchInfo txPdcchPower;
615 typedef struct pdcchCfg
617 /* coreset-0 configuration */
618 CoresetCfg coresetCfg;
620 DlDCI dci; /* as of now its only one DCI, later it will be numDlCi */
622 /* end of SIB1 PDCCH structures */
624 typedef struct schPcchCfg
626 uint8_t numPO; /*Derived from Ns*/
627 bool poPresent; /*FirstPDCCH-MonitoringPO is present or not*/
628 uint16_t pagingOcc[MAX_PO_PER_PF]; /*FirstPDCCH-Monitoring Paging Occasion*/
631 typedef struct schPdcchConfigSib1
633 uint8_t coresetZeroIndex; /* derived from 4 LSB of pdcchSib1 present in MIB */
634 uint8_t searchSpaceZeroIndex; /* derived from 4 MSB of pdcchSib1 present in MIB */
637 typedef struct schRachCfgGeneric
639 uint8_t prachCfgIdx; /* PRACH config idx */
640 uint8_t msg1Fdm; /* PRACH FDM (1,2,4,8) */
641 uint16_t msg1FreqStart; /* Msg1-FrequencyStart */
642 uint8_t zeroCorrZoneCfg; /* Zero correlation zone cofig */
643 int16_t preambleRcvdTargetPower;
644 uint8_t preambleTransMax;
645 uint8_t pwrRampingStep;
646 uint8_t raRspWindow; /* RA Response Window */
649 typedef struct schRachCfg
651 SchRachCfgGeneric prachCfgGeneric;
652 uint8_t totalNumRaPreamble; /* Total number of RA preambles */
653 uint8_t ssbPerRach; /* SSB per RACH occassion */
654 uint8_t numCbPreamblePerSsb; /* Number of CB preamble per SSB */
655 uint8_t raContResTmr; /* RA Contention Resoultion Timer */
656 uint8_t rsrpThreshSsb; /* RSRP Threshold SSB */
657 uint16_t rootSeqIdx; /* Root sequence index */
658 uint16_t rootSeqLen; /* root sequence length */
659 uint8_t numRootSeq; /* Number of root sequences required for FD */
660 uint8_t msg1SubcSpacing; /* Subcarrier spacing of RACH */
663 typedef struct schBwpParams
665 FreqDomainRsrc freqAlloc;
667 uint8_t cyclicPrefix;
670 typedef struct schCandidatesInfo
679 typedef struct schSearchSpaceCfg
681 uint8_t searchSpaceId;
683 uint8_t freqDomainRsrc[FREQ_DOM_RSRC_SIZE]; /* Frequency domain resource */
684 uint16_t monitoringSlot;
686 uint16_t monitoringSymbol;
687 SchCandidatesInfo candidate;
690 typedef struct schPdcchCfgCmn
692 SchSearchSpaceCfg commonSearchSpace;
693 uint8_t raSearchSpaceId;
696 typedef struct schPdschCfgCmnTimeDomRsrcAlloc
701 uint8_t lengthSymbol;
702 }SchPdschCfgCmnTimeDomRsrcAlloc;
704 typedef struct schPdschCfgCmn
706 uint8_t numTimeDomAlloc;
707 SchPdschCfgCmnTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_DL_ALLOC];
710 typedef struct schPucchCfgCmn
712 uint8_t pucchResourceCommon;
713 uint8_t pucchGroupHopping;
716 /* PUSCH Time Domain Resource Allocation */
717 typedef struct schPuschTimeDomRsrcAlloc
720 SchTimeDomRsrcAllocMappingType mappingType;
722 uint8_t symbolLength;
723 }SchPuschTimeDomRsrcAlloc;
725 typedef struct schPuschCfgCmn
727 uint8_t numTimeDomRsrcAlloc;
728 SchPuschTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_UL_ALLOC]; /* PUSCH time domain UL resource allocation list */
731 typedef struct schK1TimingInfo
734 uint8_t k1Indexes[MAX_NUM_K1_IDX];
737 typedef struct schK0TimingInfo
740 SchK1TimingInfo k1TimingInfo;
743 typedef struct schK0K1TimingInfo
746 SchK0TimingInfo k0Indexes[MAX_NUM_K0_IDX];
749 typedef struct schK0K1TimingInfoTbl
752 SchK0K1TimingInfo k0k1TimingInfo[MAX_NUM_CONFIG_SLOTS];
753 }SchK0K1TimingInfoTbl;
755 typedef struct schBwpDlCfg
758 SchPdcchCfgCmn pdcchCommon;
759 SchPdschCfgCmn pdschCommon;
762 typedef struct schK2TimingInfo
765 uint8_t k2Indexes[MAX_NUM_K2_IDX];
768 typedef struct schK2TimingInfoTbl
771 SchK2TimingInfo k2TimingInfo[MAX_NUM_CONFIG_SLOTS];
774 typedef struct schBwpUlCfg
777 SchRachCfg schRachCfg; /* PRACH config */
778 SchPucchCfgCmn pucchCommon;
779 SchPuschCfgCmn puschCommon;
782 typedef struct schPlmnInfoList
785 uint8_t numSliceSupport; /* Total slice supporting */
786 Snssai **snssai; /* List of supporting snssai*/
790 /* The following list of structures is taken from the DRX-Config section of specification 33.331. */
792 typedef struct schDrxOnDurationTimer
794 bool onDurationTimerValInMs;
797 uint8_t subMilliSeconds;
798 uint16_t milliSeconds;
799 }onDurationtimerValue;
800 }SchDrxOnDurationTimer;
802 typedef struct schDrxLongCycleStartOffset
804 uint16_t drxLongCycleStartOffsetChoice;
805 uint16_t drxLongCycleStartOffsetVal;
806 }SchDrxLongCycleStartOffset;
808 typedef struct schShortDrx
810 uint16_t drxShortCycle;
811 uint8_t drxShortCycleTimer;
814 typedef struct schDrxCfg
816 SchDrxOnDurationTimer drxOnDurationTimer;
817 uint16_t drxInactivityTimer;
818 uint8_t drxHarqRttTimerDl;
819 uint8_t drxHarqRttTimerUl;
820 uint16_t drxRetransmissionTimerDl;
821 uint16_t drxRetransmissionTimerUl;
822 SchDrxLongCycleStartOffset drxLongCycleStartOffset;
824 SchShortDrx shortDrx;
825 uint8_t drxSlotOffset;
829 /*Spec 38.331 'NrNsPmaxList'*/
830 typedef struct schNrNsPmaxList
833 long additionalSpectrumEmission;
836 /*Spec 38.331 'FrequencyInfoDL-SIB'*/
837 typedef struct schMultiFreqBandListSib
840 SchNrNsPmaxList nrNsPmaxList[1];
841 }SchMultiFreqBandListSib;
843 /*Spec 38.331 'SCS-SpecificCarrier'*/
844 typedef struct schScsSpecificCarrier
846 uint16_t offsetToCarrier;
847 uint8_t subCarrierSpacing;
849 uint16_t txDirectCurrentLoc;
850 }SchScsSpecificCarrier;
852 /*Spec 38.331 'FrequencyInfoDL-SIB'*/
853 typedef struct schFreqInfoDlSib
855 SchMultiFreqBandListSib mutiFreqBandList[1];
856 uint16_t offsetToPointA;
857 SchScsSpecificCarrier schSpcCarrier[1];
860 typedef struct schBcchCfg
865 /*Spec 38.331 'DownlinkConfigCommonSIB'*/
866 typedef struct schDlCfgCommon
868 SchFreqInfoDlSib schFreqInfoDlSib;
869 SchBwpDlCfg schInitialDlBwp; /* Initial DL BWP */
870 SchBcchCfg schBcchCfg;
871 SchPcchCfg schPcchCfg;
874 /*Spec 38.331 'FrequencyInfoUL-SIB'*/
875 typedef struct schFreqInfoUlSib
877 SchMultiFreqBandListSib mutiFreqBandList[1];
878 uint16_t absoluteFreqPointA;
879 SchScsSpecificCarrier schSpcCarrier[1];
881 bool frequencyShift7p5khz;
884 /*Spec 38.331 'UplinkConfigCommonSIB '*/
885 typedef struct schUlCfgCommon
887 SchFreqInfoUlSib schFreqInfoUlSib;
888 SchBwpUlCfg schInitialUlBwp; /* Initial DL BWP */
889 uint16_t schTimeAlignTimer;
892 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.2.1 Cell Conf Request*/
893 typedef struct schCellCfg
895 uint16_t cellId; /* Cell Id */
899 uint16_t phyCellId; /* Physical cell id */
900 SchPlmnInfoList plmnInfoList[MAX_PLMN]; /* Consits of PlmnId and Snssai list */
901 SchDuplexMode dupMode; /* Duplex type: TDD/FDD */
902 uint8_t dlBandwidth; /* Supported B/W */
903 uint8_t ulBandwidth; /* Supported B/W */
904 SchDlCfgCommon dlCfgCommon; /*Spec 38.331 DownlinkConfigCommonSIB*/
905 SchUlCfgCommon ulCfgCommon; /*Spec 38.331 UplinkConfigCommonSIB*/
907 TDDCfg tddCfg; /* Spec 38.331 tdd-UL-DL-ConfigurationCommon */
910 /*Ref:Spec 38.331 "ssb-PositionsInBurst", Value 0 in Bitmap => corresponding SS/PBCH block is not transmitted
911 *value 1 => corresponding SS/PBCH block is transmitted*/
912 uint32_t ssbPosInBurst[SCH_SSB_MASK_SIZE]; /* Bitmap for actually transmitted SSB. */
913 SchSSBPeriod ssbPeriod; /* SSB Periodicity in msec */
914 uint32_t ssbFrequency; /* SB frequency in kHz*/
915 uint8_t dmrsTypeAPos;
916 uint8_t ssbScs; /* SSB subcarrier spacing*/
917 SchPdcchConfigSib1 pdcchCfgSib1; /* Req to configure CORESET#0 and SearchSpace#0*/
918 uint32_t ssbPbchPwr; /* SSB block power */
919 uint8_t ssbSubcOffset; /* Subcarrier Offset(Kssb) */
923 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.3.1 Cell Config Response*/
924 typedef struct schCellCfgCfm
926 uint16_t cellId; /* Cell Id */
931 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.2.2 Cell Del Req*/
932 typedef struct schCellDeleteReq
937 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.3.2 Cell Del Response*/
938 typedef struct schCellDeleteRsp
945 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.2.3*/
946 typedef struct schRrmPolicyRatio
950 uint8_t dedicatedRatio;
953 typedef struct schRrmPolicyOfSlice
956 SchRrmPolicyRatio rrmPolicyRatioInfo;
957 }SchRrmPolicyOfSlice;
959 typedef struct schSliceCfgReq
961 uint8_t numOfConfiguredSlice;
962 SchRrmPolicyOfSlice **listOfSlices;
965 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.3.3 Slice Cfg Response*/
966 typedef struct schSliceCfgRsp
973 /*As per ORAN-WG8 V7.0.0 Sec 11.2.4.3.4 , Slice Cfg and Recfg are same structures*/
974 typedef struct schSliceCfgReq SchSliceRecfgReq;
975 typedef struct schSliceCfgRsp SchSliceRecfgRsp;
977 typedef struct ssbInfo
979 uint8_t ssbIdx; /* SSB Index */
980 TimeDomainAlloc tdAlloc; /* Time domain allocation */
981 FreqDomainRsrc fdAlloc; /* Freq domain allocation */
984 typedef struct sib1AllocInfo
987 PdcchCfg *sib1PdcchCfg;
990 typedef struct prachSchInfo
992 uint8_t numPrachOcas; /* Num Prach Ocassions */
993 uint8_t prachFormat; /* PRACH Format */
994 uint8_t numRa; /* Freq domain ocassion */
995 uint8_t prachStartSymb; /* Freq domain ocassion */
998 /* Interface structure signifying DL broadcast allocation for SSB, SIB1 */
999 typedef struct dlBrdcstAlloc
1001 uint16_t crnti; /* SI-RNTI */
1002 /* Ssb transmission is determined as follows:
1003 * 0 : No tranamission
1004 * 1 : SSB Transmission
1005 * 2 : SSB Repetition */
1006 uint8_t ssbTransmissionMode;
1007 uint8_t ssbIdxSupported;
1008 SsbInfo ssbInfo[MAX_SSB_IDX];
1009 bool systemInfoIndicator;
1011 /* Sib1 transmission is determined as follows:
1012 * 0 : No tranamission
1013 * 1 : SIB1 Transmission
1014 * 2 : SIB1 Repetition */
1015 uint8_t sib1TransmissionMode;
1016 Sib1AllocInfo sib1Alloc;
1019 typedef struct msg3UlGrant
1021 uint8_t freqHopFlag;
1023 FreqDomainRsrc msg3FreqAlloc;
1030 typedef struct rarInfo
1034 Msg3UlGrant ulGrant;
1036 uint8_t rarPdu[RAR_PAYLOAD_SIZE];
1040 typedef struct rarAlloc
1045 PdcchCfg *rarPdcchCfg;
1046 PdschCfg *rarPdschCfg;
1049 typedef struct lcSchInfo
1055 typedef struct ceSchInfo
1061 typedef struct freqDomainAlloc
1063 uint8_t resAllocType; /* Resource allocation type */
1066 ResAllocType0 type0;
1067 ResAllocType1 type1;
1071 typedef struct transportBlock
1078 CeSchInfo ceSchInfo[MAX_NUM_LC];
1080 LcSchInfo lcSchInfo[MAX_NUM_LC];
1083 typedef struct dlMsgSchedInfo
1086 uint8_t dciFormatId;
1087 uint8_t harqProcNum;
1089 uint8_t dlAssignIdx;
1091 uint8_t pucchResInd;
1092 uint8_t harqFeedbackInd;
1093 uint16_t dlMsgPduLen;
1095 FreqDomainAlloc freqAlloc;
1096 TimeDomainAlloc timeAlloc;
1098 TransportBlock transportBlock[2];
1100 PdcchCfg *dlMsgPdcchCfg;
1101 PdschCfg *dlMsgPdschCfg;
1104 typedef struct schSlotValue
1106 SlotTimingInfo currentTime;
1107 SlotTimingInfo broadcastTime;
1108 SlotTimingInfo rarTime;
1109 SlotTimingInfo dlMsgTime;
1110 SlotTimingInfo ulDciTime;
1114 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-36 DCI Format0_0 Configuration */
1115 typedef struct format0_0
1117 uint8_t resourceAllocType;
1118 FreqDomainAlloc freqAlloc;
1119 TimeDomainAlloc timeAlloc;
1130 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-40 DCI Format 0_1 Configuration */
1131 typedef struct format0_1
1133 uint8_t carrierIndicator;
1135 uint8_t bwpIndicator;
1136 uint8_t resourceAlloc;
1137 FreqDomainRsrc freqAlloc;
1138 TimeDomainAlloc timeAlloc;
1145 uint8_t firstDownlinkAssignmentIndex;
1146 uint8_t secondDownlinkAssignmentIndex;
1148 uint8_t srsResourceSetIndicator;
1149 uint8_t srsResourceIndicator;
1151 uint8_t antennaPorts;
1154 uint8_t cbgTransmissionInfo;
1156 uint8_t betaOffsetIndicator;
1157 bool dmrsSequenceInitialization;
1158 bool ulschIndicatior;
1161 typedef struct dciFormat
1163 FormatType formatType; /* DCI Format */
1166 Format0_0 format0_0; /* Format 0_0 */
1167 Format0_1 format0_1; /* Format 0_1 */
1171 typedef struct dciInfo
1173 uint16_t crnti; /* CRNTI */
1174 BwpCfg bwpCfg; /* BWP Cfg */
1175 CoresetCfg coresetCfg; /* Coreset1 Cfg */
1176 DciFormat dciFormatInfo; /* Dci Format */
1177 DlDCI dciInfo; /* DlDCI */
1181 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Section 11.2.4.3.8 DL Scheduling Information */
1182 typedef struct dlSchedInfo
1184 uint16_t cellId; /* Cell Id */
1185 SchSlotValue schSlotValue;
1187 /* Allocation for broadcast messages */
1188 bool isBroadcastPres;
1189 DlBrdcstAlloc brdcstAlloc;
1191 /* Allocation for RAR message */
1192 RarAlloc *rarAlloc[MAX_NUM_UE];
1194 /* UL grant in response to BSR */
1197 /* Allocation from dedicated DL msg */
1198 DlMsgSchInfo *dlMsgAlloc[MAX_NUM_UE];
1202 /*Reference: O-RAN.WG8.AAD.v7.0.0, Sec 11.2.4.3.13 Downlink Paging Allocation*/
1203 typedef struct interleaved_t
1205 uint8_t regBundleSize;
1206 uint8_t interleaverSize;
1207 uint16_t shiftIndex;
1210 typedef struct pageDlDci
1212 uint8_t freqDomainResource[6];
1213 uint8_t durationSymbols;
1214 uint8_t cceRegMappingType;
1217 Interleaved interleaved;
1218 uint8_t nonInterleaved;
1220 uint8_t ssStartSymbolIndex;
1222 uint8_t aggregLevel;
1223 uint8_t precoderGranularity;
1224 uint8_t coreSetSize;
1227 typedef struct resAllocType1 PageFreqDomainAlloc;
1229 typedef struct pageTimeDomainAlloc
1231 uint8_t mappingType;
1234 }PageTimeDomainAlloc;
1236 typedef struct pageDmrsConfig
1240 uint8_t nrOfDmrsSymbols;
1243 typedef struct pageTbInfo
1249 typedef struct pageDlSch
1251 PageFreqDomainAlloc freqAlloc;
1252 PageTimeDomainAlloc timeAlloc;
1253 PageDmrsConfig dmrs;
1254 uint8_t vrbPrbMapping;
1257 uint16_t dlPagePduLen;
1261 typedef struct dlPageAlloc
1264 SlotTimingInfo dlPageTime;
1269 PageDlDci pageDlDci;
1270 PageDlSch pageDlSch;
1273 typedef struct tbInfo
1275 uint8_t mcs; /* MCS */
1276 uint8_t ndi; /* NDI */
1277 uint8_t rv; /* Redundancy Version */
1278 uint16_t tbSize; /* TB Size */
1279 uint8_t qamOrder; /* Modulation Order */
1280 SchMcsTable mcsTable; /* MCS Table */
1283 typedef struct schPuschInfo
1285 uint8_t harqProcId; /* HARQ Process ID */
1286 FreqDomainAlloc fdAlloc; /* Freq domain allocation */
1287 TimeDomainAlloc tdAlloc; /* Time domain allocation */
1288 TbInfo tbInfo; /* TB info */
1290 uint8_t dmrsMappingType;
1291 uint8_t nrOfDmrsSymbols;
1296 typedef struct harqInfo
1298 uint16_t harqAckBitLength;
1299 uint8_t betaOffsetHarqAck;
1302 typedef struct csiInfo
1305 uint8_t betaOffsetCsi;
1308 typedef struct harqFdbkInfo
1310 uint16_t harqBitLength;
1313 typedef struct csiFdbkInfo
1318 typedef struct schPucchFormatCfg
1320 uint8_t interSlotFreqHop;
1322 uint8_t maxCodeRate;
1328 typedef struct schPucchInfo
1330 FreqDomainRsrc fdAlloc;
1331 TimeDomainAlloc tdAlloc;
1333 HarqFdbkInfo harqInfo;
1334 CsiFdbkInfo csiInfo;
1335 BeamformingInfo beamPucchInfo;
1336 uint8_t pucchFormat;
1337 uint8_t intraFreqHop;
1338 uint16_t secondPrbHop;
1339 uint8_t initialCyclicShift;
1347 typedef struct schPuschUci
1349 uint8_t harqProcId; /* HARQ Process ID */
1350 FreqDomainAlloc fdAlloc; /* Freq domain allocation */
1351 TimeDomainAlloc tdAlloc; /* Time domain allocation */
1352 TbInfo tbInfo; /* TB information */
1353 HarqInfo harqInfo; /* Harq Information */
1354 CsiInfo csiInfo; /* Csi information*/
1357 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Section 11.2.4.3.9 UL Scheduling Information */
1358 typedef struct ulSchedInfo
1360 uint16_t cellId; /* Cell Id */
1361 uint16_t crnti; /* CRNI */
1362 SlotTimingInfo slotIndInfo; /* Slot Info: sfn, slot number */
1363 uint8_t dataType; /* Type of info being scheduled */
1364 SchPrachInfo prachSchInfo; /* Prach scheduling info */
1365 SchPuschInfo schPuschInfo; /* Pusch scheduling info */
1366 SchPuschUci schPuschUci; /* Pusch Uci */
1367 SchPucchInfo schPucchInfo; /* Pucch and Uci scheduling info */
1370 /* Info of Scheduling Request to Add/Modify */
1371 typedef struct schSchedReqInfo
1374 SchSrProhibitTimer srProhibitTmr;
1375 SchSrTransMax srTransMax;
1378 /* Scheduling Request Configuration */
1379 typedef struct schSchedReqCfg
1381 uint8_t addModListCount;
1382 SchSchedReqInfo addModList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* List of Scheduling req to be added/modified */
1383 uint8_t relListCount;
1384 uint8_t relList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* list of scheduling request Id to be deleted */
1387 /* Info of Tag to Add/Modify */
1388 typedef struct schTagInfo
1391 SchTimeAlignmentTimer timeAlignmentTmr;
1394 /* Timing Advance Group Configuration */
1395 typedef struct schTagCfg
1397 uint8_t addModListCount;
1398 SchTagInfo addModList[MAX_NUM_TAGS]; /* List of Tag to Add/Modify */
1399 uint8_t relListCount;
1400 uint8_t relList[MAX_NUM_TAGS]; /* list of Tag Id to release */
1403 /* Configuration for Power headroom reporting */
1404 typedef struct schPhrCfg
1406 SchPhrPeriodicTimer periodicTmr;
1407 SchPhrProhibitTimer prohibitTmr;
1408 SchPhrTxPwrFactorChange txpowerFactorChange;
1411 bool type2OtherCell;
1412 SchPhrModeOtherCG modeOtherCG;
1415 /* MAC cell Group configuration */
1416 typedef struct schMacCellGrpCfg
1418 SchSchedReqCfg schedReqCfg;
1420 SchPhrCfg phrCfg; /* To be used only if phrCfgSetupPres is true */
1423 SchDrxCfg drxCfg; /* Drx configuration */
1427 /* Physical Cell Group Configuration */
1428 typedef struct schPhyCellGrpCfg
1430 SchPdschHarqAckCodebook pdschHarqAckCodebook;
1434 /* Control resource set info */
1435 typedef struct schControlRsrcSet
1437 uint8_t cRSetId; /* Control resource set id */
1438 uint8_t freqDomainRsrc[FREQ_DOM_RSRC_SIZE]; /* Frequency domain resource */
1440 SchREGMappingType cceRegMappingType;
1441 SchPrecoderGranul precoderGranularity;
1442 uint16_t dmrsScramblingId;
1445 /*Slot Perioicity and Offset*/
1446 typedef struct schMSlotPeriodAndOffset
1448 SchMSlotPeriodicity mSlotPeriodicity;
1449 uint16_t mSlotOffset;
1450 }SchMSlotPeriodAndOffset;
1452 /* Search Space info */
1453 typedef struct schSearchSpace
1455 uint8_t searchSpaceId;
1457 SchMSlotPeriodAndOffset mSlotPeriodicityAndOffset;
1458 uint8_t mSymbolsWithinSlot[MONITORING_SYMB_WITHIN_SLOT_SIZE];
1459 SchAggrLevel numCandidatesAggLevel1; /* Number of candidates for aggregation level 1 */
1460 SchAggrLevel numCandidatesAggLevel2; /* Number of candidates for aggregation level 2 */
1461 SchAggrLevel numCandidatesAggLevel4; /* Number of candidates for aggregation level 4 */
1462 SchAggrLevel numCandidatesAggLevel8; /* Number of candidates for aggregation level 8 */
1463 SchAggrLevel numCandidatesAggLevel16; /* Number of candidates for aggregation level 16 */
1464 SchSearchSpaceType searchSpaceType;
1465 uint8_t ueSpecificDciFormat;
1468 /* PDCCH cofniguration */
1469 typedef struct schPdcchConfig
1471 uint8_t numCRsetToAddMod;
1472 SchControlRsrcSet cRSetToAddModList[MAX_NUM_CRSET]; /* List of control resource set to add/modify */
1473 uint8_t numCRsetToRel;
1474 uint8_t cRSetToRelList[MAX_NUM_CRSET]; /* List of control resource set to release */
1475 uint8_t numSearchSpcToAddMod;
1476 SchSearchSpace searchSpcToAddModList[MAX_NUM_SEARCH_SPC]; /* List of search space to add/modify */
1477 uint8_t numSearchSpcToRel;
1478 uint8_t searchSpcToRelList[MAX_NUM_SEARCH_SPC]; /* List of search space to release */
1481 /* PDSCH time domain resource allocation */
1482 typedef struct schPdschTimeDomRsrcAlloc
1485 SchTimeDomRsrcAllocMappingType mappingType;
1486 uint8_t startSymbol;
1487 uint8_t symbolLength;
1488 }SchPdschTimeDomRsrcAlloc;
1491 typedef struct schPdschBundling
1493 struct schStaticBundling
1495 SchBundlingSizeSet2 size;
1497 struct schDynamicBundling
1499 SchBundlingSizeSet1 sizeSet1;
1500 SchBundlingSizeSet2 sizeSet2;
1501 }SchDynamicBundling;
1504 /* DMRS downlink configuration */
1505 typedef struct schDmrsDlCfg
1507 SchDmrsAdditionPosition addPos; /* DMRS additional position */
1510 /* PDSCH Configuration */
1511 typedef struct schPdschConfig
1513 SchDmrsDlCfg dmrsDlCfgForPdschMapTypeA;
1514 SchResourceAllocType resourceAllocType;
1515 uint8_t numTimeDomRsrcAlloc;
1516 SchPdschTimeDomRsrcAlloc timeDomRsrcAllociList[MAX_NUM_DL_ALLOC]; /* PDSCH time domain DL resource allocation list */
1518 SchCodeWordsSchedByDci numCodeWordsSchByDci; /* Number of code words scheduled by DCI */
1519 SchBundlingType bundlingType;
1520 SchPdschBundling bundlingInfo;
1523 /* Initial Downlink BWP */
1524 typedef struct schInitalDlBwp
1527 SchPdcchConfig pdcchCfg;
1529 SchPdschConfig pdschCfg;
1532 /*Spec 38.331 'RadioLinkMonitoringConfig'*/
1533 typedef uint8_t SchRadioLinkMonitoringRsId;
1535 typedef struct schRadioLinkMonRS
1537 SchRadioLinkMonitoringRsId radioLinkMonitoringRsId;
1538 SchPurposeOfFailureDet purpose;
1542 uint8_t nzpCsiRsResId;
1546 typedef struct schRadioLinkConfig
1548 SchRadioLinkMonRS failurDetResAddModList[MAX_FAILURE_DET_RESOURCES];
1549 SchRadioLinkMonitoringRsId failurDetResRelList[MAX_FAILURE_DET_RESOURCES];
1550 uint8_t beamFailureInstanceMaxCount;
1551 uint8_t beamFailureDetectionTimer;
1552 }SchRadioLinkConfig;
1554 /*Spec 38.331 "SPS-Config'*/
1555 typedef struct schSpsConfig
1557 uint16_t periodicity;
1558 uint8_t numOfHqProcess;
1560 SchMcsTable mcsTable;
1563 /* Spec 38.331, 'BWP-DownlinkDedicated'*/
1564 typedef struct schBwpDlCfgDed
1566 SchPdcchConfig pdcchCfgDed;
1567 SchPdschConfig pdschCfgDed;
1568 SchSpsConfig spsCfgDed;
1569 SchRadioLinkConfig radioLnkMonCfgDed;
1572 /* Spec 38.331, 'BWP-Downlink' Downlink BWP information */
1573 typedef struct schDlBwpInfo
1576 SchBwpDlCfg bwpCommon;
1577 SchBwpDlCfgDed bwpDedicated;
1580 /* PDCCH Serving Cell configuration */
1581 typedef struct schPdschServCellCfg
1583 uint8_t *maxMimoLayers;
1584 SchNumHarqProcForPdsch numHarqProcForPdsch;
1585 SchMaxCodeBlkGrpPerTB *maxCodeBlkGrpPerTb;
1586 bool *codeBlkGrpFlushInd;
1587 SchPdschXOverhead *xOverhead;
1588 }SchPdschServCellCfg;
1590 typedef struct schRaPrioritization
1592 uint8_t powerRampingStepHighPriority;
1593 uint8_t scalingFactorBI;
1594 }SchRaPrioritization;
1596 typedef struct schBfrCsiRsRes
1600 uint8_t raPreambleIndex;
1603 typedef struct schBfrSsbRes
1606 uint8_t raPreambleIndex;
1609 typedef struct schPrachResDedBfr
1612 SchBfrCsiRsRes csiRs;
1615 /*Spec 38.331 'BeamFailureRecoveryConfig' */
1616 typedef struct schBeamFailRecoveryCfg
1618 uint8_t rootSeqIndexBfr;
1619 SchRachCfgGeneric rachCfgBfr;
1620 uint8_t rsrpThreshSsbBfr; /* RSRP Threshold SSB */
1621 SchPrachResDedBfr candidateBeamRSList;
1622 uint8_t ssbPerRachBfr; /* SSB per RACH occassion */
1623 uint8_t raSsbOccMaskIndex;
1624 uint8_t recoverySearchSpaceId;
1625 SchRaPrioritization raPrioBfr;
1627 uint8_t msg1SubcSpacing; /* Subcarrier spacing of RACH */
1628 }SchBeamFailRecoveryCfg;
1630 /* PUCCH Configuration */
1631 typedef struct schPucchResrcSetInfo
1634 uint8_t resrcListCount;
1635 uint8_t resrcList[MAX_NUM_PUCCH_PER_RESRC_SET];
1636 uint8_t maxPayLoadSize;
1637 }SchPucchResrcSetInfo;
1639 typedef struct schPucchResrcSetCfg
1641 uint8_t resrcSetToAddModListCount;
1642 SchPucchResrcSetInfo resrcSetToAddModList[MAX_NUM_PUCCH_RESRC_SET];
1643 uint8_t resrcSetToRelListCount;
1644 uint8_t resrcSetToRelList[MAX_NUM_PUCCH_RESRC];
1645 }SchPucchResrcSetCfg;
1647 typedef struct schPucchFormat0
1649 uint8_t initialCyclicShift;
1651 uint8_t startSymbolIdx;
1654 typedef struct schPucchFormat1
1656 uint8_t initialCyclicShift;
1658 uint8_t startSymbolIdx;
1662 typedef struct schPucchFormat2_3
1666 uint8_t startSymbolIdx;
1669 typedef struct schPucchFormat4
1674 uint8_t startSymbolIdx;
1677 typedef struct schPucchResrcInfo
1681 uint8_t intraFreqHop;
1682 uint16_t secondPrbHop;
1683 uint8_t pucchFormat;
1685 SchPucchFormat0 *format0;
1686 SchPucchFormat1 *format1;
1687 SchPucchFormat2_3 *format2;
1688 SchPucchFormat2_3 *format3;
1689 SchPucchFormat4 *format4;
1693 typedef struct schPucchResrcCfg
1695 uint8_t resrcToAddModListCount;
1696 SchPucchResrcInfo resrcToAddModList[MAX_NUM_PUCCH_RESRC];
1697 uint8_t resrcToRelListCount;
1698 uint8_t resrcToRelList[MAX_NUM_PUCCH_RESRC];
1702 typedef struct schSchedReqResrcInfo
1706 uint8_t periodicity;
1709 }SchSchedReqResrcInfo;
1711 typedef struct schPucchSchedReqCfg
1713 uint8_t schedAddModListCount;
1714 SchSchedReqResrcInfo schedAddModList[MAX_NUM_SR_CFG_PER_CELL_GRP];
1715 uint8_t schedRelListCount;
1716 uint8_t schedRelList[MAX_NUM_SR_CFG_PER_CELL_GRP];
1717 }SchPucchSchedReqCfg;
1719 typedef struct schSpatialRelationInfo
1721 uint8_t spatialRelationId;
1722 uint8_t servCellIdx;
1723 uint8_t pathLossRefRSId;
1725 uint8_t closeLoopIdx;
1726 }SchSpatialRelationInfo;
1728 typedef struct schPucchSpatialCfg
1730 uint8_t spatialAddModListCount;
1731 SchSpatialRelationInfo spatialAddModList[MAX_NUM_SPATIAL_RELATIONS];
1732 uint8_t spatialRelListCount;
1733 uint8_t spatialRelList[MAX_NUM_SPATIAL_RELATIONS];
1734 }SchPucchSpatialCfg;
1736 typedef struct schP0PucchCfg
1742 typedef struct schPathLossRefRSCfg
1744 uint8_t pathLossRefRSId;
1745 }SchPathLossRefRSCfg;
1747 typedef struct schPucchMultiCsiCfg
1749 uint8_t multiCsiResrcListCount;
1750 uint8_t multiCsiResrcList[MAX_NUM_PUCCH_RESRC-1];
1751 }SchPucchMultiCsiCfg;
1753 typedef struct schPucchDlDataToUlAck
1755 uint8_t dlDataToUlAckListCount;
1756 uint8_t dlDataToUlAckList[MAX_NUM_DL_DATA_TO_UL_ACK];
1757 }SchPucchDlDataToUlAck;
1759 typedef struct schPucchPowerControl
1767 SchP0PucchCfg p0Set[MAX_NUM_PUCCH_P0_PER_SET];
1768 uint8_t pathLossRefRSListCount;
1769 SchPathLossRefRSCfg pathLossRefRSList[MAX_NUM_PATH_LOSS_REF_RS];
1770 }SchPucchPowerControl;
1772 typedef struct schPucchCfg
1774 SchPucchResrcSetCfg *resrcSet;
1775 SchPucchResrcCfg *resrc;
1776 SchPucchFormatCfg *format1;
1777 SchPucchFormatCfg *format2;
1778 SchPucchFormatCfg *format3;
1779 SchPucchFormatCfg *format4;
1780 SchPucchSchedReqCfg *schedReq;
1781 SchPucchMultiCsiCfg *multiCsiCfg;
1782 SchPucchSpatialCfg *spatialInfo;
1783 SchPucchDlDataToUlAck *dlDataToUlAck;
1784 SchPucchPowerControl *powerControl;
1787 /* Transform precoding disabled */
1788 typedef struct schTransPrecodDisabled
1790 uint16_t scramblingId0;
1791 }SchTransPrecodDisabled;
1793 /* DMRS Uplink configuration */
1794 typedef struct SchDmrsUlCfg
1796 SchDmrsAdditionPosition addPos; /* DMRS additional position */
1797 SchTransPrecodDisabled transPrecodDisabled; /* Transform precoding disabled */
1800 /* PUSCH Configuration */
1801 typedef struct schPuschCfg
1803 uint8_t dataScramblingId;
1804 SchDmrsUlCfg dmrsUlCfgForPuschMapTypeA;
1805 SchResourceAllocType resourceAllocType;
1806 uint8_t numTimeDomRsrcAlloc;
1807 SchPuschTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_UL_ALLOC]; /* PUSCH time domain UL resource allocation list */
1808 SchTransformPrecoder transformPrecoder;
1811 /* Initial Uplink BWP */
1812 typedef struct schInitialUlBwp
1815 SchPucchCfg pucchCfg;
1817 SchPuschCfg puschCfg;
1820 typedef struct schBwpCfgDedicated
1822 SchPucchCfg pucchCfg;
1823 SchPuschCfg puschCfg;
1824 }SchBwpCfgDedicated;
1826 /* Uplink BWP information */
1827 typedef struct schUlBwpInfo
1830 SchBwpUlCfg bwpCommon;
1831 SchBwpCfgDedicated bwpDed;
1834 typedef struct schBwpRelInfo
1839 /* Serving cell configuration */
1840 typedef struct schServCellRecfgInfo
1842 SchInitalDlBwp initDlBwp;
1843 SchRadioLinkConfig radioLinkMonConfig;
1844 uint8_t numDlBwpToAddOrMod;
1845 SchDlBwpInfo dlBwpToAddOrModList[MAX_NUM_BWP];
1846 uint8_t numDlBwpToRel;
1847 SchBwpRelInfo dlBwpToRelList[MAX_NUM_BWP];
1848 uint8_t firstActvDlBwpId;
1849 uint8_t defaultDlBwpId;
1850 uint8_t *bwpInactivityTmr;
1851 SchPdschServCellCfg pdschServCellCfg;
1852 SchInitialUlBwp initUlBwp;
1853 SchBeamFailRecoveryCfg beamFailureRecoveryCfg;
1854 uint8_t numUlBwpToAddOrMod;
1855 SchUlBwpInfo ulBwpToAddOrModList[MAX_NUM_BWP];
1856 uint8_t numUlBwpToRel;
1857 SchBwpRelInfo ulBwpToRelList[MAX_NUM_BWP];
1858 uint8_t firstActvUlBwpId;
1859 }SchServCellRecfgInfo;
1861 /* Serving cell configuration */
1862 typedef struct schServCellCfgInfo
1864 SchInitalDlBwp initDlBwp;
1865 SchRadioLinkConfig radioLinkMonConfig;
1866 uint8_t numDlBwpToAdd;
1867 SchDlBwpInfo dlBwpToAddList[MAX_NUM_BWP];
1868 uint8_t firstActvDlBwpId;
1869 uint8_t defaultDlBwpId;
1870 uint8_t *bwpInactivityTmr;
1871 SchPdschServCellCfg pdschServCellCfg;
1872 SchInitialUlBwp initUlBwp;
1873 SchBeamFailRecoveryCfg beamFailureRecoveryCfg;
1874 uint8_t numUlBwpToAdd;
1875 SchUlBwpInfo ulBwpToAddList[MAX_NUM_BWP];
1876 uint8_t firstActvUlBwpId;
1877 }SchServCellCfgInfo;
1879 typedef struct schNonDynFiveQi
1884 uint16_t maxDataBurstVol;
1887 typedef struct schDynFiveQi
1890 uint16_t packetDelayBudget;
1891 uint8_t packetErrRateScalar;
1892 uint8_t packetErrRateExp;
1894 uint8_t delayCritical;
1896 uint16_t maxDataBurstVol;
1899 typedef struct schNgRanAllocAndRetPri
1901 uint8_t priorityLevel;
1902 uint8_t preEmptionCap;
1903 uint8_t preEmptionVul;
1904 }SchNgRanAllocAndRetPri;
1906 typedef struct schGrbQosFlowInfo
1908 uint32_t maxFlowBitRateDl;
1909 uint32_t maxFlowBitRateUl;
1910 uint32_t guarFlowBitRateDl;
1911 uint32_t guarFlowBitRateUl;
1915 typedef struct schDrbQos
1917 SchQosType fiveQiType; /* Dynamic or non-dynamic */
1920 SchNonDynFiveQi nonDyn5Qi;
1921 SchDynFiveQi dyn5Qi;
1923 SchNgRanAllocAndRetPri ngRanRetPri;
1924 SchGrbQosFlowInfo grbQosFlowInfo;
1925 uint16_t pduSessionId;
1926 uint32_t ulPduSessAggMaxBitRate; /* UL PDU Session Aggregate max bit rate */
1929 /* Special cell configuration */
1930 typedef struct schSpCellCfg
1932 uint8_t servCellIdx;
1933 SchServCellCfgInfo servCellCfg;
1936 /* Special cell Reconfiguration */
1937 typedef struct schSpCellRecfg
1939 uint8_t servCellIdx;
1940 SchServCellRecfgInfo servCellRecfg;
1943 /* Uplink logical channel configuration */
1944 typedef struct SchUlLcCfg
1949 uint8_t pbr; // prioritisedBitRate
1950 uint8_t bsd; // bucketSizeDuration
1953 /* Downlink logical channel configuration */
1954 typedef struct schDlLcCfg
1956 uint8_t lcp; // logical Channel Prioritization
1959 /* Logical Channel configuration */
1960 typedef struct schLcCfg
1964 SchDrbQosInfo *drbQos;
1969 /* Aggregate max bit rate */
1970 typedef struct schAmbrCfg
1972 uint32_t ulBr; /* Ul BitRate */
1975 typedef struct schModulationInfo
1979 SchMcsTable mcsTable;
1982 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.5' UE Configuration Request*/
1983 typedef struct schUeCfgReq
1988 bool macCellGrpCfgPres;
1989 SchMacCellGrpCfg macCellGrpCfg;
1990 bool phyCellGrpCfgPres;
1991 SchPhyCellGrpCfg phyCellGrpCfg;
1993 SchSpCellCfg spCellCfg;
1994 SchAmbrCfg *ambrCfg;
1995 SchModulationInfo dlModInfo;
1996 SchModulationInfo ulModInfo;
1997 uint8_t numLcsToAdd;
1998 SchLcCfg schLcCfg[MAX_NUM_LC];
2001 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.6' UE Reconfiguration Request*/
2002 typedef struct schUeRecfgReq
2007 bool macCellGrpRecfgPres;
2008 SchMacCellGrpCfg macCellGrpRecfg;
2009 bool phyCellGrpRecfgPres;
2010 SchPhyCellGrpCfg phyCellGrpRecfg;
2011 bool spCellRecfgPres;
2012 SchSpCellRecfg spCellRecfg;
2013 SchAmbrCfg *ambrRecfg;
2014 SchModulationInfo dlModInfo;
2015 SchModulationInfo ulModInfo;
2016 uint8_t numLcsToAdd;
2017 SchLcCfg schLcCfgAdd[MAX_NUM_LC];
2018 uint8_t numLcsToDel;
2019 uint8_t lcIdToDel[MAX_NUM_LC];
2020 uint8_t numLcsToMod;
2021 SchLcCfg schLcCfgMod[MAX_NUM_LC];
2022 SchDataTransmission dataTransmissionInfo;
2024 bool drxConfigIndicatorRelease;
2028 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.3.5 UE Confg Response*/
2029 typedef struct schUeCfgRsp
2035 CauseOfResult cause;
2038 /*As per WG8 V7.0.0 Sec 11.2.4.3.6, UE ReCFG and UECFG have same structure definition*/
2039 typedef struct schUeCfgRsp SchUeRecfgRsp;
2041 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.7' Delete UE Request*/
2042 typedef struct schUeDelete
2048 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.3.7*/
2049 typedef struct schUeDeleteRsp
2054 CauseOfResult cause;
2057 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.8' DL HARQ Indication*/
2058 typedef struct dlHarqInd
2062 SlotTimingInfo slotInd;
2064 uint8_t harqPayload[MAX_HARQ_BITS_IN_BYTES];
2067 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.9' UL HARQ (CRC) Indication*/
2068 typedef struct crcIndInfo
2072 SlotTimingInfo timingInfo;
2074 uint8_t crcInd[MAX_NUMBER_OF_CRC_IND_BITS];
2077 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.10' UL Channel Quality Indication*/
2078 typedef struct ulCqiReport
2080 CqiUlReportType reportType;
2085 typedef struct schUlCqiInd
2089 SlotTimingInfo timingInfo;
2090 uint8_t numUlCqiReported;
2091 UlCqiReport ulCqiRpt;
2094 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.11' DL Channel Quality Indication*/
2095 typedef struct dlCqiReport
2097 uint8_t reportType; /*Bitmap for CQI, PMI, RI, CRI report*/
2104 typedef struct schDlCqiInd
2108 SlotTimingInfo timingInfo;
2109 uint8_t numDlCqiReported;
2110 DlCqiReport dlCqiRpt;
2113 /*Spec O-RAN WG8 v7.0.0, '11.2.4.2.12' Rach Ind contents*/
2114 typedef struct rachIndInfo
2118 SlotTimingInfo timingInfo;
2122 uint8_t preambleIdx;
2126 /*Spec O-RAN WG8 v7.0.0, '11.2.4.2.13' Paging Ind contents*/
2127 typedef struct schPageInd
2136 /*ORAN WG8 v7.0.0, Sec 11.2.4.2.14 Rach Res Request*/
2137 typedef struct schRachRsrcReq
2139 SlotTimingInfo slotInd;
2143 uint8_t ssbIdx[MAX_NUM_SSB];
2146 typedef struct schCfraSsbResource
2149 uint8_t raPreambleIdx;
2150 }SchCfraSsbResource;
2152 typedef struct schCfraRsrc
2155 SchCfraSsbResource ssbResource[MAX_NUM_SSB];
2158 typedef struct schRachRsrcRsp
2163 SchCfraResource cfraResource;
2166 /*ORAN WG8 v7.0.0, Sec 11.2.4.2.15 Rach Res Release*/
2167 typedef struct schRachRsrcRel
2169 SlotTimingInfo slotInd;
2172 SchCfraResource cfraResource;
2175 /*O-RAN WG* v7.0.0 Sec 11.2.4.2.16 DL RLC Buffer Status Information*/
2176 typedef struct dlRlcBOInfo
2181 uint32_t dataVolume;
2184 /*O-RAN WG8 v7.0.0 Sec 11.2.4.2.17 Scheduling Request Indication*/
2185 typedef struct srUciIndInfo
2189 SlotTimingInfo slotInd;
2191 uint8_t srPayload[MAX_SR_BITS_IN_BYTES];
2194 /*O-RAN WG* v7.0.0 Sec 11.2.4.2.18 UL RLC Buffer Status Information*/
2195 typedef struct dataVolInfo
2201 typedef struct ulBufferStatusRptInd
2207 DataVolInfo dataVolInfo[MAX_NUM_LOGICAL_CHANNEL_GROUPS];
2208 }UlBufferStatusRptInd;
2210 /**O-RAN WG* v7.0.0 Sec 11.2.4.2.19 Power Headroom Indication*/
2211 typedef struct phrData /*Spec 38.321 Sec 6.1.3.8*/
2217 typedef struct singlePhrInfo
2222 typedef struct multiPhr
2228 typedef struct multiplePhrInfo /*Spec 38.321 Sec 6.1.3.9*/
2230 uint8_t numPhrReported;
2231 MultiPhr multiPhrStat[MAX_PHR_REPORT];
2234 typedef struct schPwrHeadroomInd
2241 SinglePhrInfo singlePhr;
2242 MultiplePhrInfo multiPhr;
2246 typedef struct schUeHqInfo
2252 typedef struct schRlsHqInfo
2256 SchUeHqInfo *ueHqInfo;
2259 /* Statistics Request from MAC to SCH */
2260 typedef struct schStatsGrpInfo
2263 uint16_t periodicity; /* In milliseconds */
2265 SchMeasurementType statsList[MAX_NUM_STATS];
2268 typedef struct schStatsReq
2270 uint64_t subscriptionId;
2271 uint8_t numStatsGroup;
2272 SchStatsGrpInfo statsGrpList[MAX_NUM_STATS_GRP];
2275 typedef struct schStatsReq SchStatsModificationReq;
2276 typedef struct schStatsRsp SchStatsModificationRsp;
2278 /* Statistics Response from SCH to MAC */
2279 typedef struct schStatsGrpRejected
2282 CauseOfResult cause;
2283 }SchStatsGrpRejected;
2285 typedef struct schStatsRsp
2287 uint64_t subscriptionId;
2288 uint8_t numGrpAccepted;
2289 uint8_t statsGrpAcceptedList[MAX_NUM_STATS_GRP];
2290 uint8_t numGrpRejected;
2291 SchStatsGrpRejected statsGrpRejectedList[MAX_NUM_STATS_GRP];
2294 /* Statistics Indication from SCH to MAC */
2295 typedef struct schStats
2297 SchMeasurementType type;
2301 typedef struct schStatsInd
2303 uint64_t subscriptionId;
2306 SchStats measuredStatsList[MAX_NUM_STATS];
2309 typedef struct schStatsDeleteReq
2311 uint64_t subscriptionId;
2312 uint8_t numStatsGroupToBeDeleted;
2313 uint8_t statsGrpIdToBeDelList[MAX_NUM_STATS_GRP];
2316 typedef struct statsDeleteResult
2319 SchMacRsp statsGrpDelRsp;
2320 CauseOfResult statsGrpDelCause;
2323 typedef struct schStatsDeleteRsp
2325 uint64_t subscriptionId; /* subscription Id */
2326 SchMacRsp subsDelRsp; /* deletion status of all statsGrp with given subscriptionId */
2327 CauseOfResult subsDelCause; /* cause of failure in deletion of all statsGrp with given subscriptionId*/
2328 uint8_t numStatsGroupDeleted; /* num of action deleted */
2329 StatsDeleteResult statsGrpDelInfo[MAX_NUM_STATS_GRP]; /* list of the deletion status for specific actions */
2332 /* function declarations */
2333 uint8_t MacMessageRouter(Pst *pst, void *msg);
2334 uint8_t SchMessageRouter(Pst *pst, void *msg);
2336 /**********************************************************************
2338 **********************************************************************/