FreeCalypso > hg > tcs211-l1-reconst
annotate chipsetsw/layer1/cfile/l1_mfmgr.c @ 249:b5f180a36b22
g23m/copyblobs.sh: l1tm_cust.obj deblobbed
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 16 Jan 2017 03:18:08 +0000 |
parents | f65c6343ddc7 |
children |
rev | line source |
---|---|
116
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
1 |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
2 /************* Revision Controle System Header ************* |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
3 * GSM Layer 1 software |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
4 * L1_MFMGR.C |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
5 * |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
6 * Filename l1_mfmgr.c |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
7 * Copyright 2003 (C) Texas Instruments |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
8 * |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
9 ************* Revision Controle System Header *************/ |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
10 |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
11 #define L1_MFMGR_C |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
12 |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
13 #include "l1_macro.h" |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
14 #include "l1_confg.h" |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
15 |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
16 #if (CODE_VERSION == SIMULATION) |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
17 #include <string.h> |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
18 #include "l1_types.h" |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
19 #include "sys_types.h" |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
20 #include "l1_const.h" |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
21 #if TESTMODE |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
22 #include "l1tm_defty.h" |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
23 #endif |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
24 #if (AUDIO_TASK == 1) |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
25 #include "l1audio_const.h" |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
26 #include "l1audio_cust.h" |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
27 #include "l1audio_defty.h" |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
28 #endif |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
29 #if (L1_GTT == 1) |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
30 #include "l1gtt_const.h" |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
31 #include "l1gtt_defty.h" |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
32 #endif |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
33 #if (L1_MP3 == 1) |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
34 #include "l1mp3_defty.h" |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
35 #endif |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
36 #if (L1_MIDI == 1) |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
37 #include "l1midi_defty.h" |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
38 #endif |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
39 #if (L1_AAC == 1) |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
40 #include "l1aac_defty.h" |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
41 #endif |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
42 #include "l1_defty.h" |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
43 #include "cust_os.h" |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
44 #include "l1_msgty.h" |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
45 #include "l1_varex.h" |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
46 #include "l1_proto.h" |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
47 #else |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
48 #include <string.h> |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
49 #include "l1_types.h" |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
50 #include "sys_types.h" |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
51 #include "l1_const.h" |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
52 |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
53 #if TESTMODE |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
54 #include "l1tm_defty.h" |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
55 #endif |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
56 #if (AUDIO_TASK == 1) |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
57 #include "l1audio_const.h" |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
58 #include "l1audio_cust.h" |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
59 #include "l1audio_defty.h" |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
60 #endif |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
61 #if (L1_GTT == 1) |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
62 #include "l1gtt_const.h" |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
63 #include "l1gtt_defty.h" |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
64 #endif |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
65 #if (L1_MP3 == 1) |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
66 #include "l1mp3_defty.h" |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
67 #endif |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
68 #if (L1_MIDI == 1) |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
69 #include "l1midi_defty.h" |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
70 #endif |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
71 #if (L1_AAC == 1) |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
72 #include "l1aac_defty.h" |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
73 #endif |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
74 #include "l1_defty.h" |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
75 #include "cust_os.h" |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
76 #include "l1_msgty.h" |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
77 #include "l1_varex.h" |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
78 #include "l1_proto.h" |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
79 #endif |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
80 #include "l1_tabs.h" |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
81 |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
82 /*-------------------------------------------------------*/ |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
83 /* l1s_clear_mftab() */ |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
84 /*-------------------------------------------------------*/ |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
85 /* Parameters : */ |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
86 /* Return : */ |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
87 /* Functionality : */ |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
88 /*-------------------------------------------------------*/ |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
89 void l1s_clear_mftab(T_FRM *frmlst) |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
90 { |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
91 WORD32 j,k; |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
92 |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
93 #if (TRACE_TYPE==5) |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
94 trace_mft("l1s_clear_mftab()", -1); |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
95 #endif |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
96 |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
97 // Clear MFTAB. |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
98 for (j=0; j<MFTAB_SIZE; j++) |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
99 { |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
100 for (k=0; k<L1_MAX_FCT; k++) |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
101 { |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
102 frmlst[j].fct[k].fct_ptr = NULL; // Enough to clear the MFTAB. |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
103 } |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
104 } |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
105 } |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
106 |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
107 /*-------------------------------------------------------*/ |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
108 /* l1s_load_mftab() */ |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
109 /*-------------------------------------------------------*/ |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
110 /* Parameters : */ |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
111 /* Return : */ |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
112 /* Functionality : */ |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
113 /*-------------------------------------------------------*/ |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
114 void l1s_load_mftab(const T_FCT *fct, const UWORD8 size, UWORD8 frame, T_FRM *frmlst) |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
115 { |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
116 UWORD8 i; |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
117 UWORD8 frame_count; |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
118 T_FRM *current_frm; |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
119 |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
120 #if (TRACE_TYPE==5) |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
121 trace_mft("l1s_load_mftab()", frame); |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
122 #endif |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
123 |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
124 if(fct != NULL) |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
125 // there is a Rom block available. |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
126 { |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
127 frame_count = 0; |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
128 |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
129 do |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
130 { |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
131 i=0; |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
132 current_frm = &(frmlst[frame]); |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
133 |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
134 while (fct->fct_ptr != NULL) |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
135 { |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
136 // ROM block is downloaded to RAM, it is added to current block contents in MFTAB. |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
137 // we have to look for a free place in the OPTIONAL struct. for current frame. |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
138 while (current_frm->fct[i].fct_ptr != NULL) i++; |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
139 |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
140 current_frm->fct[i] = *fct++; |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
141 i++; |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
142 } |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
143 |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
144 // increment "fct" to skip the NULL function... |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
145 fct++; |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
146 |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
147 // increment frame counter... |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
148 frame_count++; |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
149 |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
150 // increment frame counter with round up... |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
151 if(++frame >= MFTAB_SIZE) frame = 0; |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
152 } |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
153 while (frame_count < size); |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
154 // end of permanent table when all frame read from ROM block. |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
155 } |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
156 } |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
157 |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
158 /*-------------------------------------------------------*/ |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
159 /* l1s_exec_mftab() */ |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
160 /*-------------------------------------------------------*/ |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
161 /* Parameters : */ |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
162 /* Return : */ |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
163 /* Functionality : */ |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
164 /*-------------------------------------------------------*/ |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
165 void l1s_exec_mftab() |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
166 { |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
167 UWORD8 i=0; |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
168 T_FCT *current_fct; |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
169 |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
170 // Point to the first function for current frame. |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
171 current_fct = &(l1s.mftab.frmlst[l1s.afrm].fct[0]); |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
172 |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
173 do |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
174 /********************************************/ |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
175 /*** look at all fcts until L1_MAX_FCT ***/ |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
176 /********************************************/ |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
177 { |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
178 if (current_fct->fct_ptr != NULL) |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
179 /****************************************************/ |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
180 /* Check function is not NULL */ |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
181 /* -> execute functions and reset fct field */ |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
182 /****************************************************/ |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
183 { |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
184 UWORD8 param1 = current_fct->param1; |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
185 UWORD8 param2 = current_fct->param2; |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
186 |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
187 (*current_fct->fct_ptr)(param1,param2); // execute fction. |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
188 current_fct->fct_ptr = NULL; // clear executed fction. |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
189 current_fct->param1 = NO_PAR; // clear complexe function parameter. |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
190 current_fct->param2 = NO_PAR; // clear complexe function parameter. |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
191 } |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
192 |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
193 // Increment "i" and function pointer. |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
194 current_fct++; // point to next fction. |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
195 i++; // increment fction counter. |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
196 |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
197 } // end do. |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
198 while (i < L1_MAX_FCT); |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
199 } |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
200 |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
201 #if (FF_L1_FAST_DECODING == 1 ) |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
202 /*------------------------------------------------------- |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
203 l1s_clean_mftab() |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
204 ------------------------------------------------------- |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
205 Parameters :-current task in MFTAB |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
206 -current_tsk_frm : frame of current task |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
207 from which functions should be erase |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
208 Return : |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
209 Functionality : Clean a task being execute |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
210 first step of function is to look for the frame |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
211 from which we want to erase functions of the task. |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
212 Second step is to identify function to clean up : we |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
213 want clean up only functions of current task starting |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
214 from current_tsk_frm.Hence, a test is done to identify |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
215 function from TASK_ROM_MFTAB inside MFTAB by checking |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
216 fct pointer amd the two parameters param1 and param2. |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
217 If test is true (i.e parameters and function pointer |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
218 are used for the current task executuion ) , a clean |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
219 is done by setfct pointer to NULL |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
220 in order to erase this function of MFTAB .The clean up |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
221 is applied until the last frame used by current task |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
222 (number of frames used by a task is defined by size |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
223 variable). |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
224 When clean up is done , reset active frame if current |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
225 frame is the last frame of MFTAB. |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
226 This function allow to pipeline fast signaling blocks |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
227 with non fast signaling blocks without lose blocks. |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
228 -------------------------------------------------------*/ |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
229 void l1s_clean_mftab(UWORD8 task, UWORD8 current_tsk_frm) |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
230 { |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
231 T_FRM *p_current_frm; |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
232 const T_FCT *fct; |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
233 UWORD8 size; |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
234 UWORD8 frame; |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
235 UWORD8 i = 1;/*i refers to l1_mftab.h where we have frame 1,frame2,frame3... so i starts to 1*/ |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
236 UWORD8 j; |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
237 UWORD8 k; |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
238 |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
239 #if (TRACE_TYPE==5) |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
240 trace_mft("l1s_clean_mftab()", -1); |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
241 #endif |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
242 |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
243 fct = TASK_ROM_MFTAB[task].address; |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
244 size = TASK_ROM_MFTAB[task].size; |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
245 frame = l1s.afrm; |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
246 |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
247 /* Get the good frame in function block */ |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
248 while(i < current_tsk_frm) |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
249 { |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
250 while(fct->fct_ptr != NULL) |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
251 { |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
252 fct++;/* Skip non-nulll functions */ |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
253 } |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
254 fct++;/*Skip null function */ |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
255 i++; |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
256 } |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
257 |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
258 /* Search in MFTAB all functions relative to the block we want to erase*/ |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
259 while(i <= size) |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
260 { |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
261 p_current_frm = &(l1s.mftab.frmlst[frame]); |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
262 |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
263 while(fct->fct_ptr != NULL) |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
264 { |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
265 for(j = 0; j < L1_MAX_FCT; j++) |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
266 { |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
267 if(((p_current_frm->fct[j].param1 == task) && (p_current_frm->fct[j].param2 == fct->param2)) |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
268 && ( p_current_frm->fct[j].fct_ptr == fct->fct_ptr)) |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
269 { |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
270 p_current_frm->fct[j].fct_ptr = NULL; |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
271 |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
272 /*l1s_load_mftab function inserts a block just by looking if the function pointer is null : to avoid this issue, a remove dowwn */ |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
273 /*of all functions pointers of the frme is done so there is no hole and hence no possible block insertion*/ |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
274 if(frame != l1s.afrm) /* condition for shifting*/ |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
275 { |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
276 for( k = j; k < L1_MAX_FCT - 1; k ++) |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
277 { |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
278 p_current_frm->fct[k] = p_current_frm->fct[k + 1];/* alls pointers are going up of one position in the frame*/ |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
279 } |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
280 p_current_frm->fct[L1_MAX_FCT-1].fct_ptr = NULL; /*last pointer is setting to NULL to avoid to remove the last function fct[L1_MAX_FCT] */ |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
281 } |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
282 j = L1_MAX_FCT;/* Function found, exit to save time */ |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
283 } |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
284 } |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
285 fct++; |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
286 } |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
287 fct++; |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
288 i++; |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
289 if(++ frame >= MFTAB_SIZE) |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
290 { |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
291 frame = 0; |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
292 } |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
293 } |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
294 } |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
295 #endif /* if (FF_L1_FAST_DECODING == 1) */ |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
296 |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
297 |
f65c6343ddc7
l1_mfmgr.c: LoCosto module matches TCS211 w/o changes
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
15
diff
changeset
|
298 |