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 /*As per SCF222_5GFAPI, 'MaxDciPerSlot' defines this value but this parameter value is missing in Spec.*/
128 #define MAX_NUM_PDCCH 1
130 #define MAX_NUM_PDCCH 2
133 #define ADD_DELTA_TO_TIME(crntTime, toFill, incr, numOfSlot) \
135 if ((crntTime.slot + incr) > (numOfSlot - 1)) \
137 toFill.sfn = (crntTime.sfn + 1); \
141 toFill.sfn = crntTime.sfn; \
143 toFill.slot = (crntTime.slot + incr) % numOfSlot; \
144 if (toFill.sfn >= MAX_SFN) \
146 toFill.sfn%=MAX_SFN; \
154 RRC_CONNECTED_USERS_RSRC
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_SL_1 = 1,
303 SLOT_PERIODICITY_SL_2,
304 SLOT_PERIODICITY_SL_4,
305 SLOT_PERIODICITY_SL_5,
306 SLOT_PERIODICITY_SL_8,
307 SLOT_PERIODICITY_SL_10,
308 SLOT_PERIODICITY_SL_16,
309 SLOT_PERIODICITY_SL_20,
310 SLOT_PERIODICITY_SL_40,
311 SLOT_PERIODICITY_SL_80,
312 SLOT_PERIODICITY_SL_160,
313 SLOT_PERIODICITY_SL_320,
314 SLOT_PERIODICITY_SL_640,
315 SLOT_PERIODICITY_SL_1280,
316 SLOT_PERIODICITY_SL_2560
317 }SchMSlotPeriodicity;
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;
433 SCH_MCS_TABLE_QAM_64,
434 SCH_MCS_TABLE_QAM_256,
435 SCH_MCS_TABLE_QAM_64_LOW_SE
448 DATA_TRANSMISSION_ALLOWED,
449 STOP_DATA_TRANSMISSION,
450 RESTART_DATA_TRANSMISSION
451 }SchDataTransmission;
458 }SchPurposeOfFailureDet;
466 /* Performance measurements from 3GPP TS 28.552 Release 15 */
469 SCH_DL_TOTAL_PRB_USAGE,
470 SCH_UL_TOTAL_PRB_USAGE
474 typedef struct timeDomainAlloc
480 typedef struct resAllocType0
482 uint8_t rbBitmap[36];
485 typedef struct resAllocType1
491 typedef struct resAllocType1 FreqDomainRsrc;
493 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-32 BWP Information */
494 typedef struct bwpCfg
496 uint8_t subcarrierSpacing;
497 uint8_t cyclicPrefix;
498 FreqDomainRsrc freqAlloc;
504 uint16_t beamIdx[MAX_DIG_BF_INTERFACES];
507 typedef struct beamformingInfo
511 uint8_t digBfInterfaces;
512 Prg prg[MAX_NUM_PRG];
515 /* SIB1 PDSCH structures */
517 typedef struct codewordinfo
519 uint16_t targetCodeRate;
527 typedef struct dmrsInfo
529 uint16_t dlDmrsSymbPos;
530 uint8_t dmrsConfigType;
531 uint16_t dlDmrsScramblingId;
533 uint8_t numDmrsCdmGrpsNoData;
536 uint8_t nrOfDmrsSymbols;
540 typedef struct pdschFreqAlloc
542 uint8_t resourceAllocType;
543 /* since we are using type-1, rbBitmap excluded */
544 uint8_t rbBitmap[36];
547 uint8_t vrbPrbMapping;
550 typedef struct pdschTimeAlloc
557 typedef struct txPowerPdschInfo
559 uint8_t powerControlOffset;
560 uint8_t powerControlOffsetSS;
563 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-43 PDSCH Configuration */
564 typedef struct pdschCfg
569 uint8_t numCodewords;
570 CodewordInfo codeword[MAX_CODEWORDS];
571 uint16_t dataScramblingId;
573 uint8_t transmissionScheme;
576 PdschFreqAlloc pdschFreqAlloc;
577 PdschTimeAlloc pdschTimeAlloc;
578 BeamformingInfo beamPdschInfo;
579 TxPowerPdschInfo txPdschPower;
581 /* SIB1 PDSCH structures end */
583 /* SIB1 interface structure */
585 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-35 CORESET Configuration */
586 typedef struct coresetCfg
589 uint8_t startSymbolIndex;
590 uint8_t durationSymbols;
591 uint8_t freqDomainResource[6];
592 uint8_t cceRegMappingType;
593 uint8_t regBundleSize;
594 uint8_t interleaverSize;
597 uint8_t coresetPoolIndex;
598 uint8_t precoderGranularity;
600 uint8_t aggregationLevel;
603 typedef struct txPowerPdcchInfo
605 uint8_t beta_pdcch_1_0;
606 uint8_t powerControlOffsetSS;
609 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-42 DL-DCI Configuration */
613 uint16_t scramblingId;
614 uint16_t scramblingRnti;
617 BeamformingInfo beamPdcchInfo;
618 TxPowerPdcchInfo txPdcchPower;
622 typedef struct pdcchCfg
624 /* coreset-0 configuration */
625 CoresetCfg coresetCfg;
627 DlDCI dci[MAX_NUM_PDCCH];
629 /* end of SIB1 PDCCH structures */
631 typedef struct schPcchCfg
633 uint8_t numPO; /*Derived from Ns*/
634 bool poPresent; /*FirstPDCCH-MonitoringPO is present or not*/
635 uint16_t pagingOcc[MAX_PO_PER_PF]; /*FirstPDCCH-Monitoring Paging Occasion*/
638 typedef struct schPdcchConfigSib1
640 uint8_t coresetZeroIndex; /* derived from 4 LSB of pdcchSib1 present in MIB */
641 uint8_t searchSpaceZeroIndex; /* derived from 4 MSB of pdcchSib1 present in MIB */
644 typedef struct schRachCfgGeneric
646 uint8_t prachCfgIdx; /* PRACH config idx */
647 uint8_t msg1Fdm; /* PRACH FDM (1,2,4,8) */
648 uint16_t msg1FreqStart; /* Msg1-FrequencyStart */
649 uint8_t zeroCorrZoneCfg; /* Zero correlation zone cofig */
650 int16_t preambleRcvdTargetPower;
651 uint8_t preambleTransMax;
652 uint8_t pwrRampingStep;
653 uint8_t raRspWindow; /* RA Response Window */
656 typedef struct schRachCfg
658 SchRachCfgGeneric prachCfgGeneric;
659 uint8_t totalNumRaPreamble; /* Total number of RA preambles */
660 uint8_t ssbPerRach; /* SSB per RACH occassion */
661 uint8_t numCbPreamblePerSsb; /* Number of CB preamble per SSB */
662 uint8_t raContResTmr; /* RA Contention Resoultion Timer */
663 uint8_t rsrpThreshSsb; /* RSRP Threshold SSB */
664 uint16_t rootSeqIdx; /* Root sequence index */
665 uint16_t rootSeqLen; /* root sequence length */
666 uint8_t numRootSeq; /* Number of root sequences required for FD */
667 uint8_t msg1SubcSpacing; /* Subcarrier spacing of RACH */
670 typedef struct schBwpParams
672 FreqDomainRsrc freqAlloc;
674 uint8_t cyclicPrefix;
677 typedef struct schCandidatesInfo
686 typedef struct schSearchSpaceCfg
688 uint8_t searchSpaceId;
690 uint8_t freqDomainRsrc[FREQ_DOM_RSRC_SIZE]; /* Frequency domain resource */
691 uint16_t monitoringSlot;
693 uint16_t monitoringSymbol;
694 SchCandidatesInfo candidate;
697 typedef struct schPdcchCfgCmn
699 SchSearchSpaceCfg commonSearchSpace;
700 uint8_t raSearchSpaceId;
703 typedef struct schPdschCfgCmnTimeDomRsrcAlloc
708 uint8_t lengthSymbol;
709 }SchPdschCfgCmnTimeDomRsrcAlloc;
711 typedef struct schPdschCfgCmn
713 uint8_t numTimeDomAlloc;
714 SchPdschCfgCmnTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_DL_ALLOC];
717 typedef struct schPucchCfgCmn
719 uint8_t pucchResourceCommon;
720 uint8_t pucchGroupHopping;
723 /* PUSCH Time Domain Resource Allocation */
724 typedef struct schPuschTimeDomRsrcAlloc
727 SchTimeDomRsrcAllocMappingType mappingType;
729 uint8_t symbolLength;
730 }SchPuschTimeDomRsrcAlloc;
732 typedef struct schPuschCfgCmn
734 uint8_t numTimeDomRsrcAlloc;
735 SchPuschTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_UL_ALLOC]; /* PUSCH time domain UL resource allocation list */
738 typedef struct schK1TimingInfo
741 uint8_t k1Indexes[MAX_NUM_K1_IDX];
744 typedef struct schK0TimingInfo
747 SchK1TimingInfo k1TimingInfo;
750 typedef struct schK0K1TimingInfo
753 SchK0TimingInfo k0Indexes[MAX_NUM_K0_IDX];
756 typedef struct schK0K1TimingInfoTbl
759 SchK0K1TimingInfo k0k1TimingInfo[MAX_NUM_CONFIG_SLOTS];
760 }SchK0K1TimingInfoTbl;
762 typedef struct schBwpDlCfg
765 SchPdcchCfgCmn pdcchCommon;
766 SchPdschCfgCmn pdschCommon;
769 typedef struct schK2TimingInfo
772 uint8_t k2Indexes[MAX_NUM_K2_IDX];
775 typedef struct schK2TimingInfoTbl
778 SchK2TimingInfo k2TimingInfo[MAX_NUM_CONFIG_SLOTS];
781 typedef struct schBwpUlCfg
784 SchRachCfg schRachCfg; /* PRACH config */
785 SchPucchCfgCmn pucchCommon;
786 SchPuschCfgCmn puschCommon;
789 typedef struct schPlmnInfoList
792 SupportedSliceList suppSliceList;
796 /* The following list of structures is taken from the DRX-Config section of specification 33.331. */
798 typedef struct schDrxOnDurationTimer
800 bool onDurationTimerValInMs;
803 uint8_t subMilliSeconds;
804 uint16_t milliSeconds;
805 }onDurationtimerValue;
806 }SchDrxOnDurationTimer;
808 typedef struct schDrxLongCycleStartOffset
810 uint16_t drxLongCycleStartOffsetChoice;
811 uint16_t drxLongCycleStartOffsetVal;
812 }SchDrxLongCycleStartOffset;
814 typedef struct schShortDrx
816 uint16_t drxShortCycle;
817 uint8_t drxShortCycleTimer;
820 typedef struct schDrxCfg
822 SchDrxOnDurationTimer drxOnDurationTimer;
823 uint16_t drxInactivityTimer;
824 uint8_t drxHarqRttTimerDl;
825 uint8_t drxHarqRttTimerUl;
826 uint16_t drxRetransmissionTimerDl;
827 uint16_t drxRetransmissionTimerUl;
828 SchDrxLongCycleStartOffset drxLongCycleStartOffset;
830 SchShortDrx shortDrx;
831 uint8_t drxSlotOffset;
835 /*Spec 38.331 'NrNsPmaxList'*/
836 typedef struct schNrNsPmaxList
839 long additionalSpectrumEmission;
842 /*Spec 38.331 'FrequencyInfoDL-SIB'*/
843 typedef struct schMultiFreqBandListSib
846 SchNrNsPmaxList nrNsPmaxList[1];
847 }SchMultiFreqBandListSib;
849 /*Spec 38.331 'SCS-SpecificCarrier'*/
850 typedef struct schScsSpecificCarrier
852 uint16_t offsetToCarrier;
853 uint8_t subCarrierSpacing;
855 uint16_t txDirectCurrentLoc;
856 }SchScsSpecificCarrier;
858 /*Spec 38.331 'FrequencyInfoDL-SIB'*/
859 typedef struct schFreqInfoDlSib
861 SchMultiFreqBandListSib mutiFreqBandList[1];
862 uint16_t offsetToPointA;
863 SchScsSpecificCarrier schSpcCarrier[1];
866 typedef struct schBcchCfg
871 /*Spec 38.331 'DownlinkConfigCommonSIB'*/
872 typedef struct schDlCfgCommon
874 SchFreqInfoDlSib schFreqInfoDlSib;
875 SchBwpDlCfg schInitialDlBwp; /* Initial DL BWP */
876 SchBcchCfg schBcchCfg;
877 SchPcchCfg schPcchCfg;
880 /*Spec 38.331 'FrequencyInfoUL-SIB'*/
881 typedef struct schFreqInfoUlSib
883 SchMultiFreqBandListSib mutiFreqBandList[1];
884 uint16_t absoluteFreqPointA;
885 SchScsSpecificCarrier schSpcCarrier[1];
887 bool frequencyShift7p5khz;
890 /*Spec 38.331 'UplinkConfigCommonSIB '*/
891 typedef struct schUlCfgCommon
893 SchFreqInfoUlSib schFreqInfoUlSib;
894 SchBwpUlCfg schInitialUlBwp; /* Initial DL BWP */
895 uint16_t schTimeAlignTimer;
898 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.2.1 Cell Conf Request*/
899 typedef struct schCellCfg
901 uint16_t cellId; /* Cell Id */
905 uint16_t phyCellId; /* Physical cell id */
906 SchPlmnInfoList plmnInfoList[MAX_PLMN]; /* Consits of PlmnId and Snssai list */
907 SchDuplexMode dupMode; /* Duplex type: TDD/FDD */
908 uint8_t dlBandwidth; /* Supported B/W */
909 uint8_t ulBandwidth; /* Supported B/W */
910 SchDlCfgCommon dlCfgCommon; /*Spec 38.331 DownlinkConfigCommonSIB*/
911 SchUlCfgCommon ulCfgCommon; /*Spec 38.331 UplinkConfigCommonSIB*/
913 TDDCfg tddCfg; /* Spec 38.331 tdd-UL-DL-ConfigurationCommon */
916 /*Ref:Spec 38.331 "ssb-PositionsInBurst", Value 0 in Bitmap => corresponding SS/PBCH block is not transmitted
917 *value 1 => corresponding SS/PBCH block is transmitted*/
918 uint32_t ssbPosInBurst[SCH_SSB_MASK_SIZE]; /* Bitmap for actually transmitted SSB. */
919 SchSSBPeriod ssbPeriod; /* SSB Periodicity in msec */
920 uint32_t ssbFrequency; /* SB frequency in kHz*/
921 uint8_t dmrsTypeAPos;
922 uint8_t ssbScs; /* SSB subcarrier spacing*/
923 SchPdcchConfigSib1 pdcchCfgSib1; /* Req to configure CORESET#0 and SearchSpace#0*/
924 uint32_t ssbPbchPwr; /* SSB block power */
925 uint8_t ssbSubcOffset; /* Subcarrier Offset(Kssb) */
929 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.3.1 Cell Config Response*/
930 typedef struct schCellCfgCfm
932 uint16_t cellId; /* Cell Id */
937 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.2.2 Cell Del Req*/
938 typedef struct schCellDeleteReq
943 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.3.2 Cell Del Response*/
944 typedef struct schCellDeleteRsp
951 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.2.3*/
952 typedef struct schRrmPolicyRatio
956 uint8_t dedicatedRatio;
959 typedef struct schRrmPolicyOfSlice
962 SchRrmPolicyRatio rrmPolicyRatioInfo;
963 }SchRrmPolicyOfSlice;
965 typedef struct schSliceCfgReq
967 uint8_t numOfConfiguredSlice;
968 SchRrmPolicyOfSlice **listOfSlices;
971 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.3.3 Slice Cfg Response*/
972 typedef struct schSliceCfgRsp
979 /*As per ORAN-WG8 V7.0.0 Sec 11.2.4.3.4 , Slice Cfg and Recfg are same structures*/
980 typedef struct schSliceCfgReq SchSliceRecfgReq;
981 typedef struct schSliceCfgRsp SchSliceRecfgRsp;
983 typedef struct ssbInfo
985 uint8_t ssbIdx; /* SSB Index */
986 TimeDomainAlloc tdAlloc; /* Time domain allocation */
987 FreqDomainRsrc fdAlloc; /* Freq domain allocation */
990 typedef struct sib1AllocInfo
993 PdcchCfg *sib1PdcchCfg;
996 typedef struct prachSchInfo
998 uint8_t numPrachOcas; /* Num Prach Ocassions */
999 uint8_t prachFormat; /* PRACH Format */
1000 uint8_t numRa; /* Freq domain ocassion */
1001 uint8_t prachStartSymb; /* Freq domain ocassion */
1004 /* Interface structure signifying DL broadcast allocation for SSB, SIB1 */
1005 typedef struct dlBrdcstAlloc
1007 uint16_t crnti; /* SI-RNTI */
1008 /* Ssb transmission is determined as follows:
1009 * 0 : No tranamission
1010 * 1 : SSB Transmission
1011 * 2 : SSB Repetition */
1012 uint8_t ssbTransmissionMode;
1013 uint8_t ssbIdxSupported;
1014 SsbInfo ssbInfo[MAX_SSB_IDX];
1015 bool systemInfoIndicator;
1017 /* Sib1 transmission is determined as follows:
1018 * 0 : No tranamission
1019 * 1 : SIB1 Transmission
1020 * 2 : SIB1 Repetition */
1021 uint8_t sib1TransmissionMode;
1022 Sib1AllocInfo sib1Alloc;
1025 typedef struct msg3UlGrant
1027 uint8_t freqHopFlag;
1029 FreqDomainRsrc msg3FreqAlloc;
1036 typedef struct rarInfo
1040 Msg3UlGrant ulGrant;
1042 uint8_t rarPdu[RAR_PAYLOAD_SIZE];
1046 typedef struct rarAlloc
1051 PdcchCfg *rarPdcchCfg;
1052 PdschCfg *rarPdschCfg;
1055 typedef struct lcSchInfo
1061 typedef struct ceSchInfo
1067 typedef struct freqDomainAlloc
1069 uint8_t resAllocType; /* Resource allocation type */
1072 ResAllocType0 type0;
1073 ResAllocType1 type1;
1077 typedef struct transportBlock
1084 CeSchInfo ceSchInfo[MAX_NUM_LC];
1086 LcSchInfo lcSchInfo[MAX_NUM_LC];
1089 typedef struct dlMsgSchedInfo
1092 uint8_t dciFormatId;
1093 uint8_t harqProcNum;
1095 uint8_t dlAssignIdx;
1097 uint8_t pucchResInd;
1098 uint8_t harqFeedbackInd;
1099 uint16_t dlMsgPduLen;
1101 FreqDomainAlloc freqAlloc;
1102 TimeDomainAlloc timeAlloc;
1104 TransportBlock transportBlock[2];
1106 PdcchCfg *dlMsgPdcchCfg;
1107 PdschCfg *dlMsgPdschCfg;
1110 typedef struct schSlotValue
1112 SlotTimingInfo currentTime;
1113 SlotTimingInfo broadcastTime;
1114 SlotTimingInfo rarTime;
1115 SlotTimingInfo dlMsgTime;
1116 SlotTimingInfo ulDciTime;
1120 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-36 DCI Format0_0 Configuration */
1121 typedef struct format0_0
1123 uint8_t resourceAllocType;
1124 FreqDomainAlloc freqAlloc;
1125 TimeDomainAlloc timeAlloc;
1136 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-40 DCI Format 0_1 Configuration */
1137 typedef struct format0_1
1139 uint8_t carrierIndicator;
1141 uint8_t bwpIndicator;
1142 uint8_t resourceAlloc;
1143 FreqDomainRsrc freqAlloc;
1144 TimeDomainAlloc timeAlloc;
1151 uint8_t firstDownlinkAssignmentIndex;
1152 uint8_t secondDownlinkAssignmentIndex;
1154 uint8_t srsResourceSetIndicator;
1155 uint8_t srsResourceIndicator;
1157 uint8_t antennaPorts;
1160 uint8_t cbgTransmissionInfo;
1162 uint8_t betaOffsetIndicator;
1163 bool dmrsSequenceInitialization;
1164 bool ulschIndicatior;
1167 typedef struct dciFormat
1169 FormatType formatType; /* DCI Format */
1172 Format0_0 format0_0; /* Format 0_0 */
1173 Format0_1 format0_1; /* Format 0_1 */
1177 typedef struct dciInfo
1179 uint16_t crnti; /* CRNTI */
1180 BwpCfg bwpCfg; /* BWP Cfg */
1181 CoresetCfg coresetCfg; /* Coreset1 Cfg */
1182 DciFormat dciFormatInfo; /* Dci Format */
1183 DlDCI dciInfo; /* DlDCI */
1187 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Section 11.2.4.3.8 DL Scheduling Information */
1188 typedef struct dlSchedInfo
1190 uint16_t cellId; /* Cell Id */
1191 SchSlotValue schSlotValue;
1193 /* Allocation for broadcast messages */
1194 bool isBroadcastPres;
1195 DlBrdcstAlloc brdcstAlloc;
1197 /* Allocation for RAR message */
1198 RarAlloc *rarAlloc[MAX_NUM_UE];
1200 /* UL grant in response to BSR */
1203 /* Allocation from dedicated DL msg */
1204 DlMsgSchInfo *dlMsgAlloc[MAX_NUM_UE];
1208 /*Reference: O-RAN.WG8.AAD.v7.0.0, Sec 11.2.4.3.13 Downlink Paging Allocation*/
1209 typedef struct interleaved_t
1211 uint8_t regBundleSize;
1212 uint8_t interleaverSize;
1213 uint16_t shiftIndex;
1216 typedef struct pageDlDci
1218 uint8_t freqDomainResource[6];
1219 uint8_t durationSymbols;
1220 uint8_t cceRegMappingType;
1223 Interleaved interleaved;
1224 uint8_t nonInterleaved;
1226 uint8_t ssStartSymbolIndex;
1228 uint8_t aggregLevel;
1229 uint8_t precoderGranularity;
1230 uint8_t coreSetSize;
1233 typedef struct resAllocType1 PageFreqDomainAlloc;
1235 typedef struct pageTimeDomainAlloc
1237 uint8_t mappingType;
1240 }PageTimeDomainAlloc;
1242 typedef struct pageDmrsConfig
1246 uint8_t nrOfDmrsSymbols;
1249 typedef struct pageTbInfo
1255 typedef struct pageDlSch
1257 PageFreqDomainAlloc freqAlloc;
1258 PageTimeDomainAlloc timeAlloc;
1259 PageDmrsConfig dmrs;
1260 uint8_t vrbPrbMapping;
1263 uint16_t dlPagePduLen;
1267 typedef struct dlPageAlloc
1270 SlotTimingInfo dlPageTime;
1275 PageDlDci pageDlDci;
1276 PageDlSch pageDlSch;
1279 typedef struct tbInfo
1281 uint8_t mcs; /* MCS */
1282 uint8_t ndi; /* NDI */
1283 uint8_t rv; /* Redundancy Version */
1284 uint16_t tbSize; /* TB Size */
1285 uint8_t qamOrder; /* Modulation Order */
1286 SchMcsTable mcsTable; /* MCS Table */
1289 typedef struct schPuschInfo
1291 uint8_t harqProcId; /* HARQ Process ID */
1293 FreqDomainAlloc fdAlloc; /* Freq domain allocation */
1294 TimeDomainAlloc tdAlloc; /* Time domain allocation */
1295 TbInfo tbInfo; /* TB info */
1297 uint8_t dmrsMappingType;
1298 uint8_t nrOfDmrsSymbols;
1303 typedef struct harqInfo
1305 uint16_t harqAckBitLength;
1306 uint8_t betaOffsetHarqAck;
1309 typedef struct csiInfo
1312 uint8_t betaOffsetCsi;
1315 typedef struct harqFdbkInfo
1317 uint16_t harqBitLength;
1320 typedef struct csiFdbkInfo
1325 typedef struct schPucchFormatCfg
1327 uint8_t interSlotFreqHop;
1329 uint8_t maxCodeRate;
1335 typedef struct schPucchInfo
1338 FreqDomainRsrc fdAlloc;
1339 TimeDomainAlloc tdAlloc;
1341 HarqFdbkInfo harqInfo;
1342 CsiFdbkInfo csiInfo;
1343 BeamformingInfo beamPucchInfo;
1344 uint8_t pucchFormat;
1345 uint8_t intraFreqHop;
1346 uint16_t secondPrbHop;
1347 uint8_t initialCyclicShift;
1355 typedef struct schPuschUci
1357 uint8_t harqProcId; /* HARQ Process ID */
1359 FreqDomainAlloc fdAlloc; /* Freq domain allocation */
1360 TimeDomainAlloc tdAlloc; /* Time domain allocation */
1361 TbInfo tbInfo; /* TB information */
1362 HarqInfo harqInfo; /* Harq Information */
1363 CsiInfo csiInfo; /* Csi information*/
1366 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Section 11.2.4.3.9 UL Scheduling Information */
1367 typedef struct ulSchedInfo
1369 uint16_t cellId; /* Cell Id */
1370 SlotTimingInfo slotIndInfo; /* Slot Info: sfn, slot number */
1371 uint8_t dataType; /* Type of info being scheduled */
1372 SchPrachInfo prachSchInfo; /* Prach scheduling info */
1373 SchPuschInfo schPuschInfo[MAX_NUM_UE]; /* Pusch scheduling info */
1374 SchPuschUci schPuschUci[MAX_NUM_UE]; /* Pusch Uci */
1375 SchPucchInfo schPucchInfo[MAX_NUM_UE]; /* Pucch and Uci scheduling info */
1378 /* Info of Scheduling Request to Add/Modify */
1379 typedef struct schSchedReqInfo
1382 SchSrProhibitTimer srProhibitTmr;
1383 SchSrTransMax srTransMax;
1386 /* Scheduling Request Configuration */
1387 typedef struct schSchedReqCfg
1389 uint8_t addModListCount;
1390 SchSchedReqInfo addModList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* List of Scheduling req to be added/modified */
1391 uint8_t relListCount;
1392 uint8_t relList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* list of scheduling request Id to be deleted */
1395 /* Info of Tag to Add/Modify */
1396 typedef struct schTagInfo
1399 SchTimeAlignmentTimer timeAlignmentTmr;
1402 /* Timing Advance Group Configuration */
1403 typedef struct schTagCfg
1405 uint8_t addModListCount;
1406 SchTagInfo addModList[MAX_NUM_TAGS]; /* List of Tag to Add/Modify */
1407 uint8_t relListCount;
1408 uint8_t relList[MAX_NUM_TAGS]; /* list of Tag Id to release */
1411 /* Configuration for Power headroom reporting */
1412 typedef struct schPhrCfg
1414 SchPhrPeriodicTimer periodicTmr;
1415 SchPhrProhibitTimer prohibitTmr;
1416 SchPhrTxPwrFactorChange txpowerFactorChange;
1419 bool type2OtherCell;
1420 SchPhrModeOtherCG modeOtherCG;
1423 /* MAC cell Group configuration */
1424 typedef struct schMacCellGrpCfg
1426 SchSchedReqCfg schedReqCfg;
1428 SchPhrCfg phrCfg; /* To be used only if phrCfgSetupPres is true */
1431 SchDrxCfg drxCfg; /* Drx configuration */
1435 /* Physical Cell Group Configuration */
1436 typedef struct schPhyCellGrpCfg
1438 SchPdschHarqAckCodebook pdschHarqAckCodebook;
1442 /* Control resource set info */
1443 typedef struct schControlRsrcSet
1445 uint8_t cRSetId; /* Control resource set id */
1446 uint8_t freqDomainRsrc[FREQ_DOM_RSRC_SIZE]; /* Frequency domain resource */
1448 SchREGMappingType cceRegMappingType;
1449 SchPrecoderGranul precoderGranularity;
1450 uint16_t dmrsScramblingId;
1453 /*Slot Perioicity and Offset*/
1454 typedef struct schMSlotPeriodAndOffset
1456 SchMSlotPeriodicity mSlotPeriodicity;
1457 uint16_t mSlotOffset;
1458 }SchMSlotPeriodAndOffset;
1460 /* Search Space info */
1461 typedef struct schSearchSpace
1463 uint8_t searchSpaceId;
1465 SchMSlotPeriodAndOffset mSlotPeriodicityAndOffset;
1466 uint8_t mSymbolsWithinSlot[MONITORING_SYMB_WITHIN_SLOT_SIZE];
1467 SchAggrLevel numCandidatesAggLevel1; /* Number of candidates for aggregation level 1 */
1468 SchAggrLevel numCandidatesAggLevel2; /* Number of candidates for aggregation level 2 */
1469 SchAggrLevel numCandidatesAggLevel4; /* Number of candidates for aggregation level 4 */
1470 SchAggrLevel numCandidatesAggLevel8; /* Number of candidates for aggregation level 8 */
1471 SchAggrLevel numCandidatesAggLevel16; /* Number of candidates for aggregation level 16 */
1472 SchSearchSpaceType searchSpaceType;
1473 uint8_t ueSpecificDciFormat;
1476 /* PDCCH cofniguration */
1477 typedef struct schPdcchConfig
1479 uint8_t numCRsetToAddMod;
1480 SchControlRsrcSet cRSetToAddModList[MAX_NUM_CRSET]; /* List of control resource set to add/modify */
1481 uint8_t numCRsetToRel;
1482 uint8_t cRSetToRelList[MAX_NUM_CRSET]; /* List of control resource set to release */
1483 uint8_t numSearchSpcToAddMod;
1484 SchSearchSpace searchSpcToAddModList[MAX_NUM_SEARCH_SPC]; /* List of search space to add/modify */
1485 uint8_t numSearchSpcToRel;
1486 uint8_t searchSpcToRelList[MAX_NUM_SEARCH_SPC]; /* List of search space to release */
1489 /* PDSCH time domain resource allocation */
1490 typedef struct schPdschTimeDomRsrcAlloc
1493 SchTimeDomRsrcAllocMappingType mappingType;
1494 uint8_t startSymbol;
1495 uint8_t symbolLength;
1496 }SchPdschTimeDomRsrcAlloc;
1499 typedef struct schPdschBundling
1501 struct schStaticBundling
1503 SchBundlingSizeSet2 size;
1505 struct schDynamicBundling
1507 SchBundlingSizeSet1 sizeSet1;
1508 SchBundlingSizeSet2 sizeSet2;
1509 }SchDynamicBundling;
1512 /* DMRS downlink configuration */
1513 typedef struct schDmrsDlCfg
1515 SchDmrsAdditionPosition addPos; /* DMRS additional position */
1518 /* PDSCH Configuration */
1519 typedef struct schPdschConfig
1521 SchDmrsDlCfg dmrsDlCfgForPdschMapTypeA;
1522 SchResourceAllocType resourceAllocType;
1523 uint8_t numTimeDomRsrcAlloc;
1524 SchPdschTimeDomRsrcAlloc timeDomRsrcAllociList[MAX_NUM_DL_ALLOC]; /* PDSCH time domain DL resource allocation list */
1526 SchCodeWordsSchedByDci numCodeWordsSchByDci; /* Number of code words scheduled by DCI */
1527 SchBundlingType bundlingType;
1528 SchPdschBundling bundlingInfo;
1531 /* Initial Downlink BWP */
1532 typedef struct schInitalDlBwp
1535 SchPdcchConfig pdcchCfg;
1537 SchPdschConfig pdschCfg;
1540 /*Spec 38.331 'RadioLinkMonitoringConfig'*/
1541 typedef uint8_t SchRadioLinkMonitoringRsId;
1543 typedef struct schRadioLinkMonRS
1545 SchRadioLinkMonitoringRsId radioLinkMonitoringRsId;
1546 SchPurposeOfFailureDet purpose;
1550 uint8_t nzpCsiRsResId;
1554 typedef struct schRadioLinkConfig
1556 SchRadioLinkMonRS failurDetResAddModList[MAX_FAILURE_DET_RESOURCES];
1557 SchRadioLinkMonitoringRsId failurDetResRelList[MAX_FAILURE_DET_RESOURCES];
1558 uint8_t beamFailureInstanceMaxCount;
1559 uint8_t beamFailureDetectionTimer;
1560 }SchRadioLinkConfig;
1562 /*Spec 38.331 "SPS-Config'*/
1563 typedef struct schSpsConfig
1565 uint16_t periodicity;
1566 uint8_t numOfHqProcess;
1568 SchMcsTable mcsTable;
1571 /* Spec 38.331, 'BWP-DownlinkDedicated'*/
1572 typedef struct schBwpDlCfgDed
1574 SchPdcchConfig pdcchCfgDed;
1575 SchPdschConfig pdschCfgDed;
1576 SchSpsConfig spsCfgDed;
1577 SchRadioLinkConfig radioLnkMonCfgDed;
1580 /* Spec 38.331, 'BWP-Downlink' Downlink BWP information */
1581 typedef struct schDlBwpInfo
1584 SchBwpDlCfg bwpCommon;
1585 SchBwpDlCfgDed bwpDedicated;
1588 /* PDCCH Serving Cell configuration */
1589 typedef struct schPdschServCellCfg
1591 uint8_t *maxMimoLayers;
1592 SchNumHarqProcForPdsch numHarqProcForPdsch;
1593 SchMaxCodeBlkGrpPerTB *maxCodeBlkGrpPerTb;
1594 bool *codeBlkGrpFlushInd;
1595 SchPdschXOverhead *xOverhead;
1596 }SchPdschServCellCfg;
1598 typedef struct schRaPrioritization
1600 uint8_t powerRampingStepHighPriority;
1601 uint8_t scalingFactorBI;
1602 }SchRaPrioritization;
1604 typedef struct schBfrCsiRsRes
1608 uint8_t raPreambleIndex;
1611 typedef struct schBfrSsbRes
1614 uint8_t raPreambleIndex;
1617 typedef struct schPrachResDedBfr
1620 SchBfrCsiRsRes csiRs;
1623 /*Spec 38.331 'BeamFailureRecoveryConfig' */
1624 typedef struct schBeamFailRecoveryCfg
1626 uint8_t rootSeqIndexBfr;
1627 SchRachCfgGeneric rachCfgBfr;
1628 uint8_t rsrpThreshSsbBfr; /* RSRP Threshold SSB */
1629 SchPrachResDedBfr candidateBeamRSList;
1630 uint8_t ssbPerRachBfr; /* SSB per RACH occassion */
1631 uint8_t raSsbOccMaskIndex;
1632 uint8_t recoverySearchSpaceId;
1633 SchRaPrioritization raPrioBfr;
1635 uint8_t msg1SubcSpacing; /* Subcarrier spacing of RACH */
1636 }SchBeamFailRecoveryCfg;
1638 /* PUCCH Configuration */
1639 typedef struct schPucchResrcSetInfo
1642 uint8_t resrcListCount;
1643 uint8_t resrcList[MAX_NUM_PUCCH_PER_RESRC_SET];
1644 uint8_t maxPayLoadSize;
1645 }SchPucchResrcSetInfo;
1647 typedef struct schPucchResrcSetCfg
1649 uint8_t resrcSetToAddModListCount;
1650 SchPucchResrcSetInfo resrcSetToAddModList[MAX_NUM_PUCCH_RESRC_SET];
1651 uint8_t resrcSetToRelListCount;
1652 uint8_t resrcSetToRelList[MAX_NUM_PUCCH_RESRC];
1653 }SchPucchResrcSetCfg;
1655 typedef struct schPucchFormat0
1657 uint8_t initialCyclicShift;
1659 uint8_t startSymbolIdx;
1662 typedef struct schPucchFormat1
1664 uint8_t initialCyclicShift;
1666 uint8_t startSymbolIdx;
1670 typedef struct schPucchFormat2_3
1674 uint8_t startSymbolIdx;
1677 typedef struct schPucchFormat4
1682 uint8_t startSymbolIdx;
1685 typedef struct schPucchResrcInfo
1689 uint8_t intraFreqHop;
1690 uint16_t secondPrbHop;
1691 uint8_t pucchFormat;
1693 SchPucchFormat0 *format0;
1694 SchPucchFormat1 *format1;
1695 SchPucchFormat2_3 *format2;
1696 SchPucchFormat2_3 *format3;
1697 SchPucchFormat4 *format4;
1701 typedef struct schPucchResrcCfg
1703 uint8_t resrcToAddModListCount;
1704 SchPucchResrcInfo resrcToAddModList[MAX_NUM_PUCCH_RESRC];
1705 uint8_t resrcToRelListCount;
1706 uint8_t resrcToRelList[MAX_NUM_PUCCH_RESRC];
1710 typedef struct schSchedReqResrcInfo
1714 uint8_t periodicity;
1717 }SchSchedReqResrcInfo;
1719 typedef struct schPucchSchedReqCfg
1721 uint8_t schedAddModListCount;
1722 SchSchedReqResrcInfo schedAddModList[MAX_NUM_SR_CFG_PER_CELL_GRP];
1723 uint8_t schedRelListCount;
1724 uint8_t schedRelList[MAX_NUM_SR_CFG_PER_CELL_GRP];
1725 }SchPucchSchedReqCfg;
1727 typedef struct schSpatialRelationInfo
1729 uint8_t spatialRelationId;
1730 uint8_t servCellIdx;
1731 uint8_t pathLossRefRSId;
1733 uint8_t closeLoopIdx;
1734 }SchSpatialRelationInfo;
1736 typedef struct schPucchSpatialCfg
1738 uint8_t spatialAddModListCount;
1739 SchSpatialRelationInfo spatialAddModList[MAX_NUM_SPATIAL_RELATIONS];
1740 uint8_t spatialRelListCount;
1741 uint8_t spatialRelList[MAX_NUM_SPATIAL_RELATIONS];
1742 }SchPucchSpatialCfg;
1744 typedef struct schP0PucchCfg
1750 typedef struct schPathLossRefRSCfg
1752 uint8_t pathLossRefRSId;
1753 }SchPathLossRefRSCfg;
1755 typedef struct schPucchMultiCsiCfg
1757 uint8_t multiCsiResrcListCount;
1758 uint8_t multiCsiResrcList[MAX_NUM_PUCCH_RESRC-1];
1759 }SchPucchMultiCsiCfg;
1761 typedef struct schPucchDlDataToUlAck
1763 uint8_t dlDataToUlAckListCount;
1764 uint8_t dlDataToUlAckList[MAX_NUM_DL_DATA_TO_UL_ACK];
1765 }SchPucchDlDataToUlAck;
1767 typedef struct schPucchPowerControl
1775 SchP0PucchCfg p0Set[MAX_NUM_PUCCH_P0_PER_SET];
1776 uint8_t pathLossRefRSListCount;
1777 SchPathLossRefRSCfg pathLossRefRSList[MAX_NUM_PATH_LOSS_REF_RS];
1778 }SchPucchPowerControl;
1780 typedef struct schPucchCfg
1782 SchPucchResrcSetCfg *resrcSet;
1783 SchPucchResrcCfg *resrc;
1784 SchPucchFormatCfg *format1;
1785 SchPucchFormatCfg *format2;
1786 SchPucchFormatCfg *format3;
1787 SchPucchFormatCfg *format4;
1788 SchPucchSchedReqCfg *schedReq;
1789 SchPucchMultiCsiCfg *multiCsiCfg;
1790 SchPucchSpatialCfg *spatialInfo;
1791 SchPucchDlDataToUlAck *dlDataToUlAck;
1792 SchPucchPowerControl *powerControl;
1795 /* Transform precoding disabled */
1796 typedef struct schTransPrecodDisabled
1798 uint16_t scramblingId0;
1799 }SchTransPrecodDisabled;
1801 /* DMRS Uplink configuration */
1802 typedef struct SchDmrsUlCfg
1804 SchDmrsAdditionPosition addPos; /* DMRS additional position */
1805 SchTransPrecodDisabled transPrecodDisabled; /* Transform precoding disabled */
1808 /* PUSCH Configuration */
1809 typedef struct schPuschCfg
1811 uint8_t dataScramblingId;
1812 SchDmrsUlCfg dmrsUlCfgForPuschMapTypeA;
1813 SchResourceAllocType resourceAllocType;
1814 uint8_t numTimeDomRsrcAlloc;
1815 SchPuschTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_UL_ALLOC]; /* PUSCH time domain UL resource allocation list */
1816 SchTransformPrecoder transformPrecoder;
1819 /* Initial Uplink BWP */
1820 typedef struct schInitialUlBwp
1823 SchPucchCfg pucchCfg;
1825 SchPuschCfg puschCfg;
1828 typedef struct schBwpCfgDedicated
1830 SchPucchCfg pucchCfg;
1831 SchPuschCfg puschCfg;
1832 }SchBwpCfgDedicated;
1834 /* Uplink BWP information */
1835 typedef struct schUlBwpInfo
1838 SchBwpUlCfg bwpCommon;
1839 SchBwpCfgDedicated bwpDed;
1842 typedef struct schBwpRelInfo
1847 /* Serving cell configuration */
1848 typedef struct schServCellRecfgInfo
1850 SchInitalDlBwp initDlBwp;
1851 SchRadioLinkConfig radioLinkMonConfig;
1852 uint8_t numDlBwpToAddOrMod;
1853 SchDlBwpInfo dlBwpToAddOrModList[MAX_NUM_BWP];
1854 uint8_t numDlBwpToRel;
1855 SchBwpRelInfo dlBwpToRelList[MAX_NUM_BWP];
1856 uint8_t firstActvDlBwpId;
1857 uint8_t defaultDlBwpId;
1858 uint8_t *bwpInactivityTmr;
1859 SchPdschServCellCfg pdschServCellCfg;
1860 SchInitialUlBwp initUlBwp;
1861 SchBeamFailRecoveryCfg beamFailureRecoveryCfg;
1862 uint8_t numUlBwpToAddOrMod;
1863 SchUlBwpInfo ulBwpToAddOrModList[MAX_NUM_BWP];
1864 uint8_t numUlBwpToRel;
1865 SchBwpRelInfo ulBwpToRelList[MAX_NUM_BWP];
1866 uint8_t firstActvUlBwpId;
1867 }SchServCellRecfgInfo;
1869 /* Serving cell configuration */
1870 typedef struct schServCellCfgInfo
1872 SchInitalDlBwp initDlBwp;
1873 SchRadioLinkConfig radioLinkMonConfig;
1874 uint8_t numDlBwpToAdd;
1875 SchDlBwpInfo dlBwpToAddList[MAX_NUM_BWP];
1876 uint8_t firstActvDlBwpId;
1877 uint8_t defaultDlBwpId;
1878 uint8_t *bwpInactivityTmr;
1879 SchPdschServCellCfg pdschServCellCfg;
1880 SchInitialUlBwp initUlBwp;
1881 SchBeamFailRecoveryCfg beamFailureRecoveryCfg;
1882 uint8_t numUlBwpToAdd;
1883 SchUlBwpInfo ulBwpToAddList[MAX_NUM_BWP];
1884 uint8_t firstActvUlBwpId;
1885 }SchServCellCfgInfo;
1887 typedef struct schNonDynFiveQi
1892 uint16_t maxDataBurstVol;
1895 typedef struct schDynFiveQi
1898 uint16_t packetDelayBudget;
1899 uint8_t packetErrRateScalar;
1900 uint8_t packetErrRateExp;
1902 uint8_t delayCritical;
1904 uint16_t maxDataBurstVol;
1907 typedef struct schNgRanAllocAndRetPri
1909 uint8_t priorityLevel;
1910 uint8_t preEmptionCap;
1911 uint8_t preEmptionVul;
1912 }SchNgRanAllocAndRetPri;
1914 typedef struct schGrbQosFlowInfo
1916 uint32_t maxFlowBitRateDl;
1917 uint32_t maxFlowBitRateUl;
1918 uint32_t guarFlowBitRateDl;
1919 uint32_t guarFlowBitRateUl;
1923 typedef struct schDrbQos
1925 SchQosType fiveQiType; /* Dynamic or non-dynamic */
1928 SchNonDynFiveQi nonDyn5Qi;
1929 SchDynFiveQi dyn5Qi;
1931 SchNgRanAllocAndRetPri ngRanRetPri;
1932 SchGrbQosFlowInfo grbQosFlowInfo;
1933 uint16_t pduSessionId;
1934 uint32_t ulPduSessAggMaxBitRate; /* UL PDU Session Aggregate max bit rate */
1937 /* Special cell configuration */
1938 typedef struct schSpCellCfg
1940 uint8_t servCellIdx;
1941 SchServCellCfgInfo servCellCfg;
1944 /* Special cell Reconfiguration */
1945 typedef struct schSpCellRecfg
1947 uint8_t servCellIdx;
1948 SchServCellRecfgInfo servCellRecfg;
1951 /* Uplink logical channel configuration */
1952 typedef struct SchUlLcCfg
1957 uint8_t pbr; // prioritisedBitRate
1958 uint8_t bsd; // bucketSizeDuration
1961 /* Downlink logical channel configuration */
1962 typedef struct schDlLcCfg
1964 uint8_t lcp; // logical Channel Prioritization
1967 /* Logical Channel configuration */
1968 typedef struct schLcCfg
1972 SchDrbQosInfo *drbQos;
1977 /* Aggregate max bit rate */
1978 typedef struct schAmbrCfg
1980 uint32_t ulBr; /* Ul BitRate */
1983 typedef struct schModulationInfo
1987 SchMcsTable mcsTable;
1990 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.5' UE Configuration Request*/
1991 typedef struct schUeCfgReq
1996 bool macCellGrpCfgPres;
1997 SchMacCellGrpCfg macCellGrpCfg;
1998 bool phyCellGrpCfgPres;
1999 SchPhyCellGrpCfg phyCellGrpCfg;
2001 SchSpCellCfg spCellCfg;
2002 SchAmbrCfg *ambrCfg;
2003 SchModulationInfo dlModInfo;
2004 SchModulationInfo ulModInfo;
2005 uint8_t numLcsToAdd;
2006 SchLcCfg schLcCfg[MAX_NUM_LC];
2009 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.6' UE Reconfiguration Request*/
2010 typedef struct schUeRecfgReq
2015 bool macCellGrpRecfgPres;
2016 SchMacCellGrpCfg macCellGrpRecfg;
2017 bool phyCellGrpRecfgPres;
2018 SchPhyCellGrpCfg phyCellGrpRecfg;
2019 bool spCellRecfgPres;
2020 SchSpCellRecfg spCellRecfg;
2021 SchAmbrCfg *ambrRecfg;
2022 SchModulationInfo dlModInfo;
2023 SchModulationInfo ulModInfo;
2024 uint8_t numLcsToAdd;
2025 SchLcCfg schLcCfgAdd[MAX_NUM_LC];
2026 uint8_t numLcsToDel;
2027 uint8_t lcIdToDel[MAX_NUM_LC];
2028 uint8_t numLcsToMod;
2029 SchLcCfg schLcCfgMod[MAX_NUM_LC];
2030 SchDataTransmission dataTransmissionInfo;
2032 bool drxConfigIndicatorRelease;
2036 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.3.5 UE Confg Response*/
2037 typedef struct schUeCfgRsp
2043 CauseOfResult cause;
2046 /*As per WG8 V7.0.0 Sec 11.2.4.3.6, UE ReCFG and UECFG have same structure definition*/
2047 typedef struct schUeCfgRsp SchUeRecfgRsp;
2049 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.7' Delete UE Request*/
2050 typedef struct schUeDelete
2056 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.3.7*/
2057 typedef struct schUeDeleteRsp
2062 CauseOfResult cause;
2065 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.8' DL HARQ Indication*/
2066 typedef struct dlHarqInd
2070 SlotTimingInfo slotInd;
2072 uint8_t harqPayload[MAX_HARQ_BITS_IN_BYTES];
2075 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.9' UL HARQ (CRC) Indication*/
2076 typedef struct crcIndInfo
2080 SlotTimingInfo timingInfo;
2082 uint8_t crcInd[MAX_NUMBER_OF_CRC_IND_BITS];
2085 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.10' UL Channel Quality Indication*/
2086 typedef struct ulCqiReport
2088 CqiUlReportType reportType;
2093 typedef struct schUlCqiInd
2097 SlotTimingInfo timingInfo;
2098 uint8_t numUlCqiReported;
2099 UlCqiReport ulCqiRpt;
2102 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.11' DL Channel Quality Indication*/
2103 typedef struct dlCqiReport
2105 uint8_t reportType; /*Bitmap for CQI, PMI, RI, CRI report*/
2112 typedef struct schDlCqiInd
2116 SlotTimingInfo timingInfo;
2117 uint8_t numDlCqiReported;
2118 DlCqiReport dlCqiRpt;
2121 /*Spec O-RAN WG8 v7.0.0, '11.2.4.2.12' Rach Ind contents*/
2122 typedef struct rachIndInfo
2126 SlotTimingInfo timingInfo;
2130 uint8_t preambleIdx;
2134 /*Spec O-RAN WG8 v7.0.0, '11.2.4.2.13' Paging Ind contents*/
2135 typedef struct schPageInd
2144 /*ORAN WG8 v7.0.0, Sec 11.2.4.2.14 Rach Res Request*/
2145 typedef struct schRachRsrcReq
2147 SlotTimingInfo slotInd;
2151 uint8_t ssbIdx[MAX_NUM_SSB];
2154 typedef struct schCfraSsbResource
2157 uint8_t raPreambleIdx;
2158 }SchCfraSsbResource;
2160 typedef struct schCfraRsrc
2163 SchCfraSsbResource ssbResource[MAX_NUM_SSB];
2166 typedef struct schRachRsrcRsp
2171 SchCfraResource cfraResource;
2174 /*ORAN WG8 v7.0.0, Sec 11.2.4.2.15 Rach Res Release*/
2175 typedef struct schRachRsrcRel
2177 SlotTimingInfo slotInd;
2180 SchCfraResource cfraResource;
2183 /*O-RAN WG* v7.0.0 Sec 11.2.4.2.16 DL RLC Buffer Status Information*/
2184 typedef struct dlRlcBOInfo
2189 uint32_t dataVolume;
2192 /*O-RAN WG8 v7.0.0 Sec 11.2.4.2.17 Scheduling Request Indication*/
2193 typedef struct srUciIndInfo
2197 SlotTimingInfo slotInd;
2199 uint8_t srPayload[MAX_SR_BITS_IN_BYTES];
2202 /*O-RAN WG* v7.0.0 Sec 11.2.4.2.18 UL RLC Buffer Status Information*/
2203 typedef struct dataVolInfo
2209 typedef struct ulBufferStatusRptInd
2215 DataVolInfo dataVolInfo[MAX_NUM_LOGICAL_CHANNEL_GROUPS];
2216 }UlBufferStatusRptInd;
2218 /**O-RAN WG* v7.0.0 Sec 11.2.4.2.19 Power Headroom Indication*/
2219 typedef struct phrData /*Spec 38.321 Sec 6.1.3.8*/
2225 typedef struct singlePhrInfo
2230 typedef struct multiPhr
2236 typedef struct multiplePhrInfo /*Spec 38.321 Sec 6.1.3.9*/
2238 uint8_t numPhrReported;
2239 MultiPhr multiPhrStat[MAX_PHR_REPORT];
2242 typedef struct schPwrHeadroomInd
2249 SinglePhrInfo singlePhr;
2250 MultiplePhrInfo multiPhr;
2254 typedef struct schUeHqInfo
2260 typedef struct schRlsHqInfo
2264 SchUeHqInfo *ueHqInfo;
2267 /* Statistics Request from MAC to SCH */
2268 typedef struct schStatsGrpInfo
2271 uint16_t periodicity; /* In milliseconds */
2273 SchMeasurementType statsList[MAX_NUM_STATS];
2276 typedef struct schStatsReq
2278 uint64_t subscriptionId;
2279 uint8_t numStatsGroup;
2280 SchStatsGrpInfo statsGrpList[MAX_NUM_STATS_GRP];
2283 typedef struct schStatsReq SchStatsModificationReq;
2284 typedef struct schStatsRsp SchStatsModificationRsp;
2286 /* Statistics Response from SCH to MAC */
2287 typedef struct schStatsGrpRejected
2290 CauseOfResult cause;
2291 }SchStatsGrpRejected;
2293 typedef struct schStatsRsp
2295 uint64_t subscriptionId;
2296 uint8_t numGrpAccepted;
2297 uint8_t statsGrpAcceptedList[MAX_NUM_STATS_GRP];
2298 uint8_t numGrpRejected;
2299 SchStatsGrpRejected statsGrpRejectedList[MAX_NUM_STATS_GRP];
2302 /* Statistics Indication from SCH to MAC */
2303 typedef struct schStats
2305 SchMeasurementType type;
2309 typedef struct schStatsInd
2311 uint64_t subscriptionId;
2314 SchStats measuredStatsList[MAX_NUM_STATS];
2317 typedef struct schStatsDeleteReq
2319 uint64_t subscriptionId;
2320 uint8_t numStatsGroupToBeDeleted;
2321 uint8_t statsGrpIdToBeDelList[MAX_NUM_STATS_GRP];
2324 typedef struct statsDeleteResult
2327 SchMacRsp statsGrpDelRsp;
2328 CauseOfResult statsGrpDelCause;
2331 typedef struct schStatsDeleteRsp
2333 uint64_t subscriptionId; /* subscription Id */
2334 SchMacRsp subsDelRsp; /* deletion status of all statsGrp with given subscriptionId */
2335 CauseOfResult subsDelCause; /* cause of failure in deletion of all statsGrp with given subscriptionId*/
2336 uint8_t numStatsGroupDeleted; /* num of action deleted */
2337 StatsDeleteResult statsGrpDelInfo[MAX_NUM_STATS_GRP]; /* list of the deletion status for specific actions */
2340 /* function declarations */
2341 uint8_t MacMessageRouter(Pst *pst, void *msg);
2342 uint8_t SchMessageRouter(Pst *pst, void *msg);
2344 /**********************************************************************
2346 **********************************************************************/