Project

General

Profile

TSM30Layer1 » History » Version 3

laforge, 02/19/2016 10:49 PM
more notes on l1a_cres_process

1 2 laforge
[[PageOutline]]
2 1 laforge
== General Terminlogy ==
3
4
 * L1 sync -- The synchronous side of the Layer 1, triggered by the TDMA frame interrupt issued by the DSP
5
 * L1 async -- The asynchronous side of the Layer 1, driven by the L2/L3
6
7
== Files ==
8
9
=== Layer1/L1i/Src/dl1_mem.c ===
10
11
allocating/receiving/sending signals.
12
13
=== Layer1/L1i/Src/dl1_pei.c ===
14
15
create/initialise/close protocol stack entity
16
17
=== Layer1/L1c/Src/l1_afunc.c ===
18
19
Functionality related bit and timeslot synchronization
20
21
=== Layer1/L1c/Inc/l1_defty.h ===
22
23
DSP shared memory API definitions
24
25
=== Layer1/L1c/Src/l1_sync.c ===
26
27
Code driven by TDMA frame interrupt as issued by DSP
28
29
30
== Functions ==
31
32
=== Frame/Src/Frame.c:pf_ProcessSystemPrim(USHORT TaskHandle, T_VOID_STRUCT *pPrim) ===
33
34
called from Frame/Src/vsi_com.c:vsi_c_primitive(), in turn from Layer1/L1i/Src/dl1_mem.c:os_receive_sig(UWORD8 queue)
35
whenever the Layer1 receives a Signal.
36
37
=== Layer1/L1i/Src/dl1_pei.c:pei_run(T_VSI_CHANDLE handle) ===
38
39
process primitives, called by main loop in the protocol stack entity
40
41
=== Layer1/L1c/Src/l1_async.c:l1a_task() ===
42
43
{{{
44
/* L1A (Layer 1 Asynchronous) task function. This        */
45
/* function manages the interface between L3 and L1. It  */
46
/* is composed with a set of state machine, each machine */
47
/* handles a particular GSM functionality. When a        */
48
/* message is received in L1_C1 message queue, it is     */
49
/* submitted to every state machine. The one which are   */
50
/* impacted by the message process it. At the end of     */
51
/* "l1a_task()" function, a balance routine is called,   */
52
/* it enables L1S tasks consequently to the state machine*/
53
/* requests.                                             */
54
}}}
55
56
 * iterates over list of primitives, call l1pa_task()
57
58
=== Layer1/L1c/Src/l1p_asyn.c:l1pa_task(xSignalHeaderRec *msg) ===
59
60
call into the various lapa_*_process() functions for GPRS
61
62
=== layer1 asynchronous ===
63
64
==== l1a_test_process() ====
65
66
Hardware test
67
68
==== l1a_stats_process() ====
69
70
Statistics or Test process
71
72
==== l1a_mmi_adc_req() ====
73
74
ADC conversion
75
76
==== l1a_freq_band_configuration() ====
77
Frequency Band configuration: GSM900, E-GSM900, DCS1800, DUAL, DUALEXT, PCS 1900
78
{{{
79
/* Description : This state machine handles the frequency*/
80
/*band configuration: E_GSM900, GSM900, DCS1800, PCS1900,*/
81
/*DUAL, DUALEXT, DUALEXT_PCS1900...                      */
82
/*                                                       */
83
/* Starting messages:        MPHC_INIT_L1_REQ            */
84
/*                                                       */
85
/* Result messages (input):  none                        */
86
/* Result messages (output): MPHC_INIT_L1_CON           */
87
/* Reset messages (input):   none                        */
88
}}}
89
90
==== l1a_initial_network_sync_process() ====
91
92
Synchronization with a Neighbour cell for Cell Selection
93
{{{
94
/* Description : This state machine handles the 1st      */
95
/* synchronization with the network.                     */
96
/*                                                       */
97
/* Starting messages:        MPHC_NETWORK_SYNC_REQ       */
98
/*                                                       */
99
/* Result messages (input):  L1C_FB_INFO                 */
100
/*                           L1C_SB_INFO                 */
101
/*                                                       */
102
/* Result messages (output): MPHC_NETWORK_SYNC_IND       */
103
/*                                                       */
104
/* Reset messages (input):   MPHC_STOP_NETWORK_SYNC_REQ  */
105
/*                          (MPHC_STOP_NETWORK_SYNC_CON) */
106
}}}
107
108
==== l1a_network_lost() ====
109
110
lost Network
111
112
==== l1a_full_list_meas_process() ====
113
114
Full list receive level monitoring
115
{{{
116
/* Description:                                          */
117
/* ------------                                          */
118
/* This function is a state machine which handles the    */
119
/* Cell Selection Full List Power Measurement L1/L3      */
120
/* interface and it handles the neigbour cell            */
121
/* measurement process in IDLE mode with FULL list.      */
122
/* When a message MPHC_RXLEV_REQ is received             */
123
/* the L1S task FSMS_MEAS is enabled. When this task     */
124
/* is completed a reporting message L1C_VALID_MEAS_INFO */
125
/* is received and forwarded to L3.                      */
126
/*                                                       */
127
/* Starting messages:        MPHC_RXLEV_REQ.             */
128
/*                                                       */
129
/* Result messages (input):  L1C_VALID_MEAS_INFO        */
130
/*                                                       */
131
/* Result messages (output): MPHC_RXLEV_IND              */
132
/*                                                       */
133
/* Reset messages (input):   none                        */
134
/*                                                       */
135
/* Stop message (input):     MPHC_STOP_RXLEV_REQ         */
136
/*                                                       */
137
/* Stop message (output):    MPHC_STOP_RXLEV_CON         */
138
/*                                                       */
139
/* Rem:                                                  */
140
/* ----                                                  */
141
/* L3 is in charge of the number of pass to follow the   */
142
/* GSM recommendation.                                   */
143
}}}
144
145
==== l1a_idle_ba_list_meas_process() ====
146
{{{
147
/* Description : This state machine handles neigbor cell */
148
/* measurement process in IDLE mode with BA list.        */
149
/*                                                       */
150
/* Starting messages:        MPHC_RXLEV_PERIODIC_REQ     */
151
/* ------------------                                    */
152
/*  L1 starts then the periodic BA list receive level    */
153
/*  monitoring.                                          */
154
/*                                                       */
155
/* Subsequent messages:      MPHC_RXLEV_PERIODIC_REQ     */
156
/* --------------------                                  */
157
/*  L1 changes the BA list and starts the periodic BA    */
158
/*  list receive level monitoring with this new list.    */
159
/*                                                       */
160
/* Result messages (input):  L1C_RXLEV_PERIODIC_DONE      */
161
/* ------------------------                              */
162
/*  This is the periodic reporting message from L1s.     */
163
/*                                                       */
164
/* Result messages (output): MPHC_RXLEV_PERIODIC_IND     */
165
/* -------------------------                             */
166
/*  This is the periodic reporting message to L3.        */
167
/*                                                       */
168
/* Reset messages (input):   MPHC_STOP_RXLEV_PERIODIC_REQ*/
169
/* -----------------------                               */
170
/*  BA list neigbor cell measurement process in IDLE     */
171
/*  is stopped by this message.                          */
172
}}}
173
174
==== l1a_idle_6strongest_monitoring_process() ====
175
176
6 strongest Neighbor cells synchro. monitoring
177
{{{
178
/* Description:                                          */
179
/* ------------                                          */
180
/* This function is a state machine which handles the    */
181
/* synchronization with up to 6 neighbor cells           */
182
/*                                                       */
183
/* Starting messages:        MPHC_NCELL_SYNC_REQ         */
184
/* ------------------        MPHC_NCELL_LIST_SYNC_REQ    */
185
/*  L1 makes an attempt to read the FB/SB or to confirm  */
186
/*  SB.                                                  */
187
/*                                                       */
188
/*                                                       */
189
/* Result messages (input):  L1C_FB_INFO                 */
190
/* ------------------------  L1C_SB_INFO                 */
191
/*                           L1C_SBCONF_INFO             */
192
/*  Result messages from L1S. FB detection, SB detection,*/
193
/*  SB confirmation.                                     */
194
/*                                                       */
195
/* Result messages (output): MPHC_NCELL_SYNC_IND         */
196
/* -------------------------                             */
197
/*  SB indication.                                       */
198
/*                                                       */
199
/* Reset messages (input):   MPHC_STOP_NCELL_SYNC_REQ    */
200
/* -----------------------  (MPHC_STOP_NCELL_SYNC_CON)   */
201
}}}
202
203
==== l1a_neighbour_cell_bcch_reading_process() ====
204
205
6 strongest Neighbor cells BCCH reading
206
{{{
207
/* Description:                                          */
208
/* ------------                                          */
209
/* This function is a state machine which handles the    */
210
/* BCCH reading from up to 6 neighbour cells             */
211
/*                                                       */
212
/* Starting messages:         MPHC_NCELL_BCCH_REQ        */
213
/* ------------------                                    */
214
/*                                                       */
215
/* Result messages (input):   L1C_BCCHN_INFO             */
216
/* ------------------------                              */
217
/*                                                       */
218
/* Result messages (output):  MPHC_NCELL_BCCH_IND        */
219
/* -------------------------                             */
220
/*                                                       */
221
/* Reset messages (input):    MPHC_STOP_NCELL_BCCH_REQ   */
222
/* -----------------------   (MPHC_STOP_NCELL_BCCH_CON)  */
223
}}}
224
225
==== l1a_idle_serving_cell_bcch_reading_process() ====
226
227
Serving Cell BCCH reading
228
{{{
229
/* Starting messages:        MPHC_SCELL_NBCCH_REQ        */
230
/* ------------------        MPHC_SCELL_EBCCH_REQ        */
231
/*                                                       */
232
/*  L1 continuously reads the serving cell BCCH and/or   */
233
/*  Extended BCCH as requested by the scheduling info.   */
234
/*                                                       */
235
/* Result messages (input):  L1C_BCCHS_INFO              */
236
/* ------------------------                              */
237
/*  System information data block from L1S.              */
238
/*                                                       */
239
/* Reset messages (input):   MPHC_STOP_SCELL_BCCH_REQ    */
240
/* -----------------------  (MPHC_STOP_SCELL_BCCH_CON)   */
241
}}}
242
243
==== l1a_idle_serving_cell_paging_process() ====
244
245
Serving Cell PAGING reading
246
{{{
247
/* Description : This state machine handles paging       */
248
/*                                                       */
249
/* Starting messages:        MPHC_START_CCCH_REQ         */
250
/* ------------------                                    */
251
/*                                                       */
252
/*  L1 continuously reads the serving cell BCCH and/or   */
253
/*  Extended BCCH as requested by the scheduling info.   */
254
/*                                                       */
255
/* Result messages (input):  L1C_ALLC_INFO               */
256
/* ------------------------  L1C_NP_INFO                 */
257
/*                           L1C_EP_INFO                 */
258
/*                                                       */
259
/* Reset messages (input):   MPHC_STOP_CCCH_REQ          */
260
/* -----------------------  (MPHC_STOP_CCCH_CON)         */
261
}}}
262
263
==== l1a_idle_smscb_process() ====
264
265
Short Message Servive Cell Broadcast reading
266
{{{
267
/* Description : This state machine handles the SMSCB    */
268
/* (Short Message Service Cell Broadcast).               */
269
/*                                                       */
270
/* Starting messages:        MPHC_CONFIG_CBCH_REQ        */
271
/*                                                       */
272
/* Subsequent messages:      MPHC_CBCH_SCHEDULE_REQ      */
273
/*                           MPHC_CBCH_INFO_REQ          */
274
/*                           MPHC_CBCH_UPDATE_REQ        */
275
/*                                                       */
276
/* Result messages (input):  L1C_CB_INFO                 */
277
/*                                                       */
278
/* Result messages (output): MPHC_DATA_IND               */
279
/*                                                       */
280
/* Reset messages (input):   MPHC_STOP_CBCH_REQ          */
281
/*                                                       */
282
}}}
283
284
==== l1a_cres_process() ====
285
286
Cell reselection process
287
288
Synchronization and requested BCCH reading --> camp on new cell
289
290
{{{
291
/* Description:                                          */
292
/* ------------                                          */
293
/* This function is a state machine which handles Cell   */
294
/* Reselection.                                          */
295
/*                                                       */
296
/* Starting messages:        MPHC_NEW_SCELL_REQ          */
297
/* ------------------                                    */
298
/*  L1 camps on the given ARFCN.                         */
299
/*                                                       */
300
/* Result messages (output): MPHC_NEW_SCELL_CON          */
301
}}}
302
303 3 laforge
The following data is supplied along with the MPHC_NEW_SCELL_REQ message:
304
 * radio_freq (ARFCN)
305
 * BSIC
306
 * time_alignment information
307
 * fn_offfset (frame number offset)
308
309
Those values are stored in l1s_l1s_com.Scell_info (serving cell info) and the
310
SYNCHRO L1S task is marked for execution.
311
312
Finally, MPHC_NEW_SCELL_CON is sent up to L2/3.
313
314 1 laforge
==== l1a_access_process() ====
315
316
Link Access Process.
317
{{{
318
/* Description : This state machine handles the access   */
319
/* to the network while in IDLE mode.                    */
320
/*                                                       */
321
/* Starting messages:        MPHC_RA_REQ                 */
322
/*                                                       */
323
/* Subsequent messages:      MPHC_RA_REQ                 */
324
/*                                                       */
325
/* Result messages (input):  L1C_RA_DONE                 */
326
/*                                                       */
327
/* Result messages (output): MPHC_RA_CON                 */
328
/*                                                       */
329
/* Reset message (input): MPHC_STOP_RA_REQ               */
330
/*                                                       */
331
/* Reset message (input): MPHC_STOP_RA_CON               */
332
}}}
333
334
==== l1a_dedicated_process() ====
335
336
Dedicated mode process
337
{{{
338
/* Description : This state machine handles the dedicated*/
339
/* mode setup (L1A side).                                */
340
/*                                                       */
341
/* Starting messages:        MPHC_IMMED_ASSIGN_REQ        */
342
/*                                                       */
343
/* Subsequent messages:      MPHC_CHANNEL_ASSIGN_REQ     */
344
/*                           MPHC_SYNC_HO_REQ             */
345
/*                           MPHC_PRE_SYNC_HO_REQ         */
346
/*                           MPHC_PSEUDO_SYNC_HO_REQ      */
347
/*                           MPHC_ASYNC_HO_REQ            */
348
/*                           MPHC_ASYNC_HO_COMPLETE       */
349
/*                           MPHC_HANDOVER_FAIL_REQ       */
350
/*                           MPHC_CHANGE_FREQUENCY        */
351
/*                           OML1_CLOSE_TCH_LOOP_REQ     */
352
/*                           OML1_OPEN_TCH_LOOP_REQ      */
353
/*                           OML1_START_DAI_TEST_REQ     */
354
/*                           OML1_STOP_DAI_TEST_REQ      */
355
/*                                                       */
356
/* Result messages (input):  L1C_DEDIC_DONE              */
357
/*                           L1C_SACCH_INFO              */
358
/*                                                       */
359
/* Result messages (output): MPHC_CHANNEL_ASSIGN_CON      */
360
/*                           MPHC_SYNC_HO_CON             */
361
/*                           MPHC_PRE_SYNC_HO_CON         */
362
/*                           MPHC_PSEUDO_SYNC_HO_CON      */
363
/*                           MPHC_ASYNC_HO_CON            */
364
/*                           MPHC_TA_FAIL_IND             */
365
/*                           MPHC_DATA_IND               */
366
/*                           OML1_CLOSE_TCH_LOOP_CON     */
367
/*                           OML1_OPEN_TCH_LOOP_CON      */
368
/*                           OML1_START_DAI_TEST_CON     */
369
/*                           OML1_STOP_DAI_TEST_CON      */
370
/*                                                       */
371
/* Reset messages (input):   MPHC_CHANNEL_RELEASE         */
372
}}}
373
374
==== l1a_dedic6_process ====
375
376
6 strongest Neighbor cells synchro. monitoring and BCCH reading
377
{{{
378
/* Description : This state machine handles the 6 strong.*/
379
/* neighbor cells management in dedicated mode.          */
380
/*                                                       */
381
/* Remark: in dedicated mode there is no reason to use   */
382
/* the task parameters semaphores since there is no      */
383
/* ambiguity and no asynchronous/synchronous conflict to */
384
/* care about.                                           */
385
/*                                                       */
386
/* Starting messages:        L1C_DEDIC_DONE              */
387
/*                                                       */
388
/* Result messages (input):  L1C_FB_INFO                 */
389
/*                           L1C_SB_INFO                 */
390
/*                           L1C_SBCONF_INFO             */
391
/*                                                       */
392
/* Reset messages (input):   MPHC_CHANNEL_RELEASE         */
393
}}}
394
395
=== layer 1 synchronous ===
396
397
==== Layer1/L1c/Src/l1_sync.c:hisr() ====
398
399
Interrupt Service Routine called by the DSP TDMA frame interrupt
400
 * Calls l1s_synch()
401
402
==== Layer1/L1c/Src/l1_sync.c:l1s_synch() ====
403
{{{
404
/* This function is the core of L1S. Here is a summary   */
405
/* of the execution:                                     */
406
/*                                                       */
407
/*  - Frame counters management.                         */
408
/*  - Get current communication page pointers.           */
409
/*  - RESET internal variables.                          */
410
/*  - RESET MCU->DSP DB communication page.              */
411
/*  - TOA update management.                             */
412
/*                                                       */
413
/*  - L1 task manager,                                   */
414
/*      - Dedicated_mode_manager.                        */
415
/*      - Task_scheduler.                                */
416
/*      - Execute_frame.                                 */
417
/*      - Neighbor cells measurement manager.            */
418
/*      - End manager.                                   */
419
}}}
420
421
==== l1s_dedicated_mode_manager() ====
422
423
* assignment of a new channel, changing channel mode, ciphering start, etc.
424
425
==== l1s_task_scheduler_process() ====
426
{{{
427
/* This function is the task scheduler of L1S. It        */
428
/* schedules any enabled task. When a task must start,   */
429
/* it becomes PENDING. Since several tasks can become    */
430
/* pending at the same time, the highest priority one    */
431
/* is elected. The elected task compete then with the    */
432
/* current running task. If they conflict, the highest   */
433
/* priority one wins. If the winning is the new comer    */
434
/* then the multiframe table is reset and the new coming */
435
/* task is installed.                                    */
436
}}}
437
438
==== l1s_execute_frame() ====
439
 * call l1s_exec_mftab()
440
441
==== Layer1/L1c/Src/l1_mfmgr.c:l1s_exec_mftab() ====
442
 * Execute functions from MFTAB
443
 FIXME
444
445
==== l1s_meas_manager() ====
446
{{{
447
/* Description:                                          */
448
/* ------------                                          */
449
/* This function is the measurement tasks manager.       */
450
/* The followings tasks are handled:                     */
451
/*                                                       */
452
/* FSMS_MEAS:                                            */
453
/* 1) Full list measurement in Cell Selection            */
454
/* The machine performs 1 valid measurement per carrier  */
455
/* from the full list of GSM carriers. To achieve 1      */
456
/* valid measurement, 2 attempt with 2 different AGC     */
457
/* are performed worst case. When all carriers are       */
458
/* a reporting message L1C_VALID_MEAS_INFO is built and */
459
/* sent to L1A.                                          */
460
/*                                                       */
461
/* 2) Full list measurement in Idle mode.                */
462
/* The machine performs 1 valid measurement per carrier  */
463
/* from the full list of GSM carriers. To achieve 1      */
464
/* valid measurement, 2 attempt with 2 different AGC     */
465
/* are performed worst case. When all carriers are       */
466
/* a reporting message L1C_VALID_MEAS_INFO is built and */
467
/* sent to L1A.                                          */
468
/*                                                       */
469
/* I_BAMS_MEAS: BA list measurement in Idle mode.        */
470
/* The machine performs 7 measurements per PCH reading   */
471
/* (3*2+1) looping on the BA list. When 7 measurements are */
472
/* completed (end of PCH) a reporting message            */
473
/* L1C_RXLEV_PERIODIC_DONE is built and sent to L1A.      */
474
}}}
475
476
==== l1s_end_manager() ====
477
 * copy page into real time trace buffer
478
479
==== l1s_increment_time() ====
480
 * Increament the various framenumbers by one
481
482
483
484
485
=== DSP Tasks ===
486
{{{
487
  #define HWTEST       0   // DSP checksum reading
488
  #define ADC_CSMODE0  1   // ADC task in CS_MODE0 mode
489
  #define DEDIC        2   // Global Dedicated mode switch
490
  #define RAACC        3   // Channel access (ul)
491
  #define RAHO         4   // Handover access (ul)
492
  #define NSYNC        5   // Global Neighbour cell synchro switch
493
  #define POLL         6   // Packet Polling (Access)
494
  #define PRACH        7   // Packet Random Access Channel
495
  #define ITMEAS       8   // Interference measurements
496
  #define FBNEW        9   // Frequency burst search (Idle mode)
497
  #define SBCONF       10   // Synchro. burst confirmation
498
  #define SB2          11  // Synchro. burst read (1 frame uncertainty / SB position)
499
  //#define PTCCH        12  // Packet Timing Advance control channel  CCR 9-12-02 BUG02527
500
  #define FB26         12  // Frequency burst search, dedic/transfer mode MF26 or MF52
501
  #define SB26         13  // Synchro burst search, dedic/transfer mode MF26 or MF52
502
  #define SBCNF26      14  // Synchro burst confirmation, dedic/transfer mode MF26 or MF52
503
  #define FB51         15  // Frequency burst search, dedic mode MF51
504
  #define SB51         16  // Synchro burst search, dedic MF51
505
  #define SBCNF51      17  // Synchro burst confirmation, dedic MF51
506
  #define PDTCH        18  // Packet Data channel
507
  #define BCCHN        19  // BCCH Neighbor in GSM Idle
508
  #define ALLC         20  // All CCCH Reading
509
  #define EBCCHS       21  // Extended BCCH Serving Reading
510
  #define NBCCHS       22  // Normal BCCH Serving       Reading
511
  #define SMSCB        23  // CBCH serving Reading
512
  #define ADL          24  // SACCH(SDCCH) DL
513
  #define AUL          25  // SACCH(SDCCH) UL
514
  #define DDL          26  // SDCCH DL
515
  #define DUL          27  // SDCCH UL
516
  #define TCHD         28  // Dummy for TCH Half rate
517
  #define TCHA         29  // SACCH(TCH)
518
  #define TCHTF        30  // TCH Full rate
519
  #define TCHTH        31  // TCH Half rate
520
  #define PALLC        32  // All PCCCH reading
521
  #define PSMSCB       33  // CBCH serving Reading while in Packet Idle
522
  #define PBCCHS       34  // PBCCH serving reading
523
  #define PNP          35  // Packet Normal paging Reading
524
  #define PEP          36  // Packet Extended paging Reading
525
  #define SINGLE       37  // Single Block for GPRS
526
  #define PBCCHN_TRAN  38  // Packet BCCH Neighbor in Packet Transfer mode.
527
  #define PBCCHN_IDLE  39  // Packet BCCH Neighbor in Idle mode.
528
  #define BCCHN_TRAN   40  // BCCH Neighbour in Packet Transfer mode
529
  #define NP           41  // Normal paging Reading
530
  #define EP           42  // Extended paging   Reading
531
  #define BCCHN_TOP    43  // BCCH Neighbour TOP priority in Idle mode
532
  #define PTCCH        44  // Packet Timing Advance control channel
533
  #define SYNCHRO      45  // synchro task: L1S reset
534
  #define PTS_START_TX_BURST_TEST 46 // PTS transmission test
535
  #define PTS_START_RX_BURST_TEST 47 // PTS receive test
536
  #define PTS_START_FB_BURST_TEST 48 // PTS frequency burst receive test
537
  #define PTS_START_FB26_BURST_TEST 49 // PTS frequency burst receive test
538
  #define PTS_START_SB26_BURST_TEST 50 // PTS frequency burst receive test
539
}}}
540
541
=== DSP Driver (l1_drive.c) ===
542
543
==== l1ddsp_load_monit_task(API monit_task, fb_mode) ====
544
545
* monit_taks = number of measurements (max 8) + sometimes 0x200
546
* set FB detection algorithm
547
548
==== l1ddsp_load_txpwr(u8 vp_TxPower, u16 vp_Arfcn) ====
549
550
==== l1ddsp_load_rx_task(API rx_task, UWORD8 burst_id, UWORD8 tsq) ====
551
552
Load values into l1s_dsp_com.dsp_db_w_ptr:
553
 * d_task_d = rx_task
554
 * d_burst_d = burst_id
555
 * d_ctrl_system |= tsq << B_TSQ
556
557
==== l1ddsp_load_ra_task(API ra_task) ====
558
 * d_task_ra = ra_task
559
560
==== l1ddsp_load_tch_mode(UWORD8 dai_mode, BOOL dtx_allowed) ====
561
562
==== l1ddsp_load_tch_param() ====
563
564
==== l1ddsp_load_ciph_param(UWORD8 a5mode, T_ENCRYPTION_KEY *ciph_key) ====
565
Set
566
 * l1s_dsp_com.dsp_ndb_ptr->d_a5mode = a5mode
567
 * l1s_dsp_com.dsp_ndb_ptr->a_kc
568
569
==== l1ddsp_stop_tch() ====
570
Set
571
 * l1s_dsp_com.dsp_db_w_ptr->d_ctrl_tch |= (B_STOP_TCH_UL|B_STOP_TCH_DL)
572
573
==== l1ddsp_end_scenario() ====
574
575
 * l1s_dsp_com.dsp_w_page
576
 * l1s_dsp_com.dsp_ndb_ptr->d_dsp_page
577
 * call l1dmacro_set_frame_it()
578
579
==== l1dmacro_set_frame_it() ====
580
581
Enable GSM Frame Interrupt on next TDMA frame
582
583
Typically called at the end of processing a TDMA frame interrupt
584
585
==== l1d_reset_hw(UWORD32 offset_value) ====
586
587
=== TPU Macros (Layer1/L1d/src/l1d_Tpu.hm) ===
588
589
==== MC_L1D_TPU_REWIND ====
590
Re-initialize the global current TPU pointer to L1D_TPU_RAM.
591
592
==== MC_L1D_TPU_SLEEP ====
593
Sleep for one TPU tick (instruction 0)
594
595
==== MC_L1D_TPU_MOVE(addr,data) ====
596
Put a MOVE instruction at the current TPU pointer
597
598
==== MC_L1D_TPU_AT(time) ====
599
Put an AT instruction at the current TPU pointer
600
601
==== MC_L1D_TPU_SYNC(time) ====
602
Put a SYNC instruction at the current TPU pointer
603
604
==== MC_L1D_TPU_WAIT(time) ====
605
Put a WAIT instruction at the current TPU pointer
606
607
==== MC_L1D_TPU_OFFSET(time) ====
608
Put a OFFSET instruction at the current TPU pointer
609
610
==== MC_L1D_TSP_ACT_INIT(signal) ====
611
 * set v_L1d_TspActValue == signal
612
 * issue MC_L1D_TPU_MOVE instructions for L1D_TSP_ACTX and L1D_TSP_ACT
613
614
==== MC_L1D_TSP_ACT_SET(signal) ====
615
 * set v_L1d_TspActValue |= signal
616
 * issue MC_L1D_TPU_MOVE instructions as required
617
618
==== MC_L1D_TSP_ACT_RESET(signal) ====
619
 * unset v_L1d_TspActValue |= signal
620
 * issue MC_L1D_TPU_MOVE instructions as required
621
622
=== TPU (Layer1/L1d/src/l1d_Tpu.c) ===
623
624
==== TP_Reset(u16 on) ====
625
 * Issue L1D_TPU_CTRL_RESET in L1D_TPU_CTRL register
626
 * Wait until reset has been asserted
627
628
==== TP_Enable(u16 on) ====
629
 * Set or unset L1D_TPU_CTRL_T_ENBL in L1D_TPU_CTRL
630
631
==== l1dmacro_idle(void) ====
632
633
==== l1dmacro_offset(u32 offset_value, s32 relative_time) ====
634
635
==== l1dmacro_synchro(u32 when, u32 value) ====
636
637
==== TPU_ClkEnable(SYS_UWORD16 on) ====
638
 * Set or unset L1D_TPU_CTRL_CLK_EN in TPU_CTRL
639
 * wait until change becomes active
640
641
==== TPU_FrameItEnable(void) ====
642
 * Enable Frame interrupt by TPU_CTRL_D_ENBL in TPU_CTRL
643
644
==== l1dmacro_set_frame_it(void) ====
645
 * Call TPU_FrameItEnable()
646
647
==== l1pdmacro_it_dsp_gen(WORD16 time)
648
 * MC_L1D_TPU_AT    (time);
649
 * MC_L1D_TPU_MOVE  (L1D_TPU_IT_DSP_PG,0x0001);
650
651
==== l1pdmacro_anchor(WORD16 time)
652
 * MC_L1D_TPU_AT    (time);
653
654
==== TPU_check_IT_DSP(void) ====
655
 * check if an IT DSP is still pending
656
657
=== RF Frontend Driver ===
658
659
==== l1d0_0ActivateTx (u16 vp_Start, u8 vp_TxPwr, u8 vp_Band) ====
660
Activate TX path of the radio section to transmit a burst
661
662
==== l1d0_1DeactivateTx (u16 vp_Start, u8 vp_TxPwr, u8 vp_Band) ====
663
664
==== l1d0_2CalcArfcnNcntValue(u16 vp_Arfcn, u8 vp_TxRx, u8 vp_Band) ====
665
Calculate N-Counter for RF-PLL
666
667
==== l1d0_3BuildGainReg(u16 vp_Arfcn, u8 vp_Band, t_L1d_Level *pp_Level) ====
668
Calculate AGC register prior to Rx
669
670
==== l1d0_4DeactivateRx(u16 vp_Start) ====
671
Deactivate Radio Rx power control paths
672
673
==== l1d0_6RxWinCtrl(u16 vp_Arfcn, u8 vp_WinId, t_L1d_Level *pp_level, u8 vp_Fb26SpecialCase) ====
674
Program everything on Vega & LMX for TX path
675
676
==== l1d0_7TxWinCtrl(u16 vp_Arfcn, u8 vp_WinId, u8 vp_TxPwr) ====
677
Programs everything on vega & LMX for TX path except power ramping
678
679
==== l1d0_8ILToGain(u16 vp_Arfcn, u8 vp_Band, t_L1d_Level *pp_level) ====
680
Computes the various gains to be programmed in the LMX3411 RF chip according to the expected input level at the antenna
681
682
==== l1d0_13ActivateRx (u16 vp_Start, u8 vp_Band) ====
683
Activate the Radio Rx path
684
685
==== l1d0_15RfInit(void) ====
686
Initialization routine for RF
687
688
==== l1d0_16ProgRfArfcn(u16 vp_Arfcn, u8 vp_TxRx, u8 vp_Band) ====
689
Program RF synthesizer N-Counter
690
691
==== l1dmacro_reset_hw(u32 vp_ServingCellOffset) ====
692
Reset and set OFFSET register serving cell offset
693
694
==== l1dmacro_init_hw(void) ====
695
Reset VEGA, then remove reset & Init RF synthesizers
696
697
==== l1d_GenerateLMXRCountRegister(u8 vp_Band, u8 vp_TxRx) ====
698
Creates R counter register for LMX
699
700
== Data Structures ==
701
702
=== l1s (Layer1/L1c/Inc/l1_defty.h:T_L1S_GLOBAL) ===
703
Global Layer1 Sync variables, such as
704
 * L1S Task Management
705
 * MFTAB management variables
706
 * Control Parameters (TOA)
707
 * TPU and DSP control registers
708
 * Frame Number Management for serving cell (actual_time, next_time, next_plus_time)
709
 * TX Power management
710
 * RXqual mesurement
711
712
=== l1a (Layer1/L1c/Inc/l1_defty.h:T_L1A_GLOBAL) ===
713
Global Layer1 Async variables, such as
714
 * State for L1A machines (1 for each L1A_PROCESS)
715
 * L1A Task management
716
 * MEasurement task management
717
718
=== l1a_l1s_com (T_L1A_L1S_COM) ===
719
Communication Structure from L1A into L1S
720
 * serving cell identity / information
721
 * parameters for idle mode
722
 * parameters for CBCH
723
 * random access information
724
 * ADC management
725
 * TXPWR management
726
 * dedicated channel parameters (T_DEDIC_PARAM)
727
 * neighbor cell information
728
 * BA list / FULL list
729
 * L1S task management
730
 * measurement tasks management
731
 * input level memory for AGC management
732
733
=== l1s_dsp_com (T_L1S_DSP_COM) ===
734
Communication structure for L1S -> DSP communication
735
 * active page for ARM writing to DSP
736
 * active page for ARM reading from DSP
737
 * pointers to dual-buffered (DB) and non-dual-buffered (NDB) MCU<->DSP pages
738
739
==== T_DB_MCU_TO_DSP ===
740
 * {downlink,uplink} task {command, burst identifier}
741
  * d_task_d -- Downlink DSP task number
742
  * d_burst_d -- Downlink burst identifier
743
  * d_task_u -- Uplink DSP task number
744
  * d_burst_u -- Uplink burst identifier
745
 * d_task_md -- downlink monitoring (FB/SB) command
746
 * d_background -- background tasks
747
 * d_debug -- Debug/Acknowledge/general purpose word
748
 * d_task_ra -- RA task command
749
 * d_fn -- frane mumber in case of TCH
750
{{{
751
//        bit [0..7]  -> b_fn_report, FN in the normalized reporting period.
752
//        bit [8..15] -> b_fn_sid,    FN % 104, used for SID positionning.
753
}}}
754
 * d_ctrl_tch -- TCH description
755
{{{
756
//        bit [0..3]  -> b_chan_mode,    channel  mode.
757
//        bit [4..5]  -> b_chan_type,    channel type.
758
//        bit [6]     -> reset SACCH.
759
//        bit [7]     -> vocoder ON
760
//        bit [8]     -> b_sync_tch_ul,  synchro. TCH/UL.
761
//        bit [9]     -> b_sync_amr,
762
//        bit [10]    -> b_stop_tch_ul,  stop TCH/UL.
763
//        bit [11]    -> b_stop_tch_dl,  stop TCH/DL.
764
//        bit [12.14] -> b_tch_loop,     tch loops A/B/C.
765
//        bit [15]    -> b_subchannel
766
}}}
767
 * d_ctrl_abb -- Bit field indicating teh analog baseband register to send
768
{{{
769
//        bit [0]     -> b_ramp: the ramp information(a_ramp[]) is located in NDB
770
//        bit [1.2]   -> unused
771
//        bit [3]     -> b_apcdel: delays-register in NDB
772
//        bit [4]     -> b_afc: freq control register in DB
773
//        bit [5..15] -> unused
774
}}}
775
 * da_a5fn -- encryption frame number
776
{{{
777
//        word 0, bit [0..4]  -> T2.
778
//        word 0, bit [5..10] -> T3.
779
//        word 1, bit [0..11] -> T1.
780
}}}
781
 * d_power_ctl -- power level control (L1D_AUXAPC|n)
782
 * d_afc -- AFC value (enabled by b_afc in d_ctrl_abb)
783
 * d_ctrl_system -- Control Register for RESET/RESUME
784
{{{
785
//        bit [0..2] -> b_tsq,           training sequence.
786
//        bit [3]    -> b_bcch_freq_ind, BCCH frequency indication.
787
//        bit [15]   -> b_task_abort,    DSP task abort command.
788
}}}
789
790
==== T_DB_DSP_TO_MCU ====
791
 * {downlink,uplink} task {command, burst identifier}
792
  * d_task_d
793
  * d_burst_d
794
  * d_task_u
795
  * d_burst_u
796
 * d_task_md -- downlink monitoring (FB/SB) command
797
  * number of cells to monitor
798
 * d_background -- background tasks
799
 * d_task_ra -- RA task command
800
 * a_serv_Demod -- Serv. cell demod. result, array of 4 words (TOA,PM,ANGLE,SNR)
801
 * a_pm -- Power measurement results, array of 3 words
802
 * a_sch -- Header + SB information, array of 5 words
803
804
==== T_NDB_MCU_DSP ====
805
 * d_dsp_page
806
{{{
807
// bit[0]       -> B_GSM_PAGE: which of the two double-buffered pages is current
808
// bit[1]       -> B_GSM_TASK: is the GSM TASK active?
809
// bit[2]       -> B_MISC_PAGE: which of the two misc pages is current
810
// bit[3]       -> B_MISC_TASK: are MISC tasks active?
811
}}}
812
 * d_error_status -- DSP status returned (DSP->MCU)
813
 * d_spcx_rif -- RIF control (MCU->DSP), always set to 0x179
814
 * d_tch_mode -- TCH mode register
815
{{{
816
// bit [0..1]  -> b_dai_mode.
817
// bit [2]     -> b_dtx.
818
// bit[3]      -> play_ul when set to 1
819
// bit[4]      -> play_dl when set to 1
820
// bit[5]      -> DTX selection for voice memo
821
// bit[6]      -> Reserved for ciphering debug
822
// bit[7..10]  -> Reserved for ramp up control
823
// bit[11]     -> Reserved for analog device selection
824
}}}
825
 * d_debug1 -- bit 0 at 1 enable dsp f_tx delay of 400000 cyc DEBUG
826
 * d_dsp_test
827
 * API version number information
828
  * d_version_number1 -- code version number
829
  * d_version_number2 -- patch version number
830
 * debug buffer for tracing
831
  * p_debug_buffer
832
  * d_debug_buffer_size
833
  * d_debug_trace_type
834
 * d_dsp_state -- DSP report its stata: 0 run, 1 Idle1, 2 Idle2, 3 Idle3
835
 * p_debug_amr -- AMR debugging
836
 * d_mcsi_select -- Related to the MCSI bus interface
837
 * New words APCDEL1 and APCDEL2 for 2TX: TX/PRACH combinations
838
  * d_apcdel1_bis
839
  * d_apcdel2_bis
840
 * New registres due to IOTA ABB
841
  * d_apcdel2 -- copied from l1config.params.apcdel2
842
  * d_vbctrl2
843
  * d_bulgcal -- Calibration value copied from l1_config.params.bulgcal
844
 * Analog Base Band
845
  * d_afcctladd  -- Copied form l1_config.params.afcctladd
846
  * d_vbuctrl -- Voice Uplink Control?
847
  * d_vbdctrl -- Voice Downlink Control?
848
  * d_apcdel1 -- APC?
849
  * d_apcoff -- APC?
850
  * d_bulioff -- Copied from l1_config.params.bulioff
851
  * d_bulqoff -- Copied from l1_config.params.bulqoff
852
  * d_dai_onoff -- Copied from l1_config.params.dai_onoff
853
  * d_auxdac --
854
  * d_bbctrl
855
 * results of monitoring tasks (FB + SB) DSP->MCU
856
  * d_fb_det -- FB detection result (1 for FOUND)
857
  * d_fb_mode -- Mode for FB detection algorithm
858
   * FB_MODE_0 -- wideband search for FB detection
859
   * FB_MODE_1
860
  * a_async_demod[4] -- FB/SB demod. result (TOA,PM,ANGLE,SNR)
861
 * audio gain for upolink and downlink
862
  * d_audio_gain_ul
863
  * d_audio_gain_dl
864
 * audio playback related data
865
  * d_audio_compressor_ctrl
866
  * d_audio_init
867
  * d_audio_status
868
  * Tones (MCU -> DSP)
869
   * d_toneskb_init
870
   * d_toneskb_status
871
   * d_k_x1_t0
872
   * d_k_x1_t1
873
   * d_k_x1_t2
874
   * d_pe_rep
875
   * d_pe_off
876
   * d_se_off
877
   * d_bu_off
878
   * d_t0_on
879
   * d_t0_off
880
   * d_t1_on
881
   * d_t1_off
882
   * d_t2_on
883
   * d_t2_off
884
   * d_k_x1_kt0
885
   * d_k_x1_kt1
886
   * d_dur_kb
887
   * d_shiftdl
888
   * d_shiftul
889
   * d_aec_ctrl
890
   * d_es_level_api
891
   * d_mu_api
892
 * melody ringer module
893
  * d_melo_osc_used
894
  * d_melo_osc_active
895
  * a_melo_route0 ... a_melo_route7
896
  * d_melody_selection -- selection of melody format
897
 * speech recognition related data
898
  * d_sr_status
899
  * d_sr_param -- parameters for the DSP speech recognition task: OOV threshold
900
  * d_sr_bit_exact_test
901
  * d_sr_nb_words -- number of words used in the speech recognition task
902
  * d_sr_db_level -- Estimate voice level in dB
903
  * d_sr_db_noise -- Estimate noise in dB
904
  * a_n_best_words -- Array of the 4 best words
905
  * a_n_best_score -- Array of the 4 best scores (32bit for each score)
906
 * audio buffer
907
  * a_dd_1[22]
908
  * a_du_1[22]
909
 * v42bis module
910
  * d_v42b_nego0
911
  * d_v42b_nego1
912
  * d_v42b_control
913
  * d_v42b_ratio_ind
914
  * d_mcu_control
915
  * d_mcu_control_sema
916
 * background tasks
917
  * d_background_enable
918
   * B_DSPBGD_RECO -- background recognition task code
919
   * C_BGD_RECOGN
920
   * B_DSPBGD_UPD -- start of alignment update in dsp background
921
   * C_BGD_ALIGN
922
  * d_background_abort
923
  * d_background_state
924
  * d_max_background
925
  * a_background_tasks[16]
926
  * a_back_task_io[16]
927
 * GPRS/GEA ciphering info
928
  * d_gea_mode_ovly
929
  * a_gea_kc_ovly[4]
930
 * d_thr_usf_detect -- word used for the init of USF threshold
931
 * d_a5mode -- A5 encryption mode
932
 * d_sched_mode_grps_ovly
933
 * a_ramp[16] -- power ramp information
934
 * actual data inside logical channels
935
  * a_cd[15] -- CCCH/SACCH downlink information
936
  * a_fd[15] -- FACCH downlink information
937
  * a_dd_0[22] -- traffic downlink data frames
938
  * a_cu[15] -- CCCH/SACCH uplink information
939
  * a_fu[15] -- FACCH upilink information
940
  * a_du_0[22] -- TCH upilink data frames
941
  * d_rach -- RACH information (MCU -> DSP)
942
  * a_kc[4] -- Kc (MCU->DSP)
943
 * integrated data services module
944
 * speech recognition model
945
 * EOTD related data
946
 * AMR v1.0 buffers
947
  * a_amr_config[4]
948
  * a_ratscch_ul[6]
949
  * a_ratscch_dl[6]
950
  * d_amr_snr_est -- estimation of the SNR of the AMR speech block
951
  * detection thresholds
952
953
==== T_PARAM_MCU_DSP ====
954
955
All parameters are initialized at dsp_power_on() time form a static array.
956
957
 * d_transfer_rate
958
 * GPRS related latencies
959
  * d_lat_mcu_bridge
960
  * d_lat_mcu_hom2sam
961
  * d_lat_mcu_bef_fast_access
962
  * d_lat_dsp_after_sam
963
 * d_grps_install_address (dsp start address)
964
 * d_misc_config
965
 * d_cn_sw_workaround
966
 * d_fb_margin_beg
967
 * Frequency Correction Burst (FB)
968
  * d_fb_margin_beg
969
  * d_fb_margin_end
970
  * d_nsubb_idle
971
  * d_nsubb_dedic
972
  * d_fb_thr_det_iacq
973
  * d_fb_thr_det_track
974
 * Demodulation
975
  * d_dc_off_thres
976
  * d_dummy_thres
977
  * d_dem_pond_gewl
978
  * d_dem_pond_red
979
 * TCH/F V1 Full-Rate Speech
980
  * d_maccthresh1
981
  * d_mldt
982
  * d_maccthresh
983
  * d_gu
984
  * d_go
985
  * d_attmax
986
  * d_sm
987
  * d_b
988
 * V42bis related data
989
 * TCH/H V1 Half-Rate
990
  * d_ldT_hr
991
  * d_maccthresh_hr
992
  * d_maccthresh1_hr
993
  * d_gu_hr
994
  * d_go_hr
995
  * d_sm_hr
996
  * d_attmax_hr
997
 * TCH/F V2 EFR
998
  * c_mldt_efr
999
  * c_maccthresh_efr
1000
  * c_maccthresh1_efr
1001
  * c_gu_efr
1002
  * c_go_efr
1003
  * c_b_efr
1004
  * c_sm_efr
1005
  * c_attmax_efr
1006
 * CHED
1007
 * FACCH module
1008
  * d_facch_thr
1009
 * IDS module
1010
 * FIR coefficients
1011
  * a_fir31_uplink[31];
1012
  * a_fir32_downlink[31];
1013
1014
=== l1s_tpu_com (T_L1S_TPU_COM) ===
Add picture from clipboard (Maximum size: 48.8 MB)