UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Observer vivabbk
Observer
5,051 Views
Registered: ‎11-05-2010

How to write/ read data with DDR2 SDRAM ?

Jump to solution

Hi everyone,

 

I'm trying to write/read data with ddr2 sdram(part of MPMC) handling xupv5_bsb_system(have MicroBlaze).

 

Which API can I use?

 

 

Long for your help.

 

 

Thanks,

Allen

0 Kudos
1 Solution

Accepted Solutions
Newbie juanjoab
Newbie
6,376 Views
Registered: ‎11-17-2010

Re: How to write/ read data with DDR2 SDRAM ?

Jump to solution

Hi, I'm using EDK 12.1 but I think that you only have to put in your code: #include "xio.h"

 

In my projects the location of the file is microblaze_0\include

View solution in original post

5 Replies
Newbie juanjoab
Newbie
5,041 Views
Registered: ‎11-17-2010

Re: How to write/ read data with DDR2 SDRAM ?

Jump to solution

Hello.

 

I think you can use something like this:

 

For read one of this:

XIo_In8(XPAR_DDR2_SDRAM_MPMC_BASEADDR);

XIo_In16(XPAR_DDR2_SDRAM_MPMC_BASEADDR);

XIo_In32(XPAR_DDR2_SDRAM_MPMC_BASEADDR);

 

For write:

XIo_Out8(XPAR_DDR2_SDRAM_MPMC_BASEADDR,data);

XIo_Out16(XPAR_DDR2_SDRAM_MPMC_BASEADDR,data);

XIo_Out32(XPAR_DDR2_SDRAM_MPMC_BASEADDR,data);

 

And include "xio.h"

 

0 Kudos
Observer vivabbk
Observer
5,026 Views
Registered: ‎11-05-2010

Re: How to write/ read data with DDR2 SDRAM ?

Jump to solution

Hi Juan,

 

Thanks. I'm using EDK11.1, and I can't find the "xio.h" file.

 

Can you please tell me its location?

 

 

Thanks,

Allen

0 Kudos
Newbie juanjoab
Newbie
6,377 Views
Registered: ‎11-17-2010

Re: How to write/ read data with DDR2 SDRAM ?

Jump to solution

Hi, I'm using EDK 12.1 but I think that you only have to put in your code: #include "xio.h"

 

In my projects the location of the file is microblaze_0\include

View solution in original post

Observer vivabbk
Observer
4,986 Views
Registered: ‎11-05-2010

Re: How to write/ read data with DDR2 SDRAM ?

Jump to solution

Hi Juan,

 

Thanks for your help.

 

However, these two functions can only write/read data once a number.

 

Do you know any functions to write/read data once a block?

 

Thanks,

Allen

 

0 Kudos
Newbie juanjoab
Newbie
4,971 Views
Registered: ‎11-17-2010

Re: How to write/ read data with DDR2 SDRAM ?

Jump to solution

I see your other post. If you use XIo_In16, XIo_Out16 or XIo_In32, XIo_Out32 you can write values of 16 or 32 bits.

0 Kudos