-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample_transformations.txt
231 lines (194 loc) · 7.92 KB
/
example_transformations.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
-- ----------------------------------------------------------------------------
1. Option
cdl_option CYGDBG_INFRA_DEBUG_PRECONDITIONS {
display "Preconditions"
default_value 1
description "
This option allows individual control of preconditions.
A precondition is one type of assert, which it is
useful to control separately from more general asserts.
The function is CYG_PRECONDITION(condition,msg)."
}
CYGDBG_INFRA_DEBUG_PRECONDITIONS ? -- CHECK
display = "Preconditions"
--default_value = 1 default; feature existing; default values only for configurator; keep them in comments; introduce defaults to clafer
description = "
This option allows individual control of preconditions.
A precondition is one type of assert, which it is
useful to control separately from more general asserts.
The function is CYG_PRECONDITION(condition,msg)."
-- ----------------------------------------------------------------------------
2. Component
cdl_component CYGDBG_USE_ASSERTS {
display "Use asserts"
default_value 1
description "
If this component is enabled, assertions in the code are
tested at run-time. Assert functions (CYG_ASSERT()) are
defined in 'include/cyg/infra/cyg_ass.h' within the 'install'
tree. If the component is disabled, these result in no
additional object code and no checking of the asserted
conditions."
script assert.cdl
}
CYGDBG_USE_ASSERTS ?
display = "Use asserts"
--default_value = 1 -- presence
description = "
If this component is enabled, assertions in the code are
tested at run-time. Assert functions (CYG_ASSERT()) are
defined in 'include/cyg/infra/cyg_ass.h' within the 'install'
tree. If the component is disabled, these result in no
additional object code and no checking of the asserted
conditions."
-- ----------------------------------------------------------------------------
3. Package
-- booldata, always enabled; data value is a version of the package
-- hardware mandatory; others optional
cdl_package CYGPKG_INFRA {
display "Infrastructure"
include_dir cyg/infra
description "
Common types and useful macros.
Tracing and assertion facilities.
Package startup options."
compile startup.cxx prestart.cxx pkgstart.cxx userstart.cxx \
dummyxxmain.cxx null.cxx simple.cxx fancy.cxx buffer.cxx \
diag.cxx tcdiag.cxx memcpy.c memset.c delete.cxx
}
CYGPKG_INFRA -> string ?
display = "Infrastructure"
description = "
Common types and useful macros.
Tracing and assertion facilities.
Package startup options."
[this = "v3.0"]
-- ----------------------------------------------------------------------------
4. Interface
cdl_interface CYGINT_KERNEL_SCHEDULER {
display "Number of schedulers in this configuration"
requires 1 == CYGINT_KERNEL_SCHEDULER
}
-- data by default; for bool it would be [CYGINT_KERNEL_SCHEDULER]
abstract CYGINT_KERNEL_SCHEDULER
display = "Number of schedulers in this configuration"
[1 = #CYGINT_KERNEL_SCHEDULER]
5. Another Interface
option CYGDBG_HAL_DEBUG_GDB_CTRLC_SUPPORT{
display "Include GDB external break support when no stubs"
active_if [CYGINT_HAL_DEBUG_GDB_CTRLC_UNSUPPORTED == 0 ]
}
CYGDBG_HAL_DEBUG_GDB_CTRLC_SUPPORT ?
display = "Include GDB external break support when no stubs"
--isActive
[#CYGINT_HAL_DEBUG_GDB_CTRLC_UNSUPPORTED = 0]
-- [isActive xor CYGINT_HAL_DEBUG_GDB_CTRLC_UNSUPPORTED]
-- ----------------------------------------------------------------------------
6. https://gdansk.uwaterloo.ca/svn/shared/papers/conference/2010-ase/figs/cdlsnippet.tex
MISC_FILESYSTEMS
display = "Miscellaneous filesystems"
-- reparented: MISC_FILESYSTEMS
CYGPKG_FS_JFFS2 extends CYGINT_IO_FILEIO
display = "Journalling Flash File System"
[CYGPKG_CRC]
-- isActive
[MTD]
CYGOPT_FS_JFFS2_DEBUG -> integer
display = "Debug level"
-- default_value = 0
[0 <= this && this <= 2] -- CDL: legal_values 0 to 2
description = "Debug verbosity of...."
CYGOPT_FS_JFFS2_NAND ?
display = "Support for NAND flash"
description = "Enable support for ...."
-- calculated
[CYGOPT_FS_JFFS2_NAND <=> HAS_IOMEM]
CYGOPT_FS_JFFS2_COMPRESS ?
display = "Compress data"
-- default_value = true
CYGOPT_FS_JFFS2_COMPRESS_ZLIB ?
display = "Compress data using zlib"
[CYGPKG_COMPRESS_ZLIB]
-- default_value = true
CYGOPT_FS_JFFS2_COMPRESS_CMODE -> CompressMode
display = "Set the default compression mode"
-- default_value -> Priority
enum CompressMode = None | Priority | Size
-- ----------------------------------------------------------------------------
7. Implements
package CYGPKG_HAL_I386_PC{
display "i386 PC Target"
implements [CYGINT_HAL_DEBUG_GDB_STUBS ]
implements [CYGINT_HAL_DEBUG_GDB_STUBS_BREAK ]
implements [CYGINT_HAL_VIRTUAL_VECTOR_SUPPORT ]
implements [CYGINT_HAL_VIRTUAL_VECTOR_SUPPORT_GUARANTEED ]
component CYGPKG_HAL_I386_PC_MEMSIZE{
display "How to discover the size of available RAM."
legal_values ["BIOS" "HARDCODE" ]
default_value ["BIOS" ]
flavor data
option CYGNUM_HAL_I386_PC_MEMSIZE_BASE{
display "Amount of Base RAM available."
default_value [0x000F0000 ]
active_if [CYGPKG_HAL_I386_PC_MEMSIZE == "HARDCODE" ]
flavor data
}
option CYGNUM_HAL_I386_PC_MEMSIZE_EXTENDED{
display "Amount of Extended RAM available."
default_value [0x00100000 ]
active_if [CYGPKG_HAL_I386_PC_MEMSIZE == "HARDCODE" ]
flavor data
}
}
}
CYGPKG_HAL_I386_PC
display = "i386 PC Target"
-- CYGINT_HAL_DEBUG_GDB_STUBS extends CYGINT_HAL_DEBUG_GDB_STUBS
`CYGINT_HAL_DEBUG_GDB_STUBS
`CYGINT_HAL_DEBUG_GDB_STUBS_BREAK
`CYGINT_HAL_VIRTUAL_VECTOR_SUPPORT
`CYGINT_HAL_VIRTUAL_VECTOR_SUPPORT_GUARANTEED
CYGPKG_HAL_I386_PC_MEMSIZE -> MemSize
display "How to discover the size of available RAM."
-- default_value -> BIOS
CYGNUM_HAL_I386_PC_MEMSIZE_BASE -> integer
display = "Amount of Base RAM available."
-- default_value = 0x000F0000
-- isActive
[CYGPKG_HAL_I386_PC_MEMSIZE = HARDCODE ]
CYGNUM_HAL_I386_PC_MEMSIZE_EXTENDED -> integer
display = "Amount of Extended RAM available."
-- default_value = 0x00100000
-- isActive
[CYGPKG_HAL_I386_PC_MEMSIZE = HARDCODE]
enum MemSize = BIOS | HARDCODE
-- ----------------------------------------------------------------------------
8. Constraint
option CYGPKG_NET_MEM_USAGE{
display "Memory designated for networking buffers."
default_value [(256*1024)+(CYGPKG_NET_MAXSOCKETS*1024) ]
flavor data
}
CYGPKG_NET_MEM_USAGE -> integer
display = "Memory designated for networking buffers."
-- default_value = (256*1024)+(CYGPKG_NET_MAXSOCKETS*1024)
-- ----------------------------------------------------------------------------
9. calculated
component CYGHWR_MEMORY_LAYOUT{
display "Memory layout"
calculated [CYG_HAL_STARTUP == "RAM" ? (CYGHWR_HAL_I386_PC_LOAD_HIGH ? "i386_pc_ram_hi" : "i386_pc_ram") : CYG_HAL_STARTUP == "ROM" ? "i386_pc_rom" : CYG_HAL_STARTUP == "GRUB" ? (CYGHWR_HAL_I386_PC_LOAD_HIGH ? "i386_pc_grub_hi" : "i386_pc_grub") : "i386_pc_floppy" ]
flavor data
-- strings to clafers
CYGHWR_MEMORY_LAYOUT -> string
display = "Memory layout"
-- calculated
[this =
CYG_HAL_STARTUP = "RAM" =>
(CYGHWR_HAL_I386_PC_LOAD_HIGH => "i386_pc_ram_hi" else "i386_pc_ram")
else
CYG_HAL_STARTUP = "ROM" => "i386_pc_rom"
else
CYG_HAL_STARTUP = "GRUB" =>
(CYGHWR_HAL_I386_PC_LOAD_HIGH => "i386_pc_grub_hi"
else "i386_pc_grub")
else "i386_pc_floppy"]