Re: Can't write value into memory ?(E500 V2)
From: wilbur.chan <hidden>
Date: 2009-08-27 15:53:13
2009/8/27 Scott Wood [off-list ref]
quoted
//check if we successfully store value at 0x400,0000 lis r22, 0x400 ori r22,r22,0x0 lwz r23,0(r22) cmpw r23, 30The values should not be equal, since you wrote a byte and read back a word. Furthermore, you are storing the constant 30, but are comparing r23 with the register r30 (I never liked that aspect of ppc asm syntax -- too error prone). If you want to compare with the constant 30, use "cmpwi".quoted
beq print_equal 1: b 1b print_equal: ... //code end I found that, print_equal was not called ,the whole code seemed to enter an infinite loop.That's because you have an infinite loop in your code, right after "beq print_equal". -Scott
Thank you very much. I am using a SMP E500 v2, and I want CPU0 to write some value to a physical address, and wait for CPU1 to read from it. However, it seemed failed to communicate between CPUs by DRAM.. CPU1 can not read the correct value from the address where CPU1 wrote to. BTW: the physical address is at 16M .