Forum Discussion

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

Connection between Hardware and NIOS II (Bridges, Streaming)

Hello!

I am searching for a fast method to transfer data produced in the Verilog hardware to the NIOS II processor. My ideas are:

  • Using Avalon-MM Slave and Avalon-MM Master in the SOPC builder, but I don't know how they work; I can't even find the Avalon-MM Slave in SOPC builder :(

  • Filling the SRAM with bits (controlled by the Hardware) then transfer the SRAM control to the NIOS II, maybe through a tri-state-bridge or high z-states??

What is the best method to transfer data between hardware and the processor?

Best would be if 32 bit words could be transferred at 50 MHz.

Why I want to do that:

I need to transfer data produced at constant rate by the Verilog hardware to my computer. I already managed to send something via NIOS II+Ethernet to my computer. So the next step is to get the data from the Hardware into the NIOS II.

I am using the DE2-115 and the DE4 board and I want to transfer 1Gbit of data at a time.

Thank you!

4 Replies

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

    SGDMA would be the answer for You, but no chance that Nios will be capable of processing such data rate.

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

    Thank you, direct memory access is definitely what I need!

    I instantiated the Scatter-Gather DMA controller in the SOPC builder with the transfer mode "Stream to Memory" and connected the m_write output to the SDRAM and the two descriptor ports to an on chip-memory instance. So, remaining is the port "in" in SOPC builder that I need to connect to an "Avalon-ST source".

    Can you tell me what I need to connect this to in the SOPC builder to have an actual input in my Nios module in the Verilog code?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    You need to put your verilog code into a custom SOPC component, that provides the data through a standard Avalon Stream Source interface.

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

    Thanks! I need to learn how to do that, but looks complicated at first glance.

    For now, I use PIO registers and a hardware buffer, which can be read at approximately 5MHz.

    Cheers