source: rtems/doc/supplements/sparc/cpumodel.texi @ 1e524995

4.104.114.84.95
Last change on this file since 1e524995 was 1e524995, checked in by Joel Sherrill <joel.sherrill@…>, on 02/06/98 at 14:14:30

Updated copyrights

  • Property mode set to 100644
File size: 7.2 KB
Line 
1@c
2@c  COPYRIGHT (c) 1988-1998.
3@c  On-Line Applications Research Corporation (OAR).
4@c  All rights reserved.
5@c
6@c  $Id$
7@c
8
9@ifinfo
10@node CPU Model Dependent Features, CPU Model Dependent Features Introduction, Preface, Top
11@end ifinfo
12@chapter CPU Model Dependent Features
13@ifinfo
14@menu
15* CPU Model Dependent Features Introduction::
16* CPU Model Dependent Features CPU Model Feature Flags::
17* CPU Model Dependent Features CPU Model Implementation Notes::
18@end menu
19@end ifinfo
20
21@ifinfo
22@node CPU Model Dependent Features Introduction, CPU Model Dependent Features CPU Model Feature Flags, CPU Model Dependent Features, CPU Model Dependent Features
23@end ifinfo
24@section Introduction
25
26Microprocessors are generally classified into
27families with a variety of CPU models or implementations within
28that family.  Within a processor family, there is a high level
29of binary compatibility.  This family may be based on either an
30architectural specification or on maintaining compatibility with
31a popular processor.  Recent microprocessor families such as the
32SPARC or PA-RISC are based on an architectural specification
33which is independent or any particular CPU model or
34implementation.  Older families such as the M68xxx and the iX86
35evolved as the manufacturer strived to produce higher
36performance processor models which maintained binary
37compatibility with older models.
38
39RTEMS takes advantage of the similarity of the
40various models within a CPU family.  Although the models do vary
41in significant ways, the high level of compatibility makes it
42possible to share the bulk of the CPU dependent executive code
43across the entire family.
44
45@ifinfo
46@node CPU Model Dependent Features CPU Model Feature Flags, CPU Model Dependent Features CPU Model Name, CPU Model Dependent Features Introduction, CPU Model Dependent Features
47@end ifinfo
48@section CPU Model Feature Flags
49@ifinfo
50@menu
51* CPU Model Dependent Features CPU Model Name::
52* CPU Model Dependent Features Floating Point Unit::
53* CPU Model Dependent Features Bitscan Instruction::
54* CPU Model Dependent Features Number of Register Windows::
55* CPU Model Dependent Features Low Power Mode::
56@end menu
57@end ifinfo
58
59Each processor family supported by RTEMS has a
60list of features which vary between CPU models
61within a family.  For example, the most common model dependent
62feature regardless of CPU family is the presence or absence of a
63floating point unit or coprocessor.  When defining the list of
64features present on a particular CPU model, one simply notes
65that floating point hardware is or is not present and defines a
66single constant appropriately.  Conditional compilation is
67utilized to include the appropriate source code for this CPU
68model's feature set.  It is important to note that this means
69that RTEMS is thus compiled using the appropriate feature set
70and compilation flags optimal for this CPU model used.  The
71alternative would be to generate a binary which would execute on
72all family members using only the features which were always
73present.
74
75This section presents the set of features which vary
76across SPARC implementations and are of importance to RTEMS.
77The set of CPU model feature macros are defined in the file
78c/src/exec/score/cpu/sparc/sparc.h based upon the particular CPU
79model defined on the compilation command line.
80
81@ifinfo
82@node CPU Model Dependent Features CPU Model Name, CPU Model Dependent Features Floating Point Unit, CPU Model Dependent Features CPU Model Feature Flags, CPU Model Dependent Features CPU Model Feature Flags
83@end ifinfo
84@subsection CPU Model Name
85
86The macro CPU_MODEL_NAME is a string which designates
87the name of this CPU model.  For example, for the European Space
88Agency's ERC32 SPARC model, this macro is set to the string
89"erc32".
90
91@ifinfo
92@node CPU Model Dependent Features Floating Point Unit, CPU Model Dependent Features Bitscan Instruction, CPU Model Dependent Features CPU Model Name, CPU Model Dependent Features CPU Model Feature Flags
93@end ifinfo
94@subsection Floating Point Unit
95
96The macro SPARC_HAS_FPU is set to 1 to indicate that
97this CPU model has a hardware floating point unit and 0
98otherwise.
99
100@ifinfo
101@node CPU Model Dependent Features Bitscan Instruction, CPU Model Dependent Features Number of Register Windows, CPU Model Dependent Features Floating Point Unit, CPU Model Dependent Features CPU Model Feature Flags
102@end ifinfo
103@subsection Bitscan Instruction
104
105The macro SPARC_HAS_BITSCAN is set to 1 to indicate
106that this CPU model has the bitscan instruction.  For example,
107this instruction is supported by the Fujitsu SPARClite family.
108
109@ifinfo
110@node CPU Model Dependent Features Number of Register Windows, CPU Model Dependent Features Low Power Mode, CPU Model Dependent Features Bitscan Instruction, CPU Model Dependent Features CPU Model Feature Flags
111@end ifinfo
112@subsection Number of Register Windows
113
114The macro SPARC_NUMBER_OF_REGISTER_WINDOWS is set to
115indicate the number of register window sets implemented by this
116CPU model.  The SPARC architecture allows a for a maximum of
117thirty-two register window sets although most implementations
118only include eight.
119
120@ifinfo
121@node CPU Model Dependent Features Low Power Mode, CPU Model Dependent Features CPU Model Implementation Notes, CPU Model Dependent Features Number of Register Windows, CPU Model Dependent Features CPU Model Feature Flags
122@end ifinfo
123@subsection Low Power Mode
124
125The macro SPARC_HAS_LOW_POWER_MODE is set to one to
126indicate that this CPU model has a low power mode.  If low power
127is enabled, then there must be CPU model specific implementation
128of the IDLE task in c/src/exec/score/cpu/sparc/cpu.c.  The low
129power mode IDLE task should be of the form:
130
131@example
132while ( TRUE ) @{
133  enter low power mode
134@}
135@end example
136
137The code required to enter low power mode is CPU model specific.
138
139@ifinfo
140@node CPU Model Dependent Features CPU Model Implementation Notes, Calling Conventions, CPU Model Dependent Features Low Power Mode, CPU Model Dependent Features
141@end ifinfo
142@section CPU Model Implementation Notes
143
144The ERC32 is a custom SPARC V7 implementation based on the Cypress 601/602
145chipset.  This CPU has a number of on-board peripherals and was developed by
146the European Space Agency to target space applications.  RTEMS currently
147provides support for the following peripherals:
148
149@itemize @bullet
150@item UART Channels A and B
151@item General Purpose Timer
152@item Real Time Clock
153@item Watchdog Timer (so it can be disabled)
154@item Control Register (so powerdown mode can be enabled)
155@item Memory Control Register
156@item Interrupt Control
157@end itemize
158
159The General Purpose Timer and Real Time Clock Timer provided with the ERC32
160share the Timer Control Register.  Because the Timer Control Register is write
161only, we must mirror it in software and insure that writes to one timer do not
162alter the current settings and status of the other timer.  Routines are
163provided in erc32.h which promote the view that the two timers are completely
164independent.  By exclusively using these routines to access the Timer Control
165Register, the application can view the system as having a General Purpose
166Timer Control Register and a Real Time Clock Timer Control Register
167rather than the single shared value.
168
169The RTEMS Idle thread take advantage of the low power mode provided by the
170ERC32.  Low power mode is entered during idle loops and is enabled at
171initialization time.
Note: See TracBrowser for help on using the repository browser.