@@ -1,21 +1,21 | |||
|
1 | 1 | ############################################################################# |
|
2 | 2 | # Makefile for building: bin/fsw |
|
3 |
# Generated by qmake (2.01a) (Qt 4.8.5) on: Tue Jan 21 1 |
|
|
3 | # Generated by qmake (2.01a) (Qt 4.8.5) on: Tue Jan 21 15:38:15 2014 | |
|
4 | 4 | # Project: fsw-qt.pro |
|
5 | 5 | # Template: app |
|
6 |
# Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ |
|
|
6 | # Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro | |
|
7 | 7 | ############################################################################# |
|
8 | 8 | |
|
9 | 9 | ####### Compiler, tools and options |
|
10 | 10 | |
|
11 | 11 | CC = sparc-rtems-gcc |
|
12 | 12 | CXX = sparc-rtems-g++ |
|
13 | DEFINES = -DSW_VERSION_N1=1 -DSW_VERSION_N2=0 -DSW_VERSION_N3=0 -DSW_VERSION_N4=1 -DPRINT_MESSAGES_ON_CONSOLE -DDEBUG_MESSAGES | |
|
14 |
CFLAGS = -pipe |
|
|
13 | DEFINES = -DSW_VERSION_N1=1 -DSW_VERSION_N2=0 -DSW_VERSION_N3=0 -DSW_VERSION_N4=1 -DPRINT_MESSAGES_ON_CONSOLE -DDEBUG_MESSAGES -DVHDL_DEV | |
|
14 | CFLAGS = -pipe -O3 -Wall $(DEFINES) | |
|
15 | 15 | CXXFLAGS = -pipe -O3 -Wall $(DEFINES) |
|
16 | 16 | INCPATH = -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I../src -I../header |
|
17 | 17 | LINK = sparc-rtems-g++ |
|
18 |
LFLAGS = |
|
|
18 | LFLAGS = | |
|
19 | 19 | LIBS = $(SUBLIBS) |
|
20 | 20 | AR = sparc-rtems-ar rcs |
|
21 | 21 | RANLIB = |
@@ -76,7 +76,7 DIST = /usr/lib64/qt4/mkspecs/c | |||
|
76 | 76 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ |
|
77 | 77 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ |
|
78 | 78 | sparc.pri \ |
|
79 |
/usr/lib64/qt4/mkspecs/features/ |
|
|
79 | /usr/lib64/qt4/mkspecs/features/release.prf \ | |
|
80 | 80 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ |
|
81 | 81 | /usr/lib64/qt4/mkspecs/features/shared.prf \ |
|
82 | 82 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ |
@@ -118,7 +118,6 all: Makefile $(TARGET) | |||
|
118 | 118 | $(TARGET): $(OBJECTS) |
|
119 | 119 | @$(CHK_DIR_EXISTS) bin/ || $(MKDIR) bin/ |
|
120 | 120 | $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS) |
|
121 | { test -n "$(DESTDIR)" && DESTDIR="$(DESTDIR)" || DESTDIR=.; } && test $$(gdb --version | sed -e 's,[^0-9]\+\([0-9]\)\.\([0-9]\).*,\1\2,;q') -gt 72 && gdb --nx --batch --quiet -ex 'set confirm off' -ex "save gdb-index $$DESTDIR" -ex quit '$(TARGET)' && test -f $(TARGET).gdb-index && sparc-rtems-objcopy --add-section '.gdb_index=$(TARGET).gdb-index' --set-section-flags '.gdb_index=readonly' '$(TARGET)' '$(TARGET)' && rm -f $(TARGET).gdb-index || true | |
|
122 | 121 | |
|
123 | 122 | Makefile: fsw-qt.pro /usr/lib64/qt4/mkspecs/linux-g++/qmake.conf /usr/lib64/qt4/mkspecs/common/unix.conf \ |
|
124 | 123 | /usr/lib64/qt4/mkspecs/common/linux.conf \ |
@@ -133,7 +132,7 Makefile: fsw-qt.pro /usr/lib64/qt4/mks | |||
|
133 | 132 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ |
|
134 | 133 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ |
|
135 | 134 | sparc.pri \ |
|
136 |
/usr/lib64/qt4/mkspecs/features/ |
|
|
135 | /usr/lib64/qt4/mkspecs/features/release.prf \ | |
|
137 | 136 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ |
|
138 | 137 | /usr/lib64/qt4/mkspecs/features/shared.prf \ |
|
139 | 138 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ |
@@ -143,7 +142,7 Makefile: fsw-qt.pro /usr/lib64/qt4/mks | |||
|
143 | 142 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ |
|
144 | 143 | /usr/lib64/qt4/mkspecs/features/lex.prf \ |
|
145 | 144 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf |
|
146 |
$(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ |
|
|
145 | $(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro | |
|
147 | 146 | /usr/lib64/qt4/mkspecs/common/unix.conf: |
|
148 | 147 | /usr/lib64/qt4/mkspecs/common/linux.conf: |
|
149 | 148 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf: |
@@ -157,7 +156,7 Makefile: fsw-qt.pro /usr/lib64/qt4/mks | |||
|
157 | 156 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf: |
|
158 | 157 | /usr/lib64/qt4/mkspecs/features/default_pre.prf: |
|
159 | 158 | sparc.pri: |
|
160 |
/usr/lib64/qt4/mkspecs/features/ |
|
|
159 | /usr/lib64/qt4/mkspecs/features/release.prf: | |
|
161 | 160 | /usr/lib64/qt4/mkspecs/features/default_post.prf: |
|
162 | 161 | /usr/lib64/qt4/mkspecs/features/shared.prf: |
|
163 | 162 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf: |
@@ -168,7 +167,7 sparc.pri: | |||
|
168 | 167 | /usr/lib64/qt4/mkspecs/features/lex.prf: |
|
169 | 168 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf: |
|
170 | 169 | qmake: FORCE |
|
171 |
@$(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ |
|
|
170 | @$(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro | |
|
172 | 171 | |
|
173 | 172 | dist: |
|
174 | 173 | @$(CHK_DIR_EXISTS) obj/fsw1.0.0 || $(MKDIR) obj/fsw1.0.0 |
@@ -1,7 +1,7 | |||
|
1 | 1 | TEMPLATE = app |
|
2 | 2 | # CONFIG += console v8 sim |
|
3 | # CONFIG options = verbose *** boot_messages *** debug_messages *** cpu_usage_report *** stack_report *** gsa | |
|
4 | CONFIG += console verbose debug_messages | |
|
3 | # CONFIG options = verbose *** boot_messages *** debug_messages *** cpu_usage_report *** stack_report *** gsa *** vhdl_dev | |
|
4 | CONFIG += console verbose debug_messages vhdl_dev | |
|
5 | 5 | CONFIG -= qt |
|
6 | 6 | |
|
7 | 7 | include(./sparc.pri) |
@@ -43,6 +43,12 contains( CONFIG, gsa ) { | |||
|
43 | 43 | TARGET = fsw-gsa |
|
44 | 44 | } |
|
45 | 45 | |
|
46 | TARGET = fsw | |
|
47 | contains( CONFIG, vhdl_dev ) { | |
|
48 | DEFINES += VHDL_DEV | |
|
49 | TARGET = fsw | |
|
50 | } | |
|
51 | ||
|
46 | 52 | INCLUDEPATH += \ |
|
47 | 53 | ../src \ |
|
48 | 54 | ../header |
@@ -1,6 +1,6 | |||
|
1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
|
2 | 2 | <!DOCTYPE QtCreatorProject> |
|
3 |
<!-- Written by QtCreator 3.0.0, 2014-01-21T1 |
|
|
3 | <!-- Written by QtCreator 3.0.0, 2014-01-21T15:59:52. --> | |
|
4 | 4 | <qtcreator> |
|
5 | 5 | <data> |
|
6 | 6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> |
@@ -25,7 +25,7 | |||
|
25 | 25 | </valuemap> |
|
26 | 26 | </valuemap> |
|
27 | 27 | <value type="int" key="EditorConfiguration.CodeStyle.Count">2</value> |
|
28 |
<value type="QByteArray" key="EditorConfiguration.Codec"> |
|
|
28 | <value type="QByteArray" key="EditorConfiguration.Codec">System</value> | |
|
29 | 29 | <value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value> |
|
30 | 30 | <value type="int" key="EditorConfiguration.IndentSize">4</value> |
|
31 | 31 | <value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value> |
@@ -56,7 +56,7 | |||
|
56 | 56 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{5289e843-9ef2-45ce-88c6-ad27d8e08def}</value> |
|
57 | 57 | <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value> |
|
58 | 58 | <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value> |
|
59 |
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration"> |
|
|
59 | <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">1</value> | |
|
60 | 60 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0"> |
|
61 | 61 | <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/opt/DEV_PLE/FSW-qt</value> |
|
62 | 62 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> |
@@ -66,7 +66,7 | |||
|
66 | 66 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
67 | 67 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value> |
|
68 | 68 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value> |
|
69 |
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto"> |
|
|
69 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value> | |
|
70 | 70 | <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value> |
|
71 | 71 | <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value> |
|
72 | 72 | </valuemap> |
@@ -80,7 +80,7 | |||
|
80 | 80 | <value type="QString">-r</value> |
|
81 | 81 | </valuelist> |
|
82 | 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">-r -w -j 4</value> | |
|
84 | 84 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> |
|
85 | 85 | </valuemap> |
|
86 | 86 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> |
@@ -99,7 +99,7 | |||
|
99 | 99 | <value type="QString">-r</value> |
|
100 | 100 | </valuelist> |
|
101 | 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">-r -w clean</value> | |
|
103 | 103 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> |
|
104 | 104 | </valuemap> |
|
105 | 105 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> |
@@ -110,10 +110,10 | |||
|
110 | 110 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> |
|
111 | 111 | <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> |
|
112 | 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">Qt 4.8.2 in PATH (System) Release</value> | |
|
114 | 114 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
115 | 115 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value> |
|
116 |
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration"> |
|
|
116 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value> | |
|
117 | 117 | <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value> |
|
118 | 118 | </valuemap> |
|
119 | 119 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1"> |
@@ -125,7 +125,7 | |||
|
125 | 125 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
126 | 126 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value> |
|
127 | 127 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value> |
|
128 |
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto"> |
|
|
128 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value> | |
|
129 | 129 | <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value> |
|
130 | 130 | <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value> |
|
131 | 131 | </valuemap> |
@@ -139,7 +139,7 | |||
|
139 | 139 | <value type="QString">-r</value> |
|
140 | 140 | </valuelist> |
|
141 | 141 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value> |
|
142 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value> | |
|
142 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">-r -w </value> | |
|
143 | 143 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> |
|
144 | 144 | </valuemap> |
|
145 | 145 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> |
@@ -158,7 +158,7 | |||
|
158 | 158 | <value type="QString">-r</value> |
|
159 | 159 | </valuelist> |
|
160 | 160 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value> |
|
161 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value> | |
|
161 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">-r -w clean</value> | |
|
162 | 162 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> |
|
163 | 163 | </valuemap> |
|
164 | 164 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> |
@@ -169,10 +169,10 | |||
|
169 | 169 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> |
|
170 | 170 | <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> |
|
171 | 171 | <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> |
|
172 |
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName"> |
|
|
172 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 4.8.2 in PATH (System) Debug</value> | |
|
173 | 173 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
174 | 174 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value> |
|
175 |
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration"> |
|
|
175 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value> | |
|
176 | 176 | <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value> |
|
177 | 177 | </valuemap> |
|
178 | 178 | <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">2</value> |
@@ -184,7 +184,7 | |||
|
184 | 184 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value> |
|
185 | 185 | </valuemap> |
|
186 | 186 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value> |
|
187 |
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName"> |
|
|
187 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">No deployment</value> | |
|
188 | 188 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
189 | 189 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value> |
|
190 | 190 | </valuemap> |
@@ -240,7 +240,7 | |||
|
240 | 240 | <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value> |
|
241 | 241 | <value type="bool" key="RunConfiguration.UseMultiProcess">false</value> |
|
242 | 242 | <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> |
|
243 |
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto"> |
|
|
243 | <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">false</value> | |
|
244 | 244 | </valuemap> |
|
245 | 245 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.1"> |
|
246 | 246 | <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> |
@@ -277,18 +277,18 | |||
|
277 | 277 | <value type="int">13</value> |
|
278 | 278 | <value type="int">14</value> |
|
279 | 279 | </valuelist> |
|
280 |
<value type="int" key="PE.EnvironmentAspect.Base"> |
|
|
280 | <value type="int" key="PE.EnvironmentAspect.Base">2</value> | |
|
281 | 281 | <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/> |
|
282 | 282 | <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Arguments"></value> |
|
283 |
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Executable"> |
|
|
284 |
<value type="bool" key="ProjectExplorer.CustomExecutableRunConfiguration.UseTerminal"> |
|
|
285 |
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.WorkingDirectory"> |
|
|
286 |
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Run |
|
|
283 | <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Executable">doxygen</value> | |
|
284 | <value type="bool" key="ProjectExplorer.CustomExecutableRunConfiguration.UseTerminal">true</value> | |
|
285 | <value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.WorkingDirectory">/opt/DEV_PLE/doc</value> | |
|
286 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Run doxygen</value> | |
|
287 | 287 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
288 | 288 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value> |
|
289 | 289 | <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> |
|
290 |
<value type="bool" key="RunConfiguration.UseCppDebugger"> |
|
|
291 |
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto"> |
|
|
290 | <value type="bool" key="RunConfiguration.UseCppDebugger">true</value> | |
|
291 | <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value> | |
|
292 | 292 | <value type="bool" key="RunConfiguration.UseMultiProcess">false</value> |
|
293 | 293 | <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> |
|
294 | 294 | <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value> |
@@ -55,6 +55,25 typedef struct { | |||
|
55 | 55 | volatile int nb_snapshot_param; // 0x2c 0011 *** |
|
56 | 56 | } waveform_picker_regs_t; |
|
57 | 57 | |
|
58 | typedef struct{ | |
|
59 | int data_shaping; // 0x00 00 *** R1 R0 SP1 SP0 BW | |
|
60 | int run_burst_enable; // 0x04 01 *** [run *** burst f2, f1, f0 *** enable f3, f2, f1, f0 ] | |
|
61 | int addr_data_f0; // 0x08 | |
|
62 | int addr_data_f1; // 0x0c | |
|
63 | int addr_data_f2; // 0x10 | |
|
64 | int addr_data_f3; // 0x14 | |
|
65 | volatile int status; // 0x18 | |
|
66 | int delta_snapshot; // 0x1c | |
|
67 | int delta_f0; // 0x20 | |
|
68 | int delta_f0_2; // 0x24 | |
|
69 | int delta_f1; // 0x28 | |
|
70 | int delta_f2; // 0x2c | |
|
71 | int nb_data_by_buffer; // 0x30 | |
|
72 | int snapshot_param; // 0x34 | |
|
73 | int start_date; // 0x38 | |
|
74 | int nb_word_in_buffer; // 0x3c | |
|
75 | } waveform_picker_regs_new_t; | |
|
76 | ||
|
58 | 77 | typedef struct { |
|
59 | 78 | volatile int config; |
|
60 | 79 | volatile int status; |
@@ -41,6 +41,7 int enter_sbm1_mode(); | |||
|
41 | 41 | int enter_sbm2_mode(); |
|
42 | 42 | int restart_science_tasks(); |
|
43 | 43 | int suspend_science_tasks(); |
|
44 | void launch_waveform_picker( unsigned char mode ); | |
|
44 | 45 | |
|
45 | 46 | // other functions |
|
46 | 47 | void updateLFRCurrentMode(); |
@@ -31,11 +31,15 extern volatile int wf_snap_f1[ ][ NB_SA | |||
|
31 | 31 | // F2 |
|
32 | 32 | extern volatile int wf_snap_f2[ ][ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET ]; |
|
33 | 33 | // F3 |
|
34 | extern volatile int wf_cont_f3[ ]; | |
|
35 |
extern volatile int wf_cont_f3_b |
|
|
34 | extern volatile int wf_cont_f3_a[ ]; | |
|
35 | extern volatile int wf_cont_f3_b[ ]; | |
|
36 | 36 | extern char wf_cont_f3_light[ ]; |
|
37 | 37 | |
|
38 | #ifdef VHDL_DEV | |
|
39 | extern waveform_picker_regs_new_t *waveform_picker_regs; | |
|
40 | #else | |
|
38 | 41 | extern waveform_picker_regs_t *waveform_picker_regs; |
|
42 | #endif | |
|
39 | 43 | extern time_management_regs_t *time_management_regs; |
|
40 | 44 | extern Packet_TM_LFR_HK_t housekeeping_packet; |
|
41 | 45 | extern Packet_TM_LFR_PARAMETER_DUMP_t parameter_dump_packet; |
@@ -75,18 +79,15 rtems_id get_pkts_queue_id( void ); | |||
|
75 | 79 | // wfp registers |
|
76 | 80 | void set_wfp_data_shaping(); |
|
77 | 81 | char set_wfp_delta_snapshot(); |
|
78 | void set_wfp_burst_enable_register( unsigned char mode); | |
|
82 | void set_wfp_burst_enable_register( unsigned char mode ); | |
|
79 | 83 | void reset_wfp_burst_enable(); |
|
80 | 84 | void reset_wfp_status(); |
|
81 | 85 | void reset_waveform_picker_regs(); |
|
86 | void reset_new_waveform_picker_regs(); | |
|
82 | 87 | |
|
83 | 88 | //***************** |
|
84 | 89 | // local parameters |
|
85 | void set_local_sbm1_nb_cwf_max( void ); | |
|
86 | void set_local_sbm2_nb_cwf_max( void ); | |
|
87 | 90 | void set_local_nb_interrupt_f0_MAX( void ); |
|
88 | void reset_local_sbm1_nb_cwf_sent( void ); | |
|
89 | void reset_local_sbm2_nb_cwf_sent( void ); | |
|
90 | 91 | |
|
91 | 92 | void increment_seq_counter_source_id( unsigned char *packet_sequence_control, unsigned int sid ); |
|
92 | 93 |
@@ -32,14 +32,14 int fdUART = 0; | |||
|
32 | 32 | unsigned char lfrCurrentMode; |
|
33 | 33 | |
|
34 | 34 | // WAVEFORMS GLOBAL VARIABLES // 2048 * 3 * 4 + 2 * 4 = 24576 + 8 bytes |
|
35 |
volatile int wf_snap_f0[ |
|
|
35 | volatile int wf_snap_f0[ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET ]; | |
|
36 | 36 | // |
|
37 | volatile int wf_snap_f1[NB_RING_NODES_F1][ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET ]; | |
|
37 | volatile int wf_snap_f1[ NB_RING_NODES_F1 ][ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET ]; | |
|
38 | 38 | // |
|
39 | volatile int wf_snap_f2[NB_RING_NODES_F2][ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET ]; | |
|
39 | volatile int wf_snap_f2[ NB_RING_NODES_F2 ][ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET ]; | |
|
40 | 40 | // |
|
41 |
volatile int wf_cont_f3[ |
|
|
42 |
volatile int wf_cont_f3_b |
|
|
41 | volatile int wf_cont_f3_a[ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET ]; | |
|
42 | volatile int wf_cont_f3_b[ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET ]; | |
|
43 | 43 | char wf_cont_f3_light[ NB_SAMPLES_PER_SNAPSHOT * NB_BYTES_CWF3_LIGHT_BLK ]; |
|
44 | 44 | |
|
45 | 45 | // SPECTRAL MATRICES GLOBAL VARIABLES |
@@ -63,13 +63,15 volatile int spec_mat_f2[ SM_HEADER + TO | |||
|
63 | 63 | volatile int spec_mat_f2_bis[ SM_HEADER + TOTAL_SIZE_SM ]; |
|
64 | 64 | |
|
65 | 65 | // APB CONFIGURATION REGISTERS |
|
66 | time_management_regs_t *time_management_regs = (time_management_regs_t*) REGS_ADDR_TIME_MANAGEMENT; | |
|
67 | gptimer_regs_t *gptimer_regs = (gptimer_regs_t *) REGS_ADDR_GPTIMER; | |
|
68 | #ifdef GSA | |
|
66 | time_management_regs_t *time_management_regs = (time_management_regs_t*) REGS_ADDR_TIME_MANAGEMENT; | |
|
67 | gptimer_regs_t *gptimer_regs = (gptimer_regs_t *) REGS_ADDR_GPTIMER; | |
|
68 | ||
|
69 | #ifdef VHDL_DEV | |
|
70 | waveform_picker_regs_new_t *waveform_picker_regs = (waveform_picker_regs_new_t*) REGS_ADDR_WAVEFORM_PICKER; | |
|
69 | 71 | #else |
|
70 |
|
|
|
72 | waveform_picker_regs_t *waveform_picker_regs = (waveform_picker_regs_t*) REGS_ADDR_WAVEFORM_PICKER; | |
|
71 | 73 | #endif |
|
72 | spectral_matrix_regs_t *spectral_matrix_regs = (spectral_matrix_regs_t*) REGS_ADDR_SPECTRAL_MATRIX; | |
|
74 | spectral_matrix_regs_t *spectral_matrix_regs = (spectral_matrix_regs_t*) REGS_ADDR_SPECTRAL_MATRIX; | |
|
73 | 75 | |
|
74 | 76 | // MODE PARAMETERS |
|
75 | 77 | Packet_TM_LFR_PARAMETER_DUMP_t parameter_dump_packet; |
@@ -200,17 +200,12 void init_local_mode_parameters( void ) | |||
|
200 | 200 | unsigned int i; |
|
201 | 201 | |
|
202 | 202 | // LOCAL PARAMETERS |
|
203 | set_local_sbm1_nb_cwf_max(); | |
|
204 | set_local_sbm2_nb_cwf_max(); | |
|
205 | 203 | set_local_nb_interrupt_f0_MAX(); |
|
206 | 204 | |
|
207 | 205 | BOOT_PRINTF1("local_sbm1_nb_cwf_max %d \n", param_local.local_sbm1_nb_cwf_max) |
|
208 | 206 | BOOT_PRINTF1("local_sbm2_nb_cwf_max %d \n", param_local.local_sbm2_nb_cwf_max) |
|
209 | 207 | BOOT_PRINTF1("nb_interrupt_f0_MAX = %d\n", param_local.local_nb_interrupt_f0_MAX) |
|
210 | 208 | |
|
211 | reset_local_sbm1_nb_cwf_sent(); | |
|
212 | reset_local_sbm2_nb_cwf_sent(); | |
|
213 | ||
|
214 | 209 | // init sequence counters |
|
215 | 210 | |
|
216 | 211 | for(i = 0; i<SEQ_CNT_NB_DEST_ID; i++) |
@@ -500,23 +500,13 int enter_normal_mode() | |||
|
500 | 500 | status = restart_science_tasks(); |
|
501 | 501 | |
|
502 | 502 | #ifdef GSA |
|
503 | timer_start( (gptimer_regs_t*) REGS_ADDR_GPTIMER, TIMER_WF_SIMULATOR ); | |
|
504 | 503 | timer_start( (gptimer_regs_t*) REGS_ADDR_GPTIMER, TIMER_SM_SIMULATOR ); |
|
505 | LEON_Clear_interrupt( IRQ_WF ); | |
|
506 | LEON_Unmask_interrupt( IRQ_WF ); | |
|
507 | 504 | // |
|
508 | 505 | set_local_nb_interrupt_f0_MAX(); |
|
509 | 506 | LEON_Clear_interrupt( IRQ_SM ); // the IRQ_SM seems to be incompatible with the IRQ_WF on the xilinx board |
|
510 | 507 | LEON_Unmask_interrupt( IRQ_SM ); |
|
511 | 508 | #else |
|
512 | //**************** | |
|
513 | // waveform picker | |
|
514 | reset_waveform_picker_regs(); | |
|
515 | set_wfp_burst_enable_register(LFR_MODE_NORMAL); | |
|
516 | LEON_Clear_interrupt( IRQ_WAVEFORM_PICKER ); | |
|
517 | LEON_Unmask_interrupt( IRQ_WAVEFORM_PICKER ); | |
|
518 | //**************** | |
|
519 | // spectral matrix | |
|
509 | launch_waveform_picker( LFR_MODE_SBM1 ); | |
|
520 | 510 | #endif |
|
521 | 511 | |
|
522 | 512 | return status; |
@@ -538,14 +528,7 int enter_burst_mode() | |||
|
538 | 528 | |
|
539 | 529 | status = restart_science_tasks(); |
|
540 | 530 | |
|
541 | #ifdef GSA | |
|
542 | LEON_Unmask_interrupt( IRQ_SM ); | |
|
543 | #else | |
|
544 | reset_waveform_picker_regs(); | |
|
545 | set_wfp_burst_enable_register(LFR_MODE_BURST); | |
|
546 | LEON_Clear_interrupt( IRQ_WAVEFORM_PICKER ); | |
|
547 | LEON_Unmask_interrupt( IRQ_WAVEFORM_PICKER ); | |
|
548 | #endif | |
|
531 | launch_waveform_picker( LFR_MODE_BURST ); | |
|
549 | 532 | |
|
550 | 533 | return status; |
|
551 | 534 | } |
@@ -566,21 +549,7 int enter_sbm1_mode() | |||
|
566 | 549 | |
|
567 | 550 | status = restart_science_tasks(); |
|
568 | 551 | |
|
569 | set_local_sbm1_nb_cwf_max(); | |
|
570 | ||
|
571 | reset_local_sbm1_nb_cwf_sent(); | |
|
572 | ||
|
573 | #ifdef GSA | |
|
574 | LEON_Unmask_interrupt( IRQ_SM ); | |
|
575 | #else | |
|
576 | //**************** | |
|
577 | // waveform picker | |
|
578 | reset_current_ring_nodes(); | |
|
579 | reset_waveform_picker_regs(); | |
|
580 | set_wfp_burst_enable_register(LFR_MODE_SBM1); | |
|
581 | LEON_Clear_interrupt( IRQ_WAVEFORM_PICKER ); | |
|
582 | LEON_Unmask_interrupt( IRQ_WAVEFORM_PICKER ); | |
|
583 | #endif | |
|
552 | launch_waveform_picker( LFR_MODE_SBM1 ); | |
|
584 | 553 | |
|
585 | 554 | return status; |
|
586 | 555 | } |
@@ -601,21 +570,7 int enter_sbm2_mode() | |||
|
601 | 570 | |
|
602 | 571 | status = restart_science_tasks(); |
|
603 | 572 | |
|
604 | set_local_sbm2_nb_cwf_max(); | |
|
605 | ||
|
606 | reset_local_sbm2_nb_cwf_sent(); | |
|
607 | ||
|
608 | #ifdef GSA | |
|
609 | LEON_Unmask_interrupt( IRQ_SM ); | |
|
610 | #else | |
|
611 | //**************** | |
|
612 | // waveform picker | |
|
613 | reset_current_ring_nodes(); | |
|
614 | reset_waveform_picker_regs(); | |
|
615 | set_wfp_burst_enable_register(LFR_MODE_SBM2); | |
|
616 | LEON_Clear_interrupt( IRQ_WAVEFORM_PICKER ); | |
|
617 | LEON_Unmask_interrupt( IRQ_WAVEFORM_PICKER ); | |
|
618 | #endif | |
|
573 | launch_waveform_picker( LFR_MODE_SBM2 ); | |
|
619 | 574 | |
|
620 | 575 | return status; |
|
621 | 576 | } |
@@ -751,6 +706,15 int suspend_science_tasks() | |||
|
751 | 706 | return status; |
|
752 | 707 | } |
|
753 | 708 | |
|
709 | void launch_waveform_picker( unsigned char mode ) | |
|
710 | { | |
|
711 | reset_current_ring_nodes(); | |
|
712 | reset_waveform_picker_regs(); | |
|
713 | set_wfp_burst_enable_register( mode ); | |
|
714 | LEON_Clear_interrupt( IRQ_WAVEFORM_PICKER ); | |
|
715 | LEON_Unmask_interrupt( IRQ_WAVEFORM_PICKER ); | |
|
716 | } | |
|
717 | ||
|
754 | 718 | //**************** |
|
755 | 719 | // CLOSING ACTIONS |
|
756 | 720 | void update_last_TC_exe(ccsdsTelecommandPacket_t *TC, unsigned char *time) |
@@ -45,18 +45,16 rtems_isr waveforms_isr( rtems_vector_nu | |||
|
45 | 45 | * |
|
46 | 46 | */ |
|
47 | 47 | |
|
48 | #ifdef GSA | |
|
49 | #else | |
|
50 | 48 | if ( (lfrCurrentMode == LFR_MODE_NORMAL) |
|
51 | 49 | || (lfrCurrentMode == LFR_MODE_SBM1) || (lfrCurrentMode == LFR_MODE_SBM2) ) |
|
52 | 50 | { // in modes other than STANDBY and BURST, send the CWF_F3 data |
|
53 | 51 | if ((waveform_picker_regs->status & 0x08) == 0x08){ // [1000] f3 is full |
|
54 | 52 | // (1) change the receiving buffer for the waveform picker |
|
55 | if (waveform_picker_regs->addr_data_f3 == (int) wf_cont_f3) { | |
|
56 |
waveform_picker_regs->addr_data_f3 = (int) (wf_cont_f3_b |
|
|
53 | if (waveform_picker_regs->addr_data_f3 == (int) wf_cont_f3_a) { | |
|
54 | waveform_picker_regs->addr_data_f3 = (int) (wf_cont_f3_b); | |
|
57 | 55 | } |
|
58 | 56 | else { |
|
59 | waveform_picker_regs->addr_data_f3 = (int) (wf_cont_f3); | |
|
57 | waveform_picker_regs->addr_data_f3 = (int) (wf_cont_f3_a); | |
|
60 | 58 | } |
|
61 | 59 | // (2) send an event for the waveforms transmission |
|
62 | 60 | if (rtems_event_send( Task_id[TASKID_CWF3], RTEMS_EVENT_0 ) != RTEMS_SUCCESSFUL) { |
@@ -65,7 +63,6 rtems_isr waveforms_isr( rtems_vector_nu | |||
|
65 | 63 | waveform_picker_regs->status = waveform_picker_regs->status & 0xfffff777; // reset f3 bits to 0, [1111 0111 0111 0111] |
|
66 | 64 | } |
|
67 | 65 | } |
|
68 | #endif | |
|
69 | 66 | |
|
70 | 67 | switch(lfrCurrentMode) |
|
71 | 68 | { |
@@ -77,61 +74,42 rtems_isr waveforms_isr( rtems_vector_nu | |||
|
77 | 74 | //****** |
|
78 | 75 | // NORMAL |
|
79 | 76 | case(LFR_MODE_NORMAL): |
|
80 | #ifdef GSA | |
|
81 | PRINTF("in waveform_isr *** unexpected waveform picker interruption\n") | |
|
82 | #else | |
|
83 | if ( (waveform_picker_regs->burst_enable & 0x7) == 0x0 ){ // if no channel is enable | |
|
84 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 ); | |
|
77 | if ( (waveform_picker_regs->status & 0x7) == 0x7 ){ // f2 f1 and f0 are full | |
|
78 | // change F1 ring node | |
|
79 | ring_node_to_send_swf_f1 = current_ring_node_f1; | |
|
80 | current_ring_node_f1 = current_ring_node_f1->next; | |
|
81 | waveform_picker_regs->addr_data_f1 = current_ring_node_f1->buffer_address; | |
|
82 | // change F2 ring node | |
|
83 | ring_node_to_send_swf_f2 = current_ring_node_f2; | |
|
84 | current_ring_node_f2 = current_ring_node_f2->next; | |
|
85 | waveform_picker_regs->addr_data_f2 = current_ring_node_f2->buffer_address; | |
|
86 | // send an event to the WFRM task | |
|
87 | if (rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_NORMAL ) != RTEMS_SUCCESSFUL) { | |
|
88 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 ); | |
|
89 | } | |
|
90 | waveform_picker_regs->status = waveform_picker_regs->status & 0xfffff888; // [1000 1000 1000] | |
|
85 | 91 | } |
|
86 | else { | |
|
87 | if ( (waveform_picker_regs->status & 0x7) == 0x7 ){ // f2 f1 and f0 are full | |
|
88 | waveform_picker_regs->burst_enable = waveform_picker_regs->burst_enable & 0x08; | |
|
89 | ||
|
90 | ring_node_to_send_swf_f1 = current_ring_node_f1; | |
|
91 | current_ring_node_f1 = current_ring_node_f1->next; | |
|
92 | waveform_picker_regs->addr_data_f1 = current_ring_node_f1->buffer_address; | |
|
93 | ||
|
94 | ring_node_to_send_swf_f2 = current_ring_node_f2; | |
|
95 | current_ring_node_f2 = current_ring_node_f2->next; | |
|
96 | waveform_picker_regs->addr_data_f2 = current_ring_node_f2->buffer_address; | |
|
97 | ||
|
98 | if (rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_NORMAL ) != RTEMS_SUCCESSFUL) { | |
|
99 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 ); | |
|
100 | } | |
|
101 | ||
|
102 | waveform_picker_regs->status = waveform_picker_regs->status & 0xfffff888; // [1000 1000 1000] | |
|
103 | waveform_picker_regs->burst_enable = waveform_picker_regs->burst_enable | 0x07; // [0111] enable f2 f1 f0 | |
|
104 | } | |
|
105 | } | |
|
106 | #endif | |
|
107 | 92 | break; |
|
108 | 93 | |
|
109 | 94 | //****** |
|
110 | 95 | // BURST |
|
111 | 96 | case(LFR_MODE_BURST): |
|
112 | #ifdef GSA | |
|
113 | PRINTF("in waveform_isr *** unexpected waveform picker interruption\n") | |
|
114 | #else | |
|
115 | 97 | if ( (waveform_picker_regs->status & 0x04) == 0x04 ){ // [0100] check the f2 full bit |
|
116 | 98 | // (1) change the receiving buffer for the waveform picker |
|
117 | 99 | ring_node_to_send_cwf_f2 = current_ring_node_f2; |
|
118 | 100 | current_ring_node_f2 = current_ring_node_f2->next; |
|
119 | 101 | waveform_picker_regs->addr_data_f2 = current_ring_node_f2->buffer_address; |
|
120 | 102 | // (2) send an event for the waveforms transmission |
|
121 |
if (rtems_event_send( Task_id[TASKID_CWF |
|
|
103 | if (rtems_event_send( Task_id[TASKID_CWF2], RTEMS_EVENT_MODE_SBM2 ) != RTEMS_SUCCESSFUL) { | |
|
122 | 104 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 ); |
|
123 | 105 | } |
|
124 | 106 | waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffbbb; // [1111 1011 1011 1011] f2 bit = 0 |
|
125 | 107 | } |
|
126 | #endif | |
|
127 | 108 | break; |
|
128 | 109 | |
|
129 | 110 | //***** |
|
130 | 111 | // SBM1 |
|
131 | 112 | case(LFR_MODE_SBM1): |
|
132 | #ifdef GSA | |
|
133 | PRINTF("in waveform_isr *** unexpected waveform picker interruption\n") | |
|
134 | #else | |
|
135 | 113 | if ( (waveform_picker_regs->status & 0x02) == 0x02 ) { // [0010] check the f1 full bit |
|
136 | 114 | // (1) change the receiving buffer for the waveform picker |
|
137 | 115 | ring_node_to_send_cwf_f1 = current_ring_node_f1; |
@@ -152,16 +130,11 rtems_isr waveforms_isr( rtems_vector_nu | |||
|
152 | 130 | } |
|
153 | 131 | waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffaaa; // [1111 1010 1010 1010] f2 and f0 bits = 0 |
|
154 | 132 | } |
|
155 | ||
|
156 | #endif | |
|
157 | 133 | break; |
|
158 | 134 | |
|
159 | 135 | //***** |
|
160 | 136 | // SBM2 |
|
161 | 137 | case(LFR_MODE_SBM2): |
|
162 | #ifdef GSA | |
|
163 | PRINTF("in waveform_isr *** unexpected waveform picker interruption\n") | |
|
164 | #else | |
|
165 | 138 | if ( (waveform_picker_regs->status & 0x04) == 0x04 ){ // [0100] check the f2 full bit |
|
166 | 139 | // (1) change the receiving buffer for the waveform picker |
|
167 | 140 | ring_node_to_send_cwf_f2 = current_ring_node_f2; |
@@ -173,13 +146,15 rtems_isr waveforms_isr( rtems_vector_nu | |||
|
173 | 146 | } |
|
174 | 147 | waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffbbb; // [1111 1011 1011 1011] f2 bit = 0 |
|
175 | 148 | } |
|
176 |
|
|
|
177 | // if (rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_SBM2 ) != RTEMS_SUCCESSFUL) { | |
|
178 | // rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 ); | |
|
179 | // } | |
|
180 | // waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffccc; // [1111 1100 1100 1100] f1, f0 bits = 0 | |
|
181 | // } | |
|
182 | #endif | |
|
149 | if ( (waveform_picker_regs->status & 0x01) == 0x01 ) { // [0001] check the f0 full bit | |
|
150 | ring_node_to_send_swf_f2 = current_ring_node_f2->previous; | |
|
151 | } | |
|
152 | if ( (waveform_picker_regs->status & 0x02) == 0x02 ) { // [0010] check the f1 full bit | |
|
153 | if (rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_NORMAL ) != RTEMS_SUCCESSFUL) { | |
|
154 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 ); | |
|
155 | } | |
|
156 | waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffccc; // [1111 1100 1100 1100] f1, f0 bits = 0 | |
|
157 | } | |
|
183 | 158 | break; |
|
184 | 159 | |
|
185 | 160 | //******** |
@@ -225,7 +200,6 rtems_task wfrm_task(rtems_task_argument | |||
|
225 | 200 | rtems_event_receive(RTEMS_EVENT_MODE_NORMAL | RTEMS_EVENT_MODE_SBM1 |
|
226 | 201 | | RTEMS_EVENT_MODE_SBM2 | RTEMS_EVENT_MODE_SBM2_WFRM, |
|
227 | 202 | RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out); |
|
228 | DEBUG_PRINTF("in WFRM *** 2\n") | |
|
229 | 203 | if (event_out == RTEMS_EVENT_MODE_NORMAL) |
|
230 | 204 | { |
|
231 | 205 | send_waveform_SWF(wf_snap_f0, SID_NORM_SWF_F0, headerSWF_F0, queue_id); |
@@ -272,11 +246,11 rtems_task cwf3_task(rtems_task_argument | |||
|
272 | 246 | PRINTF("send CWF F3 \n") |
|
273 | 247 | #ifdef GSA |
|
274 | 248 | #else |
|
275 | if (waveform_picker_regs->addr_data_f3 == (int) wf_cont_f3) { | |
|
276 |
send_waveform_CWF3_light( wf_cont_f3_b |
|
|
249 | if (waveform_picker_regs->addr_data_f3 == (int) wf_cont_f3_a) { | |
|
250 | send_waveform_CWF3_light( wf_cont_f3_b, headerCWF_F3_light, queue_id ); | |
|
277 | 251 | } |
|
278 | 252 | else { |
|
279 | send_waveform_CWF3_light( wf_cont_f3, headerCWF_F3_light, queue_id ); | |
|
253 | send_waveform_CWF3_light( wf_cont_f3_a, headerCWF_F3_light, queue_id ); | |
|
280 | 254 | } |
|
281 | 255 | #endif |
|
282 | 256 | } |
@@ -313,14 +287,13 rtems_task cwf2_task(rtems_task_argument | |||
|
313 | 287 | // wait for an RTEMS_EVENT |
|
314 | 288 | rtems_event_receive( RTEMS_EVENT_MODE_BURST | RTEMS_EVENT_MODE_SBM2, |
|
315 | 289 | RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out); |
|
316 | ||
|
317 | 290 | if (event_out == RTEMS_EVENT_MODE_BURST) |
|
318 | 291 | { |
|
319 | 292 | send_waveform_CWF( (volatile int *) ring_node_to_send_cwf_f2, SID_BURST_CWF_F2, headerCWF_F2_BURST, queue_id ); |
|
320 | 293 | } |
|
321 | 294 | if (event_out == RTEMS_EVENT_MODE_SBM2) |
|
322 | 295 | { |
|
323 |
send_waveform_CWF( (volatile int *) ring_node_to_send_cwf_f2, SID_ |
|
|
296 | send_waveform_CWF( (volatile int *) ring_node_to_send_cwf_f2, SID_SBM2_CWF_F2, headerCWF_F2_SBM2, queue_id ); | |
|
324 | 297 | } |
|
325 | 298 | } |
|
326 | 299 | } |
@@ -649,7 +622,11 int send_waveform_SWF( volatile int *wav | |||
|
649 | 622 | |
|
650 | 623 | for (i=0; i<7; i++) // send waveform |
|
651 | 624 | { |
|
625 | #ifdef VHDL_DEV | |
|
626 | spw_ioctl_send_SWF.data = (char*) &waveform[ (i * 340 * NB_WORDS_SWF_BLK) + TIME_OFFSET]; | |
|
627 | #else | |
|
652 | 628 | spw_ioctl_send_SWF.data = (char*) &waveform[ (i * 340 * NB_WORDS_SWF_BLK) ]; |
|
629 | #endif | |
|
653 | 630 | spw_ioctl_send_SWF.hdr = (char*) &headerSWF[ i ]; |
|
654 | 631 | // BUILD THE DATA |
|
655 | 632 | if (i==6) { |
@@ -714,7 +691,11 int send_waveform_CWF(volatile int *wave | |||
|
714 | 691 | { |
|
715 | 692 | int coarseTime = 0x00; |
|
716 | 693 | int fineTime = 0x00; |
|
694 | #ifdef VHDL_DEV | |
|
695 | spw_ioctl_send_CWF.data = (char*) &waveform[ (i * 340 * NB_WORDS_SWF_BLK) + TIME_OFFSET]; | |
|
696 | #else | |
|
717 | 697 | spw_ioctl_send_CWF.data = (char*) &waveform[ (i * 340 * NB_WORDS_SWF_BLK) ]; |
|
698 | #endif | |
|
718 | 699 | spw_ioctl_send_CWF.hdr = (char*) &headerCWF[ i ]; |
|
719 | 700 | // BUILD THE DATA |
|
720 | 701 | if (i==6) { |
@@ -808,7 +789,11 int send_waveform_CWF3_light(volatile in | |||
|
808 | 789 | { |
|
809 | 790 | int coarseTime = 0x00; |
|
810 | 791 | int fineTime = 0x00; |
|
792 | #ifdef VHDL_DEV | |
|
793 | spw_ioctl_send_CWF.data = (char*) &wf_cont_f3_light[ (i * 340 * NB_BYTES_CWF3_LIGHT_BLK) + TIME_OFFSET]; | |
|
794 | #else | |
|
811 | 795 | spw_ioctl_send_CWF.data = (char*) &wf_cont_f3_light[ (i * 340 * NB_BYTES_CWF3_LIGHT_BLK) ]; |
|
796 | #endif | |
|
812 | 797 | spw_ioctl_send_CWF.hdr = (char*) &headerCWF[ i ]; |
|
813 | 798 | // BUILD THE DATA |
|
814 | 799 | if ( i == WFRM_INDEX_OF_LAST_PACKET ) { |
@@ -914,7 +899,8 char set_wfp_delta_snapshot() | |||
|
914 | 899 | return ret; |
|
915 | 900 | } |
|
916 | 901 | |
|
917 | void set_wfp_burst_enable_register( unsigned char mode) | |
|
902 | #ifdef VHDL_DEV | |
|
903 | void set_wfp_burst_enable_register( unsigned char mode ) | |
|
918 | 904 | { |
|
919 | 905 | /** This function sets the waveform picker burst_enable register depending on the mode. |
|
920 | 906 | * |
@@ -924,8 +910,41 void set_wfp_burst_enable_register( unsi | |||
|
924 | 910 | * |
|
925 | 911 | */ |
|
926 | 912 | |
|
927 | #ifdef GSA | |
|
913 | // [0000 0000] burst f2, f1, f0 enable f3 f2 f1 f0 | |
|
914 | // the burst bits shall be set first, before the enable bits | |
|
915 | switch(mode) { | |
|
916 | case(LFR_MODE_NORMAL): | |
|
917 | waveform_picker_regs->run_burst_enable = 0x00; // [0000 0000] no burst enable | |
|
918 | waveform_picker_regs->run_burst_enable = 0x0f; // [0000 1111] enable f3 f2 f1 f0 | |
|
919 | break; | |
|
920 | case(LFR_MODE_BURST): | |
|
921 | waveform_picker_regs->run_burst_enable = 0x40; // [0100 0000] f2 burst enabled | |
|
922 | waveform_picker_regs->run_burst_enable = waveform_picker_regs->run_burst_enable | 0x04; // [0100] enable f2 | |
|
923 | break; | |
|
924 | case(LFR_MODE_SBM1): | |
|
925 | waveform_picker_regs->run_burst_enable = 0x20; // [0010 0000] f1 burst enabled | |
|
926 | waveform_picker_regs->run_burst_enable = waveform_picker_regs->run_burst_enable | 0x0f; // [1111] enable f3 f2 f1 f0 | |
|
927 | break; | |
|
928 | case(LFR_MODE_SBM2): | |
|
929 | waveform_picker_regs->run_burst_enable = 0x40; // [0100 0000] f2 burst enabled | |
|
930 | waveform_picker_regs->run_burst_enable = waveform_picker_regs->run_burst_enable | 0x0f; // [1111] enable f3 f2 f1 f0 | |
|
931 | break; | |
|
932 | default: | |
|
933 | waveform_picker_regs->run_burst_enable = 0x00; // [0000 0000] no burst enabled, no waveform enabled | |
|
934 | break; | |
|
935 | } | |
|
936 | } | |
|
928 | 937 | #else |
|
938 | void set_wfp_burst_enable_register( unsigned char mode ) | |
|
939 | { | |
|
940 | /** This function sets the waveform picker burst_enable register depending on the mode. | |
|
941 | * | |
|
942 | * @param mode is the LFR mode to launch. | |
|
943 | * | |
|
944 | * The burst bits shall be before the enable bits. | |
|
945 | * | |
|
946 | */ | |
|
947 | ||
|
929 | 948 | // [0000 0000] burst f2, f1, f0 enable f3 f2 f1 f0 |
|
930 | 949 | // the burst bits shall be set first, before the enable bits |
|
931 | 950 | switch(mode) { |
@@ -949,8 +968,8 void set_wfp_burst_enable_register( unsi | |||
|
949 | 968 | waveform_picker_regs->burst_enable = 0x00; // [0000 0000] no burst enabled, no waveform enabled |
|
950 | 969 | break; |
|
951 | 970 | } |
|
971 | } | |
|
952 | 972 | #endif |
|
953 | } | |
|
954 | 973 | |
|
955 | 974 | void reset_wfp_burst_enable() |
|
956 | 975 | { |
@@ -960,7 +979,8 void reset_wfp_burst_enable() | |||
|
960 | 979 | * |
|
961 | 980 | */ |
|
962 | 981 | |
|
963 | #ifdef GSA | |
|
982 | #ifdef VHDL_DEV | |
|
983 | waveform_picker_regs->run_burst_enable = 0x00; // burst f2, f1, f0 enable f3, f2, f1, f0 | |
|
964 | 984 | #else |
|
965 | 985 | waveform_picker_regs->burst_enable = 0x00; // burst f2, f1, f0 enable f3, f2, f1, f0 |
|
966 | 986 | #endif |
@@ -980,6 +1000,51 void reset_wfp_status() | |||
|
980 | 1000 | #endif |
|
981 | 1001 | } |
|
982 | 1002 | |
|
1003 | #ifdef VHDL_DEV | |
|
1004 | void reset_waveform_picker_regs() | |
|
1005 | { | |
|
1006 | /** This function resets the waveform picker module registers. | |
|
1007 | * | |
|
1008 | * The registers affected by this function are located at the following offset addresses: | |
|
1009 | * - 0x00 data_shaping | |
|
1010 | * - 0x04 run_burst_enable | |
|
1011 | * - 0x08 addr_data_f0 | |
|
1012 | * - 0x0C addr_data_f1 | |
|
1013 | * - 0x10 addr_data_f2 | |
|
1014 | * - 0x14 addr_data_f3 | |
|
1015 | * - 0x18 status | |
|
1016 | * - 0x1C delta_snapshot | |
|
1017 | * - 0x20 delta_f0 | |
|
1018 | * - 0x24 delta_f0_2 | |
|
1019 | * - 0x28 delta_f1 | |
|
1020 | * - 0x2c delta_f2 | |
|
1021 | * - 0x30 nb_data_by_buffer | |
|
1022 | * - 0x34 nb_snapshot_param | |
|
1023 | * - 0x38 start_date | |
|
1024 | * - 0x3c nb_word_in_buffer | |
|
1025 | * | |
|
1026 | */ | |
|
1027 | waveform_picker_regs->data_shaping = 0x01; // 0x00 *** R1 R0 SP1 SP0 BW | |
|
1028 | waveform_picker_regs->run_burst_enable = 0x00; // 0x04 *** [run *** burst f2, f1, f0 *** enable f3, f2, f1, f0 ] | |
|
1029 | waveform_picker_regs->addr_data_f0 = (int) (wf_snap_f0); // 0x08 | |
|
1030 | waveform_picker_regs->addr_data_f1 = current_ring_node_f1->buffer_address; // 0x0c | |
|
1031 | waveform_picker_regs->addr_data_f2 = current_ring_node_f2->buffer_address; // 0x10 | |
|
1032 | waveform_picker_regs->addr_data_f3 = (int) (wf_cont_f3_a); // 0x14 | |
|
1033 | waveform_picker_regs->status = 0x00; // 0x18 | |
|
1034 | // waveform_picker_regs->delta_snapshot = 0x12800; // 0x1c 296 * 256 = 75776 | |
|
1035 | // waveform_picker_regs->delta_snapshot = 0x1000; // 0x1c 16 * 256 = 4096 | |
|
1036 | waveform_picker_regs->delta_snapshot = 0x2000; // 0x1c 32 * 256 = 8192 | |
|
1037 | waveform_picker_regs->delta_f0 = 0xbf5; // 0x20 *** 1013 | |
|
1038 | waveform_picker_regs->delta_f0_2 = 0x7; // 0x24 *** 7 [7 bits] | |
|
1039 | waveform_picker_regs->delta_f1 = 0xbc0; // 0x28 *** 960 | |
|
1040 | // waveform_picker_regs->delta_f2 = 0x12200; // 0x2c *** 290 * 256 = 74240 | |
|
1041 | waveform_picker_regs->delta_f2 = 0xc00; // 0x2c *** 12 * 256 = 3072 | |
|
1042 | waveform_picker_regs->nb_data_by_buffer = 0x7ff; // 0x30 *** 2048 -1 => nb samples -1 | |
|
1043 | waveform_picker_regs->snapshot_param = 0x800; // 0x34 *** 2048 => nb samples | |
|
1044 | waveform_picker_regs->start_date = 0x00; // 0x38 | |
|
1045 | waveform_picker_regs->nb_word_in_buffer = 0x1802; // 0x3c *** 2048 * 3 + 2 = 6146 | |
|
1046 | } | |
|
1047 | #else | |
|
983 | 1048 | void reset_waveform_picker_regs() |
|
984 | 1049 | { |
|
985 | 1050 | /** This function resets the waveform picker module registers. |
@@ -1000,15 +1065,13 void reset_waveform_picker_regs() | |||
|
1000 | 1065 | * |
|
1001 | 1066 | */ |
|
1002 | 1067 | |
|
1003 | #ifdef GSA | |
|
1004 | #else | |
|
1005 | 1068 | reset_wfp_burst_enable(); |
|
1006 | 1069 | reset_wfp_status(); |
|
1007 | 1070 | // set buffer addresses |
|
1008 | 1071 | waveform_picker_regs->addr_data_f0 = (int) (wf_snap_f0); |
|
1009 | 1072 | waveform_picker_regs->addr_data_f1 = current_ring_node_f1->buffer_address; |
|
1010 | 1073 | waveform_picker_regs->addr_data_f2 = current_ring_node_f2->buffer_address; |
|
1011 | waveform_picker_regs->addr_data_f3 = (int) (wf_cont_f3); | |
|
1074 | waveform_picker_regs->addr_data_f3 = (int) (wf_cont_f3_a); | |
|
1012 | 1075 | // set other parameters |
|
1013 | 1076 | set_wfp_data_shaping(); |
|
1014 | 1077 | set_wfp_delta_snapshot(); // time in seconds between two snapshots |
@@ -1020,39 +1083,11 void reset_waveform_picker_regs() | |||
|
1020 | 1083 | waveform_picker_regs->nb_burst_available = 0x1b9; // max 3 bytes, size of the buffer in burst (1 burst = 16 x 4 octets) |
|
1021 | 1084 | // 3 * 2352 / 16 = 441 |
|
1022 | 1085 | waveform_picker_regs->nb_snapshot_param = 0x944; // max 3 octets, 2372 - 1 |
|
1086 | } | |
|
1023 | 1087 | #endif |
|
1024 | } | |
|
1025 | 1088 | |
|
1026 | 1089 | //***************** |
|
1027 | 1090 | // local parameters |
|
1028 | void set_local_sbm1_nb_cwf_max( void ) | |
|
1029 | { | |
|
1030 | /** This function sets the value of the sbm1_nb_cwf_max local parameter. | |
|
1031 | * | |
|
1032 | * The sbm1_nb_cwf_max parameter counts the number of CWF_F1 records that have been sent.\n | |
|
1033 | * This parameter is used to send CWF_F1 data as normal data when the SBM1 is active.\n\n | |
|
1034 | * (2 snapshots of 2048 points per seconds) * (period of the NORM snashots) - 8 s (duration of the f2 snapshot) | |
|
1035 | * | |
|
1036 | */ | |
|
1037 | param_local.local_sbm1_nb_cwf_max = 2 * | |
|
1038 | (parameter_dump_packet.sy_lfr_n_swf_p[0] * 256 | |
|
1039 | + parameter_dump_packet.sy_lfr_n_swf_p[1]) - 8; // 16 CWF1 parts during 1 SWF2 | |
|
1040 | } | |
|
1041 | ||
|
1042 | void set_local_sbm2_nb_cwf_max(void) | |
|
1043 | { | |
|
1044 | /** This function sets the value of the sbm1_nb_cwf_max local parameter. | |
|
1045 | * | |
|
1046 | * The sbm1_nb_cwf_max parameter counts the number of CWF_F1 records that have been sent.\n | |
|
1047 | * This parameter is used to send CWF_F2 data as normal data when the SBM2 is active.\n\n | |
|
1048 | * (period of the NORM snashots) / (8 seconds per snapshot at f2 = 256 Hz) | |
|
1049 | * | |
|
1050 | */ | |
|
1051 | ||
|
1052 | param_local.local_sbm2_nb_cwf_max = (parameter_dump_packet.sy_lfr_n_swf_p[0] * 256 | |
|
1053 | + parameter_dump_packet.sy_lfr_n_swf_p[1]) / 8; | |
|
1054 | } | |
|
1055 | ||
|
1056 | 1091 | void set_local_nb_interrupt_f0_MAX( void ) |
|
1057 | 1092 | { |
|
1058 | 1093 | /** This function sets the value of the nb_interrupt_f0_MAX local parameter. |
@@ -1067,30 +1102,6 void set_local_nb_interrupt_f0_MAX( void | |||
|
1067 | 1102 | + parameter_dump_packet.sy_lfr_n_asm_p[1] ) * 100; |
|
1068 | 1103 | } |
|
1069 | 1104 | |
|
1070 | void reset_local_sbm1_nb_cwf_sent( void ) | |
|
1071 | { | |
|
1072 | /** This function resets the value of the sbm1_nb_cwf_sent local parameter. | |
|
1073 | * | |
|
1074 | * The sbm1_nb_cwf_sent parameter counts the number of CWF_F1 records that have been sent.\n | |
|
1075 | * This parameter is used to send CWF_F1 data as normal data when the SBM1 is active. | |
|
1076 | * | |
|
1077 | */ | |
|
1078 | ||
|
1079 | param_local.local_sbm1_nb_cwf_sent = 0; | |
|
1080 | } | |
|
1081 | ||
|
1082 | void reset_local_sbm2_nb_cwf_sent( void ) | |
|
1083 | { | |
|
1084 | /** This function resets the value of the sbm2_nb_cwf_sent local parameter. | |
|
1085 | * | |
|
1086 | * The sbm2_nb_cwf_sent parameter counts the number of CWF_F2 records that have been sent.\n | |
|
1087 | * This parameter is used to send CWF_F2 data as normal data when the SBM2 mode is active. | |
|
1088 | * | |
|
1089 | */ | |
|
1090 | ||
|
1091 | param_local.local_sbm2_nb_cwf_sent = 0; | |
|
1092 | } | |
|
1093 | ||
|
1094 | 1105 | void increment_seq_counter_source_id( unsigned char *packet_sequence_control, unsigned int sid ) |
|
1095 | 1106 | { |
|
1096 | 1107 | unsigned short *sequence_cnt; |
General Comments 0
You need to be logged in to leave comments.
Login now