13.23.26 Creating Your Testbench with WaveFormer Pro
WaveFormer Pro generates VHDL and Verilog testbenches from drawn waveforms. Create your testbench after you are done creating your design and wish to perform simulation. If you do not have WaveFormer Pro, create your testbench with an alternative third-party tool.
There are five basic steps for creating testbenches using WaveFormer Pro and Libero IDE. These steps are described in detail in the following sections.
To create a testbench using WaveFormer Pro:
- Click WaveFormer Pro in the Project Flow window. WaveFormer Pro starts and your signal information is imported automatically.
- Using WaveFormer Pro, draw the waveforms to describe the testbench.
- From the Export menu, choose Export Timing Diagram and choose the save type as *.tim or *.btim. This saves the waveforms.
- (Optional) Add VHDL Libraries and Use Clauses for VHDL export. These libraries or packages can be included using the VHDL Libraries and Use Clauses dialog. From the Options menu, select the VHDL Libraries and Use Clauses menu item to open this dialog.
- From the Export menu, choose
Export Timing Diagram and choose the type of file to generate. To generate a plain
testbench model (which does not instantiate your model under test), choose one of the VHDL
or Verilog scripts. To simulate with the testbench model, you will need to write a top-level
model that instantiates the testbench model and the model under test. Below is a list of
VHDL and Verilog testbench generation scripts:
- VHDL Wait (*.vhd)s
- VHDL Transport (*.vhd)s
- Verilog
- From the File menu, choose Exit.
Synplify always changes the data type to std_logic or std_logic_vector in the post_synthesis netlist. If your top-level entity port is not std_logic or std_logic_vector and you need to run post-synthesis or post-layout simulation, you need to change the data type in WFL.
To create two testbenches:
- Open the *.tim file and select the special data type signal, right-click and choose Edit Selected Signal.
- Choose std_logic or std_logic_vector under VHDL and click Save.
