Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
17 years ago

The problem of reading the data of the memory

hello!

i know the address of memory and i want to read the data.

for example:

i know the address of SDRAM is 0x01000000,

what should i do to read the data from the SDRAM.

thanks in advance.

4 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Do you use a SDRAM controller?

    Do you want to access it from a CPU or from custom hardware?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    yes i have a sdram controller;

    i want to read the data from the address through the application.

    thank you very much.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    You can use C pointers for that.

    Do you also use the sdram to store the software itself? In that case you'll have to use a memory allocation function, such as malloc(), to allocate a memory area. If not, you can just get the address and size of your memory area from system.h.