Initial commit
[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 TF
624 #define TF
625 #endif
626
627 #ifndef YS
628 #define YS
629 #endif
630
631
632 /* Other entity definitions */
633 #ifndef RG
634 #define RG
635 #endif
636
637 /* Selection of interface coupling flags */
638 #define LCTFUITFU
639 #define LCTFUICTF
640 #define LCYSUICTF
641 #define LCYSUITFU
642 #define LCYSMILYS
643
644 #if defined(MODE) && (MODE == TDD)
645 #define TFU_TDD
646 #else
647 #undef TFU_TDD
648 #endif
649
650 /* The handling of enabling LC based on coupling enabled  */
651 /* between CL and other layers.                           */
652 /* ****** THIS SECTION REQUIRES NO FURTHER CHANGES. ********** */
653 #ifdef LCTFUITFU
654 #ifndef LCTFU
655 #define LCTFU
656 #endif
657 #endif
658
659 #ifdef LCTFUICTF
660 #ifndef LCCTF
661 #define LCCTF
662 #endif
663 #endif
664
665 #ifdef LCYSUICTF
666 #ifndef LCCTF
667 #define LCCTF
668 #endif
669 #endif
670
671 #ifdef LCYSMILYS
672 #ifndef LCLYS
673 #define LCLYS
674 #endif
675 #endif
676
677 #define TFU_WRR_2
678 #endif  /* YS/TF */
679
680 /****************************************************************************
681                      LTE-MAC Section
682 ****************************************************************************/
683 #ifdef RG 
684 #undef RG 
685 #define RG 1
686
687 /* Product options */
688 #define RG_PHASE2_SCHED 1
689 #undef RG_DEBUG
690 #undef TTI_PROC
691 #undef PROC_DL
692 #undef SCH_TTI_PROC
693 #undef TOM
694 #undef PAL_MAC_PROC
695 #undef UL_PROC_MAC
696 #define LTEMAC_RGU_PAD 1
697 #define LTEMAC_MIMO 1
698 #define LTEMAC_DRX 0
699 #define UL_LA 1
700 #undef DL_LA 
701 #define LTEMAC_SPS 0
702 #define LTEMAC_DLUE_TMGOPTMZ
703 #define RG_DL_DELTA_CHANGE 
704 #define RG_CMNCH_SCHDELTA_CHANGE 
705 #undef RG_ULSCHED_AT_CRC 
706 #define TFU_RECPREQ_DELTA_CHANGE 
707 #define TFU_DL_DELTA_CHANGE 
708 #define TFU_UL_DELTA_CHANGE 
709 #define TFU_DLHQFBK_DELTA_CHANGE 
710 #define SCH_STATS
711
712 /* Define all the layers that are colocated with the MAC layer  */
713 /* RRC is located on a different binary on a different CPU. RRC */
714 /* should not be included here. SM should also not be defined   */
715 /* as it is also located on a different CPU.                    */
716 #ifndef UR
717 #define UR
718 #endif
719
720 #ifndef KW
721 #define KW
722 #endif
723
724
725 /* This section selects the coupling for each interface related to  */
726 /* MAC. The section below enabling the coupling code appropriately. */
727 /* CCPU_OPT flag enables additional information between MAC and RLC */
728 /* that aids in better selection of transport block size.           */
729 /* TODO - We should delete LWLC for RGM interface.                  */
730 #define LCRGUICRG
731 #define LCRGUIRGU
732 #define LWLCRGUIRGU
733 #define LCRGMILRG
734 #define LCRGUIRGR
735 #define LCRGLITFU
736 #define LCRGUIRGM
737 #define LWLCRGUIRGM
738
739 /* Managing the loose coupling definitions on the interface based   */
740 /* how the interface is coupled from MAC layer.                     */
741 /* ****** THIS SECTION REQUIRES NO FURTHER CHANGES. ********** */
742 #ifdef LCRGUICRG
743 #ifndef LCCRG
744 #define LCCRG
745 #endif
746 #endif
747
748 #ifdef LCRGUIRGU
749 #ifndef LCRGU
750 #define LCRGU
751 #endif
752 #endif
753
754 #ifdef LCRGMILRG
755 #ifndef LCLRG
756 #define LCLRG
757 #endif
758 #endif
759
760 #ifdef LCRGUIRGR
761 #ifndef LCRGR
762 #define LCRGR
763 #endif
764 #endif
765
766 #ifdef LCRGLITFU
767 #ifndef LCTFU
768 #define LCTFU
769 #endif
770 #endif
771
772 #ifdef LCRGUIRGM
773 #ifndef RGM_LC
774 #define RGM_LC
775 #endif
776 #endif
777
778 #ifdef LWLCRGUIRGM
779 #ifndef RGM_LWLC
780 #define RGM_LWLC
781 #endif
782 #endif
783 /******************* section to be changed by CUSTOMERS ******************/
784
785 #define RG_SC1 1
786 /* 
787  * Introduced timing deltas in FDD for DL control, DL data, 
788  * Reception Request, CRC Indication, HARQ feedback Indication.
789  */
790 #ifdef LTEMAC_DLUE_TMGOPTMZ
791 /* Delta used between MAC and RLC to recieve data from RLC*/
792 #define RGU_DELTA 0
793 #else
794 #define RGU_DELTA 1
795 #endif
796
797 #if defined(DLHQ_RTT_OPT) && defined(LOWLATENCY)
798 #define TFU_DELTA 2
799 #else
800 #define TFU_DELTA 2
801 #endif
802 #define TFU_RECPREQ_DLDELTA   2
803
804 #ifdef LTE_TDD
805 #define RG_ENV_DL_DELTA (TFU_DELTA + RGU_DELTA)
806
807 #define TFU_DLDATA_DLDELTA  (TFU_DELTA)
808 #define TFU_CRCIND_ULDELTA   2
809 #define TFU_ULCNTRL_DELTA  (4 - TFU_CRCIND_ULDELTA)
810
811 #ifdef MSPD
812 /* Number of subframes in advance UL control (DCI-0/PHICH) should be sent from SCH */
813 #define TFU_ULCNTRL_DLDELTA        2
814 #else
815 #define TFU_ULCNTRL_DLDELTA        1
816 #endif
817
818 #ifdef DLHQ_RTT_OPT
819 /* Number of subframes later DL HARQ feedback reaches MAC from PHY */
820 #define TFU_ENV_HQFBKIND_ULDELTA  2
821 #else
822 #define TFU_ENV_HQFBKIND_ULDELTA  3
823 #endif
824
825 /* Number of subframes in  Advance the Downlink control is 
826    given from  MAC to PHY */
827 #define TFU_DLCNTRL_DLDELTA TFU_DELTA
828
829 #else /* LTE_TDD */
830 /* Number of subframes in advance UL control (DCI/PHICH) should be sent from SCH */
831 #define TFU_ULCNTRL_DLDELTA  (RG_SCH_CMN_HARQ_INTERVAL - TFU_CRCIND_ULDELTA)
832
833 #ifdef LTEPHY_MSPD
834
835 /* Number of subframes for UL CRC to reach SCH after reception of data at PHY */
836 #define TFU_CRCIND_ULDELTA    2
837
838 #else /* LTEPHY_MSPD */
839
840 /* Number of subframes in advance DL control should be sent from SCH */
841 #define TFU_DLCNTRL_DLDELTA   2
842 /* Number of subframes in advance DL data should be sent from MAC */
843 #define TFU_DLDATA_DLDELTA    2
844
845 /* Number of subframes for UL CRC to reach SCH after reception of data at PHY */
846 #define TFU_CRCIND_ULDELTA    2
847 /* Number of subframes later DL HARQ feedback reaches SCH from PHY */
848 #define TFU_ENV_HQFBKIND_ULDELTA  2
849
850 #endif /* LTEPHY_MSPD */
851 /* The number of frames ahead that RLC may require a STA IND */
852 /* Seperated DL control and DL data timing deltas in FDD     */
853 #if (TFU_DLDATA_DLDELTA > TFU_DLCNTRL_DLDELTA)
854 #define RG_ENV_DL_DELTA (TFU_DLDATA_DLDELTA + RGU_DELTA)
855 #else
856 #define RG_ENV_DL_DELTA (TFU_DLCNTRL_DLDELTA + RGU_DELTA)
857 #endif
858
859 #endif /* LTE_TDD */
860
861 /* Delta between Random Access Response and Msg-3*/
862 #define RGSCH_RARSP_MSG3_DELTA    6
863
864 /* PUSCH data reception delta after the PDCCH for uplink(DCI-0) is sent*/
865 #define RGSCH_PDCCH_PUSCH_DELTA   4
866
867 #ifdef LTEMAC_HDFDD
868 #define RG_SCH_HDFDD_DELTA   10
869 #endif
870 #define RG_ENV_SCH_CMN_DL_DELTA                RG_ENV_DL_DELTA  /* This parameter should not be less than RG_ENV_DL_DELTA */
871
872 #define RG_SCH_NO_DELTA 0  /*Consider no delta */
873 /* ccpu00117459 - ADD - Added check if incompatible falgs are enabled*/
874 /* HDFDD and TDD cannot be enabled at the same time. */
875 #if defined(LTEMAC_HDFDD) && (defined(LTE_TDD) || defined(TFU_TDD))
876 #error "Enabling LTEMAC_HDFDD along with LTE_TDD or TFU_TDD is not a valid combination."
877 #endif
878
879 /* LTE_TDD and TFU_TDD must be enabled for TDD mode */
880 #if (defined(LTE_TDD) && (!defined(TFU_TDD))) || (defined(TFU_TDD) && (!defined(LTE_TDD)))
881 #error "Both LTE_TDD and TFU_TDD must be enabled for TDD mode of operation."
882 #endif
883 #endif /* RG */
884
885 /****************************************************************************
886                      LTE-RLC Section
887 ****************************************************************************/
888 #ifdef KW
889
890 /* Only PDCP and MAC are in the same binary. RRC runs on a different */
891 /* CPU and should not be defined here.                               */
892 #ifndef RG
893 #define RG
894 #endif
895
896 #ifndef PJ
897 #define PJ
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 **********************************************************************/