1 |
1254 |
phoenix |
# ====================================================================
|
2 |
|
|
#
|
3 |
|
|
# counters.cdl
|
4 |
|
|
#
|
5 |
|
|
# configuration data related to the kernel counters and clocks
|
6 |
|
|
#
|
7 |
|
|
# ====================================================================
|
8 |
|
|
#####ECOSGPLCOPYRIGHTBEGIN####
|
9 |
|
|
## -------------------------------------------
|
10 |
|
|
## This file is part of eCos, the Embedded Configurable Operating System.
|
11 |
|
|
## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
|
12 |
|
|
##
|
13 |
|
|
## eCos is free software; you can redistribute it and/or modify it under
|
14 |
|
|
## the terms of the GNU General Public License as published by the Free
|
15 |
|
|
## Software Foundation; either version 2 or (at your option) any later version.
|
16 |
|
|
##
|
17 |
|
|
## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
|
18 |
|
|
## WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
19 |
|
|
## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
20 |
|
|
## for more details.
|
21 |
|
|
##
|
22 |
|
|
## You should have received a copy of the GNU General Public License along
|
23 |
|
|
## with eCos; if not, write to the Free Software Foundation, Inc.,
|
24 |
|
|
## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
25 |
|
|
##
|
26 |
|
|
## As a special exception, if other files instantiate templates or use macros
|
27 |
|
|
## or inline functions from this file, or you compile this file and link it
|
28 |
|
|
## with other works to produce a work based on this file, this file does not
|
29 |
|
|
## by itself cause the resulting work to be covered by the GNU General Public
|
30 |
|
|
## License. However the source code for this file must still be made available
|
31 |
|
|
## in accordance with section (3) of the GNU General Public License.
|
32 |
|
|
##
|
33 |
|
|
## This exception does not invalidate any other reasons why a work based on
|
34 |
|
|
## this file might be covered by the GNU General Public License.
|
35 |
|
|
##
|
36 |
|
|
## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
|
37 |
|
|
## at http://sources.redhat.com/ecos/ecos-license/
|
38 |
|
|
## -------------------------------------------
|
39 |
|
|
#####ECOSGPLCOPYRIGHTEND####
|
40 |
|
|
# ====================================================================
|
41 |
|
|
######DESCRIPTIONBEGIN####
|
42 |
|
|
#
|
43 |
|
|
# Author(s): jskov
|
44 |
|
|
# Original data: nickg
|
45 |
|
|
# Contributors:
|
46 |
|
|
# Date: 1999-07-05
|
47 |
|
|
#
|
48 |
|
|
#####DESCRIPTIONEND####
|
49 |
|
|
#
|
50 |
|
|
# ====================================================================
|
51 |
|
|
|
52 |
|
|
cdl_option CYGVAR_KERNEL_COUNTERS_CLOCK {
|
53 |
|
|
display "Provide real-time clock"
|
54 |
|
|
requires CYGIMP_KERNEL_INTERRUPTS_DSRS
|
55 |
|
|
default_value 1
|
56 |
|
|
description "
|
57 |
|
|
On all current target systems the kernel can provide a
|
58 |
|
|
real-time clock. This clock serves two purposes. First it is
|
59 |
|
|
necessary to support clock and alarm related functions.
|
60 |
|
|
Second it is needed to implement timeslicing in some of the
|
61 |
|
|
schedulers including the mlqueue scheduler. If the
|
62 |
|
|
application does not require any of these facilities then it
|
63 |
|
|
is possible to disable the real time clock support
|
64 |
|
|
completely."
|
65 |
|
|
}
|
66 |
|
|
|
67 |
|
|
cdl_component CYGPKG_KERNEL_COUNTERS_CLOCK_OVERRIDE {
|
68 |
|
|
display "Override default clock settings"
|
69 |
|
|
requires CYGVAR_KERNEL_COUNTERS_CLOCK
|
70 |
|
|
default_value 0
|
71 |
|
|
description "
|
72 |
|
|
The kernel has default settings for the clock interrupt
|
73 |
|
|
frequency. These settings will vary from platform to
|
74 |
|
|
platform, but typically there will be a 100 clock interrupts
|
75 |
|
|
every second. It is possible to change this frequency, but
|
76 |
|
|
it requires some knowledge of the target hardware."
|
77 |
|
|
|
78 |
|
|
cdl_option CYGNUM_KERNEL_COUNTERS_CLOCK_OVERRIDE_PERIOD {
|
79 |
|
|
display "Clock hardware initialization value"
|
80 |
|
|
flavor data
|
81 |
|
|
legal_values 1 to 0x7fffffff
|
82 |
|
|
default_value 9999
|
83 |
|
|
description "
|
84 |
|
|
During system initialization this value is used to initialize
|
85 |
|
|
the clock hardware. The exact meaning of the value and the
|
86 |
|
|
range of legal values therefore depends on the target hardware,
|
87 |
|
|
and the hardware documentation should be consulted for further
|
88 |
|
|
details. In addition the clock resolution numerator and
|
89 |
|
|
denominator values should be updated. Typical values for
|
90 |
|
|
this option would be 150000 on the MN10300 stdeval1 board,
|
91 |
|
|
15625 on the tx39 jmr3904 board, and 20833 on the powerpc
|
92 |
|
|
cogent board."
|
93 |
|
|
}
|
94 |
|
|
|
95 |
|
|
cdl_option CYGNUM_KERNEL_COUNTERS_CLOCK_OVERRIDE_NUMERATOR {
|
96 |
|
|
display "Clock resolution numerator"
|
97 |
|
|
flavor data
|
98 |
|
|
legal_values 1 to 0x7fffffff
|
99 |
|
|
default_value 1000000000
|
100 |
|
|
description "
|
101 |
|
|
If a non-default clock interrupt frequency is used then it
|
102 |
|
|
is necessary to specify the clock resolution explicitly.
|
103 |
|
|
This resolution involves two separate values, the numerator
|
104 |
|
|
and the denominator. The result of dividing the numerator by
|
105 |
|
|
the denominator should correspond to the number of
|
106 |
|
|
nanoseconds between clock interrupts. For example a
|
107 |
|
|
numerator of 1000000000 and a denominator of 100 means that
|
108 |
|
|
there are 10000000 nanoseconds (or 10 milliseconds) between
|
109 |
|
|
clock interrupts. Expressing the resolution as a fraction
|
110 |
|
|
should minimize clock drift even for frequencies that cannot
|
111 |
|
|
be expressed as a simple integer. For example a frequency of
|
112 |
|
|
60Hz corresponds to a clock resolution of 16666666.66...
|
113 |
|
|
nanoseconds. This can be expressed accurately as 1000000000
|
114 |
|
|
over 60."
|
115 |
|
|
}
|
116 |
|
|
|
117 |
|
|
cdl_option CYGNUM_KERNEL_COUNTERS_CLOCK_OVERRIDE_DENOMINATOR {
|
118 |
|
|
display "Clock resolution denominator"
|
119 |
|
|
flavor data
|
120 |
|
|
legal_values 1 to 0x7fffffff
|
121 |
|
|
default_value 100
|
122 |
|
|
description "
|
123 |
|
|
If a non-default clock interrupt frequency is used then it
|
124 |
|
|
is necessary to specify the clock resolution explicitly.
|
125 |
|
|
This resolution involves two separate values, the numerator
|
126 |
|
|
and the denominator. The result of dividing the numerator by
|
127 |
|
|
the denominator should correspond to the number of
|
128 |
|
|
nanoseconds between clock interrupts. For example a
|
129 |
|
|
numerator of 1000000000 and a denominator of 100 means that
|
130 |
|
|
there are 10000000 nanoseconds (or 10 milliseconds) between
|
131 |
|
|
clock interrupts. Expressing the resolution as a fraction
|
132 |
|
|
should minimize clock drift even for frequencies that cannot
|
133 |
|
|
be expressed as a simple integer. For example a frequency of
|
134 |
|
|
60Hz corresponds to a clock resolution of 16666666.66...
|
135 |
|
|
nanoseconds. This can be expressed accurately as 1000000000
|
136 |
|
|
over 60."
|
137 |
|
|
}
|
138 |
|
|
}
|
139 |
|
|
|
140 |
|
|
cdl_interface CYGINT_KERNEL_COUNTERS {
|
141 |
|
|
requires 1 == CYGINT_KERNEL_COUNTERS
|
142 |
|
|
no_define
|
143 |
|
|
}
|
144 |
|
|
|
145 |
|
|
# NOTE: these option should really be a single enum.
|
146 |
|
|
cdl_option CYGIMP_KERNEL_COUNTERS_SINGLE_LIST {
|
147 |
|
|
display "Implement counters using a single list"
|
148 |
|
|
default_value 1
|
149 |
|
|
implements CYGINT_KERNEL_COUNTERS
|
150 |
|
|
description "
|
151 |
|
|
There are two different implementations of the counter
|
152 |
|
|
objects. The first implementation stores all alarms in a
|
153 |
|
|
single linked list. The alternative implementation uses a
|
154 |
|
|
table of linked lists. A single list is more efficient in
|
155 |
|
|
terms of memory usage and is generally adequate when the
|
156 |
|
|
application only makes use of a small number of alarms."
|
157 |
|
|
}
|
158 |
|
|
|
159 |
|
|
cdl_component CYGIMP_KERNEL_COUNTERS_MULTI_LIST {
|
160 |
|
|
display "Implement counters using a table of lists"
|
161 |
|
|
default_value 0
|
162 |
|
|
implements CYGINT_KERNEL_COUNTERS
|
163 |
|
|
description "
|
164 |
|
|
There are two different implementations of the counter
|
165 |
|
|
objects. The first implementation stores all alarms in a
|
166 |
|
|
single linked list. The alternative implementation uses a
|
167 |
|
|
table of linked lists, with the size of the table being a
|
168 |
|
|
separate configurable option. For more complicated
|
169 |
|
|
operations it is better to have a table of lists since this
|
170 |
|
|
reduces the amount of computation whenever the timer goes
|
171 |
|
|
off. Assuming a table size of 8 (the default value) on
|
172 |
|
|
average the timer code will only need to check 1/8 of the
|
173 |
|
|
pending alarms instead of all of them."
|
174 |
|
|
|
175 |
|
|
cdl_option CYGNUM_KERNEL_COUNTERS_MULTI_LIST_SIZE {
|
176 |
|
|
display "Size of counter list table"
|
177 |
|
|
flavor data
|
178 |
|
|
legal_values 1 to 1024
|
179 |
|
|
default_value 8
|
180 |
|
|
description "
|
181 |
|
|
If counters are implemented using an array of linked lists
|
182 |
|
|
then this option controls the size of the array. A larger
|
183 |
|
|
size reduces the amount of computation that needs to take
|
184 |
|
|
place whenever the timer goes off, but requires extra
|
185 |
|
|
memory."
|
186 |
|
|
}
|
187 |
|
|
}
|
188 |
|
|
|
189 |
|
|
cdl_option CYGIMP_KERNEL_COUNTERS_SORT_LIST {
|
190 |
|
|
display "Sort the counter list"
|
191 |
|
|
default_value 0
|
192 |
|
|
description "
|
193 |
|
|
Sorting the counter lists reduces the amount of work that
|
194 |
|
|
has to be done when a counter tick is processed, since the
|
195 |
|
|
next alarm to expire is always at the front of the list.
|
196 |
|
|
However, it makes adding an alarm to the list more expensive
|
197 |
|
|
since a search must be done for the correct place to put it.
|
198 |
|
|
Many alarms are used to implement timeouts, which seldom trigger,
|
199 |
|
|
so it is worthwhile optimizing this case. For this reason
|
200 |
|
|
sorted list are disabled by default."
|
201 |
|
|
}
|
202 |
|
|
|
203 |
|
|
cdl_option CYGVAR_KERNEL_COUNTERS_CLOCK_LATENCY {
|
204 |
|
|
display "Measure real-time \[clock\] interrupt latency"
|
205 |
|
|
requires CYGVAR_KERNEL_COUNTERS_CLOCK
|
206 |
|
|
default_value 0
|
207 |
|
|
description "
|
208 |
|
|
Measure the interrupt latency as seen by the real-time clock
|
209 |
|
|
timer interrupt. This requires hardware support, defined by
|
210 |
|
|
the HAL_CLOCK_LATENCY() macro."
|
211 |
|
|
}
|
212 |
|
|
|
213 |
|
|
cdl_option CYGVAR_KERNEL_COUNTERS_CLOCK_DSR_LATENCY {
|
214 |
|
|
display "Measure real-time \[clock\] DSR latency"
|
215 |
|
|
requires CYGVAR_KERNEL_COUNTERS_CLOCK_LATENCY
|
216 |
|
|
default_value CYGVAR_KERNEL_COUNTERS_CLOCK_LATENCY
|
217 |
|
|
description "
|
218 |
|
|
Measure the DSR latency as seen by the real-time clock
|
219 |
|
|
timer interrupt. This requires hardware support, defined by
|
220 |
|
|
the HAL_CLOCK_LATENCY() macro."
|
221 |
|
|
}
|
222 |
|
|
|
223 |
|
|
cdl_option CYGNUM_KERNEL_COUNTERS_RTC_RESOLUTION {
|
224 |
|
|
display "RTC resolution"
|
225 |
|
|
flavor data
|
226 |
|
|
calculated { CYGPKG_KERNEL_COUNTERS_CLOCK_OVERRIDE ? \
|
227 |
|
|
"{CYGNUM_KERNEL_COUNTERS_CLOCK_OVERRIDE_NUMERATOR, \
|
228 |
|
|
CYGNUM_KERNEL_COUNTERS_CLOCK_OVERRIDE_DENOMINATOR}" \
|
229 |
|
|
: "{CYGNUM_HAL_RTC_NUMERATOR, CYGNUM_HAL_RTC_DENOMINATOR}"}
|
230 |
|
|
description "
|
231 |
|
|
This option automatically defines the tuple which is used to
|
232 |
|
|
initialize the RTC resolution, consisting of a numerator and
|
233 |
|
|
denominator. For more information, see the option to
|
234 |
|
|
override default clock settings
|
235 |
|
|
(CYGPKG_KERNEL_COUNTERS_CLOCK_OVERRIDE) and associated options."
|
236 |
|
|
}
|
237 |
|
|
|
238 |
|
|
cdl_option CYGNUM_KERNEL_COUNTERS_RTC_PERIOD {
|
239 |
|
|
display "RTC period"
|
240 |
|
|
flavor data
|
241 |
|
|
calculated { CYGPKG_KERNEL_COUNTERS_CLOCK_OVERRIDE ? \
|
242 |
|
|
"CYGNUM_KERNEL_COUNTERS_CLOCK_OVERRIDE_PERIOD" \
|
243 |
|
|
: "CYGNUM_HAL_RTC_PERIOD"}
|
244 |
|
|
description "
|
245 |
|
|
This option automatically defines the RTC period to be used in
|
246 |
|
|
setting the system clock hardware. For more information, see the
|
247 |
|
|
option to override default clock settings
|
248 |
|
|
(CYGPKG_KERNEL_COUNTERS_CLOCK_OVERRIDE) and associated options."
|
249 |
|
|
}
|
250 |
|
|
|
251 |
|
|
# EOF counters.cdl
|