There are 4 messages in this thread.
You are currently looking at messages 0 to 4.
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______________________________
On 10 Mai, 14:25, jmariano <jmarian...@gmail.com> wrote: > 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 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 Antti
On May 10, 2:25 pm, jmariano <jmarian...@gmail.com> wrote: > 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 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..