comparison L1/include/l1_msgty.h @ 0:75a11d740a02

initial import of gsm-fw from freecalypso-sw rev 1033:5ab737ac3ad7
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 09 Jun 2016 00:02:41 +0000
parents
children f93dab57b032
comparison
equal deleted inserted replaced
-1:000000000000 0:75a11d740a02
1 /************* Revision Controle System Header *************
2 * GSM Layer 1 software
3 * L1_MSGTY.H
4 *
5 * Filename l1_msgty.h
6 * Copyright 2003 (C) Texas Instruments
7 *
8 ************* Revision Controle System Header *************/
9
10
11
12 /* channels types */
13 #define L2_CHANNEL_SACCH 1
14 #define L2_CHANNEL_SDCCH 2
15 #define L2_CHANNEL_FACCH_H 3
16 #define L2_CHANNEL_FACCH_F 4
17 #define L2_CHANNEL_CCCH 5
18 #define L2_CHANNEL_NBCCH 6
19 #define L2_CHANNEL_PCH 7
20 #define L2_CHANNEL_EPCH 8
21 #define L2_CHANNEL_CBCH 9
22 #define L2_CHANNEL_EBCCH 10
23
24 /****************************************************************/
25 /* Structure definition for L1S <-> DATA ADAPTOR data blocks */
26 /* TCH/9.6 -> 30 bytes */
27 /* TCH/4.8 -> 15 bytes */
28 /* TCH/2.4 -> 9 bytes */
29 /****************************************************************/
30 typedef struct
31 {
32 UWORD8 A[30];
33 }
34 T_DATA_FRAME;
35
36 /****************************************************************/
37 /* Structure definition for L1A <-> MMI messages */
38 /****************************************************************/
39
40 typedef struct
41 {
42 UWORD8 tx_flag;
43 UWORD8 traffic_period;
44 UWORD8 idle_period;
45 }
46 T_MMI_ADC_REQ;
47
48 /****************************************************************/
49 /* Structure definition for L1S <-> L1A messages */
50 /****************************************************************/
51 typedef T_PH_DATA_IND T_L1_BCCH_INFO;
52 typedef T_PH_DATA_IND T_L1_CCCH_INFO;
53
54 /****************************************************************/
55 /* Structure definition for new L3 <-> L1 messages */
56 /****************************************************************/
57
58 #if (OP_L1_STANDALONE == 1)
59 /* Message used for hardware dynamic configuration */
60 typedef struct
61 {
62 UWORD8 num_of_clock_cfg; // Dynamic clock configuration index
63 }
64 T_TST_HW_CONFIG_REQ;
65 #endif // OP_L1_STANDALONE
66
67 /* Message used for software dynamic configuration */
68 typedef struct
69 {
70 UWORD8 ids_enable; // activation of IDS module
71 T_FACCH_TEST_PARAMS facch_test;
72 }
73 T_TST_SW_CONFIG_REQ;
74
75 typedef struct
76 {
77 UWORD32 mf51_fn;
78 }
79 T_MPHC_START_CBCH_READING;
80
81 typedef struct
82 {
83 T_RXLEV_MEAS A[8];
84 UWORD8 nbr_of_carriers;
85 WORD8 s_rxlev;
86 UWORD8 ba_id;
87 //added for Enhanced RSSI
88 UWORD16 qual_acc_idle; // accumulated rxqual meas. on different channels in Idle mode.= error bits
89 UWORD32 qual_nbr_meas_idle; // accumulated rxqual meas. on different channels in Idle mode.= total number of bits decoded
90
91
92 }
93 T_MPHC_RXLEV_PERIODIC_IND;
94
95 typedef struct
96 {
97 TC_CHAN_LIST chan_list;
98 UWORD8 num_of_chans;
99 UWORD8 ba_id;
100 UWORD8 next_radio_freq_measured; // index of first radio_freq to be measured
101 }
102 T_MPHC_RXLEV_PERIODIC_REQ;
103
104 typedef struct
105 {
106 UWORD16 radio_freq; // carrier id.
107 }
108 T_MPHC_NCELL_FB_SB_READ;
109
110 typedef struct
111 {
112 UWORD16 radio_freq; // carrier id.
113 }
114 T_MPHC_START_BCCH_READING;
115
116 typedef struct
117 {
118 UWORD16 radio_freq; // carrier id.
119 UWORD32 fn_offset; // offset between fn of this NCELL and the SCELL fn.
120 UWORD32 time_alignmt; // time alignment.
121 UWORD8 bsic; // BSIC.
122 UWORD16 si_bit_map; // System Info. bit map.
123 }
124 T_MPHC_NCELL_BCCH_READ;
125
126 typedef struct
127 {
128 UWORD32 fn;
129 UWORD8 channel_request;
130 }
131 T_MPHC_RA_CON;
132
133 typedef struct
134 {
135 T_CHANNEL_DESCRIPTION channel_desc;
136 UWORD8 timing_advance;
137 T_MOBILE_ALLOCATION frequency_list;
138 T_STARTING_TIME starting_time;
139 T_MOBILE_ALLOCATION frequency_list_bef_sti;
140 UWORD8 maio_bef_sti;
141 BOOL dtx_allowed;
142 T_BCCH_LIST bcch_allocation;
143 UWORD8 ba_id;
144 BOOL pwrc;
145 }
146 T_MPHC_IMMED_ASSIGN_REQ;
147
148 typedef struct
149 {
150 T_CHANNEL_DESCRIPTION channel_desc_1;
151 UWORD8 channel_mode_1;
152 UWORD8 txpwr;
153 T_MOBILE_ALLOCATION frequency_list;
154 T_STARTING_TIME starting_time;
155 T_CHANNEL_DESCRIPTION channel_desc_2;
156 UWORD8 channel_mode_2;
157 T_MOBILE_ALLOCATION frequency_list_bef_sti;
158 T_CHANNEL_DESCRIPTION channel_desc_1_bef_sti;
159 T_CHANNEL_DESCRIPTION channel_desc_2_bef_sti;
160 UWORD8 cipher_mode;
161 UWORD8 a5_algorithm;
162 T_ENCRYPTION_KEY cipher_key;
163 BOOL dtx_allowed;
164 #if (AMR == 1)
165 T_AMR_CONFIGURATION amr_configuration;
166 #endif
167 }
168 T_MPHC_CHANNEL_ASSIGN_REQ;
169
170
171 typedef struct
172 {
173 UWORD8 cipher_mode;
174 UWORD8 a5_algorithm;
175 T_ENCRYPTION_KEY new_ciph_param;
176 }
177 T_MPHC_SET_CIPHERING_REQ;
178
179
180 typedef struct
181 {
182 T_CHANNEL_DESCRIPTION channel_desc;
183 T_MOBILE_ALLOCATION frequency_list;
184 T_STARTING_TIME starting_time;
185 }
186 T_MPHC_CHANGE_FREQUENCY;
187
188
189 typedef struct
190 {
191 UWORD8 txpwr;
192 UWORD8 rand;
193 UWORD8 channel_request;
194 #if (L1_FF_MULTIBAND == 0)
195 UWORD8 powerclass_band1;
196 UWORD8 powerclass_band2;
197 #endif
198
199 }
200 T_MPHC_RA_REQ;
201
202
203 typedef struct
204 {
205 T_HO_PARAMS handover_command;
206 UWORD32 fn_offset;
207 UWORD32 time_alignmt;
208 T_ENCRYPTION_KEY cipher_key;
209 #if (AMR == 1)
210 T_AMR_CONFIGURATION amr_configuration;
211 #endif // (AMR == 1)
212 #if ((REL99 == 1) && (FF_BHO == 1))
213 BOOL handover_type;
214 #endif
215 }
216 T_MPHC_ASYNC_HO_REQ;
217
218 typedef struct
219 {
220 T_HO_PARAMS handover_command;
221 UWORD32 fn_offset;
222 UWORD32 time_alignmt;
223 T_ENCRYPTION_KEY cipher_key;
224 BOOL nci;
225 BOOL timing_advance_valid;
226 UWORD8 timing_advance;
227 #if (AMR == 1)
228 T_AMR_CONFIGURATION amr_configuration;
229 #endif
230 #if ((REL99 == 1) && (FF_BHO == 1))
231 BOOL handover_type;
232 #endif
233 }
234 T_MPHC_PRE_SYNC_HO_REQ;
235
236 typedef struct
237 {
238 T_HO_PARAMS handover_command;
239 UWORD32 fn_offset;
240 UWORD32 time_alignmt;
241 T_ENCRYPTION_KEY cipher_key;
242 BOOL nci;
243 UWORD8 real_time_difference;
244 #if ((REL99 == 1) && (FF_BHO == 1))
245 BOOL handover_type;
246 #endif // #if ((REL99 == 1) && (FF_BHO == 1))
247 }
248 T_MPHC_PSEUDO_SYNC_HO_REQ;
249
250 typedef struct
251 {
252 T_HO_PARAMS handover_command;
253 UWORD32 fn_offset;
254 UWORD32 time_alignmt;
255 T_ENCRYPTION_KEY cipher_key;
256 BOOL nci;
257 #if (AMR == 1)
258 T_AMR_CONFIGURATION amr_configuration;
259 #endif
260 #if ((REL99 == 1) && (FF_BHO == 1))
261 BOOL handover_type;
262 #endif
263 }
264 T_MPHC_SYNC_HO_REQ;
265
266 typedef struct
267 {
268 UWORD8 cause;
269 #if ((REL99 == 1) && (FF_BHO == 1))
270 UWORD32 fn_offset;
271 UWORD32 time_alignment;
272 #endif
273 }
274 T_MPHC_HANDOVER_FINISHED;
275
276 typedef struct
277 {
278 BOOL dtx_used;
279 BOOL meas_valid;
280 WORD16 rxlev_full_acc;
281 UWORD8 rxlev_full_nbr_meas;
282 WORD16 rxlev_sub_acc;
283 UWORD8 rxlev_sub_nbr_meas;
284 UWORD16 rxqual_full_acc_errors;
285 UWORD16 rxqual_full_nbr_bits;
286 UWORD16 rxqual_sub_acc_errors;
287 UWORD16 rxqual_sub_nbr_bits;
288 UWORD8 no_of_ncell_meas;
289 T5_NCELL_MEAS ncell_meas;
290 UWORD8 ba_id;
291 UWORD8 timing_advance;
292 UWORD8 txpwr_used;
293 #if (REL99 == 1)
294 #if FF_EMR
295 WORD16 rxlev_val_acc;
296 UWORD8 rxlev_val_nbr_meas;
297 UWORD32 mean_bep_block_acc;
298 UWORD16 cv_bep_block_acc;
299 UWORD8 mean_bep_block_num;
300 UWORD8 cv_bep_block_num;
301 UWORD8 nbr_rcvd_blocks;
302 #endif
303 #endif
304
305 // RESERVED: for trace/debug only
306 UWORD8 facch_dl_count;
307 UWORD8 facch_ul_count;
308 #if (FF_REPEATED_DL_FACCH == 1)
309 UWORD8 facch_dl_combined_good_count; /* No of good decoded blocks after combining */
310 UWORD8 facch_dl_repetition_block_count; /* Total of Dl block count */
311 #endif
312 }
313 T_MPHC_MEAS_REPORT;
314
315 typedef T_NEW_BA_LIST T_MPHC_UPDATE_BA_LIST;
316
317
318 typedef struct
319 {
320 UWORD8 bs_pa_mfrms;
321 UWORD8 bs_ag_blks_res;
322 BOOL bcch_combined;
323 UWORD8 ccch_group;
324 UWORD8 page_group;
325 UWORD8 page_block_index;
326 UWORD8 page_mode;
327 }
328 T_MPHC_START_CCCH_REQ;
329
330 typedef struct
331 {
332 UWORD8 sb_flag; //TRUE if SB found and belongs to PLMN, otherwise FALSE
333 UWORD16 radio_freq; // carrier id.
334 UWORD8 bsic; // BSIC.
335 UWORD32 fn_offset; // offset between fn of this NCELL and the SCELL fn.
336 UWORD32 time_alignmt; // time alignment.
337 }
338 T_MPHC_NCELL_SB_READ;
339
340 typedef T_FULL_LIST_MEAS T_MPHC_RXLEV_REQ;
341 typedef T_FULL_LIST_MEAS T_L1C_VALID_MEAS_INFO;
342 typedef T_MPHC_RXLEV_PERIODIC_IND T_L1C_RXLEV_PERIODIC_DONE;
343
344 #if (L1_FF_MULTIBAND == 0)
345
346 typedef struct
347 {
348 UWORD8 radio_band_config; // frequency band configuration: E-GSM, DCS, GSM/DCS, PCS
349 }
350 T_MPHC_INIT_L1_REQ;
351
352 #else // For Multiband the Init request is just a dummy and init confirm contains info
353
354 typedef struct
355 {
356 T_L1_MULTIBAND_POWER_CLASS multiband_power_class[NB_MAX_GSM_BANDS];
357 }
358 T_MPHC_INIT_L1_CON;
359
360 #endif // L1_FF_MULTIBAND == 0
361
362 /****************************************************************/
363 /* Structure definition for Test <-> L1A messages */
364 /****************************************************************/
365
366 typedef struct
367 {
368 UWORD16 dsp_code_version;
369 UWORD16 dsp_checksum;
370 UWORD16 dsp_patch_version;
371 UWORD16 mcu_tcs_program_release;
372 UWORD16 mcu_tcs_official;
373 UWORD16 mcu_tcs_internal;
374 }
375 T_TST_TEST_HW_CON;
376
377 typedef struct
378 {
379 UWORD8 type;
380 }
381 T_L1_STATS_REQ;
382
383 ////////////////////
384 // Trace messages //
385 ////////////////////
386
387 #if ((TRACE_TYPE == 1) || (TRACE_TYPE == 4) || (TRACE_TYPE == 7))
388
389 #if (DSP_DEBUG_TRACE_ENABLE == 1)
390 // DSP DEBUG buffer display
391 typedef struct
392 {
393 UWORD16 size;
394 UWORD32 fn;
395 UWORD16 debug_time;
396 UWORD16 patch_version;
397 UWORD16 trace_level;
398 API buffer[2]; // ANOTHER DEFINITION ???
399 }
400 T_DSP_DEBUG_INFO;
401
402 // DSP AMR trace
403 typedef struct
404 {
405 UWORD16 size;
406 UWORD32 fn;
407 API buffer[2]; // ANOTHER DEFINITION ???
408 }
409 T_DSP_AMR_DEBUG_INFO;
410
411 #endif
412
413 typedef struct
414 {
415 UWORD32 trace_config;
416 UWORD32 rtt_cell_enable[8];
417 UWORD32 rtt_event;
418 }
419 T_TRACE_CONFIG_CHANGE;
420
421 #if (L1_GPRS)
422 // Packet transfer trace
423 typedef struct
424 {
425 UWORD32 fn;
426 UWORD8 rx_allocation;
427 UWORD8 tx_allocation;
428 BOOL blk_status;
429 UWORD8 dl_cs_type;
430 UWORD8 dl_status[4];
431 UWORD8 ul_status[8];
432 }
433 T_CONDENSED_PDTCH_INFO;
434 #endif
435
436 typedef struct
437 {
438 UWORD8 debug_code;
439 UWORD32 fn;
440 UWORD32 tab[7];
441 }
442 T_QUICK_TRACE;
443
444 #endif
445
446 #if ((TRACE_TYPE == 1) || (TRACE_TYPE == 4) || (TRACE_TYPE == 7))
447 typedef struct
448 {
449 UWORD8 debug_code;
450 UWORD32 tab[8];
451 }
452 T_TRACE_INFO;
453 #endif
454
455 #if (TRACE_TYPE==7) // CPU LOAD
456
457 // Number of measurements before output to UART
458
459 #define C_MESURE_DEPTH 13
460
461 /*
462 * cpu : hisr cpu load in microseconds
463 * cpu_access : lisr -> hisr begining cpu load in microseconds
464 * fn : Frame number modulo 104
465 */
466
467 typedef struct
468 {
469 UWORD16 cpu;
470 UWORD16 cpu_access;
471 UWORD8 fn;
472 BOOL valid;
473 }
474 T_MESURE;
475
476 typedef struct
477 {
478 UWORD8 debug_code;
479 T_MESURE tab[C_MESURE_DEPTH];
480 }
481 T_TRACE_INFO_CPU_LOAD;
482
483 #endif
484
485
486 /****************************************************************/
487 /* Structure definition for POWER MANAGEMENt. */
488 /****************************************************************/
489 typedef struct
490 {
491 UWORD8 sleep_mode;
492 UWORD16 clocks;
493 }
494 T_TST_SLEEP_REQ;
495
496 // ...................NEW FOR ALR....................
497 typedef struct
498 {
499 UWORD8 schedule_array_size;
500 T_BCCHS_SCHEDULE schedule_array[10];
501 }
502 T_MPHC_SCELL_NBCCH_REQ;
503
504 typedef struct
505 {
506 UWORD8 schedule_array_size;
507 T_BCCHS_SCHEDULE schedule_array[10];
508 }
509 T_MPHC_SCELL_EBCCH_REQ;
510
511 typedef struct
512 {
513 UWORD16 radio_freq;
514 UWORD32 fn_offset;
515 UWORD32 time_alignmt;
516 UWORD8 tsc;
517 UWORD16 bcch_blks_req;
518 #if L1_GPRS
519 UWORD8 gprs_priority;
520 #endif
521 }
522 T_MPHC_NCELL_BCCH_REQ;
523
524 typedef struct
525 {
526 UWORD16 radio_freq;
527 UWORD8 l2_channel;
528 BOOL error_flag;
529 T_RADIO_FRAME l2_frame;
530 UWORD8 tc;
531 WORD8 ccch_lev;
532 UWORD32 fn;
533
534 // L1S -> L1A data only
535 UWORD8 neigh_id;
536 }
537 T_MPHC_DATA_IND;
538
539 typedef T_MPHC_DATA_IND T_MPHC_NCELL_BCCH_IND;
540 typedef T_MPHC_DATA_IND T_L1C_BCCHS_INFO;
541 typedef T_MPHC_DATA_IND T_L1C_BCCHN_INFO;
542
543 typedef struct
544 {
545 UWORD16 radio_freq;
546 UWORD32 fn_offset;
547 UWORD32 time_alignmt;
548 UWORD8 timing_validity;
549 UWORD8 search_mode;
550 }
551 T_MPHC_NETWORK_SYNC_REQ;
552
553 typedef struct
554 {
555 UWORD16 radio_freq;
556 BOOL sb_flag;
557 UWORD32 fn_offset;
558 UWORD32 time_alignmt;
559 UWORD8 bsic;
560 }
561 T_MPHC_NETWORK_SYNC_IND;
562
563 typedef struct
564 {
565 UWORD16 radio_freq;
566 UWORD32 fn_offset;
567 UWORD32 time_alignmt;
568 UWORD8 timing_validity;
569 }
570 T_MPHC_NCELL_SYNC_REQ;
571
572 #if (L1_12NEIGH ==1)
573 typedef struct
574 {
575 UWORD8 eotd;
576 UWORD8 list_size;
577 T_MPHC_NCELL_SYNC_REQ ncell_list[NBR_NEIGHBOURS];
578 }
579 T_MPHC_NCELL_LIST_SYNC_REQ;
580 #endif
581
582
583
584 typedef struct
585 {
586 UWORD16 radio_freq;
587 BOOL sb_flag; // used to fill "data_valid" field for Cursor
588 UWORD32 fn_offset;
589 UWORD32 time_alignmt;
590 UWORD8 bsic;
591
592 // L1S -> L1A data only
593 UWORD8 neigh_id;
594 UWORD8 attempt;
595
596 // RESERVED: for trace/debug and test mode only
597 UWORD32 pm;
598 UWORD32 toa;
599 UWORD32 angle;
600 UWORD32 snr;
601
602 // EOTD data : L1S -> L1A
603 #if (L1_EOTD==1)
604 UWORD8 eotd_data_valid; // indicates to L3 that it's an EOTD result
605 UWORD8 mode; // indicates to CURSOR that it's Idle(0) or Dedicated (1)
606 WORD16 d_eotd_first;
607 WORD16 d_eotd_max;
608 UWORD32 d_eotd_nrj;
609 WORD16 a_eotd_crosscor[18];
610 UWORD32 timetag;
611 UWORD32 fn_sb_neigh; // used for Timetag computation
612 UWORD32 fn_in_SB; // sent to CURSOR for SC fn (header=46 ...)
613
614 // TOA correction for timetag in dedicated mode...
615 WORD32 toa_correction;
616
617 // for Debug traces ............
618 UWORD32 delta_fn;
619 WORD32 delta_qbit;
620 #endif
621 }
622 T_MPHC_NCELL_SYNC_IND;
623
624 typedef T_MPHC_NCELL_SYNC_IND T_L1C_SB_INFO;
625 typedef T_MPHC_NCELL_SYNC_IND T_L1C_SBCONF_INFO;
626
627 typedef struct
628 {
629 UWORD16 radio_freq;
630 UWORD32 fn_offset;
631 UWORD32 time_alignmt;
632 UWORD8 bsic;
633 }
634 T_MPHC_NEW_SCELL_REQ;
635
636 typedef struct
637 {
638 BOOL fb_flag;
639 WORD8 ntdma;
640 UWORD8 neigh_id;
641 #if (L1_12NEIGH ==1)
642 // L1S --> L1A data only
643 UWORD8 attempt;
644 #endif
645 // RESERVED: for Trace/Debug and test mode only
646 UWORD32 pm;
647 UWORD32 toa;
648 UWORD32 angle;
649 UWORD32 snr;
650 UWORD16 radio_freq;
651 }
652 T_L1C_FB_INFO;
653
654 #if ((REL99 == 1) && (FF_BHO == 1))
655 typedef struct
656 {
657 BOOL fb_flag;
658 BOOL sb_flag;
659 UWORD8 bsic;
660 UWORD32 fn_offset;
661 UWORD32 time_alignmt;
662 UWORD32 pm;
663 UWORD32 toa;
664 UWORD32 angle;
665 UWORD32 snr;
666 }
667 T_L1C_FBSB_INFO;
668 #endif
669
670 typedef struct
671 {
672 WORD8 radio_freq_array_size;
673 #if (L1_12NEIGH ==1)
674 UWORD16 radio_freq_array[NBR_NEIGHBOURS];
675 #else
676 UWORD16 radio_freq_array[6];
677 #endif
678 }
679 T_MPHC_STOP_NCELL_SYNC_REQ;
680
681 typedef struct
682 {
683 UWORD8 radio_freq_array_size;
684 UWORD16 radio_freq_array[6];
685 }
686 T_MPHC_STOP_NCELL_BCCH_REQ;
687
688 typedef struct
689 {
690 T_CHANNEL_DESCRIPTION cbch_desc;
691 T_MOBILE_ALLOCATION cbch_freq_list;
692 }
693 T_MPHC_CONFIG_CBCH_REQ;
694
695 typedef struct
696 {
697 BOOL extended_cbch;
698 UWORD8 schedule_length;
699 UWORD32 first_block_0;
700 UWORD16 first_block_1;
701 }
702 T_MPHC_CBCH_SCHEDULE_REQ;
703
704 typedef struct
705 {
706 UWORD8 tb_bitmap;
707 }
708 T_MPHC_CBCH_INFO_REQ;
709
710 typedef struct
711 {
712 BOOL extended_cbch;
713 UWORD32 first_block_0;
714 UWORD16 first_block_1;
715 }
716 T_MPHC_CBCH_UPDATE_REQ;
717
718 typedef struct
719 {
720 BOOL normal_cbch;
721 BOOL extended_cbch;
722 }
723 T_MPHC_STOP_CBCH_REQ;
724
725 // ...................NEW FOR ALR....................
726
727 /****************************************************************/
728 /* Structure definition for L1 configuration. */
729 /****************************************************************/
730 typedef struct
731 {
732 UWORD8 std;
733 UWORD8 swap_iq_band1;
734 UWORD8 swap_iq_band2;
735 UWORD8 pwr_mngt;
736 UWORD8 tx_pwr_code;
737 #if IDS
738 UWORD8 ids_enable;
739 #endif
740 T_FACCH_TEST_PARAMS facch_test;
741 UWORD16 dwnld;
742 UWORD8 pwr_mngt_mode_authorized;
743 UWORD32 pwr_mngt_clocks;
744 }
745 T_MMI_L1_CONFIG;