Weird Mircroblaze programm execution

Feb 14, 2005 6 Replies

Hello



I am really a little bit helpless at the moment. I have implemented an own IP which performs some special arithmetic instruction (multiplication, addition, root, substraktion and so on). I tested each module with thousands of testcases so we can be sure that thet are working properly. Next I added this IP to the microblaze core with the FSL interface. I downloaded then the complete design on my ML300 board. I run an algorithm on my Microblaze core which calls my instructions 8000 times and at the end of the day I got the correct result. So I was sure that this design is "perfect". But now I added 400 more instructions for an inversion operations, and after 50 instruction something weird is happening:



If I use the following codefragment I get an incorrect result: .... command(OP_MUL, REG14, REG14, REG17); command(OP_MUL, REG12, REG13, REG18); command(OP_MUL, REG13, REG14, REG19); command(OP_MUL, REG12, REG14, REG20); command(OP_ADD, REG18, REG17, REG21); ....


But if I insert a print statement within this fragement to read out one of my registers then it works: .... command(OP_MUL, REG14, REG14, REG17); command(OP_MUL, REG12, REG13, REG18); command(OP_MUL, REG13, REG14, REG19); command(OP_MUL, REG12, REG14, REG20); print("-- Value of REG20 --... \n\r"); command(OP_RD, REG20, 0, 0);



for (i=0;i


welcome aboard! I had with some EDK version a special void dummy_bullshit() { // some dummy code

}

in order to get my software to work I had to insert calls to dummy_bullshit();

in some places!

I still have some working sw with this bullshit fix :)

your problem seems similar!

try changing compiler options

antti

Hi Philipp,

Can you disassembler the section by using "mb-objdump -S" and send me the result?

Since you are doing a blocking write on the FSL, MicroBlaze will stop if the FIFO is full.

How fast can your FSL core consume data?

Göran

Philipp wrote:

Hi Antti,

which compiler options should I change? I tried to do it without optimization but then the code is to big ...

Which EDK Software were you using? I have the 6.2.03i version

Cheers Philipp

"Philipp" schrieb im Newsbeitrag news: snipped-for-privacy@individual.net...

this problem I reported was on some earlier EDK the latest EDK forced to switch global ptr off to get the previously ok code to work

you can try all options-combinations and pray that some works if things go bad, but.. in your case as you are doing some FSL stuff that may stall the microblaze so that may be your problem.

it just sounded similar to several compiler related issues we have had,

Antti

Yeah but the thing I dont understand is that I can execute 8000 instructions without any trouble and then suddenly it just overwrites me an arbitrary register by executing a simple addition instruction. And with a dummy function it works.... weird

I had a funky problem where I traced it back to a misplaced BASEADDRESS for the xilmfs library specification in the "system".mss file. That BASEADDRESS was stepping on code or data placed in SRAM by the linker. The symptom was that if I commented out what was essentially a nop variable assignment, a subsequent routine would bomb out. I don't know why this slab of memory is located via a hardcoded parameter, and not automatically off the heap Oh well, this is probably not your problem. BTW, this was for a PPC.

Cheers

-Newman

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required