简体   繁体   English

在没有FPGA的情况下测试我的HDL代码(Verilog / VHDL)?

[英]Testing my HDL Code (Verilog/VHDL) without an FPGA?

I've written a module in Verilog using vi as my editor and now I want to test it. 我使用vi作为编辑器在Verilog中编写了一个模块,现在我想测试它。 What are my options if I have no board? 如果我没有董事会,我有什么选择? How can I give my module inputs? 如何提供模块输入? Where can I see the results? 我在哪里可以看到结果? I have access to VCS by the way. 顺便说一句,我可以访问VCS。

Thank you. 谢谢。

You are probably looking for a simulator. 你可能正在寻找一个模拟器。

First, you have to write a testbench which wraps around your Verilog module and drives the input signals. 首先,您必须编写一个测试平台,它围绕您的Verilog模块并驱动输入信号。 This testbench can also check that the output of your module matches the expected output. 此测试平台还可以检查模块的输出是否与预期输出匹配。 You can find many tutorials on writing testbenches online. 您可以在线找到许多关于编写测试平台的教程。

This testbench and your module are then "executed" in a simulator. 然后,在模拟器中“执行”此测试平台和您的模块。 I'm not familiar with all the options, but I know the free Xilinx ISE Web Pack includes a simulator. 我不熟悉所有选项,但我知道免费的Xilinx ISE Web Pack包含一个模拟器。 Modelsim is a commercial package. Modelsim是一个商业包。 They also offer a free student edition. 他们还提供免费的学生版。

For anyone else who has the same question, I found a testbench tutorial, like Vortexfive suggested, in the link bellow: 对于其他有相同问题的人,我在下面的链接中找到了一个测试平台教程,如Vortexfive建议的那样:

http://www.asic-world.com/verilog/art_testbench_writing.html http://www.asic-world.com/verilog/art_testbench_writing.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM