The current testbench code generated by testhdb had some problems for me, GHDL would exit with error: overflow. I took this as an opportunity to clean up the testbench a little bit.
Since GHDL supports VHDL-2008 since version 0.33 and Ubuntu ships 0.37 or newer I made use of the to_hstring() function of VHDL-2008. This remove a lot of code from the testbench. Also I removed the deprecated Std_Logic_arith package.
The output now contains hex strings for actual and expected, which might or might not be desired:
The current testbench code generated by
testhdb
had some problems for me, GHDL would exit witherror: overflow
. I took this as an opportunity to clean up the testbench a little bit.Since GHDL supports VHDL-2008 since version 0.33 and Ubuntu ships 0.37 or newer I made use of the
to_hstring()
function of VHDL-2008. This remove a lot of code from the testbench. Also I removed the deprecatedStd_Logic_arith
package.The output now contains hex strings for actual and expected, which might or might not be desired:
The generated code looks like this
Someone should test this with the Modelsim backend.