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_CELL_CFG 1
21 #define EVENT_SCH_CELL_CFG_CFM 2
22 #define EVENT_DL_ALLOC 3
23 #define EVENT_UL_SCH_INFO 4
24 #define EVENT_RACH_IND_TO_SCH 5
25 #define EVENT_CRC_IND_TO_SCH 6
26 #define EVENT_DL_RLC_BO_INFO_TO_SCH 7
27 #define EVENT_UE_CREATE_REQ_TO_SCH 8
28 #define EVENT_UE_CREATE_RSP_TO_MAC 9
29 #define EVENT_SLOT_IND_TO_SCH 10
33 #define SSB_TRANSMISSION 1
35 #define MAX_SSB_IDX 1 /* forcing it as 1 for now. Right value is 64 */
36 #define SCH_SSB_MASK_SIZE 1
39 #define SIB1_TRANSMISSION 1
40 #define SIB1_REPITITION 2
42 #define MAX_NUM_PRG 1 /* max value should be later 275 */
43 #define MAX_DIG_BF_INTERFACES 0 /* max value should be later 255 */
44 #define MAX_CODEWORDS 1 /* max should be 2 */
45 #define SCH_HARQ_PROC_ID 1 /* harq proc id */
46 #define SCH_ALLOC_TYPE_1 1 /*sch res alloc type */
48 /* Datatype in UL SCH Info */
49 #define SCH_DATATYPE_PUSCH 1
50 #define SCH_DATATYPE_PUSCH_UCI 2
51 #define SCH_DATATYPE_UCI 4
52 #define SCH_DATATYPE_SRS 8
53 #define SCH_DATATYPE_PRACH 16
55 #define MAX_NUMBER_OF_CRC_IND_BITS 1
56 #define MAX_NUM_LOGICAL_CHANNELS 11
57 /* can we have a common numslot numscs between mac sch */
60 #define MAX_NUM_SR_CFG_PER_CELL_GRP 8 /* Max number of scheduling request config per cell group */
61 #define MAX_NUM_TAGS 4 /* Max number of timing advance groups */
62 #define MAX_NUM_BWP 4 /* Max number of BWP per serving cell */
63 #define MAX_NUM_CRSET 3 /* Max number of control resource set in add/modify/release list */
64 #define MAX_NUM_SEARCH_SPC 10 /* Max number of search space in add/modify/release list */
65 #define FREQ_DOM_RSRC_SIZE 6 /* i.e. 6 bytes because Size of frequency domain resource is 45 bits */
66 #define MONITORING_SYMB_WITHIN_SLOT_SIZE 2 /* i.e. 2 bytes because size of monitoring symbols within slot is 14 bits */
67 #define MAX_NUM_DL_ALLOC 16 /* Max number of pdsch time domain downlink allocation */
68 #define MAX_NUM_UL_ALLOC 16 /* Max number of pusch time domain uplink allocation */
73 #define ADD_DELTA_TO_TIME(crntTime, toFill, incr) \
75 if ((crntTime.slot + incr) > (MAX_SLOTS - 1)) \
77 toFill.sfn = (crntTime.sfn + 1); \
81 toFill.sfn = crntTime.sfn; \
83 toFill.slot = (crntTime.slot + incr) % MAX_SLOTS; \
84 if (toFill.sfn >= MAX_SFN) \
86 toFill.sfn%=MAX_SFN; \
125 TIME_ALIGNMENT_TIMER_MS500,
126 TIME_ALIGNMENT_TIMER_MS750,
127 TIME_ALIGNMENT_TIMER_MS1280,
128 TIME_ALIGNMENT_TIMER_MS1920,
129 TIME_ALIGNMENT_TIMER_MS2560,
130 TIME_ALIGNMENT_TIMER_MS5120,
131 TIME_ALIGNMENT_TIMER_MS10240,
132 TIME_ALIGNMENT_TIMER_INFINITE
133 }SchTimeAlignmentTimer;
137 PHR_PERIODIC_TIMER_SF10,
138 PHR_PERIODIC_TIMER_SF20,
139 PHR_PERIODIC_TIMER_SF50,
140 PHR_PERIODIC_TIMER_SF100,
141 PHR_PERIODIC_TIMER_SF200,
142 PHR_PERIODIC_TIMER_SF500,
143 PHR_PERIODIC_TIMER_SF1000,
144 PHR_PERIODIC_TIMER_INFINITE
145 }SchPhrPeriodicTimer;
149 PHR_PROHIBIT_TIMER_SF0,
150 PHR_PROHIBIT_TIMER_SF10,
151 PHR_PROHIBIT_TIMER_SF20,
152 PHR_PROHIBIT_TIMER_SF50,
153 PHR_PROHIBIT_TIMER_SF100,
154 PHR_PROHIBIT_TIMER_SF200,
155 PHR_PROHIBIT_TIMER_SF500,
156 PHR_PROHIBIT_TIMER_SF1000
157 }SchPhrProhibitTimer;
161 PHR_TX_PWR_FACTOR_CHANGE_DB1,
162 PHR_TX_PWR_FACTOR_CHANGE_DB3,
163 PHR_TX_PWR_FACTOR_CHANGE_DB6,
164 PHR_TX_PWR_FACTOR_CHANGE_INFINITE
165 }SchPhrTxPwrFactorChange;
175 HARQ_ACK_CODEBOOK_SEMISTATIC,
176 HARQ_ACK_CODEBOOK_DYNAMIC
177 }SchPdschHarqAckCodebook;
181 NUM_HARQ_PROC_FOR_PDSCH_N2,
182 NUM_HARQ_PROC_FOR_PDSCH_N4,
183 NUM_HARQ_PROC_FOR_PDSCH_N6,
184 NUM_HARQ_PROC_FOR_PDSCH_N10,
185 NUM_HARQ_PROC_FOR_PDSCH_N16
186 }SchNumHarqProcForPdsch;
190 MAX_CODE_BLOCK_GROUP_PER_TB_N2,
191 MAX_CODE_BLOCK_GROUP_PER_TB_N4,
192 MAX_CODE_BLOCK_GROUP_PER_TB_N6,
193 MAX_CODE_BLOCK_GROUP_PER_TB_N8
194 }SchMaxCodeBlkGrpPerTB;
198 PDSCH_X_OVERHEAD_XOH_6,
199 PDSCH_X_OVERHEAD_XOH_12,
200 PDSCH_X_OVERHEAD_XOH_18
205 DMRS_ADDITIONAL_POS0,
206 DMRS_ADDITIONAL_POS1,
208 }SchDmrsAdditionPosition;
212 RESOURCE_ALLOCTION_TYPE_0,
213 RESOURCE_ALLOCTION_TYPE_1,
214 RESOURCE_ALLOCTION_DYN_SWITCH
215 }SchResourceAllocType;
219 TIME_DOMAIN_RSRC_ALLOC_MAPPING_TYPE_A,
220 TIME_DOMAIN_RSRC_ALLOC_MAPPING_TYPE_B
221 }SchTimeDomRsrcAllocMappingType;
225 ENABLED_TRANSFORM_PRECODER,
226 DISABLED_TRANSFORM_PRECODER
227 }SchTransformPrecoder;
231 INTERLEAVED_CCE_REG_MAPPING,
232 NONINTERLEAVED_CCE_REG_MAPPING
237 SLOT_PERIODICITY_AND_OFFSET_SL_1,
238 SLOT_PERIODICITY_AND_OFFSET_SL_2,
239 SLOT_PERIODICITY_AND_OFFSET_SL_4,
240 SLOT_PERIODICITY_AND_OFFSET_SL_5,
241 SLOT_PERIODICITY_AND_OFFSET_SL_8,
242 SLOT_PERIODICITY_AND_OFFSET_SL_10,
243 SLOT_PERIODICITY_AND_OFFSET_SL_16,
244 SLOT_PERIODICITY_AND_OFFSET_SL_20,
245 SLOT_PERIODICITY_AND_OFFSET_SL_40,
246 SLOT_PERIODICITY_AND_OFFSET_SL_80,
247 SLOT_PERIODICITY_AND_OFFSET_SL_160,
248 SLOT_PERIODICITY_AND_OFFSET_SL_320,
249 SLOT_PERIODICITY_AND_OFFSET_SL_640,
250 SLOT_PERIODICITY_AND_OFFSET_SL_1280,
251 SLOT_PERIODICITY_AND_OFFSET_SL_2560
252 }SchMSlotPeriodAndOffset;
262 SEARCH_SPACE_TYPE_COMMON,
263 SEARCH_SPACE_TYPE_UE_SPECIFIC
268 AGGREGATION_LEVEL_N0,
269 AGGREGATION_LEVEL_N1,
270 AGGREGATION_LEVEL_N2,
271 AGGREGATION_LEVEL_N3,
272 AGGREGATION_LEVEL_N4,
273 AGGREGATION_LEVEL_N5,
274 AGGREGATION_LEVEL_N6,
286 CODE_WORDS_SCHED_BY_DCI_N1,
287 CODE_WORDS_SCHED_BY_DCI_N2
288 }SchCodeWordsSchedByDci;
292 STATIC_BUNDLING_TYPE,
293 DYNAMIC_BUNDLING_TYPE
318 typedef struct timeDomainAlloc
324 typedef struct freqDomainAlloc
333 uint32_t ssbPbchPwr; /* SSB block power */
334 uint8_t scsCommon; /* subcarrier spacing for common [0-3]*/
335 uint8_t ssbOffsetPointA; /* SSB sub carrier offset from point A */
336 SchSSBPeriod ssbPeriod; /* SSB Periodicity in msec */
337 uint8_t ssbSubcOffset; /* Subcarrier Offset(Kssb) */
338 uint32_t nSSBMask[SCH_SSB_MASK_SIZE]; /* Bitmap for actually transmitted SSB. */
341 typedef struct bwpCfg
343 uint8_t subcarrierSpacing;
344 uint8_t cyclicPrefix;
345 FreqDomainAlloc freqAlloc;
351 uint16_t beamIdx[MAX_DIG_BF_INTERFACES];
354 typedef struct beamformingInfo
358 uint8_t digBfInterfaces;
359 Prg prg[MAX_NUM_PRG];
362 /* SIB1 PDSCH structures */
364 typedef struct codewordinfo
366 uint16_t targetCodeRate;
374 typedef struct dmrsInfo
376 uint16_t dlDmrsSymbPos;
377 uint8_t dmrsConfigType;
378 uint16_t dlDmrsScramblingId;
380 uint8_t numDmrsCdmGrpsNoData;
383 uint8_t nrOfDmrsSymbols;
387 typedef struct pdschFreqAlloc
389 uint8_t resourceAllocType;
390 /* since we are using type-1, hence rbBitmap excluded */
391 FreqDomainAlloc freqAlloc;
392 uint8_t vrbPrbMapping;
395 typedef struct pdschTimeAlloc
398 TimeDomainAlloc timeAlloc;
401 typedef struct txPowerPdschInfo
403 uint8_t powerControlOffset;
404 uint8_t powerControlOffsetSS;
407 typedef struct pdschCfg
412 uint8_t numCodewords;
413 CodewordInfo codeword[MAX_CODEWORDS];
414 uint16_t dataScramblingId;
416 uint8_t transmissionScheme;
419 PdschFreqAlloc pdschFreqAlloc;
420 PdschTimeAlloc pdschTimeAlloc;
421 BeamformingInfo beamPdschInfo;
422 TxPowerPdschInfo txPdschPower;
424 /* SIB1 PDSCH structures end */
426 /* SIB1 interface structure */
428 typedef struct coresetCfg
430 uint8_t coreSet0Size;
431 uint8_t startSymbolIndex;
432 uint8_t durationSymbols;
433 uint8_t freqDomainResource[6];
434 uint8_t cceRegMappingType;
435 uint8_t regBundleSize;
436 uint8_t interleaverSize;
439 uint8_t precoderGranularity;
441 uint8_t aggregationLevel;
444 typedef struct txPowerPdcchInfo
447 uint8_t powerControlOffsetSS;
453 uint16_t scramblingId;
454 uint16_t scramblingRnti;
457 BeamformingInfo beamPdcchInfo;
458 TxPowerPdcchInfo txPdcchPower;
462 typedef struct pdcchCfg
464 /* coreset-0 configuration */
465 CoresetCfg coreset0Cfg;
468 DlDCI dci; /* as of now its only one DCI, later it will be numDlCi */
470 /* end of SIB1 PDCCH structures */
474 /* parameters recieved from DU-APP */
476 uint16_t sib1NewTxPeriod;
477 uint16_t sib1RepetitionPeriod;
478 uint8_t coresetZeroIndex; /* derived from 4 LSB of pdcchSib1 present in MIB */
479 uint8_t searchSpaceZeroIndex; /* derived from 4 MSB of pdcchSib1 present in MIB */
482 /* parameters derived in scheduler */
485 PdcchCfg sib1PdcchCfg;
486 PdschCfg sib1PdschCfg;
489 typedef struct schRachCfg
491 uint8_t prachCfgIdx; /* PRACH config idx */
492 uint8_t prachSubcSpacing; /* Subcarrier spacing of RACH */
493 uint16_t msg1FreqStart; /* Msg1-FrequencyStart */
494 uint8_t msg1Fdm; /* PRACH FDM (1,2,4,8) */
495 uint8_t rootSeqLen; /* root sequence length */
496 uint16_t rootSeqIdx; /* Root sequence index */
497 uint8_t numRootSeq; /* Number of root sequences required for FD */
498 uint16_t k1; /* Frequency Offset for each FD */
499 uint8_t ssbPerRach; /* SSB per RACH occassion */
500 uint8_t prachMultCarrBand; /* Presence of Multiple carriers in Band */
501 uint8_t raContResTmr; /* RA Contention Resoultion Timer */
502 uint8_t rsrpThreshSsb; /* RSRP Threshold SSB */
503 uint8_t raRspWindow; /* RA Response Window */
506 typedef struct schBwpParams
508 FreqDomainAlloc freqAlloc;
510 uint8_t cyclicPrefix;
513 typedef struct schCandidatesInfo
522 typedef struct schSearchSpaceCfg
524 uint8_t searchSpaceId;
526 uint16_t monitoringSlot;
528 uint16_t monitoringSymbol;
529 SchCandidatesInfo candidate;
532 typedef struct schPdcchCfgCmn
534 SchSearchSpaceCfg commonSearchSpace;
535 uint8_t raSearchSpaceId;
538 typedef struct schPdschCfgCmn
543 uint8_t lengthSymbol;
546 typedef struct schPucchCfgCmn
548 uint8_t pucchResourceCommon;
549 uint8_t pucchGroupHopping;
552 typedef struct schPuschCfgCmn
557 uint8_t lengthSymbol;
560 typedef struct schBwpDlCfg
563 SchPdcchCfgCmn pdcchCommon;
564 SchPdschCfgCmn pdschCommon;
567 typedef struct schBwpUlCfg
570 SchPucchCfgCmn pucchCommon;
571 SchPuschCfgCmn puschCommon;
574 typedef struct schCellCfg
576 uint16_t cellId; /* Cell Id */
577 uint16_t phyCellId; /* Physical cell id */
578 uint8_t bandwidth; /* Supported B/W */
579 SchDuplexMode dupMode; /* Duplex type: TDD/FDD */
580 SchSsbCfg ssbSchCfg; /* SSB config */
581 SchSib1Cfg sib1SchCfg; /* SIB1 config */
582 SchRachCfg schRachCfg; /* PRACH config */
583 SchBwpDlCfg schInitialDlBwp; /* Initial DL BWP */
584 SchBwpUlCfg schInitialUlBwp; /* Initial UL BWP */
585 uint8_t puschMu; /* PUSCH MU */
588 typedef struct schCellCfgCfm
590 U16 cellId; /* Cell Id */
594 typedef struct ssbInfo
596 uint8_t ssbIdx; /* SSB Index */
597 TimeDomainAlloc tdAlloc; /* Time domain allocation */
598 FreqDomainAlloc fdAlloc; /* Freq domain allocation */
601 typedef struct sib1AllocInfo
604 PdcchCfg sib1PdcchCfg;
605 PdschCfg sib1PdschCfg;
608 typedef struct prachSchInfo
610 uint8_t numPrachOcas; /* Num Prach Ocassions */
611 uint8_t prachFormat; /* PRACH Format */
612 uint8_t numRa; /* Freq domain ocassion */
613 uint8_t prachStartSymb; /* Freq domain ocassion */
616 /* Interface structure signifying DL broadcast allocation for SSB, SIB1 */
617 typedef struct dlBrdcstAlloc
619 /* Ssb transmission is determined as follows:
620 * 0 : No tranamission
621 * 1 : SSB Transmission
622 * 2 : SSB Repetition */
624 uint8_t ssbIdxSupported;
625 SsbInfo ssbInfo[MAX_SSB_IDX];
626 /* Sib1 transmission is determined as follows:
627 * 0 : No tranamission
628 * 1 : SIB1 Transmission
629 * 2 : SIB1 Repetition */
631 Sib1AllocInfo sib1Alloc;
634 typedef struct rarInfo
639 FreqDomainAlloc msg3FreqAlloc;
645 typedef struct rarAlloc
649 PdcchCfg rarPdcchCfg;
650 PdschCfg rarPdschCfg;
653 typedef struct msg4Info
661 uint8_t harqFeedbackInd;
667 typedef struct msg4Alloc
671 PdcchCfg msg4PdcchCfg;
672 PdschCfg msg4PdschCfg;
675 typedef struct schSlotValue
677 SlotIndInfo currentTime;
678 SlotIndInfo broadcastTime;
680 SlotIndInfo msg4Time;
681 SlotIndInfo dlMsgTime;
684 typedef struct dlSchedInfo
686 uint16_t cellId; /* Cell Id */
687 SchSlotValue schSlotValue;
689 /* Allocation for broadcast messages */
690 bool isBroadcastPres;
691 DlBrdcstAlloc brdcstAlloc;
693 /* Allocation for RAR message */
697 /* Allocation from MSG4 */
698 Msg4Alloc *msg4Alloc;
701 typedef struct tbInfo
703 uint8_t mcs; /* MCS */
704 uint8_t ndi; /* NDI */
705 uint8_t rv; /* Redundancy Version */
706 uint16_t tbSize; /* TB Size */
709 typedef struct schPuschInfo
711 uint8_t harqProcId; /* HARQ Process ID */
712 uint8_t resAllocType; /* Resource allocation type */
713 FreqDomainAlloc fdAlloc; /* Freq domain allocation */
714 TimeDomainAlloc tdAlloc; /* Time domain allocation */
715 TbInfo tbInfo; /* TB info */
716 uint8_t dmrsMappingType;
717 uint8_t nrOfDmrsSymbols;
721 typedef struct schPucchInfo
725 FreqDomainAlloc fdAlloc; /* Freq domain allocation */
726 TimeDomainAlloc tdAlloc; /* Time domain allocation */
734 typedef struct ulSchedInfo
736 uint16_t cellId; /* Cell Id */
737 uint16_t crnti; /* CRNI */
738 SlotIndInfo slotIndInfo; /* Slot Info: sfn, slot number */
739 uint8_t dataType; /* Type of info being scheduled */
740 PrachSchInfo prachSchInfo; /* Prach scheduling info */
741 SchPuschInfo schPuschInfo; /* Pusch scheduling info */
742 SchPucchInfo schPucchInfo; /* Pusch scheduling info */
745 typedef struct rachIndInfo
749 SlotIndInfo timingInfo;
758 typedef struct crcIndInfo
762 SlotIndInfo timingInfo;
764 uint8_t crcInd[MAX_NUMBER_OF_CRC_IND_BITS];
767 typedef struct boInfo
773 typedef struct dlRlcBOInfo
778 BOInfo boInfo[MAX_NUM_LOGICAL_CHANNELS];
781 /* Info of Scheduling Request to Add/Modify */
782 typedef struct schSchedReqInfo
785 SchSrProhibitTimer srProhibitTmr;
786 SchSrTransMax srTransMax;
789 /* Scheduling Request Configuration */
790 typedef struct schSchedReqCfg
792 uint8_t addModListCount;
793 SchSchedReqInfo addModList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* List of Scheduling req to be added/modified */
794 uint8_t relListCount;
795 uint8_t relList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* list of scheduling request Id to be deleted */
798 /* Info of Tag to Add/Modify */
799 typedef struct schTagInfo
802 SchTimeAlignmentTimer timeAlignmentTmr;
805 /* Timing Advance Group Configuration */
806 typedef struct schTagCfg
808 uint8_t addModListCount;
809 SchTagInfo addModList[MAX_NUM_TAGS]; /* List of Tag to Add/Modify */
810 uint8_t relListCount;
811 uint8_t relList[MAX_NUM_TAGS]; /* list of Tag Id to release */
814 /* Configuration for Power headroom reporting */
815 typedef struct schPhrCfg
817 SchPhrPeriodicTimer periodicTmr;
818 SchPhrProhibitTimer prohibitTmr;
819 SchPhrTxPwrFactorChange txpowerFactorChange;
823 SchPhrModeOtherCG modeOtherCG;
826 /* MAC cell Group configuration */
827 typedef struct schMacCellGrpCfg
829 SchSchedReqCfg schedReqCfg;
831 SchPhrCfg phrCfg; /* To be used only if phrCfgSetupPres is true */
834 /* Physical Cell Group Configuration */
835 typedef struct schPhyCellGrpCfg
837 SchPdschHarqAckCodebook pdschHarqAckCodebook;
841 /* Control resource set info */
842 typedef struct schControlRsrcSet
844 uint8_t cRSetId; /* Control resource set id */
845 uint8_t freqDomainRsrc[FREQ_DOM_RSRC_SIZE]; /* Frequency domain resource */
847 SchREGMappingType cceRegMappingType;
848 SchPrecoderGranul precoderGranularity;
849 uint16_t dmrsScramblingId;
852 /* Search Space info */
853 typedef struct schSearchSpace
855 uint8_t searchSpaceId;
857 SchMSlotPeriodAndOffset mSlotPeriodicityAndOffset;
858 uint8_t mSymbolsWithinSlot[MONITORING_SYMB_WITHIN_SLOT_SIZE];
859 SchAggrLevel numCandidatesAggLevel1; /* Number of candidates for aggregation level 1 */
860 SchAggrLevel numCandidatesAggLevel2; /* Number of candidates for aggregation level 2 */
861 SchAggrLevel numCandidatesAggLevel4; /* Number of candidates for aggregation level 4 */
862 SchAggrLevel numCandidatesAggLevel8; /* Number of candidates for aggregation level 8 */
863 SchAggrLevel numCandidatesAggLevel16; /* Number of candidates for aggregation level 16 */
864 SchSearchSpaceType searchSpaceType;
865 uint8_t ueSpecificDciFormat;
868 /* PDCCH cofniguration */
869 typedef struct schPdcchConfig
871 uint8_t numCRsetToAddMod;
872 SchControlRsrcSet cRSetToAddModList[MAX_NUM_CRSET]; /* List of control resource set to add/modify */
873 uint8_t numCRsetToRel;
874 uint8_t cRSetToRelList[MAX_NUM_CRSET]; /* List of control resource set to release */
875 uint8_t numSearchSpcToAddMod;
876 SchSearchSpace searchSpcToAddModList[MAX_NUM_SEARCH_SPC]; /* List of search space to add/modify */
877 uint8_t numSearchSpcToRel;
878 uint8_t searchSpcToRelList[MAX_NUM_SEARCH_SPC]; /* List of search space to release */
881 /* PDSCH time domain resource allocation */
882 typedef struct schPdschTimeDomRsrcAlloc
884 SchTimeDomRsrcAllocMappingType mappingType;
886 uint8_t symbolLength;
887 }SchPdschTimeDomRsrcAlloc;
889 /* DMRS downlink configuration */
890 typedef struct schDmrsDlCfg
892 SchDmrsAdditionPosition addPos; /* DMRS additional position */
895 /* PDSCH Configuration */
896 typedef struct schPdschConfig
898 SchDmrsDlCfg dmrsDlCfgForPdschMapTypeA;
899 SchResourceAllocType resourceAllocType;
900 uint8_t numTimeDomRsrcAlloc;
901 SchPdschTimeDomRsrcAlloc timeDomRsrcAllociList[MAX_NUM_DL_ALLOC]; /* PDSCH time domain DL resource allocation list */
903 SchCodeWordsSchedByDci numCodeWordsSchByDci; /* Number of code words scheduled by DCI */
904 SchBundlingType bundlingType;
907 /* Initial Downlink BWP */
908 typedef struct schInitalDlBwp
911 SchPdcchConfig pdcchCfg;
913 SchPdschConfig pdschCfg;
916 /* BWP Downlink common */
917 typedef struct schBwpDlCommon
921 /* Downlink BWP information */
922 typedef struct schDlBwpInfo
927 /* PDCCH Serving Cell configuration */
928 typedef struct schPdschServCellCfg
930 uint8_t *maxMimoLayers;
931 SchNumHarqProcForPdsch numHarqProcForPdsch;
932 SchMaxCodeBlkGrpPerTB *maxCodeBlkGrpPerTb;
933 bool *codeBlkGrpFlushInd;
934 SchPdschXOverhead *xOverhead;
935 }SchPdschServCellCfg;
937 /* PUCCH Configuration */
938 typedef struct schPucchCfg
940 /* TODO : Not used currently */
943 /* Transform precoding disabled */
944 typedef struct schTransPrecodDisabled
946 uint16_t scramblingId0;
947 }SchTransPrecodDisabled;
949 /* DMRS Uplink configuration */
950 typedef struct SchDmrsUlCfg
952 SchDmrsAdditionPosition addPos; /* DMRS additional position */
953 SchTransPrecodDisabled transPrecodDisabled; /* Transform precoding disabled */
956 /* PUSCH Time Domain Resource Allocation */
957 typedef struct schPuschTimeDomRsrcAlloc
960 SchTimeDomRsrcAllocMappingType mappingType;
962 uint8_t symbolLength;
963 }SchPuschTimeDomRsrcAlloc;
965 /* PUSCH Configuration */
966 typedef struct schPuschCfg
968 SchDmrsUlCfg dmrsUlCfgForPuschMapTypeA;
969 SchResourceAllocType resourceAllocType;
970 uint8_t numTimeDomRsrcAlloc;
971 SchPuschTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_UL_ALLOC]; /* PUSCH time domain UL resource allocation list */
972 SchTransformPrecoder transformPrecoder;
975 /* Initial Uplink BWP */
976 typedef struct schInitialUlBwp
979 SchPucchCfg pucchCfg;
981 SchPuschCfg puschCfg;
984 /* Uplink BWP information */
985 typedef struct schUlBwpInfo
990 /* Serving cell configuration */
991 typedef struct schServCellCfgInfo
993 SchInitalDlBwp initDlBwp;
994 uint8_t numDlBwpToAdd;
995 SchDlBwpInfo DlBwpToAddList[MAX_NUM_BWP];
996 uint8_t firstActvDlBwpId;
997 uint8_t defaultDlBwpId;
998 uint8_t *bwpInactivityTmr;
999 SchPdschServCellCfg pdschServCellCfg;
1000 SchInitialUlBwp initUlBwp;
1001 uint8_t numUlBwpToAdd;
1002 SchUlBwpInfo UlBwpToAddList[MAX_NUM_BWP];
1003 uint8_t firstActvUlBwpId;
1004 }SchServCellCfgInfo;
1006 typedef struct schNonDynFiveQi
1011 uint16_t maxDataBurstVol;
1014 typedef struct schDynFiveQi
1017 uint16_t packetDelayBudget;
1018 uint8_t packetErrRateScalar;
1019 uint8_t packetErrRateExp;
1021 uint8_t delayCritical;
1023 uint16_t maxDataBurstVol;
1026 typedef struct schNgRanAllocAndRetPri
1028 uint8_t priorityLevel;
1029 uint8_t preEmptionCap;
1030 uint8_t preEmptionVul;
1031 }SchNgRanAllocAndRetPri;
1033 typedef struct schGrbQosFlowInfo
1035 uint32_t maxFlowBitRateDl;
1036 uint32_t maxFlowBitRateUl;
1037 uint32_t guarFlowBitRateDl;
1038 uint32_t guarFlowBitRateUl;
1042 typedef struct schDrbQos
1044 uint8_t fiveQiType; /* Dynamic or non-dynamic */
1047 SchNonDynFiveQi nonDyn5Qi;
1048 SchDynFiveQi dyn5Qi;
1050 SchNgRanAllocAndRetPri ngRanRetPri;
1051 SchGrbQosFlowInfo grbQosFlowInfo;
1052 uint16_t pduSessionId;
1053 uint32_t ulPduSessAggMaxBitRate; /* UL PDU Session Aggregate max bit rate */
1056 typedef struct schSnssai
1059 uint8_t sd[SD_SIZE];
1062 /* Special cell configuration */
1063 typedef struct schSpCellCfg
1065 uint8_t servCellIdx;
1066 SchServCellCfgInfo servCellCfg;
1069 /* Uplink logical channel configuration */
1070 typedef struct SchUlLcCfg
1075 uint8_t pbr; // prioritisedBitRate
1076 uint8_t bsd; // bucketSizeDuration
1079 /* Downlink logical channel configuration */
1080 typedef struct schDlLcCfg
1082 uint8_t lcp; // logical Channel Prioritization
1085 /* Logical Channel configuration */
1086 typedef struct schLcCfg
1089 SchDrbQosInfo *drbQos;
1092 SchUlLcCfg *ulLcCfg;
1095 /* Aggregate max bit rate */
1096 typedef struct aggrMaxBitRate
1102 /* UE configuration */
1103 typedef struct schUeCfg
1107 SchMacCellGrpCfg macCellGrpCfg;
1108 SchPhyCellGrpCfg phyCellGrpCfg;
1109 SchSpCellCfg spCellCfg;
1110 SchAggrMaxBitRate *aggrMaxBitRate;
1112 SchLcCfg lcCfgList[MAX_NUM_LOGICAL_CHANNELS];
1115 typedef struct schUeCfgRsp
1121 SchFailureCause cause;
1124 /* function pointers */
1126 typedef uint8_t (*SchCellCfgCfmFunc) ARGS((
1127 Pst *pst, /* Post Structure */
1128 SchCellCfgCfm *schCellCfgCfm /* Cell Cfg Cfm */
1131 typedef uint8_t (*SchCellCfgFunc) ARGS((
1132 Pst *pst, /* Post Structure */
1133 SchCellCfg *schCellCfg /* Cell Cfg */
1136 typedef uint8_t (*SchMacDlAllocFunc) ARGS((
1137 Pst *pst, /* Post Structure */
1138 DlSchedInfo *dlSchedInfo /* dl allocation Info */
1141 typedef uint8_t (*SchMacUlSchInfoFunc) ARGS((
1142 Pst *pst, /* Post Structure */
1143 UlSchedInfo *ulSchedInfo /* UL Alloc Sch Info */
1146 typedef uint8_t (*MacSchRachIndFunc) ARGS((
1147 Pst *pst, /* Post structure */
1148 RachIndInfo *rachInd)); /* Rach Indication Info */
1150 typedef uint8_t (*MacSchCrcIndFunc) ARGS((
1151 Pst *pst, /* Post structure */
1152 CrcIndInfo *crcInd)); /* CRC Info */
1154 typedef uint8_t (*MacSchDlRlcBoInfoFunc) ARGS((
1155 Pst *pst, /* Post structure */
1156 DlRlcBOInfo *dlBoInfo)); /* DL BO Info */
1158 typedef uint8_t (*MacSchUeCreateReqFunc) ARGS((
1159 Pst *pst, /* Post structure */
1160 SchUeCfg *ueCfgToSch)); /* Scheduler UE Cfg */
1162 typedef uint8_t (*SchUeCfgRspFunc) ARGS((
1163 Pst *pst, /* Post structure */
1164 SchUeCfgRsp *cfgRsp)); /* Scheduler UE Cfg response */
1166 typedef uint8_t (*MacSchSlotIndFunc) ARGS((
1167 Pst *pst, /* Post structure */
1168 SlotIndInfo *slotInd)); /* Slot Info */
1170 /* function declarations */
1171 uint8_t packMacSchSlotInd(Pst *pst, SlotIndInfo *slotInd);
1172 uint8_t packSchMacDlAlloc(Pst *pst, DlSchedInfo *dlSchedInfo);
1173 uint8_t packSchMacUlSchInfo(Pst *pst, UlSchedInfo *ulSchedInfo);
1174 uint8_t packSchCellCfg(Pst *pst, SchCellCfg *schCellCfg);
1175 uint8_t packSchCellCfgCfm(Pst *pst, SchCellCfgCfm *schCellCfgCfm);
1176 uint8_t MacProcDlAlloc(Pst *pst, DlSchedInfo *dlSchedInfo);
1177 uint8_t MacProcSchCellCfg(Pst *pst, SchCellCfg *schCellCfg);
1178 uint8_t MacProcSchCellCfgCfm(Pst *pst, SchCellCfgCfm *schCellCfgCfm);
1179 uint8_t SchHdlCellCfgReq(Pst *pst, SchCellCfg *schCellCfg);
1180 uint8_t schActvInit(Ent entity, Inst instId, Region region, Reason reason);
1181 uint8_t SchSendCfgCfm(Pst *pst, RgMngmt *cfm);
1182 uint8_t MacProcUlSchInfo(Pst *pst, UlSchedInfo *ulSchedInfo);
1183 uint8_t packMacSchRachInd(Pst *pst, RachIndInfo *rachInd);
1184 uint8_t macSchRachInd(Pst *pst, RachIndInfo *rachInd);
1185 uint8_t packMacSchCrcInd(Pst *pst, CrcIndInfo *crcInd);
1186 uint8_t macSchCrcInd(Pst *pst, CrcIndInfo *crcInd);
1187 uint8_t packMacSchDlRlcBoInfo(Pst *pst, DlRlcBOInfo *dlBoInfo);
1188 uint8_t macSchDlRlcBoInfo(Pst *pst, DlRlcBOInfo *dlBoInfo);
1189 uint8_t packMacSchUeCreateReq(Pst *pst, SchUeCfg *ueCfgToSch);
1190 uint8_t macSchUeCreateReq(Pst *pst, SchUeCfg *ueCfgToSch);
1191 uint8_t packSchUeCfgRsp(Pst *pst, SchUeCfgRsp *cfgRsp);
1192 uint8_t MacProcSchUeCfgRsp(Pst *pst, SchUeCfgRsp *cfgRsp);
1193 uint8_t macSchSlotInd ARGS((Pst * pst, SlotIndInfo * slotInd));
1194 uint8_t packMacSchSlotInd(Pst * pst, SlotIndInfo * slotInd);
1195 uint8_t unpackMacSchSlotInd(MacSchSlotIndFunc func, Pst *pst, Buffer *mBuf);
1197 /**********************************************************************
1199 **********************************************************************/