Home ] Up ] Play The Game ] [ Game Simulation ] Diagrams and Components ]
Game Simulation

Up ]

Return to DIG #15
Demonstration of the Test Bench

In order to test the functionality of a design will most likely test all components and the complete design with a number of Test Benches.
In some cases must you write 80 lines of Test Bench VHDL code for each 20 lines implementation code.

 
Note how the numbers 1024, 4357 and 7690 guessed
 
   
 
Zooming
 
   
 
   
 
 

Test Bench Code - Overview

When writing VHDL code for simulation can you take advance of the complete language. Each line of concurrent code (including processes) will run "in parallel" and independent of each other if you want them to.

However can you with great advantage write Test code which interacts with the Unit Under Test.

For instance will the Bin2Bcd process react at the Strobe signal and generate a Ready signal after 13 clock periods.

The Player process will react the same way as human player. Create a number to Guess - watch the actual Guess  and press "Hi", "Lo" or "Ok". The code can be modified to create more numbers.

   

The Complete Test Bench Code