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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [packages/] [hal/] [sh/] [sh2/] [v2_0/] [cdl/] [hal_sh_sh2.cdl] - Blame information for rev 737

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

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

powered by: WebSVN 2.1.0

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