Project

General

Profile

TSM30Layer1 » History » Version 2

laforge, 02/19/2016 10:49 PM
page outline

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
==== l1a_access_process() ====
304
305
Link Access Process.
306
{{{
307
/* Description : This state machine handles the access   */
308
/* to the network while in IDLE mode.                    */
309
/*                                                       */
310
/* Starting messages:        MPHC_RA_REQ                 */
311
/*                                                       */
312
/* Subsequent messages:      MPHC_RA_REQ                 */
313
/*                                                       */
314
/* Result messages (input):  L1C_RA_DONE                 */
315
/*                                                       */
316
/* Result messages (output): MPHC_RA_CON                 */
317
/*                                                       */
318
/* Reset message (input): MPHC_STOP_RA_REQ               */
319
/*                                                       */
320
/* Reset message (input): MPHC_STOP_RA_CON               */
321
}}}
322
323
==== l1a_dedicated_process() ====
324
325
Dedicated mode process
326
{{{
327
/* Description : This state machine handles the dedicated*/
328
/* mode setup (L1A side).                                */
329
/*                                                       */
330
/* Starting messages:        MPHC_IMMED_ASSIGN_REQ        */
331
/*                                                       */
332
/* Subsequent messages:      MPHC_CHANNEL_ASSIGN_REQ     */
333
/*                           MPHC_SYNC_HO_REQ             */
334
/*                           MPHC_PRE_SYNC_HO_REQ         */
335
/*                           MPHC_PSEUDO_SYNC_HO_REQ      */
336
/*                           MPHC_ASYNC_HO_REQ            */
337
/*                           MPHC_ASYNC_HO_COMPLETE       */
338
/*                           MPHC_HANDOVER_FAIL_REQ       */
339
/*                           MPHC_CHANGE_FREQUENCY        */
340
/*                           OML1_CLOSE_TCH_LOOP_REQ     */
341
/*                           OML1_OPEN_TCH_LOOP_REQ      */
342
/*                           OML1_START_DAI_TEST_REQ     */
343
/*                           OML1_STOP_DAI_TEST_REQ      */
344
/*                                                       */
345
/* Result messages (input):  L1C_DEDIC_DONE              */
346
/*                           L1C_SACCH_INFO              */
347
/*                                                       */
348
/* Result messages (output): MPHC_CHANNEL_ASSIGN_CON      */
349
/*                           MPHC_SYNC_HO_CON             */
350
/*                           MPHC_PRE_SYNC_HO_CON         */
351
/*                           MPHC_PSEUDO_SYNC_HO_CON      */
352
/*                           MPHC_ASYNC_HO_CON            */
353
/*                           MPHC_TA_FAIL_IND             */
354
/*                           MPHC_DATA_IND               */
355
/*                           OML1_CLOSE_TCH_LOOP_CON     */
356
/*                           OML1_OPEN_TCH_LOOP_CON      */
357
/*                           OML1_START_DAI_TEST_CON     */
358
/*                           OML1_STOP_DAI_TEST_CON      */
359
/*                                                       */
360
/* Reset messages (input):   MPHC_CHANNEL_RELEASE         */
361
}}}
362
363
==== l1a_dedic6_process ====
364
365
6 strongest Neighbor cells synchro. monitoring and BCCH reading
366
{{{
367
/* Description : This state machine handles the 6 strong.*/
368
/* neighbor cells management in dedicated mode.          */
369
/*                                                       */
370
/* Remark: in dedicated mode there is no reason to use   */
371
/* the task parameters semaphores since there is no      */
372
/* ambiguity and no asynchronous/synchronous conflict to */
373
/* care about.                                           */
374
/*                                                       */
375
/* Starting messages:        L1C_DEDIC_DONE              */
376
/*                                                       */
377
/* Result messages (input):  L1C_FB_INFO                 */
378
/*                           L1C_SB_INFO                 */
379
/*                           L1C_SBCONF_INFO             */
380
/*                                                       */
381
/* Reset messages (input):   MPHC_CHANNEL_RELEASE         */
382
}}}
383
384
=== layer 1 synchronous ===
385
386
==== Layer1/L1c/Src/l1_sync.c:hisr() ====
387
388
Interrupt Service Routine called by the DSP TDMA frame interrupt
389
 * Calls l1s_synch()
390
391
==== Layer1/L1c/Src/l1_sync.c:l1s_synch() ====
392
{{{
393
/* This function is the core of L1S. Here is a summary   */
394
/* of the execution:                                     */
395
/*                                                       */
396
/*  - Frame counters management.                         */
397
/*  - Get current communication page pointers.           */
398
/*  - RESET internal variables.                          */
399
/*  - RESET MCU->DSP DB communication page.              */
400
/*  - TOA update management.                             */
401
/*                                                       */
402
/*  - L1 task manager,                                   */
403
/*      - Dedicated_mode_manager.                        */
404
/*      - Task_scheduler.                                */
405
/*      - Execute_frame.                                 */
406
/*      - Neighbor cells measurement manager.            */
407
/*      - End manager.                                   */
408
}}}
409
410
==== l1s_dedicated_mode_manager() ====
411
412
* assignment of a new channel, changing channel mode, ciphering start, etc.
413
414
==== l1s_task_scheduler_process() ====
415
{{{
416
/* This function is the task scheduler of L1S. It        */
417
/* schedules any enabled task. When a task must start,   */
418
/* it becomes PENDING. Since several tasks can become    */
419
/* pending at the same time, the highest priority one    */
420
/* is elected. The elected task compete then with the    */
421
/* current running task. If they conflict, the highest   */
422
/* priority one wins. If the winning is the new comer    */
423
/* then the multiframe table is reset and the new coming */
424
/* task is installed.                                    */
425
}}}
426
427
==== l1s_execute_frame() ====
428
 * call l1s_exec_mftab()
429
430
==== Layer1/L1c/Src/l1_mfmgr.c:l1s_exec_mftab() ====
431
 * Execute functions from MFTAB
432
 FIXME
433
434
==== l1s_meas_manager() ====
435
{{{
436
/* Description:                                          */
437
/* ------------                                          */
438
/* This function is the measurement tasks manager.       */
439
/* The followings tasks are handled:                     */
440
/*                                                       */
441
/* FSMS_MEAS:                                            */
442
/* 1) Full list measurement in Cell Selection            */
443
/* The machine performs 1 valid measurement per carrier  */
444
/* from the full list of GSM carriers. To achieve 1      */
445
/* valid measurement, 2 attempt with 2 different AGC     */
446
/* are performed worst case. When all carriers are       */
447
/* a reporting message L1C_VALID_MEAS_INFO is built and */
448
/* sent to L1A.                                          */
449
/*                                                       */
450
/* 2) Full list measurement in Idle mode.                */
451
/* The machine performs 1 valid measurement per carrier  */
452
/* from the full list of GSM carriers. To achieve 1      */
453
/* valid measurement, 2 attempt with 2 different AGC     */
454
/* are performed worst case. When all carriers are       */
455
/* a reporting message L1C_VALID_MEAS_INFO is built and */
456
/* sent to L1A.                                          */
457
/*                                                       */
458
/* I_BAMS_MEAS: BA list measurement in Idle mode.        */
459
/* The machine performs 7 measurements per PCH reading   */
460
/* (3*2+1) looping on the BA list. When 7 measurements are */
461
/* completed (end of PCH) a reporting message            */
462
/* L1C_RXLEV_PERIODIC_DONE is built and sent to L1A.      */
463
}}}
464
465
==== l1s_end_manager() ====
466
 * copy page into real time trace buffer
467
468
==== l1s_increment_time() ====
469
 * Increament the various framenumbers by one
470
471
472
473
474
=== DSP Tasks ===
475
{{{
476
  #define HWTEST       0   // DSP checksum reading
477
  #define ADC_CSMODE0  1   // ADC task in CS_MODE0 mode
478
  #define DEDIC        2   // Global Dedicated mode switch
479
  #define RAACC        3   // Channel access (ul)
480
  #define RAHO         4   // Handover access (ul)
481
  #define NSYNC        5   // Global Neighbour cell synchro switch
482
  #define POLL         6   // Packet Polling (Access)
483
  #define PRACH        7   // Packet Random Access Channel
484
  #define ITMEAS       8   // Interference measurements
485
  #define FBNEW        9   // Frequency burst search (Idle mode)
486
  #define SBCONF       10   // Synchro. burst confirmation
487
  #define SB2          11  // Synchro. burst read (1 frame uncertainty / SB position)
488
  //#define PTCCH        12  // Packet Timing Advance control channel  CCR 9-12-02 BUG02527
489
  #define FB26         12  // Frequency burst search, dedic/transfer mode MF26 or MF52
490
  #define SB26         13  // Synchro burst search, dedic/transfer mode MF26 or MF52
491
  #define SBCNF26      14  // Synchro burst confirmation, dedic/transfer mode MF26 or MF52
492
  #define FB51         15  // Frequency burst search, dedic mode MF51
493
  #define SB51         16  // Synchro burst search, dedic MF51
494
  #define SBCNF51      17  // Synchro burst confirmation, dedic MF51
495
  #define PDTCH        18  // Packet Data channel
496
  #define BCCHN        19  // BCCH Neighbor in GSM Idle
497
  #define ALLC         20  // All CCCH Reading
498
  #define EBCCHS       21  // Extended BCCH Serving Reading
499
  #define NBCCHS       22  // Normal BCCH Serving       Reading
500
  #define SMSCB        23  // CBCH serving Reading
501
  #define ADL          24  // SACCH(SDCCH) DL
502
  #define AUL          25  // SACCH(SDCCH) UL
503
  #define DDL          26  // SDCCH DL
504
  #define DUL          27  // SDCCH UL
505
  #define TCHD         28  // Dummy for TCH Half rate
506
  #define TCHA         29  // SACCH(TCH)
507
  #define TCHTF        30  // TCH Full rate
508
  #define TCHTH        31  // TCH Half rate
509
  #define PALLC        32  // All PCCCH reading
510
  #define PSMSCB       33  // CBCH serving Reading while in Packet Idle
511
  #define PBCCHS       34  // PBCCH serving reading
512
  #define PNP          35  // Packet Normal paging Reading
513
  #define PEP          36  // Packet Extended paging Reading
514
  #define SINGLE       37  // Single Block for GPRS
515
  #define PBCCHN_TRAN  38  // Packet BCCH Neighbor in Packet Transfer mode.
516
  #define PBCCHN_IDLE  39  // Packet BCCH Neighbor in Idle mode.
517
  #define BCCHN_TRAN   40  // BCCH Neighbour in Packet Transfer mode
518
  #define NP           41  // Normal paging Reading
519
  #define EP           42  // Extended paging   Reading
520
  #define BCCHN_TOP    43  // BCCH Neighbour TOP priority in Idle mode
521
  #define PTCCH        44  // Packet Timing Advance control channel
522
  #define SYNCHRO      45  // synchro task: L1S reset
523
  #define PTS_START_TX_BURST_TEST 46 // PTS transmission test
524
  #define PTS_START_RX_BURST_TEST 47 // PTS receive test
525
  #define PTS_START_FB_BURST_TEST 48 // PTS frequency burst receive test
526
  #define PTS_START_FB26_BURST_TEST 49 // PTS frequency burst receive test
527
  #define PTS_START_SB26_BURST_TEST 50 // PTS frequency burst receive test
528
}}}
529
530
=== DSP Driver (l1_drive.c) ===
531
532
==== l1ddsp_load_monit_task(API monit_task, fb_mode) ====
533
534
* monit_taks = number of measurements (max 8) + sometimes 0x200
535
* set FB detection algorithm
536
537
==== l1ddsp_load_txpwr(u8 vp_TxPower, u16 vp_Arfcn) ====
538
539
==== l1ddsp_load_rx_task(API rx_task, UWORD8 burst_id, UWORD8 tsq) ====
540
541
Load values into l1s_dsp_com.dsp_db_w_ptr:
542
 * d_task_d = rx_task
543
 * d_burst_d = burst_id
544
 * d_ctrl_system |= tsq << B_TSQ
545
546
==== l1ddsp_load_ra_task(API ra_task) ====
547
 * d_task_ra = ra_task
548
549
==== l1ddsp_load_tch_mode(UWORD8 dai_mode, BOOL dtx_allowed) ====
550
551
==== l1ddsp_load_tch_param() ====
552
553
==== l1ddsp_load_ciph_param(UWORD8 a5mode, T_ENCRYPTION_KEY *ciph_key) ====
554
Set
555
 * l1s_dsp_com.dsp_ndb_ptr->d_a5mode = a5mode
556
 * l1s_dsp_com.dsp_ndb_ptr->a_kc
557
558
==== l1ddsp_stop_tch() ====
559
Set
560
 * l1s_dsp_com.dsp_db_w_ptr->d_ctrl_tch |= (B_STOP_TCH_UL|B_STOP_TCH_DL)
561
562
==== l1ddsp_end_scenario() ====
563
564
 * l1s_dsp_com.dsp_w_page
565
 * l1s_dsp_com.dsp_ndb_ptr->d_dsp_page
566
 * call l1dmacro_set_frame_it()
567
568
==== l1dmacro_set_frame_it() ====
569
570
Enable GSM Frame Interrupt on next TDMA frame
571
572
Typically called at the end of processing a TDMA frame interrupt
573
574
==== l1d_reset_hw(UWORD32 offset_value) ====
575
576
=== TPU Macros (Layer1/L1d/src/l1d_Tpu.hm) ===
577
578
==== MC_L1D_TPU_REWIND ====
579
Re-initialize the global current TPU pointer to L1D_TPU_RAM.
580
581
==== MC_L1D_TPU_SLEEP ====
582
Sleep for one TPU tick (instruction 0)
583
584
==== MC_L1D_TPU_MOVE(addr,data) ====
585
Put a MOVE instruction at the current TPU pointer
586
587
==== MC_L1D_TPU_AT(time) ====
588
Put an AT instruction at the current TPU pointer
589
590
==== MC_L1D_TPU_SYNC(time) ====
591
Put a SYNC instruction at the current TPU pointer
592
593
==== MC_L1D_TPU_WAIT(time) ====
594
Put a WAIT instruction at the current TPU pointer
595
596
==== MC_L1D_TPU_OFFSET(time) ====
597
Put a OFFSET instruction at the current TPU pointer
598
599
==== MC_L1D_TSP_ACT_INIT(signal) ====
600
 * set v_L1d_TspActValue == signal
601
 * issue MC_L1D_TPU_MOVE instructions for L1D_TSP_ACTX and L1D_TSP_ACT
602
603
==== MC_L1D_TSP_ACT_SET(signal) ====
604
 * set v_L1d_TspActValue |= signal
605
 * issue MC_L1D_TPU_MOVE instructions as required
606
607
==== MC_L1D_TSP_ACT_RESET(signal) ====
608
 * unset v_L1d_TspActValue |= signal
609
 * issue MC_L1D_TPU_MOVE instructions as required
610
611
=== TPU (Layer1/L1d/src/l1d_Tpu.c) ===
612
613
==== TP_Reset(u16 on) ====
614
 * Issue L1D_TPU_CTRL_RESET in L1D_TPU_CTRL register
615
 * Wait until reset has been asserted
616
617
==== TP_Enable(u16 on) ====
618
 * Set or unset L1D_TPU_CTRL_T_ENBL in L1D_TPU_CTRL
619
620
==== l1dmacro_idle(void) ====
621
622
==== l1dmacro_offset(u32 offset_value, s32 relative_time) ====
623
624
==== l1dmacro_synchro(u32 when, u32 value) ====
625
626
==== TPU_ClkEnable(SYS_UWORD16 on) ====
627
 * Set or unset L1D_TPU_CTRL_CLK_EN in TPU_CTRL
628
 * wait until change becomes active
629
630
==== TPU_FrameItEnable(void) ====
631
 * Enable Frame interrupt by TPU_CTRL_D_ENBL in TPU_CTRL
632
633
==== l1dmacro_set_frame_it(void) ====
634
 * Call TPU_FrameItEnable()
635
636
==== l1pdmacro_it_dsp_gen(WORD16 time)
637
 * MC_L1D_TPU_AT    (time);
638
 * MC_L1D_TPU_MOVE  (L1D_TPU_IT_DSP_PG,0x0001);
639
640
==== l1pdmacro_anchor(WORD16 time)
641
 * MC_L1D_TPU_AT    (time);
642
643
==== TPU_check_IT_DSP(void) ====
644
 * check if an IT DSP is still pending
645
646
=== RF Frontend Driver ===
647
648
==== l1d0_0ActivateTx (u16 vp_Start, u8 vp_TxPwr, u8 vp_Band) ====
649
Activate TX path of the radio section to transmit a burst
650
651
==== l1d0_1DeactivateTx (u16 vp_Start, u8 vp_TxPwr, u8 vp_Band) ====
652
653
==== l1d0_2CalcArfcnNcntValue(u16 vp_Arfcn, u8 vp_TxRx, u8 vp_Band) ====
654
Calculate N-Counter for RF-PLL
655
656
==== l1d0_3BuildGainReg(u16 vp_Arfcn, u8 vp_Band, t_L1d_Level *pp_Level) ====
657
Calculate AGC register prior to Rx
658
659
==== l1d0_4DeactivateRx(u16 vp_Start) ====
660
Deactivate Radio Rx power control paths
661
662
==== l1d0_6RxWinCtrl(u16 vp_Arfcn, u8 vp_WinId, t_L1d_Level *pp_level, u8 vp_Fb26SpecialCase) ====
663
Program everything on Vega & LMX for TX path
664
665
==== l1d0_7TxWinCtrl(u16 vp_Arfcn, u8 vp_WinId, u8 vp_TxPwr) ====
666
Programs everything on vega & LMX for TX path except power ramping
667
668
==== l1d0_8ILToGain(u16 vp_Arfcn, u8 vp_Band, t_L1d_Level *pp_level) ====
669
Computes the various gains to be programmed in the LMX3411 RF chip according to the expected input level at the antenna
670
671
==== l1d0_13ActivateRx (u16 vp_Start, u8 vp_Band) ====
672
Activate the Radio Rx path
673
674
==== l1d0_15RfInit(void) ====
675
Initialization routine for RF
676
677
==== l1d0_16ProgRfArfcn(u16 vp_Arfcn, u8 vp_TxRx, u8 vp_Band) ====
678
Program RF synthesizer N-Counter
679
680
==== l1dmacro_reset_hw(u32 vp_ServingCellOffset) ====
681
Reset and set OFFSET register serving cell offset
682
683
==== l1dmacro_init_hw(void) ====
684
Reset VEGA, then remove reset & Init RF synthesizers
685
686
==== l1d_GenerateLMXRCountRegister(u8 vp_Band, u8 vp_TxRx) ====
687
Creates R counter register for LMX
688
689
== Data Structures ==
690
691
=== l1s (Layer1/L1c/Inc/l1_defty.h:T_L1S_GLOBAL) ===
692
Global Layer1 Sync variables, such as
693
 * L1S Task Management
694
 * MFTAB management variables
695
 * Control Parameters (TOA)
696
 * TPU and DSP control registers
697
 * Frame Number Management for serving cell (actual_time, next_time, next_plus_time)
698
 * TX Power management
699
 * RXqual mesurement
700
701
=== l1a (Layer1/L1c/Inc/l1_defty.h:T_L1A_GLOBAL) ===
702
Global Layer1 Async variables, such as
703
 * State for L1A machines (1 for each L1A_PROCESS)
704
 * L1A Task management
705
 * MEasurement task management
706
707
=== l1a_l1s_com (T_L1A_L1S_COM) ===
708
Communication Structure from L1A into L1S
709
 * serving cell identity / information
710
 * parameters for idle mode
711
 * parameters for CBCH
712
 * random access information
713
 * ADC management
714
 * TXPWR management
715
 * dedicated channel parameters (T_DEDIC_PARAM)
716
 * neighbor cell information
717
 * BA list / FULL list
718
 * L1S task management
719
 * measurement tasks management
720
 * input level memory for AGC management
721
722
=== l1s_dsp_com (T_L1S_DSP_COM) ===
723
Communication structure for L1S -> DSP communication
724
 * active page for ARM writing to DSP
725
 * active page for ARM reading from DSP
726
 * pointers to dual-buffered (DB) and non-dual-buffered (NDB) MCU<->DSP pages
727
728
==== T_DB_MCU_TO_DSP ===
729
 * {downlink,uplink} task {command, burst identifier}
730
  * d_task_d -- Downlink DSP task number
731
  * d_burst_d -- Downlink burst identifier
732
  * d_task_u -- Uplink DSP task number
733
  * d_burst_u -- Uplink burst identifier
734
 * d_task_md -- downlink monitoring (FB/SB) command
735
 * d_background -- background tasks
736
 * d_debug -- Debug/Acknowledge/general purpose word
737
 * d_task_ra -- RA task command
738
 * d_fn -- frane mumber in case of TCH
739
{{{
740
//        bit [0..7]  -> b_fn_report, FN in the normalized reporting period.
741
//        bit [8..15] -> b_fn_sid,    FN % 104, used for SID positionning.
742
}}}
743
 * d_ctrl_tch -- TCH description
744
{{{
745
//        bit [0..3]  -> b_chan_mode,    channel  mode.
746
//        bit [4..5]  -> b_chan_type,    channel type.
747
//        bit [6]     -> reset SACCH.
748
//        bit [7]     -> vocoder ON
749
//        bit [8]     -> b_sync_tch_ul,  synchro. TCH/UL.
750
//        bit [9]     -> b_sync_amr,
751
//        bit [10]    -> b_stop_tch_ul,  stop TCH/UL.
752
//        bit [11]    -> b_stop_tch_dl,  stop TCH/DL.
753
//        bit [12.14] -> b_tch_loop,     tch loops A/B/C.
754
//        bit [15]    -> b_subchannel
755
}}}
756
 * d_ctrl_abb -- Bit field indicating teh analog baseband register to send
757
{{{
758
//        bit [0]     -> b_ramp: the ramp information(a_ramp[]) is located in NDB
759
//        bit [1.2]   -> unused
760
//        bit [3]     -> b_apcdel: delays-register in NDB
761
//        bit [4]     -> b_afc: freq control register in DB
762
//        bit [5..15] -> unused
763
}}}
764
 * da_a5fn -- encryption frame number
765
{{{
766
//        word 0, bit [0..4]  -> T2.
767
//        word 0, bit [5..10] -> T3.
768
//        word 1, bit [0..11] -> T1.
769
}}}
770
 * d_power_ctl -- power level control (L1D_AUXAPC|n)
771
 * d_afc -- AFC value (enabled by b_afc in d_ctrl_abb)
772
 * d_ctrl_system -- Control Register for RESET/RESUME
773
{{{
774
//        bit [0..2] -> b_tsq,           training sequence.
775
//        bit [3]    -> b_bcch_freq_ind, BCCH frequency indication.
776
//        bit [15]   -> b_task_abort,    DSP task abort command.
777
}}}
778
779
==== T_DB_DSP_TO_MCU ====
780
 * {downlink,uplink} task {command, burst identifier}
781
  * d_task_d
782
  * d_burst_d
783
  * d_task_u
784
  * d_burst_u
785
 * d_task_md -- downlink monitoring (FB/SB) command
786
  * number of cells to monitor
787
 * d_background -- background tasks
788
 * d_task_ra -- RA task command
789
 * a_serv_Demod -- Serv. cell demod. result, array of 4 words (TOA,PM,ANGLE,SNR)
790
 * a_pm -- Power measurement results, array of 3 words
791
 * a_sch -- Header + SB information, array of 5 words
792
793
==== T_NDB_MCU_DSP ====
794
 * d_dsp_page
795
{{{
796
// bit[0]       -> B_GSM_PAGE: which of the two double-buffered pages is current
797
// bit[1]       -> B_GSM_TASK: is the GSM TASK active?
798
// bit[2]       -> B_MISC_PAGE: which of the two misc pages is current
799
// bit[3]       -> B_MISC_TASK: are MISC tasks active?
800
}}}
801
 * d_error_status -- DSP status returned (DSP->MCU)
802
 * d_spcx_rif -- RIF control (MCU->DSP), always set to 0x179
803
 * d_tch_mode -- TCH mode register
804
{{{
805
// bit [0..1]  -> b_dai_mode.
806
// bit [2]     -> b_dtx.
807
// bit[3]      -> play_ul when set to 1
808
// bit[4]      -> play_dl when set to 1
809
// bit[5]      -> DTX selection for voice memo
810
// bit[6]      -> Reserved for ciphering debug
811
// bit[7..10]  -> Reserved for ramp up control
812
// bit[11]     -> Reserved for analog device selection
813
}}}
814
 * d_debug1 -- bit 0 at 1 enable dsp f_tx delay of 400000 cyc DEBUG
815
 * d_dsp_test
816
 * API version number information
817
  * d_version_number1 -- code version number
818
  * d_version_number2 -- patch version number
819
 * debug buffer for tracing
820
  * p_debug_buffer
821
  * d_debug_buffer_size
822
  * d_debug_trace_type
823
 * d_dsp_state -- DSP report its stata: 0 run, 1 Idle1, 2 Idle2, 3 Idle3
824
 * p_debug_amr -- AMR debugging
825
 * d_mcsi_select -- Related to the MCSI bus interface
826
 * New words APCDEL1 and APCDEL2 for 2TX: TX/PRACH combinations
827
  * d_apcdel1_bis
828
  * d_apcdel2_bis
829
 * New registres due to IOTA ABB
830
  * d_apcdel2 -- copied from l1config.params.apcdel2
831
  * d_vbctrl2
832
  * d_bulgcal -- Calibration value copied from l1_config.params.bulgcal
833
 * Analog Base Band
834
  * d_afcctladd  -- Copied form l1_config.params.afcctladd
835
  * d_vbuctrl -- Voice Uplink Control?
836
  * d_vbdctrl -- Voice Downlink Control?
837
  * d_apcdel1 -- APC?
838
  * d_apcoff -- APC?
839
  * d_bulioff -- Copied from l1_config.params.bulioff
840
  * d_bulqoff -- Copied from l1_config.params.bulqoff
841
  * d_dai_onoff -- Copied from l1_config.params.dai_onoff
842
  * d_auxdac --
843
  * d_bbctrl
844
 * results of monitoring tasks (FB + SB) DSP->MCU
845
  * d_fb_det -- FB detection result (1 for FOUND)
846
  * d_fb_mode -- Mode for FB detection algorithm
847
   * FB_MODE_0 -- wideband search for FB detection
848
   * FB_MODE_1
849
  * a_async_demod[4] -- FB/SB demod. result (TOA,PM,ANGLE,SNR)
850
 * audio gain for upolink and downlink
851
  * d_audio_gain_ul
852
  * d_audio_gain_dl
853
 * audio playback related data
854
  * d_audio_compressor_ctrl
855
  * d_audio_init
856
  * d_audio_status
857
  * Tones (MCU -> DSP)
858
   * d_toneskb_init
859
   * d_toneskb_status
860
   * d_k_x1_t0
861
   * d_k_x1_t1
862
   * d_k_x1_t2
863
   * d_pe_rep
864
   * d_pe_off
865
   * d_se_off
866
   * d_bu_off
867
   * d_t0_on
868
   * d_t0_off
869
   * d_t1_on
870
   * d_t1_off
871
   * d_t2_on
872
   * d_t2_off
873
   * d_k_x1_kt0
874
   * d_k_x1_kt1
875
   * d_dur_kb
876
   * d_shiftdl
877
   * d_shiftul
878
   * d_aec_ctrl
879
   * d_es_level_api
880
   * d_mu_api
881
 * melody ringer module
882
  * d_melo_osc_used
883
  * d_melo_osc_active
884
  * a_melo_route0 ... a_melo_route7
885
  * d_melody_selection -- selection of melody format
886
 * speech recognition related data
887
  * d_sr_status
888
  * d_sr_param -- parameters for the DSP speech recognition task: OOV threshold
889
  * d_sr_bit_exact_test
890
  * d_sr_nb_words -- number of words used in the speech recognition task
891
  * d_sr_db_level -- Estimate voice level in dB
892
  * d_sr_db_noise -- Estimate noise in dB
893
  * a_n_best_words -- Array of the 4 best words
894
  * a_n_best_score -- Array of the 4 best scores (32bit for each score)
895
 * audio buffer
896
  * a_dd_1[22]
897
  * a_du_1[22]
898
 * v42bis module
899
  * d_v42b_nego0
900
  * d_v42b_nego1
901
  * d_v42b_control
902
  * d_v42b_ratio_ind
903
  * d_mcu_control
904
  * d_mcu_control_sema
905
 * background tasks
906
  * d_background_enable
907
   * B_DSPBGD_RECO -- background recognition task code
908
   * C_BGD_RECOGN
909
   * B_DSPBGD_UPD -- start of alignment update in dsp background
910
   * C_BGD_ALIGN
911
  * d_background_abort
912
  * d_background_state
913
  * d_max_background
914
  * a_background_tasks[16]
915
  * a_back_task_io[16]
916
 * GPRS/GEA ciphering info
917
  * d_gea_mode_ovly
918
  * a_gea_kc_ovly[4]
919
 * d_thr_usf_detect -- word used for the init of USF threshold
920
 * d_a5mode -- A5 encryption mode
921
 * d_sched_mode_grps_ovly
922
 * a_ramp[16] -- power ramp information
923
 * actual data inside logical channels
924
  * a_cd[15] -- CCCH/SACCH downlink information
925
  * a_fd[15] -- FACCH downlink information
926
  * a_dd_0[22] -- traffic downlink data frames
927
  * a_cu[15] -- CCCH/SACCH uplink information
928
  * a_fu[15] -- FACCH upilink information
929
  * a_du_0[22] -- TCH upilink data frames
930
  * d_rach -- RACH information (MCU -> DSP)
931
  * a_kc[4] -- Kc (MCU->DSP)
932
 * integrated data services module
933
 * speech recognition model
934
 * EOTD related data
935
 * AMR v1.0 buffers
936
  * a_amr_config[4]
937
  * a_ratscch_ul[6]
938
  * a_ratscch_dl[6]
939
  * d_amr_snr_est -- estimation of the SNR of the AMR speech block
940
  * detection thresholds
941
942
==== T_PARAM_MCU_DSP ====
943
944
All parameters are initialized at dsp_power_on() time form a static array.
945
946
 * d_transfer_rate
947
 * GPRS related latencies
948
  * d_lat_mcu_bridge
949
  * d_lat_mcu_hom2sam
950
  * d_lat_mcu_bef_fast_access
951
  * d_lat_dsp_after_sam
952
 * d_grps_install_address (dsp start address)
953
 * d_misc_config
954
 * d_cn_sw_workaround
955
 * d_fb_margin_beg
956
 * Frequency Correction Burst (FB)
957
  * d_fb_margin_beg
958
  * d_fb_margin_end
959
  * d_nsubb_idle
960
  * d_nsubb_dedic
961
  * d_fb_thr_det_iacq
962
  * d_fb_thr_det_track
963
 * Demodulation
964
  * d_dc_off_thres
965
  * d_dummy_thres
966
  * d_dem_pond_gewl
967
  * d_dem_pond_red
968
 * TCH/F V1 Full-Rate Speech
969
  * d_maccthresh1
970
  * d_mldt
971
  * d_maccthresh
972
  * d_gu
973
  * d_go
974
  * d_attmax
975
  * d_sm
976
  * d_b
977
 * V42bis related data
978
 * TCH/H V1 Half-Rate
979
  * d_ldT_hr
980
  * d_maccthresh_hr
981
  * d_maccthresh1_hr
982
  * d_gu_hr
983
  * d_go_hr
984
  * d_sm_hr
985
  * d_attmax_hr
986
 * TCH/F V2 EFR
987
  * c_mldt_efr
988
  * c_maccthresh_efr
989
  * c_maccthresh1_efr
990
  * c_gu_efr
991
  * c_go_efr
992
  * c_b_efr
993
  * c_sm_efr
994
  * c_attmax_efr
995
 * CHED
996
 * FACCH module
997
  * d_facch_thr
998
 * IDS module
999
 * FIR coefficients
1000
  * a_fir31_uplink[31];
1001
  * a_fir32_downlink[31];
1002
1003
=== l1s_tpu_com (T_L1S_TPU_COM) ===
Add picture from clipboard (Maximum size: 48.8 MB)