200K+ tool usages 50K+ downloads 38 tools, all free Intel Qualcomm Mediatek LG NVIDIA Samsung Broadcom NXP Huawei Texas Instruments AMD ARM Renesas Ciena 40+ more leading semiconductor companies Free for commercial and academic use 200K+ tool usages 50K+ downloads 38 tools, all free Intel Qualcomm Mediatek LG NVIDIA Samsung Broadcom NXP Huawei Texas Instruments AMD ARM Renesas Ciena 40+ more leading semiconductor companies Free for commercial and academic use

VHDL Testbench Generator

Generate a VHDL testbench with random stimuli, clocks and resets

This utility has been developed primarily for those who are learning VHDL and want to do a quick validation of their design(s). However, this tool can also be used for design/DV purpose. One such occasion could be when the RTL owner needs to compile, elaborate and run the 0th time simulation. The 0th time simulation is required in order to ensure that the simulation bringup is correct. There are certain design issues which does not show up until the design gets simulated at the 0th time.

You need Java JRE 1.8 or above to use all these utilities.

Usage

Download and extract the tar file and follow the simple steps/commands to generate the testbench. There are few examples which can be used as reference. Here is one example-

source setup_env.('csh' or 'sh' or 'bat' as applicable )
Alternatively, for Unix
setenv EDAUTILS_ROOT /usr/user1/DesignPlayer-linux.x86/01MAY2014 ( installation dir )
set path = ( $EDAUTILS_ROOT/bin $path )
and for Windows
set EDAUTILS_ROOT=D:\tmp\DesignPlayer-win32.x86_64\01MAY2014 ( installation dir )
set PATH="%path%;%EDAUTILS_ROOT%\bin"
gentbvhdl -in simple_bittype.vhd -top simple_bittype -out tb.vhd [-clk "clock1@10{data:address}" -clk clk2] [-rst reset1 -rst reset2]
OR
java com.eu.miscedautils.gentbvhdl.GenerateVHDLTestBench -in simple_bittype.vhd -top simple_bittype -out tb.vhd [-clk "clock1@10{data:address}" -clk clk2] [-rst reset1 -rst reset2]

Limitation

This tool fails to create the test vectors if the top module ports or generics contains user defined data types. It only supports predefined STD and IEEE data types.

You may consider to convert the VHDL into Verilog using vhdl2verilog and then generate a Verilog testbench generator using the verilog testbench generator tool .

Commands to simulate this testbench with Modelsim simulator

%vlib work

%vmap work work

%vcom ieee_std_logic_vector.vhd tb.vhd

%vsim -c -lib work tb_ieee_std_logic_vector_tb

VSIM 1> run 100ns

# Time = 0 ns in1 = UUUU in2 = UUUU out1 = UUUU

# Time = 0 ns in1 = 1111 in2 = 1110 out1 = UUUU

# Time = 0 ns in1 = 1111 in2 = 1110 out1 = 1110

# Time = 5 ns in1 = 1111 in2 = 1000 out1 = 1110

# Time = 5 ns in1 = 1111 in2 = 1000 out1 = 1000

# Time = 10 ns in1 = 1010 in2 = 0101 out1 = 1000

# Time = 10 ns in1 = 1010 in2 = 0101 out1 = 0000

...

...

# Time = 100 ns in1 = 1111 in2 = 0100 out1 = 0100

VSIM 2> quit

Generated Testbench: tb.vhd

library ieee;

use ieee.numeric_std.all;

use ieee.std_logic_1164.all;

package tb_conv_pack is

....

....

end package tb_conv_pack;

package body tb_conv_pack is

....

....

end package body tb_conv_pack;

library STD;

library ieee;

use std.textio.all;

use ieee.math_real.all; -- for UNIFORM, TRUNC

use ieee.numeric_std.all; -- for TO_UNSIGNED

use ieee.std_logic_1164.all;

use ieee.std_logic_textio.all;

use work.tb_conv_pack.all;

entity tb_ieee_std_logic_vector_tb is

end entity tb_ieee_std_logic_vector_tb;

architecture arch of tb_ieee_std_logic_vector_tb is

signal tb_indata_array : std_logic_vector( 0 to 7);

constant TB_CONST_ALL_1 : UNSIGNED ( 0 to 7) := ( others => '1' );

constant TB_MAX_LIMIT : integer := TO_INTEGER(TB_CONST_ALL_1);

signal tb_in1 : std_logic_vector( 3 downto 0 );

signal tb_in2 : std_logic_vector( 3 downto 0 );

signal tb_out1 : std_logic_vector( 3 downto 0 );

begin

tb_in1 <= tb_indata_array(0 to 3 );

tb_in2 <= tb_indata_array(4 to 7 );

inst : entity work.ieee_std_logic_vector port map

(in1 => tb_in1,

in2 => tb_in2,

out1 => tb_out1

);

process

variable seed1, seed2: positive;

variable rand: real;

variable int_rand: integer;

begin

loop

UNIFORM(seed1, seed2, rand);

int_rand := INTEGER(TRUNC(rand*(real(TB_MAX_LIMIT))));

tb_indata_array <= std_logic_vector(to_unsigned(int_rand,tb_indata_array'LENGTH));

wait for 5 ns;

end loop;

end process;

process( tb_in1,tb_in2,tb_out1)

variable var : line;

begin

write(var,string'("Time = "));

write(var,now);

write(var,string'(" in1 = "));

write(var,tb_in1);

write(var,string'(" in2 = "));

write(var,tb_in2);

write(var,string'(" out1 = "));

write(var,tb_out1);

writeline(OUTPUT,var);

end process;

end;

Online Video Demo

Part of the EDAUtils toolset

  • Baya - AI-enabled SoC integration with IP-XACT and a 200+ command Tcl API
  • IP-XACT 1685 solution - component packaging, registers, memory maps and generators
  • RTL utilities - parsers, translators, testbench and document generators
  • Run online free - try this tool in the browser, no install
Download VHDL Testbench Generator →

Trusted by design teams worldwide

The collection of tools and utilities fills a real void in EDA. The baya tool is exactly what we had been looking for to assemble large top-level modules in Verilog. The GUI and high-level TCL commands are intuitive, allowing designers to get started immediately.
Michael TrocinoIC Design Manager, Coherent Logix
Thanks for efficient tools which have been successfully used in our internal wireless design flow. Friendly support has been highly appreciated.
Claudine RaibautEDA Manager, Texas Instruments
Baya is a mature production quality tool with features and capabilities beyond those of tools provided by large EDA vendors. Its flexibility is a key reason we have chosen it for use in our Cloud-based platform.
David FritzCEO, Social Silicon
Kanai produced an excellent tool set, which is very useful for complex system-on-chip integration flows. We were skeptical in the beginning, but later got really impressed by the high quality and ease of use.
Boris V. KuznetsovCEO, SOCC
Thanks a lot for creating DesignPlayer and the huge Java class library behind it. Your strong support makes me confident to explore more details in future.
Rolf KemperManager, Mixed Signal Design, Renesas Electronics Europe
EDAUtils is one of the most comprehensive tools for SoC design and integration, and it is available for free. I included EDAUtils in the OpenTech Package as a featured application.
Jamil KhatibOpenTech Package
The VHDL2Verilog translator worked great, even handling the generate statements in the source VHDL. It met our needs exactly.
Jerry FrenkilVP of Engineering, NanoWatt Design
We use the Verilog Parser for developing FPGA CAD applications. The library is very stable and EDAUtils provided much helpful support to us.
Dustin PetersonUniversity of Tübingen
I like the IP-XACT tools and others that you have developed. The IP-XACT tools are great.
Amal KhailtashLead FPGA Designer, Ciena Communications
The netlist parser provides an easy to use and flexible environment for developing my own custom analysis tools. The best part has been the prompt and helpful support.
Gene Y. WuUniversity of Texas
We have been using the Verilog testbench generator in Unix. It is really useful in the coding process and easy to use. I would recommend their tools.
Lucas TeixeiraSMDH
That really helped me now. I got the job done at the right time.
S. KrishnanIntel
The collection of tools and utilities fills a real void in EDA. The baya tool is exactly what we had been looking for to assemble large top-level modules in Verilog. The GUI and high-level TCL commands are intuitive, allowing designers to get started immediately.
Michael TrocinoIC Design Manager, Coherent Logix
Thanks for efficient tools which have been successfully used in our internal wireless design flow. Friendly support has been highly appreciated.
Claudine RaibautEDA Manager, Texas Instruments
Baya is a mature production quality tool with features and capabilities beyond those of tools provided by large EDA vendors. Its flexibility is a key reason we have chosen it for use in our Cloud-based platform.
David FritzCEO, Social Silicon
Kanai produced an excellent tool set, which is very useful for complex system-on-chip integration flows. We were skeptical in the beginning, but later got really impressed by the high quality and ease of use.
Boris V. KuznetsovCEO, SOCC
Thanks a lot for creating DesignPlayer and the huge Java class library behind it. Your strong support makes me confident to explore more details in future.
Rolf KemperManager, Mixed Signal Design, Renesas Electronics Europe
EDAUtils is one of the most comprehensive tools for SoC design and integration, and it is available for free. I included EDAUtils in the OpenTech Package as a featured application.
Jamil KhatibOpenTech Package
The VHDL2Verilog translator worked great, even handling the generate statements in the source VHDL. It met our needs exactly.
Jerry FrenkilVP of Engineering, NanoWatt Design
We use the Verilog Parser for developing FPGA CAD applications. The library is very stable and EDAUtils provided much helpful support to us.
Dustin PetersonUniversity of Tübingen
I like the IP-XACT tools and others that you have developed. The IP-XACT tools are great.
Amal KhailtashLead FPGA Designer, Ciena Communications
The netlist parser provides an easy to use and flexible environment for developing my own custom analysis tools. The best part has been the prompt and helpful support.
Gene Y. WuUniversity of Texas
We have been using the Verilog testbench generator in Unix. It is really useful in the coding process and easy to use. I would recommend their tools.
Lucas TeixeiraSMDH
That really helped me now. I got the job done at the right time.
S. KrishnanIntel

Read all customer feedback →