SW_archi.md 4.14 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
<style type="text/css" rel="stylesheet">

body {
   font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
   font-size: 13px;
   line-height: 18px;
   color: #fff;
   background-color: #110F14;
}
  h2 { margin-left: 20px; }
  h3 { margin-left: 40px; }
  h4 { margin-left: 60px; }

.func2 { margin-left: 20px; }
.func3 { margin-left: 40px; }
.func4 { margin-left: 60px; }

</style>


Laurent's avatar
Laurent committed
21
This tuto for 5G gNB design, with Open Cells main
22
{: .text-center}
Laurent's avatar
Laurent committed
23 24 25 26 27 28 29 30 31 32 33 34 35 36

# Top file: executables/ocp-gnb.c

the function main() initializes the data from configuration file

# The main thread is in ru_thread()
The infinite loop:
## rx_rf()
  Collect radio signal samples from RF board  
    called for each 5G NR slot  
    it blocks until data is available  
    the internal time comes from the RF board sampling numbers  
    (each sample has a incremental number representing a very accurate timing)  
raw incoming data is in buffer called "rxdata"
37
{: .func2}
Laurent's avatar
Laurent committed
38 39 40 41 42
### nr_fep_full()
"front end processing" of uplink signal  
performs DFT on the signal  
same function (duplicates): phy_procedures_gNB_common_RX()
it computes the buffer rxdataF (for frequency) from rxdata (samples over time)
43
{: .func3}
Laurent's avatar
Laurent committed
44 45
### gNB_top()
only compute frame numbre, slot number, ...
46
{: .func3}
Laurent's avatar
Laurent committed
47 48 49 50 51
### ocp_rxtx()
main processing for both UL and DL  
all the context is in the passed structure UL_INFO  
the context is not very clear: there is a mutex on it,  
but not actual coherency (see below handle_nr_rach() assumes data is up-to-date)  
52 53
The first part (in NR_UL_indication, uses the data computed by the lower part (phy_procedures_gNB_uespec_RX), but for the **previous** slot  
Then, phy_procedures_gNB_uespec_RX will hereafter replace the data for the next run  
Laurent's avatar
Laurent committed
54
This is very tricky and not thread safe at all.
55
{: .func3}
Laurent's avatar
Laurent committed
56 57 58

#### NR_UL_indication()  
This block processes data already decoded and stored in structures behind UL_INFO
59
{: .func4}
Laurent's avatar
Laurent committed
60 61 62 63

* handle_nr_rach()  
process data from RACH primary detection  
if the input is a UE RACH detection
64
{: .func4}
Laurent's avatar
Laurent committed
65
    * nr_schedule_msg2()
66
{: .func4}
Laurent's avatar
Laurent committed
67 68
* handle_nr_uci()  
????	      
69
{: .func4}
Laurent's avatar
Laurent committed
70 71
* handle_nr_ulsch()  
handles ulsch data prepared by nr_fill_indication()
72
{: .func4}
Laurent's avatar
Laurent committed
73 74
* gNB_dlsch_ulsch_scheduler ()  
also calls "run_pdcp()", as this is not a autonomous thread, it needs to be called here to update traffic requests (DL) and to propagate waiting UL to upper layers  
75 76 77 78 79
Calls schedule_nr_mib() that calls mac_rrc_nr_data_req() to fill MIB,  
Calls each channel allocation: schedule SI, schedule_ul, schedule_dl, ...  
this is a major entry for "phy-test" mode: in this mode, the allocation is fixed  
all these channels goes to mac_rrc_nr_data_req() to get the data to transmit
{: .func4}
Laurent's avatar
Laurent committed
80 81
* NR_Schedule_response()  
process as per the scheduler decided
82
{: .func4}
Laurent's avatar
Laurent committed
83 84 85

#### L1_nr_prach_procedures()  
????
86
{: .func4}
Laurent's avatar
Laurent committed
87 88 89
#### phy_procedures_gNB_uespec_RX()
* nr_decode_pucch0()  
actual CCH channel decoding  
90
{: .func4}
Laurent's avatar
Laurent committed
91
* nr_rx_pusch()  
92 93 94
{: .func4}
    * extracts data from rxdataF (frequency transformed received data)
{: .func4}
Laurent's avatar
Laurent committed
95
    * nr_pusch_channel_estimation()
96 97 98
{: .func4}
    * nr_ulsch_extract_rbs_single()
{: .func4}
Laurent's avatar
Laurent committed
99
    * nr_ulsch_scale_channel()
100
{: .func4}
Laurent's avatar
Laurent committed
101
    * nr_ulsch_channel_level()
102
{: .func4}
Laurent's avatar
Laurent committed
103
    * nr_ulsch_channel_compensation()
104
{: .func4}
Laurent's avatar
Laurent committed
105 106
    * nr_ulsch_compute_llr()  
this function creates the "likelyhood ratios"  
107
{: .func4}
Laurent's avatar
Laurent committed
108
* nr_ulsch_procedures()
109
{: .func4}
Laurent's avatar
Laurent committed
110
    * actual ULsch decoding
111
{: .func4}
Laurent's avatar
Laurent committed
112
    * nr_ulsch_unscrambling()
113 114 115 116 117
 {: .func4}
   * nr_ulsch_decoding()
 {: .func4}
   * nr_fill_indication()
{: .func4}
Laurent's avatar
Laurent committed
118
populated the data for the next call to "NR_UL_indication()"
119
{: .func4}
Laurent's avatar
Laurent committed
120 121 122 123

#### phy_procedures_gNB_TX()
* nr_common_signal_procedures()  
generate common signals
124 125
{: .func4}
* nr_generate_dci_top()
Laurent's avatar
Laurent committed
126
generate DCI: the scheduling informtion for each UE in both DL and UL
127
{: .func4}
Laurent's avatar
Laurent committed
128 129
* nr_generate_pdsch()  
generate DL shared channel (user data)
130
{: .func4}
Laurent's avatar
Laurent committed
131 132 133

### nr_feptx_prec()
tx precoding
134
{: .func3}
Laurent's avatar
Laurent committed
135 136
### nr_feptx0
do the inverse DFT
137
{: .func3}
Laurent's avatar
Laurent committed
138 139
### tx_rf()
send radio signal samples to the RF board  
140 141 142 143 144 145 146 147 148 149 150 151 152 153
the samples numbers are the future time for these samples emission on-air
{: .func3}


<div class="panel panel-info">
**Note**
{: .panel-heading}
<div class="panel-body">

NOTE DESCRIPTION

</div>
</div>