Forum Discussion

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

generate waveform output on FPGA

I am trying to store a sampled waveform onto FPGA, which I could then output to feed a chip. Previously, the number of samples was relatively small (approx 150k).

But I now need to store about 3 million samples. So I don't think it's possible to store this as a ROM on FPGA.

So what is the alternative? Can the waveform be written to a text file then stored on SDRAM? How would I do this?

3 Replies

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

    You didn't say anything about your sampling rate etc.

    Yes, if your sampling rate is low, you could read the ADC with a NIOS and write a text file to SDRAM, then read it and write it out to the DAC.

    But you might find it overall simpler to use binary data with one DMA block to read from the ADC, and another DMA to write to the DAC.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I should clarify. The waveform I am referring to is a VCD with a clock period of 32ns. So I have a large VCD that contains some signals I want to store on FPGA, then drive a chip with these digital signals as inputs.

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

    Consider converting the VCD to a binary format on the PC, loading that in the SDRAM, and then use a DMA channel to push that to your pins. One option would be to DMA into a DCFIFO with the write-side operating at the SDRAM clock rate, and the read-side operating at your desired 32ns period with the rdreq always '1'. Theres lots of different ways you could do it, this is just one idea.