Merge "Developer-guide.rst"
[o-du/l2.git] / docs / user-guide.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
3
4 User Guide
5 ***********
6
7 This is the user guide for Cherry release of O-DU/l2.
8
9 .. contents::
10    :depth: 3
11    :local:
12
13
14 A. Execution:
15 -------------
16
17 I. Execution - On locally compiling O-DU High Source Code
18 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
19
20 1. Assign virtual IP addresses as follows:
21
22    a. ifconfig <interface name>:ODU "192.168.130.81"
23    b. ifconfig <interface name>:CU_STUB "192.168.130.82"
24    c. ifconfig <interface name>:RIC_STUB "192.168.130.80"
25
26 2. Execute CU Stub:
27
28    a. Navigate to CU execution folder
29
30       - cd <O-DU High Directory>/l2/bin/cu_stub
31
32    b. Run CU Stub binary
33
34       - ./cu_stub
35
36 3. Execute RIC Stub:
37
38    a. Navigate to RIC execution folder
39
40       - cd <O-DU High Directory>/l2/bin/ric_stub
41
42    b. Run RIC Stub binary
43
44       - ./ric_stub
45
46 4. Execute O-DU High:
47
48    a. Navigate to ODU execution folder
49
50       - cd <O-DU High Directory>/l2/bin/odu
51
52    b. Run ODU binary
53
54       - ./odu
55
56 PS: CU stub and RIC stub must be run (in no particular sequence) before ODU
57
58 II. Execution - Using Docker Images
59 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
60
61 The call flow between O-DU High and CU Stub can be achieved by executing docker containers.
62
63 - Pull the last built docker images:
64     -   docker pull nexus3.o-ran-sc.org:10004/o-ran-sc/o-du-l2:3.0.1
65     -   docker pull nexus3.o-ran-sc.org:10004/o-ran-sc/o-du-l2-cu-stub:3.0.1
66
67 - Run CU Stub docker:
68     - docker run -it --privileged --net=host --entrypoint bash
69       nexus3.o-ran-sc.org:10004/o-ran-sc/o-du-l2-cu-stub:3.0.1   
70     - ./cu_stub
71
72 - Run ODU docker:
73     - docker run -it --privileged --net=host --entrypoint bash
74       nexus3.o-ran-sc.org:10004/o-ran-sc/o-du-l2:3.0.1   
75     - ./odu
76
77
78 B. Pairwise testing with Intel O-DU Low:
79 -----------------------------------------
80
81 This section describes the changes required in compilation and execution of O-DU High binaries to successfully integrate
82 with Intel O-DU Low in timer mode.
83
84
85 I. Compilation
86 ^^^^^^^^^^^^^^
87
88    1. Build ODU :
89
90       a. Create folder <O-DU High Directory>/l2/src/wls_lib. Copy wls_lib.h from <O-DU Low Directory>/phy/wls_lib/ to 
91          <O-DU High Directory>/l2/src/wls_lib.
92
93       b. Create folder <O-DU High Directory>/l2/src/dpdk_lib. Copy following files from
94          <O-DU Low Directory>/dpdk-19.11/x86_64-native-linuxapp-gcc/include/ to <O-DU High Directory>/l2/src/dpdk_lib.
95          
96          - rte_branch_prediction.h
97          - rte_common.h
98          - rte_config.h
99          - rte_dev.h
100          - rte_log.h
101          - rte_pci_dev_feature_defs.h
102          - rte_bus.h
103          - rte_compat.h
104          - rte_debug.h
105          - rte_eal.h
106          - rte_os.h
107          - rte_per_lcore.h
108
109       c. Navigate to build folder
110
111          - cd <O-DU High Directory>/l2/build/odu
112
113       d. Build ODU Binary:
114            
115          - make odu PHY=INTEL_L1 PHY_MODE=TIMER MACHINE=BIT64 MODE=FDD
116
117
118 II. Execution
119 ^^^^^^^^^^^^^
120
121    1. Execute O-DU Low:
122
123       a. Setup environment:
124       
125          - cd <O-DU Low Directory>/phy/
126          - source ./setupenv.sh
127
128       b. Run O-DU Low binary :
129       
130          - cd <O-DU Low Directory>/FlexRAN/l1/bin/nr5g/gnb/l1
131          - To run in timer mode : ./l1.sh -e
132          - L1 is up when following prints are seen on console:
133
134                 | Non BBU threads in application
135                 | \==================================================================
136                 | nr5g_gnb_phy2mac_api_proc_stats_thread: [PID: 8659] binding on [CPU 0] [PRIO: 0] [POLICY: 1]
137                 | wls_rx_handler (non-rt):                [PID: 8663] binding on [CPU 0]
138                 | \==================================================================
139           
140                 PHY>welcome to application console
141
142    2. Execute FAPI Translator:
143
144       a. Setup environment:
145    
146          - cd <O-DU Low Directory>/phy/
147          - source ./setupenv.sh
148
149       b. Run FAPI translator binary:
150
151          - cd <O-DU Low Directory>/phy/fapi_5g/bin/
152          - ./oran_5g_fapi --cfg=oran_5g_fapi.cfg
153
154    3. Execute CU Stub and RIC Stub:
155
156       a. Run steps in sections A.I.1 through A.I.3 .
157
158    4. Execute DU:
159    
160       a. DU execution folder
161      
162          - cd <O-DU High Directory>/l2/bin/odu
163       
164       b. Export WLS library path
165
166          - export LD_LIBRARY_PATH=<O-DU Low Directory>/phy/wls_lib/lib:$LD_LIBRARY_PATH
167       
168       c. Run ODU binary
169
170          - ./odu
171
172
173 C. Message Flow:
174 ----------------
175
176 O-DU High opens WLS interface during bring up. Message exchanges can begin once the interface is ready.
177 Following diagram shows P5 messages exchanged with O-DU Low in timer mode.
178
179 .. figure:: O-DU_High_Low_Flow.jpg
180   :width: 600
181   :alt: Figure 1 O-DU High - O-DU Low Message Flow Diagram
182
183   Figure 5 - O-DU High - O-DU Low Message Flow Diagram
184
185 Note: UL IQ-Sample request and response are needed by Intel O-DU Low in timer mode(testing mode) only. Code changes for
186 these are guarded under INTEL_TIMER_MODE flag which can be enabled using compilation option "PHY_MODE=TIMER", as
187 mentioned in section B.I.1.d .