Project

General

Profile

notes.txt

dexter, 01/23/2019 12:51 PM

 
1

    
2

    
3
==========================
4
      PHY BASED BTS
5
==========================
6

    
7
Valid for:
8
osmo-bts-litecell15
9
osmo-bts-oc2g
10
osmo-bts-sysmo
11
osmo-bts-octphy
12

    
13
l1_if.c:static handle_ph_data_ind()
14
	->static process_meas_res()
15
		(Fill up l1sap.u.info.u.meas_ind)
16
		-> l1sap_up()
17
	(for TCH call tch.c:l1if_tch_rx() and return)
18
	(fill up l1sap->u.data)
19
	-> l1sap_up()
20

    
21
Valid for:
22
osmo-bts-litecell15
23
osmo-bts-oc2g
24
osmo-bts-sysmo
25
osmo-bts-octphy*
26

    
27
tch.c:l1if_tch_rx()
28
	->common/l1sap.c:add_l1sap_header()->l1sap_up(); (sends tch ind.)
29
	(does not add another meas_ind as this is already done)
30

    
31
*l1if_tch_rx() is in l1_tch.c
32

    
33
Proposed changes:
34
The early call to process_meas_res is removed from handle_ph_data_ind. The
35
information added late in l1if_tch_rx() and at the bottom of handle_ph_data_ind()
36

    
37
==> measurement info in all data and tch indications that are handed over to
38
    the common code
39

    
40

    
41
==========================
42
      TRX BASED BTS
43
==========================
44

    
45
Valid for:
46
osmo-bts-trx
47

    
48
scheduler_trx.c:tx_data_fn()
49
	-> l1_if.c->l1if_process_meas_res()->l1sap_up() (sends meas_ind)
50
	common/scheduler.c:_sched_compose_ph_data_ind()->l1sap_up() (sends data)
51
	(directly one after another in the middle)
52

    
53
	(!) Why do we use hardcoded values here?
54
	(!) Why do we use hardcoded frame number for data (0) and the real fn for meas?
55

    
56

    
57
scheduler_trx.c:rx_data_fn()
58
	-> l1_if.c->l1if_process_meas_res()->l1sap_up() (sends meas_ind)
59
	common/scheduler.c:_sched_compose_ph_data_ind()->l1sap_up() (sends data)
60
	(directly one after another at the end)
61

    
62
	(!) 4 * (*toa256_sum) / *toa_num  !=  *toa256_sum / *toa_num  -- Why that?
63
	(!) Cosmetic: link_qual_cb should be NULL instead of 0
64

    
65

    
66
scheduler_trx.c:rx_pdtch_fn()
67
	-> l1_if.c->l1if_process_meas_res()->l1sap_up() (sends meas_ind)
68
	(may return 0 when PDTCH is bad)
69
	common/scheduler.c:_sched_compose_ph_data_ind()->l1sap_up() (sends data)
70
	(in case of bad PDTCH we will not get any measurement info anymore
71
	 or we allow to hand up bad pdtch data --> problem?)
72

    
73
	(!) 4 * (*toa256_sum) / *toa_num  !=  *toa256_sum / *toa_num  -- Why that?
74
	(!) fn !=  (fn + GSM_HYPERFRAME - 3) % GSM_HYPERFRAME
75

    
76

    
77
scheduler_trx.c:rx_tchf_fn()
78
	-> l1_if.c->l1if_process_meas_res()->l1sap_up() (sends meas_ind)
79
	(complex decision logic in between, decides between TCH and FACCH)
80
	common/scheduler.c:_sched_compose_ph_data_ind()->l1sap_up() (sends facch)
81
	common/scheduler.c:_sched_compose_tch_ind()->l1sap_up() (sends tch, located at the end)
82

    
83
	(!) FACCH: tn != (fn + GSM_HYPERFRAME - 7) % GSM_HYPERFRAME ?
84
	(!) FACCH: toa256 != 4 * toa256
85
	(!) FACCH: Cosmetic: link_qual_cb should be NULL instead of 0
86
	(!) TCH: fn != (fn + GSM_HYPERFRAME - 7) % GSM_HYPERFRAME
87

    
88
	==> Extend _sched_compose_tch_ind() so that it also takes the missing
89
	    measurement related parameters.
90

    
91

    
92
scheduler_trx.c:rx_tchh_fn()
93
	(same as with rx_tchf_fn())
94

    
95
	(!) FACCH: *first_fn != fn + GSM_HYPERFRAME - 10 - ((fn % 26) >= 19)) % GSM_HYPERFRAME?
96
	(!) FACCH: toa256 != toa256/64
97
	(!) FACCH: Cosmetic: link_qual_cb should be NULL instead of 0
98
	(!) TCH: *first_fn != fn + GSM_HYPERFRAME - 10 - ((fn%26)==19) - ((fn%26)==20)) % GSM_HYPERFRAME
99

    
100

    
101
==> Merging MEAS with DATA/TCH is possible, but to get the measurement trough
102
    we will likely have to send empty data up along with the measurement.
103
    Call to l1if_process_meas_res() is removed, data is edded in the
104
    _sched_compose_...() functions.
105

    
106

    
107
Valid for:
108
osmo-bts-virtual
109

    
110
l1_if.c:virt_um_rcv_cb()
111
	only when GSMTAP_CHANNEL_PTCCH:
112
		-> l1if_process_meas_res->l1sap_up() (sends meas_ind)
113

    
114
==> The function virt_um_rcv_cb() seems to be the only one that triggers the
115
    sending of measement indications. When meas_ind is sent also data is sent,
116
    so the two can be merged in one.
117

    
118

    
119

    
120
==========================
121
         COMMON
122
==========================
123

    
124
l1sap.c:l1sap_mph_info_ind():
125
	->l1sap_info_meas_ind():
126
		->measurement.c:lchan_meas_process_measurement()
127

    
128
==> Remove call to l1sap_info_meas_ind(), log an error instead. This should
129
    catch all errornously upcomming measurement indications. Maybe have an
130
    OSMO_ASSERT(false) there in the beginning.
131

    
132
l1sap.c:l1sap_up()
133
	->l1sap_ph_data_ind()
134
	->l1sap_tch_ind()
135

    
136
==> The functions l1sap_ph_data_ind() and l1sap_tch_ind() can take over the
137
    role of l1sap_info_meas_ind() and take the measurement related data from
138
    the tch and data indications to forward them into to
139
    lchan_meas_process_measurement()
140

    
141

    
142

    
143
==========================
144
       LIBOSMOCORE
145
==========================
146

    
147
l1sap.h:
148

    
149
This is what a meas_ind currently transfers:
150

    
151
struct info_meas_ind_param {
152
	uint8_t chan_nr;	/*!< Channel Number (Like RSL) */
153
	uint32_t fn;		/*!< GSM Frame Number */
154
	uint16_t ber10k;	/*!< BER in units of 0.01% */
155
	union {
156
		int16_t ta_offs_qbits;	/*!< timing advance offset (in qbits) */
157
		int16_t ta_offs_256bits;/*!< timing advance offset (in 1/256th bits) */
158
	};
159
	int16_t c_i_cb;		/*!< C/I ratio in 0.1 dB */
160
	uint8_t is_sub:1;	/*!< flags */
161
	uint8_t inv_rssi;	/*!< RSSI in dBm * -1 */
162
};
163

    
164
This is what data and tch indications already transfer
165

    
166
struct ph_data_param {
167
	uint8_t link_id;	/*!< Link Identifier (Like RSL) */
168
	uint8_t chan_nr;	/*!< Channel Number (Like RSL) */
169
	uint32_t fn;		/*!< GSM Frame Number */
170
	int8_t rssi;		/*!< RSSI of receivedindication */
171
	uint16_t ber10k;	/*!< BER in units of 0.01% */
172
	union {
173
		int16_t ta_offs_qbits;	/* !< Burst TA Offset in quarter bits */
174
		int16_t ta_offs_256bits;/*!< timing advance offset (in 1/256th bits) */
175
	};
176
	int16_t lqual_cb;	/* !< Link quality in centiBel */
177
	enum osmo_ph_pres_info_type pdch_presence_info; /*!< Info regarding presence/validity of header and data parts */
178
};
179

    
180
struct ph_tch_param {
181
	uint8_t chan_nr;	/*!< Channel Number (Like RSL) */
182
	uint32_t fn;		/*!< GSM Frame Number */
183
	int8_t rssi;		/*!< RSSI of received indication */
184
	uint8_t marker;		/*!< RTP Marker bit (speech onset indicator) */
185
	uint16_t ber10k;	/*!< BER in units of 0.01% */
186
	int16_t lqual_cb;	/* !< Link quality in centiBel */
187
};
188

    
189
This is measurement related members are already presend in data or tch
190
indication:
191

    
192
* int8_t rssi;		(same as inv_rssi?)
193
* uint32_t fn;		/*!< GSM Frame Number */
194
* uint16_t ber10k;	/*!< BER in units of 0.01% */
195

    
196
This is what has to be added:
197

    
198
* struct ph_tch_param lacks ta_offs_... members
199
* both lack int16_t c_i_cb (seems to be unused!)
200
* both lack uint8_t is_sub
201

    
202

    
203
==========================
204
     OPEN QUESTIONS
205
==========================
206

    
207
(!) How do we handle the is_sub field? octphy does not set it.
208
    ==> who sets the flag? l1sap.c seems to read it only, but nobody seems
209
    	to set it!
210

    
211

    
212

    
213

    
214
==========================
215
   IMPORTANT FUNCTIONS
216
==========================
217

    
218
scheduler.c:
219
int _sched_compose_ph_data_ind(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn,
220
			       enum trx_chan_type chan, uint8_t *l2,
221
			       uint8_t l2_len, float rssi,
222
			       int16_t ta_offs_256bits, int16_t link_qual_cb,
223
			       uint16_t ber10k,
224
			       enum osmo_ph_pres_info_type presence_info);
225

    
226
int _sched_compose_tch_ind(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn,
227
		    enum trx_chan_type chan, uint8_t *tch, uint8_t tch_len);
228

    
229
l1_if.c:
230
int l1if_process_meas_res(struct gsm_bts_trx *trx, uint8_t tn, uint32_t fn, uint8_t chan_nr,
231
	int n_errors, int n_bits_total, float rssi, int16_t toa256);
232

    
233

    
234

    
235

    
236

    
237
	
Add picture from clipboard (Maximum size: 48.8 MB)