@@ -1,273 +1,273 | |||||
1 | ############################################################################# |
|
1 | ############################################################################# | |
2 | # Makefile for building: bin/fsw |
|
2 | # Makefile for building: bin/fsw | |
3 |
# Generated by qmake (2.01a) (Qt 4.8.6) on: |
|
3 | # Generated by qmake (2.01a) (Qt 4.8.6) on: Fri Jun 27 09:11:27 2014 | |
4 | # Project: fsw-qt.pro |
|
4 | # Project: fsw-qt.pro | |
5 | # Template: app |
|
5 | # Template: app | |
6 | # Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro |
|
6 | # Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro | |
7 | ############################################################################# |
|
7 | ############################################################################# | |
8 |
|
8 | |||
9 | ####### Compiler, tools and options |
|
9 | ####### Compiler, tools and options | |
10 |
|
10 | |||
11 | CC = sparc-rtems-gcc |
|
11 | CC = sparc-rtems-gcc | |
12 | CXX = sparc-rtems-g++ |
|
12 | CXX = sparc-rtems-g++ | |
13 |
DEFINES = -DSW_VERSION_N1= |
|
13 | DEFINES = -DSW_VERSION_N1=2 -DSW_VERSION_N2=0 -DSW_VERSION_N3=0 -DSW_VERSION_N4=1 -DPRINT_MESSAGES_ON_CONSOLE | |
14 | CFLAGS = -pipe -O3 -Wall $(DEFINES) |
|
14 | CFLAGS = -pipe -O3 -Wall $(DEFINES) | |
15 | CXXFLAGS = -pipe -O3 -Wall $(DEFINES) |
|
15 | CXXFLAGS = -pipe -O3 -Wall $(DEFINES) | |
16 | INCPATH = -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I../src -I../header -I../header/processing -I../src/LFR_basic-parameters |
|
16 | INCPATH = -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I../src -I../header -I../header/processing -I../src/LFR_basic-parameters | |
17 | LINK = sparc-rtems-g++ |
|
17 | LINK = sparc-rtems-g++ | |
18 | LFLAGS = |
|
18 | LFLAGS = | |
19 | LIBS = $(SUBLIBS) |
|
19 | LIBS = $(SUBLIBS) | |
20 | AR = sparc-rtems-ar rcs |
|
20 | AR = sparc-rtems-ar rcs | |
21 | RANLIB = |
|
21 | RANLIB = | |
22 | QMAKE = /usr/bin/qmake-qt4 |
|
22 | QMAKE = /usr/bin/qmake-qt4 | |
23 | TAR = tar -cf |
|
23 | TAR = tar -cf | |
24 | COMPRESS = gzip -9f |
|
24 | COMPRESS = gzip -9f | |
25 | COPY = cp -f |
|
25 | COPY = cp -f | |
26 | SED = sed |
|
26 | SED = sed | |
27 | COPY_FILE = $(COPY) |
|
27 | COPY_FILE = $(COPY) | |
28 | COPY_DIR = $(COPY) -r |
|
28 | COPY_DIR = $(COPY) -r | |
29 | STRIP = sparc-rtems-strip |
|
29 | STRIP = sparc-rtems-strip | |
30 | INSTALL_FILE = install -m 644 -p |
|
30 | INSTALL_FILE = install -m 644 -p | |
31 | INSTALL_DIR = $(COPY_DIR) |
|
31 | INSTALL_DIR = $(COPY_DIR) | |
32 | INSTALL_PROGRAM = install -m 755 -p |
|
32 | INSTALL_PROGRAM = install -m 755 -p | |
33 | DEL_FILE = rm -f |
|
33 | DEL_FILE = rm -f | |
34 | SYMLINK = ln -f -s |
|
34 | SYMLINK = ln -f -s | |
35 | DEL_DIR = rmdir |
|
35 | DEL_DIR = rmdir | |
36 | MOVE = mv -f |
|
36 | MOVE = mv -f | |
37 | CHK_DIR_EXISTS= test -d |
|
37 | CHK_DIR_EXISTS= test -d | |
38 | MKDIR = mkdir -p |
|
38 | MKDIR = mkdir -p | |
39 |
|
39 | |||
40 | ####### Output directory |
|
40 | ####### Output directory | |
41 |
|
41 | |||
42 | OBJECTS_DIR = obj/ |
|
42 | OBJECTS_DIR = obj/ | |
43 |
|
43 | |||
44 | ####### Files |
|
44 | ####### Files | |
45 |
|
45 | |||
46 | SOURCES = ../src/wf_handler.c \ |
|
46 | SOURCES = ../src/wf_handler.c \ | |
47 | ../src/tc_handler.c \ |
|
47 | ../src/tc_handler.c \ | |
48 | ../src/fsw_misc.c \ |
|
48 | ../src/fsw_misc.c \ | |
49 | ../src/fsw_init.c \ |
|
49 | ../src/fsw_init.c \ | |
50 | ../src/fsw_globals.c \ |
|
50 | ../src/fsw_globals.c \ | |
51 | ../src/fsw_spacewire.c \ |
|
51 | ../src/fsw_spacewire.c \ | |
52 | ../src/tc_load_dump_parameters.c \ |
|
52 | ../src/tc_load_dump_parameters.c \ | |
53 | ../src/tm_lfr_tc_exe.c \ |
|
53 | ../src/tm_lfr_tc_exe.c \ | |
54 | ../src/tc_acceptance.c \ |
|
54 | ../src/tc_acceptance.c \ | |
55 | ../src/processing/fsw_processing.c \ |
|
55 | ../src/processing/fsw_processing.c \ | |
56 | ../src/processing/avf0_prc0.c \ |
|
56 | ../src/processing/avf0_prc0.c \ | |
57 | ../src/processing/avf1_prc1.c \ |
|
57 | ../src/processing/avf1_prc1.c \ | |
58 | ../src/processing/avf2_prc2.c \ |
|
58 | ../src/processing/avf2_prc2.c \ | |
59 | ../src/lfr_cpu_usage_report.c \ |
|
59 | ../src/lfr_cpu_usage_report.c \ | |
60 | ../src/LFR_basic-parameters/basic_parameters.c |
|
60 | ../src/LFR_basic-parameters/basic_parameters.c | |
61 | OBJECTS = obj/wf_handler.o \ |
|
61 | OBJECTS = obj/wf_handler.o \ | |
62 | obj/tc_handler.o \ |
|
62 | obj/tc_handler.o \ | |
63 | obj/fsw_misc.o \ |
|
63 | obj/fsw_misc.o \ | |
64 | obj/fsw_init.o \ |
|
64 | obj/fsw_init.o \ | |
65 | obj/fsw_globals.o \ |
|
65 | obj/fsw_globals.o \ | |
66 | obj/fsw_spacewire.o \ |
|
66 | obj/fsw_spacewire.o \ | |
67 | obj/tc_load_dump_parameters.o \ |
|
67 | obj/tc_load_dump_parameters.o \ | |
68 | obj/tm_lfr_tc_exe.o \ |
|
68 | obj/tm_lfr_tc_exe.o \ | |
69 | obj/tc_acceptance.o \ |
|
69 | obj/tc_acceptance.o \ | |
70 | obj/fsw_processing.o \ |
|
70 | obj/fsw_processing.o \ | |
71 | obj/avf0_prc0.o \ |
|
71 | obj/avf0_prc0.o \ | |
72 | obj/avf1_prc1.o \ |
|
72 | obj/avf1_prc1.o \ | |
73 | obj/avf2_prc2.o \ |
|
73 | obj/avf2_prc2.o \ | |
74 | obj/lfr_cpu_usage_report.o \ |
|
74 | obj/lfr_cpu_usage_report.o \ | |
75 | obj/basic_parameters.o |
|
75 | obj/basic_parameters.o | |
76 | DIST = /usr/lib64/qt4/mkspecs/common/unix.conf \ |
|
76 | DIST = /usr/lib64/qt4/mkspecs/common/unix.conf \ | |
77 | /usr/lib64/qt4/mkspecs/common/linux.conf \ |
|
77 | /usr/lib64/qt4/mkspecs/common/linux.conf \ | |
78 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ |
|
78 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ | |
79 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ |
|
79 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ | |
80 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ |
|
80 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ | |
81 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ |
|
81 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ | |
82 | /usr/lib64/qt4/mkspecs/qconfig.pri \ |
|
82 | /usr/lib64/qt4/mkspecs/qconfig.pri \ | |
83 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \ |
|
83 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \ | |
84 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ |
|
84 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ | |
85 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ |
|
85 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ | |
86 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ |
|
86 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ | |
87 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ |
|
87 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ | |
88 | sparc.pri \ |
|
88 | sparc.pri \ | |
89 | /usr/lib64/qt4/mkspecs/features/release.prf \ |
|
89 | /usr/lib64/qt4/mkspecs/features/release.prf \ | |
90 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ |
|
90 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ | |
91 | /usr/lib64/qt4/mkspecs/features/shared.prf \ |
|
91 | /usr/lib64/qt4/mkspecs/features/shared.prf \ | |
92 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ |
|
92 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ | |
93 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ |
|
93 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ | |
94 | /usr/lib64/qt4/mkspecs/features/resources.prf \ |
|
94 | /usr/lib64/qt4/mkspecs/features/resources.prf \ | |
95 | /usr/lib64/qt4/mkspecs/features/uic.prf \ |
|
95 | /usr/lib64/qt4/mkspecs/features/uic.prf \ | |
96 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ |
|
96 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ | |
97 | /usr/lib64/qt4/mkspecs/features/lex.prf \ |
|
97 | /usr/lib64/qt4/mkspecs/features/lex.prf \ | |
98 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \ |
|
98 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \ | |
99 | fsw-qt.pro |
|
99 | fsw-qt.pro | |
100 | QMAKE_TARGET = fsw |
|
100 | QMAKE_TARGET = fsw | |
101 | DESTDIR = bin/ |
|
101 | DESTDIR = bin/ | |
102 | TARGET = bin/fsw |
|
102 | TARGET = bin/fsw | |
103 |
|
103 | |||
104 | first: all |
|
104 | first: all | |
105 | ####### Implicit rules |
|
105 | ####### Implicit rules | |
106 |
|
106 | |||
107 | .SUFFIXES: .o .c .cpp .cc .cxx .C |
|
107 | .SUFFIXES: .o .c .cpp .cc .cxx .C | |
108 |
|
108 | |||
109 | .cpp.o: |
|
109 | .cpp.o: | |
110 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" |
|
110 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | |
111 |
|
111 | |||
112 | .cc.o: |
|
112 | .cc.o: | |
113 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" |
|
113 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | |
114 |
|
114 | |||
115 | .cxx.o: |
|
115 | .cxx.o: | |
116 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" |
|
116 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | |
117 |
|
117 | |||
118 | .C.o: |
|
118 | .C.o: | |
119 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" |
|
119 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | |
120 |
|
120 | |||
121 | .c.o: |
|
121 | .c.o: | |
122 | $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<" |
|
122 | $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<" | |
123 |
|
123 | |||
124 | ####### Build rules |
|
124 | ####### Build rules | |
125 |
|
125 | |||
126 | all: Makefile $(TARGET) |
|
126 | all: Makefile $(TARGET) | |
127 |
|
127 | |||
128 | $(TARGET): $(OBJECTS) |
|
128 | $(TARGET): $(OBJECTS) | |
129 | @$(CHK_DIR_EXISTS) bin/ || $(MKDIR) bin/ |
|
129 | @$(CHK_DIR_EXISTS) bin/ || $(MKDIR) bin/ | |
130 | $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS) |
|
130 | $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS) | |
131 |
|
131 | |||
132 | Makefile: fsw-qt.pro /usr/lib64/qt4/mkspecs/linux-g++/qmake.conf /usr/lib64/qt4/mkspecs/common/unix.conf \ |
|
132 | Makefile: fsw-qt.pro /usr/lib64/qt4/mkspecs/linux-g++/qmake.conf /usr/lib64/qt4/mkspecs/common/unix.conf \ | |
133 | /usr/lib64/qt4/mkspecs/common/linux.conf \ |
|
133 | /usr/lib64/qt4/mkspecs/common/linux.conf \ | |
134 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ |
|
134 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ | |
135 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ |
|
135 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ | |
136 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ |
|
136 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ | |
137 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ |
|
137 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ | |
138 | /usr/lib64/qt4/mkspecs/qconfig.pri \ |
|
138 | /usr/lib64/qt4/mkspecs/qconfig.pri \ | |
139 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \ |
|
139 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \ | |
140 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ |
|
140 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ | |
141 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ |
|
141 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ | |
142 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ |
|
142 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ | |
143 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ |
|
143 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ | |
144 | sparc.pri \ |
|
144 | sparc.pri \ | |
145 | /usr/lib64/qt4/mkspecs/features/release.prf \ |
|
145 | /usr/lib64/qt4/mkspecs/features/release.prf \ | |
146 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ |
|
146 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ | |
147 | /usr/lib64/qt4/mkspecs/features/shared.prf \ |
|
147 | /usr/lib64/qt4/mkspecs/features/shared.prf \ | |
148 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ |
|
148 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ | |
149 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ |
|
149 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ | |
150 | /usr/lib64/qt4/mkspecs/features/resources.prf \ |
|
150 | /usr/lib64/qt4/mkspecs/features/resources.prf \ | |
151 | /usr/lib64/qt4/mkspecs/features/uic.prf \ |
|
151 | /usr/lib64/qt4/mkspecs/features/uic.prf \ | |
152 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ |
|
152 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ | |
153 | /usr/lib64/qt4/mkspecs/features/lex.prf \ |
|
153 | /usr/lib64/qt4/mkspecs/features/lex.prf \ | |
154 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf |
|
154 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf | |
155 | $(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro |
|
155 | $(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro | |
156 | /usr/lib64/qt4/mkspecs/common/unix.conf: |
|
156 | /usr/lib64/qt4/mkspecs/common/unix.conf: | |
157 | /usr/lib64/qt4/mkspecs/common/linux.conf: |
|
157 | /usr/lib64/qt4/mkspecs/common/linux.conf: | |
158 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf: |
|
158 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf: | |
159 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf: |
|
159 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf: | |
160 | /usr/lib64/qt4/mkspecs/common/g++-base.conf: |
|
160 | /usr/lib64/qt4/mkspecs/common/g++-base.conf: | |
161 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf: |
|
161 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf: | |
162 | /usr/lib64/qt4/mkspecs/qconfig.pri: |
|
162 | /usr/lib64/qt4/mkspecs/qconfig.pri: | |
163 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri: |
|
163 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri: | |
164 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf: |
|
164 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf: | |
165 | /usr/lib64/qt4/mkspecs/features/qt_config.prf: |
|
165 | /usr/lib64/qt4/mkspecs/features/qt_config.prf: | |
166 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf: |
|
166 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf: | |
167 | /usr/lib64/qt4/mkspecs/features/default_pre.prf: |
|
167 | /usr/lib64/qt4/mkspecs/features/default_pre.prf: | |
168 | sparc.pri: |
|
168 | sparc.pri: | |
169 | /usr/lib64/qt4/mkspecs/features/release.prf: |
|
169 | /usr/lib64/qt4/mkspecs/features/release.prf: | |
170 | /usr/lib64/qt4/mkspecs/features/default_post.prf: |
|
170 | /usr/lib64/qt4/mkspecs/features/default_post.prf: | |
171 | /usr/lib64/qt4/mkspecs/features/shared.prf: |
|
171 | /usr/lib64/qt4/mkspecs/features/shared.prf: | |
172 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf: |
|
172 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf: | |
173 | /usr/lib64/qt4/mkspecs/features/warn_on.prf: |
|
173 | /usr/lib64/qt4/mkspecs/features/warn_on.prf: | |
174 | /usr/lib64/qt4/mkspecs/features/resources.prf: |
|
174 | /usr/lib64/qt4/mkspecs/features/resources.prf: | |
175 | /usr/lib64/qt4/mkspecs/features/uic.prf: |
|
175 | /usr/lib64/qt4/mkspecs/features/uic.prf: | |
176 | /usr/lib64/qt4/mkspecs/features/yacc.prf: |
|
176 | /usr/lib64/qt4/mkspecs/features/yacc.prf: | |
177 | /usr/lib64/qt4/mkspecs/features/lex.prf: |
|
177 | /usr/lib64/qt4/mkspecs/features/lex.prf: | |
178 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf: |
|
178 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf: | |
179 | qmake: FORCE |
|
179 | qmake: FORCE | |
180 | @$(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro |
|
180 | @$(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro | |
181 |
|
181 | |||
182 | dist: |
|
182 | dist: | |
183 | @$(CHK_DIR_EXISTS) obj/fsw1.0.0 || $(MKDIR) obj/fsw1.0.0 |
|
183 | @$(CHK_DIR_EXISTS) obj/fsw1.0.0 || $(MKDIR) obj/fsw1.0.0 | |
184 | $(COPY_FILE) --parents $(SOURCES) $(DIST) obj/fsw1.0.0/ && (cd `dirname obj/fsw1.0.0` && $(TAR) fsw1.0.0.tar fsw1.0.0 && $(COMPRESS) fsw1.0.0.tar) && $(MOVE) `dirname obj/fsw1.0.0`/fsw1.0.0.tar.gz . && $(DEL_FILE) -r obj/fsw1.0.0 |
|
184 | $(COPY_FILE) --parents $(SOURCES) $(DIST) obj/fsw1.0.0/ && (cd `dirname obj/fsw1.0.0` && $(TAR) fsw1.0.0.tar fsw1.0.0 && $(COMPRESS) fsw1.0.0.tar) && $(MOVE) `dirname obj/fsw1.0.0`/fsw1.0.0.tar.gz . && $(DEL_FILE) -r obj/fsw1.0.0 | |
185 |
|
185 | |||
186 |
|
186 | |||
187 | clean:compiler_clean |
|
187 | clean:compiler_clean | |
188 | -$(DEL_FILE) $(OBJECTS) |
|
188 | -$(DEL_FILE) $(OBJECTS) | |
189 | -$(DEL_FILE) *~ core *.core |
|
189 | -$(DEL_FILE) *~ core *.core | |
190 |
|
190 | |||
191 |
|
191 | |||
192 | ####### Sub-libraries |
|
192 | ####### Sub-libraries | |
193 |
|
193 | |||
194 | distclean: clean |
|
194 | distclean: clean | |
195 | -$(DEL_FILE) $(TARGET) |
|
195 | -$(DEL_FILE) $(TARGET) | |
196 | -$(DEL_FILE) Makefile |
|
196 | -$(DEL_FILE) Makefile | |
197 |
|
197 | |||
198 |
|
198 | |||
199 | grmon: |
|
199 | grmon: | |
200 | cd bin && C:/opt/grmon-eval-2.0.29b/win32/bin/grmon.exe -uart COM4 -u |
|
200 | cd bin && C:/opt/grmon-eval-2.0.29b/win32/bin/grmon.exe -uart COM4 -u | |
201 |
|
201 | |||
202 | check: first |
|
202 | check: first | |
203 |
|
203 | |||
204 | compiler_rcc_make_all: |
|
204 | compiler_rcc_make_all: | |
205 | compiler_rcc_clean: |
|
205 | compiler_rcc_clean: | |
206 | compiler_uic_make_all: |
|
206 | compiler_uic_make_all: | |
207 | compiler_uic_clean: |
|
207 | compiler_uic_clean: | |
208 | compiler_image_collection_make_all: qmake_image_collection.cpp |
|
208 | compiler_image_collection_make_all: qmake_image_collection.cpp | |
209 | compiler_image_collection_clean: |
|
209 | compiler_image_collection_clean: | |
210 | -$(DEL_FILE) qmake_image_collection.cpp |
|
210 | -$(DEL_FILE) qmake_image_collection.cpp | |
211 | compiler_yacc_decl_make_all: |
|
211 | compiler_yacc_decl_make_all: | |
212 | compiler_yacc_decl_clean: |
|
212 | compiler_yacc_decl_clean: | |
213 | compiler_yacc_impl_make_all: |
|
213 | compiler_yacc_impl_make_all: | |
214 | compiler_yacc_impl_clean: |
|
214 | compiler_yacc_impl_clean: | |
215 | compiler_lex_make_all: |
|
215 | compiler_lex_make_all: | |
216 | compiler_lex_clean: |
|
216 | compiler_lex_clean: | |
217 | compiler_clean: |
|
217 | compiler_clean: | |
218 |
|
218 | |||
219 | ####### Compile |
|
219 | ####### Compile | |
220 |
|
220 | |||
221 | obj/wf_handler.o: ../src/wf_handler.c |
|
221 | obj/wf_handler.o: ../src/wf_handler.c | |
222 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/wf_handler.o ../src/wf_handler.c |
|
222 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/wf_handler.o ../src/wf_handler.c | |
223 |
|
223 | |||
224 | obj/tc_handler.o: ../src/tc_handler.c |
|
224 | obj/tc_handler.o: ../src/tc_handler.c | |
225 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_handler.o ../src/tc_handler.c |
|
225 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_handler.o ../src/tc_handler.c | |
226 |
|
226 | |||
227 | obj/fsw_misc.o: ../src/fsw_misc.c |
|
227 | obj/fsw_misc.o: ../src/fsw_misc.c | |
228 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_misc.o ../src/fsw_misc.c |
|
228 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_misc.o ../src/fsw_misc.c | |
229 |
|
229 | |||
230 | obj/fsw_init.o: ../src/fsw_init.c ../src/fsw_config.c |
|
230 | obj/fsw_init.o: ../src/fsw_init.c ../src/fsw_config.c | |
231 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_init.o ../src/fsw_init.c |
|
231 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_init.o ../src/fsw_init.c | |
232 |
|
232 | |||
233 | obj/fsw_globals.o: ../src/fsw_globals.c |
|
233 | obj/fsw_globals.o: ../src/fsw_globals.c | |
234 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_globals.o ../src/fsw_globals.c |
|
234 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_globals.o ../src/fsw_globals.c | |
235 |
|
235 | |||
236 | obj/fsw_spacewire.o: ../src/fsw_spacewire.c |
|
236 | obj/fsw_spacewire.o: ../src/fsw_spacewire.c | |
237 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_spacewire.o ../src/fsw_spacewire.c |
|
237 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_spacewire.o ../src/fsw_spacewire.c | |
238 |
|
238 | |||
239 | obj/tc_load_dump_parameters.o: ../src/tc_load_dump_parameters.c |
|
239 | obj/tc_load_dump_parameters.o: ../src/tc_load_dump_parameters.c | |
240 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_load_dump_parameters.o ../src/tc_load_dump_parameters.c |
|
240 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_load_dump_parameters.o ../src/tc_load_dump_parameters.c | |
241 |
|
241 | |||
242 | obj/tm_lfr_tc_exe.o: ../src/tm_lfr_tc_exe.c |
|
242 | obj/tm_lfr_tc_exe.o: ../src/tm_lfr_tc_exe.c | |
243 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tm_lfr_tc_exe.o ../src/tm_lfr_tc_exe.c |
|
243 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tm_lfr_tc_exe.o ../src/tm_lfr_tc_exe.c | |
244 |
|
244 | |||
245 | obj/tc_acceptance.o: ../src/tc_acceptance.c |
|
245 | obj/tc_acceptance.o: ../src/tc_acceptance.c | |
246 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_acceptance.o ../src/tc_acceptance.c |
|
246 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_acceptance.o ../src/tc_acceptance.c | |
247 |
|
247 | |||
248 | obj/fsw_processing.o: ../src/processing/fsw_processing.c |
|
248 | obj/fsw_processing.o: ../src/processing/fsw_processing.c | |
249 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_processing.o ../src/processing/fsw_processing.c |
|
249 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_processing.o ../src/processing/fsw_processing.c | |
250 |
|
250 | |||
251 | obj/avf0_prc0.o: ../src/processing/avf0_prc0.c |
|
251 | obj/avf0_prc0.o: ../src/processing/avf0_prc0.c | |
252 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/avf0_prc0.o ../src/processing/avf0_prc0.c |
|
252 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/avf0_prc0.o ../src/processing/avf0_prc0.c | |
253 |
|
253 | |||
254 | obj/avf1_prc1.o: ../src/processing/avf1_prc1.c |
|
254 | obj/avf1_prc1.o: ../src/processing/avf1_prc1.c | |
255 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/avf1_prc1.o ../src/processing/avf1_prc1.c |
|
255 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/avf1_prc1.o ../src/processing/avf1_prc1.c | |
256 |
|
256 | |||
257 | obj/avf2_prc2.o: ../src/processing/avf2_prc2.c |
|
257 | obj/avf2_prc2.o: ../src/processing/avf2_prc2.c | |
258 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/avf2_prc2.o ../src/processing/avf2_prc2.c |
|
258 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/avf2_prc2.o ../src/processing/avf2_prc2.c | |
259 |
|
259 | |||
260 | obj/lfr_cpu_usage_report.o: ../src/lfr_cpu_usage_report.c |
|
260 | obj/lfr_cpu_usage_report.o: ../src/lfr_cpu_usage_report.c | |
261 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/lfr_cpu_usage_report.o ../src/lfr_cpu_usage_report.c |
|
261 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/lfr_cpu_usage_report.o ../src/lfr_cpu_usage_report.c | |
262 |
|
262 | |||
263 | obj/basic_parameters.o: ../src/LFR_basic-parameters/basic_parameters.c |
|
263 | obj/basic_parameters.o: ../src/LFR_basic-parameters/basic_parameters.c | |
264 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/basic_parameters.o ../src/LFR_basic-parameters/basic_parameters.c |
|
264 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/basic_parameters.o ../src/LFR_basic-parameters/basic_parameters.c | |
265 |
|
265 | |||
266 | ####### Install |
|
266 | ####### Install | |
267 |
|
267 | |||
268 | install: FORCE |
|
268 | install: FORCE | |
269 |
|
269 | |||
270 | uninstall: FORCE |
|
270 | uninstall: FORCE | |
271 |
|
271 | |||
272 | FORCE: |
|
272 | FORCE: | |
273 |
|
273 |
@@ -1,95 +1,95 | |||||
1 | TEMPLATE = app |
|
1 | TEMPLATE = app | |
2 | # CONFIG += console v8 sim |
|
2 | # CONFIG += console v8 sim | |
3 | # CONFIG options = verbose *** boot_messages *** debug_messages *** cpu_usage_report *** stack_report *** vhdl_dev *** debug_tch |
|
3 | # CONFIG options = verbose *** boot_messages *** debug_messages *** cpu_usage_report *** stack_report *** vhdl_dev *** debug_tch | |
4 | CONFIG += console verbose |
|
4 | CONFIG += console verbose | |
5 | CONFIG -= qt |
|
5 | CONFIG -= qt | |
6 |
|
6 | |||
7 | include(./sparc.pri) |
|
7 | include(./sparc.pri) | |
8 |
|
8 | |||
9 | # flight software version |
|
9 | # flight software version | |
10 |
SWVERSION=- |
|
10 | SWVERSION=-2-0 | |
11 |
DEFINES += SW_VERSION_N1= |
|
11 | DEFINES += SW_VERSION_N1=2 # major | |
12 | DEFINES += SW_VERSION_N2=0 # minor |
|
12 | DEFINES += SW_VERSION_N2=0 # minor | |
13 | DEFINES += SW_VERSION_N3=0 # patch |
|
13 | DEFINES += SW_VERSION_N3=0 # patch | |
14 |
DEFINES += SW_VERSION_N4=1 |
|
14 | DEFINES += SW_VERSION_N4=1 # internal | |
15 |
|
15 | |||
16 | contains( CONFIG, debug_tch ) { |
|
16 | contains( CONFIG, debug_tch ) { | |
17 | DEFINES += DEBUG_TCH |
|
17 | DEFINES += DEBUG_TCH | |
18 | } |
|
18 | } | |
19 |
|
19 | |||
20 | contains( CONFIG, vhdl_dev ) { |
|
20 | contains( CONFIG, vhdl_dev ) { | |
21 | DEFINES += VHDL_DEV |
|
21 | DEFINES += VHDL_DEV | |
22 | } |
|
22 | } | |
23 |
|
23 | |||
24 | contains( CONFIG, verbose ) { |
|
24 | contains( CONFIG, verbose ) { | |
25 | DEFINES += PRINT_MESSAGES_ON_CONSOLE |
|
25 | DEFINES += PRINT_MESSAGES_ON_CONSOLE | |
26 | } |
|
26 | } | |
27 |
|
27 | |||
28 | contains( CONFIG, debug_messages ) { |
|
28 | contains( CONFIG, debug_messages ) { | |
29 | DEFINES += DEBUG_MESSAGES |
|
29 | DEFINES += DEBUG_MESSAGES | |
30 | } |
|
30 | } | |
31 |
|
31 | |||
32 | contains( CONFIG, cpu_usage_report ) { |
|
32 | contains( CONFIG, cpu_usage_report ) { | |
33 | DEFINES += PRINT_TASK_STATISTICS |
|
33 | DEFINES += PRINT_TASK_STATISTICS | |
34 | } |
|
34 | } | |
35 |
|
35 | |||
36 | contains( CONFIG, stack_report ) { |
|
36 | contains( CONFIG, stack_report ) { | |
37 | DEFINES += PRINT_STACK_REPORT |
|
37 | DEFINES += PRINT_STACK_REPORT | |
38 | } |
|
38 | } | |
39 |
|
39 | |||
40 | contains( CONFIG, boot_messages ) { |
|
40 | contains( CONFIG, boot_messages ) { | |
41 | DEFINES += BOOT_MESSAGES |
|
41 | DEFINES += BOOT_MESSAGES | |
42 | } |
|
42 | } | |
43 |
|
43 | |||
44 | #doxygen.target = doxygen |
|
44 | #doxygen.target = doxygen | |
45 | #doxygen.commands = doxygen ../doc/Doxyfile |
|
45 | #doxygen.commands = doxygen ../doc/Doxyfile | |
46 | #QMAKE_EXTRA_TARGETS += doxygen |
|
46 | #QMAKE_EXTRA_TARGETS += doxygen | |
47 |
|
47 | |||
48 | TARGET = fsw |
|
48 | TARGET = fsw | |
49 |
|
49 | |||
50 | INCLUDEPATH += \ |
|
50 | INCLUDEPATH += \ | |
51 | ../src \ |
|
51 | ../src \ | |
52 | ../header \ |
|
52 | ../header \ | |
53 | ../header/processing \ |
|
53 | ../header/processing \ | |
54 | ../src/LFR_basic-parameters |
|
54 | ../src/LFR_basic-parameters | |
55 |
|
55 | |||
56 | SOURCES += \ |
|
56 | SOURCES += \ | |
57 | ../src/wf_handler.c \ |
|
57 | ../src/wf_handler.c \ | |
58 | ../src/tc_handler.c \ |
|
58 | ../src/tc_handler.c \ | |
59 | ../src/fsw_misc.c \ |
|
59 | ../src/fsw_misc.c \ | |
60 | ../src/fsw_init.c \ |
|
60 | ../src/fsw_init.c \ | |
61 | ../src/fsw_globals.c \ |
|
61 | ../src/fsw_globals.c \ | |
62 | ../src/fsw_spacewire.c \ |
|
62 | ../src/fsw_spacewire.c \ | |
63 | ../src/tc_load_dump_parameters.c \ |
|
63 | ../src/tc_load_dump_parameters.c \ | |
64 | ../src/tm_lfr_tc_exe.c \ |
|
64 | ../src/tm_lfr_tc_exe.c \ | |
65 | ../src/tc_acceptance.c \ |
|
65 | ../src/tc_acceptance.c \ | |
66 | ../src/processing/fsw_processing.c \ |
|
66 | ../src/processing/fsw_processing.c \ | |
67 | ../src/processing/avf0_prc0.c \ |
|
67 | ../src/processing/avf0_prc0.c \ | |
68 | ../src/processing/avf1_prc1.c \ |
|
68 | ../src/processing/avf1_prc1.c \ | |
69 | ../src/processing/avf2_prc2.c \ |
|
69 | ../src/processing/avf2_prc2.c \ | |
70 | ../src/lfr_cpu_usage_report.c \ |
|
70 | ../src/lfr_cpu_usage_report.c \ | |
71 | ../src/LFR_basic-parameters/basic_parameters.c |
|
71 | ../src/LFR_basic-parameters/basic_parameters.c | |
72 |
|
72 | |||
73 | HEADERS += \ |
|
73 | HEADERS += \ | |
74 | ../header/wf_handler.h \ |
|
74 | ../header/wf_handler.h \ | |
75 | ../header/tc_handler.h \ |
|
75 | ../header/tc_handler.h \ | |
76 | ../header/grlib_regs.h \ |
|
76 | ../header/grlib_regs.h \ | |
77 | ../header/fsw_params.h \ |
|
77 | ../header/fsw_params.h \ | |
78 | ../header/fsw_misc.h \ |
|
78 | ../header/fsw_misc.h \ | |
79 | ../header/fsw_init.h \ |
|
79 | ../header/fsw_init.h \ | |
80 | ../header/ccsds_types.h \ |
|
80 | ../header/ccsds_types.h \ | |
81 | ../header/fsw_spacewire.h \ |
|
81 | ../header/fsw_spacewire.h \ | |
82 | ../header/tc_load_dump_parameters.h \ |
|
82 | ../header/tc_load_dump_parameters.h \ | |
83 | ../header/tm_lfr_tc_exe.h \ |
|
83 | ../header/tm_lfr_tc_exe.h \ | |
84 | ../header/tc_acceptance.h \ |
|
84 | ../header/tc_acceptance.h \ | |
85 | ../header/fsw_params_nb_bytes.h \ |
|
85 | ../header/fsw_params_nb_bytes.h \ | |
86 | ../header/fsw_params_processing.h \ |
|
86 | ../header/fsw_params_processing.h \ | |
87 | ../header/processing/fsw_processing.h \ |
|
87 | ../header/processing/fsw_processing.h \ | |
88 | ../header/processing/avf0_prc0.h \ |
|
88 | ../header/processing/avf0_prc0.h \ | |
89 | ../header/processing/avf1_prc1.h \ |
|
89 | ../header/processing/avf1_prc1.h \ | |
90 | ../header/processing/avf2_prc2.h \ |
|
90 | ../header/processing/avf2_prc2.h \ | |
91 | ../header/fsw_params_wf_handler.h \ |
|
91 | ../header/fsw_params_wf_handler.h \ | |
92 | ../header/lfr_cpu_usage_report.h \ |
|
92 | ../header/lfr_cpu_usage_report.h \ | |
93 | ../src/LFR_basic-parameters/basic_parameters.h \ |
|
93 | ../src/LFR_basic-parameters/basic_parameters.h \ | |
94 | ../src/LFR_basic-parameters/basic_parameters_params.h |
|
94 | ../src/LFR_basic-parameters/basic_parameters_params.h | |
95 |
|
95 |
@@ -1,201 +1,201 | |||||
1 | <?xml version="1.0" encoding="UTF-8"?> |
|
1 | <?xml version="1.0" encoding="UTF-8"?> | |
2 | <!DOCTYPE QtCreatorProject> |
|
2 | <!DOCTYPE QtCreatorProject> | |
3 |
<!-- Written by QtCreator 3.0.1, 2014-06-2 |
|
3 | <!-- Written by QtCreator 3.0.1, 2014-06-27T15:54:25. --> | |
4 | <qtcreator> |
|
4 | <qtcreator> | |
5 | <data> |
|
5 | <data> | |
6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> |
|
6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> | |
7 | <value type="int">0</value> |
|
7 | <value type="int">0</value> | |
8 | </data> |
|
8 | </data> | |
9 | <data> |
|
9 | <data> | |
10 | <variable>ProjectExplorer.Project.EditorSettings</variable> |
|
10 | <variable>ProjectExplorer.Project.EditorSettings</variable> | |
11 | <valuemap type="QVariantMap"> |
|
11 | <valuemap type="QVariantMap"> | |
12 | <value type="bool" key="EditorConfiguration.AutoIndent">true</value> |
|
12 | <value type="bool" key="EditorConfiguration.AutoIndent">true</value> | |
13 | <value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value> |
|
13 | <value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value> | |
14 | <value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value> |
|
14 | <value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value> | |
15 | <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0"> |
|
15 | <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0"> | |
16 | <value type="QString" key="language">Cpp</value> |
|
16 | <value type="QString" key="language">Cpp</value> | |
17 | <valuemap type="QVariantMap" key="value"> |
|
17 | <valuemap type="QVariantMap" key="value"> | |
18 | <value type="QByteArray" key="CurrentPreferences">CppGlobal</value> |
|
18 | <value type="QByteArray" key="CurrentPreferences">CppGlobal</value> | |
19 | </valuemap> |
|
19 | </valuemap> | |
20 | </valuemap> |
|
20 | </valuemap> | |
21 | <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1"> |
|
21 | <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1"> | |
22 | <value type="QString" key="language">QmlJS</value> |
|
22 | <value type="QString" key="language">QmlJS</value> | |
23 | <valuemap type="QVariantMap" key="value"> |
|
23 | <valuemap type="QVariantMap" key="value"> | |
24 | <value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value> |
|
24 | <value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value> | |
25 | </valuemap> |
|
25 | </valuemap> | |
26 | </valuemap> |
|
26 | </valuemap> | |
27 | <value type="int" key="EditorConfiguration.CodeStyle.Count">2</value> |
|
27 | <value type="int" key="EditorConfiguration.CodeStyle.Count">2</value> | |
28 | <value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value> |
|
28 | <value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value> | |
29 | <value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value> |
|
29 | <value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value> | |
30 | <value type="int" key="EditorConfiguration.IndentSize">4</value> |
|
30 | <value type="int" key="EditorConfiguration.IndentSize">4</value> | |
31 | <value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value> |
|
31 | <value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value> | |
32 | <value type="bool" key="EditorConfiguration.MouseNavigation">true</value> |
|
32 | <value type="bool" key="EditorConfiguration.MouseNavigation">true</value> | |
33 | <value type="int" key="EditorConfiguration.PaddingMode">1</value> |
|
33 | <value type="int" key="EditorConfiguration.PaddingMode">1</value> | |
34 | <value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value> |
|
34 | <value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value> | |
35 | <value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value> |
|
35 | <value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value> | |
36 | <value type="bool" key="EditorConfiguration.SpacesForTabs">true</value> |
|
36 | <value type="bool" key="EditorConfiguration.SpacesForTabs">true</value> | |
37 | <value type="int" key="EditorConfiguration.TabKeyBehavior">0</value> |
|
37 | <value type="int" key="EditorConfiguration.TabKeyBehavior">0</value> | |
38 | <value type="int" key="EditorConfiguration.TabSize">8</value> |
|
38 | <value type="int" key="EditorConfiguration.TabSize">8</value> | |
39 | <value type="bool" key="EditorConfiguration.UseGlobal">true</value> |
|
39 | <value type="bool" key="EditorConfiguration.UseGlobal">true</value> | |
40 | <value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value> |
|
40 | <value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value> | |
41 | <value type="bool" key="EditorConfiguration.addFinalNewLine">true</value> |
|
41 | <value type="bool" key="EditorConfiguration.addFinalNewLine">true</value> | |
42 | <value type="bool" key="EditorConfiguration.cleanIndentation">true</value> |
|
42 | <value type="bool" key="EditorConfiguration.cleanIndentation">true</value> | |
43 | <value type="bool" key="EditorConfiguration.cleanWhitespace">true</value> |
|
43 | <value type="bool" key="EditorConfiguration.cleanWhitespace">true</value> | |
44 | <value type="bool" key="EditorConfiguration.inEntireDocument">false</value> |
|
44 | <value type="bool" key="EditorConfiguration.inEntireDocument">false</value> | |
45 | </valuemap> |
|
45 | </valuemap> | |
46 | </data> |
|
46 | </data> | |
47 | <data> |
|
47 | <data> | |
48 | <variable>ProjectExplorer.Project.PluginSettings</variable> |
|
48 | <variable>ProjectExplorer.Project.PluginSettings</variable> | |
49 | <valuemap type="QVariantMap"/> |
|
49 | <valuemap type="QVariantMap"/> | |
50 | </data> |
|
50 | </data> | |
51 | <data> |
|
51 | <data> | |
52 | <variable>ProjectExplorer.Project.Target.0</variable> |
|
52 | <variable>ProjectExplorer.Project.Target.0</variable> | |
53 | <valuemap type="QVariantMap"> |
|
53 | <valuemap type="QVariantMap"> | |
54 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop-Qt 4.8.2 in PATH (System)</value> |
|
54 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop-Qt 4.8.2 in PATH (System)</value> | |
55 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop-Qt 4.8.2 in PATH (System)</value> |
|
55 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop-Qt 4.8.2 in PATH (System)</value> | |
56 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{5289e843-9ef2-45ce-88c6-ad27d8e08def}</value> |
|
56 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{5289e843-9ef2-45ce-88c6-ad27d8e08def}</value> | |
57 | <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value> |
|
57 | <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value> | |
58 | <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value> |
|
58 | <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value> | |
59 | <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value> |
|
59 | <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value> | |
60 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0"> |
|
60 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0"> | |
61 | <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory"></value> |
|
61 | <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory"></value> | |
62 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> |
|
62 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> | |
63 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
|
63 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> | |
64 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
|
64 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> | |
65 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value> |
|
65 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value> | |
66 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
66 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
67 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value> |
|
67 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value> | |
68 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value> |
|
68 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value> | |
69 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">false</value> |
|
69 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">false</value> | |
70 | <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value> |
|
70 | <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value> | |
71 | <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value> |
|
71 | <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value> | |
72 | </valuemap> |
|
72 | </valuemap> | |
73 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1"> |
|
73 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1"> | |
74 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
|
74 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> | |
75 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> |
|
75 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> | |
76 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
76 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
77 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> |
|
77 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> | |
78 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> |
|
78 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> | |
79 | <value type="QString">-w</value> |
|
79 | <value type="QString">-w</value> | |
80 | <value type="QString">-r</value> |
|
80 | <value type="QString">-r</value> | |
81 | </valuelist> |
|
81 | </valuelist> | |
82 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value> |
|
82 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value> | |
83 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value> |
|
83 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value> | |
84 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> |
|
84 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> | |
85 | </valuemap> |
|
85 | </valuemap> | |
86 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> |
|
86 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> | |
87 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> |
|
87 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> | |
88 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
88 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
89 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> |
|
89 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> | |
90 | </valuemap> |
|
90 | </valuemap> | |
91 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> |
|
91 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> | |
92 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
|
92 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> | |
93 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
|
93 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> | |
94 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> |
|
94 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> | |
95 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
95 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
96 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> |
|
96 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> | |
97 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> |
|
97 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> | |
98 | <value type="QString">-w</value> |
|
98 | <value type="QString">-w</value> | |
99 | <value type="QString">-r</value> |
|
99 | <value type="QString">-r</value> | |
100 | </valuelist> |
|
100 | </valuelist> | |
101 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value> |
|
101 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value> | |
102 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value> |
|
102 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value> | |
103 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> |
|
103 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> | |
104 | </valuemap> |
|
104 | </valuemap> | |
105 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> |
|
105 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> | |
106 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> |
|
106 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> | |
107 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
107 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
108 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> |
|
108 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> | |
109 | </valuemap> |
|
109 | </valuemap> | |
110 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> |
|
110 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> | |
111 | <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> |
|
111 | <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> | |
112 | <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> |
|
112 | <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> | |
113 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value> |
|
113 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value> | |
114 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
114 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
115 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value> |
|
115 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value> | |
116 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value> |
|
116 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value> | |
117 | <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value> |
|
117 | <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value> | |
118 | </valuemap> |
|
118 | </valuemap> | |
119 | <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">1</value> |
|
119 | <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">1</value> | |
120 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0"> |
|
120 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0"> | |
121 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> |
|
121 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> | |
122 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value> |
|
122 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value> | |
123 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value> |
|
123 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value> | |
124 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
124 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
125 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value> |
|
125 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value> | |
126 | </valuemap> |
|
126 | </valuemap> | |
127 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value> |
|
127 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value> | |
128 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy locally</value> |
|
128 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy locally</value> | |
129 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
129 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
130 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value> |
|
130 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value> | |
131 | </valuemap> |
|
131 | </valuemap> | |
132 | <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value> |
|
132 | <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value> | |
133 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/> |
|
133 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/> | |
134 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0"> |
|
134 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0"> | |
135 | <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> |
|
135 | <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> | |
136 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> |
|
136 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> | |
137 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> |
|
137 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> | |
138 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> |
|
138 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> | |
139 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> |
|
139 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> | |
140 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> |
|
140 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> | |
141 | <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> |
|
141 | <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> | |
142 | <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> |
|
142 | <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> | |
143 | <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> |
|
143 | <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> | |
144 | <value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value> |
|
144 | <value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value> | |
145 | <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> |
|
145 | <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> | |
146 | <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> |
|
146 | <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> | |
147 | <value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value> |
|
147 | <value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value> | |
148 | <value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value> |
|
148 | <value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value> | |
149 | <value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value> |
|
149 | <value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value> | |
150 | <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> |
|
150 | <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> | |
151 | <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> |
|
151 | <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> | |
152 | <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> |
|
152 | <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> | |
153 | <value type="int">0</value> |
|
153 | <value type="int">0</value> | |
154 | <value type="int">1</value> |
|
154 | <value type="int">1</value> | |
155 | <value type="int">2</value> |
|
155 | <value type="int">2</value> | |
156 | <value type="int">3</value> |
|
156 | <value type="int">3</value> | |
157 | <value type="int">4</value> |
|
157 | <value type="int">4</value> | |
158 | <value type="int">5</value> |
|
158 | <value type="int">5</value> | |
159 | <value type="int">6</value> |
|
159 | <value type="int">6</value> | |
160 | <value type="int">7</value> |
|
160 | <value type="int">7</value> | |
161 | <value type="int">8</value> |
|
161 | <value type="int">8</value> | |
162 | <value type="int">9</value> |
|
162 | <value type="int">9</value> | |
163 | <value type="int">10</value> |
|
163 | <value type="int">10</value> | |
164 | <value type="int">11</value> |
|
164 | <value type="int">11</value> | |
165 | <value type="int">12</value> |
|
165 | <value type="int">12</value> | |
166 | <value type="int">13</value> |
|
166 | <value type="int">13</value> | |
167 | <value type="int">14</value> |
|
167 | <value type="int">14</value> | |
168 | </valuelist> |
|
168 | </valuelist> | |
169 | <value type="int" key="PE.EnvironmentAspect.Base">2</value> |
|
169 | <value type="int" key="PE.EnvironmentAspect.Base">2</value> | |
170 | <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/> |
|
170 | <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/> | |
171 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">fsw-qt</value> |
|
171 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">fsw-qt</value> | |
172 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
172 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
173 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/opt/DEV_PLE/FSW-qt/fsw-qt.pro</value> |
|
173 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/opt/DEV_PLE/FSW-qt/fsw-qt.pro</value> | |
174 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value> |
|
174 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value> | |
175 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">fsw-qt.pro</value> |
|
175 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">fsw-qt.pro</value> | |
176 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value> |
|
176 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value> | |
177 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">true</value> |
|
177 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">true</value> | |
178 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value> |
|
178 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value> | |
179 | <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> |
|
179 | <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> | |
180 | <value type="bool" key="RunConfiguration.UseCppDebugger">true</value> |
|
180 | <value type="bool" key="RunConfiguration.UseCppDebugger">true</value> | |
181 | <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value> |
|
181 | <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value> | |
182 | <value type="bool" key="RunConfiguration.UseMultiProcess">false</value> |
|
182 | <value type="bool" key="RunConfiguration.UseMultiProcess">false</value> | |
183 | <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> |
|
183 | <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> | |
184 | <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value> |
|
184 | <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value> | |
185 | </valuemap> |
|
185 | </valuemap> | |
186 | <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value> |
|
186 | <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value> | |
187 | </valuemap> |
|
187 | </valuemap> | |
188 | </data> |
|
188 | </data> | |
189 | <data> |
|
189 | <data> | |
190 | <variable>ProjectExplorer.Project.TargetCount</variable> |
|
190 | <variable>ProjectExplorer.Project.TargetCount</variable> | |
191 | <value type="int">1</value> |
|
191 | <value type="int">1</value> | |
192 | </data> |
|
192 | </data> | |
193 | <data> |
|
193 | <data> | |
194 | <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable> |
|
194 | <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable> | |
195 | <value type="QByteArray">{2e58a81f-9962-4bba-ae6b-760177f0656c}</value> |
|
195 | <value type="QByteArray">{2e58a81f-9962-4bba-ae6b-760177f0656c}</value> | |
196 | </data> |
|
196 | </data> | |
197 | <data> |
|
197 | <data> | |
198 | <variable>ProjectExplorer.Project.Updater.FileVersion</variable> |
|
198 | <variable>ProjectExplorer.Project.Updater.FileVersion</variable> | |
199 | <value type="int">15</value> |
|
199 | <value type="int">15</value> | |
200 | </data> |
|
200 | </data> | |
201 | </qtcreator> |
|
201 | </qtcreator> |
@@ -1,70 +1,73 | |||||
1 | #ifndef FSW_PARAMS_PROCESSING_H |
|
1 | #ifndef FSW_PARAMS_PROCESSING_H | |
2 | #define FSW_PARAMS_PROCESSING_H |
|
2 | #define FSW_PARAMS_PROCESSING_H | |
3 |
|
3 | |||
4 | #define NB_BINS_PER_SM 128 |
|
4 | #define NB_BINS_PER_SM 128 | |
5 | #define NB_VALUES_PER_SM 25 |
|
5 | #define NB_VALUES_PER_SM 25 | |
6 | #define TOTAL_SIZE_SM 3200 // 25 * 128 = 0xC80 |
|
6 | #define TOTAL_SIZE_SM 3200 // 25 * 128 = 0xC80 | |
7 | #define TOTAL_SIZE_NORM_BP1_F0 99 // 11 * 9 = 99 |
|
7 | #define TOTAL_SIZE_NORM_BP1_F0 99 // 11 * 9 = 99 | |
8 | #define TOTAL_SIZE_NORM_BP1_F1 117 // 13 * 9 = 117 |
|
8 | #define TOTAL_SIZE_NORM_BP1_F1 117 // 13 * 9 = 117 | |
9 | #define TOTAL_SIZE_NORM_BP1_F2 108 // 12 * 9 = 108 |
|
9 | #define TOTAL_SIZE_NORM_BP1_F2 108 // 12 * 9 = 108 | |
10 | #define TOTAL_SIZE_SBM1_BP1_F0 198 // 22 * 9 = 198 |
|
10 | #define TOTAL_SIZE_SBM1_BP1_F0 198 // 22 * 9 = 198 | |
11 | // |
|
11 | // | |
12 | #define NB_RING_NODES_SM_F0 12 // AT LEAST 3 |
|
12 | #define NB_RING_NODES_SM_F0 12 // AT LEAST 3 | |
13 | #define NB_RING_NODES_ASM_BURST_SBM_F0 10 // AT LEAST 3 |
|
13 | #define NB_RING_NODES_ASM_BURST_SBM_F0 10 // AT LEAST 3 | |
14 | #define NB_RING_NODES_ASM_NORM_F0 10 // AT LEAST 3 |
|
14 | #define NB_RING_NODES_ASM_NORM_F0 10 // AT LEAST 3 | |
15 | #define NB_RING_NODES_SM_F1 3 // AT LEAST 3 |
|
15 | #define NB_RING_NODES_SM_F1 3 // AT LEAST 3 | |
16 | #define NB_RING_NODES_ASM_BURST_SBM_F1 5 // AT LEAST 3 |
|
16 | #define NB_RING_NODES_ASM_BURST_SBM_F1 5 // AT LEAST 3 | |
17 | #define NB_RING_NODES_ASM_NORM_F1 5 // AT LEAST 3 |
|
17 | #define NB_RING_NODES_ASM_NORM_F1 5 // AT LEAST 3 | |
18 | #define NB_RING_NODES_SM_F2 3 // AT LEAST 3 |
|
18 | #define NB_RING_NODES_SM_F2 3 // AT LEAST 3 | |
19 | #define NB_RING_NODES_ASM_BURST_SBM_F2 3 // AT LEAST 3 |
|
19 | #define NB_RING_NODES_ASM_BURST_SBM_F2 3 // AT LEAST 3 | |
20 | #define NB_RING_NODES_ASM_NORM_F2 3 // AT LEAST 3 |
|
20 | #define NB_RING_NODES_ASM_NORM_F2 3 // AT LEAST 3 | |
21 | // |
|
21 | // | |
22 | #define NB_BINS_PER_ASM_F0 88 |
|
22 | #define NB_BINS_PER_ASM_F0 88 | |
23 | #define NB_BINS_PER_PKT_ASM_F0 44 |
|
23 | #define NB_BINS_PER_PKT_ASM_F0 44 | |
24 | #define TOTAL_SIZE_ASM_F0_IN_BYTES 4400 // 25 * 88 * 2 |
|
24 | #define TOTAL_SIZE_ASM_F0_IN_BYTES 4400 // 25 * 88 * 2 | |
25 | #define ASM_F0_INDICE_START 17 // 88 bins |
|
25 | //#define ASM_F0_INDICE_START 17 // 88 bins | |
|
26 | #define ASM_F0_INDICE_START 0 | |||
26 | #define ASM_F0_INDICE_STOP 104 // 2 packets of 44 bins |
|
27 | #define ASM_F0_INDICE_STOP 104 // 2 packets of 44 bins | |
27 | // |
|
28 | // | |
28 | #define NB_BINS_PER_ASM_F1 104 |
|
29 | #define NB_BINS_PER_ASM_F1 104 | |
29 | #define NB_BINS_PER_PKT_ASM_F1 52 |
|
30 | #define NB_BINS_PER_PKT_ASM_F1 52 | |
30 | #define TOTAL_SIZE_ASM_F1_IN_BYTES 5200 // 25 * 104 * 2 |
|
31 | #define TOTAL_SIZE_ASM_F1_IN_BYTES 5200 // 25 * 104 * 2 | |
31 | #define ASM_F1_INDICE_START 6 // 104 bins |
|
32 | //#define ASM_F1_INDICE_START 6 // 104 bins | |
|
33 | #define ASM_F1_INDICE_START 0 | |||
32 | #define ASM_F1_INDICE_STOP 109 // 2 packets of 52 bins |
|
34 | #define ASM_F1_INDICE_STOP 109 // 2 packets of 52 bins | |
33 | // |
|
35 | // | |
34 | #define NB_BINS_PER_ASM_F2 96 |
|
36 | #define NB_BINS_PER_ASM_F2 96 | |
35 | #define NB_BINS_PER_PKT_ASM_F2 48 |
|
37 | #define NB_BINS_PER_PKT_ASM_F2 48 | |
36 | #define TOTAL_SIZE_ASM_F2_IN_BYTES 4800 // 25 * 96 * 2 |
|
38 | #define TOTAL_SIZE_ASM_F2_IN_BYTES 4800 // 25 * 96 * 2 | |
37 | #define ASM_F2_INDICE_START 7 // 96 bins |
|
39 | //#define ASM_F2_INDICE_START 7 // 96 bins | |
|
40 | #define ASM_F2_INDICE_START 0 | |||
38 | #define ASM_F2_INDICE_STOP 102 // 2 packets of 48 bins |
|
41 | #define ASM_F2_INDICE_STOP 102 // 2 packets of 48 bins | |
39 | // |
|
42 | // | |
40 | #define NB_BINS_COMPRESSED_SM_F0 11 |
|
43 | #define NB_BINS_COMPRESSED_SM_F0 11 | |
41 | #define NB_BINS_COMPRESSED_SM_F1 13 |
|
44 | #define NB_BINS_COMPRESSED_SM_F1 13 | |
42 | #define NB_BINS_COMPRESSED_SM_F2 12 |
|
45 | #define NB_BINS_COMPRESSED_SM_F2 12 | |
43 | #define NB_BINS_COMPRESSED_SM_SBM_F0 22 |
|
46 | #define NB_BINS_COMPRESSED_SM_SBM_F0 22 | |
44 | #define NB_BINS_COMPRESSED_SM_SBM_F1 26 |
|
47 | #define NB_BINS_COMPRESSED_SM_SBM_F1 26 | |
45 | #define NB_BINS_COMPRESSED_SM_SBM_F2 24 |
|
48 | #define NB_BINS_COMPRESSED_SM_SBM_F2 24 | |
46 | // |
|
49 | // | |
47 | #define NB_BYTES_PER_BP1 9 |
|
50 | #define NB_BYTES_PER_BP1 9 | |
48 | // |
|
51 | // | |
49 | #define NB_BINS_TO_AVERAGE_ASM_F0 8 |
|
52 | #define NB_BINS_TO_AVERAGE_ASM_F0 8 | |
50 | #define NB_BINS_TO_AVERAGE_ASM_F1 8 |
|
53 | #define NB_BINS_TO_AVERAGE_ASM_F1 8 | |
51 | #define NB_BINS_TO_AVERAGE_ASM_F2 8 |
|
54 | #define NB_BINS_TO_AVERAGE_ASM_F2 8 | |
52 | #define NB_BINS_TO_AVERAGE_ASM_SBM_F0 4 |
|
55 | #define NB_BINS_TO_AVERAGE_ASM_SBM_F0 4 | |
53 | #define NB_BINS_TO_AVERAGE_ASM_SBM_F1 4 |
|
56 | #define NB_BINS_TO_AVERAGE_ASM_SBM_F1 4 | |
54 | #define NB_BINS_TO_AVERAGE_ASM_SBM_F2 4 |
|
57 | #define NB_BINS_TO_AVERAGE_ASM_SBM_F2 4 | |
55 | // |
|
58 | // | |
56 | #define TOTAL_SIZE_COMPRESSED_ASM_NORM_F0 275 // 11 * 25 WORDS |
|
59 | #define TOTAL_SIZE_COMPRESSED_ASM_NORM_F0 275 // 11 * 25 WORDS | |
57 | #define TOTAL_SIZE_COMPRESSED_ASM_NORM_F1 325 // 13 * 25 WORDS |
|
60 | #define TOTAL_SIZE_COMPRESSED_ASM_NORM_F1 325 // 13 * 25 WORDS | |
58 | #define TOTAL_SIZE_COMPRESSED_ASM_NORM_F2 300 // 12 * 25 WORDS |
|
61 | #define TOTAL_SIZE_COMPRESSED_ASM_NORM_F2 300 // 12 * 25 WORDS | |
59 | #define TOTAL_SIZE_COMPRESSED_ASM_SBM_F0 550 // 22 * 25 WORDS |
|
62 | #define TOTAL_SIZE_COMPRESSED_ASM_SBM_F0 550 // 22 * 25 WORDS | |
60 | #define TOTAL_SIZE_COMPRESSED_ASM_SBM_F1 650 // 26 * 25 WORDS |
|
63 | #define TOTAL_SIZE_COMPRESSED_ASM_SBM_F1 650 // 26 * 25 WORDS | |
61 | #define TOTAL_SIZE_COMPRESSED_ASM_SBM_F2 600 // 24 * 25 WORDS |
|
64 | #define TOTAL_SIZE_COMPRESSED_ASM_SBM_F2 600 // 24 * 25 WORDS | |
62 | #define TOTAL_SIZE_BP1_NORM_F0 99 // 9 * 11 UNSIGNED CHAR |
|
65 | #define TOTAL_SIZE_BP1_NORM_F0 99 // 9 * 11 UNSIGNED CHAR | |
63 | #define TOTAL_SIZE_BP1_SBM_F0 198 // 9 * 22 UNSIGNED CHAR |
|
66 | #define TOTAL_SIZE_BP1_SBM_F0 198 // 9 * 22 UNSIGNED CHAR | |
64 | // GENERAL |
|
67 | // GENERAL | |
65 | #define NB_SM_BEFORE_AVF0 8 // must be 8 due to the SM_average() function |
|
68 | #define NB_SM_BEFORE_AVF0 8 // must be 8 due to the SM_average() function | |
66 | #define NB_SM_BEFORE_AVF1 8 // must be 8 due to the SM_average() function |
|
69 | #define NB_SM_BEFORE_AVF1 8 // must be 8 due to the SM_average() function | |
67 | #define NB_SM_BEFORE_AVF2 1 // must be 1 due to the SM_average_f2() function |
|
70 | #define NB_SM_BEFORE_AVF2 1 // must be 1 due to the SM_average_f2() function | |
68 |
|
71 | |||
69 | #endif // FSW_PARAMS_PROCESSING_H |
|
72 | #endif // FSW_PARAMS_PROCESSING_H | |
70 |
|
73 |
@@ -1,28 +1,29 | |||||
1 | #ifndef AVF2_PRC2_H |
|
1 | #ifndef AVF2_PRC2_H | |
2 | #define AVF2_PRC2_H |
|
2 | #define AVF2_PRC2_H | |
3 |
|
3 | |||
4 | #include "fsw_processing.h" |
|
4 | #include "fsw_processing.h" | |
5 |
|
5 | |||
6 | typedef struct { |
|
6 | typedef struct { | |
7 | unsigned int norm_bp1; |
|
7 | unsigned int norm_bp1; | |
8 | unsigned int norm_bp2; |
|
8 | unsigned int norm_bp2; | |
9 | unsigned int norm_asm; |
|
9 | unsigned int norm_asm; | |
10 | } nb_sm_before_bp_asm_f2; |
|
10 | } nb_sm_before_bp_asm_f2; | |
11 |
|
11 | |||
12 | //************ |
|
12 | //************ | |
13 | // RTEMS TASKS |
|
13 | // RTEMS TASKS | |
14 | rtems_task avf2_task( rtems_task_argument lfrRequestedMode ); |
|
14 | rtems_task avf2_task( rtems_task_argument lfrRequestedMode ); | |
15 | rtems_task prc2_task( rtems_task_argument lfrRequestedMode ); |
|
15 | rtems_task prc2_task( rtems_task_argument lfrRequestedMode ); | |
16 |
|
16 | |||
17 | //********** |
|
17 | //********** | |
18 | // FUNCTIONS |
|
18 | // FUNCTIONS | |
19 |
|
19 | |||
20 | void reset_nb_sm_f2( void ); |
|
20 | void reset_nb_sm_f2( void ); | |
21 | void SM_average_f2( float *averaged_spec_mat_f2, ring_node_sm *ring_node, unsigned int nbAverageNormF2 ); |
|
21 | void SM_average_f2( float *averaged_spec_mat_f2, ring_node_sm *ring_node, unsigned int nbAverageNormF2 ); | |
|
22 | void SM_average_f2_alt( float *averaged_spec_mat_f2, ring_node_sm *ring_node, unsigned int nbAverageNormF2 ); | |||
22 |
|
23 | |||
23 | //******* |
|
24 | //******* | |
24 | // EXTERN |
|
25 | // EXTERN | |
25 | extern struct ring_node_sm *ring_node_for_averaging_sm_f2; |
|
26 | extern struct ring_node_sm *ring_node_for_averaging_sm_f2; | |
26 | extern rtems_status_code get_message_queue_id_prc2( rtems_id *queue_id ); |
|
27 | extern rtems_status_code get_message_queue_id_prc2( rtems_id *queue_id ); | |
27 |
|
28 | |||
28 | #endif // AVF2_PRC2_H |
|
29 | #endif // AVF2_PRC2_H |
@@ -1,255 +1,272 | |||||
1 | #ifndef FSW_PROCESSING_H_INCLUDED |
|
1 | #ifndef FSW_PROCESSING_H_INCLUDED | |
2 | #define FSW_PROCESSING_H_INCLUDED |
|
2 | #define FSW_PROCESSING_H_INCLUDED | |
3 |
|
3 | |||
4 | #include <rtems.h> |
|
4 | #include <rtems.h> | |
5 | #include <grspw.h> |
|
5 | #include <grspw.h> | |
6 | #include <math.h> |
|
6 | #include <math.h> | |
7 | #include <stdlib.h> // abs() is in the stdlib |
|
7 | #include <stdlib.h> // abs() is in the stdlib | |
8 | #include <stdio.h> // printf() |
|
8 | #include <stdio.h> // printf() | |
9 | #include <math.h> |
|
9 | #include <math.h> | |
10 |
|
10 | |||
11 | #include "fsw_params.h" |
|
11 | #include "fsw_params.h" | |
12 | #include "fsw_spacewire.h" |
|
12 | #include "fsw_spacewire.h" | |
13 |
|
13 | |||
14 | typedef struct ring_node_sm |
|
14 | typedef struct ring_node_sm | |
15 | { |
|
15 | { | |
16 | struct ring_node_sm *previous; |
|
16 | struct ring_node_sm *previous; | |
17 | struct ring_node_sm *next; |
|
17 | struct ring_node_sm *next; | |
18 | int buffer_address; |
|
18 | int buffer_address; | |
19 | unsigned int status; |
|
19 | unsigned int status; | |
20 | unsigned int coarseTime; |
|
20 | unsigned int coarseTime; | |
21 | unsigned int fineTime; |
|
21 | unsigned int fineTime; | |
22 | } ring_node_sm; |
|
22 | } ring_node_sm; | |
23 |
|
23 | |||
24 | typedef struct ring_node_asm |
|
24 | typedef struct ring_node_asm | |
25 | { |
|
25 | { | |
26 | struct ring_node_asm *next; |
|
26 | struct ring_node_asm *next; | |
27 | float matrix[ TOTAL_SIZE_SM ]; |
|
27 | float matrix[ TOTAL_SIZE_SM ]; | |
28 | unsigned int status; |
|
28 | unsigned int status; | |
29 | } ring_node_asm; |
|
29 | } ring_node_asm; | |
30 |
|
30 | |||
31 | typedef struct |
|
31 | typedef struct | |
32 | { |
|
32 | { | |
33 | Header_TM_LFR_SCIENCE_BP_t header; |
|
33 | Header_TM_LFR_SCIENCE_BP_t header; | |
34 | unsigned char data[ 30 * 22 ]; // MAX size is 22 * 30 [TM_LFR_SCIENCE_BURST_BP2_F1] |
|
34 | unsigned char data[ 30 * 22 ]; // MAX size is 22 * 30 [TM_LFR_SCIENCE_BURST_BP2_F1] | |
35 | } bp_packet; |
|
35 | } bp_packet; | |
36 |
|
36 | |||
37 | typedef struct |
|
37 | typedef struct | |
38 | { |
|
38 | { | |
39 | Header_TM_LFR_SCIENCE_BP_with_spare_t header; |
|
39 | Header_TM_LFR_SCIENCE_BP_with_spare_t header; | |
40 | unsigned char data[ 9 * 13 ]; // only for TM_LFR_SCIENCE_NORMAL_BP1_F0 and F1 |
|
40 | unsigned char data[ 9 * 13 ]; // only for TM_LFR_SCIENCE_NORMAL_BP1_F0 and F1 | |
41 | } bp_packet_with_spare; |
|
41 | } bp_packet_with_spare; | |
42 |
|
42 | |||
43 | typedef struct |
|
43 | typedef struct | |
44 | { |
|
44 | { | |
45 | ring_node_asm *norm; |
|
45 | ring_node_asm *norm; | |
46 | ring_node_asm *burst_sbm; |
|
46 | ring_node_asm *burst_sbm; | |
47 | rtems_event_set event; |
|
47 | rtems_event_set event; | |
48 | unsigned int coarseTime; |
|
48 | unsigned int coarseTime; | |
49 | unsigned int fineTime; |
|
49 | unsigned int fineTime; | |
50 | } asm_msg; |
|
50 | } asm_msg; | |
51 |
|
51 | |||
52 | extern volatile int sm_f0[ ]; |
|
52 | extern volatile int sm_f0[ ]; | |
53 | extern volatile int sm_f1[ ]; |
|
53 | extern volatile int sm_f1[ ]; | |
54 | extern volatile int sm_f2[ ]; |
|
54 | extern volatile int sm_f2[ ]; | |
55 |
|
55 | |||
56 | // parameters |
|
56 | // parameters | |
57 | extern struct param_local_str param_local; |
|
57 | extern struct param_local_str param_local; | |
58 |
|
58 | |||
59 | // registers |
|
59 | // registers | |
60 | extern time_management_regs_t *time_management_regs; |
|
60 | extern time_management_regs_t *time_management_regs; | |
61 | extern spectral_matrix_regs_t *spectral_matrix_regs; |
|
61 | extern spectral_matrix_regs_t *spectral_matrix_regs; | |
62 |
|
62 | |||
63 | extern rtems_name misc_name[5]; |
|
63 | extern rtems_name misc_name[5]; | |
64 | extern rtems_id Task_id[20]; /* array of task ids */ |
|
64 | extern rtems_id Task_id[20]; /* array of task ids */ | |
65 |
|
65 | |||
66 | // ISR |
|
66 | // ISR | |
67 | rtems_isr spectral_matrices_isr( rtems_vector_number vector ); |
|
67 | rtems_isr spectral_matrices_isr( rtems_vector_number vector ); | |
68 | rtems_isr spectral_matrices_isr_simu( rtems_vector_number vector ); |
|
68 | rtems_isr spectral_matrices_isr_simu( rtems_vector_number vector ); | |
69 |
|
69 | |||
70 | //****************** |
|
70 | //****************** | |
71 | // Spectral Matrices |
|
71 | // Spectral Matrices | |
72 | void reset_nb_sm( void ); |
|
72 | void reset_nb_sm( void ); | |
73 | // SM |
|
73 | // SM | |
74 | void SM_init_rings( void ); |
|
74 | void SM_init_rings( void ); | |
75 | void SM_reset_current_ring_nodes( void ); |
|
75 | void SM_reset_current_ring_nodes( void ); | |
76 | void SM_generic_init_ring(ring_node_sm *ring, unsigned char nbNodes, volatile int sm_f[] ); |
|
76 | void SM_generic_init_ring(ring_node_sm *ring, unsigned char nbNodes, volatile int sm_f[] ); | |
77 | // ASM |
|
77 | // ASM | |
78 | void ASM_generic_init_ring(ring_node_asm *ring, unsigned char nbNodes ); |
|
78 | void ASM_generic_init_ring(ring_node_asm *ring, unsigned char nbNodes ); | |
79 | void ASM_init_header( Header_TM_LFR_SCIENCE_ASM_t *header); |
|
79 | void ASM_init_header( Header_TM_LFR_SCIENCE_ASM_t *header); | |
80 | void ASM_send(Header_TM_LFR_SCIENCE_ASM_t *header, char *spectral_matrix, |
|
80 | void ASM_send(Header_TM_LFR_SCIENCE_ASM_t *header, char *spectral_matrix, | |
81 | unsigned int sid, spw_ioctl_pkt_send *spw_ioctl_send, rtems_id queue_id); |
|
81 | unsigned int sid, spw_ioctl_pkt_send *spw_ioctl_send, rtems_id queue_id); | |
82 |
|
82 | |||
83 | //***************** |
|
83 | //***************** | |
84 | // Basic Parameters |
|
84 | // Basic Parameters | |
85 |
|
85 | |||
86 | void BP_reset_current_ring_nodes( void ); |
|
86 | void BP_reset_current_ring_nodes( void ); | |
87 | void BP_init_header( Header_TM_LFR_SCIENCE_BP_t *header, |
|
87 | void BP_init_header( Header_TM_LFR_SCIENCE_BP_t *header, | |
88 | unsigned int apid, unsigned char sid, |
|
88 | unsigned int apid, unsigned char sid, | |
89 | unsigned int packetLength , unsigned char blkNr); |
|
89 | unsigned int packetLength , unsigned char blkNr); | |
90 | void BP_init_header_with_spare( Header_TM_LFR_SCIENCE_BP_with_spare_t *header, |
|
90 | void BP_init_header_with_spare( Header_TM_LFR_SCIENCE_BP_with_spare_t *header, | |
91 | unsigned int apid, unsigned char sid, |
|
91 | unsigned int apid, unsigned char sid, | |
92 | unsigned int packetLength, unsigned char blkNr ); |
|
92 | unsigned int packetLength, unsigned char blkNr ); | |
93 | void BP_send( char *data, |
|
93 | void BP_send( char *data, | |
94 | rtems_id queue_id , |
|
94 | rtems_id queue_id , | |
95 | unsigned int nbBytesToSend , unsigned int sid ); |
|
95 | unsigned int nbBytesToSend , unsigned int sid ); | |
96 |
|
96 | |||
97 | //****************** |
|
97 | //****************** | |
98 | // general functions |
|
98 | // general functions | |
99 | void reset_spectral_matrix_regs( void ); |
|
99 | void reset_spectral_matrix_regs( void ); | |
100 | void set_time(unsigned char *time, unsigned char *timeInBuffer ); |
|
100 | void set_time(unsigned char *time, unsigned char *timeInBuffer ); | |
101 | unsigned long long int get_acquisition_time( unsigned char *timePtr ); |
|
101 | unsigned long long int get_acquisition_time( unsigned char *timePtr ); | |
102 | void close_matrix_actions(unsigned int *nb_sm, unsigned int nb_sm_before_avf, rtems_id task_id, |
|
102 | void close_matrix_actions(unsigned int *nb_sm, unsigned int nb_sm_before_avf, rtems_id task_id, | |
103 | ring_node_sm *node_for_averaging, ring_node_sm *ringNode, unsigned long long int time); |
|
103 | ring_node_sm *node_for_averaging, ring_node_sm *ringNode, unsigned long long int time); | |
104 | unsigned char getSID( rtems_event_set event ); |
|
104 | unsigned char getSID( rtems_event_set event ); | |
105 |
|
105 | |||
106 | extern rtems_status_code get_message_queue_id_prc1( rtems_id *queue_id ); |
|
106 | extern rtems_status_code get_message_queue_id_prc1( rtems_id *queue_id ); | |
107 | extern rtems_status_code get_message_queue_id_prc2( rtems_id *queue_id ); |
|
107 | extern rtems_status_code get_message_queue_id_prc2( rtems_id *queue_id ); | |
108 |
|
108 | |||
109 | //*************************************** |
|
109 | //*************************************** | |
110 | // DEFINITIONS OF STATIC INLINE FUNCTIONS |
|
110 | // DEFINITIONS OF STATIC INLINE FUNCTIONS | |
111 | static inline void SM_average( float *averaged_spec_mat_NORM, float *averaged_spec_mat_SBM, |
|
111 | static inline void SM_average( float *averaged_spec_mat_NORM, float *averaged_spec_mat_SBM, | |
112 | ring_node_sm *ring_node_tab[], |
|
112 | ring_node_sm *ring_node_tab[], | |
113 | unsigned int nbAverageNORM, unsigned int nbAverageSBM ); |
|
113 | unsigned int nbAverageNORM, unsigned int nbAverageSBM ); | |
|
114 | static inline void SM_average_alt( float *averaged_spec_mat_NORM, float *averaged_spec_mat_SBM, | |||
|
115 | ring_node_sm *ring_node_tab[], | |||
|
116 | unsigned int nbAverageNORM, unsigned int nbAverageSBM ); | |||
114 | static inline void ASM_reorganize_and_divide(float *averaged_spec_mat, float *averaged_spec_mat_reorganized, |
|
117 | static inline void ASM_reorganize_and_divide(float *averaged_spec_mat, float *averaged_spec_mat_reorganized, | |
115 | float divider ); |
|
118 | float divider ); | |
116 | static inline void ASM_compress_reorganize_and_divide(float *averaged_spec_mat, float *compressed_spec_mat, |
|
119 | static inline void ASM_compress_reorganize_and_divide(float *averaged_spec_mat, float *compressed_spec_mat, | |
117 | float divider, |
|
120 | float divider, | |
118 | unsigned char nbBinsCompressedMatrix, unsigned char nbBinsToAverage , unsigned char ASMIndexStart); |
|
121 | unsigned char nbBinsCompressedMatrix, unsigned char nbBinsToAverage , unsigned char ASMIndexStart); | |
119 | static inline void ASM_convert(volatile float *input_matrix, char *output_matrix); |
|
122 | static inline void ASM_convert(volatile float *input_matrix, char *output_matrix); | |
120 |
|
123 | |||
121 | void SM_average( float *averaged_spec_mat_NORM, float *averaged_spec_mat_SBM, |
|
124 | void SM_average( float *averaged_spec_mat_NORM, float *averaged_spec_mat_SBM, | |
122 | ring_node_sm *ring_node_tab[], |
|
125 | ring_node_sm *ring_node_tab[], | |
123 | unsigned int nbAverageNORM, unsigned int nbAverageSBM ) |
|
126 | unsigned int nbAverageNORM, unsigned int nbAverageSBM ) | |
124 | { |
|
127 | { | |
125 | float sum; |
|
128 | float sum; | |
126 | unsigned int i; |
|
129 | unsigned int i; | |
127 |
|
130 | |||
128 | for(i=0; i<TOTAL_SIZE_SM; i++) |
|
131 | for(i=0; i<TOTAL_SIZE_SM; i++) | |
129 | { |
|
132 | { | |
130 | sum = ( (int *) (ring_node_tab[0]->buffer_address) ) [ i ] |
|
133 | sum = ( (int *) (ring_node_tab[0]->buffer_address) ) [ i ] | |
131 | + ( (int *) (ring_node_tab[1]->buffer_address) ) [ i ] |
|
134 | + ( (int *) (ring_node_tab[1]->buffer_address) ) [ i ] | |
132 | + ( (int *) (ring_node_tab[2]->buffer_address) ) [ i ] |
|
135 | + ( (int *) (ring_node_tab[2]->buffer_address) ) [ i ] | |
133 | + ( (int *) (ring_node_tab[3]->buffer_address) ) [ i ] |
|
136 | + ( (int *) (ring_node_tab[3]->buffer_address) ) [ i ] | |
134 | + ( (int *) (ring_node_tab[4]->buffer_address) ) [ i ] |
|
137 | + ( (int *) (ring_node_tab[4]->buffer_address) ) [ i ] | |
135 | + ( (int *) (ring_node_tab[5]->buffer_address) ) [ i ] |
|
138 | + ( (int *) (ring_node_tab[5]->buffer_address) ) [ i ] | |
136 | + ( (int *) (ring_node_tab[6]->buffer_address) ) [ i ] |
|
139 | + ( (int *) (ring_node_tab[6]->buffer_address) ) [ i ] | |
137 | + ( (int *) (ring_node_tab[7]->buffer_address) ) [ i ]; |
|
140 | + ( (int *) (ring_node_tab[7]->buffer_address) ) [ i ]; | |
138 |
|
141 | |||
139 | if ( (nbAverageNORM == 0) && (nbAverageSBM == 0) ) |
|
142 | if ( (nbAverageNORM == 0) && (nbAverageSBM == 0) ) | |
140 | { |
|
143 | { | |
141 | averaged_spec_mat_NORM[ i ] = sum; |
|
144 | averaged_spec_mat_NORM[ i ] = sum; | |
142 | averaged_spec_mat_SBM[ i ] = sum; |
|
145 | averaged_spec_mat_SBM[ i ] = sum; | |
143 | } |
|
146 | } | |
144 | else if ( (nbAverageNORM != 0) && (nbAverageSBM != 0) ) |
|
147 | else if ( (nbAverageNORM != 0) && (nbAverageSBM != 0) ) | |
145 | { |
|
148 | { | |
146 | averaged_spec_mat_NORM[ i ] = ( averaged_spec_mat_NORM[ i ] + sum ); |
|
149 | averaged_spec_mat_NORM[ i ] = ( averaged_spec_mat_NORM[ i ] + sum ); | |
147 | averaged_spec_mat_SBM[ i ] = ( averaged_spec_mat_SBM[ i ] + sum ); |
|
150 | averaged_spec_mat_SBM[ i ] = ( averaged_spec_mat_SBM[ i ] + sum ); | |
148 | } |
|
151 | } | |
149 | else if ( (nbAverageNORM != 0) && (nbAverageSBM == 0) ) |
|
152 | else if ( (nbAverageNORM != 0) && (nbAverageSBM == 0) ) | |
150 | { |
|
153 | { | |
151 | averaged_spec_mat_NORM[ i ] = ( averaged_spec_mat_NORM[ i ] + sum ); |
|
154 | averaged_spec_mat_NORM[ i ] = ( averaged_spec_mat_NORM[ i ] + sum ); | |
152 | averaged_spec_mat_SBM[ i ] = sum; |
|
155 | averaged_spec_mat_SBM[ i ] = sum; | |
153 | } |
|
156 | } | |
154 | else |
|
157 | else | |
155 | { |
|
158 | { | |
156 | PRINTF2("ERR *** in SM_average *** unexpected parameters %d %d\n", nbAverageNORM, nbAverageSBM) |
|
159 | PRINTF2("ERR *** in SM_average *** unexpected parameters %d %d\n", nbAverageNORM, nbAverageSBM) | |
157 | } |
|
160 | } | |
158 | } |
|
161 | } | |
159 | } |
|
162 | } | |
160 |
|
163 | |||
|
164 | void SM_average_alt( float *averaged_spec_mat_NORM, float *averaged_spec_mat_SBM, | |||
|
165 | ring_node_sm *ring_node_tab[], unsigned int nbAverageNORM, unsigned int nbAverageSBM ) | |||
|
166 | { | |||
|
167 | float sum; | |||
|
168 | unsigned int i; | |||
|
169 | ||||
|
170 | for(i=0; i<TOTAL_SIZE_SM; i++) | |||
|
171 | { | |||
|
172 | sum = ( (int *) (ring_node_tab[0]->buffer_address) ) [ i ]; | |||
|
173 | averaged_spec_mat_NORM[ i ] = sum; | |||
|
174 | averaged_spec_mat_SBM[ i ] = sum; | |||
|
175 | } | |||
|
176 | } | |||
|
177 | ||||
161 | void ASM_reorganize_and_divide( float *averaged_spec_mat, float *averaged_spec_mat_reorganized, float divider ) |
|
178 | void ASM_reorganize_and_divide( float *averaged_spec_mat, float *averaged_spec_mat_reorganized, float divider ) | |
162 | { |
|
179 | { | |
163 |
// reorganize the data to have a matrix in the |
|
180 | // reorganize the data to have a matrix in the ICD format | |
164 | // INPUT (VHDL format) |
|
181 | // INPUT (VHDL format) | |
165 | // component_0[0 .. 127] component_1[0 .. 127] .. component_24[0 .. 127] |
|
182 | // component_0[0 .. 127] component_1_re[0 .. 127] component_1_im[0 .. 127] .. component_24[0 .. 127] | |
166 | // OUTPUT (ICD format) |
|
183 | // OUTPUT (ICD format) | |
167 | // matrix_0[0 .. 24] matrix_1[0 .. 24] .. matrix_127[0 .. 24] |
|
184 | // matrix_0[0 .. 24] matrix_1[0 .. 24] .. matrix_127[0 .. 24] | |
168 |
|
185 | |||
169 | int frequencyBin; |
|
186 | int frequencyBin; | |
170 | int asmComponent; |
|
187 | int asmComponent; | |
171 | unsigned int offsetASMReorganized; |
|
188 | unsigned int offsetASMReorganized; | |
172 | unsigned int offsetASM; |
|
189 | unsigned int offsetASM; | |
173 |
|
190 | |||
174 | for (asmComponent = 0; asmComponent < NB_VALUES_PER_SM; asmComponent++) |
|
191 | for (asmComponent = 0; asmComponent < NB_VALUES_PER_SM; asmComponent++) | |
175 | { |
|
192 | { | |
176 | for( frequencyBin = 0; frequencyBin < NB_BINS_PER_SM; frequencyBin++ ) |
|
193 | for( frequencyBin = 0; frequencyBin < NB_BINS_PER_SM; frequencyBin++ ) | |
177 | { |
|
194 | { | |
178 | offsetASM = |
|
195 | offsetASM = | |
179 | asmComponent * NB_BINS_PER_SM |
|
196 | asmComponent * NB_BINS_PER_SM | |
180 | + frequencyBin; |
|
197 | + frequencyBin; | |
181 | offsetASMReorganized = |
|
198 | offsetASMReorganized = | |
182 | frequencyBin * NB_VALUES_PER_SM |
|
199 | frequencyBin * NB_VALUES_PER_SM | |
183 | + asmComponent; |
|
200 | + asmComponent; | |
184 | averaged_spec_mat_reorganized[ offsetASMReorganized ] = |
|
201 | averaged_spec_mat_reorganized[ offsetASMReorganized ] = | |
185 | averaged_spec_mat[ offsetASM ] / divider; |
|
202 | averaged_spec_mat[ offsetASM ] / divider; | |
186 | } |
|
203 | } | |
187 | } |
|
204 | } | |
188 | } |
|
205 | } | |
189 |
|
206 | |||
190 | void ASM_compress_reorganize_and_divide(float *averaged_spec_mat, float *compressed_spec_mat , float divider, |
|
207 | void ASM_compress_reorganize_and_divide(float *averaged_spec_mat, float *compressed_spec_mat , float divider, | |
191 | unsigned char nbBinsCompressedMatrix, unsigned char nbBinsToAverage, unsigned char ASMIndexStart ) |
|
208 | unsigned char nbBinsCompressedMatrix, unsigned char nbBinsToAverage, unsigned char ASMIndexStart ) | |
192 | { |
|
209 | { | |
193 | int frequencyBin; |
|
210 | int frequencyBin; | |
194 | int asmComponent; |
|
211 | int asmComponent; | |
195 | int offsetASM; |
|
212 | int offsetASM; | |
196 | int offsetCompressed; |
|
213 | int offsetCompressed; | |
197 | int k; |
|
214 | int k; | |
198 |
|
215 | |||
199 | // build data |
|
216 | // build data | |
200 | for (asmComponent = 0; asmComponent < NB_VALUES_PER_SM; asmComponent++) |
|
217 | for (asmComponent = 0; asmComponent < NB_VALUES_PER_SM; asmComponent++) | |
201 | { |
|
218 | { | |
202 | for( frequencyBin = 0; frequencyBin < nbBinsCompressedMatrix; frequencyBin++ ) |
|
219 | for( frequencyBin = 0; frequencyBin < nbBinsCompressedMatrix; frequencyBin++ ) | |
203 | { |
|
220 | { | |
204 | offsetCompressed = // NO TIME OFFSET |
|
221 | offsetCompressed = // NO TIME OFFSET | |
205 | frequencyBin * NB_VALUES_PER_SM |
|
222 | frequencyBin * NB_VALUES_PER_SM | |
206 | + asmComponent; |
|
223 | + asmComponent; | |
207 | offsetASM = // NO TIME OFFSET |
|
224 | offsetASM = // NO TIME OFFSET | |
208 | asmComponent * NB_BINS_PER_SM |
|
225 | asmComponent * NB_BINS_PER_SM | |
209 | + ASMIndexStart |
|
226 | + ASMIndexStart | |
210 | + frequencyBin * nbBinsToAverage; |
|
227 | + frequencyBin * nbBinsToAverage; | |
211 | compressed_spec_mat[ offsetCompressed ] = 0; |
|
228 | compressed_spec_mat[ offsetCompressed ] = 0; | |
212 | for ( k = 0; k < nbBinsToAverage; k++ ) |
|
229 | for ( k = 0; k < nbBinsToAverage; k++ ) | |
213 | { |
|
230 | { | |
214 | compressed_spec_mat[offsetCompressed ] = |
|
231 | compressed_spec_mat[offsetCompressed ] = | |
215 | ( compressed_spec_mat[ offsetCompressed ] |
|
232 | ( compressed_spec_mat[ offsetCompressed ] | |
216 | + averaged_spec_mat[ offsetASM + k ] ) / (divider * nbBinsToAverage); |
|
233 | + averaged_spec_mat[ offsetASM + k ] ) / (divider * nbBinsToAverage); | |
217 | } |
|
234 | } | |
218 | } |
|
235 | } | |
219 | } |
|
236 | } | |
220 | } |
|
237 | } | |
221 |
|
238 | |||
222 | void ASM_convert( volatile float *input_matrix, char *output_matrix) |
|
239 | void ASM_convert( volatile float *input_matrix, char *output_matrix) | |
223 | { |
|
240 | { | |
224 | // convert the data to have a matrix in compressed float, 16 bits = [sign 1 bit *** exp 8 bits *** fraction 7 bits] |
|
241 | // convert the data to have a matrix in compressed float, 16 bits = [sign 1 bit *** exp 8 bits *** fraction 7 bits] | |
225 | // INTPUT (ICD format) |
|
242 | // INTPUT (ICD format) | |
226 | // matrix_0[0 .. 24] matrix_1[0 .. 24] .. matrix_127[0 .. 24] |
|
243 | // matrix_0[0 .. 24] matrix_1[0 .. 24] .. matrix_127[0 .. 24] | |
227 | // OUTPUT (ICD format) |
|
244 | // OUTPUT (ICD format) | |
228 | // matrix_0[0 .. 24] matrix_1[0 .. 24] .. matrix_127[0 .. 24] |
|
245 | // matrix_0[0 .. 24] matrix_1[0 .. 24] .. matrix_127[0 .. 24] | |
229 |
|
246 | |||
230 | unsigned int frequencyBin; |
|
247 | unsigned int frequencyBin; | |
231 | unsigned int asmComponent; |
|
248 | unsigned int asmComponent; | |
232 | char * pt_char_input; |
|
249 | char * pt_char_input; | |
233 | char * pt_char_output; |
|
250 | char * pt_char_output; | |
234 | unsigned int offsetInput; |
|
251 | unsigned int offsetInput; | |
235 | unsigned int offsetOutput; |
|
252 | unsigned int offsetOutput; | |
236 |
|
253 | |||
237 | pt_char_input = (char*) &input_matrix; |
|
254 | pt_char_input = (char*) &input_matrix; | |
238 | pt_char_output = (char*) &output_matrix; |
|
255 | pt_char_output = (char*) &output_matrix; | |
239 |
|
256 | |||
240 | // convert all other data |
|
257 | // convert all other data | |
241 | for( frequencyBin=0; frequencyBin<NB_BINS_PER_SM; frequencyBin++) |
|
258 | for( frequencyBin=0; frequencyBin<NB_BINS_PER_SM; frequencyBin++) | |
242 | { |
|
259 | { | |
243 | for ( asmComponent=0; asmComponent<NB_VALUES_PER_SM; asmComponent++) |
|
260 | for ( asmComponent=0; asmComponent<NB_VALUES_PER_SM; asmComponent++) | |
244 | { |
|
261 | { | |
245 | offsetInput = (frequencyBin*NB_VALUES_PER_SM) + asmComponent ; |
|
262 | offsetInput = (frequencyBin*NB_VALUES_PER_SM) + asmComponent ; | |
246 | offsetOutput = 2 * ( (frequencyBin*NB_VALUES_PER_SM) + asmComponent ) ; |
|
263 | offsetOutput = 2 * ( (frequencyBin*NB_VALUES_PER_SM) + asmComponent ) ; | |
247 | pt_char_input = (char*) &input_matrix [ offsetInput ]; |
|
264 | pt_char_input = (char*) &input_matrix [ offsetInput ]; | |
248 | pt_char_output = (char*) &output_matrix[ offsetOutput ]; |
|
265 | pt_char_output = (char*) &output_matrix[ offsetOutput ]; | |
249 | pt_char_output[0] = pt_char_input[0]; // bits 31 downto 24 of the float |
|
266 | pt_char_output[0] = pt_char_input[0]; // bits 31 downto 24 of the float | |
250 | pt_char_output[1] = pt_char_input[1]; // bits 23 downto 16 of the float |
|
267 | pt_char_output[1] = pt_char_input[1]; // bits 23 downto 16 of the float | |
251 | } |
|
268 | } | |
252 | } |
|
269 | } | |
253 | } |
|
270 | } | |
254 |
|
271 | |||
255 | #endif // FSW_PROCESSING_H_INCLUDED |
|
272 | #endif // FSW_PROCESSING_H_INCLUDED |
@@ -1,380 +1,380 | |||||
1 | /** Functions related to data processing. |
|
1 | /** Functions related to data processing. | |
2 | * |
|
2 | * | |
3 | * @file |
|
3 | * @file | |
4 | * @author P. LEROY |
|
4 | * @author P. LEROY | |
5 | * |
|
5 | * | |
6 | * These function are related to data processing, i.e. spectral matrices averaging and basic parameters computation. |
|
6 | * These function are related to data processing, i.e. spectral matrices averaging and basic parameters computation. | |
7 | * |
|
7 | * | |
8 | */ |
|
8 | */ | |
9 |
|
9 | |||
10 | #include "avf0_prc0.h" |
|
10 | #include "avf0_prc0.h" | |
11 | #include "fsw_processing.h" |
|
11 | #include "fsw_processing.h" | |
12 |
|
12 | |||
13 | nb_sm_before_bp_asm_f0 nb_sm_before_f0; |
|
13 | nb_sm_before_bp_asm_f0 nb_sm_before_f0; | |
14 |
|
14 | |||
15 | //*** |
|
15 | //*** | |
16 | // F0 |
|
16 | // F0 | |
17 | ring_node_asm asm_ring_norm_f0 [ NB_RING_NODES_ASM_NORM_F0 ]; |
|
17 | ring_node_asm asm_ring_norm_f0 [ NB_RING_NODES_ASM_NORM_F0 ]; | |
18 | ring_node_asm asm_ring_burst_sbm_f0[ NB_RING_NODES_ASM_BURST_SBM_F0 ]; |
|
18 | ring_node_asm asm_ring_burst_sbm_f0[ NB_RING_NODES_ASM_BURST_SBM_F0 ]; | |
19 |
|
19 | |||
20 | float asm_f0_reorganized [ TOTAL_SIZE_SM ]; |
|
20 | float asm_f0_reorganized [ TOTAL_SIZE_SM ]; | |
21 | char asm_f0_char [ TIME_OFFSET_IN_BYTES + (TOTAL_SIZE_SM * 2) ]; |
|
21 | char asm_f0_char [ TIME_OFFSET_IN_BYTES + (TOTAL_SIZE_SM * 2) ]; | |
22 | float compressed_sm_norm_f0[ TOTAL_SIZE_COMPRESSED_ASM_NORM_F0]; |
|
22 | float compressed_sm_norm_f0[ TOTAL_SIZE_COMPRESSED_ASM_NORM_F0]; | |
23 | float compressed_sm_sbm_f0 [ TOTAL_SIZE_COMPRESSED_ASM_SBM_F0 ]; |
|
23 | float compressed_sm_sbm_f0 [ TOTAL_SIZE_COMPRESSED_ASM_SBM_F0 ]; | |
24 | //unsigned char bp1_norm_f0 [ TOTAL_SIZE_BP1_NORM_F0 ]; |
|
24 | //unsigned char bp1_norm_f0 [ TOTAL_SIZE_BP1_NORM_F0 ]; | |
25 | //unsigned char bp1_sbm_f0 [ TOTAL_SIZE_BP1_SBM_F0 ]; |
|
25 | //unsigned char bp1_sbm_f0 [ TOTAL_SIZE_BP1_SBM_F0 ]; | |
26 |
|
26 | |||
27 | //************ |
|
27 | //************ | |
28 | // RTEMS TASKS |
|
28 | // RTEMS TASKS | |
29 |
|
29 | |||
30 | rtems_task avf0_task( rtems_task_argument lfrRequestedMode ) |
|
30 | rtems_task avf0_task( rtems_task_argument lfrRequestedMode ) | |
31 | { |
|
31 | { | |
32 | int i; |
|
32 | int i; | |
33 |
|
33 | |||
34 | rtems_event_set event_out; |
|
34 | rtems_event_set event_out; | |
35 | rtems_status_code status; |
|
35 | rtems_status_code status; | |
36 | rtems_id queue_id_prc0; |
|
36 | rtems_id queue_id_prc0; | |
37 | asm_msg msgForMATR; |
|
37 | asm_msg msgForMATR; | |
38 | ring_node_sm *ring_node_tab[8]; |
|
38 | ring_node_sm *ring_node_tab[8]; | |
39 | ring_node_asm *current_ring_node_asm_burst_sbm_f0; |
|
39 | ring_node_asm *current_ring_node_asm_burst_sbm_f0; | |
40 | ring_node_asm *current_ring_node_asm_norm_f0; |
|
40 | ring_node_asm *current_ring_node_asm_norm_f0; | |
41 |
|
41 | |||
42 | unsigned int nb_norm_bp1; |
|
42 | unsigned int nb_norm_bp1; | |
43 | unsigned int nb_norm_bp2; |
|
43 | unsigned int nb_norm_bp2; | |
44 | unsigned int nb_norm_asm; |
|
44 | unsigned int nb_norm_asm; | |
45 | unsigned int nb_sbm_bp1; |
|
45 | unsigned int nb_sbm_bp1; | |
46 | unsigned int nb_sbm_bp2; |
|
46 | unsigned int nb_sbm_bp2; | |
47 |
|
47 | |||
48 | nb_norm_bp1 = 0; |
|
48 | nb_norm_bp1 = 0; | |
49 | nb_norm_bp2 = 0; |
|
49 | nb_norm_bp2 = 0; | |
50 | nb_norm_asm = 0; |
|
50 | nb_norm_asm = 0; | |
51 | nb_sbm_bp1 = 0; |
|
51 | nb_sbm_bp1 = 0; | |
52 | nb_sbm_bp2 = 0; |
|
52 | nb_sbm_bp2 = 0; | |
53 |
|
53 | |||
54 | reset_nb_sm_f0( lfrRequestedMode ); // reset the sm counters that drive the BP and ASM computations / transmissions |
|
54 | reset_nb_sm_f0( lfrRequestedMode ); // reset the sm counters that drive the BP and ASM computations / transmissions | |
55 | ASM_generic_init_ring( asm_ring_norm_f0, NB_RING_NODES_ASM_NORM_F0 ); |
|
55 | ASM_generic_init_ring( asm_ring_norm_f0, NB_RING_NODES_ASM_NORM_F0 ); | |
56 | ASM_generic_init_ring( asm_ring_burst_sbm_f0, NB_RING_NODES_ASM_BURST_SBM_F0 ); |
|
56 | ASM_generic_init_ring( asm_ring_burst_sbm_f0, NB_RING_NODES_ASM_BURST_SBM_F0 ); | |
57 | current_ring_node_asm_norm_f0 = asm_ring_norm_f0; |
|
57 | current_ring_node_asm_norm_f0 = asm_ring_norm_f0; | |
58 | current_ring_node_asm_burst_sbm_f0 = asm_ring_burst_sbm_f0; |
|
58 | current_ring_node_asm_burst_sbm_f0 = asm_ring_burst_sbm_f0; | |
59 |
|
59 | |||
60 | BOOT_PRINTF1("in AVFO *** lfrRequestedMode = %d\n", (int) lfrRequestedMode) |
|
60 | BOOT_PRINTF1("in AVFO *** lfrRequestedMode = %d\n", (int) lfrRequestedMode) | |
61 |
|
61 | |||
62 | status = get_message_queue_id_prc0( &queue_id_prc0 ); |
|
62 | status = get_message_queue_id_prc0( &queue_id_prc0 ); | |
63 | if (status != RTEMS_SUCCESSFUL) |
|
63 | if (status != RTEMS_SUCCESSFUL) | |
64 | { |
|
64 | { | |
65 | PRINTF1("in MATR *** ERR get_message_queue_id_prc0 %d\n", status) |
|
65 | PRINTF1("in MATR *** ERR get_message_queue_id_prc0 %d\n", status) | |
66 | } |
|
66 | } | |
67 |
|
67 | |||
68 | while(1){ |
|
68 | while(1){ | |
69 | rtems_event_receive(RTEMS_EVENT_0, RTEMS_WAIT, RTEMS_NO_TIMEOUT, &event_out); // wait for an RTEMS_EVENT0 |
|
69 | rtems_event_receive(RTEMS_EVENT_0, RTEMS_WAIT, RTEMS_NO_TIMEOUT, &event_out); // wait for an RTEMS_EVENT0 | |
70 |
|
70 | |||
71 | //**************************************** |
|
71 | //**************************************** | |
72 | // initialize the mesage for the MATR task |
|
72 | // initialize the mesage for the MATR task | |
73 | msgForMATR.norm = current_ring_node_asm_norm_f0; |
|
73 | msgForMATR.norm = current_ring_node_asm_norm_f0; | |
74 | msgForMATR.burst_sbm = current_ring_node_asm_burst_sbm_f0; |
|
74 | msgForMATR.burst_sbm = current_ring_node_asm_burst_sbm_f0; | |
75 | msgForMATR.event = 0x00; // this composite event will be sent to the MATR task |
|
75 | msgForMATR.event = 0x00; // this composite event will be sent to the MATR task | |
76 | msgForMATR.coarseTime = ring_node_for_averaging_sm_f0->coarseTime; |
|
76 | msgForMATR.coarseTime = ring_node_for_averaging_sm_f0->coarseTime; | |
77 | msgForMATR.fineTime = ring_node_for_averaging_sm_f0->fineTime; |
|
77 | msgForMATR.fineTime = ring_node_for_averaging_sm_f0->fineTime; | |
78 | // |
|
78 | // | |
79 | //**************************************** |
|
79 | //**************************************** | |
80 |
|
80 | |||
81 | ring_node_tab[NB_SM_BEFORE_AVF0-1] = ring_node_for_averaging_sm_f0; |
|
81 | ring_node_tab[NB_SM_BEFORE_AVF0-1] = ring_node_for_averaging_sm_f0; | |
82 | for ( i = 2; i < (NB_SM_BEFORE_AVF0+1); i++ ) |
|
82 | for ( i = 2; i < (NB_SM_BEFORE_AVF0+1); i++ ) | |
83 | { |
|
83 | { | |
84 | ring_node_for_averaging_sm_f0 = ring_node_for_averaging_sm_f0->previous; |
|
84 | ring_node_for_averaging_sm_f0 = ring_node_for_averaging_sm_f0->previous; | |
85 | ring_node_tab[NB_SM_BEFORE_AVF0-i] = ring_node_for_averaging_sm_f0; |
|
85 | ring_node_tab[NB_SM_BEFORE_AVF0-i] = ring_node_for_averaging_sm_f0; | |
86 | } |
|
86 | } | |
87 |
|
87 | |||
88 | // compute the average and store it in the averaged_sm_f1 buffer |
|
88 | // compute the average and store it in the averaged_sm_f1 buffer | |
89 | SM_average( current_ring_node_asm_norm_f0->matrix, |
|
89 | SM_average_alt( current_ring_node_asm_norm_f0->matrix, | |
90 | current_ring_node_asm_burst_sbm_f0->matrix, |
|
90 | current_ring_node_asm_burst_sbm_f0->matrix, | |
91 | ring_node_tab, |
|
91 | ring_node_tab, | |
92 | nb_norm_bp1, nb_sbm_bp1 ); |
|
92 | nb_norm_bp1, nb_sbm_bp1 ); | |
93 |
|
93 | |||
94 | // update nb_average |
|
94 | // update nb_average | |
95 | nb_norm_bp1 = nb_norm_bp1 + NB_SM_BEFORE_AVF0; |
|
95 | nb_norm_bp1 = nb_norm_bp1 + NB_SM_BEFORE_AVF0; | |
96 | nb_norm_bp2 = nb_norm_bp2 + NB_SM_BEFORE_AVF0; |
|
96 | nb_norm_bp2 = nb_norm_bp2 + NB_SM_BEFORE_AVF0; | |
97 | nb_norm_asm = nb_norm_asm + NB_SM_BEFORE_AVF0; |
|
97 | nb_norm_asm = nb_norm_asm + NB_SM_BEFORE_AVF0; | |
98 | nb_sbm_bp1 = nb_sbm_bp1 + NB_SM_BEFORE_AVF0; |
|
98 | nb_sbm_bp1 = nb_sbm_bp1 + NB_SM_BEFORE_AVF0; | |
99 | nb_sbm_bp2 = nb_sbm_bp2 + NB_SM_BEFORE_AVF0; |
|
99 | nb_sbm_bp2 = nb_sbm_bp2 + NB_SM_BEFORE_AVF0; | |
100 |
|
100 | |||
101 | if (nb_sbm_bp1 == nb_sm_before_f0.burst_sbm_bp1) |
|
101 | if (nb_sbm_bp1 == nb_sm_before_f0.burst_sbm_bp1) | |
102 | { |
|
102 | { | |
103 | nb_sbm_bp1 = 0; |
|
103 | nb_sbm_bp1 = 0; | |
104 | // set another ring for the ASM storage |
|
104 | // set another ring for the ASM storage | |
105 | current_ring_node_asm_burst_sbm_f0 = current_ring_node_asm_burst_sbm_f0->next; |
|
105 | current_ring_node_asm_burst_sbm_f0 = current_ring_node_asm_burst_sbm_f0->next; | |
106 | if ( lfrCurrentMode == LFR_MODE_BURST ) |
|
106 | if ( lfrCurrentMode == LFR_MODE_BURST ) | |
107 | { |
|
107 | { | |
108 | msgForMATR.event = msgForMATR.event | RTEMS_EVENT_BURST_BP1_F0; |
|
108 | msgForMATR.event = msgForMATR.event | RTEMS_EVENT_BURST_BP1_F0; | |
109 | } |
|
109 | } | |
110 | else if ( (lfrCurrentMode == LFR_MODE_SBM1) || (lfrCurrentMode == LFR_MODE_SBM2) ) |
|
110 | else if ( (lfrCurrentMode == LFR_MODE_SBM1) || (lfrCurrentMode == LFR_MODE_SBM2) ) | |
111 | { |
|
111 | { | |
112 | msgForMATR.event = msgForMATR.event | RTEMS_EVENT_SBM_BP1_F0; |
|
112 | msgForMATR.event = msgForMATR.event | RTEMS_EVENT_SBM_BP1_F0; | |
113 | } |
|
113 | } | |
114 | } |
|
114 | } | |
115 |
|
115 | |||
116 | if (nb_sbm_bp2 == nb_sm_before_f0.burst_sbm_bp2) |
|
116 | if (nb_sbm_bp2 == nb_sm_before_f0.burst_sbm_bp2) | |
117 | { |
|
117 | { | |
118 | nb_sbm_bp2 = 0; |
|
118 | nb_sbm_bp2 = 0; | |
119 | if ( lfrCurrentMode == LFR_MODE_BURST ) |
|
119 | if ( lfrCurrentMode == LFR_MODE_BURST ) | |
120 | { |
|
120 | { | |
121 | msgForMATR.event = msgForMATR.event | RTEMS_EVENT_BURST_BP2_F0; |
|
121 | msgForMATR.event = msgForMATR.event | RTEMS_EVENT_BURST_BP2_F0; | |
122 | } |
|
122 | } | |
123 | else if ( (lfrCurrentMode == LFR_MODE_SBM1) || (lfrCurrentMode == LFR_MODE_SBM2) ) |
|
123 | else if ( (lfrCurrentMode == LFR_MODE_SBM1) || (lfrCurrentMode == LFR_MODE_SBM2) ) | |
124 | { |
|
124 | { | |
125 | msgForMATR.event = msgForMATR.event | RTEMS_EVENT_SBM_BP2_F0; |
|
125 | msgForMATR.event = msgForMATR.event | RTEMS_EVENT_SBM_BP2_F0; | |
126 | } |
|
126 | } | |
127 | } |
|
127 | } | |
128 |
|
128 | |||
129 | if (nb_norm_bp1 == nb_sm_before_f0.norm_bp1) |
|
129 | if (nb_norm_bp1 == nb_sm_before_f0.norm_bp1) | |
130 | { |
|
130 | { | |
131 | nb_norm_bp1 = 0; |
|
131 | nb_norm_bp1 = 0; | |
132 | // set another ring for the ASM storage |
|
132 | // set another ring for the ASM storage | |
133 | current_ring_node_asm_norm_f0 = current_ring_node_asm_norm_f0->next; |
|
133 | current_ring_node_asm_norm_f0 = current_ring_node_asm_norm_f0->next; | |
134 | if ( (lfrCurrentMode == LFR_MODE_NORMAL) |
|
134 | if ( (lfrCurrentMode == LFR_MODE_NORMAL) | |
135 | || (lfrCurrentMode == LFR_MODE_SBM1) || (lfrCurrentMode == LFR_MODE_SBM2) ) |
|
135 | || (lfrCurrentMode == LFR_MODE_SBM1) || (lfrCurrentMode == LFR_MODE_SBM2) ) | |
136 | { |
|
136 | { | |
137 | msgForMATR.event = msgForMATR.event | RTEMS_EVENT_NORM_BP1_F0; |
|
137 | msgForMATR.event = msgForMATR.event | RTEMS_EVENT_NORM_BP1_F0; | |
138 | } |
|
138 | } | |
139 | } |
|
139 | } | |
140 |
|
140 | |||
141 | if (nb_norm_bp2 == nb_sm_before_f0.norm_bp2) |
|
141 | if (nb_norm_bp2 == nb_sm_before_f0.norm_bp2) | |
142 | { |
|
142 | { | |
143 | nb_norm_bp2 = 0; |
|
143 | nb_norm_bp2 = 0; | |
144 | if ( (lfrCurrentMode == LFR_MODE_NORMAL) |
|
144 | if ( (lfrCurrentMode == LFR_MODE_NORMAL) | |
145 | || (lfrCurrentMode == LFR_MODE_SBM1) || (lfrCurrentMode == LFR_MODE_SBM2) ) |
|
145 | || (lfrCurrentMode == LFR_MODE_SBM1) || (lfrCurrentMode == LFR_MODE_SBM2) ) | |
146 | { |
|
146 | { | |
147 | msgForMATR.event = msgForMATR.event | RTEMS_EVENT_NORM_BP2_F0; |
|
147 | msgForMATR.event = msgForMATR.event | RTEMS_EVENT_NORM_BP2_F0; | |
148 | } |
|
148 | } | |
149 | } |
|
149 | } | |
150 |
|
150 | |||
151 | if (nb_norm_asm == nb_sm_before_f0.norm_asm) |
|
151 | if (nb_norm_asm == nb_sm_before_f0.norm_asm) | |
152 | { |
|
152 | { | |
153 | nb_norm_asm = 0; |
|
153 | nb_norm_asm = 0; | |
154 | if ( (lfrCurrentMode == LFR_MODE_NORMAL) |
|
154 | if ( (lfrCurrentMode == LFR_MODE_NORMAL) | |
155 | || (lfrCurrentMode == LFR_MODE_SBM1) || (lfrCurrentMode == LFR_MODE_SBM2) ) |
|
155 | || (lfrCurrentMode == LFR_MODE_SBM1) || (lfrCurrentMode == LFR_MODE_SBM2) ) | |
156 | { |
|
156 | { | |
157 | // PRINTF1("%lld\n", localTime) |
|
157 | // PRINTF1("%lld\n", localTime) | |
158 | msgForMATR.event = msgForMATR.event | RTEMS_EVENT_NORM_ASM_F0; |
|
158 | msgForMATR.event = msgForMATR.event | RTEMS_EVENT_NORM_ASM_F0; | |
159 | } |
|
159 | } | |
160 | } |
|
160 | } | |
161 |
|
161 | |||
162 | //************************* |
|
162 | //************************* | |
163 | // send the message to MATR |
|
163 | // send the message to MATR | |
164 | if (msgForMATR.event != 0x00) |
|
164 | if (msgForMATR.event != 0x00) | |
165 | { |
|
165 | { | |
166 | status = rtems_message_queue_send( queue_id_prc0, (char *) &msgForMATR, MSG_QUEUE_SIZE_PRC0); |
|
166 | status = rtems_message_queue_send( queue_id_prc0, (char *) &msgForMATR, MSG_QUEUE_SIZE_PRC0); | |
167 | } |
|
167 | } | |
168 |
|
168 | |||
169 | if (status != RTEMS_SUCCESSFUL) { |
|
169 | if (status != RTEMS_SUCCESSFUL) { | |
170 | printf("in AVF0 *** Error sending message to MATR, code %d\n", status); |
|
170 | printf("in AVF0 *** Error sending message to MATR, code %d\n", status); | |
171 | } |
|
171 | } | |
172 | } |
|
172 | } | |
173 | } |
|
173 | } | |
174 |
|
174 | |||
175 | rtems_task prc0_task( rtems_task_argument lfrRequestedMode ) |
|
175 | rtems_task prc0_task( rtems_task_argument lfrRequestedMode ) | |
176 | { |
|
176 | { | |
177 | char incomingData[MSG_QUEUE_SIZE_SEND]; // incoming data buffer |
|
177 | char incomingData[MSG_QUEUE_SIZE_SEND]; // incoming data buffer | |
178 | size_t size; // size of the incoming TC packet |
|
178 | size_t size; // size of the incoming TC packet | |
179 | asm_msg *incomingMsg; |
|
179 | asm_msg *incomingMsg; | |
180 | // |
|
180 | // | |
181 | unsigned char sid; |
|
181 | unsigned char sid; | |
182 | spw_ioctl_pkt_send spw_ioctl_send_ASM; |
|
182 | spw_ioctl_pkt_send spw_ioctl_send_ASM; | |
183 | rtems_status_code status; |
|
183 | rtems_status_code status; | |
184 | rtems_id queue_id; |
|
184 | rtems_id queue_id; | |
185 | rtems_id queue_id_q_p0; |
|
185 | rtems_id queue_id_q_p0; | |
186 | Header_TM_LFR_SCIENCE_ASM_t headerASM; |
|
186 | Header_TM_LFR_SCIENCE_ASM_t headerASM; | |
187 | bp_packet_with_spare packet_norm_bp1_f0; |
|
187 | bp_packet_with_spare packet_norm_bp1_f0; | |
188 | bp_packet packet_norm_bp2_f0; |
|
188 | bp_packet packet_norm_bp2_f0; | |
189 | bp_packet packet_sbm_bp1_f0; |
|
189 | bp_packet packet_sbm_bp1_f0; | |
190 | bp_packet packet_sbm_bp2_f0; |
|
190 | bp_packet packet_sbm_bp2_f0; | |
191 |
|
191 | |||
192 | unsigned long long int localTime; |
|
192 | unsigned long long int localTime; | |
193 |
|
193 | |||
194 | ASM_init_header( &headerASM ); |
|
194 | ASM_init_header( &headerASM ); | |
195 |
|
195 | |||
196 | //************* |
|
196 | //************* | |
197 | // NORM headers |
|
197 | // NORM headers | |
198 | BP_init_header_with_spare( &packet_norm_bp1_f0.header, |
|
198 | BP_init_header_with_spare( &packet_norm_bp1_f0.header, | |
199 | APID_TM_SCIENCE_NORMAL_BURST, SID_NORM_BP1_F0, |
|
199 | APID_TM_SCIENCE_NORMAL_BURST, SID_NORM_BP1_F0, | |
200 | PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP1_F0, NB_BINS_COMPRESSED_SM_F0 ); |
|
200 | PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP1_F0, NB_BINS_COMPRESSED_SM_F0 ); | |
201 | BP_init_header( &packet_norm_bp2_f0.header, |
|
201 | BP_init_header( &packet_norm_bp2_f0.header, | |
202 | APID_TM_SCIENCE_NORMAL_BURST, SID_NORM_BP2_F0, |
|
202 | APID_TM_SCIENCE_NORMAL_BURST, SID_NORM_BP2_F0, | |
203 | PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP2_F0, NB_BINS_COMPRESSED_SM_F0); |
|
203 | PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP2_F0, NB_BINS_COMPRESSED_SM_F0); | |
204 |
|
204 | |||
205 | //**************************** |
|
205 | //**************************** | |
206 | // BURST SBM1 and SBM2 headers |
|
206 | // BURST SBM1 and SBM2 headers | |
207 | if ( lfrRequestedMode == LFR_MODE_BURST ) |
|
207 | if ( lfrRequestedMode == LFR_MODE_BURST ) | |
208 | { |
|
208 | { | |
209 | BP_init_header( &packet_sbm_bp1_f0.header, |
|
209 | BP_init_header( &packet_sbm_bp1_f0.header, | |
210 | APID_TM_SCIENCE_NORMAL_BURST, SID_BURST_BP1_F0, |
|
210 | APID_TM_SCIENCE_NORMAL_BURST, SID_BURST_BP1_F0, | |
211 | PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP1_F0, NB_BINS_COMPRESSED_SM_SBM_F0); |
|
211 | PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP1_F0, NB_BINS_COMPRESSED_SM_SBM_F0); | |
212 | BP_init_header( &packet_sbm_bp2_f0.header, |
|
212 | BP_init_header( &packet_sbm_bp2_f0.header, | |
213 | APID_TM_SCIENCE_NORMAL_BURST, SID_BURST_BP2_F0, |
|
213 | APID_TM_SCIENCE_NORMAL_BURST, SID_BURST_BP2_F0, | |
214 | PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP2_F0, NB_BINS_COMPRESSED_SM_SBM_F0); |
|
214 | PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP2_F0, NB_BINS_COMPRESSED_SM_SBM_F0); | |
215 | } |
|
215 | } | |
216 | else if ( lfrRequestedMode == LFR_MODE_SBM1 ) |
|
216 | else if ( lfrRequestedMode == LFR_MODE_SBM1 ) | |
217 | { |
|
217 | { | |
218 | BP_init_header( &packet_sbm_bp1_f0.header, |
|
218 | BP_init_header( &packet_sbm_bp1_f0.header, | |
219 | APID_TM_SCIENCE_SBM1_SBM2, SID_SBM1_BP1_F0, |
|
219 | APID_TM_SCIENCE_SBM1_SBM2, SID_SBM1_BP1_F0, | |
220 | PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP1_F0, NB_BINS_COMPRESSED_SM_SBM_F0); |
|
220 | PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP1_F0, NB_BINS_COMPRESSED_SM_SBM_F0); | |
221 | BP_init_header( &packet_sbm_bp2_f0.header, |
|
221 | BP_init_header( &packet_sbm_bp2_f0.header, | |
222 | APID_TM_SCIENCE_SBM1_SBM2, SID_SBM1_BP2_F0, |
|
222 | APID_TM_SCIENCE_SBM1_SBM2, SID_SBM1_BP2_F0, | |
223 | PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP2_F0, NB_BINS_COMPRESSED_SM_SBM_F0); |
|
223 | PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP2_F0, NB_BINS_COMPRESSED_SM_SBM_F0); | |
224 | } |
|
224 | } | |
225 | else if ( lfrRequestedMode == LFR_MODE_SBM2 ) |
|
225 | else if ( lfrRequestedMode == LFR_MODE_SBM2 ) | |
226 | { |
|
226 | { | |
227 | BP_init_header( &packet_sbm_bp1_f0.header, |
|
227 | BP_init_header( &packet_sbm_bp1_f0.header, | |
228 | APID_TM_SCIENCE_SBM1_SBM2, SID_SBM2_BP1_F0, |
|
228 | APID_TM_SCIENCE_SBM1_SBM2, SID_SBM2_BP1_F0, | |
229 | PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP1_F0, NB_BINS_COMPRESSED_SM_SBM_F0); |
|
229 | PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP1_F0, NB_BINS_COMPRESSED_SM_SBM_F0); | |
230 | BP_init_header( &packet_sbm_bp2_f0.header, |
|
230 | BP_init_header( &packet_sbm_bp2_f0.header, | |
231 | APID_TM_SCIENCE_SBM1_SBM2, SID_SBM2_BP2_F0, |
|
231 | APID_TM_SCIENCE_SBM1_SBM2, SID_SBM2_BP2_F0, | |
232 | PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP2_F0, NB_BINS_COMPRESSED_SM_SBM_F0); |
|
232 | PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP2_F0, NB_BINS_COMPRESSED_SM_SBM_F0); | |
233 | } |
|
233 | } | |
234 | else |
|
234 | else | |
235 | { |
|
235 | { | |
236 | PRINTF1("in PRC0 *** lfrRequestedMode is %d, several headers not initialized\n", (unsigned int) lfrRequestedMode) |
|
236 | PRINTF1("in PRC0 *** lfrRequestedMode is %d, several headers not initialized\n", (unsigned int) lfrRequestedMode) | |
237 | } |
|
237 | } | |
238 |
|
238 | |||
239 | status = get_message_queue_id_send( &queue_id ); |
|
239 | status = get_message_queue_id_send( &queue_id ); | |
240 | if (status != RTEMS_SUCCESSFUL) |
|
240 | if (status != RTEMS_SUCCESSFUL) | |
241 | { |
|
241 | { | |
242 | PRINTF1("in PRC0 *** ERR get_message_queue_id_send %d\n", status) |
|
242 | PRINTF1("in PRC0 *** ERR get_message_queue_id_send %d\n", status) | |
243 | } |
|
243 | } | |
244 | status = get_message_queue_id_prc0( &queue_id_q_p0); |
|
244 | status = get_message_queue_id_prc0( &queue_id_q_p0); | |
245 | if (status != RTEMS_SUCCESSFUL) |
|
245 | if (status != RTEMS_SUCCESSFUL) | |
246 | { |
|
246 | { | |
247 | PRINTF1("in PRC0 *** ERR get_message_queue_id_prc0 %d\n", status) |
|
247 | PRINTF1("in PRC0 *** ERR get_message_queue_id_prc0 %d\n", status) | |
248 | } |
|
248 | } | |
249 |
|
249 | |||
250 | BOOT_PRINTF1("in PRC0 *** lfrRequestedMode = %d\n", (int) lfrRequestedMode) |
|
250 | BOOT_PRINTF1("in PRC0 *** lfrRequestedMode = %d\n", (int) lfrRequestedMode) | |
251 |
|
251 | |||
252 | while(1){ |
|
252 | while(1){ | |
253 | status = rtems_message_queue_receive( queue_id_q_p0, incomingData, &size, //************************************ |
|
253 | status = rtems_message_queue_receive( queue_id_q_p0, incomingData, &size, //************************************ | |
254 | RTEMS_WAIT, RTEMS_NO_TIMEOUT ); // wait for a message coming from AVF0 |
|
254 | RTEMS_WAIT, RTEMS_NO_TIMEOUT ); // wait for a message coming from AVF0 | |
255 |
|
255 | |||
256 | incomingMsg = (asm_msg*) incomingData; |
|
256 | incomingMsg = (asm_msg*) incomingData; | |
257 |
|
257 | |||
258 | localTime = getTimeAsUnsignedLongLongInt( ); |
|
258 | localTime = getTimeAsUnsignedLongLongInt( ); | |
259 |
|
259 | |||
260 | //**************** |
|
260 | //**************** | |
261 | //**************** |
|
261 | //**************** | |
262 | // BURST SBM1 SBM2 |
|
262 | // BURST SBM1 SBM2 | |
263 | //**************** |
|
263 | //**************** | |
264 | //**************** |
|
264 | //**************** | |
265 | if ( (incomingMsg->event & RTEMS_EVENT_BURST_BP1_F0 ) || (incomingMsg->event & RTEMS_EVENT_SBM_BP1_F0 ) ) |
|
265 | if ( (incomingMsg->event & RTEMS_EVENT_BURST_BP1_F0 ) || (incomingMsg->event & RTEMS_EVENT_SBM_BP1_F0 ) ) | |
266 | { |
|
266 | { | |
267 | sid = getSID( incomingMsg->event ); |
|
267 | sid = getSID( incomingMsg->event ); | |
268 | // 1) compress the matrix for Basic Parameters calculation |
|
268 | // 1) compress the matrix for Basic Parameters calculation | |
269 | ASM_compress_reorganize_and_divide( incomingMsg->burst_sbm->matrix, compressed_sm_sbm_f0, |
|
269 | ASM_compress_reorganize_and_divide( incomingMsg->burst_sbm->matrix, compressed_sm_sbm_f0, | |
270 | nb_sm_before_f0.burst_sbm_bp1, |
|
270 | nb_sm_before_f0.burst_sbm_bp1, | |
271 | NB_BINS_COMPRESSED_SM_SBM_F0, NB_BINS_TO_AVERAGE_ASM_SBM_F0, |
|
271 | NB_BINS_COMPRESSED_SM_SBM_F0, NB_BINS_TO_AVERAGE_ASM_SBM_F0, | |
272 | ASM_F0_INDICE_START); |
|
272 | ASM_F0_INDICE_START); | |
273 | // 2) compute the BP1 set |
|
273 | // 2) compute the BP1 set | |
274 | // BP1_set( compressed_sm_norm_f0, NB_BINS_COMPRESSED_SM_SBM_F0, bp1_sbm_f0 ); |
|
274 | // BP1_set( compressed_sm_norm_f0, NB_BINS_COMPRESSED_SM_SBM_F0, bp1_sbm_f0 ); | |
275 | // 3) send the BP1 set |
|
275 | // 3) send the BP1 set | |
276 | set_time( packet_sbm_bp1_f0.header.time, (unsigned char *) &incomingMsg->coarseTime ); |
|
276 | set_time( packet_sbm_bp1_f0.header.time, (unsigned char *) &incomingMsg->coarseTime ); | |
277 | set_time( packet_sbm_bp1_f0.header.acquisitionTime, (unsigned char *) &incomingMsg->coarseTime ); |
|
277 | set_time( packet_sbm_bp1_f0.header.acquisitionTime, (unsigned char *) &incomingMsg->coarseTime ); | |
278 | BP_send( (char *) &packet_sbm_bp1_f0, queue_id, |
|
278 | BP_send( (char *) &packet_sbm_bp1_f0, queue_id, | |
279 | PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP1_F0 + PACKET_LENGTH_DELTA, |
|
279 | PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP1_F0 + PACKET_LENGTH_DELTA, | |
280 | sid); |
|
280 | sid); | |
281 | // 4) compute the BP2 set if needed |
|
281 | // 4) compute the BP2 set if needed | |
282 | if ( (incomingMsg->event & RTEMS_EVENT_BURST_BP2_F0) || (incomingMsg->event & RTEMS_EVENT_SBM_BP2_F0) ) |
|
282 | if ( (incomingMsg->event & RTEMS_EVENT_BURST_BP2_F0) || (incomingMsg->event & RTEMS_EVENT_SBM_BP2_F0) ) | |
283 | { |
|
283 | { | |
284 | // 1) compute the BP2 set |
|
284 | // 1) compute the BP2 set | |
285 |
|
285 | |||
286 | // 2) send the BP2 set |
|
286 | // 2) send the BP2 set | |
287 | set_time( packet_sbm_bp2_f0.header.time, (unsigned char *) &incomingMsg->coarseTime ); |
|
287 | set_time( packet_sbm_bp2_f0.header.time, (unsigned char *) &incomingMsg->coarseTime ); | |
288 | set_time( packet_sbm_bp2_f0.header.acquisitionTime, (unsigned char *) &incomingMsg->coarseTime ); |
|
288 | set_time( packet_sbm_bp2_f0.header.acquisitionTime, (unsigned char *) &incomingMsg->coarseTime ); | |
289 | BP_send( (char *) &packet_sbm_bp2_f0, queue_id, |
|
289 | BP_send( (char *) &packet_sbm_bp2_f0, queue_id, | |
290 | PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP2_F0 + PACKET_LENGTH_DELTA, |
|
290 | PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP2_F0 + PACKET_LENGTH_DELTA, | |
291 | sid); |
|
291 | sid); | |
292 | } |
|
292 | } | |
293 | } |
|
293 | } | |
294 |
|
294 | |||
295 | //***** |
|
295 | //***** | |
296 | //***** |
|
296 | //***** | |
297 | // NORM |
|
297 | // NORM | |
298 | //***** |
|
298 | //***** | |
299 | //***** |
|
299 | //***** | |
300 | if (incomingMsg->event & RTEMS_EVENT_NORM_BP1_F0) |
|
300 | if (incomingMsg->event & RTEMS_EVENT_NORM_BP1_F0) | |
301 | { |
|
301 | { | |
302 | // 1) compress the matrix for Basic Parameters calculation |
|
302 | // 1) compress the matrix for Basic Parameters calculation | |
303 | ASM_compress_reorganize_and_divide( incomingMsg->norm->matrix, compressed_sm_norm_f0, |
|
303 | ASM_compress_reorganize_and_divide( incomingMsg->norm->matrix, compressed_sm_norm_f0, | |
304 | nb_sm_before_f0.norm_bp1, |
|
304 | nb_sm_before_f0.norm_bp1, | |
305 | NB_BINS_COMPRESSED_SM_F0, NB_BINS_TO_AVERAGE_ASM_F0, |
|
305 | NB_BINS_COMPRESSED_SM_F0, NB_BINS_TO_AVERAGE_ASM_F0, | |
306 | ASM_F0_INDICE_START ); |
|
306 | ASM_F0_INDICE_START ); | |
307 | // 2) compute the BP1 set |
|
307 | // 2) compute the BP1 set | |
308 | // BP1_set( compressed_sm_norm_f0, NB_BINS_COMPRESSED_SM_F0, bp1_norm_f0 ); |
|
308 | // BP1_set( compressed_sm_norm_f0, NB_BINS_COMPRESSED_SM_F0, bp1_norm_f0 ); | |
309 | // 3) send the BP1 set |
|
309 | // 3) send the BP1 set | |
310 | set_time( packet_norm_bp1_f0.header.time, (unsigned char *) &incomingMsg->coarseTime ); |
|
310 | set_time( packet_norm_bp1_f0.header.time, (unsigned char *) &incomingMsg->coarseTime ); | |
311 | set_time( packet_norm_bp1_f0.header.acquisitionTime, (unsigned char *) &incomingMsg->coarseTime ); |
|
311 | set_time( packet_norm_bp1_f0.header.acquisitionTime, (unsigned char *) &incomingMsg->coarseTime ); | |
312 | BP_send( (char *) &packet_norm_bp1_f0, queue_id, |
|
312 | BP_send( (char *) &packet_norm_bp1_f0, queue_id, | |
313 | PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP1_F0 + PACKET_LENGTH_DELTA, |
|
313 | PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP1_F0 + PACKET_LENGTH_DELTA, | |
314 | SID_NORM_BP1_F0 ); |
|
314 | SID_NORM_BP1_F0 ); | |
315 | if (incomingMsg->event & RTEMS_EVENT_NORM_BP2_F0) |
|
315 | if (incomingMsg->event & RTEMS_EVENT_NORM_BP2_F0) | |
316 | { |
|
316 | { | |
317 | // 1) compute the BP2 set using the same ASM as the one used for BP1 |
|
317 | // 1) compute the BP2 set using the same ASM as the one used for BP1 | |
318 |
|
318 | |||
319 | // 2) send the BP2 set |
|
319 | // 2) send the BP2 set | |
320 | set_time( packet_norm_bp2_f0.header.time, (unsigned char *) &incomingMsg->coarseTime ); |
|
320 | set_time( packet_norm_bp2_f0.header.time, (unsigned char *) &incomingMsg->coarseTime ); | |
321 | set_time( packet_norm_bp2_f0.header.acquisitionTime, (unsigned char *) &incomingMsg->coarseTime ); |
|
321 | set_time( packet_norm_bp2_f0.header.acquisitionTime, (unsigned char *) &incomingMsg->coarseTime ); | |
322 | BP_send( (char *) &packet_norm_bp2_f0, queue_id, |
|
322 | BP_send( (char *) &packet_norm_bp2_f0, queue_id, | |
323 | PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP2_F0 + PACKET_LENGTH_DELTA, |
|
323 | PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP2_F0 + PACKET_LENGTH_DELTA, | |
324 | SID_NORM_BP2_F0); |
|
324 | SID_NORM_BP2_F0); | |
325 | } |
|
325 | } | |
326 | } |
|
326 | } | |
327 |
|
327 | |||
328 | if (incomingMsg->event & RTEMS_EVENT_NORM_ASM_F0) |
|
328 | if (incomingMsg->event & RTEMS_EVENT_NORM_ASM_F0) | |
329 | { |
|
329 | { | |
330 | // 1) reorganize the ASM and divide |
|
330 | // 1) reorganize the ASM and divide | |
331 | ASM_reorganize_and_divide( incomingMsg->norm->matrix, |
|
331 | ASM_reorganize_and_divide( incomingMsg->norm->matrix, | |
332 | asm_f0_reorganized, |
|
332 | asm_f0_reorganized, | |
333 | nb_sm_before_f0.norm_bp1 ); |
|
333 | nb_sm_before_f0.norm_bp1 ); | |
334 | // 2) convert the float array in a char array |
|
334 | // 2) convert the float array in a char array | |
335 | ASM_convert( asm_f0_reorganized, asm_f0_char); |
|
335 | ASM_convert( asm_f0_reorganized, asm_f0_char); | |
336 | // 3) send the spectral matrix packets |
|
336 | // 3) send the spectral matrix packets | |
337 | set_time( headerASM.time , (unsigned char *) &incomingMsg->coarseTime ); |
|
337 | set_time( headerASM.time , (unsigned char *) &incomingMsg->coarseTime ); | |
338 | set_time( headerASM.acquisitionTime, (unsigned char *) &incomingMsg->coarseTime ); |
|
338 | set_time( headerASM.acquisitionTime, (unsigned char *) &incomingMsg->coarseTime ); | |
339 | ASM_send( &headerASM, asm_f0_char, SID_NORM_ASM_F0, &spw_ioctl_send_ASM, queue_id); |
|
339 | ASM_send( &headerASM, asm_f0_char, SID_NORM_ASM_F0, &spw_ioctl_send_ASM, queue_id); | |
340 | } |
|
340 | } | |
341 |
|
341 | |||
342 | } |
|
342 | } | |
343 | } |
|
343 | } | |
344 |
|
344 | |||
345 | //********** |
|
345 | //********** | |
346 | // FUNCTIONS |
|
346 | // FUNCTIONS | |
347 |
|
347 | |||
348 | void reset_nb_sm_f0( unsigned char lfrMode ) |
|
348 | void reset_nb_sm_f0( unsigned char lfrMode ) | |
349 | { |
|
349 | { | |
350 | nb_sm_before_f0.norm_bp1 = parameter_dump_packet.sy_lfr_n_bp_p0 * 96; |
|
350 | nb_sm_before_f0.norm_bp1 = parameter_dump_packet.sy_lfr_n_bp_p0 * 96; | |
351 | nb_sm_before_f0.norm_bp2 = parameter_dump_packet.sy_lfr_n_bp_p1 * 96; |
|
351 | nb_sm_before_f0.norm_bp2 = parameter_dump_packet.sy_lfr_n_bp_p1 * 96; | |
352 | nb_sm_before_f0.norm_asm = (parameter_dump_packet.sy_lfr_n_asm_p[0] * 256 + parameter_dump_packet.sy_lfr_n_asm_p[1]) * 96; |
|
352 | nb_sm_before_f0.norm_asm = (parameter_dump_packet.sy_lfr_n_asm_p[0] * 256 + parameter_dump_packet.sy_lfr_n_asm_p[1]) * 96; | |
353 | nb_sm_before_f0.sbm1_bp1 = parameter_dump_packet.sy_lfr_s1_bp_p0 * 24; // 0.25 s per digit |
|
353 | nb_sm_before_f0.sbm1_bp1 = parameter_dump_packet.sy_lfr_s1_bp_p0 * 24; // 0.25 s per digit | |
354 | nb_sm_before_f0.sbm1_bp2 = parameter_dump_packet.sy_lfr_s1_bp_p1 * 96; |
|
354 | nb_sm_before_f0.sbm1_bp2 = parameter_dump_packet.sy_lfr_s1_bp_p1 * 96; | |
355 | nb_sm_before_f0.sbm2_bp1 = parameter_dump_packet.sy_lfr_s2_bp_p0 * 96; |
|
355 | nb_sm_before_f0.sbm2_bp1 = parameter_dump_packet.sy_lfr_s2_bp_p0 * 96; | |
356 | nb_sm_before_f0.sbm2_bp2 = parameter_dump_packet.sy_lfr_s2_bp_p1 * 96; |
|
356 | nb_sm_before_f0.sbm2_bp2 = parameter_dump_packet.sy_lfr_s2_bp_p1 * 96; | |
357 | nb_sm_before_f0.burst_bp1 = parameter_dump_packet.sy_lfr_b_bp_p0 * 96; |
|
357 | nb_sm_before_f0.burst_bp1 = parameter_dump_packet.sy_lfr_b_bp_p0 * 96; | |
358 | nb_sm_before_f0.burst_bp2 = parameter_dump_packet.sy_lfr_b_bp_p1 * 96; |
|
358 | nb_sm_before_f0.burst_bp2 = parameter_dump_packet.sy_lfr_b_bp_p1 * 96; | |
359 |
|
359 | |||
360 | if (lfrMode == LFR_MODE_SBM1) |
|
360 | if (lfrMode == LFR_MODE_SBM1) | |
361 | { |
|
361 | { | |
362 | nb_sm_before_f0.burst_sbm_bp1 = nb_sm_before_f0.sbm1_bp1; |
|
362 | nb_sm_before_f0.burst_sbm_bp1 = nb_sm_before_f0.sbm1_bp1; | |
363 | nb_sm_before_f0.burst_sbm_bp2 = nb_sm_before_f0.sbm1_bp2; |
|
363 | nb_sm_before_f0.burst_sbm_bp2 = nb_sm_before_f0.sbm1_bp2; | |
364 | } |
|
364 | } | |
365 | else if (lfrMode == LFR_MODE_SBM2) |
|
365 | else if (lfrMode == LFR_MODE_SBM2) | |
366 | { |
|
366 | { | |
367 | nb_sm_before_f0.burst_sbm_bp1 = nb_sm_before_f0.sbm2_bp1; |
|
367 | nb_sm_before_f0.burst_sbm_bp1 = nb_sm_before_f0.sbm2_bp1; | |
368 | nb_sm_before_f0.burst_sbm_bp2 = nb_sm_before_f0.sbm2_bp2; |
|
368 | nb_sm_before_f0.burst_sbm_bp2 = nb_sm_before_f0.sbm2_bp2; | |
369 | } |
|
369 | } | |
370 | else if (lfrMode == LFR_MODE_BURST) |
|
370 | else if (lfrMode == LFR_MODE_BURST) | |
371 | { |
|
371 | { | |
372 | nb_sm_before_f0.burst_sbm_bp1 = nb_sm_before_f0.burst_bp1; |
|
372 | nb_sm_before_f0.burst_sbm_bp1 = nb_sm_before_f0.burst_bp1; | |
373 | nb_sm_before_f0.burst_sbm_bp2 = nb_sm_before_f0.burst_bp2; |
|
373 | nb_sm_before_f0.burst_sbm_bp2 = nb_sm_before_f0.burst_bp2; | |
374 | } |
|
374 | } | |
375 | else |
|
375 | else | |
376 | { |
|
376 | { | |
377 | nb_sm_before_f0.burst_sbm_bp1 = nb_sm_before_f0.burst_bp1; |
|
377 | nb_sm_before_f0.burst_sbm_bp1 = nb_sm_before_f0.burst_bp1; | |
378 | nb_sm_before_f0.burst_sbm_bp2 = nb_sm_before_f0.burst_bp2; |
|
378 | nb_sm_before_f0.burst_sbm_bp2 = nb_sm_before_f0.burst_bp2; | |
379 | } |
|
379 | } | |
380 | } |
|
380 | } |
@@ -1,360 +1,360 | |||||
1 | /** Functions related to data processing. |
|
1 | /** Functions related to data processing. | |
2 | * |
|
2 | * | |
3 | * @file |
|
3 | * @file | |
4 | * @author P. LEROY |
|
4 | * @author P. LEROY | |
5 | * |
|
5 | * | |
6 | * These function are related to data processing, i.e. spectral matrices averaging and basic parameters computation. |
|
6 | * These function are related to data processing, i.e. spectral matrices averaging and basic parameters computation. | |
7 | * |
|
7 | * | |
8 | */ |
|
8 | */ | |
9 |
|
9 | |||
10 | #include "avf1_prc1.h" |
|
10 | #include "avf1_prc1.h" | |
11 |
|
11 | |||
12 | nb_sm_before_bp_asm_f1 nb_sm_before_f1; |
|
12 | nb_sm_before_bp_asm_f1 nb_sm_before_f1; | |
13 |
|
13 | |||
14 | //*** |
|
14 | //*** | |
15 | // F1 |
|
15 | // F1 | |
16 | ring_node_asm asm_ring_norm_f1 [ NB_RING_NODES_ASM_NORM_F1 ]; |
|
16 | ring_node_asm asm_ring_norm_f1 [ NB_RING_NODES_ASM_NORM_F1 ]; | |
17 | ring_node_asm asm_ring_burst_sbm_f1[ NB_RING_NODES_ASM_BURST_SBM_F1 ]; |
|
17 | ring_node_asm asm_ring_burst_sbm_f1[ NB_RING_NODES_ASM_BURST_SBM_F1 ]; | |
18 |
|
18 | |||
19 | float asm_f1_reorganized [ TOTAL_SIZE_SM ]; |
|
19 | float asm_f1_reorganized [ TOTAL_SIZE_SM ]; | |
20 | char asm_f1_char [ TIME_OFFSET_IN_BYTES + (TOTAL_SIZE_SM * 2) ]; |
|
20 | char asm_f1_char [ TIME_OFFSET_IN_BYTES + (TOTAL_SIZE_SM * 2) ]; | |
21 | float compressed_sm_norm_f1[ TOTAL_SIZE_COMPRESSED_ASM_NORM_F1]; |
|
21 | float compressed_sm_norm_f1[ TOTAL_SIZE_COMPRESSED_ASM_NORM_F1]; | |
22 | float compressed_sm_sbm_f1 [ TOTAL_SIZE_COMPRESSED_ASM_SBM_F1 ]; |
|
22 | float compressed_sm_sbm_f1 [ TOTAL_SIZE_COMPRESSED_ASM_SBM_F1 ]; | |
23 |
|
23 | |||
24 | //************ |
|
24 | //************ | |
25 | // RTEMS TASKS |
|
25 | // RTEMS TASKS | |
26 |
|
26 | |||
27 | rtems_task avf1_task( rtems_task_argument lfrRequestedMode ) |
|
27 | rtems_task avf1_task( rtems_task_argument lfrRequestedMode ) | |
28 | { |
|
28 | { | |
29 | int i; |
|
29 | int i; | |
30 |
|
30 | |||
31 | rtems_event_set event_out; |
|
31 | rtems_event_set event_out; | |
32 | rtems_status_code status; |
|
32 | rtems_status_code status; | |
33 | rtems_id queue_id_prc1; |
|
33 | rtems_id queue_id_prc1; | |
34 | asm_msg msgForMATR; |
|
34 | asm_msg msgForMATR; | |
35 | ring_node_sm *ring_node_tab[8]; |
|
35 | ring_node_sm *ring_node_tab[8]; | |
36 | ring_node_asm *current_ring_node_asm_burst_sbm_f1; |
|
36 | ring_node_asm *current_ring_node_asm_burst_sbm_f1; | |
37 | ring_node_asm *current_ring_node_asm_norm_f1; |
|
37 | ring_node_asm *current_ring_node_asm_norm_f1; | |
38 |
|
38 | |||
39 | unsigned int nb_norm_bp1; |
|
39 | unsigned int nb_norm_bp1; | |
40 | unsigned int nb_norm_bp2; |
|
40 | unsigned int nb_norm_bp2; | |
41 | unsigned int nb_norm_asm; |
|
41 | unsigned int nb_norm_asm; | |
42 | unsigned int nb_sbm_bp1; |
|
42 | unsigned int nb_sbm_bp1; | |
43 | unsigned int nb_sbm_bp2; |
|
43 | unsigned int nb_sbm_bp2; | |
44 |
|
44 | |||
45 | nb_norm_bp1 = 0; |
|
45 | nb_norm_bp1 = 0; | |
46 | nb_norm_bp2 = 0; |
|
46 | nb_norm_bp2 = 0; | |
47 | nb_norm_asm = 0; |
|
47 | nb_norm_asm = 0; | |
48 | nb_sbm_bp1 = 0; |
|
48 | nb_sbm_bp1 = 0; | |
49 | nb_sbm_bp2 = 0; |
|
49 | nb_sbm_bp2 = 0; | |
50 |
|
50 | |||
51 | reset_nb_sm_f1( lfrRequestedMode ); // reset the sm counters that drive the BP and ASM computations / transmissions |
|
51 | reset_nb_sm_f1( lfrRequestedMode ); // reset the sm counters that drive the BP and ASM computations / transmissions | |
52 | ASM_generic_init_ring( asm_ring_norm_f1, NB_RING_NODES_ASM_NORM_F1 ); |
|
52 | ASM_generic_init_ring( asm_ring_norm_f1, NB_RING_NODES_ASM_NORM_F1 ); | |
53 | ASM_generic_init_ring( asm_ring_burst_sbm_f1, NB_RING_NODES_ASM_BURST_SBM_F1 ); |
|
53 | ASM_generic_init_ring( asm_ring_burst_sbm_f1, NB_RING_NODES_ASM_BURST_SBM_F1 ); | |
54 | current_ring_node_asm_norm_f1 = asm_ring_norm_f1; |
|
54 | current_ring_node_asm_norm_f1 = asm_ring_norm_f1; | |
55 | current_ring_node_asm_burst_sbm_f1 = asm_ring_burst_sbm_f1; |
|
55 | current_ring_node_asm_burst_sbm_f1 = asm_ring_burst_sbm_f1; | |
56 |
|
56 | |||
57 | BOOT_PRINTF1("in AVF1 *** lfrRequestedMode = %d\n", (int) lfrRequestedMode) |
|
57 | BOOT_PRINTF1("in AVF1 *** lfrRequestedMode = %d\n", (int) lfrRequestedMode) | |
58 |
|
58 | |||
59 | status = get_message_queue_id_prc1( &queue_id_prc1 ); |
|
59 | status = get_message_queue_id_prc1( &queue_id_prc1 ); | |
60 | if (status != RTEMS_SUCCESSFUL) |
|
60 | if (status != RTEMS_SUCCESSFUL) | |
61 | { |
|
61 | { | |
62 | PRINTF1("in AVF1 *** ERR get_message_queue_id_prc1 %d\n", status) |
|
62 | PRINTF1("in AVF1 *** ERR get_message_queue_id_prc1 %d\n", status) | |
63 | } |
|
63 | } | |
64 |
|
64 | |||
65 | while(1){ |
|
65 | while(1){ | |
66 | rtems_event_receive(RTEMS_EVENT_0, RTEMS_WAIT, RTEMS_NO_TIMEOUT, &event_out); // wait for an RTEMS_EVENT0 |
|
66 | rtems_event_receive(RTEMS_EVENT_0, RTEMS_WAIT, RTEMS_NO_TIMEOUT, &event_out); // wait for an RTEMS_EVENT0 | |
67 |
|
67 | |||
68 | //**************************************** |
|
68 | //**************************************** | |
69 | // initialize the mesage for the MATR task |
|
69 | // initialize the mesage for the MATR task | |
70 | msgForMATR.event = 0x00; // this composite event will be sent to the PRC1 task |
|
70 | msgForMATR.event = 0x00; // this composite event will be sent to the PRC1 task | |
71 | msgForMATR.burst_sbm = current_ring_node_asm_burst_sbm_f1; |
|
71 | msgForMATR.burst_sbm = current_ring_node_asm_burst_sbm_f1; | |
72 | msgForMATR.norm = current_ring_node_asm_norm_f1; |
|
72 | msgForMATR.norm = current_ring_node_asm_norm_f1; | |
73 | msgForMATR.coarseTime = ring_node_for_averaging_sm_f1->coarseTime; |
|
73 | msgForMATR.coarseTime = ring_node_for_averaging_sm_f1->coarseTime; | |
74 | msgForMATR.fineTime = ring_node_for_averaging_sm_f1->fineTime; |
|
74 | msgForMATR.fineTime = ring_node_for_averaging_sm_f1->fineTime; | |
75 | // |
|
75 | // | |
76 | //**************************************** |
|
76 | //**************************************** | |
77 |
|
77 | |||
78 | ring_node_tab[NB_SM_BEFORE_AVF1-1] = ring_node_for_averaging_sm_f1; |
|
78 | ring_node_tab[NB_SM_BEFORE_AVF1-1] = ring_node_for_averaging_sm_f1; | |
79 | for ( i = 2; i < (NB_SM_BEFORE_AVF1+1); i++ ) |
|
79 | for ( i = 2; i < (NB_SM_BEFORE_AVF1+1); i++ ) | |
80 | { |
|
80 | { | |
81 | ring_node_for_averaging_sm_f1 = ring_node_for_averaging_sm_f1->previous; |
|
81 | ring_node_for_averaging_sm_f1 = ring_node_for_averaging_sm_f1->previous; | |
82 | ring_node_tab[NB_SM_BEFORE_AVF1-i] = ring_node_for_averaging_sm_f1; |
|
82 | ring_node_tab[NB_SM_BEFORE_AVF1-i] = ring_node_for_averaging_sm_f1; | |
83 | } |
|
83 | } | |
84 |
|
84 | |||
85 | // compute the average and store it in the averaged_sm_f1 buffer |
|
85 | // compute the average and store it in the averaged_sm_f1 buffer | |
86 | SM_average( current_ring_node_asm_norm_f1->matrix, |
|
86 | SM_average_alt( current_ring_node_asm_norm_f1->matrix, | |
87 | current_ring_node_asm_burst_sbm_f1->matrix, |
|
87 | current_ring_node_asm_burst_sbm_f1->matrix, | |
88 | ring_node_tab, |
|
88 | ring_node_tab, | |
89 | nb_norm_bp1, nb_sbm_bp1 ); |
|
89 | nb_norm_bp1, nb_sbm_bp1 ); | |
90 |
|
90 | |||
91 | // update nb_average |
|
91 | // update nb_average | |
92 | nb_norm_bp1 = nb_norm_bp1 + NB_SM_BEFORE_AVF1; |
|
92 | nb_norm_bp1 = nb_norm_bp1 + NB_SM_BEFORE_AVF1; | |
93 | nb_norm_bp2 = nb_norm_bp2 + NB_SM_BEFORE_AVF1; |
|
93 | nb_norm_bp2 = nb_norm_bp2 + NB_SM_BEFORE_AVF1; | |
94 | nb_norm_asm = nb_norm_asm + NB_SM_BEFORE_AVF1; |
|
94 | nb_norm_asm = nb_norm_asm + NB_SM_BEFORE_AVF1; | |
95 | nb_sbm_bp1 = nb_sbm_bp1 + NB_SM_BEFORE_AVF1; |
|
95 | nb_sbm_bp1 = nb_sbm_bp1 + NB_SM_BEFORE_AVF1; | |
96 | nb_sbm_bp2 = nb_sbm_bp2 + NB_SM_BEFORE_AVF1; |
|
96 | nb_sbm_bp2 = nb_sbm_bp2 + NB_SM_BEFORE_AVF1; | |
97 |
|
97 | |||
98 | if (nb_sbm_bp1 == nb_sm_before_f1.burst_sbm_bp1) |
|
98 | if (nb_sbm_bp1 == nb_sm_before_f1.burst_sbm_bp1) | |
99 | { |
|
99 | { | |
100 | nb_sbm_bp1 = 0; |
|
100 | nb_sbm_bp1 = 0; | |
101 | // set another ring for the ASM storage |
|
101 | // set another ring for the ASM storage | |
102 | current_ring_node_asm_burst_sbm_f1 = current_ring_node_asm_burst_sbm_f1->next; |
|
102 | current_ring_node_asm_burst_sbm_f1 = current_ring_node_asm_burst_sbm_f1->next; | |
103 | if ( lfrCurrentMode == LFR_MODE_BURST ) |
|
103 | if ( lfrCurrentMode == LFR_MODE_BURST ) | |
104 | { |
|
104 | { | |
105 | msgForMATR.event = msgForMATR.event | RTEMS_EVENT_BURST_BP1_F1; |
|
105 | msgForMATR.event = msgForMATR.event | RTEMS_EVENT_BURST_BP1_F1; | |
106 | } |
|
106 | } | |
107 | else if ( lfrCurrentMode == LFR_MODE_SBM2 ) |
|
107 | else if ( lfrCurrentMode == LFR_MODE_SBM2 ) | |
108 | { |
|
108 | { | |
109 | msgForMATR.event = msgForMATR.event | RTEMS_EVENT_SBM_BP1_F1; |
|
109 | msgForMATR.event = msgForMATR.event | RTEMS_EVENT_SBM_BP1_F1; | |
110 | } |
|
110 | } | |
111 | } |
|
111 | } | |
112 |
|
112 | |||
113 | if (nb_sbm_bp2 == nb_sm_before_f1.burst_sbm_bp2) |
|
113 | if (nb_sbm_bp2 == nb_sm_before_f1.burst_sbm_bp2) | |
114 | { |
|
114 | { | |
115 | nb_sbm_bp2 = 0; |
|
115 | nb_sbm_bp2 = 0; | |
116 | if ( lfrCurrentMode == LFR_MODE_BURST ) |
|
116 | if ( lfrCurrentMode == LFR_MODE_BURST ) | |
117 | { |
|
117 | { | |
118 | msgForMATR.event = msgForMATR.event | RTEMS_EVENT_BURST_BP2_F1; |
|
118 | msgForMATR.event = msgForMATR.event | RTEMS_EVENT_BURST_BP2_F1; | |
119 | } |
|
119 | } | |
120 | else if ( lfrCurrentMode == LFR_MODE_SBM2 ) |
|
120 | else if ( lfrCurrentMode == LFR_MODE_SBM2 ) | |
121 | { |
|
121 | { | |
122 | msgForMATR.event = msgForMATR.event | RTEMS_EVENT_SBM_BP2_F1; |
|
122 | msgForMATR.event = msgForMATR.event | RTEMS_EVENT_SBM_BP2_F1; | |
123 | } |
|
123 | } | |
124 | } |
|
124 | } | |
125 |
|
125 | |||
126 | if (nb_norm_bp1 == nb_sm_before_f1.norm_bp1) |
|
126 | if (nb_norm_bp1 == nb_sm_before_f1.norm_bp1) | |
127 | { |
|
127 | { | |
128 | nb_norm_bp1 = 0; |
|
128 | nb_norm_bp1 = 0; | |
129 | // set another ring for the ASM storage |
|
129 | // set another ring for the ASM storage | |
130 | current_ring_node_asm_norm_f1 = current_ring_node_asm_norm_f1->next; |
|
130 | current_ring_node_asm_norm_f1 = current_ring_node_asm_norm_f1->next; | |
131 | if ( (lfrCurrentMode == LFR_MODE_NORMAL) |
|
131 | if ( (lfrCurrentMode == LFR_MODE_NORMAL) | |
132 | || (lfrCurrentMode == LFR_MODE_SBM1) || (lfrCurrentMode == LFR_MODE_SBM2) ) |
|
132 | || (lfrCurrentMode == LFR_MODE_SBM1) || (lfrCurrentMode == LFR_MODE_SBM2) ) | |
133 | { |
|
133 | { | |
134 | msgForMATR.event = msgForMATR.event | RTEMS_EVENT_NORM_BP1_F1; |
|
134 | msgForMATR.event = msgForMATR.event | RTEMS_EVENT_NORM_BP1_F1; | |
135 | } |
|
135 | } | |
136 | } |
|
136 | } | |
137 |
|
137 | |||
138 | if (nb_norm_bp2 == nb_sm_before_f1.norm_bp2) |
|
138 | if (nb_norm_bp2 == nb_sm_before_f1.norm_bp2) | |
139 | { |
|
139 | { | |
140 | nb_norm_bp2 = 0; |
|
140 | nb_norm_bp2 = 0; | |
141 | if ( (lfrCurrentMode == LFR_MODE_NORMAL) |
|
141 | if ( (lfrCurrentMode == LFR_MODE_NORMAL) | |
142 | || (lfrCurrentMode == LFR_MODE_SBM1) || (lfrCurrentMode == LFR_MODE_SBM2) ) |
|
142 | || (lfrCurrentMode == LFR_MODE_SBM1) || (lfrCurrentMode == LFR_MODE_SBM2) ) | |
143 | { |
|
143 | { | |
144 | msgForMATR.event = msgForMATR.event | RTEMS_EVENT_NORM_BP2_F1; |
|
144 | msgForMATR.event = msgForMATR.event | RTEMS_EVENT_NORM_BP2_F1; | |
145 | } |
|
145 | } | |
146 | } |
|
146 | } | |
147 |
|
147 | |||
148 | if (nb_norm_asm == nb_sm_before_f1.norm_asm) |
|
148 | if (nb_norm_asm == nb_sm_before_f1.norm_asm) | |
149 | { |
|
149 | { | |
150 | nb_norm_asm = 0; |
|
150 | nb_norm_asm = 0; | |
151 | if ( (lfrCurrentMode == LFR_MODE_NORMAL) |
|
151 | if ( (lfrCurrentMode == LFR_MODE_NORMAL) | |
152 | || (lfrCurrentMode == LFR_MODE_SBM1) || (lfrCurrentMode == LFR_MODE_SBM2) ) |
|
152 | || (lfrCurrentMode == LFR_MODE_SBM1) || (lfrCurrentMode == LFR_MODE_SBM2) ) | |
153 | { |
|
153 | { | |
154 | msgForMATR.event = msgForMATR.event | RTEMS_EVENT_NORM_ASM_F1; |
|
154 | msgForMATR.event = msgForMATR.event | RTEMS_EVENT_NORM_ASM_F1; | |
155 | } |
|
155 | } | |
156 | } |
|
156 | } | |
157 |
|
157 | |||
158 | //************************* |
|
158 | //************************* | |
159 | // send the message to MATR |
|
159 | // send the message to MATR | |
160 | if (msgForMATR.event != 0x00) |
|
160 | if (msgForMATR.event != 0x00) | |
161 | { |
|
161 | { | |
162 | status = rtems_message_queue_send( queue_id_prc1, (char *) &msgForMATR, MSG_QUEUE_SIZE_PRC1); |
|
162 | status = rtems_message_queue_send( queue_id_prc1, (char *) &msgForMATR, MSG_QUEUE_SIZE_PRC1); | |
163 | } |
|
163 | } | |
164 |
|
164 | |||
165 | if (status != RTEMS_SUCCESSFUL) { |
|
165 | if (status != RTEMS_SUCCESSFUL) { | |
166 | printf("in AVF1 *** Error sending message to PRC1, code %d\n", status); |
|
166 | printf("in AVF1 *** Error sending message to PRC1, code %d\n", status); | |
167 | } |
|
167 | } | |
168 | } |
|
168 | } | |
169 | } |
|
169 | } | |
170 |
|
170 | |||
171 | rtems_task prc1_task( rtems_task_argument lfrRequestedMode ) |
|
171 | rtems_task prc1_task( rtems_task_argument lfrRequestedMode ) | |
172 | { |
|
172 | { | |
173 | char incomingData[MSG_QUEUE_SIZE_SEND]; // incoming data buffer |
|
173 | char incomingData[MSG_QUEUE_SIZE_SEND]; // incoming data buffer | |
174 | size_t size; // size of the incoming TC packet |
|
174 | size_t size; // size of the incoming TC packet | |
175 | asm_msg *incomingMsg; |
|
175 | asm_msg *incomingMsg; | |
176 | // |
|
176 | // | |
177 | unsigned char sid; |
|
177 | unsigned char sid; | |
178 | spw_ioctl_pkt_send spw_ioctl_send_ASM; |
|
178 | spw_ioctl_pkt_send spw_ioctl_send_ASM; | |
179 | rtems_status_code status; |
|
179 | rtems_status_code status; | |
180 | rtems_id queue_id_send; |
|
180 | rtems_id queue_id_send; | |
181 | rtems_id queue_id_q_p1; |
|
181 | rtems_id queue_id_q_p1; | |
182 | Header_TM_LFR_SCIENCE_ASM_t headerASM; |
|
182 | Header_TM_LFR_SCIENCE_ASM_t headerASM; | |
183 | bp_packet_with_spare packet_norm_bp1; |
|
183 | bp_packet_with_spare packet_norm_bp1; | |
184 | bp_packet packet_norm_bp2; |
|
184 | bp_packet packet_norm_bp2; | |
185 | bp_packet packet_sbm_bp1; |
|
185 | bp_packet packet_sbm_bp1; | |
186 | bp_packet packet_sbm_bp2; |
|
186 | bp_packet packet_sbm_bp2; | |
187 |
|
187 | |||
188 | unsigned long long int localTime; |
|
188 | unsigned long long int localTime; | |
189 |
|
189 | |||
190 | ASM_init_header( &headerASM ); |
|
190 | ASM_init_header( &headerASM ); | |
191 |
|
191 | |||
192 | //************* |
|
192 | //************* | |
193 | // NORM headers |
|
193 | // NORM headers | |
194 | BP_init_header_with_spare( &packet_norm_bp1.header, |
|
194 | BP_init_header_with_spare( &packet_norm_bp1.header, | |
195 | APID_TM_SCIENCE_NORMAL_BURST, SID_NORM_BP1_F1, |
|
195 | APID_TM_SCIENCE_NORMAL_BURST, SID_NORM_BP1_F1, | |
196 | PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP1_F1, NB_BINS_COMPRESSED_SM_F1 ); |
|
196 | PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP1_F1, NB_BINS_COMPRESSED_SM_F1 ); | |
197 | BP_init_header( &packet_norm_bp2.header, |
|
197 | BP_init_header( &packet_norm_bp2.header, | |
198 | APID_TM_SCIENCE_NORMAL_BURST, SID_NORM_BP2_F1, |
|
198 | APID_TM_SCIENCE_NORMAL_BURST, SID_NORM_BP2_F1, | |
199 | PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP2_F1, NB_BINS_COMPRESSED_SM_F1); |
|
199 | PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP2_F1, NB_BINS_COMPRESSED_SM_F1); | |
200 |
|
200 | |||
201 | //*********************** |
|
201 | //*********************** | |
202 | // BURST and SBM2 headers |
|
202 | // BURST and SBM2 headers | |
203 | if ( lfrRequestedMode == LFR_MODE_BURST ) |
|
203 | if ( lfrRequestedMode == LFR_MODE_BURST ) | |
204 | { |
|
204 | { | |
205 | BP_init_header( &packet_sbm_bp1.header, |
|
205 | BP_init_header( &packet_sbm_bp1.header, | |
206 | APID_TM_SCIENCE_NORMAL_BURST, SID_BURST_BP1_F1, |
|
206 | APID_TM_SCIENCE_NORMAL_BURST, SID_BURST_BP1_F1, | |
207 | PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP1_F1, NB_BINS_COMPRESSED_SM_SBM_F1); |
|
207 | PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP1_F1, NB_BINS_COMPRESSED_SM_SBM_F1); | |
208 | BP_init_header( &packet_sbm_bp2.header, |
|
208 | BP_init_header( &packet_sbm_bp2.header, | |
209 | APID_TM_SCIENCE_NORMAL_BURST, SID_BURST_BP2_F1, |
|
209 | APID_TM_SCIENCE_NORMAL_BURST, SID_BURST_BP2_F1, | |
210 | PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP2_F1, NB_BINS_COMPRESSED_SM_SBM_F1); |
|
210 | PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP2_F1, NB_BINS_COMPRESSED_SM_SBM_F1); | |
211 | } |
|
211 | } | |
212 | else if ( lfrRequestedMode == LFR_MODE_SBM2 ) |
|
212 | else if ( lfrRequestedMode == LFR_MODE_SBM2 ) | |
213 | { |
|
213 | { | |
214 | BP_init_header( &packet_sbm_bp1.header, |
|
214 | BP_init_header( &packet_sbm_bp1.header, | |
215 | APID_TM_SCIENCE_SBM1_SBM2, SID_SBM2_BP1_F1, |
|
215 | APID_TM_SCIENCE_SBM1_SBM2, SID_SBM2_BP1_F1, | |
216 | PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP1_F1, NB_BINS_COMPRESSED_SM_SBM_F1); |
|
216 | PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP1_F1, NB_BINS_COMPRESSED_SM_SBM_F1); | |
217 | BP_init_header( &packet_sbm_bp2.header, |
|
217 | BP_init_header( &packet_sbm_bp2.header, | |
218 | APID_TM_SCIENCE_SBM1_SBM2, SID_SBM2_BP2_F1, |
|
218 | APID_TM_SCIENCE_SBM1_SBM2, SID_SBM2_BP2_F1, | |
219 | PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP2_F1, NB_BINS_COMPRESSED_SM_SBM_F1); |
|
219 | PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP2_F1, NB_BINS_COMPRESSED_SM_SBM_F1); | |
220 | } |
|
220 | } | |
221 | else |
|
221 | else | |
222 | { |
|
222 | { | |
223 | PRINTF1("in PRC1 *** lfrRequestedMode is %d, several headers not initialized\n", (unsigned int) lfrRequestedMode) |
|
223 | PRINTF1("in PRC1 *** lfrRequestedMode is %d, several headers not initialized\n", (unsigned int) lfrRequestedMode) | |
224 | } |
|
224 | } | |
225 |
|
225 | |||
226 | status = get_message_queue_id_send( &queue_id_send ); |
|
226 | status = get_message_queue_id_send( &queue_id_send ); | |
227 | if (status != RTEMS_SUCCESSFUL) |
|
227 | if (status != RTEMS_SUCCESSFUL) | |
228 | { |
|
228 | { | |
229 | PRINTF1("in PRC1 *** ERR get_message_queue_id_send %d\n", status) |
|
229 | PRINTF1("in PRC1 *** ERR get_message_queue_id_send %d\n", status) | |
230 | } |
|
230 | } | |
231 | status = get_message_queue_id_prc1( &queue_id_q_p1); |
|
231 | status = get_message_queue_id_prc1( &queue_id_q_p1); | |
232 | if (status != RTEMS_SUCCESSFUL) |
|
232 | if (status != RTEMS_SUCCESSFUL) | |
233 | { |
|
233 | { | |
234 | PRINTF1("in PRC1 *** ERR get_message_queue_id_prc1 %d\n", status) |
|
234 | PRINTF1("in PRC1 *** ERR get_message_queue_id_prc1 %d\n", status) | |
235 | } |
|
235 | } | |
236 |
|
236 | |||
237 | BOOT_PRINTF1("in PRC1 *** lfrRequestedMode = %d\n", (int) lfrRequestedMode) |
|
237 | BOOT_PRINTF1("in PRC1 *** lfrRequestedMode = %d\n", (int) lfrRequestedMode) | |
238 |
|
238 | |||
239 | while(1){ |
|
239 | while(1){ | |
240 | status = rtems_message_queue_receive( queue_id_q_p1, incomingData, &size, //************************************ |
|
240 | status = rtems_message_queue_receive( queue_id_q_p1, incomingData, &size, //************************************ | |
241 | RTEMS_WAIT, RTEMS_NO_TIMEOUT ); // wait for a message coming from AVF0 |
|
241 | RTEMS_WAIT, RTEMS_NO_TIMEOUT ); // wait for a message coming from AVF0 | |
242 |
|
242 | |||
243 | incomingMsg = (asm_msg*) incomingData; |
|
243 | incomingMsg = (asm_msg*) incomingData; | |
244 |
|
244 | |||
245 | localTime = getTimeAsUnsignedLongLongInt( ); |
|
245 | localTime = getTimeAsUnsignedLongLongInt( ); | |
246 | //*********** |
|
246 | //*********** | |
247 | //*********** |
|
247 | //*********** | |
248 | // BURST SBM2 |
|
248 | // BURST SBM2 | |
249 | //*********** |
|
249 | //*********** | |
250 | //*********** |
|
250 | //*********** | |
251 | if ( (incomingMsg->event & RTEMS_EVENT_BURST_BP1_F1) || (incomingMsg->event & RTEMS_EVENT_SBM_BP1_F1) ) |
|
251 | if ( (incomingMsg->event & RTEMS_EVENT_BURST_BP1_F1) || (incomingMsg->event & RTEMS_EVENT_SBM_BP1_F1) ) | |
252 | { |
|
252 | { | |
253 | sid = getSID( incomingMsg->event ); |
|
253 | sid = getSID( incomingMsg->event ); | |
254 | // 1) compress the matrix for Basic Parameters calculation |
|
254 | // 1) compress the matrix for Basic Parameters calculation | |
255 | ASM_compress_reorganize_and_divide( incomingMsg->burst_sbm->matrix, compressed_sm_sbm_f1, |
|
255 | ASM_compress_reorganize_and_divide( incomingMsg->burst_sbm->matrix, compressed_sm_sbm_f1, | |
256 | nb_sm_before_f1.burst_sbm_bp1, |
|
256 | nb_sm_before_f1.burst_sbm_bp1, | |
257 | NB_BINS_COMPRESSED_SM_SBM_F1, NB_BINS_TO_AVERAGE_ASM_SBM_F1, |
|
257 | NB_BINS_COMPRESSED_SM_SBM_F1, NB_BINS_TO_AVERAGE_ASM_SBM_F1, | |
258 | ASM_F1_INDICE_START); |
|
258 | ASM_F1_INDICE_START); | |
259 | // 2) compute the BP1 set |
|
259 | // 2) compute the BP1 set | |
260 |
|
260 | |||
261 | // 3) send the BP1 set |
|
261 | // 3) send the BP1 set | |
262 | set_time( packet_sbm_bp1.header.time, (unsigned char *) &incomingMsg->coarseTime ); |
|
262 | set_time( packet_sbm_bp1.header.time, (unsigned char *) &incomingMsg->coarseTime ); | |
263 | set_time( packet_sbm_bp1.header.acquisitionTime, (unsigned char *) &incomingMsg->coarseTime ); |
|
263 | set_time( packet_sbm_bp1.header.acquisitionTime, (unsigned char *) &incomingMsg->coarseTime ); | |
264 | BP_send( (char *) &packet_sbm_bp1, queue_id_send, |
|
264 | BP_send( (char *) &packet_sbm_bp1, queue_id_send, | |
265 | PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP1_F1 + PACKET_LENGTH_DELTA, |
|
265 | PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP1_F1 + PACKET_LENGTH_DELTA, | |
266 | sid ); |
|
266 | sid ); | |
267 | // 4) compute the BP2 set if needed |
|
267 | // 4) compute the BP2 set if needed | |
268 | if ( (incomingMsg->event & RTEMS_EVENT_BURST_BP2_F1) || (incomingMsg->event & RTEMS_EVENT_SBM_BP2_F1) ) |
|
268 | if ( (incomingMsg->event & RTEMS_EVENT_BURST_BP2_F1) || (incomingMsg->event & RTEMS_EVENT_SBM_BP2_F1) ) | |
269 | { |
|
269 | { | |
270 | // 1) compute the BP2 set |
|
270 | // 1) compute the BP2 set | |
271 |
|
271 | |||
272 | // 2) send the BP2 set |
|
272 | // 2) send the BP2 set | |
273 | set_time( packet_sbm_bp2.header.time, (unsigned char *) &incomingMsg->coarseTime ); |
|
273 | set_time( packet_sbm_bp2.header.time, (unsigned char *) &incomingMsg->coarseTime ); | |
274 | set_time( packet_sbm_bp2.header.acquisitionTime, (unsigned char *) &incomingMsg->coarseTime ); |
|
274 | set_time( packet_sbm_bp2.header.acquisitionTime, (unsigned char *) &incomingMsg->coarseTime ); | |
275 | BP_send( (char *) &packet_sbm_bp2, queue_id_send, |
|
275 | BP_send( (char *) &packet_sbm_bp2, queue_id_send, | |
276 | PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP2_F1 + PACKET_LENGTH_DELTA, |
|
276 | PACKET_LENGTH_TM_LFR_SCIENCE_SBM_BP2_F1 + PACKET_LENGTH_DELTA, | |
277 | sid ); |
|
277 | sid ); | |
278 | } |
|
278 | } | |
279 | } |
|
279 | } | |
280 |
|
280 | |||
281 | //***** |
|
281 | //***** | |
282 | //***** |
|
282 | //***** | |
283 | // NORM |
|
283 | // NORM | |
284 | //***** |
|
284 | //***** | |
285 | //***** |
|
285 | //***** | |
286 | if (incomingMsg->event & RTEMS_EVENT_NORM_BP1_F1) |
|
286 | if (incomingMsg->event & RTEMS_EVENT_NORM_BP1_F1) | |
287 | { |
|
287 | { | |
288 | // 1) compress the matrix for Basic Parameters calculation |
|
288 | // 1) compress the matrix for Basic Parameters calculation | |
289 | ASM_compress_reorganize_and_divide( incomingMsg->norm->matrix, compressed_sm_norm_f1, |
|
289 | ASM_compress_reorganize_and_divide( incomingMsg->norm->matrix, compressed_sm_norm_f1, | |
290 | nb_sm_before_f1.norm_bp1, |
|
290 | nb_sm_before_f1.norm_bp1, | |
291 | NB_BINS_COMPRESSED_SM_F0, NB_BINS_TO_AVERAGE_ASM_F0, |
|
291 | NB_BINS_COMPRESSED_SM_F0, NB_BINS_TO_AVERAGE_ASM_F0, | |
292 | ASM_F0_INDICE_START ); |
|
292 | ASM_F0_INDICE_START ); | |
293 | // 2) compute the BP1 set |
|
293 | // 2) compute the BP1 set | |
294 |
|
294 | |||
295 | // 3) send the BP1 set |
|
295 | // 3) send the BP1 set | |
296 | set_time( packet_norm_bp1.header.time, (unsigned char *) &incomingMsg->coarseTime ); |
|
296 | set_time( packet_norm_bp1.header.time, (unsigned char *) &incomingMsg->coarseTime ); | |
297 | set_time( packet_norm_bp1.header.acquisitionTime, (unsigned char *) &incomingMsg->coarseTime ); |
|
297 | set_time( packet_norm_bp1.header.acquisitionTime, (unsigned char *) &incomingMsg->coarseTime ); | |
298 | BP_send( (char *) &packet_norm_bp1, queue_id_send, |
|
298 | BP_send( (char *) &packet_norm_bp1, queue_id_send, | |
299 | PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP1_F1 + PACKET_LENGTH_DELTA, |
|
299 | PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP1_F1 + PACKET_LENGTH_DELTA, | |
300 | SID_NORM_BP1_F1 ); |
|
300 | SID_NORM_BP1_F1 ); | |
301 | if (incomingMsg->event & RTEMS_EVENT_NORM_BP2_F1) |
|
301 | if (incomingMsg->event & RTEMS_EVENT_NORM_BP2_F1) | |
302 | { |
|
302 | { | |
303 | // 1) compute the BP2 set |
|
303 | // 1) compute the BP2 set | |
304 |
|
304 | |||
305 | // 2) send the BP2 set |
|
305 | // 2) send the BP2 set | |
306 | set_time( packet_norm_bp2.header.time, (unsigned char *) &incomingMsg->coarseTime ); |
|
306 | set_time( packet_norm_bp2.header.time, (unsigned char *) &incomingMsg->coarseTime ); | |
307 | set_time( packet_norm_bp2.header.acquisitionTime, (unsigned char *) &incomingMsg->coarseTime ); |
|
307 | set_time( packet_norm_bp2.header.acquisitionTime, (unsigned char *) &incomingMsg->coarseTime ); | |
308 | BP_send( (char *) &packet_norm_bp2, queue_id_send, |
|
308 | BP_send( (char *) &packet_norm_bp2, queue_id_send, | |
309 | PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP2_F1 + PACKET_LENGTH_DELTA, |
|
309 | PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP2_F1 + PACKET_LENGTH_DELTA, | |
310 | SID_NORM_BP2_F1 ); |
|
310 | SID_NORM_BP2_F1 ); | |
311 | } |
|
311 | } | |
312 | } |
|
312 | } | |
313 |
|
313 | |||
314 | if (incomingMsg->event & RTEMS_EVENT_NORM_ASM_F1) |
|
314 | if (incomingMsg->event & RTEMS_EVENT_NORM_ASM_F1) | |
315 | { |
|
315 | { | |
316 | // 1) reorganize the ASM and divide |
|
316 | // 1) reorganize the ASM and divide | |
317 | ASM_reorganize_and_divide( incomingMsg->norm->matrix, |
|
317 | ASM_reorganize_and_divide( incomingMsg->norm->matrix, | |
318 | asm_f1_reorganized, |
|
318 | asm_f1_reorganized, | |
319 | nb_sm_before_f1.norm_bp1 ); |
|
319 | nb_sm_before_f1.norm_bp1 ); | |
320 | // 2) convert the float array in a char array |
|
320 | // 2) convert the float array in a char array | |
321 | ASM_convert( asm_f1_reorganized, asm_f1_char); |
|
321 | ASM_convert( asm_f1_reorganized, asm_f1_char); | |
322 | // 3) send the spectral matrix packets |
|
322 | // 3) send the spectral matrix packets | |
323 | set_time( headerASM.time , (unsigned char *) &incomingMsg->coarseTime ); |
|
323 | set_time( headerASM.time , (unsigned char *) &incomingMsg->coarseTime ); | |
324 | set_time( headerASM.acquisitionTime, (unsigned char *) &incomingMsg->coarseTime ); |
|
324 | set_time( headerASM.acquisitionTime, (unsigned char *) &incomingMsg->coarseTime ); | |
325 | ASM_send( &headerASM, asm_f1_char, SID_NORM_ASM_F1, &spw_ioctl_send_ASM, queue_id_send); |
|
325 | ASM_send( &headerASM, asm_f1_char, SID_NORM_ASM_F1, &spw_ioctl_send_ASM, queue_id_send); | |
326 | } |
|
326 | } | |
327 |
|
327 | |||
328 | } |
|
328 | } | |
329 | } |
|
329 | } | |
330 |
|
330 | |||
331 | //********** |
|
331 | //********** | |
332 | // FUNCTIONS |
|
332 | // FUNCTIONS | |
333 |
|
333 | |||
334 | void reset_nb_sm_f1( unsigned char lfrMode ) |
|
334 | void reset_nb_sm_f1( unsigned char lfrMode ) | |
335 | { |
|
335 | { | |
336 | nb_sm_before_f1.norm_bp1 = parameter_dump_packet.sy_lfr_n_bp_p0 * 16; |
|
336 | nb_sm_before_f1.norm_bp1 = parameter_dump_packet.sy_lfr_n_bp_p0 * 16; | |
337 | nb_sm_before_f1.norm_bp2 = parameter_dump_packet.sy_lfr_n_bp_p1 * 16; |
|
337 | nb_sm_before_f1.norm_bp2 = parameter_dump_packet.sy_lfr_n_bp_p1 * 16; | |
338 | nb_sm_before_f1.norm_asm = (parameter_dump_packet.sy_lfr_n_asm_p[0] * 256 + parameter_dump_packet.sy_lfr_n_asm_p[1]) * 16; |
|
338 | nb_sm_before_f1.norm_asm = (parameter_dump_packet.sy_lfr_n_asm_p[0] * 256 + parameter_dump_packet.sy_lfr_n_asm_p[1]) * 16; | |
339 | nb_sm_before_f1.sbm2_bp1 = parameter_dump_packet.sy_lfr_s2_bp_p0 * 16; |
|
339 | nb_sm_before_f1.sbm2_bp1 = parameter_dump_packet.sy_lfr_s2_bp_p0 * 16; | |
340 | nb_sm_before_f1.sbm2_bp2 = parameter_dump_packet.sy_lfr_s2_bp_p1 * 16; |
|
340 | nb_sm_before_f1.sbm2_bp2 = parameter_dump_packet.sy_lfr_s2_bp_p1 * 16; | |
341 | nb_sm_before_f1.burst_bp1 = parameter_dump_packet.sy_lfr_b_bp_p0 * 16; |
|
341 | nb_sm_before_f1.burst_bp1 = parameter_dump_packet.sy_lfr_b_bp_p0 * 16; | |
342 | nb_sm_before_f1.burst_bp2 = parameter_dump_packet.sy_lfr_b_bp_p1 * 16; |
|
342 | nb_sm_before_f1.burst_bp2 = parameter_dump_packet.sy_lfr_b_bp_p1 * 16; | |
343 |
|
343 | |||
344 | if (lfrMode == LFR_MODE_SBM2) |
|
344 | if (lfrMode == LFR_MODE_SBM2) | |
345 | { |
|
345 | { | |
346 | nb_sm_before_f1.burst_sbm_bp1 = nb_sm_before_f1.sbm2_bp1; |
|
346 | nb_sm_before_f1.burst_sbm_bp1 = nb_sm_before_f1.sbm2_bp1; | |
347 | nb_sm_before_f1.burst_sbm_bp2 = nb_sm_before_f1.sbm2_bp2; |
|
347 | nb_sm_before_f1.burst_sbm_bp2 = nb_sm_before_f1.sbm2_bp2; | |
348 | } |
|
348 | } | |
349 | else if (lfrMode == LFR_MODE_BURST) |
|
349 | else if (lfrMode == LFR_MODE_BURST) | |
350 | { |
|
350 | { | |
351 | nb_sm_before_f1.burst_sbm_bp1 = nb_sm_before_f1.burst_bp1; |
|
351 | nb_sm_before_f1.burst_sbm_bp1 = nb_sm_before_f1.burst_bp1; | |
352 | nb_sm_before_f1.burst_sbm_bp2 = nb_sm_before_f1.burst_bp2; |
|
352 | nb_sm_before_f1.burst_sbm_bp2 = nb_sm_before_f1.burst_bp2; | |
353 | } |
|
353 | } | |
354 | else |
|
354 | else | |
355 | { |
|
355 | { | |
356 | nb_sm_before_f1.burst_sbm_bp1 = nb_sm_before_f1.burst_bp1; |
|
356 | nb_sm_before_f1.burst_sbm_bp1 = nb_sm_before_f1.burst_bp1; | |
357 | nb_sm_before_f1.burst_sbm_bp2 = nb_sm_before_f1.burst_bp2; |
|
357 | nb_sm_before_f1.burst_sbm_bp2 = nb_sm_before_f1.burst_bp2; | |
358 | } |
|
358 | } | |
359 | } |
|
359 | } | |
360 |
|
360 |
@@ -1,253 +1,267 | |||||
1 | /** Functions related to data processing. |
|
1 | /** Functions related to data processing. | |
2 | * |
|
2 | * | |
3 | * @file |
|
3 | * @file | |
4 | * @author P. LEROY |
|
4 | * @author P. LEROY | |
5 | * |
|
5 | * | |
6 | * These function are related to data processing, i.e. spectral matrices averaging and basic parameters computation. |
|
6 | * These function are related to data processing, i.e. spectral matrices averaging and basic parameters computation. | |
7 | * |
|
7 | * | |
8 | */ |
|
8 | */ | |
9 |
|
9 | |||
10 | #include "avf2_prc2.h" |
|
10 | #include "avf2_prc2.h" | |
11 |
|
11 | |||
12 | nb_sm_before_bp_asm_f2 nb_sm_before_f2; |
|
12 | nb_sm_before_bp_asm_f2 nb_sm_before_f2; | |
13 |
|
13 | |||
14 | //*** |
|
14 | //*** | |
15 | // F2 |
|
15 | // F2 | |
16 | ring_node_asm asm_ring_norm_f2 [ NB_RING_NODES_ASM_NORM_F2 ]; |
|
16 | ring_node_asm asm_ring_norm_f2 [ NB_RING_NODES_ASM_NORM_F2 ]; | |
17 | ring_node_asm asm_ring_burst_sbm_f2[ NB_RING_NODES_ASM_BURST_SBM_F2 ]; |
|
17 | ring_node_asm asm_ring_burst_sbm_f2[ NB_RING_NODES_ASM_BURST_SBM_F2 ]; | |
18 |
|
18 | |||
19 | float asm_f2_reorganized [ TOTAL_SIZE_SM ]; |
|
19 | float asm_f2_reorganized [ TOTAL_SIZE_SM ]; | |
20 | char asm_f2_char [ TIME_OFFSET_IN_BYTES + (TOTAL_SIZE_SM * 2) ]; |
|
20 | char asm_f2_char [ TIME_OFFSET_IN_BYTES + (TOTAL_SIZE_SM * 2) ]; | |
21 | float compressed_sm_norm_f2[ TOTAL_SIZE_COMPRESSED_ASM_NORM_F2]; |
|
21 | float compressed_sm_norm_f2[ TOTAL_SIZE_COMPRESSED_ASM_NORM_F2]; | |
22 | float compressed_sm_sbm_f2 [ TOTAL_SIZE_COMPRESSED_ASM_SBM_F2 ]; |
|
22 | float compressed_sm_sbm_f2 [ TOTAL_SIZE_COMPRESSED_ASM_SBM_F2 ]; | |
23 |
|
23 | |||
24 | //************ |
|
24 | //************ | |
25 | // RTEMS TASKS |
|
25 | // RTEMS TASKS | |
26 |
|
26 | |||
27 | //*** |
|
27 | //*** | |
28 | // F2 |
|
28 | // F2 | |
29 | rtems_task avf2_task( rtems_task_argument argument ) |
|
29 | rtems_task avf2_task( rtems_task_argument argument ) | |
30 | { |
|
30 | { | |
31 | rtems_event_set event_out; |
|
31 | rtems_event_set event_out; | |
32 | rtems_status_code status; |
|
32 | rtems_status_code status; | |
33 | rtems_id queue_id_prc2; |
|
33 | rtems_id queue_id_prc2; | |
34 | asm_msg msgForMATR; |
|
34 | asm_msg msgForMATR; | |
35 | ring_node_asm *current_ring_node_asm_norm_f2; |
|
35 | ring_node_asm *current_ring_node_asm_norm_f2; | |
36 |
|
36 | |||
37 | unsigned int nb_norm_bp1; |
|
37 | unsigned int nb_norm_bp1; | |
38 | unsigned int nb_norm_bp2; |
|
38 | unsigned int nb_norm_bp2; | |
39 | unsigned int nb_norm_asm; |
|
39 | unsigned int nb_norm_asm; | |
40 |
|
40 | |||
41 | nb_norm_bp1 = 0; |
|
41 | nb_norm_bp1 = 0; | |
42 | nb_norm_bp2 = 0; |
|
42 | nb_norm_bp2 = 0; | |
43 | nb_norm_asm = 0; |
|
43 | nb_norm_asm = 0; | |
44 |
|
44 | |||
45 | reset_nb_sm_f2( ); // reset the sm counters that drive the BP and ASM computations / transmissions |
|
45 | reset_nb_sm_f2( ); // reset the sm counters that drive the BP and ASM computations / transmissions | |
46 | ASM_generic_init_ring( asm_ring_norm_f2, NB_RING_NODES_ASM_NORM_F2 ); |
|
46 | ASM_generic_init_ring( asm_ring_norm_f2, NB_RING_NODES_ASM_NORM_F2 ); | |
47 | current_ring_node_asm_norm_f2 = asm_ring_norm_f2; |
|
47 | current_ring_node_asm_norm_f2 = asm_ring_norm_f2; | |
48 |
|
48 | |||
49 | BOOT_PRINTF("in AVF2 ***\n") |
|
49 | BOOT_PRINTF("in AVF2 ***\n") | |
50 |
|
50 | |||
51 | status = get_message_queue_id_prc2( &queue_id_prc2 ); |
|
51 | status = get_message_queue_id_prc2( &queue_id_prc2 ); | |
52 | if (status != RTEMS_SUCCESSFUL) |
|
52 | if (status != RTEMS_SUCCESSFUL) | |
53 | { |
|
53 | { | |
54 | PRINTF1("in AVF2 *** ERR get_message_queue_id_prc2 %d\n", status) |
|
54 | PRINTF1("in AVF2 *** ERR get_message_queue_id_prc2 %d\n", status) | |
55 | } |
|
55 | } | |
56 |
|
56 | |||
57 | while(1){ |
|
57 | while(1){ | |
58 | rtems_event_receive(RTEMS_EVENT_0, RTEMS_WAIT, RTEMS_NO_TIMEOUT, &event_out); // wait for an RTEMS_EVENT0 |
|
58 | rtems_event_receive(RTEMS_EVENT_0, RTEMS_WAIT, RTEMS_NO_TIMEOUT, &event_out); // wait for an RTEMS_EVENT0 | |
59 |
|
59 | |||
60 | //**************************************** |
|
60 | //**************************************** | |
61 | // initialize the mesage for the MATR task |
|
61 | // initialize the mesage for the MATR task | |
62 | msgForMATR.event = 0x00; // this composite event will be sent to the MATR task |
|
62 | msgForMATR.event = 0x00; // this composite event will be sent to the MATR task | |
63 | msgForMATR.burst_sbm = NULL; |
|
63 | msgForMATR.burst_sbm = NULL; | |
64 | msgForMATR.norm = current_ring_node_asm_norm_f2; |
|
64 | msgForMATR.norm = current_ring_node_asm_norm_f2; | |
65 | msgForMATR.coarseTime = ring_node_for_averaging_sm_f2->coarseTime; |
|
65 | msgForMATR.coarseTime = ring_node_for_averaging_sm_f2->coarseTime; | |
66 | msgForMATR.fineTime = ring_node_for_averaging_sm_f2->fineTime; |
|
66 | msgForMATR.fineTime = ring_node_for_averaging_sm_f2->fineTime; | |
67 | // |
|
67 | // | |
68 | //**************************************** |
|
68 | //**************************************** | |
69 |
|
69 | |||
70 | // compute the average and store it in the averaged_sm_f2 buffer |
|
70 | // compute the average and store it in the averaged_sm_f2 buffer | |
71 | SM_average_f2( current_ring_node_asm_norm_f2->matrix, |
|
71 | SM_average_f2_alt( current_ring_node_asm_norm_f2->matrix, | |
72 | ring_node_for_averaging_sm_f2, |
|
72 | ring_node_for_averaging_sm_f2, | |
73 | nb_norm_bp1 ); |
|
73 | nb_norm_bp1 ); | |
74 |
|
74 | |||
75 | // update nb_average |
|
75 | // update nb_average | |
76 | nb_norm_bp1 = nb_norm_bp1 + NB_SM_BEFORE_AVF2; |
|
76 | nb_norm_bp1 = nb_norm_bp1 + NB_SM_BEFORE_AVF2; | |
77 | nb_norm_bp2 = nb_norm_bp2 + NB_SM_BEFORE_AVF2; |
|
77 | nb_norm_bp2 = nb_norm_bp2 + NB_SM_BEFORE_AVF2; | |
78 | nb_norm_asm = nb_norm_asm + NB_SM_BEFORE_AVF2; |
|
78 | nb_norm_asm = nb_norm_asm + NB_SM_BEFORE_AVF2; | |
79 |
|
79 | |||
80 | if (nb_norm_bp1 == nb_sm_before_f2.norm_bp1) |
|
80 | if (nb_norm_bp1 == nb_sm_before_f2.norm_bp1) | |
81 | { |
|
81 | { | |
82 | nb_norm_bp1 = 0; |
|
82 | nb_norm_bp1 = 0; | |
83 | // set another ring for the ASM storage |
|
83 | // set another ring for the ASM storage | |
84 | current_ring_node_asm_norm_f2 = current_ring_node_asm_norm_f2->next; |
|
84 | current_ring_node_asm_norm_f2 = current_ring_node_asm_norm_f2->next; | |
85 | if ( (lfrCurrentMode == LFR_MODE_NORMAL) || (lfrCurrentMode == LFR_MODE_SBM1) |
|
85 | if ( (lfrCurrentMode == LFR_MODE_NORMAL) || (lfrCurrentMode == LFR_MODE_SBM1) | |
86 | || (lfrCurrentMode == LFR_MODE_SBM2) ) |
|
86 | || (lfrCurrentMode == LFR_MODE_SBM2) ) | |
87 | { |
|
87 | { | |
88 | msgForMATR.event = msgForMATR.event | RTEMS_EVENT_NORM_BP1_F2; |
|
88 | msgForMATR.event = msgForMATR.event | RTEMS_EVENT_NORM_BP1_F2; | |
89 | } |
|
89 | } | |
90 | } |
|
90 | } | |
91 |
|
91 | |||
92 | if (nb_norm_bp2 == nb_sm_before_f2.norm_bp2) |
|
92 | if (nb_norm_bp2 == nb_sm_before_f2.norm_bp2) | |
93 | { |
|
93 | { | |
94 | nb_norm_bp2 = 0; |
|
94 | nb_norm_bp2 = 0; | |
95 | if ( (lfrCurrentMode == LFR_MODE_NORMAL) || (lfrCurrentMode == LFR_MODE_SBM1) |
|
95 | if ( (lfrCurrentMode == LFR_MODE_NORMAL) || (lfrCurrentMode == LFR_MODE_SBM1) | |
96 | || (lfrCurrentMode == LFR_MODE_SBM2) ) |
|
96 | || (lfrCurrentMode == LFR_MODE_SBM2) ) | |
97 | { |
|
97 | { | |
98 | msgForMATR.event = msgForMATR.event | RTEMS_EVENT_NORM_BP2_F2; |
|
98 | msgForMATR.event = msgForMATR.event | RTEMS_EVENT_NORM_BP2_F2; | |
99 | } |
|
99 | } | |
100 | } |
|
100 | } | |
101 |
|
101 | |||
102 | if (nb_norm_asm == nb_sm_before_f2.norm_asm) |
|
102 | if (nb_norm_asm == nb_sm_before_f2.norm_asm) | |
103 | { |
|
103 | { | |
104 | nb_norm_asm = 0; |
|
104 | nb_norm_asm = 0; | |
105 | if ( (lfrCurrentMode == LFR_MODE_NORMAL) || (lfrCurrentMode == LFR_MODE_SBM1) |
|
105 | if ( (lfrCurrentMode == LFR_MODE_NORMAL) || (lfrCurrentMode == LFR_MODE_SBM1) | |
106 | || (lfrCurrentMode == LFR_MODE_SBM2) ) |
|
106 | || (lfrCurrentMode == LFR_MODE_SBM2) ) | |
107 | { |
|
107 | { | |
108 | // PRINTF1("%lld\n", localTime) |
|
108 | // PRINTF1("%lld\n", localTime) | |
109 | msgForMATR.event = msgForMATR.event | RTEMS_EVENT_NORM_ASM_F2; |
|
109 | msgForMATR.event = msgForMATR.event | RTEMS_EVENT_NORM_ASM_F2; | |
110 | } |
|
110 | } | |
111 | } |
|
111 | } | |
112 |
|
112 | |||
113 | //************************* |
|
113 | //************************* | |
114 | // send the message to MATR |
|
114 | // send the message to MATR | |
115 | if (msgForMATR.event != 0x00) |
|
115 | if (msgForMATR.event != 0x00) | |
116 | { |
|
116 | { | |
117 | status = rtems_message_queue_send( queue_id_prc2, (char *) &msgForMATR, MSG_QUEUE_SIZE_PRC0); |
|
117 | status = rtems_message_queue_send( queue_id_prc2, (char *) &msgForMATR, MSG_QUEUE_SIZE_PRC0); | |
118 | } |
|
118 | } | |
119 |
|
119 | |||
120 | if (status != RTEMS_SUCCESSFUL) { |
|
120 | if (status != RTEMS_SUCCESSFUL) { | |
121 | printf("in AVF2 *** Error sending message to MATR, code %d\n", status); |
|
121 | printf("in AVF2 *** Error sending message to MATR, code %d\n", status); | |
122 | } |
|
122 | } | |
123 | } |
|
123 | } | |
124 | } |
|
124 | } | |
125 |
|
125 | |||
126 | rtems_task prc2_task( rtems_task_argument argument ) |
|
126 | rtems_task prc2_task( rtems_task_argument argument ) | |
127 | { |
|
127 | { | |
128 | char incomingData[MSG_QUEUE_SIZE_SEND]; // incoming data buffer |
|
128 | char incomingData[MSG_QUEUE_SIZE_SEND]; // incoming data buffer | |
129 | size_t size; // size of the incoming TC packet |
|
129 | size_t size; // size of the incoming TC packet | |
130 | asm_msg *incomingMsg; |
|
130 | asm_msg *incomingMsg; | |
131 | // |
|
131 | // | |
132 | spw_ioctl_pkt_send spw_ioctl_send_ASM; |
|
132 | spw_ioctl_pkt_send spw_ioctl_send_ASM; | |
133 | rtems_status_code status; |
|
133 | rtems_status_code status; | |
134 | rtems_id queue_id; |
|
134 | rtems_id queue_id; | |
135 | rtems_id queue_id_q_p2; |
|
135 | rtems_id queue_id_q_p2; | |
136 | Header_TM_LFR_SCIENCE_ASM_t headerASM; |
|
136 | Header_TM_LFR_SCIENCE_ASM_t headerASM; | |
137 | bp_packet packet_norm_bp1_f2; |
|
137 | bp_packet packet_norm_bp1_f2; | |
138 | bp_packet packet_norm_bp2_f2; |
|
138 | bp_packet packet_norm_bp2_f2; | |
139 |
|
139 | |||
140 | unsigned long long int localTime; |
|
140 | unsigned long long int localTime; | |
141 |
|
141 | |||
142 | ASM_init_header( &headerASM ); |
|
142 | ASM_init_header( &headerASM ); | |
143 |
|
143 | |||
144 | //************* |
|
144 | //************* | |
145 | // NORM headers |
|
145 | // NORM headers | |
146 | BP_init_header( &packet_norm_bp1_f2.header, |
|
146 | BP_init_header( &packet_norm_bp1_f2.header, | |
147 | APID_TM_SCIENCE_NORMAL_BURST, SID_NORM_BP1_F2, |
|
147 | APID_TM_SCIENCE_NORMAL_BURST, SID_NORM_BP1_F2, | |
148 | PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP1_F2, NB_BINS_COMPRESSED_SM_F2 ); |
|
148 | PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP1_F2, NB_BINS_COMPRESSED_SM_F2 ); | |
149 | BP_init_header( &packet_norm_bp2_f2.header, |
|
149 | BP_init_header( &packet_norm_bp2_f2.header, | |
150 | APID_TM_SCIENCE_NORMAL_BURST, SID_NORM_BP2_F2, |
|
150 | APID_TM_SCIENCE_NORMAL_BURST, SID_NORM_BP2_F2, | |
151 | PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP2_F2, NB_BINS_COMPRESSED_SM_F2 ); |
|
151 | PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP2_F2, NB_BINS_COMPRESSED_SM_F2 ); | |
152 |
|
152 | |||
153 | status = get_message_queue_id_send( &queue_id ); |
|
153 | status = get_message_queue_id_send( &queue_id ); | |
154 | if (status != RTEMS_SUCCESSFUL) |
|
154 | if (status != RTEMS_SUCCESSFUL) | |
155 | { |
|
155 | { | |
156 | PRINTF1("in PRC2 *** ERR get_message_queue_id_send %d\n", status) |
|
156 | PRINTF1("in PRC2 *** ERR get_message_queue_id_send %d\n", status) | |
157 | } |
|
157 | } | |
158 | status = get_message_queue_id_prc2( &queue_id_q_p2); |
|
158 | status = get_message_queue_id_prc2( &queue_id_q_p2); | |
159 | if (status != RTEMS_SUCCESSFUL) |
|
159 | if (status != RTEMS_SUCCESSFUL) | |
160 | { |
|
160 | { | |
161 | PRINTF1("in PRC2 *** ERR get_message_queue_id_prc2 %d\n", status) |
|
161 | PRINTF1("in PRC2 *** ERR get_message_queue_id_prc2 %d\n", status) | |
162 | } |
|
162 | } | |
163 |
|
163 | |||
164 | BOOT_PRINTF("in PRC2 ***\n") |
|
164 | BOOT_PRINTF("in PRC2 ***\n") | |
165 |
|
165 | |||
166 | while(1){ |
|
166 | while(1){ | |
167 | status = rtems_message_queue_receive( queue_id_q_p2, incomingData, &size, //************************************ |
|
167 | status = rtems_message_queue_receive( queue_id_q_p2, incomingData, &size, //************************************ | |
168 | RTEMS_WAIT, RTEMS_NO_TIMEOUT ); // wait for a message coming from AVF0 |
|
168 | RTEMS_WAIT, RTEMS_NO_TIMEOUT ); // wait for a message coming from AVF0 | |
169 |
|
169 | |||
170 | incomingMsg = (asm_msg*) incomingData; |
|
170 | incomingMsg = (asm_msg*) incomingData; | |
171 |
|
171 | |||
172 | localTime = getTimeAsUnsignedLongLongInt( ); |
|
172 | localTime = getTimeAsUnsignedLongLongInt( ); | |
173 |
|
173 | |||
174 | //***** |
|
174 | //***** | |
175 | //***** |
|
175 | //***** | |
176 | // NORM |
|
176 | // NORM | |
177 | //***** |
|
177 | //***** | |
178 | //***** |
|
178 | //***** | |
179 | if (incomingMsg->event & RTEMS_EVENT_NORM_BP1_F2) |
|
179 | if (incomingMsg->event & RTEMS_EVENT_NORM_BP1_F2) | |
180 | { |
|
180 | { | |
181 | // 1) compress the matrix for Basic Parameters calculation |
|
181 | // 1) compress the matrix for Basic Parameters calculation | |
182 | ASM_compress_reorganize_and_divide( incomingMsg->norm->matrix, compressed_sm_norm_f2, |
|
182 | ASM_compress_reorganize_and_divide( incomingMsg->norm->matrix, compressed_sm_norm_f2, | |
183 | nb_sm_before_f2.norm_bp1, |
|
183 | nb_sm_before_f2.norm_bp1, | |
184 | NB_BINS_COMPRESSED_SM_F2, NB_BINS_TO_AVERAGE_ASM_F2, |
|
184 | NB_BINS_COMPRESSED_SM_F2, NB_BINS_TO_AVERAGE_ASM_F2, | |
185 | ASM_F2_INDICE_START ); |
|
185 | ASM_F2_INDICE_START ); | |
186 | // 2) compute the BP1 set |
|
186 | // 2) compute the BP1 set | |
187 |
|
187 | |||
188 | // 3) send the BP1 set |
|
188 | // 3) send the BP1 set | |
189 | set_time( packet_norm_bp1_f2.header.time, (unsigned char *) &incomingMsg->coarseTime ); |
|
189 | set_time( packet_norm_bp1_f2.header.time, (unsigned char *) &incomingMsg->coarseTime ); | |
190 | set_time( packet_norm_bp1_f2.header.acquisitionTime, (unsigned char *) &incomingMsg->coarseTime ); |
|
190 | set_time( packet_norm_bp1_f2.header.acquisitionTime, (unsigned char *) &incomingMsg->coarseTime ); | |
191 | BP_send( (char *) &packet_norm_bp1_f2, queue_id, |
|
191 | BP_send( (char *) &packet_norm_bp1_f2, queue_id, | |
192 | PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP1_F2 + PACKET_LENGTH_DELTA, |
|
192 | PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP1_F2 + PACKET_LENGTH_DELTA, | |
193 | SID_NORM_BP1_F2 ); |
|
193 | SID_NORM_BP1_F2 ); | |
194 | if (incomingMsg->event & RTEMS_EVENT_NORM_BP2_F2) |
|
194 | if (incomingMsg->event & RTEMS_EVENT_NORM_BP2_F2) | |
195 | { |
|
195 | { | |
196 | // 1) compute the BP2 set using the same ASM as the one used for BP1 |
|
196 | // 1) compute the BP2 set using the same ASM as the one used for BP1 | |
197 |
|
197 | |||
198 | // 2) send the BP2 set |
|
198 | // 2) send the BP2 set | |
199 | set_time( packet_norm_bp2_f2.header.time, (unsigned char *) &incomingMsg->coarseTime ); |
|
199 | set_time( packet_norm_bp2_f2.header.time, (unsigned char *) &incomingMsg->coarseTime ); | |
200 | set_time( packet_norm_bp2_f2.header.acquisitionTime, (unsigned char *) &incomingMsg->coarseTime ); |
|
200 | set_time( packet_norm_bp2_f2.header.acquisitionTime, (unsigned char *) &incomingMsg->coarseTime ); | |
201 | BP_send( (char *) &packet_norm_bp2_f2, queue_id, |
|
201 | BP_send( (char *) &packet_norm_bp2_f2, queue_id, | |
202 | PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP2_F2 + PACKET_LENGTH_DELTA, |
|
202 | PACKET_LENGTH_TM_LFR_SCIENCE_NORM_BP2_F2 + PACKET_LENGTH_DELTA, | |
203 | SID_NORM_BP2_F2 ); |
|
203 | SID_NORM_BP2_F2 ); | |
204 | } |
|
204 | } | |
205 | } |
|
205 | } | |
206 |
|
206 | |||
207 | if (incomingMsg->event & RTEMS_EVENT_NORM_ASM_F2) |
|
207 | if (incomingMsg->event & RTEMS_EVENT_NORM_ASM_F2) | |
208 | { |
|
208 | { | |
209 | // 1) reorganize the ASM and divide |
|
209 | // 1) reorganize the ASM and divide | |
210 | ASM_reorganize_and_divide( incomingMsg->norm->matrix, |
|
210 | ASM_reorganize_and_divide( incomingMsg->norm->matrix, | |
211 | asm_f2_reorganized, |
|
211 | asm_f2_reorganized, | |
212 | nb_sm_before_f2.norm_bp1 ); |
|
212 | nb_sm_before_f2.norm_bp1 ); | |
213 | // 2) convert the float array in a char array |
|
213 | // 2) convert the float array in a char array | |
214 | ASM_convert( asm_f2_reorganized, asm_f2_char); |
|
214 | ASM_convert( asm_f2_reorganized, asm_f2_char); | |
215 | // 3) send the spectral matrix packets |
|
215 | // 3) send the spectral matrix packets | |
216 | set_time( headerASM.time , (unsigned char *) &incomingMsg->coarseTime ); |
|
216 | set_time( headerASM.time , (unsigned char *) &incomingMsg->coarseTime ); | |
217 | set_time( headerASM.acquisitionTime, (unsigned char *) &incomingMsg->coarseTime ); |
|
217 | set_time( headerASM.acquisitionTime, (unsigned char *) &incomingMsg->coarseTime ); | |
218 | ASM_send( &headerASM, asm_f2_char, SID_NORM_ASM_F2, &spw_ioctl_send_ASM, queue_id); |
|
218 | ASM_send( &headerASM, asm_f2_char, SID_NORM_ASM_F2, &spw_ioctl_send_ASM, queue_id); | |
219 | } |
|
219 | } | |
220 |
|
220 | |||
221 | } |
|
221 | } | |
222 | } |
|
222 | } | |
223 |
|
223 | |||
224 | //********** |
|
224 | //********** | |
225 | // FUNCTIONS |
|
225 | // FUNCTIONS | |
226 |
|
226 | |||
227 | void reset_nb_sm_f2( void ) |
|
227 | void reset_nb_sm_f2( void ) | |
228 | { |
|
228 | { | |
229 | nb_sm_before_f2.norm_bp1 = parameter_dump_packet.sy_lfr_n_bp_p0; |
|
229 | nb_sm_before_f2.norm_bp1 = parameter_dump_packet.sy_lfr_n_bp_p0; | |
230 | nb_sm_before_f2.norm_bp2 = parameter_dump_packet.sy_lfr_n_bp_p1; |
|
230 | nb_sm_before_f2.norm_bp2 = parameter_dump_packet.sy_lfr_n_bp_p1; | |
231 | nb_sm_before_f2.norm_asm = parameter_dump_packet.sy_lfr_n_asm_p[0] * 256 + parameter_dump_packet.sy_lfr_n_asm_p[1]; |
|
231 | nb_sm_before_f2.norm_asm = parameter_dump_packet.sy_lfr_n_asm_p[0] * 256 + parameter_dump_packet.sy_lfr_n_asm_p[1]; | |
232 | } |
|
232 | } | |
233 |
|
233 | |||
234 | void SM_average_f2( float *averaged_spec_mat_f2, |
|
234 | void SM_average_f2( float *averaged_spec_mat_f2, | |
235 | ring_node_sm *ring_node, |
|
235 | ring_node_sm *ring_node, | |
236 | unsigned int nbAverageNormF2 ) |
|
236 | unsigned int nbAverageNormF2 ) | |
237 | { |
|
237 | { | |
238 | float sum; |
|
238 | float sum; | |
239 | unsigned int i; |
|
239 | unsigned int i; | |
240 |
|
240 | |||
241 | for(i=0; i<TOTAL_SIZE_SM; i++) |
|
241 | for(i=0; i<TOTAL_SIZE_SM; i++) | |
242 | { |
|
242 | { | |
243 | sum = ( (int *) (ring_node->buffer_address) ) [ i ]; |
|
243 | sum = ( (int *) (ring_node->buffer_address) ) [ i ]; | |
244 | if ( (nbAverageNormF2 == 0) ) |
|
244 | if ( (nbAverageNormF2 == 0) ) | |
245 | { |
|
245 | { | |
246 | averaged_spec_mat_f2[ i ] = sum; |
|
246 | averaged_spec_mat_f2[ i ] = sum; | |
247 | } |
|
247 | } | |
248 | else |
|
248 | else | |
249 | { |
|
249 | { | |
250 | averaged_spec_mat_f2[ i ] = ( averaged_spec_mat_f2[ i ] + sum ); |
|
250 | averaged_spec_mat_f2[ i ] = ( averaged_spec_mat_f2[ i ] + sum ); | |
251 | } |
|
251 | } | |
252 | } |
|
252 | } | |
253 | } |
|
253 | } | |
|
254 | ||||
|
255 | void SM_average_f2_alt( float *averaged_spec_mat_f2, | |||
|
256 | ring_node_sm *ring_node, | |||
|
257 | unsigned int nbAverageNormF2 ) | |||
|
258 | { | |||
|
259 | float sum; | |||
|
260 | unsigned int i; | |||
|
261 | ||||
|
262 | for(i=0; i<TOTAL_SIZE_SM; i++) | |||
|
263 | { | |||
|
264 | sum = ( (int *) (ring_node->buffer_address) ) [ i ]; | |||
|
265 | averaged_spec_mat_f2[ i ] = sum; | |||
|
266 | } | |||
|
267 | } |
General Comments 0
You need to be logged in to leave comments.
Login now