Creating HDL Text Modules, страница 69

•  Save the waveform as TIMING.awf

                                              E.4 WAVES Testbenches

Now you will compare waveforms 

•  Select the Compare Waveforms option from the Waveform menu

•  Open FUNCTIONAL.awf waveform
Difference marks are shown with blue lines and the signal that you compare to is shown in red

                                              E.5 WAVES Testbenches

Now you can measure delays 

•  Zoom in to clearly see the delay effect

•  Switch to  the Measurement Mode

•  Measure some delays

                                       E.6 WAVES Testbenches

You can generate WAVES Testbenches for timing simulation

•  The WAVES-based testbench simultaneously drives the inputs and compares the output response with a previously saved pattern.

•  During simulation, the test vectors (stimulus and output response) are read from the test vector file (*.VEC).

•  The Testbench Wizard generates the test vector file (*.VEC) from a waveform file (*.AWF) created in the Waveform Editor.

•  Typically, a WAVES testbench is created during the design stage.

•  The second possibility is to use WAVES testbenches to compare timing and functional simulation results.

•  The WAVES testbench is compliant with IEEE Standard and can also be used in electrical test environment.

                                            E.7 WAVES Testbenches

•  Close all open files, DO NOT save any changes

•  Switch to the Files tab in Design Browser

•  Right click on the count(structure) architecture

•  Select the Generate TestBench… option

                                         E.8 WAVES Testbenches

•  Select WAVES Based as testbench type

•  Select structure architecture

•  Press the Next button


                                                   E.9 WAVES Testbenches

•  Press the Browse button

•  Open FUNCTIONAL.awf file

•  Press the Next button

•  Press the Next button

•  Press the Finish button

                                                E.10 WAVES Testbenches

   The testbench wizard creates a Waves folder in the Design Browser window. This folder contains several files.

•  Count_TB_pins.vhd    - package containing declaration of enumeration type with the
                                       UUT ports names

•  Count _TB_declaration.vhd - package containing declaration of all constants and types

                                                           used in testbench

•  Count _TB_header     - TEXT header file containing the main information about
                                       WAVES testbench files and objects

•  waves_objects.vhd       - standard WAVES package

•  monitor_utilities.vhd    - package containing procedures for monitoring and
                                       comparison of the UUT response

•  waves_generator.vhd - package containing procedure for reading test vectors from
                                       the file and generating stimulus and output patterns

•  FUNCTIONAL.vec     - file with test vectors

•  Count _TB.vhd            - top-level testbench entity

•  Count - macro for compilation of files, simulation initialization,                   waveform creation and simulation of the whole testbench

                                                E.11 WAVES Testbenches

•  Links to files with the      icon are not generated by the WIZARD. These files are fixed and are the same for each WAVES testbench.

                                                The rest of the files are specific for the design. The two most important files are:

•  *_declaration.vhd - where the user can change some objects declarations important for simulation

•  * - the simulation macro, which can also be customized by the user