Here is an example of a DSP function implemented in VHDL.