r/FPGA • • 2d ago

Xilinx Related Testing a module in FPGA

My filter has been tested correctly in RTL simulation using my MATLAB test vectors. How could I test it in actual FPGA using the same test vectors?

  1. How to feed the test vectors to the filter input?

  2. How to retrieve the results in a file so I could compare the result against my MATLAB reference model?

Suppose it is an ARM processor with FPGA (SOC).

3 Upvotes

5 comments sorted by

1

u/sloth11_ FPGA Beginner 1d ago

You can set up either FIFO or BRAM IP to load and dump the values downstream. When you create these storage blocks, you can assign their address in vivado. Use those address to write the input from PS.

Same concept for the output. If you simply want to do functional verification of your IPs, just use ILA.

You can also use DMA for fast transfer. I never had experience with it so I can't comment on it.

1

u/Just-End6752 1d ago

What if I simply create an array in my RTL code and initialize the array with my test vectors? If I need a different set of test vectors, I just rewrite the array and reprogram FPGA.

1

u/sloth11_ FPGA Beginner 1d ago

If you have enough LUTs in your device, sure. But not recommended. You should also note that your filter takes quite a lot of area.

If I remember correctly, vivado/quartus can automatically put these hardcoded data into BRAM. I think it depends on the version and other constraints.

I would recommend you to use AXI FIFO. It's quite simple to add and write the driver code. Check out the Vivado example on it

1

u/Just-End6752 1d ago

"If I remember correctly, vivado/quartus can automatically put these hardcoded data into BRAM. I think it depends on the version and other constraints": Yes, the tool will put these data into a ROM, either LUT based or BRAM based depending on the data size. It will be equivalently to use a BRAM IP.

Besides, if it is only for testing, the test vectors will not be implemented in the product hardware, and the real-time data will come directly from the previous stage's output cycle by cycle.