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
61 #define MAX_SSB_IDX 1 /* forcing it as 1 for now. Right value is 64 */
62 #define SCH_SSB_MASK_SIZE 1
64 #define MAX_NUM_PRG 1 /* max value should be later 275 */
65 #define MAX_DIG_BF_INTERFACES 0 /* max value should be later 255 */
66 #define MAX_CODEWORDS 1 /* max should be 2 */
67 #define SCH_HARQ_PROC_ID 1 /* harq proc id */
68 #define SCH_ALLOC_TYPE_1 1 /*sch res alloc type */
70 /* Datatype in UL SCH Info */
71 #define SCH_DATATYPE_PUSCH 1
72 #define SCH_DATATYPE_PUSCH_UCI 2
73 #define SCH_DATATYPE_UCI 4
74 #define SCH_DATATYPE_SRS 8
75 #define SCH_DATATYPE_PRACH 16
77 #define MAX_NUMBER_OF_CRC_IND_BITS 1
78 #define MAX_NUMBER_OF_UCI_IND_BITS 1
79 #define MAX_SR_BITS_IN_BYTES 1
80 #define MAX_HARQ_BITS_IN_BYTES 1
81 #define MAX_NUM_LOGICAL_CHANNEL_GROUPS 8
82 #define MAX_NUM_SR_CFG_PER_CELL_GRP 8 /* Max number of scheduling request config per cell group */
83 #define MAX_NUM_TAGS 4 /* Max number of timing advance groups */
84 #define MAX_NUM_BWP 4 /* Max number of BWP per serving cell */
85 #define MAX_NUM_CRSET 3 /* Max number of control resource set in add/modify/release list */
86 #define MAX_NUM_SEARCH_SPC 10 /* Max number of search space in add/modify/release list */
87 #define FREQ_DOM_RSRC_SIZE 6 /* i.e. 6 bytes because Size of frequency domain resource is 45 bits */
88 #define MONITORING_SYMB_WITHIN_SLOT_SIZE 2 /* i.e. 2 bytes because size of monitoring symbols within slot is 14 bits */
89 #define MAX_NUM_DL_ALLOC 16 /* Max number of pdsch time domain downlink allocation */
90 #define MAX_NUM_UL_ALLOC 16 /* Max number of pusch time domain uplink allocation */
92 /* PUCCH Configuration Macro */
93 #define MAX_NUM_PUCCH_RESRC 128
94 #define MAX_NUM_PUCCH_RESRC_SET 4
95 #define MAX_NUM_PUCCH_PER_RESRC_SET 32
96 #define MAX_NUM_SPATIAL_RELATIONS 8
97 #define MAX_NUM_PUCCH_P0_PER_SET 8
98 #define MAX_NUM_PATH_LOSS_REF_RS 4
99 #define MAX_NUM_DL_DATA_TO_UL_ACK 15
100 #define QPSK_MODULATION 2
102 #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 */
103 #define TX_PAYLOAD_HDR_LEN 32 /* Intel L1 requires adding a 32 byte header to transmitted payload */
104 #define UL_TX_BUFFER_SIZE 5
106 #define MAX_NUM_CONFIG_SLOTS 160 /*Max number of slots as per the numerology*/
107 #define MAX_NUM_K0_IDX 16 /* Max number of pdsch time domain downlink allocation */
108 #define MAX_NUM_K1_IDX 8 /* As per spec 38.213 section 9.2.3 Max number of PDSCH-to-HARQ resource indication */
109 #define MIN_NUM_K1_IDX 4 /* Min K1 values */
110 #define MAX_NUM_K2_IDX 16 /* PUSCH time domain UL resource allocation list */
111 #define DEFAULT_K0_VALUE 0 /* As per 38.331, PDSCH-TimeDomainResourceAllocation field descriptions */
112 /* As per 38.331, PUSCH-TimeDomainResourceAllocationList field descriptions */
113 #define DEFAULT_K2_VALUE_FOR_SCS15 1
114 #define DEFAULT_K2_VALUE_FOR_SCS30 1
115 #define DEFAULT_K2_VALUE_FOR_SCS60 2
116 #define DEFAULT_K2_VALUE_FOR_SCS120 3
119 #define DL_DMRS_SYMBOL_POS 4 /* Bitmap value 00000000000100 i.e. using 3rd symbol for PDSCH DMRS */
121 #define MAX_PHR_REPORT 1 /*TODO: Range of PHR reports in multiple PHR.*/
122 #define MAX_FAILURE_DET_RESOURCES 10 /*Spec 38.331 'maxNrofFailureDetectionResources'*/
124 #define ADD_DELTA_TO_TIME(crntTime, toFill, incr, numOfSlot) \
126 if ((crntTime.slot + incr) > (numOfSlot - 1)) \
128 toFill.sfn = (crntTime.sfn + 1); \
132 toFill.sfn = crntTime.sfn; \
134 toFill.slot = (crntTime.slot + incr) % numOfSlot; \
135 if (toFill.sfn >= MAX_SFN) \
137 toFill.sfn%=MAX_SFN; \
145 RRC_CONNECTED_USERS_RSRC
181 TIME_ALIGNMENT_TIMER_MS500,
182 TIME_ALIGNMENT_TIMER_MS750,
183 TIME_ALIGNMENT_TIMER_MS1280,
184 TIME_ALIGNMENT_TIMER_MS1920,
185 TIME_ALIGNMENT_TIMER_MS2560,
186 TIME_ALIGNMENT_TIMER_MS5120,
187 TIME_ALIGNMENT_TIMER_MS10240,
188 TIME_ALIGNMENT_TIMER_INFINITE
189 }SchTimeAlignmentTimer;
193 PHR_PERIODIC_TIMER_SF10,
194 PHR_PERIODIC_TIMER_SF20,
195 PHR_PERIODIC_TIMER_SF50,
196 PHR_PERIODIC_TIMER_SF100,
197 PHR_PERIODIC_TIMER_SF200,
198 PHR_PERIODIC_TIMER_SF500,
199 PHR_PERIODIC_TIMER_SF1000,
200 PHR_PERIODIC_TIMER_INFINITE
201 }SchPhrPeriodicTimer;
205 PHR_PROHIBIT_TIMER_SF0,
206 PHR_PROHIBIT_TIMER_SF10,
207 PHR_PROHIBIT_TIMER_SF20,
208 PHR_PROHIBIT_TIMER_SF50,
209 PHR_PROHIBIT_TIMER_SF100,
210 PHR_PROHIBIT_TIMER_SF200,
211 PHR_PROHIBIT_TIMER_SF500,
212 PHR_PROHIBIT_TIMER_SF1000
213 }SchPhrProhibitTimer;
217 PHR_TX_PWR_FACTOR_CHANGE_DB1,
218 PHR_TX_PWR_FACTOR_CHANGE_DB3,
219 PHR_TX_PWR_FACTOR_CHANGE_DB6,
220 PHR_TX_PWR_FACTOR_CHANGE_INFINITE
221 }SchPhrTxPwrFactorChange;
231 HARQ_ACK_CODEBOOK_SEMISTATIC,
232 HARQ_ACK_CODEBOOK_DYNAMIC
233 }SchPdschHarqAckCodebook;
237 NUM_HARQ_PROC_FOR_PDSCH_N2,
238 NUM_HARQ_PROC_FOR_PDSCH_N4,
239 NUM_HARQ_PROC_FOR_PDSCH_N6,
240 NUM_HARQ_PROC_FOR_PDSCH_N10,
241 NUM_HARQ_PROC_FOR_PDSCH_N16
242 }SchNumHarqProcForPdsch;
246 MAX_CODE_BLOCK_GROUP_PER_TB_N2,
247 MAX_CODE_BLOCK_GROUP_PER_TB_N4,
248 MAX_CODE_BLOCK_GROUP_PER_TB_N6,
249 MAX_CODE_BLOCK_GROUP_PER_TB_N8
250 }SchMaxCodeBlkGrpPerTB;
254 PDSCH_X_OVERHEAD_XOH_6,
255 PDSCH_X_OVERHEAD_XOH_12,
256 PDSCH_X_OVERHEAD_XOH_18
261 DMRS_ADDITIONAL_POS0,
262 DMRS_ADDITIONAL_POS1,
264 }SchDmrsAdditionPosition;
268 RESOURCE_ALLOCTION_TYPE_0,
269 RESOURCE_ALLOCTION_TYPE_1,
270 RESOURCE_ALLOCTION_DYN_SWITCH
271 }SchResourceAllocType;
275 TIME_DOMAIN_RSRC_ALLOC_MAPPING_TYPE_A,
276 TIME_DOMAIN_RSRC_ALLOC_MAPPING_TYPE_B
277 }SchTimeDomRsrcAllocMappingType;
281 ENABLED_TRANSFORM_PRECODER,
282 DISABLED_TRANSFORM_PRECODER
283 }SchTransformPrecoder;
287 INTERLEAVED_CCE_REG_MAPPING = 1,
288 NONINTERLEAVED_CCE_REG_MAPPING
293 SLOT_PERIODICITY_AND_OFFSET_SL_1 = 1,
294 SLOT_PERIODICITY_AND_OFFSET_SL_2,
295 SLOT_PERIODICITY_AND_OFFSET_SL_4,
296 SLOT_PERIODICITY_AND_OFFSET_SL_5,
297 SLOT_PERIODICITY_AND_OFFSET_SL_8,
298 SLOT_PERIODICITY_AND_OFFSET_SL_10,
299 SLOT_PERIODICITY_AND_OFFSET_SL_16,
300 SLOT_PERIODICITY_AND_OFFSET_SL_20,
301 SLOT_PERIODICITY_AND_OFFSET_SL_40,
302 SLOT_PERIODICITY_AND_OFFSET_SL_80,
303 SLOT_PERIODICITY_AND_OFFSET_SL_160,
304 SLOT_PERIODICITY_AND_OFFSET_SL_320,
305 SLOT_PERIODICITY_AND_OFFSET_SL_640,
306 SLOT_PERIODICITY_AND_OFFSET_SL_1280,
307 SLOT_PERIODICITY_AND_OFFSET_SL_2560
308 }SchMSlotPeriodAndOffset;
318 SEARCH_SPACE_TYPE_COMMON = 1,
319 SEARCH_SPACE_TYPE_UE_SPECIFIC
324 SCH_QOS_NON_DYNAMIC = 1,
330 AGGREGATION_LEVEL_N0,
331 AGGREGATION_LEVEL_N1,
332 AGGREGATION_LEVEL_N2,
333 AGGREGATION_LEVEL_N3,
334 AGGREGATION_LEVEL_N4,
335 AGGREGATION_LEVEL_N5,
336 AGGREGATION_LEVEL_N6,
348 CODE_WORDS_SCHED_BY_DCI_N1,
349 CODE_WORDS_SCHED_BY_DCI_N2
350 }SchCodeWordsSchedByDci;
354 STATIC_BUNDLING_TYPE = 1,
355 DYNAMIC_BUNDLING_TYPE
361 SCH_SET1_SIZE_WIDEBAND,
362 SCH_SET1_SIZE_N2_WIDEBAND,
363 SCH_SET1_SIZE_N4_WIDEBAND
364 }SchBundlingSizeSet1;
369 SCH_SET2_SIZE_WIDEBAND
370 }SchBundlingSizeSet2;
424 SCH_MCS_TABLE_QAM_64,
425 SCH_MCS_TABLE_QAM_256,
426 SCH_MCS_TABLE_QAM_64_LOW_SE
439 DATA_TRANSMISSION_ALLOWED,
440 STOP_DATA_TRANSMISSION,
441 RESTART_DATA_TRANSMISSION
442 }SchDataTransmission;
449 }SchPurposeOfFailureDet;
457 /* Performance measurements from 3GPP TS 28.552 Release 15 */
460 SCH_DL_TOTAL_PRB_USAGE,
461 SCH_UL_TOTAL_PRB_USAGE
465 typedef struct timeDomainAlloc
471 typedef struct resAllocType0
473 uint8_t rbBitmap[36];
476 typedef struct resAllocType1
482 typedef struct resAllocType1 FreqDomainRsrc;
484 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-32 BWP Information */
485 typedef struct bwpCfg
487 uint8_t subcarrierSpacing;
488 uint8_t cyclicPrefix;
489 FreqDomainRsrc freqAlloc;
495 uint16_t beamIdx[MAX_DIG_BF_INTERFACES];
498 typedef struct beamformingInfo
502 uint8_t digBfInterfaces;
503 Prg prg[MAX_NUM_PRG];
506 /* SIB1 PDSCH structures */
508 typedef struct codewordinfo
510 uint16_t targetCodeRate;
518 typedef struct dmrsInfo
520 uint16_t dlDmrsSymbPos;
521 uint8_t dmrsConfigType;
522 uint16_t dlDmrsScramblingId;
524 uint8_t numDmrsCdmGrpsNoData;
527 uint8_t nrOfDmrsSymbols;
531 typedef struct pdschFreqAlloc
533 uint8_t resourceAllocType;
534 /* since we are using type-1, rbBitmap excluded */
535 uint8_t rbBitmap[36];
538 uint8_t vrbPrbMapping;
541 typedef struct pdschTimeAlloc
548 typedef struct txPowerPdschInfo
550 uint8_t powerControlOffset;
551 uint8_t powerControlOffsetSS;
554 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-43 PDSCH Configuration */
555 typedef struct pdschCfg
560 uint8_t numCodewords;
561 CodewordInfo codeword[MAX_CODEWORDS];
562 uint16_t dataScramblingId;
564 uint8_t transmissionScheme;
567 PdschFreqAlloc pdschFreqAlloc;
568 PdschTimeAlloc pdschTimeAlloc;
569 BeamformingInfo beamPdschInfo;
570 TxPowerPdschInfo txPdschPower;
572 /* SIB1 PDSCH structures end */
574 /* SIB1 interface structure */
576 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-35 CORESET Configuration */
577 typedef struct coresetCfg
580 uint8_t startSymbolIndex;
581 uint8_t durationSymbols;
582 uint8_t freqDomainResource[6];
583 uint8_t cceRegMappingType;
584 uint8_t regBundleSize;
585 uint8_t interleaverSize;
588 uint8_t coresetPoolIndex;
589 uint8_t precoderGranularity;
591 uint8_t aggregationLevel;
594 typedef struct txPowerPdcchInfo
596 uint8_t beta_pdcch_1_0;
597 uint8_t powerControlOffsetSS;
600 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-42 DL-DCI Configuration */
604 uint16_t scramblingId;
605 uint16_t scramblingRnti;
608 BeamformingInfo beamPdcchInfo;
609 TxPowerPdcchInfo txPdcchPower;
613 typedef struct pdcchCfg
615 /* coreset-0 configuration */
616 CoresetCfg coresetCfg;
618 DlDCI dci; /* as of now its only one DCI, later it will be numDlCi */
620 /* end of SIB1 PDCCH structures */
622 typedef struct schPcchCfg
624 uint8_t numPO; /*Derived from Ns*/
625 bool poPresent; /*FirstPDCCH-MonitoringPO is present or not*/
626 uint16_t pagingOcc[MAX_PO_PER_PF]; /*FirstPDCCH-Monitoring Paging Occasion*/
629 typedef struct schPdcchConfigSib1
631 uint8_t coresetZeroIndex; /* derived from 4 LSB of pdcchSib1 present in MIB */
632 uint8_t searchSpaceZeroIndex; /* derived from 4 MSB of pdcchSib1 present in MIB */
635 typedef struct schRachCfgGeneric
637 uint8_t prachCfgIdx; /* PRACH config idx */
638 uint8_t msg1Fdm; /* PRACH FDM (1,2,4,8) */
639 uint16_t msg1FreqStart; /* Msg1-FrequencyStart */
640 uint8_t zeroCorrZoneCfg; /* Zero correlation zone cofig */
641 int16_t preambleRcvdTargetPower;
642 uint8_t preambleTransMax;
643 uint8_t pwrRampingStep;
644 uint8_t raRspWindow; /* RA Response Window */
647 typedef struct schRachCfg
649 SchRachCfgGeneric prachCfgGeneric;
650 uint8_t totalNumRaPreamble; /* Total number of RA preambles */
651 uint8_t ssbPerRach; /* SSB per RACH occassion */
652 uint8_t numCbPreamblePerSsb; /* Number of CB preamble per SSB */
653 uint8_t raContResTmr; /* RA Contention Resoultion Timer */
654 uint8_t rsrpThreshSsb; /* RSRP Threshold SSB */
655 uint16_t rootSeqIdx; /* Root sequence index */
656 uint16_t rootSeqLen; /* root sequence length */
657 uint8_t numRootSeq; /* Number of root sequences required for FD */
658 uint8_t msg1SubcSpacing; /* Subcarrier spacing of RACH */
661 typedef struct schBwpParams
663 FreqDomainRsrc freqAlloc;
665 uint8_t cyclicPrefix;
668 typedef struct schCandidatesInfo
677 typedef struct schSearchSpaceCfg
679 uint8_t searchSpaceId;
681 uint8_t freqDomainRsrc[FREQ_DOM_RSRC_SIZE]; /* Frequency domain resource */
682 uint16_t monitoringSlot;
684 uint16_t monitoringSymbol;
685 SchCandidatesInfo candidate;
688 typedef struct schPdcchCfgCmn
690 SchSearchSpaceCfg commonSearchSpace;
691 uint8_t raSearchSpaceId;
694 typedef struct schPdschCfgCmnTimeDomRsrcAlloc
699 uint8_t lengthSymbol;
700 }SchPdschCfgCmnTimeDomRsrcAlloc;
702 typedef struct schPdschCfgCmn
704 uint8_t numTimeDomAlloc;
705 SchPdschCfgCmnTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_DL_ALLOC];
708 typedef struct schPucchCfgCmn
710 uint8_t pucchResourceCommon;
711 uint8_t pucchGroupHopping;
714 /* PUSCH Time Domain Resource Allocation */
715 typedef struct schPuschTimeDomRsrcAlloc
718 SchTimeDomRsrcAllocMappingType mappingType;
720 uint8_t symbolLength;
721 }SchPuschTimeDomRsrcAlloc;
723 typedef struct schPuschCfgCmn
725 uint8_t numTimeDomRsrcAlloc;
726 SchPuschTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_UL_ALLOC]; /* PUSCH time domain UL resource allocation list */
729 typedef struct schK1TimingInfo
732 uint8_t k1Indexes[MAX_NUM_K1_IDX];
735 typedef struct schK0TimingInfo
738 SchK1TimingInfo k1TimingInfo;
741 typedef struct schK0K1TimingInfo
744 SchK0TimingInfo k0Indexes[MAX_NUM_K0_IDX];
747 typedef struct schK0K1TimingInfoTbl
750 SchK0K1TimingInfo k0k1TimingInfo[MAX_NUM_CONFIG_SLOTS];
751 }SchK0K1TimingInfoTbl;
753 typedef struct schBwpDlCfg
756 SchPdcchCfgCmn pdcchCommon;
757 SchPdschCfgCmn pdschCommon;
760 typedef struct schK2TimingInfo
763 uint8_t k2Indexes[MAX_NUM_K2_IDX];
766 typedef struct schK2TimingInfoTbl
769 SchK2TimingInfo k2TimingInfo[MAX_NUM_CONFIG_SLOTS];
772 typedef struct schBwpUlCfg
775 SchRachCfg schRachCfg; /* PRACH config */
776 SchPucchCfgCmn pucchCommon;
777 SchPuschCfgCmn puschCommon;
780 typedef struct schPlmnInfoList
783 uint8_t numSliceSupport; /* Total slice supporting */
784 Snssai **snssai; /* List of supporting snssai*/
788 /* The following list of structures is taken from the DRX-Config section of specification 33.331. */
790 typedef struct schDrxOnDurationTimer
792 bool onDurationTimerValInMs;
795 uint8_t subMilliSeconds;
796 uint16_t milliSeconds;
797 }onDurationtimerValue;
798 }SchDrxOnDurationTimer;
800 typedef struct schDrxLongCycleStartOffset
802 uint16_t drxLongCycleStartOffsetChoice;
803 uint16_t drxLongCycleStartOffsetVal;
804 }SchDrxLongCycleStartOffset;
806 typedef struct schShortDrx
808 uint16_t drxShortCycle;
809 uint8_t drxShortCycleTimer;
812 typedef struct schDrxCfg
814 SchDrxOnDurationTimer drxOnDurationTimer;
815 uint16_t drxInactivityTimer;
816 uint8_t drxHarqRttTimerDl;
817 uint8_t drxHarqRttTimerUl;
818 uint16_t drxRetransmissionTimerDl;
819 uint16_t drxRetransmissionTimerUl;
820 SchDrxLongCycleStartOffset drxLongCycleStartOffset;
822 SchShortDrx shortDrx;
823 uint8_t drxSlotOffset;
827 /*Spec 38.331 'NrNsPmaxList'*/
828 typedef struct schNrNsPmaxList
831 long additionalSpectrumEmission;
834 /*Spec 38.331 'FrequencyInfoDL-SIB'*/
835 typedef struct schMultiFreqBandListSib
838 SchNrNsPmaxList nrNsPmaxList[1];
839 }SchMultiFreqBandListSib;
841 /*Spec 38.331 'SCS-SpecificCarrier'*/
842 typedef struct schScsSpecificCarrier
844 uint16_t offsetToCarrier;
845 uint8_t subCarrierSpacing;
847 uint16_t txDirectCurrentLoc;
848 }SchScsSpecificCarrier;
850 /*Spec 38.331 'FrequencyInfoDL-SIB'*/
851 typedef struct schFreqInfoDlSib
853 SchMultiFreqBandListSib mutiFreqBandList[1];
854 uint16_t offsetToPointA;
855 SchScsSpecificCarrier schSpcCarrier[1];
858 typedef struct schBcchCfg
863 /*Spec 38.331 'DownlinkConfigCommonSIB'*/
864 typedef struct schDlCfgCommon
866 SchFreqInfoDlSib schFreqInfoDlSib;
867 SchBwpDlCfg schInitialDlBwp; /* Initial DL BWP */
868 SchBcchCfg schBcchCfg;
869 SchPcchCfg schPcchCfg;
872 /*Spec 38.331 'FrequencyInfoUL-SIB'*/
873 typedef struct schFreqInfoUlSib
875 SchMultiFreqBandListSib mutiFreqBandList[1];
876 uint16_t absoluteFreqPointA;
877 SchScsSpecificCarrier schSpcCarrier[1];
879 bool frequencyShift7p5khz;
882 /*Spec 38.331 'UplinkConfigCommonSIB '*/
883 typedef struct schUlCfgCommon
885 SchFreqInfoUlSib schFreqInfoUlSib;
886 SchBwpUlCfg schInitialUlBwp; /* Initial DL BWP */
887 uint16_t schTimeAlignTimer;
890 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.2.1 Cell Conf Request*/
891 typedef struct schCellCfg
893 uint16_t cellId; /* Cell Id */
897 uint16_t phyCellId; /* Physical cell id */
898 SchPlmnInfoList plmnInfoList[MAX_PLMN]; /* Consits of PlmnId and Snssai list */
899 SchDuplexMode dupMode; /* Duplex type: TDD/FDD */
900 uint8_t dlBandwidth; /* Supported B/W */
901 uint8_t ulBandwidth; /* Supported B/W */
902 SchDlCfgCommon dlCfgCommon; /*Spec 38.331 DownlinkConfigCommonSIB*/
903 SchUlCfgCommon ulCfgCommon; /*Spec 38.331 UplinkConfigCommonSIB*/
905 TDDCfg tddCfg; /* Spec 38.331 tdd-UL-DL-ConfigurationCommon */
908 /*Ref:Spec 38.331 "ssb-PositionsInBurst", Value 0 in Bitmap => corresponding SS/PBCH block is not transmitted
909 *value 1 => corresponding SS/PBCH block is transmitted*/
910 uint32_t ssbPosInBurst[SCH_SSB_MASK_SIZE]; /* Bitmap for actually transmitted SSB. */
911 SchSSBPeriod ssbPeriod; /* SSB Periodicity in msec */
912 uint32_t ssbFrequency; /* SB frequency in kHz*/
913 uint8_t dmrsTypeAPos;
914 uint8_t ssbScs; /* SSB subcarrier spacing*/
915 SchPdcchConfigSib1 pdcchCfgSib1; /* Req to configure CORESET#0 and SearchSpace#0*/
916 uint32_t ssbPbchPwr; /* SSB block power */
917 uint8_t ssbSubcOffset; /* Subcarrier Offset(Kssb) */
921 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.3.1 Cell Config Response*/
922 typedef struct schCellCfgCfm
924 uint16_t cellId; /* Cell Id */
929 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.2.2 Cell Del Req*/
930 typedef struct schCellDeleteReq
935 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.3.2 Cell Del Response*/
936 typedef struct schCellDeleteRsp
943 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.2.3*/
944 typedef struct schRrmPolicyRatio
948 uint8_t dedicatedRatio;
951 typedef struct schRrmPolicyOfSlice
954 SchRrmPolicyRatio rrmPolicyRatioInfo;
955 }SchRrmPolicyOfSlice;
957 typedef struct schSliceCfgReq
959 uint8_t numOfConfiguredSlice;
960 SchRrmPolicyOfSlice **listOfSlices;
963 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.3.3 Slice Cfg Response*/
964 typedef struct schSliceCfgRsp
971 /*As per ORAN-WG8 V7.0.0 Sec 11.2.4.3.4 , Slice Cfg and Recfg are same structures*/
972 typedef struct schSliceCfgReq SchSliceRecfgReq;
973 typedef struct schSliceCfgRsp SchSliceRecfgRsp;
975 typedef struct ssbInfo
977 uint8_t ssbIdx; /* SSB Index */
978 TimeDomainAlloc tdAlloc; /* Time domain allocation */
979 FreqDomainRsrc fdAlloc; /* Freq domain allocation */
982 typedef struct sib1AllocInfo
985 PdcchCfg *sib1PdcchCfg;
988 typedef struct prachSchInfo
990 uint8_t numPrachOcas; /* Num Prach Ocassions */
991 uint8_t prachFormat; /* PRACH Format */
992 uint8_t numRa; /* Freq domain ocassion */
993 uint8_t prachStartSymb; /* Freq domain ocassion */
996 /* Interface structure signifying DL broadcast allocation for SSB, SIB1 */
997 typedef struct dlBrdcstAlloc
999 uint16_t crnti; /* SI-RNTI */
1000 /* Ssb transmission is determined as follows:
1001 * 0 : No tranamission
1002 * 1 : SSB Transmission
1003 * 2 : SSB Repetition */
1004 uint8_t ssbTransmissionMode;
1005 uint8_t ssbIdxSupported;
1006 SsbInfo ssbInfo[MAX_SSB_IDX];
1007 bool systemInfoIndicator;
1009 /* Sib1 transmission is determined as follows:
1010 * 0 : No tranamission
1011 * 1 : SIB1 Transmission
1012 * 2 : SIB1 Repetition */
1013 uint8_t sib1TransmissionMode;
1014 Sib1AllocInfo sib1Alloc;
1017 typedef struct msg3UlGrant
1019 uint8_t freqHopFlag;
1021 FreqDomainRsrc msg3FreqAlloc;
1028 typedef struct rarInfo
1032 Msg3UlGrant ulGrant;
1034 uint8_t rarPdu[RAR_PAYLOAD_SIZE];
1038 typedef struct rarAlloc
1043 PdcchCfg *rarPdcchCfg;
1044 PdschCfg *rarPdschCfg;
1047 typedef struct lcSchInfo
1053 typedef struct ceSchInfo
1059 typedef struct freqDomainAlloc
1061 uint8_t resAllocType; /* Resource allocation type */
1064 ResAllocType0 type0;
1065 ResAllocType1 type1;
1069 typedef struct transportBlock
1076 CeSchInfo ceSchInfo[MAX_NUM_LC];
1078 LcSchInfo lcSchInfo[MAX_NUM_LC];
1081 typedef struct dlMsgSchedInfo
1084 uint8_t dciFormatId;
1085 uint8_t harqProcNum;
1087 uint8_t dlAssignIdx;
1089 uint8_t pucchResInd;
1090 uint8_t harqFeedbackInd;
1091 uint16_t dlMsgPduLen;
1093 FreqDomainAlloc freqAlloc;
1094 TimeDomainAlloc timeAlloc;
1096 TransportBlock transportBlock[2];
1098 PdcchCfg *dlMsgPdcchCfg;
1099 PdschCfg *dlMsgPdschCfg;
1102 typedef struct schSlotValue
1104 SlotTimingInfo currentTime;
1105 SlotTimingInfo broadcastTime;
1106 SlotTimingInfo rarTime;
1107 SlotTimingInfo dlMsgTime;
1108 SlotTimingInfo ulDciTime;
1112 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-36 DCI Format0_0 Configuration */
1113 typedef struct format0_0
1115 uint8_t resourceAllocType;
1116 FreqDomainAlloc freqAlloc;
1117 TimeDomainAlloc timeAlloc;
1128 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-40 DCI Format 0_1 Configuration */
1129 typedef struct format0_1
1131 uint8_t carrierIndicator;
1133 uint8_t bwpIndicator;
1134 uint8_t resourceAlloc;
1135 FreqDomainRsrc freqAlloc;
1136 TimeDomainAlloc timeAlloc;
1143 uint8_t firstDownlinkAssignmentIndex;
1144 uint8_t secondDownlinkAssignmentIndex;
1146 uint8_t srsResourceSetIndicator;
1147 uint8_t srsResourceIndicator;
1149 uint8_t antennaPorts;
1152 uint8_t cbgTransmissionInfo;
1154 uint8_t betaOffsetIndicator;
1155 bool dmrsSequenceInitialization;
1156 bool ulschIndicatior;
1159 typedef struct dciFormat
1161 FormatType formatType; /* DCI Format */
1164 Format0_0 format0_0; /* Format 0_0 */
1165 Format0_1 format0_1; /* Format 0_1 */
1169 typedef struct dciInfo
1171 uint16_t crnti; /* CRNTI */
1172 BwpCfg bwpCfg; /* BWP Cfg */
1173 CoresetCfg coresetCfg; /* Coreset1 Cfg */
1174 DciFormat dciFormatInfo; /* Dci Format */
1175 DlDCI dciInfo; /* DlDCI */
1179 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Section 11.2.4.3.8 DL Scheduling Information */
1180 typedef struct dlSchedInfo
1182 uint16_t cellId; /* Cell Id */
1183 SchSlotValue schSlotValue;
1185 /* Allocation for broadcast messages */
1186 bool isBroadcastPres;
1187 DlBrdcstAlloc brdcstAlloc;
1189 /* Allocation for RAR message */
1190 RarAlloc *rarAlloc[MAX_NUM_UE];
1192 /* UL grant in response to BSR */
1195 /* Allocation from dedicated DL msg */
1196 DlMsgSchInfo *dlMsgAlloc[MAX_NUM_UE];
1200 /*Reference: O-RAN.WG8.AAD.v7.0.0, Sec 11.2.4.3.13 Downlink Paging Allocation*/
1201 typedef struct interleaved_t
1203 uint8_t regBundleSize;
1204 uint8_t interleaverSize;
1205 uint16_t shiftIndex;
1208 typedef struct pageDlDci
1210 uint8_t freqDomainResource[6];
1211 uint8_t durationSymbols;
1212 uint8_t cceRegMappingType;
1215 Interleaved interleaved;
1216 uint8_t nonInterleaved;
1218 uint8_t ssStartSymbolIndex;
1220 uint8_t aggregLevel;
1221 uint8_t precoderGranularity;
1222 uint8_t coreSetSize;
1225 typedef struct resAllocType1 PageFreqDomainAlloc;
1227 typedef struct pageTimeDomainAlloc
1229 uint8_t mappingType;
1232 }PageTimeDomainAlloc;
1234 typedef struct pageDmrsConfig
1238 uint8_t nrOfDmrsSymbols;
1241 typedef struct pageTbInfo
1247 typedef struct pageDlSch
1249 PageFreqDomainAlloc freqAlloc;
1250 PageTimeDomainAlloc timeAlloc;
1251 PageDmrsConfig dmrs;
1252 uint8_t vrbPrbMapping;
1255 uint16_t dlPagePduLen;
1259 typedef struct dlPageAlloc
1262 SlotTimingInfo dlPageTime;
1267 PageDlDci pageDlDci;
1268 PageDlSch pageDlSch;
1271 typedef struct tbInfo
1273 uint8_t mcs; /* MCS */
1274 uint8_t ndi; /* NDI */
1275 uint8_t rv; /* Redundancy Version */
1276 uint16_t tbSize; /* TB Size */
1277 uint8_t qamOrder; /* Modulation Order */
1278 SchMcsTable mcsTable; /* MCS Table */
1281 typedef struct schPuschInfo
1283 uint8_t harqProcId; /* HARQ Process ID */
1284 FreqDomainAlloc fdAlloc; /* Freq domain allocation */
1285 TimeDomainAlloc tdAlloc; /* Time domain allocation */
1286 TbInfo tbInfo; /* TB info */
1288 uint8_t dmrsMappingType;
1289 uint8_t nrOfDmrsSymbols;
1294 typedef struct harqInfo
1296 uint16_t harqAckBitLength;
1297 uint8_t betaOffsetHarqAck;
1300 typedef struct csiInfo
1303 uint8_t betaOffsetCsi;
1306 typedef struct harqFdbkInfo
1308 uint16_t harqBitLength;
1311 typedef struct csiFdbkInfo
1316 typedef struct schPucchFormatCfg
1318 uint8_t interSlotFreqHop;
1320 uint8_t maxCodeRate;
1326 typedef struct schPucchInfo
1328 FreqDomainRsrc fdAlloc;
1329 TimeDomainAlloc tdAlloc;
1331 HarqFdbkInfo harqInfo;
1332 CsiFdbkInfo csiInfo;
1333 BeamformingInfo beamPucchInfo;
1334 uint8_t pucchFormat;
1335 uint8_t intraFreqHop;
1336 uint16_t secondPrbHop;
1337 uint8_t initialCyclicShift;
1345 typedef struct schPuschUci
1347 uint8_t harqProcId; /* HARQ Process ID */
1348 FreqDomainAlloc fdAlloc; /* Freq domain allocation */
1349 TimeDomainAlloc tdAlloc; /* Time domain allocation */
1350 TbInfo tbInfo; /* TB information */
1351 HarqInfo harqInfo; /* Harq Information */
1352 CsiInfo csiInfo; /* Csi information*/
1355 /* Reference -> O-RAN.WG8.AAD.0-v07.00, Section 11.2.4.3.9 UL Scheduling Information */
1356 typedef struct ulSchedInfo
1358 uint16_t cellId; /* Cell Id */
1359 uint16_t crnti; /* CRNI */
1360 SlotTimingInfo slotIndInfo; /* Slot Info: sfn, slot number */
1361 uint8_t dataType; /* Type of info being scheduled */
1362 SchPrachInfo prachSchInfo; /* Prach scheduling info */
1363 SchPuschInfo schPuschInfo; /* Pusch scheduling info */
1364 SchPuschUci schPuschUci; /* Pusch Uci */
1365 SchPucchInfo schPucchInfo; /* Pucch and Uci scheduling info */
1368 /* Info of Scheduling Request to Add/Modify */
1369 typedef struct schSchedReqInfo
1372 SchSrProhibitTimer srProhibitTmr;
1373 SchSrTransMax srTransMax;
1376 /* Scheduling Request Configuration */
1377 typedef struct schSchedReqCfg
1379 uint8_t addModListCount;
1380 SchSchedReqInfo addModList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* List of Scheduling req to be added/modified */
1381 uint8_t relListCount;
1382 uint8_t relList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* list of scheduling request Id to be deleted */
1385 /* Info of Tag to Add/Modify */
1386 typedef struct schTagInfo
1389 SchTimeAlignmentTimer timeAlignmentTmr;
1392 /* Timing Advance Group Configuration */
1393 typedef struct schTagCfg
1395 uint8_t addModListCount;
1396 SchTagInfo addModList[MAX_NUM_TAGS]; /* List of Tag to Add/Modify */
1397 uint8_t relListCount;
1398 uint8_t relList[MAX_NUM_TAGS]; /* list of Tag Id to release */
1401 /* Configuration for Power headroom reporting */
1402 typedef struct schPhrCfg
1404 SchPhrPeriodicTimer periodicTmr;
1405 SchPhrProhibitTimer prohibitTmr;
1406 SchPhrTxPwrFactorChange txpowerFactorChange;
1409 bool type2OtherCell;
1410 SchPhrModeOtherCG modeOtherCG;
1413 /* MAC cell Group configuration */
1414 typedef struct schMacCellGrpCfg
1416 SchSchedReqCfg schedReqCfg;
1418 SchPhrCfg phrCfg; /* To be used only if phrCfgSetupPres is true */
1421 SchDrxCfg drxCfg; /* Drx configuration */
1425 /* Physical Cell Group Configuration */
1426 typedef struct schPhyCellGrpCfg
1428 SchPdschHarqAckCodebook pdschHarqAckCodebook;
1432 /* Control resource set info */
1433 typedef struct schControlRsrcSet
1435 uint8_t cRSetId; /* Control resource set id */
1436 uint8_t freqDomainRsrc[FREQ_DOM_RSRC_SIZE]; /* Frequency domain resource */
1438 SchREGMappingType cceRegMappingType;
1439 SchPrecoderGranul precoderGranularity;
1440 uint16_t dmrsScramblingId;
1443 /* Search Space info */
1444 typedef struct schSearchSpace
1446 uint8_t searchSpaceId;
1448 SchMSlotPeriodAndOffset mSlotPeriodicityAndOffset;
1449 uint8_t mSymbolsWithinSlot[MONITORING_SYMB_WITHIN_SLOT_SIZE];
1450 SchAggrLevel numCandidatesAggLevel1; /* Number of candidates for aggregation level 1 */
1451 SchAggrLevel numCandidatesAggLevel2; /* Number of candidates for aggregation level 2 */
1452 SchAggrLevel numCandidatesAggLevel4; /* Number of candidates for aggregation level 4 */
1453 SchAggrLevel numCandidatesAggLevel8; /* Number of candidates for aggregation level 8 */
1454 SchAggrLevel numCandidatesAggLevel16; /* Number of candidates for aggregation level 16 */
1455 SchSearchSpaceType searchSpaceType;
1456 uint8_t ueSpecificDciFormat;
1459 /* PDCCH cofniguration */
1460 typedef struct schPdcchConfig
1462 uint8_t numCRsetToAddMod;
1463 SchControlRsrcSet cRSetToAddModList[MAX_NUM_CRSET]; /* List of control resource set to add/modify */
1464 uint8_t numCRsetToRel;
1465 uint8_t cRSetToRelList[MAX_NUM_CRSET]; /* List of control resource set to release */
1466 uint8_t numSearchSpcToAddMod;
1467 SchSearchSpace searchSpcToAddModList[MAX_NUM_SEARCH_SPC]; /* List of search space to add/modify */
1468 uint8_t numSearchSpcToRel;
1469 uint8_t searchSpcToRelList[MAX_NUM_SEARCH_SPC]; /* List of search space to release */
1472 /* PDSCH time domain resource allocation */
1473 typedef struct schPdschTimeDomRsrcAlloc
1476 SchTimeDomRsrcAllocMappingType mappingType;
1477 uint8_t startSymbol;
1478 uint8_t symbolLength;
1479 }SchPdschTimeDomRsrcAlloc;
1482 typedef struct schPdschBundling
1484 struct schStaticBundling
1486 SchBundlingSizeSet2 size;
1488 struct schDynamicBundling
1490 SchBundlingSizeSet1 sizeSet1;
1491 SchBundlingSizeSet2 sizeSet2;
1492 }SchDynamicBundling;
1495 /* DMRS downlink configuration */
1496 typedef struct schDmrsDlCfg
1498 SchDmrsAdditionPosition addPos; /* DMRS additional position */
1501 /* PDSCH Configuration */
1502 typedef struct schPdschConfig
1504 SchDmrsDlCfg dmrsDlCfgForPdschMapTypeA;
1505 SchResourceAllocType resourceAllocType;
1506 uint8_t numTimeDomRsrcAlloc;
1507 SchPdschTimeDomRsrcAlloc timeDomRsrcAllociList[MAX_NUM_DL_ALLOC]; /* PDSCH time domain DL resource allocation list */
1509 SchCodeWordsSchedByDci numCodeWordsSchByDci; /* Number of code words scheduled by DCI */
1510 SchBundlingType bundlingType;
1511 SchPdschBundling bundlingInfo;
1514 /* Initial Downlink BWP */
1515 typedef struct schInitalDlBwp
1518 SchPdcchConfig pdcchCfg;
1520 SchPdschConfig pdschCfg;
1523 /*Spec 38.331 'RadioLinkMonitoringConfig'*/
1524 typedef uint8_t SchRadioLinkMonitoringRsId;
1526 typedef struct schRadioLinkMonRS
1528 SchRadioLinkMonitoringRsId radioLinkMonitoringRsId;
1529 SchPurposeOfFailureDet purpose;
1533 uint8_t nzpCsiRsResId;
1537 typedef struct schRadioLinkConfig
1539 SchRadioLinkMonRS failurDetResAddModList[MAX_FAILURE_DET_RESOURCES];
1540 SchRadioLinkMonitoringRsId failurDetResRelList[MAX_FAILURE_DET_RESOURCES];
1541 uint8_t beamFailureInstanceMaxCount;
1542 uint8_t beamFailureDetectionTimer;
1543 }SchRadioLinkConfig;
1545 /*Spec 38.331 "SPS-Config'*/
1546 typedef struct schSpsConfig
1548 uint16_t periodicity;
1549 uint8_t numOfHqProcess;
1551 SchMcsTable mcsTable;
1554 /* Spec 38.331, 'BWP-DownlinkDedicated'*/
1555 typedef struct schBwpDlCfgDed
1557 SchPdcchConfig pdcchCfgDed;
1558 SchPdschConfig pdschCfgDed;
1559 SchSpsConfig spsCfgDed;
1560 SchRadioLinkConfig radioLnkMonCfgDed;
1563 /* Spec 38.331, 'BWP-Downlink' Downlink BWP information */
1564 typedef struct schDlBwpInfo
1567 SchBwpDlCfg bwpCommon;
1568 SchBwpDlCfgDed bwpDedicated;
1571 /* PDCCH Serving Cell configuration */
1572 typedef struct schPdschServCellCfg
1574 uint8_t *maxMimoLayers;
1575 SchNumHarqProcForPdsch numHarqProcForPdsch;
1576 SchMaxCodeBlkGrpPerTB *maxCodeBlkGrpPerTb;
1577 bool *codeBlkGrpFlushInd;
1578 SchPdschXOverhead *xOverhead;
1579 }SchPdschServCellCfg;
1581 typedef struct schRaPrioritization
1583 uint8_t powerRampingStepHighPriority;
1584 uint8_t scalingFactorBI;
1585 }SchRaPrioritization;
1587 typedef struct schBfrCsiRsRes
1591 uint8_t raPreambleIndex;
1594 typedef struct schBfrSsbRes
1597 uint8_t raPreambleIndex;
1600 typedef struct schPrachResDedBfr
1603 SchBfrCsiRsRes csiRs;
1606 /*Spec 38.331 'BeamFailureRecoveryConfig' */
1607 typedef struct schBeamFailRecoveryCfg
1609 uint8_t rootSeqIndexBfr;
1610 SchRachCfgGeneric rachCfgBfr;
1611 uint8_t rsrpThreshSsbBfr; /* RSRP Threshold SSB */
1612 SchPrachResDedBfr candidateBeamRSList;
1613 uint8_t ssbPerRachBfr; /* SSB per RACH occassion */
1614 uint8_t raSsbOccMaskIndex;
1615 uint8_t recoverySearchSpaceId;
1616 SchRaPrioritization raPrioBfr;
1618 uint8_t msg1SubcSpacing; /* Subcarrier spacing of RACH */
1619 }SchBeamFailRecoveryCfg;
1621 /* PUCCH Configuration */
1622 typedef struct schPucchResrcSetInfo
1625 uint8_t resrcListCount;
1626 uint8_t resrcList[MAX_NUM_PUCCH_PER_RESRC_SET];
1627 uint8_t maxPayLoadSize;
1628 }SchPucchResrcSetInfo;
1630 typedef struct schPucchResrcSetCfg
1632 uint8_t resrcSetToAddModListCount;
1633 SchPucchResrcSetInfo resrcSetToAddModList[MAX_NUM_PUCCH_RESRC_SET];
1634 uint8_t resrcSetToRelListCount;
1635 uint8_t resrcSetToRelList[MAX_NUM_PUCCH_RESRC];
1636 }SchPucchResrcSetCfg;
1638 typedef struct schPucchFormat0
1640 uint8_t initialCyclicShift;
1642 uint8_t startSymbolIdx;
1645 typedef struct schPucchFormat1
1647 uint8_t initialCyclicShift;
1649 uint8_t startSymbolIdx;
1653 typedef struct schPucchFormat2_3
1657 uint8_t startSymbolIdx;
1660 typedef struct schPucchFormat4
1665 uint8_t startSymbolIdx;
1668 typedef struct schPucchResrcInfo
1672 uint8_t intraFreqHop;
1673 uint16_t secondPrbHop;
1674 uint8_t pucchFormat;
1676 SchPucchFormat0 *format0;
1677 SchPucchFormat1 *format1;
1678 SchPucchFormat2_3 *format2;
1679 SchPucchFormat2_3 *format3;
1680 SchPucchFormat4 *format4;
1684 typedef struct schPucchResrcCfg
1686 uint8_t resrcToAddModListCount;
1687 SchPucchResrcInfo resrcToAddModList[MAX_NUM_PUCCH_RESRC];
1688 uint8_t resrcToRelListCount;
1689 uint8_t resrcToRelList[MAX_NUM_PUCCH_RESRC];
1693 typedef struct schSchedReqResrcInfo
1697 uint8_t periodicity;
1700 }SchSchedReqResrcInfo;
1702 typedef struct schPucchSchedReqCfg
1704 uint8_t schedAddModListCount;
1705 SchSchedReqResrcInfo schedAddModList[MAX_NUM_SR_CFG_PER_CELL_GRP];
1706 uint8_t schedRelListCount;
1707 uint8_t schedRelList[MAX_NUM_SR_CFG_PER_CELL_GRP];
1708 }SchPucchSchedReqCfg;
1710 typedef struct schSpatialRelationInfo
1712 uint8_t spatialRelationId;
1713 uint8_t servCellIdx;
1714 uint8_t pathLossRefRSId;
1716 uint8_t closeLoopIdx;
1717 }SchSpatialRelationInfo;
1719 typedef struct schPucchSpatialCfg
1721 uint8_t spatialAddModListCount;
1722 SchSpatialRelationInfo spatialAddModList[MAX_NUM_SPATIAL_RELATIONS];
1723 uint8_t spatialRelListCount;
1724 uint8_t spatialRelList[MAX_NUM_SPATIAL_RELATIONS];
1725 }SchPucchSpatialCfg;
1727 typedef struct schP0PucchCfg
1733 typedef struct schPathLossRefRSCfg
1735 uint8_t pathLossRefRSId;
1736 }SchPathLossRefRSCfg;
1738 typedef struct schPucchMultiCsiCfg
1740 uint8_t multiCsiResrcListCount;
1741 uint8_t multiCsiResrcList[MAX_NUM_PUCCH_RESRC-1];
1742 }SchPucchMultiCsiCfg;
1744 typedef struct schPucchDlDataToUlAck
1746 uint8_t dlDataToUlAckListCount;
1747 uint8_t dlDataToUlAckList[MAX_NUM_DL_DATA_TO_UL_ACK];
1748 }SchPucchDlDataToUlAck;
1750 typedef struct schPucchPowerControl
1758 SchP0PucchCfg p0Set[MAX_NUM_PUCCH_P0_PER_SET];
1759 uint8_t pathLossRefRSListCount;
1760 SchPathLossRefRSCfg pathLossRefRSList[MAX_NUM_PATH_LOSS_REF_RS];
1761 }SchPucchPowerControl;
1763 typedef struct schPucchCfg
1765 SchPucchResrcSetCfg *resrcSet;
1766 SchPucchResrcCfg *resrc;
1767 SchPucchFormatCfg *format1;
1768 SchPucchFormatCfg *format2;
1769 SchPucchFormatCfg *format3;
1770 SchPucchFormatCfg *format4;
1771 SchPucchSchedReqCfg *schedReq;
1772 SchPucchMultiCsiCfg *multiCsiCfg;
1773 SchPucchSpatialCfg *spatialInfo;
1774 SchPucchDlDataToUlAck *dlDataToUlAck;
1775 SchPucchPowerControl *powerControl;
1778 /* Transform precoding disabled */
1779 typedef struct schTransPrecodDisabled
1781 uint16_t scramblingId0;
1782 }SchTransPrecodDisabled;
1784 /* DMRS Uplink configuration */
1785 typedef struct SchDmrsUlCfg
1787 SchDmrsAdditionPosition addPos; /* DMRS additional position */
1788 SchTransPrecodDisabled transPrecodDisabled; /* Transform precoding disabled */
1791 /* PUSCH Configuration */
1792 typedef struct schPuschCfg
1794 uint8_t dataScramblingId;
1795 SchDmrsUlCfg dmrsUlCfgForPuschMapTypeA;
1796 SchResourceAllocType resourceAllocType;
1797 uint8_t numTimeDomRsrcAlloc;
1798 SchPuschTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_UL_ALLOC]; /* PUSCH time domain UL resource allocation list */
1799 SchTransformPrecoder transformPrecoder;
1802 /* Initial Uplink BWP */
1803 typedef struct schInitialUlBwp
1806 SchPucchCfg pucchCfg;
1808 SchPuschCfg puschCfg;
1811 typedef struct schBwpCfgDedicated
1813 SchPucchCfg pucchCfg;
1814 SchPuschCfg puschCfg;
1815 }SchBwpCfgDedicated;
1817 /* Uplink BWP information */
1818 typedef struct schUlBwpInfo
1821 SchBwpUlCfg bwpCommon;
1822 SchBwpCfgDedicated bwpDed;
1825 typedef struct schBwpRelInfo
1830 /* Serving cell configuration */
1831 typedef struct schServCellRecfgInfo
1833 SchInitalDlBwp initDlBwp;
1834 SchRadioLinkConfig radioLinkMonConfig;
1835 uint8_t numDlBwpToAddOrMod;
1836 SchDlBwpInfo dlBwpToAddOrModList[MAX_NUM_BWP];
1837 uint8_t numDlBwpToRel;
1838 SchBwpRelInfo dlBwpToRelList[MAX_NUM_BWP];
1839 uint8_t firstActvDlBwpId;
1840 uint8_t defaultDlBwpId;
1841 uint8_t *bwpInactivityTmr;
1842 SchPdschServCellCfg pdschServCellCfg;
1843 SchInitialUlBwp initUlBwp;
1844 SchBeamFailRecoveryCfg beamFailureRecoveryCfg;
1845 uint8_t numUlBwpToAddOrMod;
1846 SchUlBwpInfo ulBwpToAddOrModList[MAX_NUM_BWP];
1847 uint8_t numUlBwpToRel;
1848 SchBwpRelInfo ulBwpToRelList[MAX_NUM_BWP];
1849 uint8_t firstActvUlBwpId;
1850 }SchServCellRecfgInfo;
1852 /* Serving cell configuration */
1853 typedef struct schServCellCfgInfo
1855 SchInitalDlBwp initDlBwp;
1856 SchRadioLinkConfig radioLinkMonConfig;
1857 uint8_t numDlBwpToAdd;
1858 SchDlBwpInfo dlBwpToAddList[MAX_NUM_BWP];
1859 uint8_t firstActvDlBwpId;
1860 uint8_t defaultDlBwpId;
1861 uint8_t *bwpInactivityTmr;
1862 SchPdschServCellCfg pdschServCellCfg;
1863 SchInitialUlBwp initUlBwp;
1864 SchBeamFailRecoveryCfg beamFailureRecoveryCfg;
1865 uint8_t numUlBwpToAdd;
1866 SchUlBwpInfo ulBwpToAddList[MAX_NUM_BWP];
1867 uint8_t firstActvUlBwpId;
1868 }SchServCellCfgInfo;
1870 typedef struct schNonDynFiveQi
1875 uint16_t maxDataBurstVol;
1878 typedef struct schDynFiveQi
1881 uint16_t packetDelayBudget;
1882 uint8_t packetErrRateScalar;
1883 uint8_t packetErrRateExp;
1885 uint8_t delayCritical;
1887 uint16_t maxDataBurstVol;
1890 typedef struct schNgRanAllocAndRetPri
1892 uint8_t priorityLevel;
1893 uint8_t preEmptionCap;
1894 uint8_t preEmptionVul;
1895 }SchNgRanAllocAndRetPri;
1897 typedef struct schGrbQosFlowInfo
1899 uint32_t maxFlowBitRateDl;
1900 uint32_t maxFlowBitRateUl;
1901 uint32_t guarFlowBitRateDl;
1902 uint32_t guarFlowBitRateUl;
1906 typedef struct schDrbQos
1908 SchQosType fiveQiType; /* Dynamic or non-dynamic */
1911 SchNonDynFiveQi nonDyn5Qi;
1912 SchDynFiveQi dyn5Qi;
1914 SchNgRanAllocAndRetPri ngRanRetPri;
1915 SchGrbQosFlowInfo grbQosFlowInfo;
1916 uint16_t pduSessionId;
1917 uint32_t ulPduSessAggMaxBitRate; /* UL PDU Session Aggregate max bit rate */
1920 /* Special cell configuration */
1921 typedef struct schSpCellCfg
1923 uint8_t servCellIdx;
1924 SchServCellCfgInfo servCellCfg;
1927 /* Special cell Reconfiguration */
1928 typedef struct schSpCellRecfg
1930 uint8_t servCellIdx;
1931 SchServCellRecfgInfo servCellRecfg;
1934 /* Uplink logical channel configuration */
1935 typedef struct SchUlLcCfg
1940 uint8_t pbr; // prioritisedBitRate
1941 uint8_t bsd; // bucketSizeDuration
1944 /* Downlink logical channel configuration */
1945 typedef struct schDlLcCfg
1947 uint8_t lcp; // logical Channel Prioritization
1950 /* Logical Channel configuration */
1951 typedef struct schLcCfg
1955 SchDrbQosInfo *drbQos;
1960 /* Aggregate max bit rate */
1961 typedef struct schAmbrCfg
1963 uint32_t ulBr; /* Ul BitRate */
1966 typedef struct schModulationInfo
1970 SchMcsTable mcsTable;
1973 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.5' UE Configuration Request*/
1974 typedef struct schUeCfgReq
1979 bool macCellGrpCfgPres;
1980 SchMacCellGrpCfg macCellGrpCfg;
1981 bool phyCellGrpCfgPres;
1982 SchPhyCellGrpCfg phyCellGrpCfg;
1984 SchSpCellCfg spCellCfg;
1985 SchAmbrCfg *ambrCfg;
1986 SchModulationInfo dlModInfo;
1987 SchModulationInfo ulModInfo;
1988 uint8_t numLcsToAdd;
1989 SchLcCfg schLcCfg[MAX_NUM_LC];
1992 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.6' UE Reconfiguration Request*/
1993 typedef struct schUeRecfgReq
1998 bool macCellGrpRecfgPres;
1999 SchMacCellGrpCfg macCellGrpRecfg;
2000 bool phyCellGrpRecfgPres;
2001 SchPhyCellGrpCfg phyCellGrpRecfg;
2002 bool spCellRecfgPres;
2003 SchSpCellRecfg spCellRecfg;
2004 SchAmbrCfg *ambrRecfg;
2005 SchModulationInfo dlModInfo;
2006 SchModulationInfo ulModInfo;
2007 uint8_t numLcsToAdd;
2008 SchLcCfg schLcCfgAdd[MAX_NUM_LC];
2009 uint8_t numLcsToDel;
2010 uint8_t lcIdToDel[MAX_NUM_LC];
2011 uint8_t numLcsToMod;
2012 SchLcCfg schLcCfgMod[MAX_NUM_LC];
2013 SchDataTransmission dataTransmissionInfo;
2015 bool drxConfigIndicatorRelease;
2019 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.3.5 UE Confg Response*/
2020 typedef struct schUeCfgRsp
2026 CauseOfResult cause;
2029 /*As per WG8 V7.0.0 Sec 11.2.4.3.6, UE ReCFG and UECFG have same structure definition*/
2030 typedef struct schUeCfgRsp SchUeRecfgRsp;
2032 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.7' Delete UE Request*/
2033 typedef struct schUeDelete
2039 /*Ref: ORAN_WG8.V7.0.0 Sec 11.2.4.3.7*/
2040 typedef struct schUeDeleteRsp
2045 CauseOfResult cause;
2048 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.8' DL HARQ Indication*/
2049 typedef struct dlHarqInd
2053 SlotTimingInfo slotInd;
2055 uint8_t harqPayload[MAX_HARQ_BITS_IN_BYTES];
2058 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.9' UL HARQ (CRC) Indication*/
2059 typedef struct crcIndInfo
2063 SlotTimingInfo timingInfo;
2065 uint8_t crcInd[MAX_NUMBER_OF_CRC_IND_BITS];
2068 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.10' UL Channel Quality Indication*/
2069 typedef struct ulCqiReport
2071 CqiUlReportType reportType;
2076 typedef struct schUlCqiInd
2080 SlotTimingInfo timingInfo;
2081 uint8_t numUlCqiReported;
2082 UlCqiReport ulCqiRpt;
2085 /*Spec O-RAN, WG8, V7.0.0, '11.2.4.2.11' DL Channel Quality Indication*/
2086 typedef struct dlCqiReport
2088 uint8_t reportType; /*Bitmap for CQI, PMI, RI, CRI report*/
2095 typedef struct schDlCqiInd
2099 SlotTimingInfo timingInfo;
2100 uint8_t numDlCqiReported;
2101 DlCqiReport dlCqiRpt;
2104 /*Spec O-RAN WG8 v7.0.0, '11.2.4.2.12' Rach Ind contents*/
2105 typedef struct rachIndInfo
2109 SlotTimingInfo timingInfo;
2113 uint8_t preambleIdx;
2117 /*Spec O-RAN WG8 v7.0.0, '11.2.4.2.13' Paging Ind contents*/
2118 typedef struct schPageInd
2127 /*ORAN WG8 v7.0.0, Sec 11.2.4.2.14 Rach Res Request*/
2128 typedef struct schRachRsrcReq
2130 SlotTimingInfo slotInd;
2134 uint8_t ssbIdx[MAX_NUM_SSB];
2137 typedef struct schCfraSsbResource
2140 uint8_t raPreambleIdx;
2141 }SchCfraSsbResource;
2143 typedef struct schCfraRsrc
2146 SchCfraSsbResource ssbResource[MAX_NUM_SSB];
2149 typedef struct schRachRsrcRsp
2154 SchCfraResource cfraResource;
2157 /*ORAN WG8 v7.0.0, Sec 11.2.4.2.15 Rach Res Release*/
2158 typedef struct schRachRsrcRel
2160 SlotTimingInfo slotInd;
2163 SchCfraResource cfraResource;
2166 /*O-RAN WG* v7.0.0 Sec 11.2.4.2.16 DL RLC Buffer Status Information*/
2167 typedef struct dlRlcBOInfo
2172 uint32_t dataVolume;
2175 /*O-RAN WG8 v7.0.0 Sec 11.2.4.2.17 Scheduling Request Indication*/
2176 typedef struct srUciIndInfo
2180 SlotTimingInfo slotInd;
2182 uint8_t srPayload[MAX_SR_BITS_IN_BYTES];
2185 /*O-RAN WG* v7.0.0 Sec 11.2.4.2.18 UL RLC Buffer Status Information*/
2186 typedef struct dataVolInfo
2192 typedef struct ulBufferStatusRptInd
2198 DataVolInfo dataVolInfo[MAX_NUM_LOGICAL_CHANNEL_GROUPS];
2199 }UlBufferStatusRptInd;
2201 /**O-RAN WG* v7.0.0 Sec 11.2.4.2.19 Power Headroom Indication*/
2202 typedef struct phrData /*Spec 38.321 Sec 6.1.3.8*/
2208 typedef struct singlePhrInfo
2213 typedef struct multiPhr
2219 typedef struct multiplePhrInfo /*Spec 38.321 Sec 6.1.3.9*/
2221 uint8_t numPhrReported;
2222 MultiPhr multiPhrStat[MAX_PHR_REPORT];
2225 typedef struct schPwrHeadroomInd
2232 SinglePhrInfo singlePhr;
2233 MultiplePhrInfo multiPhr;
2237 typedef struct schUeHqInfo
2243 typedef struct schRlsHqInfo
2247 SchUeHqInfo *ueHqInfo;
2250 /* Statistics Request from MAC to SCH */
2251 typedef struct schStatsGrpInfo
2254 uint16_t periodicity; /* In milliseconds */
2256 SchMeasurementType statsList[MAX_NUM_STATS];
2259 typedef struct schStatsReq
2261 uint64_t subscriptionId;
2262 uint8_t numStatsGroup;
2263 SchStatsGrpInfo statsGrpList[MAX_NUM_STATS_GRP];
2266 /* Statistics Response from SCH to MAC */
2267 typedef struct schStatsGrpRejected
2270 CauseOfResult cause;
2271 }SchStatsGrpRejected;
2273 typedef struct schStatsRsp
2275 uint64_t subscriptionId;
2276 uint8_t numGrpAccepted;
2277 uint8_t statsGrpAcceptedList[MAX_NUM_STATS_GRP];
2278 uint8_t numGrpRejected;
2279 SchStatsGrpRejected statsGrpRejectedList[MAX_NUM_STATS_GRP];
2282 /* Statistics Indication from SCH to MAC */
2283 typedef struct schStats
2285 SchMeasurementType type;
2289 typedef struct schStatsInd
2291 uint64_t subscriptionId;
2294 SchStats measuredStatsList[MAX_NUM_STATS];
2297 typedef struct schStatsDeleteReq
2299 uint64_t subscriptionId;
2300 uint8_t numStatsGroupToBeDeleted;
2301 uint8_t statsGrpIdToBeDelList[MAX_NUM_STATS_GRP];
2304 typedef struct statsDeleteResult
2307 SchMacRsp statsGrpDelRsp;
2308 CauseOfResult statsGrpDelCause;
2311 typedef struct schStatsDeleteRsp
2313 uint64_t subscriptionId; /* subscription Id */
2314 SchMacRsp subsDelRsp; /* deletion status of all statsGrp with given subscriptionId */
2315 CauseOfResult subsDelCause; /* cause of failure in deletion of all statsGrp with given subscriptionId*/
2316 uint8_t numStatsGroupDeleted; /* num of action deleted */
2317 StatsDeleteResult statsGrpDelInfo[MAX_NUM_STATS_GRP]; /* list of the deletion status for specific actions */
2320 /* function declarations */
2321 uint8_t MacMessageRouter(Pst *pst, void *msg);
2322 uint8_t SchMessageRouter(Pst *pst, void *msg);
2324 /**********************************************************************
2326 **********************************************************************/