Project

General

Profile

notes.txt

dexter, 01/21/2019 03:25 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
scheduler_trx.c:rx_data_fn()
54
	-> l1_if.c->l1if_process_meas_res()->l1sap_up() (sends meas_ind)
55
	common/scheduler.c:_sched_compose_ph_data_ind()->l1sap_up() (sends data)
56
	(directly one after another at the end)
57

    
58
scheduler_trx.c:rx_pdtch_fn()
59
	-> l1_if.c->l1if_process_meas_res()->l1sap_up() (sends meas_ind)
60
	(may return 0 when PDTCH is bad)
61
	common/scheduler.c:_sched_compose_ph_data_ind()->l1sap_up() (sends data)
62
	(in case of bad PDTCH we will not get any measurement info anymore
63
	 or we allow to hand up bad pdtch data --> problem!)
64

    
65
scheduler_trx.c:rx_tchf_fn()
66
	-> l1_if.c->l1if_process_meas_res()->l1sap_up() (sends meas_ind)
67
	(complex decision logic in between, may return early)
68
	common/scheduler.c:_sched_compose_tch_ind()->l1sap_up() (sends tch)
69
	(located at the end)
70

    
71
scheduler_trx.c:rx_tchh_fn()
72
	(same as with rx_tchf_fn())
73

    
74
==> Merging MEAS with DATA/TCH is possible, but to get the measurement trough
75
    we will likely have to send empty data up along with the measurement.
76
    Call to l1if_process_meas_res() is removed, data is edded in the
77
    _sched_compose_...() functions.
78

    
79

    
80
Valid for:
81
osmo-bts-virtual
82

    
83
l1_if.c:virt_um_rcv_cb()
84
	only when GSMTAP_CHANNEL_PTCCH:
85
		-> l1if_process_meas_res->l1sap_up() (sends meas_ind)
86

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

    
91

    
92

    
93
==========================
94
         COMMON
95
==========================
96

    
97
l1sap.c:l1sap_mph_info_ind():
98
	->l1sap_info_meas_ind():
99
		->measurement.c:lchan_meas_process_measurement()
100

    
101
==> Remove call to l1sap_info_meas_ind(), log an error instead. This should
102
    catch all errornously upcomming measurement indications. Maybe have an
103
    OSMO_ASSERT(false) there in the beginning.
104

    
105
l1sap.c:l1sap_up()
106
	->l1sap_ph_data_ind()
107
	->l1sap_tch_ind()
108

    
109
==> The functions l1sap_ph_data_ind() and l1sap_tch_ind() can take over the
110
    role of l1sap_info_meas_ind() and take the measurement related data from
111
    the tch and data indications to forward them into to
112
    lchan_meas_process_measurement()
113

    
114

    
115

    
116
==========================
117
       LIBOSMOCORE
118
==========================
119

    
120
l1sap.h:
121

    
122
This is what a meas_ind currently transfers:
123

    
124
struct info_meas_ind_param {
125
	uint8_t chan_nr;	/*!< Channel Number (Like RSL) */
126
	uint32_t fn;		/*!< GSM Frame Number */
127
	uint16_t ber10k;	/*!< BER in units of 0.01% */
128
	union {
129
		int16_t ta_offs_qbits;	/*!< timing advance offset (in qbits) */
130
		int16_t ta_offs_256bits;/*!< timing advance offset (in 1/256th bits) */
131
	};
132
	int16_t c_i_cb;		/*!< C/I ratio in 0.1 dB */
133
	uint8_t is_sub:1;	/*!< flags */
134
	uint8_t inv_rssi;	/*!< RSSI in dBm * -1 */
135
};
136

    
137
This is what data and tch indications already transfer
138

    
139
struct ph_data_param {
140
	uint8_t link_id;	/*!< Link Identifier (Like RSL) */
141
	uint8_t chan_nr;	/*!< Channel Number (Like RSL) */
142
	uint32_t fn;		/*!< GSM Frame Number */
143
	int8_t rssi;		/*!< RSSI of receivedindication */
144
	uint16_t ber10k;	/*!< BER in units of 0.01% */
145
	union {
146
		int16_t ta_offs_qbits;	/* !< Burst TA Offset in quarter bits */
147
		int16_t ta_offs_256bits;/*!< timing advance offset (in 1/256th bits) */
148
	};
149
	int16_t lqual_cb;	/* !< Link quality in centiBel */
150
	enum osmo_ph_pres_info_type pdch_presence_info; /*!< Info regarding presence/validity of header and data parts */
151
};
152

    
153
struct ph_tch_param {
154
	uint8_t chan_nr;	/*!< Channel Number (Like RSL) */
155
	uint32_t fn;		/*!< GSM Frame Number */
156
	int8_t rssi;		/*!< RSSI of received indication */
157
	uint8_t marker;		/*!< RTP Marker bit (speech onset indicator) */
158
	uint16_t ber10k;	/*!< BER in units of 0.01% */
159
	int16_t lqual_cb;	/* !< Link quality in centiBel */
160
};
161

    
162
This is measurement related members are already presend in data or tch
163
indication:
164

    
165
* int8_t rssi;	(needs some calcuation, bcause meas_ind has inv_rssi)
166
* uint32_t fn;		/*!< GSM Frame Number */
167
* uint16_t ber10k;	/*!< BER in units of 0.01% */
168

    
169
This is what has to be added:
170

    
171
* struct ph_tch_param lacks ta_offs_... members
172
* both lack int16_t c_i_cb
173
* both lack  uint8_t is_sub (only needed with ph_tch_param?)
174

    
Add picture from clipboard (Maximum size: 48.8 MB)