VHDL calculator