Adding a Testbench and Simulating with a Testbench

Notes On Above Video:

The video says to ‘run 1us’. If that is long enough for the testbench to complete, you will get the completion message printed to the Tcl console. However, the testbench may take longer than that to run.

The way to ask it to run to completion would be to type ‘run -all’. It should then run to completion, however long that takes. When done, it will print the time it terminates in the final message.

The flip side of the coin, however, is that later in the semester you will have testbenches that run for 5-15 minutes. For those, a smart thing to do is to run initially for only a few hundreds or thousands of nanoseconds and see if you are getting errors in the console and if the waveforms are free from ‘X’ values. Only then, should you do a ‘run -all’. Otherwise, you will have waited for 5-15 minutes for nothing and wasted your time…

And, remember, as the simulation is running if it encounters an error it will immediately print that error to the console. So, watch the console for error messages – as soon as they start to appear, just kill the simulation and then debug what is going wrong.