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