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 A. Compilation:
14 ---------------
15
16 1. Build O-DU High:
17
18    a. Build folder
19
20       - cd <rsys_directory>/l2/build/odu
21
22    b. Build O-DU High binary
23    
24       - make odu MACHINE=BIT64 MODE=FDD
25
26    c. Clean O-DU High binary
27
28       - make clean_odu MACHINE=BIT64 MODE=FDD
29
30 2. Build CU Stub :
31
32    a. Build folder
33    
34       - cd <rsys_directory>/l2/build/odu
35
36    b. Build CU Stub binary
37    
38       - make cu_stub NODE=TEST_STUB MACHINE=BIT64 MODE=FDD
39
40    c. Clean CU Stub binary
41    
42       - make clean_cu NODE=TEST_STUB MACHINE=BIT64 MODE=FDD
43
44 3. Build RIC Stub :
45
46    a. Build folder
47    
48       - cd <rsys_directory>/l2/build/odu
49
50    b. Build RIC Stub binary
51    
52       - make ric_stub NODE=TEST_STUB MACHINE=BIT64 MODE=FDD
53
54    c. Clean RIC Stub binary
55    
56       - make clean_ric NODE=TEST_STUB MACHINE=BIT64 MODE=FDD
57
58 4. Clean ODU, CU Stub and RIC Stub together
59
60    a. make clean_all
61
62
63 B. Execution:
64 -------------
65
66 1. Assign virtual IP addresses as follows:
67
68    a. ifconfig <interface name>:ODU "192.168.130.81"
69    b. ifconfig <interface name>:CU_STUB "192.168.130.82"
70    c. ifconfig <interface name>:RIC_STUB "192.168.130.80"
71
72 2. Execute CU Stub:
73
74    a. CU execution folder
75
76       - cd <rsys_directory>/l2/bin/cu_stub
77
78    b. Run CU Stub binary
79
80       - ./cu_stub
81
82 3. Execute RIC Stub:
83
84    a. RIC execution folder
85
86       - cd <rsys_directory>/l2/bin/ric_stub
87
88    b. Run RIC Stub binary
89
90       - ./ric_stub
91
92 4. Execute DU:
93
94    a. DU execution folder
95
96       - cd <rsys_directory>/l2/bin/odu
97
98    b. Run ODU binary
99
100       - ./odu
101
102 PS: CU stub and RIC stub must be run (in no particular sequence) before ODU
103
104
105 C. Testing with Intel O-DU Low:
106 -------------------------------
107
108 I. Compilation
109 ^^^^^^^^^^^^^^
110
111    1. Build ODU :
112
113       a. Create folder <rsys_directory>/l2/src/wls_lib. Copy wls_lib.h from <intel_directory>/phy/wls_lib/ to 
114          <rsys_directory>/l2/src/wls_lib.
115
116       b. Create folder <rsys_directory>/l2/src/dpdk_lib. Copy following files from
117          <intel_directory>/dpdk-19.11/x86_64-native-linuxapp-gcc/include/ to <rsys_directory>/l2/src/dpdk_lib.
118          
119          - rte_branch_prediction.h
120          - rte_common.h
121          - rte_config.h
122          - rte_dev.h
123          - rte_log.h
124          - rte_pci_dev_feature_defs.h
125          - rte_bus.h
126          - rte_compat.h
127          - rte_debug.h
128          - rte_eal.h
129          - rte_os.h
130          - rte_per_lcore.h
131
132       c. Build folder
133
134          - cd <rsys_directory>/l2/build/odu
135
136       d. Build ODU Binary:
137            
138          - make odu PHY=INTEL_L1 PHY_MODE=TIMER MACHINE=BIT64 MODE=FDD
139
140    2. Build CU Stub and RIC Stub:
141
142       a. Execute steps in sections A.2 and A.3. 
143
144 II. Execution
145 ^^^^^^^^^^^^^
146
147    1. Execute O-DU Low:
148
149       a. Setup environment:
150       
151          - cd <intel_directory>/phy/
152          - source ./setupenv.sh
153
154       b. Run O-DU Low binary :
155       
156          - cd <intel_directory>/FlexRAN/l1/bin/nr5g/gnb/l1
157          - To run in timer mode : ./l1.sh -e
158          - L1 is up when following prints are seen on console:
159
160                 | Non BBU threads in application
161                 | \==================================================================
162                 | nr5g_gnb_phy2mac_api_proc_stats_thread: [PID: 8659] binding on [CPU 0] [PRIO: 0] [POLICY: 1]
163                 | wls_rx_handler (non-rt):                [PID: 8663] binding on [CPU 0]
164                 | \==================================================================
165           
166                 PHY>welcome to application console
167
168    2. Execute FAPI Translator:
169
170       a. Setup environment:
171    
172          - cd <intel_directory>/phy/
173          - source ./setupenv.sh
174
175       b. Run FAPI translator binary:
176
177          - cd <intel_directory>/phy/fapi_5g/bin/
178          - ./oran_5g_fapi --cfg=oran_5g_fapi.cfg
179
180    3. Execute CU Stub and RIC Stub:
181
182       a. Run steps in sections B.1-B.3.
183
184    4. Execute DU:
185    
186       a. DU execution folder
187      
188          - cd <rsys_directory>/l2/bin/odu
189       
190       b. Export WLS library path
191
192          - export LD_LIBRARY_PATH=<intel_directory>/phy/wls_lib/lib:$LD_LIBRARY_PATH
193       
194       c. Run ODU binary
195
196          - ./odu
197
198
199 D. Message Flow:
200 ----------------
201
202 O-DU High opens WLS interface during bring up. Message exchanges can begin once the interface is ready.
203 Following diagram shows P5 messages exchange with O-DU Low in timer mode.
204
205 .. figure:: L1-L2_Message_Flow.jpg
206   :width: 600
207   :alt: Figure 1 O-DU High - O-DU Low Message Flow Diagram
208
209   Figure 1 - O-DU High - O-DU Low Message Flow Diagram
210
211 Note: UL IQ-Sample request and response are needed by Intel O-DU Low in timer mode(testing mode) only. Code changes for
212 these are guarded under INTEL_TIMER_MODE flag which can be enabled using compilation option "PHY_MODE=TIMER", as mention
213 in section C.I.1.d .