Evaluate a module correctness by running its testbench
Consider the testbench unit's name to be "testbench" as depicted in the figure.
In the Transcript window execute the following command:
vsim work.testbench
Importnat: For different testbench modules the name of the testbench module needs to be replaced in the above command with the correct one.
In the newly opened simulation layout (which usually include some new windows such as sim, Objects, Processes), execute the following command in the Transcript window:
run
Provided that the testbench was written correspondingly, the simulation output will indicate the number of passed and failed test cases.
Important: Before modifying any of the source files, close the simulation!
Close simulation by executing the following command in the Transcript window:
quit -sim