1 |
786 |
skrzyp |
# ====================================================================
|
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 Free Software Foundation, 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
|
16 |
|
|
## version.
|
17 |
|
|
##
|
18 |
|
|
## eCos is distributed in the hope that it will be useful, but WITHOUT
|
19 |
|
|
## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
20 |
|
|
## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
21 |
|
|
## for more details.
|
22 |
|
|
##
|
23 |
|
|
## You should have received a copy of the GNU General Public License
|
24 |
|
|
## along with eCos; if not, write to the Free Software Foundation, Inc.,
|
25 |
|
|
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
26 |
|
|
##
|
27 |
|
|
## As a special exception, if other files instantiate templates or use
|
28 |
|
|
## macros or inline functions from this file, or you compile this file
|
29 |
|
|
## and link it with other works to produce a work based on this file,
|
30 |
|
|
## this file does not by itself cause the resulting work to be covered by
|
31 |
|
|
## the GNU General Public License. However the source code for this file
|
32 |
|
|
## must still be made available in accordance with section (3) of the GNU
|
33 |
|
|
## General Public License v2.
|
34 |
|
|
##
|
35 |
|
|
## This exception does not invalidate any other reasons why a work based
|
36 |
|
|
## on this file might be covered by the GNU General Public License.
|
37 |
|
|
## -------------------------------------------
|
38 |
|
|
## ####ECOSGPLCOPYRIGHTEND####
|
39 |
|
|
# ====================================================================
|
40 |
|
|
######DESCRIPTIONBEGIN####
|
41 |
|
|
#
|
42 |
|
|
# Author(s): jskov
|
43 |
|
|
# Original data: nickg
|
44 |
|
|
# Contributors:
|
45 |
|
|
# Date: 1999-07-05
|
46 |
|
|
#
|
47 |
|
|
#####DESCRIPTIONEND####
|
48 |
|
|
#
|
49 |
|
|
# ====================================================================
|
50 |
|
|
|
51 |
|
|
cdl_option CYGVAR_KERNEL_COUNTERS_CLOCK {
|
52 |
|
|
display "Provide real-time clock"
|
53 |
|
|
requires CYGIMP_KERNEL_INTERRUPTS_DSRS
|
54 |
|
|
default_value 1
|
55 |
|
|
description "
|
56 |
|
|
On all current target systems the kernel can provide a
|
57 |
|
|
real-time clock. This clock serves two purposes. First it is
|
58 |
|
|
necessary to support clock and alarm related functions.
|
59 |
|
|
Second it is needed to implement timeslicing in some of the
|
60 |
|
|
schedulers including the mlqueue scheduler. If the
|
61 |
|
|
application does not require any of these facilities then it
|
62 |
|
|
is possible to disable the real time clock support
|
63 |
|
|
completely."
|
64 |
|
|
}
|
65 |
|
|
|
66 |
|
|
cdl_option CYGNUM_KERNEL_COUNTERS_CLOCK_ISR_PRIORITY {
|
67 |
|
|
display "Interrupt priority for the real-time clock"
|
68 |
|
|
active_if CYGVAR_KERNEL_COUNTERS_CLOCK
|
69 |
|
|
flavor data
|
70 |
|
|
default_value { is_loaded(CYGNUM_HAL_KERNEL_COUNTERS_CLOCK_ISR_DEFAULT_PRIORITY) ?
|
71 |
|
|
CYGNUM_HAL_KERNEL_COUNTERS_CLOCK_ISR_DEFAULT_PRIORITY : 1 }
|
72 |
|
|
description "
|
73 |
|
|
The implementation of the kernel's real-time clock typically
|
74 |
|
|
involves installing an interrupt handler on a suitable hardware
|
75 |
|
|
timer. This option controls the priority level used for that
|
76 |
|
|
interrupt. On most platforms the value is not important because
|
77 |
|
|
the clock ISR leaves most of the work to be done by the DSR.
|
78 |
|
|
However some processors have interrupt controllers with special
|
79 |
|
|
requirements for the interrupt priorities, in which case
|
80 |
|
|
application developers must be able to manipulate the clock's
|
81 |
|
|
priority."
|
82 |
|
|
}
|
83 |
|
|
|
84 |
|
|
cdl_interface CYGINT_KERNEL_COUNTERS {
|
85 |
|
|
requires 1 == CYGINT_KERNEL_COUNTERS
|
86 |
|
|
no_define
|
87 |
|
|
}
|
88 |
|
|
|
89 |
|
|
# NOTE: these option should really be a single enum.
|
90 |
|
|
cdl_option CYGIMP_KERNEL_COUNTERS_SINGLE_LIST {
|
91 |
|
|
display "Implement counters using a single list"
|
92 |
|
|
default_value 1
|
93 |
|
|
implements CYGINT_KERNEL_COUNTERS
|
94 |
|
|
description "
|
95 |
|
|
There are two different implementations of the counter
|
96 |
|
|
objects. The first implementation stores all alarms in a
|
97 |
|
|
single linked list. The alternative implementation uses a
|
98 |
|
|
table of linked lists. A single list is more efficient in
|
99 |
|
|
terms of memory usage and is generally adequate when the
|
100 |
|
|
application only makes use of a small number of alarms."
|
101 |
|
|
}
|
102 |
|
|
|
103 |
|
|
cdl_component CYGIMP_KERNEL_COUNTERS_MULTI_LIST {
|
104 |
|
|
display "Implement counters using a table of lists"
|
105 |
|
|
default_value 0
|
106 |
|
|
implements CYGINT_KERNEL_COUNTERS
|
107 |
|
|
description "
|
108 |
|
|
There are two different implementations of the counter
|
109 |
|
|
objects. The first implementation stores all alarms in a
|
110 |
|
|
single linked list. The alternative implementation uses a
|
111 |
|
|
table of linked lists, with the size of the table being a
|
112 |
|
|
separate configurable option. For more complicated
|
113 |
|
|
operations it is better to have a table of lists since this
|
114 |
|
|
reduces the amount of computation whenever the timer goes
|
115 |
|
|
off. Assuming a table size of 8 (the default value) on
|
116 |
|
|
average the timer code will only need to check 1/8 of the
|
117 |
|
|
pending alarms instead of all of them."
|
118 |
|
|
|
119 |
|
|
cdl_option CYGNUM_KERNEL_COUNTERS_MULTI_LIST_SIZE {
|
120 |
|
|
display "Size of counter list table"
|
121 |
|
|
flavor data
|
122 |
|
|
legal_values 1 to 1024
|
123 |
|
|
default_value 8
|
124 |
|
|
description "
|
125 |
|
|
If counters are implemented using an array of linked lists
|
126 |
|
|
then this option controls the size of the array. A larger
|
127 |
|
|
size reduces the amount of computation that needs to take
|
128 |
|
|
place whenever the timer goes off, but requires extra
|
129 |
|
|
memory."
|
130 |
|
|
}
|
131 |
|
|
}
|
132 |
|
|
|
133 |
|
|
cdl_option CYGIMP_KERNEL_COUNTERS_SORT_LIST {
|
134 |
|
|
display "Sort the counter list"
|
135 |
|
|
default_value 0
|
136 |
|
|
description "
|
137 |
|
|
Sorting the counter lists reduces the amount of work that
|
138 |
|
|
has to be done when a counter tick is processed, since the
|
139 |
|
|
next alarm to expire is always at the front of the list.
|
140 |
|
|
However, it makes adding an alarm to the list more expensive
|
141 |
|
|
since a search must be done for the correct place to put it.
|
142 |
|
|
Many alarms are used to implement timeouts, which seldom trigger,
|
143 |
|
|
so it is worthwhile optimizing this case. For this reason
|
144 |
|
|
sorted list are disabled by default."
|
145 |
|
|
}
|
146 |
|
|
|
147 |
|
|
cdl_option CYGVAR_KERNEL_COUNTERS_CLOCK_LATENCY {
|
148 |
|
|
display "Measure real-time \[clock\] interrupt latency"
|
149 |
|
|
requires CYGVAR_KERNEL_COUNTERS_CLOCK
|
150 |
|
|
default_value 0
|
151 |
|
|
description "
|
152 |
|
|
Measure the interrupt latency as seen by the real-time clock
|
153 |
|
|
timer interrupt. This requires hardware support, defined by
|
154 |
|
|
the HAL_CLOCK_LATENCY() macro."
|
155 |
|
|
}
|
156 |
|
|
|
157 |
|
|
cdl_option CYGVAR_KERNEL_COUNTERS_CLOCK_DSR_LATENCY {
|
158 |
|
|
display "Measure real-time \[clock\] DSR latency"
|
159 |
|
|
requires CYGVAR_KERNEL_COUNTERS_CLOCK_LATENCY
|
160 |
|
|
default_value CYGVAR_KERNEL_COUNTERS_CLOCK_LATENCY
|
161 |
|
|
description "
|
162 |
|
|
Measure the DSR latency as seen by the real-time clock
|
163 |
|
|
timer interrupt. This requires hardware support, defined by
|
164 |
|
|
the HAL_CLOCK_LATENCY() macro."
|
165 |
|
|
}
|
166 |
|
|
|
167 |
|
|
cdl_option CYGNUM_KERNEL_COUNTERS_RTC_RESOLUTION {
|
168 |
|
|
display "RTC resolution"
|
169 |
|
|
flavor data
|
170 |
|
|
calculated {"{CYGNUM_HAL_RTC_NUMERATOR, CYGNUM_HAL_RTC_DENOMINATOR}"}
|
171 |
|
|
description "
|
172 |
|
|
This option automatically defines the tuple which is used to
|
173 |
|
|
initialize the RTC resolution, consisting of a numerator and
|
174 |
|
|
denominator. The values of the numerator and denominator are
|
175 |
|
|
defined by the HAL."
|
176 |
|
|
}
|
177 |
|
|
|
178 |
|
|
cdl_option CYGNUM_KERNEL_COUNTERS_RTC_PERIOD {
|
179 |
|
|
display "RTC period"
|
180 |
|
|
flavor data
|
181 |
|
|
calculated {"CYGNUM_HAL_RTC_PERIOD"}
|
182 |
|
|
description "
|
183 |
|
|
This option defines the RTC period to be used in
|
184 |
|
|
setting the system clock hardware. It is essentially
|
185 |
|
|
an alias for CYGNUM_HAL_RTC_PERIOD, which is defined
|
186 |
|
|
in the HAL."
|
187 |
|
|
}
|
188 |
|
|
|
189 |
|
|
# EOF counters.cdl
|