tanh Testbench
The testbench calculates the tanh values for -1.13, -0.8, 0.6, 0.77, 1.06, and 1.13.
The testbench outputs the
following:
# Loading sv_std.std
# Loading work.tb_tanh(fast)
# time=187 i_data= -74056(-1.13) o_tanh= -53150(-0.811005)
# time=275 i_data= -52429(-0.80) o_tanh= -43518(-0.664032)
# time=363 i_data= 39322( 0.60) o_tanh= 35198(0.537079)
# time=451 i_data= 50463( 0.77) o_tanh= 42398(0.646942)
# time=539 i_data= 69468( 1.06) o_tanh= 51490(0.785675)
# time=627 i_data= 74056( 1.13) o_tanh= 53150(0.811005)
# ---PASSED---Note: The output values in
parentheses are in floating-point format.