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
55 #define MAX_SSB_IDX 1 /* forcing it as 1 for now. Right value is 64 */
56 #define SCH_SSB_MASK_SIZE 1
58 #define MAX_NUM_PRG 1 /* max value should be later 275 */
59 #define MAX_DIG_BF_INTERFACES 0 /* max value should be later 255 */
60 #define MAX_CODEWORDS 1 /* max should be 2 */
61 #define SCH_HARQ_PROC_ID 1 /* harq proc id */
62 #define SCH_ALLOC_TYPE_1 1 /*sch res alloc type */
64 /* Datatype in UL SCH Info */
65 #define SCH_DATATYPE_PUSCH 1
66 #define SCH_DATATYPE_PUSCH_UCI 2
67 #define SCH_DATATYPE_UCI 4
68 #define SCH_DATATYPE_SRS 8
69 #define SCH_DATATYPE_PRACH 16
71 #define MAX_NUMBER_OF_CRC_IND_BITS 1
72 #define MAX_NUMBER_OF_UCI_IND_BITS 1
73 #define MAX_SR_BITS_IN_BYTES 1
74 #define MAX_HARQ_BITS_IN_BYTES 1
75 #define MAX_NUM_LOGICAL_CHANNEL_GROUPS 8
76 #define MAX_NUM_SR_CFG_PER_CELL_GRP 8 /* Max number of scheduling request config per cell group */
77 #define MAX_NUM_TAGS 4 /* Max number of timing advance groups */
78 #define MAX_NUM_BWP 4 /* Max number of BWP per serving cell */
79 #define MAX_NUM_CRSET 3 /* Max number of control resource set in add/modify/release list */
80 #define MAX_NUM_SEARCH_SPC 10 /* Max number of search space in add/modify/release list */
81 #define FREQ_DOM_RSRC_SIZE 6 /* i.e. 6 bytes because Size of frequency domain resource is 45 bits */
82 #define MONITORING_SYMB_WITHIN_SLOT_SIZE 2 /* i.e. 2 bytes because size of monitoring symbols within slot is 14 bits */
83 #define MAX_NUM_DL_ALLOC 16 /* Max number of pdsch time domain downlink allocation */
84 #define MAX_NUM_UL_ALLOC 16 /* Max number of pusch time domain uplink allocation */
86 /* PUCCH Configuration Macro */
87 #define MAX_NUM_PUCCH_RESRC 128
88 #define MAX_NUM_PUCCH_RESRC_SET 4
89 #define MAX_NUM_PUCCH_PER_RESRC_SET 32
90 #define MAX_NUM_SPATIAL_RELATIONS 8
91 #define MAX_NUM_PUCCH_P0_PER_SET 8
92 #define MAX_NUM_PATH_LOSS_REF_RS 4
93 #define MAX_NUM_DL_DATA_TO_UL_ACK 15
94 #define QPSK_MODULATION 2
96 #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 */
97 #define TX_PAYLOAD_HDR_LEN 32 /* Intel L1 requires adding a 32 byte header to transmitted payload */
98 #define UL_TX_BUFFER_SIZE 5
100 #define MAX_NUM_CONFIG_SLOTS 160 /*Max number of slots as per the numerology*/
101 #define MAX_NUM_K0_IDX 16 /* Max number of pdsch time domain downlink allocation */
102 #define MAX_NUM_K1_IDX 8 /* As per spec 38.213 section 9.2.3 Max number of PDSCH-to-HARQ resource indication */
103 #define MIN_NUM_K1_IDX 4 /* Min K1 values */
104 #define MAX_NUM_K2_IDX 16 /* PUSCH time domain UL resource allocation list */
105 #define DEFAULT_K0_VALUE 0 /* As per 38.331, PDSCH-TimeDomainResourceAllocation field descriptions */
106 /* As per 38.331, PUSCH-TimeDomainResourceAllocationList field descriptions */
107 #define DEFAULT_K2_VALUE_FOR_SCS15 1
108 #define DEFAULT_K2_VALUE_FOR_SCS30 1
109 #define DEFAULT_K2_VALUE_FOR_SCS60 2
110 #define DEFAULT_K2_VALUE_FOR_SCS120 3
113 #define DL_DMRS_SYMBOL_POS 4 /* Bitmap value 00000000000100 i.e. using 3rd symbol for PDSCH DMRS */
115 #define MAX_PHR_REPORT 1 /*TODO: Range of PHR reports in multiple PHR.*/
116 #define MAX_FAILURE_DET_RESOURCES 10 /*Spec 38.331 'maxNrofFailureDetectionResources'*/
118 #define ADD_DELTA_TO_TIME(crntTime, toFill, incr, numOfSlot) \
120 if ((crntTime.slot + incr) > (numOfSlot - 1)) \
122 toFill.sfn = (crntTime.sfn + 1); \
126 toFill.sfn = crntTime.sfn; \
128 toFill.slot = (crntTime.slot + incr) % numOfSlot; \
129 if (toFill.sfn >= MAX_SFN) \
131 toFill.sfn%=MAX_SFN; \
139 RRC_CONNECTED_USERS_RSRC
175 TIME_ALIGNMENT_TIMER_MS500,
176 TIME_ALIGNMENT_TIMER_MS750,
177 TIME_ALIGNMENT_TIMER_MS1280,
178 TIME_ALIGNMENT_TIMER_MS1920,
179 TIME_ALIGNMENT_TIMER_MS2560,
180 TIME_ALIGNMENT_TIMER_MS5120,
181 TIME_ALIGNMENT_TIMER_MS10240,
182 TIME_ALIGNMENT_TIMER_INFINITE
183 }SchTimeAlignmentTimer;
187 PHR_PERIODIC_TIMER_SF10,
188 PHR_PERIODIC_TIMER_SF20,
189 PHR_PERIODIC_TIMER_SF50,
190 PHR_PERIODIC_TIMER_SF100,
191 PHR_PERIODIC_TIMER_SF200,
192 PHR_PERIODIC_TIMER_SF500,
193 PHR_PERIODIC_TIMER_SF1000,
194 PHR_PERIODIC_TIMER_INFINITE
195 }SchPhrPeriodicTimer;
199 PHR_PROHIBIT_TIMER_SF0,
200 PHR_PROHIBIT_TIMER_SF10,
201 PHR_PROHIBIT_TIMER_SF20,
202 PHR_PROHIBIT_TIMER_SF50,
203 PHR_PROHIBIT_TIMER_SF100,
204 PHR_PROHIBIT_TIMER_SF200,
205 PHR_PROHIBIT_TIMER_SF500,
206 PHR_PROHIBIT_TIMER_SF1000
207 }SchPhrProhibitTimer;
211 PHR_TX_PWR_FACTOR_CHANGE_DB1,
212 PHR_TX_PWR_FACTOR_CHANGE_DB3,
213 PHR_TX_PWR_FACTOR_CHANGE_DB6,
214 PHR_TX_PWR_FACTOR_CHANGE_INFINITE
215 }SchPhrTxPwrFactorChange;
225 HARQ_ACK_CODEBOOK_SEMISTATIC,
226 HARQ_ACK_CODEBOOK_DYNAMIC
227 }SchPdschHarqAckCodebook;
231 NUM_HARQ_PROC_FOR_PDSCH_N2,
232 NUM_HARQ_PROC_FOR_PDSCH_N4,
233 NUM_HARQ_PROC_FOR_PDSCH_N6,
234 NUM_HARQ_PROC_FOR_PDSCH_N10,
235 NUM_HARQ_PROC_FOR_PDSCH_N16
236 }SchNumHarqProcForPdsch;
240 MAX_CODE_BLOCK_GROUP_PER_TB_N2,
241 MAX_CODE_BLOCK_GROUP_PER_TB_N4,
242 MAX_CODE_BLOCK_GROUP_PER_TB_N6,
243 MAX_CODE_BLOCK_GROUP_PER_TB_N8
244 }SchMaxCodeBlkGrpPerTB;
248 PDSCH_X_OVERHEAD_XOH_6,
249 PDSCH_X_OVERHEAD_XOH_12,
250 PDSCH_X_OVERHEAD_XOH_18
255 DMRS_ADDITIONAL_POS0,
256 DMRS_ADDITIONAL_POS1,
258 }SchDmrsAdditionPosition;
262 RESOURCE_ALLOCTION_TYPE_0,
263 RESOURCE_ALLOCTION_TYPE_1,
264 RESOURCE_ALLOCTION_DYN_SWITCH
265 }SchResourceAllocType;
269 TIME_DOMAIN_RSRC_ALLOC_MAPPING_TYPE_A,
270 TIME_DOMAIN_RSRC_ALLOC_MAPPING_TYPE_B
271 }SchTimeDomRsrcAllocMappingType;
275 ENABLED_TRANSFORM_PRECODER,
276 DISABLED_TRANSFORM_PRECODER
277 }SchTransformPrecoder;
281 INTERLEAVED_CCE_REG_MAPPING = 1,
282 NONINTERLEAVED_CCE_REG_MAPPING
287 SLOT_PERIODICITY_AND_OFFSET_SL_1 = 1,
288 SLOT_PERIODICITY_AND_OFFSET_SL_2,
289 SLOT_PERIODICITY_AND_OFFSET_SL_4,
290 SLOT_PERIODICITY_AND_OFFSET_SL_5,
291 SLOT_PERIODICITY_AND_OFFSET_SL_8,
292 SLOT_PERIODICITY_AND_OFFSET_SL_10,
293 SLOT_PERIODICITY_AND_OFFSET_SL_16,
294 SLOT_PERIODICITY_AND_OFFSET_SL_20,
295 SLOT_PERIODICITY_AND_OFFSET_SL_40,
296 SLOT_PERIODICITY_AND_OFFSET_SL_80,
297 SLOT_PERIODICITY_AND_OFFSET_SL_160,
298 SLOT_PERIODICITY_AND_OFFSET_SL_320,
299 SLOT_PERIODICITY_AND_OFFSET_SL_640,
300 SLOT_PERIODICITY_AND_OFFSET_SL_1280,
301 SLOT_PERIODICITY_AND_OFFSET_SL_2560
302 }SchMSlotPeriodAndOffset;
312 SEARCH_SPACE_TYPE_COMMON = 1,
313 SEARCH_SPACE_TYPE_UE_SPECIFIC
318 SCH_QOS_NON_DYNAMIC = 1,
324 AGGREGATION_LEVEL_N0,
325 AGGREGATION_LEVEL_N1,
326 AGGREGATION_LEVEL_N2,
327 AGGREGATION_LEVEL_N3,
328 AGGREGATION_LEVEL_N4,
329 AGGREGATION_LEVEL_N5,
330 AGGREGATION_LEVEL_N6,
342 CODE_WORDS_SCHED_BY_DCI_N1,
343 CODE_WORDS_SCHED_BY_DCI_N2
344 }SchCodeWordsSchedByDci;
348 STATIC_BUNDLING_TYPE = 1,
349 DYNAMIC_BUNDLING_TYPE
355 SCH_SET1_SIZE_WIDEBAND,
356 SCH_SET1_SIZE_N2_WIDEBAND,
357 SCH_SET1_SIZE_N4_WIDEBAND
358 }SchBundlingSizeSet1;
363 SCH_SET2_SIZE_WIDEBAND
364 }SchBundlingSizeSet2;
418 SCH_MCS_TABLE_QAM_64,
419 SCH_MCS_TABLE_QAM_256,
420 SCH_MCS_TABLE_QAM_64_LOW_SE
433 DATA_TRANSMISSION_ALLOWED,
434 STOP_DATA_TRANSMISSION,
435 RESTART_DATA_TRANSMISSION
436 }SchDataTransmission;
443 }SchPurposeOfFailureDet;
452 typedef struct timeDomainAlloc
458 typedef struct resAllocType0
460 uint8_t rbBitmap[36];
463 typedef struct resAllocType1
469 typedef struct resAllocType1 FreqDomainRsrc;
471 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-32 BWP Information */
472 typedef struct bwpCfg
474 uint8_t subcarrierSpacing;
475 uint8_t cyclicPrefix;
476 FreqDomainRsrc freqAlloc;
482 uint16_t beamIdx[MAX_DIG_BF_INTERFACES];
485 typedef struct beamformingInfo
489 uint8_t digBfInterfaces;
490 Prg prg[MAX_NUM_PRG];
493 /* SIB1 PDSCH structures */
495 typedef struct codewordinfo
497 uint16_t targetCodeRate;
505 typedef struct dmrsInfo
507 uint16_t dlDmrsSymbPos;
508 uint8_t dmrsConfigType;
509 uint16_t dlDmrsScramblingId;
511 uint8_t numDmrsCdmGrpsNoData;
514 uint8_t nrOfDmrsSymbols;
518 typedef struct pdschFreqAlloc
520 uint8_t resourceAllocType;
521 /* since we are using type-1, rbBitmap excluded */
522 uint8_t rbBitmap[36];
525 uint8_t vrbPrbMapping;
528 typedef struct pdschTimeAlloc
535 typedef struct txPowerPdschInfo
537 uint8_t powerControlOffset;
538 uint8_t powerControlOffsetSS;
541 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-43 PDSCH Configuration */
542 typedef struct pdschCfg
547 uint8_t numCodewords;
548 CodewordInfo codeword[MAX_CODEWORDS];
549 uint16_t dataScramblingId;
551 uint8_t transmissionScheme;
554 PdschFreqAlloc pdschFreqAlloc;
555 PdschTimeAlloc pdschTimeAlloc;
556 BeamformingInfo beamPdschInfo;
557 TxPowerPdschInfo txPdschPower;
559 /* SIB1 PDSCH structures end */
561 /* SIB1 interface structure */
563 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-35 CORESET Configuration */
564 typedef struct coresetCfg
567 uint8_t startSymbolIndex;
568 uint8_t durationSymbols;
569 uint8_t freqDomainResource[6];
570 uint8_t cceRegMappingType;
571 uint8_t regBundleSize;
572 uint8_t interleaverSize;
575 uint8_t coresetPoolIndex;
576 uint8_t precoderGranularity;
578 uint8_t aggregationLevel;
581 typedef struct txPowerPdcchInfo
583 uint8_t beta_pdcch_1_0;
584 uint8_t powerControlOffsetSS;
587 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-42 DL-DCI Configuration */
591 uint16_t scramblingId;
592 uint16_t scramblingRnti;
595 BeamformingInfo beamPdcchInfo;
596 TxPowerPdcchInfo txPdcchPower;
600 typedef struct pdcchCfg
602 /* coreset-0 configuration */
603 CoresetCfg coresetCfg;
605 DlDCI dci; /* as of now its only one DCI, later it will be numDlCi */
607 /* end of SIB1 PDCCH structures */
609 typedef struct schPcchCfg
611 uint8_t numPO; /*Derived from Ns*/
612 bool poPresent; /*FirstPDCCH-MonitoringPO is present or not*/
613 uint16_t pagingOcc[MAX_PO_PER_PF]; /*FirstPDCCH-Monitoring Paging Occasion*/
616 typedef struct schPdcchConfigSib1
618 uint8_t coresetZeroIndex; /* derived from 4 LSB of pdcchSib1 present in MIB */
619 uint8_t searchSpaceZeroIndex; /* derived from 4 MSB of pdcchSib1 present in MIB */
622 typedef struct schRachCfgGeneric
624 uint8_t prachCfgIdx; /* PRACH config idx */
625 uint8_t msg1Fdm; /* PRACH FDM (1,2,4,8) */
626 uint16_t msg1FreqStart; /* Msg1-FrequencyStart */
627 uint8_t zeroCorrZoneCfg; /* Zero correlation zone cofig */
628 int16_t preambleRcvdTargetPower;
629 uint8_t preambleTransMax;
630 uint8_t pwrRampingStep;
631 uint8_t raRspWindow; /* RA Response Window */
634 typedef struct schRachCfg
636 SchRachCfgGeneric prachCfgGeneric;
637 uint8_t totalNumRaPreamble; /* Total number of RA preambles */
638 uint8_t ssbPerRach; /* SSB per RACH occassion */
639 uint8_t numCbPreamblePerSsb; /* Number of CB preamble per SSB */
640 uint8_t raContResTmr; /* RA Contention Resoultion Timer */
641 uint8_t rsrpThreshSsb; /* RSRP Threshold SSB */
642 uint16_t rootSeqIdx; /* Root sequence index */
643 uint16_t rootSeqLen; /* root sequence length */
644 uint8_t numRootSeq; /* Number of root sequences required for FD */
645 uint8_t msg1SubcSpacing; /* Subcarrier spacing of RACH */
648 typedef struct schBwpParams
650 FreqDomainRsrc freqAlloc;
652 uint8_t cyclicPrefix;
655 typedef struct schCandidatesInfo
664 typedef struct schSearchSpaceCfg
666 uint8_t searchSpaceId;
668 uint8_t freqDomainRsrc[FREQ_DOM_RSRC_SIZE]; /* Frequency domain resource */
669 uint16_t monitoringSlot;
671 uint16_t monitoringSymbol;
672 SchCandidatesInfo candidate;
675 typedef struct schPdcchCfgCmn
677 SchSearchSpaceCfg commonSearchSpace;
678 uint8_t raSearchSpaceId;
681 typedef struct schPdschCfgCmnTimeDomRsrcAlloc
686 uint8_t lengthSymbol;
687 }SchPdschCfgCmnTimeDomRsrcAlloc;
689 typedef struct schPdschCfgCmn
691 uint8_t numTimeDomAlloc;
692 SchPdschCfgCmnTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_DL_ALLOC];
695 typedef struct schPucchCfgCmn
697 uint8_t pucchResourceCommon;
698 uint8_t pucchGroupHopping;
701 /* PUSCH Time Domain Resource Allocation */
702 typedef struct schPuschTimeDomRsrcAlloc
705 SchTimeDomRsrcAllocMappingType mappingType;
707 uint8_t symbolLength;
708 }SchPuschTimeDomRsrcAlloc;
710 typedef struct schPuschCfgCmn
712 uint8_t numTimeDomRsrcAlloc;
713 SchPuschTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_UL_ALLOC]; /* PUSCH time domain UL resource allocation list */
716 typedef struct schK1TimingInfo
719 uint8_t k1Indexes[MAX_NUM_K1_IDX];
722 typedef struct schK0TimingInfo
725 SchK1TimingInfo k1TimingInfo;
728 typedef struct schK0K1TimingInfo
731 SchK0TimingInfo k0Indexes[MAX_NUM_K0_IDX];
734 typedef struct schK0K1TimingInfoTbl
737 SchK0K1TimingInfo k0k1TimingInfo[MAX_NUM_CONFIG_SLOTS];
738 }SchK0K1TimingInfoTbl;
740 typedef struct schBwpDlCfg
743 SchPdcchCfgCmn pdcchCommon;
744 SchPdschCfgCmn pdschCommon;
747 typedef struct schK2TimingInfo
750 uint8_t k2Indexes[MAX_NUM_K2_IDX];
753 typedef struct schK2TimingInfoTbl
756 SchK2TimingInfo k2TimingInfo[MAX_NUM_CONFIG_SLOTS];
759 typedef struct schBwpUlCfg
762 SchRachCfg schRachCfg; /* PRACH config */
763 SchPucchCfgCmn pucchCommon;
764 SchPuschCfgCmn puschCommon;
767 typedef struct schPlmnInfoList
770 uint8_t numSliceSupport; /* Total slice supporting */
771 Snssai **snssai; /* List of supporting snssai*/
775 /* The following list of structures is taken from the DRX-Config section of specification 33.331. */
777 typedef struct schDrxOnDurationTimer
779 bool onDurationTimerValInMs;
782 uint8_t subMilliSeconds;
783 uint16_t milliSeconds;
784 }onDurationtimerValue;
785 }SchDrxOnDurationTimer;
787 typedef struct schDrxLongCycleStartOffset
789 uint16_t drxLongCycleStartOffsetChoice;
790 uint16_t drxLongCycleStartOffsetVal;
791 }SchDrxLongCycleStartOffset;
793 typedef struct schShortDrx
795 uint16_t drxShortCycle;
796 uint8_t drxShortCycleTimer;
799 typedef struct schDrxCfg
801 SchDrxOnDurationTimer drxOnDurationTimer;
802 uint16_t drxInactivityTimer;
803 uint8_t drxHarqRttTimerDl;
804 uint8_t drxHarqRttTimerUl;
805 uint16_t drxRetransmissionTimerDl;
806 uint16_t drxRetransmissionTimerUl;
807 SchDrxLongCycleStartOffset drxLongCycleStartOffset;
809 SchShortDrx shortDrx;
810 uint8_t drxSlotOffset;
814 /*Spec 38.331 'NrNsPmaxList'*/
815 typedef struct schNrNsPmaxList
818 long additionalSpectrumEmission;
821 /*Spec 38.331 'FrequencyInfoDL-SIB'*/
822 typedef struct schMultiFreqBandListSib
825 SchNrNsPmaxList nrNsPmaxList[1];
826 }SchMultiFreqBandListSib;
828 /*Spec 38.331 'SCS-SpecificCarrier'*/
829 typedef struct schScsSpecificCarrier
831 uint16_t offsetToCarrier;
832 uint8_t subCarrierSpacing;
834 uint16_t txDirectCurrentLoc;
835 }SchScsSpecificCarrier;
837 /*Spec 38.331 'FrequencyInfoDL-SIB'*/
838 typedef struct schFreqInfoDlSib
840 SchMultiFreqBandListSib mutiFreqBandList[1];
841 uint16_t offsetToPointA;
842 SchScsSpecificCarrier schSpcCarrier[1];
845 typedef struct schBcchCfg
850 /*Spec 38.331 'DownlinkConfigCommonSIB'*/
851 typedef struct schDlCfgCommon
853 SchFreqInfoDlSib schFreqInfoDlSib;
854 SchBwpDlCfg schInitialDlBwp; /* Initial DL BWP */
855 SchBcchCfg schBcchCfg;
856 SchPcchCfg schPcchCfg;
859 /*Spec 38.331 'FrequencyInfoUL-SIB'*/
860 typedef struct schFreqInfoUlSib
862 SchMultiFreqBandListSib mutiFreqBandList[1];
863 uint16_t absoluteFreqPointA;
864 SchScsSpecificCarrier schSpcCarrier[1];
866 bool frequencyShift7p5khz;
869 /*Spec 38.331 'UplinkConfigCommonSIB '*/
870 typedef struct schUlCfgCommon
872 SchFreqInfoUlSib schFreqInfoUlSib;
873 SchBwpUlCfg schInitialUlBwp; /* Initial DL BWP */
874 uint16_t schTimeAlignTimer;
877 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.2.1 Cell Conf Request*/
878 typedef struct schCellCfg
880 uint16_t cellId; /* Cell Id */
884 uint16_t phyCellId; /* Physical cell id */
885 SchPlmnInfoList plmnInfoList[MAX_PLMN]; /* Consits of PlmnId and Snssai list */
886 SchDuplexMode dupMode; /* Duplex type: TDD/FDD */
887 uint8_t dlBandwidth; /* Supported B/W */
888 uint8_t ulBandwidth; /* Supported B/W */
889 SchDlCfgCommon dlCfgCommon; /*Spec 38.331 DownlinkConfigCommonSIB*/
890 SchUlCfgCommon ulCfgCommon; /*Spec 38.331 UplinkConfigCommonSIB*/
892 TDDCfg tddCfg; /* Spec 38.331 tdd-UL-DL-ConfigurationCommon */
895 /*Ref:Spec 38.331 "ssb-PositionsInBurst", Value 0 in Bitmap => corresponding SS/PBCH block is not transmitted
896 *value 1 => corresponding SS/PBCH block is transmitted*/
897 uint32_t ssbPosInBurst[SCH_SSB_MASK_SIZE]; /* Bitmap for actually transmitted SSB. */
898 SchSSBPeriod ssbPeriod; /* SSB Periodicity in msec */
899 uint32_t ssbFrequency; /* SB frequency in kHz*/
900 uint8_t dmrsTypeAPos;
901 uint8_t ssbScs; /* SSB subcarrier spacing*/
902 SchPdcchConfigSib1 pdcchCfgSib1; /* Req to configure CORESET#0 and SearchSpace#0*/
903 uint32_t ssbPbchPwr; /* SSB block power */
904 uint8_t ssbSubcOffset; /* Subcarrier Offset(Kssb) */
908 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.3.1 Cell Config Response*/
909 typedef struct schCellCfgCfm
911 uint16_t cellId; /* Cell Id */
916 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.2.2 Cell Del Req*/
917 typedef struct schCellDeleteReq
922 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.3.2 Cell Del Response*/
923 typedef struct schCellDeleteRsp
930 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.2.3*/
931 typedef struct schRrmPolicyRatio
935 uint8_t dedicatedRatio;
938 typedef struct schRrmPolicyOfSlice
941 SchRrmPolicyRatio rrmPolicyRatioInfo;
942 }SchRrmPolicyOfSlice;
944 typedef struct schSliceCfgReq
946 uint8_t numOfConfiguredSlice;
947 SchRrmPolicyOfSlice **listOfSlices;
950 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.3.3 Slice Cfg Response*/
951 typedef struct schSliceCfgRsp
958 /*As per ORAN-WG8 V7.0.0 Sec 11.2.4.3.4 , Slice Cfg and Recfg are same structures*/
959 typedef struct schSliceCfgReq SchSliceRecfgReq;
960 typedef struct schSliceCfgRsp SchSliceRecfgRsp;
962 typedef struct ssbInfo
964 uint8_t ssbIdx; /* SSB Index */
965 TimeDomainAlloc tdAlloc; /* Time domain allocation */
966 FreqDomainRsrc fdAlloc; /* Freq domain allocation */
969 typedef struct sib1AllocInfo
972 PdcchCfg *sib1PdcchCfg;
975 typedef struct prachSchInfo
977 uint8_t numPrachOcas; /* Num Prach Ocassions */
978 uint8_t prachFormat; /* PRACH Format */
979 uint8_t numRa; /* Freq domain ocassion */
980 uint8_t prachStartSymb; /* Freq domain ocassion */
983 /* Interface structure signifying DL broadcast allocation for SSB, SIB1 */
984 typedef struct dlBrdcstAlloc
986 uint16_t crnti; /* SI-RNTI */
987 /* Ssb transmission is determined as follows:
988 * 0 : No tranamission
989 * 1 : SSB Transmission
990 * 2 : SSB Repetition */
991 uint8_t ssbTransmissionMode;
992 uint8_t ssbIdxSupported;
993 SsbInfo ssbInfo[MAX_SSB_IDX];
994 bool systemInfoIndicator;
996 /* Sib1 transmission is determined as follows:
997 * 0 : No tranamission
998 * 1 : SIB1 Transmission
999 * 2 : SIB1 Repetition */
1000 uint8_t sib1TransmissionMode;
1001 Sib1AllocInfo sib1Alloc;
1004 typedef struct msg3UlGrant
1006 uint8_t freqHopFlag;
1008 FreqDomainRsrc msg3FreqAlloc;
1015 typedef struct rarInfo
1019 Msg3UlGrant ulGrant;
1021 uint8_t rarPdu[RAR_PAYLOAD_SIZE];
1025 typedef struct rarAlloc
1030 PdcchCfg *rarPdcchCfg;
1031 PdschCfg *rarPdschCfg;
1034 typedef struct lcSchInfo
1040 typedef struct ceSchInfo
1046 typedef struct freqDomainAlloc
1048 uint8_t resAllocType; /* Resource allocation type */
1051 ResAllocType0 type0;
1052 ResAllocType1 type1;
1056 typedef struct transportBlock
1063 CeSchInfo ceSchInfo[MAX_NUM_LC];
1065 LcSchInfo lcSchInfo[MAX_NUM_LC];
1068 typedef struct dlMsgSchedInfo
1071 uint8_t dciFormatId;
1072 uint8_t harqProcNum;
1074 uint8_t dlAssignIdx;
1076 uint8_t pucchResInd;
1077 uint8_t harqFeedbackInd;
1078 uint16_t dlMsgPduLen;
1080 FreqDomainAlloc freqAlloc;
1081 TimeDomainAlloc timeAlloc;
1083 TransportBlock transportBlock[2];
1085 PdcchCfg *dlMsgPdcchCfg;
1086 PdschCfg *dlMsgPdschCfg;
1089 typedef struct schSlotValue
1091 SlotTimingInfo currentTime;
1092 SlotTimingInfo broadcastTime;
1093 SlotTimingInfo rarTime;
1094 SlotTimingInfo dlMsgTime;
1095 SlotTimingInfo ulDciTime;
1099 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-36 DCI Format0_0 Configuration */
1100 typedef struct format0_0
1102 uint8_t resourceAllocType;
1103 FreqDomainAlloc freqAlloc;
1104 TimeDomainAlloc timeAlloc;
1115 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-40 DCI Format 0_1 Configuration */
1116 typedef struct format0_1
1118 uint8_t carrierIndicator;
1120 uint8_t bwpIndicator;
1121 uint8_t resourceAlloc;
1122 FreqDomainRsrc freqAlloc;
1123 TimeDomainAlloc timeAlloc;
1130 uint8_t firstDownlinkAssignmentIndex;
1131 uint8_t secondDownlinkAssignmentIndex;
1133 uint8_t srsResourceSetIndicator;
1134 uint8_t srsResourceIndicator;
1136 uint8_t antennaPorts;
1139 uint8_t cbgTransmissionInfo;
1141 uint8_t betaOffsetIndicator;
1142 bool dmrsSequenceInitialization;
1143 bool ulschIndicatior;
1146 typedef struct dciFormat
1148 FormatType formatType; /* DCI Format */
1151 Format0_0 format0_0; /* Format 0_0 */
1152 Format0_1 format0_1; /* Format 0_1 */
1156 typedef struct dciInfo
1158 uint16_t crnti; /* CRNTI */
1159 BwpCfg bwpCfg; /* BWP Cfg */
1160 CoresetCfg coresetCfg; /* Coreset1 Cfg */
1161 DciFormat dciFormatInfo; /* Dci Format */
1162 DlDCI dciInfo; /* DlDCI */
1166 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Section 11.2.4.3.8 DL Scheduling Information */
1167 typedef struct dlSchedInfo
1169 uint16_t cellId; /* Cell Id */
1170 SchSlotValue schSlotValue;
1172 /* Allocation for broadcast messages */
1173 bool isBroadcastPres;
1174 DlBrdcstAlloc brdcstAlloc;
1176 /* Allocation for RAR message */
1177 RarAlloc *rarAlloc[MAX_NUM_UE];
1179 /* UL grant in response to BSR */
1182 /* Allocation from dedicated DL msg */
1183 DlMsgSchInfo *dlMsgAlloc[MAX_NUM_UE];
1187 /*Reference: O-RAN.WG8.AAD.v7.0.0, Sec 11.2.4.3.13 Downlink Paging Allocation*/
1188 typedef struct interleaved_t
1190 uint8_t regBundleSize;
1191 uint8_t interleaverSize;
1192 uint16_t shiftIndex;
1195 typedef struct pageDlDci
1197 uint8_t freqDomainResource[6];
1198 uint8_t durationSymbols;
1199 uint8_t cceRegMappingType;
1202 Interleaved interleaved;
1203 uint8_t nonInterleaved;
1205 uint8_t ssStartSymbolIndex;
1207 uint8_t aggregLevel;
1208 uint8_t precoderGranularity;
1209 uint8_t coreSetSize;
1212 typedef struct resAllocType1 PageFreqDomainAlloc;
1214 typedef struct pageTimeDomainAlloc
1216 uint8_t mappingType;
1219 }PageTimeDomainAlloc;
1221 typedef struct pageDmrsConfig
1225 uint8_t nrOfDmrsSymbols;
1228 typedef struct pageTbInfo
1234 typedef struct pageDlSch
1236 PageFreqDomainAlloc freqAlloc;
1237 PageTimeDomainAlloc timeAlloc;
1238 PageDmrsConfig dmrs;
1239 uint8_t vrbPrbMapping;
1242 uint16_t dlPagePduLen;
1246 typedef struct dlPageAlloc
1249 SlotTimingInfo dlPageTime;
1254 PageDlDci pageDlDci;
1255 PageDlSch pageDlSch;
1258 typedef struct tbInfo
1260 uint8_t mcs; /* MCS */
1261 uint8_t ndi; /* NDI */
1262 uint8_t rv; /* Redundancy Version */
1263 uint16_t tbSize; /* TB Size */
1264 uint8_t qamOrder; /* Modulation Order */
1265 SchMcsTable mcsTable; /* MCS Table */
1268 typedef struct schPuschInfo
1270 uint8_t harqProcId; /* HARQ Process ID */
1271 FreqDomainAlloc fdAlloc; /* Freq domain allocation */
1272 TimeDomainAlloc tdAlloc; /* Time domain allocation */
1273 TbInfo tbInfo; /* TB info */
1275 uint8_t dmrsMappingType;
1276 uint8_t nrOfDmrsSymbols;
1281 typedef struct harqInfo
1283 uint16_t harqAckBitLength;
1284 uint8_t betaOffsetHarqAck;
1287 typedef struct csiInfo
1290 uint8_t betaOffsetCsi;
1293 typedef struct harqFdbkInfo
1295 uint16_t harqBitLength;
1298 typedef struct csiFdbkInfo
1303 typedef struct schPucchFormatCfg
1305 uint8_t interSlotFreqHop;
1307 uint8_t maxCodeRate;
1313 typedef struct schPucchInfo
1315 FreqDomainRsrc fdAlloc;
1316 TimeDomainAlloc tdAlloc;
1318 HarqFdbkInfo harqInfo;
1319 CsiFdbkInfo csiInfo;
1320 BeamformingInfo beamPucchInfo;
1321 uint8_t pucchFormat;
1322 uint8_t intraFreqHop;
1323 uint16_t secondPrbHop;
1324 uint8_t initialCyclicShift;
1332 typedef struct schPuschUci
1334 uint8_t harqProcId; /* HARQ Process ID */
1335 FreqDomainAlloc fdAlloc; /* Freq domain allocation */
1336 TimeDomainAlloc tdAlloc; /* Time domain allocation */
1337 TbInfo tbInfo; /* TB information */
1338 HarqInfo harqInfo; /* Harq Information */
1339 CsiInfo csiInfo; /* Csi information*/
1342 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Section 11.2.4.3.9 UL Scheduling Information */
1343 typedef struct ulSchedInfo
1345 uint16_t cellId; /* Cell Id */
1346 uint16_t crnti; /* CRNI */
1347 SlotTimingInfo slotIndInfo; /* Slot Info: sfn, slot number */
1348 uint8_t dataType; /* Type of info being scheduled */
1349 SchPrachInfo prachSchInfo; /* Prach scheduling info */
1350 SchPuschInfo schPuschInfo; /* Pusch scheduling info */
1351 SchPuschUci schPuschUci; /* Pusch Uci */
1352 SchPucchInfo schPucchInfo; /* Pucch and Uci scheduling info */
1355 /* Info of Scheduling Request to Add/Modify */
1356 typedef struct schSchedReqInfo
1359 SchSrProhibitTimer srProhibitTmr;
1360 SchSrTransMax srTransMax;
1363 /* Scheduling Request Configuration */
1364 typedef struct schSchedReqCfg
1366 uint8_t addModListCount;
1367 SchSchedReqInfo addModList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* List of Scheduling req to be added/modified */
1368 uint8_t relListCount;
1369 uint8_t relList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* list of scheduling request Id to be deleted */
1372 /* Info of Tag to Add/Modify */
1373 typedef struct schTagInfo
1376 SchTimeAlignmentTimer timeAlignmentTmr;
1379 /* Timing Advance Group Configuration */
1380 typedef struct schTagCfg
1382 uint8_t addModListCount;
1383 SchTagInfo addModList[MAX_NUM_TAGS]; /* List of Tag to Add/Modify */
1384 uint8_t relListCount;
1385 uint8_t relList[MAX_NUM_TAGS]; /* list of Tag Id to release */
1388 /* Configuration for Power headroom reporting */
1389 typedef struct schPhrCfg
1391 SchPhrPeriodicTimer periodicTmr;
1392 SchPhrProhibitTimer prohibitTmr;
1393 SchPhrTxPwrFactorChange txpowerFactorChange;
1396 bool type2OtherCell;
1397 SchPhrModeOtherCG modeOtherCG;
1400 /* MAC cell Group configuration */
1401 typedef struct schMacCellGrpCfg
1403 SchSchedReqCfg schedReqCfg;
1405 SchPhrCfg phrCfg; /* To be used only if phrCfgSetupPres is true */
1408 SchDrxCfg drxCfg; /* Drx configuration */
1412 /* Physical Cell Group Configuration */
1413 typedef struct schPhyCellGrpCfg
1415 SchPdschHarqAckCodebook pdschHarqAckCodebook;
1419 /* Control resource set info */
1420 typedef struct schControlRsrcSet
1422 uint8_t cRSetId; /* Control resource set id */
1423 uint8_t freqDomainRsrc[FREQ_DOM_RSRC_SIZE]; /* Frequency domain resource */
1425 SchREGMappingType cceRegMappingType;
1426 SchPrecoderGranul precoderGranularity;
1427 uint16_t dmrsScramblingId;
1430 /* Search Space info */
1431 typedef struct schSearchSpace
1433 uint8_t searchSpaceId;
1435 SchMSlotPeriodAndOffset mSlotPeriodicityAndOffset;
1436 uint8_t mSymbolsWithinSlot[MONITORING_SYMB_WITHIN_SLOT_SIZE];
1437 SchAggrLevel numCandidatesAggLevel1; /* Number of candidates for aggregation level 1 */
1438 SchAggrLevel numCandidatesAggLevel2; /* Number of candidates for aggregation level 2 */
1439 SchAggrLevel numCandidatesAggLevel4; /* Number of candidates for aggregation level 4 */
1440 SchAggrLevel numCandidatesAggLevel8; /* Number of candidates for aggregation level 8 */
1441 SchAggrLevel numCandidatesAggLevel16; /* Number of candidates for aggregation level 16 */
1442 SchSearchSpaceType searchSpaceType;
1443 uint8_t ueSpecificDciFormat;
1446 /* PDCCH cofniguration */
1447 typedef struct schPdcchConfig
1449 uint8_t numCRsetToAddMod;
1450 SchControlRsrcSet cRSetToAddModList[MAX_NUM_CRSET]; /* List of control resource set to add/modify */
1451 uint8_t numCRsetToRel;
1452 uint8_t cRSetToRelList[MAX_NUM_CRSET]; /* List of control resource set to release */
1453 uint8_t numSearchSpcToAddMod;
1454 SchSearchSpace searchSpcToAddModList[MAX_NUM_SEARCH_SPC]; /* List of search space to add/modify */
1455 uint8_t numSearchSpcToRel;
1456 uint8_t searchSpcToRelList[MAX_NUM_SEARCH_SPC]; /* List of search space to release */
1459 /* PDSCH time domain resource allocation */
1460 typedef struct schPdschTimeDomRsrcAlloc
1463 SchTimeDomRsrcAllocMappingType mappingType;
1464 uint8_t startSymbol;
1465 uint8_t symbolLength;
1466 }SchPdschTimeDomRsrcAlloc;
1469 typedef struct schPdschBundling
1471 struct schStaticBundling
1473 SchBundlingSizeSet2 size;
1475 struct schDynamicBundling
1477 SchBundlingSizeSet1 sizeSet1;
1478 SchBundlingSizeSet2 sizeSet2;
1479 }SchDynamicBundling;
1482 /* DMRS downlink configuration */
1483 typedef struct schDmrsDlCfg
1485 SchDmrsAdditionPosition addPos; /* DMRS additional position */
1488 /* PDSCH Configuration */
1489 typedef struct schPdschConfig
1491 SchDmrsDlCfg dmrsDlCfgForPdschMapTypeA;
1492 SchResourceAllocType resourceAllocType;
1493 uint8_t numTimeDomRsrcAlloc;
1494 SchPdschTimeDomRsrcAlloc timeDomRsrcAllociList[MAX_NUM_DL_ALLOC]; /* PDSCH time domain DL resource allocation list */
1496 SchCodeWordsSchedByDci numCodeWordsSchByDci; /* Number of code words scheduled by DCI */
1497 SchBundlingType bundlingType;
1498 SchPdschBundling bundlingInfo;
1501 /* Initial Downlink BWP */
1502 typedef struct schInitalDlBwp
1505 SchPdcchConfig pdcchCfg;
1507 SchPdschConfig pdschCfg;
1510 /*Spec 38.331 'RadioLinkMonitoringConfig'*/
1511 typedef uint8_t SchRadioLinkMonitoringRsId;
1513 typedef struct schRadioLinkMonRS
1515 SchRadioLinkMonitoringRsId radioLinkMonitoringRsId;
1516 SchPurposeOfFailureDet purpose;
1520 uint8_t nzpCsiRsResId;
1524 typedef struct schRadioLinkConfig
1526 SchRadioLinkMonRS failurDetResAddModList[MAX_FAILURE_DET_RESOURCES];
1527 SchRadioLinkMonitoringRsId failurDetResRelList[MAX_FAILURE_DET_RESOURCES];
1528 uint8_t beamFailureInstanceMaxCount;
1529 uint8_t beamFailureDetectionTimer;
1530 }SchRadioLinkConfig;
1532 /*Spec 38.331 "SPS-Config'*/
1533 typedef struct schSpsConfig
1535 uint16_t periodicity;
1536 uint8_t numOfHqProcess;
1538 SchMcsTable mcsTable;
1541 /* Spec 38.331, 'BWP-DownlinkDedicated'*/
1542 typedef struct schBwpDlCfgDed
1544 SchPdcchConfig pdcchCfgDed;
1545 SchPdschConfig pdschCfgDed;
1546 SchSpsConfig spsCfgDed;
1547 SchRadioLinkConfig radioLnkMonCfgDed;
1550 /* Spec 38.331, 'BWP-Downlink' Downlink BWP information */
1551 typedef struct schDlBwpInfo
1554 SchBwpDlCfg bwpCommon;
1555 SchBwpDlCfgDed bwpDedicated;
1558 /* PDCCH Serving Cell configuration */
1559 typedef struct schPdschServCellCfg
1561 uint8_t *maxMimoLayers;
1562 SchNumHarqProcForPdsch numHarqProcForPdsch;
1563 SchMaxCodeBlkGrpPerTB *maxCodeBlkGrpPerTb;
1564 bool *codeBlkGrpFlushInd;
1565 SchPdschXOverhead *xOverhead;
1566 }SchPdschServCellCfg;
1568 typedef struct schRaPrioritization
1570 uint8_t powerRampingStepHighPriority;
1571 uint8_t scalingFactorBI;
1572 }SchRaPrioritization;
1574 typedef struct schBfrCsiRsRes
1578 uint8_t raPreambleIndex;
1581 typedef struct schBfrSsbRes
1584 uint8_t raPreambleIndex;
1587 typedef struct schPrachResDedBfr
1590 SchBfrCsiRsRes csiRs;
1593 /*Spec 38.331 'BeamFailureRecoveryConfig' */
1594 typedef struct schBeamFailRecoveryCfg
1596 uint8_t rootSeqIndexBfr;
1597 SchRachCfgGeneric rachCfgBfr;
1598 uint8_t rsrpThreshSsbBfr; /* RSRP Threshold SSB */
1599 SchPrachResDedBfr candidateBeamRSList;
1600 uint8_t ssbPerRachBfr; /* SSB per RACH occassion */
1601 uint8_t raSsbOccMaskIndex;
1602 uint8_t recoverySearchSpaceId;
1603 SchRaPrioritization raPrioBfr;
1605 uint8_t msg1SubcSpacing; /* Subcarrier spacing of RACH */
1606 }SchBeamFailRecoveryCfg;
1608 /* PUCCH Configuration */
1609 typedef struct schPucchResrcSetInfo
1612 uint8_t resrcListCount;
1613 uint8_t resrcList[MAX_NUM_PUCCH_PER_RESRC_SET];
1614 uint8_t maxPayLoadSize;
1615 }SchPucchResrcSetInfo;
1617 typedef struct schPucchResrcSetCfg
1619 uint8_t resrcSetToAddModListCount;
1620 SchPucchResrcSetInfo resrcSetToAddModList[MAX_NUM_PUCCH_RESRC_SET];
1621 uint8_t resrcSetToRelListCount;
1622 uint8_t resrcSetToRelList[MAX_NUM_PUCCH_RESRC];
1623 }SchPucchResrcSetCfg;
1625 typedef struct schPucchFormat0
1627 uint8_t initialCyclicShift;
1629 uint8_t startSymbolIdx;
1632 typedef struct schPucchFormat1
1634 uint8_t initialCyclicShift;
1636 uint8_t startSymbolIdx;
1640 typedef struct schPucchFormat2_3
1644 uint8_t startSymbolIdx;
1647 typedef struct schPucchFormat4
1652 uint8_t startSymbolIdx;
1655 typedef struct schPucchResrcInfo
1659 uint8_t intraFreqHop;
1660 uint16_t secondPrbHop;
1661 uint8_t pucchFormat;
1663 SchPucchFormat0 *format0;
1664 SchPucchFormat1 *format1;
1665 SchPucchFormat2_3 *format2;
1666 SchPucchFormat2_3 *format3;
1667 SchPucchFormat4 *format4;
1671 typedef struct schPucchResrcCfg
1673 uint8_t resrcToAddModListCount;
1674 SchPucchResrcInfo resrcToAddModList[MAX_NUM_PUCCH_RESRC];
1675 uint8_t resrcToRelListCount;
1676 uint8_t resrcToRelList[MAX_NUM_PUCCH_RESRC];
1680 typedef struct schSchedReqResrcInfo
1684 uint8_t periodicity;
1687 }SchSchedReqResrcInfo;
1689 typedef struct schPucchSchedReqCfg
1691 uint8_t schedAddModListCount;
1692 SchSchedReqResrcInfo schedAddModList[MAX_NUM_SR_CFG_PER_CELL_GRP];
1693 uint8_t schedRelListCount;
1694 uint8_t schedRelList[MAX_NUM_SR_CFG_PER_CELL_GRP];
1695 }SchPucchSchedReqCfg;
1697 typedef struct schSpatialRelationInfo
1699 uint8_t spatialRelationId;
1700 uint8_t servCellIdx;
1701 uint8_t pathLossRefRSId;
1703 uint8_t closeLoopIdx;
1704 }SchSpatialRelationInfo;
1706 typedef struct schPucchSpatialCfg
1708 uint8_t spatialAddModListCount;
1709 SchSpatialRelationInfo spatialAddModList[MAX_NUM_SPATIAL_RELATIONS];
1710 uint8_t spatialRelListCount;
1711 uint8_t spatialRelList[MAX_NUM_SPATIAL_RELATIONS];
1712 }SchPucchSpatialCfg;
1714 typedef struct schP0PucchCfg
1720 typedef struct schPathLossRefRSCfg
1722 uint8_t pathLossRefRSId;
1723 }SchPathLossRefRSCfg;
1725 typedef struct schPucchMultiCsiCfg
1727 uint8_t multiCsiResrcListCount;
1728 uint8_t multiCsiResrcList[MAX_NUM_PUCCH_RESRC-1];
1729 }SchPucchMultiCsiCfg;
1731 typedef struct schPucchDlDataToUlAck
1733 uint8_t dlDataToUlAckListCount;
1734 uint8_t dlDataToUlAckList[MAX_NUM_DL_DATA_TO_UL_ACK];
1735 }SchPucchDlDataToUlAck;
1737 typedef struct schPucchPowerControl
1745 SchP0PucchCfg p0Set[MAX_NUM_PUCCH_P0_PER_SET];
1746 uint8_t pathLossRefRSListCount;
1747 SchPathLossRefRSCfg pathLossRefRSList[MAX_NUM_PATH_LOSS_REF_RS];
1748 }SchPucchPowerControl;
1750 typedef struct schPucchCfg
1752 SchPucchResrcSetCfg *resrcSet;
1753 SchPucchResrcCfg *resrc;
1754 SchPucchFormatCfg *format1;
1755 SchPucchFormatCfg *format2;
1756 SchPucchFormatCfg *format3;
1757 SchPucchFormatCfg *format4;
1758 SchPucchSchedReqCfg *schedReq;
1759 SchPucchMultiCsiCfg *multiCsiCfg;
1760 SchPucchSpatialCfg *spatialInfo;
1761 SchPucchDlDataToUlAck *dlDataToUlAck;
1762 SchPucchPowerControl *powerControl;
1765 /* Transform precoding disabled */
1766 typedef struct schTransPrecodDisabled
1768 uint16_t scramblingId0;
1769 }SchTransPrecodDisabled;
1771 /* DMRS Uplink configuration */
1772 typedef struct SchDmrsUlCfg
1774 SchDmrsAdditionPosition addPos; /* DMRS additional position */
1775 SchTransPrecodDisabled transPrecodDisabled; /* Transform precoding disabled */
1778 /* PUSCH Configuration */
1779 typedef struct schPuschCfg
1781 uint8_t dataScramblingId;
1782 SchDmrsUlCfg dmrsUlCfgForPuschMapTypeA;
1783 SchResourceAllocType resourceAllocType;
1784 uint8_t numTimeDomRsrcAlloc;
1785 SchPuschTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_UL_ALLOC]; /* PUSCH time domain UL resource allocation list */
1786 SchTransformPrecoder transformPrecoder;
1789 /* Initial Uplink BWP */
1790 typedef struct schInitialUlBwp
1793 SchPucchCfg pucchCfg;
1795 SchPuschCfg puschCfg;
1798 typedef struct schBwpCfgDedicated
1800 SchPucchCfg pucchCfg;
1801 SchPuschCfg puschCfg;
1802 }SchBwpCfgDedicated;
1804 /* Uplink BWP information */
1805 typedef struct schUlBwpInfo
1808 SchBwpUlCfg bwpCommon;
1809 SchBwpCfgDedicated bwpDed;
1812 typedef struct schBwpRelInfo
1817 /* Serving cell configuration */
1818 typedef struct schServCellRecfgInfo
1820 SchInitalDlBwp initDlBwp;
1821 SchRadioLinkConfig radioLinkMonConfig;
1822 uint8_t numDlBwpToAddOrMod;
1823 SchDlBwpInfo dlBwpToAddOrModList[MAX_NUM_BWP];
1824 uint8_t numDlBwpToRel;
1825 SchBwpRelInfo dlBwpToRelList[MAX_NUM_BWP];
1826 uint8_t firstActvDlBwpId;
1827 uint8_t defaultDlBwpId;
1828 uint8_t *bwpInactivityTmr;
1829 SchPdschServCellCfg pdschServCellCfg;
1830 SchInitialUlBwp initUlBwp;
1831 SchBeamFailRecoveryCfg beamFailureRecoveryCfg;
1832 uint8_t numUlBwpToAddOrMod;
1833 SchUlBwpInfo ulBwpToAddOrModList[MAX_NUM_BWP];
1834 uint8_t numUlBwpToRel;
1835 SchBwpRelInfo ulBwpToRelList[MAX_NUM_BWP];
1836 uint8_t firstActvUlBwpId;
1837 }SchServCellRecfgInfo;
1839 /* Serving cell configuration */
1840 typedef struct schServCellCfgInfo
1842 SchInitalDlBwp initDlBwp;
1843 SchRadioLinkConfig radioLinkMonConfig;
1844 uint8_t numDlBwpToAdd;
1845 SchDlBwpInfo dlBwpToAddList[MAX_NUM_BWP];
1846 uint8_t firstActvDlBwpId;
1847 uint8_t defaultDlBwpId;
1848 uint8_t *bwpInactivityTmr;
1849 SchPdschServCellCfg pdschServCellCfg;
1850 SchInitialUlBwp initUlBwp;
1851 SchBeamFailRecoveryCfg beamFailureRecoveryCfg;
1852 uint8_t numUlBwpToAdd;
1853 SchUlBwpInfo ulBwpToAddList[MAX_NUM_BWP];
1854 uint8_t firstActvUlBwpId;
1855 }SchServCellCfgInfo;
1857 typedef struct schNonDynFiveQi
1862 uint16_t maxDataBurstVol;
1865 typedef struct schDynFiveQi
1868 uint16_t packetDelayBudget;
1869 uint8_t packetErrRateScalar;
1870 uint8_t packetErrRateExp;
1872 uint8_t delayCritical;
1874 uint16_t maxDataBurstVol;
1877 typedef struct schNgRanAllocAndRetPri
1879 uint8_t priorityLevel;
1880 uint8_t preEmptionCap;
1881 uint8_t preEmptionVul;
1882 }SchNgRanAllocAndRetPri;
1884 typedef struct schGrbQosFlowInfo
1886 uint32_t maxFlowBitRateDl;
1887 uint32_t maxFlowBitRateUl;
1888 uint32_t guarFlowBitRateDl;
1889 uint32_t guarFlowBitRateUl;
1893 typedef struct schDrbQos
1895 SchQosType fiveQiType; /* Dynamic or non-dynamic */
1898 SchNonDynFiveQi nonDyn5Qi;
1899 SchDynFiveQi dyn5Qi;
1901 SchNgRanAllocAndRetPri ngRanRetPri;
1902 SchGrbQosFlowInfo grbQosFlowInfo;
1903 uint16_t pduSessionId;
1904 uint32_t ulPduSessAggMaxBitRate; /* UL PDU Session Aggregate max bit rate */
1907 /* Special cell configuration */
1908 typedef struct schSpCellCfg
1910 uint8_t servCellIdx;
1911 SchServCellCfgInfo servCellCfg;
1914 /* Special cell Reconfiguration */
1915 typedef struct schSpCellRecfg
1917 uint8_t servCellIdx;
1918 SchServCellRecfgInfo servCellRecfg;
1921 /* Uplink logical channel configuration */
1922 typedef struct SchUlLcCfg
1927 uint8_t pbr; // prioritisedBitRate
1928 uint8_t bsd; // bucketSizeDuration
1931 /* Downlink logical channel configuration */
1932 typedef struct schDlLcCfg
1934 uint8_t lcp; // logical Channel Prioritization
1937 /* Logical Channel configuration */
1938 typedef struct schLcCfg
1942 SchDrbQosInfo *drbQos;
1947 /* Aggregate max bit rate */
1948 typedef struct schAmbrCfg
1950 uint32_t ulBr; /* Ul BitRate */
1953 typedef struct schModulationInfo
1957 SchMcsTable mcsTable;
1960 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.5' UE Configuration Request*/
1961 typedef struct schUeCfgReq
1967 bool macCellGrpCfgPres;
1968 SchMacCellGrpCfg macCellGrpCfg;
1969 bool phyCellGrpCfgPres;
1970 SchPhyCellGrpCfg phyCellGrpCfg;
1972 SchSpCellCfg spCellCfg;
1973 SchAmbrCfg *ambrCfg;
1974 SchModulationInfo dlModInfo;
1975 SchModulationInfo ulModInfo;
1976 uint8_t numLcsToAdd;
1977 SchLcCfg schLcCfg[MAX_NUM_LC];
1980 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.6' UE Reconfiguration Request*/
1981 typedef struct schUeRecfgReq
1987 bool macCellGrpRecfgPres;
1988 SchMacCellGrpCfg macCellGrpRecfg;
1989 bool phyCellGrpRecfgPres;
1990 SchPhyCellGrpCfg phyCellGrpRecfg;
1991 bool spCellRecfgPres;
1992 SchSpCellRecfg spCellRecfg;
1993 SchAmbrCfg *ambrRecfg;
1994 SchModulationInfo dlModInfo;
1995 SchModulationInfo ulModInfo;
1996 uint8_t numLcsToAdd;
1997 SchLcCfg schLcCfgAdd[MAX_NUM_LC];
1998 uint8_t numLcsToDel;
1999 uint8_t lcIdToDel[MAX_NUM_LC];
2000 uint8_t numLcsToMod;
2001 SchLcCfg schLcCfgMod[MAX_NUM_LC];
2002 SchDataTransmission dataTransmissionInfo;
2004 bool drxConfigIndicatorRelease;
2008 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.3.5 UE Confg Response*/
2009 typedef struct schUeCfgRsp
2016 CauseOfResult cause;
2019 /*As per WG8 V7.0.0 Sec 11.2.4.3.6, UE ReCFG and UECFG have same structure definition*/
2020 typedef struct schUeCfgRsp SchUeRecfgRsp;
2022 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.7' Delete UE Request*/
2023 typedef struct schUeDelete
2029 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.3.7*/
2030 typedef struct schUeDeleteRsp
2035 CauseOfResult cause;
2038 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.8' DL HARQ Indication*/
2039 typedef struct dlHarqInd
2043 SlotTimingInfo slotInd;
2045 uint8_t harqPayload[MAX_HARQ_BITS_IN_BYTES];
2048 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.9' UL HARQ (CRC) Indication*/
2049 typedef struct crcIndInfo
2053 SlotTimingInfo timingInfo;
2055 uint8_t crcInd[MAX_NUMBER_OF_CRC_IND_BITS];
2058 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.10' UL Channel Quality Indication*/
2059 typedef struct ulCqiReport
2061 CqiUlReportType reportType;
2066 typedef struct schUlCqiInd
2070 SlotTimingInfo timingInfo;
2071 uint8_t numUlCqiReported;
2072 UlCqiReport ulCqiRpt;
2075 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.11' DL Channel Quality Indication*/
2076 typedef struct dlCqiReport
2078 uint8_t reportType; /*Bitmap for CQI, PMI, RI, CRI report*/
2085 typedef struct schDlCqiInd
2089 SlotTimingInfo timingInfo;
2090 uint8_t numDlCqiReported;
2091 DlCqiReport dlCqiRpt;
2094 /*Spec O-RAN WG8 v7.0.0, '11.2.4.2.12' Rach Ind contents*/
2095 typedef struct rachIndInfo
2099 SlotTimingInfo timingInfo;
2103 uint8_t preambleIdx;
2107 /*Spec O-RAN WG8 v7.0.0, '11.2.4.2.13' Paging Ind contents*/
2108 typedef struct schPageInd
2117 /*ORAN WG8 v7.0.0, Sec 11.2.4.2.14 Rach Res Request*/
2118 typedef struct schRachRsrcReq
2120 SlotTimingInfo slotInd;
2124 uint8_t ssbIdx[MAX_NUM_SSB];
2127 typedef struct schCfraSsbResource
2130 uint8_t raPreambleIdx;
2131 }SchCfraSsbResource;
2133 typedef struct schCfraRsrc
2136 SchCfraSsbResource ssbResource[MAX_NUM_SSB];
2139 typedef struct schRachRsrcRsp
2144 SchCfraResource cfraResource;
2147 /*ORAN WG8 v7.0.0, Sec 11.2.4.2.15 Rach Res Release*/
2148 typedef struct schRachRsrcRel
2150 SlotTimingInfo slotInd;
2153 SchCfraResource cfraResource;
2156 /*O-RAN WG* v7.0.0 Sec 11.2.4.2.16 DL RLC Buffer Status Information*/
2157 typedef struct dlRlcBOInfo
2162 uint32_t dataVolume;
2165 /*O-RAN WG8 v7.0.0 Sec 11.2.4.2.17 Scheduling Request Indication*/
2166 typedef struct srUciIndInfo
2170 SlotTimingInfo slotInd;
2172 uint8_t srPayload[MAX_SR_BITS_IN_BYTES];
2175 /*O-RAN WG* v7.0.0 Sec 11.2.4.2.18 UL RLC Buffer Status Information*/
2176 typedef struct dataVolInfo
2182 typedef struct ulBufferStatusRptInd
2188 DataVolInfo dataVolInfo[MAX_NUM_LOGICAL_CHANNEL_GROUPS];
2189 }UlBufferStatusRptInd;
2191 /**O-RAN WG* v7.0.0 Sec 11.2.4.2.19 Power Headroom Indication*/
2192 typedef struct phrData /*Spec 38.321 Sec 6.1.3.8*/
2198 typedef struct singlePhrInfo
2203 typedef struct multiPhr
2209 typedef struct multiplePhrInfo /*Spec 38.321 Sec 6.1.3.9*/
2211 uint8_t numPhrReported;
2212 MultiPhr multiPhrStat[MAX_PHR_REPORT];
2215 typedef struct schPwrHeadroomInd
2222 SinglePhrInfo singlePhr;
2223 MultiplePhrInfo multiPhr;
2227 typedef struct schUeHqInfo
2233 typedef struct schRlsHqInfo
2237 SchUeHqInfo *ueHqInfo;
2240 /* function declarations */
2241 uint8_t schActvInit(Ent entity, Inst instId, Region region, Reason reason);
2242 uint8_t MacMessageRouter(Pst *pst, void *msg);
2243 uint8_t SchMessageRouter(Pst *pst, void *msg);
2245 /**********************************************************************
2247 **********************************************************************/