Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
17264 Discussions

generate waveform output on FPGA from file

Altera_Forum
Honored Contributor II
1,227 Views

I have a testbench that generates inputs to my module. It works in simulation. What I want to do is take the waveform of these inputs (5 of them, each is just 1 bit) and put those an on FPGA that outputs them and feeds into the chip to test for real. So the FPGA becomes like a signal generator outputting the testbench waveforms in simulation. 

Is there any suggestion the best way to do this? I am thinking to write the waveform inputs to a txt file from simulation and maybe load this to the SRAM that the FPGA can read and send out. Though I'm not sure how to do this (if this is the best way).
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
542 Views

Depending on the size of your stimulous waveforms, the easiest way is to just set them up as a ROM in the FPGA, and have a simple state machine that addresses the rom to drive the outputs. I wouldn't bother with the SDRAM unless the size of the files are larger than what will fit into the internal rams of the FPGA. 

 

Pete
0 Kudos
Altera_Forum
Honored Contributor II
542 Views

Thanks. I was thinking the same thing as a possibility. I have around 135k samples. So I thought I could make a big counter that addresses the ROM, to spit out the values of the waveform at each clock cycle. I guess that's what you mean right?

0 Kudos
Altera_Forum
Honored Contributor II
542 Views

 

--- Quote Start ---  

Thanks. I was thinking the same thing as a possibility. I have around 135k samples. So I thought I could make a big counter that addresses the ROM, to spit out the values of the waveform at each clock cycle. I guess that's what you mean right? 

--- Quote End ---  

 

 

Yes. But with 135k samples you may have to get tricky. The Megawizard will only generate a maximum size rom of 64 K samples, (65535 word), so you will need to have a couple of these to make it work. The final limiting factor is the number of block rams you have in the device however. 

 

Pete
0 Kudos
Altera_Forum
Honored Contributor II
542 Views

Thanks. I'll give it a try.

0 Kudos
Reply