A Verilator/Icarus Benchmark
John Bryan
- A performance benchmark of testing unsigned multiplier Verilog of various size is carried out.
-
The two testing tools are:
-
Verilator using a C++ testbench.
-
Icarus Verilog using a Verilog testbench.
-
For increasing multiplier product bit lengths, the multiplier is tested
for all possible input combinations.
-
The test script is written in Perl. The Perl script, for increasing
multiplicand/multiplier bit lengths, performs the following actions:
-
Generate the unsigned Wallace multiplier Verilog.
-
Generate the Verilog testbench.
-
Time the testing of the multiplier for all input combinations using Icarus Verilog.
-
Generate the C++ Verilator testbench.
-
Time the testing of the multiplier for all input combinations using Verilator.
The timed tests are done for increasing multiplier/multiplicand bit lengths and plotted. The times are the combined compilation and simulation times.
-
Perl implementation.
-
The Perl script takes three arguments.
- multiplicand size.
- multiplier size.
- The number of increasing input operand sizes to be tested.
The sizes of the multiplier and multiplicand will
increment by one bit in an alternate manner.
- Example command: perl wallace_benchmark.pl 6 6 8
-
Sample output:
-
Results: