Application of ARM9 hardware coprocessor on WinCE embedded motherboard

Publisher:binggegeLatest update time:2021-06-28 Source: eefocusKeywords:ARM9 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

With the vigorous development of microelectronics and embedded technology, the embedded industrial computer platform based on high-performance ARM processors has overcome the shortcomings of traditional industrial computers such as large size, high failure rate and difficulty in adapting to the harsh environment of industrial control for a long time with its advantages of small size, high reliability and low cost, and is widely used in the field of industrial control. Yingchuang's embedded motherboards are adapted to this development trend and have rapidly grown into one of the main suppliers of embedded motherboards.


Embedded operating system is one of the core technologies of embedded industrial computer system. WinCE (Windows CE) system is a member of Windows family, a micro-kernel operating system designed for embedded system. Such operating system can integrate portable technology with existing Windows desktop technology. It is a preemptive multi-tasking, multi-threaded 32-bit embedded operating system with powerful communication capability.


WinCE is an embedded operating system with strong real-time performance. Compared with another operating system with good real-time performance, Linux, WinCE has the advantages of a more friendly graphical interface and low development threshold, and is widely used in control, communication, multimedia and other fields. At the same time, it is backed by Microsoft's strong technical development support, which is more conducive to resolving development risks. The development of Linux relies more on the personal experience of programmers, which raises the threshold for research and development.


In the embedded family, ARM microprocessors using 32-bit RISC architecture have quickly occupied most of the market with their advantages of small size, low power consumption, low cost and high performance. With the development of domestic embedded application fields, ARM chips will inevitably gain more attention and application. With the widespread application of ARM chips in fields with high data processing speed requirements such as communications and multimedia, the requirements for floating-point operations are getting higher and higher. In order to meet this requirement, high-end ARM chips are embedded with mathematical coprocessors. Cirrus Logic's EP9315 is such a chip, which has a Maverick Crunch mathematical coprocessor embedded inside, realizes hardware floating-point operations, and solves the problem of floating-point operation speed. Unfortunately, most domestic companies only use this high-performance chip as an ordinary ARM9 on the WinCE platform, and do not give full play to its super computing power. In this way, those customers who have strict requirements for real-time computing have to adopt the ARM+DSP architecture, which not only increases the hardware cost, but also increases the difficulty of product development. Yingchuang's EM9000 embedded motherboard solves the problem of floating-point operation speed. It uses the WinCE platform to reduce the difficulty of development.


EM9000嵌入式主板是英创继承了英创公司长期服务于工控领域所形成的技术特色及产品风格,采用高端的ARM9芯片EP9315,其显著的特点是内部集成Maverick Crunch数学协处理器,由于它采用硬件实现浮点运算,所以能明显提高ARM的浮点运算和数字信号处理能力。英创为了满足对浮点运算速度要求严格的客户,替代ARM+DSP架构嵌入式主板,经过不断的努力,使数学协处理器成功运行在WinCE平台,为即需要WinCE系统又需要高速的信号处理的客户提供了新的高性价比的选择。为了配合EM9000客户在EVC或者VS开发平台上运用Maverick Crunch数学协处理器进行浮点运算和数字信号处理,特提供下列数学运算函数。


The following functions have been tested in the EVC development environment of the EM9000 platform and actually run on the EM9000 embedded motherboard. The running speed of the following functions has been improved by 3-5 times. Among them, the array multiplication and addition function em_arraymultadd has increased the speed by nearly 9 times. It should be emphasized that the speed will only be improved when the data to be processed is floating point type. When the data is integer, there is no need to call the following functions.


///////////////////////////////////////////////////////////////////////////////////////////////////////////


// Function description: Calculate the sum of floating-point variables source1 and source2


// Input parameters: float source1, float source2


// Return value: the sum of source1 and source2


///////////////////////////////////////////////////////////////////////////////////////////////////////////


float em_add(float source1,float source2);


///////////////////////////////////////////////////////////////////////////////////////////////////////////


// Function description: Calculate the difference between floating-point variables source1 and source2


// Input parameters: float source1, float source2


// Return value: the difference between source1 and source2


///////////////////////////////////////////////////////////////////////////////////////////////////////////


float em_sub(float source1,float source2);


///////////////////////////////////////////////////////////////////////////////////////////////////////////


// Function description: Calculate the product of floating-point variables source1 and source2


// Input parameters: float source1, float source2


// Return value: the product of source1 and source2


///////////////////////////////////////////////////////////////////////////////////////////////////////////


float em_mult(float source1,float source2);


///////////////////////////////////////////////////////////////////////////////////////////////////////////


// Note: When performing array operations, please ensure that array source1, array source2, and array result are equal-length arrays of length nlen. If this condition is not met, the operation result is unpredictable.


///////////////////////////////////////////////////////////////////////////////////////////////////////////


///////////////////////////////////////////////////////////////////////////////////////////////////////////


// Function description: Array source1 is added to array source2 accordingly, and the result is saved in the corresponding position of array result.


// Right now:




// Input parameters: address of array source1, address of array source2, nlen array length


// Output parameter: address of array result


///////////////////////////////////////////////////////////////////////////////////////////////////////////


void em_arrayadd(float *source1, float *source2,float *result,int nlen);


///////////////////////////////////////////////////////////////////////////////////////////////////////////


// Function description: Array source1 is subtracted from array source2, and the result is saved in the corresponding position of array result.


// Right now:




// Input parameters: address of array source1, address of array source2, nlen array length


// Output parameter: array result


///////////////////////////////////////////////////////////////////////////////////////////////////////////


void em_arraysub(float *source1, float *source2, float *result, int nlen);


///////////////////////////////////////////////////////////////////////////////////////////////////////////


// Function description: Array source1 is multiplied by array source2, and the result is saved in the corresponding position of array result.


// Right now:




// Input parameters: address of array source1, address of array source2, nlen array length


// Output parameter: array result


///////////////////////////////////////////////////////////////////////////////////////////////////////////


void em_arraymult(float *source1,float *source2,float *result,int nLen);


///////////////////////////////////////////////////////////////////////////////////////////////////////////


// Function description: The sum of the corresponding multiplication and addition of array source1 and array source2.


// Right now:




// Input parameters: address of array source1, address of array source2, nlen array length


// Return value: Returns the sum of the corresponding multiplication and addition of array source1 and array source2.


///////////////////////////////////////////////////////////////////////////////////////////////////////////


float em_arraymultadd(float *source1,float *source2, int nlen);


Instructions:


1. Copy the em9000_crunch.lib and crunch.h files to the EVC or VS project directory, and include the crunch.h header file in the program.


2. Select project->setting and the window shown below will appear. Add em9000_crunch.lib to the location shown below. Then call the above function in the program.




20081212172622760.jpg

Test Methods:


1. Establish a development environment based on the EM9000 embedded motherboard so that the development board can be debugged jointly with the EVC. For specific steps, please refer to the development CD provided by Intron.


2. Create an EVC project based on EM9000. Add the following test code to the main function:


iStartTime = GetTickCount(); // Operation timing starts


for(n=0;n<1000;n++)


arraymultaddresult=arraymultadd(arraya,arrayb,1024); // arraya,arrayb are floating point arrays of length 1024


iEndTime=GetTickCount(); // Function ends


time=iEndTime-iStartTime;


printf('the result of emulator arrayadd is %f arraymultadd elpses time is %d msn',arraymultaddresult,time);


iSartTime = GetTickCount();


for(n=0;n<1000;n++)


multaddresult=em_arraymultadd(arraya,arrayb,1024);


iEndTime=GetTickCount();


time=iEndTime-iStartTime;


printf('the result of em_arraymultadd is %f em_arraymultadd elpse time is %d msn',multaddresult,time);


The above program, when run on the EM9000 embedded motherboard, produces the following results:


arraymultadd elpses time is 919ms


em_arraymultadd elpses time is 104 ms


由以上的结果可以看出:用英创公司提供的函数,可以显著提高浮点运算速度。


At present, the functions provided by Yingchuang mainly complete basic floating-point processing. We will continue to improve the functions of the floating-point library according to customer needs, such as FIR filtering, etc. At the same time, if customers need special processing algorithms, they can also contact us for matters related to the realization of special floating-point processing functions.


Keywords:ARM9 Reference address:Application of ARM9 hardware coprocessor on WinCE embedded motherboard

Previous article:Introduction to ARM Compiler
Next article:Efficient C Programming: Boolean Expressions (Part 1)

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号