OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [ecos-2.0/] [doc/] [html/] [cdl-guide/] [ref.requires.html] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1254 phoenix
<!-- Copyright (C) 2003 Red Hat, Inc.                                -->
2
<!-- This material may be distributed only subject to the terms      -->
3
<!-- and conditions set forth in the Open Publication License, v1.0  -->
4
<!-- or later (the latest version is presently available at          -->
5
<!-- http://www.opencontent.org/openpub/).                           -->
6
<!-- Distribution of the work or derivative of the work in any       -->
7
<!-- standard (paper) book form is prohibited unless prior           -->
8
<!-- permission is obtained from the copyright holder.               -->
9
<HTML
10
><HEAD
11
><TITLE
12
>requires</TITLE
13
><meta name="MSSmartTagsPreventParsing" content="TRUE">
14
<META
15
NAME="GENERATOR"
16
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
17
"><LINK
18
REL="HOME"
19
TITLE="The eCos Component Writer's Guide"
20
HREF="cdl-guide.html"><LINK
21
REL="UP"
22
TITLE="CDL Language Specification"
23
HREF="reference.html"><LINK
24
REL="PREVIOUS"
25
TITLE="parent"
26
HREF="ref.parent.html"><LINK
27
REL="NEXT"
28
TITLE="script"
29
HREF="ref.script.html"></HEAD
30
><BODY
31
CLASS="REFENTRY"
32
BGCOLOR="#FFFFFF"
33
TEXT="#000000"
34
LINK="#0000FF"
35
VLINK="#840084"
36
ALINK="#0000FF"
37
><DIV
38
CLASS="NAVHEADER"
39
><TABLE
40
SUMMARY="Header navigation table"
41
WIDTH="100%"
42
BORDER="0"
43
CELLPADDING="0"
44
CELLSPACING="0"
45
><TR
46
><TH
47
COLSPAN="3"
48
ALIGN="center"
49
>The <SPAN
50
CLASS="APPLICATION"
51
>eCos</SPAN
52
> Component Writer's Guide</TH
53
></TR
54
><TR
55
><TD
56
WIDTH="10%"
57
ALIGN="left"
58
VALIGN="bottom"
59
><A
60
HREF="ref.parent.html"
61
ACCESSKEY="P"
62
>Prev</A
63
></TD
64
><TD
65
WIDTH="80%"
66
ALIGN="center"
67
VALIGN="bottom"
68
></TD
69
><TD
70
WIDTH="10%"
71
ALIGN="right"
72
VALIGN="bottom"
73
><A
74
HREF="ref.script.html"
75
ACCESSKEY="N"
76
>Next</A
77
></TD
78
></TR
79
></TABLE
80
><HR
81
ALIGN="LEFT"
82
WIDTH="100%"></DIV
83
><H1
84
><A
85
NAME="REF.REQUIRES"><SPAN
86
CLASS="PROPERTY"
87
>requires</SPAN
88
></H1
89
><DIV
90
CLASS="REFNAMEDIV"
91
><A
92
NAME="AEN4921"
93
></A
94
><H2
95
>Name</H2
96
>Property <SPAN
97
CLASS="PROPERTY"
98
>requires</SPAN
99
>&nbsp;--&nbsp;List constraints that the configuration should satisfy if
100
a given option is active and enabled..</DIV
101
><DIV
102
CLASS="REFSYNOPSISDIV"
103
><A
104
NAME="AEN4925"><H2
105
>Synopsis</H2
106
><TABLE
107
BORDER="5"
108
BGCOLOR="#E0E0F0"
109
WIDTH="70%"
110
><TR
111
><TD
112
><PRE
113
CLASS="SYNOPSIS"
114
>cdl_option &lt;name&gt; {
115
    requires &lt;goal expression&gt;
116
    &#8230;
117
}</PRE
118
></TD
119
></TR
120
></TABLE
121
></DIV
122
><DIV
123
CLASS="REFSECT1"
124
><A
125
NAME="AEN4927"
126
></A
127
><H2
128
>Description</H2
129
><P
130
>Configuration options are not independent. For example the C library
131
can provide thread-safe implementations of certain functions, but only
132
if the kernel is present, if the kernel provides multi-threading, and
133
if the kernel options related to per-thread data are enabled. It is
134
possible to express such constraints using <SPAN
135
CLASS="PROPERTY"
136
>requires</SPAN
137
> properties.</P
138
><P
139
>The arguments to a <SPAN
140
CLASS="PROPERTY"
141
>requires</SPAN
142
> property should constitute a goal
143
expression, as described in <A
144
HREF="language.values.html#LANGUAGE.LIST-EXPRESSION"
145
>the Section called <I
146
>List Expressions</I
147
> in Chapter 3</A
148
>.
149
Most goal expressions are relatively simple because the constraints
150
being described are simple, but complicated expressions can be used
151
when necessary. The body of an option or other CDL entity can contain
152
any number of <SPAN
153
CLASS="PROPERTY"
154
>requires</SPAN
155
> constraints. If the option is active and
156
enabled then all these constraints should be satisfied, and any goal
157
expressions which evaluate to <TT
158
CLASS="LITERAL"
159
>0</TT
160
> will result in
161
conflicts being raised. It is possible for users to ignore such
162
conflicts and attempt to build the current configuration anyway, but
163
there is no guarantee that anything will work. If an option is
164
inactive or disabled then its <SPAN
165
CLASS="PROPERTY"
166
>requires</SPAN
167
> constraints will be ignored. </P
168
><P
169
>The configuration system contains an inference engine which can
170
resolve many types of conflicts automatically. For example, if option
171
<TT
172
CLASS="LITERAL"
173
>A</TT
174
> is enabled and requires an option
175
<TT
176
CLASS="LITERAL"
177
>B</TT
178
> that is currently disabled then the inference
179
engine may attempt to resolve the conflict by enabling
180
<TT
181
CLASS="LITERAL"
182
>B</TT
183
>. However this will not always be possible, for
184
example there may be other constraints in the configuration which
185
force <TT
186
CLASS="LITERAL"
187
>B</TT
188
> to be disabled at present, in which case
189
user intervention is required.</P
190
></DIV
191
><DIV
192
CLASS="REFSECT1"
193
><A
194
NAME="AEN4942"
195
></A
196
><H2
197
>Example</H2
198
><TABLE
199
BORDER="5"
200
BGCOLOR="#E0E0F0"
201
WIDTH="70%"
202
><TR
203
><TD
204
><PRE
205
CLASS="PROGRAMLISTING"
206
>cdl_component CYGPKG_IO_SERIAL_POWERPC_COGENT_SERIAL_A {
207
    display       "Cogent PowerPC serial port A driver"
208
    flavor        bool
209
    default_value 0
210
    requires      (CYGIMP_KERNEL_INTERRUPTS_CHAIN || \
211
                   !CYGPKG_IO_SERIAL_POWERPC_COGENT_SERIAL_B)
212
    &#8230;
213
}</PRE
214
></TD
215
></TR
216
></TABLE
217
></DIV
218
><DIV
219
CLASS="REFSECT1"
220
><A
221
NAME="AEN4945"
222
></A
223
><H2
224
>See Also</H2
225
><P
226
>Property <A
227
HREF="ref.active-if.html"
228
><SPAN
229
CLASS="PROPERTY"
230
>active_if</SPAN
231
></A
232
>.</P
233
></DIV
234
><DIV
235
CLASS="NAVFOOTER"
236
><HR
237
ALIGN="LEFT"
238
WIDTH="100%"><TABLE
239
SUMMARY="Footer navigation table"
240
WIDTH="100%"
241
BORDER="0"
242
CELLPADDING="0"
243
CELLSPACING="0"
244
><TR
245
><TD
246
WIDTH="33%"
247
ALIGN="left"
248
VALIGN="top"
249
><A
250
HREF="ref.parent.html"
251
ACCESSKEY="P"
252
>Prev</A
253
></TD
254
><TD
255
WIDTH="34%"
256
ALIGN="center"
257
VALIGN="top"
258
><A
259
HREF="cdl-guide.html"
260
ACCESSKEY="H"
261
>Home</A
262
></TD
263
><TD
264
WIDTH="33%"
265
ALIGN="right"
266
VALIGN="top"
267
><A
268
HREF="ref.script.html"
269
ACCESSKEY="N"
270
>Next</A
271
></TD
272
></TR
273
><TR
274
><TD
275
WIDTH="33%"
276
ALIGN="left"
277
VALIGN="top"
278
><SPAN
279
CLASS="PROPERTY"
280
>parent</SPAN
281
></TD
282
><TD
283
WIDTH="34%"
284
ALIGN="center"
285
VALIGN="top"
286
><A
287
HREF="reference.html"
288
ACCESSKEY="U"
289
>Up</A
290
></TD
291
><TD
292
WIDTH="33%"
293
ALIGN="right"
294
VALIGN="top"
295
><SPAN
296
CLASS="PROPERTY"
297
>script</SPAN
298
></TD
299
></TR
300
></TABLE
301
></DIV
302
></BODY
303
></HTML
304
>

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.