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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [packages/] [hal/] [sh/] [sh3/] [v2_0/] [cdl/] [hal_sh_sh3.cdl] - Blame information for rev 454

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 27 unneback
# ====================================================================
2
#
3
#      hal_sh_sh3.cdl
4
#
5
#      SH3 variant HAL package configuration data
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:  jskov
45
# Contributors:
46
# Date:           2000-10-30
47
#
48
#####DESCRIPTIONEND####
49
#
50
# ====================================================================
51
 
52
cdl_package CYGPKG_HAL_SH_SH3 {
53
    display       "SH3 variant"
54
    parent        CYGPKG_HAL_SH
55
    hardware
56
    include_dir   cyg/hal
57
    define_header hal_sh_sh3.h
58
    description   "
59
        The SH3 (SuperH 3) variant HAL package provides generic
60
        support for SH3 variant CPUs."
61
 
62
    define_proc {
63
        puts $::cdl_system_header "#define CYGBLD_HAL_VARIANT_H   "
64
        puts $::cdl_header "#define CYGBLD_HAL_VAR_EXCEPTION_MODEL_H   "
65
        puts $::cdl_header "#define CYGBLD_HAL_VAR_EXCEPTION_MODEL_INC "
66
        puts $::cdl_header "#define CYGBLD_HAL_VAR_INTR_MODEL_H   "
67
    }
68
 
69
    compile       sh3_sci.c sh3_scif.c var_misc.c variant.S
70
 
71
    # The "-o file" is a workaround for CR100958 - without it the
72
    # output file would end up in the source directory under CygWin.
73
    # n.b. grep does not behave itself under win32
74
    make -priority 1 {
75
        /include/cyg/hal/sh3_offsets.inc : /src/var_mk_defs.c
76
        $(CC) $(CFLAGS) $(INCLUDE_PATH) -Wp,-MD,sh3_offsets.tmp -o var_mk_defs.tmp -S $<
77
        fgrep .equ var_mk_defs.tmp | sed s/#// > $@
78
        @echo $@ ": \\" > $(notdir $@).deps
79
        @tail +2 sh3_offsets.tmp >> $(notdir $@).deps
80
        @echo >> $(notdir $@).deps
81
        @rm sh3_offsets.tmp var_mk_defs.tmp
82
    }
83
 
84
    # CPU variant supported
85
    cdl_option CYGPKG_HAL_SH_7707A {
86
        display       "SH 7707A microprocessor"
87
        parent        CYGPKG_HAL_SH_CPU
88
        implements    CYGINT_HAL_SH_VARIANT
89
        implements    CYGINT_HAL_SH_CPG_T2
90
        default_value 0
91
        no_define
92
        define        -file=system.h CYGPKG_HAL_SH_7707A
93
        description "
94
            The SH3 7707A microprocessor. This is an embedded part that in
95
            addition to the SH3 processor core has built in peripherals
96
            such as memory controllers, serial ports, LCD controller and
97
            timers/counters."
98
        define_proc {
99
            puts $cdl_system_header "#define CYGBLD_HAL_CPU_MODULES_H "
100
        }
101
    }
102
 
103
    cdl_option CYGPKG_HAL_SH_7708 {
104
        display       "SH 7708 microprocessor"
105
        parent        CYGPKG_HAL_SH_CPU
106
        implements    CYGINT_HAL_SH_VARIANT
107
        implements    CYGINT_HAL_SH_CPG_T1
108
        default_value 0
109
        no_define
110
        define        -file=system.h CYGPKG_HAL_SH_7708
111
        description "
112
            The SH3 7708 microprocessor. This is an embedded part that in
113
            addition to the SH3 processor core has built in peripherals
114
            such as memory controllers, serial ports and
115
            timers/counters."
116
        define_proc {
117
            puts $cdl_system_header "#define CYGBLD_HAL_CPU_MODULES_H "
118
        }
119
    }
120
 
121
    cdl_option CYGPKG_HAL_SH_7709A {
122
        display       "SH 7709A microprocessor"
123
        parent        CYGPKG_HAL_SH_CPU
124
        implements    CYGINT_HAL_SH_VARIANT
125
        implements    CYGINT_HAL_SH_CPG_T3
126
        implements    CYGINT_HAL_SH_DMA_CHANNELS
127
        implements    CYGINT_HAL_SH_DMA_CHANNELS
128
        implements    CYGINT_HAL_SH_DMA_CHANNELS
129
        implements    CYGINT_HAL_SH_DMA_CHANNELS
130
        default_value 1
131
        no_define
132
        define        -file=system.h CYGPKG_HAL_SH_7709A
133
        description "
134
            The SH3 7709A microprocessor. This is an embedded part that in
135
            addition to the SH3 processor core has built in peripherals
136
            such as memory controllers, DMA controllers, A/D and D/A
137
            converters, serial ports and timers/counters."
138
        define_proc {
139
            puts $cdl_system_header "#define CYGBLD_HAL_CPU_MODULES_H "
140
        }
141
    }
142
 
143
    cdl_option CYGPKG_HAL_SH_7709R {
144
        display       "SH 7709R microprocessor"
145
        parent        CYGPKG_HAL_SH_CPU
146
        implements    CYGINT_HAL_SH_VARIANT
147
        implements    CYGINT_HAL_SH_CPG_T3
148
        default_value 0
149
        no_define
150
        define        -file=system.h CYGPKG_HAL_SH_7709R
151
        description "
152
            The SH3 7709R microprocessor. This is an embedded part that in
153
            addition to the SH3 processor core has built in peripherals
154
            such as memory controllers, DMA controllers, A/D and D/A
155
            converters, serial ports and timers/counters."
156
        define_proc {
157
            puts $cdl_system_header "#define CYGBLD_HAL_CPU_MODULES_H "
158
        }
159
    }
160
 
161
    cdl_option CYGPKG_HAL_SH_7709S {
162
        display       "SH 7709S microprocessor"
163
        parent        CYGPKG_HAL_SH_CPU
164
        implements    CYGINT_HAL_SH_VARIANT
165
        implements    CYGINT_HAL_SH_CPG_T3
166
        implements    CYGINT_HAL_SH_DMA_CHANNELS
167
        implements    CYGINT_HAL_SH_DMA_CHANNELS
168
        implements    CYGINT_HAL_SH_DMA_CHANNELS
169
        implements    CYGINT_HAL_SH_DMA_CHANNELS
170
        default_value 0
171
        no_define
172
        define        -file=system.h CYGPKG_HAL_SH_7709S
173
        description "
174
            The SH3 7709S microprocessor. This is an embedded part that in
175
            addition to the SH3 processor core has built in peripherals
176
            such as memory controllers, DMA controllers, A/D and D/A
177
            converters, serial ports and timers/counters."
178
        define_proc {
179
            puts $cdl_system_header "#define CYGBLD_HAL_CPU_MODULES_H "
180
        }
181
    }
182
 
183
    cdl_option CYGPKG_HAL_SH_7729 {
184
        display       "SH 7729 microprocessor"
185
        parent        CYGPKG_HAL_SH_CPU
186
        implements    CYGINT_HAL_SH_VARIANT
187
        implements    CYGINT_HAL_SH_CPG_T3
188
        default_value 0
189
        no_define
190
        define        -file=system.h CYGPKG_HAL_SH_7729
191
        description "
192
            The SH3 7729 microprocessor. This is an embedded part that in
193
            addition to the SH3 processor core has built in peripherals
194
            such as memory controllers, serial ports, and timers/counters,
195
            and a DSP engine."
196
        define_proc {
197
            puts $cdl_system_header "#define CYGBLD_HAL_CPU_MODULES_H "
198
        }
199
    }
200
 
201
    cdl_component CYGHWR_HAL_SH_CLOCK_SETTINGS {
202
        display          "SH on-chip generic clock controls"
203
        description      "
204
            The various clocks used by the system are controlled by
205
            these options, some of which are derived from platform
206
            settings."
207
        flavor        none
208
        no_define
209
 
210
        cdl_interface CYGINT_HAL_SH_CPG_T1 {
211
            display     "Clock pulse generator type 1"
212
        }
213
 
214
        cdl_interface CYGINT_HAL_SH_CPG_T2 {
215
            display     "Clock pulse generator type 2"
216
        }
217
 
218
        cdl_interface CYGINT_HAL_SH_CPG_T3 {
219
            display     "Clock pulse generator type 3"
220
        }
221
 
222
 
223
        cdl_option CYGHWR_HAL_SH_TMU_PRESCALE_0 {
224
            display       "TMU counter 0 prescaling"
225
            description   "
226
                The peripheral clock is driving the counter used for
227
                the real-time clock, prescaled by this factor."
228
            flavor        data
229
            legal_values  { 4 16 64 256 }
230
            default_value 4
231
        }
232
 
233
        cdl_option CYGHWR_HAL_SH_RTC_PRESCALE {
234
            display       "eCos RTC prescaling"
235
            flavor        data
236
            calculated    CYGHWR_HAL_SH_TMU_PRESCALE_0
237
        }
238
 
239
        cdl_option CYGHWR_HAL_SH_CLOCK_CKIO {
240
            display    "CKIO clock"
241
            no_define
242
            flavor     data
243
            # CKIO is either XTAL or PLL2 output
244
            calculated { CYGINT_HAL_SH_CPG_T1 ? (
245
                             (CYGHWR_HAL_SH_OOC_CLOCK_MODE == 7)
246
                             ? (CYGHWR_HAL_SH_OOC_XTAL)
247
                             : CYGHWR_HAL_SH_PLL2_OUTPUT
248
                         )
249
                         : CYGINT_HAL_SH_CPG_T2 ? (
250
                             (CYGHWR_HAL_SH_OOC_CLOCK_MODE == 2)
251
                             ? (CYGHWR_HAL_SH_OOC_XTAL)
252
                             : CYGHWR_HAL_SH_PLL2_OUTPUT
253
                         )
254
                         : CYGINT_HAL_SH_CPG_T3 ? (
255
                             (CYGHWR_HAL_SH_OOC_CLOCK_MODE == 7)
256
                             ? (CYGHWR_HAL_SH_OOC_XTAL)
257
                             : CYGHWR_HAL_SH_PLL2_OUTPUT
258
                         )
259
                         : 0 }
260
        }
261
 
262
        cdl_option CYGHWR_HAL_SH_PLL1_OUTPUT {
263
            display    "The clock output from PLL1"
264
            no_define
265
            flavor     data
266
            calculated { CYGHWR_HAL_SH_CLOCK_CKIO * CYGHWR_HAL_SH_OOC_PLL_1 }
267
        }
268
 
269
        cdl_option CYGHWR_HAL_SH_PLL2_OUTPUT {
270
            display    "The clock output from PLL2"
271
            no_define
272
            flavor     data
273
            calculated { CYGINT_HAL_SH_CPG_T1 ? (
274
                             (CYGHWR_HAL_SH_OOC_XTAL * CYGHWR_HAL_SH_OOC_PLL_2)
275
                         )
276
                         : CYGINT_HAL_SH_CPG_T2 ? (
277
                             (CYGHWR_HAL_SH_OOC_CLOCK_MODE == 5)
278
                             ? (CYGHWR_HAL_SH_OOC_XTAL / 2)
279
                             : (CYGHWR_HAL_SH_OOC_CLOCK_MODE == 6)
280
                             ? (14745600)
281
                             : (CYGHWR_HAL_SH_OOC_CLOCK_MODE == 7)
282
                             ? (11075600)
283
                             : (CYGHWR_HAL_SH_OOC_XTAL * CYGHWR_HAL_SH_OOC_PLL_2)
284
                         )
285
                         : CYGINT_HAL_SH_CPG_T3 ? (
286
                             (CYGHWR_HAL_SH_OOC_XTAL * CYGHWR_HAL_SH_OOC_PLL_2)
287
                         )
288
                         : 0 }
289
        }
290
 
291
 
292
        cdl_option CYGHWR_HAL_SH_DIVIDER1_INPUT {
293
            display    "The clock input to divider 1"
294
            no_define
295
            flavor     data
296
            # DIV1 input is either PLL2 output or PLL1 output
297
            calculated { (CYGHWR_HAL_SH_OOC_PLL_1 == 0)
298
                           ? CYGHWR_HAL_SH_PLL2_OUTPUT
299
                           : CYGHWR_HAL_SH_PLL1_OUTPUT }
300
        }
301
 
302
        cdl_option CYGHWR_HAL_SH_DIVIDER2_INPUT {
303
            display    "The clock input to divider 2"
304
            no_define
305
            flavor     data
306
            # DIV2 input is either PLL2 output or PLL1 output
307
            calculated { CYGINT_HAL_SH_CPG_T1 ? (
308
                             (CYGHWR_HAL_SH_OOC_CLOCK_MODE == 3 || CYGHWR_HAL_SH_OOC_CLOCK_MODE == 4)
309
                             ? CYGHWR_HAL_SH_PLL2_OUTPUT
310
                             : CYGHWR_HAL_SH_PLL1_OUTPUT
311
                         )
312
                         : CYGINT_HAL_SH_CPG_T2 ? (
313
                             (CYGHWR_HAL_SH_OOC_CLOCK_MODE <= 2)
314
                             ? CYGHWR_HAL_SH_PLL1_OUTPUT
315
                             : CYGHWR_HAL_SH_PLL2_OUTPUT
316
                         )
317
                         : CYGINT_HAL_SH_CPG_T3 ? (
318
                             (CYGHWR_HAL_SH_OOC_CLOCK_MODE == 3 || CYGHWR_HAL_SH_OOC_CLOCK_MODE == 4)
319
                             ? CYGHWR_HAL_SH_PLL2_OUTPUT
320
                             : CYGHWR_HAL_SH_PLL1_OUTPUT
321
                         )
322
                         : 0 }
323
        }
324
 
325
        cdl_option CYGHWR_HAL_SH_PROCESSOR_SPEED {
326
            display          "Processor clock speed (MHz)"
327
            flavor           data
328
            calculated       { CYGHWR_HAL_SH_DIVIDER1_INPUT / CYGHWR_HAL_SH_OOC_DIVIDER_1 }
329
            description      "
330
                The core (CPU, cache and MMU) speed is computed from
331
                the input clock speed and the divider 1 setting."
332
        }
333
 
334
        cdl_option CYGHWR_HAL_SH_BOARD_SPEED {
335
            display          "Platform bus clock speed (MHz)"
336
            flavor           data
337
            calculated       { CYGHWR_HAL_SH_CLOCK_CKIO }
338
            description      "
339
                The platform bus speed is CKIO."
340
        }
341
 
342
        cdl_option CYGHWR_HAL_SH_ONCHIP_PERIPHERAL_SPEED {
343
            display          "Processor on-chip peripheral clock speed (MHz)"
344
            flavor           data
345
            calculated       { CYGHWR_HAL_SH_DIVIDER2_INPUT / CYGHWR_HAL_SH_OOC_DIVIDER_2 }
346
            description      "
347
                The peripheral speed is computed from the input clock
348
                speed and the divider 2 settings."
349
        }
350
    }
351
 
352
    cdl_option CYGNUM_HAL_SH_SH3_SCI_BAUD_RATE {
353
        display          "SCI serial port default baud rate"
354
        flavor data
355
        legal_values     { 4800 9600 14400 19200 38400 57600 115200 }
356
        default_value    { CYGNUM_HAL_SH_SH3_SCI_BAUD_RATE_DEFAULT ? \
357
                           CYGNUM_HAL_SH_SH3_SCI_BAUD_RATE_DEFAULT : 38400 }
358
        description      "
359
           This controls the default baud rate used for communicating
360
           with GDB / displaying diagnostic output."
361
    }
362
 
363
    cdl_option CYGNUM_HAL_SH_SH3_SCIF_BAUD_RATE {
364
        display          "SCIF serial ports default baud rate"
365
        flavor data
366
        legal_values     { 4800 9600 14400 19200 38400 57600 115200 }
367
        default_value    { CYGNUM_HAL_SH_SH3_SCIF_BAUD_RATE_DEFAULT ? \
368
                           CYGNUM_HAL_SH_SH3_SCIF_BAUD_RATE_DEFAULT : 38400 }
369
        description      "
370
           This controls the default baud rate used for communicating
371
           with GDB / displaying diagnostic output."
372
    }
373
 
374
    cdl_component CYGPKG_HAL_SH_INTERRUPT {
375
        display          "Interrupt controls"
376
        flavor     none
377
        no_define
378
        description      "
379
            Initial interrupt settings can be specified using these option."
380
 
381
        cdl_option CYGHWR_HAL_SH_IRQ_HANDLE_SPURIOUS_INTERRUPTS {
382
            display          "Handle spurious interrupts"
383
            default_value    0
384
            description      "
385
               The SH3 may generate spurious interrupts with INTEVT = 0
386
               when changing the BL bit of the status register. Enabling
387
               this option will cause such interrupts to be identified
388
               very early in the interrupt handler and be ignored.  Given
389
               that the SH HAL uses the I-mask to control interrupts,
390
               these spurious interrupts should not occur, and so there
391
               should be no reason to include the special handling code."
392
        }
393
 
394
        cdl_option CYGHWR_HAL_SH_IRQ_USE_IRQLVL {
395
            display          "Use IRQ0-3 pins as IRL input"
396
            default_value    0
397
            description      "
398
                It is possible for the IRQ0-3 pins to be used as IRL
399
                inputs by enabling this option."
400
        }
401
 
402
        cdl_option CYGHWR_HAL_SH_IRQ_ENABLE_IRLS_INTERRUPTS {
403
            display          "Enable IRLS interrupt pins"
404
            default_value    0
405
            active_if        CYGHWR_HAL_SH_IRQ_USE_IRQLVL
406
            description      "
407
                IRLS interrupt pins must be specifically
408
                activated. When they are, they will cause the same
409
                type of interrupt as those caused by the IRL pins. If
410
                IRL and IRLS pins signal an interrupt at the same
411
                time, the highest level interrupt will be generated.
412
                Only available on some cores, and probably share pins
413
                with other interrupt sources (PINT) which cannot be
414
                used in this configuration."
415
        }
416
    }
417
 
418
    # Cache settings
419
    cdl_option CYGHWR_HAL_SH_CACHE_MODE_P0 {
420
        display       "Select cache mode set for P0/U0/P3 at startup"
421
        parent        CYGPKG_HAL_SH_CACHE
422
        default_value { "WRITE_BACK" }
423
        legal_values  { "WRITE_BACK" "WRITE_THROUGH" }
424
        flavor        data
425
        description "
426
            Controls what cache mode the cache should be put in at
427
            startup for areas P0, U0 and P3. Write-back mode improves
428
            performance by letting dirty data to be kept in the
429
            cache for a period of time, allowing mutiple writes to
430
            the same cache line to be written back to memory in
431
            one memory transaction. In Write-through mode, each
432
            individual write will cause a memory transaction."
433
    }
434
 
435
    cdl_option CYGHWR_HAL_SH_CACHE_MODE_P1 {
436
        display       "Select cache mode set for P1 at startup"
437
        parent        CYGPKG_HAL_SH_CACHE
438
        default_value { "WRITE_BACK" }
439
        legal_values  { "WRITE_BACK" "WRITE_THROUGH" }
440
        flavor        data
441
        description "
442
            Controls what cache mode the cache should be put in at
443
            startup for area P1. Write-back mode improves
444
            performance by letting dirty data to be kept in the
445
            cache for a period of time, allowing mutiple writes to
446
            the same cache line to be written back to memory in
447
            one memory transaction. In Write-through mode, each
448
            individual write will cause a memory transaction."
449
    }
450
}

powered by: WebSVN 2.1.0

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