Xilinx SD-RAM-Controller (Xilinx EDK 8.2)--problems with xil_printf reading from memory

Hello, I've some problems with reading from my sd-ram. On my FPGA is a Xilinx Virtex 2 XC2V1000 chip and I want to use the ram for greater software- applications. The first problem was, that the fpga has only 2 pins for the SD-RAM DataMask but this was solved with a little glue logic. Now if I write a little test-application into the RAM (this "application" only instances several pointer (for 8,16 an 32 Bit writing) assigning them different values) the xil_printf function don't display the value or the address of the pointer. For example if it is defined like this: xil_printf("Value of pointer: %d at address: %08X\r\n", *pointer, pointer); I get the following output on my Terminal: Value of pointer: address: If I check the addresses with the debugger then it points out that the software only writes 32Bit or 8Bit NOT 16Bit words. But if I write 8,16 or 32Bit words with the debugger and then read them everything functions very well. I tried many things but didn't find a solution. It would be nice if anyone could help me..

Thanks

Reply to
rmeiche
Loading thread data ...

You have a big problem. You need all the data mask pins so you can write only certain bytes in a word without changing the other bytes in the word.

I am guessing the debugger is doing a read-modify-write of the entire word. You could make the hardware also do this, but that would be difficult.

You could also write software that only accesses 32 bit words. I think microblaze (You didn't say what processor) only accesses 32 bit words.

Alan Nishioka

Reply to
Alan Nishioka

Thanks for your answer. Perhaps "read-modify-write" could be a possibillity why the debugger can write and read correctly. I'm going to check this. I forgot to mention that if the Stack is executed in the cache, I get the right output on my terminal. The same happens if the Stack is executed in RAM and the executable file is Load to the cache. But if everything is executed in RAM it doesn't function.

Reply to
rmeiche

I've checked if the debugger makes a read-modify-write. The debugger doesn't make this because first we had a failure in our glue logic. At that time we had only the possibillity to write

32Bit words and we tried a 8Bit write via the debugger and that didn't function.
Reply to
rmeiche

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.