source: rtems/doc/supplements/sparc/cpumodel.texi @ ae68ff0

4.104.114.84.95
Last change on this file since ae68ff0 was ae68ff0, checked in by Joel Sherrill <joel.sherrill@…>, on 05/27/97 at 12:40:11

Initial revision

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