Accessing SRAM on the Spartan-3 Starter Board

Dear All,

I'm sure this question was already been posted (and answered) in this list, but I could not find a suitable answer for my little knowledge of this matters, so, with my apologies, i'm posting it again.

I'm developing a microblaze system based on the Spartan-3 starter kit board. I need to access the on-board SRAM from my C code. I have hooked the SRAM to the OPB bus using BSB. The automatically generated memory_test application works just fine.

I just need the memory to hold data during program execution, e.g, int's, I d'ont have any sort of timing requirements.

My question is: how i'm I suppose to read and write to/from the SRAM? Just use the XIo_Out/In(32, 16, 8) library functions or is their a more efficient way of accessing the memory? I'm particulary confused by the functions on the XEmc library, that are related to the SRAM, but I really d'ont know what they do.

Tank you all,

Jos=E9 Mariano

Reply to
Loading thread data ...

a small hint:

just look the way the Xio_out is actually done in the xilinx library source. there you see how todo it.

its just standard C pointer access to raw memory


Reply to

As Antti has said, you only have to create a pointer such as int *sdram_pointer=3D(int *)(0x22000000)

*sdram_pointer=3D..... sdram_pointer++; .=2E..
Reply to

Great, tank you both very much.


jose mariano

Reply to

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.