source: rtems-docs/porting/cpu_model_variations.rst @ 6733466

4.115
Last change on this file since 6733466 was 6733466, checked in by Amar Takhar <amar@…>, on 01/17/16 at 00:08:48

Split document into seperate files by section.

  • Property mode set to 100644
File size: 6.1 KB
Line 
1CPU Model Variations
2####################
3
4XXX enhance using portability presentation from CS595 class.  See
5general/portability.ppt.
6
7Since the text in the next section was written, RTEMS view of
8portability has grown to distinguish totally portable, CPU
9family dependent, CPU model dependent, peripheral chip dependent
10and board dependent.  This text was part of a larger paper that
11did not even cover portability completely as it existed when this
12was written and certainly is out of date now. :)
13
14Overview of RTEMS Portability
15=============================
16
17RTEMS was designed to be a highly portable, reusable software component.
18This reflects the fundamental nature of embedded systems in which hardware
19components, ranging from boards to peripherals to even the processor
20itself, are selected specifically to meet the requirements of a particular
21project.
22
23Processor Families
24------------------
25
26Since there are a wide variety of embedded systems, there are a wide
27variety of processors targeting embedded systems. RTEMS alleviates some of
28the burden on the embedded systems programmer by providing a consistent,
29high-performance environment regardless of the target processor.  RTEMS
30has been ported to a variety of microprocessor families including:
31
32- Motorola ColdFire
33
34- Motorola MC68xxx
35
36- Motorola MC683xx
37
38- Intel ix86 (i386, i486, Pentium and above)
39
40- ARM
41
42- MIPS
43
44- PowerPC 4xx, 5xx, 6xx, 7xx, 8xx, and 84xx
45
46- SPARC
47
48- Hitachi H8/300
49
50- Hitachi SH
51
52- OpenCores OR32
53
54- Texas Instruments C3x/C4x
55
56In addition, there is a port of RTEMS to UNIX that uses standard UNIX
57services to simulate the embedded environment.
58
59Each RTEMS port supplies a well-defined set of services that are the
60foundation for the highly portable RTEMS and POSIX API implementations.
61When porting to a new processor family, one must provide the processor
62dependent implementation of these services.  This set of processor
63dependent core services includes software to perform interrupt
64dispatching, context switches, and manipulate task register sets.
65
66The RTEMS approach to handling varying processor models reflects the
67approach taken by the designers of the processors themselves.  In each
68processor family, there is a core architecture that must be implemented on
69all processor models within the family to provide any level of
70compatibility.  Many of the modern RISC architectures refer to this as the
71Architectural Definition.  The Architectural Definition is intended to be
72independent of any particular implementation. Additionally, there is a
73feature set which is allowed to vary in a defined way amongst the
74processor models.  These feature sets may be defined as Optional in the
75Architectural Definition, be left as implementation defined
76characteristics, or be processor model specific extensions.  Support for
77floating point, virtual memory, and low power mode are common Optional
78features included in an Architectural Definition.
79
80The processor family dependent software in RTEMS includes a definition of
81which features are present in each supported processor model.  This often
82makes adding support for a new processor model within a supported family
83as simple as determining which features are present in the new processor
84implementation.  If the new processor model varies in a way previously
85unaccounted for, then this must be addressed.  This could be the result of
86a new Optional feature set being added to the Architectural Definition.
87Alternatively, this particular processor model could have a new and
88different implementation of a feature left as undefined in the
89Architectural Definition.  This would require software to be written to
90utilize that feature.
91
92There is a relatively small set of features that may vary in a processor
93family.  As the number of processor models in the family grow, the
94addition of each new model only requires adding an entry for the new model
95to the single feature table.  It does not require searching for every
96conditional based on processor model and adding the new model in the
97appropriate place.  This significantly eases the burden of adding a new
98processor model as it centralizes and logically simplifies the process.
99
100Boards
101------
102
103Being portable both between models within a processor family and across
104processor families is not enough to address the needs of embedded systems
105developers.  Custom board development is the norm for embedded systems.
106Each of these boards is optimized for a particular project.  The processor
107and peripheral set have been chosen to meet a particular set of system
108requirements.  The tools in the embedded systems developers’ toolbox must
109support their project’s unique board.  RTEMS addresses this issue via the
110Board Support Package.
111
112RTEMS segregates board specific code to make it possible for the embedded
113systems developer to easily replace and customize this software.  A
114minimal Board Support Package includes device drivers for a clock tick,
115console I/O, and a benchmark timer (optional) as well as startup and
116miscellaneous support code.  The Board Support Package for a project may
117be extended to include the device drivers for any peripherals on the
118custom board.
119
120Applications
121------------
122
123One important design goal of RTEMS was to provide a bridge between the
124application software and the target hardware.  Most hardware dependencies
125for real-time applications can be localized to the low level device
126drivers which provide an abstracted view of the hardware.  The RTEMS I/O
127interface manager provides an efficient tool for incorporating these
128hardware dependencies into the system while simultaneously providing a
129general mechanism to the application code that accesses them.  A well
130designed real-time system can benefit from this architecture by building a
131rich library of standard application components which can be used
132repeatedly in other real-time projects. The following figure illustrates
133how RTEMS serves as a buffer between the project dependent application
134code and the target hardware.
135
136Coding Issues
137=============
138
139XXX deal with this as it applies to score/cpu.  Section name may
140be bad.
141
142.. COMMENT: COPYRIGHT (c) 1988-2002.
143
144.. COMMENT: On-Line Applications Research Corporation (OAR).
145
146.. COMMENT: All rights reserved.
147
Note: See TracBrowser for help on using the repository browser.