Project

General

Profile

TSM30Layer1 » History » Version 4

laforge, 02/19/2016 10:49 PM
Add section on L1A tasks

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 4 laforge
=== L1A Tasks ===
483 1 laforge
484 4 laforge
==== SYNCHRO ====
485 1 laforge
486 4 laforge
This task synchronizes the L1S to a new cell. 
487 1 laforge
488 4 laforge
It receives input parameters (arfcn, tn_difference, time_alignment) from L2/3 and programs the TPU accordingly.
489
490
There is no DSP task executed as part of SYNCHRO.
491
492 1 laforge
=== DSP Tasks ===
493
{{{
494
  #define HWTEST       0   // DSP checksum reading
495
  #define ADC_CSMODE0  1   // ADC task in CS_MODE0 mode
496
  #define DEDIC        2   // Global Dedicated mode switch
497
  #define RAACC        3   // Channel access (ul)
498
  #define RAHO         4   // Handover access (ul)
499
  #define NSYNC        5   // Global Neighbour cell synchro switch
500
  #define POLL         6   // Packet Polling (Access)
501
  #define PRACH        7   // Packet Random Access Channel
502
  #define ITMEAS       8   // Interference measurements
503
  #define FBNEW        9   // Frequency burst search (Idle mode)
504
  #define SBCONF       10   // Synchro. burst confirmation
505
  #define SB2          11  // Synchro. burst read (1 frame uncertainty / SB position)
506
  //#define PTCCH        12  // Packet Timing Advance control channel  CCR 9-12-02 BUG02527
507
  #define FB26         12  // Frequency burst search, dedic/transfer mode MF26 or MF52
508
  #define SB26         13  // Synchro burst search, dedic/transfer mode MF26 or MF52
509
  #define SBCNF26      14  // Synchro burst confirmation, dedic/transfer mode MF26 or MF52
510
  #define FB51         15  // Frequency burst search, dedic mode MF51
511
  #define SB51         16  // Synchro burst search, dedic MF51
512
  #define SBCNF51      17  // Synchro burst confirmation, dedic MF51
513
  #define PDTCH        18  // Packet Data channel
514
  #define BCCHN        19  // BCCH Neighbor in GSM Idle
515
  #define ALLC         20  // All CCCH Reading
516
  #define EBCCHS       21  // Extended BCCH Serving Reading
517
  #define NBCCHS       22  // Normal BCCH Serving       Reading
518
  #define SMSCB        23  // CBCH serving Reading
519
  #define ADL          24  // SACCH(SDCCH) DL
520
  #define AUL          25  // SACCH(SDCCH) UL
521
  #define DDL          26  // SDCCH DL
522
  #define DUL          27  // SDCCH UL
523
  #define TCHD         28  // Dummy for TCH Half rate
524
  #define TCHA         29  // SACCH(TCH)
525
  #define TCHTF        30  // TCH Full rate
526
  #define TCHTH        31  // TCH Half rate
527
  #define PALLC        32  // All PCCCH reading
528
  #define PSMSCB       33  // CBCH serving Reading while in Packet Idle
529
  #define PBCCHS       34  // PBCCH serving reading
530
  #define PNP          35  // Packet Normal paging Reading
531
  #define PEP          36  // Packet Extended paging Reading
532
  #define SINGLE       37  // Single Block for GPRS
533
  #define PBCCHN_TRAN  38  // Packet BCCH Neighbor in Packet Transfer mode.
534
  #define PBCCHN_IDLE  39  // Packet BCCH Neighbor in Idle mode.
535
  #define BCCHN_TRAN   40  // BCCH Neighbour in Packet Transfer mode
536
  #define NP           41  // Normal paging Reading
537
  #define EP           42  // Extended paging   Reading
538
  #define BCCHN_TOP    43  // BCCH Neighbour TOP priority in Idle mode
539
  #define PTCCH        44  // Packet Timing Advance control channel
540
  #define SYNCHRO      45  // synchro task: L1S reset
541
  #define PTS_START_TX_BURST_TEST 46 // PTS transmission test
542
  #define PTS_START_RX_BURST_TEST 47 // PTS receive test
543
  #define PTS_START_FB_BURST_TEST 48 // PTS frequency burst receive test
544
  #define PTS_START_FB26_BURST_TEST 49 // PTS frequency burst receive test
545
  #define PTS_START_SB26_BURST_TEST 50 // PTS frequency burst receive test
546
}}}
547
548
=== DSP Driver (l1_drive.c) ===
549
550
==== l1ddsp_load_monit_task(API monit_task, fb_mode) ====
551
552
* monit_taks = number of measurements (max 8) + sometimes 0x200
553
* set FB detection algorithm
554
555
==== l1ddsp_load_txpwr(u8 vp_TxPower, u16 vp_Arfcn) ====
556
557
==== l1ddsp_load_rx_task(API rx_task, UWORD8 burst_id, UWORD8 tsq) ====
558
559
Load values into l1s_dsp_com.dsp_db_w_ptr:
560
 * d_task_d = rx_task
561
 * d_burst_d = burst_id
562
 * d_ctrl_system |= tsq << B_TSQ
563
564
==== l1ddsp_load_ra_task(API ra_task) ====
565
 * d_task_ra = ra_task
566
567
==== l1ddsp_load_tch_mode(UWORD8 dai_mode, BOOL dtx_allowed) ====
568
569
==== l1ddsp_load_tch_param() ====
570
571
==== l1ddsp_load_ciph_param(UWORD8 a5mode, T_ENCRYPTION_KEY *ciph_key) ====
572
Set
573
 * l1s_dsp_com.dsp_ndb_ptr->d_a5mode = a5mode
574
 * l1s_dsp_com.dsp_ndb_ptr->a_kc
575
576
==== l1ddsp_stop_tch() ====
577
Set
578
 * l1s_dsp_com.dsp_db_w_ptr->d_ctrl_tch |= (B_STOP_TCH_UL|B_STOP_TCH_DL)
579
580
==== l1ddsp_end_scenario() ====
581
582
 * l1s_dsp_com.dsp_w_page
583
 * l1s_dsp_com.dsp_ndb_ptr->d_dsp_page
584
 * call l1dmacro_set_frame_it()
585
586
==== l1dmacro_set_frame_it() ====
587
588
Enable GSM Frame Interrupt on next TDMA frame
589
590
Typically called at the end of processing a TDMA frame interrupt
591
592
==== l1d_reset_hw(UWORD32 offset_value) ====
593
594
=== TPU Macros (Layer1/L1d/src/l1d_Tpu.hm) ===
595
596
==== MC_L1D_TPU_REWIND ====
597
Re-initialize the global current TPU pointer to L1D_TPU_RAM.
598
599
==== MC_L1D_TPU_SLEEP ====
600
Sleep for one TPU tick (instruction 0)
601
602
==== MC_L1D_TPU_MOVE(addr,data) ====
603
Put a MOVE instruction at the current TPU pointer
604
605
==== MC_L1D_TPU_AT(time) ====
606
Put an AT instruction at the current TPU pointer
607
608
==== MC_L1D_TPU_SYNC(time) ====
609
Put a SYNC instruction at the current TPU pointer
610
611
==== MC_L1D_TPU_WAIT(time) ====
612
Put a WAIT instruction at the current TPU pointer
613
614
==== MC_L1D_TPU_OFFSET(time) ====
615
Put a OFFSET instruction at the current TPU pointer
616
617
==== MC_L1D_TSP_ACT_INIT(signal) ====
618
 * set v_L1d_TspActValue == signal
619
 * issue MC_L1D_TPU_MOVE instructions for L1D_TSP_ACTX and L1D_TSP_ACT
620
621
==== MC_L1D_TSP_ACT_SET(signal) ====
622
 * set v_L1d_TspActValue |= signal
623
 * issue MC_L1D_TPU_MOVE instructions as required
624
625
==== MC_L1D_TSP_ACT_RESET(signal) ====
626
 * unset v_L1d_TspActValue |= signal
627
 * issue MC_L1D_TPU_MOVE instructions as required
628
629
=== TPU (Layer1/L1d/src/l1d_Tpu.c) ===
630
631
==== TP_Reset(u16 on) ====
632
 * Issue L1D_TPU_CTRL_RESET in L1D_TPU_CTRL register
633
 * Wait until reset has been asserted
634
635
==== TP_Enable(u16 on) ====
636
 * Set or unset L1D_TPU_CTRL_T_ENBL in L1D_TPU_CTRL
637
638
==== l1dmacro_idle(void) ====
639
640
==== l1dmacro_offset(u32 offset_value, s32 relative_time) ====
641
642
==== l1dmacro_synchro(u32 when, u32 value) ====
643
644
==== TPU_ClkEnable(SYS_UWORD16 on) ====
645
 * Set or unset L1D_TPU_CTRL_CLK_EN in TPU_CTRL
646
 * wait until change becomes active
647
648
==== TPU_FrameItEnable(void) ====
649
 * Enable Frame interrupt by TPU_CTRL_D_ENBL in TPU_CTRL
650
651
==== l1dmacro_set_frame_it(void) ====
652
 * Call TPU_FrameItEnable()
653
654
==== l1pdmacro_it_dsp_gen(WORD16 time)
655
 * MC_L1D_TPU_AT    (time);
656
 * MC_L1D_TPU_MOVE  (L1D_TPU_IT_DSP_PG,0x0001);
657
658
==== l1pdmacro_anchor(WORD16 time)
659
 * MC_L1D_TPU_AT    (time);
660
661
==== TPU_check_IT_DSP(void) ====
662
 * check if an IT DSP is still pending
663
664
=== RF Frontend Driver ===
665
666
==== l1d0_0ActivateTx (u16 vp_Start, u8 vp_TxPwr, u8 vp_Band) ====
667
Activate TX path of the radio section to transmit a burst
668
669
==== l1d0_1DeactivateTx (u16 vp_Start, u8 vp_TxPwr, u8 vp_Band) ====
670
671
==== l1d0_2CalcArfcnNcntValue(u16 vp_Arfcn, u8 vp_TxRx, u8 vp_Band) ====
672
Calculate N-Counter for RF-PLL
673
674
==== l1d0_3BuildGainReg(u16 vp_Arfcn, u8 vp_Band, t_L1d_Level *pp_Level) ====
675
Calculate AGC register prior to Rx
676
677
==== l1d0_4DeactivateRx(u16 vp_Start) ====
678
Deactivate Radio Rx power control paths
679
680
==== l1d0_6RxWinCtrl(u16 vp_Arfcn, u8 vp_WinId, t_L1d_Level *pp_level, u8 vp_Fb26SpecialCase) ====
681
Program everything on Vega & LMX for TX path
682
683
==== l1d0_7TxWinCtrl(u16 vp_Arfcn, u8 vp_WinId, u8 vp_TxPwr) ====
684
Programs everything on vega & LMX for TX path except power ramping
685
686
==== l1d0_8ILToGain(u16 vp_Arfcn, u8 vp_Band, t_L1d_Level *pp_level) ====
687
Computes the various gains to be programmed in the LMX3411 RF chip according to the expected input level at the antenna
688
689
==== l1d0_13ActivateRx (u16 vp_Start, u8 vp_Band) ====
690
Activate the Radio Rx path
691
692
==== l1d0_15RfInit(void) ====
693
Initialization routine for RF
694
695
==== l1d0_16ProgRfArfcn(u16 vp_Arfcn, u8 vp_TxRx, u8 vp_Band) ====
696
Program RF synthesizer N-Counter
697
698
==== l1dmacro_reset_hw(u32 vp_ServingCellOffset) ====
699
Reset and set OFFSET register serving cell offset
700
701
==== l1dmacro_init_hw(void) ====
702
Reset VEGA, then remove reset & Init RF synthesizers
703
704
==== l1d_GenerateLMXRCountRegister(u8 vp_Band, u8 vp_TxRx) ====
705
Creates R counter register for LMX
706
707
== Data Structures ==
708
709
=== l1s (Layer1/L1c/Inc/l1_defty.h:T_L1S_GLOBAL) ===
710
Global Layer1 Sync variables, such as
711
 * L1S Task Management
712
 * MFTAB management variables
713
 * Control Parameters (TOA)
714
 * TPU and DSP control registers
715
 * Frame Number Management for serving cell (actual_time, next_time, next_plus_time)
716
 * TX Power management
717
 * RXqual mesurement
718
719
=== l1a (Layer1/L1c/Inc/l1_defty.h:T_L1A_GLOBAL) ===
720
Global Layer1 Async variables, such as
721
 * State for L1A machines (1 for each L1A_PROCESS)
722
 * L1A Task management
723
 * MEasurement task management
724
725
=== l1a_l1s_com (T_L1A_L1S_COM) ===
726
Communication Structure from L1A into L1S
727
 * serving cell identity / information
728
 * parameters for idle mode
729
 * parameters for CBCH
730
 * random access information
731
 * ADC management
732
 * TXPWR management
733
 * dedicated channel parameters (T_DEDIC_PARAM)
734
 * neighbor cell information
735
 * BA list / FULL list
736
 * L1S task management
737
 * measurement tasks management
738
 * input level memory for AGC management
739
740
=== l1s_dsp_com (T_L1S_DSP_COM) ===
741
Communication structure for L1S -> DSP communication
742
 * active page for ARM writing to DSP
743
 * active page for ARM reading from DSP
744
 * pointers to dual-buffered (DB) and non-dual-buffered (NDB) MCU<->DSP pages
745
746 4 laforge
==== T_DB_MCU_TO_DSP ====
747 1 laforge
 * {downlink,uplink} task {command, burst identifier}
748
  * d_task_d -- Downlink DSP task number
749
  * d_burst_d -- Downlink burst identifier
750
  * d_task_u -- Uplink DSP task number
751
  * d_burst_u -- Uplink burst identifier
752
 * d_task_md -- downlink monitoring (FB/SB) command
753
 * d_background -- background tasks
754
 * d_debug -- Debug/Acknowledge/general purpose word
755
 * d_task_ra -- RA task command
756
 * d_fn -- frane mumber in case of TCH
757
{{{
758
//        bit [0..7]  -> b_fn_report, FN in the normalized reporting period.
759
//        bit [8..15] -> b_fn_sid,    FN % 104, used for SID positionning.
760
}}}
761
 * d_ctrl_tch -- TCH description
762
{{{
763
//        bit [0..3]  -> b_chan_mode,    channel  mode.
764
//        bit [4..5]  -> b_chan_type,    channel type.
765
//        bit [6]     -> reset SACCH.
766
//        bit [7]     -> vocoder ON
767
//        bit [8]     -> b_sync_tch_ul,  synchro. TCH/UL.
768
//        bit [9]     -> b_sync_amr,
769
//        bit [10]    -> b_stop_tch_ul,  stop TCH/UL.
770
//        bit [11]    -> b_stop_tch_dl,  stop TCH/DL.
771
//        bit [12.14] -> b_tch_loop,     tch loops A/B/C.
772
//        bit [15]    -> b_subchannel
773
}}}
774
 * d_ctrl_abb -- Bit field indicating teh analog baseband register to send
775
{{{
776
//        bit [0]     -> b_ramp: the ramp information(a_ramp[]) is located in NDB
777
//        bit [1.2]   -> unused
778
//        bit [3]     -> b_apcdel: delays-register in NDB
779
//        bit [4]     -> b_afc: freq control register in DB
780
//        bit [5..15] -> unused
781
}}}
782
 * da_a5fn -- encryption frame number
783
{{{
784
//        word 0, bit [0..4]  -> T2.
785
//        word 0, bit [5..10] -> T3.
786
//        word 1, bit [0..11] -> T1.
787
}}}
788
 * d_power_ctl -- power level control (L1D_AUXAPC|n)
789
 * d_afc -- AFC value (enabled by b_afc in d_ctrl_abb)
790
 * d_ctrl_system -- Control Register for RESET/RESUME
791
{{{
792
//        bit [0..2] -> b_tsq,           training sequence.
793
//        bit [3]    -> b_bcch_freq_ind, BCCH frequency indication.
794
//        bit [15]   -> b_task_abort,    DSP task abort command.
795
}}}
796
797
==== T_DB_DSP_TO_MCU ====
798
 * {downlink,uplink} task {command, burst identifier}
799
  * d_task_d
800
  * d_burst_d
801
  * d_task_u
802
  * d_burst_u
803
 * d_task_md -- downlink monitoring (FB/SB) command
804
  * number of cells to monitor
805
 * d_background -- background tasks
806
 * d_task_ra -- RA task command
807
 * a_serv_Demod -- Serv. cell demod. result, array of 4 words (TOA,PM,ANGLE,SNR)
808
 * a_pm -- Power measurement results, array of 3 words
809
 * a_sch -- Header + SB information, array of 5 words
810
811
==== T_NDB_MCU_DSP ====
812
 * d_dsp_page
813
{{{
814
// bit[0]       -> B_GSM_PAGE: which of the two double-buffered pages is current
815
// bit[1]       -> B_GSM_TASK: is the GSM TASK active?
816
// bit[2]       -> B_MISC_PAGE: which of the two misc pages is current
817
// bit[3]       -> B_MISC_TASK: are MISC tasks active?
818
}}}
819
 * d_error_status -- DSP status returned (DSP->MCU)
820
 * d_spcx_rif -- RIF control (MCU->DSP), always set to 0x179
821
 * d_tch_mode -- TCH mode register
822
{{{
823
// bit [0..1]  -> b_dai_mode.
824
// bit [2]     -> b_dtx.
825
// bit[3]      -> play_ul when set to 1
826
// bit[4]      -> play_dl when set to 1
827
// bit[5]      -> DTX selection for voice memo
828
// bit[6]      -> Reserved for ciphering debug
829
// bit[7..10]  -> Reserved for ramp up control
830
// bit[11]     -> Reserved for analog device selection
831
}}}
832
 * d_debug1 -- bit 0 at 1 enable dsp f_tx delay of 400000 cyc DEBUG
833
 * d_dsp_test
834
 * API version number information
835
  * d_version_number1 -- code version number
836
  * d_version_number2 -- patch version number
837
 * debug buffer for tracing
838
  * p_debug_buffer
839
  * d_debug_buffer_size
840
  * d_debug_trace_type
841
 * d_dsp_state -- DSP report its stata: 0 run, 1 Idle1, 2 Idle2, 3 Idle3
842
 * p_debug_amr -- AMR debugging
843
 * d_mcsi_select -- Related to the MCSI bus interface
844
 * New words APCDEL1 and APCDEL2 for 2TX: TX/PRACH combinations
845
  * d_apcdel1_bis
846
  * d_apcdel2_bis
847
 * New registres due to IOTA ABB
848
  * d_apcdel2 -- copied from l1config.params.apcdel2
849
  * d_vbctrl2
850
  * d_bulgcal -- Calibration value copied from l1_config.params.bulgcal
851
 * Analog Base Band
852
  * d_afcctladd  -- Copied form l1_config.params.afcctladd
853
  * d_vbuctrl -- Voice Uplink Control?
854
  * d_vbdctrl -- Voice Downlink Control?
855
  * d_apcdel1 -- APC?
856
  * d_apcoff -- APC?
857
  * d_bulioff -- Copied from l1_config.params.bulioff
858
  * d_bulqoff -- Copied from l1_config.params.bulqoff
859
  * d_dai_onoff -- Copied from l1_config.params.dai_onoff
860
  * d_auxdac --
861
  * d_bbctrl
862
 * results of monitoring tasks (FB + SB) DSP->MCU
863
  * d_fb_det -- FB detection result (1 for FOUND)
864
  * d_fb_mode -- Mode for FB detection algorithm
865
   * FB_MODE_0 -- wideband search for FB detection
866
   * FB_MODE_1
867
  * a_async_demod[4] -- FB/SB demod. result (TOA,PM,ANGLE,SNR)
868
 * audio gain for upolink and downlink
869
  * d_audio_gain_ul
870
  * d_audio_gain_dl
871
 * audio playback related data
872
  * d_audio_compressor_ctrl
873
  * d_audio_init
874
  * d_audio_status
875
  * Tones (MCU -> DSP)
876
   * d_toneskb_init
877
   * d_toneskb_status
878
   * d_k_x1_t0
879
   * d_k_x1_t1
880
   * d_k_x1_t2
881
   * d_pe_rep
882
   * d_pe_off
883
   * d_se_off
884
   * d_bu_off
885
   * d_t0_on
886
   * d_t0_off
887
   * d_t1_on
888
   * d_t1_off
889
   * d_t2_on
890
   * d_t2_off
891
   * d_k_x1_kt0
892
   * d_k_x1_kt1
893
   * d_dur_kb
894
   * d_shiftdl
895
   * d_shiftul
896
   * d_aec_ctrl
897
   * d_es_level_api
898
   * d_mu_api
899
 * melody ringer module
900
  * d_melo_osc_used
901
  * d_melo_osc_active
902
  * a_melo_route0 ... a_melo_route7
903
  * d_melody_selection -- selection of melody format
904
 * speech recognition related data
905
  * d_sr_status
906
  * d_sr_param -- parameters for the DSP speech recognition task: OOV threshold
907
  * d_sr_bit_exact_test
908
  * d_sr_nb_words -- number of words used in the speech recognition task
909
  * d_sr_db_level -- Estimate voice level in dB
910
  * d_sr_db_noise -- Estimate noise in dB
911
  * a_n_best_words -- Array of the 4 best words
912
  * a_n_best_score -- Array of the 4 best scores (32bit for each score)
913
 * audio buffer
914
  * a_dd_1[22]
915
  * a_du_1[22]
916
 * v42bis module
917
  * d_v42b_nego0
918
  * d_v42b_nego1
919
  * d_v42b_control
920
  * d_v42b_ratio_ind
921
  * d_mcu_control
922
  * d_mcu_control_sema
923
 * background tasks
924
  * d_background_enable
925
   * B_DSPBGD_RECO -- background recognition task code
926
   * C_BGD_RECOGN
927
   * B_DSPBGD_UPD -- start of alignment update in dsp background
928
   * C_BGD_ALIGN
929
  * d_background_abort
930
  * d_background_state
931
  * d_max_background
932
  * a_background_tasks[16]
933
  * a_back_task_io[16]
934
 * GPRS/GEA ciphering info
935
  * d_gea_mode_ovly
936
  * a_gea_kc_ovly[4]
937
 * d_thr_usf_detect -- word used for the init of USF threshold
938
 * d_a5mode -- A5 encryption mode
939
 * d_sched_mode_grps_ovly
940
 * a_ramp[16] -- power ramp information
941
 * actual data inside logical channels
942
  * a_cd[15] -- CCCH/SACCH downlink information
943
  * a_fd[15] -- FACCH downlink information
944
  * a_dd_0[22] -- traffic downlink data frames
945
  * a_cu[15] -- CCCH/SACCH uplink information
946
  * a_fu[15] -- FACCH upilink information
947
  * a_du_0[22] -- TCH upilink data frames
948
  * d_rach -- RACH information (MCU -> DSP)
949
  * a_kc[4] -- Kc (MCU->DSP)
950
 * integrated data services module
951
 * speech recognition model
952
 * EOTD related data
953
 * AMR v1.0 buffers
954
  * a_amr_config[4]
955
  * a_ratscch_ul[6]
956
  * a_ratscch_dl[6]
957
  * d_amr_snr_est -- estimation of the SNR of the AMR speech block
958
  * detection thresholds
959
960
==== T_PARAM_MCU_DSP ====
961
962
All parameters are initialized at dsp_power_on() time form a static array.
963
964
 * d_transfer_rate
965
 * GPRS related latencies
966
  * d_lat_mcu_bridge
967
  * d_lat_mcu_hom2sam
968
  * d_lat_mcu_bef_fast_access
969
  * d_lat_dsp_after_sam
970
 * d_grps_install_address (dsp start address)
971
 * d_misc_config
972
 * d_cn_sw_workaround
973
 * d_fb_margin_beg
974
 * Frequency Correction Burst (FB)
975
  * d_fb_margin_beg
976
  * d_fb_margin_end
977
  * d_nsubb_idle
978
  * d_nsubb_dedic
979
  * d_fb_thr_det_iacq
980
  * d_fb_thr_det_track
981
 * Demodulation
982
  * d_dc_off_thres
983
  * d_dummy_thres
984
  * d_dem_pond_gewl
985
  * d_dem_pond_red
986
 * TCH/F V1 Full-Rate Speech
987
  * d_maccthresh1
988
  * d_mldt
989
  * d_maccthresh
990
  * d_gu
991
  * d_go
992
  * d_attmax
993
  * d_sm
994
  * d_b
995
 * V42bis related data
996
 * TCH/H V1 Half-Rate
997
  * d_ldT_hr
998
  * d_maccthresh_hr
999
  * d_maccthresh1_hr
1000
  * d_gu_hr
1001
  * d_go_hr
1002
  * d_sm_hr
1003
  * d_attmax_hr
1004
 * TCH/F V2 EFR
1005
  * c_mldt_efr
1006
  * c_maccthresh_efr
1007
  * c_maccthresh1_efr
1008
  * c_gu_efr
1009
  * c_go_efr
1010
  * c_b_efr
1011
  * c_sm_efr
1012
  * c_attmax_efr
1013
 * CHED
1014
 * FACCH module
1015
  * d_facch_thr
1016
 * IDS module
1017
 * FIR coefficients
1018
  * a_fir31_uplink[31];
1019
  * a_fir32_downlink[31];
1020
1021
=== l1s_tpu_com (T_L1S_TPU_COM) ===
Add picture from clipboard (Maximum size: 48.8 MB)