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