How can I create a testbench for recording and processing an audio signal??

1 次查看(过去 30 天)
Hi I am working over a FPGA project which involves speech signal processing. I am done with Matlab code. Now I need to convert it to VHDL code. I have used waverecord command for recording sound. How can I create a corresponding test bench file?? or is there some other alternative to get the VHDL code??
Please Help Regards

采纳的回答

Tim McBrayer
Tim McBrayer 2014-10-22
For a MATLAB to HDL code project, you should be able to divide your code into your design (that will ultimately be placed on a FPGA) and the testbench code. The testbench code will read the data, perhaps process it in some fashion, and invoke the DUT, passing it the appropriate data. It will also read back the results and perform any necessary validation to verify (in MATLAB) that the design is working properly. The code that makes up the testbench is completely unrestricted; any MATLAB code, such as wavread, may be placed in the MATLAB testbench code.
Once you have your code partitioned in this fashion you can generate HDL code fro the design. You can also generate a HDL testbench, which will pass the input data recorded from the MATLAB simulation to the design, and verify that the design outputs match those recorded from the MATLAB run.
If you also have the HDL Verifier product you can co-simulate your generated HDL design directly in your MATLAB test bench. HDL Verifier also allows you to perform a FPGA-in-loop simulation, where your design is programmed into the FPGA on one of a set of supported hardware boards, and simulated in lock-step with your original MATLAB testbench.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Simulation, Tuning, and Visualization 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by