Merge lp:~rengolin/linaro-toolchain-benchmarks/clang into lp:linaro-toolchain-benchmarks

Proposed by Renato Golin
Status: Needs review
Proposed branch: lp:~rengolin/linaro-toolchain-benchmarks/clang
Merge into: lp:linaro-toolchain-benchmarks
Diff against target: 384025 lines
To merge this branch: bzr merge lp:~rengolin/linaro-toolchain-benchmarks/clang
Reviewer Review Type Date Requested Status
Matthew Gretton-Dann Pending
Review via email: mp+189571@code.launchpad.net

Commit message

Adding Clang Toolchain files

Description of the change

Adding Clang Toolchain files

To post a comment you must log in.

Unmerged revisions

29. By Renato Golin

Adding Clang toolchain files

28. By Michael Hope

Add a new target for PGO builds.

27. By Michael Hope

Add support for setting -flto via .

26. By Michael Hope

Always set CC so CROSS_COMPILE works. Delete tarball reference.

25. By Michael Hope

Added a note on cross running.

24. By Michael Hope

Remove the extra call when building to prevent thlite related build
errors.
Add an explicit NOTPARALLEL to this level. Let the invoking -jx pass
through to the sub makes. Run tests at -j1.

23. By Michael Hope

Add LDADD with -lm and -lrt to the end of the linker command line.
Change THOBJS for THLIB in the target dependancies to fix an error
where THLIB hasn't been generated yet.

22. By Michael Hope

Add documentation and a wrapper for cross compiling and running over SSH.

21. By Michael Hope

Switch to high resolution timers. Remove a lot of the cruft from copying the example harness.

20. By Michael Hope

Change a left over reference to x86 to linux32l

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file '.bzrignore'
2--- .bzrignore 1970-01-01 00:00:00 +0000
3+++ .bzrignore 2013-10-07 11:04:13 +0000
4@@ -0,0 +1,5 @@
5+automotive/gcc
6+telecom/gcc
7+*.log
8+consumer/gcc
9+th/gcc/harness.mak
10
11=== added file 'GNUmakefile'
12--- GNUmakefile 1970-01-01 00:00:00 +0000
13+++ GNUmakefile 2013-10-07 11:04:13 +0000
14@@ -0,0 +1,97 @@
15+# Linaro specific Makefile that overrides some of the standard EEMBC
16+# targets.
17+#
18+# Uses GNU make's search rules to appear before the standard EEMBC
19+# makefile.
20+#
21+
22+# Cross compiler prefix such as arm-linux-gnueabi-
23+CROSS_COMPILE ?=
24+
25+# Use gcc instead of /usr/bin/gcc so that you can put your new
26+# compiler in the path. Also consider running 'make
27+# CC=/path/to/your/gcc'
28+CC = $(CROSS_COMPILE)gcc
29+# Use the same GCC as the linker driver
30+LD = $(CC)
31+
32+# How to run tests. By default, all tests are run natively. Try
33+# 'RUN="$PWD/sshrun hostname"' to use SSH to run tests on $hostname.
34+# Use a separate `ssh -M` session to speed things up.
35+RUN ?=
36+
37+# Default platform is a Linux 32 bit little endian host with
38+# iterations that give a ~10 s run on a Cortex-A9
39+PLATFORM ?= linux32l
40+
41+# Only build for GCC, not VC
42+TOOLCHAIN ?= gcc
43+
44+# Default configuration is -O3 with the vectoriser. Take the tuning
45+# and architecture from the compiler itself
46+COMPILER_FLAGS ?= -O3 -DNDEBUG
47+# LTO and similar need to pass through to the linker
48+LINKER_FLAGS ?= $(COMPILER_FLAGS)
49+
50+# All of the apps to check if they exist
51+APPS ?= 8_16-bit automotive consumer networking office telecom voip
52+VER ?=
53+
54+# Allow local customisation
55+-include local.mk
56+
57+# Nothing to change beneath here
58+
59+ROOT = ..
60+TCDIR = util/make
61+# All of the 'dirs.mak' files from all possible apps
62+DIRS = $(wildcard $(APPS:%=%/dirs*.mak)))
63+# All of the apps that are present
64+PRESENT = $(sort $(subst /,,$(dir $(DIRS))))
65+
66+# Build and run the suite
67+all: build rerun
68+
69+# Do a complete PGO build including the instrument build, run, and
70+# final build. Always starts from clean.
71+pgo-build:
72+ $(MAKE) clean
73+ $(MAKE) build PROFILE_FLAGS="-fprofile-generate"
74+ $(MAKE) rerun
75+ $(MAKE) clean
76+ $(MAKE) build PROFILE_FLAGS="-fprofile-use"
77+
78+build: $(PRESENT:%=build-%)
79+
80+build-%:
81+ $(MAKE) -C $* TCDIR=$(ROOT)/$(TCDIR) VER=$(VER) \
82+ CC="$(CC)" \
83+ LD="$(LD)" \
84+ PLATFORM=$(PLATFORM) \
85+ TOOLCHAIN=$(TOOLCHAIN) \
86+ COMPILER_FLAGS="$(COMPILER_FLAGS) $(PROFILE_FLAGS)" \
87+ LINKER_FLAGS="$(LINKER_FLAGS) $(PROFILE_FLAGS)" \
88+ targets
89+
90+rerun: $(PRESENT:%=rerun-%)
91+
92+rerun-%: build-%
93+ $(MAKE) -C $* TCDIR=$(ROOT)/$(TCDIR) VER=$(VER) \
94+ CC="$(CC)" \
95+ LD="$(LD)" \
96+ PLATFORM=$(PLATFORM) \
97+ TOOLCHAIN=$(TOOLCHAIN) \
98+ COMPILER_FLAGS="$(COMPILER_FLAGS) $(PROFILE_FLAGS)" \
99+ LINKER_FLAGS="$(LINKER_FLAGS) $(PROFILE_FLAGS)" \
100+ RUN="$(RUN)" \
101+ -j1 \
102+ rerun
103+
104+clean:
105+ $(MAKE) -f makefile clean
106+
107+# Make a tarball archive of this repo
108+archive:
109+ bzr export ../eembc-linaro-v1+bzr$(shell bzr revno).tar.bz2 --root=eembc-linaro-v1+bzr$(shell bzr revno)
110+
111+.NOTPARALLEL:
112
113=== added file 'README.linaro'
114--- README.linaro 1970-01-01 00:00:00 +0000
115+++ README.linaro 2013-10-07 11:04:13 +0000
116@@ -0,0 +1,54 @@
117+EEMBC for Linaro
118+================
119+Michael Hope <michael.hope@linaro.org> 2011
120+
121+This directory contains all of the EEMBC v1 benchmarks that Linaro has
122+licenses for along with a good set of iterations and helper scripts to
123+make running the benchmarks easier.
124+
125+All benchmarks were calibrated on a PandaBoard against
126+gcc-linaro-4.5-2011.05 at `-O3 -mfpu=neon`. The iterations in
127+foo/iterationslinux32l.mak are set for a 10 s run on such a board.
128+
129+The Linaro specific rules are stored in `GNUmakefile`. GNU make will
130+choose this over the standard EEMBC makefile.
131+
132+Usage
133+-----
134+`make`:
135+ Build and run all of the benchmarks, summarising to ./gcc_*.log
136+
137+`make build`:
138+ Build all of the benchmarks in parallel
139+
140+`make rerun`:
141+ Re-run all of the benchmarks without rebuilding, summarising to ./gcc_*.log
142+
143+You can also build or run individual benchmarks using `make build-foo`
144+or `make rerun-foo` where `foo` is the benchmark name such as
145+automotive, consumer, or telecom. Note that the results for an
146+individual benchmark are saved as foo/gcc_*.log and not summarised to
147+the top level directory.
148+
149+Cross-running
150+-------------
151+make CROSS_COMPILE=arm-linux-gnueabi- RUN="$PWD/sshrun toolchain@ursa3"
152+
153+Customising
154+-----------
155+See `GNUmakefile`. You might want to set `CC`, `COMPILER_FLAGS`, or
156+`APPS`. Set these from the command line using:
157+
158+ `make COMPILER_FLAGS="-Os -mtune=cortex-a5"`
159+
160+or by creating a file called `local.mk` and adding:
161+
162+ `COMPILER_FLAGS = -Os -mtune=cortex-a5`
163+
164+References
165+----------
166+These files are stored in a bzr repository at:
167+ bzr+ssh://people.linaro.org/~toolchain/public_html/restricted/repos/eembc-linaro-v1
168+
169+The licenses are documented at:
170+ https://wiki.linaro.org/Internal/ToolChain
171
172=== added directory 'automotive'
173=== added directory 'automotive/a2time01'
174=== added file 'automotive/a2time01/algo.h'
175--- automotive/a2time01/algo.h 1970-01-01 00:00:00 +0000
176+++ automotive/a2time01/algo.h 2013-10-07 11:04:13 +0000
177@@ -0,0 +1,166 @@
178+/*==============================================================================
179+ *$RCSfile: algo.h,v $
180+ *
181+ * DESC : Angle-to-Time Conversion - a2time00
182+ *
183+ * AUTHOR : dt
184+ *
185+ * EEMBC : Automotive Subcommittee
186+ *
187+ * CVS : $Revision: 1.2 $
188+ * $Date: 2002/04/19 18:31:37 $
189+ * $Author: rick $
190+ * $Source: d:/cvs/eembc2/automotive/a2time01/algo.h,v $
191+ *
192+ * NOTE :
193+ *
194+ *------------------------------------------------------------------------------
195+ *
196+ * HISTORY :
197+ *
198+ * $Log: algo.h,v $
199+ * Revision 1.2 2002/04/19 18:31:37 rick
200+ * Bug #146: global tablecount uninitialized
201+ *
202+ *
203+ *------------------------------------------------------------------------------
204+ * Copyright (c) 1998-2002 by the EDN Embedded Microprocessor
205+ * Benchmark Consortium (EEMBC), Inc.
206+ *
207+ * All Rights Reserved. This is licensed program product and
208+ * is owned by EEMBC. The Licensee understands and agrees that the
209+ * Benchmarks licensed by EEMBC hereunder (including methods or concepts
210+ * utilized therein) contain certain information that is confidential
211+ * and proprietary which the Licensee expressly agrees to retain in the
212+ * strictest confidence and to use only in conjunction with the Benchmarks
213+ * pursuant to the terms of this Agreement. The Licensee further agrees
214+ * to keep the source code and all related documentation confidential and
215+ * not to disclose such source code and/or related documentation to any
216+ * third party. The Licensee and any READER of this code is subject to
217+ * either the EEMBC Member License Agreement and/or the EEMBC Licensee
218+ * Agreement.
219+ * TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, EEMBC DISCLAIMS ALL
220+ * WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
221+ * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR
222+ * PURPOSE, WITH REGARD TO THE BENCHMARKS AND THE ACCOMPANYING
223+ * DOCUMENTATION. LICENSEE ACKNOWLEDGES AND AGREES THAT THERE ARE NO
224+ * WARRANTIES, GUARANTIES, CONDITIONS, COVENANTS, OR REPRESENTATIONS BY
225+ * EEMBC AS TO MARKETABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR OTHER
226+ * ATTRIBUTES, WHETHER EXPRESS OR IMPLIED (IN LAW OR IN FACT), ORAL OR
227+ * WRITTEN.
228+ *
229+ * Licensee hereby agrees by accessing this source code that all benchmark
230+ * scores related to this code must be certified by ECL prior to publication
231+ * in any media, form, distribution, or other means of conveyance of
232+ * information subject to the terms of the EEMBC Member License Agreement
233+ * and/or EEMBC Licensee Agreement.
234+ *
235+ * Other Copyright Notice (if any):
236+ *
237+ * For conditions of distribution and use, see the accompanying README file.
238+ * ===========================================================================*/
239+
240+#ifndef __ALGO_H
241+#define __ALGO_H
242+
243+/*******************************************************************************
244+ Includes (thlib includes eembc_dt.h)
245+*******************************************************************************/
246+
247+#include "thlib.h"
248+#include <stdio.h>
249+#include <stdlib.h>
250+#include <string.h>
251+
252+/* Compilation switches to be defined( or not )based on application follow */
253+
254+/* Define (=1) when compiling for DOUBLE variables */
255+#define DATA_SIZE 1
256+/* ..or( =0 )when compiling for FLOAT variables */
257+#if DATA_SIZE == 0 /* SHORT variables */
258+typedef n_short varsize ; /* Data and variables are 16 bits */
259+#define MAX_VARIABLE 0x7FFF /* Must match sim. real-time ctr in test data */
260+#else /* Else, LONG variables */
261+typedef n_long varsize; /* Data and variables are 32 bits */
262+#define MAX_VARIABLE 0x7FFF /* Must match sim. real-time ctr in test data */
263+#endif /* DATA_SIZE */
264+
265+#define RAM_OUT 0 /* Define (=1)to direct debug text to RAM file */
266+ /* or( =0 )to direct debug text to console */
267+
268+/*******************************************************************************
269+ Defines
270+*******************************************************************************/
271+
272+#define false 0
273+#define true !false
274+
275+#if (BMDEBUG && RAM_OUT == 1) /* Debug buffer size == 32K */
276+#define MAX_FILESIZE 8192 /* Maximum size of output file */
277+#else
278+#define MAX_FILESIZE 256 /* Maximum size of output file */
279+#endif
280+#define NUM_TESTS 500 /* Number of sets of input test data stimuli */
281+#define VAR_COUNT 1 /* Number of variables which must be allocated */
282+#define HEADER_SIZE 100 /* Approx size of text title and header messages */
283+
284+#define CYLINDERS 8 /* We're simulating an eight cylinder engine */
285+#define TENTH_DEGREES 3600 /* Number of 1/10-degrees in a circle */
286+
287+/* Cylinder #1 firing angle (*10) */
288+#define FIRE1_ANGLE (TENTH_DEGREES/CYLINDERS*1)
289+/* Cylinder #2 firing angle (*10) */
290+#define FIRE2_ANGLE (TENTH_DEGREES/CYLINDERS*2)
291+/* Cylinder #3 firing angle (*10) */
292+#define FIRE3_ANGLE (TENTH_DEGREES/CYLINDERS*3)
293+/* Cylinder #4 firing angle (*10) */
294+#define FIRE4_ANGLE (TENTH_DEGREES/CYLINDERS*4)
295+/* Cylinder #5 firing angle (*10) */
296+#define FIRE5_ANGLE (TENTH_DEGREES/CYLINDERS*5)
297+/* Cylinder #6 firing angle (*10) */
298+#define FIRE6_ANGLE (TENTH_DEGREES/CYLINDERS*6)
299+/* Cylinder #7 firing angle (*10) */
300+#define FIRE7_ANGLE (TENTH_DEGREES/CYLINDERS*7)
301+/* Cylinder #8 firing angle (*10) */
302+#define FIRE8_ANGLE (TENTH_DEGREES/CYLINDERS*8)
303+
304+#define CYL1 1 /* Cylinder #1 firing window */
305+#define CYL2 2 /* Cylinder #2 firing window */
306+#define CYL3 3 /* Cylinder #3 firing window */
307+#define CYL4 4 /* Cylinder #4 firing window */
308+#define CYL5 5 /* Cylinder #5 firing window */
309+#define CYL6 6 /* Cylinder #6 firing window */
310+#define CYL7 7 /* Cylinder #7 firing window */
311+#define CYL8 8 /* Cylinder #8 firing window */
312+
313+#define TDC_TEETH 2 /* Number of missing teeth (=1) at TDC */
314+#define TDC_MARGIN 0.9 /* Discrimination window for TDC teeth */
315+#define NUM_TEETH 60 /* Number of teeth on tonewheel */
316+
317+/* Arbitrary scale factor for computing internal RPM */
318+#define RPM_SCALE_FACTOR 3600000
319+
320+/*******************************************************************************
321+ Global Variables
322+*******************************************************************************/
323+
324+#ifndef ALGO_GLOBALS /* Don't define these twice! */
325+
326+extern n_int tableCount ; /* Number of passes through table */
327+extern varsize angleCounter ; /* Current 'angleCounter' pulled from data */
328+extern varsize *inpAngleCount ; /* Array of 'angleCounter' test data values */
329+extern varsize tonewheelTeeth ; /* Number of teeth on the tonewheel */
330+/*extern n_int isTopDeadCenter ; * TRUE/FALSE flag when TDC occurs */
331+
332+#endif /* ALGO_GLOBALS */
333+
334+/*******************************************************************************
335+ Function Prototypes
336+*******************************************************************************/
337+
338+n_int GetTestData( n_void ) ;
339+n_int GetInputValues( n_void ) ;
340+n_void DebugOut( n_char * ) ;
341+n_void WriteOut( varsize ) ;
342+
343+#endif /* __ALGO_H */
344
345=== added file 'automotive/a2time01/algotst.c'
346--- automotive/a2time01/algotst.c 1970-01-01 00:00:00 +0000
347+++ automotive/a2time01/algotst.c 2013-10-07 11:04:13 +0000
348@@ -0,0 +1,1140 @@
349+/*==============================================================================
350+ *$RCSfile: algotst.c,v $
351+ *
352+ * DESC : Angle-to-Time Conversion - a2time00
353+ *
354+ * AUTHOR : dt
355+ *
356+ * EEMBC : Automotive Subcommittee
357+ *
358+ * CVS : $Revision: 1.3 $
359+ * $Date: 2002/04/19 18:31:37 $
360+ * $Author: rick $
361+ * $Source: d:/cvs/eembc2/automotive/a2time01/algotst.c,v $
362+ *
363+ * NOTE :
364+ *
365+ *------------------------------------------------------------------------------
366+ *
367+ * HISTORY :
368+ *
369+ * $Log: algotst.c,v $
370+ * Revision 1.3 2002/04/19 18:31:37 rick
371+ * Bug #146: global tablecount uninitialized
372+ *
373+ *
374+ *------------------------------------------------------------------------------
375+ * Copyright (c) 1998-2002 by the EDN Embedded Microprocessor
376+ * Benchmark Consortium (EEMBC), Inc.
377+ *
378+ * All Rights Reserved. This is licensed program product and
379+ * is owned by EEMBC. The Licensee understands and agrees that the
380+ * Benchmarks licensed by EEMBC hereunder (including methods or concepts
381+ * utilized therein) contain certain information that is confidential
382+ * and proprietary which the Licensee expressly agrees to retain in the
383+ * strictest confidence and to use only in conjunction with the Benchmarks
384+ * pursuant to the terms of this Agreement. The Licensee further agrees
385+ * to keep the source code and all related documentation confidential and
386+ * not to disclose such source code and/or related documentation to any
387+ * third party. The Licensee and any READER of this code is subject to
388+ * either the EEMBC Member License Agreement and/or the EEMBC Licensee
389+ * Agreement.
390+ * TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, EEMBC DISCLAIMS ALL
391+ * WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
392+ * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR
393+ * PURPOSE, WITH REGARD TO THE BENCHMARKS AND THE ACCOMPANYING
394+ * DOCUMENTATION. LICENSEE ACKNOWLEDGES AND AGREES THAT THERE ARE NO
395+ * WARRANTIES, GUARANTIES, CONDITIONS, COVENANTS, OR REPRESENTATIONS BY
396+ * EEMBC AS TO MARKETABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR OTHER
397+ * ATTRIBUTES, WHETHER EXPRESS OR IMPLIED (IN LAW OR IN FACT), ORAL OR
398+ * WRITTEN.
399+ *
400+ * Licensee hereby agrees by accessing this source code that all benchmark
401+ * scores related to this code must be certified by ECL prior to publication
402+ * in any media, form, distribution, or other means of conveyance of
403+ * information subject to the terms of the EEMBC Member License Agreement
404+ * and/or EEMBC Licensee Agreement.
405+ *
406+ * Other Copyright Notice (if any):
407+ *
408+ * For conditions of distribution and use, see the accompanying README file.
409+ * ===========================================================================*/
410+
411+/*******************************************************************************
412+ Includes
413+*******************************************************************************/
414+
415+#include "algo.h"
416+
417+/* DECLARATIONS */
418+
419+/*
420+ * The following test data represents values read from a realtime clock
421+ * which is captured( in hardware )on each rising edge of the ring-gear
422+ * tooth. The counter is expected to roll over at maximum count, and
423+ * it is presumed to be an "up" counter.
424+ *
425+ */
426+
427+const varsize inpAngleROM[] =
428+{
429+ 123,
430+
431+ 456,
432+
433+ 796,
434+
435+ 1143,
436+
437+ 1497,
438+
439+ 1858,
440+
441+ 2226,
442+
443+ 2601,
444+
445+ 3358,
446+
447+ 3743,
448+
449+ 4136,
450+
451+ 4535,
452+
453+ 4942,
454+
455+ 5355,
456+
457+ 5776,
458+
459+ 6203,
460+
461+ 6638,
462+
463+ 7079,
464+
465+ 7528,
466+
467+ 7983,
468+
469+ 8446,
470+
471+ 8915,
472+
473+ 9392,
474+
475+ 9875,
476+
477+ 10366,
478+
479+ 10863,
480+
481+ 11368,
482+
483+ 11879,
484+
485+ 12398,
486+
487+ 12923,
488+
489+ 13456,
490+
491+ 13995,
492+
493+ 14542,
494+
495+ 15095,
496+
497+ 15656,
498+
499+ 16223,
500+
501+ 16798,
502+
503+ 17379,
504+
505+ 17968,
506+
507+ 18563,
508+
509+ 19166,
510+
511+ 19775,
512+
513+ 20392,
514+
515+ 21015,
516+
517+ 21646,
518+
519+ 22283,
520+
521+ 22928,
522+
523+ 23579,
524+
525+ 24238,
526+
527+ 24903,
528+
529+ 25576,
530+
531+ 26255,
532+
533+ 26942,
534+
535+ 27635,
536+
537+ 28336,
538+
539+ 29043,
540+
541+ 29758,
542+
543+ 30479,
544+
545+ 31208,
546+
547+ 31943,
548+
549+ 32686,
550+
551+ 668,
552+
553+ 1425,
554+
555+ 2189,
556+
557+ 2960,
558+
559+ 3738,
560+
561+ 4523,
562+
563+ 5315,
564+
565+ 6906,
566+
567+ 7708,
568+
569+ 8518,
570+
571+ 9334,
572+
573+ 10158,
574+
575+ 10988,
576+
577+ 11826,
578+
579+ 12670,
580+
581+ 13522,
582+
583+ 14380,
584+
585+ 15246,
586+
587+ 16118,
588+
589+ 16998,
590+
591+ 17884,
592+
593+ 18778,
594+
595+ 19678,
596+
597+ 20586,
598+
599+ 21500,
600+
601+ 22422,
602+
603+ 23350,
604+
605+ 24286,
606+
607+ 25228,
608+
609+ 26178,
610+
611+ 27134,
612+
613+ 28098,
614+
615+ 29068,
616+
617+ 30046,
618+
619+ 31030,
620+
621+ 32022,
622+
623+ 250,
624+
625+ 1253,
626+
627+ 2263,
628+
629+ 3280,
630+
631+ 4304,
632+
633+ 5335,
634+
635+ 6373,
636+
637+ 7418,
638+
639+ 8470,
640+
641+ 9529,
642+
643+ 10595,
644+
645+ 11668,
646+
647+ 12748,
648+
649+ 13835,
650+
651+ 14929,
652+
653+ 16030,
654+
655+ 17138,
656+
657+ 18253,
658+
659+ 19375,
660+
661+ 20504,
662+
663+ 21640,
664+
665+ 22783,
666+
667+ 23933,
668+
669+ 25090,
670+
671+ 26254,
672+
673+ 27425,
674+
675+ 28603,
676+
677+ 29788,
678+
679+ 30980,
680+
681+ 32179,
682+
683+ 620,
684+
685+ 3045,
686+
687+ 4264,
688+
689+ 5491,
690+
691+ 6724,
692+
693+ 7965,
694+
695+ 9212,
696+
697+ 10467,
698+
699+ 11728,
700+
701+ 12997,
702+
703+ 14272,
704+
705+ 15555,
706+
707+ 16844,
708+
709+ 18141,
710+
711+ 19444,
712+
713+ 20755,
714+
715+ 22072,
716+
717+ 23397,
718+
719+ 24728,
720+
721+ 26067,
722+
723+ 27412,
724+
725+ 28765,
726+
727+ 30124,
728+
729+ 31491,
730+
731+ 100,
732+
733+ 1484,
734+
735+ 2875,
736+
737+ 4273,
738+
739+ 5678,
740+
741+ 7090,
742+
743+ 8509,
744+
745+ 9935,
746+
747+ 11368,
748+
749+ 12808,
750+
751+ 14255,
752+
753+ 15709,
754+
755+ 17170,
756+
757+ 18638,
758+
759+ 20113,
760+
761+ 21595,
762+
763+ 23084,
764+
765+ 24580,
766+
767+ 26083,
768+
769+ 27593,
770+
771+ 29110,
772+
773+ 30634,
774+
775+ 32165,
776+
777+ 930,
778+
779+ 2470,
780+
781+ 4017,
782+
783+ 5571,
784+
785+ 7132,
786+
787+ 8700,
788+
789+ 10275,
790+
791+ 11857,
792+
793+ 13446,
794+
795+ 15042,
796+
797+ 16645,
798+
799+ 18255,
800+
801+ 19872,
802+
803+ 21496,
804+
805+ 24751,
806+
807+ 26385,
808+
809+ 28027,
810+
811+ 29675,
812+
813+ 31331,
814+
815+ 230,
816+
817+ 1904,
818+
819+ 3585,
820+
821+ 5273,
822+
823+ 6968,
824+
825+ 8670,
826+
827+ 10379,
828+
829+ 12095,
830+
831+ 13818,
832+
833+ 15548,
834+
835+ 17285,
836+
837+ 19029,
838+
839+ 20780,
840+
841+ 22538,
842+
843+ 24303,
844+
845+ 26075,
846+
847+ 27854,
848+
849+ 29640,
850+
851+ 31433,
852+
853+ 460,
854+
855+ 2262,
856+
857+ 4071,
858+
859+ 5887,
860+
861+ 7710,
862+
863+ 9540,
864+
865+ 11377,
866+
867+ 13221,
868+
869+ 15072,
870+
871+ 16930,
872+
873+ 18795,
874+
875+ 20667,
876+
877+ 22546,
878+
879+ 24432,
880+
881+ 26325,
882+
883+ 28225,
884+
885+ 30132,
886+
887+ 32046,
888+
889+ 1200,
890+
891+ 3129,
892+
893+ 5065,
894+
895+ 7008,
896+
897+ 8958,
898+
899+ 10915,
900+
901+ 12879,
902+
903+ 14850,
904+
905+ 16828,
906+
907+ 18813,
908+
909+ 20805,
910+
911+ 22804,
912+
913+ 24810,
914+
915+ 26823,
916+
917+ 28843,
918+
919+ 30870,
920+
921+ 130,
922+
923+ 2165,
924+
925+ 6242,
926+
927+ 8287,
928+
929+ 10340,
930+
931+ 12399,
932+
933+ 14466,
934+
935+ 16539,
936+
937+ 18620,
938+
939+ 20707,
940+
941+ 22802,
942+
943+ 24903,
944+
945+ 27012,
946+
947+ 29127,
948+
949+ 31250,
950+
951+ 610,
952+
953+ 2745,
954+
955+ 4887,
956+
957+ 7036,
958+
959+ 9192,
960+
961+ 11355,
962+
963+ 13525,
964+
965+ 15702,
966+
967+ 17886,
968+
969+ 20077,
970+
971+ 22275,
972+
973+ 24480,
974+
975+ 26692,
976+
977+ 28911,
978+
979+ 31137,
980+
981+ 600,
982+
983+ 2838,
984+
985+ 5083,
986+
987+ 7335,
988+
989+ 9594,
990+
991+ 11860,
992+
993+ 14133,
994+
995+ 16413,
996+
997+ 18700,
998+
999+ 20994,
1000+
1001+ 23295,
1002+
1003+ 25603,
1004+
1005+ 27918,
1006+
1007+ 30240,
1008+
1009+ 32569,
1010+
1011+ 2140,
1012+
1013+ 4486,
1014+
1015+ 6812,
1016+
1017+ 9118,
1018+
1019+ 11404,
1020+
1021+ 13670,
1022+
1023+ 15916,
1024+
1025+ 18142,
1026+
1027+ 20348,
1028+
1029+ 22534,
1030+
1031+ 24700,
1032+
1033+ 26846,
1034+
1035+ 28972,
1036+
1037+ 31078,
1038+
1039+ 430,
1040+
1041+ 2530,
1042+
1043+ 4610,
1044+
1045+ 8777,
1046+
1047+ 10867,
1048+
1049+ 12938,
1050+
1051+ 14988,
1052+
1053+ 17019,
1054+
1055+ 19029,
1056+
1057+ 21020,
1058+
1059+ 22990,
1060+
1061+ 24941,
1062+
1063+ 26871,
1064+
1065+ 28782,
1066+
1067+ 30672,
1068+
1069+ 32543,
1070+
1071+ 1650,
1072+
1073+ 3505,
1074+
1075+ 5340,
1076+
1077+ 7155,
1078+
1079+ 8950,
1080+
1081+ 10725,
1082+
1083+ 12480,
1084+
1085+ 14215,
1086+
1087+ 15930,
1088+
1089+ 17625,
1090+
1091+ 19300,
1092+
1093+ 20955,
1094+
1095+ 22590,
1096+
1097+ 24205,
1098+
1099+ 25800,
1100+
1101+ 27375,
1102+
1103+ 28930,
1104+
1105+ 30465,
1106+
1107+ 31980,
1108+
1109+ 720,
1110+
1111+ 2208,
1112+
1113+ 3676,
1114+
1115+ 5124,
1116+
1117+ 6552,
1118+
1119+ 7960,
1120+
1121+ 9371,
1122+
1123+ 10785,
1124+
1125+ 12202,
1126+
1127+ 13622,
1128+
1129+ 15045,
1130+
1131+ 16471,
1132+
1133+ 17900,
1134+
1135+ 19332,
1136+
1137+ 20767,
1138+
1139+ 22205,
1140+
1141+ 23646,
1142+
1143+ 25090,
1144+
1145+ 26537,
1146+
1147+ 27987,
1148+
1149+ 29440,
1150+
1151+ 30896,
1152+
1153+ 32355,
1154+
1155+ 1050,
1156+
1157+ 2516,
1158+
1159+ 3985,
1160+
1161+ 5457,
1162+
1163+ 6932,
1164+
1165+ 9889,
1166+
1167+ 11374,
1168+
1169+ 12863,
1170+
1171+ 14354,
1172+
1173+ 15849,
1174+
1175+ 17346,
1176+
1177+ 18847,
1178+
1179+ 20350,
1180+
1181+ 21857,
1182+
1183+ 23366,
1184+
1185+ 24879,
1186+
1187+ 26394,
1188+
1189+ 27913,
1190+
1191+ 29434,
1192+
1193+ 30959,
1194+
1195+ 32486,
1196+
1197+ 1250,
1198+
1199+ 2784,
1200+
1201+ 4322,
1202+
1203+ 5862,
1204+
1205+ 7406,
1206+
1207+ 8952,
1208+
1209+ 10502,
1210+
1211+ 12054,
1212+
1213+ 13610,
1214+
1215+ 15168,
1216+
1217+ 16730,
1218+
1219+ 18294,
1220+
1221+ 19862,
1222+
1223+ 21432,
1224+
1225+ 23006,
1226+
1227+ 24582,
1228+
1229+ 26162,
1230+
1231+ 27744,
1232+
1233+ 29330,
1234+
1235+ 30918,
1236+
1237+ 32510,
1238+
1239+ 1340,
1240+
1241+ 2941,
1242+
1243+ 4545,
1244+
1245+ 6152,
1246+
1247+ 7762,
1248+
1249+ 9375,
1250+
1251+ 10991,
1252+
1253+ 12610,
1254+
1255+ 14232,
1256+
1257+ 15857,
1258+
1259+ 17485,
1260+
1261+ 19116,
1262+
1263+ 20750,
1264+
1265+ 22387,
1266+
1267+ 24027,
1268+
1269+ 25670,
1270+
1271+ 27316,
1272+
1273+ 28965,
1274+
1275+ 30617,
1276+
1277+ 32272,
1278+
1279+ 1160,
1280+
1281+ 2819,
1282+
1283+ 4481,
1284+
1285+ 7812,
1286+
1287+ 9484,
1288+
1289+ 11160,
1290+
1291+ 12838,
1292+
1293+ 14520,
1294+
1295+ 16204,
1296+
1297+ 17892,
1298+
1299+ 19582,
1300+
1301+ 21276,
1302+
1303+ 22972,
1304+
1305+ 24672,
1306+
1307+ 26374,
1308+
1309+ 28080,
1310+
1311+ 29788,
1312+
1313+ 31500,
1314+
1315+ 450,
1316+
1317+ 2171,
1318+
1319+ 3895,
1320+
1321+ 5622,
1322+
1323+ 7352,
1324+
1325+ 9085,
1326+
1327+ 10821,
1328+
1329+ 12560,
1330+
1331+ 14302,
1332+
1333+ 16047,
1334+
1335+ 17795,
1336+
1337+ 19546,
1338+
1339+ 21300,
1340+
1341+ 23057,
1342+
1343+ 24817,
1344+
1345+ 26580,
1346+
1347+ 28346,
1348+
1349+ 30115,
1350+
1351+ 31887,
1352+
1353+ 900,
1354+
1355+ 2684,
1356+
1357+ 4471,
1358+
1359+ 6261,
1360+
1361+ 8054,
1362+
1363+ 9850,
1364+
1365+ 11649,
1366+
1367+ 13451,
1368+
1369+ 15256,
1370+
1371+ 17064,
1372+
1373+ 18875,
1374+
1375+ 20689,
1376+
1377+ 22503,
1378+
1379+ 24317,
1380+
1381+ 26131,
1382+
1383+ 27945,
1384+
1385+ 29759,
1386+
1387+ 31573,
1388+
1389+ 620,
1390+
1391+ 2435,
1392+
1393+ 4250,
1394+
1395+ 6065,
1396+
1397+ 7880,
1398+
1399+ 9695,
1400+
1401+ 11510,
1402+
1403+ 13325,
1404+
1405+ 16962,
1406+
1407+ 18787,
1408+
1409+ 20613,
1410+
1411+ 22438,
1412+
1413+ 24264,
1414+
1415+ 26089,
1416+
1417+ 27915,
1418+
1419+ 29740,
1420+
1421+ 31566,
1422+
1423+ 620,
1424+
1425+ 2442,
1426+
1427+ 4264
1428+
1429+} ; /* End of test values : inpAngleROM[] */
1430+
1431+/*******************************************************************************
1432+ Functions
1433+*******************************************************************************/
1434+
1435+/*
1436+* Function : GetTestData
1437+*
1438+* Builds the table of input data which represents 'angle' input
1439+* from the mag input on the ring gear. This is the "real world" data stream which
1440+* drives the algorithm. This data is installed in RAM prior to execution of the
1441+* algorithm.
1442+*
1443+*/
1444+n_int
1445+GetTestData( n_void )
1446+{
1447+ n_int i ;
1448+
1449+ tonewheelTeeth = NUM_TEETH ;
1450+ inpAngleCount = (varsize *)th_malloc( ( NUM_TESTS + 1 ) * sizeof(varsize) ) ;
1451+
1452+ if( inpAngleCount == NULL )
1453+ {
1454+ return false ;
1455+ }
1456+
1457+ /* Copy the test values from ROM to RAM */
1458+ for( i = 0 ; i < NUM_TESTS ; i++ )
1459+ {
1460+ inpAngleCount[i] = inpAngleROM[i] ;
1461+ }
1462+
1463+ return true ;
1464+} /* End of function 'GetTestData' */
1465+
1466+/*
1467+* Function : GetInputValues
1468+*
1469+* On each pass of the table lookup, a value must be input for 'angleCount.
1470+* Each time this function is called, the next input value is
1471+* pulled from the table in RAM. The table wraps around, so that input data is
1472+* continuous. A flag is returned TRUE whenever the table wraps around.
1473+*
1474+*/
1475+
1476+n_int
1477+GetInputValues( n_void )
1478+{
1479+ angleCounter = inpAngleCount[tableCount] ;
1480+
1481+ if( ++tableCount < NUM_TESTS )
1482+ {
1483+ return false ;
1484+ }
1485+
1486+ tableCount = 0 ;
1487+ return true ;
1488+} /* End of function 'GetInputValues' */
1489
1490=== added file 'automotive/a2time01/bmark.c'
1491--- automotive/a2time01/bmark.c 1970-01-01 00:00:00 +0000
1492+++ automotive/a2time01/bmark.c 2013-10-07 11:04:13 +0000
1493@@ -0,0 +1,1076 @@
1494+/*==============================================================================
1495+ *$RCSfile: bmark.c,v $
1496+ *
1497+ * DESC : This file contains the Test Main and other TH support functions
1498+ *
1499+ * AUTHOR : ARM, Ltd., ECL, LLP
1500+ *
1501+ * EEMBC : Automotive Subcommittee
1502+ *
1503+ * CVS : $Revision: 1.7 $
1504+ * $Date: 2002/08/07 22:20:25 $
1505+ * $Author: rick $
1506+ * $Source: d:/cvs/eembc2/automotive/a2time01/bmark.c,v $
1507+ *
1508+ * NOTE :
1509+ *
1510+ *------------------------------------------------------------------------------
1511+ *
1512+ * HISTORY :
1513+ *
1514+ * $Log: bmark.c,v $
1515+ * Revision 1.7 2002/08/07 22:20:25 rick
1516+ * Add NI CRC to TH Regular
1517+ *
1518+ * Revision 1.6 2002/07/22 16:09:49 rick
1519+ * Fix iteration dependant NI CRC
1520+ *
1521+ * Revision 1.5 2002/05/29 22:24:45 rick
1522+ * Set recommended iterations with make
1523+ *
1524+ * Revision 1.4 2002/04/25 20:10:43 rick
1525+ * sprintf to th_sprintf
1526+ *
1527+ * Revision 1.3 2002/04/19 18:31:37 rick
1528+ * Bug #146: global tablecount uninitialized
1529+ *
1530+ * Revision 1.2 2002/03/08 00:58:51 rick
1531+ * Repair Iterations and CRC ifdef logic
1532+ *
1533+ * Revision 1.4 2002/02/25 17:15:31 rick
1534+ * Add comment blocks, fix atime th_report call.
1535+ *
1536+ *
1537+ *------------------------------------------------------------------------------
1538+ * Copyright (c) 1998-2002 by the EDN Embedded Microprocessor
1539+ * Benchmark Consortium (EEMBC), Inc.
1540+ *
1541+ * All Rights Reserved. This is licensed program product and
1542+ * is owned by EEMBC. The Licensee understands and agrees that the
1543+ * Benchmarks licensed by EEMBC hereunder (including methods or concepts
1544+ * utilized therein) contain certain information that is confidential
1545+ * and proprietary which the Licensee expressly agrees to retain in the
1546+ * strictest confidence and to use only in conjunction with the Benchmarks
1547+ * pursuant to the terms of this Agreement. The Licensee further agrees
1548+ * to keep the source code and all related documentation confidential and
1549+ * not to disclose such source code and/or related documentation to any
1550+ * third party. The Licensee and any READER of this code is subject to
1551+ * either the EEMBC Member License Agreement and/or the EEMBC Licensee
1552+ * Agreement.
1553+ * TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, EEMBC DISCLAIMS ALL
1554+ * WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
1555+ * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR
1556+ * PURPOSE, WITH REGARD TO THE BENCHMARKS AND THE ACCOMPANYING
1557+ * DOCUMENTATION. LICENSEE ACKNOWLEDGES AND AGREES THAT THERE ARE NO
1558+ * WARRANTIES, GUARANTIES, CONDITIONS, COVENANTS, OR REPRESENTATIONS BY
1559+ * EEMBC AS TO MARKETABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR OTHER
1560+ * ATTRIBUTES, WHETHER EXPRESS OR IMPLIED (IN LAW OR IN FACT), ORAL OR
1561+ * WRITTEN.
1562+ *
1563+ * Licensee hereby agrees by accessing this source code that all benchmark
1564+ * scores related to this code must be certified by ECL prior to publication
1565+ * in any media, form, distribution, or other means of conveyance of
1566+ * information subject to the terms of the EEMBC Member License Agreement
1567+ * and/or EEMBC Licensee Agreement.
1568+ *
1569+ * Other Copyright Notice (if any):
1570+ *
1571+ * For conditions of distribution and use, see the accompanying README file.
1572+ * ===========================================================================*/
1573+
1574+#define ALGO_GLOBALS 1 /* Next time, we'll skip these */
1575+#include "algo.h"
1576+
1577+/* Estimate of allocation for NUM_TESTS*( debug test + 2 variables )*/
1578+#define T_BSIZE (MAX_FILESIZE+((NUM_TESTS+1)*VAR_COUNT*4))
1579+
1580+int t_run_test( size_t iterations, int argc, const char *argv[] ) ;
1581+int test_main( struct TCDef **tcdef, int argc, const char *argv[] ) ;
1582+
1583+/* Define iterations */
1584+#if !defined(ITERATIONS) || CRC_CHECK || ITERATIONS==DEFAULT
1585+#undef ITERATIONS
1586+#if CRC_CHECK
1587+#define ITERATIONS 50000 /* required iterations for crc */
1588+#else
1589+#define ITERATIONS 50000 /* recommended iterations for benchmark */
1590+#endif
1591+#endif
1592+
1593+/* Pre-caclculated CRC values */
1594+#if CRC_CHECK
1595+#define EXPECTED_CRC 0x0000
1596+#elif NON_INTRUSIVE_CRC_CHECK
1597+#define EXPECTED_CRC 0xc74a
1598+#else
1599+#define EXPECTED_CRC 0x0000
1600+#endif
1601+
1602+static TCDef the_tcdef =
1603+{
1604+ "AUT a2time01 ",
1605+ EEMBC_MEMBER_COMPANY,
1606+ EEMBC_PROCESSOR,
1607+ EEMBC_TARGET,
1608+ "Algorithm #2 -- Angle-To-Time Conversion V1.0E0 - a2time00",
1609+ TCDEF_REVISION,
1610+ NULL, /* Pointer to the next TCDef */
1611+ /* TH Version Number Required */
1612+ { EEMBC_TH_MAJOR, EEMBC_TH_MINOR, EEMBC_TH_STEP, EEMBC_TH_REVISION },
1613+ /* Target Hardware Version Number Required( make all zeros to ignore ) */
1614+ { 0, 0, 0, 0 },
1615+ /* The Version number of this Benchmark */
1616+ { 1, 0, 'E', 0 },
1617+ ITERATIONS,
1618+ &t_run_test,
1619+ &test_main,
1620+ NULL, /* There is no main funciton in this implimentation */
1621+ NULL /* There is no entry function in this implimentation */
1622+} ;
1623+
1624+n_int *RAMfile ; /* Pointer to test output RAM file */
1625+n_int *RAMfilePtr ; /* Pointer to position in output RAM file */
1626+n_int RAMfileSize ; /* Size of the debug output RAM file */
1627+n_int tableCount; /* Number of passes through table */
1628+n_int *RAMfileEOF; /* points to end of RAM file */
1629+n_int RAMfile_increment; /* difference between varsize and n_int */
1630+
1631+varsize angleCounter ; /* Current 'angleCounter' pulled from test data */
1632+varsize *inpAngleCount ; /* Array of 'angleCounter' test data values */
1633+varsize tonewheelTeeth ; /* Number of teeth on the tonewheel */
1634+
1635+/* >> IMPORTANT NOTE <<
1636+*
1637+* Since benchmarks can be entered( run )multiple times, the benchmark
1638+* MUST NOT depend on global data being initialized. E.g. it must
1639+* complelty initialize itself EVERY TIME its t_run_test()function
1640+* is called.
1641+*
1642+*/
1643+
1644+/*
1645+* FUNC : t_run_test
1646+*
1647+* DESC : called to run the test
1648+*
1649+* This function is called to start the test. It does not return
1650+* until after the test is completed( finished ). Note, th_finished()
1651+* and th_report_results()MUST be called before this function
1652+* returns if results are to be report. If these are not called
1653+* then no results will be reported for the test.
1654+*
1655+* NOTE : after this function returns, no other functions in the test
1656+* will be called. EG, returning from this function is equivelent
1657+* to returning from a main()or calling th_exit()
1658+*
1659+* RETURNS : Success if the test ran fine. If th_finished()and
1660+* th_report_results()were not called, then the test finished
1661+* successfully, but there were no results and the host will
1662+* not be able to measure the test's duration.
1663+*/
1664+
1665+int
1666+t_run_test( size_t iterations, int argc, const char *argv[] )
1667+{
1668+ size_t loop_cnt ;
1669+ THTestResults results ;
1670+
1671+#if BMDEBUG
1672+ char *szTitle =
1673+ "\nEEMBC Automotive/Industrial Subcommittee Benchmarks ( c )1998-1999\n"
1674+ "Algorithm 2 : Angle-to-Time Conversion Rev. 1.0E0 a2time00 \n" ;
1675+ char *szHeader =
1676+ "\n\n angle pulse tdc engine "
1677+ "tooth delta fire test\n"
1678+ " Count, DeltaT, TDC, Time, Speed, "
1679+ "Count, TimeAvg, Time counter\n" ;
1680+ char szDebug[100] ;
1681+#else
1682+ varsize i ;
1683+#endif /* BMDEBUG */
1684+
1685+ static n_char szDataSize[40] ;
1686+ n_int isTableLooped = false ; /* Input test data table looped */
1687+ varsize window ;
1688+ static varsize pulseDeltaTime1 ;
1689+ static varsize pulseDeltaTime2 ;
1690+ static varsize pulseDeltaTime3 ;
1691+ static varsize angle1 ;
1692+ static varsize angle2 ;
1693+ static varsize angle3 ;
1694+ static varsize angleCounterLast1 ;
1695+ static varsize angleCounterLast2 ;
1696+ static varsize angleCounterLast3 ;
1697+ static varsize toothCount1 ;
1698+ static varsize toothCount2 ;
1699+ static varsize toothCount3 ;
1700+ static varsize deltaTimeAccum1 ;
1701+ static varsize deltaTimeAccum2 ;
1702+ static varsize deltaTimeAccum3 ;
1703+ static varsize deltaTimeAvg1 ;
1704+ static varsize deltaTimeAvg2 ;
1705+ static varsize deltaTimeAvg3 ;
1706+ static varsize firingTime1 ;
1707+ static varsize firingTime2 ;
1708+ static varsize firingTime3 ;
1709+ static n_ulong tdcTime1 ;
1710+ static n_ulong tdcTime2 ;
1711+ static n_ulong tdcTime3 ;
1712+ static n_ulong engineSpeed1 ;
1713+ static n_ulong engineSpeed2 ;
1714+ static n_ulong engineSpeed3 ;
1715+ static n_ulong rotationTime1 ;
1716+ static n_ulong rotationTime2 ;
1717+ static n_ulong rotationTime3 ;
1718+ static n_int isTopDeadCenter1 ; /* TRUE/FALSE flag when TDC occurs */
1719+ static n_int isTopDeadCenter2 ; /* TRUE/FALSE flag when TDC occurs */
1720+ static n_int isTopDeadCenter3 ; /* TRUE/FALSE flag when TDC occurs */
1721+
1722+ /* Unused */
1723+ argc = argc ;
1724+ argv = argv ;
1725+
1726+ /*
1727+ * First, initialize the data structures we need for the test
1728+ * and allocate memory as needed. Report an error if we can't.
1729+ *
1730+ */
1731+
1732+ /* Variable initializations at t=0 */
1733+ toothCount1 = 0 ; /* Don't know which pulse we start on */
1734+ toothCount2 = 0 ;
1735+ toothCount3 = 0 ;
1736+ deltaTimeAccum1 = 0 ; /* ...and haven't accumulated for filter... */
1737+ deltaTimeAccum2 = 0 ;
1738+ deltaTimeAccum3 = 0 ;
1739+ deltaTimeAvg1 = 32767 ; /* ...and not gotten an average... */
1740+ deltaTimeAvg2 = 32767 ;
1741+ deltaTimeAvg3 = 32767 ;
1742+ tdcTime1 = 0 ; /* ...and don't know when TDC occurs */
1743+ tdcTime2 = 0 ;
1744+ tdcTime3 = 0 ;
1745+ angleCounterLast1 = 0 ;
1746+ angleCounterLast2 = 0 ;
1747+ angleCounterLast3 = 0 ;
1748+ engineSpeed1 = 0 ;
1749+ engineSpeed2 = 0 ;
1750+ engineSpeed3 = 0 ;
1751+ rotationTime1 = 0 ;
1752+ rotationTime2 = 0 ;
1753+ rotationTime3 = 0 ;
1754+ firingTime1 = 0 ;
1755+ firingTime2 = 0 ;
1756+ firingTime3 = 0 ;
1757+/* ALGO_GLOBALS */
1758+ tableCount = 0;
1759+ angleCounter = 0; /* Current 'angleCounter' pulled from data */
1760+ inpAngleCount = NULL; /* Array of 'angleCounter' test data values */
1761+ tonewheelTeeth = 0; /* Number of teeth on the tonewheel */
1762+
1763+ /* Set size of output file (1K) */
1764+ RAMfileSize = MAX_FILESIZE ;
1765+
1766+ /* Allocate some RAM for output file */
1767+ RAMfile = (n_int *)th_malloc( RAMfileSize * sizeof(n_int) + sizeof (varsize) ) ;
1768+ if ( RAMfile == NULL )
1769+ th_exit( THE_OUT_OF_MEMORY, "Cannot Allocate Memory %s:%d", __FILE__,__LINE__ );
1770+
1771+ /* align it to varsize boundary */
1772+ RAMfile = ((n_int *)ROUNDUP(RAMfile, sizeof (varsize) ));
1773+ RAMfilePtr = RAMfile; /* Point to beginning of test output file */
1774+ RAMfileEOF = RAMfile + RAMfileSize; /* should be OK ANSI C */
1775+
1776+ if (sizeof(varsize) > sizeof(n_int)) { /* this is a floating point benchmark! */
1777+ RAMfile_increment = sizeof(varsize) / sizeof(n_int);
1778+ if (sizeof(varsize) % sizeof(n_int)) RAMfile_increment += 1; /* should never happen, but ... */
1779+ }
1780+ else{
1781+ RAMfile_increment = 1;
1782+ }
1783+
1784+ /* Tell us the compiled data size */
1785+#if BMDEBUG
1786+ th_sprintf( szDataSize, "Data size = %s\n\n",
1787+ ( DATA_SIZE ? "LONG" : "SHORT" ) ) ;
1788+#else
1789+ szDataSize[0] = (n_char)( '0' + DATA_SIZE ) ;
1790+ szDataSize[1] = '\0' ;
1791+#endif /* BMDEBUG */
1792+
1793+ /* Initialize the test data -- stimuli for the algorithm. */
1794+ /* Allocate for the test input data table */
1795+ if( !GetTestData() )
1796+ {
1797+ th_exit( THE_OUT_OF_MEMORY, "Cannot Allocate Memory %s : %d",
1798+ __FILE__, __LINE__ ) ;
1799+ }
1800+
1801+ th_signal_start() ; /* Tell the host that the test has begun */
1802+
1803+#if BMDEBUG
1804+ DebugOut( szTitle ) ; /* Print the title message in RAM file */
1805+ DebugOut( szDataSize ) ; /* and the data size */
1806+ DebugOut( szHeader ) ; /* Print the test output file header in RAM file */
1807+#endif /* BMDEBUG */
1808+
1809+ window = TENTH_DEGREES / tonewheelTeeth ; /* Only need to do this once */
1810+
1811+ /* This is the actual benchmark algorithm. */
1812+
1813+ for( loop_cnt = 0 ; loop_cnt < iterations ; loop_cnt++ ) /* no stopping! */
1814+ {
1815+
1816+#if BMDEBUG
1817+ if( isTableLooped )
1818+ {
1819+ DebugOut( "END--END--END\n" ) ; /* Flag end-of-testfile */
1820+ }
1821+#endif /* BMDEBUG */
1822+
1823+ /***********************************************************************
1824+ First Pass
1825+ ***********************************************************************/
1826+
1827+ /* Gets 'angleCounter' value from test data*/
1828+ isTableLooped = GetInputValues() ;
1829+
1830+#if BMDEBUG
1831+ th_sprintf( szDebug, "%8ld", (n_long)angleCounter ) ;
1832+ DebugOut( szDebug ) ;
1833+#endif /* BMDEBUG */
1834+
1835+ /*
1836+ * Compute 'pulseDeltaTime' -- the difference in counter
1837+ * readings from the last pulse to the current one. Note that
1838+ * the realtime counter may roll over, so the elapsed time may
1839+ * need to be corrected when this occurs.
1840+ *
1841+ */
1842+ if( angleCounterLast1 > angleCounter )
1843+ {
1844+ pulseDeltaTime1 = angleCounter +
1845+ ( (varsize)MAX_VARIABLE - angleCounterLast1 + 1 ) ;
1846+ }
1847+ else
1848+ {
1849+ pulseDeltaTime1 = angleCounter - angleCounterLast1 ;
1850+ }
1851+
1852+ /* Update timer history... */
1853+ angleCounterLast1 = angleCounter ;
1854+ /* ...and elapsed time for a revolution */
1855+ rotationTime1 += pulseDeltaTime1 ;
1856+
1857+#if BMDEBUG
1858+ th_sprintf( szDebug, ", %4ld", (n_long)pulseDeltaTime1 ) ;
1859+ DebugOut( szDebug ) ;
1860+#endif /* BMDEBUG */
1861+
1862+ /*
1863+ * Must detect TDC reference by noticing that the period between this
1864+ * pulse and the last one is two or three times normal. We'll set a
1865+ * flag when TDC reference occurs, and clear it on all other pulses.
1866+ * We also keep count of which pulse we're on relative to TDC reference.
1867+ *
1868+ */
1869+
1870+ if( pulseDeltaTime1 > ( TDC_TEETH *deltaTimeAvg1 *TDC_MARGIN ) )
1871+ {
1872+ isTopDeadCenter1 = true ;
1873+ pulseDeltaTime1 /= TDC_TEETH ;
1874+
1875+ /*
1876+ * Compute engine speed every TDC. Engine speed will be
1877+ * the inverse of 'tdcTime', which is the period( in CPU
1878+ * time )between TDC's. Engine speed is also scaled by
1879+ * an arbitrary constant to make it useful elsewhere in
1880+ * the engine controller.
1881+ *
1882+ */
1883+ tdcTime1 = rotationTime1 ;
1884+ rotationTime1 = 0 ;
1885+ engineSpeed1 = RPM_SCALE_FACTOR / tdcTime1 ;
1886+ toothCount1 = 0 ;
1887+ }
1888+ else
1889+ {
1890+ toothCount1++ ;
1891+ isTopDeadCenter1 = false ;
1892+ }
1893+
1894+#if BMDEBUG
1895+ th_sprintf( szDebug, ", %4d, %8ld, %5ld, %4ld", ( isTopDeadCenter1 & 1 ),
1896+ (n_long)tdcTime1, (n_long)engineSpeed1, (n_long)toothCount1 ) ;
1897+ DebugOut( szDebug ) ;
1898+#else
1899+ WriteOut( (varsize)engineSpeed1 ) ;
1900+#endif /* BMDEBUG */
1901+
1902+ /*
1903+ * Compute an average delta-T for TDC pulse discrimination.
1904+ * The delta-T will be filtered by averaging over the period
1905+ * of one cylinder( several pulses ).
1906+ *
1907+ */
1908+
1909+ deltaTimeAccum1 += pulseDeltaTime1 ;
1910+ if( ( toothCount1 > 0 ) &&
1911+ ( toothCount1 %( tonewheelTeeth / CYLINDERS ) == 0 ) )
1912+ {
1913+ deltaTimeAvg1 = deltaTimeAccum1 / ( tonewheelTeeth / CYLINDERS ) ;
1914+ deltaTimeAccum1 = 0 ;
1915+ }
1916+
1917+#if BMDEBUG
1918+ th_sprintf( szDebug, ", %6ld, ", (n_long)deltaTimeAvg1 ) ;
1919+ DebugOut( szDebug ) ;
1920+#endif /* BMDEBUG */
1921+
1922+ angle1 = ( TENTH_DEGREES * toothCount1 / tonewheelTeeth ) ;
1923+
1924+ /*
1925+ * Now, output a value for the firing angle timer( a one-shot )
1926+ * only if we're on the tooth which precedes the firing
1927+ * angle for one of the cylinders. We presume that there is
1928+ * always a tooth which precedes each cylinder's firing angle.
1929+ * The value which is output presumably goes to a "capture/compare"
1930+ * timer which generates an interrupt used to fire that cylinder.
1931+ * Note the special treatment for the last cylinder( #4, #6, or #8 ),
1932+ * we don't subtract the 'angle' because the 360th degree of rotation
1933+ * is the same as the 0th degree of the next rotation.
1934+ *
1935+ */
1936+
1937+ /* CYLINDER 1 */
1938+ if( ( angle1 >= ( ( CYL1 * TENTH_DEGREES / CYLINDERS ) - window ) ) &&
1939+ ( angle1 < ( CYL1 * TENTH_DEGREES / CYLINDERS ) ) )
1940+ {
1941+ firingTime1 =
1942+ ( ( FIRE1_ANGLE - angle1 ) * tdcTime1 / TENTH_DEGREES ) +
1943+ angleCounter ;
1944+ }
1945+
1946+ /* CYLINDER 2 */
1947+ if( ( angle1 >= ( ( CYL2 * TENTH_DEGREES / CYLINDERS ) - window ) ) &&
1948+ ( angle1 < ( CYL2 * TENTH_DEGREES / CYLINDERS ) ) )
1949+ {
1950+ firingTime1 =
1951+ ( ( FIRE2_ANGLE - angle1 ) * tdcTime1 / TENTH_DEGREES ) +
1952+ angleCounter ;
1953+ }
1954+
1955+ /* CYLINDER 3 */
1956+ if( ( angle1 >= ( ( CYL3 * TENTH_DEGREES / CYLINDERS ) - window ) ) &&
1957+ ( angle1 < ( CYL3 * TENTH_DEGREES / CYLINDERS ) ) )
1958+ {
1959+ firingTime1 =
1960+ ( ( FIRE3_ANGLE - angle1 ) * tdcTime1 / TENTH_DEGREES ) +
1961+ angleCounter ;
1962+ }
1963+
1964+ /* CYLINDER 4 */
1965+ if( ( angle1 >= ( ( CYL4 * TENTH_DEGREES / CYLINDERS ) - window ) ) &&
1966+ ( angle1 < ( CYL4 * TENTH_DEGREES / CYLINDERS ) ) )
1967+ {
1968+ firingTime1 =
1969+ ( ( FIRE4_ANGLE - angle1 ) * tdcTime1 / TENTH_DEGREES ) +
1970+ angleCounter ;
1971+ }
1972+
1973+#if( CYLINDERS > 4 )
1974+
1975+ /* CYLINDER 5 */
1976+ if( ( angle1 >= ( ( CYL5 * TENTH_DEGREES / CYLINDERS ) - window ) ) &&
1977+ ( angle1 < ( CYL5 * TENTH_DEGREES / CYLINDERS ) ) )
1978+ {
1979+ firingTime1 =
1980+ ( ( FIRE5_ANGLE - angle1 ) * tdcTime1 / TENTH_DEGREES ) +
1981+ angleCounter ;
1982+ }
1983+
1984+ /* CYLINDER 6 */
1985+ if( ( angle1 >= ( ( CYL6 * TENTH_DEGREES / CYLINDERS ) - window ) ) &&
1986+ ( angle1 < ( CYL6 * TENTH_DEGREES / CYLINDERS ) ) )
1987+ {
1988+ firingTime1 =
1989+ ( ( FIRE6_ANGLE - angle1 ) * tdcTime1 / TENTH_DEGREES ) +
1990+ angleCounter ;
1991+ }
1992+
1993+#if( CYLINDERS > 6 )
1994+
1995+ /* CYLINDER 7 */
1996+ if( ( angle1 >= ( ( CYL7 * TENTH_DEGREES / CYLINDERS ) - window ) ) &&
1997+ ( angle1 < ( CYL7 * TENTH_DEGREES / CYLINDERS ) ) )
1998+ {
1999+ firingTime1 =
2000+ ( ( FIRE7_ANGLE - angle1 ) * tdcTime1 / TENTH_DEGREES ) +
2001+ angleCounter ;
2002+ }
2003+
2004+ /* CYLINDER 8 */
2005+ if( ( angle1 >= ( ( CYL8 * TENTH_DEGREES / CYLINDERS ) - window ) ) &&
2006+ ( angle1 < ( CYL8 * TENTH_DEGREES / CYLINDERS ) ) )
2007+ {
2008+ firingTime1 =
2009+ ( ( FIRE8_ANGLE - angle1 ) * tdcTime1 / TENTH_DEGREES ) +
2010+ angleCounter ;
2011+ }
2012+
2013+#endif /* 6 cylinders */
2014+#endif /* 4 cylinders */
2015+
2016+ if( firingTime1 > MAX_VARIABLE )
2017+ {
2018+ firingTime1 -= MAX_VARIABLE ;
2019+ }
2020+
2021+ /* Output the 'firingTime result */
2022+
2023+#if BMDEBUG
2024+ th_sprintf( szDebug, " %10ld\n", (n_long)firingTime1 ) ;
2025+ DebugOut( szDebug ) ;
2026+#else
2027+ WriteOut( (varsize)firingTime1 ) ;
2028+#endif /* BMDEBUG */
2029+
2030+ /***********************************************************************
2031+ Second Pass
2032+ ***********************************************************************/
2033+ /* Gets 'angleCounter' value from test data*/
2034+ isTableLooped += GetInputValues() ;
2035+
2036+#if BMDEBUG
2037+ /* Output some debug info, if needed */
2038+ th_sprintf( szDebug, "%8ld", (n_long)angleCounter ) ;
2039+ DebugOut( szDebug ) ;
2040+#endif /* BMDEBUG */
2041+
2042+
2043+ /*
2044+ * Compute 'pulseDeltaTime' -- the difference in counter
2045+ * readings from the last pulse to the current one. Note that
2046+ * the realtime counter may roll over, so the elapsed time may
2047+ * need to be corrected when this occurs.
2048+ *
2049+ */
2050+
2051+ if( angleCounterLast2 > angleCounter )
2052+ {
2053+ pulseDeltaTime2 = angleCounter +
2054+ ( (varsize)MAX_VARIABLE - angleCounterLast2 + 2 ) ;
2055+ }
2056+ else
2057+ {
2058+ pulseDeltaTime2 = angleCounter - angleCounterLast2 ;
2059+ }
2060+
2061+ /* Update timer history... */
2062+ angleCounterLast2 = angleCounter ;
2063+ /* ...and elapsed time for a revolution */
2064+ rotationTime2 += pulseDeltaTime2 ;
2065+
2066+#if BMDEBUG
2067+ th_sprintf( szDebug, ", %4ld", (n_long)pulseDeltaTime2 ) ;
2068+ DebugOut( szDebug ) ;
2069+#endif /* BMDEBUG */
2070+
2071+ /*
2072+ * Must detect TDC reference by noticing that the period between this
2073+ * pulse and the last one is two or three times normal. We'll set a
2074+ * flag when TDC reference occurs, and clear it on all other pulses.
2075+ * We also keep count of which pulse we're on relative to TDC reference.
2076+ *
2077+ */
2078+
2079+ if( pulseDeltaTime2 > ( TDC_TEETH * deltaTimeAvg2 * TDC_MARGIN ) )
2080+ {
2081+ isTopDeadCenter2 = true ;
2082+ pulseDeltaTime2 /= TDC_TEETH ;
2083+
2084+ /*
2085+ * Compute engine speed every TDC. Engine speed will be
2086+ * the inverse of 'tdcTime', which is the period( in CPU
2087+ * time )between TDC's. Engine speed is also scaled by
2088+ * an arbitrary constant to make it useful elsewhere in
2089+ * the engine controller.
2090+ *
2091+ */
2092+
2093+
2094+ tdcTime2 = rotationTime2 ;
2095+ rotationTime2 = 0 ;
2096+ engineSpeed2 = RPM_SCALE_FACTOR / tdcTime2 ;
2097+ toothCount2 = 0 ;
2098+ }
2099+ else {
2100+ toothCount2++ ;
2101+ isTopDeadCenter2 = false ;
2102+ }
2103+
2104+#if BMDEBUG
2105+ th_sprintf( szDebug, ", %4d, %8ld, %5ld, %4ld", ( isTopDeadCenter2 & 1 ),
2106+ (n_long)tdcTime2, (n_long)engineSpeed2, (n_long)toothCount2 ) ;
2107+ DebugOut( szDebug ) ;
2108+#else
2109+ WriteOut( (varsize)engineSpeed2 ) ;
2110+#endif /* BMDEBUG */
2111+
2112+ /*
2113+ * Compute an average delta-T for TDC pulse discrimination.
2114+ * The delta-T will be filtered by averaging over the period
2115+ * of one cylinder( several pulses ).
2116+ *
2117+ */
2118+ deltaTimeAccum2 += pulseDeltaTime2 ;
2119+
2120+ if( ( toothCount2 > 0 ) &&
2121+ ( toothCount2 % ( tonewheelTeeth / CYLINDERS ) == 0 ) )
2122+ {
2123+ deltaTimeAvg2 = deltaTimeAccum2 / ( tonewheelTeeth / CYLINDERS ) ;
2124+ deltaTimeAccum2 = 0 ;
2125+ }
2126+
2127+#if BMDEBUG
2128+ th_sprintf( szDebug, ", %6ld, ", (n_long)deltaTimeAvg2 ) ;
2129+ DebugOut( szDebug ) ;
2130+#endif /* BMDEBUG */
2131+
2132+ angle2 = ( TENTH_DEGREES * toothCount2 / tonewheelTeeth ) ;
2133+
2134+ /*
2135+ * Now, output a value for the firing angle timer( a one-shot )
2136+ * only if we're on the tooth which precedes the firing
2137+ * angle for one of the cylinders. We presume that there is
2138+ * always a tooth which precedes each cylinder's firing angle.
2139+ * The value which is output presumably goes to a "capture/compare"
2140+ * timer which generates an interrupt used to fire that cylinder.
2141+ * Note the special treatment for the last cylinder( #4, #6, or #8 ),
2142+ * we don't subtract the 'angle' because the 360th degree of rotation
2143+ * is the same as the 0th degree of the next rotation.
2144+ *
2145+ */
2146+
2147+ /* CYLINDER 1 */
2148+ if( ( angle2 >= ( ( CYL1 * TENTH_DEGREES / CYLINDERS ) - window ) ) &&
2149+ ( angle2 < ( CYL1 * TENTH_DEGREES / CYLINDERS ) ) )
2150+ {
2151+ firingTime2 =
2152+ ( ( FIRE1_ANGLE - angle2 ) * tdcTime2 / TENTH_DEGREES ) +
2153+ angleCounter ;
2154+ }
2155+
2156+ /* CYLINDER 2 */
2157+ if( ( angle2 >= ( ( CYL2 * TENTH_DEGREES / CYLINDERS ) - window ) ) &&
2158+ ( angle2 < ( CYL2 * TENTH_DEGREES / CYLINDERS ) ) )
2159+ {
2160+ firingTime2 =
2161+ ( ( FIRE2_ANGLE - angle2 ) * tdcTime2 / TENTH_DEGREES ) +
2162+ angleCounter ;
2163+ }
2164+
2165+ /* CYLINDER 3 */
2166+ if( ( angle2 >= ( ( CYL3 * TENTH_DEGREES / CYLINDERS ) - window ) ) &&
2167+ ( angle2 < ( CYL3 * TENTH_DEGREES / CYLINDERS ) ) )
2168+ {
2169+ firingTime2 =
2170+ ( ( FIRE3_ANGLE - angle2 ) * tdcTime2 / TENTH_DEGREES ) +
2171+ angleCounter ;
2172+ }
2173+
2174+ /* CYLINDER 4 */
2175+ if( ( angle2 >= ( ( CYL4 * TENTH_DEGREES / CYLINDERS ) - window ) ) &&
2176+ ( angle2 < ( CYL4 * TENTH_DEGREES / CYLINDERS ) ) )
2177+ {
2178+ firingTime2 =
2179+ ( ( FIRE4_ANGLE - angle2 ) * tdcTime2 / TENTH_DEGREES ) +
2180+ angleCounter ;
2181+ }
2182+
2183+#if( CYLINDERS > 4 )
2184+
2185+ /* CYLINDER 5 */
2186+ if( ( angle2 >= ( ( CYL5 * TENTH_DEGREES / CYLINDERS )- window ) ) &&
2187+ ( angle2 < ( CYL5 * TENTH_DEGREES / CYLINDERS ) ) )
2188+ {
2189+ firingTime2 =
2190+ ( ( FIRE5_ANGLE - angle2 ) * tdcTime2 / TENTH_DEGREES ) +
2191+ angleCounter ;
2192+ }
2193+
2194+ /* CYLINDER 6 */
2195+ if( ( angle2 >= ( ( CYL6 * TENTH_DEGREES / CYLINDERS ) - window ) ) &&
2196+ ( angle2 < ( CYL6 * TENTH_DEGREES / CYLINDERS ) ) )
2197+ {
2198+ firingTime2 =
2199+ ( ( FIRE6_ANGLE - angle2 ) * tdcTime2 / TENTH_DEGREES ) +
2200+ angleCounter ;
2201+ }
2202+
2203+#if( CYLINDERS > 6 )
2204+
2205+ /* CYLINDER 7 */
2206+ if( ( angle2 >= ( ( CYL7 * TENTH_DEGREES / CYLINDERS ) - window ) ) &&
2207+ ( angle2 < ( CYL7 * TENTH_DEGREES / CYLINDERS ) ) )
2208+ {
2209+ firingTime2 =
2210+ ( ( FIRE7_ANGLE - angle2 ) * tdcTime2 / TENTH_DEGREES ) +
2211+ angleCounter ;
2212+ }
2213+
2214+ /* CYLINDER 8 */
2215+ if( ( angle2 >= ( ( CYL8 * TENTH_DEGREES / CYLINDERS ) - window ) ) &&
2216+ ( angle2 < ( CYL8 * TENTH_DEGREES / CYLINDERS ) ) )
2217+ {
2218+ firingTime2 =
2219+ ( ( FIRE8_ANGLE - angle2 ) * tdcTime2 / TENTH_DEGREES ) +
2220+ angleCounter ;
2221+ }
2222+
2223+#endif /* 6 cylinders */
2224+#endif /* 4 cylinders */
2225+
2226+ if( firingTime2 > MAX_VARIABLE )
2227+ {
2228+ firingTime2 -= MAX_VARIABLE ;
2229+ }
2230+
2231+#if BMDEBUG
2232+ th_sprintf( szDebug, " %10ld\n", (n_long)firingTime2 ) ;
2233+ DebugOut( szDebug ) ;
2234+#else
2235+ WriteOut( (varsize)firingTime2 ) ;
2236+#endif /* BMDEBUG */
2237+
2238+ /***********************************************************************
2239+ Third Pass
2240+ ***********************************************************************/
2241+ /* Gets 'angleCounter' value from test data*/
2242+ isTableLooped += GetInputValues() ;
2243+
2244+#if BMDEBUG
2245+ th_sprintf( szDebug, "%8ld", (n_long)angleCounter ) ;
2246+ DebugOut( szDebug ) ;
2247+#endif /* BMDEBUG */
2248+
2249+ /*
2250+ * Compute 'pulseDeltaTime' -- the difference in counter
2251+ * readings from the last pulse to the current one. Note that
2252+ * the realtime counter may roll over, so the elapsed time may
2253+ * need to be corrected when this occurs.
2254+ *
2255+ */
2256+
2257+ if( angleCounterLast3 > angleCounter )
2258+ {
2259+ pulseDeltaTime3 = angleCounter +
2260+ ( (varsize)MAX_VARIABLE - angleCounterLast3 + 3 ) ;
2261+ }
2262+ else
2263+ {
2264+ pulseDeltaTime3 = angleCounter - angleCounterLast3 ;
2265+ }
2266+ /* Update timer history */
2267+ angleCounterLast3 = angleCounter ;
2268+ /* and elapsed time for a revolution */
2269+ rotationTime3 += pulseDeltaTime3 ;
2270+
2271+#if BMDEBUG
2272+ th_sprintf( szDebug, ", %4ld", (n_long)pulseDeltaTime3 ) ;
2273+ DebugOut( szDebug ) ;
2274+#endif /* BMDEBUG */
2275+
2276+ /*
2277+ * Must detect TDC reference by noticing that the period between this
2278+ * pulse and the last one is two or three times normal. We'll set a
2279+ * flag when TDC reference occurs, and clear it on all other pulses.
2280+ * We also keep count of which pulse we're on relative to TDC reference.
2281+ *
2282+ */
2283+
2284+ if( pulseDeltaTime3 > ( TDC_TEETH * deltaTimeAvg3 * TDC_MARGIN ) )
2285+ {
2286+ isTopDeadCenter3 = true ;
2287+ pulseDeltaTime3 /= TDC_TEETH ;
2288+
2289+ /*
2290+ * Compute engine speed every TDC. Engine speed will be
2291+ * the inverse of 'tdcTime', which is the period( in CPU
2292+ * time )between TDC's. Engine speed is also scaled by
2293+ * an arbitrary constant to make it useful elsewhere in
2294+ * the engine controller.
2295+ *
2296+ */
2297+
2298+ tdcTime3 = rotationTime3 ;
2299+ rotationTime3 = 0 ;
2300+ engineSpeed3 = RPM_SCALE_FACTOR / tdcTime3 ;
2301+ toothCount3 = 0 ;
2302+ }
2303+ else
2304+ {
2305+ toothCount3++ ;
2306+ isTopDeadCenter3 = false ;
2307+ }
2308+
2309+#if BMDEBUG
2310+ th_sprintf( szDebug, ", %4d, %8ld, %5ld, %4ld", ( isTopDeadCenter3 & 1 ),
2311+ (n_long)tdcTime3, (n_long)engineSpeed3, (n_long)toothCount3 ) ;
2312+ DebugOut( szDebug ) ;
2313+#else
2314+ WriteOut( (varsize)engineSpeed3 ) ;
2315+#endif /* BMDEBUG */
2316+
2317+ /*
2318+ * Compute an average delta-T for TDC pulse discrimination.
2319+ * The delta-T will be filtered by averaging over the period
2320+ * of one cylinder( several pulses ).
2321+ *
2322+ */
2323+
2324+ deltaTimeAccum3 += pulseDeltaTime3 ;
2325+
2326+ if( ( toothCount3 > 0 ) &&
2327+ ( toothCount3 % ( tonewheelTeeth / CYLINDERS ) == 0 ) )
2328+ {
2329+ deltaTimeAvg3 = deltaTimeAccum3 / ( tonewheelTeeth / CYLINDERS ) ;
2330+ deltaTimeAccum3 = 0 ;
2331+ }
2332+
2333+#if BMDEBUG
2334+ th_sprintf( szDebug, ", %6ld, ", (n_long)deltaTimeAvg3 ) ;
2335+ DebugOut( szDebug ) ;
2336+#endif /* BMDEBUG */
2337+
2338+ angle3 = ( TENTH_DEGREES * toothCount3 / tonewheelTeeth ) ;
2339+
2340+ /*
2341+ * Now, output a value for the firing angle timer( a one-shot )
2342+ * only if we're on the tooth which precedes the firing
2343+ * angle for one of the cylinders. We presume that there is
2344+ * always a tooth which precedes each cylinder's firing angle.
2345+ * The value which is output presumably goes to a "capture/compare"
2346+ * timer which generates an interrupt used to fire that cylinder.
2347+ * Note the special treatment for the last cylinder( #4, #6, or #8 ),
2348+ * we don't subtract the 'angle' because the 360th degree of rotation
2349+ * is the same as the 0th degree of the next rotation.
2350+ *
2351+ */
2352+
2353+ /* CYLINDER 1 */
2354+ if( ( angle3 >= ( ( CYL1 * TENTH_DEGREES / CYLINDERS ) - window ) ) &&
2355+ ( angle3 < ( CYL1 * TENTH_DEGREES / CYLINDERS ) ) )
2356+ {
2357+ firingTime3 =
2358+ ( ( FIRE1_ANGLE - angle3 ) * tdcTime3 / TENTH_DEGREES ) +
2359+ angleCounter ;
2360+ }
2361+
2362+ /* CYLINDER 2 */
2363+ if( ( angle3 >= ( ( CYL2 * TENTH_DEGREES / CYLINDERS ) - window ) ) &&
2364+ ( angle3 < ( CYL2 * TENTH_DEGREES / CYLINDERS ) ) )
2365+ {
2366+ firingTime3 =
2367+ ( ( FIRE2_ANGLE - angle3 ) * tdcTime3 / TENTH_DEGREES ) +
2368+ angleCounter ;
2369+ }
2370+
2371+ /* CYLINDER 3 */
2372+ if( ( angle3 >= ( ( CYL3 * TENTH_DEGREES / CYLINDERS ) - window ) ) &&
2373+ ( angle3 <( CYL3 * TENTH_DEGREES / CYLINDERS ) ) )
2374+ {
2375+ firingTime3 =
2376+ ( ( FIRE3_ANGLE - angle3 ) * tdcTime3 / TENTH_DEGREES ) +
2377+ angleCounter ;
2378+ }
2379+
2380+ /* CYLINDER 4 */
2381+ if( ( angle3 >= ( ( CYL4 * TENTH_DEGREES / CYLINDERS ) - window ) ) &&
2382+ ( angle3 < ( CYL4 * TENTH_DEGREES / CYLINDERS ) ) )
2383+ {
2384+ firingTime3 =
2385+ ( ( FIRE4_ANGLE - angle3 ) * tdcTime3 / TENTH_DEGREES ) +
2386+ angleCounter ;
2387+ }
2388+
2389+#if( CYLINDERS > 4 )
2390+
2391+ /* CYLINDER 5 */
2392+ if( ( angle3 >= ( ( CYL5 * TENTH_DEGREES / CYLINDERS ) - window ) ) &&
2393+ ( angle3 < ( CYL5 * TENTH_DEGREES / CYLINDERS ) ) )
2394+ {
2395+ firingTime3 =
2396+ ( ( FIRE5_ANGLE - angle3 ) * tdcTime3 / TENTH_DEGREES ) +
2397+ angleCounter ;
2398+ }
2399+
2400+ /* CYLINDER 6 */
2401+ if( ( angle3 >= ( ( CYL6 * TENTH_DEGREES / CYLINDERS ) - window ) ) &&
2402+ ( angle3 < ( CYL6 * TENTH_DEGREES / CYLINDERS ) ) )
2403+ {
2404+ firingTime3 =
2405+ ( ( FIRE6_ANGLE - angle3 ) * tdcTime3 / TENTH_DEGREES ) +
2406+ angleCounter ;
2407+ }
2408+
2409+#if( CYLINDERS > 6 )
2410+
2411+ /* CYLINDER 7 */
2412+ if( ( angle3 >= ( ( CYL7 * TENTH_DEGREES / CYLINDERS ) - window ) ) &&
2413+ ( angle3 < ( CYL7 * TENTH_DEGREES / CYLINDERS ) ) )
2414+ {
2415+ firingTime3 =
2416+ ( ( FIRE7_ANGLE - angle3 ) * tdcTime3 / TENTH_DEGREES ) +
2417+ angleCounter ;
2418+ }
2419+
2420+ /* CYLINDER 8 */
2421+ if( ( angle3 >= ( ( CYL8 * TENTH_DEGREES / CYLINDERS ) - window ) ) &&
2422+ ( angle3 <( CYL8 * TENTH_DEGREES / CYLINDERS ) ) )
2423+ {
2424+ firingTime3 =
2425+ ( ( FIRE8_ANGLE - angle3 ) * tdcTime3 / TENTH_DEGREES )+
2426+ angleCounter ;
2427+ }
2428+
2429+#endif /* 6 cylinders */
2430+#endif /* 4 cylinders */
2431+
2432+ if( firingTime3 > MAX_VARIABLE )
2433+ {
2434+ firingTime3 -= MAX_VARIABLE ;
2435+ }
2436+
2437+#if BMDEBUG
2438+ th_sprintf( szDebug, " %10ld", (n_long)firingTime3 ) ;
2439+ DebugOut( szDebug ) ;
2440+ th_sprintf( szDebug, ", %08lX\n", ( n_ulong )loop_cnt ) ;
2441+ DebugOut( szDebug ) ;
2442+#else
2443+ WriteOut( (varsize)firingTime3 ) ;
2444+
2445+#if DATA_SIZE == 0 /* Might break up the loop counter */
2446+ i = (varsize)( loop_cnt &0x0000FFFF ) ;
2447+ WriteOut( i ) ; /* ...in the output file */
2448+ i = (varsize)( loop_cnt >> 16 ) ;
2449+ WriteOut( i ) ;
2450+#else
2451+ WriteOut( (varsize)loop_cnt ) ;
2452+#endif
2453+ i = (varsize)0xAAAA ;
2454+ WriteOut( i ) ; /* Flag the end of data-block */
2455+#endif /* BMDEBUG */
2456+
2457+#if BMDEBUG
2458+ if( !th_harness_poll() )
2459+ {
2460+ break ;
2461+ }
2462+#endif
2463+ }
2464+
2465+ /* Signal that we are finished */
2466+ results.duration = th_signal_finished() ;
2467+
2468+ results.iterations = loop_cnt ;
2469+ results.v1 = 0 ;
2470+ results.v2 = 0 ;
2471+ results.v3 = 0 ;
2472+ results.v4 = 0 ;
2473+ results.info = szDataSize ;
2474+
2475+#if NON_INTRUSIVE_CRC_CHECK
2476+ results.CRC=0;
2477+/* varsize is n_short or n_long, calc crc based on e_u32 */
2478+/* final answers are iteration dependant */
2479+ results.CRC = Calc_crc32((e_u32)*inpAngleCount,results.CRC ) ;
2480+ results.CRC = Calc_crc32((e_u32)tonewheelTeeth,results.CRC ) ;
2481+#elif CRC_CHECK
2482+ results.CRC=0;
2483+#else
2484+ results.CRC=0;
2485+#endif
2486+
2487+ return th_report_results( &results,EXPECTED_CRC);
2488+
2489+} /* End of function 't_run_test' */
2490+
2491+/*
2492+ * FUNC : test_main
2493+ *
2494+ * DESC : the test( or bench mark )main entry point
2495+ *
2496+ * RETURNS : Any error value defined in th_error.h
2497+ */
2498+
2499+int
2500+test_main( struct TCDef **tcdef, int argc, const char *argv[] )
2501+{
2502+ /* Unused */
2503+ argc = argc ;
2504+ argv = argv ;
2505+
2506+ /* Point the test harness at our test defintion struction */
2507+ *tcdef = &the_tcdef ;
2508+
2509+ /* Now do any other low level, or basic initialization here */
2510+ return Success ;
2511+}
2512+
2513+/*
2514+* Function : DebugOut
2515+*
2516+* Outputs test data for debug purposes. Can direct output to console
2517+* in PC application. Builds a test data image in RAM for embedded use.
2518+* In either case, the output is text. Re-use the same RAMfile as for
2519+* WriteOut().
2520+*
2521+*/
2522+
2523+#if BMDEBUG
2524+
2525+n_void
2526+DebugOut( n_char *szSrc )
2527+{
2528+#if RAM_OUT == 1
2529+ n_int i ;
2530+ n_int length ;
2531+
2532+ /* Make sure we don't overwrite the end of the RAM file */
2533+ length = (n_int)strlen( szSrc ) ;
2534+
2535+ for( i = 0 ; i < length ; i++ )
2536+ {
2537+ *RAMfilePtr++ = szSrc[i] ;
2538+
2539+ if ( RAMfilePtr >= RAMfileEOF )
2540+ RAMfilePtr = RAMfile;
2541+ }
2542+#else
2543+ th_printf( szSrc ) ;
2544+#endif /* RAM_OUT */
2545+
2546+} /* End of function 'DebugOut' */
2547+
2548+#endif /* BMDEBUG */
2549+
2550+/*
2551+* Function : WriteOut
2552+*
2553+* Outputs results to the RAM file so that it can be downloaded to host for
2554+* verification. Also serves to defeat optimization which would remove the
2555+* code used to develop the results when not in DEBUG mode.
2556+*
2557+*/
2558+
2559+n_void
2560+WriteOut( varsize value )
2561+{
2562+if (( RAMfilePtr+RAMfile_increment) > RAMfileEOF )
2563+ RAMfilePtr = RAMfile;
2564+
2565+ *(varsize *)RAMfilePtr = value;
2566+ RAMfilePtr += RAMfile_increment; /* this might need to be casted back to (n_int *) ??*/
2567+
2568+} /* End of function 'WriteOut' */
2569+
2570
2571=== added file 'automotive/a2time01/bmark_lite.c'
2572--- automotive/a2time01/bmark_lite.c 1970-01-01 00:00:00 +0000
2573+++ automotive/a2time01/bmark_lite.c 2013-10-07 11:04:13 +0000
2574@@ -0,0 +1,1073 @@
2575+/*==============================================================================
2576+ *$RCSfile: bmark_lite.c,v $
2577+ *
2578+ * DESC : This file contains the Test Main and other TH support functions
2579+ *
2580+ * AUTHOR : ARM, Ltd., ECL, LLC
2581+ *
2582+ * EEMBC : Automotive/Industrial Subcommittee
2583+ *
2584+ * CVS : $Revision: 1.18 $
2585+ * $Date: 2002/08/07 22:20:25 $
2586+ * $Author: rick $
2587+ * $Source: d:/cvs/eembc2/automotive/a2time01/bmark_lite.c,v $
2588+ *
2589+ * NOTE :
2590+ *
2591+ *------------------------------------------------------------------------------
2592+ *
2593+ * HISTORY :
2594+ *
2595+ * $Log: bmark_lite.c,v $
2596+ * Revision 1.18 2002/08/07 22:20:25 rick
2597+ * Add NI CRC to TH Regular
2598+ *
2599+ * Revision 1.17 2002/07/22 21:58:53 rick
2600+ * General cleanup Beta 2b
2601+ *
2602+ * Revision 1.16 2002/07/22 16:09:49 rick
2603+ * Fix iteration dependant NI CRC
2604+ *
2605+ * Revision 1.15 2002/07/18 23:33:45 rick
2606+ * Fix iteration dependencies in NI CRC
2607+ *
2608+ * Revision 1.14 2002/07/11 22:13:26 rick
2609+ * Initialize tcdef results
2610+ *
2611+ * Revision 1.13 2002/07/10 19:00:42 rick
2612+ * Always initialize tcdef->CRC
2613+ *
2614+ * Revision 1.12 2002/05/29 22:24:46 rick
2615+ * Set recommended iterations with make
2616+ *
2617+ * Revision 1.11 2002/05/10 23:57:44 rick
2618+ * Fix missing shifts in 16, and 32 bit CRC calculations
2619+ *
2620+ * Revision 1.10 2002/05/10 17:20:36 rick
2621+ * Add al_main to API
2622+ *
2623+ * Revision 1.9 2002/04/25 20:10:43 rick
2624+ * sprintf to th_sprintf
2625+ *
2626+ * Revision 1.8 2002/04/19 18:31:37 rick
2627+ * Bug #146: global tablecount uninitialized
2628+ *
2629+ * Revision 1.7 2002/03/12 18:31:04 rick
2630+ * ITERATIONS, CRC_CHECK, NON_INTRUSIVE_CRC_CHECK, add standards headers
2631+ *
2632+ * Revision 1.6 2002/03/11 22:11:47 rick
2633+ * ITERATIONS, CRC_CHECK, NON_INTRUSIVE TCDef Usage
2634+ *
2635+ * Revision 1.5 2002/03/08 00:58:51 rick
2636+ * Repair Iterations and CRC ifdef logic
2637+ *
2638+ * Revision 1.4 2002/02/25 17:15:31 rick
2639+ * Add comment blocks, fix atime th_report call.
2640+ *
2641+ *
2642+ *------------------------------------------------------------------------------
2643+ * Copyright (c) 1998-2002 by the EDN Embedded Microprocessor
2644+ * Benchmark Consortium (EEMBC), Inc.
2645+ *
2646+ * All Rights Reserved. This is licensed program product and
2647+ * is owned by EEMBC. The Licensee understands and agrees that the
2648+ * Benchmarks licensed by EEMBC hereunder (including methods or concepts
2649+ * utilized therein) contain certain information that is confidential
2650+ * and proprietary which the Licensee expressly agrees to retain in the
2651+ * strictest confidence and to use only in conjunction with the Benchmarks
2652+ * pursuant to the terms of this Agreement. The Licensee further agrees
2653+ * to keep the source code and all related documentation confidential and
2654+ * not to disclose such source code and/or related documentation to any
2655+ * third party. The Licensee and any READER of this code is subject to
2656+ * either the EEMBC Member License Agreement and/or the EEMBC Licensee
2657+ * Agreement.
2658+ * TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, EEMBC DISCLAIMS ALL
2659+ * WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
2660+ * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR
2661+ * PURPOSE, WITH REGARD TO THE BENCHMARKS AND THE ACCOMPANYING
2662+ * DOCUMENTATION. LICENSEE ACKNOWLEDGES AND AGREES THAT THERE ARE NO
2663+ * WARRANTIES, GUARANTIES, CONDITIONS, COVENANTS, OR REPRESENTATIONS BY
2664+ * EEMBC AS TO MARKETABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR OTHER
2665+ * ATTRIBUTES, WHETHER EXPRESS OR IMPLIED (IN LAW OR IN FACT), ORAL OR
2666+ * WRITTEN.
2667+ *
2668+ * Licensee hereby agrees by accessing this source code that all benchmark
2669+ * scores related to this code must be certified by ECL prior to publication
2670+ * in any media, form, distribution, or other means of conveyance of
2671+ * information subject to the terms of the EEMBC Member License Agreement
2672+ * and/or EEMBC Licensee Agreement.
2673+ *
2674+ * Other Copyright Notice (if any):
2675+ *
2676+ * For conditions of distribution and use, see the accompanying README file.
2677+ * ===========================================================================*/
2678+
2679+/*******************************************************************************
2680+ Includes
2681+*******************************************************************************/
2682+#define ALGO_GLOBALS 1 /* Next time, we'll skip these */
2683+#include "algo.h"
2684+
2685+/* Estimate of allocation for NUM_TESTS*( debug test + 2 variables )*/
2686+#define T_BSIZE (MAX_FILESIZE+((NUM_TESTS+1)*VAR_COUNT*4))
2687+
2688+
2689+/* ======================================================================== */
2690+/* F U N C T I O N P R O T O T Y P E S */
2691+/* ======================================================================== */
2692+int main(int argc, const char* argv[] );
2693+int t_run_test(struct TCDef *tcdef, int argc, const char* argv[]);
2694+
2695+/* Define iterations */
2696+#if !defined(ITERATIONS) || CRC_CHECK || ITERATIONS==DEFAULT
2697+#undef ITERATIONS
2698+#if CRC_CHECK
2699+#define ITERATIONS 50000 /* required iterations for crc */
2700+#else
2701+#define ITERATIONS 50000 /* recommended iterations for benchmark */
2702+#endif
2703+#endif
2704+
2705+/* Pre-caclculated CRC values */
2706+#if CRC_CHECK
2707+#define EXPECTED_CRC 0x0000
2708+#elif NON_INTRUSIVE_CRC_CHECK
2709+#define EXPECTED_CRC 0xc74a
2710+#else
2711+#define EXPECTED_CRC 0x0000
2712+#endif
2713+
2714+TCDef the_tcdef =
2715+{
2716+ "AUT a2time01 ",
2717+ EEMBC_MEMBER_COMPANY,
2718+ EEMBC_PROCESSOR,
2719+ EEMBC_TARGET,
2720+ "Algorithm #2 -- Angle-To-Time Conversion V1.0E0 - a2time00",
2721+ TCDEF_REVISION,
2722+ { EEMBC_TH_MAJOR, EEMBC_TH_MINOR, EEMBC_TH_STEP, EEMBC_TH_REVISION },
2723+ { 0, 0, 0, 0 }, /* Target Hardware Version Number Required( make all zeros to ignore )*/
2724+ { 1, 0, 'C', 0 }, /* The Version number of this Benchmark */
2725+ ITERATIONS,
2726+ 0,
2727+ 0,
2728+ 0,
2729+ 0,
2730+ 0,
2731+ 0,
2732+ 0
2733+} ;
2734+
2735+/* DECLARATIONS */
2736+n_int *RAMfile ; /* Pointer to test output RAM file */
2737+n_int *RAMfilePtr ; /* Pointer to position in output RAM file */
2738+n_int RAMfileSize ; /* Size of the debug output RAM file */
2739+n_int tableCount ; /* Number of passes through table */
2740+n_int *RAMfileEOF; /* points to end of RAM file */
2741+n_int RAMfile_increment; /* difference between varsize and n_int */
2742+
2743+varsize angleCounter ; /* Current 'angleCounter' pulled from test data */
2744+varsize *inpAngleCount ; /* Array of 'angleCounter' test data values */
2745+varsize tonewheelTeeth ; /* Number of teeth on the tonewheel */
2746+
2747+
2748+/*********************************************************************************
2749+* FUNC : int t_run_test( struct TCDef *tcdef,int argc, const char *argv[] )
2750+* DESC : This is the functions that carries out the algorithm. This function
2751+* is called from the main. Same algorithm is called three times. Input
2752+* data for the algorithm is stored in 'algotst'c'. All variables declared
2753+* and initialized in 'init.c'. When 'BMDEBUG' and 'WINDOWS_EXAMPLE_CODE'
2754+* defined in 'thcfg.h' it will write bunch of debug message in the RAM.
2755+* All debug routines are in 'debug.c'. It calculates CRC using intermediate
2756+* values from the algorithms. CRC is used to check if algorithm carried out
2757+* correctly.
2758+* ARGUMENT: arc - not used
2759+* argv - not used
2760+* tcdef - structure defined in 'thlib.h'. Following members of tcdef
2761+* rec_iterations- recommend number of times algorithm should be carried out
2762+* iterations - actual number of times algorithm was carried
2763+* most cases same as 'rec_iterations'
2764+* duration - Total time to carry out the algorithm
2765+* CRC - calculated CRC
2766+*
2767+* RETURNS : Success if the the CRC matches.
2768+*****************************************************************************************/
2769+int t_run_test( struct TCDef *tcdef,int argc, const char *argv[] )
2770+{
2771+ size_t loop_cnt = tcdef->rec_iterations;
2772+
2773+
2774+#if BMDEBUG
2775+ char *szTitle =
2776+ "\nEEMBC Automotive/Industrial Subcommittee Benchmarks ( c )1998-1999\n"
2777+ "Algorithm 2 : Angle-to-Time Conversion Rev. 1.0E0 a2time00 \n" ;
2778+ char *szHeader =
2779+ "\n\n angle pulse tdc engine "
2780+ "tooth delta fire test\n"
2781+ " Count, DeltaT, TDC, Time, Speed, "
2782+ "Count, TimeAvg, Time counter\n" ;
2783+ char szDebug[100] ;
2784+#else
2785+ varsize i ;
2786+#endif /* BMDEBUG */
2787+
2788+ static n_char szDataSize[40] ;
2789+ n_int isTableLooped = false ; /* Input test data table looped */
2790+ varsize window ;
2791+ static varsize pulseDeltaTime1 ;
2792+ static varsize pulseDeltaTime2 ;
2793+ static varsize pulseDeltaTime3 ;
2794+ static varsize angle1 ;
2795+ static varsize angle2 ;
2796+ static varsize angle3 ;
2797+ static varsize angleCounterLast1 ;
2798+ static varsize angleCounterLast2 ;
2799+ static varsize angleCounterLast3 ;
2800+ static varsize toothCount1 ;
2801+ static varsize toothCount2 ;
2802+ static varsize toothCount3 ;
2803+ static varsize deltaTimeAccum1 ;
2804+ static varsize deltaTimeAccum2 ;
2805+ static varsize deltaTimeAccum3 ;
2806+ static varsize deltaTimeAvg1 ;
2807+ static varsize deltaTimeAvg2 ;
2808+ static varsize deltaTimeAvg3 ;
2809+ static varsize firingTime1 ;
2810+ static varsize firingTime2 ;
2811+ static varsize firingTime3 ;
2812+ static n_ulong tdcTime1 ;
2813+ static n_ulong tdcTime2 ;
2814+ static n_ulong tdcTime3 ;
2815+ static n_ulong engineSpeed1 ;
2816+ static n_ulong engineSpeed2 ;
2817+ static n_ulong engineSpeed3 ;
2818+ static n_ulong rotationTime1 ;
2819+ static n_ulong rotationTime2 ;
2820+ static n_ulong rotationTime3 ;
2821+ static n_int isTopDeadCenter1 ; /* TRUE/FALSE flag when TDC occurs */
2822+ static n_int isTopDeadCenter2 ; /* TRUE/FALSE flag when TDC occurs */
2823+ static n_int isTopDeadCenter3 ; /* TRUE/FALSE flag when TDC occurs */
2824+
2825+ /* Unused */
2826+ argc = argc ;
2827+ argv = argv ;
2828+
2829+ /*
2830+ * First, initialize the data structures we need for the test
2831+ * and allocate memory as needed. Report an error if we can't.
2832+ *
2833+ */
2834+
2835+ /* Variable initializations at t=0 */
2836+ toothCount1 = 0 ; /* Don't know which pulse we start on */
2837+ toothCount2 = 0 ;
2838+ toothCount3 = 0 ;
2839+ deltaTimeAccum1 = 0 ; /* ...and haven't accumulated for filter... */
2840+ deltaTimeAccum2 = 0 ;
2841+ deltaTimeAccum3 = 0 ;
2842+ deltaTimeAvg1 = 32767 ; /* ...and not gotten an average... */
2843+ deltaTimeAvg2 = 32767 ;
2844+ deltaTimeAvg3 = 32767 ;
2845+ tdcTime1 = 0 ; /* ...and don't know when TDC occurs */
2846+ tdcTime2 = 0 ;
2847+ tdcTime3 = 0 ;
2848+ angleCounterLast1 = 0 ;
2849+ angleCounterLast2 = 0 ;
2850+ angleCounterLast3 = 0 ;
2851+ engineSpeed1 = 0 ;
2852+ engineSpeed2 = 0 ;
2853+ engineSpeed3 = 0 ;
2854+ rotationTime1 = 0 ;
2855+ rotationTime2 = 0 ;
2856+ rotationTime3 = 0 ;
2857+ firingTime1 = 0 ;
2858+ firingTime2 = 0 ;
2859+ firingTime3 = 0 ;
2860+/* ALGO_GLOBALS */
2861+ tableCount = 0;
2862+ angleCounter = 0; /* Current 'angleCounter' pulled from data */
2863+ inpAngleCount = NULL; /* Array of 'angleCounter' test data values */
2864+ tonewheelTeeth = 0; /* Number of teeth on the tonewheel */
2865+
2866+ /* Set size of output file (1K) */
2867+ RAMfileSize = MAX_FILESIZE ;
2868+
2869+ /* Allocate some RAM for output file */
2870+ RAMfile = (n_int *)th_malloc( RAMfileSize * sizeof(n_int) + sizeof (varsize) ) ;
2871+ if ( RAMfile == NULL )
2872+ th_exit( THE_OUT_OF_MEMORY, "Cannot Allocate Memory %s:%d", __FILE__,__LINE__ );
2873+
2874+ /* align it to varsize boundary */
2875+ RAMfile = ((n_int *)ROUNDUP(RAMfile, sizeof (varsize) ));
2876+ RAMfilePtr = RAMfile; /* Point to beginning of test output file */
2877+ RAMfileEOF = RAMfile + RAMfileSize; /* should be OK ANSI C */
2878+
2879+ if (sizeof(varsize) > sizeof(n_int)) { /* this is a floating point benchmark! */
2880+ RAMfile_increment = sizeof(varsize) / sizeof(n_int);
2881+ if (sizeof(varsize) % sizeof(n_int)) RAMfile_increment += 1; /* should never happen, but ... */
2882+ }
2883+ else{
2884+ RAMfile_increment = 1;
2885+ }
2886+
2887+ /* Tell us the compiled data size */
2888+#if BMDEBUG
2889+ th_sprintf( szDataSize, "Data size = %s\n\n",
2890+ ( DATA_SIZE ? "LONG" : "SHORT" ) ) ;
2891+#else
2892+ szDataSize[0] = (n_char)( '0' + DATA_SIZE ) ;
2893+ szDataSize[1] = '\0' ;
2894+#endif /* BMDEBUG */
2895+
2896+ /* Initialize the test data -- stimuli for the algorithm. */
2897+ /* Allocate for the test input data table */
2898+ if( !GetTestData() )
2899+ {
2900+ th_exit( THE_OUT_OF_MEMORY, "Cannot Allocate Memory %s : %d",
2901+ __FILE__, __LINE__ ) ;
2902+ }
2903+
2904+ th_signal_start() ; /* Tell the host that the test has begun */
2905+
2906+#if BMDEBUG
2907+ DebugOut( szTitle ) ; /* Print the title message in RAM file */
2908+ DebugOut( szDataSize ) ; /* and the data size */
2909+ DebugOut( szHeader ) ; /* Print the test output file header in RAM file */
2910+#endif /* BMDEBUG */
2911+
2912+ window = TENTH_DEGREES / tonewheelTeeth ; /* Only need to do this once */
2913+
2914+ /* This is the actual benchmark algorithm. */
2915+
2916+ for( loop_cnt = 0 ; loop_cnt < tcdef->rec_iterations ; loop_cnt++ ) /* no stopping! */
2917+ {
2918+
2919+#if BMDEBUG
2920+ if( isTableLooped )
2921+ {
2922+ DebugOut( "END--END--END\n" ) ; /* Flag end-of-testfile */
2923+ }
2924+#endif /* BMDEBUG */
2925+
2926+ /***********************************************************************
2927+ First Pass
2928+ ***********************************************************************/
2929+
2930+ /* Gets 'angleCounter' value from test data */
2931+ isTableLooped = GetInputValues() ;
2932+
2933+#if BMDEBUG
2934+ th_sprintf( szDebug, "%8ld", (n_long)angleCounter ) ;
2935+ DebugOut( szDebug ) ;
2936+#endif /* BMDEBUG */
2937+
2938+ /*
2939+ * Compute 'pulseDeltaTime' -- the difference in counter
2940+ * readings from the last pulse to the current one. Note that
2941+ * the realtime counter may roll over, so the elapsed time may
2942+ * need to be corrected when this occurs.
2943+ *
2944+ */
2945+ if( angleCounterLast1 > angleCounter )
2946+ {
2947+ pulseDeltaTime1 = angleCounter +
2948+ ( (varsize)MAX_VARIABLE - angleCounterLast1 + 1 ) ;
2949+ }
2950+ else
2951+ {
2952+ pulseDeltaTime1 = angleCounter - angleCounterLast1 ;
2953+ }
2954+
2955+ /* Update timer history... */
2956+ angleCounterLast1 = angleCounter ;
2957+ /* ...and elapsed time for a revolution */
2958+ rotationTime1 += pulseDeltaTime1 ;
2959+
2960+#if BMDEBUG
2961+ th_sprintf( szDebug, ", %4ld", (n_long)pulseDeltaTime1 ) ;
2962+ DebugOut( szDebug ) ;
2963+#endif /* BMDEBUG */
2964+
2965+ /*
2966+ * Must detect TDC reference by noticing that the period between this
2967+ * pulse and the last one is two or three times normal. We'll set a
2968+ * flag when TDC reference occurs, and clear it on all other pulses.
2969+ * We also keep count of which pulse we're on relative to TDC reference.
2970+ *
2971+ */
2972+
2973+ if( pulseDeltaTime1 > ( TDC_TEETH *deltaTimeAvg1 *TDC_MARGIN ) )
2974+ {
2975+ isTopDeadCenter1 = true ;
2976+ pulseDeltaTime1 /= TDC_TEETH ;
2977+
2978+ /*
2979+ * Compute engine speed every TDC. Engine speed will be
2980+ * the inverse of 'tdcTime', which is the period( in CPU
2981+ * time )between TDC's. Engine speed is also scaled by
2982+ * an arbitrary constant to make it useful elsewhere in
2983+ * the engine controller.
2984+ *
2985+ */
2986+ tdcTime1 = rotationTime1 ;
2987+ rotationTime1 = 0 ;
2988+ engineSpeed1 = RPM_SCALE_FACTOR / tdcTime1 ;
2989+ toothCount1 = 0 ;
2990+ }
2991+ else
2992+ {
2993+ toothCount1++ ;
2994+ isTopDeadCenter1 = false ;
2995+ }
2996+
2997+#if BMDEBUG
2998+ th_sprintf( szDebug, ", %4d, %8ld, %5ld, %4ld", ( isTopDeadCenter1 & 1 ),
2999+ (n_long)tdcTime1, (n_long)engineSpeed1, (n_long)toothCount1 ) ;
3000+ DebugOut( szDebug ) ;
3001+#else
3002+ WriteOut( (varsize)engineSpeed1 ) ;
3003+#endif /* BMDEBUG */
3004+
3005+ /*
3006+ * Compute an average delta-T for TDC pulse discrimination.
3007+ * The delta-T will be filtered by averaging over the period
3008+ * of one cylinder( several pulses ).
3009+ *
3010+ */
3011+
3012+ deltaTimeAccum1 += pulseDeltaTime1 ;
3013+ if( ( toothCount1 > 0 ) &&
3014+ ( toothCount1 %( tonewheelTeeth / CYLINDERS ) == 0 ) )
3015+ {
3016+ deltaTimeAvg1 = deltaTimeAccum1 / ( tonewheelTeeth / CYLINDERS ) ;
3017+ deltaTimeAccum1 = 0 ;
3018+ }
3019+
3020+#if BMDEBUG
3021+ th_sprintf( szDebug, ", %6ld, ", (n_long)deltaTimeAvg1 ) ;
3022+ DebugOut( szDebug ) ;
3023+#endif /* BMDEBUG */
3024+
3025+ angle1 = ( TENTH_DEGREES * toothCount1 / tonewheelTeeth ) ;
3026+
3027+ /*
3028+ * Now, output a value for the firing angle timer( a one-shot )
3029+ * only if we're on the tooth which precedes the firing
3030+ * angle for one of the cylinders. We presume that there is
3031+ * always a tooth which precedes each cylinder's firing angle.
3032+ * The value which is output presumably goes to a "capture/compare"
3033+ * timer which generates an interrupt used to fire that cylinder.
3034+ * Note the special treatment for the last cylinder( #4, #6, or #8 ),
3035+ * we don't subtract the 'angle' because the 360th degree of rotation
3036+ * is the same as the 0th degree of the next rotation.
3037+ *
3038+ */
3039+
3040+ /* CYLINDER 1 */
3041+ if( ( angle1 >= ( ( CYL1 * TENTH_DEGREES / CYLINDERS ) - window ) ) &&
3042+ ( angle1 < ( CYL1 * TENTH_DEGREES / CYLINDERS ) ) )
3043+ {
3044+ firingTime1 =
3045+ ( ( FIRE1_ANGLE - angle1 ) * tdcTime1 / TENTH_DEGREES ) +
3046+ angleCounter ;
3047+ }
3048+
3049+ /* CYLINDER 2 */
3050+ if( ( angle1 >= ( ( CYL2 * TENTH_DEGREES / CYLINDERS ) - window ) ) &&
3051+ ( angle1 < ( CYL2 * TENTH_DEGREES / CYLINDERS ) ) )
3052+ {
3053+ firingTime1 =
3054+ ( ( FIRE2_ANGLE - angle1 ) * tdcTime1 / TENTH_DEGREES ) +
3055+ angleCounter ;
3056+ }
3057+
3058+ /* CYLINDER 3 */
3059+ if( ( angle1 >= ( ( CYL3 * TENTH_DEGREES / CYLINDERS ) - window ) ) &&
3060+ ( angle1 < ( CYL3 * TENTH_DEGREES / CYLINDERS ) ) )
3061+ {
3062+ firingTime1 =
3063+ ( ( FIRE3_ANGLE - angle1 ) * tdcTime1 / TENTH_DEGREES ) +
3064+ angleCounter ;
3065+ }
3066+
3067+ /* CYLINDER 4 */
3068+ if( ( angle1 >= ( ( CYL4 * TENTH_DEGREES / CYLINDERS ) - window ) ) &&
3069+ ( angle1 < ( CYL4 * TENTH_DEGREES / CYLINDERS ) ) )
3070+ {
3071+ firingTime1 =
3072+ ( ( FIRE4_ANGLE - angle1 ) * tdcTime1 / TENTH_DEGREES ) +
3073+ angleCounter ;
3074+ }
3075+
3076+#if( CYLINDERS > 4 )
3077+
3078+ /* CYLINDER 5 */
3079+ if( ( angle1 >= ( ( CYL5 * TENTH_DEGREES / CYLINDERS ) - window ) ) &&
3080+ ( angle1 < ( CYL5 * TENTH_DEGREES / CYLINDERS ) ) )
3081+ {
3082+ firingTime1 =
3083+ ( ( FIRE5_ANGLE - angle1 ) * tdcTime1 / TENTH_DEGREES ) +
3084+ angleCounter ;
3085+ }
3086+
3087+ /* CYLINDER 6 */
3088+ if( ( angle1 >= ( ( CYL6 * TENTH_DEGREES / CYLINDERS ) - window ) ) &&
3089+ ( angle1 < ( CYL6 * TENTH_DEGREES / CYLINDERS ) ) )
3090+ {
3091+ firingTime1 =
3092+ ( ( FIRE6_ANGLE - angle1 ) * tdcTime1 / TENTH_DEGREES ) +
3093+ angleCounter ;
3094+ }
3095+
3096+#if( CYLINDERS > 6 )
3097+
3098+ /* CYLINDER 7 */
3099+ if( ( angle1 >= ( ( CYL7 * TENTH_DEGREES / CYLINDERS ) - window ) ) &&
3100+ ( angle1 < ( CYL7 * TENTH_DEGREES / CYLINDERS ) ) )
3101+ {
3102+ firingTime1 =
3103+ ( ( FIRE7_ANGLE - angle1 ) * tdcTime1 / TENTH_DEGREES ) +
3104+ angleCounter ;
3105+ }
3106+
3107+ /* CYLINDER 8 */
3108+ if( ( angle1 >= ( ( CYL8 * TENTH_DEGREES / CYLINDERS ) - window ) ) &&
3109+ ( angle1 < ( CYL8 * TENTH_DEGREES / CYLINDERS ) ) )
3110+ {
3111+ firingTime1 =
3112+ ( ( FIRE8_ANGLE - angle1 ) * tdcTime1 / TENTH_DEGREES ) +
3113+ angleCounter ;
3114+ }
3115+
3116+#endif /* 6 cylinders */
3117+#endif /* 4 cylinders */
3118+
3119+ if( firingTime1 > MAX_VARIABLE )
3120+ {
3121+ firingTime1 -= MAX_VARIABLE ;
3122+ }
3123+
3124+ /* Output the 'firingTime result */
3125+
3126+#if BMDEBUG
3127+ th_sprintf( szDebug, " %10ld\n", (n_long)firingTime1 ) ;
3128+ DebugOut( szDebug ) ;
3129+#else
3130+ WriteOut( (varsize)firingTime1 ) ;
3131+#endif /* BMDEBUG */
3132+
3133+ /***********************************************************************
3134+ Second Pass
3135+ ***********************************************************************/
3136+ /* Gets 'angleCounter' value from test data*/
3137+ isTableLooped += GetInputValues() ;
3138+
3139+#if BMDEBUG
3140+ /* Output some debug info, if needed */
3141+ th_sprintf( szDebug, "%8ld", (n_long)angleCounter ) ;
3142+ DebugOut( szDebug ) ;
3143+#endif /* BMDEBUG */
3144+
3145+
3146+ /*
3147+ * Compute 'pulseDeltaTime' -- the difference in counter
3148+ * readings from the last pulse to the current one. Note that
3149+ * the realtime counter may roll over, so the elapsed time may
3150+ * need to be corrected when this occurs.
3151+ *
3152+ */
3153+
3154+ if( angleCounterLast2 > angleCounter )
3155+ {
3156+ pulseDeltaTime2 = angleCounter +
3157+ ( (varsize)MAX_VARIABLE - angleCounterLast2 + 2 ) ;
3158+ }
3159+ else
3160+ {
3161+ pulseDeltaTime2 = angleCounter - angleCounterLast2 ;
3162+ }
3163+
3164+ /* Update timer history... */
3165+ angleCounterLast2 = angleCounter ;
3166+ /* ...and elapsed time for a revolution */
3167+ rotationTime2 += pulseDeltaTime2 ;
3168+
3169+#if BMDEBUG
3170+ th_sprintf( szDebug, ", %4ld", (n_long)pulseDeltaTime2 ) ;
3171+ DebugOut( szDebug ) ;
3172+#endif /* BMDEBUG */
3173+
3174+ /*
3175+ * Must detect TDC reference by noticing that the period between this
3176+ * pulse and the last one is two or three times normal. We'll set a
3177+ * flag when TDC reference occurs, and clear it on all other pulses.
3178+ * We also keep count of which pulse we're on relative to TDC reference.
3179+ *
3180+ */
3181+
3182+ if( pulseDeltaTime2 > ( TDC_TEETH * deltaTimeAvg2 * TDC_MARGIN ) )
3183+ {
3184+ isTopDeadCenter2 = true ;
3185+ pulseDeltaTime2 /= TDC_TEETH ;
3186+
3187+ /*
3188+ * Compute engine speed every TDC. Engine speed will be
3189+ * the inverse of 'tdcTime', which is the period( in CPU
3190+ * time )between TDC's. Engine speed is also scaled by
3191+ * an arbitrary constant to make it useful elsewhere in
3192+ * the engine controller.
3193+ *
3194+ */
3195+
3196+
3197+ tdcTime2 = rotationTime2 ;
3198+ rotationTime2 = 0 ;
3199+ engineSpeed2 = RPM_SCALE_FACTOR / tdcTime2 ;
3200+ toothCount2 = 0 ;
3201+ }
3202+ else {
3203+ toothCount2++ ;
3204+ isTopDeadCenter2 = false ;
3205+ }
3206+
3207+#if BMDEBUG
3208+ th_sprintf( szDebug, ", %4d, %8ld, %5ld, %4ld", ( isTopDeadCenter2 & 1 ),
3209+ (n_long)tdcTime2, (n_long)engineSpeed2, (n_long)toothCount2 ) ;
3210+ DebugOut( szDebug ) ;
3211+#else
3212+ WriteOut( (varsize)engineSpeed2 ) ;
3213+#endif /* BMDEBUG */
3214+
3215+ /*
3216+ * Compute an average delta-T for TDC pulse discrimination.
3217+ * The delta-T will be filtered by averaging over the period
3218+ * of one cylinder( several pulses ).
3219+ *
3220+ */
3221+ deltaTimeAccum2 += pulseDeltaTime2 ;
3222+
3223+ if( ( toothCount2 > 0 ) &&
3224+ ( toothCount2 % ( tonewheelTeeth / CYLINDERS ) == 0 ) )
3225+ {
3226+ deltaTimeAvg2 = deltaTimeAccum2 / ( tonewheelTeeth / CYLINDERS ) ;
3227+ deltaTimeAccum2 = 0 ;
3228+ }
3229+
3230+#if BMDEBUG
3231+ th_sprintf( szDebug, ", %6ld, ", (n_long)deltaTimeAvg2 ) ;
3232+ DebugOut( szDebug ) ;
3233+#endif /* BMDEBUG */
3234+
3235+ angle2 = ( TENTH_DEGREES * toothCount2 / tonewheelTeeth ) ;
3236+
3237+ /*
3238+ * Now, output a value for the firing angle timer( a one-shot )
3239+ * only if we're on the tooth which precedes the firing
3240+ * angle for one of the cylinders. We presume that there is
3241+ * always a tooth which precedes each cylinder's firing angle.
3242+ * The value which is output presumably goes to a "capture/compare"
3243+ * timer which generates an interrupt used to fire that cylinder.
3244+ * Note the special treatment for the last cylinder( #4, #6, or #8 ),
3245+ * we don't subtract the 'angle' because the 360th degree of rotation
3246+ * is the same as the 0th degree of the next rotation.
3247+ *
3248+ */
3249+
3250+ /* CYLINDER 1 */
3251+ if( ( angle2 >= ( ( CYL1 * TENTH_DEGREES / CYLINDERS ) - window ) ) &&
3252+ ( angle2 < ( CYL1 * TENTH_DEGREES / CYLINDERS ) ) )
3253+ {
3254+ firingTime2 =
3255+ ( ( FIRE1_ANGLE - angle2 ) * tdcTime2 / TENTH_DEGREES ) +
3256+ angleCounter ;
3257+ }
3258+
3259+ /* CYLINDER 2 */
3260+ if( ( angle2 >= ( ( CYL2 * TENTH_DEGREES / CYLINDERS ) - window ) ) &&
3261+ ( angle2 < ( CYL2 * TENTH_DEGREES / CYLINDERS ) ) )
3262+ {
3263+ firingTime2 =
3264+ ( ( FIRE2_ANGLE - angle2 ) * tdcTime2 / TENTH_DEGREES ) +
3265+ angleCounter ;
3266+ }
3267+
3268+ /* CYLINDER 3 */
3269+ if( ( angle2 >= ( ( CYL3 * TENTH_DEGREES / CYLINDERS ) - window ) ) &&
3270+ ( angle2 < ( CYL3 * TENTH_DEGREES / CYLINDERS ) ) )
3271+ {
3272+ firingTime2 =
3273+ ( ( FIRE3_ANGLE - angle2 ) * tdcTime2 / TENTH_DEGREES ) +
3274+ angleCounter ;
3275+ }
3276+
3277+ /* CYLINDER 4 */
3278+ if( ( angle2 >= ( ( CYL4 * TENTH_DEGREES / CYLINDERS ) - window ) ) &&
3279+ ( angle2 < ( CYL4 * TENTH_DEGREES / CYLINDERS ) ) )
3280+ {
3281+ firingTime2 =
3282+ ( ( FIRE4_ANGLE - angle2 ) * tdcTime2 / TENTH_DEGREES ) +
3283+ angleCounter ;
3284+ }
3285+
3286+#if( CYLINDERS > 4 )
3287+
3288+ /* CYLINDER 5 */
3289+ if( ( angle2 >= ( ( CYL5 * TENTH_DEGREES / CYLINDERS )- window ) ) &&
3290+ ( angle2 < ( CYL5 * TENTH_DEGREES / CYLINDERS ) ) )
3291+ {
3292+ firingTime2 =
3293+ ( ( FIRE5_ANGLE - angle2 ) * tdcTime2 / TENTH_DEGREES ) +
3294+ angleCounter ;
3295+ }
3296+
3297+ /* CYLINDER 6 */
3298+ if( ( angle2 >= ( ( CYL6 * TENTH_DEGREES / CYLINDERS ) - window ) ) &&
3299+ ( angle2 < ( CYL6 * TENTH_DEGREES / CYLINDERS ) ) )
3300+ {
3301+ firingTime2 =
3302+ ( ( FIRE6_ANGLE - angle2 ) * tdcTime2 / TENTH_DEGREES ) +
3303+ angleCounter ;
3304+ }
3305+
3306+#if( CYLINDERS > 6 )
3307+
3308+ /* CYLINDER 7 */
3309+ if( ( angle2 >= ( ( CYL7 * TENTH_DEGREES / CYLINDERS ) - window ) ) &&
3310+ ( angle2 < ( CYL7 * TENTH_DEGREES / CYLINDERS ) ) )
3311+ {
3312+ firingTime2 =
3313+ ( ( FIRE7_ANGLE - angle2 ) * tdcTime2 / TENTH_DEGREES ) +
3314+ angleCounter ;
3315+ }
3316+
3317+ /* CYLINDER 8 */
3318+ if( ( angle2 >= ( ( CYL8 * TENTH_DEGREES / CYLINDERS ) - window ) ) &&
3319+ ( angle2 < ( CYL8 * TENTH_DEGREES / CYLINDERS ) ) )
3320+ {
3321+ firingTime2 =
3322+ ( ( FIRE8_ANGLE - angle2 ) * tdcTime2 / TENTH_DEGREES ) +
3323+ angleCounter ;
3324+ }
3325+
3326+#endif /* 6 cylinders */
3327+#endif /* 4 cylinders */
3328+
3329+ if( firingTime2 > MAX_VARIABLE )
3330+ {
3331+ firingTime2 -= MAX_VARIABLE ;
3332+ }
3333+
3334+#if BMDEBUG
3335+ th_sprintf( szDebug, " %10ld\n", (n_long)firingTime2 ) ;
3336+ DebugOut( szDebug ) ;
3337+#else
3338+ WriteOut( (varsize)firingTime2 ) ;
3339+#endif /* BMDEBUG */
3340+
3341+ /***********************************************************************
3342+ Third Pass
3343+ ***********************************************************************/
3344+ /* Gets 'angleCounter' value from test data*/
3345+ isTableLooped += GetInputValues() ;
3346+
3347+#if BMDEBUG
3348+ th_sprintf( szDebug, "%8ld", (n_long)angleCounter ) ;
3349+ DebugOut( szDebug ) ;
3350+#endif /* BMDEBUG */
3351+
3352+ /*
3353+ * Compute 'pulseDeltaTime' -- the difference in counter
3354+ * readings from the last pulse to the current one. Note that
3355+ * the realtime counter may roll over, so the elapsed time may
3356+ * need to be corrected when this occurs.
3357+ *
3358+ */
3359+
3360+ if( angleCounterLast3 > angleCounter )
3361+ {
3362+ pulseDeltaTime3 = angleCounter +
3363+ ( (varsize)MAX_VARIABLE - angleCounterLast3 + 3 ) ;
3364+ }
3365+ else
3366+ {
3367+ pulseDeltaTime3 = angleCounter - angleCounterLast3 ;
3368+ }
3369+ /* Update timer history */
3370+ angleCounterLast3 = angleCounter ;
3371+ /* and elapsed time for a revolution */
3372+ rotationTime3 += pulseDeltaTime3 ;
3373+
3374+#if BMDEBUG
3375+ th_sprintf( szDebug, ", %4ld", (n_long)pulseDeltaTime3 ) ;
3376+ DebugOut( szDebug ) ;
3377+#endif /* BMDEBUG */
3378+
3379+ /*
3380+ * Must detect TDC reference by noticing that the period between this
3381+ * pulse and the last one is two or three times normal. We'll set a
3382+ * flag when TDC reference occurs, and clear it on all other pulses.
3383+ * We also keep count of which pulse we're on relative to TDC reference.
3384+ *
3385+ */
3386+
3387+ if( pulseDeltaTime3 > ( TDC_TEETH * deltaTimeAvg3 * TDC_MARGIN ) )
3388+ {
3389+ isTopDeadCenter3 = true ;
3390+ pulseDeltaTime3 /= TDC_TEETH ;
3391+
3392+ /*
3393+ * Compute engine speed every TDC. Engine speed will be
3394+ * the inverse of 'tdcTime', which is the period( in CPU
3395+ * time )between TDC's. Engine speed is also scaled by
3396+ * an arbitrary constant to make it useful elsewhere in
3397+ * the engine controller.
3398+ *
3399+ */
3400+
3401+ tdcTime3 = rotationTime3 ;
3402+ rotationTime3 = 0 ;
3403+ engineSpeed3 = RPM_SCALE_FACTOR / tdcTime3 ;
3404+ toothCount3 = 0 ;
3405+ }
3406+ else
3407+ {
3408+ toothCount3++ ;
3409+ isTopDeadCenter3 = false ;
3410+ }
3411+
3412+#if BMDEBUG
3413+ th_sprintf( szDebug, ", %4d, %8ld, %5ld, %4ld", ( isTopDeadCenter3 & 1 ),
3414+ (n_long)tdcTime3, (n_long)engineSpeed3, (n_long)toothCount3 ) ;
3415+ DebugOut( szDebug ) ;
3416+#else
3417+ WriteOut( (varsize)engineSpeed3 ) ;
3418+#endif /* BMDEBUG */
3419+
3420+ /*
3421+ * Compute an average delta-T for TDC pulse discrimination.
3422+ * The delta-T will be filtered by averaging over the period
3423+ * of one cylinder( several pulses ).
3424+ *
3425+ */
3426+
3427+ deltaTimeAccum3 += pulseDeltaTime3 ;
3428+
3429+ if( ( toothCount3 > 0 ) &&
3430+ ( toothCount3 % ( tonewheelTeeth / CYLINDERS ) == 0 ) )
3431+ {
3432+ deltaTimeAvg3 = deltaTimeAccum3 / ( tonewheelTeeth / CYLINDERS ) ;
3433+ deltaTimeAccum3 = 0 ;
3434+ }
3435+
3436+#if BMDEBUG
3437+ th_sprintf( szDebug, ", %6ld, ", (n_long)deltaTimeAvg3 ) ;
3438+ DebugOut( szDebug ) ;
3439+#endif /* BMDEBUG */
3440+
3441+ angle3 = ( TENTH_DEGREES * toothCount3 / tonewheelTeeth ) ;
3442+
3443+ /*
3444+ * Now, output a value for the firing angle timer( a one-shot )
3445+ * only if we're on the tooth which precedes the firing
3446+ * angle for one of the cylinders. We presume that there is
3447+ * always a tooth which precedes each cylinder's firing angle.
3448+ * The value which is output presumably goes to a "capture/compare"
3449+ * timer which generates an interrupt used to fire that cylinder.
3450+ * Note the special treatment for the last cylinder( #4, #6, or #8 ),
3451+ * we don't subtract the 'angle' because the 360th degree of rotation
3452+ * is the same as the 0th degree of the next rotation.
3453+ *
3454+ */
3455+
3456+ /* CYLINDER 1 */
3457+ if( ( angle3 >= ( ( CYL1 * TENTH_DEGREES / CYLINDERS ) - window ) ) &&
3458+ ( angle3 < ( CYL1 * TENTH_DEGREES / CYLINDERS ) ) )
3459+ {
3460+ firingTime3 =
3461+ ( ( FIRE1_ANGLE - angle3 ) * tdcTime3 / TENTH_DEGREES ) +
3462+ angleCounter ;
3463+ }
3464+
3465+ /* CYLINDER 2 */
3466+ if( ( angle3 >= ( ( CYL2 * TENTH_DEGREES / CYLINDERS ) - window ) ) &&
3467+ ( angle3 < ( CYL2 * TENTH_DEGREES / CYLINDERS ) ) )
3468+ {
3469+ firingTime3 =
3470+ ( ( FIRE2_ANGLE - angle3 ) * tdcTime3 / TENTH_DEGREES ) +
3471+ angleCounter ;
3472+ }
3473+
3474+ /* CYLINDER 3 */
3475+ if( ( angle3 >= ( ( CYL3 * TENTH_DEGREES / CYLINDERS ) - window ) ) &&
3476+ ( angle3 <( CYL3 * TENTH_DEGREES / CYLINDERS ) ) )
3477+ {
3478+ firingTime3 =
3479+ ( ( FIRE3_ANGLE - angle3 ) * tdcTime3 / TENTH_DEGREES ) +
3480+ angleCounter ;
3481+ }
3482+
3483+ /* CYLINDER 4 */
3484+ if( ( angle3 >= ( ( CYL4 * TENTH_DEGREES / CYLINDERS ) - window ) ) &&
3485+ ( angle3 < ( CYL4 * TENTH_DEGREES / CYLINDERS ) ) )
3486+ {
3487+ firingTime3 =
3488+ ( ( FIRE4_ANGLE - angle3 ) * tdcTime3 / TENTH_DEGREES ) +
3489+ angleCounter ;
3490+ }
3491+
3492+#if( CYLINDERS > 4 )
3493+
3494+ /* CYLINDER 5 */
3495+ if( ( angle3 >= ( ( CYL5 * TENTH_DEGREES / CYLINDERS ) - window ) ) &&
3496+ ( angle3 < ( CYL5 * TENTH_DEGREES / CYLINDERS ) ) )
3497+ {
3498+ firingTime3 =
3499+ ( ( FIRE5_ANGLE - angle3 ) * tdcTime3 / TENTH_DEGREES ) +
3500+ angleCounter ;
3501+ }
3502+
3503+ /* CYLINDER 6 */
3504+ if( ( angle3 >= ( ( CYL6 * TENTH_DEGREES / CYLINDERS ) - window ) ) &&
3505+ ( angle3 < ( CYL6 * TENTH_DEGREES / CYLINDERS ) ) )
3506+ {
3507+ firingTime3 =
3508+ ( ( FIRE6_ANGLE - angle3 ) * tdcTime3 / TENTH_DEGREES ) +
3509+ angleCounter ;
3510+ }
3511+
3512+#if( CYLINDERS > 6 )
3513+
3514+ /* CYLINDER 7 */
3515+ if( ( angle3 >= ( ( CYL7 * TENTH_DEGREES / CYLINDERS ) - window ) ) &&
3516+ ( angle3 < ( CYL7 * TENTH_DEGREES / CYLINDERS ) ) )
3517+ {
3518+ firingTime3 =
3519+ ( ( FIRE7_ANGLE - angle3 ) * tdcTime3 / TENTH_DEGREES ) +
3520+ angleCounter ;
3521+ }
3522+
3523+ /* CYLINDER 8 */
3524+ if( ( angle3 >= ( ( CYL8 * TENTH_DEGREES / CYLINDERS ) - window ) ) &&
3525+ ( angle3 <( CYL8 * TENTH_DEGREES / CYLINDERS ) ) )
3526+ {
3527+ firingTime3 =
3528+ ( ( FIRE8_ANGLE - angle3 ) * tdcTime3 / TENTH_DEGREES )+
3529+ angleCounter ;
3530+ }
3531+
3532+#endif /* 6 cylinders */
3533+#endif /* 4 cylinders */
3534+
3535+ if( firingTime3 > MAX_VARIABLE )
3536+ {
3537+ firingTime3 -= MAX_VARIABLE ;
3538+ }
3539+
3540+#if BMDEBUG
3541+ th_sprintf( szDebug, " %10ld", (n_long)firingTime3 ) ;
3542+ DebugOut( szDebug ) ;
3543+ th_sprintf( szDebug, ", %08lX\n", ( n_ulong )loop_cnt ) ;
3544+ DebugOut( szDebug ) ;
3545+#else
3546+ WriteOut( (varsize)firingTime3 ) ;
3547+
3548+#if DATA_SIZE == 0 /* Might break up the loop counter */
3549+ i = (varsize)( loop_cnt &0x0000FFFF ) ;
3550+ WriteOut( i ) ; /* ...in the output file */
3551+ i = (varsize)( loop_cnt >> 16 ) ;
3552+ WriteOut( i ) ;
3553+#else
3554+ WriteOut( (varsize)loop_cnt ) ;
3555+#endif
3556+ i = (varsize)0xAAAA ;
3557+ WriteOut( i ) ; /* Flag the end of data-block */
3558+#endif /* BMDEBUG */
3559+
3560+#if BMDEBUG
3561+ if( !th_harness_poll() )
3562+ {
3563+ break ;
3564+ }
3565+#endif
3566+ }
3567+
3568+ /* Signal that we are finished */
3569+ tcdef->duration = th_signal_finished() ;
3570+
3571+ tcdef->iterations = loop_cnt;
3572+ tcdef->v1 = 0 ;
3573+ tcdef->v2 = 0 ;
3574+ tcdef->v3 = 0 ;
3575+ tcdef->v4 = 0 ;
3576+
3577+
3578+#if NON_INTRUSIVE_CRC_CHECK
3579+ tcdef->CRC=0;
3580+/* varsize is n_short or n_long, calc crc based on e_u32 */
3581+/* final answers are iteration dependent */
3582+ tcdef->CRC = Calc_crc32((e_u32)*inpAngleCount,tcdef->CRC ) ;
3583+ tcdef->CRC = Calc_crc32((e_u32)tonewheelTeeth,tcdef->CRC ) ;
3584+#elif CRC_CHECK
3585+ tcdef->CRC=0;
3586+#else
3587+ tcdef->CRC=0;
3588+#endif
3589+
3590+ return th_report_results(tcdef,EXPECTED_CRC);
3591+} /* End of function 't_run_test' */
3592+
3593+
3594+/***************************************************************************/
3595+int main(int argc, const char* argv[] )
3596+{
3597+ /* target specific inititialization */
3598+ al_main(argc, argv);
3599+ /* Benchmark Execution */
3600+ return t_run_test(&the_tcdef,argc,argv);
3601+}
3602+
3603+#if BMDEBUG
3604+
3605+n_void DebugOut( n_char *szSrc )
3606+{
3607+#if RAM_OUT == 1
3608+ n_int i ;
3609+ n_int length ;
3610+
3611+ /* Make sure we don't overwrite the end of the RAM file */
3612+ length = (n_int)strlen( szSrc ) ;
3613+
3614+ for( i = 0 ; i < length ; i++ )
3615+ {
3616+ *RAMfilePtr++ = szSrc[i] ;
3617+
3618+ if ( RAMfilePtr >= RAMfileEOF )
3619+ RAMfilePtr = RAMfile;
3620+ }
3621+#else
3622+ th_printf( szSrc ) ;
3623+#endif /* RAM_OUT */
3624+
3625+} /* End of function 'DebugOut' */
3626+
3627+#endif /* BMDEBUG */
3628+
3629+/*
3630+* Function : WriteOut
3631+*
3632+* Outputs results to the RAM file so that it can be downloaded to host for
3633+* verification. Also serves to defeat optimization which would remove the
3634+* code used to develop the results when not in DEBUG mode.
3635+*
3636+*/
3637+
3638+n_void WriteOut( varsize value )
3639+{
3640+if (( RAMfilePtr+RAMfile_increment) > RAMfileEOF )
3641+ RAMfilePtr = RAMfile;
3642+
3643+ *(varsize *)RAMfilePtr = value;
3644+ RAMfilePtr += RAMfile_increment; /* this might need to be casted back to (n_int *) ??*/
3645+
3646+} /* End of function 'WriteOut' */
3647+
3648
3649=== added directory 'automotive/a2time01/win32'
3650=== added file 'automotive/a2time01/win32/a2time01.dsp'
3651--- automotive/a2time01/win32/a2time01.dsp 1970-01-01 00:00:00 +0000
3652+++ automotive/a2time01/win32/a2time01.dsp 2013-10-07 11:04:13 +0000
3653@@ -0,0 +1,168 @@
3654+# Microsoft Developer Studio Project File - Name="A2TIME01" - Package Owner=<4>
3655+# Microsoft Developer Studio Generated Build File, Format Version 6.00
3656+# ** DO NOT EDIT **
3657+
3658+# TARGTYPE "Win32 (x86) Console Application" 0x0103
3659+
3660+CFG=A2TIME01 - Win32 Debug
3661+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
3662+!MESSAGE use the Export Makefile command and run
3663+!MESSAGE
3664+!MESSAGE NMAKE /f "A2TIME01.mak".
3665+!MESSAGE
3666+!MESSAGE You can specify a configuration when running NMAKE
3667+!MESSAGE by defining the macro CFG on the command line. For example:
3668+!MESSAGE
3669+!MESSAGE NMAKE /f "A2TIME01.mak" CFG="A2TIME01 - Win32 Debug"
3670+!MESSAGE
3671+!MESSAGE Possible choices for configuration are:
3672+!MESSAGE
3673+!MESSAGE "A2TIME01 - Win32 Release" (based on "Win32 (x86) Console Application")
3674+!MESSAGE "A2TIME01 - Win32 Debug" (based on "Win32 (x86) Console Application")
3675+!MESSAGE
3676+
3677+# Begin Project
3678+# PROP AllowPerConfigDependencies 0
3679+# PROP Scc_ProjName ""
3680+# PROP Scc_LocalPath ""
3681+CPP=cl.exe
3682+RSC=rc.exe
3683+
3684+!IF "$(CFG)" == "A2TIME01 - Win32 Release"
3685+
3686+# PROP BASE Use_MFC 0
3687+# PROP BASE Use_Debug_Libraries 0
3688+# PROP BASE Output_Dir "Release"
3689+# PROP BASE Intermediate_Dir "Release"
3690+# PROP BASE Target_Dir ""
3691+# PROP Use_MFC 0
3692+# PROP Use_Debug_Libraries 0
3693+# PROP Output_Dir "Release"
3694+# PROP Intermediate_Dir "Release"
3695+# PROP Target_Dir ""
3696+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
3697+# ADD CPP /nologo /W3 /GX /O2 /I "..\.." /I "..\..\..\th\x86\al" /I "..\..\..\th\src" /I "..\x86\al" /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
3698+# ADD BASE RSC /l 0x409 /d "NDEBUG"
3699+# ADD RSC /l 0x409 /d "NDEBUG"
3700+BSC32=bscmake.exe
3701+# ADD BASE BSC32 /nologo
3702+# ADD BSC32 /nologo
3703+LINK32=link.exe
3704+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
3705+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
3706+
3707+!ELSEIF "$(CFG)" == "A2TIME01 - Win32 Debug"
3708+
3709+# PROP BASE Use_MFC 0
3710+# PROP BASE Use_Debug_Libraries 1
3711+# PROP BASE Output_Dir "A2TIME01___Win32_Debug"
3712+# PROP BASE Intermediate_Dir "A2TIME01___Win32_Debug"
3713+# PROP BASE Target_Dir ""
3714+# PROP Use_MFC 0
3715+# PROP Use_Debug_Libraries 1
3716+# PROP Output_Dir "Debug"
3717+# PROP Intermediate_Dir "Debug"
3718+# PROP Target_Dir ""
3719+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
3720+# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\.." /I "..\..\..\th\x86\al" /I "..\..\..\th\src" /I "..\x86\al" /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c
3721+# ADD BASE RSC /l 0x409 /d "_DEBUG"
3722+# ADD RSC /l 0x409 /d "_DEBUG"
3723+BSC32=bscmake.exe
3724+# ADD BASE BSC32 /nologo
3725+# ADD BSC32 /nologo
3726+LINK32=link.exe
3727+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
3728+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
3729+
3730+!ENDIF
3731+
3732+# Begin Target
3733+
3734+# Name "A2TIME01 - Win32 Release"
3735+# Name "A2TIME01 - Win32 Debug"
3736+# Begin Group "Source Files"
3737+
3738+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
3739+# Begin Source File
3740+
3741+SOURCE=..\algotst.c
3742+# End Source File
3743+# Begin Source File
3744+
3745+SOURCE=..\bmark.c
3746+# End Source File
3747+# End Group
3748+# Begin Group "Header Files"
3749+
3750+# PROP Default_Filter "h;hpp;hxx;hm;inl"
3751+# Begin Source File
3752+
3753+SOURCE=..\algo.h
3754+# End Source File
3755+# End Group
3756+# Begin Group "Resource Files"
3757+
3758+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
3759+# End Group
3760+# Begin Group "AL"
3761+
3762+# PROP Default_Filter ""
3763+# Begin Source File
3764+
3765+SOURCE=..\..\..\th\x86\al\eembc_dt.h
3766+# End Source File
3767+# Begin Source File
3768+
3769+SOURCE=..\..\..\th\x86\al\thal.c
3770+# End Source File
3771+# Begin Source File
3772+
3773+SOURCE=..\..\..\th\x86\al\thcfg.h
3774+# End Source File
3775+# End Group
3776+# Begin Group "FL"
3777+
3778+# PROP Default_Filter ""
3779+# Begin Source File
3780+
3781+SOURCE=..\..\..\th\src\anytoi.c
3782+# End Source File
3783+# Begin Source File
3784+
3785+SOURCE=..\..\..\th\src\crc.c
3786+# End Source File
3787+# Begin Source File
3788+
3789+SOURCE=..\..\..\th\src\heap.c
3790+# End Source File
3791+# Begin Source File
3792+
3793+SOURCE=..\..\..\th\src\memmgr.c
3794+# End Source File
3795+# Begin Source File
3796+
3797+SOURCE=..\..\..\th\src\printfe.c
3798+# End Source File
3799+# Begin Source File
3800+
3801+SOURCE=..\..\..\th\src\ssubs.c
3802+# End Source File
3803+# Begin Source File
3804+
3805+SOURCE=..\..\..\th\src\therror.c
3806+# End Source File
3807+# Begin Source File
3808+
3809+SOURCE=..\..\..\th\src\thfl.c
3810+# End Source File
3811+# Begin Source File
3812+
3813+SOURCE=..\..\..\th\src\thlib.c
3814+# End Source File
3815+# Begin Source File
3816+
3817+SOURCE=..\..\..\th\src\uuencode.c
3818+# End Source File
3819+# End Group
3820+# End Target
3821+# End Project
3822
3823=== added file 'automotive/a2time01/win32/a2time01_lite.dsp'
3824--- automotive/a2time01/win32/a2time01_lite.dsp 1970-01-01 00:00:00 +0000
3825+++ automotive/a2time01/win32/a2time01_lite.dsp 2013-10-07 11:04:13 +0000
3826@@ -0,0 +1,156 @@
3827+# Microsoft Developer Studio Project File - Name="A2TIME01_Lite" - Package Owner=<4>
3828+# Microsoft Developer Studio Generated Build File, Format Version 6.00
3829+# ** DO NOT EDIT **
3830+
3831+# TARGTYPE "Win32 (x86) Console Application" 0x0103
3832+
3833+CFG=A2TIME01_Lite - Win32 Debug
3834+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
3835+!MESSAGE use the Export Makefile command and run
3836+!MESSAGE
3837+!MESSAGE NMAKE /f "A2TIME01_Lite.mak".
3838+!MESSAGE
3839+!MESSAGE You can specify a configuration when running NMAKE
3840+!MESSAGE by defining the macro CFG on the command line. For example:
3841+!MESSAGE
3842+!MESSAGE NMAKE /f "A2TIME01_Lite.mak" CFG="A2TIME01_Lite - Win32 Debug"
3843+!MESSAGE
3844+!MESSAGE Possible choices for configuration are:
3845+!MESSAGE
3846+!MESSAGE "A2TIME01_Lite - Win32 Release" (based on "Win32 (x86) Console Application")
3847+!MESSAGE "A2TIME01_Lite - Win32 Debug" (based on "Win32 (x86) Console Application")
3848+!MESSAGE
3849+
3850+# Begin Project
3851+# PROP AllowPerConfigDependencies 0
3852+# PROP Scc_ProjName ""
3853+# PROP Scc_LocalPath ""
3854+CPP=cl.exe
3855+RSC=rc.exe
3856+
3857+!IF "$(CFG)" == "A2TIME01_Lite - Win32 Release"
3858+
3859+# PROP BASE Use_MFC 0
3860+# PROP BASE Use_Debug_Libraries 0
3861+# PROP BASE Output_Dir "Release"
3862+# PROP BASE Intermediate_Dir "Release"
3863+# PROP BASE Target_Dir ""
3864+# PROP Use_MFC 0
3865+# PROP Use_Debug_Libraries 0
3866+# PROP Output_Dir "Release_Lite"
3867+# PROP Intermediate_Dir "Release_Lite"
3868+# PROP Target_Dir ""
3869+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
3870+# ADD CPP /nologo /W3 /GX /O2 /I "..\.." /I "..\..\..\th_Lite\x86\al" /I "..\..\..\th_Lite\src" /I "..\x86\al" /I "..\src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
3871+# ADD BASE RSC /l 0x409 /d "NDEBUG"
3872+# ADD RSC /l 0x409 /d "NDEBUG"
3873+BSC32=bscmake.exe
3874+# ADD BASE BSC32 /nologo
3875+# ADD BSC32 /nologo
3876+LINK32=link.exe
3877+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
3878+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
3879+
3880+!ELSEIF "$(CFG)" == "A2TIME01_Lite - Win32 Debug"
3881+
3882+# PROP BASE Use_MFC 0
3883+# PROP BASE Use_Debug_Libraries 1
3884+# PROP BASE Output_Dir "A2TIME01_Lite___Win32_Debug"
3885+# PROP BASE Intermediate_Dir "A2TIME01_Lite___Win32_Debug"
3886+# PROP BASE Target_Dir ""
3887+# PROP Use_MFC 0
3888+# PROP Use_Debug_Libraries 1
3889+# PROP Output_Dir "Debug_Lite"
3890+# PROP Intermediate_Dir "Debug_Lite"
3891+# PROP Target_Dir ""
3892+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
3893+# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\.." /I "..\..\..\th_Lite\x86\al" /I "..\..\..\th_Lite\src" /I "..\x86\al" /I "..\src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c
3894+# ADD BASE RSC /l 0x409 /d "_DEBUG"
3895+# ADD RSC /l 0x409 /d "_DEBUG"
3896+BSC32=bscmake.exe
3897+# ADD BASE BSC32 /nologo
3898+# ADD BSC32 /nologo
3899+LINK32=link.exe
3900+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
3901+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
3902+
3903+!ENDIF
3904+
3905+# Begin Target
3906+
3907+# Name "A2TIME01_Lite - Win32 Release"
3908+# Name "A2TIME01_Lite - Win32 Debug"
3909+# Begin Group "Source Files"
3910+
3911+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
3912+# Begin Source File
3913+
3914+SOURCE=..\algotst.c
3915+# End Source File
3916+# Begin Source File
3917+
3918+SOURCE=..\bmark_lite.c
3919+# End Source File
3920+# End Group
3921+# Begin Group "Header Files"
3922+
3923+# PROP Default_Filter "h;hpp;hxx;hm;inl"
3924+# Begin Source File
3925+
3926+SOURCE=..\algo.h
3927+# End Source File
3928+# End Group
3929+# Begin Group "Resource Files"
3930+
3931+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
3932+# End Group
3933+# Begin Group "FL"
3934+
3935+# PROP Default_Filter ""
3936+# Begin Source File
3937+
3938+SOURCE=..\..\..\th_Lite\src\crc.c
3939+# End Source File
3940+# Begin Source File
3941+
3942+SOURCE=..\..\..\th_Lite\src\eembc_dt.h
3943+# End Source File
3944+# Begin Source File
3945+
3946+SOURCE=..\..\..\th_Lite\src\heap.c
3947+# End Source File
3948+# Begin Source File
3949+
3950+SOURCE=..\..\..\th_Lite\src\heap.h
3951+# End Source File
3952+# Begin Source File
3953+
3954+SOURCE=..\..\..\th_Lite\src\thal.h
3955+# End Source File
3956+# Begin Source File
3957+
3958+SOURCE=..\..\..\th_Lite\src\thlib.c
3959+# End Source File
3960+# Begin Source File
3961+
3962+SOURCE=..\..\..\th_Lite\src\thlib.h
3963+# End Source File
3964+# End Group
3965+# Begin Group "AL"
3966+
3967+# PROP Default_Filter ""
3968+# Begin Source File
3969+
3970+SOURCE=..\..\..\th_lite\x86\al\heapport.h
3971+# End Source File
3972+# Begin Source File
3973+
3974+SOURCE=..\..\..\th_lite\x86\al\thal.c
3975+# End Source File
3976+# Begin Source File
3977+
3978+SOURCE=..\..\..\th_lite\x86\al\thcfg.h
3979+# End Source File
3980+# End Group
3981+# End Target
3982+# End Project
3983
3984=== added directory 'automotive/aifftr01'
3985=== added file 'automotive/aifftr01/algo.h'
3986--- automotive/aifftr01/algo.h 1970-01-01 00:00:00 +0000
3987+++ automotive/aifftr01/algo.h 2013-10-07 11:04:13 +0000
3988@@ -0,0 +1,153 @@
3989+/*==============================================================================
3990+ *$RCSfile: algo.h,v $
3991+ *
3992+ * DESC : Fast Fourier Transform
3993+ *
3994+ * AUTHOR : dt
3995+ *
3996+ * EEMBC : Automotive/Industrial Subcommittee
3997+ *
3998+ * CVS : $Revision: 1.2 $
3999+ * $Date: 2002/04/25 20:10:43 $
4000+ * $Author: rick $
4001+ * $Source: d:/cvs/eembc2/automotive/aifftr01/algo.h,v $
4002+ *
4003+ * NOTE :
4004+ *
4005+ *------------------------------------------------------------------------------
4006+ *
4007+ * HISTORY :
4008+ *
4009+ * $Log: algo.h,v $
4010+ * Revision 1.2 2002/04/25 20:10:43 rick
4011+ * sprintf to th_sprintf
4012+ *
4013+ *
4014+ *------------------------------------------------------------------------------
4015+ * Copyright (c) 1998-2002 by the EDN Embedded Microprocessor
4016+ * Benchmark Consortium (EEMBC), Inc.
4017+ *
4018+ * All Rights Reserved. This is licensed program product and
4019+ * is owned by EEMBC. The Licensee understands and agrees that the
4020+ * Benchmarks licensed by EEMBC hereunder (including methods or concepts
4021+ * utilized therein) contain certain information that is confidential
4022+ * and proprietary which the Licensee expressly agrees to retain in the
4023+ * strictest confidence and to use only in conjunction with the Benchmarks
4024+ * pursuant to the terms of this Agreement. The Licensee further agrees
4025+ * to keep the source code and all related documentation confidential and
4026+ * not to disclose such source code and/or related documentation to any
4027+ * third party. The Licensee and any READER of this code is subject to
4028+ * either the EEMBC Member License Agreement and/or the EEMBC Licensee
4029+ * Agreement.
4030+ * TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, EEMBC DISCLAIMS ALL
4031+ * WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
4032+ * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR
4033+ * PURPOSE, WITH REGARD TO THE BENCHMARKS AND THE ACCOMPANYING
4034+ * DOCUMENTATION. LICENSEE ACKNOWLEDGES AND AGREES THAT THERE ARE NO
4035+ * WARRANTIES, GUARANTIES, CONDITIONS, COVENANTS, OR REPRESENTATIONS BY
4036+ * EEMBC AS TO MARKETABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR OTHER
4037+ * ATTRIBUTES, WHETHER EXPRESS OR IMPLIED (IN LAW OR IN FACT), ORAL OR
4038+ * WRITTEN.
4039+ *
4040+ * Licensee hereby agrees by accessing this source code that all benchmark
4041+ * scores related to this code must be certified by ECL prior to publication
4042+ * in any media, form, distribution, or other means of conveyance of
4043+ * information subject to the terms of the EEMBC Member License Agreement
4044+ * and/or EEMBC Licensee Agreement.
4045+ *
4046+ * Other Copyright Notice (if any):
4047+ *
4048+ * For conditions of distribution and use, see the accompanying README file.
4049+ * ===========================================================================*/
4050+
4051+#ifndef __ALGO_H
4052+#define __ALGO_H
4053+
4054+/*******************************************************************************
4055+ Includes (thlib.h provides eembc_dt.h for us)
4056+*******************************************************************************/
4057+
4058+#include "thlib.h"
4059+#include <stdio.h>
4060+#include <stdlib.h>
4061+#include <string.h>
4062+#include <math.h>
4063+
4064+/* PLATFORM-SPECIFIC DEFINITIONS */
4065+
4066+/* Compilation switches to be defined( or not )based on application follow */
4067+
4068+/* Define( =1 )when compiling for 32-bit variables */
4069+
4070+/* ...or( =0 )when compiling for 16-bit variables */
4071+
4072+#define DATA_SIZE 1
4073+
4074+#if DATA_SIZE == 1 /* LONG variables */
4075+typedef n_long varsize ; /* Data and variables are 32 bits */
4076+#else /* Else, SHORT variables */
4077+typedef n_short varsize ; /* Data and variables are 16 bits */
4078+#endif /* DATA_SIZE */
4079+
4080+/* Define( =1 )to direct debug text to RAM file */
4081+
4082+/* ...or( =0 )to direct debug text to console */
4083+
4084+#define RAM_OUT 0
4085+
4086+/*******************************************************************************
4087+ Defines
4088+*******************************************************************************/
4089+
4090+#define false 0
4091+#define true !false
4092+
4093+#if (BMDEBUG && RAM_OUT == 1) /* Debug buffer size == 32K */
4094+#define MAX_FILESIZE 8192 /* Maximum size of output file */
4095+#else
4096+#define MAX_FILESIZE 256 /* Maximum size of output file */
4097+#endif
4098+#define NUM_TESTS 4096 /* Number of sets of input test data stimuli */
4099+#define VAR_COUNT 3 /* Number of variables which must be allocated */
4100+#define HEADER_SIZE 100 /* Approximate size of title and header messages */
4101+
4102+#define NUM_POINTS 512 /* Number of points in FFT */
4103+#define FFT_LENGTH 9 /* length = log2( NUM_POINTS )*/
4104+
4105+#ifdef PI
4106+#undef PI
4107+#endif
4108+#define PI 3.141592654
4109+
4110+/* TRIG_SCALE_FACTOR is used for greatest twiddle factor precision */
4111+#define TRIG_SCALE_FACTOR 32768
4112+
4113+/* BUTTERFLY_SCALE_FACTOR = log2( TRIG_SCALE_FACTOR )is used to
4114+accomodate accumulator size limit of 32 bits */
4115+#define BUTTERFLY_SCALE_FACTOR 15 /* Divide by 32768 */
4116+
4117+/* STAGE_SCALE_FACTOR is used to prevent overflow from
4118+accumulation at each processing stage */
4119+#define STAGE_SCALE_FACTOR 1 /* Divide by 2 */
4120+
4121+/*******************************************************************************
4122+ Global Variables
4123+*******************************************************************************/
4124+
4125+#ifndef ALGO_GLOBALS /* Don't define these twice! */
4126+
4127+extern n_int tableCount ; /* Number of passes through table */
4128+extern varsize *inpSignal ; /* Pointer to array of input signal data values */
4129+
4130+#endif /* ALGO_GLOBALS */
4131+
4132+/*******************************************************************************
4133+ Function Prototypes
4134+*******************************************************************************/
4135+
4136+n_int GetTestData( n_void ) ;
4137+n_int GetInputValues( varsize *, varsize * ) ;
4138+n_void DebugOut( n_char * ) ;
4139+n_void WriteOut( varsize ) ;
4140+
4141+#endif /* __ALGO_H */
4142
4143=== added file 'automotive/aifftr01/algotst.c'
4144--- automotive/aifftr01/algotst.c 1970-01-01 00:00:00 +0000
4145+++ automotive/aifftr01/algotst.c 2013-10-07 11:04:13 +0000
4146@@ -0,0 +1,8343 @@
4147+/*==============================================================================
4148+ *$RCSfile: algotst.c,v $
4149+ *
4150+ * DESC : Algorithm #16 : FFT - Fast Fourier Transform - aifftr01
4151+ *
4152+ * EEMBC : Automotive/Industrial Subcommittee
4153+ *
4154+ * CVS : $Revision: 1.3 $
4155+ * $Date: 2002/04/10 19:36:56 $
4156+ * $Author: rick $
4157+ * $Source: d:/cvs/eembc2/automotive/aifftr01/algotst.c,v $
4158+ *
4159+ * NOTE :
4160+ *
4161+ *------------------------------------------------------------------------------
4162+ *
4163+ * HISTORY :
4164+ *
4165+ * $Log: algotst.c,v $
4166+ * Revision 1.3 2002/04/10 19:36:56 rick
4167+ * Fixes to reduce Lite vs. Regular variances in timing
4168+ *
4169+ *
4170+ *------------------------------------------------------------------------------
4171+ * Copyright (c) 1998-2002 by the EDN Embedded Microprocessor
4172+ * Benchmark Consortium (EEMBC), Inc.
4173+ *
4174+ * All Rights Reserved. This is licensed program product and
4175+ * is owned by EEMBC. The Licensee understands and agrees that the
4176+ * Benchmarks licensed by EEMBC hereunder (including methods or concepts
4177+ * utilized therein) contain certain information that is confidential
4178+ * and proprietary which the Licensee expressly agrees to retain in the
4179+ * strictest confidence and to use only in conjunction with the Benchmarks
4180+ * pursuant to the terms of this Agreement. The Licensee further agrees
4181+ * to keep the source code and all related documentation confidential and
4182+ * not to disclose such source code and/or related documentation to any
4183+ * third party. The Licensee and any READER of this code is subject to
4184+ * either the EEMBC Member License Agreement and/or the EEMBC Licensee
4185+ * Agreement.
4186+ * TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, EEMBC DISCLAIMS ALL
4187+ * WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
4188+ * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR
4189+ * PURPOSE, WITH REGARD TO THE BENCHMARKS AND THE ACCOMPANYING
4190+ * DOCUMENTATION. LICENSEE ACKNOWLEDGES AND AGREES THAT THERE ARE NO
4191+ * WARRANTIES, GUARANTIES, CONDITIONS, COVENANTS, OR REPRESENTATIONS BY
4192+ * EEMBC AS TO MARKETABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR OTHER
4193+ * ATTRIBUTES, WHETHER EXPRESS OR IMPLIED (IN LAW OR IN FACT), ORAL OR
4194+ * WRITTEN.
4195+ *
4196+ * Licensee hereby agrees by accessing this source code that all benchmark
4197+ * scores related to this code must be certified by ECL prior to publication
4198+ * in any media, form, distribution, or other means of conveyance of
4199+ * information subject to the terms of the EEMBC Member License Agreement
4200+ * and/or EEMBC Licensee Agreement.
4201+ *
4202+ * Other Copyright Notice (if any):
4203+ *
4204+ * For conditions of distribution and use, see the accompanying README file.
4205+ * ===========================================================================*/
4206+
4207+/*******************************************************************************
4208+ Includes
4209+*******************************************************************************/
4210+
4211+#include "algo.h"
4212+
4213+/* DECLARATIONS */
4214+
4215+/*
4216+* The following test data represents the sampled signal input to the FFT.
4217+*
4218+*/
4219+
4220+const varsize inpSignalROM[] =
4221+{
4222+
4223+ 0,
4224+
4225+ 0, /* xsine512_t.dat */
4226+
4227+ 19260,
4228+
4229+ 0,
4230+
4231+ 31164,
4232+
4233+ 0,
4234+
4235+ 31164,
4236+
4237+ 0,
4238+
4239+ 19260,
4240+
4241+ 0,
4242+
4243+ 0,
4244+
4245+ 0,
4246+
4247+ -19260,
4248+
4249+ 0,
4250+
4251+ -31164,
4252+
4253+ 0,
4254+
4255+ -31164,
4256+
4257+ 0,
4258+
4259+ -19260,
4260+
4261+ 0,
4262+
4263+ 0,
4264+
4265+ 0,
4266+
4267+ 19260,
4268+
4269+ 0,
4270+
4271+ 31164,
4272+
4273+ 0,
4274+
4275+ 31164,
4276+
4277+ 0,
4278+
4279+ 19260,
4280+
4281+ 0,
4282+
4283+ 0,
4284+
4285+ 0,
4286+
4287+ -19260,
4288+
4289+ 0,
4290+
4291+ -31164,
4292+
4293+ 0,
4294+
4295+ -31164,
4296+
4297+ 0,
4298+
4299+ -19260,
4300+
4301+ 0,
4302+
4303+ 0,
4304+
4305+ 0,
4306+
4307+ 19260,
4308+
4309+ 0,
4310+
4311+ 31164,
4312+
4313+ 0,
4314+
4315+ 31164,
4316+
4317+ 0,
4318+
4319+ 19260,
4320+
4321+ 0,
4322+
4323+ 0,
4324+
4325+ 0,
4326+
4327+ -19261,
4328+
4329+ 0,
4330+
4331+ -31164,
4332+
4333+ 0,
4334+
4335+ -31164,
4336+
4337+ 0,
4338+
4339+ -19260,
4340+
4341+ 0,
4342+
4343+ 0,
4344+
4345+ 0,
4346+
4347+ 19261,
4348+
4349+ 0,
4350+
4351+ 31164,
4352+
4353+ 0,
4354+
4355+ 31163,
4356+
4357+ 0,
4358+
4359+ 19259,
4360+
4361+ 0,
4362+
4363+ 0,
4364+
4365+ 0,
4366+
4367+ -19261,
4368+
4369+ 0,
4370+
4371+ -31164,
4372+
4373+ 0,
4374+
4375+ -31163,
4376+
4377+ 0,
4378+
4379+ -19259,
4380+
4381+ 0,
4382+
4383+ 0,
4384+
4385+ 0,
4386+
4387+ 19261,
4388+
4389+ 0,
4390+
4391+ 31164,
4392+
4393+ 0,
4394+
4395+ 31163,
4396+
4397+ 0,
4398+
4399+ 19259,
4400+
4401+ 0,
4402+
4403+ -1,
4404+
4405+ 0,
4406+
4407+ -19261,
4408+
4409+ 0,
4410+
4411+ -31164,
4412+
4413+ 0,
4414+
4415+ -31163,
4416+
4417+ 0,
4418+
4419+ -19259,
4420+
4421+ 0,
4422+
4423+ 1,
4424+
4425+ 0,
4426+
4427+ 19261,
4428+
4429+ 0,
4430+
4431+ 31164,
4432+
4433+ 0,
4434+
4435+ 31163,
4436+
4437+ 0,
4438+
4439+ 19259,
4440+
4441+ 0,
4442+
4443+ -1,
4444+
4445+ 0,
4446+
4447+ -19261,
4448+
4449+ 0,
4450+
4451+ -31164,
4452+
4453+ 0,
4454+
4455+ -31163,
4456+
4457+ 0,
4458+
4459+ -19259,
4460+
4461+ 0,
4462+
4463+ 1,
4464+
4465+ 0,
4466+
4467+ 19261,
4468+
4469+ 0,
4470+
4471+ 31164,
4472+
4473+ 0,
4474+
4475+ 31163,
4476+
4477+ 0,
4478+
4479+ 19259,
4480+
4481+ 0,
4482+
4483+ -1,
4484+
4485+ 0,
4486+
4487+ -19261,
4488+
4489+ 0,
4490+
4491+ -31164,
4492+
4493+ 0,
4494+
4495+ -31163,
4496+
4497+ 0,
4498+
4499+ -19259,
4500+
4501+ 0,
4502+
4503+ 1,
4504+
4505+ 0,
4506+
4507+ 19261,
4508+
4509+ 0,
4510+
4511+ 31164,
4512+
4513+ 0,
4514+
4515+ 31163,
4516+
4517+ 0,
4518+
4519+ 19259,
4520+
4521+ 0,
4522+
4523+ -1,
4524+
4525+ 0,
4526+
4527+ -19261,
4528+
4529+ 0,
4530+
4531+ -31164,
4532+
4533+ 0,
4534+
4535+ -31163,
4536+
4537+ 0,
4538+
4539+ -19259,
4540+
4541+ 0,
4542+
4543+ 1,
4544+
4545+ 0,
4546+
4547+ 19262,
4548+
4549+ 0,
4550+
4551+ 31164,
4552+
4553+ 0,
4554+
4555+ 31163,
4556+
4557+ 0,
4558+
4559+ 19258,
4560+
4561+ 0,
4562+
4563+ -1,
4564+
4565+ 0,
4566+
4567+ -19262,
4568+
4569+ 0,
4570+
4571+ -31164,
4572+
4573+ 0,
4574+
4575+ -31163,
4576+
4577+ 0,
4578+
4579+ -19258,
4580+
4581+ 0,
4582+
4583+ 2,
4584+
4585+ 0,
4586+
4587+ 19262,
4588+
4589+ 0,
4590+
4591+ 31164,
4592+
4593+ 0,
4594+
4595+ 31163,
4596+
4597+ 0,
4598+
4599+ 19258,
4600+
4601+ 0,
4602+
4603+ -2,
4604+
4605+ 0,
4606+
4607+ -19262,
4608+
4609+ 0,
4610+
4611+ -31164,
4612+
4613+ 0,
4614+
4615+ -31163,
4616+
4617+ 0,
4618+
4619+ -19258,
4620+
4621+ 0,
4622+
4623+ 2,
4624+
4625+ 0,
4626+
4627+ 19262,
4628+
4629+ 0,
4630+
4631+ 31164,
4632+
4633+ 0,
4634+
4635+ 31163,
4636+
4637+ 0,
4638+
4639+ 19258,
4640+
4641+ 0,
4642+
4643+ -2,
4644+
4645+ 0,
4646+
4647+ -19262,
4648+
4649+ 0,
4650+
4651+ -31164,
4652+
4653+ 0,
4654+
4655+ -31163,
4656+
4657+ 0,
4658+
4659+ -19258,
4660+
4661+ 0,
4662+
4663+ 2,
4664+
4665+ 0,
4666+
4667+ 19262,
4668+
4669+ 0,
4670+
4671+ 31165,
4672+
4673+ 0,
4674+
4675+ 31163,
4676+
4677+ 0,
4678+
4679+ 19258,
4680+
4681+ 0,
4682+
4683+ -2,
4684+
4685+ 0,
4686+
4687+ -19262,
4688+
4689+ 0,
4690+
4691+ -31165,
4692+
4693+ 0,
4694+
4695+ -31163,
4696+
4697+ 0,
4698+
4699+ -19258,
4700+
4701+ 0,
4702+
4703+ 2,
4704+
4705+ 0,
4706+
4707+ 19262,
4708+
4709+ 0,
4710+
4711+ 31165,
4712+
4713+ 0,
4714+
4715+ 31163,
4716+
4717+ 0,
4718+
4719+ 19258,
4720+
4721+ 0,
4722+
4723+ -2,
4724+
4725+ 0,
4726+
4727+ -19262,
4728+
4729+ 0,
4730+
4731+ -31165,
4732+
4733+ 0,
4734+
4735+ -31163,
4736+
4737+ 0,
4738+
4739+ -19258,
4740+
4741+ 0,
4742+
4743+ 3,
4744+
4745+ 0,
4746+
4747+ 19263,
4748+
4749+ 0,
4750+
4751+ 31165,
4752+
4753+ 0,
4754+
4755+ 31163,
4756+
4757+ 0,
4758+
4759+ 19258,
4760+
4761+ 0,
4762+
4763+ -3,
4764+
4765+ 0,
4766+
4767+ -19263,
4768+
4769+ 0,
4770+
4771+ -31165,
4772+
4773+ 0,
4774+
4775+ -31163,
4776+
4777+ 0,
4778+
4779+ -19257,
4780+
4781+ 0,
4782+
4783+ 3,
4784+
4785+ 0,
4786+
4787+ 19263,
4788+
4789+ 0,
4790+
4791+ 31165,
4792+
4793+ 0,
4794+
4795+ 31163,
4796+
4797+ 0,
4798+
4799+ 19257,
4800+
4801+ 0,
4802+
4803+ -3,
4804+
4805+ 0,
4806+
4807+ -19263,
4808+
4809+ 0,
4810+
4811+ -31165,
4812+
4813+ 0,
4814+
4815+ -31163,
4816+
4817+ 0,
4818+
4819+ -19257,
4820+
4821+ 0,
4822+
4823+ 3,
4824+
4825+ 0,
4826+
4827+ 19263,
4828+
4829+ 0,
4830+
4831+ 31165,
4832+
4833+ 0,
4834+
4835+ 31163,
4836+
4837+ 0,
4838+
4839+ 19257,
4840+
4841+ 0,
4842+
4843+ -3,
4844+
4845+ 0,
4846+
4847+ -19263,
4848+
4849+ 0,
4850+
4851+ -31165,
4852+
4853+ 0,
4854+
4855+ -31163,
4856+
4857+ 0,
4858+
4859+ -19257,
4860+
4861+ 0,
4862+
4863+ 3,
4864+
4865+ 0,
4866+
4867+ 19263,
4868+
4869+ 0,
4870+
4871+ 31165,
4872+
4873+ 0,
4874+
4875+ 31163,
4876+
4877+ 0,
4878+
4879+ 19257,
4880+
4881+ 0,
4882+
4883+ -3,
4884+
4885+ 0,
4886+
4887+ -19263,
4888+
4889+ 0,
4890+
4891+ -31165,
4892+
4893+ 0,
4894+
4895+ -31163,
4896+
4897+ 0,
4898+
4899+ -19257,
4900+
4901+ 0,
4902+
4903+ 3,
4904+
4905+ 0,
4906+
4907+ 19263,
4908+
4909+ 0,
4910+
4911+ 31165,
4912+
4913+ 0,
4914+
4915+ 31162,
4916+
4917+ 0,
4918+
4919+ 19257,
4920+
4921+ 0,
4922+
4923+ -4,
4924+
4925+ 0,
4926+
4927+ -19263,
4928+
4929+ 0,
4930+
4931+ -31165,
4932+
4933+ 0,
4934+
4935+ -31162,
4936+
4937+ 0,
4938+
4939+ -19257,
4940+
4941+ 0,
4942+
4943+ 4,
4944+
4945+ 0,
4946+
4947+ 19263,
4948+
4949+ 0,
4950+
4951+ 31165,
4952+
4953+ 0,
4954+
4955+ 31162,
4956+
4957+ 0,
4958+
4959+ 19257,
4960+
4961+ 0,
4962+
4963+ -4,
4964+
4965+ 0,
4966+
4967+ -19264,
4968+
4969+ 0,
4970+
4971+ -31165,
4972+
4973+ 0,
4974+
4975+ -31162,
4976+
4977+ 0,
4978+
4979+ -19256,
4980+
4981+ 0,
4982+
4983+ 4,
4984+
4985+ 0,
4986+
4987+ 19264,
4988+
4989+ 0,
4990+
4991+ 31165,
4992+
4993+ 0,
4994+
4995+ 31162,
4996+
4997+ 0,
4998+
4999+ 19256,
5000+
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to all changes: