why is it wrong with "sin"?

Hi all,

I cann't do the math problems, such as: sin, cos... Our condition is as follows:

At president, we are doing some tests using Virtex-II Pro50 and Xilinx Platform Studio of EDK 6.3i on Windows XP OS. The processor we are using is Microblaze.

when we add the function of "sin" in the programme, and the errors when we "build all users applications" are as follows:

double s; s=sin(0.222250);

mb-ld: region ilmb_cntlr is full (TestApp/executable.elf section .text) mb-ld: region ilmb_cntlr is full (TestApp/executable.elf section .text) mb-ld: section .rodata [00000000 -> 00000327] overlaps section .text [00000000 -> 00004a1f] mb-ld: section .data [00000328 -> 0000035b] overlaps section .text [00000000 ->

00004a1f] mb-ld: section .sdata [0000035c -> 00000363] overlaps section .text [00000000 -> 00004a1f] make: *** [TestApp/executable.elf] Error 1

Do anybody knows what's the problem is then?

Thank you very much for your help and kind-hearted!

Lina

Reply to
Lina
Loading thread data ...

Studio of EDK 6.3i on Windows XP OS. The processor we are using is Microblaze.

"build all users applications" are as follows:

region ilmb_cntlr is full (TestApp/executable.elf section .text) mb-ld: section .rodata [00000000 -> 00000327] overlaps section .text [00000000 -> 00004a1f] mb-ld: section .data [00000328 -> 0000035b] overlaps section .text [00000000 ->

00004a1f] mb-ld: section .sdata [0000035c -> 00000363] overlaps section .text [00000000 -> 00004a1f] make: *** [TestApp/executable.elf] Error 1
--
 __
/ /\/\ Aurelian Lazarut
\ \  / System Verification Engineer
/ /  \ Xilinx Ireland
\_\/\/
 
phone:	353 01 4032639
fax:	353 01 4640324
Reply to
Aurelian Lazarut

Hi Lina,

follows:

mb-ld: region ilmb_cntlr is full (TestApp/executable.elf section .text) mb-ld: section .rodata [00000000 -> 00000327] overlaps section .text [00000000 -> 00004a1f] mb-ld: section .data [00000328 -> 0000035b] overlaps section .text [00000000 -> 00004a1f] mb-ld: section .sdata [0000035c ->

00000363] overlaps section .text [00000000 -> 00004a1f] make: *** [TestApp/executable.elf] Error 1

So, as Aurelian pointed out, your application has become too big for the available memory. The sin() function requires lots of other floating-point math functions to support it.

Doing floating-point entirely in software will take up a lot of instruction space. If you are using the floating-point coprocessor which is available for MicroBlaze, then your code will be smaller, because the routines for e.g. add and multiply can be done in hardware.

In any case, try using the function sinf() instead - this uses single-precision rather than double, and is therefore a bit smaller. However, it is not part of the ANSI C standard.

Hope this helps,

-Ben-

Reply to
Ben Jones

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.