|
<< Click to Display Table of Contents >> 4.4 Export VHDL and Verilog test benches |
![]() ![]()
|
SynaptiCAD offers several different levels of test bench generation. This section covers the features in WaveFormer Pro and WaveFormer Lite which generates VHDL and Verilog stimulus models from a single timing diagram. The generated files are normally used with external simulators, and with FPGA tools like Xilinix ISE, Altera Quartus, and Microsemi (Actel) Libero. SynaptiCAD also offers more advanced code generation in the following products:
| • | Reactive Test Bench Generation Option upgrades WaveFormer, VeriLogger, and BugHunter so that they can generate single diagram test benches that react to the model under test during simulation and produce pass or fail reports. See the Reactive Test Bench manual for more information about this feature. |
| • | TestBencher Pro generates multi-diagram, self-testing, reactive test benches. Perfect for building bus-functional models of microprocessor and bus interfaces. The TestBencher Manual describes this type of generation. |
| • | VeriLogger Pro and BugHunter Pro also generate interactive stimulus test benches (like WaveFormer) except that the testbench is tightly integrated into the simulation debugger and allows for very quick testing of models. Chapter 3: Waveforms and Test Bench Generation of the BugHunter & VeriLogger Manual describes this type of generation. |
Import or setup the Signal names and types
In order for the exported testbench model to hook up to your model under test, the signal names (including type, size and direction) must match. You can either have WaveFormer parse and extract this information (auto-extraction requires Reactive Test Bench option) or you can set it manually using the Signal Properties dialog.
Auto-extraction Steps (Reactive Test Bench option required)
|
|
||||||
|
|
|
|
Or manually enter signal type information:
If you add the signals manually, the following settings will need to be set for each signal:
|
|
|
SynaptiCAD |
Verilog |
VHDL |
4_state |
reg |
std_logic |
4_state_vector |
reg |
std_logic_vector |
bool |
reg |
boolean |
2_state |
reg |
bit |
2_state_vector |
reg |
bit_vector |
byte |
reg |
bit_vector |
int |
integer |
integer |
unsigned_int |
integer |
natural |
real |
real |
real |
fixed_len_string |
reg |
string |
variable_len_string |
|
|
time |
time |
time |
event |
event |
|
std_logic |
|
std_logic |
std_logic_vector |
|
std_logic_vector |
std_ulogic |
|
std_ulogic |
std_ulogic_vector |
|
std_ulogic_vector |
signed_logic |
|
signed |
unsigned_logic |
|
unsigned |
actel_current_delta |
reg |
std_logic |
actel_temperature |
reg |
std_logic |
actel_voltage |
reg |
std_logic |
actel_voltage_common |
reg |
std_logic |
actel_voltage_delta |
reg |
std_logic |
To export a timing diagram:
|
The plain VHDL or Verilog formats generates a stimulus module that can be included into a user-written top level test bench. The Top Level Test Bench types instantiates the model in the Project window and the stimulus model within a top-level model. This top-level module can then be simulated without any additional setup. The VCD format generates a stimulus file that can be read by other EDA tools and test equipment (not a test bench model). |
||||
|
|
VHDL Library and Use Clause statement support:
If Libraries or Use Clauses need to be added to the generated model, then specify them in the VHDL Libraries and Use Clauses to Include dialog.
|
|
|
VHDL User-Defined Types are supported:
|
|
|