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 uint8_t numSliceSupport; /* Total slice supporting */
793 Snssai **snssai; /* List of supporting snssai*/
797 /* The following list of structures is taken from the DRX-Config section of specification 33.331. */
799 typedef struct schDrxOnDurationTimer
801 bool onDurationTimerValInMs;
804 uint8_t subMilliSeconds;
805 uint16_t milliSeconds;
806 }onDurationtimerValue;
807 }SchDrxOnDurationTimer;
809 typedef struct schDrxLongCycleStartOffset
811 uint16_t drxLongCycleStartOffsetChoice;
812 uint16_t drxLongCycleStartOffsetVal;
813 }SchDrxLongCycleStartOffset;
815 typedef struct schShortDrx
817 uint16_t drxShortCycle;
818 uint8_t drxShortCycleTimer;
821 typedef struct schDrxCfg
823 SchDrxOnDurationTimer drxOnDurationTimer;
824 uint16_t drxInactivityTimer;
825 uint8_t drxHarqRttTimerDl;
826 uint8_t drxHarqRttTimerUl;
827 uint16_t drxRetransmissionTimerDl;
828 uint16_t drxRetransmissionTimerUl;
829 SchDrxLongCycleStartOffset drxLongCycleStartOffset;
831 SchShortDrx shortDrx;
832 uint8_t drxSlotOffset;
836 /*Spec 38.331 'NrNsPmaxList'*/
837 typedef struct schNrNsPmaxList
840 long additionalSpectrumEmission;
843 /*Spec 38.331 'FrequencyInfoDL-SIB'*/
844 typedef struct schMultiFreqBandListSib
847 SchNrNsPmaxList nrNsPmaxList[1];
848 }SchMultiFreqBandListSib;
850 /*Spec 38.331 'SCS-SpecificCarrier'*/
851 typedef struct schScsSpecificCarrier
853 uint16_t offsetToCarrier;
854 uint8_t subCarrierSpacing;
856 uint16_t txDirectCurrentLoc;
857 }SchScsSpecificCarrier;
859 /*Spec 38.331 'FrequencyInfoDL-SIB'*/
860 typedef struct schFreqInfoDlSib
862 SchMultiFreqBandListSib mutiFreqBandList[1];
863 uint16_t offsetToPointA;
864 SchScsSpecificCarrier schSpcCarrier[1];
867 typedef struct schBcchCfg
872 /*Spec 38.331 'DownlinkConfigCommonSIB'*/
873 typedef struct schDlCfgCommon
875 SchFreqInfoDlSib schFreqInfoDlSib;
876 SchBwpDlCfg schInitialDlBwp; /* Initial DL BWP */
877 SchBcchCfg schBcchCfg;
878 SchPcchCfg schPcchCfg;
881 /*Spec 38.331 'FrequencyInfoUL-SIB'*/
882 typedef struct schFreqInfoUlSib
884 SchMultiFreqBandListSib mutiFreqBandList[1];
885 uint16_t absoluteFreqPointA;
886 SchScsSpecificCarrier schSpcCarrier[1];
888 bool frequencyShift7p5khz;
891 /*Spec 38.331 'UplinkConfigCommonSIB '*/
892 typedef struct schUlCfgCommon
894 SchFreqInfoUlSib schFreqInfoUlSib;
895 SchBwpUlCfg schInitialUlBwp; /* Initial DL BWP */
896 uint16_t schTimeAlignTimer;
899 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.2.1 Cell Conf Request*/
900 typedef struct schCellCfg
902 uint16_t cellId; /* Cell Id */
906 uint16_t phyCellId; /* Physical cell id */
907 SchPlmnInfoList plmnInfoList[MAX_PLMN]; /* Consits of PlmnId and Snssai list */
908 SchDuplexMode dupMode; /* Duplex type: TDD/FDD */
909 uint8_t dlBandwidth; /* Supported B/W */
910 uint8_t ulBandwidth; /* Supported B/W */
911 SchDlCfgCommon dlCfgCommon; /*Spec 38.331 DownlinkConfigCommonSIB*/
912 SchUlCfgCommon ulCfgCommon; /*Spec 38.331 UplinkConfigCommonSIB*/
914 TDDCfg tddCfg; /* Spec 38.331 tdd-UL-DL-ConfigurationCommon */
917 /*Ref:Spec 38.331 "ssb-PositionsInBurst", Value 0 in Bitmap => corresponding SS/PBCH block is not transmitted
918 *value 1 => corresponding SS/PBCH block is transmitted*/
919 uint32_t ssbPosInBurst[SCH_SSB_MASK_SIZE]; /* Bitmap for actually transmitted SSB. */
920 SchSSBPeriod ssbPeriod; /* SSB Periodicity in msec */
921 uint32_t ssbFrequency; /* SB frequency in kHz*/
922 uint8_t dmrsTypeAPos;
923 uint8_t ssbScs; /* SSB subcarrier spacing*/
924 SchPdcchConfigSib1 pdcchCfgSib1; /* Req to configure CORESET#0 and SearchSpace#0*/
925 uint32_t ssbPbchPwr; /* SSB block power */
926 uint8_t ssbSubcOffset; /* Subcarrier Offset(Kssb) */
930 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.3.1 Cell Config Response*/
931 typedef struct schCellCfgCfm
933 uint16_t cellId; /* Cell Id */
938 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.2.2 Cell Del Req*/
939 typedef struct schCellDeleteReq
944 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.3.2 Cell Del Response*/
945 typedef struct schCellDeleteRsp
952 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.2.3*/
953 typedef struct schRrmPolicyRatio
957 uint8_t dedicatedRatio;
960 typedef struct schRrmPolicyOfSlice
963 SchRrmPolicyRatio rrmPolicyRatioInfo;
964 }SchRrmPolicyOfSlice;
966 typedef struct schSliceCfgReq
968 uint8_t numOfConfiguredSlice;
969 SchRrmPolicyOfSlice **listOfSlices;
972 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.3.3 Slice Cfg Response*/
973 typedef struct schSliceCfgRsp
980 /*As per ORAN-WG8 V7.0.0 Sec 11.2.4.3.4 , Slice Cfg and Recfg are same structures*/
981 typedef struct schSliceCfgReq SchSliceRecfgReq;
982 typedef struct schSliceCfgRsp SchSliceRecfgRsp;
984 typedef struct ssbInfo
986 uint8_t ssbIdx; /* SSB Index */
987 TimeDomainAlloc tdAlloc; /* Time domain allocation */
988 FreqDomainRsrc fdAlloc; /* Freq domain allocation */
991 typedef struct sib1AllocInfo
994 PdcchCfg *sib1PdcchCfg;
997 typedef struct prachSchInfo
999 uint8_t numPrachOcas; /* Num Prach Ocassions */
1000 uint8_t prachFormat; /* PRACH Format */
1001 uint8_t numRa; /* Freq domain ocassion */
1002 uint8_t prachStartSymb; /* Freq domain ocassion */
1005 /* Interface structure signifying DL broadcast allocation for SSB, SIB1 */
1006 typedef struct dlBrdcstAlloc
1008 uint16_t crnti; /* SI-RNTI */
1009 /* Ssb transmission is determined as follows:
1010 * 0 : No tranamission
1011 * 1 : SSB Transmission
1012 * 2 : SSB Repetition */
1013 uint8_t ssbTransmissionMode;
1014 uint8_t ssbIdxSupported;
1015 SsbInfo ssbInfo[MAX_SSB_IDX];
1016 bool systemInfoIndicator;
1018 /* Sib1 transmission is determined as follows:
1019 * 0 : No tranamission
1020 * 1 : SIB1 Transmission
1021 * 2 : SIB1 Repetition */
1022 uint8_t sib1TransmissionMode;
1023 Sib1AllocInfo sib1Alloc;
1026 typedef struct msg3UlGrant
1028 uint8_t freqHopFlag;
1030 FreqDomainRsrc msg3FreqAlloc;
1037 typedef struct rarInfo
1041 Msg3UlGrant ulGrant;
1043 uint8_t rarPdu[RAR_PAYLOAD_SIZE];
1047 typedef struct rarAlloc
1052 PdcchCfg *rarPdcchCfg;
1053 PdschCfg *rarPdschCfg;
1056 typedef struct lcSchInfo
1062 typedef struct ceSchInfo
1068 typedef struct freqDomainAlloc
1070 uint8_t resAllocType; /* Resource allocation type */
1073 ResAllocType0 type0;
1074 ResAllocType1 type1;
1078 typedef struct transportBlock
1085 CeSchInfo ceSchInfo[MAX_NUM_LC];
1087 LcSchInfo lcSchInfo[MAX_NUM_LC];
1090 typedef struct dlMsgSchedInfo
1093 uint8_t dciFormatId;
1094 uint8_t harqProcNum;
1096 uint8_t dlAssignIdx;
1098 uint8_t pucchResInd;
1099 uint8_t harqFeedbackInd;
1100 uint16_t dlMsgPduLen;
1102 FreqDomainAlloc freqAlloc;
1103 TimeDomainAlloc timeAlloc;
1105 TransportBlock transportBlock[2];
1107 PdcchCfg *dlMsgPdcchCfg;
1108 PdschCfg *dlMsgPdschCfg;
1111 typedef struct schSlotValue
1113 SlotTimingInfo currentTime;
1114 SlotTimingInfo broadcastTime;
1115 SlotTimingInfo rarTime;
1116 SlotTimingInfo dlMsgTime;
1117 SlotTimingInfo ulDciTime;
1121 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-36 DCI Format0_0 Configuration */
1122 typedef struct format0_0
1124 uint8_t resourceAllocType;
1125 FreqDomainAlloc freqAlloc;
1126 TimeDomainAlloc timeAlloc;
1137 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-40 DCI Format 0_1 Configuration */
1138 typedef struct format0_1
1140 uint8_t carrierIndicator;
1142 uint8_t bwpIndicator;
1143 uint8_t resourceAlloc;
1144 FreqDomainRsrc freqAlloc;
1145 TimeDomainAlloc timeAlloc;
1152 uint8_t firstDownlinkAssignmentIndex;
1153 uint8_t secondDownlinkAssignmentIndex;
1155 uint8_t srsResourceSetIndicator;
1156 uint8_t srsResourceIndicator;
1158 uint8_t antennaPorts;
1161 uint8_t cbgTransmissionInfo;
1163 uint8_t betaOffsetIndicator;
1164 bool dmrsSequenceInitialization;
1165 bool ulschIndicatior;
1168 typedef struct dciFormat
1170 FormatType formatType; /* DCI Format */
1173 Format0_0 format0_0; /* Format 0_0 */
1174 Format0_1 format0_1; /* Format 0_1 */
1178 typedef struct dciInfo
1180 uint16_t crnti; /* CRNTI */
1181 BwpCfg bwpCfg; /* BWP Cfg */
1182 CoresetCfg coresetCfg; /* Coreset1 Cfg */
1183 DciFormat dciFormatInfo; /* Dci Format */
1184 DlDCI dciInfo; /* DlDCI */
1188 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Section 11.2.4.3.8 DL Scheduling Information */
1189 typedef struct dlSchedInfo
1191 uint16_t cellId; /* Cell Id */
1192 SchSlotValue schSlotValue;
1194 /* Allocation for broadcast messages */
1195 bool isBroadcastPres;
1196 DlBrdcstAlloc brdcstAlloc;
1198 /* Allocation for RAR message */
1199 RarAlloc *rarAlloc[MAX_NUM_UE];
1201 /* UL grant in response to BSR */
1204 /* Allocation from dedicated DL msg */
1205 DlMsgSchInfo *dlMsgAlloc[MAX_NUM_UE];
1209 /*Reference: O-RAN.WG8.AAD.v7.0.0, Sec 11.2.4.3.13 Downlink Paging Allocation*/
1210 typedef struct interleaved_t
1212 uint8_t regBundleSize;
1213 uint8_t interleaverSize;
1214 uint16_t shiftIndex;
1217 typedef struct pageDlDci
1219 uint8_t freqDomainResource[6];
1220 uint8_t durationSymbols;
1221 uint8_t cceRegMappingType;
1224 Interleaved interleaved;
1225 uint8_t nonInterleaved;
1227 uint8_t ssStartSymbolIndex;
1229 uint8_t aggregLevel;
1230 uint8_t precoderGranularity;
1231 uint8_t coreSetSize;
1234 typedef struct resAllocType1 PageFreqDomainAlloc;
1236 typedef struct pageTimeDomainAlloc
1238 uint8_t mappingType;
1241 }PageTimeDomainAlloc;
1243 typedef struct pageDmrsConfig
1247 uint8_t nrOfDmrsSymbols;
1250 typedef struct pageTbInfo
1256 typedef struct pageDlSch
1258 PageFreqDomainAlloc freqAlloc;
1259 PageTimeDomainAlloc timeAlloc;
1260 PageDmrsConfig dmrs;
1261 uint8_t vrbPrbMapping;
1264 uint16_t dlPagePduLen;
1268 typedef struct dlPageAlloc
1271 SlotTimingInfo dlPageTime;
1276 PageDlDci pageDlDci;
1277 PageDlSch pageDlSch;
1280 typedef struct tbInfo
1282 uint8_t mcs; /* MCS */
1283 uint8_t ndi; /* NDI */
1284 uint8_t rv; /* Redundancy Version */
1285 uint16_t tbSize; /* TB Size */
1286 uint8_t qamOrder; /* Modulation Order */
1287 SchMcsTable mcsTable; /* MCS Table */
1290 typedef struct schPuschInfo
1292 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
1337 FreqDomainRsrc fdAlloc;
1338 TimeDomainAlloc tdAlloc;
1340 HarqFdbkInfo harqInfo;
1341 CsiFdbkInfo csiInfo;
1342 BeamformingInfo beamPucchInfo;
1343 uint8_t pucchFormat;
1344 uint8_t intraFreqHop;
1345 uint16_t secondPrbHop;
1346 uint8_t initialCyclicShift;
1354 typedef struct schPuschUci
1356 uint8_t harqProcId; /* HARQ Process ID */
1357 FreqDomainAlloc fdAlloc; /* Freq domain allocation */
1358 TimeDomainAlloc tdAlloc; /* Time domain allocation */
1359 TbInfo tbInfo; /* TB information */
1360 HarqInfo harqInfo; /* Harq Information */
1361 CsiInfo csiInfo; /* Csi information*/
1364 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Section 11.2.4.3.9 UL Scheduling Information */
1365 typedef struct ulSchedInfo
1367 uint16_t cellId; /* Cell Id */
1368 uint16_t crnti; /* CRNI */
1369 SlotTimingInfo slotIndInfo; /* Slot Info: sfn, slot number */
1370 uint8_t dataType; /* Type of info being scheduled */
1371 SchPrachInfo prachSchInfo; /* Prach scheduling info */
1372 SchPuschInfo schPuschInfo; /* Pusch scheduling info */
1373 SchPuschUci schPuschUci; /* Pusch Uci */
1374 SchPucchInfo schPucchInfo; /* Pucch and Uci scheduling info */
1377 /* Info of Scheduling Request to Add/Modify */
1378 typedef struct schSchedReqInfo
1381 SchSrProhibitTimer srProhibitTmr;
1382 SchSrTransMax srTransMax;
1385 /* Scheduling Request Configuration */
1386 typedef struct schSchedReqCfg
1388 uint8_t addModListCount;
1389 SchSchedReqInfo addModList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* List of Scheduling req to be added/modified */
1390 uint8_t relListCount;
1391 uint8_t relList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* list of scheduling request Id to be deleted */
1394 /* Info of Tag to Add/Modify */
1395 typedef struct schTagInfo
1398 SchTimeAlignmentTimer timeAlignmentTmr;
1401 /* Timing Advance Group Configuration */
1402 typedef struct schTagCfg
1404 uint8_t addModListCount;
1405 SchTagInfo addModList[MAX_NUM_TAGS]; /* List of Tag to Add/Modify */
1406 uint8_t relListCount;
1407 uint8_t relList[MAX_NUM_TAGS]; /* list of Tag Id to release */
1410 /* Configuration for Power headroom reporting */
1411 typedef struct schPhrCfg
1413 SchPhrPeriodicTimer periodicTmr;
1414 SchPhrProhibitTimer prohibitTmr;
1415 SchPhrTxPwrFactorChange txpowerFactorChange;
1418 bool type2OtherCell;
1419 SchPhrModeOtherCG modeOtherCG;
1422 /* MAC cell Group configuration */
1423 typedef struct schMacCellGrpCfg
1425 SchSchedReqCfg schedReqCfg;
1427 SchPhrCfg phrCfg; /* To be used only if phrCfgSetupPres is true */
1430 SchDrxCfg drxCfg; /* Drx configuration */
1434 /* Physical Cell Group Configuration */
1435 typedef struct schPhyCellGrpCfg
1437 SchPdschHarqAckCodebook pdschHarqAckCodebook;
1441 /* Control resource set info */
1442 typedef struct schControlRsrcSet
1444 uint8_t cRSetId; /* Control resource set id */
1445 uint8_t freqDomainRsrc[FREQ_DOM_RSRC_SIZE]; /* Frequency domain resource */
1447 SchREGMappingType cceRegMappingType;
1448 SchPrecoderGranul precoderGranularity;
1449 uint16_t dmrsScramblingId;
1452 /*Slot Perioicity and Offset*/
1453 typedef struct schMSlotPeriodAndOffset
1455 SchMSlotPeriodicity mSlotPeriodicity;
1456 uint16_t mSlotOffset;
1457 }SchMSlotPeriodAndOffset;
1459 /* Search Space info */
1460 typedef struct schSearchSpace
1462 uint8_t searchSpaceId;
1464 SchMSlotPeriodAndOffset mSlotPeriodicityAndOffset;
1465 uint8_t mSymbolsWithinSlot[MONITORING_SYMB_WITHIN_SLOT_SIZE];
1466 SchAggrLevel numCandidatesAggLevel1; /* Number of candidates for aggregation level 1 */
1467 SchAggrLevel numCandidatesAggLevel2; /* Number of candidates for aggregation level 2 */
1468 SchAggrLevel numCandidatesAggLevel4; /* Number of candidates for aggregation level 4 */
1469 SchAggrLevel numCandidatesAggLevel8; /* Number of candidates for aggregation level 8 */
1470 SchAggrLevel numCandidatesAggLevel16; /* Number of candidates for aggregation level 16 */
1471 SchSearchSpaceType searchSpaceType;
1472 uint8_t ueSpecificDciFormat;
1475 /* PDCCH cofniguration */
1476 typedef struct schPdcchConfig
1478 uint8_t numCRsetToAddMod;
1479 SchControlRsrcSet cRSetToAddModList[MAX_NUM_CRSET]; /* List of control resource set to add/modify */
1480 uint8_t numCRsetToRel;
1481 uint8_t cRSetToRelList[MAX_NUM_CRSET]; /* List of control resource set to release */
1482 uint8_t numSearchSpcToAddMod;
1483 SchSearchSpace searchSpcToAddModList[MAX_NUM_SEARCH_SPC]; /* List of search space to add/modify */
1484 uint8_t numSearchSpcToRel;
1485 uint8_t searchSpcToRelList[MAX_NUM_SEARCH_SPC]; /* List of search space to release */
1488 /* PDSCH time domain resource allocation */
1489 typedef struct schPdschTimeDomRsrcAlloc
1492 SchTimeDomRsrcAllocMappingType mappingType;
1493 uint8_t startSymbol;
1494 uint8_t symbolLength;
1495 }SchPdschTimeDomRsrcAlloc;
1498 typedef struct schPdschBundling
1500 struct schStaticBundling
1502 SchBundlingSizeSet2 size;
1504 struct schDynamicBundling
1506 SchBundlingSizeSet1 sizeSet1;
1507 SchBundlingSizeSet2 sizeSet2;
1508 }SchDynamicBundling;
1511 /* DMRS downlink configuration */
1512 typedef struct schDmrsDlCfg
1514 SchDmrsAdditionPosition addPos; /* DMRS additional position */
1517 /* PDSCH Configuration */
1518 typedef struct schPdschConfig
1520 SchDmrsDlCfg dmrsDlCfgForPdschMapTypeA;
1521 SchResourceAllocType resourceAllocType;
1522 uint8_t numTimeDomRsrcAlloc;
1523 SchPdschTimeDomRsrcAlloc timeDomRsrcAllociList[MAX_NUM_DL_ALLOC]; /* PDSCH time domain DL resource allocation list */
1525 SchCodeWordsSchedByDci numCodeWordsSchByDci; /* Number of code words scheduled by DCI */
1526 SchBundlingType bundlingType;
1527 SchPdschBundling bundlingInfo;
1530 /* Initial Downlink BWP */
1531 typedef struct schInitalDlBwp
1534 SchPdcchConfig pdcchCfg;
1536 SchPdschConfig pdschCfg;
1539 /*Spec 38.331 'RadioLinkMonitoringConfig'*/
1540 typedef uint8_t SchRadioLinkMonitoringRsId;
1542 typedef struct schRadioLinkMonRS
1544 SchRadioLinkMonitoringRsId radioLinkMonitoringRsId;
1545 SchPurposeOfFailureDet purpose;
1549 uint8_t nzpCsiRsResId;
1553 typedef struct schRadioLinkConfig
1555 SchRadioLinkMonRS failurDetResAddModList[MAX_FAILURE_DET_RESOURCES];
1556 SchRadioLinkMonitoringRsId failurDetResRelList[MAX_FAILURE_DET_RESOURCES];
1557 uint8_t beamFailureInstanceMaxCount;
1558 uint8_t beamFailureDetectionTimer;
1559 }SchRadioLinkConfig;
1561 /*Spec 38.331 "SPS-Config'*/
1562 typedef struct schSpsConfig
1564 uint16_t periodicity;
1565 uint8_t numOfHqProcess;
1567 SchMcsTable mcsTable;
1570 /* Spec 38.331, 'BWP-DownlinkDedicated'*/
1571 typedef struct schBwpDlCfgDed
1573 SchPdcchConfig pdcchCfgDed;
1574 SchPdschConfig pdschCfgDed;
1575 SchSpsConfig spsCfgDed;
1576 SchRadioLinkConfig radioLnkMonCfgDed;
1579 /* Spec 38.331, 'BWP-Downlink' Downlink BWP information */
1580 typedef struct schDlBwpInfo
1583 SchBwpDlCfg bwpCommon;
1584 SchBwpDlCfgDed bwpDedicated;
1587 /* PDCCH Serving Cell configuration */
1588 typedef struct schPdschServCellCfg
1590 uint8_t *maxMimoLayers;
1591 SchNumHarqProcForPdsch numHarqProcForPdsch;
1592 SchMaxCodeBlkGrpPerTB *maxCodeBlkGrpPerTb;
1593 bool *codeBlkGrpFlushInd;
1594 SchPdschXOverhead *xOverhead;
1595 }SchPdschServCellCfg;
1597 typedef struct schRaPrioritization
1599 uint8_t powerRampingStepHighPriority;
1600 uint8_t scalingFactorBI;
1601 }SchRaPrioritization;
1603 typedef struct schBfrCsiRsRes
1607 uint8_t raPreambleIndex;
1610 typedef struct schBfrSsbRes
1613 uint8_t raPreambleIndex;
1616 typedef struct schPrachResDedBfr
1619 SchBfrCsiRsRes csiRs;
1622 /*Spec 38.331 'BeamFailureRecoveryConfig' */
1623 typedef struct schBeamFailRecoveryCfg
1625 uint8_t rootSeqIndexBfr;
1626 SchRachCfgGeneric rachCfgBfr;
1627 uint8_t rsrpThreshSsbBfr; /* RSRP Threshold SSB */
1628 SchPrachResDedBfr candidateBeamRSList;
1629 uint8_t ssbPerRachBfr; /* SSB per RACH occassion */
1630 uint8_t raSsbOccMaskIndex;
1631 uint8_t recoverySearchSpaceId;
1632 SchRaPrioritization raPrioBfr;
1634 uint8_t msg1SubcSpacing; /* Subcarrier spacing of RACH */
1635 }SchBeamFailRecoveryCfg;
1637 /* PUCCH Configuration */
1638 typedef struct schPucchResrcSetInfo
1641 uint8_t resrcListCount;
1642 uint8_t resrcList[MAX_NUM_PUCCH_PER_RESRC_SET];
1643 uint8_t maxPayLoadSize;
1644 }SchPucchResrcSetInfo;
1646 typedef struct schPucchResrcSetCfg
1648 uint8_t resrcSetToAddModListCount;
1649 SchPucchResrcSetInfo resrcSetToAddModList[MAX_NUM_PUCCH_RESRC_SET];
1650 uint8_t resrcSetToRelListCount;
1651 uint8_t resrcSetToRelList[MAX_NUM_PUCCH_RESRC];
1652 }SchPucchResrcSetCfg;
1654 typedef struct schPucchFormat0
1656 uint8_t initialCyclicShift;
1658 uint8_t startSymbolIdx;
1661 typedef struct schPucchFormat1
1663 uint8_t initialCyclicShift;
1665 uint8_t startSymbolIdx;
1669 typedef struct schPucchFormat2_3
1673 uint8_t startSymbolIdx;
1676 typedef struct schPucchFormat4
1681 uint8_t startSymbolIdx;
1684 typedef struct schPucchResrcInfo
1688 uint8_t intraFreqHop;
1689 uint16_t secondPrbHop;
1690 uint8_t pucchFormat;
1692 SchPucchFormat0 *format0;
1693 SchPucchFormat1 *format1;
1694 SchPucchFormat2_3 *format2;
1695 SchPucchFormat2_3 *format3;
1696 SchPucchFormat4 *format4;
1700 typedef struct schPucchResrcCfg
1702 uint8_t resrcToAddModListCount;
1703 SchPucchResrcInfo resrcToAddModList[MAX_NUM_PUCCH_RESRC];
1704 uint8_t resrcToRelListCount;
1705 uint8_t resrcToRelList[MAX_NUM_PUCCH_RESRC];
1709 typedef struct schSchedReqResrcInfo
1713 uint8_t periodicity;
1716 }SchSchedReqResrcInfo;
1718 typedef struct schPucchSchedReqCfg
1720 uint8_t schedAddModListCount;
1721 SchSchedReqResrcInfo schedAddModList[MAX_NUM_SR_CFG_PER_CELL_GRP];
1722 uint8_t schedRelListCount;
1723 uint8_t schedRelList[MAX_NUM_SR_CFG_PER_CELL_GRP];
1724 }SchPucchSchedReqCfg;
1726 typedef struct schSpatialRelationInfo
1728 uint8_t spatialRelationId;
1729 uint8_t servCellIdx;
1730 uint8_t pathLossRefRSId;
1732 uint8_t closeLoopIdx;
1733 }SchSpatialRelationInfo;
1735 typedef struct schPucchSpatialCfg
1737 uint8_t spatialAddModListCount;
1738 SchSpatialRelationInfo spatialAddModList[MAX_NUM_SPATIAL_RELATIONS];
1739 uint8_t spatialRelListCount;
1740 uint8_t spatialRelList[MAX_NUM_SPATIAL_RELATIONS];
1741 }SchPucchSpatialCfg;
1743 typedef struct schP0PucchCfg
1749 typedef struct schPathLossRefRSCfg
1751 uint8_t pathLossRefRSId;
1752 }SchPathLossRefRSCfg;
1754 typedef struct schPucchMultiCsiCfg
1756 uint8_t multiCsiResrcListCount;
1757 uint8_t multiCsiResrcList[MAX_NUM_PUCCH_RESRC-1];
1758 }SchPucchMultiCsiCfg;
1760 typedef struct schPucchDlDataToUlAck
1762 uint8_t dlDataToUlAckListCount;
1763 uint8_t dlDataToUlAckList[MAX_NUM_DL_DATA_TO_UL_ACK];
1764 }SchPucchDlDataToUlAck;
1766 typedef struct schPucchPowerControl
1774 SchP0PucchCfg p0Set[MAX_NUM_PUCCH_P0_PER_SET];
1775 uint8_t pathLossRefRSListCount;
1776 SchPathLossRefRSCfg pathLossRefRSList[MAX_NUM_PATH_LOSS_REF_RS];
1777 }SchPucchPowerControl;
1779 typedef struct schPucchCfg
1781 SchPucchResrcSetCfg *resrcSet;
1782 SchPucchResrcCfg *resrc;
1783 SchPucchFormatCfg *format1;
1784 SchPucchFormatCfg *format2;
1785 SchPucchFormatCfg *format3;
1786 SchPucchFormatCfg *format4;
1787 SchPucchSchedReqCfg *schedReq;
1788 SchPucchMultiCsiCfg *multiCsiCfg;
1789 SchPucchSpatialCfg *spatialInfo;
1790 SchPucchDlDataToUlAck *dlDataToUlAck;
1791 SchPucchPowerControl *powerControl;
1794 /* Transform precoding disabled */
1795 typedef struct schTransPrecodDisabled
1797 uint16_t scramblingId0;
1798 }SchTransPrecodDisabled;
1800 /* DMRS Uplink configuration */
1801 typedef struct SchDmrsUlCfg
1803 SchDmrsAdditionPosition addPos; /* DMRS additional position */
1804 SchTransPrecodDisabled transPrecodDisabled; /* Transform precoding disabled */
1807 /* PUSCH Configuration */
1808 typedef struct schPuschCfg
1810 uint8_t dataScramblingId;
1811 SchDmrsUlCfg dmrsUlCfgForPuschMapTypeA;
1812 SchResourceAllocType resourceAllocType;
1813 uint8_t numTimeDomRsrcAlloc;
1814 SchPuschTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_UL_ALLOC]; /* PUSCH time domain UL resource allocation list */
1815 SchTransformPrecoder transformPrecoder;
1818 /* Initial Uplink BWP */
1819 typedef struct schInitialUlBwp
1822 SchPucchCfg pucchCfg;
1824 SchPuschCfg puschCfg;
1827 typedef struct schBwpCfgDedicated
1829 SchPucchCfg pucchCfg;
1830 SchPuschCfg puschCfg;
1831 }SchBwpCfgDedicated;
1833 /* Uplink BWP information */
1834 typedef struct schUlBwpInfo
1837 SchBwpUlCfg bwpCommon;
1838 SchBwpCfgDedicated bwpDed;
1841 typedef struct schBwpRelInfo
1846 /* Serving cell configuration */
1847 typedef struct schServCellRecfgInfo
1849 SchInitalDlBwp initDlBwp;
1850 SchRadioLinkConfig radioLinkMonConfig;
1851 uint8_t numDlBwpToAddOrMod;
1852 SchDlBwpInfo dlBwpToAddOrModList[MAX_NUM_BWP];
1853 uint8_t numDlBwpToRel;
1854 SchBwpRelInfo dlBwpToRelList[MAX_NUM_BWP];
1855 uint8_t firstActvDlBwpId;
1856 uint8_t defaultDlBwpId;
1857 uint8_t *bwpInactivityTmr;
1858 SchPdschServCellCfg pdschServCellCfg;
1859 SchInitialUlBwp initUlBwp;
1860 SchBeamFailRecoveryCfg beamFailureRecoveryCfg;
1861 uint8_t numUlBwpToAddOrMod;
1862 SchUlBwpInfo ulBwpToAddOrModList[MAX_NUM_BWP];
1863 uint8_t numUlBwpToRel;
1864 SchBwpRelInfo ulBwpToRelList[MAX_NUM_BWP];
1865 uint8_t firstActvUlBwpId;
1866 }SchServCellRecfgInfo;
1868 /* Serving cell configuration */
1869 typedef struct schServCellCfgInfo
1871 SchInitalDlBwp initDlBwp;
1872 SchRadioLinkConfig radioLinkMonConfig;
1873 uint8_t numDlBwpToAdd;
1874 SchDlBwpInfo dlBwpToAddList[MAX_NUM_BWP];
1875 uint8_t firstActvDlBwpId;
1876 uint8_t defaultDlBwpId;
1877 uint8_t *bwpInactivityTmr;
1878 SchPdschServCellCfg pdschServCellCfg;
1879 SchInitialUlBwp initUlBwp;
1880 SchBeamFailRecoveryCfg beamFailureRecoveryCfg;
1881 uint8_t numUlBwpToAdd;
1882 SchUlBwpInfo ulBwpToAddList[MAX_NUM_BWP];
1883 uint8_t firstActvUlBwpId;
1884 }SchServCellCfgInfo;
1886 typedef struct schNonDynFiveQi
1891 uint16_t maxDataBurstVol;
1894 typedef struct schDynFiveQi
1897 uint16_t packetDelayBudget;
1898 uint8_t packetErrRateScalar;
1899 uint8_t packetErrRateExp;
1901 uint8_t delayCritical;
1903 uint16_t maxDataBurstVol;
1906 typedef struct schNgRanAllocAndRetPri
1908 uint8_t priorityLevel;
1909 uint8_t preEmptionCap;
1910 uint8_t preEmptionVul;
1911 }SchNgRanAllocAndRetPri;
1913 typedef struct schGrbQosFlowInfo
1915 uint32_t maxFlowBitRateDl;
1916 uint32_t maxFlowBitRateUl;
1917 uint32_t guarFlowBitRateDl;
1918 uint32_t guarFlowBitRateUl;
1922 typedef struct schDrbQos
1924 SchQosType fiveQiType; /* Dynamic or non-dynamic */
1927 SchNonDynFiveQi nonDyn5Qi;
1928 SchDynFiveQi dyn5Qi;
1930 SchNgRanAllocAndRetPri ngRanRetPri;
1931 SchGrbQosFlowInfo grbQosFlowInfo;
1932 uint16_t pduSessionId;
1933 uint32_t ulPduSessAggMaxBitRate; /* UL PDU Session Aggregate max bit rate */
1936 /* Special cell configuration */
1937 typedef struct schSpCellCfg
1939 uint8_t servCellIdx;
1940 SchServCellCfgInfo servCellCfg;
1943 /* Special cell Reconfiguration */
1944 typedef struct schSpCellRecfg
1946 uint8_t servCellIdx;
1947 SchServCellRecfgInfo servCellRecfg;
1950 /* Uplink logical channel configuration */
1951 typedef struct SchUlLcCfg
1956 uint8_t pbr; // prioritisedBitRate
1957 uint8_t bsd; // bucketSizeDuration
1960 /* Downlink logical channel configuration */
1961 typedef struct schDlLcCfg
1963 uint8_t lcp; // logical Channel Prioritization
1966 /* Logical Channel configuration */
1967 typedef struct schLcCfg
1971 SchDrbQosInfo *drbQos;
1976 /* Aggregate max bit rate */
1977 typedef struct schAmbrCfg
1979 uint32_t ulBr; /* Ul BitRate */
1982 typedef struct schModulationInfo
1986 SchMcsTable mcsTable;
1989 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.5' UE Configuration Request*/
1990 typedef struct schUeCfgReq
1995 bool macCellGrpCfgPres;
1996 SchMacCellGrpCfg macCellGrpCfg;
1997 bool phyCellGrpCfgPres;
1998 SchPhyCellGrpCfg phyCellGrpCfg;
2000 SchSpCellCfg spCellCfg;
2001 SchAmbrCfg *ambrCfg;
2002 SchModulationInfo dlModInfo;
2003 SchModulationInfo ulModInfo;
2004 uint8_t numLcsToAdd;
2005 SchLcCfg schLcCfg[MAX_NUM_LC];
2008 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.6' UE Reconfiguration Request*/
2009 typedef struct schUeRecfgReq
2014 bool macCellGrpRecfgPres;
2015 SchMacCellGrpCfg macCellGrpRecfg;
2016 bool phyCellGrpRecfgPres;
2017 SchPhyCellGrpCfg phyCellGrpRecfg;
2018 bool spCellRecfgPres;
2019 SchSpCellRecfg spCellRecfg;
2020 SchAmbrCfg *ambrRecfg;
2021 SchModulationInfo dlModInfo;
2022 SchModulationInfo ulModInfo;
2023 uint8_t numLcsToAdd;
2024 SchLcCfg schLcCfgAdd[MAX_NUM_LC];
2025 uint8_t numLcsToDel;
2026 uint8_t lcIdToDel[MAX_NUM_LC];
2027 uint8_t numLcsToMod;
2028 SchLcCfg schLcCfgMod[MAX_NUM_LC];
2029 SchDataTransmission dataTransmissionInfo;
2031 bool drxConfigIndicatorRelease;
2035 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.3.5 UE Confg Response*/
2036 typedef struct schUeCfgRsp
2042 CauseOfResult cause;
2045 /*As per WG8 V7.0.0 Sec 11.2.4.3.6, UE ReCFG and UECFG have same structure definition*/
2046 typedef struct schUeCfgRsp SchUeRecfgRsp;
2048 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.7' Delete UE Request*/
2049 typedef struct schUeDelete
2055 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.3.7*/
2056 typedef struct schUeDeleteRsp
2061 CauseOfResult cause;
2064 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.8' DL HARQ Indication*/
2065 typedef struct dlHarqInd
2069 SlotTimingInfo slotInd;
2071 uint8_t harqPayload[MAX_HARQ_BITS_IN_BYTES];
2074 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.9' UL HARQ (CRC) Indication*/
2075 typedef struct crcIndInfo
2079 SlotTimingInfo timingInfo;
2081 uint8_t crcInd[MAX_NUMBER_OF_CRC_IND_BITS];
2084 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.10' UL Channel Quality Indication*/
2085 typedef struct ulCqiReport
2087 CqiUlReportType reportType;
2092 typedef struct schUlCqiInd
2096 SlotTimingInfo timingInfo;
2097 uint8_t numUlCqiReported;
2098 UlCqiReport ulCqiRpt;
2101 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.11' DL Channel Quality Indication*/
2102 typedef struct dlCqiReport
2104 uint8_t reportType; /*Bitmap for CQI, PMI, RI, CRI report*/
2111 typedef struct schDlCqiInd
2115 SlotTimingInfo timingInfo;
2116 uint8_t numDlCqiReported;
2117 DlCqiReport dlCqiRpt;
2120 /*Spec O-RAN WG8 v7.0.0, '11.2.4.2.12' Rach Ind contents*/
2121 typedef struct rachIndInfo
2125 SlotTimingInfo timingInfo;
2129 uint8_t preambleIdx;
2133 /*Spec O-RAN WG8 v7.0.0, '11.2.4.2.13' Paging Ind contents*/
2134 typedef struct schPageInd
2143 /*ORAN WG8 v7.0.0, Sec 11.2.4.2.14 Rach Res Request*/
2144 typedef struct schRachRsrcReq
2146 SlotTimingInfo slotInd;
2150 uint8_t ssbIdx[MAX_NUM_SSB];
2153 typedef struct schCfraSsbResource
2156 uint8_t raPreambleIdx;
2157 }SchCfraSsbResource;
2159 typedef struct schCfraRsrc
2162 SchCfraSsbResource ssbResource[MAX_NUM_SSB];
2165 typedef struct schRachRsrcRsp
2170 SchCfraResource cfraResource;
2173 /*ORAN WG8 v7.0.0, Sec 11.2.4.2.15 Rach Res Release*/
2174 typedef struct schRachRsrcRel
2176 SlotTimingInfo slotInd;
2179 SchCfraResource cfraResource;
2182 /*O-RAN WG* v7.0.0 Sec 11.2.4.2.16 DL RLC Buffer Status Information*/
2183 typedef struct dlRlcBOInfo
2188 uint32_t dataVolume;
2191 /*O-RAN WG8 v7.0.0 Sec 11.2.4.2.17 Scheduling Request Indication*/
2192 typedef struct srUciIndInfo
2196 SlotTimingInfo slotInd;
2198 uint8_t srPayload[MAX_SR_BITS_IN_BYTES];
2201 /*O-RAN WG* v7.0.0 Sec 11.2.4.2.18 UL RLC Buffer Status Information*/
2202 typedef struct dataVolInfo
2208 typedef struct ulBufferStatusRptInd
2214 DataVolInfo dataVolInfo[MAX_NUM_LOGICAL_CHANNEL_GROUPS];
2215 }UlBufferStatusRptInd;
2217 /**O-RAN WG* v7.0.0 Sec 11.2.4.2.19 Power Headroom Indication*/
2218 typedef struct phrData /*Spec 38.321 Sec 6.1.3.8*/
2224 typedef struct singlePhrInfo
2229 typedef struct multiPhr
2235 typedef struct multiplePhrInfo /*Spec 38.321 Sec 6.1.3.9*/
2237 uint8_t numPhrReported;
2238 MultiPhr multiPhrStat[MAX_PHR_REPORT];
2241 typedef struct schPwrHeadroomInd
2248 SinglePhrInfo singlePhr;
2249 MultiplePhrInfo multiPhr;
2253 typedef struct schUeHqInfo
2259 typedef struct schRlsHqInfo
2263 SchUeHqInfo *ueHqInfo;
2266 /* Statistics Request from MAC to SCH */
2267 typedef struct schStatsGrpInfo
2270 uint16_t periodicity; /* In milliseconds */
2272 SchMeasurementType statsList[MAX_NUM_STATS];
2275 typedef struct schStatsReq
2277 uint64_t subscriptionId;
2278 uint8_t numStatsGroup;
2279 SchStatsGrpInfo statsGrpList[MAX_NUM_STATS_GRP];
2282 typedef struct schStatsReq SchStatsModificationReq;
2283 typedef struct schStatsRsp SchStatsModificationRsp;
2285 /* Statistics Response from SCH to MAC */
2286 typedef struct schStatsGrpRejected
2289 CauseOfResult cause;
2290 }SchStatsGrpRejected;
2292 typedef struct schStatsRsp
2294 uint64_t subscriptionId;
2295 uint8_t numGrpAccepted;
2296 uint8_t statsGrpAcceptedList[MAX_NUM_STATS_GRP];
2297 uint8_t numGrpRejected;
2298 SchStatsGrpRejected statsGrpRejectedList[MAX_NUM_STATS_GRP];
2301 /* Statistics Indication from SCH to MAC */
2302 typedef struct schStats
2304 SchMeasurementType type;
2308 typedef struct schStatsInd
2310 uint64_t subscriptionId;
2313 SchStats measuredStatsList[MAX_NUM_STATS];
2316 typedef struct schStatsDeleteReq
2318 uint64_t subscriptionId;
2319 uint8_t numStatsGroupToBeDeleted;
2320 uint8_t statsGrpIdToBeDelList[MAX_NUM_STATS_GRP];
2323 typedef struct statsDeleteResult
2326 SchMacRsp statsGrpDelRsp;
2327 CauseOfResult statsGrpDelCause;
2330 typedef struct schStatsDeleteRsp
2332 uint64_t subscriptionId; /* subscription Id */
2333 SchMacRsp subsDelRsp; /* deletion status of all statsGrp with given subscriptionId */
2334 CauseOfResult subsDelCause; /* cause of failure in deletion of all statsGrp with given subscriptionId*/
2335 uint8_t numStatsGroupDeleted; /* num of action deleted */
2336 StatsDeleteResult statsGrpDelInfo[MAX_NUM_STATS_GRP]; /* list of the deletion status for specific actions */
2339 /* function declarations */
2340 uint8_t MacMessageRouter(Pst *pst, void *msg);
2341 uint8_t SchMessageRouter(Pst *pst, void *msg);
2343 /**********************************************************************
2345 **********************************************************************/