4

I've written a module in Verilog using vi as my editor and now I want to test it. 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.

Thank you.

Ryan
  • 441
  • 1
  • 5
  • 12
  • You need to ensure your code is synthesizable. Then check the functionality of design = testbench. A `lint` tool maybe good thing you want. – Khanh N. Dang Oct 30 '12 at 17:44

2 Answers2

7

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. 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. Modelsim is a commercial package. They also offer a free student edition.

Vortexfive
  • 1,889
  • 13
  • 19
  • @Ryan If you prefer a free (open) simulator I recommend [GHDL](http://ghdl.free.fr/). I've used it on several small projects and it works very well. – Peter Bennett Oct 30 '12 at 19:14
2

For anyone else who has the same question, I found a testbench tutorial, like Vortexfive suggested, in the link bellow:

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

Ryan
  • 441
  • 1
  • 5
  • 12