Hi, I want to do multiplication operation in my Microblaze's Test_Application in Xilinx Plaform Studio. But i get some errors.can you help me? This my code temp1=j=16; temp2=temp1*0.5;//error occurs when i use " * " *com2=(temp2); These are the error messages /cygdrive/c/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze/3.4.1/../../../../microblaze/bin/ld.real: region ilmb_cntlr_dlmb_cntlr is full (TestApp_Memory/executable.elf section .text) /cygdrive/c/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze/3.4.1/../../../../microblaze/bin/ld.real: region ilmb_cntlr_dlmb_cntlr is full (TestApp_Memory/executable.elf section .text) /cygdrive/c/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze/3.4.1/../../../../microblaze/bin/ld.real: section .init [00000050 -> 00000073] overlaps section .text [00000050 -> 00002463] /cygdrive/c/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze/3.4.1/../../../../microblaze/bin/ld.real: section .fini [00000074 -> 0000008f] overlaps section .text [00000050 -> 00002463] /cygdrive/c/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze/3.4.1/../../../../microblaze/bin/ld.real: section .rodata [00000090 -> 00000374] overlaps section .text [00000050 -> 00002463] /cygdrive/c/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze/3.4.1/../../../../microblaze/bin/ld.real: section .data [0000037c -> 000003a7] overlaps section .text [00000050 -> 00002463] /cygdrive/c/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze/3.4.1/../../../../microblaze/bin/ld.real: section .ctors [000003a8 -> 000003af] overlaps section .text [00000050 -> 00002463] /cygdrive/c/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze/3.4.1/../../../../microblaze/bin/ld.real: section .dtors [000003b0 -> 000003b7] overlaps section .text [00000050 -> 00002463] /cygdrive/c/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze/3.4.1/../../../../microblaze/bin/ld.real: section .jcr [000003b8 -> 000003bb] overlaps section .text [00000050 -> 00002463] collect2: ld returned 1 exit status make: *** [TestApp_Memory/executable.elf] Error 1
Multiplication Problem on Microblaze Software
Started by ●August 15, 2007
Reply by ●August 15, 20072007-08-15
On 15 Aug, 11:39, "mfgunes" <mfgu...@yahoo.com> wrote:> Hi, > > I want to do multiplication operation in my Microblaze's Test_Application > in Xilinx Plaform Studio. > But i get some errors.can you help me? > > This my code > > temp1=j=16; > temp2=temp1*0.5;//error occurs when i use " * " > *com2=(temp2); >You're doing some floating point multiplication which causes the floating point math libraries to be linked in, which is then causing you to run out of code memory space. Try dividing by 2 instead of * 0.5. If you really do want to do floating point math, you'll have to increase the size of your memory. Cheers, Jon
Reply by ●August 15, 20072007-08-15
Hi, I increased the size of the memory and i checked the "Enable Floating Point Unit".Still i am facing with same errors.>On 15 Aug, 11:39, "mfgunes" <mfgu...@yahoo.com> wrote: >> Hi, >> >> I want to do multiplication operation in my Microblaze'sTest_Application>> in Xilinx Plaform Studio. >> But i get some errors.can you help me? >> >> This my code >> >> temp1=j=16; >> temp2=temp1*0.5;//error occurs when i use " * " >> *com2=(temp2); >> > >You're doing some floating point multiplication which causes the >floating point math libraries to be linked in, which is then causing >you to run out of code memory space. > >Try dividing by 2 instead of * 0.5. > >If you really do want to do floating point math, you'll have to >increase the size of your memory. > >Cheers, >Jon > >
Reply by ●August 15, 20072007-08-15
Hi, You are mixing int and floating-point types without an explicit type-casting. The default implicit type-casting in C for floating point is to use double-precision. Since the HW FPU for microblaze is only for single-precision, the software-based double precision library is needed and this libary will be linked in to your application. You should avoid implicit type-casting and you also have to decide if you need double precision floating point or single precision. This example can be done completely using integer operation and would make the program size much smaller. You can check the size of the program with mb-size and see if it fits into the memory. G�ran Bilski "mfgunes" <mfgunes@yahoo.com> wrote in message news:vMadnfW6uvJrcl_bRVn_vgA@giganews.com...> Hi, > I increased the size of the memory and i checked the "Enable Floating > Point Unit".Still i am facing with same errors. > > > > > >>On 15 Aug, 11:39, "mfgunes" <mfgu...@yahoo.com> wrote: >>> Hi, >>> >>> I want to do multiplication operation in my Microblaze's > Test_Application >>> in Xilinx Plaform Studio. >>> But i get some errors.can you help me? >>> >>> This my code >>> >>> temp1=j=16; >>> temp2=temp1*0.5;//error occurs when i use " * " >>> *com2=(temp2); >>> >> >>You're doing some floating point multiplication which causes the >>floating point math libraries to be linked in, which is then causing >>you to run out of code memory space. >> >>Try dividing by 2 instead of * 0.5. >> >>If you really do want to do floating point math, you'll have to >>increase the size of your memory. >> >>Cheers, >>Jon >> >> > >
Reply by ●August 15, 20072007-08-15
Keep increasing the memory until the error messages go away. If that is "too much memory" then you cannot use floating-point. Note that "multiply by 0.5" is equivalent to "divide by 2" is equivalent to (for integer variables) "shift right by 1".>Hi, >I increased the size of the memory and i checked the "Enable Floating >Point Unit".Still i am facing with same errors. >
Reply by ●August 16, 20072007-08-16
Hi, float deneme1; float deneme2; float deneme; deneme1=1.1; deneme2=1.1; deneme=deneme1*deneme2; I changed the code like that.still i am facing with the same error.
Reply by ●August 16, 20072007-08-16
Hi, float deneme1; float deneme2; float deneme; deneme1=1.1; deneme2=1.1; deneme=deneme1*deneme2; I changed the code like that.still i am facing with the same error.
Reply by ●August 16, 20072007-08-16
Hi, So how large is your program and how much memory do you have in your system? G�ran "mfgunes" <mfgunes@yahoo.com> wrote in message news:EtadnXH3WauRYl7bRVn_vgA@giganews.com...> Hi, > > float deneme1; > float deneme2; > float deneme; > deneme1=1.1; > deneme2=1.1; > > deneme=deneme1*deneme2; > > I changed the code like that.still i am facing with the same error.
Reply by ●August 16, 20072007-08-16
"RCIngham" <robert.ingham@gmail.com> writes:> Keep increasing the memory until the error messages go away. >Ah, so that's how Word got as big as it did :-)> Note that "multiply by 0.5" is equivalent to "divide by 2" is equivalent > to (for integer variables) "shift right by 1".If you don't mind truncating instead of rounding: 5.0/2.0=2.5, which most people would expect to round up to 3. If you do it in integer land, 5/2 = 2 5 shr 1 = 2 with the bit representing .5 thrown away, unless you take pains to keep it. If this doesn't matter for your application that's fine. On a side note, I'd rather write (and then later read) "/2" if that's what I mean than use a shift (irrespective of rounding issues). A decent compiler will do the shift for me if that's the best way of doing it. Cheers, Martin -- martin.j.thompson@trw.com TRW Conekt - Consultancy in Engineering, Knowledge and Technology http://www.conekt.net/electronics.html
Reply by ●August 16, 20072007-08-16