当前位置:文档之家› 移植COS-II中英文翻译资料

移植COS-II中英文翻译资料

移植COS-II中英文翻译资料
移植COS-II中英文翻译资料

中文4200字

移植μC/OS-II

这篇文章介绍如何将μC/OS-II移植到不同的处理器上。所谓移植,就是使一个实时内核能在其他的微处理器上运行。为了方便移植,大部分μC/OS-II的代码是用C语言编写的:但是,仍需要用C语言和汇编语言编写一些与处理器硬件相关的代码,这是因为μC/OS-II在读/写处理器寄存器时,只能通过汇编语言来实现。由于μC/OS-II在设计前就已经考虑了可移植性,所以它的移植相对来说是比较容易的。要使μC/OS-II正常运行,处理器必须满足以下要求:

(1)处理器的C编译器能产生可重入型代码:

(2) 处理器支持中断,并且能产生定时中断(通常为10-100Hz);

(3) 用C语言就可以开关中断;

(4) 处理器能支持一定数量的数据存储器的硬件堆栈;

(5) 处理器有将堆栈指针以及其他CPU寄存器的内容读出、并存储到堆栈或内存中去的指令;

如果已经了解处理器和C编译器的技术细节,那么移植的工作是非常容易的,测试一个像μC/OS-II这样的实时内核其实并不复杂,甚至可以在没有任何应用程序下测试,换句话说,就是让内核自己测试自己。有两种原因要这样做:第一,避免使本来就复杂的事情变的更加复杂化;第二,如果出现问题可以知道问题出在内核代码中,而不是应用程序中。刚开始时,可以运行一些简单的任务和时钟节拍中断程序。一旦多任务调度成功运行了,再添加应用程序的任务就更加容易了。

1.1 开发工具

如前所述移植μC/OS-II需要标准的C交叉编译器,并且是针对所使用的CPU 的;因为它是一个可剥夺的内核,只能通过C编译器来产生可重入型代码。同时C编译器还要支持汇编语言程序。绝大部分为嵌入式系统设计的C编译器都包括汇编器、链接器、定位器。链接器用来将不同的模块(编译过或汇编过的文件)链接成目标文件;定位器则允许将代码和数据放置在目标处理器的指定内存空间中。

所用的C编译器还提供另一种机制,能在C编译器中开中断和关中断。一些编译器允许在C语言源代码中直接插入汇编语句,这就使得插入相应的处理器中的指令开中断和关中断变得容易了。

1.2 文件

(1)INCLUDES.H文件

INCLUDES.H是一个头文件,它出现在每个.C文件的第一行,如下:

# include“ includes.h”

INCLUDES.H文件使得工程项目中的每个.C文件无需分别考虑它实际上需

要哪些头文件。使用INCLUDES.H文件的唯一缺点就是它可能包含一些与当前

要编译的.C文件实际上不相干的头文件。这意味着每个文件的编译时间都会增

加;但由于他增加了代码的可移植性,所以还是决定使用这种方法。也可以通过

重新编译INCLUDES.H文件来增加头文件,但是头文件必须添加在文件列表的

最后。

(2)OS_CPU.H文件

OS_CPU.H包含了用#define语句定义的、与处理器相关的常数、宏以及类

型。OS_CPU.H文件的大体结构如程序清单T1所列:

#ifdef

#define OS_CPU_EXT

#else

#define OS_CPU_EXT extern

#endif

typedef unsigned char BOOLEAN;

typedef unsigned char INT8U; /* 无符号8位整数*/

typedef signed char INT8S; /* 有符号8位整数*/

typedef unsigned int INT16U; /* 无符号16位整数*/

typedef signed int INT16S; /* 有符号16位整数*/

typedef unsigned long INT32U; /* 无符号32位整数 */ typedef signed long INT32S; /* 有符号32位整数*/

typedef float FP32; /* 单精度浮点数 */

typedef double FP64; /* 双精度浮点数 */

typedef unsigned int OS_STK; /* 堆栈入口宽度为16位*/

#define OS_ENTER_CRITICAL() ??? /* 关中断*/

#define OS_EXIT_CRITICAL() ??? /* 开中断s */ #define OS_STK_GROWTH 1 /* 定义堆栈方向:1=向下递减,0=向上递增

*/

#define OS_TASK_SW() ???

程序清单T1

①OS_CPU.H,与编译器相关的数据类型

因为不同的微处理器有不同的字长,所以μC/OS-II的移植包括了一系列的数据类型的定义,而确保其可移植性。尤其是,μC/OS-II代码从不使用C语言中的short, int 及long等数据类型,因为它们是与编译器相关的,是不可移植的。相反,定义的数据结构等既是可移植的,又很直观。

举例来说,INT16U数据类型总是代表16位的无符号整型数。这样μC/OS-II 就可以断定,声明为该数据类型变量的范围都是0~65535。将μC/OS-II移植到32位的处理器上,就意味着INT16U实际被声明为无符号短整型数,而不是无符号整数,但是,μC/OS-II处理的仍然是INT16U。

你必须将任务堆栈的数据类型告诉μC/OS-II。这是通过为OS_STK声明恰当的C数据类型来实现的。如果处理器的堆栈是32位的,那么就应该将OS_STK 声明:为:unsigned int,所有的任务堆栈都必须声明使用OS_STK作为它的数据类型。

用户需要做的只是查阅编译器文档,找出对应于μC/OS-II的标准的C的相应数据类型。

②OS_CPU.H,OS_ENTER_CRITICAL()和OS_EXIT_CRITICAL()

像其它的实时内核一样,μC/OS-II需要先关中断再处理临界段代码,并且在处理完毕后再重新开中段。这就能够保证临界段代码免受多任务或中断服务子程序的破坏。通常每个处理器都会提供一定的汇编指令来开关中断,C编译器必须有一定的机制直接从C语言中执行这些操作。有些编译器允许在C源代码中直接加入汇编语句,这就使得插入处理器指令来开关中断变的容易,有些其它的编译器提供语言扩展功能,可以直接从C语言中开关中断。为了隐藏编译器厂商提供的不同实现方法,以增加可移植性,μC/OS-II定义了2个宏,用来关开中断:OS_ENTER_CRITICAL()和OS_EXIT_CRITICAL(),如T1:

它们都是成对出现的,分别加在临界段代码的前面和后面;

μC/OS-II Service Function

{

OS_ENTER_CRITICAL();

/*临界段代码*/

OS_EXIT_CRITICAL();

}

T1

方法一:

实现OS_ENTER_CRITICAL()和OS_EXIT_CRITICAL()这两个宏的这种方法是最简单的方法,在中调用处理器指令关中断,以及在中调用相应处理器指令

开中断;但是这个过程还存在小小的问题:如果在禁止中断的情况下调用μC/OS-II函数,那么从μC/OS-II函数返回时,中断可能会变成允许的了。而实际上如果调用μC/OS-II之前中断是关掉的希望从μC/OS-II函数返回时,希望中断还是关掉的。在这种情况下,仅靠这种方法是不适宜的。

方法二:

执行OS_ENTER_CRITICAL()时,先将中断状态保存到堆栈中,然后关中断;而当执行OS_EXIT_CRITICAL()时,再从堆栈中恢复原来的中断开关状态。如果用这种方法,那么不管用户是在中断禁止,还是中断允许的情况下调用μC/OS-II 的功能函数,调用后都不会改变中断状态。应用程序可以调用OS_ENTER_CRITICAL()和OS_EXIT_CRITICAL(),以保护临界段代码;但是,在使用这种方法时需特别小心,因为如果在调用像OSTimeDly()之类的功能函数之前就关掉了中断,应用程序就会崩溃。发生这种情况的原因是,任务被挂起,知道延迟时间到,而中断是关掉的。OSTimeDly()实际上是依靠时钟节拍实现中断的,而因为中断是关掉的,程序不可能获得时钟节拍中断。明显的,所有的PEND调用都会涉及到这个问题,需十分小心。一个通用的办法是,应该在中断允许的情况下调用μC/OS-II的系统功能函数。

③OS_CPU.H, OS_STK_GROWTH

绝大多数微处理器和微控制器的堆栈都是从上往下递减的,但是也有某些处理器使用的是相反的方式,μC/OS-II被设计成对这两种情况都可以处理,只要再用配置常数OS_STK_GROWTH指定堆栈的方向就可以了:

置OS_STK_GROWTH为0,表示堆栈从下(低地址)往上(高地址)递增:

置OS_STK_GROWTH为1,表示堆栈从上(高地址)往下(低地址)递减。

④OS_CPU.H, OS_TASK_SW()

OS_TASK_SW()是一个宏,是在μC/OS-II从低优先级任务切换到高优先级任务时须用到的。OS_TASK_SW()总是在任务级代码中被调用。另一个函数OSIntExit()用在中断服务子程序ISR中。任务切换只是简单地将处理器的寄存器保存到将被挂起的任务的堆栈中,并且从堆栈中恢复要运行的更高优先级的任务。

在μC/OS-II中,处于就绪态任务的堆栈结构看起来就像刚刚发生过中断一样,所有的寄存器都保存在堆栈中。换句话说,μC/OS-II要运行处于就绪态的任务必须要做的事是,从任务堆栈中恢复所有的寄存器,并且执行中断返回指令。为了任务调度,可以通过执行OS_TASK_SW()模仿中断的产生。绝大多数处理器会提供软中断或指令陷阱来完成这项功能。中断服务子程序或指令陷阱处理函数(也叫做异常处理函数)的中断向量地址必须指向汇编语言函数OSCtxSw()。

例如,在Intel或者AMD80X86处理器上可以使用INT指令,但是中断向量

必须指向OSCtxSw()。有些处理器如Z80,并不提供软中断机制。在这种情况下需要想办法将堆栈结构设置成与软中断发生后的堆栈结构一样。在OS_TASK_SW()函数中调用OSCtxSw(),而不是将某个中断向量指向OSCtxSw()。实际上μC/OS-II已经被移植到了Z80处理器上,μC/OS-II也同样是可以的。(3)OS_CPU_A.ASM

μC/OS-II的移植实例要求用户编写4个简单的汇编程序:

OSStartHighRdy()

OSCtxSw()

OSIntCtxSw()

OSTickISR()

如果编译器支持插入行汇编代码,就可以将所有与处理器相关的代码放到OS_CPU.C文件中,而不必再有单独的汇编语言文件。

①OS_CPU_A.ASM, OSStartHighRdy()

OSStart()函数调用OSStartHighRdy()来使就绪态任务中优先级最高的任务开始运行,在调用它之前,要已经建立了至少一个应用任务。OSStartHighRdy()假设OSTCBHighRdy指向最高优先级任务的任务控制块。就像先前提到的,在μC/OS-II中处于就绪态任务的堆栈结构看起来就像刚发生过中断一样,所有的寄存器都保存在堆栈中。要想运行最高优先级任务,需将所有处理器按顺序从任务堆栈中恢复出来,并且执行中断返回指令。为简单起见,堆栈指针总是存储字任务控制块的开头。换句话说,也就是需要恢复的任务堆栈指针总是存储在任务控制块的偏移地址为0的位置。

注意到OSStartHighRdy()必须调用OSTaskSwHook()函数,但OSStartHighRdy()函数只是做了任务切换工作的一半——只是完成了高优先级任务寄存器的恢复,而并没有保存当前任务的寄存器。OSTaskSwHook()函数必须检查OSRunning位,以确定OSTaskSwHook()函数是被OSStartHighRdy()调用的(OSRunning是FALSE),还是在正常的任务切换之中(OSRunning是TRUE)被调用的。

②OS_CPU_A.ASM, OSCtxSw()

任务级的切换是通过执行软中段指令,或者依据处理器的不同,执行TRAP 指令来实现的。中断服务子程序,陷阱或异常处理的向量地址必须指向OSCtxSw()。

如果当前任务调用μC/OS-II提供的功能函数,并使得更高优先级任务进入了就绪态,在系统服务调用的最后,μC/OS-II会调用OSSched(),并由此推断出当前任务不是需要运行的最重要的任务了,OSSched()先将最高优先级任务的地址装载到OSTCBHighRdy,再通过调用OS_TASK_SW()执行软中断或陷阱指令。注意变量OSTCBCur已经包含了指向当前任务控制块的指针。软中断指令会强

制将处理器的一些寄存器保存到当前任务的堆栈中并使处理器执行OSCtxSw()。

OSCtxSw()示意性代码如T2,这些代码必须用汇编语言编写,因为用户不能直接在C语言中访问CPU寄存器。

void OSCtxSw(void)

{

保存处理器寄存器;

在当前任务的任务控制块中保存当前任务的堆栈指针:

OSTCBCur->OSTCBStkPtr = Stack pointer;

Call user definable OSTaskSwHook();

OSTCBCur = OSTCBHighRdy;

OSPrioCur = OSPrioHighRdy;

得到将要重新开始运行的任务的堆栈指针:

Stack pointer = OSTCBHighRdy->OSTCBStkPtr;

从新任务的任务堆栈中恢复处理器所有寄存器的值;

执行中断返回指令;

}

T2 OSCtxSw()的示意性代码

③OS_CPU_A.ASM, OSIntCtxSw()

OSIntExit()通过调用OSIntCtxSw(),在ISR中执行任务切换功能。因为OSIntCtxSw()是在ISR中被调用的,所以假定所有的处理器都被正确地保存到了被中断任务的堆栈之中。OSIntCtxSw()的示意性代码如T3所示,这些代码必须用汇编语言编写,因为在C语言中不能直接访问CPU寄存器。如果编译器支持插入汇编语言代码,就可以将OSIntCtxSw()的代码放在OS_CPU_C.C文件中,而不放在OS_CPU_A.ASM文件中。实际上如果需要,可以跳转到OSCtxSw()中相同的代码,以减少代码量。

void OSIntCtxSw(void)

{

调用用户定义的OSTaskSwHook();

OSTCBCur = OSTCBHighRdy;

OSPrioCur = OSPrioHighRdy;

得到将要重新执行任务的堆栈指针:

Stack pointer = OSTCBHighRdy->OSTCBStkPtr;

从新任务堆栈中恢复所有处理器寄存器;

执行中断返回指令;

}

T3 OSIntCtxSw()的示意性代码

④OS_CPU_A.ASM, OSTickISR()

μC/OS-II要求用户提供一个周期性的时钟源,来实现时间的延迟和超时功能。时钟节拍应该每秒发生10~100次/秒。为了完成该任务,可以使用硬件定时器,也可以从交流点中获得50/60Hz的时钟频率。

必须在开始多任务后,即调用OSStart()后,启动时钟节拍中断;然后,可以在OSStart()运行后,μC/OS-II启动运行的第一个任务中初始化节拍中断。通常容易犯的错误是,在调用OSInit()和OSStart()之间打开了时钟节拍。(如程序清单T4所列)。

void main(void)

{

OSInit(); /* 初始化μC/OS-II */

/* 应用程序初始化代码*/

/* 调用OSTaskCreate() 建立至少1个任务*/

开时钟节拍中断; /* 千万不要在这里开中断*/

OSStart(); /* 开始多任务*/ }

T4 在不正确的位置启动节拍中断

Porting μC/OS-II

This article describes in general terms what needs to be done in order to adapt μC/OS-II to different processors. Adapting a real-time kernel to a microprocessor or a microcontroller is called a port. Most of μC/OS-II is written in C for portability, however, it is still necessary to write some processor specific code in C and assembly language. Specifically, μC/OS-II manipulates processor registers which can only be done through assembly language. Porting μC/OS-II to different processors is relatively easy because μC/OS-II was designed to be portable.

A processor can run μC/OS-II if it satisfies the following general requirements:

(1) You must have a C compiler for the processor and the C compiler must be able to produce reentrant code.

(2) You must be able to disable and enable interrupts from C.

(3) The processor must support interrupts and you need to provide an interrupt that occurs at regular intervals (typically between 10 to 100 Hz).

(4) The processor must support a hardware stack, and the processor must be able to store a fair amount of data on the stack (possibly many Kbytes).

(5) The processor must have instructions to load and store the stack pointer and other CPU registers either on the stack or in memory.

Porting μC/OS-II is actually quite straightforward once you understand the subtleties of the target processor and the C compiler you will be using. Depending on the processor, a port can consist of writing or changing between 50 and 300 lines of code! Porting μC/OS-II could take you anywhere between a few hours to about a week.

Once you have a port of μC/OS-II for your processor, you will need to verify its operation. Testing a multitasking real-time kernel such as μC/OS-II is not as complicated as you may think. You should test your port without application code. In other words, test the operations of the kernel by itself. There are two reasons to do this. First, you don?t want to complicate things anymore than they need to be. Second, if something doesn?t work, you know that the prob lem lies in the port as opposed to your application. Start with a couple of simple tasks and only the ticker interrupt service routine. Once you get multitasking going, it?s quite simple to add your application tasks.

1.1 Development Tools

As previously stated, you need a C compiler for the processor you intend to use in order to port μC/OS-II. Because μC/OS-II is a preemptive kernel, you should only use a C compiler that generates reentrant code. Your C compiler must also be able to support assembly language programming. Most C compiler designed for embedded systems will, in fact, also include an assembler, a linker, and a locator. The linker is used to combine object files (compiled and assembled files) from different modules while the locator will allow you to place the code and data anywhere in the memory map of the target processor. Your C compiler must also provide a mechanism to disable and enable interrupts from C. Some compilers will allow you to insert in-line assembly language statements in your C source code. This makes it quite easy to insert the proper processor instructions to enable and disable interrupts.

1.2 Files

(1) INCLUDES.H

INCLUDES.H is a MASTER include file and is found at the top of all .C files as follows:

# include “includes.h”

INCLUDES.H allows every .C file in your project to be written without concerns about which header file will actually be needed. The only drawback to having a master include file is that INCLUDES.H may include header files that are not pertinent to the actual .C file being compiled. This means that each file will require extra time to compile. This inconvenience is offset by code portability. You can edit INCLUDES.H to add your own header files but, your header files should be added at the end of the list.

(2) OS_CPU.H

OS_CPU.H contains processor and implementation specific #defines constants, macros, and typedefs. The general layout of OS_CPU.H is shown in listing #ifdef OS_CPU_GLOBALS

#define OS_CPU_EXT

#else

#define OS_CPU_EXT extern

#endif

typedef unsigned char BOOLEAN;

typedef unsigned char INT8U; /* Unsigned 8 bit quantity*/ (1)

typedef signed char INT8S; /* Signed 8 bit quantity*/

typedef unsigned int INT16U; /* Unsigned 16 bit quantity*/

typedef signed int INT16S; /* Signed 16 bit quantity*/

typedef unsigned long INT32U; /* Unsigned 32 bit quantity*/

typedef signed long INT32S; /* Signed 32 bit quantity*/

typedef float FP32; /*Single precision floating point*/ (2)

typedef double FP64; /* Double precision floating point */ typedef unsignedint OS_STK; /*Each stack entryis 16-bit wide*/

#define OS_ENTER_CRITICAL() ??? /* Disable interrupts*/ (3)

#define OS_EXIT_CRITICAL() ??? /* Enable interrupts*/

#define OS_STK_GROWTH 1 /* Define stack growth: 1 = Down, 0 = Up*/ (4)

#define OS_TASK_SW() ???

①OS_CPU.H, Compiler Specific Data Types

Because different microprocessors have different word length, the port of μC/OS-II includes a series of type definitions that ensures portability. Specifically, μC/OS-II?s code never makes use of C?s short, int an d, long data types because they are inherently non-portable. Instead, I defined integer data types that are both portable and intuitive

The INT16U data type, for example, always represents a 16-bit unsigned integer. μC/OS-II and your application code can now assume that the range of values for variables declared with this type is from 0 to 65535. A μC/OS-II port to a 32-bit processor could mean that an INT16U is actually declared as an unsigned short instead of an unsigned int. Where μC/OS-II is concerned, however, it still deals with an INT16U.

You must tell μC/OS-II the data type of a task?s stack. This is done by declaring the proper C data type for OS_STK. If stack elements on your processor are 32-bit and your compiler documentation specify that an int is 32-bit then, you would declare OS_STK as being of type unsigned int. All task stacks MUST be declared using OS_STK as its data type.

All you have to do is to consult the compiler?s manual and find the standard C data types that corresponds to the types expected by μC/OS-II.

②OS_CPU.H, OS_ENTER_CRITICAL() and OS_EXIT_CRITICAL()

μC/OS-II like all real-time kernels need to disable interrupts in order to access critical sections of code, and re-enable interrupts when done. This allows μC/OS-II to protect critical code from being entered simultaneously from either multiple tasks or Interrupt Service Routines (ISRS). Every processor generally provide instructions to disable/enable interrupts and your C compiler must have a mechanism to perform these operations directly from C. Some compilers will allow you to insert in-line assembly language statements in your C source code. This makes it quite easy to insert processor instructions to enable and disable interrupts. Other compilers will actually contain language extensions to enable and disable interrupts directly from C. To hide the implementation method chosen by the compiler manufacturer, μC/OS-II defines two macros to disable and enable interrupts: OS_ENTER_CRITICAL() and OS_EXIT_CRITICAL(), respectivelyT1.

μC/OS-II?s critical sections are wrapped with OS_ENTER_CRITICAL() and OS_EXIT_CRITICAL() as shown below:

μC/OS-II Service Function

{

OS_ENTER_CRITICAL(); /* μC/OS-II critical code section */

OS_EXIT_CRITICAL();

}

T1

Method #1:

The first and simplest way to implement these two macros is to invoke the processor instruction to disable interrupts for OS_ENTER_CRITICAL() and the enable interrupts instruction for OS_EXIT_CRITICAL(). There is, however, a little problem with this scenario. If you called the μC/OS-II function with interrupts disabled then, upon return from μC/OS-II, interrupts would be enabled! If you had interrupts disabled, you may have wanted them to be disabled upon return from the μC/OS-II function. In this case, the above implementation would not be adequate. Method #2:

The second way to implement OS_ENTER_CRITICAL() is to save the interrupt disable status onto the stack and then, disable interrupts. OS_EXIT_CRITICAL() would simply be implemented by restoring the interrupt status from the stack. Using this scheme, if you called a μC/OS-II service with either interrupts enabled or disabled then, the status would be preserved across the call.Your application can use OS_ENTER_CRITICAL()and OS_EXIT_CRITICAL() to also protect critical sections of code. Be careful, however, because your application will …crash? if you have interrupts disabled before calling a service such as OSTimeDly(). This will happen because the task will be suspended until time expires but, because interrupts are disabled, you would never service the tick interrupt! Obviously, all the PEND calls are also subject to this problem so, be careful. As a general rule, you should always call μC/OS-II services with interrupts enabled!

③OS_CPU.H, OS_STK_GROWTH

The stack on most microprocessors and microcontrollers grows from high-memory to low-memory. There are, however, some processors that work the other way around. μC/OS-II has been designed to be able to handle either flavor. This is accomplished by specifying to μC/OS-II which way the stack grows through the configuration constant OS_STK_GROWTH as shown below:

Set OS_STK_GROWTH to 0 for Low to High memory stack growth.

Set OS_STK_GROWTH to 1 for High to Low memory stack growth.

④OS_CPU.H, OS_TASK_SW()

OS_TASK_SW() is a macro that is invoked when μC/OS-II switches from a low-priority task to the highest-priority task. OS_TASK_SW() is always called from task level code. Another mechanism, OSIntExit(), is used to perform a context switch when an ISR makes a higher priority task ready for execution. A context switch simply consist of saving the processor registers on the stack of the task being suspended, and restoring the registers of the higher-priority task from its stack.

In μC/OS-II, the stack frame for a ready task always looks as if an interrupt has just occurred and all processor registers were saved onto it. In other words, all that μC/OS-II has to do to run a ready task is to restore all processor registers from the task?s stac k and execute a return from interrupt. To switch context, you should implement OS_TASK_SW() so that you simulate an interrupt. Most processors provide either software interrupt or TRAP instructions to accomplish this. The ISR or trap handler (also called t he …exception handler?) MUST vector to the assembly language function OSCtxSw()

For example, a port for an Intel or AMD 80x86 processor would use an INT instruction. The interrupt handler would need to vector to OSCtxSw(). There are some processors like the Zilog Z80 that do not provide a software interrupt mechanism. In this case, you would need to simulate the stack frame as closely to an interrupt stack frame as you can. In this case, OS_TASK_SW() would simply call OSCtxSw() instead of vector to it. The Z80 is a processor that has been ported to μC/OS and thus would be portable to μC/OS-II.

(3) OS_CPU_A.ASM

A μC/OS-II port requires that you write four fairly simple assembly language functions:

OSStartHighRdy()

OSCtxSw()

OSIntCtxSw()

OSTickISR()

If your compiler supports in-line assembly language code, you could actually place all the processor specific code into OS_CPU_C.C instead of having a separate assembly language file.

①OS_CPU_A.ASM, OSStartHighRdy()

This function is called by OSStart() to start the highest priority task ready-to-run. Before you can call OSStart(), however, you MUST have created at least one of your tasks. OSStartHighRdy() assumes that OSTCBHighRdy points to the task control block of the task with the highest priority. As mentioned previously, in μC/OS-II, the stack frame for a ready task always looks as if an interrupt has just occurred and all processor registers were saved onto it. To run the highest priority task all you need to do is restore all processor registers f rom the task?s stack in the proper order and, execute a return from interrupt. To simplify things, the stack pointer is always stored at the beginning of the task control block (i.e. its OS_TCB). In other words, the stack pointer of the task to resume is always stored at offset 0 in the OS_TCB.

Note that OSStartHighRdy() MUST call OSTaskSwHook() because we are basically doing a …half? context switch – we are restoring the registers of the highest priority task. OSTaskSwHook() can examine OSRunning to tell it whether OSTaskSwHook() was called from OSStartHighRdy() (i.e. if OSRunning is FALSE) or from a regular context switch (i.e. OSRunning is TRUE).

②OS_CPU_A.ASM, OSCtxSw()

As previously mentioned, a task level context switch is accomplished by issuing a software interrupt instruction or, depending on the processor, executing a TRAP instruction. The interrupt service routine, trap or exception handler MUST vector to OSCtxSw().

The current task calls a service provided by μC/OS-II which causes a higher priority task to be ready-to-run. At the end of the service call, μC/OS-II calls the function OSSched() which concludes that the current task is no longer the most important task to run. OSSched() loads the address of the highest priority task into OSTCBHighRdy and then executes the software interrupt or trap instruction by invoking the macro OS_TASK_SW(). Note that the variable OSTCBCur already contains a pointer to the current task?s Task Control Block, OS_TCB. The software interrupt instruction (or trap) forces some of the processor registers (most likely the return address and the processor?s status word) onto the current task?s stack and the processor then vectors to OSCtxSw().

The pseudo code of what needs to be done by OSCtxSw() is shown in listingT2. This code must be written in assembly language because you cannot access CPU registers directly from C.

void OSCtxSw(void)

{

Save processor registers;

Save the current task?s stack pointer into the current task?s OS_TCB:

OSTCBCur->OSTCBStkPtr = Stack pointer;

Call user definable OSTaskSwHook();

OSTCBCur = OSTCBHighRdy;

OSPrioCur = OSPrioHighRdy;

Get the stack pointer of the task to resume:

Stack pointer = OSTCBHighRdy->OSTCBStkPtr;

Restore all processor registers from the new task?s stack;

Execute a return from interrupt instruction;

}

T2 Pseudo code for OSCtxSw()

③OS_CPU_A.ASM, OSIntCtxSw()

OSIntCtxSw() is a function that is called by OSIntExit() to perform a context switch from an ISR. Because OSIntCtxSw() is called from an ISR, it is assumed that all the processor registers are properly saved onto the interrupted task?s stack. The pseudo code in listing T3 shows what needs to be done by OSIntCtxSw(). This code must be written in assembly language because you cannot access CPU registers directly from C. If your C compiler supports in-line assembly, you can put the code for OSIntCtxSw() in OS_CPU_C.C instead of OS_CPU_A.ASM. As you can see, except for the first line, the code is identical to OSCtxSw(). You can thus reduce the amount of code in the port by …jumping? to the appropriate section of code in OSCtxSw().

void OSIntCtxSw(void)

{

Call user definable OSTaskSwHook();

OSTCBCur = OSTCBHighRdy;

OSPrioCur = OSPrioHighRdy;

Get the stack pointer of the task to resume:

Stack pointer = OSTCBHighRdy->OSTCBStkPtr;

Restore all processor registers from the new task?s stack;

Execute a return from interrupt instruction;

}

T3 Pseudo code for OSIntCtxSw()

④OS_CPU_A.ASM, OSTickISR()

μC/OS-II requires that you provide a periodic time source to keep track of time delays and timeouts. A …tick? should occur between 10 and 100 times per second, or Hertz. To accomplish this, you can either dedicate a hardware timer, or obtain 50/60 Hz from an AC power line.

You must enable ticker interrupts AFTER multitasking has started, i.e. after calling OSStart(). In other words, you should initialize and tick interrupts in the first task that executes following a call to OSStart(). A common mistake is to enable ticker interrupts between calling OSInit() and OSStart() as shown in listing T4 void main(void)

{

OSInit(); /* Initialize μC/OS-II */

/* Application initialization code */

/* Create at least on task by calling OSTaskCreate() */

Enable TICKER interrupts; /* DO NOT DO THIS HERE!!! */

OSStart(); /* Start multitasking */

}

T4 Incorrect place to start the tick interrupt.

PS中英文对照资料

Photoshop中英文对照 1、File 文件 New 新建 Open 打开 Open As 打开为 Open Recent 最近打开文件 Close 关闭 Save 存储 Save As 存储为 Save for Web 存储为Web所用格式Revert 恢复 Place 置入 Import 输入 PDF Image PDF图象导入Annotations 注释 Export 输出 Manage Workflow 管理工作流程Check In 登记 Undo Check Out 还原注销 Upload To Server 上载到服务器Add To Workflow 添加到工作流程 Open From Workflow 从工作流程打开 Automate 自动 Batch 批处理 Create Droplet 创建快捷批处理 Conditional Mode Change 条件模式更改 Contact Sheet 联系表 Fix Image 限制图像 Multi Page PDF to PSD 多页面PDF文件到PSD文件 Picture package 图片包 Web Photo Gallery Web照片画廊File Info 文件简介 Print Options 打印选项 Page Setup 页面设置 Print 打印 Jump to 跳转到 Exit 退出 2、Edit 编辑 Undo 还原 Step Forward 向前 Step Backward 返回 Fade 消退 Cut 剪切 Copy 拷贝 Copy Merged 合并拷贝 Paste 粘贴 Paste Into 粘贴入 Clear 清除 Fill 填充 Stroke 描边 Free Transform 自由变形Transform 变换 Again 再次 Scale 缩放 Rotate 旋转 Skew 斜切 Distort 扭曲 Perspective 透视 Rotate 180°旋转180度 Rotate 90°CW 顺时针旋转90度Rotate 90°CCW 逆时针旋转90度

计算机专业外文文献及翻译

微软Visual Studio 1微软Visual Studio Visual Studio 是微软公司推出的开发环境,Visual Studio可以用来创建Windows平台下的Windows应用程序和网络应用程序,也可以用来创建网络服务、智能设备应用程序和Office 插件。Visual Studio是一个来自微软的集成开发环境IDE,它可以用来开发由微软视窗,视窗手机,Windows CE、.NET框架、.NET精简框架和微软的Silverlight支持的控制台和图形用户界面的应用程序以及Windows窗体应用程序,网站,Web应用程序和网络服务中的本地代码连同托管代码。 Visual Studio包含一个由智能感知和代码重构支持的代码编辑器。集成的调试工作既作为一个源代码级调试器又可以作为一台机器级调试器。其他内置工具包括一个窗体设计的GUI应用程序,网页设计师,类设计师,数据库架构设计师。它有几乎各个层面的插件增强功能,包括增加对支持源代码控制系统(如Subversion和Visual SourceSafe)并添加新的工具集设计和可视化编辑器,如特定于域的语言或用于其他方面的软件开发生命周期的工具(例如Team Foundation Server的客户端:团队资源管理器)。 Visual Studio支持不同的编程语言的服务方式的语言,它允许代码编辑器和调试器(在不同程度上)支持几乎所有的编程语言,提供了一个语言特定服务的存在。内置的语言中包括C/C + +中(通过Visual C++),https://www.doczj.com/doc/9012312049.html,(通过Visual https://www.doczj.com/doc/9012312049.html,),C#中(通过Visual C#)和F#(作为Visual Studio 2010),为支持其他语言,如M,Python,和Ruby等,可通过安装单独的语言服务。它也支持的 XML/XSLT,HTML/XHTML ,JavaScript和CSS.为特定用户提供服务的Visual Studio也是存在的:微软Visual Basic,Visual J#、Visual C#和Visual C++。 微软提供了“直通车”的Visual Studio 2010组件的Visual Basic和Visual C#和Visual C + +,和Visual Web Developer版本,不需任何费用。Visual Studio 2010、2008年和2005专业版,以及Visual Studio 2005的特定语言版本(Visual Basic、C++、C#、J#),通过微软的下载DreamSpark计划,对学生免费。 2架构 Visual Studio不支持任何编程语言,解决方案或工具本质。相反,它允许插入各种功能。特定的功能是作为一个VS压缩包的代码。安装时,这个功能可以从服务器得到。IDE提供三项服务:SVsSolution,它提供了能够列举的项目和解决方案; SVsUIShell,它提供了窗口和用户界面功能(包括标签,工具栏和工具窗口)和SVsShell,它处理VS压缩包的注册。此外,IDE还可以负责协调和服务之间实现通信。所有的编辑器,设计器,项目类型和其他工具都是VS压缩包存在。Visual Studio 使用COM访问VSPackage。在Visual Studio SDK中还包括了管理软件包框架(MPF),这是一套管理的允许在写的CLI兼容的语言的任何围绕COM的接口。然而,MPF并不提供所有的Visual Studio COM 功能。

商务英语口语900句-中英文对照-中文翻译资料

商务英语口语900句中英文对照中文翻译 Unit 1希望与要求 Part 1 . 1. We'd like to express our desire to establish business relationship with you on the basis of quality, mutually benefit and exchange of needed goods . 我们希望在保证质量、互惠互利以及交易彼此需要的货物的基础上和你们建立业务关系。 2 .In order to extend our export business to your country we wish to enter direct business relations with you. 为了扩大我们在贵国的出口业务,我们希望和你们建立直接贸易关系。 3. Our hope is to establish mutually beneficial trading relations between us . 希望在我们之间能够建立互惠互利的贸易关系。 4. We looking forward to further extensions of pleasant business relations. 我们期待进一步保持愉快的业务关系。 5. It’s our hope to continue with considerable business dealing with you. 我们的希望是和你们保持可观的生意往来。 6. We looking forward to receiving your quotation very soon. 我们期待尽快收到你们的报价单。 7.I hope you see from the reduction that we are really doing our utmost. 我希望你能够看到我们事实上已经作出了最大程度的让价。 8.We hope to discuss business with you at your earliest convenience. 我们希望在你方便的时候和你洽谈业务。

外文资料及其翻译

A Wavelet Based Approach for Fast Detection of Internal Fault in Power Transformers The power transformer is one of the most expensive elements of power system and its protection is an essential part of the overall system protection strategy. The differential protection provides the best protection for power transformer. Its operation principle is based on this point that the differential current during an internal fault is higher than normal condition. But, a large transient current (inrush current) can cause mal-operation of differential relays. Then, studies for the improvement of the transformer protection have focused on discrimination between internal short circuit faults and inrush currents in transformers. The magnetizing inrush current has a large second order harmonic component in comparison to internal faults. Therefore , some transformer protection systems are designed to halt operating during the inrush current by sensing this large second order harmonic. The second harmonic component in the magnetizing inrush currents tend to be relatively small in modern large power transformers because of improvements in the power transformer core materials. Also , it has been seen that the fault current can contain higher second order harmonics than the inrush current due to nonlinear fault resistance, CT saturation .the distributed capacitance in the transmission line, which transformer is connected to, or due to the use of extra high voltage underground cables. Various methods have been suggested for overcoming this protection system mal-operation. This paper presents a wavelet based method for discrimination among inrush current, internal short circuit ,external short circuit and energizing and it is not affected by CT saturation and it is able to detect internal faults while transformer energization. Unlike Artificial Neural Network and Fuzzy logic based algorithms. This approach is not system dependent. The operating time of the scheme is less than 10ms. The Daubechies mother wavelet is used with a sample rate of 5 kHz. Then , the differential currents of the three phases are decomposed into two details and only the second level will be considered by using db5 mother wavelet. Discrete Wavelet Transform The wavelet transform is a powerful tool to extract information from the non-stationary signals simultaneously in both time and frequency domains. The ability of the wavelet transform to focus on short time intervals for high-frequency components and long intervals for low-frequency components improves the analysis

外文文献及翻译

文献翻译 原文 Combining JSP and Servlets The technology of JSP and Servlet is the most important technology which use Java technology to exploit request of server, and it is also the standard which exploit business application .Java developers prefer to use it for a variety of reasons, one of which is already familiar with the Java language for the development of this technology are easy to learn Java to the other is "a preparation, run everywhere" to bring the concept of Web applications, To achieve a "one-prepared everywhere realized." And more importantly, if followed some of the principles of good design, it can be said of separating and content to create high-quality, reusable, easy to maintain and modify the application. For example, if the document in HTML embedded Java code too much (script), will lead the developed application is extremely complex, difficult to read, it is not easy reuse, but also for future maintenance and modification will also cause difficulties. In fact, CSDN the JSP / Servlet forum, can often see some questions, the code is very long, can logic is not very clear, a large number of HTML and Java code mixed together. This is the random development of the defects. Early dynamic pages mainly CGI (Common Gateway Interface, public Gateway Interface) technology, you can use different languages of the CGI programs, such as VB, C / C + + or Delphi, and so on. Though the technology of CGI is developed and powerful, because of difficulties in programming, and low efficiency, modify complex shortcomings, it is gradually being replaced by the trend. Of all the new technology, JSP / Servlet with more efficient and easy to program, more powerful, more secure and has a good portability, they have been many people believe that the future is the most dynamic site of the future development of technology. Similar to CGI, Servlet support request / response model. When a customer submit a request to the server, the server presented the request Servlet, Servlet responsible for handling requests and generate a response, and then gave the server, and then from the server sent to

PLC论文中英文对照资料外文翻译文献

PLC论文中英文对照资料外文翻译文献 外文资料: PLC technique discussion and future development Along with the development of the ages, the technique that is nowadays is also gradually perfect, the competition plays more more strong; the operation that list depends the artificial has already can't satisfied with the current manufacturing industry foreground, also can't guarantee the request of the higher quantity and high new the image of the technique business enterprise. The people see in produce practice, automate brought the tremendous convenience and the product quantities for people up of assurance, also eased the personnel's labor strength, reduce the establishment on the personnel. The target control of the hard realization in many complicated production lines, whole and excellent turn, the best decision etc., well-trained operation work, technical personnel or expert, governor but can judge and operate easily, can acquire the satisfied result. The research target of the artificial intelligence makes use of the calculator exactly to carry out, imitate these intelligences behavior, moderating the work through person's brain and calculators, with the mode that person's machine combine, for resolve the very complicated problem to look for the best path We come in sight of the control that links after the electric appliances in various situation, that is already the that time generation past, now of after use in the mold a perhaps simple equipments of grass-roots control that the electric appliances can do for the low level only;And the PLC emergence also became the epoch-making topic, adding the vivid software control through a very and stable hardware, making the automation head for the new high tide. The PLC biggest characteristics lie in: The electrical engineering teacher already no longer electric hardware up too many calculationses of cost, as long as order the importation that the button switch or the importation of the sensors order to link the PLC up can solve problem, pass to output to order the conjunction contact machine or control the start equipments of the

中英文对照资料外文翻译文献

中英文对照资料外文翻译文献 平设计任何时期平面设计可以参照一些艺术和专业学科侧重于视觉传达和介绍。采用多种方式相结合,创造和符号,图像和语句创建一个代表性的想法和信息。平面设计师可以使用印刷,视觉艺术和排版技术产生的最终结果。平面设计常常提到的进程,其中沟通是创造和产品设计。共同使用的平面设计包括杂志,广告,产品包装和网页设计。例如,可能包括产品包装的标志或其他艺术作品,举办文字和纯粹的设计元素,如形状和颜色统一件。组成的一个最重要的特点,尤其是平面设计在使用前现有材料或不同的元素。平面设计涵盖了人类历史上诸多领域,在此漫长的历史和在相对最近爆炸视觉传达中的第20和21世纪,人们有时是模糊的区别和重叠的广告艺术,平面设计和美术。毕竟,他们有着许多相同的内容,理论,原则,做法和语言,有时同样的客人或客户。广告艺术的最终目标是出售的商品和服务。在平面设计,“其实质是使以信息,形成以思想,言论和感觉的经验”。

在唐朝(618-906 )之间的第4和第7世纪的木块被切断打印纺织品和后重现佛典。阿藏印在868是已知最早的印刷书籍。在19世纪后期欧洲,尤其是在英国,平面设计开始以独立的运动从美术中分离出来。蒙德里安称为父亲的图形设计。他是一个很好的艺术家,但是他在现代广告中利用现代电网系统在广告、印刷和网络布局网格。于1849年,在大不列颠亨利科尔成为的主要力量之一在设计教育界,该国政府通告设计在杂志设计和制造的重要性。他组织了大型的展览作为庆祝现代工业技术和维多利亚式的设计。从1892年至1896年威廉?莫里斯凯尔姆斯科特出版社出版的书籍的一些最重要的平面设计产品和工艺美术运动,并提出了一个非常赚钱的商机就是出版伟大文本论的图书并以高价出售给富人。莫里斯证明了市场的存在使平面设计在他们自己拥有的权利,并帮助开拓者从生产和美术分离设计。这历史相对论是,然而,重要的,因为它为第一次重大的反应对于十九世纪的陈旧的平面设计。莫里斯的工作,以及与其他私营新闻运动,直接影响新艺术风格和间接负责20世纪初非专业性平面设计的事态发展。谁创造了最初的“平面设计”似乎存在争议。这被归因于英国的设计师和大学教授Richard Guyatt,但另一消息来源于20世纪初美国图书设计师William Addison Dwiggins。伦敦地铁的标志设计是爱德华约翰斯顿于1916年设计的一个经典的现代而且使用了系统字体设计。在20世纪20年代,苏联的建构主义应用于“智能生产”在不同领域的生产。个性化的运动艺术在2俄罗斯大革命是没有价值的,从而走向以创造物体的功利为目的。他们设计的建筑、剧院集、海报、面料、服装、家具、徽标、菜单等。J an Tschichold 在他的1928年书中编纂了新的现代印刷原则,他后来否认他在这本书的法西斯主义哲学主张,但它仍然是非常有影响力。Tschichold ,包豪斯印刷专家如赫伯特拜耳和拉斯洛莫霍伊一纳吉,和El Lissitzky 是平面设计之父都被我们今天所知。他们首创的生产技术和文体设备,主要用于整个二十世纪。随后的几年看到平面设计在现代风格获得广泛的接受和应用。第二次世界大战结束后,美国经济的建立更需要平面设计,主要是广告和包装等。移居国外的德国包豪斯设计学院于1937年到芝加哥带来了“大规模生产”极简到美国;引发野火的“现代”

建筑外文文献及翻译

外文原文 , , ,610031 ’s . a . a . , a . —, , ’s ’s . 1. , . , , ’s ’ [1] , . [1] a () , [2] . [3,4] [5] () , ’s , [6]. [7] ’s . , ’s ’s a . 2.’S . , . ’s ’s , ’s . , (1). (…) (1) w ’s ; I ; c , ; s , . 3. 3.1 , . , a , ’s . , a , ’s , . , ’s ’s . 3.2 a : (1)N. 1,2, … N.

(2) w 12… . (3) R 1,2, … (4) Δ ? ? ?others toprojectQ rcer humanresou i k 01 (5) . I t I t . (6) △ I ’s a .( ’t .) (7) (5) t I △ ,( △ ). , – a . (8) (6) (7), I ( = △* △ ). (9) =ηi / * , ηi I ; * I , * =∑=R k ki 1 δ . , . , , . 3.3 , , : = ∑∑==N i i N i Ci 11 ω i i N i i N i c t ??∑∑==1 1 ω (2) ∑∑ ==N i i N i 1 1 ω ) E i R i ki i t - ?? ∑=1 δη i c ? 2F Z 2()i t ? ) E i R i ki i t - ??∑=1 δη (3) () ,(N j i K 3,2,1,=?) (4)

英语翻译学习资料(含中英文解释)

例1.Winners do not dedicate their lives to a concept of what they imagine they should be, rather, they are themselves and as such do not use their energy putting on a performance, maintaining pretence and manipulating(操纵) others . They are aware that there is a difference between being loved and acting loving, between being stupid and acting stupid, between being knowledgeable and acting knowledgeable. Winners do not need to hide behind a mask. 1.dedicate to 把时间,精力用于 2.pretence 虚伪,虚假 6 .1 斤斤于字比句次,措辞生硬 例2.Solitude is an excellent laboratory in which to observe the extent to which manners and habits are conditioned by others. My table manners are atrocious( 丑恶)—in this respect I've slipped back hundreds of years in fact, I have no manners whatsoever(完全,全然). If I feel like it, I eat with my fingers, or out of a can, or standing up —in other words, whichever is easiest. 孤独是很好的实验室,正好适合观察一个人的举止和习惯在多大程度上受人制约。如今我吃东西的举止十分粗野;这方面一放松就倒退了几百年,实在是一点礼貌也没有。我高兴就用手抓来吃,(eat out of a can)开个罐头端着吃,站着吃;反正怎么省事就怎么吃。 3.Whatsoever 完全,全然 1.Be conditioned by 受……制约 2.Atrocious 丑恶 6 .2 结构松散,表达过于口语化 例3.有一次,在拥挤的车厢门口,我听见一位男乘客客客气气地问他前面的一位女乘客:“您下车吗?”女乘客没理他。“您下车吗?”他又问了一遍。女乘客还是没理他。他耐不住了,放大声问:“下车吗?”,那女乘客依然没反应。“你是聋子,还是哑巴?”他急了,捅了一下那女乘客,也引起了车厢里的人都往这里看。女乘客这时也急了,瞪起一双眼睛,回手给了男乘客一拳。(庄绎传,英汉翻译教程,1999 :练习 3 ) 译文1:Once at the crowded door of the bus, I heard a man passenger asked politely a woman passenger before him: “Are you getting off?” The woman made no

长句翻译中英对照

1、Just as Darwin discovered the law of development of organic nature, so Marx discovered the law of development of human history: the simple fact, hitherto concealed by an overgrowth of ideology, that mankind must first of all eat, drink, have shelter and clothing, before it can pursue polities, science, art, religion, etc.; that therefore the production of the immediate material means of subsistence and consequently the degree of economic development attained by a given people or during a given epoch form the foundation upon which the state institutions, the legal conceptions, art, and even the ideas on religion, of the people concerned have been evolved, and in the light of which they must, therefore, be explained, instead of vice versa, as had hitherto been the case. 正像达尔文发现有机界的规律一样,马克思发现了人类历史的发展规律,即历来被繁茂芜杂的意识形态所掩盖着的一个简单事实:人们首先必须吃、喝、住、穿,然后才能从事政治、科学、艺术、宗教等活动;所以,直接的物质生活资料的生产和一个民族或一个时代的一定的经济发展程度,便构成为基础,人们的国家制度,法律的概念,艺术以至宗教概念,就是从这个基础上发展起来的,因而,也必须由这个基础来解释,而不像过去那样做得正好相反。 2、Behaviorists suggest that the child who is raised in an environment where there are many stimuli which develop his or her capacity for appropriate responses will experience greater intellectual development. 行为主义者认为, 如果儿童的成长环境里有许多刺激因素, 这些因素又有利于其适当反应能力的发展, 那么, 儿童的智力就会发展到较高的水平。 3、How it happened that a little rocky peninsula in a remote corner of the Mediterranean was able to provide our world in less than two centuries with the complete framework for all our present day experiments in politics, literature, drama, sculpture, chemistry, physics and Heaven knows what else, is a question

有限元分析中英文对照资料

The finite element analysis Finite element method, the solving area is regarded as made up of many small in the node connected unit (a domain), the model gives the fundamental equation of sharding (sub-domain) approximation solution, due to the unit (a domain) can be divided into various shapes and sizes of different size, so it can well adapt to the complex geometry, complex material properties and complicated boundary conditions Finite element model: is it real system idealized mathematical abstractions. Is composed of some simple shapes of unit, unit connection through the node, and under a certain load. Finite element analysis: is the use of mathematical approximation method for real physical systems (geometry and loading conditions were simulated. And by using simple and interacting elements, namely unit, can use a limited number of unknown variables to approaching infinite unknown quantity of the real system. Linear elastic finite element method is a ideal elastic body as the research object, considering the deformation based on small deformation assumption of. In this kind of problem, the stress and strain of the material is linear relationship, meet the generalized hooke's law; Stress and strain is linear, linear elastic problem boils down to solving linear equations, so only need less computation time. If the efficient method of solving algebraic equations can also help reduce the duration of finite element analysis. Linear elastic finite element generally includes linear elastic statics analysis and linear elastic dynamics analysis from two aspects. The difference between the nonlinear problem and linear elastic problems: 1) nonlinear equation is nonlinear, and iteratively solving of general; 2) the nonlinear problem can't use superposition principle; 3) nonlinear problem is not there is always solution, sometimes even no solution. Finite element to solve the nonlinear problem can be divided into the following three categories: 1) material nonlinear problems of stress and strain is nonlinear, but the stress and strain is very small, a linear relationship between strain and displacement at this time, this kind of problem belongs to the material nonlinear problems. Due to theoretically also cannot provide the constitutive relation can be accepted, so, general nonlinear relations between stress and strain of the material based on the test data, sometimes, to simulate the nonlinear material properties available mathematical model though these models always have their limitations. More important material nonlinear problems in engineering practice are: nonlinear elastic (including piecewise linear elastic, elastic-plastic and viscoplastic, creep, etc. 2) geometric nonlinear geometric nonlinear problems are caused due to the nonlinear relationship between displacement. When the object the displacement is larger, the strain and displacement relationship is nonlinear relationship. Research on this kind of problem Is assumes that the material of stress and strain is linear relationship. It consists

相关主题
文本预览
相关文档 最新文档