Added code for MAC-PHY interface, DU_APP, F1AP, SCTP and CU stub
[o-du/l2.git] / src / cm / envopt.h
1 /*******************************************************************************
2 ################################################################################
3 #   Copyright (c) [2017-2019] [Radisys]                                        #
4 #                                                                              #
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                                    #
8 #                                                                              #
9 #       http://www.apache.org/licenses/LICENSE-2.0                             #
10 #                                                                              #
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 *******************************************************************************/
18
19 /********************************************************************20**
20   
21      Name:     environment options
22   
23      Type:     C include file
24   
25      Desc:     Environment options specifies defines required by the
26                by TRILLIUM software. The defines in this file need to be
27                changed by the customer to reflect the software architecture
28                needed to run under the target system hardware architecture.
29   
30      File:     envopt.h
31   
32 *********************************************************************21*/
33
34 #ifndef __ENVOPTH__
35 #define __ENVOPTH__
36 #define IOT_REPETITION
37
38 \f 
39 /* defines */
40 /**************************************************************************
41    general parameters
42 **************************************************************************/
43 /* error checking, choose none or one */
44
45 #ifdef NOERRCHK
46 #else
47 #define ERRCHK       /* error checking */
48 #endif /* NOERRCHK */
49
50 #undef CM_PASN_DBG
51
52 /**************************************************************************
53    unix - multi-threaded system services
54 **************************************************************************/
55 /* Multi threaded solaris/linux operating system */
56 #ifdef MT       /* unix - multi-threaded */
57 #define MT_SOL  /* Solaris Thread Architecture */
58 #endif
59
60 #ifndef SS_MT
61 #define SS_MT
62 #endif
63 //#define UL_ADPT_DBG
64 //#define MAC_5GTF_UPDATE
65 #define PRE_DEF_UE_CTX
66 //#define ENB_SUPPORT_RLC_UM_MODE
67 #define TMR_BASED_TPT_PRINT_5GTF
68 #define EG_GEN_LOAD_5GTF
69 /*Refer 6.3.2 5G-PDCP SN "V5G_323_v1p0"*/
70 //#define SN_PDCP_5GTF
71 //#define PCAP_IP_DATGEN_LOAD_5GTF
72 #define NO_BSR_SR_5GTF
73 //#define PAL_ENABLE_UL_CA
74 #define DROP_UL_MSG_5GTF
75 #define TFU_5GTF
76 #define RG_5GTF
77 #undef SCH_5GTF_STATS
78 #define DISABLE_RLOG
79 /* Flags that apply for the entire product are defined here */
80 /* The legacy and the system services defintions are here   */
81 #define USE_LINUX
82 #define CMINET_BSDCOMPAT
83 /* #define SS_TICKS_SEC        100 */
84 #define CMFILE_REORG_1
85 #define CMFILE_REORG_2
86 #define CM_INET2
87 #define SSINT2
88 #undef HI_MULTI_THREADED 
89 #define SS_PERF
90 #define SS_WL_REGION        1
91 #define SS_FLOAT
92 #define SS_MT_TMR
93 #define SS_M_PROTO_REGION
94 #define SLES9_PLUS
95 #undef SS_TSKLOG_ENABLE
96 #define SS_MULTICORE_SUPPORT
97 #undef  SS_USE_ICC_MEMORY
98 #define SS_LOCKLESS_MEMORY
99 #define SS_USE_ZBC_MEMORY
100 #define SS_THR_REG_MAP
101 #undef  SS_RBUF
102 #undef  SS_LICENSE_CHECK
103 #undef  SS_ROUTE_MSG_CORE1
104 #undef  SS_DBUF_REFLOCK_DISABLE
105
106 #undef  SSI_MEM_CORR_PREVENTION
107 #undef  MS_MBUF_CORRUPTION
108
109 /* 5GNR product specific definations are starts here */
110 #ifndef RLC_5GNR
111 #define RLC_5GNR
112 #endif
113 /* define AM_RLC_SN_18_BIT means 18 bit SN otherwise 12 bit SN */
114 //#define AM_RLC_SN_18_BIT 
115 //#define NR_PDCP_DRB_SN_18_BIT
116
117 /* LTE product specific definitions are here */
118 #define TUCL_TTI_RCV
119 #define LTE_PAL_ENB
120 #define LTE_ENB_PAL
121 #define TENB_RTLIN_CHANGES
122 #define TENB_SPLIT_ARCH_SUPPORT
123 #define TENB_SPLIT_ARCH
124 #undef TENB_T2K3K_SPECIFIC_CHANGES
125 #undef  MLOG_ENABLED
126 #undef MSPD_DBG_ENABLE
127 #undef  MSPD_MLOG_NEW
128 #define TTI_PROC_FIRST
129 #undef FLAT_BUFFER_OPT
130 #undef  NTL_LIB
131 #undef TENB_UL_FP
132 #undef TENB_AS_SECURITY
133 #undef LTE_L2_MEAS 
134
135 #undef LTEPHY_MSPD
136
137 #undef DAM_PDCP_OPT
138 #define TENB_MAX_UE_SUPPORTED 32
139
140 #if MACHINE==BIT64
141 #define BIT_64 1
142 #define ALIGN_64BIT
143 #endif
144 #define REL_850
145 #define TA_NEW
146 #undef TENB_FP
147 #if defined(MODE) && (MODE==TDD)
148 #define LTE_TDD 1
149 #define TFU_TDD
150 #undef MSPD_TDD_LTE
151 #undef MSPD_TDD
152 #undef MSPD_TDD_DBG
153 #define PHY_3828
154 #define PHY_3829
155 #define SPLIT_RLC_DL_TASK
156 #undef RG_SCH_DYNDLDELTA
157 #else
158 #undef LTE_TDD
159 #undef LA_VER3
160 #undef TFU_TDD
161 #define T2200_FDD_CPU_OVRLD
162 #undef  MSPD_PHY_NEW
163 #define T2200_2GB_DDR_CHANGES
164 #define BEST_EFFORT_2_UE_PER_TTI
165 #define KWSELFPSTDLCLEAN
166 #define BATCH_PROCESSING_DL
167 #define BATCH_PROCESSING_UL
168 #define TL_ALLOC_ICC_MEM
169 #undef YS_MS_UL_ZBC
170 #endif
171
172 #undef PDCP_RLC_DL_RBUF
173 #undef MAC_RLC_UL_RBUF
174 #undef NTL_LIB_DIS_FOR_UL
175 #undef TFU_ALLOC_EVENT_NO_INIT
176 #if defined(MODE) && (MODE==TDD)
177 #define KWSELFPSTDLCLEAN
178 #else
179 #define YSMS_RLF_DETCT
180 #define LA_VER2
181 #endif
182
183
184 #if defined(CA_ENABLE) && (CA_ENABLE==YES)
185 #define CA_PAL_5GTF
186 #define TENB_MULT_CELL_SUPPRT
187 #define LTE_ADV
188 #define CA_PHY  1
189 #define LTE_ADV_UECAP
190 #undef CA_DBG
191 #define NTL_LIB_DIS_FOR_UL
192 #ifndef SPLIT_RLC_DL_TASK
193 #ifndef CA_PAL_5GTF 
194 #define SPLIT_RLC_DL_TASK
195 #endif
196 #endif
197 #endif
198
199 #ifdef SPLIT_RLC_DL_TASK
200 #define MAC_RLC_HARQ_STA_RBUF
201 #define RLC_MAC_STA_RSP_UL_RBUF
202 #endif
203 #define TENB_STATS
204
205
206 /* Interface flags - The interface flags are shared by more than */
207 /* one layer and hence need to be defined in a common place.     */
208
209 /* KWU interface definition */
210 #define CCPU_OPT
211
212 /* SZT interface (App<->S1AP) flags */
213 #define SZTV1
214 #define SZTV2
215 #define SZTV3
216
217 /* CZT interface (App<->X2AP) flags */
218 #define CZTV1
219
220 /* LSZ interface (SM<->S1AP) flags */
221 #define LSZV1
222
223 /* LEG interface (SM<->EGTP) flags */
224 #define LEGV2
225
226 /* CTF interface (App<->CL) flags */
227 #define CTF_VER3
228 #undef CTF_V3
229
230 /* CPJ interface (RRC<->PDCP) flags */
231 #define CPJ_V2
232
233 /* TFU interface flags */
234 #ifdef LTE_TDD
235 #define TFU_TDD
236 #else
237 #undef TFU_TDD
238 #endif
239
240 #define TFU_UPGRADE 1
241 #define TFU_VER_2
242
243 /* RGR interface (APP<->SCH) flags */
244 #define RGR_V1
245 #define RGR_V2
246 #define RGR_CQI_REPT
247 #define RGR_SI_SCH
248 #define RGR_RRM_TICK
249
250 /* RRM related interface flags */
251 #define RM_INTF
252
253 /* LSB interface flags */
254 #define LSB4
255 #define LSB8
256 #define SB_CHECKSUM   /* Define to include trillium supplied function */
257 #define SB_CHECKSUM_CRC 
258
259 /**************************************************************************
260    Layer manager interface version definition
261 **************************************************************************/
262 #define LMINT3       /* interface 3 */
263
264 #ifdef SS       /* Common System Services */
265 /**************************************************************************
266    Common System Services parameters
267 **************************************************************************/
268 /* product specific options */
269 #define SS_RTR_SUPPORT        /* for supporting router tasks */
270
271 #ifdef SS_DRVR_SUPPORT
272 /* for backward compatibility */
273 #define ENB_RELAY
274 /* for forward compatibility */
275 #define RYINT1
276 #endif /* SS_DRVR_SUPPORT */
277
278 /* post format, choose none or one */
279 #define FCSPOSTINT      /* forward compatibility, post format */
280
281 #endif /* SS */
282
283 /**************************************************************************
284    MTSS-Solaris parameters
285 **************************************************************************/
286 #ifdef SS_MT    /* MTSS-Solaris */
287 #ifndef CONAVL
288 #define CONAVL          /* console availability option */
289 #endif
290 #define STDIO_INCLD
291 #endif
292 /******************************************************************/
293 /*                  SCTP Layer                                    */
294 /******************************************************************/
295 #ifdef SB
296
297 /* List of other layers interacting with SCTP and in the same binary */
298 #ifndef SM
299 #define SM
300 #endif
301
302 #ifndef SZ
303 #define SZ
304 #endif
305
306 #ifndef CZ
307 #define CZ
308 #endif
309
310 #ifndef HI
311 #define HI
312 #endif
313
314 /* Coupling with other layers */
315 #define LCSBUISCT 
316 #define LCSBLIHIT
317 #define LCSBMILSB
318
319 /* new TUCL layer */
320 #ifndef HI_REL_1_4
321 #define HI_REL_1_4
322 #endif
323
324 #ifdef IPV6_SUPPORTED
325 #define SB_IPV6_SUPPORTED
326 #endif
327
328 /* Checksum */
329 /* needed dependencies */
330 #ifdef LCSBUISCT
331 #ifndef LCSCT
332 #define LCSCT 1
333 #endif
334 #endif
335
336 #ifdef LCSBMILSB
337 #ifndef LCLSB
338 #define LCLSB 1
339 #endif
340 #endif
341
342 #ifdef LCSBLIHIT
343 #ifndef LCHIT
344 #define LCHIT 1
345 #endif
346 #endif
347
348 /*----- SCTP have dependencies in LSB and SCT ------*/
349 #ifdef LCLSB
350 #ifndef LCSCT
351 #define LCSCT
352 #endif
353 #endif
354
355 /*----- SCTP have dependencies in LSB and SCT ------*/
356 #ifdef LCSCT
357 #ifndef LCLSB
358 #define LCLSB
359 #endif
360 #endif
361
362 #endif /* SB */
363
364 /**************************************************************************
365                       S1AP Section
366 **************************************************************************/
367 #ifdef SZ
368 #undef SZ
369 #define SZ 1
370
371 /* Define the layers that coexist with S1AP.                */
372 #ifndef SB
373 #define SB
374 #endif
375
376 #ifndef UZ
377 #define UZ
378 #endif
379
380 #ifndef SM
381 #define SM
382 #endif
383
384 /* product options */
385 #define SZ_ENB
386 #define CM_PASN_CRIT_HANDL
387 #undef  M_PASN_DBG
388 #undef S1AP_REL851
389 #define SZ_DYNAMIC_PEER
390 #define SZ_USTA
391
392 /* interface options */
393 #define LCSZUISZT     /* loosely coupled, SZ upper layer SZT interface */
394 #define LCSZMILSZ     /* loosely coupled, SZ manegement  LSZ interface */
395 #define LCSZLISCT     /* loosely coupled, SZ lower layer SCT interface */
396
397 /* Based on the selection of coupling above the section below  */
398 /* defines enabling/disabling of loose coupling on the         */
399 /* respective interfaces                                       */
400 /* ****** THIS SECTION REQUIRES NO FURTHER CHANGES. ********** */
401 /* Interface between S1AP and Application */
402 #ifdef LCSZUISZT
403 #ifndef LCSZT
404 #define LCSZT    1
405 #endif
406 #endif
407
408 /* Interface between S1AP and management (SM) */
409 #ifdef LCSZMILSZ
410 #ifndef LCLSZ
411 #define LCLSZ    1
412 #endif
413 #endif
414
415 /* Interface between S1AP and Application */
416 #ifdef LWLCSZUISZT
417 #ifndef LWLCSZT
418 #define LWLCSZT
419 #endif
420 #endif
421
422 /* Interface between SCTP and S1AP */
423 #ifdef LCSZLISCT
424 #ifndef LCSCT
425 #define LCSCT
426 #endif
427 #endif
428
429 #endif          /* SZ */
430
431 /******************************************************************/
432 /* EGTP Layer                                                     */
433 /******************************************************************/
434 #ifdef EG
435
436 /* Product flags */
437 #define  EGTP_U    1        /* LTE Evolved GTP User Plane Protocol */
438
439
440 /* All the layers that this layer interacts with and are part of */
441 /* the binary are to be included here.                           */
442 #ifndef EU
443 #define EU
444 #endif
445
446 #ifndef HI
447 #define HI
448 #endif
449
450 #ifndef SM
451 #define SM
452 #endif
453
454 #ifdef IPV6_SUPPORTED
455 #define EG_IPV6_SUPPORTED
456 #endif
457
458 /* EGTP does not use loose coupling towards higher layers and does */
459 /* not talk to TUCL on HIT in the latest TeNB. However if it were  */
460 /* to use TUCL, it would be loosely coupled as TUCL is multi-      */
461 /* threaded.                                                       */
462 /* TODO - LCEGUIEGT should not be needed.                          */
463 #define LCSMEGMILEG
464 #define LCEGLIHIT
465 #define LCEGUIEGT
466 #define LCEGMILEG
467
468 /* Managing the loose coupling definitions on the interface based   */
469 /* how the interface is coupled from E-GTP layer.                   */
470 /* ****** THIS SECTION REQUIRES NO FURTHER CHANGES. ********** */
471 #if defined(LCEGMILEG)
472 #ifndef LCLEG
473 #define LCLEG 1
474 #endif
475 #endif
476
477 #if defined(LCEGLIHIT)
478 #ifndef LCHIT
479 #define LCHIT 1
480 #endif
481 #endif
482
483 #ifdef LCEGUIEGT
484 #ifndef LCEGT
485 #define LCEGT
486 #endif
487 #endif
488 #endif /* EG */
489
490 /*************************************************************************/
491 /*                     LTE-RRC Section                                   */
492 /*************************************************************************/
493 #ifdef NH
494 #undef NH
495 #define NH 1
496
497 /* Define other layers that are part of the same binary */
498 /* Along with RRC, we have application(NX,WR) and stack */
499 /* manager (SM).                                        */
500 #ifndef SM
501 #define SM
502 #endif
503
504 /* TODO - We need either WR or NX and not necessarily   */
505 /* both of them. See if we can remove one of it.        */
506 #ifndef NX
507 #define NX
508 #endif
509
510 #ifndef WR
511 #define WR
512 #endif
513
514
515 /* RRC layer functionality flags */
516 #define DISABLE_RRCSEC
517
518 /* Interface coupling related flags */
519 /* TODO - LCNHUINHU should not be needed.              */
520 /* TODO - LCWRLINHU should not be needed.              */
521 #define LWLCNHUINHU
522 #define LCNHUINHU 
523 #define LCNHLICPJ
524 #define LCNHLIPJU
525 #define LCNHLICKW
526 #define LCNHLIKWU
527 #define LCNHLICTF
528 #define LCNHMILNH
529 #define LCWRLINHU 
530
531 /* CRG interface between MAC and RRC should be loosely coupled  */
532 #define LCNHLICRG
533
534 /* Loose coupled NHU */
535 #ifdef LCNHUINHU
536 #ifndef LCNHU
537 #define LCNHU 1
538 #endif
539 #endif
540
541 /* Light weight loose coupled NHU */
542 #ifdef LWLCNHUINHU
543 #ifndef LWLCNHU
544 #define LWLCNHU 1
545 #endif
546 #endif
547
548 /* Loosely coupled CPJ */
549 #ifdef LCNHLICPJ
550 #ifndef LCCPJ
551 #define LCCPJ 1
552 #endif
553 #endif
554
555 /* Loosely coupled PJU */
556 #ifdef LCNHLIPJU
557 #ifndef LCPJU
558 #define LCPJU 1
559 #endif
560 #endif
561
562 /* Loosely coupled CRG */
563 #ifdef LCNHLICRG
564 #ifndef LCCRG
565 #define LCCRG 1   /* loosely coupled CRG interface */
566 #endif
567 #endif
568
569 /* Loosely coupled CTF */
570 #ifdef LCNHLICTF
571 #ifndef LCCTF
572 #define LCCTF 1   /* loosely coupled CTF interface */
573 #endif /* LCCTF */
574 #endif /* LCNHLICTF */
575
576 #ifdef LCNHLICKW
577 #ifndef LCCKW
578 #define LCCKW 1   /* loosely coupled CKW interface */
579 #endif
580 #endif
581 #define LCNHLIKWU
582 #ifdef LCNHLIKWU
583 #ifndef LCKWU
584 #define LCKWU 1   /* loosely coupled KWU interface */
585 #endif
586 #endif
587
588 /* TODO These flags should move to SM definitions */
589 #define LCSMNHMILNH
590
591 /* Define flags related to loosely coupled LNH interface */
592 #ifdef LCNHMILNH
593 #ifndef LCLNH
594 #define LCLNH 1
595 #endif 
596 #endif
597
598 /* Release 9 related flags */
599 #ifdef LTERRC_REL9
600 #define S1AP_REL9A6
601 #ifndef LNH_VER1
602 #define LNH_VER1
603 #endif
604 #ifndef NHU_VER1
605 #define NHU_VER1
606 #endif
607 #endif /* LTERRC_REL9 */
608
609 #ifdef RRC_PHY_CFG_SUPP
610 #define CTF_VER1
611 #endif 
612
613 #define RNC_INTEG_CCPU
614
615 #endif /* NH */
616
617 /****************************************************************************
618                      CL section
619 ****************************************************************************/
620 #if (defined(TF) || defined(YS))
621
622 /* Self entity definitions */
623 #ifndef YS
624 #define YS
625 #endif
626
627
628 /* Other entity definitions */
629 #ifndef RG
630 #define RG
631 #endif
632
633 /* Selection of interface coupling flags */
634 #define LCTFUITFU
635 #define LCTFUICTF
636 #define LCYSUICTF
637 #define LCYSUITFU
638 #define LCYSMILYS
639
640 #if defined(MODE) && (MODE == TDD)
641 #define TFU_TDD
642 #else
643 #undef TFU_TDD
644 #endif
645
646 /* The handling of enabling LC based on coupling enabled  */
647 /* between CL and other layers.                           */
648 /* ****** THIS SECTION REQUIRES NO FURTHER CHANGES. ********** */
649 #ifdef LCTFUITFU
650 #ifndef LCTFU
651 #define LCTFU
652 #endif
653 #endif
654
655 #ifdef LCTFUICTF
656 #ifndef LCCTF
657 #define LCCTF
658 #endif
659 #endif
660
661 #ifdef LCYSUICTF
662 #ifndef LCCTF
663 #define LCCTF
664 #endif
665 #endif
666
667 #ifdef LCYSMILYS
668 #ifndef LCLYS
669 #define LCLYS
670 #endif
671 #endif
672
673 #define TFU_WRR_2
674 #endif  /* YS/TF */
675
676 /****************************************************************************
677                      LTE-MAC Section
678 ****************************************************************************/
679 #ifdef RG 
680 #undef RG 
681 #define RG 1
682
683 /* Product options */
684 #define RG_PHASE2_SCHED 1
685 #undef RG_DEBUG
686 #undef TTI_PROC
687 #undef PROC_DL
688 #undef SCH_TTI_PROC
689 #undef TOM
690 #undef PAL_MAC_PROC
691 #undef UL_PROC_MAC
692 #define LTEMAC_RGU_PAD 1
693 #define LTEMAC_MIMO 1
694 #define LTEMAC_DRX 0
695 #define UL_LA 1
696 #undef DL_LA 
697 #define LTEMAC_SPS 0
698 #define LTEMAC_DLUE_TMGOPTMZ
699 #define RG_DL_DELTA_CHANGE 
700 #define RG_CMNCH_SCHDELTA_CHANGE 
701 #undef RG_ULSCHED_AT_CRC 
702 #define TFU_RECPREQ_DELTA_CHANGE 
703 #define TFU_DL_DELTA_CHANGE 
704 #define TFU_UL_DELTA_CHANGE 
705 #define TFU_DLHQFBK_DELTA_CHANGE 
706 #define SCH_STATS
707
708 /* Define all the layers that are colocated with the MAC layer  */
709 /* RRC is located on a different binary on a different CPU. RRC */
710 /* should not be included here. SM should also not be defined   */
711 /* as it is also located on a different CPU.                    */
712 #ifndef UR
713 #define UR
714 #endif
715
716 #ifndef KW
717 #define KW
718 #endif
719
720
721 /* This section selects the coupling for each interface related to  */
722 /* MAC. The section below enabling the coupling code appropriately. */
723 /* CCPU_OPT flag enables additional information between MAC and RLC */
724 /* that aids in better selection of transport block size.           */
725 /* TODO - We should delete LWLC for RGM interface.                  */
726 #define LCRGUICRG
727 #define LCRGUIRGU
728 #define LWLCRGUIRGU
729 #define LCRGMILRG
730 #define LCRGUIRGR
731 #define LCRGLITFU
732 #define LCRGUIRGM
733 #define LWLCRGUIRGM
734
735 /* Managing the loose coupling definitions on the interface based   */
736 /* how the interface is coupled from MAC layer.                     */
737 /* ****** THIS SECTION REQUIRES NO FURTHER CHANGES. ********** */
738 #ifdef LCRGUICRG
739 #ifndef LCCRG
740 #define LCCRG
741 #endif
742 #endif
743
744 #ifdef LCRGUIRGU
745 #ifndef LCRGU
746 #define LCRGU
747 #endif
748 #endif
749
750 #ifdef LCRGMILRG
751 #ifndef LCLRG
752 #define LCLRG
753 #endif
754 #endif
755
756 #ifdef LCRGUIRGR
757 #ifndef LCRGR
758 #define LCRGR
759 #endif
760 #endif
761
762 #ifdef LCRGLITFU
763 #ifndef LCTFU
764 #define LCTFU
765 #endif
766 #endif
767
768 #ifdef LCRGUIRGM
769 #ifndef RGM_LC
770 #define RGM_LC
771 #endif
772 #endif
773
774 #ifdef LWLCRGUIRGM
775 #ifndef RGM_LWLC
776 #define RGM_LWLC
777 #endif
778 #endif
779 /******************* section to be changed by CUSTOMERS ******************/
780
781 #define RG_SC1 1
782 /* 
783  * Introduced timing deltas in FDD for DL control, DL data, 
784  * Reception Request, CRC Indication, HARQ feedback Indication.
785  */
786 #ifdef LTEMAC_DLUE_TMGOPTMZ
787 /* Delta used between MAC and RLC to recieve data from RLC*/
788 #define RGU_DELTA 0
789 #else
790 #define RGU_DELTA 1
791 #endif
792
793 #if defined(DLHQ_RTT_OPT) && defined(LOWLATENCY)
794 #define TFU_DELTA 2
795 #else
796 #define TFU_DELTA 2
797 #endif
798 #define TFU_RECPREQ_DLDELTA   2
799
800 #ifdef LTE_TDD
801 #define RG_ENV_DL_DELTA (TFU_DELTA + RGU_DELTA)
802
803 #define TFU_DLDATA_DLDELTA  (TFU_DELTA)
804 #define TFU_CRCIND_ULDELTA   2
805 #define TFU_ULCNTRL_DELTA  (4 - TFU_CRCIND_ULDELTA)
806
807 #ifdef MSPD
808 /* Number of subframes in advance UL control (DCI-0/PHICH) should be sent from SCH */
809 #define TFU_ULCNTRL_DLDELTA        2
810 #else
811 #define TFU_ULCNTRL_DLDELTA        1
812 #endif
813
814 #ifdef DLHQ_RTT_OPT
815 /* Number of subframes later DL HARQ feedback reaches MAC from PHY */
816 #define TFU_ENV_HQFBKIND_ULDELTA  2
817 #else
818 #define TFU_ENV_HQFBKIND_ULDELTA  3
819 #endif
820
821 /* Number of subframes in  Advance the Downlink control is 
822    given from  MAC to PHY */
823 #define TFU_DLCNTRL_DLDELTA TFU_DELTA
824
825 #else /* LTE_TDD */
826 /* Number of subframes in advance UL control (DCI/PHICH) should be sent from SCH */
827 #define TFU_ULCNTRL_DLDELTA  (RG_SCH_CMN_HARQ_INTERVAL - TFU_CRCIND_ULDELTA)
828
829 #ifdef LTEPHY_MSPD
830
831 /* Number of subframes for UL CRC to reach SCH after reception of data at PHY */
832 #define TFU_CRCIND_ULDELTA    2
833
834 #else /* LTEPHY_MSPD */
835
836 /* Number of subframes in advance DL control should be sent from SCH */
837 #define TFU_DLCNTRL_DLDELTA   2
838 /* Number of subframes in advance DL data should be sent from MAC */
839 #define TFU_DLDATA_DLDELTA    2
840
841 /* Number of subframes for UL CRC to reach SCH after reception of data at PHY */
842 #define TFU_CRCIND_ULDELTA    2
843 /* Number of subframes later DL HARQ feedback reaches SCH from PHY */
844 #define TFU_ENV_HQFBKIND_ULDELTA  2
845
846 #endif /* LTEPHY_MSPD */
847 /* The number of frames ahead that RLC may require a STA IND */
848 /* Seperated DL control and DL data timing deltas in FDD     */
849 #if (TFU_DLDATA_DLDELTA > TFU_DLCNTRL_DLDELTA)
850 #define RG_ENV_DL_DELTA (TFU_DLDATA_DLDELTA + RGU_DELTA)
851 #else
852 #define RG_ENV_DL_DELTA (TFU_DLCNTRL_DLDELTA + RGU_DELTA)
853 #endif
854
855 #endif /* LTE_TDD */
856
857 /* Delta between Random Access Response and Msg-3*/
858 #define RGSCH_RARSP_MSG3_DELTA    6
859
860 /* PUSCH data reception delta after the PDCCH for uplink(DCI-0) is sent*/
861 #define RGSCH_PDCCH_PUSCH_DELTA   4
862
863 #ifdef LTEMAC_HDFDD
864 #define RG_SCH_HDFDD_DELTA   10
865 #endif
866 #define RG_ENV_SCH_CMN_DL_DELTA                RG_ENV_DL_DELTA  /* This parameter should not be less than RG_ENV_DL_DELTA */
867
868 #define RG_SCH_NO_DELTA 0  /*Consider no delta */
869 /* ccpu00117459 - ADD - Added check if incompatible falgs are enabled*/
870 /* HDFDD and TDD cannot be enabled at the same time. */
871 #if defined(LTEMAC_HDFDD) && (defined(LTE_TDD) || defined(TFU_TDD))
872 #error "Enabling LTEMAC_HDFDD along with LTE_TDD or TFU_TDD is not a valid combination."
873 #endif
874
875 /* LTE_TDD and TFU_TDD must be enabled for TDD mode */
876 #if (defined(LTE_TDD) && (!defined(TFU_TDD))) || (defined(TFU_TDD) && (!defined(LTE_TDD)))
877 #error "Both LTE_TDD and TFU_TDD must be enabled for TDD mode of operation."
878 #endif
879 #endif /* RG */
880
881 /****************************************************************************
882                      LTE-RLC Section
883 ****************************************************************************/
884 #ifdef KW
885
886 /* Only PDCP and MAC are in the same binary. RRC runs on a different */
887 /* CPU and should not be defined here.                               */
888 #ifndef RG
889 #define RG
890 #endif
891
892 /* -------- LKW Interface ------*/
893 /* This is the interface between RLC and the stack manager */
894 /* This should support loosely coupling as they dont run   */
895 /* in the same thread                                      */
896 #define LCKWMILKW
897
898 /* -------- CKW Interface ------*/
899 /* CKW interface is loosely coupled as RRC and RLC reside */
900 /* on two different CPUs running in different threads     */
901 #define LCKWUICKW
902
903 /* -------- KWU Interface ------*/
904 /* KWU interface exists between RRC/PDCP and RLC. Since RRC is */
905 /* is loosely coupled with RLC, loosely coupled interface is   */
906 /* enabled.                                                    */
907 /* CCPU_OPT carries additional information on the interface to */
908 /* assit better scheduling at MAC                              */
909 #define LCKWUIKWU
910
911 /* RGU interface between RLC and MAC should be light weight   */
912 /* loosely coupled for performance.                           */
913 /* TODO - Do we also need loose coupled interface             */
914 #define LWLCKWLIRGU
915 #define LCKWLIRGU
916 #define CCPU_OPT
917
918 /* The management of enabling of loose coupling code based     */
919 /* on the selection of coupling choice between RLC and other   */
920 /* modules is below.                                           */
921
922 /* Other RLC product flags */
923 #undef RLC_STATUS_GEN
924 #undef UL_PROC_MAC
925
926 /* ****** THIS SECTION REQUIRES NO FURTHER CHANGES. ********** */
927 #ifdef LCKWUICKW
928 #ifndef LCCKW
929 #define LCCKW
930 #endif
931 #endif
932
933 #ifdef LCKWMILKW
934 #ifndef LCLKW
935 #define LCLKW
936 #endif
937 #endif
938
939 #ifdef LCKWUIKWU
940 #ifndef LCKWU
941 #define LCKWU
942 #endif
943 #endif
944
945 #endif   /* KW */
946
947 /****************************************************************************
948                      LTE-PDCP Section
949 ****************************************************************************/
950 #ifdef PJ
951
952 #ifndef PX
953 #define PX
954 #endif
955
956 #define LCPJMILPJ
957 #define LCPJUICPJ
958 #define LCPJUIPJU
959
960 /* Other PDCP product flags */
961 #define LTE_HENB
962 #undef CIPH_BATCH_PROC
963
964 /* The handling of enabling LC based on whether PDCP enabled   */
965 /* loose coupling when PDCP is acting as the source.           */
966 /* ****** THIS SECTION REQUIRES NO FURTHER CHANGES. ********** */
967 #ifdef LCPJMILPJ
968 #ifndef LCLPJ
969 #define LCLPJ
970 #endif
971 #endif 
972
973 #ifdef LCPJUICPJ
974 #ifndef LCCPJ
975 #define LCCPJ
976 #endif
977 #endif
978
979 #ifdef LCKWUIKWU
980 #ifndef LCKWU
981 #define LCKWU
982 #endif
983 #endif
984
985 #ifdef LCPJUIPJU
986 #ifndef LCPJU
987 #define LCPJU
988 #endif
989 #endif
990
991 #undef SPACC_NONBLOCKING
992 #undef INTEL_NATIVE_SPACC
993 #undef INTEL_SPACC_IV_OPTIMIZATION
994 #undef  SPACC_THREADED
995 #endif  /* PJ */
996
997 /****************************************************************************
998                      TOTALeNodeB Application section
999 ****************************************************************************/
1000 #ifdef WR
1001
1002 /* Since application is many different layers to the lower layers */
1003 /* it must define multiple entities as self entities.             */
1004 #ifndef EU
1005 #define EU
1006 #endif
1007
1008 #ifndef EG
1009 #define EG
1010 #endif
1011
1012 /* RRC user */
1013 #ifndef NX
1014 #define NX
1015 #endif
1016
1017 /* S1AP user */
1018 #ifndef UZ
1019 #define UZ
1020 #endif
1021
1022 /* X2AP user */
1023 #ifndef RS
1024 #define RS
1025 #endif
1026
1027 /* Include all the layers that are part of the same binary.    */
1028 /* We have stack manager (SM), S1AP (SZ), X2AP (CZ), RRM (RM), */
1029 /* RRC(NH) within the same binary.                             */
1030 #ifndef SM
1031 #define SM
1032 #endif
1033
1034 #ifndef SZ
1035 #define SZ
1036 #endif
1037
1038 #ifndef CZ
1039 #define CZ
1040 #endif
1041
1042 #ifndef NH
1043 #define NH
1044 #endif
1045
1046 #ifndef RM
1047 #define RM
1048 #endif
1049
1050 #ifndef PX
1051 #define PX
1052 #endif
1053
1054 /* Coupling choices between application and other layers */
1055 /* TODO - LWLCWRLIRGR should not be needed.              */
1056 /* TODO - LCEULIEGT should not be needed.                */
1057 /* TODO - LCNXLINHU should not be needed.                */
1058 #define LCWRMILWR
1059 #define LWLCWRMILWR
1060 #define LCWRLIEGT
1061 #define LCPXLIPJU
1062 #define LCWRLICTF
1063 #define LWLCNXLINHU
1064 #define LCUZLISZT
1065 #define LWLCUZLISZT
1066 #define LCWRLIRGR
1067 #define LWLCWRLIRGR
1068 #define LCEULIEGT
1069 #define LCNXLINHU
1070 #define LCRSLICZT
1071 #define LWLCRSLICZT
1072 #define LCSZUISZT
1073
1074 /* Coupling choices between stack manager and the layers */
1075 /* TODO LCSMSBMILSB should be replaced with LCSMMILSB.   */
1076 /* TODO LCSMHIMILHI should be replaced with LCSMMILHI.   */
1077 #define LCSMMILEG
1078 #define LCSMMILCZ
1079 #define LCSMMILSZ
1080 #define LCSMSBMILSB
1081 #define LCSMMILHI
1082 #define LCSMHIMILHI
1083
1084 /* TODO LCKWMILKW should be changed to LCSMMILKW in SMM  */
1085 /*      LCKWMILKW should be used only in RLC product     */
1086 #define LCSMMILRG
1087 #define LCSMMILNH
1088 #define LCSMNHMILNH
1089 #define LCKWMILKW
1090 #define LCSMMILPJ
1091 #define LCSMMILRM
1092 #define LCSMMILYS 
1093 #define LWLCSMMILWR
1094 #define LCSMMILWR
1095 #define LWLCSMMILWR
1096 #define LCSMYSMILYS
1097 #define LCYSMILYS
1098
1099 /* Application functionality related flags */
1100 #define SI_NEW
1101 #define LTE_HO_SUPPORT
1102 #define WR_SIBS_ENBLD
1103 #undef WR_DETECT_RLF
1104 #define WR_DL_CQI
1105 #define WR_RSYS_KPI
1106 #define WR_WATCHDOG
1107 #define WR_IPV6_OAM_WORKAROUND
1108
1109 #undef WR_GRPPWR_CNTRL
1110 /* #undef ENB_OVRLOAD */
1111 /* The handling of enabling LC based on whether TeNB enabled   */
1112 /* loose coupling when PDCP is acting as the source.           */
1113 /* ****** THIS SECTION REQUIRES NO FURTHER CHANGES. ********** */
1114 #ifdef LCWRMILWR
1115 #ifndef LCLWR
1116 #define LCLWR
1117 #endif
1118 #endif
1119
1120 #ifdef LCWRLINHU
1121 #ifndef LCNHU
1122 #define LCNHU
1123 #endif
1124 #endif
1125
1126 #ifdef LCSZUISZT
1127 #ifndef LCSZT
1128 #define LCSZT
1129 #endif
1130 #endif
1131 #ifdef LCNXLINHU
1132 #ifndef LCNHU
1133 #define LCNHU
1134 #endif
1135 #endif
1136
1137 #ifdef LWLCNXLINHU
1138 #ifndef LWLCNHU
1139 #define LWLCNHU
1140 #endif
1141 #endif
1142
1143 #ifdef LCWRLIEGT
1144 #ifndef LCEGT
1145 #define LCEGT
1146 #endif
1147 #endif
1148
1149 #ifdef LCPXLIPJU
1150 #ifndef LCPJU
1151 #define LCPJU
1152 #endif
1153 #endif
1154
1155
1156 #ifdef LCWRLICTF
1157 #ifndef LCCTF
1158 #define LCCTF
1159 #endif
1160 #endif
1161
1162 #ifdef LCWRLIRGR
1163 #ifndef LCRGR
1164 #define LCRGR
1165 #endif
1166 #endif
1167
1168 #ifdef LCRSLICZT
1169 #ifndef LCCZT
1170 #define LCCZT
1171 #endif
1172 #endif
1173
1174 #ifdef LWLCRSLICZT
1175 #ifndef LWLCCZT
1176 #define LWLCCZT
1177 #endif
1178 #endif
1179
1180 /* *************  SM and layer interaction flags **************** */
1181 #ifdef LCSMMILWR
1182 #ifndef LCLWR
1183 #define LCLWR
1184 #endif
1185 #endif
1186
1187 #ifdef LWLCSMMILWR
1188 #ifndef LWLCLWR
1189 #define LWLCLWR
1190 #endif
1191 #endif
1192
1193 #ifdef LCSMMILRG
1194 #ifndef LCLRG
1195 #define LCLRG
1196 #endif
1197 #endif
1198
1199 #ifdef LCSMMILEG
1200 #ifndef LCLEG
1201 #define LCLEG
1202 #endif
1203 #endif
1204
1205 #ifdef LCSMMILNH
1206 #ifndef LCLNH
1207 #define LCLNH
1208 #endif
1209 #endif
1210
1211 #ifdef LWLCSMMILWR
1212 #ifndef LWLCLWR
1213 #define LWLCLWR
1214 #endif
1215 #endif
1216
1217 #ifdef LCSMMILPJ
1218 #ifndef LCLPJ
1219 #define LCLPJ
1220 #endif
1221 #endif
1222
1223 #ifdef LCKWMILKW
1224 #ifndef LCLKW
1225 #define LCLKW
1226 #endif
1227 #endif
1228
1229 #ifdef LCSMYSMILYS
1230 #ifndef LCLYS
1231 #define LCLYS
1232 #endif
1233 #endif
1234
1235 #ifdef LCYSMILYS
1236 #ifndef LCLYS
1237 #define LCLYS
1238 #endif
1239 #endif
1240
1241 /* TODO - This definition does not follow naming conventions and  */
1242 /* also is a duplicate of the above macro. This should be removed */
1243 /* from the code and then from this make file.                    */
1244 #ifdef LCSMNHMILNH
1245 #ifndef LCLNH
1246 #define LCLNH
1247 #endif
1248 #endif
1249
1250 #endif  /* WR */
1251 /* ************** End of TeNB Application section  *************** */
1252
1253 /****************************************************************************
1254                      X2AP section
1255 ****************************************************************************/
1256 #ifdef CZ
1257 #undef CZ
1258 #define CZ 1
1259
1260 /* Define the layers that coexist with X2AP. They are SCTP (SB), */
1261 /* X2AP user (RS/WR), stack manager (SM).                        */
1262 #ifndef SB
1263 #define SB
1264 #endif
1265
1266 #ifndef RS
1267 #define RS
1268 #endif
1269
1270 #ifndef SM
1271 #define SM
1272 #endif
1273
1274 /* product options */
1275 #define CZ_ENB
1276 #define CZ_DYNAMIC_PEER
1277 #define CZ_USTA
1278
1279 /* interface options */
1280 #define LCCZUICZT     /* loosely coupled, CZ upper layer CZT interface */
1281 #define LCCZLISCT     /* loosely coupled, CZ lower layer SCT interface */
1282 #define LCCZMILCZ     /* loosely coupled, CZ manegement  LCZ interface */
1283
1284 /* Based on the selection of coupling above the section below  */
1285 /* defines enabling/disabling of loose coupling on the         */
1286 /* respective interfaces                                       */
1287 /* ****** THIS SECTION REQUIRES NO FURTHER CHANGES. ********** */
1288 /* Interface between S1AP and Application */
1289 #ifdef LCCZUICZT
1290 #ifndef LCCZT
1291 #define LCCZT    1
1292 #endif
1293 #endif
1294
1295 /* Interface between X2AP and management (SM) */
1296 #ifdef LCCZMILCZ
1297 #ifndef LCLCZ
1298 #define LCLCZ    1
1299 #endif
1300 #endif
1301
1302 /* Interface between X2AP and Application */
1303 #ifdef LWLCCZUICZT
1304 #ifndef LWLCCZT
1305 #define LWLCCZT
1306 #endif
1307 #endif
1308
1309 /* Interface between SCTP and X2AP */
1310 #ifdef LCCZLISCT
1311 #ifndef LCSCT
1312 #define LCSCT
1313 #endif
1314 #endif
1315
1316 #endif /* CZ */
1317
1318 /* ******************************************************************* */
1319 /*                          TUCL section                               */
1320 /* ******************************************************************* */
1321 #ifdef HI
1322
1323 /* Define the products that TUCL directly talks to and are part of the */
1324 /* same binary.                                                        */
1325 #ifndef SB
1326 #define SB
1327 #endif
1328
1329 #ifndef EG
1330 #define EG
1331 #endif
1332
1333 #ifndef SM
1334 #define SM
1335 #endif
1336
1337 /* We need to define LCHIUIHIT if there is at least one layer talking */
1338 /* to TUCL in a loosely coupled fashion.                              */
1339 #define LCHIUIHIT
1340 #define LCHIMILHI
1341
1342 /* The section below should not be edited normally.                   */
1343 #ifdef LCHIUIHIT
1344 #ifndef LCHIT
1345 #define LCHIT
1346 #endif
1347 #endif
1348
1349 #ifdef LCHIMILHI
1350 #ifndef LCLHI
1351 #define LCLHI
1352 #endif
1353 #endif
1354 #endif /* HI */
1355
1356 /****************************************************************************
1357                      SON section
1358 ****************************************************************************/
1359 #ifdef NL
1360 #define LWLCSMSONILNL 
1361 #define TCSMSONILNL
1362 #define LCSMSONILNL 
1363
1364
1365 #ifdef LWLCSMSONILNL
1366 #define NLU_LWLC 
1367 #endif 
1368
1369 #ifdef LCSMSONILNL 
1370 #define NLU_LC
1371 #endif
1372
1373 #ifdef TCSMSONILNL
1374 #define NLU_TC 
1375 #endif
1376
1377 #endif
1378 /****************************************************************************
1379                      RRM section
1380 ****************************************************************************/
1381 #ifdef RM
1382
1383 #define LCRMLIRGM
1384 #define LWLCRMLIRGM
1385 #define LWLCRMUIRMU
1386 #define LWLCSMRMMILRM
1387 #define LCSMRMMILRM
1388 #define PTSMMILRM
1389 #define LCRMMILRM
1390
1391 #ifdef LCRMLIRGM
1392 #ifndef RGM_LC
1393 #define RGM_LC
1394 #endif
1395 #endif
1396
1397 #ifdef LWLCRMLIRGM
1398 #ifndef RGM_LWLC
1399 #define RGM_LWLC
1400 #endif
1401 #endif
1402
1403
1404
1405 /* TODO: By conventions we should have this name LCRMU instead of RMU_LC */
1406 #ifdef LCRMUIRMU
1407 #ifndef RMU_LC
1408 #define RMU_LC
1409 #endif
1410 #endif
1411
1412 #ifdef LWLCRMUIRMU
1413 #ifndef RMU_LWLC
1414 #define RMU_LWLC
1415 #endif
1416 #endif
1417
1418 #ifdef LCRMMILRM
1419 #ifndef LCLRM
1420 #define LCLRM
1421 #endif
1422 #endif
1423 #endif
1424
1425 #endif /* __ENVOPTH__ */
1426
1427 \f  
1428 /********************************************************************30**
1429   
1430          End of file
1431 **********************************************************************/