Chapter 4: Simulating the H. 264 Motion Estimation Engine Core

R

4.Testbench source file:

/HDL/LowCost_MotionEstimation/MotionEstimation/Testbench/ MotionEstimation_TB.vhd

Running the Test Bench

To run the test bench:

1.Double-click on the vsim_gui.bat file. This spawns the ModelSim GUI. Two wave windows are given. One (MotionEstimation_user) is meant to contain user- defined signals. The user may use this window to view any internal signals of his choice. The other (MotionEstimation_core) shows the signals at the periphery of the core to give the user a feel for the typical interfacing activity required.

If the the following error is received, the user needs to run the refresh command, vcom -refresh:

#**Error: (vsim-13) Recompile work.vfbc_infrastructure because C:\opt\Modeltech_6.1f\xilinx_libs_9_2_03i_ip2\.\unisims.vcomponents has changed.

2.In the ModelSim environment, enter run -all. This runs for about 15 minutes.

The stimulus data for this simulation is held in the

\HDL\LowCost_MotionEstimation\MotionEstimation\Testbench\stimul i directory, consisting of several input text files and some expected output text files. The stimulus data files and expected output files provided contain data extracted from the reference C model (see [Ref 1]).

The simulation generates these output files:

\HDL\LowCost_MotionEstimation\MotionEstimation\Testbench\ MotionEstimation_MVs.out.txt

\HDL\LowCost_MotionEstimation\MotionEstimation\Testbench\ MotionEstimation_ParamsMB.out.txt

\HDL\LowCost_MotionEstimation\MotionEstimation\Testbench\ MotionEstimation_SADs.out.txt

that are directly comparable to the reference expected output.

\HDL\LowCost_MotionEstimation\MotionEstimation\Testbench\ stimuli\MotionEstimation_MVs.out.txt

\HDL\LowCost_MotionEstimation\MotionEstimation\Testbench\ stimuli\MotionEstimation_ParamsMB.out.txt

\HDL\LowCost_MotionEstimation\MotionEstimation\Testbench\ stimuli\MotionEstimation_SADs.out.txt

Note: Xilinx has provided a .vho source file as an example of how to instantiate the Motion Estimation Engine core. It is not provided as compilable source code for ModelSim. All simulations are to be run using the precompiled libraries provided.

In Chapter 5, “Verifying the System,” of this document, the process by which stimulus and expected results are generated from the reference code is described. The generated files may be used in place of the default simulation files provided with the release, but must reside in the locations mentioned above during simulation.

22

www.xilinx.com

H.264 Motion Estimation Engine

 

 

UG453 (v1.1) April 22, 2008

Page 22
Image 22
Xilinx UG4153 manual Running the Test Bench, Simulating the H Motion Estimation Engine Core, Testbench source file