📄 cpumodel.t
字号:
@c@c COPYRIGHT (c) 1988-2002.@c On-Line Applications Research Corporation (OAR).@c All rights reserved.@c@c $Id: cpumodel.t,v 1.7.4.1 2003/05/22 08:07:22 ralf Exp $@c@chapter CPU Model Dependent Features@section IntroductionMicroprocessors are generally classified intofamilies with a variety of CPU models or implementations withinthat family. Within a processor family, there is a high levelof binary compatibility. This family may be based on either anarchitectural specification or on maintaining compatibility witha popular processor. Recent microprocessor families such as theSPARC or PA-RISC are based on an architectural specificationwhich is independent or any particular CPU model orimplementation. Older families such as the M68xxx and the iX86evolved as the manufacturer strived to produce higherperformance processor models which maintained binarycompatibility with older models.RTEMS takes advantage of the similarity of thevarious models within a CPU family. Although the models do varyin significant ways, the high level of compatibility makes itpossible to share the bulk of the CPU dependent executive codeacross the entire family.@section CPU Model Feature FlagsEach processor family supported by RTEMS has alist of features which vary between CPU modelswithin a family. For example, the most common model dependentfeature regardless of CPU family is the presence or absence of afloating point unit or coprocessor. When defining the list offeatures present on a particular CPU model, one simply notesthat floating point hardware is or is not present and defines asingle constant appropriately. Conditional compilation isutilized to include the appropriate source code for this CPUmodel's feature set. It is important to note that this meansthat RTEMS is thus compiled using the appropriate feature setand compilation flags optimal for this CPU model used. Thealternative would be to generate a binary which would execute onall family members using only the features which were alwayspresent.This section presents the set of features which varyacross SPARC implementations and are of importance to RTEMS.The set of CPU model feature macros are defined in the filecpukit/score/cpu/sparc/sparc.h based upon the particular CPUmodel defined on the compilation command line.@subsection CPU Model NameThe macro CPU_MODEL_NAME is a string which designatesthe name of this CPU model. For example, for the European SpaceAgency's ERC32 SPARC model, this macro is set to the string"erc32".@subsection Floating Point UnitThe macro SPARC_HAS_FPU is set to 1 to indicate thatthis CPU model has a hardware floating point unit and 0otherwise.@subsection Bitscan InstructionThe macro SPARC_HAS_BITSCAN is set to 1 to indicatethat this CPU model has the bitscan instruction. For example,this instruction is supported by the Fujitsu SPARClite family.@subsection Number of Register WindowsThe macro SPARC_NUMBER_OF_REGISTER_WINDOWS is set toindicate the number of register window sets implemented by thisCPU model. The SPARC architecture allows a for a maximum ofthirty-two register window sets although most implementationsonly include eight.@subsection Low Power ModeThe macro SPARC_HAS_LOW_POWER_MODE is set to one toindicate that this CPU model has a low power mode. If low poweris enabled, then there must be CPU model specific implementationof the IDLE task in cpukit/score/cpu/sparc/cpu.c. The lowpower mode IDLE task should be of the form:@examplewhile ( TRUE ) @{ enter low power mode@}@end exampleThe code required to enter low power mode is CPU model specific.@section CPU Model Implementation Notes The ERC32 is a custom SPARC V7 implementation based on the Cypress 601/602chipset. This CPU has a number of on-board peripherals and was developed bythe European Space Agency to target space applications. RTEMS currentlyprovides support for the following peripherals:@itemize @bullet@item UART Channels A and B@item General Purpose Timer@item Real Time Clock@item Watchdog Timer (so it can be disabled)@item Control Register (so powerdown mode can be enabled)@item Memory Control Register@item Interrupt Control@end itemizeThe General Purpose Timer and Real Time Clock Timer provided with the ERC32share the Timer Control Register. Because the Timer Control Register is writeonly, we must mirror it in software and insure that writes to one timer do notalter the current settings and status of the other timer. Routines areprovided in erc32.h which promote the view that the two timers are completelyindependent. By exclusively using these routines to access the Timer ControlRegister, the application can view the system as having a General PurposeTimer Control Register and a Real Time Clock Timer Control Registerrather than the single shared value.The RTEMS Idle thread take advantage of the low power mode provided by theERC32. Low power mode is entered during idle loops and is enabled atinitialization time.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -