Add other project to tests.
[bertos.git] / boards / sam3n-ek / benchmark / kernel_footprint / cfg / cfg_ramp.h
1  /**
2  * \file
3  * <!--
4  * This file is part of BeRTOS.
5  *
6  * Bertos is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19  *
20  * As a special exception, you may use this file as part of a free software
21  * library without restriction.  Specifically, if other files instantiate
22  * templates or use macros or inline functions from this file, or you compile
23  * this file and link it with other files to produce an executable, this
24  * file does not by itself cause the resulting executable to be covered by
25  * the GNU General Public License.  This exception does not however
26  * invalidate any other reasons why the executable file might be covered by
27  * the GNU General Public License.
28  *
29  * Copyright 2008 Develer S.r.l. (http://www.develer.com/)
30  *
31  * -->
32  *
33  * \brief Configuration file Ramp algorithm module.
34  *
35  * \author Daniele Basile <asterix@develer.com>
36  */
37
38 #ifndef CFG_RAMP_H
39 #define CFG_RAMP_H
40
41 /**
42  * Define whether the ramp will use floating point calculation within ramp_evaluate().
43  * Otherwise, a less precise fixed point version will be used, which is faster on
44  * platforms which do no support floating point operations.
45  *
46  * \note Floating point operations will be always done within ramp_compute() to
47  * precalculate values, so there has to be at least a floating point emulation support.
48  *
49  * $WIZ$ type = "boolean"
50  */
51 #define RAMP_USE_FLOATING_POINT   0
52
53
54 #if !RAMP_USE_FLOATING_POINT
55
56         /**
57          * Number of least-significant bits which are stripped away during ramp evaluation.
58          * This setting allows to specify larger ramps at the price of less precision.
59          *
60          * The maximum ramp size allowed is 2^(24 + RAMP_CLOCK_SHIFT_PRECISION), in clocks.
61          * For instance, using RAMP_CLOCK_SHIFT_PRECISION 1, and a 8x prescaler, the maximum
62          * length of a ramp is about 6.7 secs. Raising RAMP_CLOCK_SHIFT_PRECISION to 2
63          * brings the maximum length to 13.4 secs, at the price of less precision.
64          *
65          * ramp_compute() will check that the length is below the maximum allowed through
66          * a runtime assertion.
67          *
68          * \note This macro is used only for the fixed-point version of the ramp.
69          * $WIZ$ type = "int"
70          * $WIZ$ min = 0
71          * $WIZ$ max = 32
72          */
73         #define RAMP_CLOCK_SHIFT_PRECISION 2
74 #endif
75
76
77 /**
78 * Negative pulse width for ramp.
79 * $WIZ$ type = "int"
80 * $WIZ$ min = 1
81 */
82 #define RAMP_PULSE_WIDTH    50
83
84 /**
85  * Default ramp time (microsecs).
86  * $WIZ$ type = "int"
87  * $WIZ$ min = 1000
88  */
89 #define RAMP_DEF_TIME     6000000UL
90 /**
91  * Default ramp maxfreq (Hz).
92  * $WIZ$ type = "int"
93  * $WIZ$ min = 1
94  */
95 #define RAMP_DEF_MAXFREQ       5000
96 /**
97  * Default ramp minfreq (Hz).
98  * $WIZ$ type = "int"
99  * $WIZ$ min = 1
100  */
101 #define RAMP_DEF_MINFREQ        200
102 /**
103  * Default ramp powerrun (deciampere).
104  * $WIZ$ type = "int"
105  * $WIZ$ min = 0
106  */
107 #define RAMP_DEF_POWERRUN        10
108 /**
109  * Default ramp poweridle (Hz).
110  * $WIZ$ type = "int"
111  * $WIZ$ min = 0
112  */
113 #define RAMP_DEF_POWERIDLE        1
114
115 #endif /* CFG_RAMP_H */