07-20-2011 06:21 AM
I'm wondering whether it is possible to read and write a BRAM (bram_block + axi_bram_ctrl), added to a Microblaze design using XPS, using Linux. Is it possible to for instance mmap the physical address, for example 0x80020000 and then perform a read or write action. I've noticed that it's possible for the DDR3_SDRAM block and the Push_Buttons_5Bits, but when I try to access the BRAM block I get a "Bus error" message.
Does anyone have an idea what could be the cause of this? Can it have anything todo with the size of the memory that has been mmapped. I tried it with a default size of 0x800 while the BRAM size in the AXI memory map is 0x800 (same a for the Push button map).
Is there a possibility to generate more debug information. Currently I only get "Bus error" and no infomation in dmesg.
Thank you in advance,
07-21-2011 09:52 AM
I think you're on the right track. I have not used mmap on a bram. The only issue I can think of is that mmap maps a page (4096 bytes) as the minimum.
I'm not sure why there would be bus error if you don't access past the end of the bram.
Sorry I'm not more helpful there.
08-05-2011 06:32 AM
I've still not managed to fix this issue. I took one step back and tried the Memory Test (standard c program) in the SDK. This program passes on the DDR memory but the output for the blockram is all fails.
--Memory Test Application Complete--
NOTE: This application runs with D-Cache disabled.As a result, cacheline requests will not be generated
Testing memory region: axi_bram_ctrl_0
Memory Controller: axi_bram_ctrl
Base Address: 0x80020000
Size: 0x00010000 bytes
32-bit test: FAILED!
16-bit test: FAILED!
8-bit test: FAILED!
Has anyone ever tested this? Attach a blockram to the Axi interconnect system and generate a new c application in the SDK.
11-20-2012 03:49 AM
I currently have the same problem than you had.
Can you please explain witch modifications you made in the dts file?
I'm a rookie in device tree syntax and an example will be helpful.