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.
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.
Previous article:Introduction to ARM Compiler
Next article:Efficient C Programming: Boolean Expressions (Part 1)
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- CGD and Qorvo to jointly revolutionize motor control solutions
- CGD and Qorvo to jointly revolutionize motor control solutions
- Keysight Technologies FieldFox handheld analyzer with VDI spread spectrum module to achieve millimeter wave analysis function
- Infineon's PASCO2V15 XENSIV PAS CO2 5V Sensor Now Available at Mouser for Accurate CO2 Level Measurement
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- A new chapter in Great Wall Motors R&D: solid-state battery technology leads the future
- Naxin Micro provides full-scenario GaN driver IC solutions
- Interpreting Huawei’s new solid-state battery patent, will it challenge CATL in 2030?
- Are pure electric/plug-in hybrid vehicles going crazy? A Chinese company has launched the world's first -40℃ dischargeable hybrid battery that is not afraid of cold
- Future Prospects of UWB Technology
- Millimeter wave technology: key 5G technology
- "Date in Spring" + Factory Tour
- Allwinner V5 helloworld example (test your entire development environment) --- lindeni V5 development board
- The charger has a glitch problem when it is powered on
- Memory alignment processing for ARM processors
- Some useful information: RVB2601 development board program download automatic operation and OLED screen protection
- To the netizens who entered the Pingtouge RVB2601 competition (reference materials, technical support, experience sharing, work submission and selection criteria)
- Summary: RCSN experience W806 Lianshengde 9.9 yuan development board
- Hardware Design: Circuit Design of DSP TMS320C5509A