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