Sign in

username:

password:



Not a member?

Search Comp.Arch.FPGA



Search tips

fpga by Keywords

Altera | ASIC | CPLD | Cyclone | DCM | DDR | DSP | Ethernet | ISE | JTAG | Linux | LVDS | Microblaze | ML310 | Modelsim | NIOS | OPB | PCI | Quartus | RocketIO | SDRAM | Spartan | Spartan3 | SRAM | Stratix | Verilog | VHDL | Virtex | Virtex-4 | Virtex-II | Xilinx | XST


Ads

See Also

DSPEmbedded SystemsElectronics

Comp.Arch.FPGA | Accessing SRAM on the Spartan-3 Starter Board

There are 4 messages in this thread.

You are currently looking at messages 0 to 4.

Accessing SRAM on the Spartan-3 Starter Board - jmariano - 2007-05-10 08:25:00

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

______________________________
Join the blogging team on FPGARelated.com and earn rewards! Details Here.



Re: Accessing SRAM on the Spartan-3 Starter Board - Antti - 2007-05-10 08:30:00

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










Re: Accessing SRAM on the Spartan-3 Starter Board - Pablo - 2007-05-11 06:55:00

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..


Re: Accessing SRAM on the Spartan-3 Starter Board - jmariano - 2007-05-11 10:10:00

Great, tank you both very much.

Regards,

jose mariano