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