Xilinx microblaze : SRAM external mem controller

Hello, I am working with xilinx microblaze and I am trying to set up my microblaze to communicate with a 128 KB asynchronous SRAM chip (IS63LV1024). So far I have been able to set up the opb_emc (External Memory Controller) to communicate with the SRAM chip. However, I can only write to the SRAM in 4 bytes words. I cannot write byte by byte. Example: If I try to write to byte 0x0F10_0001, the whole word at 0x0F10_0000 gets updated instead. ================================== Before

0x0F10_0000: 00000000 0x0F10_0004: 00000000 Write 0x31 to 0x0F10_0001 After 0x0F10_0000: 00000031 0x0F10_0004: 00000000 ================================== Now, I am trying to load my program to run in the external memory by setting the program start address in the compiler options. I cannot get the program to run in external memory and it keeps crashing. Is that related to the fact that I cannot write byte by byte in the external memory, or are there some additional settings I need to do in the linker and compiler in order to get my program to run in external memory. I am using Xilinx Platform Studio (XPS) to configure my system. Are there any special parameters that I need to set in the opb_emc to enable byte by byte access ? I could not find any such parameters. Thanks Richard
Reply to
Loading thread data ...

Hi Richard,

microblaze to communicate with a 128 KB asynchronous SRAM chip (IS63LV1024).

communicate with the SRAM chip. However, I can only write to the

updated instead.

There are two possiblilites


--------- So how do you write to memory? In C you should be aware to declare your pointer according to the data width you want to write.

int *my_memory_pointer = 0x0f100001;

*my_memory_pointer = 0x31; will set the whole word.

char *my_memory_pointer = 0x0f100001;

*my_memory_pointer = 0x31; will write only one byte


---------- How is your memory connected? Are you shure your byte - enable signals an not tied together?

In order to check whether your hardware or your software is the
reason for your problem try writing to memory using xmd.
 Click to see the full signature
Reply to
Erik Hansen

WRONG, if you look at XMD stub you see the stub only support

32 bit read write to memory, so if you do byte read/write then stub still reads/writes 32 and XMD emulates byte wide access!


Reply to
Antti Lukats
090702020000010806050304 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit


You have to use the HW debug logic in MicroBlaze and the opb_mdm.

This will give you true byte-write and a lot of other things.


Antti Lukats wrote:

Reply to
Goran Bilski

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.