Forum Discussion

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

Sdram access in HDL and Nios II

Hi

I'm fairly new to FPGA programming.

I would like to use the onboard sdram memory of my DE2-70 board to pass data between c++ software, running on a Nios II cpu and a verilog component.

What would be the most ideal way to do this (performance and usability taken into account)?

I'm already able to include a sdram controller using the SOPC builder and accessing it in C++ by directly writing to the sdram memory address I found in the SOPC builder.

What I don't see is how I can access this data from a custom verilog component (in this case for writing an array of pixels to an electronic sign.

Any help is much appreciated.

Thanks

13 Replies

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

    It seems I've been able to create the dual port memory using the megafunction wizard.

    But how do I connect one end to my custom ip core and the other port via a avalon slave to the nios. I tried adding it in the SOPC builder but I couldnt understand the connections between the dp ram and the avalon slave interface.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    this is a bit hard to explain over the web, but its pretty easy to do. if you put your mouse over the slave port on your memory, you should see buss lines show up. You need to click the node to connect that particular slave to your master you want to be connected to it.

    You can more than one master hooked to the same slave. There is an arbitor inserted for you by the avalon fabric. hope that helps.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    @ Zwok

    Could you please help me in this .. How did you write the pixels from the Nios II C code into the SDRAM?

    What C code did you use?

    Thanks