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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [hal/] [sh/] [sh2/] [current/] [cdl/] [hal_sh_sh2.cdl] - Blame information for rev 786

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 786 skrzyp
# ====================================================================
2
#
3
#      hal_sh_sh2.cdl
4
#
5
#      SH2 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 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:  jskov
44
# Contributors:
45
# Date:           2002-01-09
46
#
47
#####DESCRIPTIONEND####
48
#
49
# ====================================================================
50
 
51
cdl_package CYGPKG_HAL_SH_SH2 {
52
    display       "SH2 variant"
53
    parent        CYGPKG_HAL_SH
54
    hardware
55
    include_dir   cyg/hal
56
    define_header hal_sh_sh2.h
57
    description   "
58
        The SH2 (SuperH 2) variant HAL package provides generic
59
        support for SH2 variant CPUs."
60
 
61
    requires      CYGHWR_HAL_SH_BIGENDIAN
62
 
63
    define_proc {
64
        puts $::cdl_system_header "#define CYGBLD_HAL_VARIANT_H   "
65
        puts $::cdl_header "#define CYGBLD_HAL_VAR_EXCEPTION_MODEL_H   "
66
        puts $::cdl_header "#define CYGBLD_HAL_VAR_EXCEPTION_MODEL_INC "
67
        puts $::cdl_header "#define CYGBLD_HAL_VAR_INTR_MODEL_H   "
68
    }
69
 
70
    compile       sh2_sci.c sh2_scif.c var_misc.c variant.S
71
 
72
    # The "-o file" is a workaround for CR100958 - without it the
73
    # output file would end up in the source directory under CygWin.
74
    # n.b. grep does not behave itself under win32
75
    make -priority 1 {
76
        /include/cyg/hal/sh2_offsets.inc : /src/var_mk_defs.c
77
        $(CC) $(ACTUAL_CFLAGS) $(INCLUDE_PATH) -Wp,-MD,sh2_offsets.tmp -o var_mk_defs.tmp -S $<
78
        fgrep .equ var_mk_defs.tmp | sed s/#// > $@
79
        @echo $@ ": \\" > $(notdir $@).deps
80
        @tail -n +2 sh2_offsets.tmp >> $(notdir $@).deps
81
        @echo >> $(notdir $@).deps
82
        @rm sh2_offsets.tmp var_mk_defs.tmp
83
    }
84
 
85
    # CPU variant supported
86
    cdl_option CYGPKG_HAL_SH_7044 {
87
        display       "SH 7044 microprocessor"
88
        parent        CYGPKG_HAL_SH_CPU
89
        implements    CYGINT_HAL_SH_VARIANT
90
        implements    CYGINT_HAL_SH_CPG_T2
91
        default_value 1
92
        no_define
93
        define        -file=system.h CYGPKG_HAL_SH_7044
94
        description "
95
            The SH2 7044 microprocessor. This is an embedded part that in
96
            addition to the SH2 processor core has built in peripherals
97
            such as memory controllers, serial ports, and timers/counters.
98
            It also has some amount of flash memory."
99
        define_proc {
100
            puts $cdl_system_header "#define CYGBLD_HAL_CPU_MODULES_H "
101
        }
102
    }
103
 
104
    cdl_option CYGPKG_HAL_SH_7615 {
105
        display       "SH 7615 microprocessor"
106
        parent        CYGPKG_HAL_SH_CPU
107
        implements    CYGINT_HAL_SH_VARIANT
108
        implements    CYGINT_HAL_SH_CPG_T1
109
        default_value 0
110
        no_define
111
        define        -file=system.h CYGPKG_HAL_SH_7615
112
        description "
113
            The SH2 7615 microprocessor. This is an embedded part that in
114
            addition to the SH2 processor core has built in peripherals
115
            such as memory controllers, serial ports, timers/counters, and
116
            ethernet controller."
117
        define_proc {
118
            puts $cdl_system_header "#define CYGBLD_HAL_CPU_MODULES_H "
119
        }
120
    }
121
 
122
    cdl_component CYGHWR_HAL_SH_CLOCK_SETTINGS {
123
        display          "SH on-chip generic clock controls"
124
        description      "
125
            The various clocks used by the system are controlled by
126
            these options, some of which are derived from platform
127
            settings."
128
        flavor        none
129
        no_define
130
 
131
        cdl_interface CYGINT_HAL_SH_CPG_T1 {
132
            display     "Clock pulse generator type 1"
133
        }
134
 
135
        cdl_interface CYGINT_HAL_SH_CPG_T2 {
136
            display     "Clock pulse generator type 2"
137
        }
138
 
139
 
140
        cdl_option CYGHWR_HAL_SH_FRT_PRESCALE {
141
            display       "FRT prescaling"
142
            description   "
143
                The free running timer used for
144
                the real-time clock is prescaled by this factor."
145
            flavor        data
146
            active_if     CYGINT_HAL_SH_CPG_T1
147
            legal_values  { 8 32 128 }
148
            default_value 8
149
        }
150
 
151
        cdl_option CYGHWR_HAL_SH_CMT_PRESCALE {
152
            display       "CMT prescaling"
153
            description   "
154
                The Compare Match Timer used for
155
                the real-time clock is prescaled by this factor."
156
            flavor        data
157
            active_if     CYGINT_HAL_SH_CPG_T2
158
            legal_values  { 8 32 128 512 }
159
            default_value 8
160
        }
161
 
162
        cdl_option CYGHWR_HAL_SH_RTC_PRESCALE {
163
            display       "eCos RTC prescaling"
164
            flavor        data
165
            calculated    { CYGHWR_HAL_SH_FRT_PRESCALE ? CYGHWR_HAL_SH_FRT_PRESCALE :
166
                            CYGHWR_HAL_SH_CMT_PRESCALE ? CYGHWR_HAL_SH_CMT_PRESCALE :
167
 
168
                          }
169
        }
170
 
171
        cdl_option CYGHWR_HAL_SH_CLOCK_CKIO {
172
            display    "CKIO clock"
173
            no_define
174
            flavor     data
175
            # CKIO is either XTAL (input = PLL2 disabled) or PLL2 output
176
            calculated { CYGINT_HAL_SH_CPG_T1 ? (
177
                             (CYGHWR_HAL_SH_OOC_CLOCK_MODE >= 4 && CYGHWR_HAL_SH_OOC_CLOCK_MODE <= 6)
178
                             ? (CYGHWR_HAL_SH_OOC_XTAL)
179
                             : CYGHWR_HAL_SH_PLL2_OUTPUT
180
                         )
181
                         : CYGINT_HAL_SH_CPG_T2 ? (
182
                             CYGHWR_HAL_SH_OOC_XTAL
183
                         )
184
                         : 0 }
185
        }
186
 
187
        cdl_option CYGHWR_HAL_SH_PLL1_OUTPUT {
188
            display    "The clock output from PLL1"
189
            no_define
190
            flavor     data
191
            calculated { CYGHWR_HAL_SH_CLOCK_CKIO * CYGHWR_HAL_SH_OOC_PLL_1 }
192
        }
193
 
194
        cdl_option CYGHWR_HAL_SH_PLL2_OUTPUT {
195
            display    "The clock output from PLL2"
196
            no_define
197
            flavor     data
198
            calculated { CYGINT_HAL_SH_CPG_T1 ? (
199
                             (CYGHWR_HAL_SH_OOC_XTAL * CYGHWR_HAL_SH_OOC_PLL_2)
200
                         )
201
                         : CYGINT_HAL_SH_CPG_T2 ? (
202
                             (CYGHWR_HAL_SH_OOC_XTAL * CYGHWR_HAL_SH_OOC_PLL)
203
                         )
204
                         : 0 }
205
        }
206
 
207
        cdl_option CYGHWR_HAL_SH_PROCESSOR_SPEED {
208
            display          "Processor clock speed (MHz)"
209
            flavor           data
210
            calculated       { CYGHWR_HAL_SH_PLL2_OUTPUT / CYGHWR_HAL_SH_OOC_DIVM }
211
            description      "
212
                The core (CPU, cache and MMU) speed is computed from
213
                the input clock speed and the divider DIVM setting."
214
        }
215
 
216
        cdl_option CYGHWR_HAL_SH_BOARD_SPEED {
217
            display          "Platform bus clock speed (MHz)"
218
            flavor           data
219
            calculated       { CYGHWR_HAL_SH_CLOCK_CKIO }
220
            description      "
221
                The platform bus speed is CKIO."
222
        }
223
 
224
        cdl_option CYGHWR_HAL_SH_ONCHIP_PERIPHERAL_SPEED {
225
            display          "Processor on-chip peripheral clock speed (MHz)"
226
            flavor           data
227
            calculated       { CYGHWR_HAL_SH_PLL2_OUTPUT / CYGHWR_HAL_SH_OOC_DIVP }
228
            description      "
229
                The peripheral speed is computed from the input clock
230
                speed and the divider DIVP setting."
231
        }
232
    }
233
 
234
    cdl_option CYGNUM_HAL_SH_SH2_SCI_BAUD_RATE {
235
        display          "SCI serial port default baud rate"
236
        flavor data
237
        legal_values     { 4800 9600 14400 19200 38400 57600 115200 }
238
        default_value    { CYGNUM_HAL_SH_SH2_SCI_BAUD_RATE_DEFAULT ? \
239
                           CYGNUM_HAL_SH_SH2_SCI_BAUD_RATE_DEFAULT : 38400 }
240
        description      "
241
           This controls the default baud rate used for communicating
242
           with GDB / displaying diagnostic output."
243
    }
244
 
245
    cdl_option CYGNUM_HAL_SH_SH2_SCIF_BAUD_RATE {
246
        display          "SCIF serial ports default baud rate"
247
        flavor data
248
        legal_values     { 4800 9600 14400 19200 38400 57600 115200 }
249
        default_value    { CYGNUM_HAL_SH_SH2_SCIF_BAUD_RATE_DEFAULT ? \
250
                           CYGNUM_HAL_SH_SH2_SCIF_BAUD_RATE_DEFAULT : 38400 }
251
        description      "
252
           This controls the default baud rate used for communicating
253
           with GDB / displaying diagnostic output."
254
    }
255
 
256
    cdl_option CYGHWR_HAL_SH_SH2_SCIF_ASYNC_RXTX {
257
        display          "SCIF should support async RX/TX"
258
        default_value    0
259
        description      "
260
            Some transceiver modes require the transmitter and
261
            receiver to never be enabled at the same time. Enabling
262
            this option lets clients enable async mode."
263
    }
264
 
265
 
266
    cdl_option CYGHWR_HAL_SH_SH2_SCIF_IRDA_TXRX_COMPENSATION {
267
        display          "SCIF IrDA TX/RX switch compensation"
268
        default_value    1
269
        description      "
270
            When switching from TX mode to RX mode, the controller causes
271
            a spurious 0xff character to be received at speeds up to
272
            57600 baud. At higher baud rates, more spurious characters
273
            may be received. Enabling this option tries to remove the
274
            spurious characters, but since there are no errors reported
275
            from the controller, it is impossible to do so with any kind
276
            of precision.
277
            Having this option enabled makes RedBoot usable. There is a
278
            matching option in the eCos serial driver controlling a
279
            similar kludge, allowing some eCos serial tests to run.
280
            It is an incomplete kludge however, and for any real use of
281
            the IrDA mode for data transmission, the option should be
282
            disabled, and a protocol capable of handling the spurious
283
            receive characters must be used on top of the driver.
284
            Note that the problem is exaggerated when the baud rate is
285
            changed."
286
    }
287
 
288
    cdl_component CYGPKG_HAL_SH_INTERRUPT {
289
        display          "Interrupt controls"
290
        flavor     none
291
        no_define
292
        description      "
293
            Initial interrupt settings can be specified using these option."
294
 
295
        cdl_option CYGHWR_HAL_SH_IRQ_HANDLE_SPURIOUS_INTERRUPTS {
296
            display          "Handle spurious interrupts"
297
            default_value    0
298
            description      "
299
               The SH2 may generate spurious interrupts with INTEVT = 0
300
               when changing the BL bit of the status register. Enabling
301
               this option will cause such interrupts to be identified
302
               very early in the interrupt handler and be ignored.  Given
303
               that the SH HAL uses the I-mask to control interrupts,
304
               these spurious interrupts should not occur, and so there
305
               should be no reason to include the special handling code."
306
        }
307
 
308
        cdl_option CYGHWR_HAL_SH_IRQ_USE_IRQLVL {
309
            display          "Use IRQ0-3 pins as IRL input"
310
            default_value    0
311
            description      "
312
                It is possible for the IRQ0-3 pins to be used as IRL
313
                inputs by enabling this option."
314
        }
315
 
316
        cdl_option CYGHWR_HAL_SH_IRQ_ENABLE_IRLS_INTERRUPTS {
317
            display          "Enable IRLS interrupt pins"
318
            default_value    0
319
            active_if        CYGHWR_HAL_SH_IRQ_USE_IRQLVL
320
            description      "
321
                IRLS interrupt pins must be specifically
322
                activated. When they are, they will cause the same
323
                type of interrupt as those caused by the IRL pins. If
324
                IRL and IRLS pins signal an interrupt at the same
325
                time, the highest level interrupt will be generated.
326
                Only available on some cores, and probably share pins
327
                with other interrupt sources (PINT) which cannot be
328
                used in this configuration."
329
        }
330
    }
331
 
332
    # Cache settings
333
    cdl_option CYGHWR_HAL_SH_CACHE_MODE {
334
        display       "Select cache mode set at startup"
335
        parent        CYGPKG_HAL_SH_CACHE
336
        default_value { "WRITE_BACK" }
337
        legal_values  { "WRITE_BACK" "WRITE_THROUGH" }
338
        flavor        data
339
        description "
340
            Controls what cache mode the cache should be put in at
341
            startup. Write-back mode improves
342
            performance by letting dirty data to be kept in the
343
            cache for a period of time, allowing mutiple writes to
344
            the same cache line to be written back to memory in
345
            one memory transaction. In Write-through mode, each
346
            individual write will cause a memory transaction."
347
    }
348
}

powered by: WebSVN 2.1.0

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